diff --git a/package.json b/package.json index 4aa60a8..20b0dce 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ }, "dependencies": { "bytebuffer": "^5.0.1", - "protobufjs": "^7.6.5", "tf2-backpack": "^1.2.3", "vdf": "^0.0.2" }, "devDependencies": { + "protobufjs-cli": "^2.6.1", "steam-user": "^5.3.0", "steamid": "^2.1.0" }, diff --git a/protobufs/generated/_load.js b/protobufs/generated/_load.js index 2f5c475..520d3bd 100644 --- a/protobufs/generated/_load.js +++ b/protobufs/generated/_load.js @@ -1,4 +1,4 @@ -// Auto-generated by generate-protos script on Thu Jul 16 2026 22:49:27 GMT+0800 (Malaysia Time) +// Auto-generated by generate-protos script on Tue Jul 21 2026 17:03:37 GMT+0800 (Malaysia Time) const Schema = module.exports; diff --git a/protobufs/generated/base_gcmessages.js b/protobufs/generated/base_gcmessages.js index f266195..f7da6f2 100644 --- a/protobufs/generated/base_gcmessages.js +++ b/protobufs/generated/base_gcmessages.js @@ -1,4 +1,4 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-mixed-operators, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars, default-case, jsdoc/require-param*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) @@ -12,13 +12,14 @@ // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + var $Object = $util.global.Object, $undefined = $util.global.undefined, $Error = $util.global.Error, $TypeError = $util.global.TypeError, $Array = $util.global.Array, $String = $util.global.String, $parseInt = $util.global.parseInt, $Number = $util.global.Number, $BigInt = $util.global.BigInt, $Boolean = $util.global.Boolean, $isFinite = $util.global.isFinite; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); /** * EGCBaseMsg enum. - * @exports EGCBaseMsg + * @name EGCBaseMsg * @enum {number} * @property {number} k_EMsgGCSystemMessage=4001 k_EMsgGCSystemMessage value * @property {number} k_EMsgGCReplicateConVars=4002 k_EMsgGCReplicateConVars value @@ -31,7 +32,7 @@ * @property {number} k_EMsgGCLANServerAvailable=4511 k_EMsgGCLANServerAvailable value */ $root.EGCBaseMsg = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[4001] = "k_EMsgGCSystemMessage"] = 4001; values[valuesById[4002] = "k_EMsgGCReplicateConVars"] = 4002; values[valuesById[4003] = "k_EMsgGCConVarUpdated"] = 4003; @@ -46,13 +47,13 @@ /** * EGCBaseProtoObjectTypes enum. - * @exports EGCBaseProtoObjectTypes + * @name EGCBaseProtoObjectTypes * @enum {number} * @property {number} k_EProtoObjectPartyInvite=1001 k_EProtoObjectPartyInvite value * @property {number} k_EProtoObjectLobbyInvite=1002 k_EProtoObjectLobbyInvite value */ $root.EGCBaseProtoObjectTypes = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1001] = "k_EProtoObjectPartyInvite"] = 1001; values[valuesById[1002] = "k_EProtoObjectLobbyInvite"] = 1002; return values; @@ -60,13 +61,13 @@ /** * GCGoodbyeReason enum. - * @exports GCGoodbyeReason + * @name GCGoodbyeReason * @enum {number} * @property {number} GCGoodbyeReason_GC_GOING_DOWN=1 GCGoodbyeReason_GC_GOING_DOWN value * @property {number} GCGoodbyeReason_NO_SESSION=2 GCGoodbyeReason_NO_SESSION value */ $root.GCGoodbyeReason = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "GCGoodbyeReason_GC_GOING_DOWN"] = 1; values[valuesById[2] = "GCGoodbyeReason_NO_SESSION"] = 2; return values; @@ -76,28 +77,41 @@ /** * Properties of a CGCStorePurchaseInit_LineItem. - * @exports ICGCStorePurchaseInit_LineItem - * @interface ICGCStorePurchaseInit_LineItem + * @typedef {Object} CGCStorePurchaseInit_LineItem.$Properties * @property {number|null} [item_def_id] CGCStorePurchaseInit_LineItem item_def_id * @property {number|null} [quantity] CGCStorePurchaseInit_LineItem quantity * @property {number|null} [cost_in_local_currency] CGCStorePurchaseInit_LineItem cost_in_local_currency * @property {number|null} [purchase_type] CGCStorePurchaseInit_LineItem purchase_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCStorePurchaseInit_LineItem. + * @exports ICGCStorePurchaseInit_LineItem + * @interface ICGCStorePurchaseInit_LineItem + * @augments CGCStorePurchaseInit_LineItem.$Properties + * @deprecated Use CGCStorePurchaseInit_LineItem.$Properties instead. + */ + + /** + * Shape of a CGCStorePurchaseInit_LineItem. + * @typedef {CGCStorePurchaseInit_LineItem.$Properties} CGCStorePurchaseInit_LineItem.$Shape */ /** * Constructs a new CGCStorePurchaseInit_LineItem. * @exports CGCStorePurchaseInit_LineItem * @classdesc Represents a CGCStorePurchaseInit_LineItem. - * @implements ICGCStorePurchaseInit_LineItem * @constructor - * @param {ICGCStorePurchaseInit_LineItem=} [properties] Properties to set + * @param {CGCStorePurchaseInit_LineItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCStorePurchaseInit_LineItem(properties) { + var CGCStorePurchaseInit_LineItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCStorePurchaseInit_LineItem item_def_id. @@ -136,10 +150,14 @@ * @function create * @memberof CGCStorePurchaseInit_LineItem * @static - * @param {ICGCStorePurchaseInit_LineItem=} [properties] Properties to set + * @param {CGCStorePurchaseInit_LineItem.$Properties=} [properties] Properties to set * @returns {CGCStorePurchaseInit_LineItem} CGCStorePurchaseInit_LineItem instance + * @type {{ + * (properties: CGCStorePurchaseInit_LineItem.$Shape): CGCStorePurchaseInit_LineItem & CGCStorePurchaseInit_LineItem.$Shape; + * (properties?: CGCStorePurchaseInit_LineItem.$Properties): CGCStorePurchaseInit_LineItem; + * }} */ - CGCStorePurchaseInit_LineItem.create = function create(properties) { + CGCStorePurchaseInit_LineItem.create = function(properties) { return new CGCStorePurchaseInit_LineItem(properties); }; @@ -148,21 +166,28 @@ * @function encode * @memberof CGCStorePurchaseInit_LineItem * @static - * @param {ICGCStorePurchaseInit_LineItem} message CGCStorePurchaseInit_LineItem message or plain object to encode + * @param {CGCStorePurchaseInit_LineItem.$Properties} message CGCStorePurchaseInit_LineItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCStorePurchaseInit_LineItem.encode = function encode(message, writer) { + CGCStorePurchaseInit_LineItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_def_id != null && Object.hasOwnProperty.call(message, "item_def_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.item_def_id); - if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.quantity); - if (message.cost_in_local_currency != null && Object.hasOwnProperty.call(message, "cost_in_local_currency")) + if (message.cost_in_local_currency != null && $Object.hasOwnProperty.call(message, "cost_in_local_currency")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.cost_in_local_currency); - if (message.purchase_type != null && Object.hasOwnProperty.call(message, "purchase_type")) + if (message.purchase_type != null && $Object.hasOwnProperty.call(message, "purchase_type")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.purchase_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -171,12 +196,12 @@ * @function encodeDelimited * @memberof CGCStorePurchaseInit_LineItem * @static - * @param {ICGCStorePurchaseInit_LineItem} message CGCStorePurchaseInit_LineItem message or plain object to encode + * @param {CGCStorePurchaseInit_LineItem.$Properties} message CGCStorePurchaseInit_LineItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCStorePurchaseInit_LineItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCStorePurchaseInit_LineItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -186,34 +211,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCStorePurchaseInit_LineItem} CGCStorePurchaseInit_LineItem + * @returns {CGCStorePurchaseInit_LineItem & CGCStorePurchaseInit_LineItem.$Shape} CGCStorePurchaseInit_LineItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCStorePurchaseInit_LineItem.decode = function decode(reader, length) { + CGCStorePurchaseInit_LineItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCStorePurchaseInit_LineItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCStorePurchaseInit_LineItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_def_id = reader.uint32(); - break; - case 2: - message.quantity = reader.uint32(); - break; - case 3: - message.cost_in_local_currency = reader.uint32(); - break; - case 4: - message.purchase_type = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_def_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.quantity = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.cost_in_local_currency = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.purchase_type = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -223,11 +274,11 @@ * @memberof CGCStorePurchaseInit_LineItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCStorePurchaseInit_LineItem} CGCStorePurchaseInit_LineItem + * @returns {CGCStorePurchaseInit_LineItem & CGCStorePurchaseInit_LineItem.$Shape} CGCStorePurchaseInit_LineItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCStorePurchaseInit_LineItem.decodeDelimited = function decodeDelimited(reader) { + CGCStorePurchaseInit_LineItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -241,19 +292,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCStorePurchaseInit_LineItem.verify = function verify(message) { + CGCStorePurchaseInit_LineItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_def_id != null && message.hasOwnProperty("item_def_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) if (!$util.isInteger(message.item_def_id)) return "item_def_id: integer expected"; - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) if (!$util.isInteger(message.quantity)) return "quantity: integer expected"; - if (message.cost_in_local_currency != null && message.hasOwnProperty("cost_in_local_currency")) + if (message.cost_in_local_currency != null && $Object.hasOwnProperty.call(message, "cost_in_local_currency")) if (!$util.isInteger(message.cost_in_local_currency)) return "cost_in_local_currency: integer expected"; - if (message.purchase_type != null && message.hasOwnProperty("purchase_type")) + if (message.purchase_type != null && $Object.hasOwnProperty.call(message, "purchase_type")) if (!$util.isInteger(message.purchase_type)) return "purchase_type: integer expected"; return null; @@ -267,9 +322,15 @@ * @param {Object.} object Plain object * @returns {CGCStorePurchaseInit_LineItem} CGCStorePurchaseInit_LineItem */ - CGCStorePurchaseInit_LineItem.fromObject = function fromObject(object) { + CGCStorePurchaseInit_LineItem.fromObject = function (object, _depth) { if (object instanceof $root.CGCStorePurchaseInit_LineItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCStorePurchaseInit_LineItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCStorePurchaseInit_LineItem(); if (object.item_def_id != null) message.item_def_id = object.item_def_id >>> 0; @@ -291,9 +352,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCStorePurchaseInit_LineItem.toObject = function toObject(message, options) { + CGCStorePurchaseInit_LineItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.item_def_id = 0; @@ -301,13 +366,13 @@ object.cost_in_local_currency = 0; object.purchase_type = 0; } - if (message.item_def_id != null && message.hasOwnProperty("item_def_id")) + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) object.item_def_id = message.item_def_id; - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) object.quantity = message.quantity; - if (message.cost_in_local_currency != null && message.hasOwnProperty("cost_in_local_currency")) + if (message.cost_in_local_currency != null && $Object.hasOwnProperty.call(message, "cost_in_local_currency")) object.cost_in_local_currency = message.cost_in_local_currency; - if (message.purchase_type != null && message.hasOwnProperty("purchase_type")) + if (message.purchase_type != null && $Object.hasOwnProperty.call(message, "purchase_type")) object.purchase_type = message.purchase_type; return object; }; @@ -319,8 +384,22 @@ * @instance * @returns {Object.} JSON object */ - CGCStorePurchaseInit_LineItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCStorePurchaseInit_LineItem.prototype.toJSON = function() { + return CGCStorePurchaseInit_LineItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCStorePurchaseInit_LineItem + * @function getTypeUrl + * @memberof CGCStorePurchaseInit_LineItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCStorePurchaseInit_LineItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCStorePurchaseInit_LineItem"; }; return CGCStorePurchaseInit_LineItem; @@ -330,29 +409,42 @@ /** * Properties of a CMsgGCStorePurchaseInit. - * @exports ICMsgGCStorePurchaseInit - * @interface ICMsgGCStorePurchaseInit + * @typedef {Object} CMsgGCStorePurchaseInit.$Properties * @property {string|null} [country] CMsgGCStorePurchaseInit country * @property {number|null} [language] CMsgGCStorePurchaseInit language * @property {number|null} [currency] CMsgGCStorePurchaseInit currency - * @property {Array.|null} [line_items] CMsgGCStorePurchaseInit line_items + * @property {Array.|null} [line_items] CMsgGCStorePurchaseInit line_items + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCStorePurchaseInit. + * @exports ICMsgGCStorePurchaseInit + * @interface ICMsgGCStorePurchaseInit + * @augments CMsgGCStorePurchaseInit.$Properties + * @deprecated Use CMsgGCStorePurchaseInit.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseInit. + * @typedef {CMsgGCStorePurchaseInit.$Properties} CMsgGCStorePurchaseInit.$Shape */ /** * Constructs a new CMsgGCStorePurchaseInit. * @exports CMsgGCStorePurchaseInit * @classdesc Represents a CMsgGCStorePurchaseInit. - * @implements ICMsgGCStorePurchaseInit * @constructor - * @param {ICMsgGCStorePurchaseInit=} [properties] Properties to set + * @param {CMsgGCStorePurchaseInit.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseInit(properties) { + var CMsgGCStorePurchaseInit = function (properties) { this.line_items = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseInit country. @@ -380,7 +472,7 @@ /** * CMsgGCStorePurchaseInit line_items. - * @member {Array.} line_items + * @member {Array.} line_items * @memberof CMsgGCStorePurchaseInit * @instance */ @@ -391,10 +483,14 @@ * @function create * @memberof CMsgGCStorePurchaseInit * @static - * @param {ICMsgGCStorePurchaseInit=} [properties] Properties to set + * @param {CMsgGCStorePurchaseInit.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseInit} CMsgGCStorePurchaseInit instance + * @type {{ + * (properties: CMsgGCStorePurchaseInit.$Shape): CMsgGCStorePurchaseInit & CMsgGCStorePurchaseInit.$Shape; + * (properties?: CMsgGCStorePurchaseInit.$Properties): CMsgGCStorePurchaseInit; + * }} */ - CMsgGCStorePurchaseInit.create = function create(properties) { + CMsgGCStorePurchaseInit.create = function(properties) { return new CMsgGCStorePurchaseInit(properties); }; @@ -403,22 +499,29 @@ * @function encode * @memberof CMsgGCStorePurchaseInit * @static - * @param {ICMsgGCStorePurchaseInit} message CMsgGCStorePurchaseInit message or plain object to encode + * @param {CMsgGCStorePurchaseInit.$Properties} message CMsgGCStorePurchaseInit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseInit.encode = function encode(message, writer) { + CMsgGCStorePurchaseInit.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.country != null && Object.hasOwnProperty.call(message, "country")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.country); - if (message.language != null && Object.hasOwnProperty.call(message, "language")) + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.language); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.currency); if (message.line_items != null && message.line_items.length) for (var i = 0; i < message.line_items.length; ++i) - $root.CGCStorePurchaseInit_LineItem.encode(message.line_items[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CGCStorePurchaseInit_LineItem.encode(message.line_items[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -427,12 +530,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseInit * @static - * @param {ICMsgGCStorePurchaseInit} message CMsgGCStorePurchaseInit message or plain object to encode + * @param {CMsgGCStorePurchaseInit.$Properties} message CMsgGCStorePurchaseInit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseInit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseInit.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -442,36 +545,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseInit} CMsgGCStorePurchaseInit + * @returns {CMsgGCStorePurchaseInit & CMsgGCStorePurchaseInit.$Shape} CMsgGCStorePurchaseInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseInit.decode = function decode(reader, length) { + CMsgGCStorePurchaseInit.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseInit(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseInit(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.country = reader.string(); - break; - case 2: - message.language = reader.int32(); - break; - case 3: - message.currency = reader.int32(); - break; - case 4: - if (!(message.line_items && message.line_items.length)) - message.line_items = []; - message.line_items.push($root.CGCStorePurchaseInit_LineItem.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.country = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.language = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.currency = reader.int32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.line_items && message.line_items.length)) + message.line_items = []; + message.line_items.push($root.CGCStorePurchaseInit_LineItem.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -481,11 +610,11 @@ * @memberof CMsgGCStorePurchaseInit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseInit} CMsgGCStorePurchaseInit + * @returns {CMsgGCStorePurchaseInit & CMsgGCStorePurchaseInit.$Shape} CMsgGCStorePurchaseInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseInit.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseInit.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -499,23 +628,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseInit.verify = function verify(message) { + CMsgGCStorePurchaseInit.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.country != null && message.hasOwnProperty("country")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) if (!$util.isString(message.country)) return "country: string expected"; - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) if (!$util.isInteger(message.language)) return "language: integer expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) if (!$util.isInteger(message.currency)) return "currency: integer expected"; - if (message.line_items != null && message.hasOwnProperty("line_items")) { - if (!Array.isArray(message.line_items)) + if (message.line_items != null && $Object.hasOwnProperty.call(message, "line_items")) { + if (!$Array.isArray(message.line_items)) return "line_items: array expected"; for (var i = 0; i < message.line_items.length; ++i) { - var error = $root.CGCStorePurchaseInit_LineItem.verify(message.line_items[i]); + var error = $root.CGCStorePurchaseInit_LineItem.verify(message.line_items[i], _depth + 1); if (error) return "line_items." + error; } @@ -531,24 +664,30 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseInit} CMsgGCStorePurchaseInit */ - CMsgGCStorePurchaseInit.fromObject = function fromObject(object) { + CMsgGCStorePurchaseInit.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseInit) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseInit: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseInit(); if (object.country != null) - message.country = String(object.country); + message.country = $String(object.country); if (object.language != null) message.language = object.language | 0; if (object.currency != null) message.currency = object.currency | 0; if (object.line_items) { - if (!Array.isArray(object.line_items)) - throw TypeError(".CMsgGCStorePurchaseInit.line_items: array expected"); - message.line_items = []; + if (!$Array.isArray(object.line_items)) + throw $TypeError(".CMsgGCStorePurchaseInit.line_items: array expected"); + message.line_items = $Array(object.line_items.length); for (var i = 0; i < object.line_items.length; ++i) { - if (typeof object.line_items[i] !== "object") - throw TypeError(".CMsgGCStorePurchaseInit.line_items: object expected"); - message.line_items[i] = $root.CGCStorePurchaseInit_LineItem.fromObject(object.line_items[i]); + if (!$util.isObject(object.line_items[i])) + throw $TypeError(".CMsgGCStorePurchaseInit.line_items: object expected"); + message.line_items[i] = $root.CGCStorePurchaseInit_LineItem.fromObject(object.line_items[i], _depth + 1); } } return message; @@ -563,9 +702,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseInit.toObject = function toObject(message, options) { + CMsgGCStorePurchaseInit.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.line_items = []; @@ -574,16 +717,16 @@ object.language = 0; object.currency = 0; } - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) object.country = message.country; - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) object.language = message.language; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) object.currency = message.currency; if (message.line_items && message.line_items.length) { - object.line_items = []; + object.line_items = $Array(message.line_items.length); for (var j = 0; j < message.line_items.length; ++j) - object.line_items[j] = $root.CGCStorePurchaseInit_LineItem.toObject(message.line_items[j], options); + object.line_items[j] = $root.CGCStorePurchaseInit_LineItem.toObject(message.line_items[j], options, _depth + 1); } return object; }; @@ -595,8 +738,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseInit.prototype.toJSON = function() { + return CMsgGCStorePurchaseInit.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseInit + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseInit + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseInit.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseInit"; }; return CMsgGCStorePurchaseInit; @@ -606,26 +763,39 @@ /** * Properties of a CMsgGCStorePurchaseInitResponse. - * @exports ICMsgGCStorePurchaseInitResponse - * @interface ICMsgGCStorePurchaseInitResponse + * @typedef {Object} CMsgGCStorePurchaseInitResponse.$Properties * @property {number|null} [result] CMsgGCStorePurchaseInitResponse result * @property {number|Long|null} [txn_id] CMsgGCStorePurchaseInitResponse txn_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCStorePurchaseInitResponse. + * @exports ICMsgGCStorePurchaseInitResponse + * @interface ICMsgGCStorePurchaseInitResponse + * @augments CMsgGCStorePurchaseInitResponse.$Properties + * @deprecated Use CMsgGCStorePurchaseInitResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseInitResponse. + * @typedef {CMsgGCStorePurchaseInitResponse.$Properties} CMsgGCStorePurchaseInitResponse.$Shape */ /** * Constructs a new CMsgGCStorePurchaseInitResponse. * @exports CMsgGCStorePurchaseInitResponse * @classdesc Represents a CMsgGCStorePurchaseInitResponse. - * @implements ICMsgGCStorePurchaseInitResponse * @constructor - * @param {ICMsgGCStorePurchaseInitResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseInitResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseInitResponse(properties) { + var CMsgGCStorePurchaseInitResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseInitResponse result. @@ -648,10 +818,14 @@ * @function create * @memberof CMsgGCStorePurchaseInitResponse * @static - * @param {ICMsgGCStorePurchaseInitResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseInitResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseInitResponse} CMsgGCStorePurchaseInitResponse instance + * @type {{ + * (properties: CMsgGCStorePurchaseInitResponse.$Shape): CMsgGCStorePurchaseInitResponse & CMsgGCStorePurchaseInitResponse.$Shape; + * (properties?: CMsgGCStorePurchaseInitResponse.$Properties): CMsgGCStorePurchaseInitResponse; + * }} */ - CMsgGCStorePurchaseInitResponse.create = function create(properties) { + CMsgGCStorePurchaseInitResponse.create = function(properties) { return new CMsgGCStorePurchaseInitResponse(properties); }; @@ -660,17 +834,24 @@ * @function encode * @memberof CMsgGCStorePurchaseInitResponse * @static - * @param {ICMsgGCStorePurchaseInitResponse} message CMsgGCStorePurchaseInitResponse message or plain object to encode + * @param {CMsgGCStorePurchaseInitResponse.$Properties} message CMsgGCStorePurchaseInitResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseInitResponse.encode = function encode(message, writer) { + CMsgGCStorePurchaseInitResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.txn_id != null && Object.hasOwnProperty.call(message, "txn_id")) + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.txn_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -679,12 +860,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseInitResponse * @static - * @param {ICMsgGCStorePurchaseInitResponse} message CMsgGCStorePurchaseInitResponse message or plain object to encode + * @param {CMsgGCStorePurchaseInitResponse.$Properties} message CMsgGCStorePurchaseInitResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseInitResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseInitResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -694,28 +875,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseInitResponse} CMsgGCStorePurchaseInitResponse + * @returns {CMsgGCStorePurchaseInitResponse & CMsgGCStorePurchaseInitResponse.$Shape} CMsgGCStorePurchaseInitResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseInitResponse.decode = function decode(reader, length) { + CMsgGCStorePurchaseInitResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseInitResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseInitResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - case 2: - message.txn_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.result = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.txn_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -725,11 +926,11 @@ * @memberof CMsgGCStorePurchaseInitResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseInitResponse} CMsgGCStorePurchaseInitResponse + * @returns {CMsgGCStorePurchaseInitResponse & CMsgGCStorePurchaseInitResponse.$Shape} CMsgGCStorePurchaseInitResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseInitResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseInitResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -743,13 +944,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseInitResponse.verify = function verify(message) { + CMsgGCStorePurchaseInitResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) if (!$util.isInteger(message.txn_id) && !(message.txn_id && $util.isInteger(message.txn_id.low) && $util.isInteger(message.txn_id.high))) return "txn_id: integer|Long expected"; return null; @@ -763,17 +968,23 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseInitResponse} CMsgGCStorePurchaseInitResponse */ - CMsgGCStorePurchaseInitResponse.fromObject = function fromObject(object) { + CMsgGCStorePurchaseInitResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseInitResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseInitResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseInitResponse(); if (object.result != null) message.result = object.result | 0; if (object.txn_id != null) if ($util.Long) - (message.txn_id = $util.Long.fromValue(object.txn_id)).unsigned = true; + message.txn_id = $util.Long.fromValue(object.txn_id, true); else if (typeof object.txn_id === "string") - message.txn_id = parseInt(object.txn_id, 10); + message.txn_id = $parseInt(object.txn_id, 10); else if (typeof object.txn_id === "number") message.txn_id = object.txn_id; else if (typeof object.txn_id === "object") @@ -790,25 +1001,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseInitResponse.toObject = function toObject(message, options) { + CMsgGCStorePurchaseInitResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.result = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.txn_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.txn_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.txn_id = options.longs === String ? "0" : 0; + object.txn_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) - if (typeof message.txn_id === "number") - object.txn_id = options.longs === String ? String(message.txn_id) : message.txn_id; + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.txn_id = typeof message.txn_id === "number" ? $BigInt(message.txn_id) : $util.Long.fromBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0, true).toBigInt(); + else if (typeof message.txn_id === "number") + object.txn_id = options.longs === $String ? $String(message.txn_id) : message.txn_id; else - object.txn_id = options.longs === String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; + object.txn_id = options.longs === $String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === $Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; return object; }; @@ -819,8 +1036,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseInitResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseInitResponse.prototype.toJSON = function() { + return CMsgGCStorePurchaseInitResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseInitResponse + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseInitResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseInitResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseInitResponse"; }; return CMsgGCStorePurchaseInitResponse; @@ -828,27 +1059,40 @@ $root.CMsgSystemBroadcast = (function() { + /** + * Properties of a CMsgSystemBroadcast. + * @typedef {Object} CMsgSystemBroadcast.$Properties + * @property {string|null} [message] CMsgSystemBroadcast message + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSystemBroadcast. * @exports ICMsgSystemBroadcast * @interface ICMsgSystemBroadcast - * @property {string|null} [message] CMsgSystemBroadcast message + * @augments CMsgSystemBroadcast.$Properties + * @deprecated Use CMsgSystemBroadcast.$Properties instead. + */ + + /** + * Shape of a CMsgSystemBroadcast. + * @typedef {CMsgSystemBroadcast.$Properties} CMsgSystemBroadcast.$Shape */ /** * Constructs a new CMsgSystemBroadcast. * @exports CMsgSystemBroadcast * @classdesc Represents a CMsgSystemBroadcast. - * @implements ICMsgSystemBroadcast * @constructor - * @param {ICMsgSystemBroadcast=} [properties] Properties to set + * @param {CMsgSystemBroadcast.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSystemBroadcast(properties) { + var CMsgSystemBroadcast = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSystemBroadcast message. @@ -863,10 +1107,14 @@ * @function create * @memberof CMsgSystemBroadcast * @static - * @param {ICMsgSystemBroadcast=} [properties] Properties to set + * @param {CMsgSystemBroadcast.$Properties=} [properties] Properties to set * @returns {CMsgSystemBroadcast} CMsgSystemBroadcast instance + * @type {{ + * (properties: CMsgSystemBroadcast.$Shape): CMsgSystemBroadcast & CMsgSystemBroadcast.$Shape; + * (properties?: CMsgSystemBroadcast.$Properties): CMsgSystemBroadcast; + * }} */ - CMsgSystemBroadcast.create = function create(properties) { + CMsgSystemBroadcast.create = function(properties) { return new CMsgSystemBroadcast(properties); }; @@ -875,15 +1123,22 @@ * @function encode * @memberof CMsgSystemBroadcast * @static - * @param {ICMsgSystemBroadcast} message CMsgSystemBroadcast message or plain object to encode + * @param {CMsgSystemBroadcast.$Properties} message CMsgSystemBroadcast message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSystemBroadcast.encode = function encode(message, writer) { + CMsgSystemBroadcast.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -892,12 +1147,12 @@ * @function encodeDelimited * @memberof CMsgSystemBroadcast * @static - * @param {ICMsgSystemBroadcast} message CMsgSystemBroadcast message or plain object to encode + * @param {CMsgSystemBroadcast.$Properties} message CMsgSystemBroadcast message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSystemBroadcast.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSystemBroadcast.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -907,25 +1162,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSystemBroadcast} CMsgSystemBroadcast + * @returns {CMsgSystemBroadcast & CMsgSystemBroadcast.$Shape} CMsgSystemBroadcast * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSystemBroadcast.decode = function decode(reader, length) { + CMsgSystemBroadcast.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSystemBroadcast(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSystemBroadcast(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.message = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -935,11 +1207,11 @@ * @memberof CMsgSystemBroadcast * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSystemBroadcast} CMsgSystemBroadcast + * @returns {CMsgSystemBroadcast & CMsgSystemBroadcast.$Shape} CMsgSystemBroadcast * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSystemBroadcast.decodeDelimited = function decodeDelimited(reader) { + CMsgSystemBroadcast.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -953,10 +1225,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSystemBroadcast.verify = function verify(message) { + CMsgSystemBroadcast.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -970,12 +1246,18 @@ * @param {Object.} object Plain object * @returns {CMsgSystemBroadcast} CMsgSystemBroadcast */ - CMsgSystemBroadcast.fromObject = function fromObject(object) { + CMsgSystemBroadcast.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSystemBroadcast) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSystemBroadcast: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSystemBroadcast(); if (object.message != null) - message.message = String(object.message); + message.message = $String(object.message); return message; }; @@ -988,13 +1270,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSystemBroadcast.toObject = function toObject(message, options) { + CMsgSystemBroadcast.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.message = ""; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -1006,8 +1292,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSystemBroadcast.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSystemBroadcast.prototype.toJSON = function() { + return CMsgSystemBroadcast.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSystemBroadcast + * @function getTypeUrl + * @memberof CMsgSystemBroadcast + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSystemBroadcast.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSystemBroadcast"; }; return CMsgSystemBroadcast; @@ -1015,27 +1315,40 @@ $root.CMsgClientHello = (function() { + /** + * Properties of a CMsgClientHello. + * @typedef {Object} CMsgClientHello.$Properties + * @property {number|null} [version] CMsgClientHello version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgClientHello. * @exports ICMsgClientHello * @interface ICMsgClientHello - * @property {number|null} [version] CMsgClientHello version + * @augments CMsgClientHello.$Properties + * @deprecated Use CMsgClientHello.$Properties instead. + */ + + /** + * Shape of a CMsgClientHello. + * @typedef {CMsgClientHello.$Properties} CMsgClientHello.$Shape */ /** * Constructs a new CMsgClientHello. * @exports CMsgClientHello * @classdesc Represents a CMsgClientHello. - * @implements ICMsgClientHello * @constructor - * @param {ICMsgClientHello=} [properties] Properties to set + * @param {CMsgClientHello.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgClientHello(properties) { + var CMsgClientHello = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgClientHello version. @@ -1050,10 +1363,14 @@ * @function create * @memberof CMsgClientHello * @static - * @param {ICMsgClientHello=} [properties] Properties to set + * @param {CMsgClientHello.$Properties=} [properties] Properties to set * @returns {CMsgClientHello} CMsgClientHello instance + * @type {{ + * (properties: CMsgClientHello.$Shape): CMsgClientHello & CMsgClientHello.$Shape; + * (properties?: CMsgClientHello.$Properties): CMsgClientHello; + * }} */ - CMsgClientHello.create = function create(properties) { + CMsgClientHello.create = function(properties) { return new CMsgClientHello(properties); }; @@ -1062,15 +1379,22 @@ * @function encode * @memberof CMsgClientHello * @static - * @param {ICMsgClientHello} message CMsgClientHello message or plain object to encode + * @param {CMsgClientHello.$Properties} message CMsgClientHello message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientHello.encode = function encode(message, writer) { + CMsgClientHello.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1079,12 +1403,12 @@ * @function encodeDelimited * @memberof CMsgClientHello * @static - * @param {ICMsgClientHello} message CMsgClientHello message or plain object to encode + * @param {CMsgClientHello.$Properties} message CMsgClientHello message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientHello.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgClientHello.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1094,25 +1418,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgClientHello} CMsgClientHello + * @returns {CMsgClientHello & CMsgClientHello.$Shape} CMsgClientHello * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientHello.decode = function decode(reader, length) { + CMsgClientHello.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgClientHello(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgClientHello(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1122,11 +1463,11 @@ * @memberof CMsgClientHello * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgClientHello} CMsgClientHello + * @returns {CMsgClientHello & CMsgClientHello.$Shape} CMsgClientHello * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientHello.decodeDelimited = function decodeDelimited(reader) { + CMsgClientHello.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1140,10 +1481,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgClientHello.verify = function verify(message) { + CMsgClientHello.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; return null; @@ -1157,9 +1502,15 @@ * @param {Object.} object Plain object * @returns {CMsgClientHello} CMsgClientHello */ - CMsgClientHello.fromObject = function fromObject(object) { + CMsgClientHello.fromObject = function (object, _depth) { if (object instanceof $root.CMsgClientHello) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgClientHello: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgClientHello(); if (object.version != null) message.version = object.version >>> 0; @@ -1175,13 +1526,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgClientHello.toObject = function toObject(message, options) { + CMsgClientHello.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.version = 0; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; return object; }; @@ -1193,8 +1548,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgClientHello.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgClientHello.prototype.toJSON = function() { + return CMsgClientHello.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgClientHello + * @function getTypeUrl + * @memberof CMsgClientHello + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgClientHello.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgClientHello"; }; return CMsgClientHello; @@ -1202,27 +1571,40 @@ $root.CMsgServerHello = (function() { + /** + * Properties of a CMsgServerHello. + * @typedef {Object} CMsgServerHello.$Properties + * @property {number|null} [version] CMsgServerHello version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgServerHello. * @exports ICMsgServerHello * @interface ICMsgServerHello - * @property {number|null} [version] CMsgServerHello version + * @augments CMsgServerHello.$Properties + * @deprecated Use CMsgServerHello.$Properties instead. + */ + + /** + * Shape of a CMsgServerHello. + * @typedef {CMsgServerHello.$Properties} CMsgServerHello.$Shape */ /** * Constructs a new CMsgServerHello. * @exports CMsgServerHello * @classdesc Represents a CMsgServerHello. - * @implements ICMsgServerHello * @constructor - * @param {ICMsgServerHello=} [properties] Properties to set + * @param {CMsgServerHello.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgServerHello(properties) { + var CMsgServerHello = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgServerHello version. @@ -1237,10 +1619,14 @@ * @function create * @memberof CMsgServerHello * @static - * @param {ICMsgServerHello=} [properties] Properties to set + * @param {CMsgServerHello.$Properties=} [properties] Properties to set * @returns {CMsgServerHello} CMsgServerHello instance + * @type {{ + * (properties: CMsgServerHello.$Shape): CMsgServerHello & CMsgServerHello.$Shape; + * (properties?: CMsgServerHello.$Properties): CMsgServerHello; + * }} */ - CMsgServerHello.create = function create(properties) { + CMsgServerHello.create = function(properties) { return new CMsgServerHello(properties); }; @@ -1249,15 +1635,22 @@ * @function encode * @memberof CMsgServerHello * @static - * @param {ICMsgServerHello} message CMsgServerHello message or plain object to encode + * @param {CMsgServerHello.$Properties} message CMsgServerHello message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerHello.encode = function encode(message, writer) { + CMsgServerHello.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1266,12 +1659,12 @@ * @function encodeDelimited * @memberof CMsgServerHello * @static - * @param {ICMsgServerHello} message CMsgServerHello message or plain object to encode + * @param {CMsgServerHello.$Properties} message CMsgServerHello message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerHello.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgServerHello.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1281,25 +1674,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgServerHello} CMsgServerHello + * @returns {CMsgServerHello & CMsgServerHello.$Shape} CMsgServerHello * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerHello.decode = function decode(reader, length) { + CMsgServerHello.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgServerHello(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgServerHello(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1309,11 +1719,11 @@ * @memberof CMsgServerHello * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgServerHello} CMsgServerHello + * @returns {CMsgServerHello & CMsgServerHello.$Shape} CMsgServerHello * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerHello.decodeDelimited = function decodeDelimited(reader) { + CMsgServerHello.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1327,10 +1737,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgServerHello.verify = function verify(message) { + CMsgServerHello.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; return null; @@ -1344,9 +1758,15 @@ * @param {Object.} object Plain object * @returns {CMsgServerHello} CMsgServerHello */ - CMsgServerHello.fromObject = function fromObject(object) { + CMsgServerHello.fromObject = function (object, _depth) { if (object instanceof $root.CMsgServerHello) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgServerHello: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgServerHello(); if (object.version != null) message.version = object.version >>> 0; @@ -1362,13 +1782,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgServerHello.toObject = function toObject(message, options) { + CMsgServerHello.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.version = 0; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; return object; }; @@ -1380,8 +1804,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgServerHello.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgServerHello.prototype.toJSON = function() { + return CMsgServerHello.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgServerHello + * @function getTypeUrl + * @memberof CMsgServerHello + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgServerHello.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgServerHello"; }; return CMsgServerHello; @@ -1391,27 +1829,40 @@ /** * Properties of a CMsgClientWelcome. - * @exports ICMsgClientWelcome - * @interface ICMsgClientWelcome + * @typedef {Object} CMsgClientWelcome.$Properties * @property {number|null} [version] CMsgClientWelcome version * @property {Uint8Array|null} [game_data] CMsgClientWelcome game_data * @property {string|null} [txn_country_code] CMsgClientWelcome txn_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgClientWelcome. + * @exports ICMsgClientWelcome + * @interface ICMsgClientWelcome + * @augments CMsgClientWelcome.$Properties + * @deprecated Use CMsgClientWelcome.$Properties instead. + */ + + /** + * Shape of a CMsgClientWelcome. + * @typedef {CMsgClientWelcome.$Properties} CMsgClientWelcome.$Shape */ /** * Constructs a new CMsgClientWelcome. * @exports CMsgClientWelcome * @classdesc Represents a CMsgClientWelcome. - * @implements ICMsgClientWelcome * @constructor - * @param {ICMsgClientWelcome=} [properties] Properties to set + * @param {CMsgClientWelcome.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgClientWelcome(properties) { + var CMsgClientWelcome = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgClientWelcome version. @@ -1442,10 +1893,14 @@ * @function create * @memberof CMsgClientWelcome * @static - * @param {ICMsgClientWelcome=} [properties] Properties to set + * @param {CMsgClientWelcome.$Properties=} [properties] Properties to set * @returns {CMsgClientWelcome} CMsgClientWelcome instance + * @type {{ + * (properties: CMsgClientWelcome.$Shape): CMsgClientWelcome & CMsgClientWelcome.$Shape; + * (properties?: CMsgClientWelcome.$Properties): CMsgClientWelcome; + * }} */ - CMsgClientWelcome.create = function create(properties) { + CMsgClientWelcome.create = function(properties) { return new CMsgClientWelcome(properties); }; @@ -1454,19 +1909,26 @@ * @function encode * @memberof CMsgClientWelcome * @static - * @param {ICMsgClientWelcome} message CMsgClientWelcome message or plain object to encode + * @param {CMsgClientWelcome.$Properties} message CMsgClientWelcome message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientWelcome.encode = function encode(message, writer) { + CMsgClientWelcome.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); - if (message.game_data != null && Object.hasOwnProperty.call(message, "game_data")) + if (message.game_data != null && $Object.hasOwnProperty.call(message, "game_data")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.game_data); - if (message.txn_country_code != null && Object.hasOwnProperty.call(message, "txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.txn_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1475,12 +1937,12 @@ * @function encodeDelimited * @memberof CMsgClientWelcome * @static - * @param {ICMsgClientWelcome} message CMsgClientWelcome message or plain object to encode + * @param {CMsgClientWelcome.$Properties} message CMsgClientWelcome message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientWelcome.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgClientWelcome.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1490,31 +1952,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgClientWelcome} CMsgClientWelcome + * @returns {CMsgClientWelcome & CMsgClientWelcome.$Shape} CMsgClientWelcome * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientWelcome.decode = function decode(reader, length) { + CMsgClientWelcome.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgClientWelcome(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgClientWelcome(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.uint32(); - break; - case 2: - message.game_data = reader.bytes(); - break; - case 3: - message.txn_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.game_data = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.txn_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1524,11 +2009,11 @@ * @memberof CMsgClientWelcome * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgClientWelcome} CMsgClientWelcome + * @returns {CMsgClientWelcome & CMsgClientWelcome.$Shape} CMsgClientWelcome * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientWelcome.decodeDelimited = function decodeDelimited(reader) { + CMsgClientWelcome.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1542,16 +2027,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgClientWelcome.verify = function verify(message) { + CMsgClientWelcome.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.game_data != null && message.hasOwnProperty("game_data")) + if (message.game_data != null && $Object.hasOwnProperty.call(message, "game_data")) if (!(message.game_data && typeof message.game_data.length === "number" || $util.isString(message.game_data))) return "game_data: buffer expected"; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) if (!$util.isString(message.txn_country_code)) return "txn_country_code: string expected"; return null; @@ -1565,19 +2054,25 @@ * @param {Object.} object Plain object * @returns {CMsgClientWelcome} CMsgClientWelcome */ - CMsgClientWelcome.fromObject = function fromObject(object) { + CMsgClientWelcome.fromObject = function (object, _depth) { if (object instanceof $root.CMsgClientWelcome) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgClientWelcome: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgClientWelcome(); if (object.version != null) message.version = object.version >>> 0; if (object.game_data != null) if (typeof object.game_data === "string") $util.base64.decode(object.game_data, message.game_data = $util.newBuffer($util.base64.length(object.game_data)), 0); - else if (object.game_data.length) + else if (object.game_data.length >= 0) message.game_data = object.game_data; if (object.txn_country_code != null) - message.txn_country_code = String(object.txn_country_code); + message.txn_country_code = $String(object.txn_country_code); return message; }; @@ -1590,26 +2085,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgClientWelcome.toObject = function toObject(message, options) { + CMsgClientWelcome.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.version = 0; - if (options.bytes === String) + if (options.bytes === $String) object.game_data = ""; else { object.game_data = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.game_data = $util.newBuffer(object.game_data); } object.txn_country_code = ""; } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.game_data != null && message.hasOwnProperty("game_data")) - object.game_data = options.bytes === String ? $util.base64.encode(message.game_data, 0, message.game_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.game_data) : message.game_data; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.game_data != null && $Object.hasOwnProperty.call(message, "game_data")) + object.game_data = options.bytes === $String ? $util.base64.encode(message.game_data, 0, message.game_data.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.game_data) : message.game_data; + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) object.txn_country_code = message.txn_country_code; return object; }; @@ -1621,8 +2120,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgClientWelcome.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgClientWelcome.prototype.toJSON = function() { + return CMsgClientWelcome.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgClientWelcome + * @function getTypeUrl + * @memberof CMsgClientWelcome + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgClientWelcome.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgClientWelcome"; }; return CMsgClientWelcome; @@ -1632,26 +2145,39 @@ /** * Properties of a CMsgServerWelcome. - * @exports ICMsgServerWelcome - * @interface ICMsgServerWelcome + * @typedef {Object} CMsgServerWelcome.$Properties * @property {number|null} [min_allowed_version] CMsgServerWelcome min_allowed_version * @property {number|null} [active_version] CMsgServerWelcome active_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgServerWelcome. + * @exports ICMsgServerWelcome + * @interface ICMsgServerWelcome + * @augments CMsgServerWelcome.$Properties + * @deprecated Use CMsgServerWelcome.$Properties instead. + */ + + /** + * Shape of a CMsgServerWelcome. + * @typedef {CMsgServerWelcome.$Properties} CMsgServerWelcome.$Shape */ /** * Constructs a new CMsgServerWelcome. * @exports CMsgServerWelcome * @classdesc Represents a CMsgServerWelcome. - * @implements ICMsgServerWelcome * @constructor - * @param {ICMsgServerWelcome=} [properties] Properties to set + * @param {CMsgServerWelcome.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgServerWelcome(properties) { + var CMsgServerWelcome = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgServerWelcome min_allowed_version. @@ -1674,10 +2200,14 @@ * @function create * @memberof CMsgServerWelcome * @static - * @param {ICMsgServerWelcome=} [properties] Properties to set + * @param {CMsgServerWelcome.$Properties=} [properties] Properties to set * @returns {CMsgServerWelcome} CMsgServerWelcome instance + * @type {{ + * (properties: CMsgServerWelcome.$Shape): CMsgServerWelcome & CMsgServerWelcome.$Shape; + * (properties?: CMsgServerWelcome.$Properties): CMsgServerWelcome; + * }} */ - CMsgServerWelcome.create = function create(properties) { + CMsgServerWelcome.create = function(properties) { return new CMsgServerWelcome(properties); }; @@ -1686,17 +2216,24 @@ * @function encode * @memberof CMsgServerWelcome * @static - * @param {ICMsgServerWelcome} message CMsgServerWelcome message or plain object to encode + * @param {CMsgServerWelcome.$Properties} message CMsgServerWelcome message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerWelcome.encode = function encode(message, writer) { + CMsgServerWelcome.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.min_allowed_version != null && Object.hasOwnProperty.call(message, "min_allowed_version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.min_allowed_version != null && $Object.hasOwnProperty.call(message, "min_allowed_version")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.min_allowed_version); - if (message.active_version != null && Object.hasOwnProperty.call(message, "active_version")) + if (message.active_version != null && $Object.hasOwnProperty.call(message, "active_version")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.active_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1705,12 +2242,12 @@ * @function encodeDelimited * @memberof CMsgServerWelcome * @static - * @param {ICMsgServerWelcome} message CMsgServerWelcome message or plain object to encode + * @param {CMsgServerWelcome.$Properties} message CMsgServerWelcome message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerWelcome.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgServerWelcome.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1720,28 +2257,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgServerWelcome} CMsgServerWelcome + * @returns {CMsgServerWelcome & CMsgServerWelcome.$Shape} CMsgServerWelcome * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerWelcome.decode = function decode(reader, length) { + CMsgServerWelcome.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgServerWelcome(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgServerWelcome(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.min_allowed_version = reader.uint32(); - break; - case 2: - message.active_version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.min_allowed_version = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.active_version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1751,11 +2308,11 @@ * @memberof CMsgServerWelcome * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgServerWelcome} CMsgServerWelcome + * @returns {CMsgServerWelcome & CMsgServerWelcome.$Shape} CMsgServerWelcome * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerWelcome.decodeDelimited = function decodeDelimited(reader) { + CMsgServerWelcome.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1769,13 +2326,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgServerWelcome.verify = function verify(message) { + CMsgServerWelcome.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.min_allowed_version != null && message.hasOwnProperty("min_allowed_version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.min_allowed_version != null && $Object.hasOwnProperty.call(message, "min_allowed_version")) if (!$util.isInteger(message.min_allowed_version)) return "min_allowed_version: integer expected"; - if (message.active_version != null && message.hasOwnProperty("active_version")) + if (message.active_version != null && $Object.hasOwnProperty.call(message, "active_version")) if (!$util.isInteger(message.active_version)) return "active_version: integer expected"; return null; @@ -1789,9 +2350,15 @@ * @param {Object.} object Plain object * @returns {CMsgServerWelcome} CMsgServerWelcome */ - CMsgServerWelcome.fromObject = function fromObject(object) { + CMsgServerWelcome.fromObject = function (object, _depth) { if (object instanceof $root.CMsgServerWelcome) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgServerWelcome: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgServerWelcome(); if (object.min_allowed_version != null) message.min_allowed_version = object.min_allowed_version >>> 0; @@ -1809,17 +2376,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgServerWelcome.toObject = function toObject(message, options) { + CMsgServerWelcome.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.min_allowed_version = 0; object.active_version = 0; } - if (message.min_allowed_version != null && message.hasOwnProperty("min_allowed_version")) + if (message.min_allowed_version != null && $Object.hasOwnProperty.call(message, "min_allowed_version")) object.min_allowed_version = message.min_allowed_version; - if (message.active_version != null && message.hasOwnProperty("active_version")) + if (message.active_version != null && $Object.hasOwnProperty.call(message, "active_version")) object.active_version = message.active_version; return object; }; @@ -1831,8 +2402,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgServerWelcome.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgServerWelcome.prototype.toJSON = function() { + return CMsgServerWelcome.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgServerWelcome + * @function getTypeUrl + * @memberof CMsgServerWelcome + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgServerWelcome.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgServerWelcome"; }; return CMsgServerWelcome; @@ -1840,27 +2425,40 @@ $root.CMsgClientGoodbye = (function() { + /** + * Properties of a CMsgClientGoodbye. + * @typedef {Object} CMsgClientGoodbye.$Properties + * @property {GCGoodbyeReason|null} [reason] CMsgClientGoodbye reason + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgClientGoodbye. * @exports ICMsgClientGoodbye * @interface ICMsgClientGoodbye - * @property {GCGoodbyeReason|null} [reason] CMsgClientGoodbye reason + * @augments CMsgClientGoodbye.$Properties + * @deprecated Use CMsgClientGoodbye.$Properties instead. + */ + + /** + * Shape of a CMsgClientGoodbye. + * @typedef {CMsgClientGoodbye.$Properties} CMsgClientGoodbye.$Shape */ /** * Constructs a new CMsgClientGoodbye. * @exports CMsgClientGoodbye * @classdesc Represents a CMsgClientGoodbye. - * @implements ICMsgClientGoodbye * @constructor - * @param {ICMsgClientGoodbye=} [properties] Properties to set + * @param {CMsgClientGoodbye.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgClientGoodbye(properties) { + var CMsgClientGoodbye = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgClientGoodbye reason. @@ -1875,10 +2473,14 @@ * @function create * @memberof CMsgClientGoodbye * @static - * @param {ICMsgClientGoodbye=} [properties] Properties to set + * @param {CMsgClientGoodbye.$Properties=} [properties] Properties to set * @returns {CMsgClientGoodbye} CMsgClientGoodbye instance + * @type {{ + * (properties: CMsgClientGoodbye.$Shape): CMsgClientGoodbye & CMsgClientGoodbye.$Shape; + * (properties?: CMsgClientGoodbye.$Properties): CMsgClientGoodbye; + * }} */ - CMsgClientGoodbye.create = function create(properties) { + CMsgClientGoodbye.create = function(properties) { return new CMsgClientGoodbye(properties); }; @@ -1887,15 +2489,22 @@ * @function encode * @memberof CMsgClientGoodbye * @static - * @param {ICMsgClientGoodbye} message CMsgClientGoodbye message or plain object to encode + * @param {CMsgClientGoodbye.$Properties} message CMsgClientGoodbye message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientGoodbye.encode = function encode(message, writer) { + CMsgClientGoodbye.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.reason); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1904,12 +2513,12 @@ * @function encodeDelimited * @memberof CMsgClientGoodbye * @static - * @param {ICMsgClientGoodbye} message CMsgClientGoodbye message or plain object to encode + * @param {CMsgClientGoodbye.$Properties} message CMsgClientGoodbye message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientGoodbye.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgClientGoodbye.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1919,25 +2528,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgClientGoodbye} CMsgClientGoodbye + * @returns {CMsgClientGoodbye & CMsgClientGoodbye.$Shape} CMsgClientGoodbye * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientGoodbye.decode = function decode(reader, length) { + CMsgClientGoodbye.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgClientGoodbye(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgClientGoodbye(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reason = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.GCGoodbyeReason[value] !== $undefined) + message.reason = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1947,11 +2579,11 @@ * @memberof CMsgClientGoodbye * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgClientGoodbye} CMsgClientGoodbye + * @returns {CMsgClientGoodbye & CMsgClientGoodbye.$Shape} CMsgClientGoodbye * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientGoodbye.decodeDelimited = function decodeDelimited(reader) { + CMsgClientGoodbye.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1965,10 +2597,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgClientGoodbye.verify = function verify(message) { + CMsgClientGoodbye.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reason != null && message.hasOwnProperty("reason")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) switch (message.reason) { default: return "reason: enum value expected"; @@ -1987,9 +2623,15 @@ * @param {Object.} object Plain object * @returns {CMsgClientGoodbye} CMsgClientGoodbye */ - CMsgClientGoodbye.fromObject = function fromObject(object) { + CMsgClientGoodbye.fromObject = function (object, _depth) { if (object instanceof $root.CMsgClientGoodbye) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgClientGoodbye: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgClientGoodbye(); switch (object.reason) { case "GCGoodbyeReason_GC_GOING_DOWN": @@ -2000,6 +2642,7 @@ case 2: message.reason = 2; break; + default: } return message; }; @@ -2013,14 +2656,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgClientGoodbye.toObject = function toObject(message, options) { + CMsgClientGoodbye.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) - object.reason = options.enums === String ? "GCGoodbyeReason_GC_GOING_DOWN" : 1; - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = options.enums === String ? $root.GCGoodbyeReason[message.reason] : message.reason; + object.reason = options.enums === $String ? "GCGoodbyeReason_GC_GOING_DOWN" : 1; + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) + object.reason = options.enums === $String ? $root.GCGoodbyeReason[message.reason] === $undefined ? message.reason : $root.GCGoodbyeReason[message.reason] : message.reason; return object; }; @@ -2031,8 +2678,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgClientGoodbye.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgClientGoodbye.prototype.toJSON = function() { + return CMsgClientGoodbye.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgClientGoodbye + * @function getTypeUrl + * @memberof CMsgClientGoodbye + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgClientGoodbye.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgClientGoodbye"; }; return CMsgClientGoodbye; @@ -2040,27 +2701,40 @@ $root.CMsgServerGoodbye = (function() { + /** + * Properties of a CMsgServerGoodbye. + * @typedef {Object} CMsgServerGoodbye.$Properties + * @property {GCGoodbyeReason|null} [reason] CMsgServerGoodbye reason + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgServerGoodbye. * @exports ICMsgServerGoodbye * @interface ICMsgServerGoodbye - * @property {GCGoodbyeReason|null} [reason] CMsgServerGoodbye reason + * @augments CMsgServerGoodbye.$Properties + * @deprecated Use CMsgServerGoodbye.$Properties instead. + */ + + /** + * Shape of a CMsgServerGoodbye. + * @typedef {CMsgServerGoodbye.$Properties} CMsgServerGoodbye.$Shape */ /** * Constructs a new CMsgServerGoodbye. * @exports CMsgServerGoodbye * @classdesc Represents a CMsgServerGoodbye. - * @implements ICMsgServerGoodbye * @constructor - * @param {ICMsgServerGoodbye=} [properties] Properties to set + * @param {CMsgServerGoodbye.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgServerGoodbye(properties) { + var CMsgServerGoodbye = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgServerGoodbye reason. @@ -2075,10 +2749,14 @@ * @function create * @memberof CMsgServerGoodbye * @static - * @param {ICMsgServerGoodbye=} [properties] Properties to set + * @param {CMsgServerGoodbye.$Properties=} [properties] Properties to set * @returns {CMsgServerGoodbye} CMsgServerGoodbye instance + * @type {{ + * (properties: CMsgServerGoodbye.$Shape): CMsgServerGoodbye & CMsgServerGoodbye.$Shape; + * (properties?: CMsgServerGoodbye.$Properties): CMsgServerGoodbye; + * }} */ - CMsgServerGoodbye.create = function create(properties) { + CMsgServerGoodbye.create = function(properties) { return new CMsgServerGoodbye(properties); }; @@ -2087,15 +2765,22 @@ * @function encode * @memberof CMsgServerGoodbye * @static - * @param {ICMsgServerGoodbye} message CMsgServerGoodbye message or plain object to encode + * @param {CMsgServerGoodbye.$Properties} message CMsgServerGoodbye message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerGoodbye.encode = function encode(message, writer) { + CMsgServerGoodbye.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.reason); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2104,12 +2789,12 @@ * @function encodeDelimited * @memberof CMsgServerGoodbye * @static - * @param {ICMsgServerGoodbye} message CMsgServerGoodbye message or plain object to encode + * @param {CMsgServerGoodbye.$Properties} message CMsgServerGoodbye message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerGoodbye.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgServerGoodbye.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2119,25 +2804,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgServerGoodbye} CMsgServerGoodbye + * @returns {CMsgServerGoodbye & CMsgServerGoodbye.$Shape} CMsgServerGoodbye * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerGoodbye.decode = function decode(reader, length) { + CMsgServerGoodbye.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgServerGoodbye(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgServerGoodbye(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reason = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.GCGoodbyeReason[value] !== $undefined) + message.reason = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2147,11 +2855,11 @@ * @memberof CMsgServerGoodbye * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgServerGoodbye} CMsgServerGoodbye + * @returns {CMsgServerGoodbye & CMsgServerGoodbye.$Shape} CMsgServerGoodbye * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerGoodbye.decodeDelimited = function decodeDelimited(reader) { + CMsgServerGoodbye.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2165,10 +2873,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgServerGoodbye.verify = function verify(message) { + CMsgServerGoodbye.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reason != null && message.hasOwnProperty("reason")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) switch (message.reason) { default: return "reason: enum value expected"; @@ -2187,9 +2899,15 @@ * @param {Object.} object Plain object * @returns {CMsgServerGoodbye} CMsgServerGoodbye */ - CMsgServerGoodbye.fromObject = function fromObject(object) { + CMsgServerGoodbye.fromObject = function (object, _depth) { if (object instanceof $root.CMsgServerGoodbye) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgServerGoodbye: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgServerGoodbye(); switch (object.reason) { case "GCGoodbyeReason_GC_GOING_DOWN": @@ -2200,6 +2918,7 @@ case 2: message.reason = 2; break; + default: } return message; }; @@ -2213,14 +2932,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgServerGoodbye.toObject = function toObject(message, options) { + CMsgServerGoodbye.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) - object.reason = options.enums === String ? "GCGoodbyeReason_GC_GOING_DOWN" : 1; - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = options.enums === String ? $root.GCGoodbyeReason[message.reason] : message.reason; + object.reason = options.enums === $String ? "GCGoodbyeReason_GC_GOING_DOWN" : 1; + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) + object.reason = options.enums === $String ? $root.GCGoodbyeReason[message.reason] === $undefined ? message.reason : $root.GCGoodbyeReason[message.reason] : message.reason; return object; }; @@ -2231,8 +2954,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgServerGoodbye.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgServerGoodbye.prototype.toJSON = function() { + return CMsgServerGoodbye.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgServerGoodbye + * @function getTypeUrl + * @memberof CMsgServerGoodbye + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgServerGoodbye.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgServerGoodbye"; }; return CMsgServerGoodbye; @@ -2240,36 +2977,53 @@ $root.CMsgServerAvailable = (function() { + /** + * Properties of a CMsgServerAvailable. + * @typedef {Object} CMsgServerAvailable.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgServerAvailable. * @exports ICMsgServerAvailable * @interface ICMsgServerAvailable + * @augments CMsgServerAvailable.$Properties + * @deprecated Use CMsgServerAvailable.$Properties instead. + */ + + /** + * Shape of a CMsgServerAvailable. + * @typedef {CMsgServerAvailable.$Properties} CMsgServerAvailable.$Shape */ /** * Constructs a new CMsgServerAvailable. * @exports CMsgServerAvailable * @classdesc Represents a CMsgServerAvailable. - * @implements ICMsgServerAvailable * @constructor - * @param {ICMsgServerAvailable=} [properties] Properties to set + * @param {CMsgServerAvailable.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgServerAvailable(properties) { + var CMsgServerAvailable = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgServerAvailable instance using the specified properties. * @function create * @memberof CMsgServerAvailable * @static - * @param {ICMsgServerAvailable=} [properties] Properties to set + * @param {CMsgServerAvailable.$Properties=} [properties] Properties to set * @returns {CMsgServerAvailable} CMsgServerAvailable instance + * @type {{ + * (properties: CMsgServerAvailable.$Shape): CMsgServerAvailable & CMsgServerAvailable.$Shape; + * (properties?: CMsgServerAvailable.$Properties): CMsgServerAvailable; + * }} */ - CMsgServerAvailable.create = function create(properties) { + CMsgServerAvailable.create = function(properties) { return new CMsgServerAvailable(properties); }; @@ -2278,13 +3032,20 @@ * @function encode * @memberof CMsgServerAvailable * @static - * @param {ICMsgServerAvailable} message CMsgServerAvailable message or plain object to encode + * @param {CMsgServerAvailable.$Properties} message CMsgServerAvailable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerAvailable.encode = function encode(message, writer) { + CMsgServerAvailable.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2293,12 +3054,12 @@ * @function encodeDelimited * @memberof CMsgServerAvailable * @static - * @param {ICMsgServerAvailable} message CMsgServerAvailable message or plain object to encode + * @param {CMsgServerAvailable.$Properties} message CMsgServerAvailable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerAvailable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgServerAvailable.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2308,22 +3069,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgServerAvailable} CMsgServerAvailable + * @returns {CMsgServerAvailable & CMsgServerAvailable.$Shape} CMsgServerAvailable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerAvailable.decode = function decode(reader, length) { + CMsgServerAvailable.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgServerAvailable(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgServerAvailable(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2333,11 +3105,11 @@ * @memberof CMsgServerAvailable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgServerAvailable} CMsgServerAvailable + * @returns {CMsgServerAvailable & CMsgServerAvailable.$Shape} CMsgServerAvailable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerAvailable.decodeDelimited = function decodeDelimited(reader) { + CMsgServerAvailable.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2351,9 +3123,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgServerAvailable.verify = function verify(message) { + CMsgServerAvailable.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -2365,9 +3141,15 @@ * @param {Object.} object Plain object * @returns {CMsgServerAvailable} CMsgServerAvailable */ - CMsgServerAvailable.fromObject = function fromObject(object) { + CMsgServerAvailable.fromObject = function (object, _depth) { if (object instanceof $root.CMsgServerAvailable) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgServerAvailable: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgServerAvailable(); }; @@ -2380,7 +3162,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgServerAvailable.toObject = function toObject() { + CMsgServerAvailable.toObject = function () { return {}; }; @@ -2391,8 +3173,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgServerAvailable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgServerAvailable.prototype.toJSON = function() { + return CMsgServerAvailable.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgServerAvailable + * @function getTypeUrl + * @memberof CMsgServerAvailable + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgServerAvailable.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgServerAvailable"; }; return CMsgServerAvailable; @@ -2400,27 +3196,40 @@ $root.CMsgLANServerAvailable = (function() { + /** + * Properties of a CMsgLANServerAvailable. + * @typedef {Object} CMsgLANServerAvailable.$Properties + * @property {number|Long|null} [lobby_id] CMsgLANServerAvailable lobby_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgLANServerAvailable. * @exports ICMsgLANServerAvailable * @interface ICMsgLANServerAvailable - * @property {number|Long|null} [lobby_id] CMsgLANServerAvailable lobby_id + * @augments CMsgLANServerAvailable.$Properties + * @deprecated Use CMsgLANServerAvailable.$Properties instead. + */ + + /** + * Shape of a CMsgLANServerAvailable. + * @typedef {CMsgLANServerAvailable.$Properties} CMsgLANServerAvailable.$Shape */ /** * Constructs a new CMsgLANServerAvailable. * @exports CMsgLANServerAvailable * @classdesc Represents a CMsgLANServerAvailable. - * @implements ICMsgLANServerAvailable * @constructor - * @param {ICMsgLANServerAvailable=} [properties] Properties to set + * @param {CMsgLANServerAvailable.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgLANServerAvailable(properties) { + var CMsgLANServerAvailable = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgLANServerAvailable lobby_id. @@ -2428,17 +3237,21 @@ * @memberof CMsgLANServerAvailable * @instance */ - CMsgLANServerAvailable.prototype.lobby_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgLANServerAvailable.prototype.lobby_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgLANServerAvailable instance using the specified properties. * @function create * @memberof CMsgLANServerAvailable * @static - * @param {ICMsgLANServerAvailable=} [properties] Properties to set + * @param {CMsgLANServerAvailable.$Properties=} [properties] Properties to set * @returns {CMsgLANServerAvailable} CMsgLANServerAvailable instance + * @type {{ + * (properties: CMsgLANServerAvailable.$Shape): CMsgLANServerAvailable & CMsgLANServerAvailable.$Shape; + * (properties?: CMsgLANServerAvailable.$Properties): CMsgLANServerAvailable; + * }} */ - CMsgLANServerAvailable.create = function create(properties) { + CMsgLANServerAvailable.create = function(properties) { return new CMsgLANServerAvailable(properties); }; @@ -2447,15 +3260,22 @@ * @function encode * @memberof CMsgLANServerAvailable * @static - * @param {ICMsgLANServerAvailable} message CMsgLANServerAvailable message or plain object to encode + * @param {CMsgLANServerAvailable.$Properties} message CMsgLANServerAvailable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgLANServerAvailable.encode = function encode(message, writer) { + CMsgLANServerAvailable.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.lobby_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2464,12 +3284,12 @@ * @function encodeDelimited * @memberof CMsgLANServerAvailable * @static - * @param {ICMsgLANServerAvailable} message CMsgLANServerAvailable message or plain object to encode + * @param {CMsgLANServerAvailable.$Properties} message CMsgLANServerAvailable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgLANServerAvailable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgLANServerAvailable.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2479,25 +3299,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgLANServerAvailable} CMsgLANServerAvailable + * @returns {CMsgLANServerAvailable & CMsgLANServerAvailable.$Shape} CMsgLANServerAvailable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgLANServerAvailable.decode = function decode(reader, length) { + CMsgLANServerAvailable.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgLANServerAvailable(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgLANServerAvailable(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lobby_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.lobby_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2507,11 +3344,11 @@ * @memberof CMsgLANServerAvailable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgLANServerAvailable} CMsgLANServerAvailable + * @returns {CMsgLANServerAvailable & CMsgLANServerAvailable.$Shape} CMsgLANServerAvailable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgLANServerAvailable.decodeDelimited = function decodeDelimited(reader) { + CMsgLANServerAvailable.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2525,10 +3362,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgLANServerAvailable.verify = function verify(message) { + CMsgLANServerAvailable.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; return null; @@ -2542,19 +3383,25 @@ * @param {Object.} object Plain object * @returns {CMsgLANServerAvailable} CMsgLANServerAvailable */ - CMsgLANServerAvailable.fromObject = function fromObject(object) { + CMsgLANServerAvailable.fromObject = function (object, _depth) { if (object instanceof $root.CMsgLANServerAvailable) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgLANServerAvailable: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgLANServerAvailable(); if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = false; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") - message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(); + message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(true); return message; }; @@ -2567,21 +3414,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgLANServerAvailable.toObject = function toObject(message, options) { + CMsgLANServerAvailable.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber() : message.lobby_id; + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; return object; }; @@ -2592,8 +3445,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgLANServerAvailable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgLANServerAvailable.prototype.toJSON = function() { + return CMsgLANServerAvailable.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgLANServerAvailable + * @function getTypeUrl + * @memberof CMsgLANServerAvailable + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgLANServerAvailable.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgLANServerAvailable"; }; return CMsgLANServerAvailable; @@ -2603,8 +3470,7 @@ /** * Properties of a CSOEconGameAccountClient. - * @exports ICSOEconGameAccountClient - * @interface ICSOEconGameAccountClient + * @typedef {Object} CSOEconGameAccountClient.$Properties * @property {number|null} [additional_backpack_slots] CSOEconGameAccountClient additional_backpack_slots * @property {boolean|null} [trial_account] CSOEconGameAccountClient trial_account * @property {boolean|null} [need_to_choose_most_helpful_friend] CSOEconGameAccountClient need_to_choose_most_helpful_friend @@ -2629,22 +3495,36 @@ * @property {number|null} [quest_reward_credits] CSOEconGameAccountClient quest_reward_credits * @property {number|null} [matchmaking_last_casual_excessive_reports_auto_ban_time] CSOEconGameAccountClient matchmaking_last_casual_excessive_reports_auto_ban_time * @property {number|null} [matchmaking_last_comp_excessive_reports_auto_ban_time] CSOEconGameAccountClient matchmaking_last_comp_excessive_reports_auto_ban_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconGameAccountClient. + * @exports ICSOEconGameAccountClient + * @interface ICSOEconGameAccountClient + * @augments CSOEconGameAccountClient.$Properties + * @deprecated Use CSOEconGameAccountClient.$Properties instead. + */ + + /** + * Shape of a CSOEconGameAccountClient. + * @typedef {CSOEconGameAccountClient.$Properties} CSOEconGameAccountClient.$Shape */ /** * Constructs a new CSOEconGameAccountClient. * @exports CSOEconGameAccountClient * @classdesc Represents a CSOEconGameAccountClient. - * @implements ICSOEconGameAccountClient * @constructor - * @param {ICSOEconGameAccountClient=} [properties] Properties to set + * @param {CSOEconGameAccountClient.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconGameAccountClient(properties) { + var CSOEconGameAccountClient = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconGameAccountClient additional_backpack_slots. @@ -2843,10 +3723,14 @@ * @function create * @memberof CSOEconGameAccountClient * @static - * @param {ICSOEconGameAccountClient=} [properties] Properties to set + * @param {CSOEconGameAccountClient.$Properties=} [properties] Properties to set * @returns {CSOEconGameAccountClient} CSOEconGameAccountClient instance + * @type {{ + * (properties: CSOEconGameAccountClient.$Shape): CSOEconGameAccountClient & CSOEconGameAccountClient.$Shape; + * (properties?: CSOEconGameAccountClient.$Properties): CSOEconGameAccountClient; + * }} */ - CSOEconGameAccountClient.create = function create(properties) { + CSOEconGameAccountClient.create = function(properties) { return new CSOEconGameAccountClient(properties); }; @@ -2855,61 +3739,68 @@ * @function encode * @memberof CSOEconGameAccountClient * @static - * @param {ICSOEconGameAccountClient} message CSOEconGameAccountClient message or plain object to encode + * @param {CSOEconGameAccountClient.$Properties} message CSOEconGameAccountClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconGameAccountClient.encode = function encode(message, writer) { + CSOEconGameAccountClient.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.additional_backpack_slots != null && Object.hasOwnProperty.call(message, "additional_backpack_slots")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.additional_backpack_slots != null && $Object.hasOwnProperty.call(message, "additional_backpack_slots")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.additional_backpack_slots); - if (message.trial_account != null && Object.hasOwnProperty.call(message, "trial_account")) + if (message.trial_account != null && $Object.hasOwnProperty.call(message, "trial_account")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.trial_account); - if (message.need_to_choose_most_helpful_friend != null && Object.hasOwnProperty.call(message, "need_to_choose_most_helpful_friend")) + if (message.need_to_choose_most_helpful_friend != null && $Object.hasOwnProperty.call(message, "need_to_choose_most_helpful_friend")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.need_to_choose_most_helpful_friend); - if (message.in_coaches_list != null && Object.hasOwnProperty.call(message, "in_coaches_list")) + if (message.in_coaches_list != null && $Object.hasOwnProperty.call(message, "in_coaches_list")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.in_coaches_list); - if (message.trade_ban_expiration != null && Object.hasOwnProperty.call(message, "trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) writer.uint32(/* id 6, wireType 5 =*/53).fixed32(message.trade_ban_expiration); - if (message.duel_ban_expiration != null && Object.hasOwnProperty.call(message, "duel_ban_expiration")) + if (message.duel_ban_expiration != null && $Object.hasOwnProperty.call(message, "duel_ban_expiration")) writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.duel_ban_expiration); - if (message.preview_item_def != null && Object.hasOwnProperty.call(message, "preview_item_def")) + if (message.preview_item_def != null && $Object.hasOwnProperty.call(message, "preview_item_def")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.preview_item_def); - if (message.matchmaking_ranked_ban_expiration != null && Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_expiration")) + if (message.matchmaking_ranked_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_expiration")) writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.matchmaking_ranked_ban_expiration); - if (message.phone_verified != null && Object.hasOwnProperty.call(message, "phone_verified")) + if (message.phone_verified != null && $Object.hasOwnProperty.call(message, "phone_verified")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.phone_verified); - if (message.skill_rating_6v6 != null && Object.hasOwnProperty.call(message, "skill_rating_6v6")) + if (message.skill_rating_6v6 != null && $Object.hasOwnProperty.call(message, "skill_rating_6v6")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.skill_rating_6v6); - if (message.skill_rating_9v9 != null && Object.hasOwnProperty.call(message, "skill_rating_9v9")) + if (message.skill_rating_9v9 != null && $Object.hasOwnProperty.call(message, "skill_rating_9v9")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.skill_rating_9v9); - if (message.competitive_access != null && Object.hasOwnProperty.call(message, "competitive_access")) + if (message.competitive_access != null && $Object.hasOwnProperty.call(message, "competitive_access")) writer.uint32(/* id 23, wireType 0 =*/184).bool(message.competitive_access); - if (message.matchmaking_ranked_low_priority_expiration != null && Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_expiration")) + if (message.matchmaking_ranked_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_expiration")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.matchmaking_ranked_low_priority_expiration); - if (message.matchmaking_ranked_ban_last_duration != null && Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_last_duration")) + if (message.matchmaking_ranked_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_last_duration")) writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.matchmaking_ranked_ban_last_duration); - if (message.matchmaking_ranked_low_priority_last_duration != null && Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_last_duration")) + if (message.matchmaking_ranked_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_last_duration")) writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.matchmaking_ranked_low_priority_last_duration); - if (message.matchmaking_casual_ban_expiration != null && Object.hasOwnProperty.call(message, "matchmaking_casual_ban_expiration")) + if (message.matchmaking_casual_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_expiration")) writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.matchmaking_casual_ban_expiration); - if (message.matchmaking_casual_low_priority_expiration != null && Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_expiration")) + if (message.matchmaking_casual_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_expiration")) writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.matchmaking_casual_low_priority_expiration); - if (message.matchmaking_casual_ban_last_duration != null && Object.hasOwnProperty.call(message, "matchmaking_casual_ban_last_duration")) + if (message.matchmaking_casual_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_last_duration")) writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.matchmaking_casual_ban_last_duration); - if (message.matchmaking_casual_low_priority_last_duration != null && Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_last_duration")) + if (message.matchmaking_casual_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_last_duration")) writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.matchmaking_casual_low_priority_last_duration); - if (message.phone_identifying != null && Object.hasOwnProperty.call(message, "phone_identifying")) + if (message.phone_identifying != null && $Object.hasOwnProperty.call(message, "phone_identifying")) writer.uint32(/* id 31, wireType 0 =*/248).bool(message.phone_identifying); - if (message.disable_party_quest_progress != null && Object.hasOwnProperty.call(message, "disable_party_quest_progress")) + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) writer.uint32(/* id 32, wireType 0 =*/256).bool(message.disable_party_quest_progress); - if (message.quest_reward_credits != null && Object.hasOwnProperty.call(message, "quest_reward_credits")) + if (message.quest_reward_credits != null && $Object.hasOwnProperty.call(message, "quest_reward_credits")) writer.uint32(/* id 33, wireType 0 =*/264).uint32(message.quest_reward_credits); - if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && Object.hasOwnProperty.call(message, "matchmaking_last_casual_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_casual_excessive_reports_auto_ban_time")) writer.uint32(/* id 34, wireType 0 =*/272).uint32(message.matchmaking_last_casual_excessive_reports_auto_ban_time); - if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && Object.hasOwnProperty.call(message, "matchmaking_last_comp_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_comp_excessive_reports_auto_ban_time")) writer.uint32(/* id 35, wireType 0 =*/280).uint32(message.matchmaking_last_comp_excessive_reports_auto_ban_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2918,12 +3809,12 @@ * @function encodeDelimited * @memberof CSOEconGameAccountClient * @static - * @param {ICSOEconGameAccountClient} message CSOEconGameAccountClient message or plain object to encode + * @param {CSOEconGameAccountClient.$Properties} message CSOEconGameAccountClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconGameAccountClient.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconGameAccountClient.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2933,94 +3824,180 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconGameAccountClient} CSOEconGameAccountClient + * @returns {CSOEconGameAccountClient & CSOEconGameAccountClient.$Shape} CSOEconGameAccountClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconGameAccountClient.decode = function decode(reader, length) { + CSOEconGameAccountClient.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconGameAccountClient(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconGameAccountClient(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.additional_backpack_slots = reader.uint32(); - break; - case 2: - message.trial_account = reader.bool(); - break; - case 4: - message.need_to_choose_most_helpful_friend = reader.bool(); - break; - case 5: - message.in_coaches_list = reader.bool(); - break; - case 6: - message.trade_ban_expiration = reader.fixed32(); - break; - case 7: - message.duel_ban_expiration = reader.fixed32(); - break; - case 8: - message.preview_item_def = reader.uint32(); - break; - case 19: - message.phone_verified = reader.bool(); - break; - case 20: - message.skill_rating_6v6 = reader.uint32(); - break; - case 21: - message.skill_rating_9v9 = reader.uint32(); - break; - case 23: - message.competitive_access = reader.bool(); - break; - case 18: - message.matchmaking_ranked_ban_expiration = reader.uint32(); - break; - case 24: - message.matchmaking_ranked_low_priority_expiration = reader.uint32(); - break; - case 25: - message.matchmaking_ranked_ban_last_duration = reader.uint32(); - break; - case 26: - message.matchmaking_ranked_low_priority_last_duration = reader.uint32(); - break; - case 27: - message.matchmaking_casual_ban_expiration = reader.uint32(); - break; - case 28: - message.matchmaking_casual_low_priority_expiration = reader.uint32(); - break; - case 29: - message.matchmaking_casual_ban_last_duration = reader.uint32(); - break; - case 30: - message.matchmaking_casual_low_priority_last_duration = reader.uint32(); - break; - case 31: - message.phone_identifying = reader.bool(); - break; - case 32: - message.disable_party_quest_progress = reader.bool(); - break; - case 33: - message.quest_reward_credits = reader.uint32(); - break; - case 34: - message.matchmaking_last_casual_excessive_reports_auto_ban_time = reader.uint32(); - break; - case 35: - message.matchmaking_last_comp_excessive_reports_auto_ban_time = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.additional_backpack_slots = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.trial_account = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.need_to_choose_most_helpful_friend = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.in_coaches_list = reader.bool(); + continue; + } + case 6: { + if (wireType !== 5) + break; + message.trade_ban_expiration = reader.fixed32(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.duel_ban_expiration = reader.fixed32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.preview_item_def = reader.uint32(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.phone_verified = reader.bool(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.skill_rating_6v6 = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.skill_rating_9v9 = reader.uint32(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.competitive_access = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.matchmaking_ranked_ban_expiration = reader.uint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.matchmaking_ranked_low_priority_expiration = reader.uint32(); + continue; + } + case 25: { + if (wireType !== 0) + break; + message.matchmaking_ranked_ban_last_duration = reader.uint32(); + continue; + } + case 26: { + if (wireType !== 0) + break; + message.matchmaking_ranked_low_priority_last_duration = reader.uint32(); + continue; + } + case 27: { + if (wireType !== 0) + break; + message.matchmaking_casual_ban_expiration = reader.uint32(); + continue; + } + case 28: { + if (wireType !== 0) + break; + message.matchmaking_casual_low_priority_expiration = reader.uint32(); + continue; + } + case 29: { + if (wireType !== 0) + break; + message.matchmaking_casual_ban_last_duration = reader.uint32(); + continue; + } + case 30: { + if (wireType !== 0) + break; + message.matchmaking_casual_low_priority_last_duration = reader.uint32(); + continue; + } + case 31: { + if (wireType !== 0) + break; + message.phone_identifying = reader.bool(); + continue; + } + case 32: { + if (wireType !== 0) + break; + message.disable_party_quest_progress = reader.bool(); + continue; + } + case 33: { + if (wireType !== 0) + break; + message.quest_reward_credits = reader.uint32(); + continue; + } + case 34: { + if (wireType !== 0) + break; + message.matchmaking_last_casual_excessive_reports_auto_ban_time = reader.uint32(); + continue; + } + case 35: { + if (wireType !== 0) + break; + message.matchmaking_last_comp_excessive_reports_auto_ban_time = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3030,11 +4007,11 @@ * @memberof CSOEconGameAccountClient * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconGameAccountClient} CSOEconGameAccountClient + * @returns {CSOEconGameAccountClient & CSOEconGameAccountClient.$Shape} CSOEconGameAccountClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconGameAccountClient.decodeDelimited = function decodeDelimited(reader) { + CSOEconGameAccountClient.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3048,79 +4025,83 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconGameAccountClient.verify = function verify(message) { + CSOEconGameAccountClient.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.additional_backpack_slots != null && message.hasOwnProperty("additional_backpack_slots")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.additional_backpack_slots != null && $Object.hasOwnProperty.call(message, "additional_backpack_slots")) if (!$util.isInteger(message.additional_backpack_slots)) return "additional_backpack_slots: integer expected"; - if (message.trial_account != null && message.hasOwnProperty("trial_account")) + if (message.trial_account != null && $Object.hasOwnProperty.call(message, "trial_account")) if (typeof message.trial_account !== "boolean") return "trial_account: boolean expected"; - if (message.need_to_choose_most_helpful_friend != null && message.hasOwnProperty("need_to_choose_most_helpful_friend")) + if (message.need_to_choose_most_helpful_friend != null && $Object.hasOwnProperty.call(message, "need_to_choose_most_helpful_friend")) if (typeof message.need_to_choose_most_helpful_friend !== "boolean") return "need_to_choose_most_helpful_friend: boolean expected"; - if (message.in_coaches_list != null && message.hasOwnProperty("in_coaches_list")) + if (message.in_coaches_list != null && $Object.hasOwnProperty.call(message, "in_coaches_list")) if (typeof message.in_coaches_list !== "boolean") return "in_coaches_list: boolean expected"; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) if (!$util.isInteger(message.trade_ban_expiration)) return "trade_ban_expiration: integer expected"; - if (message.duel_ban_expiration != null && message.hasOwnProperty("duel_ban_expiration")) + if (message.duel_ban_expiration != null && $Object.hasOwnProperty.call(message, "duel_ban_expiration")) if (!$util.isInteger(message.duel_ban_expiration)) return "duel_ban_expiration: integer expected"; - if (message.preview_item_def != null && message.hasOwnProperty("preview_item_def")) + if (message.preview_item_def != null && $Object.hasOwnProperty.call(message, "preview_item_def")) if (!$util.isInteger(message.preview_item_def)) return "preview_item_def: integer expected"; - if (message.phone_verified != null && message.hasOwnProperty("phone_verified")) + if (message.phone_verified != null && $Object.hasOwnProperty.call(message, "phone_verified")) if (typeof message.phone_verified !== "boolean") return "phone_verified: boolean expected"; - if (message.skill_rating_6v6 != null && message.hasOwnProperty("skill_rating_6v6")) + if (message.skill_rating_6v6 != null && $Object.hasOwnProperty.call(message, "skill_rating_6v6")) if (!$util.isInteger(message.skill_rating_6v6)) return "skill_rating_6v6: integer expected"; - if (message.skill_rating_9v9 != null && message.hasOwnProperty("skill_rating_9v9")) + if (message.skill_rating_9v9 != null && $Object.hasOwnProperty.call(message, "skill_rating_9v9")) if (!$util.isInteger(message.skill_rating_9v9)) return "skill_rating_9v9: integer expected"; - if (message.competitive_access != null && message.hasOwnProperty("competitive_access")) + if (message.competitive_access != null && $Object.hasOwnProperty.call(message, "competitive_access")) if (typeof message.competitive_access !== "boolean") return "competitive_access: boolean expected"; - if (message.matchmaking_ranked_ban_expiration != null && message.hasOwnProperty("matchmaking_ranked_ban_expiration")) + if (message.matchmaking_ranked_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_expiration")) if (!$util.isInteger(message.matchmaking_ranked_ban_expiration)) return "matchmaking_ranked_ban_expiration: integer expected"; - if (message.matchmaking_ranked_low_priority_expiration != null && message.hasOwnProperty("matchmaking_ranked_low_priority_expiration")) + if (message.matchmaking_ranked_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_expiration")) if (!$util.isInteger(message.matchmaking_ranked_low_priority_expiration)) return "matchmaking_ranked_low_priority_expiration: integer expected"; - if (message.matchmaking_ranked_ban_last_duration != null && message.hasOwnProperty("matchmaking_ranked_ban_last_duration")) + if (message.matchmaking_ranked_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_last_duration")) if (!$util.isInteger(message.matchmaking_ranked_ban_last_duration)) return "matchmaking_ranked_ban_last_duration: integer expected"; - if (message.matchmaking_ranked_low_priority_last_duration != null && message.hasOwnProperty("matchmaking_ranked_low_priority_last_duration")) + if (message.matchmaking_ranked_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_last_duration")) if (!$util.isInteger(message.matchmaking_ranked_low_priority_last_duration)) return "matchmaking_ranked_low_priority_last_duration: integer expected"; - if (message.matchmaking_casual_ban_expiration != null && message.hasOwnProperty("matchmaking_casual_ban_expiration")) + if (message.matchmaking_casual_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_expiration")) if (!$util.isInteger(message.matchmaking_casual_ban_expiration)) return "matchmaking_casual_ban_expiration: integer expected"; - if (message.matchmaking_casual_low_priority_expiration != null && message.hasOwnProperty("matchmaking_casual_low_priority_expiration")) + if (message.matchmaking_casual_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_expiration")) if (!$util.isInteger(message.matchmaking_casual_low_priority_expiration)) return "matchmaking_casual_low_priority_expiration: integer expected"; - if (message.matchmaking_casual_ban_last_duration != null && message.hasOwnProperty("matchmaking_casual_ban_last_duration")) + if (message.matchmaking_casual_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_last_duration")) if (!$util.isInteger(message.matchmaking_casual_ban_last_duration)) return "matchmaking_casual_ban_last_duration: integer expected"; - if (message.matchmaking_casual_low_priority_last_duration != null && message.hasOwnProperty("matchmaking_casual_low_priority_last_duration")) + if (message.matchmaking_casual_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_last_duration")) if (!$util.isInteger(message.matchmaking_casual_low_priority_last_duration)) return "matchmaking_casual_low_priority_last_duration: integer expected"; - if (message.phone_identifying != null && message.hasOwnProperty("phone_identifying")) + if (message.phone_identifying != null && $Object.hasOwnProperty.call(message, "phone_identifying")) if (typeof message.phone_identifying !== "boolean") return "phone_identifying: boolean expected"; - if (message.disable_party_quest_progress != null && message.hasOwnProperty("disable_party_quest_progress")) + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) if (typeof message.disable_party_quest_progress !== "boolean") return "disable_party_quest_progress: boolean expected"; - if (message.quest_reward_credits != null && message.hasOwnProperty("quest_reward_credits")) + if (message.quest_reward_credits != null && $Object.hasOwnProperty.call(message, "quest_reward_credits")) if (!$util.isInteger(message.quest_reward_credits)) return "quest_reward_credits: integer expected"; - if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && message.hasOwnProperty("matchmaking_last_casual_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_casual_excessive_reports_auto_ban_time")) if (!$util.isInteger(message.matchmaking_last_casual_excessive_reports_auto_ban_time)) return "matchmaking_last_casual_excessive_reports_auto_ban_time: integer expected"; - if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && message.hasOwnProperty("matchmaking_last_comp_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_comp_excessive_reports_auto_ban_time")) if (!$util.isInteger(message.matchmaking_last_comp_excessive_reports_auto_ban_time)) return "matchmaking_last_comp_excessive_reports_auto_ban_time: integer expected"; return null; @@ -3134,18 +4115,24 @@ * @param {Object.} object Plain object * @returns {CSOEconGameAccountClient} CSOEconGameAccountClient */ - CSOEconGameAccountClient.fromObject = function fromObject(object) { + CSOEconGameAccountClient.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconGameAccountClient) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconGameAccountClient: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconGameAccountClient(); if (object.additional_backpack_slots != null) message.additional_backpack_slots = object.additional_backpack_slots >>> 0; if (object.trial_account != null) - message.trial_account = Boolean(object.trial_account); + message.trial_account = $Boolean(object.trial_account); if (object.need_to_choose_most_helpful_friend != null) - message.need_to_choose_most_helpful_friend = Boolean(object.need_to_choose_most_helpful_friend); + message.need_to_choose_most_helpful_friend = $Boolean(object.need_to_choose_most_helpful_friend); if (object.in_coaches_list != null) - message.in_coaches_list = Boolean(object.in_coaches_list); + message.in_coaches_list = $Boolean(object.in_coaches_list); if (object.trade_ban_expiration != null) message.trade_ban_expiration = object.trade_ban_expiration >>> 0; if (object.duel_ban_expiration != null) @@ -3153,13 +4140,13 @@ if (object.preview_item_def != null) message.preview_item_def = object.preview_item_def >>> 0; if (object.phone_verified != null) - message.phone_verified = Boolean(object.phone_verified); + message.phone_verified = $Boolean(object.phone_verified); if (object.skill_rating_6v6 != null) message.skill_rating_6v6 = object.skill_rating_6v6 >>> 0; if (object.skill_rating_9v9 != null) message.skill_rating_9v9 = object.skill_rating_9v9 >>> 0; if (object.competitive_access != null) - message.competitive_access = Boolean(object.competitive_access); + message.competitive_access = $Boolean(object.competitive_access); if (object.matchmaking_ranked_ban_expiration != null) message.matchmaking_ranked_ban_expiration = object.matchmaking_ranked_ban_expiration >>> 0; if (object.matchmaking_ranked_low_priority_expiration != null) @@ -3177,9 +4164,9 @@ if (object.matchmaking_casual_low_priority_last_duration != null) message.matchmaking_casual_low_priority_last_duration = object.matchmaking_casual_low_priority_last_duration >>> 0; if (object.phone_identifying != null) - message.phone_identifying = Boolean(object.phone_identifying); + message.phone_identifying = $Boolean(object.phone_identifying); if (object.disable_party_quest_progress != null) - message.disable_party_quest_progress = Boolean(object.disable_party_quest_progress); + message.disable_party_quest_progress = $Boolean(object.disable_party_quest_progress); if (object.quest_reward_credits != null) message.quest_reward_credits = object.quest_reward_credits >>> 0; if (object.matchmaking_last_casual_excessive_reports_auto_ban_time != null) @@ -3198,9 +4185,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconGameAccountClient.toObject = function toObject(message, options) { + CSOEconGameAccountClient.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.additional_backpack_slots = 0; @@ -3228,53 +4219,53 @@ object.matchmaking_last_casual_excessive_reports_auto_ban_time = 0; object.matchmaking_last_comp_excessive_reports_auto_ban_time = 0; } - if (message.additional_backpack_slots != null && message.hasOwnProperty("additional_backpack_slots")) + if (message.additional_backpack_slots != null && $Object.hasOwnProperty.call(message, "additional_backpack_slots")) object.additional_backpack_slots = message.additional_backpack_slots; - if (message.trial_account != null && message.hasOwnProperty("trial_account")) + if (message.trial_account != null && $Object.hasOwnProperty.call(message, "trial_account")) object.trial_account = message.trial_account; - if (message.need_to_choose_most_helpful_friend != null && message.hasOwnProperty("need_to_choose_most_helpful_friend")) + if (message.need_to_choose_most_helpful_friend != null && $Object.hasOwnProperty.call(message, "need_to_choose_most_helpful_friend")) object.need_to_choose_most_helpful_friend = message.need_to_choose_most_helpful_friend; - if (message.in_coaches_list != null && message.hasOwnProperty("in_coaches_list")) + if (message.in_coaches_list != null && $Object.hasOwnProperty.call(message, "in_coaches_list")) object.in_coaches_list = message.in_coaches_list; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) object.trade_ban_expiration = message.trade_ban_expiration; - if (message.duel_ban_expiration != null && message.hasOwnProperty("duel_ban_expiration")) + if (message.duel_ban_expiration != null && $Object.hasOwnProperty.call(message, "duel_ban_expiration")) object.duel_ban_expiration = message.duel_ban_expiration; - if (message.preview_item_def != null && message.hasOwnProperty("preview_item_def")) + if (message.preview_item_def != null && $Object.hasOwnProperty.call(message, "preview_item_def")) object.preview_item_def = message.preview_item_def; - if (message.matchmaking_ranked_ban_expiration != null && message.hasOwnProperty("matchmaking_ranked_ban_expiration")) + if (message.matchmaking_ranked_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_expiration")) object.matchmaking_ranked_ban_expiration = message.matchmaking_ranked_ban_expiration; - if (message.phone_verified != null && message.hasOwnProperty("phone_verified")) + if (message.phone_verified != null && $Object.hasOwnProperty.call(message, "phone_verified")) object.phone_verified = message.phone_verified; - if (message.skill_rating_6v6 != null && message.hasOwnProperty("skill_rating_6v6")) + if (message.skill_rating_6v6 != null && $Object.hasOwnProperty.call(message, "skill_rating_6v6")) object.skill_rating_6v6 = message.skill_rating_6v6; - if (message.skill_rating_9v9 != null && message.hasOwnProperty("skill_rating_9v9")) + if (message.skill_rating_9v9 != null && $Object.hasOwnProperty.call(message, "skill_rating_9v9")) object.skill_rating_9v9 = message.skill_rating_9v9; - if (message.competitive_access != null && message.hasOwnProperty("competitive_access")) + if (message.competitive_access != null && $Object.hasOwnProperty.call(message, "competitive_access")) object.competitive_access = message.competitive_access; - if (message.matchmaking_ranked_low_priority_expiration != null && message.hasOwnProperty("matchmaking_ranked_low_priority_expiration")) + if (message.matchmaking_ranked_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_expiration")) object.matchmaking_ranked_low_priority_expiration = message.matchmaking_ranked_low_priority_expiration; - if (message.matchmaking_ranked_ban_last_duration != null && message.hasOwnProperty("matchmaking_ranked_ban_last_duration")) + if (message.matchmaking_ranked_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_last_duration")) object.matchmaking_ranked_ban_last_duration = message.matchmaking_ranked_ban_last_duration; - if (message.matchmaking_ranked_low_priority_last_duration != null && message.hasOwnProperty("matchmaking_ranked_low_priority_last_duration")) + if (message.matchmaking_ranked_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_last_duration")) object.matchmaking_ranked_low_priority_last_duration = message.matchmaking_ranked_low_priority_last_duration; - if (message.matchmaking_casual_ban_expiration != null && message.hasOwnProperty("matchmaking_casual_ban_expiration")) + if (message.matchmaking_casual_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_expiration")) object.matchmaking_casual_ban_expiration = message.matchmaking_casual_ban_expiration; - if (message.matchmaking_casual_low_priority_expiration != null && message.hasOwnProperty("matchmaking_casual_low_priority_expiration")) + if (message.matchmaking_casual_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_expiration")) object.matchmaking_casual_low_priority_expiration = message.matchmaking_casual_low_priority_expiration; - if (message.matchmaking_casual_ban_last_duration != null && message.hasOwnProperty("matchmaking_casual_ban_last_duration")) + if (message.matchmaking_casual_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_last_duration")) object.matchmaking_casual_ban_last_duration = message.matchmaking_casual_ban_last_duration; - if (message.matchmaking_casual_low_priority_last_duration != null && message.hasOwnProperty("matchmaking_casual_low_priority_last_duration")) + if (message.matchmaking_casual_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_last_duration")) object.matchmaking_casual_low_priority_last_duration = message.matchmaking_casual_low_priority_last_duration; - if (message.phone_identifying != null && message.hasOwnProperty("phone_identifying")) + if (message.phone_identifying != null && $Object.hasOwnProperty.call(message, "phone_identifying")) object.phone_identifying = message.phone_identifying; - if (message.disable_party_quest_progress != null && message.hasOwnProperty("disable_party_quest_progress")) + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) object.disable_party_quest_progress = message.disable_party_quest_progress; - if (message.quest_reward_credits != null && message.hasOwnProperty("quest_reward_credits")) + if (message.quest_reward_credits != null && $Object.hasOwnProperty.call(message, "quest_reward_credits")) object.quest_reward_credits = message.quest_reward_credits; - if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && message.hasOwnProperty("matchmaking_last_casual_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_casual_excessive_reports_auto_ban_time")) object.matchmaking_last_casual_excessive_reports_auto_ban_time = message.matchmaking_last_casual_excessive_reports_auto_ban_time; - if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && message.hasOwnProperty("matchmaking_last_comp_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_comp_excessive_reports_auto_ban_time")) object.matchmaking_last_comp_excessive_reports_auto_ban_time = message.matchmaking_last_comp_excessive_reports_auto_ban_time; return object; }; @@ -3286,8 +4277,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconGameAccountClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconGameAccountClient.prototype.toJSON = function() { + return CSOEconGameAccountClient.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconGameAccountClient + * @function getTypeUrl + * @memberof CSOEconGameAccountClient + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconGameAccountClient.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconGameAccountClient"; }; return CSOEconGameAccountClient; @@ -3297,29 +4302,42 @@ /** * Properties of a CSOItemCriteriaCondition. - * @exports ICSOItemCriteriaCondition - * @interface ICSOItemCriteriaCondition + * @typedef {Object} CSOItemCriteriaCondition.$Properties * @property {number|null} [op] CSOItemCriteriaCondition op * @property {string|null} [field] CSOItemCriteriaCondition field * @property {boolean|null} [required] CSOItemCriteriaCondition required * @property {number|null} [float_value] CSOItemCriteriaCondition float_value * @property {string|null} [string_value] CSOItemCriteriaCondition string_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOItemCriteriaCondition. + * @exports ICSOItemCriteriaCondition + * @interface ICSOItemCriteriaCondition + * @augments CSOItemCriteriaCondition.$Properties + * @deprecated Use CSOItemCriteriaCondition.$Properties instead. + */ + + /** + * Shape of a CSOItemCriteriaCondition. + * @typedef {CSOItemCriteriaCondition.$Properties} CSOItemCriteriaCondition.$Shape */ /** * Constructs a new CSOItemCriteriaCondition. * @exports CSOItemCriteriaCondition * @classdesc Represents a CSOItemCriteriaCondition. - * @implements ICSOItemCriteriaCondition * @constructor - * @param {ICSOItemCriteriaCondition=} [properties] Properties to set + * @param {CSOItemCriteriaCondition.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOItemCriteriaCondition(properties) { + var CSOItemCriteriaCondition = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOItemCriteriaCondition op. @@ -3366,10 +4384,14 @@ * @function create * @memberof CSOItemCriteriaCondition * @static - * @param {ICSOItemCriteriaCondition=} [properties] Properties to set + * @param {CSOItemCriteriaCondition.$Properties=} [properties] Properties to set * @returns {CSOItemCriteriaCondition} CSOItemCriteriaCondition instance + * @type {{ + * (properties: CSOItemCriteriaCondition.$Shape): CSOItemCriteriaCondition & CSOItemCriteriaCondition.$Shape; + * (properties?: CSOItemCriteriaCondition.$Properties): CSOItemCriteriaCondition; + * }} */ - CSOItemCriteriaCondition.create = function create(properties) { + CSOItemCriteriaCondition.create = function(properties) { return new CSOItemCriteriaCondition(properties); }; @@ -3378,23 +4400,30 @@ * @function encode * @memberof CSOItemCriteriaCondition * @static - * @param {ICSOItemCriteriaCondition} message CSOItemCriteriaCondition message or plain object to encode + * @param {CSOItemCriteriaCondition.$Properties} message CSOItemCriteriaCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemCriteriaCondition.encode = function encode(message, writer) { + CSOItemCriteriaCondition.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.op != null && Object.hasOwnProperty.call(message, "op")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.op != null && $Object.hasOwnProperty.call(message, "op")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.op); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.field); - if (message.required != null && Object.hasOwnProperty.call(message, "required")) + if (message.required != null && $Object.hasOwnProperty.call(message, "required")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.required); - if (message.float_value != null && Object.hasOwnProperty.call(message, "float_value")) + if (message.float_value != null && $Object.hasOwnProperty.call(message, "float_value")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.float_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.string_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3403,12 +4432,12 @@ * @function encodeDelimited * @memberof CSOItemCriteriaCondition * @static - * @param {ICSOItemCriteriaCondition} message CSOItemCriteriaCondition message or plain object to encode + * @param {CSOItemCriteriaCondition.$Properties} message CSOItemCriteriaCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemCriteriaCondition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOItemCriteriaCondition.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3418,37 +4447,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOItemCriteriaCondition} CSOItemCriteriaCondition + * @returns {CSOItemCriteriaCondition & CSOItemCriteriaCondition.$Shape} CSOItemCriteriaCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemCriteriaCondition.decode = function decode(reader, length) { + CSOItemCriteriaCondition.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOItemCriteriaCondition(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOItemCriteriaCondition(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.op = reader.int32(); - break; - case 2: - message.field = reader.string(); - break; - case 3: - message.required = reader.bool(); - break; - case 4: - message.float_value = reader.float(); - break; - case 5: - message.string_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.op = reader.int32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.field = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.required = reader.bool(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.float_value = reader.float(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.string_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3458,11 +4516,11 @@ * @memberof CSOItemCriteriaCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOItemCriteriaCondition} CSOItemCriteriaCondition + * @returns {CSOItemCriteriaCondition & CSOItemCriteriaCondition.$Shape} CSOItemCriteriaCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemCriteriaCondition.decodeDelimited = function decodeDelimited(reader) { + CSOItemCriteriaCondition.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3476,22 +4534,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOItemCriteriaCondition.verify = function verify(message) { + CSOItemCriteriaCondition.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.op != null && message.hasOwnProperty("op")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.op != null && $Object.hasOwnProperty.call(message, "op")) if (!$util.isInteger(message.op)) return "op: integer expected"; - if (message.field != null && message.hasOwnProperty("field")) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) if (!$util.isString(message.field)) return "field: string expected"; - if (message.required != null && message.hasOwnProperty("required")) + if (message.required != null && $Object.hasOwnProperty.call(message, "required")) if (typeof message.required !== "boolean") return "required: boolean expected"; - if (message.float_value != null && message.hasOwnProperty("float_value")) + if (message.float_value != null && $Object.hasOwnProperty.call(message, "float_value")) if (typeof message.float_value !== "number") return "float_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) if (!$util.isString(message.string_value)) return "string_value: string expected"; return null; @@ -3505,20 +4567,26 @@ * @param {Object.} object Plain object * @returns {CSOItemCriteriaCondition} CSOItemCriteriaCondition */ - CSOItemCriteriaCondition.fromObject = function fromObject(object) { + CSOItemCriteriaCondition.fromObject = function (object, _depth) { if (object instanceof $root.CSOItemCriteriaCondition) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOItemCriteriaCondition: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOItemCriteriaCondition(); if (object.op != null) message.op = object.op | 0; if (object.field != null) - message.field = String(object.field); + message.field = $String(object.field); if (object.required != null) - message.required = Boolean(object.required); + message.required = $Boolean(object.required); if (object.float_value != null) - message.float_value = Number(object.float_value); + message.float_value = $Number(object.float_value); if (object.string_value != null) - message.string_value = String(object.string_value); + message.string_value = $String(object.string_value); return message; }; @@ -3531,9 +4599,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOItemCriteriaCondition.toObject = function toObject(message, options) { + CSOItemCriteriaCondition.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.op = 0; @@ -3542,15 +4614,15 @@ object.float_value = 0; object.string_value = ""; } - if (message.op != null && message.hasOwnProperty("op")) + if (message.op != null && $Object.hasOwnProperty.call(message, "op")) object.op = message.op; - if (message.field != null && message.hasOwnProperty("field")) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) object.field = message.field; - if (message.required != null && message.hasOwnProperty("required")) + if (message.required != null && $Object.hasOwnProperty.call(message, "required")) object.required = message.required; - if (message.float_value != null && message.hasOwnProperty("float_value")) - object.float_value = options.json && !isFinite(message.float_value) ? String(message.float_value) : message.float_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.float_value != null && $Object.hasOwnProperty.call(message, "float_value")) + object.float_value = options.json && !$isFinite(message.float_value) ? $String(message.float_value) : message.float_value; + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) object.string_value = message.string_value; return object; }; @@ -3562,8 +4634,22 @@ * @instance * @returns {Object.} JSON object */ - CSOItemCriteriaCondition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOItemCriteriaCondition.prototype.toJSON = function() { + return CSOItemCriteriaCondition.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOItemCriteriaCondition + * @function getTypeUrl + * @memberof CSOItemCriteriaCondition + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOItemCriteriaCondition.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOItemCriteriaCondition"; }; return CSOItemCriteriaCondition; @@ -3573,8 +4659,7 @@ /** * Properties of a CSOItemCriteria. - * @exports ICSOItemCriteria - * @interface ICSOItemCriteria + * @typedef {Object} CSOItemCriteria.$Properties * @property {number|null} [item_level] CSOItemCriteria item_level * @property {number|null} [item_quality] CSOItemCriteria item_quality * @property {boolean|null} [item_level_set] CSOItemCriteria item_level_set @@ -3582,27 +4667,41 @@ * @property {number|null} [initial_inventory] CSOItemCriteria initial_inventory * @property {number|null} [initial_quantity] CSOItemCriteria initial_quantity * @property {boolean|null} [ignore_enabled_flag] CSOItemCriteria ignore_enabled_flag - * @property {Array.|null} [conditions] CSOItemCriteria conditions + * @property {Array.|null} [conditions] CSOItemCriteria conditions * @property {boolean|null} [recent_only] CSOItemCriteria recent_only * @property {string|null} [tags] CSOItemCriteria tags * @property {string|null} [equip_regions] CSOItemCriteria equip_regions + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOItemCriteria. + * @exports ICSOItemCriteria + * @interface ICSOItemCriteria + * @augments CSOItemCriteria.$Properties + * @deprecated Use CSOItemCriteria.$Properties instead. + */ + + /** + * Shape of a CSOItemCriteria. + * @typedef {CSOItemCriteria.$Properties} CSOItemCriteria.$Shape */ /** * Constructs a new CSOItemCriteria. * @exports CSOItemCriteria * @classdesc Represents a CSOItemCriteria. - * @implements ICSOItemCriteria * @constructor - * @param {ICSOItemCriteria=} [properties] Properties to set + * @param {CSOItemCriteria.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOItemCriteria(properties) { + var CSOItemCriteria = function (properties) { this.conditions = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOItemCriteria item_level. @@ -3662,7 +4761,7 @@ /** * CSOItemCriteria conditions. - * @member {Array.} conditions + * @member {Array.} conditions * @memberof CSOItemCriteria * @instance */ @@ -3697,10 +4796,14 @@ * @function create * @memberof CSOItemCriteria * @static - * @param {ICSOItemCriteria=} [properties] Properties to set + * @param {CSOItemCriteria.$Properties=} [properties] Properties to set * @returns {CSOItemCriteria} CSOItemCriteria instance + * @type {{ + * (properties: CSOItemCriteria.$Shape): CSOItemCriteria & CSOItemCriteria.$Shape; + * (properties?: CSOItemCriteria.$Properties): CSOItemCriteria; + * }} */ - CSOItemCriteria.create = function create(properties) { + CSOItemCriteria.create = function(properties) { return new CSOItemCriteria(properties); }; @@ -3709,36 +4812,43 @@ * @function encode * @memberof CSOItemCriteria * @static - * @param {ICSOItemCriteria} message CSOItemCriteria message or plain object to encode + * @param {CSOItemCriteria.$Properties} message CSOItemCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemCriteria.encode = function encode(message, writer) { + CSOItemCriteria.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_level != null && Object.hasOwnProperty.call(message, "item_level")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_level != null && $Object.hasOwnProperty.call(message, "item_level")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.item_level); - if (message.item_quality != null && Object.hasOwnProperty.call(message, "item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.item_quality); - if (message.item_level_set != null && Object.hasOwnProperty.call(message, "item_level_set")) + if (message.item_level_set != null && $Object.hasOwnProperty.call(message, "item_level_set")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.item_level_set); - if (message.item_quality_set != null && Object.hasOwnProperty.call(message, "item_quality_set")) + if (message.item_quality_set != null && $Object.hasOwnProperty.call(message, "item_quality_set")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.item_quality_set); - if (message.initial_inventory != null && Object.hasOwnProperty.call(message, "initial_inventory")) + if (message.initial_inventory != null && $Object.hasOwnProperty.call(message, "initial_inventory")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.initial_inventory); - if (message.initial_quantity != null && Object.hasOwnProperty.call(message, "initial_quantity")) + if (message.initial_quantity != null && $Object.hasOwnProperty.call(message, "initial_quantity")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.initial_quantity); - if (message.ignore_enabled_flag != null && Object.hasOwnProperty.call(message, "ignore_enabled_flag")) + if (message.ignore_enabled_flag != null && $Object.hasOwnProperty.call(message, "ignore_enabled_flag")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.ignore_enabled_flag); if (message.conditions != null && message.conditions.length) for (var i = 0; i < message.conditions.length; ++i) - $root.CSOItemCriteriaCondition.encode(message.conditions[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.recent_only != null && Object.hasOwnProperty.call(message, "recent_only")) + $root.CSOItemCriteriaCondition.encode(message.conditions[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.recent_only != null && $Object.hasOwnProperty.call(message, "recent_only")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.recent_only); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.tags); - if (message.equip_regions != null && Object.hasOwnProperty.call(message, "equip_regions")) + if (message.equip_regions != null && $Object.hasOwnProperty.call(message, "equip_regions")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.equip_regions); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3747,12 +4857,12 @@ * @function encodeDelimited * @memberof CSOItemCriteria * @static - * @param {ICSOItemCriteria} message CSOItemCriteria message or plain object to encode + * @param {CSOItemCriteria.$Properties} message CSOItemCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemCriteria.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOItemCriteria.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3762,57 +4872,104 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOItemCriteria} CSOItemCriteria + * @returns {CSOItemCriteria & CSOItemCriteria.$Shape} CSOItemCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemCriteria.decode = function decode(reader, length) { + CSOItemCriteria.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOItemCriteria(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOItemCriteria(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_level = reader.uint32(); - break; - case 2: - message.item_quality = reader.int32(); - break; - case 3: - message.item_level_set = reader.bool(); - break; - case 4: - message.item_quality_set = reader.bool(); - break; - case 5: - message.initial_inventory = reader.uint32(); - break; - case 6: - message.initial_quantity = reader.uint32(); - break; - case 8: - message.ignore_enabled_flag = reader.bool(); - break; - case 9: - if (!(message.conditions && message.conditions.length)) - message.conditions = []; - message.conditions.push($root.CSOItemCriteriaCondition.decode(reader, reader.uint32())); - break; - case 10: - message.recent_only = reader.bool(); - break; - case 11: - message.tags = reader.string(); - break; - case 12: - message.equip_regions = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_level = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_quality = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_level_set = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.item_quality_set = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.initial_inventory = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.initial_quantity = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.ignore_enabled_flag = reader.bool(); + continue; + } + case 9: { + if (wireType !== 2) + break; + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push($root.CSOItemCriteriaCondition.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.recent_only = reader.bool(); + continue; + } + case 11: { + if (wireType !== 2) + break; + message.tags = reader.string(); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.equip_regions = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3822,11 +4979,11 @@ * @memberof CSOItemCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOItemCriteria} CSOItemCriteria + * @returns {CSOItemCriteria & CSOItemCriteria.$Shape} CSOItemCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemCriteria.decodeDelimited = function decodeDelimited(reader) { + CSOItemCriteria.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3840,46 +4997,50 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOItemCriteria.verify = function verify(message) { + CSOItemCriteria.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_level != null && message.hasOwnProperty("item_level")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_level != null && $Object.hasOwnProperty.call(message, "item_level")) if (!$util.isInteger(message.item_level)) return "item_level: integer expected"; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) if (!$util.isInteger(message.item_quality)) return "item_quality: integer expected"; - if (message.item_level_set != null && message.hasOwnProperty("item_level_set")) + if (message.item_level_set != null && $Object.hasOwnProperty.call(message, "item_level_set")) if (typeof message.item_level_set !== "boolean") return "item_level_set: boolean expected"; - if (message.item_quality_set != null && message.hasOwnProperty("item_quality_set")) + if (message.item_quality_set != null && $Object.hasOwnProperty.call(message, "item_quality_set")) if (typeof message.item_quality_set !== "boolean") return "item_quality_set: boolean expected"; - if (message.initial_inventory != null && message.hasOwnProperty("initial_inventory")) + if (message.initial_inventory != null && $Object.hasOwnProperty.call(message, "initial_inventory")) if (!$util.isInteger(message.initial_inventory)) return "initial_inventory: integer expected"; - if (message.initial_quantity != null && message.hasOwnProperty("initial_quantity")) + if (message.initial_quantity != null && $Object.hasOwnProperty.call(message, "initial_quantity")) if (!$util.isInteger(message.initial_quantity)) return "initial_quantity: integer expected"; - if (message.ignore_enabled_flag != null && message.hasOwnProperty("ignore_enabled_flag")) + if (message.ignore_enabled_flag != null && $Object.hasOwnProperty.call(message, "ignore_enabled_flag")) if (typeof message.ignore_enabled_flag !== "boolean") return "ignore_enabled_flag: boolean expected"; - if (message.conditions != null && message.hasOwnProperty("conditions")) { - if (!Array.isArray(message.conditions)) + if (message.conditions != null && $Object.hasOwnProperty.call(message, "conditions")) { + if (!$Array.isArray(message.conditions)) return "conditions: array expected"; for (var i = 0; i < message.conditions.length; ++i) { - var error = $root.CSOItemCriteriaCondition.verify(message.conditions[i]); + var error = $root.CSOItemCriteriaCondition.verify(message.conditions[i], _depth + 1); if (error) return "conditions." + error; } } - if (message.recent_only != null && message.hasOwnProperty("recent_only")) + if (message.recent_only != null && $Object.hasOwnProperty.call(message, "recent_only")) if (typeof message.recent_only !== "boolean") return "recent_only: boolean expected"; - if (message.tags != null && message.hasOwnProperty("tags")) + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) if (!$util.isString(message.tags)) return "tags: string expected"; - if (message.equip_regions != null && message.hasOwnProperty("equip_regions")) + if (message.equip_regions != null && $Object.hasOwnProperty.call(message, "equip_regions")) if (!$util.isString(message.equip_regions)) return "equip_regions: string expected"; return null; @@ -3893,40 +5054,46 @@ * @param {Object.} object Plain object * @returns {CSOItemCriteria} CSOItemCriteria */ - CSOItemCriteria.fromObject = function fromObject(object) { + CSOItemCriteria.fromObject = function (object, _depth) { if (object instanceof $root.CSOItemCriteria) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOItemCriteria: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOItemCriteria(); if (object.item_level != null) message.item_level = object.item_level >>> 0; if (object.item_quality != null) message.item_quality = object.item_quality | 0; if (object.item_level_set != null) - message.item_level_set = Boolean(object.item_level_set); + message.item_level_set = $Boolean(object.item_level_set); if (object.item_quality_set != null) - message.item_quality_set = Boolean(object.item_quality_set); + message.item_quality_set = $Boolean(object.item_quality_set); if (object.initial_inventory != null) message.initial_inventory = object.initial_inventory >>> 0; if (object.initial_quantity != null) message.initial_quantity = object.initial_quantity >>> 0; if (object.ignore_enabled_flag != null) - message.ignore_enabled_flag = Boolean(object.ignore_enabled_flag); + message.ignore_enabled_flag = $Boolean(object.ignore_enabled_flag); if (object.conditions) { - if (!Array.isArray(object.conditions)) - throw TypeError(".CSOItemCriteria.conditions: array expected"); - message.conditions = []; + if (!$Array.isArray(object.conditions)) + throw $TypeError(".CSOItemCriteria.conditions: array expected"); + message.conditions = $Array(object.conditions.length); for (var i = 0; i < object.conditions.length; ++i) { - if (typeof object.conditions[i] !== "object") - throw TypeError(".CSOItemCriteria.conditions: object expected"); - message.conditions[i] = $root.CSOItemCriteriaCondition.fromObject(object.conditions[i]); + if (!$util.isObject(object.conditions[i])) + throw $TypeError(".CSOItemCriteria.conditions: object expected"); + message.conditions[i] = $root.CSOItemCriteriaCondition.fromObject(object.conditions[i], _depth + 1); } } if (object.recent_only != null) - message.recent_only = Boolean(object.recent_only); + message.recent_only = $Boolean(object.recent_only); if (object.tags != null) - message.tags = String(object.tags); + message.tags = $String(object.tags); if (object.equip_regions != null) - message.equip_regions = String(object.equip_regions); + message.equip_regions = $String(object.equip_regions); return message; }; @@ -3939,9 +5106,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOItemCriteria.toObject = function toObject(message, options) { + CSOItemCriteria.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.conditions = []; @@ -3957,30 +5128,30 @@ object.tags = ""; object.equip_regions = ""; } - if (message.item_level != null && message.hasOwnProperty("item_level")) + if (message.item_level != null && $Object.hasOwnProperty.call(message, "item_level")) object.item_level = message.item_level; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) object.item_quality = message.item_quality; - if (message.item_level_set != null && message.hasOwnProperty("item_level_set")) + if (message.item_level_set != null && $Object.hasOwnProperty.call(message, "item_level_set")) object.item_level_set = message.item_level_set; - if (message.item_quality_set != null && message.hasOwnProperty("item_quality_set")) + if (message.item_quality_set != null && $Object.hasOwnProperty.call(message, "item_quality_set")) object.item_quality_set = message.item_quality_set; - if (message.initial_inventory != null && message.hasOwnProperty("initial_inventory")) + if (message.initial_inventory != null && $Object.hasOwnProperty.call(message, "initial_inventory")) object.initial_inventory = message.initial_inventory; - if (message.initial_quantity != null && message.hasOwnProperty("initial_quantity")) + if (message.initial_quantity != null && $Object.hasOwnProperty.call(message, "initial_quantity")) object.initial_quantity = message.initial_quantity; - if (message.ignore_enabled_flag != null && message.hasOwnProperty("ignore_enabled_flag")) + if (message.ignore_enabled_flag != null && $Object.hasOwnProperty.call(message, "ignore_enabled_flag")) object.ignore_enabled_flag = message.ignore_enabled_flag; if (message.conditions && message.conditions.length) { - object.conditions = []; + object.conditions = $Array(message.conditions.length); for (var j = 0; j < message.conditions.length; ++j) - object.conditions[j] = $root.CSOItemCriteriaCondition.toObject(message.conditions[j], options); + object.conditions[j] = $root.CSOItemCriteriaCondition.toObject(message.conditions[j], options, _depth + 1); } - if (message.recent_only != null && message.hasOwnProperty("recent_only")) + if (message.recent_only != null && $Object.hasOwnProperty.call(message, "recent_only")) object.recent_only = message.recent_only; - if (message.tags != null && message.hasOwnProperty("tags")) + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) object.tags = message.tags; - if (message.equip_regions != null && message.hasOwnProperty("equip_regions")) + if (message.equip_regions != null && $Object.hasOwnProperty.call(message, "equip_regions")) object.equip_regions = message.equip_regions; return object; }; @@ -3992,8 +5163,22 @@ * @instance * @returns {Object.} JSON object */ - CSOItemCriteria.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOItemCriteria.prototype.toJSON = function() { + return CSOItemCriteria.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOItemCriteria + * @function getTypeUrl + * @memberof CSOItemCriteria + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOItemCriteria.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOItemCriteria"; }; return CSOItemCriteria; @@ -4003,8 +5188,7 @@ /** * Properties of a CSOItemRecipe. - * @exports ICSOItemRecipe - * @interface ICSOItemRecipe + * @typedef {Object} CSOItemRecipe.$Properties * @property {number|null} [def_index] CSOItemRecipe def_index * @property {string|null} [name] CSOItemRecipe name * @property {string|null} [n_a] CSOItemRecipe n_a @@ -4021,28 +5205,42 @@ * @property {number|null} [class_usage_for_output] CSOItemRecipe class_usage_for_output * @property {number|null} [slot_usage_for_output] CSOItemRecipe slot_usage_for_output * @property {number|null} [set_for_output] CSOItemRecipe set_for_output - * @property {Array.|null} [input_items_criteria] CSOItemRecipe input_items_criteria - * @property {Array.|null} [output_items_criteria] CSOItemRecipe output_items_criteria + * @property {Array.|null} [input_items_criteria] CSOItemRecipe input_items_criteria + * @property {Array.|null} [output_items_criteria] CSOItemRecipe output_items_criteria * @property {Array.|null} [input_item_dupe_counts] CSOItemRecipe input_item_dupe_counts + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOItemRecipe. + * @exports ICSOItemRecipe + * @interface ICSOItemRecipe + * @augments CSOItemRecipe.$Properties + * @deprecated Use CSOItemRecipe.$Properties instead. + */ + + /** + * Shape of a CSOItemRecipe. + * @typedef {CSOItemRecipe.$Properties} CSOItemRecipe.$Shape */ /** * Constructs a new CSOItemRecipe. * @exports CSOItemRecipe * @classdesc Represents a CSOItemRecipe. - * @implements ICSOItemRecipe * @constructor - * @param {ICSOItemRecipe=} [properties] Properties to set + * @param {CSOItemRecipe.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOItemRecipe(properties) { + var CSOItemRecipe = function (properties) { this.input_items_criteria = []; this.output_items_criteria = []; this.input_item_dupe_counts = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOItemRecipe def_index. @@ -4174,7 +5372,7 @@ /** * CSOItemRecipe input_items_criteria. - * @member {Array.} input_items_criteria + * @member {Array.} input_items_criteria * @memberof CSOItemRecipe * @instance */ @@ -4182,7 +5380,7 @@ /** * CSOItemRecipe output_items_criteria. - * @member {Array.} output_items_criteria + * @member {Array.} output_items_criteria * @memberof CSOItemRecipe * @instance */ @@ -4201,10 +5399,14 @@ * @function create * @memberof CSOItemRecipe * @static - * @param {ICSOItemRecipe=} [properties] Properties to set + * @param {CSOItemRecipe.$Properties=} [properties] Properties to set * @returns {CSOItemRecipe} CSOItemRecipe instance + * @type {{ + * (properties: CSOItemRecipe.$Shape): CSOItemRecipe & CSOItemRecipe.$Shape; + * (properties?: CSOItemRecipe.$Properties): CSOItemRecipe; + * }} */ - CSOItemRecipe.create = function create(properties) { + CSOItemRecipe.create = function(properties) { return new CSOItemRecipe(properties); }; @@ -4213,54 +5415,61 @@ * @function encode * @memberof CSOItemRecipe * @static - * @param {ICSOItemRecipe} message CSOItemRecipe message or plain object to encode + * @param {CSOItemRecipe.$Properties} message CSOItemRecipe message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemRecipe.encode = function encode(message, writer) { + CSOItemRecipe.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.def_index); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.n_a != null && Object.hasOwnProperty.call(message, "n_a")) + if (message.n_a != null && $Object.hasOwnProperty.call(message, "n_a")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.n_a); - if (message.desc_inputs != null && Object.hasOwnProperty.call(message, "desc_inputs")) + if (message.desc_inputs != null && $Object.hasOwnProperty.call(message, "desc_inputs")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.desc_inputs); - if (message.desc_outputs != null && Object.hasOwnProperty.call(message, "desc_outputs")) + if (message.desc_outputs != null && $Object.hasOwnProperty.call(message, "desc_outputs")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.desc_outputs); - if (message.di_a != null && Object.hasOwnProperty.call(message, "di_a")) + if (message.di_a != null && $Object.hasOwnProperty.call(message, "di_a")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.di_a); - if (message.di_b != null && Object.hasOwnProperty.call(message, "di_b")) + if (message.di_b != null && $Object.hasOwnProperty.call(message, "di_b")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.di_b); - if (message.di_c != null && Object.hasOwnProperty.call(message, "di_c")) + if (message.di_c != null && $Object.hasOwnProperty.call(message, "di_c")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.di_c); - if (message.do_a != null && Object.hasOwnProperty.call(message, "do_a")) + if (message.do_a != null && $Object.hasOwnProperty.call(message, "do_a")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.do_a); - if (message.do_b != null && Object.hasOwnProperty.call(message, "do_b")) + if (message.do_b != null && $Object.hasOwnProperty.call(message, "do_b")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.do_b); - if (message.do_c != null && Object.hasOwnProperty.call(message, "do_c")) + if (message.do_c != null && $Object.hasOwnProperty.call(message, "do_c")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.do_c); - if (message.requires_all_same_class != null && Object.hasOwnProperty.call(message, "requires_all_same_class")) + if (message.requires_all_same_class != null && $Object.hasOwnProperty.call(message, "requires_all_same_class")) writer.uint32(/* id 12, wireType 0 =*/96).bool(message.requires_all_same_class); - if (message.requires_all_same_slot != null && Object.hasOwnProperty.call(message, "requires_all_same_slot")) + if (message.requires_all_same_slot != null && $Object.hasOwnProperty.call(message, "requires_all_same_slot")) writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requires_all_same_slot); - if (message.class_usage_for_output != null && Object.hasOwnProperty.call(message, "class_usage_for_output")) + if (message.class_usage_for_output != null && $Object.hasOwnProperty.call(message, "class_usage_for_output")) writer.uint32(/* id 14, wireType 0 =*/112).int32(message.class_usage_for_output); - if (message.slot_usage_for_output != null && Object.hasOwnProperty.call(message, "slot_usage_for_output")) + if (message.slot_usage_for_output != null && $Object.hasOwnProperty.call(message, "slot_usage_for_output")) writer.uint32(/* id 15, wireType 0 =*/120).int32(message.slot_usage_for_output); - if (message.set_for_output != null && Object.hasOwnProperty.call(message, "set_for_output")) + if (message.set_for_output != null && $Object.hasOwnProperty.call(message, "set_for_output")) writer.uint32(/* id 16, wireType 0 =*/128).int32(message.set_for_output); if (message.input_items_criteria != null && message.input_items_criteria.length) for (var i = 0; i < message.input_items_criteria.length; ++i) - $root.CSOItemCriteria.encode(message.input_items_criteria[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + $root.CSOItemCriteria.encode(message.input_items_criteria[i], writer.uint32(/* id 20, wireType 2 =*/162).fork(), _depth + 1).ldelim(); if (message.output_items_criteria != null && message.output_items_criteria.length) for (var i = 0; i < message.output_items_criteria.length; ++i) - $root.CSOItemCriteria.encode(message.output_items_criteria[i], writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + $root.CSOItemCriteria.encode(message.output_items_criteria[i], writer.uint32(/* id 21, wireType 2 =*/170).fork(), _depth + 1).ldelim(); if (message.input_item_dupe_counts != null && message.input_item_dupe_counts.length) for (var i = 0; i < message.input_item_dupe_counts.length; ++i) writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.input_item_dupe_counts[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4269,12 +5478,12 @@ * @function encodeDelimited * @memberof CSOItemRecipe * @static - * @param {ICSOItemRecipe} message CSOItemRecipe message or plain object to encode + * @param {CSOItemRecipe.$Properties} message CSOItemRecipe message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemRecipe.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOItemRecipe.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4284,90 +5493,162 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOItemRecipe} CSOItemRecipe + * @returns {CSOItemRecipe & CSOItemRecipe.$Shape} CSOItemRecipe * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemRecipe.decode = function decode(reader, length) { + CSOItemRecipe.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOItemRecipe(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOItemRecipe(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.def_index = reader.uint32(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.n_a = reader.string(); - break; - case 4: - message.desc_inputs = reader.string(); - break; - case 5: - message.desc_outputs = reader.string(); - break; - case 6: - message.di_a = reader.string(); - break; - case 7: - message.di_b = reader.string(); - break; - case 8: - message.di_c = reader.string(); - break; - case 9: - message.do_a = reader.string(); - break; - case 10: - message.do_b = reader.string(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 11: - message.do_c = reader.string(); - break; - case 12: - message.requires_all_same_class = reader.bool(); - break; - case 13: - message.requires_all_same_slot = reader.bool(); - break; - case 14: - message.class_usage_for_output = reader.int32(); - break; - case 15: - message.slot_usage_for_output = reader.int32(); - break; - case 16: - message.set_for_output = reader.int32(); - break; - case 20: - if (!(message.input_items_criteria && message.input_items_criteria.length)) - message.input_items_criteria = []; - message.input_items_criteria.push($root.CSOItemCriteria.decode(reader, reader.uint32())); - break; - case 21: - if (!(message.output_items_criteria && message.output_items_criteria.length)) - message.output_items_criteria = []; - message.output_items_criteria.push($root.CSOItemCriteria.decode(reader, reader.uint32())); - break; - case 22: - if (!(message.input_item_dupe_counts && message.input_item_dupe_counts.length)) - message.input_item_dupe_counts = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.input_item_dupe_counts.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.def_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.n_a = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.desc_inputs = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.desc_outputs = reader.string(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.di_a = reader.string(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.di_b = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.di_c = reader.string(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.do_a = reader.string(); + continue; + } + case 10: { + if (wireType !== 2) + break; + message.do_b = reader.string(); + continue; + } + case 11: { + if (wireType !== 2) + break; + message.do_c = reader.string(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.requires_all_same_class = reader.bool(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.requires_all_same_slot = reader.bool(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.class_usage_for_output = reader.int32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.slot_usage_for_output = reader.int32(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.set_for_output = reader.int32(); + continue; + } + case 20: { + if (wireType !== 2) + break; + if (!(message.input_items_criteria && message.input_items_criteria.length)) + message.input_items_criteria = []; + message.input_items_criteria.push($root.CSOItemCriteria.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 21: { + if (wireType !== 2) + break; + if (!(message.output_items_criteria && message.output_items_criteria.length)) + message.output_items_criteria = []; + message.output_items_criteria.push($root.CSOItemCriteria.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 22: { + if (wireType === 2) { + if (!(message.input_item_dupe_counts && message.input_item_dupe_counts.length)) + message.input_item_dupe_counts = []; + reader.uint32s(message.input_item_dupe_counts); + continue; + } + if (wireType !== 0) + break; + if (!(message.input_item_dupe_counts && message.input_item_dupe_counts.length)) + message.input_item_dupe_counts = []; message.input_item_dupe_counts.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4377,11 +5658,11 @@ * @memberof CSOItemRecipe * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOItemRecipe} CSOItemRecipe + * @returns {CSOItemRecipe & CSOItemRecipe.$Shape} CSOItemRecipe * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemRecipe.decodeDelimited = function decodeDelimited(reader) { + CSOItemRecipe.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4395,77 +5676,81 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOItemRecipe.verify = function verify(message) { + CSOItemRecipe.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) if (!$util.isInteger(message.def_index)) return "def_index: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.n_a != null && message.hasOwnProperty("n_a")) + if (message.n_a != null && $Object.hasOwnProperty.call(message, "n_a")) if (!$util.isString(message.n_a)) return "n_a: string expected"; - if (message.desc_inputs != null && message.hasOwnProperty("desc_inputs")) + if (message.desc_inputs != null && $Object.hasOwnProperty.call(message, "desc_inputs")) if (!$util.isString(message.desc_inputs)) return "desc_inputs: string expected"; - if (message.desc_outputs != null && message.hasOwnProperty("desc_outputs")) + if (message.desc_outputs != null && $Object.hasOwnProperty.call(message, "desc_outputs")) if (!$util.isString(message.desc_outputs)) return "desc_outputs: string expected"; - if (message.di_a != null && message.hasOwnProperty("di_a")) + if (message.di_a != null && $Object.hasOwnProperty.call(message, "di_a")) if (!$util.isString(message.di_a)) return "di_a: string expected"; - if (message.di_b != null && message.hasOwnProperty("di_b")) + if (message.di_b != null && $Object.hasOwnProperty.call(message, "di_b")) if (!$util.isString(message.di_b)) return "di_b: string expected"; - if (message.di_c != null && message.hasOwnProperty("di_c")) + if (message.di_c != null && $Object.hasOwnProperty.call(message, "di_c")) if (!$util.isString(message.di_c)) return "di_c: string expected"; - if (message.do_a != null && message.hasOwnProperty("do_a")) + if (message.do_a != null && $Object.hasOwnProperty.call(message, "do_a")) if (!$util.isString(message.do_a)) return "do_a: string expected"; - if (message.do_b != null && message.hasOwnProperty("do_b")) + if (message.do_b != null && $Object.hasOwnProperty.call(message, "do_b")) if (!$util.isString(message.do_b)) return "do_b: string expected"; - if (message.do_c != null && message.hasOwnProperty("do_c")) + if (message.do_c != null && $Object.hasOwnProperty.call(message, "do_c")) if (!$util.isString(message.do_c)) return "do_c: string expected"; - if (message.requires_all_same_class != null && message.hasOwnProperty("requires_all_same_class")) + if (message.requires_all_same_class != null && $Object.hasOwnProperty.call(message, "requires_all_same_class")) if (typeof message.requires_all_same_class !== "boolean") return "requires_all_same_class: boolean expected"; - if (message.requires_all_same_slot != null && message.hasOwnProperty("requires_all_same_slot")) + if (message.requires_all_same_slot != null && $Object.hasOwnProperty.call(message, "requires_all_same_slot")) if (typeof message.requires_all_same_slot !== "boolean") return "requires_all_same_slot: boolean expected"; - if (message.class_usage_for_output != null && message.hasOwnProperty("class_usage_for_output")) + if (message.class_usage_for_output != null && $Object.hasOwnProperty.call(message, "class_usage_for_output")) if (!$util.isInteger(message.class_usage_for_output)) return "class_usage_for_output: integer expected"; - if (message.slot_usage_for_output != null && message.hasOwnProperty("slot_usage_for_output")) + if (message.slot_usage_for_output != null && $Object.hasOwnProperty.call(message, "slot_usage_for_output")) if (!$util.isInteger(message.slot_usage_for_output)) return "slot_usage_for_output: integer expected"; - if (message.set_for_output != null && message.hasOwnProperty("set_for_output")) + if (message.set_for_output != null && $Object.hasOwnProperty.call(message, "set_for_output")) if (!$util.isInteger(message.set_for_output)) return "set_for_output: integer expected"; - if (message.input_items_criteria != null && message.hasOwnProperty("input_items_criteria")) { - if (!Array.isArray(message.input_items_criteria)) + if (message.input_items_criteria != null && $Object.hasOwnProperty.call(message, "input_items_criteria")) { + if (!$Array.isArray(message.input_items_criteria)) return "input_items_criteria: array expected"; for (var i = 0; i < message.input_items_criteria.length; ++i) { - var error = $root.CSOItemCriteria.verify(message.input_items_criteria[i]); + var error = $root.CSOItemCriteria.verify(message.input_items_criteria[i], _depth + 1); if (error) return "input_items_criteria." + error; } } - if (message.output_items_criteria != null && message.hasOwnProperty("output_items_criteria")) { - if (!Array.isArray(message.output_items_criteria)) + if (message.output_items_criteria != null && $Object.hasOwnProperty.call(message, "output_items_criteria")) { + if (!$Array.isArray(message.output_items_criteria)) return "output_items_criteria: array expected"; for (var i = 0; i < message.output_items_criteria.length; ++i) { - var error = $root.CSOItemCriteria.verify(message.output_items_criteria[i]); + var error = $root.CSOItemCriteria.verify(message.output_items_criteria[i], _depth + 1); if (error) return "output_items_criteria." + error; } } - if (message.input_item_dupe_counts != null && message.hasOwnProperty("input_item_dupe_counts")) { - if (!Array.isArray(message.input_item_dupe_counts)) + if (message.input_item_dupe_counts != null && $Object.hasOwnProperty.call(message, "input_item_dupe_counts")) { + if (!$Array.isArray(message.input_item_dupe_counts)) return "input_item_dupe_counts: array expected"; for (var i = 0; i < message.input_item_dupe_counts.length; ++i) if (!$util.isInteger(message.input_item_dupe_counts[i])) @@ -4482,36 +5767,42 @@ * @param {Object.} object Plain object * @returns {CSOItemRecipe} CSOItemRecipe */ - CSOItemRecipe.fromObject = function fromObject(object) { + CSOItemRecipe.fromObject = function (object, _depth) { if (object instanceof $root.CSOItemRecipe) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOItemRecipe: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOItemRecipe(); if (object.def_index != null) message.def_index = object.def_index >>> 0; if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.n_a != null) - message.n_a = String(object.n_a); + message.n_a = $String(object.n_a); if (object.desc_inputs != null) - message.desc_inputs = String(object.desc_inputs); + message.desc_inputs = $String(object.desc_inputs); if (object.desc_outputs != null) - message.desc_outputs = String(object.desc_outputs); + message.desc_outputs = $String(object.desc_outputs); if (object.di_a != null) - message.di_a = String(object.di_a); + message.di_a = $String(object.di_a); if (object.di_b != null) - message.di_b = String(object.di_b); + message.di_b = $String(object.di_b); if (object.di_c != null) - message.di_c = String(object.di_c); + message.di_c = $String(object.di_c); if (object.do_a != null) - message.do_a = String(object.do_a); + message.do_a = $String(object.do_a); if (object.do_b != null) - message.do_b = String(object.do_b); + message.do_b = $String(object.do_b); if (object.do_c != null) - message.do_c = String(object.do_c); + message.do_c = $String(object.do_c); if (object.requires_all_same_class != null) - message.requires_all_same_class = Boolean(object.requires_all_same_class); + message.requires_all_same_class = $Boolean(object.requires_all_same_class); if (object.requires_all_same_slot != null) - message.requires_all_same_slot = Boolean(object.requires_all_same_slot); + message.requires_all_same_slot = $Boolean(object.requires_all_same_slot); if (object.class_usage_for_output != null) message.class_usage_for_output = object.class_usage_for_output | 0; if (object.slot_usage_for_output != null) @@ -4519,29 +5810,29 @@ if (object.set_for_output != null) message.set_for_output = object.set_for_output | 0; if (object.input_items_criteria) { - if (!Array.isArray(object.input_items_criteria)) - throw TypeError(".CSOItemRecipe.input_items_criteria: array expected"); - message.input_items_criteria = []; + if (!$Array.isArray(object.input_items_criteria)) + throw $TypeError(".CSOItemRecipe.input_items_criteria: array expected"); + message.input_items_criteria = $Array(object.input_items_criteria.length); for (var i = 0; i < object.input_items_criteria.length; ++i) { - if (typeof object.input_items_criteria[i] !== "object") - throw TypeError(".CSOItemRecipe.input_items_criteria: object expected"); - message.input_items_criteria[i] = $root.CSOItemCriteria.fromObject(object.input_items_criteria[i]); + if (!$util.isObject(object.input_items_criteria[i])) + throw $TypeError(".CSOItemRecipe.input_items_criteria: object expected"); + message.input_items_criteria[i] = $root.CSOItemCriteria.fromObject(object.input_items_criteria[i], _depth + 1); } } if (object.output_items_criteria) { - if (!Array.isArray(object.output_items_criteria)) - throw TypeError(".CSOItemRecipe.output_items_criteria: array expected"); - message.output_items_criteria = []; + if (!$Array.isArray(object.output_items_criteria)) + throw $TypeError(".CSOItemRecipe.output_items_criteria: array expected"); + message.output_items_criteria = $Array(object.output_items_criteria.length); for (var i = 0; i < object.output_items_criteria.length; ++i) { - if (typeof object.output_items_criteria[i] !== "object") - throw TypeError(".CSOItemRecipe.output_items_criteria: object expected"); - message.output_items_criteria[i] = $root.CSOItemCriteria.fromObject(object.output_items_criteria[i]); + if (!$util.isObject(object.output_items_criteria[i])) + throw $TypeError(".CSOItemRecipe.output_items_criteria: object expected"); + message.output_items_criteria[i] = $root.CSOItemCriteria.fromObject(object.output_items_criteria[i], _depth + 1); } } if (object.input_item_dupe_counts) { - if (!Array.isArray(object.input_item_dupe_counts)) - throw TypeError(".CSOItemRecipe.input_item_dupe_counts: array expected"); - message.input_item_dupe_counts = []; + if (!$Array.isArray(object.input_item_dupe_counts)) + throw $TypeError(".CSOItemRecipe.input_item_dupe_counts: array expected"); + message.input_item_dupe_counts = $Array(object.input_item_dupe_counts.length); for (var i = 0; i < object.input_item_dupe_counts.length; ++i) message.input_item_dupe_counts[i] = object.input_item_dupe_counts[i] >>> 0; } @@ -4557,9 +5848,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOItemRecipe.toObject = function toObject(message, options) { + CSOItemRecipe.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.input_items_criteria = []; @@ -4584,50 +5879,50 @@ object.slot_usage_for_output = 0; object.set_for_output = 0; } - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) object.def_index = message.def_index; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.n_a != null && message.hasOwnProperty("n_a")) + if (message.n_a != null && $Object.hasOwnProperty.call(message, "n_a")) object.n_a = message.n_a; - if (message.desc_inputs != null && message.hasOwnProperty("desc_inputs")) + if (message.desc_inputs != null && $Object.hasOwnProperty.call(message, "desc_inputs")) object.desc_inputs = message.desc_inputs; - if (message.desc_outputs != null && message.hasOwnProperty("desc_outputs")) + if (message.desc_outputs != null && $Object.hasOwnProperty.call(message, "desc_outputs")) object.desc_outputs = message.desc_outputs; - if (message.di_a != null && message.hasOwnProperty("di_a")) + if (message.di_a != null && $Object.hasOwnProperty.call(message, "di_a")) object.di_a = message.di_a; - if (message.di_b != null && message.hasOwnProperty("di_b")) + if (message.di_b != null && $Object.hasOwnProperty.call(message, "di_b")) object.di_b = message.di_b; - if (message.di_c != null && message.hasOwnProperty("di_c")) + if (message.di_c != null && $Object.hasOwnProperty.call(message, "di_c")) object.di_c = message.di_c; - if (message.do_a != null && message.hasOwnProperty("do_a")) + if (message.do_a != null && $Object.hasOwnProperty.call(message, "do_a")) object.do_a = message.do_a; - if (message.do_b != null && message.hasOwnProperty("do_b")) + if (message.do_b != null && $Object.hasOwnProperty.call(message, "do_b")) object.do_b = message.do_b; - if (message.do_c != null && message.hasOwnProperty("do_c")) + if (message.do_c != null && $Object.hasOwnProperty.call(message, "do_c")) object.do_c = message.do_c; - if (message.requires_all_same_class != null && message.hasOwnProperty("requires_all_same_class")) + if (message.requires_all_same_class != null && $Object.hasOwnProperty.call(message, "requires_all_same_class")) object.requires_all_same_class = message.requires_all_same_class; - if (message.requires_all_same_slot != null && message.hasOwnProperty("requires_all_same_slot")) + if (message.requires_all_same_slot != null && $Object.hasOwnProperty.call(message, "requires_all_same_slot")) object.requires_all_same_slot = message.requires_all_same_slot; - if (message.class_usage_for_output != null && message.hasOwnProperty("class_usage_for_output")) + if (message.class_usage_for_output != null && $Object.hasOwnProperty.call(message, "class_usage_for_output")) object.class_usage_for_output = message.class_usage_for_output; - if (message.slot_usage_for_output != null && message.hasOwnProperty("slot_usage_for_output")) + if (message.slot_usage_for_output != null && $Object.hasOwnProperty.call(message, "slot_usage_for_output")) object.slot_usage_for_output = message.slot_usage_for_output; - if (message.set_for_output != null && message.hasOwnProperty("set_for_output")) + if (message.set_for_output != null && $Object.hasOwnProperty.call(message, "set_for_output")) object.set_for_output = message.set_for_output; if (message.input_items_criteria && message.input_items_criteria.length) { - object.input_items_criteria = []; + object.input_items_criteria = $Array(message.input_items_criteria.length); for (var j = 0; j < message.input_items_criteria.length; ++j) - object.input_items_criteria[j] = $root.CSOItemCriteria.toObject(message.input_items_criteria[j], options); + object.input_items_criteria[j] = $root.CSOItemCriteria.toObject(message.input_items_criteria[j], options, _depth + 1); } if (message.output_items_criteria && message.output_items_criteria.length) { - object.output_items_criteria = []; + object.output_items_criteria = $Array(message.output_items_criteria.length); for (var j = 0; j < message.output_items_criteria.length; ++j) - object.output_items_criteria[j] = $root.CSOItemCriteria.toObject(message.output_items_criteria[j], options); + object.output_items_criteria[j] = $root.CSOItemCriteria.toObject(message.output_items_criteria[j], options, _depth + 1); } if (message.input_item_dupe_counts && message.input_item_dupe_counts.length) { - object.input_item_dupe_counts = []; + object.input_item_dupe_counts = $Array(message.input_item_dupe_counts.length); for (var j = 0; j < message.input_item_dupe_counts.length; ++j) object.input_item_dupe_counts[j] = message.input_item_dupe_counts[j]; } @@ -4641,8 +5936,22 @@ * @instance * @returns {Object.} JSON object */ - CSOItemRecipe.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOItemRecipe.prototype.toJSON = function() { + return CSOItemRecipe.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOItemRecipe + * @function getTypeUrl + * @memberof CSOItemRecipe + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOItemRecipe.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOItemRecipe"; }; return CSOItemRecipe; @@ -4650,28 +5959,41 @@ $root.CMsgDevNewItemRequest = (function() { + /** + * Properties of a CMsgDevNewItemRequest. + * @typedef {Object} CMsgDevNewItemRequest.$Properties + * @property {number|Long|null} [receiver] CMsgDevNewItemRequest receiver + * @property {CSOItemCriteria.$Properties|null} [criteria] CMsgDevNewItemRequest criteria + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgDevNewItemRequest. * @exports ICMsgDevNewItemRequest * @interface ICMsgDevNewItemRequest - * @property {number|Long|null} [receiver] CMsgDevNewItemRequest receiver - * @property {ICSOItemCriteria|null} [criteria] CMsgDevNewItemRequest criteria + * @augments CMsgDevNewItemRequest.$Properties + * @deprecated Use CMsgDevNewItemRequest.$Properties instead. + */ + + /** + * Shape of a CMsgDevNewItemRequest. + * @typedef {CMsgDevNewItemRequest.$Properties} CMsgDevNewItemRequest.$Shape */ /** * Constructs a new CMsgDevNewItemRequest. * @exports CMsgDevNewItemRequest * @classdesc Represents a CMsgDevNewItemRequest. - * @implements ICMsgDevNewItemRequest * @constructor - * @param {ICMsgDevNewItemRequest=} [properties] Properties to set + * @param {CMsgDevNewItemRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgDevNewItemRequest(properties) { + var CMsgDevNewItemRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgDevNewItemRequest receiver. @@ -4679,11 +6001,11 @@ * @memberof CMsgDevNewItemRequest * @instance */ - CMsgDevNewItemRequest.prototype.receiver = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgDevNewItemRequest.prototype.receiver = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgDevNewItemRequest criteria. - * @member {ICSOItemCriteria|null|undefined} criteria + * @member {CSOItemCriteria.$Properties|null|undefined} criteria * @memberof CMsgDevNewItemRequest * @instance */ @@ -4694,10 +6016,14 @@ * @function create * @memberof CMsgDevNewItemRequest * @static - * @param {ICMsgDevNewItemRequest=} [properties] Properties to set + * @param {CMsgDevNewItemRequest.$Properties=} [properties] Properties to set * @returns {CMsgDevNewItemRequest} CMsgDevNewItemRequest instance + * @type {{ + * (properties: CMsgDevNewItemRequest.$Shape): CMsgDevNewItemRequest & CMsgDevNewItemRequest.$Shape; + * (properties?: CMsgDevNewItemRequest.$Properties): CMsgDevNewItemRequest; + * }} */ - CMsgDevNewItemRequest.create = function create(properties) { + CMsgDevNewItemRequest.create = function(properties) { return new CMsgDevNewItemRequest(properties); }; @@ -4706,17 +6032,24 @@ * @function encode * @memberof CMsgDevNewItemRequest * @static - * @param {ICMsgDevNewItemRequest} message CMsgDevNewItemRequest message or plain object to encode + * @param {CMsgDevNewItemRequest.$Properties} message CMsgDevNewItemRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDevNewItemRequest.encode = function encode(message, writer) { + CMsgDevNewItemRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.receiver); - if (message.criteria != null && Object.hasOwnProperty.call(message, "criteria")) - $root.CSOItemCriteria.encode(message.criteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.criteria != null && $Object.hasOwnProperty.call(message, "criteria")) + $root.CSOItemCriteria.encode(message.criteria, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4725,12 +6058,12 @@ * @function encodeDelimited * @memberof CMsgDevNewItemRequest * @static - * @param {ICMsgDevNewItemRequest} message CMsgDevNewItemRequest message or plain object to encode + * @param {CMsgDevNewItemRequest.$Properties} message CMsgDevNewItemRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDevNewItemRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgDevNewItemRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4740,28 +6073,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgDevNewItemRequest} CMsgDevNewItemRequest + * @returns {CMsgDevNewItemRequest & CMsgDevNewItemRequest.$Shape} CMsgDevNewItemRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDevNewItemRequest.decode = function decode(reader, length) { + CMsgDevNewItemRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgDevNewItemRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgDevNewItemRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.receiver = reader.fixed64(); - break; - case 2: - message.criteria = $root.CSOItemCriteria.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.receiver = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.criteria = $root.CSOItemCriteria.decode(reader, reader.uint32(), $undefined, _depth + 1, message.criteria); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4771,11 +6124,11 @@ * @memberof CMsgDevNewItemRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgDevNewItemRequest} CMsgDevNewItemRequest + * @returns {CMsgDevNewItemRequest & CMsgDevNewItemRequest.$Shape} CMsgDevNewItemRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDevNewItemRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgDevNewItemRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4789,14 +6142,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgDevNewItemRequest.verify = function verify(message) { + CMsgDevNewItemRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.receiver != null && message.hasOwnProperty("receiver")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) if (!$util.isInteger(message.receiver) && !(message.receiver && $util.isInteger(message.receiver.low) && $util.isInteger(message.receiver.high))) return "receiver: integer|Long expected"; - if (message.criteria != null && message.hasOwnProperty("criteria")) { - var error = $root.CSOItemCriteria.verify(message.criteria); + if (message.criteria != null && $Object.hasOwnProperty.call(message, "criteria")) { + var error = $root.CSOItemCriteria.verify(message.criteria, _depth + 1); if (error) return "criteria." + error; } @@ -4811,23 +6168,29 @@ * @param {Object.} object Plain object * @returns {CMsgDevNewItemRequest} CMsgDevNewItemRequest */ - CMsgDevNewItemRequest.fromObject = function fromObject(object) { + CMsgDevNewItemRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgDevNewItemRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgDevNewItemRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgDevNewItemRequest(); if (object.receiver != null) if ($util.Long) - (message.receiver = $util.Long.fromValue(object.receiver)).unsigned = false; + message.receiver = $util.Long.fromValue(object.receiver, true); else if (typeof object.receiver === "string") - message.receiver = parseInt(object.receiver, 10); + message.receiver = $parseInt(object.receiver, 10); else if (typeof object.receiver === "number") message.receiver = object.receiver; else if (typeof object.receiver === "object") - message.receiver = new $util.LongBits(object.receiver.low >>> 0, object.receiver.high >>> 0).toNumber(); + message.receiver = new $util.LongBits(object.receiver.low >>> 0, object.receiver.high >>> 0).toNumber(true); if (object.criteria != null) { - if (typeof object.criteria !== "object") - throw TypeError(".CMsgDevNewItemRequest.criteria: object expected"); - message.criteria = $root.CSOItemCriteria.fromObject(object.criteria); + if (!$util.isObject(object.criteria)) + throw $TypeError(".CMsgDevNewItemRequest.criteria: object expected"); + message.criteria = $root.CSOItemCriteria.fromObject(object.criteria, _depth + 1); } return message; }; @@ -4841,25 +6204,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgDevNewItemRequest.toObject = function toObject(message, options) { + CMsgDevNewItemRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.receiver = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.receiver = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.receiver = options.longs === String ? "0" : 0; + object.receiver = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.criteria = null; } - if (message.receiver != null && message.hasOwnProperty("receiver")) - if (typeof message.receiver === "number") - object.receiver = options.longs === String ? String(message.receiver) : message.receiver; + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.receiver = typeof message.receiver === "number" ? $BigInt(message.receiver) : $util.Long.fromBits(message.receiver.low >>> 0, message.receiver.high >>> 0, true).toBigInt(); + else if (typeof message.receiver === "number") + object.receiver = options.longs === $String ? $String(message.receiver) : message.receiver; else - object.receiver = options.longs === String ? $util.Long.prototype.toString.call(message.receiver) : options.longs === Number ? new $util.LongBits(message.receiver.low >>> 0, message.receiver.high >>> 0).toNumber() : message.receiver; - if (message.criteria != null && message.hasOwnProperty("criteria")) - object.criteria = $root.CSOItemCriteria.toObject(message.criteria, options); + object.receiver = options.longs === $String ? $util.Long.prototype.toString.call(message.receiver) : options.longs === $Number ? new $util.LongBits(message.receiver.low >>> 0, message.receiver.high >>> 0).toNumber(true) : message.receiver; + if (message.criteria != null && $Object.hasOwnProperty.call(message, "criteria")) + object.criteria = $root.CSOItemCriteria.toObject(message.criteria, options, _depth + 1); return object; }; @@ -4870,8 +6239,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgDevNewItemRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgDevNewItemRequest.prototype.toJSON = function() { + return CMsgDevNewItemRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgDevNewItemRequest + * @function getTypeUrl + * @memberof CMsgDevNewItemRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgDevNewItemRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgDevNewItemRequest"; }; return CMsgDevNewItemRequest; @@ -4881,26 +6264,39 @@ /** * Properties of a CMsgDevDebugRollLootRequest. - * @exports ICMsgDevDebugRollLootRequest - * @interface ICMsgDevDebugRollLootRequest + * @typedef {Object} CMsgDevDebugRollLootRequest.$Properties * @property {number|Long|null} [receiver] CMsgDevDebugRollLootRequest receiver * @property {string|null} [loot_list_name] CMsgDevDebugRollLootRequest loot_list_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgDevDebugRollLootRequest. + * @exports ICMsgDevDebugRollLootRequest + * @interface ICMsgDevDebugRollLootRequest + * @augments CMsgDevDebugRollLootRequest.$Properties + * @deprecated Use CMsgDevDebugRollLootRequest.$Properties instead. + */ + + /** + * Shape of a CMsgDevDebugRollLootRequest. + * @typedef {CMsgDevDebugRollLootRequest.$Properties} CMsgDevDebugRollLootRequest.$Shape */ /** * Constructs a new CMsgDevDebugRollLootRequest. * @exports CMsgDevDebugRollLootRequest * @classdesc Represents a CMsgDevDebugRollLootRequest. - * @implements ICMsgDevDebugRollLootRequest * @constructor - * @param {ICMsgDevDebugRollLootRequest=} [properties] Properties to set + * @param {CMsgDevDebugRollLootRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgDevDebugRollLootRequest(properties) { + var CMsgDevDebugRollLootRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgDevDebugRollLootRequest receiver. @@ -4908,7 +6304,7 @@ * @memberof CMsgDevDebugRollLootRequest * @instance */ - CMsgDevDebugRollLootRequest.prototype.receiver = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgDevDebugRollLootRequest.prototype.receiver = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgDevDebugRollLootRequest loot_list_name. @@ -4923,10 +6319,14 @@ * @function create * @memberof CMsgDevDebugRollLootRequest * @static - * @param {ICMsgDevDebugRollLootRequest=} [properties] Properties to set + * @param {CMsgDevDebugRollLootRequest.$Properties=} [properties] Properties to set * @returns {CMsgDevDebugRollLootRequest} CMsgDevDebugRollLootRequest instance + * @type {{ + * (properties: CMsgDevDebugRollLootRequest.$Shape): CMsgDevDebugRollLootRequest & CMsgDevDebugRollLootRequest.$Shape; + * (properties?: CMsgDevDebugRollLootRequest.$Properties): CMsgDevDebugRollLootRequest; + * }} */ - CMsgDevDebugRollLootRequest.create = function create(properties) { + CMsgDevDebugRollLootRequest.create = function(properties) { return new CMsgDevDebugRollLootRequest(properties); }; @@ -4935,17 +6335,24 @@ * @function encode * @memberof CMsgDevDebugRollLootRequest * @static - * @param {ICMsgDevDebugRollLootRequest} message CMsgDevDebugRollLootRequest message or plain object to encode + * @param {CMsgDevDebugRollLootRequest.$Properties} message CMsgDevDebugRollLootRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDevDebugRollLootRequest.encode = function encode(message, writer) { + CMsgDevDebugRollLootRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.receiver); - if (message.loot_list_name != null && Object.hasOwnProperty.call(message, "loot_list_name")) + if (message.loot_list_name != null && $Object.hasOwnProperty.call(message, "loot_list_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.loot_list_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4954,12 +6361,12 @@ * @function encodeDelimited * @memberof CMsgDevDebugRollLootRequest * @static - * @param {ICMsgDevDebugRollLootRequest} message CMsgDevDebugRollLootRequest message or plain object to encode + * @param {CMsgDevDebugRollLootRequest.$Properties} message CMsgDevDebugRollLootRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDevDebugRollLootRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgDevDebugRollLootRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4969,28 +6376,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgDevDebugRollLootRequest} CMsgDevDebugRollLootRequest + * @returns {CMsgDevDebugRollLootRequest & CMsgDevDebugRollLootRequest.$Shape} CMsgDevDebugRollLootRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDevDebugRollLootRequest.decode = function decode(reader, length) { + CMsgDevDebugRollLootRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgDevDebugRollLootRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgDevDebugRollLootRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.receiver = reader.fixed64(); - break; - case 2: - message.loot_list_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.receiver = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.loot_list_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5000,11 +6427,11 @@ * @memberof CMsgDevDebugRollLootRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgDevDebugRollLootRequest} CMsgDevDebugRollLootRequest + * @returns {CMsgDevDebugRollLootRequest & CMsgDevDebugRollLootRequest.$Shape} CMsgDevDebugRollLootRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDevDebugRollLootRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgDevDebugRollLootRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5018,13 +6445,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgDevDebugRollLootRequest.verify = function verify(message) { + CMsgDevDebugRollLootRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.receiver != null && message.hasOwnProperty("receiver")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) if (!$util.isInteger(message.receiver) && !(message.receiver && $util.isInteger(message.receiver.low) && $util.isInteger(message.receiver.high))) return "receiver: integer|Long expected"; - if (message.loot_list_name != null && message.hasOwnProperty("loot_list_name")) + if (message.loot_list_name != null && $Object.hasOwnProperty.call(message, "loot_list_name")) if (!$util.isString(message.loot_list_name)) return "loot_list_name: string expected"; return null; @@ -5038,21 +6469,27 @@ * @param {Object.} object Plain object * @returns {CMsgDevDebugRollLootRequest} CMsgDevDebugRollLootRequest */ - CMsgDevDebugRollLootRequest.fromObject = function fromObject(object) { + CMsgDevDebugRollLootRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgDevDebugRollLootRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgDevDebugRollLootRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgDevDebugRollLootRequest(); if (object.receiver != null) if ($util.Long) - (message.receiver = $util.Long.fromValue(object.receiver)).unsigned = false; + message.receiver = $util.Long.fromValue(object.receiver, true); else if (typeof object.receiver === "string") - message.receiver = parseInt(object.receiver, 10); + message.receiver = $parseInt(object.receiver, 10); else if (typeof object.receiver === "number") message.receiver = object.receiver; else if (typeof object.receiver === "object") - message.receiver = new $util.LongBits(object.receiver.low >>> 0, object.receiver.high >>> 0).toNumber(); + message.receiver = new $util.LongBits(object.receiver.low >>> 0, object.receiver.high >>> 0).toNumber(true); if (object.loot_list_name != null) - message.loot_list_name = String(object.loot_list_name); + message.loot_list_name = $String(object.loot_list_name); return message; }; @@ -5065,24 +6502,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgDevDebugRollLootRequest.toObject = function toObject(message, options) { + CMsgDevDebugRollLootRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.receiver = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.receiver = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.receiver = options.longs === String ? "0" : 0; + object.receiver = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.loot_list_name = ""; } - if (message.receiver != null && message.hasOwnProperty("receiver")) - if (typeof message.receiver === "number") - object.receiver = options.longs === String ? String(message.receiver) : message.receiver; + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.receiver = typeof message.receiver === "number" ? $BigInt(message.receiver) : $util.Long.fromBits(message.receiver.low >>> 0, message.receiver.high >>> 0, true).toBigInt(); + else if (typeof message.receiver === "number") + object.receiver = options.longs === $String ? $String(message.receiver) : message.receiver; else - object.receiver = options.longs === String ? $util.Long.prototype.toString.call(message.receiver) : options.longs === Number ? new $util.LongBits(message.receiver.low >>> 0, message.receiver.high >>> 0).toNumber() : message.receiver; - if (message.loot_list_name != null && message.hasOwnProperty("loot_list_name")) + object.receiver = options.longs === $String ? $util.Long.prototype.toString.call(message.receiver) : options.longs === $Number ? new $util.LongBits(message.receiver.low >>> 0, message.receiver.high >>> 0).toNumber(true) : message.receiver; + if (message.loot_list_name != null && $Object.hasOwnProperty.call(message, "loot_list_name")) object.loot_list_name = message.loot_list_name; return object; }; @@ -5094,8 +6537,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgDevDebugRollLootRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgDevDebugRollLootRequest.prototype.toJSON = function() { + return CMsgDevDebugRollLootRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgDevDebugRollLootRequest + * @function getTypeUrl + * @memberof CMsgDevDebugRollLootRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgDevDebugRollLootRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgDevDebugRollLootRequest"; }; return CMsgDevDebugRollLootRequest; @@ -5105,29 +6562,42 @@ /** * Properties of a CMsgIncrementKillCountAttribute. - * @exports ICMsgIncrementKillCountAttribute - * @interface ICMsgIncrementKillCountAttribute + * @typedef {Object} CMsgIncrementKillCountAttribute.$Properties * @property {number|Long|null} [killer_steam_id] CMsgIncrementKillCountAttribute killer_steam_id * @property {number|Long|null} [victim_steam_id] CMsgIncrementKillCountAttribute victim_steam_id * @property {number|Long|null} [item_id] CMsgIncrementKillCountAttribute item_id * @property {number|null} [event_type] CMsgIncrementKillCountAttribute event_type * @property {number|null} [increment_value] CMsgIncrementKillCountAttribute increment_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgIncrementKillCountAttribute. + * @exports ICMsgIncrementKillCountAttribute + * @interface ICMsgIncrementKillCountAttribute + * @augments CMsgIncrementKillCountAttribute.$Properties + * @deprecated Use CMsgIncrementKillCountAttribute.$Properties instead. + */ + + /** + * Shape of a CMsgIncrementKillCountAttribute. + * @typedef {CMsgIncrementKillCountAttribute.$Properties} CMsgIncrementKillCountAttribute.$Shape */ /** * Constructs a new CMsgIncrementKillCountAttribute. * @exports CMsgIncrementKillCountAttribute * @classdesc Represents a CMsgIncrementKillCountAttribute. - * @implements ICMsgIncrementKillCountAttribute * @constructor - * @param {ICMsgIncrementKillCountAttribute=} [properties] Properties to set + * @param {CMsgIncrementKillCountAttribute.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgIncrementKillCountAttribute(properties) { + var CMsgIncrementKillCountAttribute = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgIncrementKillCountAttribute killer_steam_id. @@ -5174,10 +6644,14 @@ * @function create * @memberof CMsgIncrementKillCountAttribute * @static - * @param {ICMsgIncrementKillCountAttribute=} [properties] Properties to set + * @param {CMsgIncrementKillCountAttribute.$Properties=} [properties] Properties to set * @returns {CMsgIncrementKillCountAttribute} CMsgIncrementKillCountAttribute instance + * @type {{ + * (properties: CMsgIncrementKillCountAttribute.$Shape): CMsgIncrementKillCountAttribute & CMsgIncrementKillCountAttribute.$Shape; + * (properties?: CMsgIncrementKillCountAttribute.$Properties): CMsgIncrementKillCountAttribute; + * }} */ - CMsgIncrementKillCountAttribute.create = function create(properties) { + CMsgIncrementKillCountAttribute.create = function(properties) { return new CMsgIncrementKillCountAttribute(properties); }; @@ -5186,23 +6660,30 @@ * @function encode * @memberof CMsgIncrementKillCountAttribute * @static - * @param {ICMsgIncrementKillCountAttribute} message CMsgIncrementKillCountAttribute message or plain object to encode + * @param {CMsgIncrementKillCountAttribute.$Properties} message CMsgIncrementKillCountAttribute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgIncrementKillCountAttribute.encode = function encode(message, writer) { + CMsgIncrementKillCountAttribute.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.killer_steam_id != null && Object.hasOwnProperty.call(message, "killer_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.killer_steam_id); - if (message.victim_steam_id != null && Object.hasOwnProperty.call(message, "victim_steam_id")) + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.victim_steam_id); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.item_id); - if (message.event_type != null && Object.hasOwnProperty.call(message, "event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.event_type); - if (message.increment_value != null && Object.hasOwnProperty.call(message, "increment_value")) + if (message.increment_value != null && $Object.hasOwnProperty.call(message, "increment_value")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.increment_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5211,12 +6692,12 @@ * @function encodeDelimited * @memberof CMsgIncrementKillCountAttribute * @static - * @param {ICMsgIncrementKillCountAttribute} message CMsgIncrementKillCountAttribute message or plain object to encode + * @param {CMsgIncrementKillCountAttribute.$Properties} message CMsgIncrementKillCountAttribute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgIncrementKillCountAttribute.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgIncrementKillCountAttribute.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5226,37 +6707,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgIncrementKillCountAttribute} CMsgIncrementKillCountAttribute + * @returns {CMsgIncrementKillCountAttribute & CMsgIncrementKillCountAttribute.$Shape} CMsgIncrementKillCountAttribute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgIncrementKillCountAttribute.decode = function decode(reader, length) { + CMsgIncrementKillCountAttribute.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgIncrementKillCountAttribute(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgIncrementKillCountAttribute(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.killer_steam_id = reader.uint64(); - break; - case 2: - message.victim_steam_id = reader.uint64(); - break; - case 3: - message.item_id = reader.uint64(); - break; - case 4: - message.event_type = reader.uint32(); - break; - case 5: - message.increment_value = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.killer_steam_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.victim_steam_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.event_type = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.increment_value = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5266,11 +6776,11 @@ * @memberof CMsgIncrementKillCountAttribute * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgIncrementKillCountAttribute} CMsgIncrementKillCountAttribute + * @returns {CMsgIncrementKillCountAttribute & CMsgIncrementKillCountAttribute.$Shape} CMsgIncrementKillCountAttribute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgIncrementKillCountAttribute.decodeDelimited = function decodeDelimited(reader) { + CMsgIncrementKillCountAttribute.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5284,22 +6794,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgIncrementKillCountAttribute.verify = function verify(message) { + CMsgIncrementKillCountAttribute.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.killer_steam_id != null && message.hasOwnProperty("killer_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) if (!$util.isInteger(message.killer_steam_id) && !(message.killer_steam_id && $util.isInteger(message.killer_steam_id.low) && $util.isInteger(message.killer_steam_id.high))) return "killer_steam_id: integer|Long expected"; - if (message.victim_steam_id != null && message.hasOwnProperty("victim_steam_id")) + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) if (!$util.isInteger(message.victim_steam_id) && !(message.victim_steam_id && $util.isInteger(message.victim_steam_id.low) && $util.isInteger(message.victim_steam_id.high))) return "victim_steam_id: integer|Long expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) if (!$util.isInteger(message.event_type)) return "event_type: integer expected"; - if (message.increment_value != null && message.hasOwnProperty("increment_value")) + if (message.increment_value != null && $Object.hasOwnProperty.call(message, "increment_value")) if (!$util.isInteger(message.increment_value)) return "increment_value: integer expected"; return null; @@ -5313,33 +6827,39 @@ * @param {Object.} object Plain object * @returns {CMsgIncrementKillCountAttribute} CMsgIncrementKillCountAttribute */ - CMsgIncrementKillCountAttribute.fromObject = function fromObject(object) { + CMsgIncrementKillCountAttribute.fromObject = function (object, _depth) { if (object instanceof $root.CMsgIncrementKillCountAttribute) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgIncrementKillCountAttribute: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgIncrementKillCountAttribute(); if (object.killer_steam_id != null) if ($util.Long) - (message.killer_steam_id = $util.Long.fromValue(object.killer_steam_id)).unsigned = true; + message.killer_steam_id = $util.Long.fromValue(object.killer_steam_id, true); else if (typeof object.killer_steam_id === "string") - message.killer_steam_id = parseInt(object.killer_steam_id, 10); + message.killer_steam_id = $parseInt(object.killer_steam_id, 10); else if (typeof object.killer_steam_id === "number") message.killer_steam_id = object.killer_steam_id; else if (typeof object.killer_steam_id === "object") message.killer_steam_id = new $util.LongBits(object.killer_steam_id.low >>> 0, object.killer_steam_id.high >>> 0).toNumber(true); if (object.victim_steam_id != null) if ($util.Long) - (message.victim_steam_id = $util.Long.fromValue(object.victim_steam_id)).unsigned = true; + message.victim_steam_id = $util.Long.fromValue(object.victim_steam_id, true); else if (typeof object.victim_steam_id === "string") - message.victim_steam_id = parseInt(object.victim_steam_id, 10); + message.victim_steam_id = $parseInt(object.victim_steam_id, 10); else if (typeof object.victim_steam_id === "number") message.victim_steam_id = object.victim_steam_id; else if (typeof object.victim_steam_id === "object") message.victim_steam_id = new $util.LongBits(object.victim_steam_id.low >>> 0, object.victim_steam_id.high >>> 0).toNumber(true); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -5360,47 +6880,57 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgIncrementKillCountAttribute.toObject = function toObject(message, options) { + CMsgIncrementKillCountAttribute.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.killer_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.killer_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.killer_steam_id = options.longs === String ? "0" : 0; + object.killer_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.victim_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.victim_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.victim_steam_id = options.longs === String ? "0" : 0; + object.victim_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.event_type = 0; object.increment_value = 0; } - if (message.killer_steam_id != null && message.hasOwnProperty("killer_steam_id")) - if (typeof message.killer_steam_id === "number") - object.killer_steam_id = options.longs === String ? String(message.killer_steam_id) : message.killer_steam_id; + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.killer_steam_id = typeof message.killer_steam_id === "number" ? $BigInt(message.killer_steam_id) : $util.Long.fromBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.killer_steam_id === "number") + object.killer_steam_id = options.longs === $String ? $String(message.killer_steam_id) : message.killer_steam_id; else - object.killer_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.killer_steam_id) : options.longs === Number ? new $util.LongBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0).toNumber(true) : message.killer_steam_id; - if (message.victim_steam_id != null && message.hasOwnProperty("victim_steam_id")) - if (typeof message.victim_steam_id === "number") - object.victim_steam_id = options.longs === String ? String(message.victim_steam_id) : message.victim_steam_id; + object.killer_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.killer_steam_id) : options.longs === $Number ? new $util.LongBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0).toNumber(true) : message.killer_steam_id; + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.victim_steam_id = typeof message.victim_steam_id === "number" ? $BigInt(message.victim_steam_id) : $util.Long.fromBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.victim_steam_id === "number") + object.victim_steam_id = options.longs === $String ? $String(message.victim_steam_id) : message.victim_steam_id; else - object.victim_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.victim_steam_id) : options.longs === Number ? new $util.LongBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0).toNumber(true) : message.victim_steam_id; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + object.victim_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.victim_steam_id) : options.longs === $Number ? new $util.LongBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0).toNumber(true) : message.victim_steam_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.event_type != null && message.hasOwnProperty("event_type")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) object.event_type = message.event_type; - if (message.increment_value != null && message.hasOwnProperty("increment_value")) + if (message.increment_value != null && $Object.hasOwnProperty.call(message, "increment_value")) object.increment_value = message.increment_value; return object; }; @@ -5412,8 +6942,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgIncrementKillCountAttribute.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgIncrementKillCountAttribute.prototype.toJSON = function() { + return CMsgIncrementKillCountAttribute.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgIncrementKillCountAttribute + * @function getTypeUrl + * @memberof CMsgIncrementKillCountAttribute + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgIncrementKillCountAttribute.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgIncrementKillCountAttribute"; }; return CMsgIncrementKillCountAttribute; @@ -5421,32 +6965,45 @@ $root.CMsgIncrementKillCountAttribute_Multiple = (function() { + /** + * Properties of a CMsgIncrementKillCountAttribute_Multiple. + * @typedef {Object} CMsgIncrementKillCountAttribute_Multiple.$Properties + * @property {Array.|null} [msgs] CMsgIncrementKillCountAttribute_Multiple msgs + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgIncrementKillCountAttribute_Multiple. * @exports ICMsgIncrementKillCountAttribute_Multiple * @interface ICMsgIncrementKillCountAttribute_Multiple - * @property {Array.|null} [msgs] CMsgIncrementKillCountAttribute_Multiple msgs + * @augments CMsgIncrementKillCountAttribute_Multiple.$Properties + * @deprecated Use CMsgIncrementKillCountAttribute_Multiple.$Properties instead. + */ + + /** + * Shape of a CMsgIncrementKillCountAttribute_Multiple. + * @typedef {CMsgIncrementKillCountAttribute_Multiple.$Properties} CMsgIncrementKillCountAttribute_Multiple.$Shape */ /** * Constructs a new CMsgIncrementKillCountAttribute_Multiple. * @exports CMsgIncrementKillCountAttribute_Multiple * @classdesc Represents a CMsgIncrementKillCountAttribute_Multiple. - * @implements ICMsgIncrementKillCountAttribute_Multiple * @constructor - * @param {ICMsgIncrementKillCountAttribute_Multiple=} [properties] Properties to set + * @param {CMsgIncrementKillCountAttribute_Multiple.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgIncrementKillCountAttribute_Multiple(properties) { + var CMsgIncrementKillCountAttribute_Multiple = function (properties) { this.msgs = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgIncrementKillCountAttribute_Multiple msgs. - * @member {Array.} msgs + * @member {Array.} msgs * @memberof CMsgIncrementKillCountAttribute_Multiple * @instance */ @@ -5457,10 +7014,14 @@ * @function create * @memberof CMsgIncrementKillCountAttribute_Multiple * @static - * @param {ICMsgIncrementKillCountAttribute_Multiple=} [properties] Properties to set + * @param {CMsgIncrementKillCountAttribute_Multiple.$Properties=} [properties] Properties to set * @returns {CMsgIncrementKillCountAttribute_Multiple} CMsgIncrementKillCountAttribute_Multiple instance + * @type {{ + * (properties: CMsgIncrementKillCountAttribute_Multiple.$Shape): CMsgIncrementKillCountAttribute_Multiple & CMsgIncrementKillCountAttribute_Multiple.$Shape; + * (properties?: CMsgIncrementKillCountAttribute_Multiple.$Properties): CMsgIncrementKillCountAttribute_Multiple; + * }} */ - CMsgIncrementKillCountAttribute_Multiple.create = function create(properties) { + CMsgIncrementKillCountAttribute_Multiple.create = function(properties) { return new CMsgIncrementKillCountAttribute_Multiple(properties); }; @@ -5469,16 +7030,23 @@ * @function encode * @memberof CMsgIncrementKillCountAttribute_Multiple * @static - * @param {ICMsgIncrementKillCountAttribute_Multiple} message CMsgIncrementKillCountAttribute_Multiple message or plain object to encode + * @param {CMsgIncrementKillCountAttribute_Multiple.$Properties} message CMsgIncrementKillCountAttribute_Multiple message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgIncrementKillCountAttribute_Multiple.encode = function encode(message, writer) { + CMsgIncrementKillCountAttribute_Multiple.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.msgs != null && message.msgs.length) for (var i = 0; i < message.msgs.length; ++i) - $root.CMsgIncrementKillCountAttribute.encode(message.msgs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgIncrementKillCountAttribute.encode(message.msgs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5487,12 +7055,12 @@ * @function encodeDelimited * @memberof CMsgIncrementKillCountAttribute_Multiple * @static - * @param {ICMsgIncrementKillCountAttribute_Multiple} message CMsgIncrementKillCountAttribute_Multiple message or plain object to encode + * @param {CMsgIncrementKillCountAttribute_Multiple.$Properties} message CMsgIncrementKillCountAttribute_Multiple message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgIncrementKillCountAttribute_Multiple.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgIncrementKillCountAttribute_Multiple.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5502,27 +7070,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgIncrementKillCountAttribute_Multiple} CMsgIncrementKillCountAttribute_Multiple + * @returns {CMsgIncrementKillCountAttribute_Multiple & CMsgIncrementKillCountAttribute_Multiple.$Shape} CMsgIncrementKillCountAttribute_Multiple * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgIncrementKillCountAttribute_Multiple.decode = function decode(reader, length) { + CMsgIncrementKillCountAttribute_Multiple.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgIncrementKillCountAttribute_Multiple(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgIncrementKillCountAttribute_Multiple(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.msgs && message.msgs.length)) - message.msgs = []; - message.msgs.push($root.CMsgIncrementKillCountAttribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.msgs && message.msgs.length)) + message.msgs = []; + message.msgs.push($root.CMsgIncrementKillCountAttribute.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5532,11 +7117,11 @@ * @memberof CMsgIncrementKillCountAttribute_Multiple * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgIncrementKillCountAttribute_Multiple} CMsgIncrementKillCountAttribute_Multiple + * @returns {CMsgIncrementKillCountAttribute_Multiple & CMsgIncrementKillCountAttribute_Multiple.$Shape} CMsgIncrementKillCountAttribute_Multiple * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgIncrementKillCountAttribute_Multiple.decodeDelimited = function decodeDelimited(reader) { + CMsgIncrementKillCountAttribute_Multiple.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5550,14 +7135,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgIncrementKillCountAttribute_Multiple.verify = function verify(message) { + CMsgIncrementKillCountAttribute_Multiple.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.msgs != null && message.hasOwnProperty("msgs")) { - if (!Array.isArray(message.msgs)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.msgs != null && $Object.hasOwnProperty.call(message, "msgs")) { + if (!$Array.isArray(message.msgs)) return "msgs: array expected"; for (var i = 0; i < message.msgs.length; ++i) { - var error = $root.CMsgIncrementKillCountAttribute.verify(message.msgs[i]); + var error = $root.CMsgIncrementKillCountAttribute.verify(message.msgs[i], _depth + 1); if (error) return "msgs." + error; } @@ -5573,18 +7162,24 @@ * @param {Object.} object Plain object * @returns {CMsgIncrementKillCountAttribute_Multiple} CMsgIncrementKillCountAttribute_Multiple */ - CMsgIncrementKillCountAttribute_Multiple.fromObject = function fromObject(object) { + CMsgIncrementKillCountAttribute_Multiple.fromObject = function (object, _depth) { if (object instanceof $root.CMsgIncrementKillCountAttribute_Multiple) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgIncrementKillCountAttribute_Multiple: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgIncrementKillCountAttribute_Multiple(); if (object.msgs) { - if (!Array.isArray(object.msgs)) - throw TypeError(".CMsgIncrementKillCountAttribute_Multiple.msgs: array expected"); - message.msgs = []; + if (!$Array.isArray(object.msgs)) + throw $TypeError(".CMsgIncrementKillCountAttribute_Multiple.msgs: array expected"); + message.msgs = $Array(object.msgs.length); for (var i = 0; i < object.msgs.length; ++i) { - if (typeof object.msgs[i] !== "object") - throw TypeError(".CMsgIncrementKillCountAttribute_Multiple.msgs: object expected"); - message.msgs[i] = $root.CMsgIncrementKillCountAttribute.fromObject(object.msgs[i]); + if (!$util.isObject(object.msgs[i])) + throw $TypeError(".CMsgIncrementKillCountAttribute_Multiple.msgs: object expected"); + message.msgs[i] = $root.CMsgIncrementKillCountAttribute.fromObject(object.msgs[i], _depth + 1); } } return message; @@ -5599,16 +7194,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgIncrementKillCountAttribute_Multiple.toObject = function toObject(message, options) { + CMsgIncrementKillCountAttribute_Multiple.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.msgs = []; if (message.msgs && message.msgs.length) { - object.msgs = []; + object.msgs = $Array(message.msgs.length); for (var j = 0; j < message.msgs.length; ++j) - object.msgs[j] = $root.CMsgIncrementKillCountAttribute.toObject(message.msgs[j], options); + object.msgs[j] = $root.CMsgIncrementKillCountAttribute.toObject(message.msgs[j], options, _depth + 1); } return object; }; @@ -5620,8 +7219,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgIncrementKillCountAttribute_Multiple.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgIncrementKillCountAttribute_Multiple.prototype.toJSON = function() { + return CMsgIncrementKillCountAttribute_Multiple.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgIncrementKillCountAttribute_Multiple + * @function getTypeUrl + * @memberof CMsgIncrementKillCountAttribute_Multiple + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgIncrementKillCountAttribute_Multiple.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgIncrementKillCountAttribute_Multiple"; }; return CMsgIncrementKillCountAttribute_Multiple; @@ -5631,28 +7244,41 @@ /** * Properties of a CMsgTrackUniquePlayerPairEvent. - * @exports ICMsgTrackUniquePlayerPairEvent - * @interface ICMsgTrackUniquePlayerPairEvent + * @typedef {Object} CMsgTrackUniquePlayerPairEvent.$Properties * @property {number|Long|null} [killer_steam_id] CMsgTrackUniquePlayerPairEvent killer_steam_id * @property {number|Long|null} [victim_steam_id] CMsgTrackUniquePlayerPairEvent victim_steam_id * @property {number|Long|null} [item_id] CMsgTrackUniquePlayerPairEvent item_id * @property {number|null} [event_type] CMsgTrackUniquePlayerPairEvent event_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTrackUniquePlayerPairEvent. + * @exports ICMsgTrackUniquePlayerPairEvent + * @interface ICMsgTrackUniquePlayerPairEvent + * @augments CMsgTrackUniquePlayerPairEvent.$Properties + * @deprecated Use CMsgTrackUniquePlayerPairEvent.$Properties instead. + */ + + /** + * Shape of a CMsgTrackUniquePlayerPairEvent. + * @typedef {CMsgTrackUniquePlayerPairEvent.$Properties} CMsgTrackUniquePlayerPairEvent.$Shape */ /** * Constructs a new CMsgTrackUniquePlayerPairEvent. * @exports CMsgTrackUniquePlayerPairEvent * @classdesc Represents a CMsgTrackUniquePlayerPairEvent. - * @implements ICMsgTrackUniquePlayerPairEvent * @constructor - * @param {ICMsgTrackUniquePlayerPairEvent=} [properties] Properties to set + * @param {CMsgTrackUniquePlayerPairEvent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTrackUniquePlayerPairEvent(properties) { + var CMsgTrackUniquePlayerPairEvent = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTrackUniquePlayerPairEvent killer_steam_id. @@ -5691,10 +7317,14 @@ * @function create * @memberof CMsgTrackUniquePlayerPairEvent * @static - * @param {ICMsgTrackUniquePlayerPairEvent=} [properties] Properties to set + * @param {CMsgTrackUniquePlayerPairEvent.$Properties=} [properties] Properties to set * @returns {CMsgTrackUniquePlayerPairEvent} CMsgTrackUniquePlayerPairEvent instance + * @type {{ + * (properties: CMsgTrackUniquePlayerPairEvent.$Shape): CMsgTrackUniquePlayerPairEvent & CMsgTrackUniquePlayerPairEvent.$Shape; + * (properties?: CMsgTrackUniquePlayerPairEvent.$Properties): CMsgTrackUniquePlayerPairEvent; + * }} */ - CMsgTrackUniquePlayerPairEvent.create = function create(properties) { + CMsgTrackUniquePlayerPairEvent.create = function(properties) { return new CMsgTrackUniquePlayerPairEvent(properties); }; @@ -5703,21 +7333,28 @@ * @function encode * @memberof CMsgTrackUniquePlayerPairEvent * @static - * @param {ICMsgTrackUniquePlayerPairEvent} message CMsgTrackUniquePlayerPairEvent message or plain object to encode + * @param {CMsgTrackUniquePlayerPairEvent.$Properties} message CMsgTrackUniquePlayerPairEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTrackUniquePlayerPairEvent.encode = function encode(message, writer) { + CMsgTrackUniquePlayerPairEvent.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.killer_steam_id != null && Object.hasOwnProperty.call(message, "killer_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.killer_steam_id); - if (message.victim_steam_id != null && Object.hasOwnProperty.call(message, "victim_steam_id")) + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.victim_steam_id); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.item_id); - if (message.event_type != null && Object.hasOwnProperty.call(message, "event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.event_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5726,12 +7363,12 @@ * @function encodeDelimited * @memberof CMsgTrackUniquePlayerPairEvent * @static - * @param {ICMsgTrackUniquePlayerPairEvent} message CMsgTrackUniquePlayerPairEvent message or plain object to encode + * @param {CMsgTrackUniquePlayerPairEvent.$Properties} message CMsgTrackUniquePlayerPairEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTrackUniquePlayerPairEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTrackUniquePlayerPairEvent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5741,34 +7378,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTrackUniquePlayerPairEvent} CMsgTrackUniquePlayerPairEvent + * @returns {CMsgTrackUniquePlayerPairEvent & CMsgTrackUniquePlayerPairEvent.$Shape} CMsgTrackUniquePlayerPairEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTrackUniquePlayerPairEvent.decode = function decode(reader, length) { + CMsgTrackUniquePlayerPairEvent.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTrackUniquePlayerPairEvent(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTrackUniquePlayerPairEvent(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.killer_steam_id = reader.uint64(); - break; - case 2: - message.victim_steam_id = reader.uint64(); - break; - case 3: - message.item_id = reader.uint64(); - break; - case 4: - message.event_type = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.killer_steam_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.victim_steam_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.event_type = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5778,11 +7441,11 @@ * @memberof CMsgTrackUniquePlayerPairEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTrackUniquePlayerPairEvent} CMsgTrackUniquePlayerPairEvent + * @returns {CMsgTrackUniquePlayerPairEvent & CMsgTrackUniquePlayerPairEvent.$Shape} CMsgTrackUniquePlayerPairEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTrackUniquePlayerPairEvent.decodeDelimited = function decodeDelimited(reader) { + CMsgTrackUniquePlayerPairEvent.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5796,19 +7459,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTrackUniquePlayerPairEvent.verify = function verify(message) { + CMsgTrackUniquePlayerPairEvent.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.killer_steam_id != null && message.hasOwnProperty("killer_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) if (!$util.isInteger(message.killer_steam_id) && !(message.killer_steam_id && $util.isInteger(message.killer_steam_id.low) && $util.isInteger(message.killer_steam_id.high))) return "killer_steam_id: integer|Long expected"; - if (message.victim_steam_id != null && message.hasOwnProperty("victim_steam_id")) + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) if (!$util.isInteger(message.victim_steam_id) && !(message.victim_steam_id && $util.isInteger(message.victim_steam_id.low) && $util.isInteger(message.victim_steam_id.high))) return "victim_steam_id: integer|Long expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) if (!$util.isInteger(message.event_type)) return "event_type: integer expected"; return null; @@ -5822,33 +7489,39 @@ * @param {Object.} object Plain object * @returns {CMsgTrackUniquePlayerPairEvent} CMsgTrackUniquePlayerPairEvent */ - CMsgTrackUniquePlayerPairEvent.fromObject = function fromObject(object) { + CMsgTrackUniquePlayerPairEvent.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTrackUniquePlayerPairEvent) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTrackUniquePlayerPairEvent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTrackUniquePlayerPairEvent(); if (object.killer_steam_id != null) if ($util.Long) - (message.killer_steam_id = $util.Long.fromValue(object.killer_steam_id)).unsigned = true; + message.killer_steam_id = $util.Long.fromValue(object.killer_steam_id, true); else if (typeof object.killer_steam_id === "string") - message.killer_steam_id = parseInt(object.killer_steam_id, 10); + message.killer_steam_id = $parseInt(object.killer_steam_id, 10); else if (typeof object.killer_steam_id === "number") message.killer_steam_id = object.killer_steam_id; else if (typeof object.killer_steam_id === "object") message.killer_steam_id = new $util.LongBits(object.killer_steam_id.low >>> 0, object.killer_steam_id.high >>> 0).toNumber(true); if (object.victim_steam_id != null) if ($util.Long) - (message.victim_steam_id = $util.Long.fromValue(object.victim_steam_id)).unsigned = true; + message.victim_steam_id = $util.Long.fromValue(object.victim_steam_id, true); else if (typeof object.victim_steam_id === "string") - message.victim_steam_id = parseInt(object.victim_steam_id, 10); + message.victim_steam_id = $parseInt(object.victim_steam_id, 10); else if (typeof object.victim_steam_id === "number") message.victim_steam_id = object.victim_steam_id; else if (typeof object.victim_steam_id === "object") message.victim_steam_id = new $util.LongBits(object.victim_steam_id.low >>> 0, object.victim_steam_id.high >>> 0).toNumber(true); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -5867,44 +7540,54 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTrackUniquePlayerPairEvent.toObject = function toObject(message, options) { + CMsgTrackUniquePlayerPairEvent.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.killer_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.killer_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.killer_steam_id = options.longs === String ? "0" : 0; + object.killer_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.victim_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.victim_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.victim_steam_id = options.longs === String ? "0" : 0; + object.victim_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.event_type = 0; } - if (message.killer_steam_id != null && message.hasOwnProperty("killer_steam_id")) - if (typeof message.killer_steam_id === "number") - object.killer_steam_id = options.longs === String ? String(message.killer_steam_id) : message.killer_steam_id; + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.killer_steam_id = typeof message.killer_steam_id === "number" ? $BigInt(message.killer_steam_id) : $util.Long.fromBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.killer_steam_id === "number") + object.killer_steam_id = options.longs === $String ? $String(message.killer_steam_id) : message.killer_steam_id; else - object.killer_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.killer_steam_id) : options.longs === Number ? new $util.LongBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0).toNumber(true) : message.killer_steam_id; - if (message.victim_steam_id != null && message.hasOwnProperty("victim_steam_id")) - if (typeof message.victim_steam_id === "number") - object.victim_steam_id = options.longs === String ? String(message.victim_steam_id) : message.victim_steam_id; + object.killer_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.killer_steam_id) : options.longs === $Number ? new $util.LongBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0).toNumber(true) : message.killer_steam_id; + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.victim_steam_id = typeof message.victim_steam_id === "number" ? $BigInt(message.victim_steam_id) : $util.Long.fromBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.victim_steam_id === "number") + object.victim_steam_id = options.longs === $String ? $String(message.victim_steam_id) : message.victim_steam_id; else - object.victim_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.victim_steam_id) : options.longs === Number ? new $util.LongBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0).toNumber(true) : message.victim_steam_id; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + object.victim_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.victim_steam_id) : options.longs === $Number ? new $util.LongBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0).toNumber(true) : message.victim_steam_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.event_type != null && message.hasOwnProperty("event_type")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) object.event_type = message.event_type; return object; }; @@ -5916,8 +7599,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTrackUniquePlayerPairEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTrackUniquePlayerPairEvent.prototype.toJSON = function() { + return CMsgTrackUniquePlayerPairEvent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTrackUniquePlayerPairEvent + * @function getTypeUrl + * @memberof CMsgTrackUniquePlayerPairEvent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTrackUniquePlayerPairEvent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTrackUniquePlayerPairEvent"; }; return CMsgTrackUniquePlayerPairEvent; @@ -5927,27 +7624,40 @@ /** * Properties of a CMsgApplyStrangeCountTransfer. - * @exports ICMsgApplyStrangeCountTransfer - * @interface ICMsgApplyStrangeCountTransfer + * @typedef {Object} CMsgApplyStrangeCountTransfer.$Properties * @property {number|Long|null} [tool_item_id] CMsgApplyStrangeCountTransfer tool_item_id * @property {number|Long|null} [item_src_item_id] CMsgApplyStrangeCountTransfer item_src_item_id * @property {number|Long|null} [item_dest_item_id] CMsgApplyStrangeCountTransfer item_dest_item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyStrangeCountTransfer. + * @exports ICMsgApplyStrangeCountTransfer + * @interface ICMsgApplyStrangeCountTransfer + * @augments CMsgApplyStrangeCountTransfer.$Properties + * @deprecated Use CMsgApplyStrangeCountTransfer.$Properties instead. + */ + + /** + * Shape of a CMsgApplyStrangeCountTransfer. + * @typedef {CMsgApplyStrangeCountTransfer.$Properties} CMsgApplyStrangeCountTransfer.$Shape */ /** * Constructs a new CMsgApplyStrangeCountTransfer. * @exports CMsgApplyStrangeCountTransfer * @classdesc Represents a CMsgApplyStrangeCountTransfer. - * @implements ICMsgApplyStrangeCountTransfer * @constructor - * @param {ICMsgApplyStrangeCountTransfer=} [properties] Properties to set + * @param {CMsgApplyStrangeCountTransfer.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyStrangeCountTransfer(properties) { + var CMsgApplyStrangeCountTransfer = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyStrangeCountTransfer tool_item_id. @@ -5978,10 +7688,14 @@ * @function create * @memberof CMsgApplyStrangeCountTransfer * @static - * @param {ICMsgApplyStrangeCountTransfer=} [properties] Properties to set + * @param {CMsgApplyStrangeCountTransfer.$Properties=} [properties] Properties to set * @returns {CMsgApplyStrangeCountTransfer} CMsgApplyStrangeCountTransfer instance + * @type {{ + * (properties: CMsgApplyStrangeCountTransfer.$Shape): CMsgApplyStrangeCountTransfer & CMsgApplyStrangeCountTransfer.$Shape; + * (properties?: CMsgApplyStrangeCountTransfer.$Properties): CMsgApplyStrangeCountTransfer; + * }} */ - CMsgApplyStrangeCountTransfer.create = function create(properties) { + CMsgApplyStrangeCountTransfer.create = function(properties) { return new CMsgApplyStrangeCountTransfer(properties); }; @@ -5990,19 +7704,26 @@ * @function encode * @memberof CMsgApplyStrangeCountTransfer * @static - * @param {ICMsgApplyStrangeCountTransfer} message CMsgApplyStrangeCountTransfer message or plain object to encode + * @param {CMsgApplyStrangeCountTransfer.$Properties} message CMsgApplyStrangeCountTransfer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangeCountTransfer.encode = function encode(message, writer) { + CMsgApplyStrangeCountTransfer.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.tool_item_id != null && Object.hasOwnProperty.call(message, "tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.tool_item_id); - if (message.item_src_item_id != null && Object.hasOwnProperty.call(message, "item_src_item_id")) + if (message.item_src_item_id != null && $Object.hasOwnProperty.call(message, "item_src_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_src_item_id); - if (message.item_dest_item_id != null && Object.hasOwnProperty.call(message, "item_dest_item_id")) + if (message.item_dest_item_id != null && $Object.hasOwnProperty.call(message, "item_dest_item_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.item_dest_item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6011,12 +7732,12 @@ * @function encodeDelimited * @memberof CMsgApplyStrangeCountTransfer * @static - * @param {ICMsgApplyStrangeCountTransfer} message CMsgApplyStrangeCountTransfer message or plain object to encode + * @param {CMsgApplyStrangeCountTransfer.$Properties} message CMsgApplyStrangeCountTransfer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangeCountTransfer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyStrangeCountTransfer.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6026,31 +7747,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyStrangeCountTransfer} CMsgApplyStrangeCountTransfer + * @returns {CMsgApplyStrangeCountTransfer & CMsgApplyStrangeCountTransfer.$Shape} CMsgApplyStrangeCountTransfer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangeCountTransfer.decode = function decode(reader, length) { + CMsgApplyStrangeCountTransfer.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyStrangeCountTransfer(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyStrangeCountTransfer(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tool_item_id = reader.uint64(); - break; - case 2: - message.item_src_item_id = reader.uint64(); - break; - case 3: - message.item_dest_item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.tool_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_src_item_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_dest_item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6060,11 +7804,11 @@ * @memberof CMsgApplyStrangeCountTransfer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyStrangeCountTransfer} CMsgApplyStrangeCountTransfer + * @returns {CMsgApplyStrangeCountTransfer & CMsgApplyStrangeCountTransfer.$Shape} CMsgApplyStrangeCountTransfer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangeCountTransfer.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyStrangeCountTransfer.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6078,16 +7822,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyStrangeCountTransfer.verify = function verify(message) { + CMsgApplyStrangeCountTransfer.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) if (!$util.isInteger(message.tool_item_id) && !(message.tool_item_id && $util.isInteger(message.tool_item_id.low) && $util.isInteger(message.tool_item_id.high))) return "tool_item_id: integer|Long expected"; - if (message.item_src_item_id != null && message.hasOwnProperty("item_src_item_id")) + if (message.item_src_item_id != null && $Object.hasOwnProperty.call(message, "item_src_item_id")) if (!$util.isInteger(message.item_src_item_id) && !(message.item_src_item_id && $util.isInteger(message.item_src_item_id.low) && $util.isInteger(message.item_src_item_id.high))) return "item_src_item_id: integer|Long expected"; - if (message.item_dest_item_id != null && message.hasOwnProperty("item_dest_item_id")) + if (message.item_dest_item_id != null && $Object.hasOwnProperty.call(message, "item_dest_item_id")) if (!$util.isInteger(message.item_dest_item_id) && !(message.item_dest_item_id && $util.isInteger(message.item_dest_item_id.low) && $util.isInteger(message.item_dest_item_id.high))) return "item_dest_item_id: integer|Long expected"; return null; @@ -6101,33 +7849,39 @@ * @param {Object.} object Plain object * @returns {CMsgApplyStrangeCountTransfer} CMsgApplyStrangeCountTransfer */ - CMsgApplyStrangeCountTransfer.fromObject = function fromObject(object) { + CMsgApplyStrangeCountTransfer.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyStrangeCountTransfer) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyStrangeCountTransfer: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyStrangeCountTransfer(); if (object.tool_item_id != null) if ($util.Long) - (message.tool_item_id = $util.Long.fromValue(object.tool_item_id)).unsigned = true; + message.tool_item_id = $util.Long.fromValue(object.tool_item_id, true); else if (typeof object.tool_item_id === "string") - message.tool_item_id = parseInt(object.tool_item_id, 10); + message.tool_item_id = $parseInt(object.tool_item_id, 10); else if (typeof object.tool_item_id === "number") message.tool_item_id = object.tool_item_id; else if (typeof object.tool_item_id === "object") message.tool_item_id = new $util.LongBits(object.tool_item_id.low >>> 0, object.tool_item_id.high >>> 0).toNumber(true); if (object.item_src_item_id != null) if ($util.Long) - (message.item_src_item_id = $util.Long.fromValue(object.item_src_item_id)).unsigned = true; + message.item_src_item_id = $util.Long.fromValue(object.item_src_item_id, true); else if (typeof object.item_src_item_id === "string") - message.item_src_item_id = parseInt(object.item_src_item_id, 10); + message.item_src_item_id = $parseInt(object.item_src_item_id, 10); else if (typeof object.item_src_item_id === "number") message.item_src_item_id = object.item_src_item_id; else if (typeof object.item_src_item_id === "object") message.item_src_item_id = new $util.LongBits(object.item_src_item_id.low >>> 0, object.item_src_item_id.high >>> 0).toNumber(true); if (object.item_dest_item_id != null) if ($util.Long) - (message.item_dest_item_id = $util.Long.fromValue(object.item_dest_item_id)).unsigned = true; + message.item_dest_item_id = $util.Long.fromValue(object.item_dest_item_id, true); else if (typeof object.item_dest_item_id === "string") - message.item_dest_item_id = parseInt(object.item_dest_item_id, 10); + message.item_dest_item_id = $parseInt(object.item_dest_item_id, 10); else if (typeof object.item_dest_item_id === "number") message.item_dest_item_id = object.item_dest_item_id; else if (typeof object.item_dest_item_id === "object") @@ -6144,42 +7898,52 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyStrangeCountTransfer.toObject = function toObject(message, options) { + CMsgApplyStrangeCountTransfer.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.tool_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.tool_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.tool_item_id = options.longs === String ? "0" : 0; + object.tool_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_src_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_src_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_src_item_id = options.longs === String ? "0" : 0; + object.item_src_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_dest_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_dest_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_dest_item_id = options.longs === String ? "0" : 0; + object.item_dest_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) - if (typeof message.tool_item_id === "number") - object.tool_item_id = options.longs === String ? String(message.tool_item_id) : message.tool_item_id; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.tool_item_id = typeof message.tool_item_id === "number" ? $BigInt(message.tool_item_id) : $util.Long.fromBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.tool_item_id === "number") + object.tool_item_id = options.longs === $String ? $String(message.tool_item_id) : message.tool_item_id; else - object.tool_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; - if (message.item_src_item_id != null && message.hasOwnProperty("item_src_item_id")) - if (typeof message.item_src_item_id === "number") - object.item_src_item_id = options.longs === String ? String(message.item_src_item_id) : message.item_src_item_id; + object.tool_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === $Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; + if (message.item_src_item_id != null && $Object.hasOwnProperty.call(message, "item_src_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_src_item_id = typeof message.item_src_item_id === "number" ? $BigInt(message.item_src_item_id) : $util.Long.fromBits(message.item_src_item_id.low >>> 0, message.item_src_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_src_item_id === "number") + object.item_src_item_id = options.longs === $String ? $String(message.item_src_item_id) : message.item_src_item_id; else - object.item_src_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_src_item_id) : options.longs === Number ? new $util.LongBits(message.item_src_item_id.low >>> 0, message.item_src_item_id.high >>> 0).toNumber(true) : message.item_src_item_id; - if (message.item_dest_item_id != null && message.hasOwnProperty("item_dest_item_id")) - if (typeof message.item_dest_item_id === "number") - object.item_dest_item_id = options.longs === String ? String(message.item_dest_item_id) : message.item_dest_item_id; + object.item_src_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_src_item_id) : options.longs === $Number ? new $util.LongBits(message.item_src_item_id.low >>> 0, message.item_src_item_id.high >>> 0).toNumber(true) : message.item_src_item_id; + if (message.item_dest_item_id != null && $Object.hasOwnProperty.call(message, "item_dest_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_dest_item_id = typeof message.item_dest_item_id === "number" ? $BigInt(message.item_dest_item_id) : $util.Long.fromBits(message.item_dest_item_id.low >>> 0, message.item_dest_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_dest_item_id === "number") + object.item_dest_item_id = options.longs === $String ? $String(message.item_dest_item_id) : message.item_dest_item_id; else - object.item_dest_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_dest_item_id) : options.longs === Number ? new $util.LongBits(message.item_dest_item_id.low >>> 0, message.item_dest_item_id.high >>> 0).toNumber(true) : message.item_dest_item_id; + object.item_dest_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_dest_item_id) : options.longs === $Number ? new $util.LongBits(message.item_dest_item_id.low >>> 0, message.item_dest_item_id.high >>> 0).toNumber(true) : message.item_dest_item_id; return object; }; @@ -6190,8 +7954,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyStrangeCountTransfer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyStrangeCountTransfer.prototype.toJSON = function() { + return CMsgApplyStrangeCountTransfer.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyStrangeCountTransfer + * @function getTypeUrl + * @memberof CMsgApplyStrangeCountTransfer + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyStrangeCountTransfer.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyStrangeCountTransfer"; }; return CMsgApplyStrangeCountTransfer; @@ -6201,26 +7979,39 @@ /** * Properties of a CMsgApplyStrangePart. - * @exports ICMsgApplyStrangePart - * @interface ICMsgApplyStrangePart + * @typedef {Object} CMsgApplyStrangePart.$Properties * @property {number|Long|null} [strange_part_item_id] CMsgApplyStrangePart strange_part_item_id * @property {number|Long|null} [item_item_id] CMsgApplyStrangePart item_item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyStrangePart. + * @exports ICMsgApplyStrangePart + * @interface ICMsgApplyStrangePart + * @augments CMsgApplyStrangePart.$Properties + * @deprecated Use CMsgApplyStrangePart.$Properties instead. + */ + + /** + * Shape of a CMsgApplyStrangePart. + * @typedef {CMsgApplyStrangePart.$Properties} CMsgApplyStrangePart.$Shape */ /** * Constructs a new CMsgApplyStrangePart. * @exports CMsgApplyStrangePart * @classdesc Represents a CMsgApplyStrangePart. - * @implements ICMsgApplyStrangePart * @constructor - * @param {ICMsgApplyStrangePart=} [properties] Properties to set + * @param {CMsgApplyStrangePart.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyStrangePart(properties) { + var CMsgApplyStrangePart = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyStrangePart strange_part_item_id. @@ -6243,10 +8034,14 @@ * @function create * @memberof CMsgApplyStrangePart * @static - * @param {ICMsgApplyStrangePart=} [properties] Properties to set + * @param {CMsgApplyStrangePart.$Properties=} [properties] Properties to set * @returns {CMsgApplyStrangePart} CMsgApplyStrangePart instance + * @type {{ + * (properties: CMsgApplyStrangePart.$Shape): CMsgApplyStrangePart & CMsgApplyStrangePart.$Shape; + * (properties?: CMsgApplyStrangePart.$Properties): CMsgApplyStrangePart; + * }} */ - CMsgApplyStrangePart.create = function create(properties) { + CMsgApplyStrangePart.create = function(properties) { return new CMsgApplyStrangePart(properties); }; @@ -6255,17 +8050,24 @@ * @function encode * @memberof CMsgApplyStrangePart * @static - * @param {ICMsgApplyStrangePart} message CMsgApplyStrangePart message or plain object to encode + * @param {CMsgApplyStrangePart.$Properties} message CMsgApplyStrangePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangePart.encode = function encode(message, writer) { + CMsgApplyStrangePart.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.strange_part_item_id != null && Object.hasOwnProperty.call(message, "strange_part_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.strange_part_item_id); - if (message.item_item_id != null && Object.hasOwnProperty.call(message, "item_item_id")) + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6274,12 +8076,12 @@ * @function encodeDelimited * @memberof CMsgApplyStrangePart * @static - * @param {ICMsgApplyStrangePart} message CMsgApplyStrangePart message or plain object to encode + * @param {CMsgApplyStrangePart.$Properties} message CMsgApplyStrangePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyStrangePart.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6289,28 +8091,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyStrangePart} CMsgApplyStrangePart + * @returns {CMsgApplyStrangePart & CMsgApplyStrangePart.$Shape} CMsgApplyStrangePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangePart.decode = function decode(reader, length) { + CMsgApplyStrangePart.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyStrangePart(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyStrangePart(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.strange_part_item_id = reader.uint64(); - break; - case 2: - message.item_item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.strange_part_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6320,11 +8142,11 @@ * @memberof CMsgApplyStrangePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyStrangePart} CMsgApplyStrangePart + * @returns {CMsgApplyStrangePart & CMsgApplyStrangePart.$Shape} CMsgApplyStrangePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangePart.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyStrangePart.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6338,13 +8160,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyStrangePart.verify = function verify(message) { + CMsgApplyStrangePart.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.strange_part_item_id != null && message.hasOwnProperty("strange_part_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) if (!$util.isInteger(message.strange_part_item_id) && !(message.strange_part_item_id && $util.isInteger(message.strange_part_item_id.low) && $util.isInteger(message.strange_part_item_id.high))) return "strange_part_item_id: integer|Long expected"; - if (message.item_item_id != null && message.hasOwnProperty("item_item_id")) + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) if (!$util.isInteger(message.item_item_id) && !(message.item_item_id && $util.isInteger(message.item_item_id.low) && $util.isInteger(message.item_item_id.high))) return "item_item_id: integer|Long expected"; return null; @@ -6358,24 +8184,30 @@ * @param {Object.} object Plain object * @returns {CMsgApplyStrangePart} CMsgApplyStrangePart */ - CMsgApplyStrangePart.fromObject = function fromObject(object) { + CMsgApplyStrangePart.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyStrangePart) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyStrangePart: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyStrangePart(); if (object.strange_part_item_id != null) if ($util.Long) - (message.strange_part_item_id = $util.Long.fromValue(object.strange_part_item_id)).unsigned = true; + message.strange_part_item_id = $util.Long.fromValue(object.strange_part_item_id, true); else if (typeof object.strange_part_item_id === "string") - message.strange_part_item_id = parseInt(object.strange_part_item_id, 10); + message.strange_part_item_id = $parseInt(object.strange_part_item_id, 10); else if (typeof object.strange_part_item_id === "number") message.strange_part_item_id = object.strange_part_item_id; else if (typeof object.strange_part_item_id === "object") message.strange_part_item_id = new $util.LongBits(object.strange_part_item_id.low >>> 0, object.strange_part_item_id.high >>> 0).toNumber(true); if (object.item_item_id != null) if ($util.Long) - (message.item_item_id = $util.Long.fromValue(object.item_item_id)).unsigned = true; + message.item_item_id = $util.Long.fromValue(object.item_item_id, true); else if (typeof object.item_item_id === "string") - message.item_item_id = parseInt(object.item_item_id, 10); + message.item_item_id = $parseInt(object.item_item_id, 10); else if (typeof object.item_item_id === "number") message.item_item_id = object.item_item_id; else if (typeof object.item_item_id === "object") @@ -6392,32 +8224,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyStrangePart.toObject = function toObject(message, options) { + CMsgApplyStrangePart.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.strange_part_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.strange_part_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.strange_part_item_id = options.longs === String ? "0" : 0; + object.strange_part_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_item_id = options.longs === String ? "0" : 0; + object.item_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.strange_part_item_id != null && message.hasOwnProperty("strange_part_item_id")) - if (typeof message.strange_part_item_id === "number") - object.strange_part_item_id = options.longs === String ? String(message.strange_part_item_id) : message.strange_part_item_id; + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.strange_part_item_id = typeof message.strange_part_item_id === "number" ? $BigInt(message.strange_part_item_id) : $util.Long.fromBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.strange_part_item_id === "number") + object.strange_part_item_id = options.longs === $String ? $String(message.strange_part_item_id) : message.strange_part_item_id; else - object.strange_part_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.strange_part_item_id) : options.longs === Number ? new $util.LongBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0).toNumber(true) : message.strange_part_item_id; - if (message.item_item_id != null && message.hasOwnProperty("item_item_id")) - if (typeof message.item_item_id === "number") - object.item_item_id = options.longs === String ? String(message.item_item_id) : message.item_item_id; + object.strange_part_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.strange_part_item_id) : options.longs === $Number ? new $util.LongBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0).toNumber(true) : message.strange_part_item_id; + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_item_id = typeof message.item_item_id === "number" ? $BigInt(message.item_item_id) : $util.Long.fromBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_item_id === "number") + object.item_item_id = options.longs === $String ? $String(message.item_item_id) : message.item_item_id; else - object.item_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_item_id) : options.longs === Number ? new $util.LongBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0).toNumber(true) : message.item_item_id; + object.item_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_item_id) : options.longs === $Number ? new $util.LongBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0).toNumber(true) : message.item_item_id; return object; }; @@ -6428,8 +8268,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyStrangePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyStrangePart.prototype.toJSON = function() { + return CMsgApplyStrangePart.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyStrangePart + * @function getTypeUrl + * @memberof CMsgApplyStrangePart + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyStrangePart.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyStrangePart"; }; return CMsgApplyStrangePart; @@ -6439,27 +8293,40 @@ /** * Properties of a CMsgApplyStrangeRestriction. - * @exports ICMsgApplyStrangeRestriction - * @interface ICMsgApplyStrangeRestriction + * @typedef {Object} CMsgApplyStrangeRestriction.$Properties * @property {number|Long|null} [strange_part_item_id] CMsgApplyStrangeRestriction strange_part_item_id * @property {number|Long|null} [item_item_id] CMsgApplyStrangeRestriction item_item_id * @property {number|null} [strange_attr_index] CMsgApplyStrangeRestriction strange_attr_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyStrangeRestriction. + * @exports ICMsgApplyStrangeRestriction + * @interface ICMsgApplyStrangeRestriction + * @augments CMsgApplyStrangeRestriction.$Properties + * @deprecated Use CMsgApplyStrangeRestriction.$Properties instead. + */ + + /** + * Shape of a CMsgApplyStrangeRestriction. + * @typedef {CMsgApplyStrangeRestriction.$Properties} CMsgApplyStrangeRestriction.$Shape */ /** * Constructs a new CMsgApplyStrangeRestriction. * @exports CMsgApplyStrangeRestriction * @classdesc Represents a CMsgApplyStrangeRestriction. - * @implements ICMsgApplyStrangeRestriction * @constructor - * @param {ICMsgApplyStrangeRestriction=} [properties] Properties to set + * @param {CMsgApplyStrangeRestriction.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyStrangeRestriction(properties) { + var CMsgApplyStrangeRestriction = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyStrangeRestriction strange_part_item_id. @@ -6490,10 +8357,14 @@ * @function create * @memberof CMsgApplyStrangeRestriction * @static - * @param {ICMsgApplyStrangeRestriction=} [properties] Properties to set + * @param {CMsgApplyStrangeRestriction.$Properties=} [properties] Properties to set * @returns {CMsgApplyStrangeRestriction} CMsgApplyStrangeRestriction instance + * @type {{ + * (properties: CMsgApplyStrangeRestriction.$Shape): CMsgApplyStrangeRestriction & CMsgApplyStrangeRestriction.$Shape; + * (properties?: CMsgApplyStrangeRestriction.$Properties): CMsgApplyStrangeRestriction; + * }} */ - CMsgApplyStrangeRestriction.create = function create(properties) { + CMsgApplyStrangeRestriction.create = function(properties) { return new CMsgApplyStrangeRestriction(properties); }; @@ -6502,19 +8373,26 @@ * @function encode * @memberof CMsgApplyStrangeRestriction * @static - * @param {ICMsgApplyStrangeRestriction} message CMsgApplyStrangeRestriction message or plain object to encode + * @param {CMsgApplyStrangeRestriction.$Properties} message CMsgApplyStrangeRestriction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangeRestriction.encode = function encode(message, writer) { + CMsgApplyStrangeRestriction.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.strange_part_item_id != null && Object.hasOwnProperty.call(message, "strange_part_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.strange_part_item_id); - if (message.item_item_id != null && Object.hasOwnProperty.call(message, "item_item_id")) + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_item_id); - if (message.strange_attr_index != null && Object.hasOwnProperty.call(message, "strange_attr_index")) + if (message.strange_attr_index != null && $Object.hasOwnProperty.call(message, "strange_attr_index")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.strange_attr_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6523,12 +8401,12 @@ * @function encodeDelimited * @memberof CMsgApplyStrangeRestriction * @static - * @param {ICMsgApplyStrangeRestriction} message CMsgApplyStrangeRestriction message or plain object to encode + * @param {CMsgApplyStrangeRestriction.$Properties} message CMsgApplyStrangeRestriction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangeRestriction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyStrangeRestriction.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6538,31 +8416,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyStrangeRestriction} CMsgApplyStrangeRestriction + * @returns {CMsgApplyStrangeRestriction & CMsgApplyStrangeRestriction.$Shape} CMsgApplyStrangeRestriction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangeRestriction.decode = function decode(reader, length) { + CMsgApplyStrangeRestriction.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyStrangeRestriction(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyStrangeRestriction(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.strange_part_item_id = reader.uint64(); - break; - case 2: - message.item_item_id = reader.uint64(); - break; - case 3: - message.strange_attr_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.strange_part_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_item_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.strange_attr_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6572,11 +8473,11 @@ * @memberof CMsgApplyStrangeRestriction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyStrangeRestriction} CMsgApplyStrangeRestriction + * @returns {CMsgApplyStrangeRestriction & CMsgApplyStrangeRestriction.$Shape} CMsgApplyStrangeRestriction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangeRestriction.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyStrangeRestriction.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6590,16 +8491,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyStrangeRestriction.verify = function verify(message) { + CMsgApplyStrangeRestriction.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.strange_part_item_id != null && message.hasOwnProperty("strange_part_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) if (!$util.isInteger(message.strange_part_item_id) && !(message.strange_part_item_id && $util.isInteger(message.strange_part_item_id.low) && $util.isInteger(message.strange_part_item_id.high))) return "strange_part_item_id: integer|Long expected"; - if (message.item_item_id != null && message.hasOwnProperty("item_item_id")) + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) if (!$util.isInteger(message.item_item_id) && !(message.item_item_id && $util.isInteger(message.item_item_id.low) && $util.isInteger(message.item_item_id.high))) return "item_item_id: integer|Long expected"; - if (message.strange_attr_index != null && message.hasOwnProperty("strange_attr_index")) + if (message.strange_attr_index != null && $Object.hasOwnProperty.call(message, "strange_attr_index")) if (!$util.isInteger(message.strange_attr_index)) return "strange_attr_index: integer expected"; return null; @@ -6613,24 +8518,30 @@ * @param {Object.} object Plain object * @returns {CMsgApplyStrangeRestriction} CMsgApplyStrangeRestriction */ - CMsgApplyStrangeRestriction.fromObject = function fromObject(object) { + CMsgApplyStrangeRestriction.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyStrangeRestriction) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyStrangeRestriction: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyStrangeRestriction(); if (object.strange_part_item_id != null) if ($util.Long) - (message.strange_part_item_id = $util.Long.fromValue(object.strange_part_item_id)).unsigned = true; + message.strange_part_item_id = $util.Long.fromValue(object.strange_part_item_id, true); else if (typeof object.strange_part_item_id === "string") - message.strange_part_item_id = parseInt(object.strange_part_item_id, 10); + message.strange_part_item_id = $parseInt(object.strange_part_item_id, 10); else if (typeof object.strange_part_item_id === "number") message.strange_part_item_id = object.strange_part_item_id; else if (typeof object.strange_part_item_id === "object") message.strange_part_item_id = new $util.LongBits(object.strange_part_item_id.low >>> 0, object.strange_part_item_id.high >>> 0).toNumber(true); if (object.item_item_id != null) if ($util.Long) - (message.item_item_id = $util.Long.fromValue(object.item_item_id)).unsigned = true; + message.item_item_id = $util.Long.fromValue(object.item_item_id, true); else if (typeof object.item_item_id === "string") - message.item_item_id = parseInt(object.item_item_id, 10); + message.item_item_id = $parseInt(object.item_item_id, 10); else if (typeof object.item_item_id === "number") message.item_item_id = object.item_item_id; else if (typeof object.item_item_id === "object") @@ -6649,34 +8560,42 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyStrangeRestriction.toObject = function toObject(message, options) { + CMsgApplyStrangeRestriction.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.strange_part_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.strange_part_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.strange_part_item_id = options.longs === String ? "0" : 0; + object.strange_part_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_item_id = options.longs === String ? "0" : 0; + object.item_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.strange_attr_index = 0; } - if (message.strange_part_item_id != null && message.hasOwnProperty("strange_part_item_id")) - if (typeof message.strange_part_item_id === "number") - object.strange_part_item_id = options.longs === String ? String(message.strange_part_item_id) : message.strange_part_item_id; + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.strange_part_item_id = typeof message.strange_part_item_id === "number" ? $BigInt(message.strange_part_item_id) : $util.Long.fromBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.strange_part_item_id === "number") + object.strange_part_item_id = options.longs === $String ? $String(message.strange_part_item_id) : message.strange_part_item_id; else - object.strange_part_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.strange_part_item_id) : options.longs === Number ? new $util.LongBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0).toNumber(true) : message.strange_part_item_id; - if (message.item_item_id != null && message.hasOwnProperty("item_item_id")) - if (typeof message.item_item_id === "number") - object.item_item_id = options.longs === String ? String(message.item_item_id) : message.item_item_id; + object.strange_part_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.strange_part_item_id) : options.longs === $Number ? new $util.LongBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0).toNumber(true) : message.strange_part_item_id; + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_item_id = typeof message.item_item_id === "number" ? $BigInt(message.item_item_id) : $util.Long.fromBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_item_id === "number") + object.item_item_id = options.longs === $String ? $String(message.item_item_id) : message.item_item_id; else - object.item_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_item_id) : options.longs === Number ? new $util.LongBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0).toNumber(true) : message.item_item_id; - if (message.strange_attr_index != null && message.hasOwnProperty("strange_attr_index")) + object.item_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_item_id) : options.longs === $Number ? new $util.LongBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0).toNumber(true) : message.item_item_id; + if (message.strange_attr_index != null && $Object.hasOwnProperty.call(message, "strange_attr_index")) object.strange_attr_index = message.strange_attr_index; return object; }; @@ -6688,8 +8607,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyStrangeRestriction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyStrangeRestriction.prototype.toJSON = function() { + return CMsgApplyStrangeRestriction.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyStrangeRestriction + * @function getTypeUrl + * @memberof CMsgApplyStrangeRestriction + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyStrangeRestriction.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyStrangeRestriction"; }; return CMsgApplyStrangeRestriction; @@ -6699,26 +8632,39 @@ /** * Properties of a CMsgApplyUpgradeCard. - * @exports ICMsgApplyUpgradeCard - * @interface ICMsgApplyUpgradeCard + * @typedef {Object} CMsgApplyUpgradeCard.$Properties * @property {number|Long|null} [upgrade_card_item_id] CMsgApplyUpgradeCard upgrade_card_item_id * @property {number|Long|null} [subject_item_id] CMsgApplyUpgradeCard subject_item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyUpgradeCard. + * @exports ICMsgApplyUpgradeCard + * @interface ICMsgApplyUpgradeCard + * @augments CMsgApplyUpgradeCard.$Properties + * @deprecated Use CMsgApplyUpgradeCard.$Properties instead. + */ + + /** + * Shape of a CMsgApplyUpgradeCard. + * @typedef {CMsgApplyUpgradeCard.$Properties} CMsgApplyUpgradeCard.$Shape */ /** * Constructs a new CMsgApplyUpgradeCard. * @exports CMsgApplyUpgradeCard * @classdesc Represents a CMsgApplyUpgradeCard. - * @implements ICMsgApplyUpgradeCard * @constructor - * @param {ICMsgApplyUpgradeCard=} [properties] Properties to set + * @param {CMsgApplyUpgradeCard.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyUpgradeCard(properties) { + var CMsgApplyUpgradeCard = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyUpgradeCard upgrade_card_item_id. @@ -6741,10 +8687,14 @@ * @function create * @memberof CMsgApplyUpgradeCard * @static - * @param {ICMsgApplyUpgradeCard=} [properties] Properties to set + * @param {CMsgApplyUpgradeCard.$Properties=} [properties] Properties to set * @returns {CMsgApplyUpgradeCard} CMsgApplyUpgradeCard instance + * @type {{ + * (properties: CMsgApplyUpgradeCard.$Shape): CMsgApplyUpgradeCard & CMsgApplyUpgradeCard.$Shape; + * (properties?: CMsgApplyUpgradeCard.$Properties): CMsgApplyUpgradeCard; + * }} */ - CMsgApplyUpgradeCard.create = function create(properties) { + CMsgApplyUpgradeCard.create = function(properties) { return new CMsgApplyUpgradeCard(properties); }; @@ -6753,17 +8703,24 @@ * @function encode * @memberof CMsgApplyUpgradeCard * @static - * @param {ICMsgApplyUpgradeCard} message CMsgApplyUpgradeCard message or plain object to encode + * @param {CMsgApplyUpgradeCard.$Properties} message CMsgApplyUpgradeCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyUpgradeCard.encode = function encode(message, writer) { + CMsgApplyUpgradeCard.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.upgrade_card_item_id != null && Object.hasOwnProperty.call(message, "upgrade_card_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.upgrade_card_item_id != null && $Object.hasOwnProperty.call(message, "upgrade_card_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.upgrade_card_item_id); - if (message.subject_item_id != null && Object.hasOwnProperty.call(message, "subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.subject_item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6772,12 +8729,12 @@ * @function encodeDelimited * @memberof CMsgApplyUpgradeCard * @static - * @param {ICMsgApplyUpgradeCard} message CMsgApplyUpgradeCard message or plain object to encode + * @param {CMsgApplyUpgradeCard.$Properties} message CMsgApplyUpgradeCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyUpgradeCard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyUpgradeCard.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6787,28 +8744,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyUpgradeCard} CMsgApplyUpgradeCard + * @returns {CMsgApplyUpgradeCard & CMsgApplyUpgradeCard.$Shape} CMsgApplyUpgradeCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyUpgradeCard.decode = function decode(reader, length) { + CMsgApplyUpgradeCard.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyUpgradeCard(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyUpgradeCard(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.upgrade_card_item_id = reader.uint64(); - break; - case 2: - message.subject_item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.upgrade_card_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.subject_item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6818,11 +8795,11 @@ * @memberof CMsgApplyUpgradeCard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyUpgradeCard} CMsgApplyUpgradeCard + * @returns {CMsgApplyUpgradeCard & CMsgApplyUpgradeCard.$Shape} CMsgApplyUpgradeCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyUpgradeCard.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyUpgradeCard.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6836,13 +8813,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyUpgradeCard.verify = function verify(message) { + CMsgApplyUpgradeCard.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.upgrade_card_item_id != null && message.hasOwnProperty("upgrade_card_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.upgrade_card_item_id != null && $Object.hasOwnProperty.call(message, "upgrade_card_item_id")) if (!$util.isInteger(message.upgrade_card_item_id) && !(message.upgrade_card_item_id && $util.isInteger(message.upgrade_card_item_id.low) && $util.isInteger(message.upgrade_card_item_id.high))) return "upgrade_card_item_id: integer|Long expected"; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) if (!$util.isInteger(message.subject_item_id) && !(message.subject_item_id && $util.isInteger(message.subject_item_id.low) && $util.isInteger(message.subject_item_id.high))) return "subject_item_id: integer|Long expected"; return null; @@ -6856,24 +8837,30 @@ * @param {Object.} object Plain object * @returns {CMsgApplyUpgradeCard} CMsgApplyUpgradeCard */ - CMsgApplyUpgradeCard.fromObject = function fromObject(object) { + CMsgApplyUpgradeCard.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyUpgradeCard) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyUpgradeCard: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyUpgradeCard(); if (object.upgrade_card_item_id != null) if ($util.Long) - (message.upgrade_card_item_id = $util.Long.fromValue(object.upgrade_card_item_id)).unsigned = true; + message.upgrade_card_item_id = $util.Long.fromValue(object.upgrade_card_item_id, true); else if (typeof object.upgrade_card_item_id === "string") - message.upgrade_card_item_id = parseInt(object.upgrade_card_item_id, 10); + message.upgrade_card_item_id = $parseInt(object.upgrade_card_item_id, 10); else if (typeof object.upgrade_card_item_id === "number") message.upgrade_card_item_id = object.upgrade_card_item_id; else if (typeof object.upgrade_card_item_id === "object") message.upgrade_card_item_id = new $util.LongBits(object.upgrade_card_item_id.low >>> 0, object.upgrade_card_item_id.high >>> 0).toNumber(true); if (object.subject_item_id != null) if ($util.Long) - (message.subject_item_id = $util.Long.fromValue(object.subject_item_id)).unsigned = true; + message.subject_item_id = $util.Long.fromValue(object.subject_item_id, true); else if (typeof object.subject_item_id === "string") - message.subject_item_id = parseInt(object.subject_item_id, 10); + message.subject_item_id = $parseInt(object.subject_item_id, 10); else if (typeof object.subject_item_id === "number") message.subject_item_id = object.subject_item_id; else if (typeof object.subject_item_id === "object") @@ -6890,32 +8877,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyUpgradeCard.toObject = function toObject(message, options) { + CMsgApplyUpgradeCard.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.upgrade_card_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.upgrade_card_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.upgrade_card_item_id = options.longs === String ? "0" : 0; + object.upgrade_card_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.subject_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.subject_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.subject_item_id = options.longs === String ? "0" : 0; + object.subject_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.upgrade_card_item_id != null && message.hasOwnProperty("upgrade_card_item_id")) - if (typeof message.upgrade_card_item_id === "number") - object.upgrade_card_item_id = options.longs === String ? String(message.upgrade_card_item_id) : message.upgrade_card_item_id; + if (message.upgrade_card_item_id != null && $Object.hasOwnProperty.call(message, "upgrade_card_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.upgrade_card_item_id = typeof message.upgrade_card_item_id === "number" ? $BigInt(message.upgrade_card_item_id) : $util.Long.fromBits(message.upgrade_card_item_id.low >>> 0, message.upgrade_card_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.upgrade_card_item_id === "number") + object.upgrade_card_item_id = options.longs === $String ? $String(message.upgrade_card_item_id) : message.upgrade_card_item_id; else - object.upgrade_card_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.upgrade_card_item_id) : options.longs === Number ? new $util.LongBits(message.upgrade_card_item_id.low >>> 0, message.upgrade_card_item_id.high >>> 0).toNumber(true) : message.upgrade_card_item_id; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) - if (typeof message.subject_item_id === "number") - object.subject_item_id = options.longs === String ? String(message.subject_item_id) : message.subject_item_id; + object.upgrade_card_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.upgrade_card_item_id) : options.longs === $Number ? new $util.LongBits(message.upgrade_card_item_id.low >>> 0, message.upgrade_card_item_id.high >>> 0).toNumber(true) : message.upgrade_card_item_id; + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.subject_item_id = typeof message.subject_item_id === "number" ? $BigInt(message.subject_item_id) : $util.Long.fromBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.subject_item_id === "number") + object.subject_item_id = options.longs === $String ? $String(message.subject_item_id) : message.subject_item_id; else - object.subject_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; + object.subject_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === $Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; return object; }; @@ -6926,8 +8921,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyUpgradeCard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyUpgradeCard.prototype.toJSON = function() { + return CMsgApplyUpgradeCard.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyUpgradeCard + * @function getTypeUrl + * @memberof CMsgApplyUpgradeCard + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyUpgradeCard.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyUpgradeCard"; }; return CMsgApplyUpgradeCard; @@ -6937,27 +8946,40 @@ /** * Properties of a CSOEconItemAttribute. - * @exports ICSOEconItemAttribute - * @interface ICSOEconItemAttribute + * @typedef {Object} CSOEconItemAttribute.$Properties * @property {number|null} [def_index] CSOEconItemAttribute def_index * @property {number|null} [value] CSOEconItemAttribute value * @property {Uint8Array|null} [value_bytes] CSOEconItemAttribute value_bytes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconItemAttribute. + * @exports ICSOEconItemAttribute + * @interface ICSOEconItemAttribute + * @augments CSOEconItemAttribute.$Properties + * @deprecated Use CSOEconItemAttribute.$Properties instead. + */ + + /** + * Shape of a CSOEconItemAttribute. + * @typedef {CSOEconItemAttribute.$Properties} CSOEconItemAttribute.$Shape */ /** * Constructs a new CSOEconItemAttribute. * @exports CSOEconItemAttribute * @classdesc Represents a CSOEconItemAttribute. - * @implements ICSOEconItemAttribute * @constructor - * @param {ICSOEconItemAttribute=} [properties] Properties to set + * @param {CSOEconItemAttribute.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconItemAttribute(properties) { + var CSOEconItemAttribute = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconItemAttribute def_index. @@ -6988,10 +9010,14 @@ * @function create * @memberof CSOEconItemAttribute * @static - * @param {ICSOEconItemAttribute=} [properties] Properties to set + * @param {CSOEconItemAttribute.$Properties=} [properties] Properties to set * @returns {CSOEconItemAttribute} CSOEconItemAttribute instance + * @type {{ + * (properties: CSOEconItemAttribute.$Shape): CSOEconItemAttribute & CSOEconItemAttribute.$Shape; + * (properties?: CSOEconItemAttribute.$Properties): CSOEconItemAttribute; + * }} */ - CSOEconItemAttribute.create = function create(properties) { + CSOEconItemAttribute.create = function(properties) { return new CSOEconItemAttribute(properties); }; @@ -7000,19 +9026,26 @@ * @function encode * @memberof CSOEconItemAttribute * @static - * @param {ICSOEconItemAttribute} message CSOEconItemAttribute message or plain object to encode + * @param {CSOEconItemAttribute.$Properties} message CSOEconItemAttribute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemAttribute.encode = function encode(message, writer) { + CSOEconItemAttribute.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.def_index); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.value); - if (message.value_bytes != null && Object.hasOwnProperty.call(message, "value_bytes")) + if (message.value_bytes != null && $Object.hasOwnProperty.call(message, "value_bytes")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.value_bytes); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7021,12 +9054,12 @@ * @function encodeDelimited * @memberof CSOEconItemAttribute * @static - * @param {ICSOEconItemAttribute} message CSOEconItemAttribute message or plain object to encode + * @param {CSOEconItemAttribute.$Properties} message CSOEconItemAttribute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemAttribute.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconItemAttribute.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7036,31 +9069,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconItemAttribute} CSOEconItemAttribute + * @returns {CSOEconItemAttribute & CSOEconItemAttribute.$Shape} CSOEconItemAttribute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemAttribute.decode = function decode(reader, length) { + CSOEconItemAttribute.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconItemAttribute(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconItemAttribute(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.def_index = reader.uint32(); - break; - case 2: - message.value = reader.uint32(); - break; - case 3: - message.value_bytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.def_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.value = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.value_bytes = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7070,11 +9126,11 @@ * @memberof CSOEconItemAttribute * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconItemAttribute} CSOEconItemAttribute + * @returns {CSOEconItemAttribute & CSOEconItemAttribute.$Shape} CSOEconItemAttribute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemAttribute.decodeDelimited = function decodeDelimited(reader) { + CSOEconItemAttribute.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7088,16 +9144,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconItemAttribute.verify = function verify(message) { + CSOEconItemAttribute.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) if (!$util.isInteger(message.def_index)) return "def_index: integer expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isInteger(message.value)) return "value: integer expected"; - if (message.value_bytes != null && message.hasOwnProperty("value_bytes")) + if (message.value_bytes != null && $Object.hasOwnProperty.call(message, "value_bytes")) if (!(message.value_bytes && typeof message.value_bytes.length === "number" || $util.isString(message.value_bytes))) return "value_bytes: buffer expected"; return null; @@ -7111,9 +9171,15 @@ * @param {Object.} object Plain object * @returns {CSOEconItemAttribute} CSOEconItemAttribute */ - CSOEconItemAttribute.fromObject = function fromObject(object) { + CSOEconItemAttribute.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconItemAttribute) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconItemAttribute: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconItemAttribute(); if (object.def_index != null) message.def_index = object.def_index >>> 0; @@ -7122,7 +9188,7 @@ if (object.value_bytes != null) if (typeof object.value_bytes === "string") $util.base64.decode(object.value_bytes, message.value_bytes = $util.newBuffer($util.base64.length(object.value_bytes)), 0); - else if (object.value_bytes.length) + else if (object.value_bytes.length >= 0) message.value_bytes = object.value_bytes; return message; }; @@ -7136,27 +9202,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconItemAttribute.toObject = function toObject(message, options) { + CSOEconItemAttribute.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.def_index = 0; object.value = 0; - if (options.bytes === String) + if (options.bytes === $String) object.value_bytes = ""; else { object.value_bytes = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value_bytes = $util.newBuffer(object.value_bytes); } } - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) object.def_index = message.def_index; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.value_bytes != null && message.hasOwnProperty("value_bytes")) - object.value_bytes = options.bytes === String ? $util.base64.encode(message.value_bytes, 0, message.value_bytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.value_bytes) : message.value_bytes; + if (message.value_bytes != null && $Object.hasOwnProperty.call(message, "value_bytes")) + object.value_bytes = options.bytes === $String ? $util.base64.encode(message.value_bytes, 0, message.value_bytes.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value_bytes) : message.value_bytes; return object; }; @@ -7167,8 +9237,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconItemAttribute.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconItemAttribute.prototype.toJSON = function() { + return CSOEconItemAttribute.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconItemAttribute + * @function getTypeUrl + * @memberof CSOEconItemAttribute + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconItemAttribute.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconItemAttribute"; }; return CSOEconItemAttribute; @@ -7178,26 +9262,39 @@ /** * Properties of a CSOEconItemEquipped. - * @exports ICSOEconItemEquipped - * @interface ICSOEconItemEquipped + * @typedef {Object} CSOEconItemEquipped.$Properties * @property {number|null} [new_class] CSOEconItemEquipped new_class * @property {number|null} [new_slot] CSOEconItemEquipped new_slot + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconItemEquipped. + * @exports ICSOEconItemEquipped + * @interface ICSOEconItemEquipped + * @augments CSOEconItemEquipped.$Properties + * @deprecated Use CSOEconItemEquipped.$Properties instead. + */ + + /** + * Shape of a CSOEconItemEquipped. + * @typedef {CSOEconItemEquipped.$Properties} CSOEconItemEquipped.$Shape */ /** * Constructs a new CSOEconItemEquipped. * @exports CSOEconItemEquipped * @classdesc Represents a CSOEconItemEquipped. - * @implements ICSOEconItemEquipped * @constructor - * @param {ICSOEconItemEquipped=} [properties] Properties to set + * @param {CSOEconItemEquipped.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconItemEquipped(properties) { + var CSOEconItemEquipped = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconItemEquipped new_class. @@ -7220,10 +9317,14 @@ * @function create * @memberof CSOEconItemEquipped * @static - * @param {ICSOEconItemEquipped=} [properties] Properties to set + * @param {CSOEconItemEquipped.$Properties=} [properties] Properties to set * @returns {CSOEconItemEquipped} CSOEconItemEquipped instance + * @type {{ + * (properties: CSOEconItemEquipped.$Shape): CSOEconItemEquipped & CSOEconItemEquipped.$Shape; + * (properties?: CSOEconItemEquipped.$Properties): CSOEconItemEquipped; + * }} */ - CSOEconItemEquipped.create = function create(properties) { + CSOEconItemEquipped.create = function(properties) { return new CSOEconItemEquipped(properties); }; @@ -7232,17 +9333,24 @@ * @function encode * @memberof CSOEconItemEquipped * @static - * @param {ICSOEconItemEquipped} message CSOEconItemEquipped message or plain object to encode + * @param {CSOEconItemEquipped.$Properties} message CSOEconItemEquipped message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemEquipped.encode = function encode(message, writer) { + CSOEconItemEquipped.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.new_class != null && Object.hasOwnProperty.call(message, "new_class")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.new_class); - if (message.new_slot != null && Object.hasOwnProperty.call(message, "new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.new_slot); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7251,12 +9359,12 @@ * @function encodeDelimited * @memberof CSOEconItemEquipped * @static - * @param {ICSOEconItemEquipped} message CSOEconItemEquipped message or plain object to encode + * @param {CSOEconItemEquipped.$Properties} message CSOEconItemEquipped message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemEquipped.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconItemEquipped.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7266,28 +9374,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconItemEquipped} CSOEconItemEquipped + * @returns {CSOEconItemEquipped & CSOEconItemEquipped.$Shape} CSOEconItemEquipped * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemEquipped.decode = function decode(reader, length) { + CSOEconItemEquipped.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconItemEquipped(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconItemEquipped(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.new_class = reader.uint32(); - break; - case 2: - message.new_slot = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.new_class = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.new_slot = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7297,11 +9425,11 @@ * @memberof CSOEconItemEquipped * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconItemEquipped} CSOEconItemEquipped + * @returns {CSOEconItemEquipped & CSOEconItemEquipped.$Shape} CSOEconItemEquipped * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemEquipped.decodeDelimited = function decodeDelimited(reader) { + CSOEconItemEquipped.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7315,13 +9443,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconItemEquipped.verify = function verify(message) { + CSOEconItemEquipped.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.new_class != null && message.hasOwnProperty("new_class")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) if (!$util.isInteger(message.new_class)) return "new_class: integer expected"; - if (message.new_slot != null && message.hasOwnProperty("new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) if (!$util.isInteger(message.new_slot)) return "new_slot: integer expected"; return null; @@ -7335,9 +9467,15 @@ * @param {Object.} object Plain object * @returns {CSOEconItemEquipped} CSOEconItemEquipped */ - CSOEconItemEquipped.fromObject = function fromObject(object) { + CSOEconItemEquipped.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconItemEquipped) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconItemEquipped: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconItemEquipped(); if (object.new_class != null) message.new_class = object.new_class >>> 0; @@ -7355,17 +9493,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconItemEquipped.toObject = function toObject(message, options) { + CSOEconItemEquipped.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.new_class = 0; object.new_slot = 0; } - if (message.new_class != null && message.hasOwnProperty("new_class")) + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) object.new_class = message.new_class; - if (message.new_slot != null && message.hasOwnProperty("new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) object.new_slot = message.new_slot; return object; }; @@ -7377,8 +9519,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconItemEquipped.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconItemEquipped.prototype.toJSON = function() { + return CSOEconItemEquipped.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconItemEquipped + * @function getTypeUrl + * @memberof CSOEconItemEquipped + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconItemEquipped.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconItemEquipped"; }; return CSOEconItemEquipped; @@ -7388,8 +9544,7 @@ /** * Properties of a CSOEconItem. - * @exports ICSOEconItem - * @interface ICSOEconItem + * @typedef {Object} CSOEconItem.$Properties * @property {number|Long|null} [id] CSOEconItem id * @property {number|null} [account_id] CSOEconItem account_id * @property {number|null} [inventory] CSOEconItem inventory @@ -7401,32 +9556,46 @@ * @property {number|null} [origin] CSOEconItem origin * @property {string|null} [custom_name] CSOEconItem custom_name * @property {string|null} [custom_desc] CSOEconItem custom_desc - * @property {Array.|null} [attribute] CSOEconItem attribute - * @property {ICSOEconItem|null} [interior_item] CSOEconItem interior_item + * @property {Array.|null} [attribute] CSOEconItem attribute + * @property {CSOEconItem.$Properties|null} [interior_item] CSOEconItem interior_item * @property {boolean|null} [in_use] CSOEconItem in_use * @property {number|null} [style] CSOEconItem style * @property {number|Long|null} [original_id] CSOEconItem original_id * @property {boolean|null} [contains_equipped_state] CSOEconItem contains_equipped_state - * @property {Array.|null} [equipped_state] CSOEconItem equipped_state + * @property {Array.|null} [equipped_state] CSOEconItem equipped_state * @property {boolean|null} [contains_equipped_state_v2] CSOEconItem contains_equipped_state_v2 + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconItem. + * @exports ICSOEconItem + * @interface ICSOEconItem + * @augments CSOEconItem.$Properties + * @deprecated Use CSOEconItem.$Properties instead. + */ + + /** + * Shape of a CSOEconItem. + * @typedef {CSOEconItem.$Properties} CSOEconItem.$Shape */ /** * Constructs a new CSOEconItem. * @exports CSOEconItem * @classdesc Represents a CSOEconItem. - * @implements ICSOEconItem * @constructor - * @param {ICSOEconItem=} [properties] Properties to set + * @param {CSOEconItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconItem(properties) { + var CSOEconItem = function (properties) { this.attribute = []; this.equipped_state = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconItem id. @@ -7518,7 +9687,7 @@ /** * CSOEconItem attribute. - * @member {Array.} attribute + * @member {Array.} attribute * @memberof CSOEconItem * @instance */ @@ -7526,7 +9695,7 @@ /** * CSOEconItem interior_item. - * @member {ICSOEconItem|null|undefined} interior_item + * @member {CSOEconItem.$Properties|null|undefined} interior_item * @memberof CSOEconItem * @instance */ @@ -7566,7 +9735,7 @@ /** * CSOEconItem equipped_state. - * @member {Array.} equipped_state + * @member {Array.} equipped_state * @memberof CSOEconItem * @instance */ @@ -7585,10 +9754,14 @@ * @function create * @memberof CSOEconItem * @static - * @param {ICSOEconItem=} [properties] Properties to set + * @param {CSOEconItem.$Properties=} [properties] Properties to set * @returns {CSOEconItem} CSOEconItem instance + * @type {{ + * (properties: CSOEconItem.$Shape): CSOEconItem & CSOEconItem.$Shape; + * (properties?: CSOEconItem.$Properties): CSOEconItem; + * }} */ - CSOEconItem.create = function create(properties) { + CSOEconItem.create = function(properties) { return new CSOEconItem(properties); }; @@ -7597,53 +9770,60 @@ * @function encode * @memberof CSOEconItem * @static - * @param {ICSOEconItem} message CSOEconItem message or plain object to encode + * @param {CSOEconItem.$Properties} message CSOEconItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItem.encode = function encode(message, writer) { + CSOEconItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.id); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_id); - if (message.inventory != null && Object.hasOwnProperty.call(message, "inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.inventory); - if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.def_index); - if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.quantity); - if (message.level != null && Object.hasOwnProperty.call(message, "level")) + if (message.level != null && $Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.level); - if (message.quality != null && Object.hasOwnProperty.call(message, "quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.quality); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.flags); - if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.origin); - if (message.custom_name != null && Object.hasOwnProperty.call(message, "custom_name")) + if (message.custom_name != null && $Object.hasOwnProperty.call(message, "custom_name")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.custom_name); - if (message.custom_desc != null && Object.hasOwnProperty.call(message, "custom_desc")) + if (message.custom_desc != null && $Object.hasOwnProperty.call(message, "custom_desc")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.custom_desc); if (message.attribute != null && message.attribute.length) for (var i = 0; i < message.attribute.length; ++i) - $root.CSOEconItemAttribute.encode(message.attribute[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.interior_item != null && Object.hasOwnProperty.call(message, "interior_item")) - $root.CSOEconItem.encode(message.interior_item, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.in_use != null && Object.hasOwnProperty.call(message, "in_use")) + $root.CSOEconItemAttribute.encode(message.attribute[i], writer.uint32(/* id 12, wireType 2 =*/98).fork(), _depth + 1).ldelim(); + if (message.interior_item != null && $Object.hasOwnProperty.call(message, "interior_item")) + $root.CSOEconItem.encode(message.interior_item, writer.uint32(/* id 13, wireType 2 =*/106).fork(), _depth + 1).ldelim(); + if (message.in_use != null && $Object.hasOwnProperty.call(message, "in_use")) writer.uint32(/* id 14, wireType 0 =*/112).bool(message.in_use); - if (message.style != null && Object.hasOwnProperty.call(message, "style")) + if (message.style != null && $Object.hasOwnProperty.call(message, "style")) writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.style); - if (message.original_id != null && Object.hasOwnProperty.call(message, "original_id")) + if (message.original_id != null && $Object.hasOwnProperty.call(message, "original_id")) writer.uint32(/* id 16, wireType 0 =*/128).uint64(message.original_id); - if (message.contains_equipped_state != null && Object.hasOwnProperty.call(message, "contains_equipped_state")) + if (message.contains_equipped_state != null && $Object.hasOwnProperty.call(message, "contains_equipped_state")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.contains_equipped_state); if (message.equipped_state != null && message.equipped_state.length) for (var i = 0; i < message.equipped_state.length; ++i) - $root.CSOEconItemEquipped.encode(message.equipped_state[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.contains_equipped_state_v2 != null && Object.hasOwnProperty.call(message, "contains_equipped_state_v2")) + $root.CSOEconItemEquipped.encode(message.equipped_state[i], writer.uint32(/* id 18, wireType 2 =*/146).fork(), _depth + 1).ldelim(); + if (message.contains_equipped_state_v2 != null && $Object.hasOwnProperty.call(message, "contains_equipped_state_v2")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.contains_equipped_state_v2); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7652,12 +9832,12 @@ * @function encodeDelimited * @memberof CSOEconItem * @static - * @param {ICSOEconItem} message CSOEconItem message or plain object to encode + * @param {CSOEconItem.$Properties} message CSOEconItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7667,83 +9847,154 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconItem} CSOEconItem + * @returns {CSOEconItem & CSOEconItem.$Shape} CSOEconItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItem.decode = function decode(reader, length) { + CSOEconItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - message.account_id = reader.uint32(); - break; - case 3: - message.inventory = reader.uint32(); - break; - case 4: - message.def_index = reader.uint32(); - break; - case 5: - message.quantity = reader.uint32(); - break; - case 6: - message.level = reader.uint32(); - break; - case 7: - message.quality = reader.uint32(); - break; - case 8: - message.flags = reader.uint32(); - break; - case 9: - message.origin = reader.uint32(); - break; - case 10: - message.custom_name = reader.string(); - break; - case 11: - message.custom_desc = reader.string(); - break; - case 12: - if (!(message.attribute && message.attribute.length)) - message.attribute = []; - message.attribute.push($root.CSOEconItemAttribute.decode(reader, reader.uint32())); - break; - case 13: - message.interior_item = $root.CSOEconItem.decode(reader, reader.uint32()); - break; - case 14: - message.in_use = reader.bool(); - break; - case 15: - message.style = reader.uint32(); - break; - case 16: - message.original_id = reader.uint64(); - break; - case 17: - message.contains_equipped_state = reader.bool(); - break; - case 18: - if (!(message.equipped_state && message.equipped_state.length)) - message.equipped_state = []; - message.equipped_state.push($root.CSOEconItemEquipped.decode(reader, reader.uint32())); - break; - case 19: - message.contains_equipped_state_v2 = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.inventory = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.def_index = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.quantity = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.level = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.quality = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.origin = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 2) + break; + message.custom_name = reader.string(); + continue; + } + case 11: { + if (wireType !== 2) + break; + message.custom_desc = reader.string(); + continue; + } + case 12: { + if (wireType !== 2) + break; + if (!(message.attribute && message.attribute.length)) + message.attribute = []; + message.attribute.push($root.CSOEconItemAttribute.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 13: { + if (wireType !== 2) + break; + message.interior_item = $root.CSOEconItem.decode(reader, reader.uint32(), $undefined, _depth + 1, message.interior_item); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.in_use = reader.bool(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.style = reader.uint32(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.original_id = reader.uint64(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.contains_equipped_state = reader.bool(); + continue; + } + case 18: { + if (wireType !== 2) + break; + if (!(message.equipped_state && message.equipped_state.length)) + message.equipped_state = []; + message.equipped_state.push($root.CSOEconItemEquipped.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.contains_equipped_state_v2 = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7753,11 +10004,11 @@ * @memberof CSOEconItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconItem} CSOEconItem + * @returns {CSOEconItem & CSOEconItem.$Shape} CSOEconItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItem.decodeDelimited = function decodeDelimited(reader) { + CSOEconItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7771,78 +10022,82 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconItem.verify = function verify(message) { + CSOEconItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) return "id: integer|Long expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.inventory != null && message.hasOwnProperty("inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) if (!$util.isInteger(message.inventory)) return "inventory: integer expected"; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) if (!$util.isInteger(message.def_index)) return "def_index: integer expected"; - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) if (!$util.isInteger(message.quantity)) return "quantity: integer expected"; - if (message.level != null && message.hasOwnProperty("level")) + if (message.level != null && $Object.hasOwnProperty.call(message, "level")) if (!$util.isInteger(message.level)) return "level: integer expected"; - if (message.quality != null && message.hasOwnProperty("quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) if (!$util.isInteger(message.quality)) return "quality: integer expected"; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.origin != null && message.hasOwnProperty("origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) if (!$util.isInteger(message.origin)) return "origin: integer expected"; - if (message.custom_name != null && message.hasOwnProperty("custom_name")) + if (message.custom_name != null && $Object.hasOwnProperty.call(message, "custom_name")) if (!$util.isString(message.custom_name)) return "custom_name: string expected"; - if (message.custom_desc != null && message.hasOwnProperty("custom_desc")) + if (message.custom_desc != null && $Object.hasOwnProperty.call(message, "custom_desc")) if (!$util.isString(message.custom_desc)) return "custom_desc: string expected"; - if (message.attribute != null && message.hasOwnProperty("attribute")) { - if (!Array.isArray(message.attribute)) + if (message.attribute != null && $Object.hasOwnProperty.call(message, "attribute")) { + if (!$Array.isArray(message.attribute)) return "attribute: array expected"; for (var i = 0; i < message.attribute.length; ++i) { - var error = $root.CSOEconItemAttribute.verify(message.attribute[i]); + var error = $root.CSOEconItemAttribute.verify(message.attribute[i], _depth + 1); if (error) return "attribute." + error; } } - if (message.interior_item != null && message.hasOwnProperty("interior_item")) { - var error = $root.CSOEconItem.verify(message.interior_item); + if (message.interior_item != null && $Object.hasOwnProperty.call(message, "interior_item")) { + var error = $root.CSOEconItem.verify(message.interior_item, _depth + 1); if (error) return "interior_item." + error; } - if (message.in_use != null && message.hasOwnProperty("in_use")) + if (message.in_use != null && $Object.hasOwnProperty.call(message, "in_use")) if (typeof message.in_use !== "boolean") return "in_use: boolean expected"; - if (message.style != null && message.hasOwnProperty("style")) + if (message.style != null && $Object.hasOwnProperty.call(message, "style")) if (!$util.isInteger(message.style)) return "style: integer expected"; - if (message.original_id != null && message.hasOwnProperty("original_id")) + if (message.original_id != null && $Object.hasOwnProperty.call(message, "original_id")) if (!$util.isInteger(message.original_id) && !(message.original_id && $util.isInteger(message.original_id.low) && $util.isInteger(message.original_id.high))) return "original_id: integer|Long expected"; - if (message.contains_equipped_state != null && message.hasOwnProperty("contains_equipped_state")) + if (message.contains_equipped_state != null && $Object.hasOwnProperty.call(message, "contains_equipped_state")) if (typeof message.contains_equipped_state !== "boolean") return "contains_equipped_state: boolean expected"; - if (message.equipped_state != null && message.hasOwnProperty("equipped_state")) { - if (!Array.isArray(message.equipped_state)) + if (message.equipped_state != null && $Object.hasOwnProperty.call(message, "equipped_state")) { + if (!$Array.isArray(message.equipped_state)) return "equipped_state: array expected"; for (var i = 0; i < message.equipped_state.length; ++i) { - var error = $root.CSOEconItemEquipped.verify(message.equipped_state[i]); + var error = $root.CSOEconItemEquipped.verify(message.equipped_state[i], _depth + 1); if (error) return "equipped_state." + error; } } - if (message.contains_equipped_state_v2 != null && message.hasOwnProperty("contains_equipped_state_v2")) + if (message.contains_equipped_state_v2 != null && $Object.hasOwnProperty.call(message, "contains_equipped_state_v2")) if (typeof message.contains_equipped_state_v2 !== "boolean") return "contains_equipped_state_v2: boolean expected"; return null; @@ -7856,15 +10111,21 @@ * @param {Object.} object Plain object * @returns {CSOEconItem} CSOEconItem */ - CSOEconItem.fromObject = function fromObject(object) { + CSOEconItem.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconItem(); if (object.id != null) if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = true; + message.id = $util.Long.fromValue(object.id, true); else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); + message.id = $parseInt(object.id, 10); else if (typeof object.id === "number") message.id = object.id; else if (typeof object.id === "object") @@ -7886,51 +10147,51 @@ if (object.origin != null) message.origin = object.origin >>> 0; if (object.custom_name != null) - message.custom_name = String(object.custom_name); + message.custom_name = $String(object.custom_name); if (object.custom_desc != null) - message.custom_desc = String(object.custom_desc); + message.custom_desc = $String(object.custom_desc); if (object.attribute) { - if (!Array.isArray(object.attribute)) - throw TypeError(".CSOEconItem.attribute: array expected"); - message.attribute = []; + if (!$Array.isArray(object.attribute)) + throw $TypeError(".CSOEconItem.attribute: array expected"); + message.attribute = $Array(object.attribute.length); for (var i = 0; i < object.attribute.length; ++i) { - if (typeof object.attribute[i] !== "object") - throw TypeError(".CSOEconItem.attribute: object expected"); - message.attribute[i] = $root.CSOEconItemAttribute.fromObject(object.attribute[i]); + if (!$util.isObject(object.attribute[i])) + throw $TypeError(".CSOEconItem.attribute: object expected"); + message.attribute[i] = $root.CSOEconItemAttribute.fromObject(object.attribute[i], _depth + 1); } } if (object.interior_item != null) { - if (typeof object.interior_item !== "object") - throw TypeError(".CSOEconItem.interior_item: object expected"); - message.interior_item = $root.CSOEconItem.fromObject(object.interior_item); + if (!$util.isObject(object.interior_item)) + throw $TypeError(".CSOEconItem.interior_item: object expected"); + message.interior_item = $root.CSOEconItem.fromObject(object.interior_item, _depth + 1); } if (object.in_use != null) - message.in_use = Boolean(object.in_use); + message.in_use = $Boolean(object.in_use); if (object.style != null) message.style = object.style >>> 0; if (object.original_id != null) if ($util.Long) - (message.original_id = $util.Long.fromValue(object.original_id)).unsigned = true; + message.original_id = $util.Long.fromValue(object.original_id, true); else if (typeof object.original_id === "string") - message.original_id = parseInt(object.original_id, 10); + message.original_id = $parseInt(object.original_id, 10); else if (typeof object.original_id === "number") message.original_id = object.original_id; else if (typeof object.original_id === "object") message.original_id = new $util.LongBits(object.original_id.low >>> 0, object.original_id.high >>> 0).toNumber(true); if (object.contains_equipped_state != null) - message.contains_equipped_state = Boolean(object.contains_equipped_state); + message.contains_equipped_state = $Boolean(object.contains_equipped_state); if (object.equipped_state) { - if (!Array.isArray(object.equipped_state)) - throw TypeError(".CSOEconItem.equipped_state: array expected"); - message.equipped_state = []; + if (!$Array.isArray(object.equipped_state)) + throw $TypeError(".CSOEconItem.equipped_state: array expected"); + message.equipped_state = $Array(object.equipped_state.length); for (var i = 0; i < object.equipped_state.length; ++i) { - if (typeof object.equipped_state[i] !== "object") - throw TypeError(".CSOEconItem.equipped_state: object expected"); - message.equipped_state[i] = $root.CSOEconItemEquipped.fromObject(object.equipped_state[i]); + if (!$util.isObject(object.equipped_state[i])) + throw $TypeError(".CSOEconItem.equipped_state: object expected"); + message.equipped_state[i] = $root.CSOEconItemEquipped.fromObject(object.equipped_state[i], _depth + 1); } } if (object.contains_equipped_state_v2 != null) - message.contains_equipped_state_v2 = Boolean(object.contains_equipped_state_v2); + message.contains_equipped_state_v2 = $Boolean(object.contains_equipped_state_v2); return message; }; @@ -7943,9 +10204,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconItem.toObject = function toObject(message, options) { + CSOEconItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.attribute = []; @@ -7954,9 +10219,9 @@ if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.id = options.longs === String ? "0" : 0; + object.id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.account_id = 0; object.inventory = 0; object.def_index = 0; @@ -7972,61 +10237,65 @@ object.style = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.original_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.original_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.original_id = options.longs === String ? "0" : 0; + object.original_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.contains_equipped_state = false; object.contains_equipped_state_v2 = false; } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.id = typeof message.id === "number" ? $BigInt(message.id) : $util.Long.fromBits(message.id.low >>> 0, message.id.high >>> 0, true).toBigInt(); + else if (typeof message.id === "number") + object.id = options.longs === $String ? $String(message.id) : message.id; else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; - if (message.account_id != null && message.hasOwnProperty("account_id")) + object.id = options.longs === $String ? $util.Long.prototype.toString.call(message.id) : options.longs === $Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.inventory != null && message.hasOwnProperty("inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) object.inventory = message.inventory; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) object.def_index = message.def_index; - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) object.quantity = message.quantity; - if (message.level != null && message.hasOwnProperty("level")) + if (message.level != null && $Object.hasOwnProperty.call(message, "level")) object.level = message.level; - if (message.quality != null && message.hasOwnProperty("quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) object.quality = message.quality; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.origin != null && message.hasOwnProperty("origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) object.origin = message.origin; - if (message.custom_name != null && message.hasOwnProperty("custom_name")) + if (message.custom_name != null && $Object.hasOwnProperty.call(message, "custom_name")) object.custom_name = message.custom_name; - if (message.custom_desc != null && message.hasOwnProperty("custom_desc")) + if (message.custom_desc != null && $Object.hasOwnProperty.call(message, "custom_desc")) object.custom_desc = message.custom_desc; if (message.attribute && message.attribute.length) { - object.attribute = []; + object.attribute = $Array(message.attribute.length); for (var j = 0; j < message.attribute.length; ++j) - object.attribute[j] = $root.CSOEconItemAttribute.toObject(message.attribute[j], options); + object.attribute[j] = $root.CSOEconItemAttribute.toObject(message.attribute[j], options, _depth + 1); } - if (message.interior_item != null && message.hasOwnProperty("interior_item")) - object.interior_item = $root.CSOEconItem.toObject(message.interior_item, options); - if (message.in_use != null && message.hasOwnProperty("in_use")) + if (message.interior_item != null && $Object.hasOwnProperty.call(message, "interior_item")) + object.interior_item = $root.CSOEconItem.toObject(message.interior_item, options, _depth + 1); + if (message.in_use != null && $Object.hasOwnProperty.call(message, "in_use")) object.in_use = message.in_use; - if (message.style != null && message.hasOwnProperty("style")) + if (message.style != null && $Object.hasOwnProperty.call(message, "style")) object.style = message.style; - if (message.original_id != null && message.hasOwnProperty("original_id")) - if (typeof message.original_id === "number") - object.original_id = options.longs === String ? String(message.original_id) : message.original_id; + if (message.original_id != null && $Object.hasOwnProperty.call(message, "original_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.original_id = typeof message.original_id === "number" ? $BigInt(message.original_id) : $util.Long.fromBits(message.original_id.low >>> 0, message.original_id.high >>> 0, true).toBigInt(); + else if (typeof message.original_id === "number") + object.original_id = options.longs === $String ? $String(message.original_id) : message.original_id; else - object.original_id = options.longs === String ? $util.Long.prototype.toString.call(message.original_id) : options.longs === Number ? new $util.LongBits(message.original_id.low >>> 0, message.original_id.high >>> 0).toNumber(true) : message.original_id; - if (message.contains_equipped_state != null && message.hasOwnProperty("contains_equipped_state")) + object.original_id = options.longs === $String ? $util.Long.prototype.toString.call(message.original_id) : options.longs === $Number ? new $util.LongBits(message.original_id.low >>> 0, message.original_id.high >>> 0).toNumber(true) : message.original_id; + if (message.contains_equipped_state != null && $Object.hasOwnProperty.call(message, "contains_equipped_state")) object.contains_equipped_state = message.contains_equipped_state; if (message.equipped_state && message.equipped_state.length) { - object.equipped_state = []; + object.equipped_state = $Array(message.equipped_state.length); for (var j = 0; j < message.equipped_state.length; ++j) - object.equipped_state[j] = $root.CSOEconItemEquipped.toObject(message.equipped_state[j], options); + object.equipped_state[j] = $root.CSOEconItemEquipped.toObject(message.equipped_state[j], options, _depth + 1); } - if (message.contains_equipped_state_v2 != null && message.hasOwnProperty("contains_equipped_state_v2")) + if (message.contains_equipped_state_v2 != null && $Object.hasOwnProperty.call(message, "contains_equipped_state_v2")) object.contains_equipped_state_v2 = message.contains_equipped_state_v2; return object; }; @@ -8038,8 +10307,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconItem.prototype.toJSON = function() { + return CSOEconItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconItem + * @function getTypeUrl + * @memberof CSOEconItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconItem"; }; return CSOEconItem; @@ -8049,27 +10332,40 @@ /** * Properties of a CMsgAdjustItemEquippedState. - * @exports ICMsgAdjustItemEquippedState - * @interface ICMsgAdjustItemEquippedState + * @typedef {Object} CMsgAdjustItemEquippedState.$Properties * @property {number|Long|null} [item_id] CMsgAdjustItemEquippedState item_id * @property {number|null} [new_class] CMsgAdjustItemEquippedState new_class * @property {number|null} [new_slot] CMsgAdjustItemEquippedState new_slot + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAdjustItemEquippedState. + * @exports ICMsgAdjustItemEquippedState + * @interface ICMsgAdjustItemEquippedState + * @augments CMsgAdjustItemEquippedState.$Properties + * @deprecated Use CMsgAdjustItemEquippedState.$Properties instead. + */ + + /** + * Shape of a CMsgAdjustItemEquippedState. + * @typedef {CMsgAdjustItemEquippedState.$Properties} CMsgAdjustItemEquippedState.$Shape */ /** * Constructs a new CMsgAdjustItemEquippedState. * @exports CMsgAdjustItemEquippedState * @classdesc Represents a CMsgAdjustItemEquippedState. - * @implements ICMsgAdjustItemEquippedState * @constructor - * @param {ICMsgAdjustItemEquippedState=} [properties] Properties to set + * @param {CMsgAdjustItemEquippedState.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAdjustItemEquippedState(properties) { + var CMsgAdjustItemEquippedState = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAdjustItemEquippedState item_id. @@ -8100,10 +10396,14 @@ * @function create * @memberof CMsgAdjustItemEquippedState * @static - * @param {ICMsgAdjustItemEquippedState=} [properties] Properties to set + * @param {CMsgAdjustItemEquippedState.$Properties=} [properties] Properties to set * @returns {CMsgAdjustItemEquippedState} CMsgAdjustItemEquippedState instance + * @type {{ + * (properties: CMsgAdjustItemEquippedState.$Shape): CMsgAdjustItemEquippedState & CMsgAdjustItemEquippedState.$Shape; + * (properties?: CMsgAdjustItemEquippedState.$Properties): CMsgAdjustItemEquippedState; + * }} */ - CMsgAdjustItemEquippedState.create = function create(properties) { + CMsgAdjustItemEquippedState.create = function(properties) { return new CMsgAdjustItemEquippedState(properties); }; @@ -8112,19 +10412,26 @@ * @function encode * @memberof CMsgAdjustItemEquippedState * @static - * @param {ICMsgAdjustItemEquippedState} message CMsgAdjustItemEquippedState message or plain object to encode + * @param {CMsgAdjustItemEquippedState.$Properties} message CMsgAdjustItemEquippedState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAdjustItemEquippedState.encode = function encode(message, writer) { + CMsgAdjustItemEquippedState.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.new_class != null && Object.hasOwnProperty.call(message, "new_class")) + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.new_class); - if (message.new_slot != null && Object.hasOwnProperty.call(message, "new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.new_slot); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8133,12 +10440,12 @@ * @function encodeDelimited * @memberof CMsgAdjustItemEquippedState * @static - * @param {ICMsgAdjustItemEquippedState} message CMsgAdjustItemEquippedState message or plain object to encode + * @param {CMsgAdjustItemEquippedState.$Properties} message CMsgAdjustItemEquippedState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAdjustItemEquippedState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAdjustItemEquippedState.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8148,31 +10455,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAdjustItemEquippedState} CMsgAdjustItemEquippedState + * @returns {CMsgAdjustItemEquippedState & CMsgAdjustItemEquippedState.$Shape} CMsgAdjustItemEquippedState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAdjustItemEquippedState.decode = function decode(reader, length) { + CMsgAdjustItemEquippedState.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAdjustItemEquippedState(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAdjustItemEquippedState(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.new_class = reader.uint32(); - break; - case 3: - message.new_slot = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.new_class = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.new_slot = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8182,11 +10512,11 @@ * @memberof CMsgAdjustItemEquippedState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAdjustItemEquippedState} CMsgAdjustItemEquippedState + * @returns {CMsgAdjustItemEquippedState & CMsgAdjustItemEquippedState.$Shape} CMsgAdjustItemEquippedState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAdjustItemEquippedState.decodeDelimited = function decodeDelimited(reader) { + CMsgAdjustItemEquippedState.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8200,16 +10530,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAdjustItemEquippedState.verify = function verify(message) { + CMsgAdjustItemEquippedState.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.new_class != null && message.hasOwnProperty("new_class")) + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) if (!$util.isInteger(message.new_class)) return "new_class: integer expected"; - if (message.new_slot != null && message.hasOwnProperty("new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) if (!$util.isInteger(message.new_slot)) return "new_slot: integer expected"; return null; @@ -8223,15 +10557,21 @@ * @param {Object.} object Plain object * @returns {CMsgAdjustItemEquippedState} CMsgAdjustItemEquippedState */ - CMsgAdjustItemEquippedState.fromObject = function fromObject(object) { + CMsgAdjustItemEquippedState.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAdjustItemEquippedState) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAdjustItemEquippedState: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAdjustItemEquippedState(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -8252,27 +10592,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAdjustItemEquippedState.toObject = function toObject(message, options) { + CMsgAdjustItemEquippedState.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.new_class = 0; object.new_slot = 0; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.new_class != null && message.hasOwnProperty("new_class")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) object.new_class = message.new_class; - if (message.new_slot != null && message.hasOwnProperty("new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) object.new_slot = message.new_slot; return object; }; @@ -8284,8 +10630,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAdjustItemEquippedState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAdjustItemEquippedState.prototype.toJSON = function() { + return CMsgAdjustItemEquippedState.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAdjustItemEquippedState + * @function getTypeUrl + * @memberof CMsgAdjustItemEquippedState + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAdjustItemEquippedState.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAdjustItemEquippedState"; }; return CMsgAdjustItemEquippedState; @@ -8293,27 +10653,40 @@ $root.CMsgSortItems = (function() { + /** + * Properties of a CMsgSortItems. + * @typedef {Object} CMsgSortItems.$Properties + * @property {number|null} [sort_type] CMsgSortItems sort_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSortItems. * @exports ICMsgSortItems * @interface ICMsgSortItems - * @property {number|null} [sort_type] CMsgSortItems sort_type + * @augments CMsgSortItems.$Properties + * @deprecated Use CMsgSortItems.$Properties instead. + */ + + /** + * Shape of a CMsgSortItems. + * @typedef {CMsgSortItems.$Properties} CMsgSortItems.$Shape */ /** * Constructs a new CMsgSortItems. * @exports CMsgSortItems * @classdesc Represents a CMsgSortItems. - * @implements ICMsgSortItems * @constructor - * @param {ICMsgSortItems=} [properties] Properties to set + * @param {CMsgSortItems.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSortItems(properties) { + var CMsgSortItems = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSortItems sort_type. @@ -8328,10 +10701,14 @@ * @function create * @memberof CMsgSortItems * @static - * @param {ICMsgSortItems=} [properties] Properties to set + * @param {CMsgSortItems.$Properties=} [properties] Properties to set * @returns {CMsgSortItems} CMsgSortItems instance + * @type {{ + * (properties: CMsgSortItems.$Shape): CMsgSortItems & CMsgSortItems.$Shape; + * (properties?: CMsgSortItems.$Properties): CMsgSortItems; + * }} */ - CMsgSortItems.create = function create(properties) { + CMsgSortItems.create = function(properties) { return new CMsgSortItems(properties); }; @@ -8340,15 +10717,22 @@ * @function encode * @memberof CMsgSortItems * @static - * @param {ICMsgSortItems} message CMsgSortItems message or plain object to encode + * @param {CMsgSortItems.$Properties} message CMsgSortItems message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSortItems.encode = function encode(message, writer) { + CMsgSortItems.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.sort_type != null && Object.hasOwnProperty.call(message, "sort_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.sort_type != null && $Object.hasOwnProperty.call(message, "sort_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.sort_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8357,12 +10741,12 @@ * @function encodeDelimited * @memberof CMsgSortItems * @static - * @param {ICMsgSortItems} message CMsgSortItems message or plain object to encode + * @param {CMsgSortItems.$Properties} message CMsgSortItems message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSortItems.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSortItems.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8372,25 +10756,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSortItems} CMsgSortItems + * @returns {CMsgSortItems & CMsgSortItems.$Shape} CMsgSortItems * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSortItems.decode = function decode(reader, length) { + CMsgSortItems.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSortItems(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSortItems(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sort_type = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.sort_type = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8400,11 +10801,11 @@ * @memberof CMsgSortItems * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSortItems} CMsgSortItems + * @returns {CMsgSortItems & CMsgSortItems.$Shape} CMsgSortItems * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSortItems.decodeDelimited = function decodeDelimited(reader) { + CMsgSortItems.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8418,10 +10819,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSortItems.verify = function verify(message) { + CMsgSortItems.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sort_type != null && message.hasOwnProperty("sort_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.sort_type != null && $Object.hasOwnProperty.call(message, "sort_type")) if (!$util.isInteger(message.sort_type)) return "sort_type: integer expected"; return null; @@ -8435,9 +10840,15 @@ * @param {Object.} object Plain object * @returns {CMsgSortItems} CMsgSortItems */ - CMsgSortItems.fromObject = function fromObject(object) { + CMsgSortItems.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSortItems) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSortItems: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSortItems(); if (object.sort_type != null) message.sort_type = object.sort_type >>> 0; @@ -8453,13 +10864,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSortItems.toObject = function toObject(message, options) { + CMsgSortItems.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.sort_type = 0; - if (message.sort_type != null && message.hasOwnProperty("sort_type")) + if (message.sort_type != null && $Object.hasOwnProperty.call(message, "sort_type")) object.sort_type = message.sort_type; return object; }; @@ -8471,8 +10886,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSortItems.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSortItems.prototype.toJSON = function() { + return CMsgSortItems.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSortItems + * @function getTypeUrl + * @memberof CMsgSortItems + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSortItems.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSortItems"; }; return CMsgSortItems; @@ -8482,28 +10911,41 @@ /** * Properties of a CSOEconClaimCode. - * @exports ICSOEconClaimCode - * @interface ICSOEconClaimCode + * @typedef {Object} CSOEconClaimCode.$Properties * @property {number|null} [account_id] CSOEconClaimCode account_id * @property {number|null} [code_type] CSOEconClaimCode code_type * @property {number|null} [time_acquired] CSOEconClaimCode time_acquired * @property {string|null} [code] CSOEconClaimCode code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconClaimCode. + * @exports ICSOEconClaimCode + * @interface ICSOEconClaimCode + * @augments CSOEconClaimCode.$Properties + * @deprecated Use CSOEconClaimCode.$Properties instead. + */ + + /** + * Shape of a CSOEconClaimCode. + * @typedef {CSOEconClaimCode.$Properties} CSOEconClaimCode.$Shape */ /** * Constructs a new CSOEconClaimCode. * @exports CSOEconClaimCode * @classdesc Represents a CSOEconClaimCode. - * @implements ICSOEconClaimCode * @constructor - * @param {ICSOEconClaimCode=} [properties] Properties to set + * @param {CSOEconClaimCode.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconClaimCode(properties) { + var CSOEconClaimCode = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconClaimCode account_id. @@ -8542,10 +10984,14 @@ * @function create * @memberof CSOEconClaimCode * @static - * @param {ICSOEconClaimCode=} [properties] Properties to set + * @param {CSOEconClaimCode.$Properties=} [properties] Properties to set * @returns {CSOEconClaimCode} CSOEconClaimCode instance + * @type {{ + * (properties: CSOEconClaimCode.$Shape): CSOEconClaimCode & CSOEconClaimCode.$Shape; + * (properties?: CSOEconClaimCode.$Properties): CSOEconClaimCode; + * }} */ - CSOEconClaimCode.create = function create(properties) { + CSOEconClaimCode.create = function(properties) { return new CSOEconClaimCode(properties); }; @@ -8554,21 +11000,28 @@ * @function encode * @memberof CSOEconClaimCode * @static - * @param {ICSOEconClaimCode} message CSOEconClaimCode message or plain object to encode + * @param {CSOEconClaimCode.$Properties} message CSOEconClaimCode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconClaimCode.encode = function encode(message, writer) { + CSOEconClaimCode.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.code_type != null && Object.hasOwnProperty.call(message, "code_type")) + if (message.code_type != null && $Object.hasOwnProperty.call(message, "code_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.code_type); - if (message.time_acquired != null && Object.hasOwnProperty.call(message, "time_acquired")) + if (message.time_acquired != null && $Object.hasOwnProperty.call(message, "time_acquired")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.time_acquired); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) + if (message.code != null && $Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8577,12 +11030,12 @@ * @function encodeDelimited * @memberof CSOEconClaimCode * @static - * @param {ICSOEconClaimCode} message CSOEconClaimCode message or plain object to encode + * @param {CSOEconClaimCode.$Properties} message CSOEconClaimCode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconClaimCode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconClaimCode.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8592,34 +11045,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconClaimCode} CSOEconClaimCode + * @returns {CSOEconClaimCode & CSOEconClaimCode.$Shape} CSOEconClaimCode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconClaimCode.decode = function decode(reader, length) { + CSOEconClaimCode.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconClaimCode(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconClaimCode(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.code_type = reader.uint32(); - break; - case 3: - message.time_acquired = reader.uint32(); - break; - case 4: - message.code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.code_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.time_acquired = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8629,11 +11108,11 @@ * @memberof CSOEconClaimCode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconClaimCode} CSOEconClaimCode + * @returns {CSOEconClaimCode & CSOEconClaimCode.$Shape} CSOEconClaimCode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconClaimCode.decodeDelimited = function decodeDelimited(reader) { + CSOEconClaimCode.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8647,19 +11126,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconClaimCode.verify = function verify(message) { + CSOEconClaimCode.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.code_type != null && message.hasOwnProperty("code_type")) + if (message.code_type != null && $Object.hasOwnProperty.call(message, "code_type")) if (!$util.isInteger(message.code_type)) return "code_type: integer expected"; - if (message.time_acquired != null && message.hasOwnProperty("time_acquired")) + if (message.time_acquired != null && $Object.hasOwnProperty.call(message, "time_acquired")) if (!$util.isInteger(message.time_acquired)) return "time_acquired: integer expected"; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && $Object.hasOwnProperty.call(message, "code")) if (!$util.isString(message.code)) return "code: string expected"; return null; @@ -8673,9 +11156,15 @@ * @param {Object.} object Plain object * @returns {CSOEconClaimCode} CSOEconClaimCode */ - CSOEconClaimCode.fromObject = function fromObject(object) { + CSOEconClaimCode.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconClaimCode) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconClaimCode: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconClaimCode(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -8684,7 +11173,7 @@ if (object.time_acquired != null) message.time_acquired = object.time_acquired >>> 0; if (object.code != null) - message.code = String(object.code); + message.code = $String(object.code); return message; }; @@ -8697,9 +11186,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconClaimCode.toObject = function toObject(message, options) { + CSOEconClaimCode.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; @@ -8707,13 +11200,13 @@ object.time_acquired = 0; object.code = ""; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.code_type != null && message.hasOwnProperty("code_type")) + if (message.code_type != null && $Object.hasOwnProperty.call(message, "code_type")) object.code_type = message.code_type; - if (message.time_acquired != null && message.hasOwnProperty("time_acquired")) + if (message.time_acquired != null && $Object.hasOwnProperty.call(message, "time_acquired")) object.time_acquired = message.time_acquired; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && $Object.hasOwnProperty.call(message, "code")) object.code = message.code; return object; }; @@ -8725,8 +11218,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconClaimCode.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconClaimCode.prototype.toJSON = function() { + return CSOEconClaimCode.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconClaimCode + * @function getTypeUrl + * @memberof CSOEconClaimCode + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconClaimCode.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconClaimCode"; }; return CSOEconClaimCode; @@ -8734,27 +11241,40 @@ $root.CMsgStoreGetUserData = (function() { + /** + * Properties of a CMsgStoreGetUserData. + * @typedef {Object} CMsgStoreGetUserData.$Properties + * @property {number|null} [price_sheet_version] CMsgStoreGetUserData price_sheet_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgStoreGetUserData. * @exports ICMsgStoreGetUserData * @interface ICMsgStoreGetUserData - * @property {number|null} [price_sheet_version] CMsgStoreGetUserData price_sheet_version + * @augments CMsgStoreGetUserData.$Properties + * @deprecated Use CMsgStoreGetUserData.$Properties instead. + */ + + /** + * Shape of a CMsgStoreGetUserData. + * @typedef {CMsgStoreGetUserData.$Properties} CMsgStoreGetUserData.$Shape */ /** * Constructs a new CMsgStoreGetUserData. * @exports CMsgStoreGetUserData * @classdesc Represents a CMsgStoreGetUserData. - * @implements ICMsgStoreGetUserData * @constructor - * @param {ICMsgStoreGetUserData=} [properties] Properties to set + * @param {CMsgStoreGetUserData.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgStoreGetUserData(properties) { + var CMsgStoreGetUserData = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgStoreGetUserData price_sheet_version. @@ -8769,10 +11289,14 @@ * @function create * @memberof CMsgStoreGetUserData * @static - * @param {ICMsgStoreGetUserData=} [properties] Properties to set + * @param {CMsgStoreGetUserData.$Properties=} [properties] Properties to set * @returns {CMsgStoreGetUserData} CMsgStoreGetUserData instance + * @type {{ + * (properties: CMsgStoreGetUserData.$Shape): CMsgStoreGetUserData & CMsgStoreGetUserData.$Shape; + * (properties?: CMsgStoreGetUserData.$Properties): CMsgStoreGetUserData; + * }} */ - CMsgStoreGetUserData.create = function create(properties) { + CMsgStoreGetUserData.create = function(properties) { return new CMsgStoreGetUserData(properties); }; @@ -8781,15 +11305,22 @@ * @function encode * @memberof CMsgStoreGetUserData * @static - * @param {ICMsgStoreGetUserData} message CMsgStoreGetUserData message or plain object to encode + * @param {CMsgStoreGetUserData.$Properties} message CMsgStoreGetUserData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgStoreGetUserData.encode = function encode(message, writer) { + CMsgStoreGetUserData.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.price_sheet_version != null && Object.hasOwnProperty.call(message, "price_sheet_version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.price_sheet_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8798,12 +11329,12 @@ * @function encodeDelimited * @memberof CMsgStoreGetUserData * @static - * @param {ICMsgStoreGetUserData} message CMsgStoreGetUserData message or plain object to encode + * @param {CMsgStoreGetUserData.$Properties} message CMsgStoreGetUserData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgStoreGetUserData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgStoreGetUserData.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8813,25 +11344,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgStoreGetUserData} CMsgStoreGetUserData + * @returns {CMsgStoreGetUserData & CMsgStoreGetUserData.$Shape} CMsgStoreGetUserData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgStoreGetUserData.decode = function decode(reader, length) { + CMsgStoreGetUserData.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgStoreGetUserData(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgStoreGetUserData(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price_sheet_version = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.price_sheet_version = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8841,11 +11389,11 @@ * @memberof CMsgStoreGetUserData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgStoreGetUserData} CMsgStoreGetUserData + * @returns {CMsgStoreGetUserData & CMsgStoreGetUserData.$Shape} CMsgStoreGetUserData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgStoreGetUserData.decodeDelimited = function decodeDelimited(reader) { + CMsgStoreGetUserData.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8859,10 +11407,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgStoreGetUserData.verify = function verify(message) { + CMsgStoreGetUserData.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.price_sheet_version != null && message.hasOwnProperty("price_sheet_version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) if (!$util.isInteger(message.price_sheet_version)) return "price_sheet_version: integer expected"; return null; @@ -8876,9 +11428,15 @@ * @param {Object.} object Plain object * @returns {CMsgStoreGetUserData} CMsgStoreGetUserData */ - CMsgStoreGetUserData.fromObject = function fromObject(object) { + CMsgStoreGetUserData.fromObject = function (object, _depth) { if (object instanceof $root.CMsgStoreGetUserData) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgStoreGetUserData: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgStoreGetUserData(); if (object.price_sheet_version != null) message.price_sheet_version = object.price_sheet_version >>> 0; @@ -8894,13 +11452,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgStoreGetUserData.toObject = function toObject(message, options) { + CMsgStoreGetUserData.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.price_sheet_version = 0; - if (message.price_sheet_version != null && message.hasOwnProperty("price_sheet_version")) + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) object.price_sheet_version = message.price_sheet_version; return object; }; @@ -8912,8 +11474,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgStoreGetUserData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgStoreGetUserData.prototype.toJSON = function() { + return CMsgStoreGetUserData.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgStoreGetUserData + * @function getTypeUrl + * @memberof CMsgStoreGetUserData + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgStoreGetUserData.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgStoreGetUserData"; }; return CMsgStoreGetUserData; @@ -8923,8 +11499,7 @@ /** * Properties of a CMsgStoreGetUserDataResponse. - * @exports ICMsgStoreGetUserDataResponse - * @interface ICMsgStoreGetUserDataResponse + * @typedef {Object} CMsgStoreGetUserDataResponse.$Properties * @property {number|null} [result] CMsgStoreGetUserDataResponse result * @property {number|null} [currency] CMsgStoreGetUserDataResponse currency * @property {string|null} [country] CMsgStoreGetUserDataResponse country @@ -8935,23 +11510,37 @@ * @property {Uint8Array|null} [price_sheet] CMsgStoreGetUserDataResponse price_sheet * @property {number|null} [default_item_sort] CMsgStoreGetUserDataResponse default_item_sort * @property {Array.|null} [popular_items] CMsgStoreGetUserDataResponse popular_items + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgStoreGetUserDataResponse. + * @exports ICMsgStoreGetUserDataResponse + * @interface ICMsgStoreGetUserDataResponse + * @augments CMsgStoreGetUserDataResponse.$Properties + * @deprecated Use CMsgStoreGetUserDataResponse.$Properties instead. + */ + + /** + * Shape of a CMsgStoreGetUserDataResponse. + * @typedef {CMsgStoreGetUserDataResponse.$Properties} CMsgStoreGetUserDataResponse.$Shape */ /** * Constructs a new CMsgStoreGetUserDataResponse. * @exports CMsgStoreGetUserDataResponse * @classdesc Represents a CMsgStoreGetUserDataResponse. - * @implements ICMsgStoreGetUserDataResponse * @constructor - * @param {ICMsgStoreGetUserDataResponse=} [properties] Properties to set + * @param {CMsgStoreGetUserDataResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgStoreGetUserDataResponse(properties) { + var CMsgStoreGetUserDataResponse = function (properties) { this.popular_items = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgStoreGetUserDataResponse result. @@ -9038,10 +11627,14 @@ * @function create * @memberof CMsgStoreGetUserDataResponse * @static - * @param {ICMsgStoreGetUserDataResponse=} [properties] Properties to set + * @param {CMsgStoreGetUserDataResponse.$Properties=} [properties] Properties to set * @returns {CMsgStoreGetUserDataResponse} CMsgStoreGetUserDataResponse instance + * @type {{ + * (properties: CMsgStoreGetUserDataResponse.$Shape): CMsgStoreGetUserDataResponse & CMsgStoreGetUserDataResponse.$Shape; + * (properties?: CMsgStoreGetUserDataResponse.$Properties): CMsgStoreGetUserDataResponse; + * }} */ - CMsgStoreGetUserDataResponse.create = function create(properties) { + CMsgStoreGetUserDataResponse.create = function(properties) { return new CMsgStoreGetUserDataResponse(properties); }; @@ -9050,34 +11643,41 @@ * @function encode * @memberof CMsgStoreGetUserDataResponse * @static - * @param {ICMsgStoreGetUserDataResponse} message CMsgStoreGetUserDataResponse message or plain object to encode + * @param {CMsgStoreGetUserDataResponse.$Properties} message CMsgStoreGetUserDataResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgStoreGetUserDataResponse.encode = function encode(message, writer) { + CMsgStoreGetUserDataResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.currency); - if (message.country != null && Object.hasOwnProperty.call(message, "country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.country); - if (message.price_sheet_version != null && Object.hasOwnProperty.call(message, "price_sheet_version")) + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.price_sheet_version); - if (message.experiment_data != null && Object.hasOwnProperty.call(message, "experiment_data")) + if (message.experiment_data != null && $Object.hasOwnProperty.call(message, "experiment_data")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.experiment_data); - if (message.featured_item_idx != null && Object.hasOwnProperty.call(message, "featured_item_idx")) + if (message.featured_item_idx != null && $Object.hasOwnProperty.call(message, "featured_item_idx")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.featured_item_idx); - if (message.show_hat_descriptions != null && Object.hasOwnProperty.call(message, "show_hat_descriptions")) + if (message.show_hat_descriptions != null && $Object.hasOwnProperty.call(message, "show_hat_descriptions")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.show_hat_descriptions); - if (message.price_sheet != null && Object.hasOwnProperty.call(message, "price_sheet")) + if (message.price_sheet != null && $Object.hasOwnProperty.call(message, "price_sheet")) writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.price_sheet); - if (message.default_item_sort != null && Object.hasOwnProperty.call(message, "default_item_sort")) + if (message.default_item_sort != null && $Object.hasOwnProperty.call(message, "default_item_sort")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.default_item_sort); if (message.popular_items != null && message.popular_items.length) for (var i = 0; i < message.popular_items.length; ++i) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.popular_items[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9086,12 +11686,12 @@ * @function encodeDelimited * @memberof CMsgStoreGetUserDataResponse * @static - * @param {ICMsgStoreGetUserDataResponse} message CMsgStoreGetUserDataResponse message or plain object to encode + * @param {CMsgStoreGetUserDataResponse.$Properties} message CMsgStoreGetUserDataResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgStoreGetUserDataResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgStoreGetUserDataResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9101,59 +11701,104 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgStoreGetUserDataResponse} CMsgStoreGetUserDataResponse + * @returns {CMsgStoreGetUserDataResponse & CMsgStoreGetUserDataResponse.$Shape} CMsgStoreGetUserDataResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgStoreGetUserDataResponse.decode = function decode(reader, length) { + CMsgStoreGetUserDataResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgStoreGetUserDataResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgStoreGetUserDataResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - case 2: - message.currency = reader.int32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 3: - message.country = reader.string(); - break; - case 4: - message.price_sheet_version = reader.fixed32(); - break; - case 5: - message.experiment_data = reader.uint64(); - break; - case 6: - message.featured_item_idx = reader.int32(); - break; - case 7: - message.show_hat_descriptions = reader.bool(); - break; - case 8: - message.price_sheet = reader.bytes(); - break; - case 9: - message.default_item_sort = reader.int32(); - break; - case 10: - if (!(message.popular_items && message.popular_items.length)) - message.popular_items = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.popular_items.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.result = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.currency = reader.int32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.country = reader.string(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.price_sheet_version = reader.fixed32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.experiment_data = reader.uint64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.featured_item_idx = reader.int32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.show_hat_descriptions = reader.bool(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.price_sheet = reader.bytes(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.default_item_sort = reader.int32(); + continue; + } + case 10: { + if (wireType === 2) { + if (!(message.popular_items && message.popular_items.length)) + message.popular_items = []; + reader.uint32s(message.popular_items); + continue; + } + if (wireType !== 0) + break; + if (!(message.popular_items && message.popular_items.length)) + message.popular_items = []; message.popular_items.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9163,11 +11808,11 @@ * @memberof CMsgStoreGetUserDataResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgStoreGetUserDataResponse} CMsgStoreGetUserDataResponse + * @returns {CMsgStoreGetUserDataResponse & CMsgStoreGetUserDataResponse.$Shape} CMsgStoreGetUserDataResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgStoreGetUserDataResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgStoreGetUserDataResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9181,38 +11826,42 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgStoreGetUserDataResponse.verify = function verify(message) { + CMsgStoreGetUserDataResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) if (!$util.isInteger(message.currency)) return "currency: integer expected"; - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) if (!$util.isString(message.country)) return "country: string expected"; - if (message.price_sheet_version != null && message.hasOwnProperty("price_sheet_version")) + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) if (!$util.isInteger(message.price_sheet_version)) return "price_sheet_version: integer expected"; - if (message.experiment_data != null && message.hasOwnProperty("experiment_data")) + if (message.experiment_data != null && $Object.hasOwnProperty.call(message, "experiment_data")) if (!$util.isInteger(message.experiment_data) && !(message.experiment_data && $util.isInteger(message.experiment_data.low) && $util.isInteger(message.experiment_data.high))) return "experiment_data: integer|Long expected"; - if (message.featured_item_idx != null && message.hasOwnProperty("featured_item_idx")) + if (message.featured_item_idx != null && $Object.hasOwnProperty.call(message, "featured_item_idx")) if (!$util.isInteger(message.featured_item_idx)) return "featured_item_idx: integer expected"; - if (message.show_hat_descriptions != null && message.hasOwnProperty("show_hat_descriptions")) + if (message.show_hat_descriptions != null && $Object.hasOwnProperty.call(message, "show_hat_descriptions")) if (typeof message.show_hat_descriptions !== "boolean") return "show_hat_descriptions: boolean expected"; - if (message.price_sheet != null && message.hasOwnProperty("price_sheet")) + if (message.price_sheet != null && $Object.hasOwnProperty.call(message, "price_sheet")) if (!(message.price_sheet && typeof message.price_sheet.length === "number" || $util.isString(message.price_sheet))) return "price_sheet: buffer expected"; - if (message.default_item_sort != null && message.hasOwnProperty("default_item_sort")) + if (message.default_item_sort != null && $Object.hasOwnProperty.call(message, "default_item_sort")) if (!$util.isInteger(message.default_item_sort)) return "default_item_sort: integer expected"; - if (message.popular_items != null && message.hasOwnProperty("popular_items")) { - if (!Array.isArray(message.popular_items)) + if (message.popular_items != null && $Object.hasOwnProperty.call(message, "popular_items")) { + if (!$Array.isArray(message.popular_items)) return "popular_items: array expected"; for (var i = 0; i < message.popular_items.length; ++i) if (!$util.isInteger(message.popular_items[i])) @@ -9229,23 +11878,29 @@ * @param {Object.} object Plain object * @returns {CMsgStoreGetUserDataResponse} CMsgStoreGetUserDataResponse */ - CMsgStoreGetUserDataResponse.fromObject = function fromObject(object) { + CMsgStoreGetUserDataResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgStoreGetUserDataResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgStoreGetUserDataResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgStoreGetUserDataResponse(); if (object.result != null) message.result = object.result | 0; if (object.currency != null) message.currency = object.currency | 0; if (object.country != null) - message.country = String(object.country); + message.country = $String(object.country); if (object.price_sheet_version != null) message.price_sheet_version = object.price_sheet_version >>> 0; if (object.experiment_data != null) if ($util.Long) - (message.experiment_data = $util.Long.fromValue(object.experiment_data)).unsigned = true; + message.experiment_data = $util.Long.fromValue(object.experiment_data, true); else if (typeof object.experiment_data === "string") - message.experiment_data = parseInt(object.experiment_data, 10); + message.experiment_data = $parseInt(object.experiment_data, 10); else if (typeof object.experiment_data === "number") message.experiment_data = object.experiment_data; else if (typeof object.experiment_data === "object") @@ -9253,18 +11908,18 @@ if (object.featured_item_idx != null) message.featured_item_idx = object.featured_item_idx | 0; if (object.show_hat_descriptions != null) - message.show_hat_descriptions = Boolean(object.show_hat_descriptions); + message.show_hat_descriptions = $Boolean(object.show_hat_descriptions); if (object.price_sheet != null) if (typeof object.price_sheet === "string") $util.base64.decode(object.price_sheet, message.price_sheet = $util.newBuffer($util.base64.length(object.price_sheet)), 0); - else if (object.price_sheet.length) + else if (object.price_sheet.length >= 0) message.price_sheet = object.price_sheet; if (object.default_item_sort != null) message.default_item_sort = object.default_item_sort | 0; if (object.popular_items) { - if (!Array.isArray(object.popular_items)) - throw TypeError(".CMsgStoreGetUserDataResponse.popular_items: array expected"); - message.popular_items = []; + if (!$Array.isArray(object.popular_items)) + throw $TypeError(".CMsgStoreGetUserDataResponse.popular_items: array expected"); + message.popular_items = $Array(object.popular_items.length); for (var i = 0; i < object.popular_items.length; ++i) message.popular_items[i] = object.popular_items[i] >>> 0; } @@ -9280,9 +11935,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgStoreGetUserDataResponse.toObject = function toObject(message, options) { + CMsgStoreGetUserDataResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.popular_items = []; @@ -9293,43 +11952,45 @@ object.price_sheet_version = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.experiment_data = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.experiment_data = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.experiment_data = options.longs === String ? "0" : 0; + object.experiment_data = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.featured_item_idx = 0; object.show_hat_descriptions = true; - if (options.bytes === String) + if (options.bytes === $String) object.price_sheet = ""; else { object.price_sheet = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.price_sheet = $util.newBuffer(object.price_sheet); } object.default_item_sort = 0; } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) object.currency = message.currency; - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) object.country = message.country; - if (message.price_sheet_version != null && message.hasOwnProperty("price_sheet_version")) + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) object.price_sheet_version = message.price_sheet_version; - if (message.experiment_data != null && message.hasOwnProperty("experiment_data")) - if (typeof message.experiment_data === "number") - object.experiment_data = options.longs === String ? String(message.experiment_data) : message.experiment_data; + if (message.experiment_data != null && $Object.hasOwnProperty.call(message, "experiment_data")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.experiment_data = typeof message.experiment_data === "number" ? $BigInt(message.experiment_data) : $util.Long.fromBits(message.experiment_data.low >>> 0, message.experiment_data.high >>> 0, true).toBigInt(); + else if (typeof message.experiment_data === "number") + object.experiment_data = options.longs === $String ? $String(message.experiment_data) : message.experiment_data; else - object.experiment_data = options.longs === String ? $util.Long.prototype.toString.call(message.experiment_data) : options.longs === Number ? new $util.LongBits(message.experiment_data.low >>> 0, message.experiment_data.high >>> 0).toNumber(true) : message.experiment_data; - if (message.featured_item_idx != null && message.hasOwnProperty("featured_item_idx")) + object.experiment_data = options.longs === $String ? $util.Long.prototype.toString.call(message.experiment_data) : options.longs === $Number ? new $util.LongBits(message.experiment_data.low >>> 0, message.experiment_data.high >>> 0).toNumber(true) : message.experiment_data; + if (message.featured_item_idx != null && $Object.hasOwnProperty.call(message, "featured_item_idx")) object.featured_item_idx = message.featured_item_idx; - if (message.show_hat_descriptions != null && message.hasOwnProperty("show_hat_descriptions")) + if (message.show_hat_descriptions != null && $Object.hasOwnProperty.call(message, "show_hat_descriptions")) object.show_hat_descriptions = message.show_hat_descriptions; - if (message.price_sheet != null && message.hasOwnProperty("price_sheet")) - object.price_sheet = options.bytes === String ? $util.base64.encode(message.price_sheet, 0, message.price_sheet.length) : options.bytes === Array ? Array.prototype.slice.call(message.price_sheet) : message.price_sheet; - if (message.default_item_sort != null && message.hasOwnProperty("default_item_sort")) + if (message.price_sheet != null && $Object.hasOwnProperty.call(message, "price_sheet")) + object.price_sheet = options.bytes === $String ? $util.base64.encode(message.price_sheet, 0, message.price_sheet.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.price_sheet) : message.price_sheet; + if (message.default_item_sort != null && $Object.hasOwnProperty.call(message, "default_item_sort")) object.default_item_sort = message.default_item_sort; if (message.popular_items && message.popular_items.length) { - object.popular_items = []; + object.popular_items = $Array(message.popular_items.length); for (var j = 0; j < message.popular_items.length; ++j) object.popular_items[j] = message.popular_items[j]; } @@ -9343,8 +12004,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgStoreGetUserDataResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgStoreGetUserDataResponse.prototype.toJSON = function() { + return CMsgStoreGetUserDataResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgStoreGetUserDataResponse + * @function getTypeUrl + * @memberof CMsgStoreGetUserDataResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgStoreGetUserDataResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgStoreGetUserDataResponse"; }; return CMsgStoreGetUserDataResponse; @@ -9354,28 +12029,41 @@ /** * Properties of a CMsgUpdateItemSchema. - * @exports ICMsgUpdateItemSchema - * @interface ICMsgUpdateItemSchema + * @typedef {Object} CMsgUpdateItemSchema.$Properties * @property {Uint8Array|null} [items_game] CMsgUpdateItemSchema items_game * @property {number|null} [item_schema_version] CMsgUpdateItemSchema item_schema_version * @property {string|null} [items_game_url] CMsgUpdateItemSchema items_game_url * @property {Uint8Array|null} [signature] CMsgUpdateItemSchema signature + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgUpdateItemSchema. + * @exports ICMsgUpdateItemSchema + * @interface ICMsgUpdateItemSchema + * @augments CMsgUpdateItemSchema.$Properties + * @deprecated Use CMsgUpdateItemSchema.$Properties instead. + */ + + /** + * Shape of a CMsgUpdateItemSchema. + * @typedef {CMsgUpdateItemSchema.$Properties} CMsgUpdateItemSchema.$Shape */ /** * Constructs a new CMsgUpdateItemSchema. * @exports CMsgUpdateItemSchema * @classdesc Represents a CMsgUpdateItemSchema. - * @implements ICMsgUpdateItemSchema * @constructor - * @param {ICMsgUpdateItemSchema=} [properties] Properties to set + * @param {CMsgUpdateItemSchema.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgUpdateItemSchema(properties) { + var CMsgUpdateItemSchema = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgUpdateItemSchema items_game. @@ -9414,10 +12102,14 @@ * @function create * @memberof CMsgUpdateItemSchema * @static - * @param {ICMsgUpdateItemSchema=} [properties] Properties to set + * @param {CMsgUpdateItemSchema.$Properties=} [properties] Properties to set * @returns {CMsgUpdateItemSchema} CMsgUpdateItemSchema instance + * @type {{ + * (properties: CMsgUpdateItemSchema.$Shape): CMsgUpdateItemSchema & CMsgUpdateItemSchema.$Shape; + * (properties?: CMsgUpdateItemSchema.$Properties): CMsgUpdateItemSchema; + * }} */ - CMsgUpdateItemSchema.create = function create(properties) { + CMsgUpdateItemSchema.create = function(properties) { return new CMsgUpdateItemSchema(properties); }; @@ -9426,21 +12118,28 @@ * @function encode * @memberof CMsgUpdateItemSchema * @static - * @param {ICMsgUpdateItemSchema} message CMsgUpdateItemSchema message or plain object to encode + * @param {CMsgUpdateItemSchema.$Properties} message CMsgUpdateItemSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdateItemSchema.encode = function encode(message, writer) { + CMsgUpdateItemSchema.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.items_game != null && Object.hasOwnProperty.call(message, "items_game")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.items_game != null && $Object.hasOwnProperty.call(message, "items_game")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.items_game); - if (message.item_schema_version != null && Object.hasOwnProperty.call(message, "item_schema_version")) + if (message.item_schema_version != null && $Object.hasOwnProperty.call(message, "item_schema_version")) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.item_schema_version); - if (message.items_game_url != null && Object.hasOwnProperty.call(message, "items_game_url")) + if (message.items_game_url != null && $Object.hasOwnProperty.call(message, "items_game_url")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.items_game_url); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signature); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9449,12 +12148,12 @@ * @function encodeDelimited * @memberof CMsgUpdateItemSchema * @static - * @param {ICMsgUpdateItemSchema} message CMsgUpdateItemSchema message or plain object to encode + * @param {CMsgUpdateItemSchema.$Properties} message CMsgUpdateItemSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdateItemSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgUpdateItemSchema.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9464,34 +12163,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgUpdateItemSchema} CMsgUpdateItemSchema + * @returns {CMsgUpdateItemSchema & CMsgUpdateItemSchema.$Shape} CMsgUpdateItemSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdateItemSchema.decode = function decode(reader, length) { + CMsgUpdateItemSchema.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgUpdateItemSchema(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgUpdateItemSchema(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.items_game = reader.bytes(); - break; - case 2: - message.item_schema_version = reader.fixed32(); - break; - case 3: - message.items_game_url = reader.string(); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.items_game = reader.bytes(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.item_schema_version = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.items_game_url = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.signature = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9501,11 +12226,11 @@ * @memberof CMsgUpdateItemSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgUpdateItemSchema} CMsgUpdateItemSchema + * @returns {CMsgUpdateItemSchema & CMsgUpdateItemSchema.$Shape} CMsgUpdateItemSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdateItemSchema.decodeDelimited = function decodeDelimited(reader) { + CMsgUpdateItemSchema.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9519,19 +12244,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgUpdateItemSchema.verify = function verify(message) { + CMsgUpdateItemSchema.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.items_game != null && message.hasOwnProperty("items_game")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.items_game != null && $Object.hasOwnProperty.call(message, "items_game")) if (!(message.items_game && typeof message.items_game.length === "number" || $util.isString(message.items_game))) return "items_game: buffer expected"; - if (message.item_schema_version != null && message.hasOwnProperty("item_schema_version")) + if (message.item_schema_version != null && $Object.hasOwnProperty.call(message, "item_schema_version")) if (!$util.isInteger(message.item_schema_version)) return "item_schema_version: integer expected"; - if (message.items_game_url != null && message.hasOwnProperty("items_game_url")) + if (message.items_game_url != null && $Object.hasOwnProperty.call(message, "items_game_url")) if (!$util.isString(message.items_game_url)) return "items_game_url: string expected"; - if (message.signature != null && message.hasOwnProperty("signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; return null; @@ -9545,23 +12274,29 @@ * @param {Object.} object Plain object * @returns {CMsgUpdateItemSchema} CMsgUpdateItemSchema */ - CMsgUpdateItemSchema.fromObject = function fromObject(object) { + CMsgUpdateItemSchema.fromObject = function (object, _depth) { if (object instanceof $root.CMsgUpdateItemSchema) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgUpdateItemSchema: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgUpdateItemSchema(); if (object.items_game != null) if (typeof object.items_game === "string") $util.base64.decode(object.items_game, message.items_game = $util.newBuffer($util.base64.length(object.items_game)), 0); - else if (object.items_game.length) + else if (object.items_game.length >= 0) message.items_game = object.items_game; if (object.item_schema_version != null) message.item_schema_version = object.item_schema_version >>> 0; if (object.items_game_url != null) - message.items_game_url = String(object.items_game_url); + message.items_game_url = $String(object.items_game_url); if (object.signature != null) if (typeof object.signature === "string") $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) + else if (object.signature.length >= 0) message.signature = object.signature; return message; }; @@ -9575,36 +12310,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgUpdateItemSchema.toObject = function toObject(message, options) { + CMsgUpdateItemSchema.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - if (options.bytes === String) + if (options.bytes === $String) object.items_game = ""; else { object.items_game = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.items_game = $util.newBuffer(object.items_game); } object.item_schema_version = 0; object.items_game_url = ""; - if (options.bytes === String) + if (options.bytes === $String) object.signature = ""; else { object.signature = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.signature = $util.newBuffer(object.signature); } } - if (message.items_game != null && message.hasOwnProperty("items_game")) - object.items_game = options.bytes === String ? $util.base64.encode(message.items_game, 0, message.items_game.length) : options.bytes === Array ? Array.prototype.slice.call(message.items_game) : message.items_game; - if (message.item_schema_version != null && message.hasOwnProperty("item_schema_version")) + if (message.items_game != null && $Object.hasOwnProperty.call(message, "items_game")) + object.items_game = options.bytes === $String ? $util.base64.encode(message.items_game, 0, message.items_game.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.items_game) : message.items_game; + if (message.item_schema_version != null && $Object.hasOwnProperty.call(message, "item_schema_version")) object.item_schema_version = message.item_schema_version; - if (message.items_game_url != null && message.hasOwnProperty("items_game_url")) + if (message.items_game_url != null && $Object.hasOwnProperty.call(message, "items_game_url")) object.items_game_url = message.items_game_url; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) + object.signature = options.bytes === $String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.signature) : message.signature; return object; }; @@ -9615,8 +12354,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgUpdateItemSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgUpdateItemSchema.prototype.toJSON = function() { + return CMsgUpdateItemSchema.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgUpdateItemSchema + * @function getTypeUrl + * @memberof CMsgUpdateItemSchema + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgUpdateItemSchema.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgUpdateItemSchema"; }; return CMsgUpdateItemSchema; @@ -9624,27 +12377,40 @@ $root.CMsgGCError = (function() { + /** + * Properties of a CMsgGCError. + * @typedef {Object} CMsgGCError.$Properties + * @property {string|null} [error_text] CMsgGCError error_text + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCError. * @exports ICMsgGCError * @interface ICMsgGCError - * @property {string|null} [error_text] CMsgGCError error_text + * @augments CMsgGCError.$Properties + * @deprecated Use CMsgGCError.$Properties instead. + */ + + /** + * Shape of a CMsgGCError. + * @typedef {CMsgGCError.$Properties} CMsgGCError.$Shape */ /** * Constructs a new CMsgGCError. * @exports CMsgGCError * @classdesc Represents a CMsgGCError. - * @implements ICMsgGCError * @constructor - * @param {ICMsgGCError=} [properties] Properties to set + * @param {CMsgGCError.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCError(properties) { + var CMsgGCError = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCError error_text. @@ -9659,10 +12425,14 @@ * @function create * @memberof CMsgGCError * @static - * @param {ICMsgGCError=} [properties] Properties to set + * @param {CMsgGCError.$Properties=} [properties] Properties to set * @returns {CMsgGCError} CMsgGCError instance + * @type {{ + * (properties: CMsgGCError.$Shape): CMsgGCError & CMsgGCError.$Shape; + * (properties?: CMsgGCError.$Properties): CMsgGCError; + * }} */ - CMsgGCError.create = function create(properties) { + CMsgGCError.create = function(properties) { return new CMsgGCError(properties); }; @@ -9671,15 +12441,22 @@ * @function encode * @memberof CMsgGCError * @static - * @param {ICMsgGCError} message CMsgGCError message or plain object to encode + * @param {CMsgGCError.$Properties} message CMsgGCError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCError.encode = function encode(message, writer) { + CMsgGCError.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.error_text != null && Object.hasOwnProperty.call(message, "error_text")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.error_text != null && $Object.hasOwnProperty.call(message, "error_text")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.error_text); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9688,12 +12465,12 @@ * @function encodeDelimited * @memberof CMsgGCError * @static - * @param {ICMsgGCError} message CMsgGCError message or plain object to encode + * @param {CMsgGCError.$Properties} message CMsgGCError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCError.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9703,25 +12480,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCError} CMsgGCError + * @returns {CMsgGCError & CMsgGCError.$Shape} CMsgGCError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCError.decode = function decode(reader, length) { + CMsgGCError.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCError(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCError(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error_text = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.error_text = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9731,11 +12525,11 @@ * @memberof CMsgGCError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCError} CMsgGCError + * @returns {CMsgGCError & CMsgGCError.$Shape} CMsgGCError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCError.decodeDelimited = function decodeDelimited(reader) { + CMsgGCError.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9749,10 +12543,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCError.verify = function verify(message) { + CMsgGCError.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.error_text != null && message.hasOwnProperty("error_text")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.error_text != null && $Object.hasOwnProperty.call(message, "error_text")) if (!$util.isString(message.error_text)) return "error_text: string expected"; return null; @@ -9766,12 +12564,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCError} CMsgGCError */ - CMsgGCError.fromObject = function fromObject(object) { + CMsgGCError.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCError) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCError: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCError(); if (object.error_text != null) - message.error_text = String(object.error_text); + message.error_text = $String(object.error_text); return message; }; @@ -9784,13 +12588,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCError.toObject = function toObject(message, options) { + CMsgGCError.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.error_text = ""; - if (message.error_text != null && message.hasOwnProperty("error_text")) + if (message.error_text != null && $Object.hasOwnProperty.call(message, "error_text")) object.error_text = message.error_text; return object; }; @@ -9802,8 +12610,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCError.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCError.prototype.toJSON = function() { + return CMsgGCError.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCError + * @function getTypeUrl + * @memberof CMsgGCError + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCError.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCError"; }; return CMsgGCError; @@ -9811,36 +12633,53 @@ $root.CMsgRequestInventoryRefresh = (function() { + /** + * Properties of a CMsgRequestInventoryRefresh. + * @typedef {Object} CMsgRequestInventoryRefresh.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgRequestInventoryRefresh. * @exports ICMsgRequestInventoryRefresh * @interface ICMsgRequestInventoryRefresh + * @augments CMsgRequestInventoryRefresh.$Properties + * @deprecated Use CMsgRequestInventoryRefresh.$Properties instead. + */ + + /** + * Shape of a CMsgRequestInventoryRefresh. + * @typedef {CMsgRequestInventoryRefresh.$Properties} CMsgRequestInventoryRefresh.$Shape */ /** * Constructs a new CMsgRequestInventoryRefresh. * @exports CMsgRequestInventoryRefresh * @classdesc Represents a CMsgRequestInventoryRefresh. - * @implements ICMsgRequestInventoryRefresh * @constructor - * @param {ICMsgRequestInventoryRefresh=} [properties] Properties to set + * @param {CMsgRequestInventoryRefresh.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgRequestInventoryRefresh(properties) { + var CMsgRequestInventoryRefresh = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgRequestInventoryRefresh instance using the specified properties. * @function create * @memberof CMsgRequestInventoryRefresh * @static - * @param {ICMsgRequestInventoryRefresh=} [properties] Properties to set + * @param {CMsgRequestInventoryRefresh.$Properties=} [properties] Properties to set * @returns {CMsgRequestInventoryRefresh} CMsgRequestInventoryRefresh instance + * @type {{ + * (properties: CMsgRequestInventoryRefresh.$Shape): CMsgRequestInventoryRefresh & CMsgRequestInventoryRefresh.$Shape; + * (properties?: CMsgRequestInventoryRefresh.$Properties): CMsgRequestInventoryRefresh; + * }} */ - CMsgRequestInventoryRefresh.create = function create(properties) { + CMsgRequestInventoryRefresh.create = function(properties) { return new CMsgRequestInventoryRefresh(properties); }; @@ -9849,13 +12688,20 @@ * @function encode * @memberof CMsgRequestInventoryRefresh * @static - * @param {ICMsgRequestInventoryRefresh} message CMsgRequestInventoryRefresh message or plain object to encode + * @param {CMsgRequestInventoryRefresh.$Properties} message CMsgRequestInventoryRefresh message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestInventoryRefresh.encode = function encode(message, writer) { + CMsgRequestInventoryRefresh.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9864,12 +12710,12 @@ * @function encodeDelimited * @memberof CMsgRequestInventoryRefresh * @static - * @param {ICMsgRequestInventoryRefresh} message CMsgRequestInventoryRefresh message or plain object to encode + * @param {CMsgRequestInventoryRefresh.$Properties} message CMsgRequestInventoryRefresh message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestInventoryRefresh.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgRequestInventoryRefresh.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9879,22 +12725,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgRequestInventoryRefresh} CMsgRequestInventoryRefresh + * @returns {CMsgRequestInventoryRefresh & CMsgRequestInventoryRefresh.$Shape} CMsgRequestInventoryRefresh * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestInventoryRefresh.decode = function decode(reader, length) { + CMsgRequestInventoryRefresh.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgRequestInventoryRefresh(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgRequestInventoryRefresh(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9904,11 +12761,11 @@ * @memberof CMsgRequestInventoryRefresh * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgRequestInventoryRefresh} CMsgRequestInventoryRefresh + * @returns {CMsgRequestInventoryRefresh & CMsgRequestInventoryRefresh.$Shape} CMsgRequestInventoryRefresh * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestInventoryRefresh.decodeDelimited = function decodeDelimited(reader) { + CMsgRequestInventoryRefresh.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9922,9 +12779,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgRequestInventoryRefresh.verify = function verify(message) { + CMsgRequestInventoryRefresh.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -9936,9 +12797,15 @@ * @param {Object.} object Plain object * @returns {CMsgRequestInventoryRefresh} CMsgRequestInventoryRefresh */ - CMsgRequestInventoryRefresh.fromObject = function fromObject(object) { + CMsgRequestInventoryRefresh.fromObject = function (object, _depth) { if (object instanceof $root.CMsgRequestInventoryRefresh) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgRequestInventoryRefresh: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgRequestInventoryRefresh(); }; @@ -9951,7 +12818,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgRequestInventoryRefresh.toObject = function toObject() { + CMsgRequestInventoryRefresh.toObject = function () { return {}; }; @@ -9962,8 +12829,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgRequestInventoryRefresh.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgRequestInventoryRefresh.prototype.toJSON = function() { + return CMsgRequestInventoryRefresh.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgRequestInventoryRefresh + * @function getTypeUrl + * @memberof CMsgRequestInventoryRefresh + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgRequestInventoryRefresh.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgRequestInventoryRefresh"; }; return CMsgRequestInventoryRefresh; @@ -9973,26 +12854,39 @@ /** * Properties of a CMsgConVarValue. - * @exports ICMsgConVarValue - * @interface ICMsgConVarValue + * @typedef {Object} CMsgConVarValue.$Properties * @property {string|null} [name] CMsgConVarValue name * @property {string|null} [value] CMsgConVarValue value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgConVarValue. + * @exports ICMsgConVarValue + * @interface ICMsgConVarValue + * @augments CMsgConVarValue.$Properties + * @deprecated Use CMsgConVarValue.$Properties instead. + */ + + /** + * Shape of a CMsgConVarValue. + * @typedef {CMsgConVarValue.$Properties} CMsgConVarValue.$Shape */ /** * Constructs a new CMsgConVarValue. * @exports CMsgConVarValue * @classdesc Represents a CMsgConVarValue. - * @implements ICMsgConVarValue * @constructor - * @param {ICMsgConVarValue=} [properties] Properties to set + * @param {CMsgConVarValue.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgConVarValue(properties) { + var CMsgConVarValue = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgConVarValue name. @@ -10015,10 +12909,14 @@ * @function create * @memberof CMsgConVarValue * @static - * @param {ICMsgConVarValue=} [properties] Properties to set + * @param {CMsgConVarValue.$Properties=} [properties] Properties to set * @returns {CMsgConVarValue} CMsgConVarValue instance + * @type {{ + * (properties: CMsgConVarValue.$Shape): CMsgConVarValue & CMsgConVarValue.$Shape; + * (properties?: CMsgConVarValue.$Properties): CMsgConVarValue; + * }} */ - CMsgConVarValue.create = function create(properties) { + CMsgConVarValue.create = function(properties) { return new CMsgConVarValue(properties); }; @@ -10027,17 +12925,24 @@ * @function encode * @memberof CMsgConVarValue * @static - * @param {ICMsgConVarValue} message CMsgConVarValue message or plain object to encode + * @param {CMsgConVarValue.$Properties} message CMsgConVarValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConVarValue.encode = function encode(message, writer) { + CMsgConVarValue.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10046,12 +12951,12 @@ * @function encodeDelimited * @memberof CMsgConVarValue * @static - * @param {ICMsgConVarValue} message CMsgConVarValue message or plain object to encode + * @param {CMsgConVarValue.$Properties} message CMsgConVarValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConVarValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgConVarValue.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10061,28 +12966,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgConVarValue} CMsgConVarValue + * @returns {CMsgConVarValue & CMsgConVarValue.$Shape} CMsgConVarValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConVarValue.decode = function decode(reader, length) { + CMsgConVarValue.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgConVarValue(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgConVarValue(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10092,11 +13017,11 @@ * @memberof CMsgConVarValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgConVarValue} CMsgConVarValue + * @returns {CMsgConVarValue & CMsgConVarValue.$Shape} CMsgConVarValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConVarValue.decodeDelimited = function decodeDelimited(reader) { + CMsgConVarValue.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10110,13 +13035,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgConVarValue.verify = function verify(message) { + CMsgConVarValue.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -10130,14 +13059,20 @@ * @param {Object.} object Plain object * @returns {CMsgConVarValue} CMsgConVarValue */ - CMsgConVarValue.fromObject = function fromObject(object) { + CMsgConVarValue.fromObject = function (object, _depth) { if (object instanceof $root.CMsgConVarValue) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgConVarValue: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgConVarValue(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -10150,17 +13085,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgConVarValue.toObject = function toObject(message, options) { + CMsgConVarValue.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -10172,8 +13111,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgConVarValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgConVarValue.prototype.toJSON = function() { + return CMsgConVarValue.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgConVarValue + * @function getTypeUrl + * @memberof CMsgConVarValue + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgConVarValue.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgConVarValue"; }; return CMsgConVarValue; @@ -10181,32 +13134,45 @@ $root.CMsgReplicateConVars = (function() { + /** + * Properties of a CMsgReplicateConVars. + * @typedef {Object} CMsgReplicateConVars.$Properties + * @property {Array.|null} [convars] CMsgReplicateConVars convars + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgReplicateConVars. * @exports ICMsgReplicateConVars * @interface ICMsgReplicateConVars - * @property {Array.|null} [convars] CMsgReplicateConVars convars + * @augments CMsgReplicateConVars.$Properties + * @deprecated Use CMsgReplicateConVars.$Properties instead. + */ + + /** + * Shape of a CMsgReplicateConVars. + * @typedef {CMsgReplicateConVars.$Properties} CMsgReplicateConVars.$Shape */ /** * Constructs a new CMsgReplicateConVars. * @exports CMsgReplicateConVars * @classdesc Represents a CMsgReplicateConVars. - * @implements ICMsgReplicateConVars * @constructor - * @param {ICMsgReplicateConVars=} [properties] Properties to set + * @param {CMsgReplicateConVars.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgReplicateConVars(properties) { + var CMsgReplicateConVars = function (properties) { this.convars = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgReplicateConVars convars. - * @member {Array.} convars + * @member {Array.} convars * @memberof CMsgReplicateConVars * @instance */ @@ -10217,10 +13183,14 @@ * @function create * @memberof CMsgReplicateConVars * @static - * @param {ICMsgReplicateConVars=} [properties] Properties to set + * @param {CMsgReplicateConVars.$Properties=} [properties] Properties to set * @returns {CMsgReplicateConVars} CMsgReplicateConVars instance + * @type {{ + * (properties: CMsgReplicateConVars.$Shape): CMsgReplicateConVars & CMsgReplicateConVars.$Shape; + * (properties?: CMsgReplicateConVars.$Properties): CMsgReplicateConVars; + * }} */ - CMsgReplicateConVars.create = function create(properties) { + CMsgReplicateConVars.create = function(properties) { return new CMsgReplicateConVars(properties); }; @@ -10229,16 +13199,23 @@ * @function encode * @memberof CMsgReplicateConVars * @static - * @param {ICMsgReplicateConVars} message CMsgReplicateConVars message or plain object to encode + * @param {CMsgReplicateConVars.$Properties} message CMsgReplicateConVars message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplicateConVars.encode = function encode(message, writer) { + CMsgReplicateConVars.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.convars != null && message.convars.length) for (var i = 0; i < message.convars.length; ++i) - $root.CMsgConVarValue.encode(message.convars[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgConVarValue.encode(message.convars[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10247,12 +13224,12 @@ * @function encodeDelimited * @memberof CMsgReplicateConVars * @static - * @param {ICMsgReplicateConVars} message CMsgReplicateConVars message or plain object to encode + * @param {CMsgReplicateConVars.$Properties} message CMsgReplicateConVars message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplicateConVars.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgReplicateConVars.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10262,27 +13239,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgReplicateConVars} CMsgReplicateConVars + * @returns {CMsgReplicateConVars & CMsgReplicateConVars.$Shape} CMsgReplicateConVars * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplicateConVars.decode = function decode(reader, length) { + CMsgReplicateConVars.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgReplicateConVars(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgReplicateConVars(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.convars && message.convars.length)) - message.convars = []; - message.convars.push($root.CMsgConVarValue.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.convars && message.convars.length)) + message.convars = []; + message.convars.push($root.CMsgConVarValue.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10292,11 +13286,11 @@ * @memberof CMsgReplicateConVars * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgReplicateConVars} CMsgReplicateConVars + * @returns {CMsgReplicateConVars & CMsgReplicateConVars.$Shape} CMsgReplicateConVars * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplicateConVars.decodeDelimited = function decodeDelimited(reader) { + CMsgReplicateConVars.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10310,14 +13304,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgReplicateConVars.verify = function verify(message) { + CMsgReplicateConVars.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.convars != null && message.hasOwnProperty("convars")) { - if (!Array.isArray(message.convars)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.convars != null && $Object.hasOwnProperty.call(message, "convars")) { + if (!$Array.isArray(message.convars)) return "convars: array expected"; for (var i = 0; i < message.convars.length; ++i) { - var error = $root.CMsgConVarValue.verify(message.convars[i]); + var error = $root.CMsgConVarValue.verify(message.convars[i], _depth + 1); if (error) return "convars." + error; } @@ -10333,18 +13331,24 @@ * @param {Object.} object Plain object * @returns {CMsgReplicateConVars} CMsgReplicateConVars */ - CMsgReplicateConVars.fromObject = function fromObject(object) { + CMsgReplicateConVars.fromObject = function (object, _depth) { if (object instanceof $root.CMsgReplicateConVars) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgReplicateConVars: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgReplicateConVars(); if (object.convars) { - if (!Array.isArray(object.convars)) - throw TypeError(".CMsgReplicateConVars.convars: array expected"); - message.convars = []; + if (!$Array.isArray(object.convars)) + throw $TypeError(".CMsgReplicateConVars.convars: array expected"); + message.convars = $Array(object.convars.length); for (var i = 0; i < object.convars.length; ++i) { - if (typeof object.convars[i] !== "object") - throw TypeError(".CMsgReplicateConVars.convars: object expected"); - message.convars[i] = $root.CMsgConVarValue.fromObject(object.convars[i]); + if (!$util.isObject(object.convars[i])) + throw $TypeError(".CMsgReplicateConVars.convars: object expected"); + message.convars[i] = $root.CMsgConVarValue.fromObject(object.convars[i], _depth + 1); } } return message; @@ -10359,16 +13363,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgReplicateConVars.toObject = function toObject(message, options) { + CMsgReplicateConVars.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.convars = []; if (message.convars && message.convars.length) { - object.convars = []; + object.convars = $Array(message.convars.length); for (var j = 0; j < message.convars.length; ++j) - object.convars[j] = $root.CMsgConVarValue.toObject(message.convars[j], options); + object.convars[j] = $root.CMsgConVarValue.toObject(message.convars[j], options, _depth + 1); } return object; }; @@ -10380,8 +13388,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgReplicateConVars.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgReplicateConVars.prototype.toJSON = function() { + return CMsgReplicateConVars.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgReplicateConVars + * @function getTypeUrl + * @memberof CMsgReplicateConVars + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgReplicateConVars.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgReplicateConVars"; }; return CMsgReplicateConVars; @@ -10391,31 +13413,44 @@ /** * Properties of a CMsgUseItem. - * @exports ICMsgUseItem - * @interface ICMsgUseItem + * @typedef {Object} CMsgUseItem.$Properties * @property {number|Long|null} [item_id] CMsgUseItem item_id * @property {number|Long|null} [target_steam_id] CMsgUseItem target_steam_id * @property {Array.|null} [gift__potential_targets] CMsgUseItem gift__potential_targets * @property {number|null} [duel__class_lock] CMsgUseItem duel__class_lock * @property {number|Long|null} [initiator_steam_id] CMsgUseItem initiator_steam_id * @property {boolean|null} [itempack__ack_immediately] CMsgUseItem itempack__ack_immediately + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgUseItem. + * @exports ICMsgUseItem + * @interface ICMsgUseItem + * @augments CMsgUseItem.$Properties + * @deprecated Use CMsgUseItem.$Properties instead. + */ + + /** + * Shape of a CMsgUseItem. + * @typedef {CMsgUseItem.$Properties} CMsgUseItem.$Shape */ /** * Constructs a new CMsgUseItem. * @exports CMsgUseItem * @classdesc Represents a CMsgUseItem. - * @implements ICMsgUseItem * @constructor - * @param {ICMsgUseItem=} [properties] Properties to set + * @param {CMsgUseItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgUseItem(properties) { + var CMsgUseItem = function (properties) { this.gift__potential_targets = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgUseItem item_id. @@ -10431,7 +13466,7 @@ * @memberof CMsgUseItem * @instance */ - CMsgUseItem.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgUseItem.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgUseItem gift__potential_targets. @@ -10455,7 +13490,7 @@ * @memberof CMsgUseItem * @instance */ - CMsgUseItem.prototype.initiator_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgUseItem.prototype.initiator_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgUseItem itempack__ack_immediately. @@ -10470,10 +13505,14 @@ * @function create * @memberof CMsgUseItem * @static - * @param {ICMsgUseItem=} [properties] Properties to set + * @param {CMsgUseItem.$Properties=} [properties] Properties to set * @returns {CMsgUseItem} CMsgUseItem instance + * @type {{ + * (properties: CMsgUseItem.$Shape): CMsgUseItem & CMsgUseItem.$Shape; + * (properties?: CMsgUseItem.$Properties): CMsgUseItem; + * }} */ - CMsgUseItem.create = function create(properties) { + CMsgUseItem.create = function(properties) { return new CMsgUseItem(properties); }; @@ -10482,26 +13521,33 @@ * @function encode * @memberof CMsgUseItem * @static - * @param {ICMsgUseItem} message CMsgUseItem message or plain object to encode + * @param {CMsgUseItem.$Properties} message CMsgUseItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUseItem.encode = function encode(message, writer) { + CMsgUseItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.target_steam_id != null && Object.hasOwnProperty.call(message, "target_steam_id")) + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.target_steam_id); if (message.gift__potential_targets != null && message.gift__potential_targets.length) for (var i = 0; i < message.gift__potential_targets.length; ++i) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.gift__potential_targets[i]); - if (message.duel__class_lock != null && Object.hasOwnProperty.call(message, "duel__class_lock")) + if (message.duel__class_lock != null && $Object.hasOwnProperty.call(message, "duel__class_lock")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.duel__class_lock); - if (message.initiator_steam_id != null && Object.hasOwnProperty.call(message, "initiator_steam_id")) + if (message.initiator_steam_id != null && $Object.hasOwnProperty.call(message, "initiator_steam_id")) writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.initiator_steam_id); - if (message.itempack__ack_immediately != null && Object.hasOwnProperty.call(message, "itempack__ack_immediately")) + if (message.itempack__ack_immediately != null && $Object.hasOwnProperty.call(message, "itempack__ack_immediately")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.itempack__ack_immediately); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10510,12 +13556,12 @@ * @function encodeDelimited * @memberof CMsgUseItem * @static - * @param {ICMsgUseItem} message CMsgUseItem message or plain object to encode + * @param {CMsgUseItem.$Properties} message CMsgUseItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUseItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgUseItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10525,47 +13571,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgUseItem} CMsgUseItem + * @returns {CMsgUseItem & CMsgUseItem.$Shape} CMsgUseItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUseItem.decode = function decode(reader, length) { + CMsgUseItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgUseItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgUseItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.target_steam_id = reader.fixed64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 3: - if (!(message.gift__potential_targets && message.gift__potential_targets.length)) - message.gift__potential_targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.gift__potential_targets.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.target_steam_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.gift__potential_targets && message.gift__potential_targets.length)) + message.gift__potential_targets = []; + reader.uint32s(message.gift__potential_targets); + continue; + } + if (wireType !== 0) + break; + if (!(message.gift__potential_targets && message.gift__potential_targets.length)) + message.gift__potential_targets = []; message.gift__potential_targets.push(reader.uint32()); - break; - case 4: - message.duel__class_lock = reader.uint32(); - break; - case 5: - message.initiator_steam_id = reader.fixed64(); - break; - case 6: - message.itempack__ack_immediately = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 4: { + if (wireType !== 0) + break; + message.duel__class_lock = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 1) + break; + message.initiator_steam_id = reader.fixed64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.itempack__ack_immediately = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10575,11 +13654,11 @@ * @memberof CMsgUseItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgUseItem} CMsgUseItem + * @returns {CMsgUseItem & CMsgUseItem.$Shape} CMsgUseItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUseItem.decodeDelimited = function decodeDelimited(reader) { + CMsgUseItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10593,29 +13672,33 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgUseItem.verify = function verify(message) { + CMsgUseItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) if (!$util.isInteger(message.target_steam_id) && !(message.target_steam_id && $util.isInteger(message.target_steam_id.low) && $util.isInteger(message.target_steam_id.high))) return "target_steam_id: integer|Long expected"; - if (message.gift__potential_targets != null && message.hasOwnProperty("gift__potential_targets")) { - if (!Array.isArray(message.gift__potential_targets)) + if (message.gift__potential_targets != null && $Object.hasOwnProperty.call(message, "gift__potential_targets")) { + if (!$Array.isArray(message.gift__potential_targets)) return "gift__potential_targets: array expected"; for (var i = 0; i < message.gift__potential_targets.length; ++i) if (!$util.isInteger(message.gift__potential_targets[i])) return "gift__potential_targets: integer[] expected"; } - if (message.duel__class_lock != null && message.hasOwnProperty("duel__class_lock")) + if (message.duel__class_lock != null && $Object.hasOwnProperty.call(message, "duel__class_lock")) if (!$util.isInteger(message.duel__class_lock)) return "duel__class_lock: integer expected"; - if (message.initiator_steam_id != null && message.hasOwnProperty("initiator_steam_id")) + if (message.initiator_steam_id != null && $Object.hasOwnProperty.call(message, "initiator_steam_id")) if (!$util.isInteger(message.initiator_steam_id) && !(message.initiator_steam_id && $util.isInteger(message.initiator_steam_id.low) && $util.isInteger(message.initiator_steam_id.high))) return "initiator_steam_id: integer|Long expected"; - if (message.itempack__ack_immediately != null && message.hasOwnProperty("itempack__ack_immediately")) + if (message.itempack__ack_immediately != null && $Object.hasOwnProperty.call(message, "itempack__ack_immediately")) if (typeof message.itempack__ack_immediately !== "boolean") return "itempack__ack_immediately: boolean expected"; return null; @@ -10629,32 +13712,38 @@ * @param {Object.} object Plain object * @returns {CMsgUseItem} CMsgUseItem */ - CMsgUseItem.fromObject = function fromObject(object) { + CMsgUseItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgUseItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgUseItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgUseItem(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") message.item_id = new $util.LongBits(object.item_id.low >>> 0, object.item_id.high >>> 0).toNumber(true); if (object.target_steam_id != null) if ($util.Long) - (message.target_steam_id = $util.Long.fromValue(object.target_steam_id)).unsigned = false; + message.target_steam_id = $util.Long.fromValue(object.target_steam_id, true); else if (typeof object.target_steam_id === "string") - message.target_steam_id = parseInt(object.target_steam_id, 10); + message.target_steam_id = $parseInt(object.target_steam_id, 10); else if (typeof object.target_steam_id === "number") message.target_steam_id = object.target_steam_id; else if (typeof object.target_steam_id === "object") - message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(); + message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(true); if (object.gift__potential_targets) { - if (!Array.isArray(object.gift__potential_targets)) - throw TypeError(".CMsgUseItem.gift__potential_targets: array expected"); - message.gift__potential_targets = []; + if (!$Array.isArray(object.gift__potential_targets)) + throw $TypeError(".CMsgUseItem.gift__potential_targets: array expected"); + message.gift__potential_targets = $Array(object.gift__potential_targets.length); for (var i = 0; i < object.gift__potential_targets.length; ++i) message.gift__potential_targets[i] = object.gift__potential_targets[i] >>> 0; } @@ -10662,15 +13751,15 @@ message.duel__class_lock = object.duel__class_lock >>> 0; if (object.initiator_steam_id != null) if ($util.Long) - (message.initiator_steam_id = $util.Long.fromValue(object.initiator_steam_id)).unsigned = false; + message.initiator_steam_id = $util.Long.fromValue(object.initiator_steam_id, true); else if (typeof object.initiator_steam_id === "string") - message.initiator_steam_id = parseInt(object.initiator_steam_id, 10); + message.initiator_steam_id = $parseInt(object.initiator_steam_id, 10); else if (typeof object.initiator_steam_id === "number") message.initiator_steam_id = object.initiator_steam_id; else if (typeof object.initiator_steam_id === "object") - message.initiator_steam_id = new $util.LongBits(object.initiator_steam_id.low >>> 0, object.initiator_steam_id.high >>> 0).toNumber(); + message.initiator_steam_id = new $util.LongBits(object.initiator_steam_id.low >>> 0, object.initiator_steam_id.high >>> 0).toNumber(true); if (object.itempack__ack_immediately != null) - message.itempack__ack_immediately = Boolean(object.itempack__ack_immediately); + message.itempack__ack_immediately = $Boolean(object.itempack__ack_immediately); return message; }; @@ -10683,54 +13772,64 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgUseItem.toObject = function toObject(message, options) { + CMsgUseItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.gift__potential_targets = []; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.target_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.target_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.target_steam_id = options.longs === String ? "0" : 0; + object.target_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.duel__class_lock = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.initiator_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.initiator_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.initiator_steam_id = options.longs === String ? "0" : 0; + object.initiator_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.itempack__ack_immediately = false; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) - if (typeof message.target_steam_id === "number") - object.target_steam_id = options.longs === String ? String(message.target_steam_id) : message.target_steam_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.target_steam_id = typeof message.target_steam_id === "number" ? $BigInt(message.target_steam_id) : $util.Long.fromBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.target_steam_id === "number") + object.target_steam_id = options.longs === $String ? $String(message.target_steam_id) : message.target_steam_id; else - object.target_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber() : message.target_steam_id; + object.target_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === $Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber(true) : message.target_steam_id; if (message.gift__potential_targets && message.gift__potential_targets.length) { - object.gift__potential_targets = []; + object.gift__potential_targets = $Array(message.gift__potential_targets.length); for (var j = 0; j < message.gift__potential_targets.length; ++j) object.gift__potential_targets[j] = message.gift__potential_targets[j]; } - if (message.duel__class_lock != null && message.hasOwnProperty("duel__class_lock")) + if (message.duel__class_lock != null && $Object.hasOwnProperty.call(message, "duel__class_lock")) object.duel__class_lock = message.duel__class_lock; - if (message.initiator_steam_id != null && message.hasOwnProperty("initiator_steam_id")) - if (typeof message.initiator_steam_id === "number") - object.initiator_steam_id = options.longs === String ? String(message.initiator_steam_id) : message.initiator_steam_id; + if (message.initiator_steam_id != null && $Object.hasOwnProperty.call(message, "initiator_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.initiator_steam_id = typeof message.initiator_steam_id === "number" ? $BigInt(message.initiator_steam_id) : $util.Long.fromBits(message.initiator_steam_id.low >>> 0, message.initiator_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.initiator_steam_id === "number") + object.initiator_steam_id = options.longs === $String ? $String(message.initiator_steam_id) : message.initiator_steam_id; else - object.initiator_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.initiator_steam_id) : options.longs === Number ? new $util.LongBits(message.initiator_steam_id.low >>> 0, message.initiator_steam_id.high >>> 0).toNumber() : message.initiator_steam_id; - if (message.itempack__ack_immediately != null && message.hasOwnProperty("itempack__ack_immediately")) + object.initiator_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.initiator_steam_id) : options.longs === $Number ? new $util.LongBits(message.initiator_steam_id.low >>> 0, message.initiator_steam_id.high >>> 0).toNumber(true) : message.initiator_steam_id; + if (message.itempack__ack_immediately != null && $Object.hasOwnProperty.call(message, "itempack__ack_immediately")) object.itempack__ack_immediately = message.itempack__ack_immediately; return object; }; @@ -10742,8 +13841,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgUseItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgUseItem.prototype.toJSON = function() { + return CMsgUseItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgUseItem + * @function getTypeUrl + * @memberof CMsgUseItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgUseItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgUseItem"; }; return CMsgUseItem; @@ -10753,27 +13866,40 @@ /** * Properties of a CMsgReplayUploadedToYouTube. - * @exports ICMsgReplayUploadedToYouTube - * @interface ICMsgReplayUploadedToYouTube + * @typedef {Object} CMsgReplayUploadedToYouTube.$Properties * @property {string|null} [youtube_url] CMsgReplayUploadedToYouTube youtube_url * @property {string|null} [youtube_account_name] CMsgReplayUploadedToYouTube youtube_account_name * @property {number|Long|null} [session_id] CMsgReplayUploadedToYouTube session_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgReplayUploadedToYouTube. + * @exports ICMsgReplayUploadedToYouTube + * @interface ICMsgReplayUploadedToYouTube + * @augments CMsgReplayUploadedToYouTube.$Properties + * @deprecated Use CMsgReplayUploadedToYouTube.$Properties instead. + */ + + /** + * Shape of a CMsgReplayUploadedToYouTube. + * @typedef {CMsgReplayUploadedToYouTube.$Properties} CMsgReplayUploadedToYouTube.$Shape */ /** * Constructs a new CMsgReplayUploadedToYouTube. * @exports CMsgReplayUploadedToYouTube * @classdesc Represents a CMsgReplayUploadedToYouTube. - * @implements ICMsgReplayUploadedToYouTube * @constructor - * @param {ICMsgReplayUploadedToYouTube=} [properties] Properties to set + * @param {CMsgReplayUploadedToYouTube.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgReplayUploadedToYouTube(properties) { + var CMsgReplayUploadedToYouTube = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgReplayUploadedToYouTube youtube_url. @@ -10804,10 +13930,14 @@ * @function create * @memberof CMsgReplayUploadedToYouTube * @static - * @param {ICMsgReplayUploadedToYouTube=} [properties] Properties to set + * @param {CMsgReplayUploadedToYouTube.$Properties=} [properties] Properties to set * @returns {CMsgReplayUploadedToYouTube} CMsgReplayUploadedToYouTube instance + * @type {{ + * (properties: CMsgReplayUploadedToYouTube.$Shape): CMsgReplayUploadedToYouTube & CMsgReplayUploadedToYouTube.$Shape; + * (properties?: CMsgReplayUploadedToYouTube.$Properties): CMsgReplayUploadedToYouTube; + * }} */ - CMsgReplayUploadedToYouTube.create = function create(properties) { + CMsgReplayUploadedToYouTube.create = function(properties) { return new CMsgReplayUploadedToYouTube(properties); }; @@ -10816,19 +13946,26 @@ * @function encode * @memberof CMsgReplayUploadedToYouTube * @static - * @param {ICMsgReplayUploadedToYouTube} message CMsgReplayUploadedToYouTube message or plain object to encode + * @param {CMsgReplayUploadedToYouTube.$Properties} message CMsgReplayUploadedToYouTube message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplayUploadedToYouTube.encode = function encode(message, writer) { + CMsgReplayUploadedToYouTube.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.youtube_url != null && Object.hasOwnProperty.call(message, "youtube_url")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.youtube_url != null && $Object.hasOwnProperty.call(message, "youtube_url")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.youtube_url); - if (message.youtube_account_name != null && Object.hasOwnProperty.call(message, "youtube_account_name")) + if (message.youtube_account_name != null && $Object.hasOwnProperty.call(message, "youtube_account_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.youtube_account_name); - if (message.session_id != null && Object.hasOwnProperty.call(message, "session_id")) + if (message.session_id != null && $Object.hasOwnProperty.call(message, "session_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.session_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10837,12 +13974,12 @@ * @function encodeDelimited * @memberof CMsgReplayUploadedToYouTube * @static - * @param {ICMsgReplayUploadedToYouTube} message CMsgReplayUploadedToYouTube message or plain object to encode + * @param {CMsgReplayUploadedToYouTube.$Properties} message CMsgReplayUploadedToYouTube message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplayUploadedToYouTube.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgReplayUploadedToYouTube.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10852,31 +13989,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgReplayUploadedToYouTube} CMsgReplayUploadedToYouTube + * @returns {CMsgReplayUploadedToYouTube & CMsgReplayUploadedToYouTube.$Shape} CMsgReplayUploadedToYouTube * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplayUploadedToYouTube.decode = function decode(reader, length) { + CMsgReplayUploadedToYouTube.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgReplayUploadedToYouTube(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgReplayUploadedToYouTube(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.youtube_url = reader.string(); - break; - case 2: - message.youtube_account_name = reader.string(); - break; - case 3: - message.session_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.youtube_url = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.youtube_account_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.session_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10886,11 +14046,11 @@ * @memberof CMsgReplayUploadedToYouTube * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgReplayUploadedToYouTube} CMsgReplayUploadedToYouTube + * @returns {CMsgReplayUploadedToYouTube & CMsgReplayUploadedToYouTube.$Shape} CMsgReplayUploadedToYouTube * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplayUploadedToYouTube.decodeDelimited = function decodeDelimited(reader) { + CMsgReplayUploadedToYouTube.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10904,16 +14064,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgReplayUploadedToYouTube.verify = function verify(message) { + CMsgReplayUploadedToYouTube.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.youtube_url != null && message.hasOwnProperty("youtube_url")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.youtube_url != null && $Object.hasOwnProperty.call(message, "youtube_url")) if (!$util.isString(message.youtube_url)) return "youtube_url: string expected"; - if (message.youtube_account_name != null && message.hasOwnProperty("youtube_account_name")) + if (message.youtube_account_name != null && $Object.hasOwnProperty.call(message, "youtube_account_name")) if (!$util.isString(message.youtube_account_name)) return "youtube_account_name: string expected"; - if (message.session_id != null && message.hasOwnProperty("session_id")) + if (message.session_id != null && $Object.hasOwnProperty.call(message, "session_id")) if (!$util.isInteger(message.session_id) && !(message.session_id && $util.isInteger(message.session_id.low) && $util.isInteger(message.session_id.high))) return "session_id: integer|Long expected"; return null; @@ -10927,19 +14091,25 @@ * @param {Object.} object Plain object * @returns {CMsgReplayUploadedToYouTube} CMsgReplayUploadedToYouTube */ - CMsgReplayUploadedToYouTube.fromObject = function fromObject(object) { + CMsgReplayUploadedToYouTube.fromObject = function (object, _depth) { if (object instanceof $root.CMsgReplayUploadedToYouTube) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgReplayUploadedToYouTube: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgReplayUploadedToYouTube(); if (object.youtube_url != null) - message.youtube_url = String(object.youtube_url); + message.youtube_url = $String(object.youtube_url); if (object.youtube_account_name != null) - message.youtube_account_name = String(object.youtube_account_name); + message.youtube_account_name = $String(object.youtube_account_name); if (object.session_id != null) if ($util.Long) - (message.session_id = $util.Long.fromValue(object.session_id)).unsigned = true; + message.session_id = $util.Long.fromValue(object.session_id, true); else if (typeof object.session_id === "string") - message.session_id = parseInt(object.session_id, 10); + message.session_id = $parseInt(object.session_id, 10); else if (typeof object.session_id === "number") message.session_id = object.session_id; else if (typeof object.session_id === "object") @@ -10956,28 +14126,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgReplayUploadedToYouTube.toObject = function toObject(message, options) { + CMsgReplayUploadedToYouTube.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.youtube_url = ""; object.youtube_account_name = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.session_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.session_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.session_id = options.longs === String ? "0" : 0; + object.session_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.youtube_url != null && message.hasOwnProperty("youtube_url")) + if (message.youtube_url != null && $Object.hasOwnProperty.call(message, "youtube_url")) object.youtube_url = message.youtube_url; - if (message.youtube_account_name != null && message.hasOwnProperty("youtube_account_name")) + if (message.youtube_account_name != null && $Object.hasOwnProperty.call(message, "youtube_account_name")) object.youtube_account_name = message.youtube_account_name; - if (message.session_id != null && message.hasOwnProperty("session_id")) - if (typeof message.session_id === "number") - object.session_id = options.longs === String ? String(message.session_id) : message.session_id; + if (message.session_id != null && $Object.hasOwnProperty.call(message, "session_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.session_id = typeof message.session_id === "number" ? $BigInt(message.session_id) : $util.Long.fromBits(message.session_id.low >>> 0, message.session_id.high >>> 0, true).toBigInt(); + else if (typeof message.session_id === "number") + object.session_id = options.longs === $String ? $String(message.session_id) : message.session_id; else - object.session_id = options.longs === String ? $util.Long.prototype.toString.call(message.session_id) : options.longs === Number ? new $util.LongBits(message.session_id.low >>> 0, message.session_id.high >>> 0).toNumber(true) : message.session_id; + object.session_id = options.longs === $String ? $util.Long.prototype.toString.call(message.session_id) : options.longs === $Number ? new $util.LongBits(message.session_id.low >>> 0, message.session_id.high >>> 0).toNumber(true) : message.session_id; return object; }; @@ -10988,8 +14164,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgReplayUploadedToYouTube.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgReplayUploadedToYouTube.prototype.toJSON = function() { + return CMsgReplayUploadedToYouTube.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgReplayUploadedToYouTube + * @function getTypeUrl + * @memberof CMsgReplayUploadedToYouTube + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgReplayUploadedToYouTube.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgReplayUploadedToYouTube"; }; return CMsgReplayUploadedToYouTube; @@ -10997,27 +14187,40 @@ $root.CMsgConsumableExhausted = (function() { + /** + * Properties of a CMsgConsumableExhausted. + * @typedef {Object} CMsgConsumableExhausted.$Properties + * @property {number|null} [item_def_id] CMsgConsumableExhausted item_def_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgConsumableExhausted. * @exports ICMsgConsumableExhausted * @interface ICMsgConsumableExhausted - * @property {number|null} [item_def_id] CMsgConsumableExhausted item_def_id + * @augments CMsgConsumableExhausted.$Properties + * @deprecated Use CMsgConsumableExhausted.$Properties instead. + */ + + /** + * Shape of a CMsgConsumableExhausted. + * @typedef {CMsgConsumableExhausted.$Properties} CMsgConsumableExhausted.$Shape */ /** * Constructs a new CMsgConsumableExhausted. * @exports CMsgConsumableExhausted * @classdesc Represents a CMsgConsumableExhausted. - * @implements ICMsgConsumableExhausted * @constructor - * @param {ICMsgConsumableExhausted=} [properties] Properties to set + * @param {CMsgConsumableExhausted.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgConsumableExhausted(properties) { + var CMsgConsumableExhausted = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgConsumableExhausted item_def_id. @@ -11032,10 +14235,14 @@ * @function create * @memberof CMsgConsumableExhausted * @static - * @param {ICMsgConsumableExhausted=} [properties] Properties to set + * @param {CMsgConsumableExhausted.$Properties=} [properties] Properties to set * @returns {CMsgConsumableExhausted} CMsgConsumableExhausted instance + * @type {{ + * (properties: CMsgConsumableExhausted.$Shape): CMsgConsumableExhausted & CMsgConsumableExhausted.$Shape; + * (properties?: CMsgConsumableExhausted.$Properties): CMsgConsumableExhausted; + * }} */ - CMsgConsumableExhausted.create = function create(properties) { + CMsgConsumableExhausted.create = function(properties) { return new CMsgConsumableExhausted(properties); }; @@ -11044,15 +14251,22 @@ * @function encode * @memberof CMsgConsumableExhausted * @static - * @param {ICMsgConsumableExhausted} message CMsgConsumableExhausted message or plain object to encode + * @param {CMsgConsumableExhausted.$Properties} message CMsgConsumableExhausted message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConsumableExhausted.encode = function encode(message, writer) { + CMsgConsumableExhausted.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_def_id != null && Object.hasOwnProperty.call(message, "item_def_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.item_def_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11061,12 +14275,12 @@ * @function encodeDelimited * @memberof CMsgConsumableExhausted * @static - * @param {ICMsgConsumableExhausted} message CMsgConsumableExhausted message or plain object to encode + * @param {CMsgConsumableExhausted.$Properties} message CMsgConsumableExhausted message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConsumableExhausted.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgConsumableExhausted.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11076,25 +14290,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgConsumableExhausted} CMsgConsumableExhausted + * @returns {CMsgConsumableExhausted & CMsgConsumableExhausted.$Shape} CMsgConsumableExhausted * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConsumableExhausted.decode = function decode(reader, length) { + CMsgConsumableExhausted.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgConsumableExhausted(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgConsumableExhausted(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_def_id = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_def_id = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11104,11 +14335,11 @@ * @memberof CMsgConsumableExhausted * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgConsumableExhausted} CMsgConsumableExhausted + * @returns {CMsgConsumableExhausted & CMsgConsumableExhausted.$Shape} CMsgConsumableExhausted * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConsumableExhausted.decodeDelimited = function decodeDelimited(reader) { + CMsgConsumableExhausted.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11122,10 +14353,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgConsumableExhausted.verify = function verify(message) { + CMsgConsumableExhausted.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_def_id != null && message.hasOwnProperty("item_def_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) if (!$util.isInteger(message.item_def_id)) return "item_def_id: integer expected"; return null; @@ -11139,9 +14374,15 @@ * @param {Object.} object Plain object * @returns {CMsgConsumableExhausted} CMsgConsumableExhausted */ - CMsgConsumableExhausted.fromObject = function fromObject(object) { + CMsgConsumableExhausted.fromObject = function (object, _depth) { if (object instanceof $root.CMsgConsumableExhausted) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgConsumableExhausted: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgConsumableExhausted(); if (object.item_def_id != null) message.item_def_id = object.item_def_id | 0; @@ -11157,13 +14398,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgConsumableExhausted.toObject = function toObject(message, options) { + CMsgConsumableExhausted.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.item_def_id = 0; - if (message.item_def_id != null && message.hasOwnProperty("item_def_id")) + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) object.item_def_id = message.item_def_id; return object; }; @@ -11175,8 +14420,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgConsumableExhausted.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgConsumableExhausted.prototype.toJSON = function() { + return CMsgConsumableExhausted.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgConsumableExhausted + * @function getTypeUrl + * @memberof CMsgConsumableExhausted + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgConsumableExhausted.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgConsumableExhausted"; }; return CMsgConsumableExhausted; @@ -11186,8 +14445,7 @@ /** * Properties of a CMsgItemAcknowledged. - * @exports ICMsgItemAcknowledged - * @interface ICMsgItemAcknowledged + * @typedef {Object} CMsgItemAcknowledged.$Properties * @property {number|null} [account_id] CMsgItemAcknowledged account_id * @property {number|null} [inventory] CMsgItemAcknowledged inventory * @property {number|null} [def_index] CMsgItemAcknowledged def_index @@ -11197,22 +14455,36 @@ * @property {number|null} [is_strange] CMsgItemAcknowledged is_strange * @property {number|null} [is_unusual] CMsgItemAcknowledged is_unusual * @property {number|null} [wear] CMsgItemAcknowledged wear + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgItemAcknowledged. + * @exports ICMsgItemAcknowledged + * @interface ICMsgItemAcknowledged + * @augments CMsgItemAcknowledged.$Properties + * @deprecated Use CMsgItemAcknowledged.$Properties instead. + */ + + /** + * Shape of a CMsgItemAcknowledged. + * @typedef {CMsgItemAcknowledged.$Properties} CMsgItemAcknowledged.$Shape */ /** * Constructs a new CMsgItemAcknowledged. * @exports CMsgItemAcknowledged * @classdesc Represents a CMsgItemAcknowledged. - * @implements ICMsgItemAcknowledged * @constructor - * @param {ICMsgItemAcknowledged=} [properties] Properties to set + * @param {CMsgItemAcknowledged.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgItemAcknowledged(properties) { + var CMsgItemAcknowledged = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgItemAcknowledged account_id. @@ -11291,10 +14563,14 @@ * @function create * @memberof CMsgItemAcknowledged * @static - * @param {ICMsgItemAcknowledged=} [properties] Properties to set + * @param {CMsgItemAcknowledged.$Properties=} [properties] Properties to set * @returns {CMsgItemAcknowledged} CMsgItemAcknowledged instance + * @type {{ + * (properties: CMsgItemAcknowledged.$Shape): CMsgItemAcknowledged & CMsgItemAcknowledged.$Shape; + * (properties?: CMsgItemAcknowledged.$Properties): CMsgItemAcknowledged; + * }} */ - CMsgItemAcknowledged.create = function create(properties) { + CMsgItemAcknowledged.create = function(properties) { return new CMsgItemAcknowledged(properties); }; @@ -11303,31 +14579,38 @@ * @function encode * @memberof CMsgItemAcknowledged * @static - * @param {ICMsgItemAcknowledged} message CMsgItemAcknowledged message or plain object to encode + * @param {CMsgItemAcknowledged.$Properties} message CMsgItemAcknowledged message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgItemAcknowledged.encode = function encode(message, writer) { + CMsgItemAcknowledged.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.inventory != null && Object.hasOwnProperty.call(message, "inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.inventory); - if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.def_index); - if (message.quality != null && Object.hasOwnProperty.call(message, "quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.quality); - if (message.rarity != null && Object.hasOwnProperty.call(message, "rarity")) + if (message.rarity != null && $Object.hasOwnProperty.call(message, "rarity")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.rarity); - if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.origin); - if (message.is_strange != null && Object.hasOwnProperty.call(message, "is_strange")) + if (message.is_strange != null && $Object.hasOwnProperty.call(message, "is_strange")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.is_strange); - if (message.is_unusual != null && Object.hasOwnProperty.call(message, "is_unusual")) + if (message.is_unusual != null && $Object.hasOwnProperty.call(message, "is_unusual")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.is_unusual); - if (message.wear != null && Object.hasOwnProperty.call(message, "wear")) + if (message.wear != null && $Object.hasOwnProperty.call(message, "wear")) writer.uint32(/* id 9, wireType 5 =*/77).float(message.wear); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11336,12 +14619,12 @@ * @function encodeDelimited * @memberof CMsgItemAcknowledged * @static - * @param {ICMsgItemAcknowledged} message CMsgItemAcknowledged message or plain object to encode + * @param {CMsgItemAcknowledged.$Properties} message CMsgItemAcknowledged message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgItemAcknowledged.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgItemAcknowledged.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11351,49 +14634,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgItemAcknowledged} CMsgItemAcknowledged + * @returns {CMsgItemAcknowledged & CMsgItemAcknowledged.$Shape} CMsgItemAcknowledged * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgItemAcknowledged.decode = function decode(reader, length) { + CMsgItemAcknowledged.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgItemAcknowledged(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgItemAcknowledged(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.inventory = reader.uint32(); - break; - case 3: - message.def_index = reader.uint32(); - break; - case 4: - message.quality = reader.uint32(); - break; - case 5: - message.rarity = reader.uint32(); - break; - case 6: - message.origin = reader.uint32(); - break; - case 7: - message.is_strange = reader.uint32(); - break; - case 8: - message.is_unusual = reader.uint32(); - break; - case 9: - message.wear = reader.float(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.inventory = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.def_index = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.quality = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.rarity = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.origin = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.is_strange = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.is_unusual = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 5) + break; + message.wear = reader.float(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11403,11 +14727,11 @@ * @memberof CMsgItemAcknowledged * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgItemAcknowledged} CMsgItemAcknowledged + * @returns {CMsgItemAcknowledged & CMsgItemAcknowledged.$Shape} CMsgItemAcknowledged * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgItemAcknowledged.decodeDelimited = function decodeDelimited(reader) { + CMsgItemAcknowledged.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11421,34 +14745,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgItemAcknowledged.verify = function verify(message) { + CMsgItemAcknowledged.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.inventory != null && message.hasOwnProperty("inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) if (!$util.isInteger(message.inventory)) return "inventory: integer expected"; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) if (!$util.isInteger(message.def_index)) return "def_index: integer expected"; - if (message.quality != null && message.hasOwnProperty("quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) if (!$util.isInteger(message.quality)) return "quality: integer expected"; - if (message.rarity != null && message.hasOwnProperty("rarity")) + if (message.rarity != null && $Object.hasOwnProperty.call(message, "rarity")) if (!$util.isInteger(message.rarity)) return "rarity: integer expected"; - if (message.origin != null && message.hasOwnProperty("origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) if (!$util.isInteger(message.origin)) return "origin: integer expected"; - if (message.is_strange != null && message.hasOwnProperty("is_strange")) + if (message.is_strange != null && $Object.hasOwnProperty.call(message, "is_strange")) if (!$util.isInteger(message.is_strange)) return "is_strange: integer expected"; - if (message.is_unusual != null && message.hasOwnProperty("is_unusual")) + if (message.is_unusual != null && $Object.hasOwnProperty.call(message, "is_unusual")) if (!$util.isInteger(message.is_unusual)) return "is_unusual: integer expected"; - if (message.wear != null && message.hasOwnProperty("wear")) + if (message.wear != null && $Object.hasOwnProperty.call(message, "wear")) if (typeof message.wear !== "number") return "wear: number expected"; return null; @@ -11462,9 +14790,15 @@ * @param {Object.} object Plain object * @returns {CMsgItemAcknowledged} CMsgItemAcknowledged */ - CMsgItemAcknowledged.fromObject = function fromObject(object) { + CMsgItemAcknowledged.fromObject = function (object, _depth) { if (object instanceof $root.CMsgItemAcknowledged) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgItemAcknowledged: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgItemAcknowledged(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -11483,7 +14817,7 @@ if (object.is_unusual != null) message.is_unusual = object.is_unusual >>> 0; if (object.wear != null) - message.wear = Number(object.wear); + message.wear = $Number(object.wear); return message; }; @@ -11496,9 +14830,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgItemAcknowledged.toObject = function toObject(message, options) { + CMsgItemAcknowledged.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; @@ -11511,24 +14849,24 @@ object.is_unusual = 0; object.wear = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.inventory != null && message.hasOwnProperty("inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) object.inventory = message.inventory; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) object.def_index = message.def_index; - if (message.quality != null && message.hasOwnProperty("quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) object.quality = message.quality; - if (message.rarity != null && message.hasOwnProperty("rarity")) + if (message.rarity != null && $Object.hasOwnProperty.call(message, "rarity")) object.rarity = message.rarity; - if (message.origin != null && message.hasOwnProperty("origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) object.origin = message.origin; - if (message.is_strange != null && message.hasOwnProperty("is_strange")) + if (message.is_strange != null && $Object.hasOwnProperty.call(message, "is_strange")) object.is_strange = message.is_strange; - if (message.is_unusual != null && message.hasOwnProperty("is_unusual")) + if (message.is_unusual != null && $Object.hasOwnProperty.call(message, "is_unusual")) object.is_unusual = message.is_unusual; - if (message.wear != null && message.hasOwnProperty("wear")) - object.wear = options.json && !isFinite(message.wear) ? String(message.wear) : message.wear; + if (message.wear != null && $Object.hasOwnProperty.call(message, "wear")) + object.wear = options.json && !$isFinite(message.wear) ? $String(message.wear) : message.wear; return object; }; @@ -11539,8 +14877,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgItemAcknowledged.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgItemAcknowledged.prototype.toJSON = function() { + return CMsgItemAcknowledged.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgItemAcknowledged + * @function getTypeUrl + * @memberof CMsgItemAcknowledged + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgItemAcknowledged.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgItemAcknowledged"; }; return CMsgItemAcknowledged; @@ -11550,28 +14902,41 @@ /** * Properties of a CMsgSetPresetItemPosition. - * @exports ICMsgSetPresetItemPosition - * @interface ICMsgSetPresetItemPosition + * @typedef {Object} CMsgSetPresetItemPosition.$Properties * @property {number|null} [class_id] CMsgSetPresetItemPosition class_id * @property {number|null} [preset_id] CMsgSetPresetItemPosition preset_id * @property {number|null} [slot_id] CMsgSetPresetItemPosition slot_id * @property {number|Long|null} [item_id] CMsgSetPresetItemPosition item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSetPresetItemPosition. + * @exports ICMsgSetPresetItemPosition + * @interface ICMsgSetPresetItemPosition + * @augments CMsgSetPresetItemPosition.$Properties + * @deprecated Use CMsgSetPresetItemPosition.$Properties instead. + */ + + /** + * Shape of a CMsgSetPresetItemPosition. + * @typedef {CMsgSetPresetItemPosition.$Properties} CMsgSetPresetItemPosition.$Shape */ /** * Constructs a new CMsgSetPresetItemPosition. * @exports CMsgSetPresetItemPosition * @classdesc Represents a CMsgSetPresetItemPosition. - * @implements ICMsgSetPresetItemPosition * @constructor - * @param {ICMsgSetPresetItemPosition=} [properties] Properties to set + * @param {CMsgSetPresetItemPosition.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSetPresetItemPosition(properties) { + var CMsgSetPresetItemPosition = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSetPresetItemPosition class_id. @@ -11610,10 +14975,14 @@ * @function create * @memberof CMsgSetPresetItemPosition * @static - * @param {ICMsgSetPresetItemPosition=} [properties] Properties to set + * @param {CMsgSetPresetItemPosition.$Properties=} [properties] Properties to set * @returns {CMsgSetPresetItemPosition} CMsgSetPresetItemPosition instance + * @type {{ + * (properties: CMsgSetPresetItemPosition.$Shape): CMsgSetPresetItemPosition & CMsgSetPresetItemPosition.$Shape; + * (properties?: CMsgSetPresetItemPosition.$Properties): CMsgSetPresetItemPosition; + * }} */ - CMsgSetPresetItemPosition.create = function create(properties) { + CMsgSetPresetItemPosition.create = function(properties) { return new CMsgSetPresetItemPosition(properties); }; @@ -11622,21 +14991,28 @@ * @function encode * @memberof CMsgSetPresetItemPosition * @static - * @param {ICMsgSetPresetItemPosition} message CMsgSetPresetItemPosition message or plain object to encode + * @param {CMsgSetPresetItemPosition.$Properties} message CMsgSetPresetItemPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetPresetItemPosition.encode = function encode(message, writer) { + CMsgSetPresetItemPosition.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.class_id != null && Object.hasOwnProperty.call(message, "class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.class_id); - if (message.preset_id != null && Object.hasOwnProperty.call(message, "preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.preset_id); - if (message.slot_id != null && Object.hasOwnProperty.call(message, "slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.slot_id); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11645,12 +15021,12 @@ * @function encodeDelimited * @memberof CMsgSetPresetItemPosition * @static - * @param {ICMsgSetPresetItemPosition} message CMsgSetPresetItemPosition message or plain object to encode + * @param {CMsgSetPresetItemPosition.$Properties} message CMsgSetPresetItemPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetPresetItemPosition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSetPresetItemPosition.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11660,34 +15036,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSetPresetItemPosition} CMsgSetPresetItemPosition + * @returns {CMsgSetPresetItemPosition & CMsgSetPresetItemPosition.$Shape} CMsgSetPresetItemPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetPresetItemPosition.decode = function decode(reader, length) { + CMsgSetPresetItemPosition.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSetPresetItemPosition(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSetPresetItemPosition(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.class_id = reader.uint32(); - break; - case 2: - message.preset_id = reader.uint32(); - break; - case 3: - message.slot_id = reader.uint32(); - break; - case 4: - message.item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.class_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.preset_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.slot_id = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11697,11 +15099,11 @@ * @memberof CMsgSetPresetItemPosition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSetPresetItemPosition} CMsgSetPresetItemPosition + * @returns {CMsgSetPresetItemPosition & CMsgSetPresetItemPosition.$Shape} CMsgSetPresetItemPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetPresetItemPosition.decodeDelimited = function decodeDelimited(reader) { + CMsgSetPresetItemPosition.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11715,19 +15117,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSetPresetItemPosition.verify = function verify(message) { + CMsgSetPresetItemPosition.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) if (!$util.isInteger(message.class_id)) return "class_id: integer expected"; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) if (!$util.isInteger(message.preset_id)) return "preset_id: integer expected"; - if (message.slot_id != null && message.hasOwnProperty("slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) if (!$util.isInteger(message.slot_id)) return "slot_id: integer expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; return null; @@ -11741,9 +15147,15 @@ * @param {Object.} object Plain object * @returns {CMsgSetPresetItemPosition} CMsgSetPresetItemPosition */ - CMsgSetPresetItemPosition.fromObject = function fromObject(object) { + CMsgSetPresetItemPosition.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSetPresetItemPosition) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSetPresetItemPosition: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSetPresetItemPosition(); if (object.class_id != null) message.class_id = object.class_id >>> 0; @@ -11753,9 +15165,9 @@ message.slot_id = object.slot_id >>> 0; if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -11772,9 +15184,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSetPresetItemPosition.toObject = function toObject(message, options) { + CMsgSetPresetItemPosition.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.class_id = 0; @@ -11782,21 +15198,23 @@ object.slot_id = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) object.class_id = message.class_id; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) object.preset_id = message.preset_id; - if (message.slot_id != null && message.hasOwnProperty("slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) object.slot_id = message.slot_id; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; return object; }; @@ -11807,8 +15225,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSetPresetItemPosition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSetPresetItemPosition.prototype.toJSON = function() { + return CMsgSetPresetItemPosition.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSetPresetItemPosition + * @function getTypeUrl + * @memberof CMsgSetPresetItemPosition + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSetPresetItemPosition.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSetPresetItemPosition"; }; return CMsgSetPresetItemPosition; @@ -11816,32 +15248,45 @@ $root.CMsgSetItemPositions = (function() { + /** + * Properties of a CMsgSetItemPositions. + * @typedef {Object} CMsgSetItemPositions.$Properties + * @property {Array.|null} [item_positions] CMsgSetItemPositions item_positions + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSetItemPositions. * @exports ICMsgSetItemPositions * @interface ICMsgSetItemPositions - * @property {Array.|null} [item_positions] CMsgSetItemPositions item_positions + * @augments CMsgSetItemPositions.$Properties + * @deprecated Use CMsgSetItemPositions.$Properties instead. + */ + + /** + * Shape of a CMsgSetItemPositions. + * @typedef {CMsgSetItemPositions.$Properties} CMsgSetItemPositions.$Shape */ /** * Constructs a new CMsgSetItemPositions. * @exports CMsgSetItemPositions * @classdesc Represents a CMsgSetItemPositions. - * @implements ICMsgSetItemPositions * @constructor - * @param {ICMsgSetItemPositions=} [properties] Properties to set + * @param {CMsgSetItemPositions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSetItemPositions(properties) { + var CMsgSetItemPositions = function (properties) { this.item_positions = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSetItemPositions item_positions. - * @member {Array.} item_positions + * @member {Array.} item_positions * @memberof CMsgSetItemPositions * @instance */ @@ -11852,10 +15297,14 @@ * @function create * @memberof CMsgSetItemPositions * @static - * @param {ICMsgSetItemPositions=} [properties] Properties to set + * @param {CMsgSetItemPositions.$Properties=} [properties] Properties to set * @returns {CMsgSetItemPositions} CMsgSetItemPositions instance + * @type {{ + * (properties: CMsgSetItemPositions.$Shape): CMsgSetItemPositions & CMsgSetItemPositions.$Shape; + * (properties?: CMsgSetItemPositions.$Properties): CMsgSetItemPositions; + * }} */ - CMsgSetItemPositions.create = function create(properties) { + CMsgSetItemPositions.create = function(properties) { return new CMsgSetItemPositions(properties); }; @@ -11864,16 +15313,23 @@ * @function encode * @memberof CMsgSetItemPositions * @static - * @param {ICMsgSetItemPositions} message CMsgSetItemPositions message or plain object to encode + * @param {CMsgSetItemPositions.$Properties} message CMsgSetItemPositions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetItemPositions.encode = function encode(message, writer) { + CMsgSetItemPositions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.item_positions != null && message.item_positions.length) for (var i = 0; i < message.item_positions.length; ++i) - $root.CMsgSetItemPositions.ItemPosition.encode(message.item_positions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgSetItemPositions.ItemPosition.encode(message.item_positions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11882,12 +15338,12 @@ * @function encodeDelimited * @memberof CMsgSetItemPositions * @static - * @param {ICMsgSetItemPositions} message CMsgSetItemPositions message or plain object to encode + * @param {CMsgSetItemPositions.$Properties} message CMsgSetItemPositions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetItemPositions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSetItemPositions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11897,27 +15353,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSetItemPositions} CMsgSetItemPositions + * @returns {CMsgSetItemPositions & CMsgSetItemPositions.$Shape} CMsgSetItemPositions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetItemPositions.decode = function decode(reader, length) { + CMsgSetItemPositions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSetItemPositions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSetItemPositions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.item_positions && message.item_positions.length)) - message.item_positions = []; - message.item_positions.push($root.CMsgSetItemPositions.ItemPosition.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.item_positions && message.item_positions.length)) + message.item_positions = []; + message.item_positions.push($root.CMsgSetItemPositions.ItemPosition.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11927,11 +15400,11 @@ * @memberof CMsgSetItemPositions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSetItemPositions} CMsgSetItemPositions + * @returns {CMsgSetItemPositions & CMsgSetItemPositions.$Shape} CMsgSetItemPositions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetItemPositions.decodeDelimited = function decodeDelimited(reader) { + CMsgSetItemPositions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11945,14 +15418,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSetItemPositions.verify = function verify(message) { + CMsgSetItemPositions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_positions != null && message.hasOwnProperty("item_positions")) { - if (!Array.isArray(message.item_positions)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_positions != null && $Object.hasOwnProperty.call(message, "item_positions")) { + if (!$Array.isArray(message.item_positions)) return "item_positions: array expected"; for (var i = 0; i < message.item_positions.length; ++i) { - var error = $root.CMsgSetItemPositions.ItemPosition.verify(message.item_positions[i]); + var error = $root.CMsgSetItemPositions.ItemPosition.verify(message.item_positions[i], _depth + 1); if (error) return "item_positions." + error; } @@ -11968,18 +15445,24 @@ * @param {Object.} object Plain object * @returns {CMsgSetItemPositions} CMsgSetItemPositions */ - CMsgSetItemPositions.fromObject = function fromObject(object) { + CMsgSetItemPositions.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSetItemPositions) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSetItemPositions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSetItemPositions(); if (object.item_positions) { - if (!Array.isArray(object.item_positions)) - throw TypeError(".CMsgSetItemPositions.item_positions: array expected"); - message.item_positions = []; + if (!$Array.isArray(object.item_positions)) + throw $TypeError(".CMsgSetItemPositions.item_positions: array expected"); + message.item_positions = $Array(object.item_positions.length); for (var i = 0; i < object.item_positions.length; ++i) { - if (typeof object.item_positions[i] !== "object") - throw TypeError(".CMsgSetItemPositions.item_positions: object expected"); - message.item_positions[i] = $root.CMsgSetItemPositions.ItemPosition.fromObject(object.item_positions[i]); + if (!$util.isObject(object.item_positions[i])) + throw $TypeError(".CMsgSetItemPositions.item_positions: object expected"); + message.item_positions[i] = $root.CMsgSetItemPositions.ItemPosition.fromObject(object.item_positions[i], _depth + 1); } } return message; @@ -11994,16 +15477,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSetItemPositions.toObject = function toObject(message, options) { + CMsgSetItemPositions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.item_positions = []; if (message.item_positions && message.item_positions.length) { - object.item_positions = []; + object.item_positions = $Array(message.item_positions.length); for (var j = 0; j < message.item_positions.length; ++j) - object.item_positions[j] = $root.CMsgSetItemPositions.ItemPosition.toObject(message.item_positions[j], options); + object.item_positions[j] = $root.CMsgSetItemPositions.ItemPosition.toObject(message.item_positions[j], options, _depth + 1); } return object; }; @@ -12015,34 +15502,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgSetItemPositions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSetItemPositions.prototype.toJSON = function() { + return CMsgSetItemPositions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSetItemPositions + * @function getTypeUrl + * @memberof CMsgSetItemPositions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSetItemPositions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSetItemPositions"; }; CMsgSetItemPositions.ItemPosition = (function() { /** * Properties of an ItemPosition. - * @memberof CMsgSetItemPositions - * @interface IItemPosition + * @typedef {Object} CMsgSetItemPositions.ItemPosition.$Properties * @property {number|Long|null} [item_id] ItemPosition item_id * @property {number|null} [position] ItemPosition position + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ItemPosition. + * @memberof CMsgSetItemPositions + * @interface IItemPosition + * @augments CMsgSetItemPositions.ItemPosition.$Properties + * @deprecated Use CMsgSetItemPositions.ItemPosition.$Properties instead. + */ + + /** + * Shape of an ItemPosition. + * @typedef {CMsgSetItemPositions.ItemPosition.$Properties} CMsgSetItemPositions.ItemPosition.$Shape */ /** * Constructs a new ItemPosition. * @memberof CMsgSetItemPositions * @classdesc Represents an ItemPosition. - * @implements IItemPosition * @constructor - * @param {CMsgSetItemPositions.IItemPosition=} [properties] Properties to set + * @param {CMsgSetItemPositions.ItemPosition.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ItemPosition(properties) { + var ItemPosition = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ItemPosition item_id. @@ -12065,10 +15579,14 @@ * @function create * @memberof CMsgSetItemPositions.ItemPosition * @static - * @param {CMsgSetItemPositions.IItemPosition=} [properties] Properties to set + * @param {CMsgSetItemPositions.ItemPosition.$Properties=} [properties] Properties to set * @returns {CMsgSetItemPositions.ItemPosition} ItemPosition instance + * @type {{ + * (properties: CMsgSetItemPositions.ItemPosition.$Shape): CMsgSetItemPositions.ItemPosition & CMsgSetItemPositions.ItemPosition.$Shape; + * (properties?: CMsgSetItemPositions.ItemPosition.$Properties): CMsgSetItemPositions.ItemPosition; + * }} */ - ItemPosition.create = function create(properties) { + ItemPosition.create = function(properties) { return new ItemPosition(properties); }; @@ -12077,17 +15595,24 @@ * @function encode * @memberof CMsgSetItemPositions.ItemPosition * @static - * @param {CMsgSetItemPositions.IItemPosition} message ItemPosition message or plain object to encode + * @param {CMsgSetItemPositions.ItemPosition.$Properties} message ItemPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ItemPosition.encode = function encode(message, writer) { + ItemPosition.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) + if (message.position != null && $Object.hasOwnProperty.call(message, "position")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.position); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12096,12 +15621,12 @@ * @function encodeDelimited * @memberof CMsgSetItemPositions.ItemPosition * @static - * @param {CMsgSetItemPositions.IItemPosition} message ItemPosition message or plain object to encode + * @param {CMsgSetItemPositions.ItemPosition.$Properties} message ItemPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ItemPosition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ItemPosition.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12111,28 +15636,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSetItemPositions.ItemPosition} ItemPosition + * @returns {CMsgSetItemPositions.ItemPosition & CMsgSetItemPositions.ItemPosition.$Shape} ItemPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ItemPosition.decode = function decode(reader, length) { + ItemPosition.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSetItemPositions.ItemPosition(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSetItemPositions.ItemPosition(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.position = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.position = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12142,11 +15687,11 @@ * @memberof CMsgSetItemPositions.ItemPosition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSetItemPositions.ItemPosition} ItemPosition + * @returns {CMsgSetItemPositions.ItemPosition & CMsgSetItemPositions.ItemPosition.$Shape} ItemPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ItemPosition.decodeDelimited = function decodeDelimited(reader) { + ItemPosition.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12160,13 +15705,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ItemPosition.verify = function verify(message) { + ItemPosition.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.position != null && message.hasOwnProperty("position")) + if (message.position != null && $Object.hasOwnProperty.call(message, "position")) if (!$util.isInteger(message.position)) return "position: integer expected"; return null; @@ -12180,15 +15729,21 @@ * @param {Object.} object Plain object * @returns {CMsgSetItemPositions.ItemPosition} ItemPosition */ - ItemPosition.fromObject = function fromObject(object) { + ItemPosition.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSetItemPositions.ItemPosition) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSetItemPositions.ItemPosition: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSetItemPositions.ItemPosition(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -12207,24 +15762,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ItemPosition.toObject = function toObject(message, options) { + ItemPosition.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.position = 0; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.position != null && message.hasOwnProperty("position")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.position != null && $Object.hasOwnProperty.call(message, "position")) object.position = message.position; return object; }; @@ -12236,8 +15797,22 @@ * @instance * @returns {Object.} JSON object */ - ItemPosition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ItemPosition.prototype.toJSON = function() { + return ItemPosition.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ItemPosition + * @function getTypeUrl + * @memberof CMsgSetItemPositions.ItemPosition + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ItemPosition.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSetItemPositions.ItemPosition"; }; return ItemPosition; @@ -12250,28 +15825,41 @@ /** * Properties of a CSOEconItemPresetInstance. - * @exports ICSOEconItemPresetInstance - * @interface ICSOEconItemPresetInstance + * @typedef {Object} CSOEconItemPresetInstance.$Properties * @property {number|null} [class_id] CSOEconItemPresetInstance class_id * @property {number|null} [preset_id] CSOEconItemPresetInstance preset_id * @property {number|null} [slot_id] CSOEconItemPresetInstance slot_id * @property {number|Long|null} [item_id] CSOEconItemPresetInstance item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconItemPresetInstance. + * @exports ICSOEconItemPresetInstance + * @interface ICSOEconItemPresetInstance + * @augments CSOEconItemPresetInstance.$Properties + * @deprecated Use CSOEconItemPresetInstance.$Properties instead. + */ + + /** + * Shape of a CSOEconItemPresetInstance. + * @typedef {CSOEconItemPresetInstance.$Properties} CSOEconItemPresetInstance.$Shape */ /** * Constructs a new CSOEconItemPresetInstance. * @exports CSOEconItemPresetInstance * @classdesc Represents a CSOEconItemPresetInstance. - * @implements ICSOEconItemPresetInstance * @constructor - * @param {ICSOEconItemPresetInstance=} [properties] Properties to set + * @param {CSOEconItemPresetInstance.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconItemPresetInstance(properties) { + var CSOEconItemPresetInstance = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconItemPresetInstance class_id. @@ -12310,10 +15898,14 @@ * @function create * @memberof CSOEconItemPresetInstance * @static - * @param {ICSOEconItemPresetInstance=} [properties] Properties to set + * @param {CSOEconItemPresetInstance.$Properties=} [properties] Properties to set * @returns {CSOEconItemPresetInstance} CSOEconItemPresetInstance instance + * @type {{ + * (properties: CSOEconItemPresetInstance.$Shape): CSOEconItemPresetInstance & CSOEconItemPresetInstance.$Shape; + * (properties?: CSOEconItemPresetInstance.$Properties): CSOEconItemPresetInstance; + * }} */ - CSOEconItemPresetInstance.create = function create(properties) { + CSOEconItemPresetInstance.create = function(properties) { return new CSOEconItemPresetInstance(properties); }; @@ -12322,21 +15914,28 @@ * @function encode * @memberof CSOEconItemPresetInstance * @static - * @param {ICSOEconItemPresetInstance} message CSOEconItemPresetInstance message or plain object to encode + * @param {CSOEconItemPresetInstance.$Properties} message CSOEconItemPresetInstance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemPresetInstance.encode = function encode(message, writer) { + CSOEconItemPresetInstance.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.class_id != null && Object.hasOwnProperty.call(message, "class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.class_id); - if (message.preset_id != null && Object.hasOwnProperty.call(message, "preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.preset_id); - if (message.slot_id != null && Object.hasOwnProperty.call(message, "slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.slot_id); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12345,12 +15944,12 @@ * @function encodeDelimited * @memberof CSOEconItemPresetInstance * @static - * @param {ICSOEconItemPresetInstance} message CSOEconItemPresetInstance message or plain object to encode + * @param {CSOEconItemPresetInstance.$Properties} message CSOEconItemPresetInstance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemPresetInstance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconItemPresetInstance.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12360,34 +15959,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconItemPresetInstance} CSOEconItemPresetInstance + * @returns {CSOEconItemPresetInstance & CSOEconItemPresetInstance.$Shape} CSOEconItemPresetInstance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemPresetInstance.decode = function decode(reader, length) { + CSOEconItemPresetInstance.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconItemPresetInstance(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconItemPresetInstance(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.class_id = reader.uint32(); - break; - case 3: - message.preset_id = reader.uint32(); - break; - case 4: - message.slot_id = reader.uint32(); - break; - case 5: - message.item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 0) + break; + message.class_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.preset_id = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.slot_id = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12397,11 +16022,11 @@ * @memberof CSOEconItemPresetInstance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconItemPresetInstance} CSOEconItemPresetInstance + * @returns {CSOEconItemPresetInstance & CSOEconItemPresetInstance.$Shape} CSOEconItemPresetInstance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemPresetInstance.decodeDelimited = function decodeDelimited(reader) { + CSOEconItemPresetInstance.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12415,19 +16040,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconItemPresetInstance.verify = function verify(message) { + CSOEconItemPresetInstance.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) if (!$util.isInteger(message.class_id)) return "class_id: integer expected"; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) if (!$util.isInteger(message.preset_id)) return "preset_id: integer expected"; - if (message.slot_id != null && message.hasOwnProperty("slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) if (!$util.isInteger(message.slot_id)) return "slot_id: integer expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; return null; @@ -12441,9 +16070,15 @@ * @param {Object.} object Plain object * @returns {CSOEconItemPresetInstance} CSOEconItemPresetInstance */ - CSOEconItemPresetInstance.fromObject = function fromObject(object) { + CSOEconItemPresetInstance.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconItemPresetInstance) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconItemPresetInstance: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconItemPresetInstance(); if (object.class_id != null) message.class_id = object.class_id >>> 0; @@ -12453,9 +16088,9 @@ message.slot_id = object.slot_id >>> 0; if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -12472,9 +16107,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconItemPresetInstance.toObject = function toObject(message, options) { + CSOEconItemPresetInstance.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.class_id = 0; @@ -12482,21 +16121,23 @@ object.slot_id = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) object.class_id = message.class_id; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) object.preset_id = message.preset_id; - if (message.slot_id != null && message.hasOwnProperty("slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) object.slot_id = message.slot_id; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; return object; }; @@ -12507,8 +16148,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconItemPresetInstance.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconItemPresetInstance.prototype.toJSON = function() { + return CSOEconItemPresetInstance.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconItemPresetInstance + * @function getTypeUrl + * @memberof CSOEconItemPresetInstance + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconItemPresetInstance.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconItemPresetInstance"; }; return CSOEconItemPresetInstance; @@ -12518,26 +16173,39 @@ /** * Properties of a CMsgSelectPresetForClass. - * @exports ICMsgSelectPresetForClass - * @interface ICMsgSelectPresetForClass + * @typedef {Object} CMsgSelectPresetForClass.$Properties * @property {number|null} [class_id] CMsgSelectPresetForClass class_id * @property {number|null} [preset_id] CMsgSelectPresetForClass preset_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSelectPresetForClass. + * @exports ICMsgSelectPresetForClass + * @interface ICMsgSelectPresetForClass + * @augments CMsgSelectPresetForClass.$Properties + * @deprecated Use CMsgSelectPresetForClass.$Properties instead. + */ + + /** + * Shape of a CMsgSelectPresetForClass. + * @typedef {CMsgSelectPresetForClass.$Properties} CMsgSelectPresetForClass.$Shape */ /** * Constructs a new CMsgSelectPresetForClass. * @exports CMsgSelectPresetForClass * @classdesc Represents a CMsgSelectPresetForClass. - * @implements ICMsgSelectPresetForClass * @constructor - * @param {ICMsgSelectPresetForClass=} [properties] Properties to set + * @param {CMsgSelectPresetForClass.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSelectPresetForClass(properties) { + var CMsgSelectPresetForClass = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSelectPresetForClass class_id. @@ -12560,10 +16228,14 @@ * @function create * @memberof CMsgSelectPresetForClass * @static - * @param {ICMsgSelectPresetForClass=} [properties] Properties to set + * @param {CMsgSelectPresetForClass.$Properties=} [properties] Properties to set * @returns {CMsgSelectPresetForClass} CMsgSelectPresetForClass instance + * @type {{ + * (properties: CMsgSelectPresetForClass.$Shape): CMsgSelectPresetForClass & CMsgSelectPresetForClass.$Shape; + * (properties?: CMsgSelectPresetForClass.$Properties): CMsgSelectPresetForClass; + * }} */ - CMsgSelectPresetForClass.create = function create(properties) { + CMsgSelectPresetForClass.create = function(properties) { return new CMsgSelectPresetForClass(properties); }; @@ -12572,17 +16244,24 @@ * @function encode * @memberof CMsgSelectPresetForClass * @static - * @param {ICMsgSelectPresetForClass} message CMsgSelectPresetForClass message or plain object to encode + * @param {CMsgSelectPresetForClass.$Properties} message CMsgSelectPresetForClass message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSelectPresetForClass.encode = function encode(message, writer) { + CMsgSelectPresetForClass.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.class_id != null && Object.hasOwnProperty.call(message, "class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.class_id); - if (message.preset_id != null && Object.hasOwnProperty.call(message, "preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.preset_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12591,12 +16270,12 @@ * @function encodeDelimited * @memberof CMsgSelectPresetForClass * @static - * @param {ICMsgSelectPresetForClass} message CMsgSelectPresetForClass message or plain object to encode + * @param {CMsgSelectPresetForClass.$Properties} message CMsgSelectPresetForClass message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSelectPresetForClass.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSelectPresetForClass.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12606,28 +16285,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSelectPresetForClass} CMsgSelectPresetForClass + * @returns {CMsgSelectPresetForClass & CMsgSelectPresetForClass.$Shape} CMsgSelectPresetForClass * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSelectPresetForClass.decode = function decode(reader, length) { + CMsgSelectPresetForClass.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSelectPresetForClass(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSelectPresetForClass(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.class_id = reader.uint32(); - break; - case 2: - message.preset_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.class_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.preset_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12637,11 +16336,11 @@ * @memberof CMsgSelectPresetForClass * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSelectPresetForClass} CMsgSelectPresetForClass + * @returns {CMsgSelectPresetForClass & CMsgSelectPresetForClass.$Shape} CMsgSelectPresetForClass * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSelectPresetForClass.decodeDelimited = function decodeDelimited(reader) { + CMsgSelectPresetForClass.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12655,13 +16354,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSelectPresetForClass.verify = function verify(message) { + CMsgSelectPresetForClass.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) if (!$util.isInteger(message.class_id)) return "class_id: integer expected"; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) if (!$util.isInteger(message.preset_id)) return "preset_id: integer expected"; return null; @@ -12675,9 +16378,15 @@ * @param {Object.} object Plain object * @returns {CMsgSelectPresetForClass} CMsgSelectPresetForClass */ - CMsgSelectPresetForClass.fromObject = function fromObject(object) { + CMsgSelectPresetForClass.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSelectPresetForClass) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSelectPresetForClass: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSelectPresetForClass(); if (object.class_id != null) message.class_id = object.class_id >>> 0; @@ -12695,17 +16404,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSelectPresetForClass.toObject = function toObject(message, options) { + CMsgSelectPresetForClass.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.class_id = 0; object.preset_id = 0; } - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) object.class_id = message.class_id; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) object.preset_id = message.preset_id; return object; }; @@ -12717,8 +16430,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSelectPresetForClass.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSelectPresetForClass.prototype.toJSON = function() { + return CMsgSelectPresetForClass.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSelectPresetForClass + * @function getTypeUrl + * @memberof CMsgSelectPresetForClass + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSelectPresetForClass.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSelectPresetForClass"; }; return CMsgSelectPresetForClass; @@ -12728,27 +16455,40 @@ /** * Properties of a CSOClassPresetClientData. - * @exports ICSOClassPresetClientData - * @interface ICSOClassPresetClientData + * @typedef {Object} CSOClassPresetClientData.$Properties * @property {number|null} [account_id] CSOClassPresetClientData account_id * @property {number|null} [class_id] CSOClassPresetClientData class_id * @property {number|null} [active_preset_id] CSOClassPresetClientData active_preset_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOClassPresetClientData. + * @exports ICSOClassPresetClientData + * @interface ICSOClassPresetClientData + * @augments CSOClassPresetClientData.$Properties + * @deprecated Use CSOClassPresetClientData.$Properties instead. + */ + + /** + * Shape of a CSOClassPresetClientData. + * @typedef {CSOClassPresetClientData.$Properties} CSOClassPresetClientData.$Shape */ /** * Constructs a new CSOClassPresetClientData. * @exports CSOClassPresetClientData * @classdesc Represents a CSOClassPresetClientData. - * @implements ICSOClassPresetClientData * @constructor - * @param {ICSOClassPresetClientData=} [properties] Properties to set + * @param {CSOClassPresetClientData.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOClassPresetClientData(properties) { + var CSOClassPresetClientData = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOClassPresetClientData account_id. @@ -12779,10 +16519,14 @@ * @function create * @memberof CSOClassPresetClientData * @static - * @param {ICSOClassPresetClientData=} [properties] Properties to set + * @param {CSOClassPresetClientData.$Properties=} [properties] Properties to set * @returns {CSOClassPresetClientData} CSOClassPresetClientData instance + * @type {{ + * (properties: CSOClassPresetClientData.$Shape): CSOClassPresetClientData & CSOClassPresetClientData.$Shape; + * (properties?: CSOClassPresetClientData.$Properties): CSOClassPresetClientData; + * }} */ - CSOClassPresetClientData.create = function create(properties) { + CSOClassPresetClientData.create = function(properties) { return new CSOClassPresetClientData(properties); }; @@ -12791,19 +16535,26 @@ * @function encode * @memberof CSOClassPresetClientData * @static - * @param {ICSOClassPresetClientData} message CSOClassPresetClientData message or plain object to encode + * @param {CSOClassPresetClientData.$Properties} message CSOClassPresetClientData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOClassPresetClientData.encode = function encode(message, writer) { + CSOClassPresetClientData.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.class_id != null && Object.hasOwnProperty.call(message, "class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.class_id); - if (message.active_preset_id != null && Object.hasOwnProperty.call(message, "active_preset_id")) + if (message.active_preset_id != null && $Object.hasOwnProperty.call(message, "active_preset_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.active_preset_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12812,12 +16563,12 @@ * @function encodeDelimited * @memberof CSOClassPresetClientData * @static - * @param {ICSOClassPresetClientData} message CSOClassPresetClientData message or plain object to encode + * @param {CSOClassPresetClientData.$Properties} message CSOClassPresetClientData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOClassPresetClientData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOClassPresetClientData.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12827,31 +16578,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOClassPresetClientData} CSOClassPresetClientData + * @returns {CSOClassPresetClientData & CSOClassPresetClientData.$Shape} CSOClassPresetClientData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOClassPresetClientData.decode = function decode(reader, length) { + CSOClassPresetClientData.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOClassPresetClientData(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOClassPresetClientData(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.class_id = reader.uint32(); - break; - case 3: - message.active_preset_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.class_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.active_preset_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12861,11 +16635,11 @@ * @memberof CSOClassPresetClientData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOClassPresetClientData} CSOClassPresetClientData + * @returns {CSOClassPresetClientData & CSOClassPresetClientData.$Shape} CSOClassPresetClientData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOClassPresetClientData.decodeDelimited = function decodeDelimited(reader) { + CSOClassPresetClientData.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12879,16 +16653,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOClassPresetClientData.verify = function verify(message) { + CSOClassPresetClientData.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) if (!$util.isInteger(message.class_id)) return "class_id: integer expected"; - if (message.active_preset_id != null && message.hasOwnProperty("active_preset_id")) + if (message.active_preset_id != null && $Object.hasOwnProperty.call(message, "active_preset_id")) if (!$util.isInteger(message.active_preset_id)) return "active_preset_id: integer expected"; return null; @@ -12902,9 +16680,15 @@ * @param {Object.} object Plain object * @returns {CSOClassPresetClientData} CSOClassPresetClientData */ - CSOClassPresetClientData.fromObject = function fromObject(object) { + CSOClassPresetClientData.fromObject = function (object, _depth) { if (object instanceof $root.CSOClassPresetClientData) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOClassPresetClientData: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOClassPresetClientData(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -12924,20 +16708,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOClassPresetClientData.toObject = function toObject(message, options) { + CSOClassPresetClientData.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; object.class_id = 0; object.active_preset_id = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) object.class_id = message.class_id; - if (message.active_preset_id != null && message.hasOwnProperty("active_preset_id")) + if (message.active_preset_id != null && $Object.hasOwnProperty.call(message, "active_preset_id")) object.active_preset_id = message.active_preset_id; return object; }; @@ -12949,8 +16737,22 @@ * @instance * @returns {Object.} JSON object */ - CSOClassPresetClientData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOClassPresetClientData.prototype.toJSON = function() { + return CSOClassPresetClientData.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOClassPresetClientData + * @function getTypeUrl + * @memberof CSOClassPresetClientData + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOClassPresetClientData.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOClassPresetClientData"; }; return CSOClassPresetClientData; @@ -12960,8 +16762,7 @@ /** * Properties of a CMsgGCReportAbuse. - * @exports ICMsgGCReportAbuse - * @interface ICMsgGCReportAbuse + * @typedef {Object} CMsgGCReportAbuse.$Properties * @property {number|Long|null} [target_steam_id] CMsgGCReportAbuse target_steam_id * @property {string|null} [description] CMsgGCReportAbuse description * @property {number|Long|null} [gid] CMsgGCReportAbuse gid @@ -12969,22 +16770,36 @@ * @property {number|null} [content_type] CMsgGCReportAbuse content_type * @property {number|null} [target_game_server_ip] CMsgGCReportAbuse target_game_server_ip * @property {number|null} [target_game_server_port] CMsgGCReportAbuse target_game_server_port + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCReportAbuse. + * @exports ICMsgGCReportAbuse + * @interface ICMsgGCReportAbuse + * @augments CMsgGCReportAbuse.$Properties + * @deprecated Use CMsgGCReportAbuse.$Properties instead. + */ + + /** + * Shape of a CMsgGCReportAbuse. + * @typedef {CMsgGCReportAbuse.$Properties} CMsgGCReportAbuse.$Shape */ /** * Constructs a new CMsgGCReportAbuse. * @exports CMsgGCReportAbuse * @classdesc Represents a CMsgGCReportAbuse. - * @implements ICMsgGCReportAbuse * @constructor - * @param {ICMsgGCReportAbuse=} [properties] Properties to set + * @param {CMsgGCReportAbuse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCReportAbuse(properties) { + var CMsgGCReportAbuse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCReportAbuse target_steam_id. @@ -12992,7 +16807,7 @@ * @memberof CMsgGCReportAbuse * @instance */ - CMsgGCReportAbuse.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCReportAbuse.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCReportAbuse description. @@ -13047,10 +16862,14 @@ * @function create * @memberof CMsgGCReportAbuse * @static - * @param {ICMsgGCReportAbuse=} [properties] Properties to set + * @param {CMsgGCReportAbuse.$Properties=} [properties] Properties to set * @returns {CMsgGCReportAbuse} CMsgGCReportAbuse instance + * @type {{ + * (properties: CMsgGCReportAbuse.$Shape): CMsgGCReportAbuse & CMsgGCReportAbuse.$Shape; + * (properties?: CMsgGCReportAbuse.$Properties): CMsgGCReportAbuse; + * }} */ - CMsgGCReportAbuse.create = function create(properties) { + CMsgGCReportAbuse.create = function(properties) { return new CMsgGCReportAbuse(properties); }; @@ -13059,27 +16878,34 @@ * @function encode * @memberof CMsgGCReportAbuse * @static - * @param {ICMsgGCReportAbuse} message CMsgGCReportAbuse message or plain object to encode + * @param {CMsgGCReportAbuse.$Properties} message CMsgGCReportAbuse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCReportAbuse.encode = function encode(message, writer) { + CMsgGCReportAbuse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.target_steam_id != null && Object.hasOwnProperty.call(message, "target_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.target_steam_id); - if (message.abuse_type != null && Object.hasOwnProperty.call(message, "abuse_type")) + if (message.abuse_type != null && $Object.hasOwnProperty.call(message, "abuse_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.abuse_type); - if (message.content_type != null && Object.hasOwnProperty.call(message, "content_type")) + if (message.content_type != null && $Object.hasOwnProperty.call(message, "content_type")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.content_type); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.gid != null && Object.hasOwnProperty.call(message, "gid")) + if (message.gid != null && $Object.hasOwnProperty.call(message, "gid")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.gid); - if (message.target_game_server_ip != null && Object.hasOwnProperty.call(message, "target_game_server_ip")) + if (message.target_game_server_ip != null && $Object.hasOwnProperty.call(message, "target_game_server_ip")) writer.uint32(/* id 6, wireType 5 =*/53).fixed32(message.target_game_server_ip); - if (message.target_game_server_port != null && Object.hasOwnProperty.call(message, "target_game_server_port")) + if (message.target_game_server_port != null && $Object.hasOwnProperty.call(message, "target_game_server_port")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.target_game_server_port); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13088,12 +16914,12 @@ * @function encodeDelimited * @memberof CMsgGCReportAbuse * @static - * @param {ICMsgGCReportAbuse} message CMsgGCReportAbuse message or plain object to encode + * @param {CMsgGCReportAbuse.$Properties} message CMsgGCReportAbuse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCReportAbuse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCReportAbuse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13103,43 +16929,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCReportAbuse} CMsgGCReportAbuse + * @returns {CMsgGCReportAbuse & CMsgGCReportAbuse.$Shape} CMsgGCReportAbuse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCReportAbuse.decode = function decode(reader, length) { + CMsgGCReportAbuse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCReportAbuse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCReportAbuse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.target_steam_id = reader.fixed64(); - break; - case 4: - message.description = reader.string(); - break; - case 5: - message.gid = reader.uint64(); - break; - case 2: - message.abuse_type = reader.uint32(); - break; - case 3: - message.content_type = reader.uint32(); - break; - case 6: - message.target_game_server_ip = reader.fixed32(); - break; - case 7: - message.target_game_server_port = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.target_steam_id = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.description = reader.string(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.gid = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.abuse_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.content_type = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 5) + break; + message.target_game_server_ip = reader.fixed32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.target_game_server_port = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13149,11 +17010,11 @@ * @memberof CMsgGCReportAbuse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCReportAbuse} CMsgGCReportAbuse + * @returns {CMsgGCReportAbuse & CMsgGCReportAbuse.$Shape} CMsgGCReportAbuse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCReportAbuse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCReportAbuse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13167,28 +17028,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCReportAbuse.verify = function verify(message) { + CMsgGCReportAbuse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) if (!$util.isInteger(message.target_steam_id) && !(message.target_steam_id && $util.isInteger(message.target_steam_id.low) && $util.isInteger(message.target_steam_id.high))) return "target_steam_id: integer|Long expected"; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) if (!$util.isString(message.description)) return "description: string expected"; - if (message.gid != null && message.hasOwnProperty("gid")) + if (message.gid != null && $Object.hasOwnProperty.call(message, "gid")) if (!$util.isInteger(message.gid) && !(message.gid && $util.isInteger(message.gid.low) && $util.isInteger(message.gid.high))) return "gid: integer|Long expected"; - if (message.abuse_type != null && message.hasOwnProperty("abuse_type")) + if (message.abuse_type != null && $Object.hasOwnProperty.call(message, "abuse_type")) if (!$util.isInteger(message.abuse_type)) return "abuse_type: integer expected"; - if (message.content_type != null && message.hasOwnProperty("content_type")) + if (message.content_type != null && $Object.hasOwnProperty.call(message, "content_type")) if (!$util.isInteger(message.content_type)) return "content_type: integer expected"; - if (message.target_game_server_ip != null && message.hasOwnProperty("target_game_server_ip")) + if (message.target_game_server_ip != null && $Object.hasOwnProperty.call(message, "target_game_server_ip")) if (!$util.isInteger(message.target_game_server_ip)) return "target_game_server_ip: integer expected"; - if (message.target_game_server_port != null && message.hasOwnProperty("target_game_server_port")) + if (message.target_game_server_port != null && $Object.hasOwnProperty.call(message, "target_game_server_port")) if (!$util.isInteger(message.target_game_server_port)) return "target_game_server_port: integer expected"; return null; @@ -13202,26 +17067,32 @@ * @param {Object.} object Plain object * @returns {CMsgGCReportAbuse} CMsgGCReportAbuse */ - CMsgGCReportAbuse.fromObject = function fromObject(object) { + CMsgGCReportAbuse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCReportAbuse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCReportAbuse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCReportAbuse(); if (object.target_steam_id != null) if ($util.Long) - (message.target_steam_id = $util.Long.fromValue(object.target_steam_id)).unsigned = false; + message.target_steam_id = $util.Long.fromValue(object.target_steam_id, true); else if (typeof object.target_steam_id === "string") - message.target_steam_id = parseInt(object.target_steam_id, 10); + message.target_steam_id = $parseInt(object.target_steam_id, 10); else if (typeof object.target_steam_id === "number") message.target_steam_id = object.target_steam_id; else if (typeof object.target_steam_id === "object") - message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(); + message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(true); if (object.description != null) - message.description = String(object.description); + message.description = $String(object.description); if (object.gid != null) if ($util.Long) - (message.gid = $util.Long.fromValue(object.gid)).unsigned = true; + message.gid = $util.Long.fromValue(object.gid, true); else if (typeof object.gid === "string") - message.gid = parseInt(object.gid, 10); + message.gid = $parseInt(object.gid, 10); else if (typeof object.gid === "number") message.gid = object.gid; else if (typeof object.gid === "object") @@ -13246,46 +17117,54 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCReportAbuse.toObject = function toObject(message, options) { + CMsgGCReportAbuse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.target_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.target_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.target_steam_id = options.longs === String ? "0" : 0; + object.target_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.abuse_type = 0; object.content_type = 0; object.description = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.gid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.gid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.gid = options.longs === String ? "0" : 0; + object.gid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.target_game_server_ip = 0; object.target_game_server_port = 0; } - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) - if (typeof message.target_steam_id === "number") - object.target_steam_id = options.longs === String ? String(message.target_steam_id) : message.target_steam_id; + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.target_steam_id = typeof message.target_steam_id === "number" ? $BigInt(message.target_steam_id) : $util.Long.fromBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.target_steam_id === "number") + object.target_steam_id = options.longs === $String ? $String(message.target_steam_id) : message.target_steam_id; else - object.target_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber() : message.target_steam_id; - if (message.abuse_type != null && message.hasOwnProperty("abuse_type")) + object.target_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === $Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber(true) : message.target_steam_id; + if (message.abuse_type != null && $Object.hasOwnProperty.call(message, "abuse_type")) object.abuse_type = message.abuse_type; - if (message.content_type != null && message.hasOwnProperty("content_type")) + if (message.content_type != null && $Object.hasOwnProperty.call(message, "content_type")) object.content_type = message.content_type; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) object.description = message.description; - if (message.gid != null && message.hasOwnProperty("gid")) - if (typeof message.gid === "number") - object.gid = options.longs === String ? String(message.gid) : message.gid; + if (message.gid != null && $Object.hasOwnProperty.call(message, "gid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.gid = typeof message.gid === "number" ? $BigInt(message.gid) : $util.Long.fromBits(message.gid.low >>> 0, message.gid.high >>> 0, true).toBigInt(); + else if (typeof message.gid === "number") + object.gid = options.longs === $String ? $String(message.gid) : message.gid; else - object.gid = options.longs === String ? $util.Long.prototype.toString.call(message.gid) : options.longs === Number ? new $util.LongBits(message.gid.low >>> 0, message.gid.high >>> 0).toNumber(true) : message.gid; - if (message.target_game_server_ip != null && message.hasOwnProperty("target_game_server_ip")) + object.gid = options.longs === $String ? $util.Long.prototype.toString.call(message.gid) : options.longs === $Number ? new $util.LongBits(message.gid.low >>> 0, message.gid.high >>> 0).toNumber(true) : message.gid; + if (message.target_game_server_ip != null && $Object.hasOwnProperty.call(message, "target_game_server_ip")) object.target_game_server_ip = message.target_game_server_ip; - if (message.target_game_server_port != null && message.hasOwnProperty("target_game_server_port")) + if (message.target_game_server_port != null && $Object.hasOwnProperty.call(message, "target_game_server_port")) object.target_game_server_port = message.target_game_server_port; return object; }; @@ -13297,8 +17176,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCReportAbuse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCReportAbuse.prototype.toJSON = function() { + return CMsgGCReportAbuse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCReportAbuse + * @function getTypeUrl + * @memberof CMsgGCReportAbuse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCReportAbuse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCReportAbuse"; }; return CMsgGCReportAbuse; @@ -13308,27 +17201,40 @@ /** * Properties of a CMsgGCReportAbuseResponse. - * @exports ICMsgGCReportAbuseResponse - * @interface ICMsgGCReportAbuseResponse + * @typedef {Object} CMsgGCReportAbuseResponse.$Properties * @property {number|Long|null} [target_steam_id] CMsgGCReportAbuseResponse target_steam_id * @property {number|null} [result] CMsgGCReportAbuseResponse result * @property {string|null} [error_message] CMsgGCReportAbuseResponse error_message + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCReportAbuseResponse. + * @exports ICMsgGCReportAbuseResponse + * @interface ICMsgGCReportAbuseResponse + * @augments CMsgGCReportAbuseResponse.$Properties + * @deprecated Use CMsgGCReportAbuseResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCReportAbuseResponse. + * @typedef {CMsgGCReportAbuseResponse.$Properties} CMsgGCReportAbuseResponse.$Shape */ /** * Constructs a new CMsgGCReportAbuseResponse. * @exports CMsgGCReportAbuseResponse * @classdesc Represents a CMsgGCReportAbuseResponse. - * @implements ICMsgGCReportAbuseResponse * @constructor - * @param {ICMsgGCReportAbuseResponse=} [properties] Properties to set + * @param {CMsgGCReportAbuseResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCReportAbuseResponse(properties) { + var CMsgGCReportAbuseResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCReportAbuseResponse target_steam_id. @@ -13336,7 +17242,7 @@ * @memberof CMsgGCReportAbuseResponse * @instance */ - CMsgGCReportAbuseResponse.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCReportAbuseResponse.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCReportAbuseResponse result. @@ -13359,10 +17265,14 @@ * @function create * @memberof CMsgGCReportAbuseResponse * @static - * @param {ICMsgGCReportAbuseResponse=} [properties] Properties to set + * @param {CMsgGCReportAbuseResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCReportAbuseResponse} CMsgGCReportAbuseResponse instance + * @type {{ + * (properties: CMsgGCReportAbuseResponse.$Shape): CMsgGCReportAbuseResponse & CMsgGCReportAbuseResponse.$Shape; + * (properties?: CMsgGCReportAbuseResponse.$Properties): CMsgGCReportAbuseResponse; + * }} */ - CMsgGCReportAbuseResponse.create = function create(properties) { + CMsgGCReportAbuseResponse.create = function(properties) { return new CMsgGCReportAbuseResponse(properties); }; @@ -13371,19 +17281,26 @@ * @function encode * @memberof CMsgGCReportAbuseResponse * @static - * @param {ICMsgGCReportAbuseResponse} message CMsgGCReportAbuseResponse message or plain object to encode + * @param {CMsgGCReportAbuseResponse.$Properties} message CMsgGCReportAbuseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCReportAbuseResponse.encode = function encode(message, writer) { + CMsgGCReportAbuseResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.target_steam_id != null && Object.hasOwnProperty.call(message, "target_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.target_steam_id); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.result); - if (message.error_message != null && Object.hasOwnProperty.call(message, "error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.error_message); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13392,12 +17309,12 @@ * @function encodeDelimited * @memberof CMsgGCReportAbuseResponse * @static - * @param {ICMsgGCReportAbuseResponse} message CMsgGCReportAbuseResponse message or plain object to encode + * @param {CMsgGCReportAbuseResponse.$Properties} message CMsgGCReportAbuseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCReportAbuseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCReportAbuseResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13407,31 +17324,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCReportAbuseResponse} CMsgGCReportAbuseResponse + * @returns {CMsgGCReportAbuseResponse & CMsgGCReportAbuseResponse.$Shape} CMsgGCReportAbuseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCReportAbuseResponse.decode = function decode(reader, length) { + CMsgGCReportAbuseResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCReportAbuseResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCReportAbuseResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.target_steam_id = reader.fixed64(); - break; - case 2: - message.result = reader.uint32(); - break; - case 3: - message.error_message = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.target_steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.error_message = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13441,11 +17381,11 @@ * @memberof CMsgGCReportAbuseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCReportAbuseResponse} CMsgGCReportAbuseResponse + * @returns {CMsgGCReportAbuseResponse & CMsgGCReportAbuseResponse.$Shape} CMsgGCReportAbuseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCReportAbuseResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCReportAbuseResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13459,16 +17399,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCReportAbuseResponse.verify = function verify(message) { + CMsgGCReportAbuseResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) if (!$util.isInteger(message.target_steam_id) && !(message.target_steam_id && $util.isInteger(message.target_steam_id.low) && $util.isInteger(message.target_steam_id.high))) return "target_steam_id: integer|Long expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) if (!$util.isString(message.error_message)) return "error_message: string expected"; return null; @@ -13482,23 +17426,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCReportAbuseResponse} CMsgGCReportAbuseResponse */ - CMsgGCReportAbuseResponse.fromObject = function fromObject(object) { + CMsgGCReportAbuseResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCReportAbuseResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCReportAbuseResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCReportAbuseResponse(); if (object.target_steam_id != null) if ($util.Long) - (message.target_steam_id = $util.Long.fromValue(object.target_steam_id)).unsigned = false; + message.target_steam_id = $util.Long.fromValue(object.target_steam_id, true); else if (typeof object.target_steam_id === "string") - message.target_steam_id = parseInt(object.target_steam_id, 10); + message.target_steam_id = $parseInt(object.target_steam_id, 10); else if (typeof object.target_steam_id === "number") message.target_steam_id = object.target_steam_id; else if (typeof object.target_steam_id === "object") - message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(); + message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(true); if (object.result != null) message.result = object.result >>> 0; if (object.error_message != null) - message.error_message = String(object.error_message); + message.error_message = $String(object.error_message); return message; }; @@ -13511,27 +17461,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCReportAbuseResponse.toObject = function toObject(message, options) { + CMsgGCReportAbuseResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.target_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.target_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.target_steam_id = options.longs === String ? "0" : 0; + object.target_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.result = 0; object.error_message = ""; } - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) - if (typeof message.target_steam_id === "number") - object.target_steam_id = options.longs === String ? String(message.target_steam_id) : message.target_steam_id; + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.target_steam_id = typeof message.target_steam_id === "number" ? $BigInt(message.target_steam_id) : $util.Long.fromBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.target_steam_id === "number") + object.target_steam_id = options.longs === $String ? $String(message.target_steam_id) : message.target_steam_id; else - object.target_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber() : message.target_steam_id; - if (message.result != null && message.hasOwnProperty("result")) + object.target_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === $Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber(true) : message.target_steam_id; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) object.error_message = message.error_message; return object; }; @@ -13543,8 +17499,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCReportAbuseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCReportAbuseResponse.prototype.toJSON = function() { + return CMsgGCReportAbuseResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCReportAbuseResponse + * @function getTypeUrl + * @memberof CMsgGCReportAbuseResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCReportAbuseResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCReportAbuseResponse"; }; return CMsgGCReportAbuseResponse; @@ -13554,27 +17524,40 @@ /** * Properties of a CMsgGCNameItemNotification. - * @exports ICMsgGCNameItemNotification - * @interface ICMsgGCNameItemNotification + * @typedef {Object} CMsgGCNameItemNotification.$Properties * @property {number|Long|null} [player_steamid] CMsgGCNameItemNotification player_steamid * @property {number|null} [item_def_index] CMsgGCNameItemNotification item_def_index * @property {string|null} [item_name_custom] CMsgGCNameItemNotification item_name_custom + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCNameItemNotification. + * @exports ICMsgGCNameItemNotification + * @interface ICMsgGCNameItemNotification + * @augments CMsgGCNameItemNotification.$Properties + * @deprecated Use CMsgGCNameItemNotification.$Properties instead. + */ + + /** + * Shape of a CMsgGCNameItemNotification. + * @typedef {CMsgGCNameItemNotification.$Properties} CMsgGCNameItemNotification.$Shape */ /** * Constructs a new CMsgGCNameItemNotification. * @exports CMsgGCNameItemNotification * @classdesc Represents a CMsgGCNameItemNotification. - * @implements ICMsgGCNameItemNotification * @constructor - * @param {ICMsgGCNameItemNotification=} [properties] Properties to set + * @param {CMsgGCNameItemNotification.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCNameItemNotification(properties) { + var CMsgGCNameItemNotification = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCNameItemNotification player_steamid. @@ -13582,7 +17565,7 @@ * @memberof CMsgGCNameItemNotification * @instance */ - CMsgGCNameItemNotification.prototype.player_steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCNameItemNotification.prototype.player_steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCNameItemNotification item_def_index. @@ -13605,10 +17588,14 @@ * @function create * @memberof CMsgGCNameItemNotification * @static - * @param {ICMsgGCNameItemNotification=} [properties] Properties to set + * @param {CMsgGCNameItemNotification.$Properties=} [properties] Properties to set * @returns {CMsgGCNameItemNotification} CMsgGCNameItemNotification instance + * @type {{ + * (properties: CMsgGCNameItemNotification.$Shape): CMsgGCNameItemNotification & CMsgGCNameItemNotification.$Shape; + * (properties?: CMsgGCNameItemNotification.$Properties): CMsgGCNameItemNotification; + * }} */ - CMsgGCNameItemNotification.create = function create(properties) { + CMsgGCNameItemNotification.create = function(properties) { return new CMsgGCNameItemNotification(properties); }; @@ -13617,19 +17604,26 @@ * @function encode * @memberof CMsgGCNameItemNotification * @static - * @param {ICMsgGCNameItemNotification} message CMsgGCNameItemNotification message or plain object to encode + * @param {CMsgGCNameItemNotification.$Properties} message CMsgGCNameItemNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNameItemNotification.encode = function encode(message, writer) { + CMsgGCNameItemNotification.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.player_steamid != null && Object.hasOwnProperty.call(message, "player_steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.player_steamid); - if (message.item_def_index != null && Object.hasOwnProperty.call(message, "item_def_index")) + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.item_def_index); - if (message.item_name_custom != null && Object.hasOwnProperty.call(message, "item_name_custom")) + if (message.item_name_custom != null && $Object.hasOwnProperty.call(message, "item_name_custom")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.item_name_custom); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13638,12 +17632,12 @@ * @function encodeDelimited * @memberof CMsgGCNameItemNotification * @static - * @param {ICMsgGCNameItemNotification} message CMsgGCNameItemNotification message or plain object to encode + * @param {CMsgGCNameItemNotification.$Properties} message CMsgGCNameItemNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNameItemNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCNameItemNotification.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13653,31 +17647,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCNameItemNotification} CMsgGCNameItemNotification + * @returns {CMsgGCNameItemNotification & CMsgGCNameItemNotification.$Shape} CMsgGCNameItemNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNameItemNotification.decode = function decode(reader, length) { + CMsgGCNameItemNotification.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCNameItemNotification(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCNameItemNotification(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.player_steamid = reader.fixed64(); - break; - case 2: - message.item_def_index = reader.uint32(); - break; - case 3: - message.item_name_custom = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.player_steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_def_index = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.item_name_custom = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13687,11 +17704,11 @@ * @memberof CMsgGCNameItemNotification * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCNameItemNotification} CMsgGCNameItemNotification + * @returns {CMsgGCNameItemNotification & CMsgGCNameItemNotification.$Shape} CMsgGCNameItemNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNameItemNotification.decodeDelimited = function decodeDelimited(reader) { + CMsgGCNameItemNotification.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13705,16 +17722,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCNameItemNotification.verify = function verify(message) { + CMsgGCNameItemNotification.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.player_steamid != null && message.hasOwnProperty("player_steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) if (!$util.isInteger(message.player_steamid) && !(message.player_steamid && $util.isInteger(message.player_steamid.low) && $util.isInteger(message.player_steamid.high))) return "player_steamid: integer|Long expected"; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) if (!$util.isInteger(message.item_def_index)) return "item_def_index: integer expected"; - if (message.item_name_custom != null && message.hasOwnProperty("item_name_custom")) + if (message.item_name_custom != null && $Object.hasOwnProperty.call(message, "item_name_custom")) if (!$util.isString(message.item_name_custom)) return "item_name_custom: string expected"; return null; @@ -13728,23 +17749,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCNameItemNotification} CMsgGCNameItemNotification */ - CMsgGCNameItemNotification.fromObject = function fromObject(object) { + CMsgGCNameItemNotification.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCNameItemNotification) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCNameItemNotification: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCNameItemNotification(); if (object.player_steamid != null) if ($util.Long) - (message.player_steamid = $util.Long.fromValue(object.player_steamid)).unsigned = false; + message.player_steamid = $util.Long.fromValue(object.player_steamid, true); else if (typeof object.player_steamid === "string") - message.player_steamid = parseInt(object.player_steamid, 10); + message.player_steamid = $parseInt(object.player_steamid, 10); else if (typeof object.player_steamid === "number") message.player_steamid = object.player_steamid; else if (typeof object.player_steamid === "object") - message.player_steamid = new $util.LongBits(object.player_steamid.low >>> 0, object.player_steamid.high >>> 0).toNumber(); + message.player_steamid = new $util.LongBits(object.player_steamid.low >>> 0, object.player_steamid.high >>> 0).toNumber(true); if (object.item_def_index != null) message.item_def_index = object.item_def_index >>> 0; if (object.item_name_custom != null) - message.item_name_custom = String(object.item_name_custom); + message.item_name_custom = $String(object.item_name_custom); return message; }; @@ -13757,27 +17784,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCNameItemNotification.toObject = function toObject(message, options) { + CMsgGCNameItemNotification.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.player_steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.player_steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.player_steamid = options.longs === String ? "0" : 0; + object.player_steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.item_def_index = 0; object.item_name_custom = ""; } - if (message.player_steamid != null && message.hasOwnProperty("player_steamid")) - if (typeof message.player_steamid === "number") - object.player_steamid = options.longs === String ? String(message.player_steamid) : message.player_steamid; + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.player_steamid = typeof message.player_steamid === "number" ? $BigInt(message.player_steamid) : $util.Long.fromBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0, true).toBigInt(); + else if (typeof message.player_steamid === "number") + object.player_steamid = options.longs === $String ? $String(message.player_steamid) : message.player_steamid; else - object.player_steamid = options.longs === String ? $util.Long.prototype.toString.call(message.player_steamid) : options.longs === Number ? new $util.LongBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0).toNumber() : message.player_steamid; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + object.player_steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.player_steamid) : options.longs === $Number ? new $util.LongBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0).toNumber(true) : message.player_steamid; + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) object.item_def_index = message.item_def_index; - if (message.item_name_custom != null && message.hasOwnProperty("item_name_custom")) + if (message.item_name_custom != null && $Object.hasOwnProperty.call(message, "item_name_custom")) object.item_name_custom = message.item_name_custom; return object; }; @@ -13789,8 +17822,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCNameItemNotification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCNameItemNotification.prototype.toJSON = function() { + return CMsgGCNameItemNotification.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCNameItemNotification + * @function getTypeUrl + * @memberof CMsgGCNameItemNotification + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCNameItemNotification.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCNameItemNotification"; }; return CMsgGCNameItemNotification; @@ -13800,30 +17847,43 @@ /** * Properties of a CMsgGCClientDisplayNotification. - * @exports ICMsgGCClientDisplayNotification - * @interface ICMsgGCClientDisplayNotification + * @typedef {Object} CMsgGCClientDisplayNotification.$Properties * @property {string|null} [notification_title_localization_key] CMsgGCClientDisplayNotification notification_title_localization_key * @property {string|null} [notification_body_localization_key] CMsgGCClientDisplayNotification notification_body_localization_key * @property {Array.|null} [body_substring_keys] CMsgGCClientDisplayNotification body_substring_keys * @property {Array.|null} [body_substring_values] CMsgGCClientDisplayNotification body_substring_values + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCClientDisplayNotification. + * @exports ICMsgGCClientDisplayNotification + * @interface ICMsgGCClientDisplayNotification + * @augments CMsgGCClientDisplayNotification.$Properties + * @deprecated Use CMsgGCClientDisplayNotification.$Properties instead. + */ + + /** + * Shape of a CMsgGCClientDisplayNotification. + * @typedef {CMsgGCClientDisplayNotification.$Properties} CMsgGCClientDisplayNotification.$Shape */ /** * Constructs a new CMsgGCClientDisplayNotification. * @exports CMsgGCClientDisplayNotification * @classdesc Represents a CMsgGCClientDisplayNotification. - * @implements ICMsgGCClientDisplayNotification * @constructor - * @param {ICMsgGCClientDisplayNotification=} [properties] Properties to set + * @param {CMsgGCClientDisplayNotification.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCClientDisplayNotification(properties) { + var CMsgGCClientDisplayNotification = function (properties) { this.body_substring_keys = []; this.body_substring_values = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCClientDisplayNotification notification_title_localization_key. @@ -13862,10 +17922,14 @@ * @function create * @memberof CMsgGCClientDisplayNotification * @static - * @param {ICMsgGCClientDisplayNotification=} [properties] Properties to set + * @param {CMsgGCClientDisplayNotification.$Properties=} [properties] Properties to set * @returns {CMsgGCClientDisplayNotification} CMsgGCClientDisplayNotification instance + * @type {{ + * (properties: CMsgGCClientDisplayNotification.$Shape): CMsgGCClientDisplayNotification & CMsgGCClientDisplayNotification.$Shape; + * (properties?: CMsgGCClientDisplayNotification.$Properties): CMsgGCClientDisplayNotification; + * }} */ - CMsgGCClientDisplayNotification.create = function create(properties) { + CMsgGCClientDisplayNotification.create = function(properties) { return new CMsgGCClientDisplayNotification(properties); }; @@ -13874,16 +17938,20 @@ * @function encode * @memberof CMsgGCClientDisplayNotification * @static - * @param {ICMsgGCClientDisplayNotification} message CMsgGCClientDisplayNotification message or plain object to encode + * @param {CMsgGCClientDisplayNotification.$Properties} message CMsgGCClientDisplayNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientDisplayNotification.encode = function encode(message, writer) { + CMsgGCClientDisplayNotification.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.notification_title_localization_key != null && Object.hasOwnProperty.call(message, "notification_title_localization_key")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.notification_title_localization_key != null && $Object.hasOwnProperty.call(message, "notification_title_localization_key")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.notification_title_localization_key); - if (message.notification_body_localization_key != null && Object.hasOwnProperty.call(message, "notification_body_localization_key")) + if (message.notification_body_localization_key != null && $Object.hasOwnProperty.call(message, "notification_body_localization_key")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.notification_body_localization_key); if (message.body_substring_keys != null && message.body_substring_keys.length) for (var i = 0; i < message.body_substring_keys.length; ++i) @@ -13891,6 +17959,9 @@ if (message.body_substring_values != null && message.body_substring_values.length) for (var i = 0; i < message.body_substring_values.length; ++i) writer.uint32(/* id 4, wireType 2 =*/34).string(message.body_substring_values[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13899,12 +17970,12 @@ * @function encodeDelimited * @memberof CMsgGCClientDisplayNotification * @static - * @param {ICMsgGCClientDisplayNotification} message CMsgGCClientDisplayNotification message or plain object to encode + * @param {CMsgGCClientDisplayNotification.$Properties} message CMsgGCClientDisplayNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientDisplayNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCClientDisplayNotification.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13914,38 +17985,64 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCClientDisplayNotification} CMsgGCClientDisplayNotification + * @returns {CMsgGCClientDisplayNotification & CMsgGCClientDisplayNotification.$Shape} CMsgGCClientDisplayNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientDisplayNotification.decode = function decode(reader, length) { + CMsgGCClientDisplayNotification.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCClientDisplayNotification(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCClientDisplayNotification(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.notification_title_localization_key = reader.string(); - break; - case 2: - message.notification_body_localization_key = reader.string(); - break; - case 3: - if (!(message.body_substring_keys && message.body_substring_keys.length)) - message.body_substring_keys = []; - message.body_substring_keys.push(reader.string()); - break; - case 4: - if (!(message.body_substring_values && message.body_substring_values.length)) - message.body_substring_values = []; - message.body_substring_values.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.notification_title_localization_key = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.notification_body_localization_key = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.body_substring_keys && message.body_substring_keys.length)) + message.body_substring_keys = []; + message.body_substring_keys.push(reader.string()); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.body_substring_values && message.body_substring_values.length)) + message.body_substring_values = []; + message.body_substring_values.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13955,11 +18052,11 @@ * @memberof CMsgGCClientDisplayNotification * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCClientDisplayNotification} CMsgGCClientDisplayNotification + * @returns {CMsgGCClientDisplayNotification & CMsgGCClientDisplayNotification.$Shape} CMsgGCClientDisplayNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientDisplayNotification.decodeDelimited = function decodeDelimited(reader) { + CMsgGCClientDisplayNotification.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13973,24 +18070,28 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCClientDisplayNotification.verify = function verify(message) { + CMsgGCClientDisplayNotification.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.notification_title_localization_key != null && message.hasOwnProperty("notification_title_localization_key")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.notification_title_localization_key != null && $Object.hasOwnProperty.call(message, "notification_title_localization_key")) if (!$util.isString(message.notification_title_localization_key)) return "notification_title_localization_key: string expected"; - if (message.notification_body_localization_key != null && message.hasOwnProperty("notification_body_localization_key")) + if (message.notification_body_localization_key != null && $Object.hasOwnProperty.call(message, "notification_body_localization_key")) if (!$util.isString(message.notification_body_localization_key)) return "notification_body_localization_key: string expected"; - if (message.body_substring_keys != null && message.hasOwnProperty("body_substring_keys")) { - if (!Array.isArray(message.body_substring_keys)) + if (message.body_substring_keys != null && $Object.hasOwnProperty.call(message, "body_substring_keys")) { + if (!$Array.isArray(message.body_substring_keys)) return "body_substring_keys: array expected"; for (var i = 0; i < message.body_substring_keys.length; ++i) if (!$util.isString(message.body_substring_keys[i])) return "body_substring_keys: string[] expected"; } - if (message.body_substring_values != null && message.hasOwnProperty("body_substring_values")) { - if (!Array.isArray(message.body_substring_values)) + if (message.body_substring_values != null && $Object.hasOwnProperty.call(message, "body_substring_values")) { + if (!$Array.isArray(message.body_substring_values)) return "body_substring_values: array expected"; for (var i = 0; i < message.body_substring_values.length; ++i) if (!$util.isString(message.body_substring_values[i])) @@ -14007,27 +18108,33 @@ * @param {Object.} object Plain object * @returns {CMsgGCClientDisplayNotification} CMsgGCClientDisplayNotification */ - CMsgGCClientDisplayNotification.fromObject = function fromObject(object) { + CMsgGCClientDisplayNotification.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCClientDisplayNotification) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCClientDisplayNotification: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCClientDisplayNotification(); if (object.notification_title_localization_key != null) - message.notification_title_localization_key = String(object.notification_title_localization_key); + message.notification_title_localization_key = $String(object.notification_title_localization_key); if (object.notification_body_localization_key != null) - message.notification_body_localization_key = String(object.notification_body_localization_key); + message.notification_body_localization_key = $String(object.notification_body_localization_key); if (object.body_substring_keys) { - if (!Array.isArray(object.body_substring_keys)) - throw TypeError(".CMsgGCClientDisplayNotification.body_substring_keys: array expected"); - message.body_substring_keys = []; + if (!$Array.isArray(object.body_substring_keys)) + throw $TypeError(".CMsgGCClientDisplayNotification.body_substring_keys: array expected"); + message.body_substring_keys = $Array(object.body_substring_keys.length); for (var i = 0; i < object.body_substring_keys.length; ++i) - message.body_substring_keys[i] = String(object.body_substring_keys[i]); + message.body_substring_keys[i] = $String(object.body_substring_keys[i]); } if (object.body_substring_values) { - if (!Array.isArray(object.body_substring_values)) - throw TypeError(".CMsgGCClientDisplayNotification.body_substring_values: array expected"); - message.body_substring_values = []; + if (!$Array.isArray(object.body_substring_values)) + throw $TypeError(".CMsgGCClientDisplayNotification.body_substring_values: array expected"); + message.body_substring_values = $Array(object.body_substring_values.length); for (var i = 0; i < object.body_substring_values.length; ++i) - message.body_substring_values[i] = String(object.body_substring_values[i]); + message.body_substring_values[i] = $String(object.body_substring_values[i]); } return message; }; @@ -14041,9 +18148,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCClientDisplayNotification.toObject = function toObject(message, options) { + CMsgGCClientDisplayNotification.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.body_substring_keys = []; @@ -14053,17 +18164,17 @@ object.notification_title_localization_key = ""; object.notification_body_localization_key = ""; } - if (message.notification_title_localization_key != null && message.hasOwnProperty("notification_title_localization_key")) + if (message.notification_title_localization_key != null && $Object.hasOwnProperty.call(message, "notification_title_localization_key")) object.notification_title_localization_key = message.notification_title_localization_key; - if (message.notification_body_localization_key != null && message.hasOwnProperty("notification_body_localization_key")) + if (message.notification_body_localization_key != null && $Object.hasOwnProperty.call(message, "notification_body_localization_key")) object.notification_body_localization_key = message.notification_body_localization_key; if (message.body_substring_keys && message.body_substring_keys.length) { - object.body_substring_keys = []; + object.body_substring_keys = $Array(message.body_substring_keys.length); for (var j = 0; j < message.body_substring_keys.length; ++j) object.body_substring_keys[j] = message.body_substring_keys[j]; } if (message.body_substring_values && message.body_substring_values.length) { - object.body_substring_values = []; + object.body_substring_values = $Array(message.body_substring_values.length); for (var j = 0; j < message.body_substring_values.length; ++j) object.body_substring_values[j] = message.body_substring_values[j]; } @@ -14077,8 +18188,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCClientDisplayNotification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCClientDisplayNotification.prototype.toJSON = function() { + return CMsgGCClientDisplayNotification.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCClientDisplayNotification + * @function getTypeUrl + * @memberof CMsgGCClientDisplayNotification + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCClientDisplayNotification.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCClientDisplayNotification"; }; return CMsgGCClientDisplayNotification; @@ -14086,27 +18211,40 @@ $root.CMsgGCShowItemsPickedUp = (function() { + /** + * Properties of a CMsgGCShowItemsPickedUp. + * @typedef {Object} CMsgGCShowItemsPickedUp.$Properties + * @property {number|Long|null} [player_steamid] CMsgGCShowItemsPickedUp player_steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCShowItemsPickedUp. * @exports ICMsgGCShowItemsPickedUp * @interface ICMsgGCShowItemsPickedUp - * @property {number|Long|null} [player_steamid] CMsgGCShowItemsPickedUp player_steamid + * @augments CMsgGCShowItemsPickedUp.$Properties + * @deprecated Use CMsgGCShowItemsPickedUp.$Properties instead. + */ + + /** + * Shape of a CMsgGCShowItemsPickedUp. + * @typedef {CMsgGCShowItemsPickedUp.$Properties} CMsgGCShowItemsPickedUp.$Shape */ /** * Constructs a new CMsgGCShowItemsPickedUp. * @exports CMsgGCShowItemsPickedUp * @classdesc Represents a CMsgGCShowItemsPickedUp. - * @implements ICMsgGCShowItemsPickedUp * @constructor - * @param {ICMsgGCShowItemsPickedUp=} [properties] Properties to set + * @param {CMsgGCShowItemsPickedUp.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCShowItemsPickedUp(properties) { + var CMsgGCShowItemsPickedUp = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCShowItemsPickedUp player_steamid. @@ -14114,17 +18252,21 @@ * @memberof CMsgGCShowItemsPickedUp * @instance */ - CMsgGCShowItemsPickedUp.prototype.player_steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCShowItemsPickedUp.prototype.player_steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCShowItemsPickedUp instance using the specified properties. * @function create * @memberof CMsgGCShowItemsPickedUp * @static - * @param {ICMsgGCShowItemsPickedUp=} [properties] Properties to set + * @param {CMsgGCShowItemsPickedUp.$Properties=} [properties] Properties to set * @returns {CMsgGCShowItemsPickedUp} CMsgGCShowItemsPickedUp instance + * @type {{ + * (properties: CMsgGCShowItemsPickedUp.$Shape): CMsgGCShowItemsPickedUp & CMsgGCShowItemsPickedUp.$Shape; + * (properties?: CMsgGCShowItemsPickedUp.$Properties): CMsgGCShowItemsPickedUp; + * }} */ - CMsgGCShowItemsPickedUp.create = function create(properties) { + CMsgGCShowItemsPickedUp.create = function(properties) { return new CMsgGCShowItemsPickedUp(properties); }; @@ -14133,15 +18275,22 @@ * @function encode * @memberof CMsgGCShowItemsPickedUp * @static - * @param {ICMsgGCShowItemsPickedUp} message CMsgGCShowItemsPickedUp message or plain object to encode + * @param {CMsgGCShowItemsPickedUp.$Properties} message CMsgGCShowItemsPickedUp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCShowItemsPickedUp.encode = function encode(message, writer) { + CMsgGCShowItemsPickedUp.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.player_steamid != null && Object.hasOwnProperty.call(message, "player_steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.player_steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14150,12 +18299,12 @@ * @function encodeDelimited * @memberof CMsgGCShowItemsPickedUp * @static - * @param {ICMsgGCShowItemsPickedUp} message CMsgGCShowItemsPickedUp message or plain object to encode + * @param {CMsgGCShowItemsPickedUp.$Properties} message CMsgGCShowItemsPickedUp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCShowItemsPickedUp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCShowItemsPickedUp.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14165,25 +18314,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCShowItemsPickedUp} CMsgGCShowItemsPickedUp + * @returns {CMsgGCShowItemsPickedUp & CMsgGCShowItemsPickedUp.$Shape} CMsgGCShowItemsPickedUp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCShowItemsPickedUp.decode = function decode(reader, length) { + CMsgGCShowItemsPickedUp.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCShowItemsPickedUp(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCShowItemsPickedUp(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.player_steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.player_steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14193,11 +18359,11 @@ * @memberof CMsgGCShowItemsPickedUp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCShowItemsPickedUp} CMsgGCShowItemsPickedUp + * @returns {CMsgGCShowItemsPickedUp & CMsgGCShowItemsPickedUp.$Shape} CMsgGCShowItemsPickedUp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCShowItemsPickedUp.decodeDelimited = function decodeDelimited(reader) { + CMsgGCShowItemsPickedUp.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14211,10 +18377,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCShowItemsPickedUp.verify = function verify(message) { + CMsgGCShowItemsPickedUp.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.player_steamid != null && message.hasOwnProperty("player_steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) if (!$util.isInteger(message.player_steamid) && !(message.player_steamid && $util.isInteger(message.player_steamid.low) && $util.isInteger(message.player_steamid.high))) return "player_steamid: integer|Long expected"; return null; @@ -14228,19 +18398,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCShowItemsPickedUp} CMsgGCShowItemsPickedUp */ - CMsgGCShowItemsPickedUp.fromObject = function fromObject(object) { + CMsgGCShowItemsPickedUp.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCShowItemsPickedUp) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCShowItemsPickedUp: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCShowItemsPickedUp(); if (object.player_steamid != null) if ($util.Long) - (message.player_steamid = $util.Long.fromValue(object.player_steamid)).unsigned = false; + message.player_steamid = $util.Long.fromValue(object.player_steamid, true); else if (typeof object.player_steamid === "string") - message.player_steamid = parseInt(object.player_steamid, 10); + message.player_steamid = $parseInt(object.player_steamid, 10); else if (typeof object.player_steamid === "number") message.player_steamid = object.player_steamid; else if (typeof object.player_steamid === "object") - message.player_steamid = new $util.LongBits(object.player_steamid.low >>> 0, object.player_steamid.high >>> 0).toNumber(); + message.player_steamid = new $util.LongBits(object.player_steamid.low >>> 0, object.player_steamid.high >>> 0).toNumber(true); return message; }; @@ -14253,21 +18429,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCShowItemsPickedUp.toObject = function toObject(message, options) { + CMsgGCShowItemsPickedUp.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.player_steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.player_steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.player_steamid = options.longs === String ? "0" : 0; - if (message.player_steamid != null && message.hasOwnProperty("player_steamid")) - if (typeof message.player_steamid === "number") - object.player_steamid = options.longs === String ? String(message.player_steamid) : message.player_steamid; + object.player_steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.player_steamid = typeof message.player_steamid === "number" ? $BigInt(message.player_steamid) : $util.Long.fromBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0, true).toBigInt(); + else if (typeof message.player_steamid === "number") + object.player_steamid = options.longs === $String ? $String(message.player_steamid) : message.player_steamid; else - object.player_steamid = options.longs === String ? $util.Long.prototype.toString.call(message.player_steamid) : options.longs === Number ? new $util.LongBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0).toNumber() : message.player_steamid; + object.player_steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.player_steamid) : options.longs === $Number ? new $util.LongBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0).toNumber(true) : message.player_steamid; return object; }; @@ -14278,8 +18460,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCShowItemsPickedUp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCShowItemsPickedUp.prototype.toJSON = function() { + return CMsgGCShowItemsPickedUp.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCShowItemsPickedUp + * @function getTypeUrl + * @memberof CMsgGCShowItemsPickedUp + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCShowItemsPickedUp.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCShowItemsPickedUp"; }; return CMsgGCShowItemsPickedUp; @@ -14289,27 +18485,40 @@ /** * Properties of a CMsgUpdatePeriodicEvent. - * @exports ICMsgUpdatePeriodicEvent - * @interface ICMsgUpdatePeriodicEvent + * @typedef {Object} CMsgUpdatePeriodicEvent.$Properties * @property {number|null} [account_id] CMsgUpdatePeriodicEvent account_id * @property {number|null} [event_type] CMsgUpdatePeriodicEvent event_type * @property {number|null} [amount] CMsgUpdatePeriodicEvent amount + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgUpdatePeriodicEvent. + * @exports ICMsgUpdatePeriodicEvent + * @interface ICMsgUpdatePeriodicEvent + * @augments CMsgUpdatePeriodicEvent.$Properties + * @deprecated Use CMsgUpdatePeriodicEvent.$Properties instead. + */ + + /** + * Shape of a CMsgUpdatePeriodicEvent. + * @typedef {CMsgUpdatePeriodicEvent.$Properties} CMsgUpdatePeriodicEvent.$Shape */ /** * Constructs a new CMsgUpdatePeriodicEvent. * @exports CMsgUpdatePeriodicEvent * @classdesc Represents a CMsgUpdatePeriodicEvent. - * @implements ICMsgUpdatePeriodicEvent * @constructor - * @param {ICMsgUpdatePeriodicEvent=} [properties] Properties to set + * @param {CMsgUpdatePeriodicEvent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgUpdatePeriodicEvent(properties) { + var CMsgUpdatePeriodicEvent = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgUpdatePeriodicEvent account_id. @@ -14340,10 +18549,14 @@ * @function create * @memberof CMsgUpdatePeriodicEvent * @static - * @param {ICMsgUpdatePeriodicEvent=} [properties] Properties to set + * @param {CMsgUpdatePeriodicEvent.$Properties=} [properties] Properties to set * @returns {CMsgUpdatePeriodicEvent} CMsgUpdatePeriodicEvent instance + * @type {{ + * (properties: CMsgUpdatePeriodicEvent.$Shape): CMsgUpdatePeriodicEvent & CMsgUpdatePeriodicEvent.$Shape; + * (properties?: CMsgUpdatePeriodicEvent.$Properties): CMsgUpdatePeriodicEvent; + * }} */ - CMsgUpdatePeriodicEvent.create = function create(properties) { + CMsgUpdatePeriodicEvent.create = function(properties) { return new CMsgUpdatePeriodicEvent(properties); }; @@ -14352,19 +18565,26 @@ * @function encode * @memberof CMsgUpdatePeriodicEvent * @static - * @param {ICMsgUpdatePeriodicEvent} message CMsgUpdatePeriodicEvent message or plain object to encode + * @param {CMsgUpdatePeriodicEvent.$Properties} message CMsgUpdatePeriodicEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdatePeriodicEvent.encode = function encode(message, writer) { + CMsgUpdatePeriodicEvent.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.event_type != null && Object.hasOwnProperty.call(message, "event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.event_type); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + if (message.amount != null && $Object.hasOwnProperty.call(message, "amount")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.amount); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14373,12 +18593,12 @@ * @function encodeDelimited * @memberof CMsgUpdatePeriodicEvent * @static - * @param {ICMsgUpdatePeriodicEvent} message CMsgUpdatePeriodicEvent message or plain object to encode + * @param {CMsgUpdatePeriodicEvent.$Properties} message CMsgUpdatePeriodicEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdatePeriodicEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgUpdatePeriodicEvent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14388,31 +18608,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgUpdatePeriodicEvent} CMsgUpdatePeriodicEvent + * @returns {CMsgUpdatePeriodicEvent & CMsgUpdatePeriodicEvent.$Shape} CMsgUpdatePeriodicEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdatePeriodicEvent.decode = function decode(reader, length) { + CMsgUpdatePeriodicEvent.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgUpdatePeriodicEvent(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgUpdatePeriodicEvent(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.event_type = reader.uint32(); - break; - case 3: - message.amount = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.event_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.amount = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14422,11 +18665,11 @@ * @memberof CMsgUpdatePeriodicEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgUpdatePeriodicEvent} CMsgUpdatePeriodicEvent + * @returns {CMsgUpdatePeriodicEvent & CMsgUpdatePeriodicEvent.$Shape} CMsgUpdatePeriodicEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdatePeriodicEvent.decodeDelimited = function decodeDelimited(reader) { + CMsgUpdatePeriodicEvent.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14440,16 +18683,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgUpdatePeriodicEvent.verify = function verify(message) { + CMsgUpdatePeriodicEvent.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) if (!$util.isInteger(message.event_type)) return "event_type: integer expected"; - if (message.amount != null && message.hasOwnProperty("amount")) + if (message.amount != null && $Object.hasOwnProperty.call(message, "amount")) if (!$util.isInteger(message.amount)) return "amount: integer expected"; return null; @@ -14463,9 +18710,15 @@ * @param {Object.} object Plain object * @returns {CMsgUpdatePeriodicEvent} CMsgUpdatePeriodicEvent */ - CMsgUpdatePeriodicEvent.fromObject = function fromObject(object) { + CMsgUpdatePeriodicEvent.fromObject = function (object, _depth) { if (object instanceof $root.CMsgUpdatePeriodicEvent) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgUpdatePeriodicEvent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgUpdatePeriodicEvent(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -14485,20 +18738,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgUpdatePeriodicEvent.toObject = function toObject(message, options) { + CMsgUpdatePeriodicEvent.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; object.event_type = 0; object.amount = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) object.event_type = message.event_type; - if (message.amount != null && message.hasOwnProperty("amount")) + if (message.amount != null && $Object.hasOwnProperty.call(message, "amount")) object.amount = message.amount; return object; }; @@ -14510,8 +18767,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgUpdatePeriodicEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgUpdatePeriodicEvent.prototype.toJSON = function() { + return CMsgUpdatePeriodicEvent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgUpdatePeriodicEvent + * @function getTypeUrl + * @memberof CMsgUpdatePeriodicEvent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgUpdatePeriodicEvent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgUpdatePeriodicEvent"; }; return CMsgUpdatePeriodicEvent; @@ -14521,28 +18792,41 @@ /** * Properties of a CMsgGCIncrementKillCountResponse. - * @exports ICMsgGCIncrementKillCountResponse - * @interface ICMsgGCIncrementKillCountResponse + * @typedef {Object} CMsgGCIncrementKillCountResponse.$Properties * @property {number|null} [killer_account_id] CMsgGCIncrementKillCountResponse killer_account_id * @property {number|null} [num_kills] CMsgGCIncrementKillCountResponse num_kills * @property {number|null} [item_def] CMsgGCIncrementKillCountResponse item_def * @property {number|null} [level_type] CMsgGCIncrementKillCountResponse level_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCIncrementKillCountResponse. + * @exports ICMsgGCIncrementKillCountResponse + * @interface ICMsgGCIncrementKillCountResponse + * @augments CMsgGCIncrementKillCountResponse.$Properties + * @deprecated Use CMsgGCIncrementKillCountResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCIncrementKillCountResponse. + * @typedef {CMsgGCIncrementKillCountResponse.$Properties} CMsgGCIncrementKillCountResponse.$Shape */ /** * Constructs a new CMsgGCIncrementKillCountResponse. * @exports CMsgGCIncrementKillCountResponse * @classdesc Represents a CMsgGCIncrementKillCountResponse. - * @implements ICMsgGCIncrementKillCountResponse * @constructor - * @param {ICMsgGCIncrementKillCountResponse=} [properties] Properties to set + * @param {CMsgGCIncrementKillCountResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCIncrementKillCountResponse(properties) { + var CMsgGCIncrementKillCountResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCIncrementKillCountResponse killer_account_id. @@ -14581,10 +18865,14 @@ * @function create * @memberof CMsgGCIncrementKillCountResponse * @static - * @param {ICMsgGCIncrementKillCountResponse=} [properties] Properties to set + * @param {CMsgGCIncrementKillCountResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCIncrementKillCountResponse} CMsgGCIncrementKillCountResponse instance + * @type {{ + * (properties: CMsgGCIncrementKillCountResponse.$Shape): CMsgGCIncrementKillCountResponse & CMsgGCIncrementKillCountResponse.$Shape; + * (properties?: CMsgGCIncrementKillCountResponse.$Properties): CMsgGCIncrementKillCountResponse; + * }} */ - CMsgGCIncrementKillCountResponse.create = function create(properties) { + CMsgGCIncrementKillCountResponse.create = function(properties) { return new CMsgGCIncrementKillCountResponse(properties); }; @@ -14593,21 +18881,28 @@ * @function encode * @memberof CMsgGCIncrementKillCountResponse * @static - * @param {ICMsgGCIncrementKillCountResponse} message CMsgGCIncrementKillCountResponse message or plain object to encode + * @param {CMsgGCIncrementKillCountResponse.$Properties} message CMsgGCIncrementKillCountResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCIncrementKillCountResponse.encode = function encode(message, writer) { + CMsgGCIncrementKillCountResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.killer_account_id != null && Object.hasOwnProperty.call(message, "killer_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.killer_account_id != null && $Object.hasOwnProperty.call(message, "killer_account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.killer_account_id); - if (message.num_kills != null && Object.hasOwnProperty.call(message, "num_kills")) + if (message.num_kills != null && $Object.hasOwnProperty.call(message, "num_kills")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.num_kills); - if (message.item_def != null && Object.hasOwnProperty.call(message, "item_def")) + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.item_def); - if (message.level_type != null && Object.hasOwnProperty.call(message, "level_type")) + if (message.level_type != null && $Object.hasOwnProperty.call(message, "level_type")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.level_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14616,12 +18911,12 @@ * @function encodeDelimited * @memberof CMsgGCIncrementKillCountResponse * @static - * @param {ICMsgGCIncrementKillCountResponse} message CMsgGCIncrementKillCountResponse message or plain object to encode + * @param {CMsgGCIncrementKillCountResponse.$Properties} message CMsgGCIncrementKillCountResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCIncrementKillCountResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCIncrementKillCountResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14631,34 +18926,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCIncrementKillCountResponse} CMsgGCIncrementKillCountResponse + * @returns {CMsgGCIncrementKillCountResponse & CMsgGCIncrementKillCountResponse.$Shape} CMsgGCIncrementKillCountResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCIncrementKillCountResponse.decode = function decode(reader, length) { + CMsgGCIncrementKillCountResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCIncrementKillCountResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCIncrementKillCountResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.killer_account_id = reader.uint32(); - break; - case 2: - message.num_kills = reader.uint32(); - break; - case 3: - message.item_def = reader.uint32(); - break; - case 4: - message.level_type = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.killer_account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.num_kills = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_def = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.level_type = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14668,11 +18989,11 @@ * @memberof CMsgGCIncrementKillCountResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCIncrementKillCountResponse} CMsgGCIncrementKillCountResponse + * @returns {CMsgGCIncrementKillCountResponse & CMsgGCIncrementKillCountResponse.$Shape} CMsgGCIncrementKillCountResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCIncrementKillCountResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCIncrementKillCountResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14686,19 +19007,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCIncrementKillCountResponse.verify = function verify(message) { + CMsgGCIncrementKillCountResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.killer_account_id != null && message.hasOwnProperty("killer_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.killer_account_id != null && $Object.hasOwnProperty.call(message, "killer_account_id")) if (!$util.isInteger(message.killer_account_id)) return "killer_account_id: integer expected"; - if (message.num_kills != null && message.hasOwnProperty("num_kills")) + if (message.num_kills != null && $Object.hasOwnProperty.call(message, "num_kills")) if (!$util.isInteger(message.num_kills)) return "num_kills: integer expected"; - if (message.item_def != null && message.hasOwnProperty("item_def")) + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) if (!$util.isInteger(message.item_def)) return "item_def: integer expected"; - if (message.level_type != null && message.hasOwnProperty("level_type")) + if (message.level_type != null && $Object.hasOwnProperty.call(message, "level_type")) if (!$util.isInteger(message.level_type)) return "level_type: integer expected"; return null; @@ -14712,9 +19037,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCIncrementKillCountResponse} CMsgGCIncrementKillCountResponse */ - CMsgGCIncrementKillCountResponse.fromObject = function fromObject(object) { + CMsgGCIncrementKillCountResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCIncrementKillCountResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCIncrementKillCountResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCIncrementKillCountResponse(); if (object.killer_account_id != null) message.killer_account_id = object.killer_account_id >>> 0; @@ -14736,9 +19067,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCIncrementKillCountResponse.toObject = function toObject(message, options) { + CMsgGCIncrementKillCountResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.killer_account_id = 0; @@ -14746,13 +19081,13 @@ object.item_def = 0; object.level_type = 0; } - if (message.killer_account_id != null && message.hasOwnProperty("killer_account_id")) + if (message.killer_account_id != null && $Object.hasOwnProperty.call(message, "killer_account_id")) object.killer_account_id = message.killer_account_id; - if (message.num_kills != null && message.hasOwnProperty("num_kills")) + if (message.num_kills != null && $Object.hasOwnProperty.call(message, "num_kills")) object.num_kills = message.num_kills; - if (message.item_def != null && message.hasOwnProperty("item_def")) + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) object.item_def = message.item_def; - if (message.level_type != null && message.hasOwnProperty("level_type")) + if (message.level_type != null && $Object.hasOwnProperty.call(message, "level_type")) object.level_type = message.level_type; return object; }; @@ -14764,8 +19099,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCIncrementKillCountResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCIncrementKillCountResponse.prototype.toJSON = function() { + return CMsgGCIncrementKillCountResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCIncrementKillCountResponse + * @function getTypeUrl + * @memberof CMsgGCIncrementKillCountResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCIncrementKillCountResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCIncrementKillCountResponse"; }; return CMsgGCIncrementKillCountResponse; @@ -14775,26 +19124,39 @@ /** * Properties of a CMsgGCRemoveStrangePart. - * @exports ICMsgGCRemoveStrangePart - * @interface ICMsgGCRemoveStrangePart + * @typedef {Object} CMsgGCRemoveStrangePart.$Properties * @property {number|Long|null} [item_id] CMsgGCRemoveStrangePart item_id * @property {number|null} [strange_part_score_type] CMsgGCRemoveStrangePart strange_part_score_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRemoveStrangePart. + * @exports ICMsgGCRemoveStrangePart + * @interface ICMsgGCRemoveStrangePart + * @augments CMsgGCRemoveStrangePart.$Properties + * @deprecated Use CMsgGCRemoveStrangePart.$Properties instead. + */ + + /** + * Shape of a CMsgGCRemoveStrangePart. + * @typedef {CMsgGCRemoveStrangePart.$Properties} CMsgGCRemoveStrangePart.$Shape */ /** * Constructs a new CMsgGCRemoveStrangePart. * @exports CMsgGCRemoveStrangePart * @classdesc Represents a CMsgGCRemoveStrangePart. - * @implements ICMsgGCRemoveStrangePart * @constructor - * @param {ICMsgGCRemoveStrangePart=} [properties] Properties to set + * @param {CMsgGCRemoveStrangePart.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRemoveStrangePart(properties) { + var CMsgGCRemoveStrangePart = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRemoveStrangePart item_id. @@ -14817,10 +19179,14 @@ * @function create * @memberof CMsgGCRemoveStrangePart * @static - * @param {ICMsgGCRemoveStrangePart=} [properties] Properties to set + * @param {CMsgGCRemoveStrangePart.$Properties=} [properties] Properties to set * @returns {CMsgGCRemoveStrangePart} CMsgGCRemoveStrangePart instance + * @type {{ + * (properties: CMsgGCRemoveStrangePart.$Shape): CMsgGCRemoveStrangePart & CMsgGCRemoveStrangePart.$Shape; + * (properties?: CMsgGCRemoveStrangePart.$Properties): CMsgGCRemoveStrangePart; + * }} */ - CMsgGCRemoveStrangePart.create = function create(properties) { + CMsgGCRemoveStrangePart.create = function(properties) { return new CMsgGCRemoveStrangePart(properties); }; @@ -14829,17 +19195,24 @@ * @function encode * @memberof CMsgGCRemoveStrangePart * @static - * @param {ICMsgGCRemoveStrangePart} message CMsgGCRemoveStrangePart message or plain object to encode + * @param {CMsgGCRemoveStrangePart.$Properties} message CMsgGCRemoveStrangePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveStrangePart.encode = function encode(message, writer) { + CMsgGCRemoveStrangePart.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.strange_part_score_type != null && Object.hasOwnProperty.call(message, "strange_part_score_type")) + if (message.strange_part_score_type != null && $Object.hasOwnProperty.call(message, "strange_part_score_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.strange_part_score_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14848,12 +19221,12 @@ * @function encodeDelimited * @memberof CMsgGCRemoveStrangePart * @static - * @param {ICMsgGCRemoveStrangePart} message CMsgGCRemoveStrangePart message or plain object to encode + * @param {CMsgGCRemoveStrangePart.$Properties} message CMsgGCRemoveStrangePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveStrangePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRemoveStrangePart.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14863,28 +19236,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRemoveStrangePart} CMsgGCRemoveStrangePart + * @returns {CMsgGCRemoveStrangePart & CMsgGCRemoveStrangePart.$Shape} CMsgGCRemoveStrangePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveStrangePart.decode = function decode(reader, length) { + CMsgGCRemoveStrangePart.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRemoveStrangePart(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRemoveStrangePart(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.strange_part_score_type = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.strange_part_score_type = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14894,11 +19287,11 @@ * @memberof CMsgGCRemoveStrangePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRemoveStrangePart} CMsgGCRemoveStrangePart + * @returns {CMsgGCRemoveStrangePart & CMsgGCRemoveStrangePart.$Shape} CMsgGCRemoveStrangePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveStrangePart.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRemoveStrangePart.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14912,13 +19305,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRemoveStrangePart.verify = function verify(message) { + CMsgGCRemoveStrangePart.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.strange_part_score_type != null && message.hasOwnProperty("strange_part_score_type")) + if (message.strange_part_score_type != null && $Object.hasOwnProperty.call(message, "strange_part_score_type")) if (!$util.isInteger(message.strange_part_score_type)) return "strange_part_score_type: integer expected"; return null; @@ -14932,15 +19329,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCRemoveStrangePart} CMsgGCRemoveStrangePart */ - CMsgGCRemoveStrangePart.fromObject = function fromObject(object) { + CMsgGCRemoveStrangePart.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRemoveStrangePart) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRemoveStrangePart: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRemoveStrangePart(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -14959,24 +19362,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRemoveStrangePart.toObject = function toObject(message, options) { + CMsgGCRemoveStrangePart.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.strange_part_score_type = 0; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.strange_part_score_type != null && message.hasOwnProperty("strange_part_score_type")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.strange_part_score_type != null && $Object.hasOwnProperty.call(message, "strange_part_score_type")) object.strange_part_score_type = message.strange_part_score_type; return object; }; @@ -14988,8 +19397,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRemoveStrangePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRemoveStrangePart.prototype.toJSON = function() { + return CMsgGCRemoveStrangePart.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRemoveStrangePart + * @function getTypeUrl + * @memberof CMsgGCRemoveStrangePart + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRemoveStrangePart.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRemoveStrangePart"; }; return CMsgGCRemoveStrangePart; @@ -14999,26 +19422,39 @@ /** * Properties of a CMsgGCRemoveUpgradeCard. - * @exports ICMsgGCRemoveUpgradeCard - * @interface ICMsgGCRemoveUpgradeCard + * @typedef {Object} CMsgGCRemoveUpgradeCard.$Properties * @property {number|Long|null} [item_id] CMsgGCRemoveUpgradeCard item_id * @property {number|null} [attribute_index] CMsgGCRemoveUpgradeCard attribute_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRemoveUpgradeCard. + * @exports ICMsgGCRemoveUpgradeCard + * @interface ICMsgGCRemoveUpgradeCard + * @augments CMsgGCRemoveUpgradeCard.$Properties + * @deprecated Use CMsgGCRemoveUpgradeCard.$Properties instead. + */ + + /** + * Shape of a CMsgGCRemoveUpgradeCard. + * @typedef {CMsgGCRemoveUpgradeCard.$Properties} CMsgGCRemoveUpgradeCard.$Shape */ /** * Constructs a new CMsgGCRemoveUpgradeCard. * @exports CMsgGCRemoveUpgradeCard * @classdesc Represents a CMsgGCRemoveUpgradeCard. - * @implements ICMsgGCRemoveUpgradeCard * @constructor - * @param {ICMsgGCRemoveUpgradeCard=} [properties] Properties to set + * @param {CMsgGCRemoveUpgradeCard.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRemoveUpgradeCard(properties) { + var CMsgGCRemoveUpgradeCard = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRemoveUpgradeCard item_id. @@ -15041,10 +19477,14 @@ * @function create * @memberof CMsgGCRemoveUpgradeCard * @static - * @param {ICMsgGCRemoveUpgradeCard=} [properties] Properties to set + * @param {CMsgGCRemoveUpgradeCard.$Properties=} [properties] Properties to set * @returns {CMsgGCRemoveUpgradeCard} CMsgGCRemoveUpgradeCard instance + * @type {{ + * (properties: CMsgGCRemoveUpgradeCard.$Shape): CMsgGCRemoveUpgradeCard & CMsgGCRemoveUpgradeCard.$Shape; + * (properties?: CMsgGCRemoveUpgradeCard.$Properties): CMsgGCRemoveUpgradeCard; + * }} */ - CMsgGCRemoveUpgradeCard.create = function create(properties) { + CMsgGCRemoveUpgradeCard.create = function(properties) { return new CMsgGCRemoveUpgradeCard(properties); }; @@ -15053,17 +19493,24 @@ * @function encode * @memberof CMsgGCRemoveUpgradeCard * @static - * @param {ICMsgGCRemoveUpgradeCard} message CMsgGCRemoveUpgradeCard message or plain object to encode + * @param {CMsgGCRemoveUpgradeCard.$Properties} message CMsgGCRemoveUpgradeCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveUpgradeCard.encode = function encode(message, writer) { + CMsgGCRemoveUpgradeCard.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.attribute_index != null && Object.hasOwnProperty.call(message, "attribute_index")) + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.attribute_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15072,12 +19519,12 @@ * @function encodeDelimited * @memberof CMsgGCRemoveUpgradeCard * @static - * @param {ICMsgGCRemoveUpgradeCard} message CMsgGCRemoveUpgradeCard message or plain object to encode + * @param {CMsgGCRemoveUpgradeCard.$Properties} message CMsgGCRemoveUpgradeCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveUpgradeCard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRemoveUpgradeCard.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15087,28 +19534,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRemoveUpgradeCard} CMsgGCRemoveUpgradeCard + * @returns {CMsgGCRemoveUpgradeCard & CMsgGCRemoveUpgradeCard.$Shape} CMsgGCRemoveUpgradeCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveUpgradeCard.decode = function decode(reader, length) { + CMsgGCRemoveUpgradeCard.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRemoveUpgradeCard(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRemoveUpgradeCard(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.attribute_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.attribute_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15118,11 +19585,11 @@ * @memberof CMsgGCRemoveUpgradeCard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRemoveUpgradeCard} CMsgGCRemoveUpgradeCard + * @returns {CMsgGCRemoveUpgradeCard & CMsgGCRemoveUpgradeCard.$Shape} CMsgGCRemoveUpgradeCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveUpgradeCard.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRemoveUpgradeCard.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15136,13 +19603,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRemoveUpgradeCard.verify = function verify(message) { + CMsgGCRemoveUpgradeCard.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.attribute_index != null && message.hasOwnProperty("attribute_index")) + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) if (!$util.isInteger(message.attribute_index)) return "attribute_index: integer expected"; return null; @@ -15156,15 +19627,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCRemoveUpgradeCard} CMsgGCRemoveUpgradeCard */ - CMsgGCRemoveUpgradeCard.fromObject = function fromObject(object) { + CMsgGCRemoveUpgradeCard.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRemoveUpgradeCard) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRemoveUpgradeCard: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRemoveUpgradeCard(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -15183,24 +19660,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRemoveUpgradeCard.toObject = function toObject(message, options) { + CMsgGCRemoveUpgradeCard.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.attribute_index = 0; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.attribute_index != null && message.hasOwnProperty("attribute_index")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) object.attribute_index = message.attribute_index; return object; }; @@ -15212,8 +19695,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRemoveUpgradeCard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRemoveUpgradeCard.prototype.toJSON = function() { + return CMsgGCRemoveUpgradeCard.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRemoveUpgradeCard + * @function getTypeUrl + * @memberof CMsgGCRemoveUpgradeCard + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRemoveUpgradeCard.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRemoveUpgradeCard"; }; return CMsgGCRemoveUpgradeCard; @@ -15221,27 +19718,40 @@ $root.CMsgGCRemoveCustomizationAttributeSimple = (function() { + /** + * Properties of a CMsgGCRemoveCustomizationAttributeSimple. + * @typedef {Object} CMsgGCRemoveCustomizationAttributeSimple.$Properties + * @property {number|Long|null} [item_id] CMsgGCRemoveCustomizationAttributeSimple item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCRemoveCustomizationAttributeSimple. * @exports ICMsgGCRemoveCustomizationAttributeSimple * @interface ICMsgGCRemoveCustomizationAttributeSimple - * @property {number|Long|null} [item_id] CMsgGCRemoveCustomizationAttributeSimple item_id + * @augments CMsgGCRemoveCustomizationAttributeSimple.$Properties + * @deprecated Use CMsgGCRemoveCustomizationAttributeSimple.$Properties instead. + */ + + /** + * Shape of a CMsgGCRemoveCustomizationAttributeSimple. + * @typedef {CMsgGCRemoveCustomizationAttributeSimple.$Properties} CMsgGCRemoveCustomizationAttributeSimple.$Shape */ /** * Constructs a new CMsgGCRemoveCustomizationAttributeSimple. * @exports CMsgGCRemoveCustomizationAttributeSimple * @classdesc Represents a CMsgGCRemoveCustomizationAttributeSimple. - * @implements ICMsgGCRemoveCustomizationAttributeSimple * @constructor - * @param {ICMsgGCRemoveCustomizationAttributeSimple=} [properties] Properties to set + * @param {CMsgGCRemoveCustomizationAttributeSimple.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRemoveCustomizationAttributeSimple(properties) { + var CMsgGCRemoveCustomizationAttributeSimple = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRemoveCustomizationAttributeSimple item_id. @@ -15256,10 +19766,14 @@ * @function create * @memberof CMsgGCRemoveCustomizationAttributeSimple * @static - * @param {ICMsgGCRemoveCustomizationAttributeSimple=} [properties] Properties to set + * @param {CMsgGCRemoveCustomizationAttributeSimple.$Properties=} [properties] Properties to set * @returns {CMsgGCRemoveCustomizationAttributeSimple} CMsgGCRemoveCustomizationAttributeSimple instance + * @type {{ + * (properties: CMsgGCRemoveCustomizationAttributeSimple.$Shape): CMsgGCRemoveCustomizationAttributeSimple & CMsgGCRemoveCustomizationAttributeSimple.$Shape; + * (properties?: CMsgGCRemoveCustomizationAttributeSimple.$Properties): CMsgGCRemoveCustomizationAttributeSimple; + * }} */ - CMsgGCRemoveCustomizationAttributeSimple.create = function create(properties) { + CMsgGCRemoveCustomizationAttributeSimple.create = function(properties) { return new CMsgGCRemoveCustomizationAttributeSimple(properties); }; @@ -15268,15 +19782,22 @@ * @function encode * @memberof CMsgGCRemoveCustomizationAttributeSimple * @static - * @param {ICMsgGCRemoveCustomizationAttributeSimple} message CMsgGCRemoveCustomizationAttributeSimple message or plain object to encode + * @param {CMsgGCRemoveCustomizationAttributeSimple.$Properties} message CMsgGCRemoveCustomizationAttributeSimple message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveCustomizationAttributeSimple.encode = function encode(message, writer) { + CMsgGCRemoveCustomizationAttributeSimple.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15285,12 +19806,12 @@ * @function encodeDelimited * @memberof CMsgGCRemoveCustomizationAttributeSimple * @static - * @param {ICMsgGCRemoveCustomizationAttributeSimple} message CMsgGCRemoveCustomizationAttributeSimple message or plain object to encode + * @param {CMsgGCRemoveCustomizationAttributeSimple.$Properties} message CMsgGCRemoveCustomizationAttributeSimple message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveCustomizationAttributeSimple.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRemoveCustomizationAttributeSimple.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15300,25 +19821,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRemoveCustomizationAttributeSimple} CMsgGCRemoveCustomizationAttributeSimple + * @returns {CMsgGCRemoveCustomizationAttributeSimple & CMsgGCRemoveCustomizationAttributeSimple.$Shape} CMsgGCRemoveCustomizationAttributeSimple * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveCustomizationAttributeSimple.decode = function decode(reader, length) { + CMsgGCRemoveCustomizationAttributeSimple.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRemoveCustomizationAttributeSimple(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRemoveCustomizationAttributeSimple(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15328,11 +19866,11 @@ * @memberof CMsgGCRemoveCustomizationAttributeSimple * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRemoveCustomizationAttributeSimple} CMsgGCRemoveCustomizationAttributeSimple + * @returns {CMsgGCRemoveCustomizationAttributeSimple & CMsgGCRemoveCustomizationAttributeSimple.$Shape} CMsgGCRemoveCustomizationAttributeSimple * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveCustomizationAttributeSimple.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRemoveCustomizationAttributeSimple.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15346,10 +19884,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRemoveCustomizationAttributeSimple.verify = function verify(message) { + CMsgGCRemoveCustomizationAttributeSimple.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; return null; @@ -15363,15 +19905,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCRemoveCustomizationAttributeSimple} CMsgGCRemoveCustomizationAttributeSimple */ - CMsgGCRemoveCustomizationAttributeSimple.fromObject = function fromObject(object) { + CMsgGCRemoveCustomizationAttributeSimple.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRemoveCustomizationAttributeSimple) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRemoveCustomizationAttributeSimple: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRemoveCustomizationAttributeSimple(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -15388,21 +19936,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRemoveCustomizationAttributeSimple.toObject = function toObject(message, options) { + CMsgGCRemoveCustomizationAttributeSimple.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; return object; }; @@ -15413,8 +19967,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRemoveCustomizationAttributeSimple.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRemoveCustomizationAttributeSimple.prototype.toJSON = function() { + return CMsgGCRemoveCustomizationAttributeSimple.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRemoveCustomizationAttributeSimple + * @function getTypeUrl + * @memberof CMsgGCRemoveCustomizationAttributeSimple + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRemoveCustomizationAttributeSimple.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRemoveCustomizationAttributeSimple"; }; return CMsgGCRemoveCustomizationAttributeSimple; @@ -15422,27 +19990,40 @@ $root.CMsgGCResetStrangeScores = (function() { + /** + * Properties of a CMsgGCResetStrangeScores. + * @typedef {Object} CMsgGCResetStrangeScores.$Properties + * @property {number|Long|null} [item_id] CMsgGCResetStrangeScores item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCResetStrangeScores. * @exports ICMsgGCResetStrangeScores * @interface ICMsgGCResetStrangeScores - * @property {number|Long|null} [item_id] CMsgGCResetStrangeScores item_id + * @augments CMsgGCResetStrangeScores.$Properties + * @deprecated Use CMsgGCResetStrangeScores.$Properties instead. + */ + + /** + * Shape of a CMsgGCResetStrangeScores. + * @typedef {CMsgGCResetStrangeScores.$Properties} CMsgGCResetStrangeScores.$Shape */ /** * Constructs a new CMsgGCResetStrangeScores. * @exports CMsgGCResetStrangeScores * @classdesc Represents a CMsgGCResetStrangeScores. - * @implements ICMsgGCResetStrangeScores * @constructor - * @param {ICMsgGCResetStrangeScores=} [properties] Properties to set + * @param {CMsgGCResetStrangeScores.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCResetStrangeScores(properties) { + var CMsgGCResetStrangeScores = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCResetStrangeScores item_id. @@ -15457,10 +20038,14 @@ * @function create * @memberof CMsgGCResetStrangeScores * @static - * @param {ICMsgGCResetStrangeScores=} [properties] Properties to set + * @param {CMsgGCResetStrangeScores.$Properties=} [properties] Properties to set * @returns {CMsgGCResetStrangeScores} CMsgGCResetStrangeScores instance + * @type {{ + * (properties: CMsgGCResetStrangeScores.$Shape): CMsgGCResetStrangeScores & CMsgGCResetStrangeScores.$Shape; + * (properties?: CMsgGCResetStrangeScores.$Properties): CMsgGCResetStrangeScores; + * }} */ - CMsgGCResetStrangeScores.create = function create(properties) { + CMsgGCResetStrangeScores.create = function(properties) { return new CMsgGCResetStrangeScores(properties); }; @@ -15469,15 +20054,22 @@ * @function encode * @memberof CMsgGCResetStrangeScores * @static - * @param {ICMsgGCResetStrangeScores} message CMsgGCResetStrangeScores message or plain object to encode + * @param {CMsgGCResetStrangeScores.$Properties} message CMsgGCResetStrangeScores message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCResetStrangeScores.encode = function encode(message, writer) { + CMsgGCResetStrangeScores.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15486,12 +20078,12 @@ * @function encodeDelimited * @memberof CMsgGCResetStrangeScores * @static - * @param {ICMsgGCResetStrangeScores} message CMsgGCResetStrangeScores message or plain object to encode + * @param {CMsgGCResetStrangeScores.$Properties} message CMsgGCResetStrangeScores message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCResetStrangeScores.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCResetStrangeScores.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15501,25 +20093,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCResetStrangeScores} CMsgGCResetStrangeScores + * @returns {CMsgGCResetStrangeScores & CMsgGCResetStrangeScores.$Shape} CMsgGCResetStrangeScores * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCResetStrangeScores.decode = function decode(reader, length) { + CMsgGCResetStrangeScores.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCResetStrangeScores(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCResetStrangeScores(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15529,11 +20138,11 @@ * @memberof CMsgGCResetStrangeScores * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCResetStrangeScores} CMsgGCResetStrangeScores + * @returns {CMsgGCResetStrangeScores & CMsgGCResetStrangeScores.$Shape} CMsgGCResetStrangeScores * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCResetStrangeScores.decodeDelimited = function decodeDelimited(reader) { + CMsgGCResetStrangeScores.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15547,10 +20156,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCResetStrangeScores.verify = function verify(message) { + CMsgGCResetStrangeScores.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; return null; @@ -15564,15 +20177,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCResetStrangeScores} CMsgGCResetStrangeScores */ - CMsgGCResetStrangeScores.fromObject = function fromObject(object) { + CMsgGCResetStrangeScores.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCResetStrangeScores) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCResetStrangeScores: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCResetStrangeScores(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -15589,21 +20208,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCResetStrangeScores.toObject = function toObject(message, options) { + CMsgGCResetStrangeScores.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; return object; }; @@ -15614,8 +20239,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCResetStrangeScores.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCResetStrangeScores.prototype.toJSON = function() { + return CMsgGCResetStrangeScores.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCResetStrangeScores + * @function getTypeUrl + * @memberof CMsgGCResetStrangeScores + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCResetStrangeScores.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCResetStrangeScores"; }; return CMsgGCResetStrangeScores; @@ -15623,27 +20262,40 @@ $root.CMsgGCItemPreviewItemBoughtNotification = (function() { + /** + * Properties of a CMsgGCItemPreviewItemBoughtNotification. + * @typedef {Object} CMsgGCItemPreviewItemBoughtNotification.$Properties + * @property {number|null} [item_def_index] CMsgGCItemPreviewItemBoughtNotification item_def_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCItemPreviewItemBoughtNotification. * @exports ICMsgGCItemPreviewItemBoughtNotification * @interface ICMsgGCItemPreviewItemBoughtNotification - * @property {number|null} [item_def_index] CMsgGCItemPreviewItemBoughtNotification item_def_index + * @augments CMsgGCItemPreviewItemBoughtNotification.$Properties + * @deprecated Use CMsgGCItemPreviewItemBoughtNotification.$Properties instead. + */ + + /** + * Shape of a CMsgGCItemPreviewItemBoughtNotification. + * @typedef {CMsgGCItemPreviewItemBoughtNotification.$Properties} CMsgGCItemPreviewItemBoughtNotification.$Shape */ /** * Constructs a new CMsgGCItemPreviewItemBoughtNotification. * @exports CMsgGCItemPreviewItemBoughtNotification * @classdesc Represents a CMsgGCItemPreviewItemBoughtNotification. - * @implements ICMsgGCItemPreviewItemBoughtNotification * @constructor - * @param {ICMsgGCItemPreviewItemBoughtNotification=} [properties] Properties to set + * @param {CMsgGCItemPreviewItemBoughtNotification.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCItemPreviewItemBoughtNotification(properties) { + var CMsgGCItemPreviewItemBoughtNotification = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCItemPreviewItemBoughtNotification item_def_index. @@ -15658,10 +20310,14 @@ * @function create * @memberof CMsgGCItemPreviewItemBoughtNotification * @static - * @param {ICMsgGCItemPreviewItemBoughtNotification=} [properties] Properties to set + * @param {CMsgGCItemPreviewItemBoughtNotification.$Properties=} [properties] Properties to set * @returns {CMsgGCItemPreviewItemBoughtNotification} CMsgGCItemPreviewItemBoughtNotification instance + * @type {{ + * (properties: CMsgGCItemPreviewItemBoughtNotification.$Shape): CMsgGCItemPreviewItemBoughtNotification & CMsgGCItemPreviewItemBoughtNotification.$Shape; + * (properties?: CMsgGCItemPreviewItemBoughtNotification.$Properties): CMsgGCItemPreviewItemBoughtNotification; + * }} */ - CMsgGCItemPreviewItemBoughtNotification.create = function create(properties) { + CMsgGCItemPreviewItemBoughtNotification.create = function(properties) { return new CMsgGCItemPreviewItemBoughtNotification(properties); }; @@ -15670,15 +20326,22 @@ * @function encode * @memberof CMsgGCItemPreviewItemBoughtNotification * @static - * @param {ICMsgGCItemPreviewItemBoughtNotification} message CMsgGCItemPreviewItemBoughtNotification message or plain object to encode + * @param {CMsgGCItemPreviewItemBoughtNotification.$Properties} message CMsgGCItemPreviewItemBoughtNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCItemPreviewItemBoughtNotification.encode = function encode(message, writer) { + CMsgGCItemPreviewItemBoughtNotification.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_def_index != null && Object.hasOwnProperty.call(message, "item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.item_def_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15687,12 +20350,12 @@ * @function encodeDelimited * @memberof CMsgGCItemPreviewItemBoughtNotification * @static - * @param {ICMsgGCItemPreviewItemBoughtNotification} message CMsgGCItemPreviewItemBoughtNotification message or plain object to encode + * @param {CMsgGCItemPreviewItemBoughtNotification.$Properties} message CMsgGCItemPreviewItemBoughtNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCItemPreviewItemBoughtNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCItemPreviewItemBoughtNotification.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15702,25 +20365,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCItemPreviewItemBoughtNotification} CMsgGCItemPreviewItemBoughtNotification + * @returns {CMsgGCItemPreviewItemBoughtNotification & CMsgGCItemPreviewItemBoughtNotification.$Shape} CMsgGCItemPreviewItemBoughtNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCItemPreviewItemBoughtNotification.decode = function decode(reader, length) { + CMsgGCItemPreviewItemBoughtNotification.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCItemPreviewItemBoughtNotification(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCItemPreviewItemBoughtNotification(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_def_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_def_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15730,11 +20410,11 @@ * @memberof CMsgGCItemPreviewItemBoughtNotification * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCItemPreviewItemBoughtNotification} CMsgGCItemPreviewItemBoughtNotification + * @returns {CMsgGCItemPreviewItemBoughtNotification & CMsgGCItemPreviewItemBoughtNotification.$Shape} CMsgGCItemPreviewItemBoughtNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCItemPreviewItemBoughtNotification.decodeDelimited = function decodeDelimited(reader) { + CMsgGCItemPreviewItemBoughtNotification.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15748,10 +20428,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCItemPreviewItemBoughtNotification.verify = function verify(message) { + CMsgGCItemPreviewItemBoughtNotification.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) if (!$util.isInteger(message.item_def_index)) return "item_def_index: integer expected"; return null; @@ -15765,9 +20449,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCItemPreviewItemBoughtNotification} CMsgGCItemPreviewItemBoughtNotification */ - CMsgGCItemPreviewItemBoughtNotification.fromObject = function fromObject(object) { + CMsgGCItemPreviewItemBoughtNotification.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCItemPreviewItemBoughtNotification) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCItemPreviewItemBoughtNotification: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCItemPreviewItemBoughtNotification(); if (object.item_def_index != null) message.item_def_index = object.item_def_index >>> 0; @@ -15783,13 +20473,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCItemPreviewItemBoughtNotification.toObject = function toObject(message, options) { + CMsgGCItemPreviewItemBoughtNotification.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.item_def_index = 0; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) object.item_def_index = message.item_def_index; return object; }; @@ -15801,8 +20495,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCItemPreviewItemBoughtNotification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCItemPreviewItemBoughtNotification.prototype.toJSON = function() { + return CMsgGCItemPreviewItemBoughtNotification.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCItemPreviewItemBoughtNotification + * @function getTypeUrl + * @memberof CMsgGCItemPreviewItemBoughtNotification + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCItemPreviewItemBoughtNotification.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCItemPreviewItemBoughtNotification"; }; return CMsgGCItemPreviewItemBoughtNotification; @@ -15810,27 +20518,40 @@ $root.CMsgGCStorePurchaseCancel = (function() { + /** + * Properties of a CMsgGCStorePurchaseCancel. + * @typedef {Object} CMsgGCStorePurchaseCancel.$Properties + * @property {number|Long|null} [txn_id] CMsgGCStorePurchaseCancel txn_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCStorePurchaseCancel. * @exports ICMsgGCStorePurchaseCancel * @interface ICMsgGCStorePurchaseCancel - * @property {number|Long|null} [txn_id] CMsgGCStorePurchaseCancel txn_id + * @augments CMsgGCStorePurchaseCancel.$Properties + * @deprecated Use CMsgGCStorePurchaseCancel.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseCancel. + * @typedef {CMsgGCStorePurchaseCancel.$Properties} CMsgGCStorePurchaseCancel.$Shape */ /** * Constructs a new CMsgGCStorePurchaseCancel. * @exports CMsgGCStorePurchaseCancel * @classdesc Represents a CMsgGCStorePurchaseCancel. - * @implements ICMsgGCStorePurchaseCancel * @constructor - * @param {ICMsgGCStorePurchaseCancel=} [properties] Properties to set + * @param {CMsgGCStorePurchaseCancel.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseCancel(properties) { + var CMsgGCStorePurchaseCancel = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseCancel txn_id. @@ -15845,10 +20566,14 @@ * @function create * @memberof CMsgGCStorePurchaseCancel * @static - * @param {ICMsgGCStorePurchaseCancel=} [properties] Properties to set + * @param {CMsgGCStorePurchaseCancel.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseCancel} CMsgGCStorePurchaseCancel instance + * @type {{ + * (properties: CMsgGCStorePurchaseCancel.$Shape): CMsgGCStorePurchaseCancel & CMsgGCStorePurchaseCancel.$Shape; + * (properties?: CMsgGCStorePurchaseCancel.$Properties): CMsgGCStorePurchaseCancel; + * }} */ - CMsgGCStorePurchaseCancel.create = function create(properties) { + CMsgGCStorePurchaseCancel.create = function(properties) { return new CMsgGCStorePurchaseCancel(properties); }; @@ -15857,15 +20582,22 @@ * @function encode * @memberof CMsgGCStorePurchaseCancel * @static - * @param {ICMsgGCStorePurchaseCancel} message CMsgGCStorePurchaseCancel message or plain object to encode + * @param {CMsgGCStorePurchaseCancel.$Properties} message CMsgGCStorePurchaseCancel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseCancel.encode = function encode(message, writer) { + CMsgGCStorePurchaseCancel.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.txn_id != null && Object.hasOwnProperty.call(message, "txn_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.txn_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15874,12 +20606,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseCancel * @static - * @param {ICMsgGCStorePurchaseCancel} message CMsgGCStorePurchaseCancel message or plain object to encode + * @param {CMsgGCStorePurchaseCancel.$Properties} message CMsgGCStorePurchaseCancel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseCancel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseCancel.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15889,25 +20621,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseCancel} CMsgGCStorePurchaseCancel + * @returns {CMsgGCStorePurchaseCancel & CMsgGCStorePurchaseCancel.$Shape} CMsgGCStorePurchaseCancel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseCancel.decode = function decode(reader, length) { + CMsgGCStorePurchaseCancel.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseCancel(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseCancel(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txn_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.txn_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15917,11 +20666,11 @@ * @memberof CMsgGCStorePurchaseCancel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseCancel} CMsgGCStorePurchaseCancel + * @returns {CMsgGCStorePurchaseCancel & CMsgGCStorePurchaseCancel.$Shape} CMsgGCStorePurchaseCancel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseCancel.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseCancel.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15935,10 +20684,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseCancel.verify = function verify(message) { + CMsgGCStorePurchaseCancel.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) if (!$util.isInteger(message.txn_id) && !(message.txn_id && $util.isInteger(message.txn_id.low) && $util.isInteger(message.txn_id.high))) return "txn_id: integer|Long expected"; return null; @@ -15952,15 +20705,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseCancel} CMsgGCStorePurchaseCancel */ - CMsgGCStorePurchaseCancel.fromObject = function fromObject(object) { + CMsgGCStorePurchaseCancel.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseCancel) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseCancel: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseCancel(); if (object.txn_id != null) if ($util.Long) - (message.txn_id = $util.Long.fromValue(object.txn_id)).unsigned = true; + message.txn_id = $util.Long.fromValue(object.txn_id, true); else if (typeof object.txn_id === "string") - message.txn_id = parseInt(object.txn_id, 10); + message.txn_id = $parseInt(object.txn_id, 10); else if (typeof object.txn_id === "number") message.txn_id = object.txn_id; else if (typeof object.txn_id === "object") @@ -15977,21 +20736,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseCancel.toObject = function toObject(message, options) { + CMsgGCStorePurchaseCancel.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.txn_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.txn_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.txn_id = options.longs === String ? "0" : 0; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) - if (typeof message.txn_id === "number") - object.txn_id = options.longs === String ? String(message.txn_id) : message.txn_id; + object.txn_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.txn_id = typeof message.txn_id === "number" ? $BigInt(message.txn_id) : $util.Long.fromBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0, true).toBigInt(); + else if (typeof message.txn_id === "number") + object.txn_id = options.longs === $String ? $String(message.txn_id) : message.txn_id; else - object.txn_id = options.longs === String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; + object.txn_id = options.longs === $String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === $Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; return object; }; @@ -16002,8 +20767,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseCancel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseCancel.prototype.toJSON = function() { + return CMsgGCStorePurchaseCancel.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseCancel + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseCancel + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseCancel.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseCancel"; }; return CMsgGCStorePurchaseCancel; @@ -16011,27 +20790,40 @@ $root.CMsgGCStorePurchaseCancelResponse = (function() { + /** + * Properties of a CMsgGCStorePurchaseCancelResponse. + * @typedef {Object} CMsgGCStorePurchaseCancelResponse.$Properties + * @property {number|null} [result] CMsgGCStorePurchaseCancelResponse result + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCStorePurchaseCancelResponse. * @exports ICMsgGCStorePurchaseCancelResponse * @interface ICMsgGCStorePurchaseCancelResponse - * @property {number|null} [result] CMsgGCStorePurchaseCancelResponse result + * @augments CMsgGCStorePurchaseCancelResponse.$Properties + * @deprecated Use CMsgGCStorePurchaseCancelResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseCancelResponse. + * @typedef {CMsgGCStorePurchaseCancelResponse.$Properties} CMsgGCStorePurchaseCancelResponse.$Shape */ /** * Constructs a new CMsgGCStorePurchaseCancelResponse. * @exports CMsgGCStorePurchaseCancelResponse * @classdesc Represents a CMsgGCStorePurchaseCancelResponse. - * @implements ICMsgGCStorePurchaseCancelResponse * @constructor - * @param {ICMsgGCStorePurchaseCancelResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseCancelResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseCancelResponse(properties) { + var CMsgGCStorePurchaseCancelResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseCancelResponse result. @@ -16046,10 +20838,14 @@ * @function create * @memberof CMsgGCStorePurchaseCancelResponse * @static - * @param {ICMsgGCStorePurchaseCancelResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseCancelResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseCancelResponse} CMsgGCStorePurchaseCancelResponse instance + * @type {{ + * (properties: CMsgGCStorePurchaseCancelResponse.$Shape): CMsgGCStorePurchaseCancelResponse & CMsgGCStorePurchaseCancelResponse.$Shape; + * (properties?: CMsgGCStorePurchaseCancelResponse.$Properties): CMsgGCStorePurchaseCancelResponse; + * }} */ - CMsgGCStorePurchaseCancelResponse.create = function create(properties) { + CMsgGCStorePurchaseCancelResponse.create = function(properties) { return new CMsgGCStorePurchaseCancelResponse(properties); }; @@ -16058,15 +20854,22 @@ * @function encode * @memberof CMsgGCStorePurchaseCancelResponse * @static - * @param {ICMsgGCStorePurchaseCancelResponse} message CMsgGCStorePurchaseCancelResponse message or plain object to encode + * @param {CMsgGCStorePurchaseCancelResponse.$Properties} message CMsgGCStorePurchaseCancelResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseCancelResponse.encode = function encode(message, writer) { + CMsgGCStorePurchaseCancelResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.result); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16075,12 +20878,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseCancelResponse * @static - * @param {ICMsgGCStorePurchaseCancelResponse} message CMsgGCStorePurchaseCancelResponse message or plain object to encode + * @param {CMsgGCStorePurchaseCancelResponse.$Properties} message CMsgGCStorePurchaseCancelResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseCancelResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseCancelResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16090,25 +20893,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseCancelResponse} CMsgGCStorePurchaseCancelResponse + * @returns {CMsgGCStorePurchaseCancelResponse & CMsgGCStorePurchaseCancelResponse.$Shape} CMsgGCStorePurchaseCancelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseCancelResponse.decode = function decode(reader, length) { + CMsgGCStorePurchaseCancelResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseCancelResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseCancelResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16118,11 +20938,11 @@ * @memberof CMsgGCStorePurchaseCancelResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseCancelResponse} CMsgGCStorePurchaseCancelResponse + * @returns {CMsgGCStorePurchaseCancelResponse & CMsgGCStorePurchaseCancelResponse.$Shape} CMsgGCStorePurchaseCancelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseCancelResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseCancelResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16136,10 +20956,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseCancelResponse.verify = function verify(message) { + CMsgGCStorePurchaseCancelResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; return null; @@ -16153,9 +20977,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseCancelResponse} CMsgGCStorePurchaseCancelResponse */ - CMsgGCStorePurchaseCancelResponse.fromObject = function fromObject(object) { + CMsgGCStorePurchaseCancelResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseCancelResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseCancelResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseCancelResponse(); if (object.result != null) message.result = object.result >>> 0; @@ -16171,13 +21001,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseCancelResponse.toObject = function toObject(message, options) { + CMsgGCStorePurchaseCancelResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.result = 0; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; return object; }; @@ -16189,8 +21023,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseCancelResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseCancelResponse.prototype.toJSON = function() { + return CMsgGCStorePurchaseCancelResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseCancelResponse + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseCancelResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseCancelResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseCancelResponse"; }; return CMsgGCStorePurchaseCancelResponse; @@ -16198,27 +21046,40 @@ $root.CMsgGCStorePurchaseFinalize = (function() { + /** + * Properties of a CMsgGCStorePurchaseFinalize. + * @typedef {Object} CMsgGCStorePurchaseFinalize.$Properties + * @property {number|Long|null} [txn_id] CMsgGCStorePurchaseFinalize txn_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCStorePurchaseFinalize. * @exports ICMsgGCStorePurchaseFinalize * @interface ICMsgGCStorePurchaseFinalize - * @property {number|Long|null} [txn_id] CMsgGCStorePurchaseFinalize txn_id + * @augments CMsgGCStorePurchaseFinalize.$Properties + * @deprecated Use CMsgGCStorePurchaseFinalize.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseFinalize. + * @typedef {CMsgGCStorePurchaseFinalize.$Properties} CMsgGCStorePurchaseFinalize.$Shape */ /** * Constructs a new CMsgGCStorePurchaseFinalize. * @exports CMsgGCStorePurchaseFinalize * @classdesc Represents a CMsgGCStorePurchaseFinalize. - * @implements ICMsgGCStorePurchaseFinalize * @constructor - * @param {ICMsgGCStorePurchaseFinalize=} [properties] Properties to set + * @param {CMsgGCStorePurchaseFinalize.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseFinalize(properties) { + var CMsgGCStorePurchaseFinalize = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseFinalize txn_id. @@ -16233,10 +21094,14 @@ * @function create * @memberof CMsgGCStorePurchaseFinalize * @static - * @param {ICMsgGCStorePurchaseFinalize=} [properties] Properties to set + * @param {CMsgGCStorePurchaseFinalize.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseFinalize} CMsgGCStorePurchaseFinalize instance + * @type {{ + * (properties: CMsgGCStorePurchaseFinalize.$Shape): CMsgGCStorePurchaseFinalize & CMsgGCStorePurchaseFinalize.$Shape; + * (properties?: CMsgGCStorePurchaseFinalize.$Properties): CMsgGCStorePurchaseFinalize; + * }} */ - CMsgGCStorePurchaseFinalize.create = function create(properties) { + CMsgGCStorePurchaseFinalize.create = function(properties) { return new CMsgGCStorePurchaseFinalize(properties); }; @@ -16245,15 +21110,22 @@ * @function encode * @memberof CMsgGCStorePurchaseFinalize * @static - * @param {ICMsgGCStorePurchaseFinalize} message CMsgGCStorePurchaseFinalize message or plain object to encode + * @param {CMsgGCStorePurchaseFinalize.$Properties} message CMsgGCStorePurchaseFinalize message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseFinalize.encode = function encode(message, writer) { + CMsgGCStorePurchaseFinalize.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.txn_id != null && Object.hasOwnProperty.call(message, "txn_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.txn_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16262,12 +21134,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseFinalize * @static - * @param {ICMsgGCStorePurchaseFinalize} message CMsgGCStorePurchaseFinalize message or plain object to encode + * @param {CMsgGCStorePurchaseFinalize.$Properties} message CMsgGCStorePurchaseFinalize message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseFinalize.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseFinalize.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16277,25 +21149,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseFinalize} CMsgGCStorePurchaseFinalize + * @returns {CMsgGCStorePurchaseFinalize & CMsgGCStorePurchaseFinalize.$Shape} CMsgGCStorePurchaseFinalize * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseFinalize.decode = function decode(reader, length) { + CMsgGCStorePurchaseFinalize.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseFinalize(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseFinalize(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txn_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.txn_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16305,11 +21194,11 @@ * @memberof CMsgGCStorePurchaseFinalize * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseFinalize} CMsgGCStorePurchaseFinalize + * @returns {CMsgGCStorePurchaseFinalize & CMsgGCStorePurchaseFinalize.$Shape} CMsgGCStorePurchaseFinalize * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseFinalize.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseFinalize.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16323,10 +21212,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseFinalize.verify = function verify(message) { + CMsgGCStorePurchaseFinalize.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) if (!$util.isInteger(message.txn_id) && !(message.txn_id && $util.isInteger(message.txn_id.low) && $util.isInteger(message.txn_id.high))) return "txn_id: integer|Long expected"; return null; @@ -16340,15 +21233,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseFinalize} CMsgGCStorePurchaseFinalize */ - CMsgGCStorePurchaseFinalize.fromObject = function fromObject(object) { + CMsgGCStorePurchaseFinalize.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseFinalize) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseFinalize: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseFinalize(); if (object.txn_id != null) if ($util.Long) - (message.txn_id = $util.Long.fromValue(object.txn_id)).unsigned = true; + message.txn_id = $util.Long.fromValue(object.txn_id, true); else if (typeof object.txn_id === "string") - message.txn_id = parseInt(object.txn_id, 10); + message.txn_id = $parseInt(object.txn_id, 10); else if (typeof object.txn_id === "number") message.txn_id = object.txn_id; else if (typeof object.txn_id === "object") @@ -16365,21 +21264,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseFinalize.toObject = function toObject(message, options) { + CMsgGCStorePurchaseFinalize.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.txn_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.txn_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.txn_id = options.longs === String ? "0" : 0; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) - if (typeof message.txn_id === "number") - object.txn_id = options.longs === String ? String(message.txn_id) : message.txn_id; + object.txn_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.txn_id = typeof message.txn_id === "number" ? $BigInt(message.txn_id) : $util.Long.fromBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0, true).toBigInt(); + else if (typeof message.txn_id === "number") + object.txn_id = options.longs === $String ? $String(message.txn_id) : message.txn_id; else - object.txn_id = options.longs === String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; + object.txn_id = options.longs === $String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === $Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; return object; }; @@ -16390,8 +21295,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseFinalize.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseFinalize.prototype.toJSON = function() { + return CMsgGCStorePurchaseFinalize.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseFinalize + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseFinalize + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseFinalize.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseFinalize"; }; return CMsgGCStorePurchaseFinalize; @@ -16401,27 +21320,40 @@ /** * Properties of a CMsgGCStorePurchaseFinalizeResponse. - * @exports ICMsgGCStorePurchaseFinalizeResponse - * @interface ICMsgGCStorePurchaseFinalizeResponse + * @typedef {Object} CMsgGCStorePurchaseFinalizeResponse.$Properties * @property {number|null} [result] CMsgGCStorePurchaseFinalizeResponse result * @property {Array.|null} [item_ids] CMsgGCStorePurchaseFinalizeResponse item_ids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCStorePurchaseFinalizeResponse. + * @exports ICMsgGCStorePurchaseFinalizeResponse + * @interface ICMsgGCStorePurchaseFinalizeResponse + * @augments CMsgGCStorePurchaseFinalizeResponse.$Properties + * @deprecated Use CMsgGCStorePurchaseFinalizeResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseFinalizeResponse. + * @typedef {CMsgGCStorePurchaseFinalizeResponse.$Properties} CMsgGCStorePurchaseFinalizeResponse.$Shape */ /** * Constructs a new CMsgGCStorePurchaseFinalizeResponse. * @exports CMsgGCStorePurchaseFinalizeResponse * @classdesc Represents a CMsgGCStorePurchaseFinalizeResponse. - * @implements ICMsgGCStorePurchaseFinalizeResponse * @constructor - * @param {ICMsgGCStorePurchaseFinalizeResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseFinalizeResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseFinalizeResponse(properties) { + var CMsgGCStorePurchaseFinalizeResponse = function (properties) { this.item_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseFinalizeResponse result. @@ -16444,10 +21376,14 @@ * @function create * @memberof CMsgGCStorePurchaseFinalizeResponse * @static - * @param {ICMsgGCStorePurchaseFinalizeResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseFinalizeResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseFinalizeResponse} CMsgGCStorePurchaseFinalizeResponse instance + * @type {{ + * (properties: CMsgGCStorePurchaseFinalizeResponse.$Shape): CMsgGCStorePurchaseFinalizeResponse & CMsgGCStorePurchaseFinalizeResponse.$Shape; + * (properties?: CMsgGCStorePurchaseFinalizeResponse.$Properties): CMsgGCStorePurchaseFinalizeResponse; + * }} */ - CMsgGCStorePurchaseFinalizeResponse.create = function create(properties) { + CMsgGCStorePurchaseFinalizeResponse.create = function(properties) { return new CMsgGCStorePurchaseFinalizeResponse(properties); }; @@ -16456,18 +21392,25 @@ * @function encode * @memberof CMsgGCStorePurchaseFinalizeResponse * @static - * @param {ICMsgGCStorePurchaseFinalizeResponse} message CMsgGCStorePurchaseFinalizeResponse message or plain object to encode + * @param {CMsgGCStorePurchaseFinalizeResponse.$Properties} message CMsgGCStorePurchaseFinalizeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseFinalizeResponse.encode = function encode(message, writer) { + CMsgGCStorePurchaseFinalizeResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.result); if (message.item_ids != null && message.item_ids.length) for (var i = 0; i < message.item_ids.length; ++i) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_ids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16476,12 +21419,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseFinalizeResponse * @static - * @param {ICMsgGCStorePurchaseFinalizeResponse} message CMsgGCStorePurchaseFinalizeResponse message or plain object to encode + * @param {CMsgGCStorePurchaseFinalizeResponse.$Properties} message CMsgGCStorePurchaseFinalizeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseFinalizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseFinalizeResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16491,35 +21434,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseFinalizeResponse} CMsgGCStorePurchaseFinalizeResponse + * @returns {CMsgGCStorePurchaseFinalizeResponse & CMsgGCStorePurchaseFinalizeResponse.$Shape} CMsgGCStorePurchaseFinalizeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseFinalizeResponse.decode = function decode(reader, length) { + CMsgGCStorePurchaseFinalizeResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseFinalizeResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseFinalizeResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.uint32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.item_ids && message.item_ids.length)) - message.item_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.item_ids.push(reader.uint64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.item_ids && message.item_ids.length)) + message.item_ids = []; + reader.uint64s(message.item_ids); + continue; + } + if (wireType !== 0) + break; + if (!(message.item_ids && message.item_ids.length)) + message.item_ids = []; message.item_ids.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16529,11 +21493,11 @@ * @memberof CMsgGCStorePurchaseFinalizeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseFinalizeResponse} CMsgGCStorePurchaseFinalizeResponse + * @returns {CMsgGCStorePurchaseFinalizeResponse & CMsgGCStorePurchaseFinalizeResponse.$Shape} CMsgGCStorePurchaseFinalizeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseFinalizeResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseFinalizeResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16547,14 +21511,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseFinalizeResponse.verify = function verify(message) { + CMsgGCStorePurchaseFinalizeResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; - if (message.item_ids != null && message.hasOwnProperty("item_ids")) { - if (!Array.isArray(message.item_ids)) + if (message.item_ids != null && $Object.hasOwnProperty.call(message, "item_ids")) { + if (!$Array.isArray(message.item_ids)) return "item_ids: array expected"; for (var i = 0; i < message.item_ids.length; ++i) if (!$util.isInteger(message.item_ids[i]) && !(message.item_ids[i] && $util.isInteger(message.item_ids[i].low) && $util.isInteger(message.item_ids[i].high))) @@ -16571,21 +21539,27 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseFinalizeResponse} CMsgGCStorePurchaseFinalizeResponse */ - CMsgGCStorePurchaseFinalizeResponse.fromObject = function fromObject(object) { + CMsgGCStorePurchaseFinalizeResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseFinalizeResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseFinalizeResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseFinalizeResponse(); if (object.result != null) message.result = object.result >>> 0; if (object.item_ids) { - if (!Array.isArray(object.item_ids)) - throw TypeError(".CMsgGCStorePurchaseFinalizeResponse.item_ids: array expected"); - message.item_ids = []; + if (!$Array.isArray(object.item_ids)) + throw $TypeError(".CMsgGCStorePurchaseFinalizeResponse.item_ids: array expected"); + message.item_ids = $Array(object.item_ids.length); for (var i = 0; i < object.item_ids.length; ++i) if ($util.Long) - (message.item_ids[i] = $util.Long.fromValue(object.item_ids[i])).unsigned = true; + message.item_ids[i] = $util.Long.fromValue(object.item_ids[i], true); else if (typeof object.item_ids[i] === "string") - message.item_ids[i] = parseInt(object.item_ids[i], 10); + message.item_ids[i] = $parseInt(object.item_ids[i], 10); else if (typeof object.item_ids[i] === "number") message.item_ids[i] = object.item_ids[i]; else if (typeof object.item_ids[i] === "object") @@ -16603,23 +21577,29 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseFinalizeResponse.toObject = function toObject(message, options) { + CMsgGCStorePurchaseFinalizeResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.item_ids = []; if (options.defaults) object.result = 0; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; if (message.item_ids && message.item_ids.length) { - object.item_ids = []; + object.item_ids = $Array(message.item_ids.length); for (var j = 0; j < message.item_ids.length; ++j) - if (typeof message.item_ids[j] === "number") - object.item_ids[j] = options.longs === String ? String(message.item_ids[j]) : message.item_ids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_ids[j] = typeof message.item_ids[j] === "number" ? $BigInt(message.item_ids[j]) : $util.Long.fromBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0, true).toBigInt(); + else if (typeof message.item_ids[j] === "number") + object.item_ids[j] = options.longs === $String ? $String(message.item_ids[j]) : message.item_ids[j]; else - object.item_ids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.item_ids[j]) : options.longs === Number ? new $util.LongBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0).toNumber(true) : message.item_ids[j]; + object.item_ids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.item_ids[j]) : options.longs === $Number ? new $util.LongBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0).toNumber(true) : message.item_ids[j]; } return object; }; @@ -16631,8 +21611,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseFinalizeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseFinalizeResponse.prototype.toJSON = function() { + return CMsgGCStorePurchaseFinalizeResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseFinalizeResponse + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseFinalizeResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseFinalizeResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseFinalizeResponse"; }; return CMsgGCStorePurchaseFinalizeResponse; @@ -16642,26 +21636,39 @@ /** * Properties of a CMsgGCBannedWordListRequest. - * @exports ICMsgGCBannedWordListRequest - * @interface ICMsgGCBannedWordListRequest + * @typedef {Object} CMsgGCBannedWordListRequest.$Properties * @property {number|null} [ban_list_group_id] CMsgGCBannedWordListRequest ban_list_group_id * @property {number|null} [word_id] CMsgGCBannedWordListRequest word_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCBannedWordListRequest. + * @exports ICMsgGCBannedWordListRequest + * @interface ICMsgGCBannedWordListRequest + * @augments CMsgGCBannedWordListRequest.$Properties + * @deprecated Use CMsgGCBannedWordListRequest.$Properties instead. + */ + + /** + * Shape of a CMsgGCBannedWordListRequest. + * @typedef {CMsgGCBannedWordListRequest.$Properties} CMsgGCBannedWordListRequest.$Shape */ /** * Constructs a new CMsgGCBannedWordListRequest. * @exports CMsgGCBannedWordListRequest * @classdesc Represents a CMsgGCBannedWordListRequest. - * @implements ICMsgGCBannedWordListRequest * @constructor - * @param {ICMsgGCBannedWordListRequest=} [properties] Properties to set + * @param {CMsgGCBannedWordListRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCBannedWordListRequest(properties) { + var CMsgGCBannedWordListRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCBannedWordListRequest ban_list_group_id. @@ -16684,10 +21691,14 @@ * @function create * @memberof CMsgGCBannedWordListRequest * @static - * @param {ICMsgGCBannedWordListRequest=} [properties] Properties to set + * @param {CMsgGCBannedWordListRequest.$Properties=} [properties] Properties to set * @returns {CMsgGCBannedWordListRequest} CMsgGCBannedWordListRequest instance + * @type {{ + * (properties: CMsgGCBannedWordListRequest.$Shape): CMsgGCBannedWordListRequest & CMsgGCBannedWordListRequest.$Shape; + * (properties?: CMsgGCBannedWordListRequest.$Properties): CMsgGCBannedWordListRequest; + * }} */ - CMsgGCBannedWordListRequest.create = function create(properties) { + CMsgGCBannedWordListRequest.create = function(properties) { return new CMsgGCBannedWordListRequest(properties); }; @@ -16696,17 +21707,24 @@ * @function encode * @memberof CMsgGCBannedWordListRequest * @static - * @param {ICMsgGCBannedWordListRequest} message CMsgGCBannedWordListRequest message or plain object to encode + * @param {CMsgGCBannedWordListRequest.$Properties} message CMsgGCBannedWordListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCBannedWordListRequest.encode = function encode(message, writer) { + CMsgGCBannedWordListRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ban_list_group_id != null && Object.hasOwnProperty.call(message, "ban_list_group_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ban_list_group_id != null && $Object.hasOwnProperty.call(message, "ban_list_group_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.ban_list_group_id); - if (message.word_id != null && Object.hasOwnProperty.call(message, "word_id")) + if (message.word_id != null && $Object.hasOwnProperty.call(message, "word_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.word_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16715,12 +21733,12 @@ * @function encodeDelimited * @memberof CMsgGCBannedWordListRequest * @static - * @param {ICMsgGCBannedWordListRequest} message CMsgGCBannedWordListRequest message or plain object to encode + * @param {CMsgGCBannedWordListRequest.$Properties} message CMsgGCBannedWordListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCBannedWordListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCBannedWordListRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16730,28 +21748,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCBannedWordListRequest} CMsgGCBannedWordListRequest + * @returns {CMsgGCBannedWordListRequest & CMsgGCBannedWordListRequest.$Shape} CMsgGCBannedWordListRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCBannedWordListRequest.decode = function decode(reader, length) { + CMsgGCBannedWordListRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCBannedWordListRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCBannedWordListRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ban_list_group_id = reader.uint32(); - break; - case 2: - message.word_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ban_list_group_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.word_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16761,11 +21799,11 @@ * @memberof CMsgGCBannedWordListRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCBannedWordListRequest} CMsgGCBannedWordListRequest + * @returns {CMsgGCBannedWordListRequest & CMsgGCBannedWordListRequest.$Shape} CMsgGCBannedWordListRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCBannedWordListRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgGCBannedWordListRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16779,13 +21817,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCBannedWordListRequest.verify = function verify(message) { + CMsgGCBannedWordListRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ban_list_group_id != null && message.hasOwnProperty("ban_list_group_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ban_list_group_id != null && $Object.hasOwnProperty.call(message, "ban_list_group_id")) if (!$util.isInteger(message.ban_list_group_id)) return "ban_list_group_id: integer expected"; - if (message.word_id != null && message.hasOwnProperty("word_id")) + if (message.word_id != null && $Object.hasOwnProperty.call(message, "word_id")) if (!$util.isInteger(message.word_id)) return "word_id: integer expected"; return null; @@ -16799,9 +21841,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCBannedWordListRequest} CMsgGCBannedWordListRequest */ - CMsgGCBannedWordListRequest.fromObject = function fromObject(object) { + CMsgGCBannedWordListRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCBannedWordListRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCBannedWordListRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCBannedWordListRequest(); if (object.ban_list_group_id != null) message.ban_list_group_id = object.ban_list_group_id >>> 0; @@ -16819,17 +21867,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCBannedWordListRequest.toObject = function toObject(message, options) { + CMsgGCBannedWordListRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.ban_list_group_id = 0; object.word_id = 0; } - if (message.ban_list_group_id != null && message.hasOwnProperty("ban_list_group_id")) + if (message.ban_list_group_id != null && $Object.hasOwnProperty.call(message, "ban_list_group_id")) object.ban_list_group_id = message.ban_list_group_id; - if (message.word_id != null && message.hasOwnProperty("word_id")) + if (message.word_id != null && $Object.hasOwnProperty.call(message, "word_id")) object.word_id = message.word_id; return object; }; @@ -16841,8 +21893,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCBannedWordListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCBannedWordListRequest.prototype.toJSON = function() { + return CMsgGCBannedWordListRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCBannedWordListRequest + * @function getTypeUrl + * @memberof CMsgGCBannedWordListRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCBannedWordListRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCBannedWordListRequest"; }; return CMsgGCBannedWordListRequest; @@ -16852,28 +21918,41 @@ /** * Properties of a CMsgGCGiftedItems. - * @exports ICMsgGCGiftedItems - * @interface ICMsgGCGiftedItems + * @typedef {Object} CMsgGCGiftedItems.$Properties * @property {number|Long|null} [gifter_steam_id] CMsgGCGiftedItems gifter_steam_id * @property {boolean|null} [was_random_person] CMsgGCGiftedItems was_random_person * @property {Array.|null} [recipient_account_ids] CMsgGCGiftedItems recipient_account_ids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGiftedItems. + * @exports ICMsgGCGiftedItems + * @interface ICMsgGCGiftedItems + * @augments CMsgGCGiftedItems.$Properties + * @deprecated Use CMsgGCGiftedItems.$Properties instead. + */ + + /** + * Shape of a CMsgGCGiftedItems. + * @typedef {CMsgGCGiftedItems.$Properties} CMsgGCGiftedItems.$Shape */ /** * Constructs a new CMsgGCGiftedItems. * @exports CMsgGCGiftedItems * @classdesc Represents a CMsgGCGiftedItems. - * @implements ICMsgGCGiftedItems * @constructor - * @param {ICMsgGCGiftedItems=} [properties] Properties to set + * @param {CMsgGCGiftedItems.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGiftedItems(properties) { + var CMsgGCGiftedItems = function (properties) { this.recipient_account_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGiftedItems gifter_steam_id. @@ -16904,10 +21983,14 @@ * @function create * @memberof CMsgGCGiftedItems * @static - * @param {ICMsgGCGiftedItems=} [properties] Properties to set + * @param {CMsgGCGiftedItems.$Properties=} [properties] Properties to set * @returns {CMsgGCGiftedItems} CMsgGCGiftedItems instance + * @type {{ + * (properties: CMsgGCGiftedItems.$Shape): CMsgGCGiftedItems & CMsgGCGiftedItems.$Shape; + * (properties?: CMsgGCGiftedItems.$Properties): CMsgGCGiftedItems; + * }} */ - CMsgGCGiftedItems.create = function create(properties) { + CMsgGCGiftedItems.create = function(properties) { return new CMsgGCGiftedItems(properties); }; @@ -16916,20 +21999,27 @@ * @function encode * @memberof CMsgGCGiftedItems * @static - * @param {ICMsgGCGiftedItems} message CMsgGCGiftedItems message or plain object to encode + * @param {CMsgGCGiftedItems.$Properties} message CMsgGCGiftedItems message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGiftedItems.encode = function encode(message, writer) { + CMsgGCGiftedItems.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gifter_steam_id != null && Object.hasOwnProperty.call(message, "gifter_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gifter_steam_id != null && $Object.hasOwnProperty.call(message, "gifter_steam_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.gifter_steam_id); - if (message.was_random_person != null && Object.hasOwnProperty.call(message, "was_random_person")) + if (message.was_random_person != null && $Object.hasOwnProperty.call(message, "was_random_person")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.was_random_person); if (message.recipient_account_ids != null && message.recipient_account_ids.length) for (var i = 0; i < message.recipient_account_ids.length; ++i) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.recipient_account_ids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16938,12 +22028,12 @@ * @function encodeDelimited * @memberof CMsgGCGiftedItems * @static - * @param {ICMsgGCGiftedItems} message CMsgGCGiftedItems message or plain object to encode + * @param {CMsgGCGiftedItems.$Properties} message CMsgGCGiftedItems message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGiftedItems.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGiftedItems.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16953,38 +22043,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGiftedItems} CMsgGCGiftedItems + * @returns {CMsgGCGiftedItems & CMsgGCGiftedItems.$Shape} CMsgGCGiftedItems * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGiftedItems.decode = function decode(reader, length) { + CMsgGCGiftedItems.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGiftedItems(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGiftedItems(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gifter_steam_id = reader.uint64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - message.was_random_person = reader.bool(); - break; - case 3: - if (!(message.recipient_account_ids && message.recipient_account_ids.length)) - message.recipient_account_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.recipient_account_ids.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gifter_steam_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.was_random_person = reader.bool(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.recipient_account_ids && message.recipient_account_ids.length)) + message.recipient_account_ids = []; + reader.uint32s(message.recipient_account_ids); + continue; + } + if (wireType !== 0) + break; + if (!(message.recipient_account_ids && message.recipient_account_ids.length)) + message.recipient_account_ids = []; message.recipient_account_ids.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16994,11 +22108,11 @@ * @memberof CMsgGCGiftedItems * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGiftedItems} CMsgGCGiftedItems + * @returns {CMsgGCGiftedItems & CMsgGCGiftedItems.$Shape} CMsgGCGiftedItems * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGiftedItems.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGiftedItems.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17012,17 +22126,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGiftedItems.verify = function verify(message) { + CMsgGCGiftedItems.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gifter_steam_id != null && message.hasOwnProperty("gifter_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gifter_steam_id != null && $Object.hasOwnProperty.call(message, "gifter_steam_id")) if (!$util.isInteger(message.gifter_steam_id) && !(message.gifter_steam_id && $util.isInteger(message.gifter_steam_id.low) && $util.isInteger(message.gifter_steam_id.high))) return "gifter_steam_id: integer|Long expected"; - if (message.was_random_person != null && message.hasOwnProperty("was_random_person")) + if (message.was_random_person != null && $Object.hasOwnProperty.call(message, "was_random_person")) if (typeof message.was_random_person !== "boolean") return "was_random_person: boolean expected"; - if (message.recipient_account_ids != null && message.hasOwnProperty("recipient_account_ids")) { - if (!Array.isArray(message.recipient_account_ids)) + if (message.recipient_account_ids != null && $Object.hasOwnProperty.call(message, "recipient_account_ids")) { + if (!$Array.isArray(message.recipient_account_ids)) return "recipient_account_ids: array expected"; for (var i = 0; i < message.recipient_account_ids.length; ++i) if (!$util.isInteger(message.recipient_account_ids[i])) @@ -17039,25 +22157,31 @@ * @param {Object.} object Plain object * @returns {CMsgGCGiftedItems} CMsgGCGiftedItems */ - CMsgGCGiftedItems.fromObject = function fromObject(object) { + CMsgGCGiftedItems.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGiftedItems) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGiftedItems: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGiftedItems(); if (object.gifter_steam_id != null) if ($util.Long) - (message.gifter_steam_id = $util.Long.fromValue(object.gifter_steam_id)).unsigned = true; + message.gifter_steam_id = $util.Long.fromValue(object.gifter_steam_id, true); else if (typeof object.gifter_steam_id === "string") - message.gifter_steam_id = parseInt(object.gifter_steam_id, 10); + message.gifter_steam_id = $parseInt(object.gifter_steam_id, 10); else if (typeof object.gifter_steam_id === "number") message.gifter_steam_id = object.gifter_steam_id; else if (typeof object.gifter_steam_id === "object") message.gifter_steam_id = new $util.LongBits(object.gifter_steam_id.low >>> 0, object.gifter_steam_id.high >>> 0).toNumber(true); if (object.was_random_person != null) - message.was_random_person = Boolean(object.was_random_person); + message.was_random_person = $Boolean(object.was_random_person); if (object.recipient_account_ids) { - if (!Array.isArray(object.recipient_account_ids)) - throw TypeError(".CMsgGCGiftedItems.recipient_account_ids: array expected"); - message.recipient_account_ids = []; + if (!$Array.isArray(object.recipient_account_ids)) + throw $TypeError(".CMsgGCGiftedItems.recipient_account_ids: array expected"); + message.recipient_account_ids = $Array(object.recipient_account_ids.length); for (var i = 0; i < object.recipient_account_ids.length; ++i) message.recipient_account_ids[i] = object.recipient_account_ids[i] >>> 0; } @@ -17073,29 +22197,35 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGiftedItems.toObject = function toObject(message, options) { + CMsgGCGiftedItems.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.recipient_account_ids = []; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.gifter_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.gifter_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.gifter_steam_id = options.longs === String ? "0" : 0; + object.gifter_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.was_random_person = false; } - if (message.gifter_steam_id != null && message.hasOwnProperty("gifter_steam_id")) - if (typeof message.gifter_steam_id === "number") - object.gifter_steam_id = options.longs === String ? String(message.gifter_steam_id) : message.gifter_steam_id; + if (message.gifter_steam_id != null && $Object.hasOwnProperty.call(message, "gifter_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.gifter_steam_id = typeof message.gifter_steam_id === "number" ? $BigInt(message.gifter_steam_id) : $util.Long.fromBits(message.gifter_steam_id.low >>> 0, message.gifter_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.gifter_steam_id === "number") + object.gifter_steam_id = options.longs === $String ? $String(message.gifter_steam_id) : message.gifter_steam_id; else - object.gifter_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.gifter_steam_id) : options.longs === Number ? new $util.LongBits(message.gifter_steam_id.low >>> 0, message.gifter_steam_id.high >>> 0).toNumber(true) : message.gifter_steam_id; - if (message.was_random_person != null && message.hasOwnProperty("was_random_person")) + object.gifter_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.gifter_steam_id) : options.longs === $Number ? new $util.LongBits(message.gifter_steam_id.low >>> 0, message.gifter_steam_id.high >>> 0).toNumber(true) : message.gifter_steam_id; + if (message.was_random_person != null && $Object.hasOwnProperty.call(message, "was_random_person")) object.was_random_person = message.was_random_person; if (message.recipient_account_ids && message.recipient_account_ids.length) { - object.recipient_account_ids = []; + object.recipient_account_ids = $Array(message.recipient_account_ids.length); for (var j = 0; j < message.recipient_account_ids.length; ++j) object.recipient_account_ids[j] = message.recipient_account_ids[j]; } @@ -17109,8 +22239,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGiftedItems.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGiftedItems.prototype.toJSON = function() { + return CMsgGCGiftedItems.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGiftedItems + * @function getTypeUrl + * @memberof CMsgGCGiftedItems + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGiftedItems.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGiftedItems"; }; return CMsgGCGiftedItems; @@ -17120,26 +22264,39 @@ /** * Properties of a CMsgGCCollectItem. - * @exports ICMsgGCCollectItem - * @interface ICMsgGCCollectItem + * @typedef {Object} CMsgGCCollectItem.$Properties * @property {number|Long|null} [collection_item_id] CMsgGCCollectItem collection_item_id * @property {number|Long|null} [subject_item_id] CMsgGCCollectItem subject_item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCollectItem. + * @exports ICMsgGCCollectItem + * @interface ICMsgGCCollectItem + * @augments CMsgGCCollectItem.$Properties + * @deprecated Use CMsgGCCollectItem.$Properties instead. + */ + + /** + * Shape of a CMsgGCCollectItem. + * @typedef {CMsgGCCollectItem.$Properties} CMsgGCCollectItem.$Shape */ /** * Constructs a new CMsgGCCollectItem. * @exports CMsgGCCollectItem * @classdesc Represents a CMsgGCCollectItem. - * @implements ICMsgGCCollectItem * @constructor - * @param {ICMsgGCCollectItem=} [properties] Properties to set + * @param {CMsgGCCollectItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCollectItem(properties) { + var CMsgGCCollectItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCollectItem collection_item_id. @@ -17162,10 +22319,14 @@ * @function create * @memberof CMsgGCCollectItem * @static - * @param {ICMsgGCCollectItem=} [properties] Properties to set + * @param {CMsgGCCollectItem.$Properties=} [properties] Properties to set * @returns {CMsgGCCollectItem} CMsgGCCollectItem instance + * @type {{ + * (properties: CMsgGCCollectItem.$Shape): CMsgGCCollectItem & CMsgGCCollectItem.$Shape; + * (properties?: CMsgGCCollectItem.$Properties): CMsgGCCollectItem; + * }} */ - CMsgGCCollectItem.create = function create(properties) { + CMsgGCCollectItem.create = function(properties) { return new CMsgGCCollectItem(properties); }; @@ -17174,17 +22335,24 @@ * @function encode * @memberof CMsgGCCollectItem * @static - * @param {ICMsgGCCollectItem} message CMsgGCCollectItem message or plain object to encode + * @param {CMsgGCCollectItem.$Properties} message CMsgGCCollectItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCollectItem.encode = function encode(message, writer) { + CMsgGCCollectItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.collection_item_id != null && Object.hasOwnProperty.call(message, "collection_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.collection_item_id != null && $Object.hasOwnProperty.call(message, "collection_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.collection_item_id); - if (message.subject_item_id != null && Object.hasOwnProperty.call(message, "subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.subject_item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17193,12 +22361,12 @@ * @function encodeDelimited * @memberof CMsgGCCollectItem * @static - * @param {ICMsgGCCollectItem} message CMsgGCCollectItem message or plain object to encode + * @param {CMsgGCCollectItem.$Properties} message CMsgGCCollectItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCollectItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCollectItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17208,28 +22376,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCollectItem} CMsgGCCollectItem + * @returns {CMsgGCCollectItem & CMsgGCCollectItem.$Shape} CMsgGCCollectItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCollectItem.decode = function decode(reader, length) { + CMsgGCCollectItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCollectItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCollectItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.collection_item_id = reader.uint64(); - break; - case 2: - message.subject_item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.collection_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.subject_item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17239,11 +22427,11 @@ * @memberof CMsgGCCollectItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCollectItem} CMsgGCCollectItem + * @returns {CMsgGCCollectItem & CMsgGCCollectItem.$Shape} CMsgGCCollectItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCollectItem.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCollectItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17257,13 +22445,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCollectItem.verify = function verify(message) { + CMsgGCCollectItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.collection_item_id != null && message.hasOwnProperty("collection_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.collection_item_id != null && $Object.hasOwnProperty.call(message, "collection_item_id")) if (!$util.isInteger(message.collection_item_id) && !(message.collection_item_id && $util.isInteger(message.collection_item_id.low) && $util.isInteger(message.collection_item_id.high))) return "collection_item_id: integer|Long expected"; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) if (!$util.isInteger(message.subject_item_id) && !(message.subject_item_id && $util.isInteger(message.subject_item_id.low) && $util.isInteger(message.subject_item_id.high))) return "subject_item_id: integer|Long expected"; return null; @@ -17277,24 +22469,30 @@ * @param {Object.} object Plain object * @returns {CMsgGCCollectItem} CMsgGCCollectItem */ - CMsgGCCollectItem.fromObject = function fromObject(object) { + CMsgGCCollectItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCollectItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCollectItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCollectItem(); if (object.collection_item_id != null) if ($util.Long) - (message.collection_item_id = $util.Long.fromValue(object.collection_item_id)).unsigned = true; + message.collection_item_id = $util.Long.fromValue(object.collection_item_id, true); else if (typeof object.collection_item_id === "string") - message.collection_item_id = parseInt(object.collection_item_id, 10); + message.collection_item_id = $parseInt(object.collection_item_id, 10); else if (typeof object.collection_item_id === "number") message.collection_item_id = object.collection_item_id; else if (typeof object.collection_item_id === "object") message.collection_item_id = new $util.LongBits(object.collection_item_id.low >>> 0, object.collection_item_id.high >>> 0).toNumber(true); if (object.subject_item_id != null) if ($util.Long) - (message.subject_item_id = $util.Long.fromValue(object.subject_item_id)).unsigned = true; + message.subject_item_id = $util.Long.fromValue(object.subject_item_id, true); else if (typeof object.subject_item_id === "string") - message.subject_item_id = parseInt(object.subject_item_id, 10); + message.subject_item_id = $parseInt(object.subject_item_id, 10); else if (typeof object.subject_item_id === "number") message.subject_item_id = object.subject_item_id; else if (typeof object.subject_item_id === "object") @@ -17311,32 +22509,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCollectItem.toObject = function toObject(message, options) { + CMsgGCCollectItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.collection_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.collection_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.collection_item_id = options.longs === String ? "0" : 0; + object.collection_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.subject_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.subject_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.subject_item_id = options.longs === String ? "0" : 0; + object.subject_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.collection_item_id != null && message.hasOwnProperty("collection_item_id")) - if (typeof message.collection_item_id === "number") - object.collection_item_id = options.longs === String ? String(message.collection_item_id) : message.collection_item_id; + if (message.collection_item_id != null && $Object.hasOwnProperty.call(message, "collection_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.collection_item_id = typeof message.collection_item_id === "number" ? $BigInt(message.collection_item_id) : $util.Long.fromBits(message.collection_item_id.low >>> 0, message.collection_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.collection_item_id === "number") + object.collection_item_id = options.longs === $String ? $String(message.collection_item_id) : message.collection_item_id; else - object.collection_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.collection_item_id) : options.longs === Number ? new $util.LongBits(message.collection_item_id.low >>> 0, message.collection_item_id.high >>> 0).toNumber(true) : message.collection_item_id; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) - if (typeof message.subject_item_id === "number") - object.subject_item_id = options.longs === String ? String(message.subject_item_id) : message.subject_item_id; + object.collection_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.collection_item_id) : options.longs === $Number ? new $util.LongBits(message.collection_item_id.low >>> 0, message.collection_item_id.high >>> 0).toNumber(true) : message.collection_item_id; + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.subject_item_id = typeof message.subject_item_id === "number" ? $BigInt(message.subject_item_id) : $util.Long.fromBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.subject_item_id === "number") + object.subject_item_id = options.longs === $String ? $String(message.subject_item_id) : message.subject_item_id; else - object.subject_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; + object.subject_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === $Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; return object; }; @@ -17347,8 +22553,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCollectItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCollectItem.prototype.toJSON = function() { + return CMsgGCCollectItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCollectItem + * @function getTypeUrl + * @memberof CMsgGCCollectItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCollectItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCollectItem"; }; return CMsgGCCollectItem; @@ -17356,27 +22576,40 @@ $root.CMsgGCClientMarketDataRequest = (function() { + /** + * Properties of a CMsgGCClientMarketDataRequest. + * @typedef {Object} CMsgGCClientMarketDataRequest.$Properties + * @property {number|null} [user_currency] CMsgGCClientMarketDataRequest user_currency + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCClientMarketDataRequest. * @exports ICMsgGCClientMarketDataRequest * @interface ICMsgGCClientMarketDataRequest - * @property {number|null} [user_currency] CMsgGCClientMarketDataRequest user_currency + * @augments CMsgGCClientMarketDataRequest.$Properties + * @deprecated Use CMsgGCClientMarketDataRequest.$Properties instead. + */ + + /** + * Shape of a CMsgGCClientMarketDataRequest. + * @typedef {CMsgGCClientMarketDataRequest.$Properties} CMsgGCClientMarketDataRequest.$Shape */ /** * Constructs a new CMsgGCClientMarketDataRequest. * @exports CMsgGCClientMarketDataRequest * @classdesc Represents a CMsgGCClientMarketDataRequest. - * @implements ICMsgGCClientMarketDataRequest * @constructor - * @param {ICMsgGCClientMarketDataRequest=} [properties] Properties to set + * @param {CMsgGCClientMarketDataRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCClientMarketDataRequest(properties) { + var CMsgGCClientMarketDataRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCClientMarketDataRequest user_currency. @@ -17391,10 +22624,14 @@ * @function create * @memberof CMsgGCClientMarketDataRequest * @static - * @param {ICMsgGCClientMarketDataRequest=} [properties] Properties to set + * @param {CMsgGCClientMarketDataRequest.$Properties=} [properties] Properties to set * @returns {CMsgGCClientMarketDataRequest} CMsgGCClientMarketDataRequest instance + * @type {{ + * (properties: CMsgGCClientMarketDataRequest.$Shape): CMsgGCClientMarketDataRequest & CMsgGCClientMarketDataRequest.$Shape; + * (properties?: CMsgGCClientMarketDataRequest.$Properties): CMsgGCClientMarketDataRequest; + * }} */ - CMsgGCClientMarketDataRequest.create = function create(properties) { + CMsgGCClientMarketDataRequest.create = function(properties) { return new CMsgGCClientMarketDataRequest(properties); }; @@ -17403,15 +22640,22 @@ * @function encode * @memberof CMsgGCClientMarketDataRequest * @static - * @param {ICMsgGCClientMarketDataRequest} message CMsgGCClientMarketDataRequest message or plain object to encode + * @param {CMsgGCClientMarketDataRequest.$Properties} message CMsgGCClientMarketDataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketDataRequest.encode = function encode(message, writer) { + CMsgGCClientMarketDataRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.user_currency != null && Object.hasOwnProperty.call(message, "user_currency")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.user_currency != null && $Object.hasOwnProperty.call(message, "user_currency")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.user_currency); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17420,12 +22664,12 @@ * @function encodeDelimited * @memberof CMsgGCClientMarketDataRequest * @static - * @param {ICMsgGCClientMarketDataRequest} message CMsgGCClientMarketDataRequest message or plain object to encode + * @param {CMsgGCClientMarketDataRequest.$Properties} message CMsgGCClientMarketDataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketDataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCClientMarketDataRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17435,25 +22679,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCClientMarketDataRequest} CMsgGCClientMarketDataRequest + * @returns {CMsgGCClientMarketDataRequest & CMsgGCClientMarketDataRequest.$Shape} CMsgGCClientMarketDataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketDataRequest.decode = function decode(reader, length) { + CMsgGCClientMarketDataRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCClientMarketDataRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCClientMarketDataRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.user_currency = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.user_currency = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17463,11 +22724,11 @@ * @memberof CMsgGCClientMarketDataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCClientMarketDataRequest} CMsgGCClientMarketDataRequest + * @returns {CMsgGCClientMarketDataRequest & CMsgGCClientMarketDataRequest.$Shape} CMsgGCClientMarketDataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketDataRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgGCClientMarketDataRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17481,10 +22742,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCClientMarketDataRequest.verify = function verify(message) { + CMsgGCClientMarketDataRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.user_currency != null && message.hasOwnProperty("user_currency")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.user_currency != null && $Object.hasOwnProperty.call(message, "user_currency")) if (!$util.isInteger(message.user_currency)) return "user_currency: integer expected"; return null; @@ -17498,9 +22763,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCClientMarketDataRequest} CMsgGCClientMarketDataRequest */ - CMsgGCClientMarketDataRequest.fromObject = function fromObject(object) { + CMsgGCClientMarketDataRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCClientMarketDataRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCClientMarketDataRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCClientMarketDataRequest(); if (object.user_currency != null) message.user_currency = object.user_currency >>> 0; @@ -17516,13 +22787,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCClientMarketDataRequest.toObject = function toObject(message, options) { + CMsgGCClientMarketDataRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.user_currency = 0; - if (message.user_currency != null && message.hasOwnProperty("user_currency")) + if (message.user_currency != null && $Object.hasOwnProperty.call(message, "user_currency")) object.user_currency = message.user_currency; return object; }; @@ -17534,8 +22809,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCClientMarketDataRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCClientMarketDataRequest.prototype.toJSON = function() { + return CMsgGCClientMarketDataRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCClientMarketDataRequest + * @function getTypeUrl + * @memberof CMsgGCClientMarketDataRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCClientMarketDataRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCClientMarketDataRequest"; }; return CMsgGCClientMarketDataRequest; @@ -17545,28 +22834,41 @@ /** * Properties of a CMsgGCClientMarketDataEntry. - * @exports ICMsgGCClientMarketDataEntry - * @interface ICMsgGCClientMarketDataEntry + * @typedef {Object} CMsgGCClientMarketDataEntry.$Properties * @property {number|null} [item_def_index] CMsgGCClientMarketDataEntry item_def_index * @property {number|null} [item_quality] CMsgGCClientMarketDataEntry item_quality * @property {number|null} [item_sell_listings] CMsgGCClientMarketDataEntry item_sell_listings * @property {number|null} [price_in_local_currency] CMsgGCClientMarketDataEntry price_in_local_currency + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCClientMarketDataEntry. + * @exports ICMsgGCClientMarketDataEntry + * @interface ICMsgGCClientMarketDataEntry + * @augments CMsgGCClientMarketDataEntry.$Properties + * @deprecated Use CMsgGCClientMarketDataEntry.$Properties instead. + */ + + /** + * Shape of a CMsgGCClientMarketDataEntry. + * @typedef {CMsgGCClientMarketDataEntry.$Properties} CMsgGCClientMarketDataEntry.$Shape */ /** * Constructs a new CMsgGCClientMarketDataEntry. * @exports CMsgGCClientMarketDataEntry * @classdesc Represents a CMsgGCClientMarketDataEntry. - * @implements ICMsgGCClientMarketDataEntry * @constructor - * @param {ICMsgGCClientMarketDataEntry=} [properties] Properties to set + * @param {CMsgGCClientMarketDataEntry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCClientMarketDataEntry(properties) { + var CMsgGCClientMarketDataEntry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCClientMarketDataEntry item_def_index. @@ -17605,10 +22907,14 @@ * @function create * @memberof CMsgGCClientMarketDataEntry * @static - * @param {ICMsgGCClientMarketDataEntry=} [properties] Properties to set + * @param {CMsgGCClientMarketDataEntry.$Properties=} [properties] Properties to set * @returns {CMsgGCClientMarketDataEntry} CMsgGCClientMarketDataEntry instance + * @type {{ + * (properties: CMsgGCClientMarketDataEntry.$Shape): CMsgGCClientMarketDataEntry & CMsgGCClientMarketDataEntry.$Shape; + * (properties?: CMsgGCClientMarketDataEntry.$Properties): CMsgGCClientMarketDataEntry; + * }} */ - CMsgGCClientMarketDataEntry.create = function create(properties) { + CMsgGCClientMarketDataEntry.create = function(properties) { return new CMsgGCClientMarketDataEntry(properties); }; @@ -17617,21 +22923,28 @@ * @function encode * @memberof CMsgGCClientMarketDataEntry * @static - * @param {ICMsgGCClientMarketDataEntry} message CMsgGCClientMarketDataEntry message or plain object to encode + * @param {CMsgGCClientMarketDataEntry.$Properties} message CMsgGCClientMarketDataEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketDataEntry.encode = function encode(message, writer) { + CMsgGCClientMarketDataEntry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_def_index != null && Object.hasOwnProperty.call(message, "item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.item_def_index); - if (message.item_quality != null && Object.hasOwnProperty.call(message, "item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.item_quality); - if (message.item_sell_listings != null && Object.hasOwnProperty.call(message, "item_sell_listings")) + if (message.item_sell_listings != null && $Object.hasOwnProperty.call(message, "item_sell_listings")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.item_sell_listings); - if (message.price_in_local_currency != null && Object.hasOwnProperty.call(message, "price_in_local_currency")) + if (message.price_in_local_currency != null && $Object.hasOwnProperty.call(message, "price_in_local_currency")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.price_in_local_currency); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17640,12 +22953,12 @@ * @function encodeDelimited * @memberof CMsgGCClientMarketDataEntry * @static - * @param {ICMsgGCClientMarketDataEntry} message CMsgGCClientMarketDataEntry message or plain object to encode + * @param {CMsgGCClientMarketDataEntry.$Properties} message CMsgGCClientMarketDataEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketDataEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCClientMarketDataEntry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17655,34 +22968,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCClientMarketDataEntry} CMsgGCClientMarketDataEntry + * @returns {CMsgGCClientMarketDataEntry & CMsgGCClientMarketDataEntry.$Shape} CMsgGCClientMarketDataEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketDataEntry.decode = function decode(reader, length) { + CMsgGCClientMarketDataEntry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCClientMarketDataEntry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCClientMarketDataEntry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_def_index = reader.uint32(); - break; - case 2: - message.item_quality = reader.uint32(); - break; - case 3: - message.item_sell_listings = reader.uint32(); - break; - case 4: - message.price_in_local_currency = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_def_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_quality = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_sell_listings = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.price_in_local_currency = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17692,11 +23031,11 @@ * @memberof CMsgGCClientMarketDataEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCClientMarketDataEntry} CMsgGCClientMarketDataEntry + * @returns {CMsgGCClientMarketDataEntry & CMsgGCClientMarketDataEntry.$Shape} CMsgGCClientMarketDataEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketDataEntry.decodeDelimited = function decodeDelimited(reader) { + CMsgGCClientMarketDataEntry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17710,19 +23049,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCClientMarketDataEntry.verify = function verify(message) { + CMsgGCClientMarketDataEntry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) if (!$util.isInteger(message.item_def_index)) return "item_def_index: integer expected"; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) if (!$util.isInteger(message.item_quality)) return "item_quality: integer expected"; - if (message.item_sell_listings != null && message.hasOwnProperty("item_sell_listings")) + if (message.item_sell_listings != null && $Object.hasOwnProperty.call(message, "item_sell_listings")) if (!$util.isInteger(message.item_sell_listings)) return "item_sell_listings: integer expected"; - if (message.price_in_local_currency != null && message.hasOwnProperty("price_in_local_currency")) + if (message.price_in_local_currency != null && $Object.hasOwnProperty.call(message, "price_in_local_currency")) if (!$util.isInteger(message.price_in_local_currency)) return "price_in_local_currency: integer expected"; return null; @@ -17736,9 +23079,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCClientMarketDataEntry} CMsgGCClientMarketDataEntry */ - CMsgGCClientMarketDataEntry.fromObject = function fromObject(object) { + CMsgGCClientMarketDataEntry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCClientMarketDataEntry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCClientMarketDataEntry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCClientMarketDataEntry(); if (object.item_def_index != null) message.item_def_index = object.item_def_index >>> 0; @@ -17760,9 +23109,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCClientMarketDataEntry.toObject = function toObject(message, options) { + CMsgGCClientMarketDataEntry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.item_def_index = 0; @@ -17770,13 +23123,13 @@ object.item_sell_listings = 0; object.price_in_local_currency = 0; } - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) object.item_def_index = message.item_def_index; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) object.item_quality = message.item_quality; - if (message.item_sell_listings != null && message.hasOwnProperty("item_sell_listings")) + if (message.item_sell_listings != null && $Object.hasOwnProperty.call(message, "item_sell_listings")) object.item_sell_listings = message.item_sell_listings; - if (message.price_in_local_currency != null && message.hasOwnProperty("price_in_local_currency")) + if (message.price_in_local_currency != null && $Object.hasOwnProperty.call(message, "price_in_local_currency")) object.price_in_local_currency = message.price_in_local_currency; return object; }; @@ -17788,8 +23141,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCClientMarketDataEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCClientMarketDataEntry.prototype.toJSON = function() { + return CMsgGCClientMarketDataEntry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCClientMarketDataEntry + * @function getTypeUrl + * @memberof CMsgGCClientMarketDataEntry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCClientMarketDataEntry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCClientMarketDataEntry"; }; return CMsgGCClientMarketDataEntry; @@ -17797,32 +23164,45 @@ $root.CMsgGCClientMarketData = (function() { + /** + * Properties of a CMsgGCClientMarketData. + * @typedef {Object} CMsgGCClientMarketData.$Properties + * @property {Array.|null} [entries] CMsgGCClientMarketData entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCClientMarketData. * @exports ICMsgGCClientMarketData * @interface ICMsgGCClientMarketData - * @property {Array.|null} [entries] CMsgGCClientMarketData entries + * @augments CMsgGCClientMarketData.$Properties + * @deprecated Use CMsgGCClientMarketData.$Properties instead. + */ + + /** + * Shape of a CMsgGCClientMarketData. + * @typedef {CMsgGCClientMarketData.$Properties} CMsgGCClientMarketData.$Shape */ /** * Constructs a new CMsgGCClientMarketData. * @exports CMsgGCClientMarketData * @classdesc Represents a CMsgGCClientMarketData. - * @implements ICMsgGCClientMarketData * @constructor - * @param {ICMsgGCClientMarketData=} [properties] Properties to set + * @param {CMsgGCClientMarketData.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCClientMarketData(properties) { + var CMsgGCClientMarketData = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCClientMarketData entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCClientMarketData * @instance */ @@ -17833,10 +23213,14 @@ * @function create * @memberof CMsgGCClientMarketData * @static - * @param {ICMsgGCClientMarketData=} [properties] Properties to set + * @param {CMsgGCClientMarketData.$Properties=} [properties] Properties to set * @returns {CMsgGCClientMarketData} CMsgGCClientMarketData instance + * @type {{ + * (properties: CMsgGCClientMarketData.$Shape): CMsgGCClientMarketData & CMsgGCClientMarketData.$Shape; + * (properties?: CMsgGCClientMarketData.$Properties): CMsgGCClientMarketData; + * }} */ - CMsgGCClientMarketData.create = function create(properties) { + CMsgGCClientMarketData.create = function(properties) { return new CMsgGCClientMarketData(properties); }; @@ -17845,16 +23229,23 @@ * @function encode * @memberof CMsgGCClientMarketData * @static - * @param {ICMsgGCClientMarketData} message CMsgGCClientMarketData message or plain object to encode + * @param {CMsgGCClientMarketData.$Properties} message CMsgGCClientMarketData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketData.encode = function encode(message, writer) { + CMsgGCClientMarketData.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCClientMarketDataEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCClientMarketDataEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17863,12 +23254,12 @@ * @function encodeDelimited * @memberof CMsgGCClientMarketData * @static - * @param {ICMsgGCClientMarketData} message CMsgGCClientMarketData message or plain object to encode + * @param {CMsgGCClientMarketData.$Properties} message CMsgGCClientMarketData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCClientMarketData.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17878,27 +23269,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCClientMarketData} CMsgGCClientMarketData + * @returns {CMsgGCClientMarketData & CMsgGCClientMarketData.$Shape} CMsgGCClientMarketData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketData.decode = function decode(reader, length) { + CMsgGCClientMarketData.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCClientMarketData(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCClientMarketData(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCClientMarketDataEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCClientMarketDataEntry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17908,11 +23316,11 @@ * @memberof CMsgGCClientMarketData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCClientMarketData} CMsgGCClientMarketData + * @returns {CMsgGCClientMarketData & CMsgGCClientMarketData.$Shape} CMsgGCClientMarketData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketData.decodeDelimited = function decodeDelimited(reader) { + CMsgGCClientMarketData.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17926,14 +23334,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCClientMarketData.verify = function verify(message) { + CMsgGCClientMarketData.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCClientMarketDataEntry.verify(message.entries[i]); + var error = $root.CMsgGCClientMarketDataEntry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -17949,18 +23361,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCClientMarketData} CMsgGCClientMarketData */ - CMsgGCClientMarketData.fromObject = function fromObject(object) { + CMsgGCClientMarketData.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCClientMarketData) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCClientMarketData: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCClientMarketData(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCClientMarketData.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCClientMarketData.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCClientMarketData.entries: object expected"); - message.entries[i] = $root.CMsgGCClientMarketDataEntry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCClientMarketData.entries: object expected"); + message.entries[i] = $root.CMsgGCClientMarketDataEntry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -17975,16 +23393,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCClientMarketData.toObject = function toObject(message, options) { + CMsgGCClientMarketData.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCClientMarketDataEntry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCClientMarketDataEntry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -17996,8 +23418,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCClientMarketData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCClientMarketData.prototype.toJSON = function() { + return CMsgGCClientMarketData.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCClientMarketData + * @function getTypeUrl + * @memberof CMsgGCClientMarketData + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCClientMarketData.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCClientMarketData"; }; return CMsgGCClientMarketData; @@ -18007,26 +23443,39 @@ /** * Properties of a CMsgApplyToolToItem. - * @exports ICMsgApplyToolToItem - * @interface ICMsgApplyToolToItem + * @typedef {Object} CMsgApplyToolToItem.$Properties * @property {number|Long|null} [tool_item_id] CMsgApplyToolToItem tool_item_id * @property {number|Long|null} [subject_item_id] CMsgApplyToolToItem subject_item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyToolToItem. + * @exports ICMsgApplyToolToItem + * @interface ICMsgApplyToolToItem + * @augments CMsgApplyToolToItem.$Properties + * @deprecated Use CMsgApplyToolToItem.$Properties instead. + */ + + /** + * Shape of a CMsgApplyToolToItem. + * @typedef {CMsgApplyToolToItem.$Properties} CMsgApplyToolToItem.$Shape */ /** * Constructs a new CMsgApplyToolToItem. * @exports CMsgApplyToolToItem * @classdesc Represents a CMsgApplyToolToItem. - * @implements ICMsgApplyToolToItem * @constructor - * @param {ICMsgApplyToolToItem=} [properties] Properties to set + * @param {CMsgApplyToolToItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyToolToItem(properties) { + var CMsgApplyToolToItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyToolToItem tool_item_id. @@ -18049,10 +23498,14 @@ * @function create * @memberof CMsgApplyToolToItem * @static - * @param {ICMsgApplyToolToItem=} [properties] Properties to set + * @param {CMsgApplyToolToItem.$Properties=} [properties] Properties to set * @returns {CMsgApplyToolToItem} CMsgApplyToolToItem instance + * @type {{ + * (properties: CMsgApplyToolToItem.$Shape): CMsgApplyToolToItem & CMsgApplyToolToItem.$Shape; + * (properties?: CMsgApplyToolToItem.$Properties): CMsgApplyToolToItem; + * }} */ - CMsgApplyToolToItem.create = function create(properties) { + CMsgApplyToolToItem.create = function(properties) { return new CMsgApplyToolToItem(properties); }; @@ -18061,17 +23514,24 @@ * @function encode * @memberof CMsgApplyToolToItem * @static - * @param {ICMsgApplyToolToItem} message CMsgApplyToolToItem message or plain object to encode + * @param {CMsgApplyToolToItem.$Properties} message CMsgApplyToolToItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyToolToItem.encode = function encode(message, writer) { + CMsgApplyToolToItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.tool_item_id != null && Object.hasOwnProperty.call(message, "tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.tool_item_id); - if (message.subject_item_id != null && Object.hasOwnProperty.call(message, "subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.subject_item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18080,12 +23540,12 @@ * @function encodeDelimited * @memberof CMsgApplyToolToItem * @static - * @param {ICMsgApplyToolToItem} message CMsgApplyToolToItem message or plain object to encode + * @param {CMsgApplyToolToItem.$Properties} message CMsgApplyToolToItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyToolToItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyToolToItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18095,28 +23555,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyToolToItem} CMsgApplyToolToItem + * @returns {CMsgApplyToolToItem & CMsgApplyToolToItem.$Shape} CMsgApplyToolToItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyToolToItem.decode = function decode(reader, length) { + CMsgApplyToolToItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyToolToItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyToolToItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tool_item_id = reader.uint64(); - break; - case 2: - message.subject_item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.tool_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.subject_item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18126,11 +23606,11 @@ * @memberof CMsgApplyToolToItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyToolToItem} CMsgApplyToolToItem + * @returns {CMsgApplyToolToItem & CMsgApplyToolToItem.$Shape} CMsgApplyToolToItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyToolToItem.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyToolToItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18144,13 +23624,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyToolToItem.verify = function verify(message) { + CMsgApplyToolToItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) if (!$util.isInteger(message.tool_item_id) && !(message.tool_item_id && $util.isInteger(message.tool_item_id.low) && $util.isInteger(message.tool_item_id.high))) return "tool_item_id: integer|Long expected"; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) if (!$util.isInteger(message.subject_item_id) && !(message.subject_item_id && $util.isInteger(message.subject_item_id.low) && $util.isInteger(message.subject_item_id.high))) return "subject_item_id: integer|Long expected"; return null; @@ -18164,24 +23648,30 @@ * @param {Object.} object Plain object * @returns {CMsgApplyToolToItem} CMsgApplyToolToItem */ - CMsgApplyToolToItem.fromObject = function fromObject(object) { + CMsgApplyToolToItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyToolToItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyToolToItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyToolToItem(); if (object.tool_item_id != null) if ($util.Long) - (message.tool_item_id = $util.Long.fromValue(object.tool_item_id)).unsigned = true; + message.tool_item_id = $util.Long.fromValue(object.tool_item_id, true); else if (typeof object.tool_item_id === "string") - message.tool_item_id = parseInt(object.tool_item_id, 10); + message.tool_item_id = $parseInt(object.tool_item_id, 10); else if (typeof object.tool_item_id === "number") message.tool_item_id = object.tool_item_id; else if (typeof object.tool_item_id === "object") message.tool_item_id = new $util.LongBits(object.tool_item_id.low >>> 0, object.tool_item_id.high >>> 0).toNumber(true); if (object.subject_item_id != null) if ($util.Long) - (message.subject_item_id = $util.Long.fromValue(object.subject_item_id)).unsigned = true; + message.subject_item_id = $util.Long.fromValue(object.subject_item_id, true); else if (typeof object.subject_item_id === "string") - message.subject_item_id = parseInt(object.subject_item_id, 10); + message.subject_item_id = $parseInt(object.subject_item_id, 10); else if (typeof object.subject_item_id === "number") message.subject_item_id = object.subject_item_id; else if (typeof object.subject_item_id === "object") @@ -18198,32 +23688,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyToolToItem.toObject = function toObject(message, options) { + CMsgApplyToolToItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.tool_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.tool_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.tool_item_id = options.longs === String ? "0" : 0; + object.tool_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.subject_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.subject_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.subject_item_id = options.longs === String ? "0" : 0; + object.subject_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) - if (typeof message.tool_item_id === "number") - object.tool_item_id = options.longs === String ? String(message.tool_item_id) : message.tool_item_id; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.tool_item_id = typeof message.tool_item_id === "number" ? $BigInt(message.tool_item_id) : $util.Long.fromBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.tool_item_id === "number") + object.tool_item_id = options.longs === $String ? $String(message.tool_item_id) : message.tool_item_id; else - object.tool_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) - if (typeof message.subject_item_id === "number") - object.subject_item_id = options.longs === String ? String(message.subject_item_id) : message.subject_item_id; + object.tool_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === $Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.subject_item_id = typeof message.subject_item_id === "number" ? $BigInt(message.subject_item_id) : $util.Long.fromBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.subject_item_id === "number") + object.subject_item_id = options.longs === $String ? $String(message.subject_item_id) : message.subject_item_id; else - object.subject_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; + object.subject_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === $Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; return object; }; @@ -18234,8 +23732,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyToolToItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyToolToItem.prototype.toJSON = function() { + return CMsgApplyToolToItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyToolToItem + * @function getTypeUrl + * @memberof CMsgApplyToolToItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyToolToItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyToolToItem"; }; return CMsgApplyToolToItem; @@ -18245,26 +23757,39 @@ /** * Properties of a CMsgApplyToolToBaseItem. - * @exports ICMsgApplyToolToBaseItem - * @interface ICMsgApplyToolToBaseItem + * @typedef {Object} CMsgApplyToolToBaseItem.$Properties * @property {number|Long|null} [tool_item_id] CMsgApplyToolToBaseItem tool_item_id * @property {number|null} [baseitem_def_index] CMsgApplyToolToBaseItem baseitem_def_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyToolToBaseItem. + * @exports ICMsgApplyToolToBaseItem + * @interface ICMsgApplyToolToBaseItem + * @augments CMsgApplyToolToBaseItem.$Properties + * @deprecated Use CMsgApplyToolToBaseItem.$Properties instead. + */ + + /** + * Shape of a CMsgApplyToolToBaseItem. + * @typedef {CMsgApplyToolToBaseItem.$Properties} CMsgApplyToolToBaseItem.$Shape */ /** * Constructs a new CMsgApplyToolToBaseItem. * @exports CMsgApplyToolToBaseItem * @classdesc Represents a CMsgApplyToolToBaseItem. - * @implements ICMsgApplyToolToBaseItem * @constructor - * @param {ICMsgApplyToolToBaseItem=} [properties] Properties to set + * @param {CMsgApplyToolToBaseItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyToolToBaseItem(properties) { + var CMsgApplyToolToBaseItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyToolToBaseItem tool_item_id. @@ -18287,10 +23812,14 @@ * @function create * @memberof CMsgApplyToolToBaseItem * @static - * @param {ICMsgApplyToolToBaseItem=} [properties] Properties to set + * @param {CMsgApplyToolToBaseItem.$Properties=} [properties] Properties to set * @returns {CMsgApplyToolToBaseItem} CMsgApplyToolToBaseItem instance + * @type {{ + * (properties: CMsgApplyToolToBaseItem.$Shape): CMsgApplyToolToBaseItem & CMsgApplyToolToBaseItem.$Shape; + * (properties?: CMsgApplyToolToBaseItem.$Properties): CMsgApplyToolToBaseItem; + * }} */ - CMsgApplyToolToBaseItem.create = function create(properties) { + CMsgApplyToolToBaseItem.create = function(properties) { return new CMsgApplyToolToBaseItem(properties); }; @@ -18299,17 +23828,24 @@ * @function encode * @memberof CMsgApplyToolToBaseItem * @static - * @param {ICMsgApplyToolToBaseItem} message CMsgApplyToolToBaseItem message or plain object to encode + * @param {CMsgApplyToolToBaseItem.$Properties} message CMsgApplyToolToBaseItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyToolToBaseItem.encode = function encode(message, writer) { + CMsgApplyToolToBaseItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.tool_item_id != null && Object.hasOwnProperty.call(message, "tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.tool_item_id); - if (message.baseitem_def_index != null && Object.hasOwnProperty.call(message, "baseitem_def_index")) + if (message.baseitem_def_index != null && $Object.hasOwnProperty.call(message, "baseitem_def_index")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.baseitem_def_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18318,12 +23854,12 @@ * @function encodeDelimited * @memberof CMsgApplyToolToBaseItem * @static - * @param {ICMsgApplyToolToBaseItem} message CMsgApplyToolToBaseItem message or plain object to encode + * @param {CMsgApplyToolToBaseItem.$Properties} message CMsgApplyToolToBaseItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyToolToBaseItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyToolToBaseItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18333,28 +23869,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyToolToBaseItem} CMsgApplyToolToBaseItem + * @returns {CMsgApplyToolToBaseItem & CMsgApplyToolToBaseItem.$Shape} CMsgApplyToolToBaseItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyToolToBaseItem.decode = function decode(reader, length) { + CMsgApplyToolToBaseItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyToolToBaseItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyToolToBaseItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tool_item_id = reader.uint64(); - break; - case 2: - message.baseitem_def_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.tool_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.baseitem_def_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18364,11 +23920,11 @@ * @memberof CMsgApplyToolToBaseItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyToolToBaseItem} CMsgApplyToolToBaseItem + * @returns {CMsgApplyToolToBaseItem & CMsgApplyToolToBaseItem.$Shape} CMsgApplyToolToBaseItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyToolToBaseItem.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyToolToBaseItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18382,13 +23938,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyToolToBaseItem.verify = function verify(message) { + CMsgApplyToolToBaseItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) if (!$util.isInteger(message.tool_item_id) && !(message.tool_item_id && $util.isInteger(message.tool_item_id.low) && $util.isInteger(message.tool_item_id.high))) return "tool_item_id: integer|Long expected"; - if (message.baseitem_def_index != null && message.hasOwnProperty("baseitem_def_index")) + if (message.baseitem_def_index != null && $Object.hasOwnProperty.call(message, "baseitem_def_index")) if (!$util.isInteger(message.baseitem_def_index)) return "baseitem_def_index: integer expected"; return null; @@ -18402,15 +23962,21 @@ * @param {Object.} object Plain object * @returns {CMsgApplyToolToBaseItem} CMsgApplyToolToBaseItem */ - CMsgApplyToolToBaseItem.fromObject = function fromObject(object) { + CMsgApplyToolToBaseItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyToolToBaseItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyToolToBaseItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyToolToBaseItem(); if (object.tool_item_id != null) if ($util.Long) - (message.tool_item_id = $util.Long.fromValue(object.tool_item_id)).unsigned = true; + message.tool_item_id = $util.Long.fromValue(object.tool_item_id, true); else if (typeof object.tool_item_id === "string") - message.tool_item_id = parseInt(object.tool_item_id, 10); + message.tool_item_id = $parseInt(object.tool_item_id, 10); else if (typeof object.tool_item_id === "number") message.tool_item_id = object.tool_item_id; else if (typeof object.tool_item_id === "object") @@ -18429,24 +23995,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyToolToBaseItem.toObject = function toObject(message, options) { + CMsgApplyToolToBaseItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.tool_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.tool_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.tool_item_id = options.longs === String ? "0" : 0; + object.tool_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.baseitem_def_index = 0; } - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) - if (typeof message.tool_item_id === "number") - object.tool_item_id = options.longs === String ? String(message.tool_item_id) : message.tool_item_id; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.tool_item_id = typeof message.tool_item_id === "number" ? $BigInt(message.tool_item_id) : $util.Long.fromBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.tool_item_id === "number") + object.tool_item_id = options.longs === $String ? $String(message.tool_item_id) : message.tool_item_id; else - object.tool_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; - if (message.baseitem_def_index != null && message.hasOwnProperty("baseitem_def_index")) + object.tool_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === $Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; + if (message.baseitem_def_index != null && $Object.hasOwnProperty.call(message, "baseitem_def_index")) object.baseitem_def_index = message.baseitem_def_index; return object; }; @@ -18458,8 +24030,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyToolToBaseItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyToolToBaseItem.prototype.toJSON = function() { + return CMsgApplyToolToBaseItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyToolToBaseItem + * @function getTypeUrl + * @memberof CMsgApplyToolToBaseItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyToolToBaseItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyToolToBaseItem"; }; return CMsgApplyToolToBaseItem; @@ -18469,26 +24055,39 @@ /** * Properties of a CMsgRecipeComponent. - * @exports ICMsgRecipeComponent - * @interface ICMsgRecipeComponent + * @typedef {Object} CMsgRecipeComponent.$Properties * @property {number|Long|null} [subject_item_id] CMsgRecipeComponent subject_item_id * @property {number|Long|null} [attribute_index] CMsgRecipeComponent attribute_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgRecipeComponent. + * @exports ICMsgRecipeComponent + * @interface ICMsgRecipeComponent + * @augments CMsgRecipeComponent.$Properties + * @deprecated Use CMsgRecipeComponent.$Properties instead. + */ + + /** + * Shape of a CMsgRecipeComponent. + * @typedef {CMsgRecipeComponent.$Properties} CMsgRecipeComponent.$Shape */ /** * Constructs a new CMsgRecipeComponent. * @exports CMsgRecipeComponent * @classdesc Represents a CMsgRecipeComponent. - * @implements ICMsgRecipeComponent * @constructor - * @param {ICMsgRecipeComponent=} [properties] Properties to set + * @param {CMsgRecipeComponent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgRecipeComponent(properties) { + var CMsgRecipeComponent = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgRecipeComponent subject_item_id. @@ -18511,10 +24110,14 @@ * @function create * @memberof CMsgRecipeComponent * @static - * @param {ICMsgRecipeComponent=} [properties] Properties to set + * @param {CMsgRecipeComponent.$Properties=} [properties] Properties to set * @returns {CMsgRecipeComponent} CMsgRecipeComponent instance + * @type {{ + * (properties: CMsgRecipeComponent.$Shape): CMsgRecipeComponent & CMsgRecipeComponent.$Shape; + * (properties?: CMsgRecipeComponent.$Properties): CMsgRecipeComponent; + * }} */ - CMsgRecipeComponent.create = function create(properties) { + CMsgRecipeComponent.create = function(properties) { return new CMsgRecipeComponent(properties); }; @@ -18523,17 +24126,24 @@ * @function encode * @memberof CMsgRecipeComponent * @static - * @param {ICMsgRecipeComponent} message CMsgRecipeComponent message or plain object to encode + * @param {CMsgRecipeComponent.$Properties} message CMsgRecipeComponent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRecipeComponent.encode = function encode(message, writer) { + CMsgRecipeComponent.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.subject_item_id != null && Object.hasOwnProperty.call(message, "subject_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.subject_item_id); - if (message.attribute_index != null && Object.hasOwnProperty.call(message, "attribute_index")) + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.attribute_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18542,12 +24152,12 @@ * @function encodeDelimited * @memberof CMsgRecipeComponent * @static - * @param {ICMsgRecipeComponent} message CMsgRecipeComponent message or plain object to encode + * @param {CMsgRecipeComponent.$Properties} message CMsgRecipeComponent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRecipeComponent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgRecipeComponent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18557,28 +24167,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgRecipeComponent} CMsgRecipeComponent + * @returns {CMsgRecipeComponent & CMsgRecipeComponent.$Shape} CMsgRecipeComponent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRecipeComponent.decode = function decode(reader, length) { + CMsgRecipeComponent.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgRecipeComponent(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgRecipeComponent(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.subject_item_id = reader.uint64(); - break; - case 2: - message.attribute_index = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.subject_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.attribute_index = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18588,11 +24218,11 @@ * @memberof CMsgRecipeComponent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgRecipeComponent} CMsgRecipeComponent + * @returns {CMsgRecipeComponent & CMsgRecipeComponent.$Shape} CMsgRecipeComponent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRecipeComponent.decodeDelimited = function decodeDelimited(reader) { + CMsgRecipeComponent.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18606,13 +24236,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgRecipeComponent.verify = function verify(message) { + CMsgRecipeComponent.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) if (!$util.isInteger(message.subject_item_id) && !(message.subject_item_id && $util.isInteger(message.subject_item_id.low) && $util.isInteger(message.subject_item_id.high))) return "subject_item_id: integer|Long expected"; - if (message.attribute_index != null && message.hasOwnProperty("attribute_index")) + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) if (!$util.isInteger(message.attribute_index) && !(message.attribute_index && $util.isInteger(message.attribute_index.low) && $util.isInteger(message.attribute_index.high))) return "attribute_index: integer|Long expected"; return null; @@ -18626,24 +24260,30 @@ * @param {Object.} object Plain object * @returns {CMsgRecipeComponent} CMsgRecipeComponent */ - CMsgRecipeComponent.fromObject = function fromObject(object) { + CMsgRecipeComponent.fromObject = function (object, _depth) { if (object instanceof $root.CMsgRecipeComponent) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgRecipeComponent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgRecipeComponent(); if (object.subject_item_id != null) if ($util.Long) - (message.subject_item_id = $util.Long.fromValue(object.subject_item_id)).unsigned = true; + message.subject_item_id = $util.Long.fromValue(object.subject_item_id, true); else if (typeof object.subject_item_id === "string") - message.subject_item_id = parseInt(object.subject_item_id, 10); + message.subject_item_id = $parseInt(object.subject_item_id, 10); else if (typeof object.subject_item_id === "number") message.subject_item_id = object.subject_item_id; else if (typeof object.subject_item_id === "object") message.subject_item_id = new $util.LongBits(object.subject_item_id.low >>> 0, object.subject_item_id.high >>> 0).toNumber(true); if (object.attribute_index != null) if ($util.Long) - (message.attribute_index = $util.Long.fromValue(object.attribute_index)).unsigned = true; + message.attribute_index = $util.Long.fromValue(object.attribute_index, true); else if (typeof object.attribute_index === "string") - message.attribute_index = parseInt(object.attribute_index, 10); + message.attribute_index = $parseInt(object.attribute_index, 10); else if (typeof object.attribute_index === "number") message.attribute_index = object.attribute_index; else if (typeof object.attribute_index === "object") @@ -18660,32 +24300,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgRecipeComponent.toObject = function toObject(message, options) { + CMsgRecipeComponent.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.subject_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.subject_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.subject_item_id = options.longs === String ? "0" : 0; + object.subject_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.attribute_index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.attribute_index = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.attribute_index = options.longs === String ? "0" : 0; + object.attribute_index = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) - if (typeof message.subject_item_id === "number") - object.subject_item_id = options.longs === String ? String(message.subject_item_id) : message.subject_item_id; + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.subject_item_id = typeof message.subject_item_id === "number" ? $BigInt(message.subject_item_id) : $util.Long.fromBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.subject_item_id === "number") + object.subject_item_id = options.longs === $String ? $String(message.subject_item_id) : message.subject_item_id; else - object.subject_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; - if (message.attribute_index != null && message.hasOwnProperty("attribute_index")) - if (typeof message.attribute_index === "number") - object.attribute_index = options.longs === String ? String(message.attribute_index) : message.attribute_index; + object.subject_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === $Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.attribute_index = typeof message.attribute_index === "number" ? $BigInt(message.attribute_index) : $util.Long.fromBits(message.attribute_index.low >>> 0, message.attribute_index.high >>> 0, true).toBigInt(); + else if (typeof message.attribute_index === "number") + object.attribute_index = options.longs === $String ? $String(message.attribute_index) : message.attribute_index; else - object.attribute_index = options.longs === String ? $util.Long.prototype.toString.call(message.attribute_index) : options.longs === Number ? new $util.LongBits(message.attribute_index.low >>> 0, message.attribute_index.high >>> 0).toNumber(true) : message.attribute_index; + object.attribute_index = options.longs === $String ? $util.Long.prototype.toString.call(message.attribute_index) : options.longs === $Number ? new $util.LongBits(message.attribute_index.low >>> 0, message.attribute_index.high >>> 0).toNumber(true) : message.attribute_index; return object; }; @@ -18696,8 +24344,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgRecipeComponent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgRecipeComponent.prototype.toJSON = function() { + return CMsgRecipeComponent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgRecipeComponent + * @function getTypeUrl + * @memberof CMsgRecipeComponent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgRecipeComponent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgRecipeComponent"; }; return CMsgRecipeComponent; @@ -18705,29 +24367,42 @@ $root.CMsgFulfillDynamicRecipeComponent = (function() { + /** + * Properties of a CMsgFulfillDynamicRecipeComponent. + * @typedef {Object} CMsgFulfillDynamicRecipeComponent.$Properties + * @property {number|Long|null} [tool_item_id] CMsgFulfillDynamicRecipeComponent tool_item_id + * @property {Array.|null} [consumption_components] CMsgFulfillDynamicRecipeComponent consumption_components + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgFulfillDynamicRecipeComponent. * @exports ICMsgFulfillDynamicRecipeComponent * @interface ICMsgFulfillDynamicRecipeComponent - * @property {number|Long|null} [tool_item_id] CMsgFulfillDynamicRecipeComponent tool_item_id - * @property {Array.|null} [consumption_components] CMsgFulfillDynamicRecipeComponent consumption_components + * @augments CMsgFulfillDynamicRecipeComponent.$Properties + * @deprecated Use CMsgFulfillDynamicRecipeComponent.$Properties instead. + */ + + /** + * Shape of a CMsgFulfillDynamicRecipeComponent. + * @typedef {CMsgFulfillDynamicRecipeComponent.$Properties} CMsgFulfillDynamicRecipeComponent.$Shape */ /** * Constructs a new CMsgFulfillDynamicRecipeComponent. * @exports CMsgFulfillDynamicRecipeComponent * @classdesc Represents a CMsgFulfillDynamicRecipeComponent. - * @implements ICMsgFulfillDynamicRecipeComponent * @constructor - * @param {ICMsgFulfillDynamicRecipeComponent=} [properties] Properties to set + * @param {CMsgFulfillDynamicRecipeComponent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgFulfillDynamicRecipeComponent(properties) { + var CMsgFulfillDynamicRecipeComponent = function (properties) { this.consumption_components = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgFulfillDynamicRecipeComponent tool_item_id. @@ -18739,7 +24414,7 @@ /** * CMsgFulfillDynamicRecipeComponent consumption_components. - * @member {Array.} consumption_components + * @member {Array.} consumption_components * @memberof CMsgFulfillDynamicRecipeComponent * @instance */ @@ -18750,10 +24425,14 @@ * @function create * @memberof CMsgFulfillDynamicRecipeComponent * @static - * @param {ICMsgFulfillDynamicRecipeComponent=} [properties] Properties to set + * @param {CMsgFulfillDynamicRecipeComponent.$Properties=} [properties] Properties to set * @returns {CMsgFulfillDynamicRecipeComponent} CMsgFulfillDynamicRecipeComponent instance + * @type {{ + * (properties: CMsgFulfillDynamicRecipeComponent.$Shape): CMsgFulfillDynamicRecipeComponent & CMsgFulfillDynamicRecipeComponent.$Shape; + * (properties?: CMsgFulfillDynamicRecipeComponent.$Properties): CMsgFulfillDynamicRecipeComponent; + * }} */ - CMsgFulfillDynamicRecipeComponent.create = function create(properties) { + CMsgFulfillDynamicRecipeComponent.create = function(properties) { return new CMsgFulfillDynamicRecipeComponent(properties); }; @@ -18762,18 +24441,25 @@ * @function encode * @memberof CMsgFulfillDynamicRecipeComponent * @static - * @param {ICMsgFulfillDynamicRecipeComponent} message CMsgFulfillDynamicRecipeComponent message or plain object to encode + * @param {CMsgFulfillDynamicRecipeComponent.$Properties} message CMsgFulfillDynamicRecipeComponent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgFulfillDynamicRecipeComponent.encode = function encode(message, writer) { + CMsgFulfillDynamicRecipeComponent.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.tool_item_id != null && Object.hasOwnProperty.call(message, "tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.tool_item_id); if (message.consumption_components != null && message.consumption_components.length) for (var i = 0; i < message.consumption_components.length; ++i) - $root.CMsgRecipeComponent.encode(message.consumption_components[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgRecipeComponent.encode(message.consumption_components[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18782,12 +24468,12 @@ * @function encodeDelimited * @memberof CMsgFulfillDynamicRecipeComponent * @static - * @param {ICMsgFulfillDynamicRecipeComponent} message CMsgFulfillDynamicRecipeComponent message or plain object to encode + * @param {CMsgFulfillDynamicRecipeComponent.$Properties} message CMsgFulfillDynamicRecipeComponent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgFulfillDynamicRecipeComponent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgFulfillDynamicRecipeComponent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18797,30 +24483,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgFulfillDynamicRecipeComponent} CMsgFulfillDynamicRecipeComponent + * @returns {CMsgFulfillDynamicRecipeComponent & CMsgFulfillDynamicRecipeComponent.$Shape} CMsgFulfillDynamicRecipeComponent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgFulfillDynamicRecipeComponent.decode = function decode(reader, length) { + CMsgFulfillDynamicRecipeComponent.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgFulfillDynamicRecipeComponent(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgFulfillDynamicRecipeComponent(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tool_item_id = reader.uint64(); - break; - case 2: - if (!(message.consumption_components && message.consumption_components.length)) - message.consumption_components = []; - message.consumption_components.push($root.CMsgRecipeComponent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.tool_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.consumption_components && message.consumption_components.length)) + message.consumption_components = []; + message.consumption_components.push($root.CMsgRecipeComponent.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18830,11 +24536,11 @@ * @memberof CMsgFulfillDynamicRecipeComponent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgFulfillDynamicRecipeComponent} CMsgFulfillDynamicRecipeComponent + * @returns {CMsgFulfillDynamicRecipeComponent & CMsgFulfillDynamicRecipeComponent.$Shape} CMsgFulfillDynamicRecipeComponent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgFulfillDynamicRecipeComponent.decodeDelimited = function decodeDelimited(reader) { + CMsgFulfillDynamicRecipeComponent.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18848,17 +24554,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgFulfillDynamicRecipeComponent.verify = function verify(message) { + CMsgFulfillDynamicRecipeComponent.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) if (!$util.isInteger(message.tool_item_id) && !(message.tool_item_id && $util.isInteger(message.tool_item_id.low) && $util.isInteger(message.tool_item_id.high))) return "tool_item_id: integer|Long expected"; - if (message.consumption_components != null && message.hasOwnProperty("consumption_components")) { - if (!Array.isArray(message.consumption_components)) + if (message.consumption_components != null && $Object.hasOwnProperty.call(message, "consumption_components")) { + if (!$Array.isArray(message.consumption_components)) return "consumption_components: array expected"; for (var i = 0; i < message.consumption_components.length; ++i) { - var error = $root.CMsgRecipeComponent.verify(message.consumption_components[i]); + var error = $root.CMsgRecipeComponent.verify(message.consumption_components[i], _depth + 1); if (error) return "consumption_components." + error; } @@ -18874,27 +24584,33 @@ * @param {Object.} object Plain object * @returns {CMsgFulfillDynamicRecipeComponent} CMsgFulfillDynamicRecipeComponent */ - CMsgFulfillDynamicRecipeComponent.fromObject = function fromObject(object) { + CMsgFulfillDynamicRecipeComponent.fromObject = function (object, _depth) { if (object instanceof $root.CMsgFulfillDynamicRecipeComponent) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgFulfillDynamicRecipeComponent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgFulfillDynamicRecipeComponent(); if (object.tool_item_id != null) if ($util.Long) - (message.tool_item_id = $util.Long.fromValue(object.tool_item_id)).unsigned = true; + message.tool_item_id = $util.Long.fromValue(object.tool_item_id, true); else if (typeof object.tool_item_id === "string") - message.tool_item_id = parseInt(object.tool_item_id, 10); + message.tool_item_id = $parseInt(object.tool_item_id, 10); else if (typeof object.tool_item_id === "number") message.tool_item_id = object.tool_item_id; else if (typeof object.tool_item_id === "object") message.tool_item_id = new $util.LongBits(object.tool_item_id.low >>> 0, object.tool_item_id.high >>> 0).toNumber(true); if (object.consumption_components) { - if (!Array.isArray(object.consumption_components)) - throw TypeError(".CMsgFulfillDynamicRecipeComponent.consumption_components: array expected"); - message.consumption_components = []; + if (!$Array.isArray(object.consumption_components)) + throw $TypeError(".CMsgFulfillDynamicRecipeComponent.consumption_components: array expected"); + message.consumption_components = $Array(object.consumption_components.length); for (var i = 0; i < object.consumption_components.length; ++i) { - if (typeof object.consumption_components[i] !== "object") - throw TypeError(".CMsgFulfillDynamicRecipeComponent.consumption_components: object expected"); - message.consumption_components[i] = $root.CMsgRecipeComponent.fromObject(object.consumption_components[i]); + if (!$util.isObject(object.consumption_components[i])) + throw $TypeError(".CMsgFulfillDynamicRecipeComponent.consumption_components: object expected"); + message.consumption_components[i] = $root.CMsgRecipeComponent.fromObject(object.consumption_components[i], _depth + 1); } } return message; @@ -18909,27 +24625,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgFulfillDynamicRecipeComponent.toObject = function toObject(message, options) { + CMsgFulfillDynamicRecipeComponent.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.consumption_components = []; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.tool_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.tool_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.tool_item_id = options.longs === String ? "0" : 0; - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) - if (typeof message.tool_item_id === "number") - object.tool_item_id = options.longs === String ? String(message.tool_item_id) : message.tool_item_id; + object.tool_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.tool_item_id = typeof message.tool_item_id === "number" ? $BigInt(message.tool_item_id) : $util.Long.fromBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.tool_item_id === "number") + object.tool_item_id = options.longs === $String ? $String(message.tool_item_id) : message.tool_item_id; else - object.tool_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; + object.tool_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === $Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; if (message.consumption_components && message.consumption_components.length) { - object.consumption_components = []; + object.consumption_components = $Array(message.consumption_components.length); for (var j = 0; j < message.consumption_components.length; ++j) - object.consumption_components[j] = $root.CMsgRecipeComponent.toObject(message.consumption_components[j], options); + object.consumption_components[j] = $root.CMsgRecipeComponent.toObject(message.consumption_components[j], options, _depth + 1); } return object; }; @@ -18941,8 +24663,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgFulfillDynamicRecipeComponent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgFulfillDynamicRecipeComponent.prototype.toJSON = function() { + return CMsgFulfillDynamicRecipeComponent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgFulfillDynamicRecipeComponent + * @function getTypeUrl + * @memberof CMsgFulfillDynamicRecipeComponent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgFulfillDynamicRecipeComponent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgFulfillDynamicRecipeComponent"; }; return CMsgFulfillDynamicRecipeComponent; @@ -18952,26 +24688,39 @@ /** * Properties of a CMsgSetItemEffectVerticalOffset. - * @exports ICMsgSetItemEffectVerticalOffset - * @interface ICMsgSetItemEffectVerticalOffset + * @typedef {Object} CMsgSetItemEffectVerticalOffset.$Properties * @property {number|Long|null} [item_id] CMsgSetItemEffectVerticalOffset item_id * @property {number|null} [offset] CMsgSetItemEffectVerticalOffset offset + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSetItemEffectVerticalOffset. + * @exports ICMsgSetItemEffectVerticalOffset + * @interface ICMsgSetItemEffectVerticalOffset + * @augments CMsgSetItemEffectVerticalOffset.$Properties + * @deprecated Use CMsgSetItemEffectVerticalOffset.$Properties instead. + */ + + /** + * Shape of a CMsgSetItemEffectVerticalOffset. + * @typedef {CMsgSetItemEffectVerticalOffset.$Properties} CMsgSetItemEffectVerticalOffset.$Shape */ /** * Constructs a new CMsgSetItemEffectVerticalOffset. * @exports CMsgSetItemEffectVerticalOffset * @classdesc Represents a CMsgSetItemEffectVerticalOffset. - * @implements ICMsgSetItemEffectVerticalOffset * @constructor - * @param {ICMsgSetItemEffectVerticalOffset=} [properties] Properties to set + * @param {CMsgSetItemEffectVerticalOffset.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSetItemEffectVerticalOffset(properties) { + var CMsgSetItemEffectVerticalOffset = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSetItemEffectVerticalOffset item_id. @@ -18994,10 +24743,14 @@ * @function create * @memberof CMsgSetItemEffectVerticalOffset * @static - * @param {ICMsgSetItemEffectVerticalOffset=} [properties] Properties to set + * @param {CMsgSetItemEffectVerticalOffset.$Properties=} [properties] Properties to set * @returns {CMsgSetItemEffectVerticalOffset} CMsgSetItemEffectVerticalOffset instance + * @type {{ + * (properties: CMsgSetItemEffectVerticalOffset.$Shape): CMsgSetItemEffectVerticalOffset & CMsgSetItemEffectVerticalOffset.$Shape; + * (properties?: CMsgSetItemEffectVerticalOffset.$Properties): CMsgSetItemEffectVerticalOffset; + * }} */ - CMsgSetItemEffectVerticalOffset.create = function create(properties) { + CMsgSetItemEffectVerticalOffset.create = function(properties) { return new CMsgSetItemEffectVerticalOffset(properties); }; @@ -19006,17 +24759,24 @@ * @function encode * @memberof CMsgSetItemEffectVerticalOffset * @static - * @param {ICMsgSetItemEffectVerticalOffset} message CMsgSetItemEffectVerticalOffset message or plain object to encode + * @param {CMsgSetItemEffectVerticalOffset.$Properties} message CMsgSetItemEffectVerticalOffset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetItemEffectVerticalOffset.encode = function encode(message, writer) { + CMsgSetItemEffectVerticalOffset.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + if (message.offset != null && $Object.hasOwnProperty.call(message, "offset")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.offset); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19025,12 +24785,12 @@ * @function encodeDelimited * @memberof CMsgSetItemEffectVerticalOffset * @static - * @param {ICMsgSetItemEffectVerticalOffset} message CMsgSetItemEffectVerticalOffset message or plain object to encode + * @param {CMsgSetItemEffectVerticalOffset.$Properties} message CMsgSetItemEffectVerticalOffset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetItemEffectVerticalOffset.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSetItemEffectVerticalOffset.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19040,28 +24800,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSetItemEffectVerticalOffset} CMsgSetItemEffectVerticalOffset + * @returns {CMsgSetItemEffectVerticalOffset & CMsgSetItemEffectVerticalOffset.$Shape} CMsgSetItemEffectVerticalOffset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetItemEffectVerticalOffset.decode = function decode(reader, length) { + CMsgSetItemEffectVerticalOffset.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSetItemEffectVerticalOffset(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSetItemEffectVerticalOffset(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.offset = reader.float(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.offset = reader.float(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19071,11 +24851,11 @@ * @memberof CMsgSetItemEffectVerticalOffset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSetItemEffectVerticalOffset} CMsgSetItemEffectVerticalOffset + * @returns {CMsgSetItemEffectVerticalOffset & CMsgSetItemEffectVerticalOffset.$Shape} CMsgSetItemEffectVerticalOffset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetItemEffectVerticalOffset.decodeDelimited = function decodeDelimited(reader) { + CMsgSetItemEffectVerticalOffset.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19089,13 +24869,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSetItemEffectVerticalOffset.verify = function verify(message) { + CMsgSetItemEffectVerticalOffset.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.offset != null && message.hasOwnProperty("offset")) + if (message.offset != null && $Object.hasOwnProperty.call(message, "offset")) if (typeof message.offset !== "number") return "offset: number expected"; return null; @@ -19109,21 +24893,27 @@ * @param {Object.} object Plain object * @returns {CMsgSetItemEffectVerticalOffset} CMsgSetItemEffectVerticalOffset */ - CMsgSetItemEffectVerticalOffset.fromObject = function fromObject(object) { + CMsgSetItemEffectVerticalOffset.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSetItemEffectVerticalOffset) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSetItemEffectVerticalOffset: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSetItemEffectVerticalOffset(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") message.item_id = new $util.LongBits(object.item_id.low >>> 0, object.item_id.high >>> 0).toNumber(true); if (object.offset != null) - message.offset = Number(object.offset); + message.offset = $Number(object.offset); return message; }; @@ -19136,25 +24926,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSetItemEffectVerticalOffset.toObject = function toObject(message, options) { + CMsgSetItemEffectVerticalOffset.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.offset = 0; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.offset != null && message.hasOwnProperty("offset")) - object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.offset != null && $Object.hasOwnProperty.call(message, "offset")) + object.offset = options.json && !$isFinite(message.offset) ? $String(message.offset) : message.offset; return object; }; @@ -19165,8 +24961,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSetItemEffectVerticalOffset.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSetItemEffectVerticalOffset.prototype.toJSON = function() { + return CMsgSetItemEffectVerticalOffset.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSetItemEffectVerticalOffset + * @function getTypeUrl + * @memberof CMsgSetItemEffectVerticalOffset + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSetItemEffectVerticalOffset.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSetItemEffectVerticalOffset"; }; return CMsgSetItemEffectVerticalOffset; @@ -19176,26 +24986,39 @@ /** * Properties of a CMsgSetHatEffectUseHeadOrigin. - * @exports ICMsgSetHatEffectUseHeadOrigin - * @interface ICMsgSetHatEffectUseHeadOrigin + * @typedef {Object} CMsgSetHatEffectUseHeadOrigin.$Properties * @property {number|Long|null} [item_id] CMsgSetHatEffectUseHeadOrigin item_id * @property {boolean|null} [use_head] CMsgSetHatEffectUseHeadOrigin use_head + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSetHatEffectUseHeadOrigin. + * @exports ICMsgSetHatEffectUseHeadOrigin + * @interface ICMsgSetHatEffectUseHeadOrigin + * @augments CMsgSetHatEffectUseHeadOrigin.$Properties + * @deprecated Use CMsgSetHatEffectUseHeadOrigin.$Properties instead. + */ + + /** + * Shape of a CMsgSetHatEffectUseHeadOrigin. + * @typedef {CMsgSetHatEffectUseHeadOrigin.$Properties} CMsgSetHatEffectUseHeadOrigin.$Shape */ /** * Constructs a new CMsgSetHatEffectUseHeadOrigin. * @exports CMsgSetHatEffectUseHeadOrigin * @classdesc Represents a CMsgSetHatEffectUseHeadOrigin. - * @implements ICMsgSetHatEffectUseHeadOrigin * @constructor - * @param {ICMsgSetHatEffectUseHeadOrigin=} [properties] Properties to set + * @param {CMsgSetHatEffectUseHeadOrigin.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSetHatEffectUseHeadOrigin(properties) { + var CMsgSetHatEffectUseHeadOrigin = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSetHatEffectUseHeadOrigin item_id. @@ -19218,10 +25041,14 @@ * @function create * @memberof CMsgSetHatEffectUseHeadOrigin * @static - * @param {ICMsgSetHatEffectUseHeadOrigin=} [properties] Properties to set + * @param {CMsgSetHatEffectUseHeadOrigin.$Properties=} [properties] Properties to set * @returns {CMsgSetHatEffectUseHeadOrigin} CMsgSetHatEffectUseHeadOrigin instance + * @type {{ + * (properties: CMsgSetHatEffectUseHeadOrigin.$Shape): CMsgSetHatEffectUseHeadOrigin & CMsgSetHatEffectUseHeadOrigin.$Shape; + * (properties?: CMsgSetHatEffectUseHeadOrigin.$Properties): CMsgSetHatEffectUseHeadOrigin; + * }} */ - CMsgSetHatEffectUseHeadOrigin.create = function create(properties) { + CMsgSetHatEffectUseHeadOrigin.create = function(properties) { return new CMsgSetHatEffectUseHeadOrigin(properties); }; @@ -19230,17 +25057,24 @@ * @function encode * @memberof CMsgSetHatEffectUseHeadOrigin * @static - * @param {ICMsgSetHatEffectUseHeadOrigin} message CMsgSetHatEffectUseHeadOrigin message or plain object to encode + * @param {CMsgSetHatEffectUseHeadOrigin.$Properties} message CMsgSetHatEffectUseHeadOrigin message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetHatEffectUseHeadOrigin.encode = function encode(message, writer) { + CMsgSetHatEffectUseHeadOrigin.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.use_head != null && Object.hasOwnProperty.call(message, "use_head")) + if (message.use_head != null && $Object.hasOwnProperty.call(message, "use_head")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.use_head); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19249,12 +25083,12 @@ * @function encodeDelimited * @memberof CMsgSetHatEffectUseHeadOrigin * @static - * @param {ICMsgSetHatEffectUseHeadOrigin} message CMsgSetHatEffectUseHeadOrigin message or plain object to encode + * @param {CMsgSetHatEffectUseHeadOrigin.$Properties} message CMsgSetHatEffectUseHeadOrigin message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetHatEffectUseHeadOrigin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSetHatEffectUseHeadOrigin.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19264,28 +25098,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSetHatEffectUseHeadOrigin} CMsgSetHatEffectUseHeadOrigin + * @returns {CMsgSetHatEffectUseHeadOrigin & CMsgSetHatEffectUseHeadOrigin.$Shape} CMsgSetHatEffectUseHeadOrigin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetHatEffectUseHeadOrigin.decode = function decode(reader, length) { + CMsgSetHatEffectUseHeadOrigin.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSetHatEffectUseHeadOrigin(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSetHatEffectUseHeadOrigin(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.use_head = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.use_head = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19295,11 +25149,11 @@ * @memberof CMsgSetHatEffectUseHeadOrigin * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSetHatEffectUseHeadOrigin} CMsgSetHatEffectUseHeadOrigin + * @returns {CMsgSetHatEffectUseHeadOrigin & CMsgSetHatEffectUseHeadOrigin.$Shape} CMsgSetHatEffectUseHeadOrigin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetHatEffectUseHeadOrigin.decodeDelimited = function decodeDelimited(reader) { + CMsgSetHatEffectUseHeadOrigin.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19313,13 +25167,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSetHatEffectUseHeadOrigin.verify = function verify(message) { + CMsgSetHatEffectUseHeadOrigin.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.use_head != null && message.hasOwnProperty("use_head")) + if (message.use_head != null && $Object.hasOwnProperty.call(message, "use_head")) if (typeof message.use_head !== "boolean") return "use_head: boolean expected"; return null; @@ -19333,21 +25191,27 @@ * @param {Object.} object Plain object * @returns {CMsgSetHatEffectUseHeadOrigin} CMsgSetHatEffectUseHeadOrigin */ - CMsgSetHatEffectUseHeadOrigin.fromObject = function fromObject(object) { + CMsgSetHatEffectUseHeadOrigin.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSetHatEffectUseHeadOrigin) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSetHatEffectUseHeadOrigin: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSetHatEffectUseHeadOrigin(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") message.item_id = new $util.LongBits(object.item_id.low >>> 0, object.item_id.high >>> 0).toNumber(true); if (object.use_head != null) - message.use_head = Boolean(object.use_head); + message.use_head = $Boolean(object.use_head); return message; }; @@ -19360,24 +25224,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSetHatEffectUseHeadOrigin.toObject = function toObject(message, options) { + CMsgSetHatEffectUseHeadOrigin.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.use_head = false; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.use_head != null && message.hasOwnProperty("use_head")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.use_head != null && $Object.hasOwnProperty.call(message, "use_head")) object.use_head = message.use_head; return object; }; @@ -19389,8 +25259,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSetHatEffectUseHeadOrigin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSetHatEffectUseHeadOrigin.prototype.toJSON = function() { + return CMsgSetHatEffectUseHeadOrigin.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSetHatEffectUseHeadOrigin + * @function getTypeUrl + * @memberof CMsgSetHatEffectUseHeadOrigin + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSetHatEffectUseHeadOrigin.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSetHatEffectUseHeadOrigin"; }; return CMsgSetHatEffectUseHeadOrigin; @@ -19400,26 +25284,39 @@ /** * Properties of a CMsgDeliverGiftResponseGiver. - * @exports ICMsgDeliverGiftResponseGiver - * @interface ICMsgDeliverGiftResponseGiver + * @typedef {Object} CMsgDeliverGiftResponseGiver.$Properties * @property {number|null} [response_code] CMsgDeliverGiftResponseGiver response_code * @property {string|null} [receiver_account_name] CMsgDeliverGiftResponseGiver receiver_account_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgDeliverGiftResponseGiver. + * @exports ICMsgDeliverGiftResponseGiver + * @interface ICMsgDeliverGiftResponseGiver + * @augments CMsgDeliverGiftResponseGiver.$Properties + * @deprecated Use CMsgDeliverGiftResponseGiver.$Properties instead. + */ + + /** + * Shape of a CMsgDeliverGiftResponseGiver. + * @typedef {CMsgDeliverGiftResponseGiver.$Properties} CMsgDeliverGiftResponseGiver.$Shape */ /** * Constructs a new CMsgDeliverGiftResponseGiver. * @exports CMsgDeliverGiftResponseGiver * @classdesc Represents a CMsgDeliverGiftResponseGiver. - * @implements ICMsgDeliverGiftResponseGiver * @constructor - * @param {ICMsgDeliverGiftResponseGiver=} [properties] Properties to set + * @param {CMsgDeliverGiftResponseGiver.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgDeliverGiftResponseGiver(properties) { + var CMsgDeliverGiftResponseGiver = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgDeliverGiftResponseGiver response_code. @@ -19442,10 +25339,14 @@ * @function create * @memberof CMsgDeliverGiftResponseGiver * @static - * @param {ICMsgDeliverGiftResponseGiver=} [properties] Properties to set + * @param {CMsgDeliverGiftResponseGiver.$Properties=} [properties] Properties to set * @returns {CMsgDeliverGiftResponseGiver} CMsgDeliverGiftResponseGiver instance + * @type {{ + * (properties: CMsgDeliverGiftResponseGiver.$Shape): CMsgDeliverGiftResponseGiver & CMsgDeliverGiftResponseGiver.$Shape; + * (properties?: CMsgDeliverGiftResponseGiver.$Properties): CMsgDeliverGiftResponseGiver; + * }} */ - CMsgDeliverGiftResponseGiver.create = function create(properties) { + CMsgDeliverGiftResponseGiver.create = function(properties) { return new CMsgDeliverGiftResponseGiver(properties); }; @@ -19454,17 +25355,24 @@ * @function encode * @memberof CMsgDeliverGiftResponseGiver * @static - * @param {ICMsgDeliverGiftResponseGiver} message CMsgDeliverGiftResponseGiver message or plain object to encode + * @param {CMsgDeliverGiftResponseGiver.$Properties} message CMsgDeliverGiftResponseGiver message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDeliverGiftResponseGiver.encode = function encode(message, writer) { + CMsgDeliverGiftResponseGiver.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.response_code != null && Object.hasOwnProperty.call(message, "response_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.response_code != null && $Object.hasOwnProperty.call(message, "response_code")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.response_code); - if (message.receiver_account_name != null && Object.hasOwnProperty.call(message, "receiver_account_name")) + if (message.receiver_account_name != null && $Object.hasOwnProperty.call(message, "receiver_account_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.receiver_account_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19473,12 +25381,12 @@ * @function encodeDelimited * @memberof CMsgDeliverGiftResponseGiver * @static - * @param {ICMsgDeliverGiftResponseGiver} message CMsgDeliverGiftResponseGiver message or plain object to encode + * @param {CMsgDeliverGiftResponseGiver.$Properties} message CMsgDeliverGiftResponseGiver message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDeliverGiftResponseGiver.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgDeliverGiftResponseGiver.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19488,28 +25396,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgDeliverGiftResponseGiver} CMsgDeliverGiftResponseGiver + * @returns {CMsgDeliverGiftResponseGiver & CMsgDeliverGiftResponseGiver.$Shape} CMsgDeliverGiftResponseGiver * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDeliverGiftResponseGiver.decode = function decode(reader, length) { + CMsgDeliverGiftResponseGiver.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgDeliverGiftResponseGiver(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgDeliverGiftResponseGiver(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.response_code = reader.uint32(); - break; - case 2: - message.receiver_account_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.response_code = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.receiver_account_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19519,11 +25447,11 @@ * @memberof CMsgDeliverGiftResponseGiver * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgDeliverGiftResponseGiver} CMsgDeliverGiftResponseGiver + * @returns {CMsgDeliverGiftResponseGiver & CMsgDeliverGiftResponseGiver.$Shape} CMsgDeliverGiftResponseGiver * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDeliverGiftResponseGiver.decodeDelimited = function decodeDelimited(reader) { + CMsgDeliverGiftResponseGiver.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19537,13 +25465,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgDeliverGiftResponseGiver.verify = function verify(message) { + CMsgDeliverGiftResponseGiver.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.response_code != null && message.hasOwnProperty("response_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.response_code != null && $Object.hasOwnProperty.call(message, "response_code")) if (!$util.isInteger(message.response_code)) return "response_code: integer expected"; - if (message.receiver_account_name != null && message.hasOwnProperty("receiver_account_name")) + if (message.receiver_account_name != null && $Object.hasOwnProperty.call(message, "receiver_account_name")) if (!$util.isString(message.receiver_account_name)) return "receiver_account_name: string expected"; return null; @@ -19557,14 +25489,20 @@ * @param {Object.} object Plain object * @returns {CMsgDeliverGiftResponseGiver} CMsgDeliverGiftResponseGiver */ - CMsgDeliverGiftResponseGiver.fromObject = function fromObject(object) { + CMsgDeliverGiftResponseGiver.fromObject = function (object, _depth) { if (object instanceof $root.CMsgDeliverGiftResponseGiver) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgDeliverGiftResponseGiver: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgDeliverGiftResponseGiver(); if (object.response_code != null) message.response_code = object.response_code >>> 0; if (object.receiver_account_name != null) - message.receiver_account_name = String(object.receiver_account_name); + message.receiver_account_name = $String(object.receiver_account_name); return message; }; @@ -19577,17 +25515,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgDeliverGiftResponseGiver.toObject = function toObject(message, options) { + CMsgDeliverGiftResponseGiver.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.response_code = 0; object.receiver_account_name = ""; } - if (message.response_code != null && message.hasOwnProperty("response_code")) + if (message.response_code != null && $Object.hasOwnProperty.call(message, "response_code")) object.response_code = message.response_code; - if (message.receiver_account_name != null && message.hasOwnProperty("receiver_account_name")) + if (message.receiver_account_name != null && $Object.hasOwnProperty.call(message, "receiver_account_name")) object.receiver_account_name = message.receiver_account_name; return object; }; @@ -19599,8 +25541,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgDeliverGiftResponseGiver.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgDeliverGiftResponseGiver.prototype.toJSON = function() { + return CMsgDeliverGiftResponseGiver.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgDeliverGiftResponseGiver + * @function getTypeUrl + * @memberof CMsgDeliverGiftResponseGiver + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgDeliverGiftResponseGiver.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgDeliverGiftResponseGiver"; }; return CMsgDeliverGiftResponseGiver; @@ -19608,27 +25564,40 @@ $root.CSOEconGameAccountForGameServers = (function() { + /** + * Properties of a CSOEconGameAccountForGameServers. + * @typedef {Object} CSOEconGameAccountForGameServers.$Properties + * @property {boolean|null} [disable_party_quest_progress] CSOEconGameAccountForGameServers disable_party_quest_progress + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CSOEconGameAccountForGameServers. * @exports ICSOEconGameAccountForGameServers * @interface ICSOEconGameAccountForGameServers - * @property {boolean|null} [disable_party_quest_progress] CSOEconGameAccountForGameServers disable_party_quest_progress + * @augments CSOEconGameAccountForGameServers.$Properties + * @deprecated Use CSOEconGameAccountForGameServers.$Properties instead. + */ + + /** + * Shape of a CSOEconGameAccountForGameServers. + * @typedef {CSOEconGameAccountForGameServers.$Properties} CSOEconGameAccountForGameServers.$Shape */ /** * Constructs a new CSOEconGameAccountForGameServers. * @exports CSOEconGameAccountForGameServers * @classdesc Represents a CSOEconGameAccountForGameServers. - * @implements ICSOEconGameAccountForGameServers * @constructor - * @param {ICSOEconGameAccountForGameServers=} [properties] Properties to set + * @param {CSOEconGameAccountForGameServers.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconGameAccountForGameServers(properties) { + var CSOEconGameAccountForGameServers = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconGameAccountForGameServers disable_party_quest_progress. @@ -19643,10 +25612,14 @@ * @function create * @memberof CSOEconGameAccountForGameServers * @static - * @param {ICSOEconGameAccountForGameServers=} [properties] Properties to set + * @param {CSOEconGameAccountForGameServers.$Properties=} [properties] Properties to set * @returns {CSOEconGameAccountForGameServers} CSOEconGameAccountForGameServers instance + * @type {{ + * (properties: CSOEconGameAccountForGameServers.$Shape): CSOEconGameAccountForGameServers & CSOEconGameAccountForGameServers.$Shape; + * (properties?: CSOEconGameAccountForGameServers.$Properties): CSOEconGameAccountForGameServers; + * }} */ - CSOEconGameAccountForGameServers.create = function create(properties) { + CSOEconGameAccountForGameServers.create = function(properties) { return new CSOEconGameAccountForGameServers(properties); }; @@ -19655,15 +25628,22 @@ * @function encode * @memberof CSOEconGameAccountForGameServers * @static - * @param {ICSOEconGameAccountForGameServers} message CSOEconGameAccountForGameServers message or plain object to encode + * @param {CSOEconGameAccountForGameServers.$Properties} message CSOEconGameAccountForGameServers message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconGameAccountForGameServers.encode = function encode(message, writer) { + CSOEconGameAccountForGameServers.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.disable_party_quest_progress != null && Object.hasOwnProperty.call(message, "disable_party_quest_progress")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.disable_party_quest_progress); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19672,12 +25652,12 @@ * @function encodeDelimited * @memberof CSOEconGameAccountForGameServers * @static - * @param {ICSOEconGameAccountForGameServers} message CSOEconGameAccountForGameServers message or plain object to encode + * @param {CSOEconGameAccountForGameServers.$Properties} message CSOEconGameAccountForGameServers message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconGameAccountForGameServers.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconGameAccountForGameServers.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19687,25 +25667,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconGameAccountForGameServers} CSOEconGameAccountForGameServers + * @returns {CSOEconGameAccountForGameServers & CSOEconGameAccountForGameServers.$Shape} CSOEconGameAccountForGameServers * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconGameAccountForGameServers.decode = function decode(reader, length) { + CSOEconGameAccountForGameServers.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconGameAccountForGameServers(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconGameAccountForGameServers(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: - message.disable_party_quest_progress = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 6: { + if (wireType !== 0) + break; + message.disable_party_quest_progress = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19715,11 +25712,11 @@ * @memberof CSOEconGameAccountForGameServers * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconGameAccountForGameServers} CSOEconGameAccountForGameServers + * @returns {CSOEconGameAccountForGameServers & CSOEconGameAccountForGameServers.$Shape} CSOEconGameAccountForGameServers * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconGameAccountForGameServers.decodeDelimited = function decodeDelimited(reader) { + CSOEconGameAccountForGameServers.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19733,10 +25730,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconGameAccountForGameServers.verify = function verify(message) { + CSOEconGameAccountForGameServers.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.disable_party_quest_progress != null && message.hasOwnProperty("disable_party_quest_progress")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) if (typeof message.disable_party_quest_progress !== "boolean") return "disable_party_quest_progress: boolean expected"; return null; @@ -19750,12 +25751,18 @@ * @param {Object.} object Plain object * @returns {CSOEconGameAccountForGameServers} CSOEconGameAccountForGameServers */ - CSOEconGameAccountForGameServers.fromObject = function fromObject(object) { + CSOEconGameAccountForGameServers.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconGameAccountForGameServers) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconGameAccountForGameServers: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconGameAccountForGameServers(); if (object.disable_party_quest_progress != null) - message.disable_party_quest_progress = Boolean(object.disable_party_quest_progress); + message.disable_party_quest_progress = $Boolean(object.disable_party_quest_progress); return message; }; @@ -19768,13 +25775,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconGameAccountForGameServers.toObject = function toObject(message, options) { + CSOEconGameAccountForGameServers.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.disable_party_quest_progress = false; - if (message.disable_party_quest_progress != null && message.hasOwnProperty("disable_party_quest_progress")) + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) object.disable_party_quest_progress = message.disable_party_quest_progress; return object; }; @@ -19786,8 +25797,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconGameAccountForGameServers.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconGameAccountForGameServers.prototype.toJSON = function() { + return CSOEconGameAccountForGameServers.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconGameAccountForGameServers + * @function getTypeUrl + * @memberof CSOEconGameAccountForGameServers + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconGameAccountForGameServers.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconGameAccountForGameServers"; }; return CSOEconGameAccountForGameServers; @@ -19795,29 +25820,42 @@ $root.CWorkshop_PopulateItemDescriptions_Request = (function() { + /** + * Properties of a CWorkshop_PopulateItemDescriptions_Request. + * @typedef {Object} CWorkshop_PopulateItemDescriptions_Request.$Properties + * @property {number|null} [appid] CWorkshop_PopulateItemDescriptions_Request appid + * @property {Array.|null} [languages] CWorkshop_PopulateItemDescriptions_Request languages + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CWorkshop_PopulateItemDescriptions_Request. * @exports ICWorkshop_PopulateItemDescriptions_Request * @interface ICWorkshop_PopulateItemDescriptions_Request - * @property {number|null} [appid] CWorkshop_PopulateItemDescriptions_Request appid - * @property {Array.|null} [languages] CWorkshop_PopulateItemDescriptions_Request languages + * @augments CWorkshop_PopulateItemDescriptions_Request.$Properties + * @deprecated Use CWorkshop_PopulateItemDescriptions_Request.$Properties instead. + */ + + /** + * Shape of a CWorkshop_PopulateItemDescriptions_Request. + * @typedef {CWorkshop_PopulateItemDescriptions_Request.$Properties} CWorkshop_PopulateItemDescriptions_Request.$Shape */ /** * Constructs a new CWorkshop_PopulateItemDescriptions_Request. * @exports CWorkshop_PopulateItemDescriptions_Request * @classdesc Represents a CWorkshop_PopulateItemDescriptions_Request. - * @implements ICWorkshop_PopulateItemDescriptions_Request * @constructor - * @param {ICWorkshop_PopulateItemDescriptions_Request=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CWorkshop_PopulateItemDescriptions_Request(properties) { + var CWorkshop_PopulateItemDescriptions_Request = function (properties) { this.languages = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CWorkshop_PopulateItemDescriptions_Request appid. @@ -19829,7 +25867,7 @@ /** * CWorkshop_PopulateItemDescriptions_Request languages. - * @member {Array.} languages + * @member {Array.} languages * @memberof CWorkshop_PopulateItemDescriptions_Request * @instance */ @@ -19840,10 +25878,14 @@ * @function create * @memberof CWorkshop_PopulateItemDescriptions_Request * @static - * @param {ICWorkshop_PopulateItemDescriptions_Request=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.$Properties=} [properties] Properties to set * @returns {CWorkshop_PopulateItemDescriptions_Request} CWorkshop_PopulateItemDescriptions_Request instance + * @type {{ + * (properties: CWorkshop_PopulateItemDescriptions_Request.$Shape): CWorkshop_PopulateItemDescriptions_Request & CWorkshop_PopulateItemDescriptions_Request.$Shape; + * (properties?: CWorkshop_PopulateItemDescriptions_Request.$Properties): CWorkshop_PopulateItemDescriptions_Request; + * }} */ - CWorkshop_PopulateItemDescriptions_Request.create = function create(properties) { + CWorkshop_PopulateItemDescriptions_Request.create = function(properties) { return new CWorkshop_PopulateItemDescriptions_Request(properties); }; @@ -19852,18 +25894,25 @@ * @function encode * @memberof CWorkshop_PopulateItemDescriptions_Request * @static - * @param {ICWorkshop_PopulateItemDescriptions_Request} message CWorkshop_PopulateItemDescriptions_Request message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.$Properties} message CWorkshop_PopulateItemDescriptions_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_PopulateItemDescriptions_Request.encode = function encode(message, writer) { + CWorkshop_PopulateItemDescriptions_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.appid); if (message.languages != null && message.languages.length) for (var i = 0; i < message.languages.length; ++i) - $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.encode(message.languages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.encode(message.languages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19872,12 +25921,12 @@ * @function encodeDelimited * @memberof CWorkshop_PopulateItemDescriptions_Request * @static - * @param {ICWorkshop_PopulateItemDescriptions_Request} message CWorkshop_PopulateItemDescriptions_Request message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.$Properties} message CWorkshop_PopulateItemDescriptions_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_PopulateItemDescriptions_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CWorkshop_PopulateItemDescriptions_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19887,30 +25936,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_PopulateItemDescriptions_Request} CWorkshop_PopulateItemDescriptions_Request + * @returns {CWorkshop_PopulateItemDescriptions_Request & CWorkshop_PopulateItemDescriptions_Request.$Shape} CWorkshop_PopulateItemDescriptions_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_PopulateItemDescriptions_Request.decode = function decode(reader, length) { + CWorkshop_PopulateItemDescriptions_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_PopulateItemDescriptions_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_PopulateItemDescriptions_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appid = reader.uint32(); - break; - case 2: - if (!(message.languages && message.languages.length)) - message.languages = []; - message.languages.push($root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.languages && message.languages.length)) + message.languages = []; + message.languages.push($root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19920,11 +25989,11 @@ * @memberof CWorkshop_PopulateItemDescriptions_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_PopulateItemDescriptions_Request} CWorkshop_PopulateItemDescriptions_Request + * @returns {CWorkshop_PopulateItemDescriptions_Request & CWorkshop_PopulateItemDescriptions_Request.$Shape} CWorkshop_PopulateItemDescriptions_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_PopulateItemDescriptions_Request.decodeDelimited = function decodeDelimited(reader) { + CWorkshop_PopulateItemDescriptions_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19938,17 +26007,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CWorkshop_PopulateItemDescriptions_Request.verify = function verify(message) { + CWorkshop_PopulateItemDescriptions_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.languages != null && message.hasOwnProperty("languages")) { - if (!Array.isArray(message.languages)) + if (message.languages != null && $Object.hasOwnProperty.call(message, "languages")) { + if (!$Array.isArray(message.languages)) return "languages: array expected"; for (var i = 0; i < message.languages.length; ++i) { - var error = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.verify(message.languages[i]); + var error = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.verify(message.languages[i], _depth + 1); if (error) return "languages." + error; } @@ -19964,20 +26037,26 @@ * @param {Object.} object Plain object * @returns {CWorkshop_PopulateItemDescriptions_Request} CWorkshop_PopulateItemDescriptions_Request */ - CWorkshop_PopulateItemDescriptions_Request.fromObject = function fromObject(object) { + CWorkshop_PopulateItemDescriptions_Request.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_PopulateItemDescriptions_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_PopulateItemDescriptions_Request(); if (object.appid != null) message.appid = object.appid >>> 0; if (object.languages) { - if (!Array.isArray(object.languages)) - throw TypeError(".CWorkshop_PopulateItemDescriptions_Request.languages: array expected"); - message.languages = []; + if (!$Array.isArray(object.languages)) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.languages: array expected"); + message.languages = $Array(object.languages.length); for (var i = 0; i < object.languages.length; ++i) { - if (typeof object.languages[i] !== "object") - throw TypeError(".CWorkshop_PopulateItemDescriptions_Request.languages: object expected"); - message.languages[i] = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.fromObject(object.languages[i]); + if (!$util.isObject(object.languages[i])) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.languages: object expected"); + message.languages[i] = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.fromObject(object.languages[i], _depth + 1); } } return message; @@ -19992,20 +26071,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CWorkshop_PopulateItemDescriptions_Request.toObject = function toObject(message, options) { + CWorkshop_PopulateItemDescriptions_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.languages = []; if (options.defaults) object.appid = 0; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; if (message.languages && message.languages.length) { - object.languages = []; + object.languages = $Array(message.languages.length); for (var j = 0; j < message.languages.length; ++j) - object.languages[j] = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.toObject(message.languages[j], options); + object.languages[j] = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.toObject(message.languages[j], options, _depth + 1); } return object; }; @@ -20017,34 +26100,61 @@ * @instance * @returns {Object.} JSON object */ - CWorkshop_PopulateItemDescriptions_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CWorkshop_PopulateItemDescriptions_Request.prototype.toJSON = function() { + return CWorkshop_PopulateItemDescriptions_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CWorkshop_PopulateItemDescriptions_Request + * @function getTypeUrl + * @memberof CWorkshop_PopulateItemDescriptions_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CWorkshop_PopulateItemDescriptions_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_PopulateItemDescriptions_Request"; }; CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription = (function() { /** * Properties of a SingleItemDescription. - * @memberof CWorkshop_PopulateItemDescriptions_Request - * @interface ISingleItemDescription + * @typedef {Object} CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties * @property {number|null} [gameitemid] SingleItemDescription gameitemid * @property {string|null} [item_description] SingleItemDescription item_description + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SingleItemDescription. + * @memberof CWorkshop_PopulateItemDescriptions_Request + * @interface ISingleItemDescription + * @augments CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties + * @deprecated Use CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties instead. + */ + + /** + * Shape of a SingleItemDescription. + * @typedef {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties} CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Shape */ /** * Constructs a new SingleItemDescription. * @memberof CWorkshop_PopulateItemDescriptions_Request * @classdesc Represents a SingleItemDescription. - * @implements ISingleItemDescription * @constructor - * @param {CWorkshop_PopulateItemDescriptions_Request.ISingleItemDescription=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SingleItemDescription(properties) { + var SingleItemDescription = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SingleItemDescription gameitemid. @@ -20067,10 +26177,14 @@ * @function create * @memberof CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.ISingleItemDescription=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties=} [properties] Properties to set * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription} SingleItemDescription instance + * @type {{ + * (properties: CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Shape): CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription & CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Shape; + * (properties?: CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties): CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription; + * }} */ - SingleItemDescription.create = function create(properties) { + SingleItemDescription.create = function(properties) { return new SingleItemDescription(properties); }; @@ -20079,17 +26193,24 @@ * @function encode * @memberof CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.ISingleItemDescription} message SingleItemDescription message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties} message SingleItemDescription message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SingleItemDescription.encode = function encode(message, writer) { + SingleItemDescription.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gameitemid != null && Object.hasOwnProperty.call(message, "gameitemid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gameitemid); - if (message.item_description != null && Object.hasOwnProperty.call(message, "item_description")) + if (message.item_description != null && $Object.hasOwnProperty.call(message, "item_description")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.item_description); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20098,12 +26219,12 @@ * @function encodeDelimited * @memberof CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.ISingleItemDescription} message SingleItemDescription message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties} message SingleItemDescription message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SingleItemDescription.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SingleItemDescription.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20113,28 +26234,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription} SingleItemDescription + * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription & CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Shape} SingleItemDescription * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SingleItemDescription.decode = function decode(reader, length) { + SingleItemDescription.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gameitemid = reader.uint32(); - break; - case 2: - message.item_description = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gameitemid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.item_description = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20144,11 +26285,11 @@ * @memberof CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription} SingleItemDescription + * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription & CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Shape} SingleItemDescription * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SingleItemDescription.decodeDelimited = function decodeDelimited(reader) { + SingleItemDescription.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20162,13 +26303,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SingleItemDescription.verify = function verify(message) { + SingleItemDescription.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) if (!$util.isInteger(message.gameitemid)) return "gameitemid: integer expected"; - if (message.item_description != null && message.hasOwnProperty("item_description")) + if (message.item_description != null && $Object.hasOwnProperty.call(message, "item_description")) if (!$util.isString(message.item_description)) return "item_description: string expected"; return null; @@ -20182,14 +26327,20 @@ * @param {Object.} object Plain object * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription} SingleItemDescription */ - SingleItemDescription.fromObject = function fromObject(object) { + SingleItemDescription.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription(); if (object.gameitemid != null) message.gameitemid = object.gameitemid >>> 0; if (object.item_description != null) - message.item_description = String(object.item_description); + message.item_description = $String(object.item_description); return message; }; @@ -20202,17 +26353,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SingleItemDescription.toObject = function toObject(message, options) { + SingleItemDescription.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gameitemid = 0; object.item_description = ""; } - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) object.gameitemid = message.gameitemid; - if (message.item_description != null && message.hasOwnProperty("item_description")) + if (message.item_description != null && $Object.hasOwnProperty.call(message, "item_description")) object.item_description = message.item_description; return object; }; @@ -20224,8 +26379,22 @@ * @instance * @returns {Object.} JSON object */ - SingleItemDescription.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SingleItemDescription.prototype.toJSON = function() { + return SingleItemDescription.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SingleItemDescription + * @function getTypeUrl + * @memberof CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SingleItemDescription.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription"; }; return SingleItemDescription; @@ -20233,29 +26402,42 @@ CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock = (function() { + /** + * Properties of an ItemDescriptionsLanguageBlock. + * @typedef {Object} CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties + * @property {string|null} [language] ItemDescriptionsLanguageBlock language + * @property {Array.|null} [descriptions] ItemDescriptionsLanguageBlock descriptions + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an ItemDescriptionsLanguageBlock. * @memberof CWorkshop_PopulateItemDescriptions_Request * @interface IItemDescriptionsLanguageBlock - * @property {string|null} [language] ItemDescriptionsLanguageBlock language - * @property {Array.|null} [descriptions] ItemDescriptionsLanguageBlock descriptions + * @augments CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties + * @deprecated Use CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties instead. + */ + + /** + * Shape of an ItemDescriptionsLanguageBlock. + * @typedef {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties} CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Shape */ /** * Constructs a new ItemDescriptionsLanguageBlock. * @memberof CWorkshop_PopulateItemDescriptions_Request * @classdesc Represents an ItemDescriptionsLanguageBlock. - * @implements IItemDescriptionsLanguageBlock * @constructor - * @param {CWorkshop_PopulateItemDescriptions_Request.IItemDescriptionsLanguageBlock=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ItemDescriptionsLanguageBlock(properties) { + var ItemDescriptionsLanguageBlock = function (properties) { this.descriptions = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ItemDescriptionsLanguageBlock language. @@ -20267,7 +26449,7 @@ /** * ItemDescriptionsLanguageBlock descriptions. - * @member {Array.} descriptions + * @member {Array.} descriptions * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock * @instance */ @@ -20278,10 +26460,14 @@ * @function create * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.IItemDescriptionsLanguageBlock=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties=} [properties] Properties to set * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock} ItemDescriptionsLanguageBlock instance + * @type {{ + * (properties: CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Shape): CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock & CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Shape; + * (properties?: CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties): CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock; + * }} */ - ItemDescriptionsLanguageBlock.create = function create(properties) { + ItemDescriptionsLanguageBlock.create = function(properties) { return new ItemDescriptionsLanguageBlock(properties); }; @@ -20290,18 +26476,25 @@ * @function encode * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.IItemDescriptionsLanguageBlock} message ItemDescriptionsLanguageBlock message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties} message ItemDescriptionsLanguageBlock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ItemDescriptionsLanguageBlock.encode = function encode(message, writer) { + ItemDescriptionsLanguageBlock.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.language != null && Object.hasOwnProperty.call(message, "language")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.language); if (message.descriptions != null && message.descriptions.length) for (var i = 0; i < message.descriptions.length; ++i) - $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.encode(message.descriptions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.encode(message.descriptions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20310,12 +26503,12 @@ * @function encodeDelimited * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.IItemDescriptionsLanguageBlock} message ItemDescriptionsLanguageBlock message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties} message ItemDescriptionsLanguageBlock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ItemDescriptionsLanguageBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ItemDescriptionsLanguageBlock.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20325,30 +26518,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock} ItemDescriptionsLanguageBlock + * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock & CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Shape} ItemDescriptionsLanguageBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ItemDescriptionsLanguageBlock.decode = function decode(reader, length) { + ItemDescriptionsLanguageBlock.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.language = reader.string(); - break; - case 2: - if (!(message.descriptions && message.descriptions.length)) - message.descriptions = []; - message.descriptions.push($root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.language = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.descriptions && message.descriptions.length)) + message.descriptions = []; + message.descriptions.push($root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20358,11 +26571,11 @@ * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock} ItemDescriptionsLanguageBlock + * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock & CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Shape} ItemDescriptionsLanguageBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ItemDescriptionsLanguageBlock.decodeDelimited = function decodeDelimited(reader) { + ItemDescriptionsLanguageBlock.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20376,17 +26589,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ItemDescriptionsLanguageBlock.verify = function verify(message) { + ItemDescriptionsLanguageBlock.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.language != null && message.hasOwnProperty("language")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) if (!$util.isString(message.language)) return "language: string expected"; - if (message.descriptions != null && message.hasOwnProperty("descriptions")) { - if (!Array.isArray(message.descriptions)) + if (message.descriptions != null && $Object.hasOwnProperty.call(message, "descriptions")) { + if (!$Array.isArray(message.descriptions)) return "descriptions: array expected"; for (var i = 0; i < message.descriptions.length; ++i) { - var error = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.verify(message.descriptions[i]); + var error = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.verify(message.descriptions[i], _depth + 1); if (error) return "descriptions." + error; } @@ -20402,20 +26619,26 @@ * @param {Object.} object Plain object * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock} ItemDescriptionsLanguageBlock */ - ItemDescriptionsLanguageBlock.fromObject = function fromObject(object) { + ItemDescriptionsLanguageBlock.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock(); if (object.language != null) - message.language = String(object.language); + message.language = $String(object.language); if (object.descriptions) { - if (!Array.isArray(object.descriptions)) - throw TypeError(".CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.descriptions: array expected"); - message.descriptions = []; + if (!$Array.isArray(object.descriptions)) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.descriptions: array expected"); + message.descriptions = $Array(object.descriptions.length); for (var i = 0; i < object.descriptions.length; ++i) { - if (typeof object.descriptions[i] !== "object") - throw TypeError(".CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.descriptions: object expected"); - message.descriptions[i] = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.fromObject(object.descriptions[i]); + if (!$util.isObject(object.descriptions[i])) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.descriptions: object expected"); + message.descriptions[i] = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.fromObject(object.descriptions[i], _depth + 1); } } return message; @@ -20430,20 +26653,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ItemDescriptionsLanguageBlock.toObject = function toObject(message, options) { + ItemDescriptionsLanguageBlock.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.descriptions = []; if (options.defaults) object.language = ""; - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) object.language = message.language; if (message.descriptions && message.descriptions.length) { - object.descriptions = []; + object.descriptions = $Array(message.descriptions.length); for (var j = 0; j < message.descriptions.length; ++j) - object.descriptions[j] = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.toObject(message.descriptions[j], options); + object.descriptions[j] = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.toObject(message.descriptions[j], options, _depth + 1); } return object; }; @@ -20455,8 +26682,22 @@ * @instance * @returns {Object.} JSON object */ - ItemDescriptionsLanguageBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ItemDescriptionsLanguageBlock.prototype.toJSON = function() { + return ItemDescriptionsLanguageBlock.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ItemDescriptionsLanguageBlock + * @function getTypeUrl + * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ItemDescriptionsLanguageBlock.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock"; }; return ItemDescriptionsLanguageBlock; @@ -20469,26 +26710,39 @@ /** * Properties of a CWorkshop_GetContributors_Request. - * @exports ICWorkshop_GetContributors_Request - * @interface ICWorkshop_GetContributors_Request + * @typedef {Object} CWorkshop_GetContributors_Request.$Properties * @property {number|null} [appid] CWorkshop_GetContributors_Request appid * @property {number|null} [gameitemid] CWorkshop_GetContributors_Request gameitemid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CWorkshop_GetContributors_Request. + * @exports ICWorkshop_GetContributors_Request + * @interface ICWorkshop_GetContributors_Request + * @augments CWorkshop_GetContributors_Request.$Properties + * @deprecated Use CWorkshop_GetContributors_Request.$Properties instead. + */ + + /** + * Shape of a CWorkshop_GetContributors_Request. + * @typedef {CWorkshop_GetContributors_Request.$Properties} CWorkshop_GetContributors_Request.$Shape */ /** * Constructs a new CWorkshop_GetContributors_Request. * @exports CWorkshop_GetContributors_Request * @classdesc Represents a CWorkshop_GetContributors_Request. - * @implements ICWorkshop_GetContributors_Request * @constructor - * @param {ICWorkshop_GetContributors_Request=} [properties] Properties to set + * @param {CWorkshop_GetContributors_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CWorkshop_GetContributors_Request(properties) { + var CWorkshop_GetContributors_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CWorkshop_GetContributors_Request appid. @@ -20511,10 +26765,14 @@ * @function create * @memberof CWorkshop_GetContributors_Request * @static - * @param {ICWorkshop_GetContributors_Request=} [properties] Properties to set + * @param {CWorkshop_GetContributors_Request.$Properties=} [properties] Properties to set * @returns {CWorkshop_GetContributors_Request} CWorkshop_GetContributors_Request instance + * @type {{ + * (properties: CWorkshop_GetContributors_Request.$Shape): CWorkshop_GetContributors_Request & CWorkshop_GetContributors_Request.$Shape; + * (properties?: CWorkshop_GetContributors_Request.$Properties): CWorkshop_GetContributors_Request; + * }} */ - CWorkshop_GetContributors_Request.create = function create(properties) { + CWorkshop_GetContributors_Request.create = function(properties) { return new CWorkshop_GetContributors_Request(properties); }; @@ -20523,17 +26781,24 @@ * @function encode * @memberof CWorkshop_GetContributors_Request * @static - * @param {ICWorkshop_GetContributors_Request} message CWorkshop_GetContributors_Request message or plain object to encode + * @param {CWorkshop_GetContributors_Request.$Properties} message CWorkshop_GetContributors_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_GetContributors_Request.encode = function encode(message, writer) { + CWorkshop_GetContributors_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.appid); - if (message.gameitemid != null && Object.hasOwnProperty.call(message, "gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.gameitemid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20542,12 +26807,12 @@ * @function encodeDelimited * @memberof CWorkshop_GetContributors_Request * @static - * @param {ICWorkshop_GetContributors_Request} message CWorkshop_GetContributors_Request message or plain object to encode + * @param {CWorkshop_GetContributors_Request.$Properties} message CWorkshop_GetContributors_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_GetContributors_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CWorkshop_GetContributors_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20557,28 +26822,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_GetContributors_Request} CWorkshop_GetContributors_Request + * @returns {CWorkshop_GetContributors_Request & CWorkshop_GetContributors_Request.$Shape} CWorkshop_GetContributors_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_GetContributors_Request.decode = function decode(reader, length) { + CWorkshop_GetContributors_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_GetContributors_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_GetContributors_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appid = reader.uint32(); - break; - case 2: - message.gameitemid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.gameitemid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20588,11 +26873,11 @@ * @memberof CWorkshop_GetContributors_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_GetContributors_Request} CWorkshop_GetContributors_Request + * @returns {CWorkshop_GetContributors_Request & CWorkshop_GetContributors_Request.$Shape} CWorkshop_GetContributors_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_GetContributors_Request.decodeDelimited = function decodeDelimited(reader) { + CWorkshop_GetContributors_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20606,13 +26891,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CWorkshop_GetContributors_Request.verify = function verify(message) { + CWorkshop_GetContributors_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) if (!$util.isInteger(message.gameitemid)) return "gameitemid: integer expected"; return null; @@ -20626,9 +26915,15 @@ * @param {Object.} object Plain object * @returns {CWorkshop_GetContributors_Request} CWorkshop_GetContributors_Request */ - CWorkshop_GetContributors_Request.fromObject = function fromObject(object) { + CWorkshop_GetContributors_Request.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_GetContributors_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_GetContributors_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_GetContributors_Request(); if (object.appid != null) message.appid = object.appid >>> 0; @@ -20646,17 +26941,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CWorkshop_GetContributors_Request.toObject = function toObject(message, options) { + CWorkshop_GetContributors_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.appid = 0; object.gameitemid = 0; } - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) object.gameitemid = message.gameitemid; return object; }; @@ -20668,8 +26967,22 @@ * @instance * @returns {Object.} JSON object */ - CWorkshop_GetContributors_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CWorkshop_GetContributors_Request.prototype.toJSON = function() { + return CWorkshop_GetContributors_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CWorkshop_GetContributors_Request + * @function getTypeUrl + * @memberof CWorkshop_GetContributors_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CWorkshop_GetContributors_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_GetContributors_Request"; }; return CWorkshop_GetContributors_Request; @@ -20677,28 +26990,41 @@ $root.CWorkshop_GetContributors_Response = (function() { + /** + * Properties of a CWorkshop_GetContributors_Response. + * @typedef {Object} CWorkshop_GetContributors_Response.$Properties + * @property {Array.|null} [contributors] CWorkshop_GetContributors_Response contributors + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CWorkshop_GetContributors_Response. * @exports ICWorkshop_GetContributors_Response * @interface ICWorkshop_GetContributors_Response - * @property {Array.|null} [contributors] CWorkshop_GetContributors_Response contributors + * @augments CWorkshop_GetContributors_Response.$Properties + * @deprecated Use CWorkshop_GetContributors_Response.$Properties instead. + */ + + /** + * Shape of a CWorkshop_GetContributors_Response. + * @typedef {CWorkshop_GetContributors_Response.$Properties} CWorkshop_GetContributors_Response.$Shape */ /** * Constructs a new CWorkshop_GetContributors_Response. * @exports CWorkshop_GetContributors_Response * @classdesc Represents a CWorkshop_GetContributors_Response. - * @implements ICWorkshop_GetContributors_Response * @constructor - * @param {ICWorkshop_GetContributors_Response=} [properties] Properties to set + * @param {CWorkshop_GetContributors_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CWorkshop_GetContributors_Response(properties) { + var CWorkshop_GetContributors_Response = function (properties) { this.contributors = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CWorkshop_GetContributors_Response contributors. @@ -20713,10 +27039,14 @@ * @function create * @memberof CWorkshop_GetContributors_Response * @static - * @param {ICWorkshop_GetContributors_Response=} [properties] Properties to set + * @param {CWorkshop_GetContributors_Response.$Properties=} [properties] Properties to set * @returns {CWorkshop_GetContributors_Response} CWorkshop_GetContributors_Response instance + * @type {{ + * (properties: CWorkshop_GetContributors_Response.$Shape): CWorkshop_GetContributors_Response & CWorkshop_GetContributors_Response.$Shape; + * (properties?: CWorkshop_GetContributors_Response.$Properties): CWorkshop_GetContributors_Response; + * }} */ - CWorkshop_GetContributors_Response.create = function create(properties) { + CWorkshop_GetContributors_Response.create = function(properties) { return new CWorkshop_GetContributors_Response(properties); }; @@ -20725,16 +27055,23 @@ * @function encode * @memberof CWorkshop_GetContributors_Response * @static - * @param {ICWorkshop_GetContributors_Response} message CWorkshop_GetContributors_Response message or plain object to encode + * @param {CWorkshop_GetContributors_Response.$Properties} message CWorkshop_GetContributors_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_GetContributors_Response.encode = function encode(message, writer) { + CWorkshop_GetContributors_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.contributors != null && message.contributors.length) for (var i = 0; i < message.contributors.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.contributors[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20743,12 +27080,12 @@ * @function encodeDelimited * @memberof CWorkshop_GetContributors_Response * @static - * @param {ICWorkshop_GetContributors_Response} message CWorkshop_GetContributors_Response message or plain object to encode + * @param {CWorkshop_GetContributors_Response.$Properties} message CWorkshop_GetContributors_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_GetContributors_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CWorkshop_GetContributors_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20758,32 +27095,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_GetContributors_Response} CWorkshop_GetContributors_Response + * @returns {CWorkshop_GetContributors_Response & CWorkshop_GetContributors_Response.$Shape} CWorkshop_GetContributors_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_GetContributors_Response.decode = function decode(reader, length) { + CWorkshop_GetContributors_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_GetContributors_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_GetContributors_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.contributors && message.contributors.length)) - message.contributors = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.contributors.push(reader.fixed64()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.contributors && message.contributors.length)) + message.contributors = []; + reader.fixed64s(message.contributors); + continue; + } + if (wireType !== 1) + break; + if (!(message.contributors && message.contributors.length)) + message.contributors = []; message.contributors.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20793,11 +27148,11 @@ * @memberof CWorkshop_GetContributors_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_GetContributors_Response} CWorkshop_GetContributors_Response + * @returns {CWorkshop_GetContributors_Response & CWorkshop_GetContributors_Response.$Shape} CWorkshop_GetContributors_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_GetContributors_Response.decodeDelimited = function decodeDelimited(reader) { + CWorkshop_GetContributors_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20811,11 +27166,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CWorkshop_GetContributors_Response.verify = function verify(message) { + CWorkshop_GetContributors_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.contributors != null && message.hasOwnProperty("contributors")) { - if (!Array.isArray(message.contributors)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.contributors != null && $Object.hasOwnProperty.call(message, "contributors")) { + if (!$Array.isArray(message.contributors)) return "contributors: array expected"; for (var i = 0; i < message.contributors.length; ++i) if (!$util.isInteger(message.contributors[i]) && !(message.contributors[i] && $util.isInteger(message.contributors[i].low) && $util.isInteger(message.contributors[i].high))) @@ -20832,23 +27191,29 @@ * @param {Object.} object Plain object * @returns {CWorkshop_GetContributors_Response} CWorkshop_GetContributors_Response */ - CWorkshop_GetContributors_Response.fromObject = function fromObject(object) { + CWorkshop_GetContributors_Response.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_GetContributors_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_GetContributors_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_GetContributors_Response(); if (object.contributors) { - if (!Array.isArray(object.contributors)) - throw TypeError(".CWorkshop_GetContributors_Response.contributors: array expected"); - message.contributors = []; + if (!$Array.isArray(object.contributors)) + throw $TypeError(".CWorkshop_GetContributors_Response.contributors: array expected"); + message.contributors = $Array(object.contributors.length); for (var i = 0; i < object.contributors.length; ++i) if ($util.Long) - (message.contributors[i] = $util.Long.fromValue(object.contributors[i])).unsigned = false; + message.contributors[i] = $util.Long.fromValue(object.contributors[i], true); else if (typeof object.contributors[i] === "string") - message.contributors[i] = parseInt(object.contributors[i], 10); + message.contributors[i] = $parseInt(object.contributors[i], 10); else if (typeof object.contributors[i] === "number") message.contributors[i] = object.contributors[i]; else if (typeof object.contributors[i] === "object") - message.contributors[i] = new $util.LongBits(object.contributors[i].low >>> 0, object.contributors[i].high >>> 0).toNumber(); + message.contributors[i] = new $util.LongBits(object.contributors[i].low >>> 0, object.contributors[i].high >>> 0).toNumber(true); } return message; }; @@ -20862,19 +27227,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CWorkshop_GetContributors_Response.toObject = function toObject(message, options) { + CWorkshop_GetContributors_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.contributors = []; if (message.contributors && message.contributors.length) { - object.contributors = []; + object.contributors = $Array(message.contributors.length); for (var j = 0; j < message.contributors.length; ++j) - if (typeof message.contributors[j] === "number") - object.contributors[j] = options.longs === String ? String(message.contributors[j]) : message.contributors[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.contributors[j] = typeof message.contributors[j] === "number" ? $BigInt(message.contributors[j]) : $util.Long.fromBits(message.contributors[j].low >>> 0, message.contributors[j].high >>> 0, true).toBigInt(); + else if (typeof message.contributors[j] === "number") + object.contributors[j] = options.longs === $String ? $String(message.contributors[j]) : message.contributors[j]; else - object.contributors[j] = options.longs === String ? $util.Long.prototype.toString.call(message.contributors[j]) : options.longs === Number ? new $util.LongBits(message.contributors[j].low >>> 0, message.contributors[j].high >>> 0).toNumber() : message.contributors[j]; + object.contributors[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.contributors[j]) : options.longs === $Number ? new $util.LongBits(message.contributors[j].low >>> 0, message.contributors[j].high >>> 0).toNumber(true) : message.contributors[j]; } return object; }; @@ -20886,8 +27257,22 @@ * @instance * @returns {Object.} JSON object */ - CWorkshop_GetContributors_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CWorkshop_GetContributors_Response.prototype.toJSON = function() { + return CWorkshop_GetContributors_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CWorkshop_GetContributors_Response + * @function getTypeUrl + * @memberof CWorkshop_GetContributors_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CWorkshop_GetContributors_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_GetContributors_Response"; }; return CWorkshop_GetContributors_Response; @@ -20897,30 +27282,43 @@ /** * Properties of a CWorkshop_SetItemPaymentRules_Request. - * @exports ICWorkshop_SetItemPaymentRules_Request - * @interface ICWorkshop_SetItemPaymentRules_Request + * @typedef {Object} CWorkshop_SetItemPaymentRules_Request.$Properties * @property {number|null} [appid] CWorkshop_SetItemPaymentRules_Request appid * @property {number|null} [gameitemid] CWorkshop_SetItemPaymentRules_Request gameitemid - * @property {Array.|null} [associated_workshop_files] CWorkshop_SetItemPaymentRules_Request associated_workshop_files - * @property {Array.|null} [partner_accounts] CWorkshop_SetItemPaymentRules_Request partner_accounts + * @property {Array.|null} [associated_workshop_files] CWorkshop_SetItemPaymentRules_Request associated_workshop_files + * @property {Array.|null} [partner_accounts] CWorkshop_SetItemPaymentRules_Request partner_accounts + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CWorkshop_SetItemPaymentRules_Request. + * @exports ICWorkshop_SetItemPaymentRules_Request + * @interface ICWorkshop_SetItemPaymentRules_Request + * @augments CWorkshop_SetItemPaymentRules_Request.$Properties + * @deprecated Use CWorkshop_SetItemPaymentRules_Request.$Properties instead. + */ + + /** + * Shape of a CWorkshop_SetItemPaymentRules_Request. + * @typedef {CWorkshop_SetItemPaymentRules_Request.$Properties} CWorkshop_SetItemPaymentRules_Request.$Shape */ /** * Constructs a new CWorkshop_SetItemPaymentRules_Request. * @exports CWorkshop_SetItemPaymentRules_Request * @classdesc Represents a CWorkshop_SetItemPaymentRules_Request. - * @implements ICWorkshop_SetItemPaymentRules_Request * @constructor - * @param {ICWorkshop_SetItemPaymentRules_Request=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CWorkshop_SetItemPaymentRules_Request(properties) { + var CWorkshop_SetItemPaymentRules_Request = function (properties) { this.associated_workshop_files = []; this.partner_accounts = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CWorkshop_SetItemPaymentRules_Request appid. @@ -20940,7 +27338,7 @@ /** * CWorkshop_SetItemPaymentRules_Request associated_workshop_files. - * @member {Array.} associated_workshop_files + * @member {Array.} associated_workshop_files * @memberof CWorkshop_SetItemPaymentRules_Request * @instance */ @@ -20948,7 +27346,7 @@ /** * CWorkshop_SetItemPaymentRules_Request partner_accounts. - * @member {Array.} partner_accounts + * @member {Array.} partner_accounts * @memberof CWorkshop_SetItemPaymentRules_Request * @instance */ @@ -20959,10 +27357,14 @@ * @function create * @memberof CWorkshop_SetItemPaymentRules_Request * @static - * @param {ICWorkshop_SetItemPaymentRules_Request=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.$Properties=} [properties] Properties to set * @returns {CWorkshop_SetItemPaymentRules_Request} CWorkshop_SetItemPaymentRules_Request instance + * @type {{ + * (properties: CWorkshop_SetItemPaymentRules_Request.$Shape): CWorkshop_SetItemPaymentRules_Request & CWorkshop_SetItemPaymentRules_Request.$Shape; + * (properties?: CWorkshop_SetItemPaymentRules_Request.$Properties): CWorkshop_SetItemPaymentRules_Request; + * }} */ - CWorkshop_SetItemPaymentRules_Request.create = function create(properties) { + CWorkshop_SetItemPaymentRules_Request.create = function(properties) { return new CWorkshop_SetItemPaymentRules_Request(properties); }; @@ -20971,23 +27373,30 @@ * @function encode * @memberof CWorkshop_SetItemPaymentRules_Request * @static - * @param {ICWorkshop_SetItemPaymentRules_Request} message CWorkshop_SetItemPaymentRules_Request message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.$Properties} message CWorkshop_SetItemPaymentRules_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_SetItemPaymentRules_Request.encode = function encode(message, writer) { + CWorkshop_SetItemPaymentRules_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.appid); - if (message.gameitemid != null && Object.hasOwnProperty.call(message, "gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.gameitemid); if (message.associated_workshop_files != null && message.associated_workshop_files.length) for (var i = 0; i < message.associated_workshop_files.length; ++i) - $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.encode(message.associated_workshop_files[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.encode(message.associated_workshop_files[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); if (message.partner_accounts != null && message.partner_accounts.length) for (var i = 0; i < message.partner_accounts.length; ++i) - $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.encode(message.partner_accounts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.encode(message.partner_accounts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20996,12 +27405,12 @@ * @function encodeDelimited * @memberof CWorkshop_SetItemPaymentRules_Request * @static - * @param {ICWorkshop_SetItemPaymentRules_Request} message CWorkshop_SetItemPaymentRules_Request message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.$Properties} message CWorkshop_SetItemPaymentRules_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_SetItemPaymentRules_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CWorkshop_SetItemPaymentRules_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21011,38 +27420,64 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_SetItemPaymentRules_Request} CWorkshop_SetItemPaymentRules_Request + * @returns {CWorkshop_SetItemPaymentRules_Request & CWorkshop_SetItemPaymentRules_Request.$Shape} CWorkshop_SetItemPaymentRules_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_SetItemPaymentRules_Request.decode = function decode(reader, length) { + CWorkshop_SetItemPaymentRules_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_SetItemPaymentRules_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_SetItemPaymentRules_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appid = reader.uint32(); - break; - case 2: - message.gameitemid = reader.uint32(); - break; - case 3: - if (!(message.associated_workshop_files && message.associated_workshop_files.length)) - message.associated_workshop_files = []; - message.associated_workshop_files.push($root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.partner_accounts && message.partner_accounts.length)) - message.partner_accounts = []; - message.partner_accounts.push($root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.gameitemid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.associated_workshop_files && message.associated_workshop_files.length)) + message.associated_workshop_files = []; + message.associated_workshop_files.push($root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.partner_accounts && message.partner_accounts.length)) + message.partner_accounts = []; + message.partner_accounts.push($root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21052,11 +27487,11 @@ * @memberof CWorkshop_SetItemPaymentRules_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_SetItemPaymentRules_Request} CWorkshop_SetItemPaymentRules_Request + * @returns {CWorkshop_SetItemPaymentRules_Request & CWorkshop_SetItemPaymentRules_Request.$Shape} CWorkshop_SetItemPaymentRules_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_SetItemPaymentRules_Request.decodeDelimited = function decodeDelimited(reader) { + CWorkshop_SetItemPaymentRules_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21070,29 +27505,33 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CWorkshop_SetItemPaymentRules_Request.verify = function verify(message) { + CWorkshop_SetItemPaymentRules_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) if (!$util.isInteger(message.gameitemid)) return "gameitemid: integer expected"; - if (message.associated_workshop_files != null && message.hasOwnProperty("associated_workshop_files")) { - if (!Array.isArray(message.associated_workshop_files)) + if (message.associated_workshop_files != null && $Object.hasOwnProperty.call(message, "associated_workshop_files")) { + if (!$Array.isArray(message.associated_workshop_files)) return "associated_workshop_files: array expected"; for (var i = 0; i < message.associated_workshop_files.length; ++i) { - var error = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.verify(message.associated_workshop_files[i]); + var error = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.verify(message.associated_workshop_files[i], _depth + 1); if (error) return "associated_workshop_files." + error; } } - if (message.partner_accounts != null && message.hasOwnProperty("partner_accounts")) { - if (!Array.isArray(message.partner_accounts)) + if (message.partner_accounts != null && $Object.hasOwnProperty.call(message, "partner_accounts")) { + if (!$Array.isArray(message.partner_accounts)) return "partner_accounts: array expected"; for (var i = 0; i < message.partner_accounts.length; ++i) { - var error = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.verify(message.partner_accounts[i]); + var error = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.verify(message.partner_accounts[i], _depth + 1); if (error) return "partner_accounts." + error; } @@ -21108,32 +27547,38 @@ * @param {Object.} object Plain object * @returns {CWorkshop_SetItemPaymentRules_Request} CWorkshop_SetItemPaymentRules_Request */ - CWorkshop_SetItemPaymentRules_Request.fromObject = function fromObject(object) { + CWorkshop_SetItemPaymentRules_Request.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_SetItemPaymentRules_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_SetItemPaymentRules_Request(); if (object.appid != null) message.appid = object.appid >>> 0; if (object.gameitemid != null) message.gameitemid = object.gameitemid >>> 0; if (object.associated_workshop_files) { - if (!Array.isArray(object.associated_workshop_files)) - throw TypeError(".CWorkshop_SetItemPaymentRules_Request.associated_workshop_files: array expected"); - message.associated_workshop_files = []; + if (!$Array.isArray(object.associated_workshop_files)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.associated_workshop_files: array expected"); + message.associated_workshop_files = $Array(object.associated_workshop_files.length); for (var i = 0; i < object.associated_workshop_files.length; ++i) { - if (typeof object.associated_workshop_files[i] !== "object") - throw TypeError(".CWorkshop_SetItemPaymentRules_Request.associated_workshop_files: object expected"); - message.associated_workshop_files[i] = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.fromObject(object.associated_workshop_files[i]); + if (!$util.isObject(object.associated_workshop_files[i])) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.associated_workshop_files: object expected"); + message.associated_workshop_files[i] = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.fromObject(object.associated_workshop_files[i], _depth + 1); } } if (object.partner_accounts) { - if (!Array.isArray(object.partner_accounts)) - throw TypeError(".CWorkshop_SetItemPaymentRules_Request.partner_accounts: array expected"); - message.partner_accounts = []; + if (!$Array.isArray(object.partner_accounts)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.partner_accounts: array expected"); + message.partner_accounts = $Array(object.partner_accounts.length); for (var i = 0; i < object.partner_accounts.length; ++i) { - if (typeof object.partner_accounts[i] !== "object") - throw TypeError(".CWorkshop_SetItemPaymentRules_Request.partner_accounts: object expected"); - message.partner_accounts[i] = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.fromObject(object.partner_accounts[i]); + if (!$util.isObject(object.partner_accounts[i])) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.partner_accounts: object expected"); + message.partner_accounts[i] = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.fromObject(object.partner_accounts[i], _depth + 1); } } return message; @@ -21148,9 +27593,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CWorkshop_SetItemPaymentRules_Request.toObject = function toObject(message, options) { + CWorkshop_SetItemPaymentRules_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.associated_workshop_files = []; @@ -21160,19 +27609,19 @@ object.appid = 0; object.gameitemid = 0; } - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) object.gameitemid = message.gameitemid; if (message.associated_workshop_files && message.associated_workshop_files.length) { - object.associated_workshop_files = []; + object.associated_workshop_files = $Array(message.associated_workshop_files.length); for (var j = 0; j < message.associated_workshop_files.length; ++j) - object.associated_workshop_files[j] = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.toObject(message.associated_workshop_files[j], options); + object.associated_workshop_files[j] = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.toObject(message.associated_workshop_files[j], options, _depth + 1); } if (message.partner_accounts && message.partner_accounts.length) { - object.partner_accounts = []; + object.partner_accounts = $Array(message.partner_accounts.length); for (var j = 0; j < message.partner_accounts.length; ++j) - object.partner_accounts[j] = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.toObject(message.partner_accounts[j], options); + object.partner_accounts[j] = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.toObject(message.partner_accounts[j], options, _depth + 1); } return object; }; @@ -21184,35 +27633,62 @@ * @instance * @returns {Object.} JSON object */ - CWorkshop_SetItemPaymentRules_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CWorkshop_SetItemPaymentRules_Request.prototype.toJSON = function() { + return CWorkshop_SetItemPaymentRules_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CWorkshop_SetItemPaymentRules_Request + * @function getTypeUrl + * @memberof CWorkshop_SetItemPaymentRules_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CWorkshop_SetItemPaymentRules_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_SetItemPaymentRules_Request"; }; CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule = (function() { /** * Properties of a WorkshopItemPaymentRule. - * @memberof CWorkshop_SetItemPaymentRules_Request - * @interface IWorkshopItemPaymentRule + * @typedef {Object} CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties * @property {number|Long|null} [workshop_file_id] WorkshopItemPaymentRule workshop_file_id * @property {number|null} [revenue_percentage] WorkshopItemPaymentRule revenue_percentage * @property {string|null} [rule_description] WorkshopItemPaymentRule rule_description + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a WorkshopItemPaymentRule. + * @memberof CWorkshop_SetItemPaymentRules_Request + * @interface IWorkshopItemPaymentRule + * @augments CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties + * @deprecated Use CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties instead. + */ + + /** + * Shape of a WorkshopItemPaymentRule. + * @typedef {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties} CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Shape */ /** * Constructs a new WorkshopItemPaymentRule. * @memberof CWorkshop_SetItemPaymentRules_Request * @classdesc Represents a WorkshopItemPaymentRule. - * @implements IWorkshopItemPaymentRule * @constructor - * @param {CWorkshop_SetItemPaymentRules_Request.IWorkshopItemPaymentRule=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function WorkshopItemPaymentRule(properties) { + var WorkshopItemPaymentRule = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * WorkshopItemPaymentRule workshop_file_id. @@ -21243,10 +27719,14 @@ * @function create * @memberof CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IWorkshopItemPaymentRule=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties=} [properties] Properties to set * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule} WorkshopItemPaymentRule instance + * @type {{ + * (properties: CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Shape): CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Shape; + * (properties?: CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties): CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule; + * }} */ - WorkshopItemPaymentRule.create = function create(properties) { + WorkshopItemPaymentRule.create = function(properties) { return new WorkshopItemPaymentRule(properties); }; @@ -21255,19 +27735,26 @@ * @function encode * @memberof CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IWorkshopItemPaymentRule} message WorkshopItemPaymentRule message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties} message WorkshopItemPaymentRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkshopItemPaymentRule.encode = function encode(message, writer) { + WorkshopItemPaymentRule.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.workshop_file_id != null && Object.hasOwnProperty.call(message, "workshop_file_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.workshop_file_id != null && $Object.hasOwnProperty.call(message, "workshop_file_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.workshop_file_id); - if (message.revenue_percentage != null && Object.hasOwnProperty.call(message, "revenue_percentage")) + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.revenue_percentage); - if (message.rule_description != null && Object.hasOwnProperty.call(message, "rule_description")) + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.rule_description); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21276,12 +27763,12 @@ * @function encodeDelimited * @memberof CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IWorkshopItemPaymentRule} message WorkshopItemPaymentRule message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties} message WorkshopItemPaymentRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkshopItemPaymentRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + WorkshopItemPaymentRule.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21291,31 +27778,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule} WorkshopItemPaymentRule + * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Shape} WorkshopItemPaymentRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkshopItemPaymentRule.decode = function decode(reader, length) { + WorkshopItemPaymentRule.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.workshop_file_id = reader.uint64(); - break; - case 2: - message.revenue_percentage = reader.float(); - break; - case 3: - message.rule_description = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.workshop_file_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.revenue_percentage = reader.float(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.rule_description = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21325,11 +27835,11 @@ * @memberof CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule} WorkshopItemPaymentRule + * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Shape} WorkshopItemPaymentRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkshopItemPaymentRule.decodeDelimited = function decodeDelimited(reader) { + WorkshopItemPaymentRule.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21343,16 +27853,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WorkshopItemPaymentRule.verify = function verify(message) { + WorkshopItemPaymentRule.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.workshop_file_id != null && message.hasOwnProperty("workshop_file_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.workshop_file_id != null && $Object.hasOwnProperty.call(message, "workshop_file_id")) if (!$util.isInteger(message.workshop_file_id) && !(message.workshop_file_id && $util.isInteger(message.workshop_file_id.low) && $util.isInteger(message.workshop_file_id.high))) return "workshop_file_id: integer|Long expected"; - if (message.revenue_percentage != null && message.hasOwnProperty("revenue_percentage")) + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) if (typeof message.revenue_percentage !== "number") return "revenue_percentage: number expected"; - if (message.rule_description != null && message.hasOwnProperty("rule_description")) + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) if (!$util.isString(message.rule_description)) return "rule_description: string expected"; return null; @@ -21366,23 +27880,29 @@ * @param {Object.} object Plain object * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule} WorkshopItemPaymentRule */ - WorkshopItemPaymentRule.fromObject = function fromObject(object) { + WorkshopItemPaymentRule.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule(); if (object.workshop_file_id != null) if ($util.Long) - (message.workshop_file_id = $util.Long.fromValue(object.workshop_file_id)).unsigned = true; + message.workshop_file_id = $util.Long.fromValue(object.workshop_file_id, true); else if (typeof object.workshop_file_id === "string") - message.workshop_file_id = parseInt(object.workshop_file_id, 10); + message.workshop_file_id = $parseInt(object.workshop_file_id, 10); else if (typeof object.workshop_file_id === "number") message.workshop_file_id = object.workshop_file_id; else if (typeof object.workshop_file_id === "object") message.workshop_file_id = new $util.LongBits(object.workshop_file_id.low >>> 0, object.workshop_file_id.high >>> 0).toNumber(true); if (object.revenue_percentage != null) - message.revenue_percentage = Number(object.revenue_percentage); + message.revenue_percentage = $Number(object.revenue_percentage); if (object.rule_description != null) - message.rule_description = String(object.rule_description); + message.rule_description = $String(object.rule_description); return message; }; @@ -21395,27 +27915,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WorkshopItemPaymentRule.toObject = function toObject(message, options) { + WorkshopItemPaymentRule.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.workshop_file_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.workshop_file_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.workshop_file_id = options.longs === String ? "0" : 0; + object.workshop_file_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.revenue_percentage = 0; object.rule_description = ""; } - if (message.workshop_file_id != null && message.hasOwnProperty("workshop_file_id")) - if (typeof message.workshop_file_id === "number") - object.workshop_file_id = options.longs === String ? String(message.workshop_file_id) : message.workshop_file_id; + if (message.workshop_file_id != null && $Object.hasOwnProperty.call(message, "workshop_file_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.workshop_file_id = typeof message.workshop_file_id === "number" ? $BigInt(message.workshop_file_id) : $util.Long.fromBits(message.workshop_file_id.low >>> 0, message.workshop_file_id.high >>> 0, true).toBigInt(); + else if (typeof message.workshop_file_id === "number") + object.workshop_file_id = options.longs === $String ? $String(message.workshop_file_id) : message.workshop_file_id; else - object.workshop_file_id = options.longs === String ? $util.Long.prototype.toString.call(message.workshop_file_id) : options.longs === Number ? new $util.LongBits(message.workshop_file_id.low >>> 0, message.workshop_file_id.high >>> 0).toNumber(true) : message.workshop_file_id; - if (message.revenue_percentage != null && message.hasOwnProperty("revenue_percentage")) - object.revenue_percentage = options.json && !isFinite(message.revenue_percentage) ? String(message.revenue_percentage) : message.revenue_percentage; - if (message.rule_description != null && message.hasOwnProperty("rule_description")) + object.workshop_file_id = options.longs === $String ? $util.Long.prototype.toString.call(message.workshop_file_id) : options.longs === $Number ? new $util.LongBits(message.workshop_file_id.low >>> 0, message.workshop_file_id.high >>> 0).toNumber(true) : message.workshop_file_id; + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) + object.revenue_percentage = options.json && !$isFinite(message.revenue_percentage) ? $String(message.revenue_percentage) : message.revenue_percentage; + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) object.rule_description = message.rule_description; return object; }; @@ -21427,8 +27953,22 @@ * @instance * @returns {Object.} JSON object */ - WorkshopItemPaymentRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + WorkshopItemPaymentRule.prototype.toJSON = function() { + return WorkshopItemPaymentRule.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for WorkshopItemPaymentRule + * @function getTypeUrl + * @memberof CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + WorkshopItemPaymentRule.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule"; }; return WorkshopItemPaymentRule; @@ -21438,27 +27978,40 @@ /** * Properties of a PartnerItemPaymentRule. - * @memberof CWorkshop_SetItemPaymentRules_Request - * @interface IPartnerItemPaymentRule + * @typedef {Object} CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties * @property {number|null} [account_id] PartnerItemPaymentRule account_id * @property {number|null} [revenue_percentage] PartnerItemPaymentRule revenue_percentage * @property {string|null} [rule_description] PartnerItemPaymentRule rule_description + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PartnerItemPaymentRule. + * @memberof CWorkshop_SetItemPaymentRules_Request + * @interface IPartnerItemPaymentRule + * @augments CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties + * @deprecated Use CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties instead. + */ + + /** + * Shape of a PartnerItemPaymentRule. + * @typedef {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties} CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Shape */ /** * Constructs a new PartnerItemPaymentRule. * @memberof CWorkshop_SetItemPaymentRules_Request * @classdesc Represents a PartnerItemPaymentRule. - * @implements IPartnerItemPaymentRule * @constructor - * @param {CWorkshop_SetItemPaymentRules_Request.IPartnerItemPaymentRule=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PartnerItemPaymentRule(properties) { + var PartnerItemPaymentRule = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PartnerItemPaymentRule account_id. @@ -21489,10 +28042,14 @@ * @function create * @memberof CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IPartnerItemPaymentRule=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties=} [properties] Properties to set * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule} PartnerItemPaymentRule instance + * @type {{ + * (properties: CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Shape): CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Shape; + * (properties?: CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties): CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule; + * }} */ - PartnerItemPaymentRule.create = function create(properties) { + PartnerItemPaymentRule.create = function(properties) { return new PartnerItemPaymentRule(properties); }; @@ -21501,19 +28058,26 @@ * @function encode * @memberof CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IPartnerItemPaymentRule} message PartnerItemPaymentRule message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties} message PartnerItemPaymentRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartnerItemPaymentRule.encode = function encode(message, writer) { + PartnerItemPaymentRule.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.revenue_percentage != null && Object.hasOwnProperty.call(message, "revenue_percentage")) + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.revenue_percentage); - if (message.rule_description != null && Object.hasOwnProperty.call(message, "rule_description")) + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.rule_description); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21522,12 +28086,12 @@ * @function encodeDelimited * @memberof CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IPartnerItemPaymentRule} message PartnerItemPaymentRule message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties} message PartnerItemPaymentRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartnerItemPaymentRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PartnerItemPaymentRule.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21537,31 +28101,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule} PartnerItemPaymentRule + * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Shape} PartnerItemPaymentRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartnerItemPaymentRule.decode = function decode(reader, length) { + PartnerItemPaymentRule.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.revenue_percentage = reader.float(); - break; - case 3: - message.rule_description = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.revenue_percentage = reader.float(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.rule_description = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21571,11 +28158,11 @@ * @memberof CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule} PartnerItemPaymentRule + * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Shape} PartnerItemPaymentRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartnerItemPaymentRule.decodeDelimited = function decodeDelimited(reader) { + PartnerItemPaymentRule.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21589,16 +28176,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PartnerItemPaymentRule.verify = function verify(message) { + PartnerItemPaymentRule.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.revenue_percentage != null && message.hasOwnProperty("revenue_percentage")) + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) if (typeof message.revenue_percentage !== "number") return "revenue_percentage: number expected"; - if (message.rule_description != null && message.hasOwnProperty("rule_description")) + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) if (!$util.isString(message.rule_description)) return "rule_description: string expected"; return null; @@ -21612,16 +28203,22 @@ * @param {Object.} object Plain object * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule} PartnerItemPaymentRule */ - PartnerItemPaymentRule.fromObject = function fromObject(object) { + PartnerItemPaymentRule.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule(); if (object.account_id != null) message.account_id = object.account_id >>> 0; if (object.revenue_percentage != null) - message.revenue_percentage = Number(object.revenue_percentage); + message.revenue_percentage = $Number(object.revenue_percentage); if (object.rule_description != null) - message.rule_description = String(object.rule_description); + message.rule_description = $String(object.rule_description); return message; }; @@ -21634,20 +28231,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartnerItemPaymentRule.toObject = function toObject(message, options) { + PartnerItemPaymentRule.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; object.revenue_percentage = 0; object.rule_description = ""; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.revenue_percentage != null && message.hasOwnProperty("revenue_percentage")) - object.revenue_percentage = options.json && !isFinite(message.revenue_percentage) ? String(message.revenue_percentage) : message.revenue_percentage; - if (message.rule_description != null && message.hasOwnProperty("rule_description")) + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) + object.revenue_percentage = options.json && !$isFinite(message.revenue_percentage) ? $String(message.revenue_percentage) : message.revenue_percentage; + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) object.rule_description = message.rule_description; return object; }; @@ -21659,8 +28260,22 @@ * @instance * @returns {Object.} JSON object */ - PartnerItemPaymentRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PartnerItemPaymentRule.prototype.toJSON = function() { + return PartnerItemPaymentRule.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PartnerItemPaymentRule + * @function getTypeUrl + * @memberof CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PartnerItemPaymentRule.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule"; }; return PartnerItemPaymentRule; @@ -21671,36 +28286,53 @@ $root.CWorkshop_SetItemPaymentRules_Response = (function() { + /** + * Properties of a CWorkshop_SetItemPaymentRules_Response. + * @typedef {Object} CWorkshop_SetItemPaymentRules_Response.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CWorkshop_SetItemPaymentRules_Response. * @exports ICWorkshop_SetItemPaymentRules_Response * @interface ICWorkshop_SetItemPaymentRules_Response + * @augments CWorkshop_SetItemPaymentRules_Response.$Properties + * @deprecated Use CWorkshop_SetItemPaymentRules_Response.$Properties instead. + */ + + /** + * Shape of a CWorkshop_SetItemPaymentRules_Response. + * @typedef {CWorkshop_SetItemPaymentRules_Response.$Properties} CWorkshop_SetItemPaymentRules_Response.$Shape */ /** * Constructs a new CWorkshop_SetItemPaymentRules_Response. * @exports CWorkshop_SetItemPaymentRules_Response * @classdesc Represents a CWorkshop_SetItemPaymentRules_Response. - * @implements ICWorkshop_SetItemPaymentRules_Response * @constructor - * @param {ICWorkshop_SetItemPaymentRules_Response=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CWorkshop_SetItemPaymentRules_Response(properties) { + var CWorkshop_SetItemPaymentRules_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CWorkshop_SetItemPaymentRules_Response instance using the specified properties. * @function create * @memberof CWorkshop_SetItemPaymentRules_Response * @static - * @param {ICWorkshop_SetItemPaymentRules_Response=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Response.$Properties=} [properties] Properties to set * @returns {CWorkshop_SetItemPaymentRules_Response} CWorkshop_SetItemPaymentRules_Response instance + * @type {{ + * (properties: CWorkshop_SetItemPaymentRules_Response.$Shape): CWorkshop_SetItemPaymentRules_Response & CWorkshop_SetItemPaymentRules_Response.$Shape; + * (properties?: CWorkshop_SetItemPaymentRules_Response.$Properties): CWorkshop_SetItemPaymentRules_Response; + * }} */ - CWorkshop_SetItemPaymentRules_Response.create = function create(properties) { + CWorkshop_SetItemPaymentRules_Response.create = function(properties) { return new CWorkshop_SetItemPaymentRules_Response(properties); }; @@ -21709,13 +28341,20 @@ * @function encode * @memberof CWorkshop_SetItemPaymentRules_Response * @static - * @param {ICWorkshop_SetItemPaymentRules_Response} message CWorkshop_SetItemPaymentRules_Response message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Response.$Properties} message CWorkshop_SetItemPaymentRules_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_SetItemPaymentRules_Response.encode = function encode(message, writer) { + CWorkshop_SetItemPaymentRules_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21724,12 +28363,12 @@ * @function encodeDelimited * @memberof CWorkshop_SetItemPaymentRules_Response * @static - * @param {ICWorkshop_SetItemPaymentRules_Response} message CWorkshop_SetItemPaymentRules_Response message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Response.$Properties} message CWorkshop_SetItemPaymentRules_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_SetItemPaymentRules_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CWorkshop_SetItemPaymentRules_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21739,22 +28378,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_SetItemPaymentRules_Response} CWorkshop_SetItemPaymentRules_Response + * @returns {CWorkshop_SetItemPaymentRules_Response & CWorkshop_SetItemPaymentRules_Response.$Shape} CWorkshop_SetItemPaymentRules_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_SetItemPaymentRules_Response.decode = function decode(reader, length) { + CWorkshop_SetItemPaymentRules_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_SetItemPaymentRules_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_SetItemPaymentRules_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21764,11 +28414,11 @@ * @memberof CWorkshop_SetItemPaymentRules_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_SetItemPaymentRules_Response} CWorkshop_SetItemPaymentRules_Response + * @returns {CWorkshop_SetItemPaymentRules_Response & CWorkshop_SetItemPaymentRules_Response.$Shape} CWorkshop_SetItemPaymentRules_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_SetItemPaymentRules_Response.decodeDelimited = function decodeDelimited(reader) { + CWorkshop_SetItemPaymentRules_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21782,9 +28432,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CWorkshop_SetItemPaymentRules_Response.verify = function verify(message) { + CWorkshop_SetItemPaymentRules_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -21796,9 +28450,15 @@ * @param {Object.} object Plain object * @returns {CWorkshop_SetItemPaymentRules_Response} CWorkshop_SetItemPaymentRules_Response */ - CWorkshop_SetItemPaymentRules_Response.fromObject = function fromObject(object) { + CWorkshop_SetItemPaymentRules_Response.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_SetItemPaymentRules_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CWorkshop_SetItemPaymentRules_Response(); }; @@ -21811,7 +28471,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CWorkshop_SetItemPaymentRules_Response.toObject = function toObject() { + CWorkshop_SetItemPaymentRules_Response.toObject = function () { return {}; }; @@ -21822,8 +28482,22 @@ * @instance * @returns {Object.} JSON object */ - CWorkshop_SetItemPaymentRules_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CWorkshop_SetItemPaymentRules_Response.prototype.toJSON = function() { + return CWorkshop_SetItemPaymentRules_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CWorkshop_SetItemPaymentRules_Response + * @function getTypeUrl + * @memberof CWorkshop_SetItemPaymentRules_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CWorkshop_SetItemPaymentRules_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_SetItemPaymentRules_Response"; }; return CWorkshop_SetItemPaymentRules_Response; @@ -21831,7 +28505,7 @@ /** * GCProtoBufMsgSrc enum. - * @exports GCProtoBufMsgSrc + * @name GCProtoBufMsgSrc * @enum {number} * @property {number} GCProtoBufMsgSrc_Unspecified=0 GCProtoBufMsgSrc_Unspecified value * @property {number} GCProtoBufMsgSrc_FromSystem=1 GCProtoBufMsgSrc_FromSystem value @@ -21840,7 +28514,7 @@ * @property {number} GCProtoBufMsgSrc_ReplySystem=4 GCProtoBufMsgSrc_ReplySystem value */ $root.GCProtoBufMsgSrc = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "GCProtoBufMsgSrc_Unspecified"] = 0; values[valuesById[1] = "GCProtoBufMsgSrc_FromSystem"] = 1; values[valuesById[2] = "GCProtoBufMsgSrc_FromSteamID"] = 2; @@ -21853,8 +28527,7 @@ /** * Properties of a CMsgProtoBufHeader. - * @exports ICMsgProtoBufHeader - * @interface ICMsgProtoBufHeader + * @typedef {Object} CMsgProtoBufHeader.$Properties * @property {number|Long|null} [client_steam_id] CMsgProtoBufHeader client_steam_id * @property {number|null} [client_session_id] CMsgProtoBufHeader client_session_id * @property {number|null} [source_app_id] CMsgProtoBufHeader source_app_id @@ -21865,22 +28538,36 @@ * @property {string|null} [error_message] CMsgProtoBufHeader error_message * @property {GCProtoBufMsgSrc|null} [gc_msg_src] CMsgProtoBufHeader gc_msg_src * @property {number|null} [gc_dir_index_source] CMsgProtoBufHeader gc_dir_index_source + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgProtoBufHeader. + * @exports ICMsgProtoBufHeader + * @interface ICMsgProtoBufHeader + * @augments CMsgProtoBufHeader.$Properties + * @deprecated Use CMsgProtoBufHeader.$Properties instead. + */ + + /** + * Shape of a CMsgProtoBufHeader. + * @typedef {CMsgProtoBufHeader.$Properties} CMsgProtoBufHeader.$Shape */ /** * Constructs a new CMsgProtoBufHeader. * @exports CMsgProtoBufHeader * @classdesc Represents a CMsgProtoBufHeader. - * @implements ICMsgProtoBufHeader * @constructor - * @param {ICMsgProtoBufHeader=} [properties] Properties to set + * @param {CMsgProtoBufHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgProtoBufHeader(properties) { + var CMsgProtoBufHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgProtoBufHeader client_steam_id. @@ -21888,7 +28575,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgProtoBufHeader.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgProtoBufHeader client_session_id. @@ -21912,7 +28599,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.job_id_source = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000; + CMsgProtoBufHeader.prototype.job_id_source = $util.Long ? $util.Long.fromBits(-1,-1,true) : 18446744073709552000; /** * CMsgProtoBufHeader job_id_target. @@ -21920,7 +28607,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.job_id_target = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000; + CMsgProtoBufHeader.prototype.job_id_target = $util.Long ? $util.Long.fromBits(-1,-1,true) : 18446744073709552000; /** * CMsgProtoBufHeader target_job_name. @@ -21967,10 +28654,14 @@ * @function create * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader=} [properties] Properties to set + * @param {CMsgProtoBufHeader.$Properties=} [properties] Properties to set * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader instance + * @type {{ + * (properties: CMsgProtoBufHeader.$Shape): CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape; + * (properties?: CMsgProtoBufHeader.$Properties): CMsgProtoBufHeader; + * }} */ - CMsgProtoBufHeader.create = function create(properties) { + CMsgProtoBufHeader.create = function(properties) { return new CMsgProtoBufHeader(properties); }; @@ -21979,33 +28670,40 @@ * @function encode * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader} message CMsgProtoBufHeader message or plain object to encode + * @param {CMsgProtoBufHeader.$Properties} message CMsgProtoBufHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoBufHeader.encode = function encode(message, writer) { + CMsgProtoBufHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.client_steam_id != null && Object.hasOwnProperty.call(message, "client_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.client_steam_id); - if (message.client_session_id != null && Object.hasOwnProperty.call(message, "client_session_id")) + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.client_session_id); - if (message.source_app_id != null && Object.hasOwnProperty.call(message, "source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.source_app_id); - if (message.job_id_source != null && Object.hasOwnProperty.call(message, "job_id_source")) + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) writer.uint32(/* id 10, wireType 1 =*/81).fixed64(message.job_id_source); - if (message.job_id_target != null && Object.hasOwnProperty.call(message, "job_id_target")) + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) writer.uint32(/* id 11, wireType 1 =*/89).fixed64(message.job_id_target); - if (message.target_job_name != null && Object.hasOwnProperty.call(message, "target_job_name")) + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.target_job_name); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.eresult); - if (message.error_message != null && Object.hasOwnProperty.call(message, "error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) writer.uint32(/* id 14, wireType 2 =*/114).string(message.error_message); - if (message.gc_msg_src != null && Object.hasOwnProperty.call(message, "gc_msg_src")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) writer.uint32(/* id 200, wireType 0 =*/1600).int32(message.gc_msg_src); - if (message.gc_dir_index_source != null && Object.hasOwnProperty.call(message, "gc_dir_index_source")) + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) writer.uint32(/* id 201, wireType 0 =*/1608).uint32(message.gc_dir_index_source); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22014,12 +28712,12 @@ * @function encodeDelimited * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader} message CMsgProtoBufHeader message or plain object to encode + * @param {CMsgProtoBufHeader.$Properties} message CMsgProtoBufHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoBufHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgProtoBufHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22029,52 +28727,102 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader + * @returns {CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape} CMsgProtoBufHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoBufHeader.decode = function decode(reader, length) { + CMsgProtoBufHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgProtoBufHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgProtoBufHeader(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_steam_id = reader.fixed64(); - break; - case 2: - message.client_session_id = reader.int32(); - break; - case 3: - message.source_app_id = reader.uint32(); - break; - case 10: - message.job_id_source = reader.fixed64(); - break; - case 11: - message.job_id_target = reader.fixed64(); - break; - case 12: - message.target_job_name = reader.string(); - break; - case 13: - message.eresult = reader.int32(); - break; - case 14: - message.error_message = reader.string(); - break; - case 200: - message.gc_msg_src = reader.int32(); - break; - case 201: - message.gc_dir_index_source = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.client_steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.client_session_id = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.source_app_id = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 1) + break; + message.job_id_source = reader.fixed64(); + continue; + } + case 11: { + if (wireType !== 1) + break; + message.job_id_target = reader.fixed64(); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.target_job_name = reader.string(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 14: { + if (wireType !== 2) + break; + message.error_message = reader.string(); + continue; + } + case 200: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.GCProtoBufMsgSrc[value] !== $undefined) + message.gc_msg_src = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 201: { + if (wireType !== 0) + break; + message.gc_dir_index_source = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22084,11 +28832,11 @@ * @memberof CMsgProtoBufHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader + * @returns {CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape} CMsgProtoBufHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoBufHeader.decodeDelimited = function decodeDelimited(reader) { + CMsgProtoBufHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22102,34 +28850,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgProtoBufHeader.verify = function verify(message) { + CMsgProtoBufHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) if (!$util.isInteger(message.client_steam_id) && !(message.client_steam_id && $util.isInteger(message.client_steam_id.low) && $util.isInteger(message.client_steam_id.high))) return "client_steam_id: integer|Long expected"; - if (message.client_session_id != null && message.hasOwnProperty("client_session_id")) + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) if (!$util.isInteger(message.client_session_id)) return "client_session_id: integer expected"; - if (message.source_app_id != null && message.hasOwnProperty("source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) if (!$util.isInteger(message.source_app_id)) return "source_app_id: integer expected"; - if (message.job_id_source != null && message.hasOwnProperty("job_id_source")) + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) if (!$util.isInteger(message.job_id_source) && !(message.job_id_source && $util.isInteger(message.job_id_source.low) && $util.isInteger(message.job_id_source.high))) return "job_id_source: integer|Long expected"; - if (message.job_id_target != null && message.hasOwnProperty("job_id_target")) + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) if (!$util.isInteger(message.job_id_target) && !(message.job_id_target && $util.isInteger(message.job_id_target.low) && $util.isInteger(message.job_id_target.high))) return "job_id_target: integer|Long expected"; - if (message.target_job_name != null && message.hasOwnProperty("target_job_name")) + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) if (!$util.isString(message.target_job_name)) return "target_job_name: string expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) if (!$util.isString(message.error_message)) return "error_message: string expected"; - if (message.gc_msg_src != null && message.hasOwnProperty("gc_msg_src")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) switch (message.gc_msg_src) { default: return "gc_msg_src: enum value expected"; @@ -22140,7 +28892,7 @@ case 4: break; } - if (message.gc_dir_index_source != null && message.hasOwnProperty("gc_dir_index_source")) + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) if (!$util.isInteger(message.gc_dir_index_source)) return "gc_dir_index_source: integer expected"; return null; @@ -22154,47 +28906,53 @@ * @param {Object.} object Plain object * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader */ - CMsgProtoBufHeader.fromObject = function fromObject(object) { + CMsgProtoBufHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgProtoBufHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgProtoBufHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgProtoBufHeader(); if (object.client_steam_id != null) if ($util.Long) - (message.client_steam_id = $util.Long.fromValue(object.client_steam_id)).unsigned = false; + message.client_steam_id = $util.Long.fromValue(object.client_steam_id, true); else if (typeof object.client_steam_id === "string") - message.client_steam_id = parseInt(object.client_steam_id, 10); + message.client_steam_id = $parseInt(object.client_steam_id, 10); else if (typeof object.client_steam_id === "number") message.client_steam_id = object.client_steam_id; else if (typeof object.client_steam_id === "object") - message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(); + message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(true); if (object.client_session_id != null) message.client_session_id = object.client_session_id | 0; if (object.source_app_id != null) message.source_app_id = object.source_app_id >>> 0; if (object.job_id_source != null) if ($util.Long) - (message.job_id_source = $util.Long.fromValue(object.job_id_source)).unsigned = false; + message.job_id_source = $util.Long.fromValue(object.job_id_source, true); else if (typeof object.job_id_source === "string") - message.job_id_source = parseInt(object.job_id_source, 10); + message.job_id_source = $parseInt(object.job_id_source, 10); else if (typeof object.job_id_source === "number") message.job_id_source = object.job_id_source; else if (typeof object.job_id_source === "object") - message.job_id_source = new $util.LongBits(object.job_id_source.low >>> 0, object.job_id_source.high >>> 0).toNumber(); + message.job_id_source = new $util.LongBits(object.job_id_source.low >>> 0, object.job_id_source.high >>> 0).toNumber(true); if (object.job_id_target != null) if ($util.Long) - (message.job_id_target = $util.Long.fromValue(object.job_id_target)).unsigned = false; + message.job_id_target = $util.Long.fromValue(object.job_id_target, true); else if (typeof object.job_id_target === "string") - message.job_id_target = parseInt(object.job_id_target, 10); + message.job_id_target = $parseInt(object.job_id_target, 10); else if (typeof object.job_id_target === "number") message.job_id_target = object.job_id_target; else if (typeof object.job_id_target === "object") - message.job_id_target = new $util.LongBits(object.job_id_target.low >>> 0, object.job_id_target.high >>> 0).toNumber(); + message.job_id_target = new $util.LongBits(object.job_id_target.low >>> 0, object.job_id_target.high >>> 0).toNumber(true); if (object.target_job_name != null) - message.target_job_name = String(object.target_job_name); + message.target_job_name = $String(object.target_job_name); if (object.eresult != null) message.eresult = object.eresult | 0; if (object.error_message != null) - message.error_message = String(object.error_message); + message.error_message = $String(object.error_message); switch (object.gc_msg_src) { case "GCProtoBufMsgSrc_Unspecified": case 0: @@ -22216,6 +28974,7 @@ case 4: message.gc_msg_src = 4; break; + default: } if (object.gc_dir_index_source != null) message.gc_dir_index_source = object.gc_dir_index_source >>> 0; @@ -22231,62 +28990,72 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgProtoBufHeader.toObject = function toObject(message, options) { + CMsgProtoBufHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.client_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.client_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.client_steam_id = options.longs === String ? "0" : 0; + object.client_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.client_session_id = 0; object.source_app_id = 0; if ($util.Long) { - var long = new $util.Long(-1, 2147483647, false); - object.job_id_source = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(-1, -1, true); + object.job_id_source = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.job_id_source = options.longs === String ? "9223372036854775807" : 9223372036854776000; + object.job_id_source = options.longs === $String ? "18446744073709551615" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("18446744073709551615") : 18446744073709552000; if ($util.Long) { - var long = new $util.Long(-1, 2147483647, false); - object.job_id_target = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(-1, -1, true); + object.job_id_target = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.job_id_target = options.longs === String ? "9223372036854775807" : 9223372036854776000; + object.job_id_target = options.longs === $String ? "18446744073709551615" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("18446744073709551615") : 18446744073709552000; object.target_job_name = ""; object.eresult = 2; object.error_message = ""; - object.gc_msg_src = options.enums === String ? "GCProtoBufMsgSrc_Unspecified" : 0; + object.gc_msg_src = options.enums === $String ? "GCProtoBufMsgSrc_Unspecified" : 0; object.gc_dir_index_source = 0; } - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) - if (typeof message.client_steam_id === "number") - object.client_steam_id = options.longs === String ? String(message.client_steam_id) : message.client_steam_id; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.client_steam_id = typeof message.client_steam_id === "number" ? $BigInt(message.client_steam_id) : $util.Long.fromBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.client_steam_id === "number") + object.client_steam_id = options.longs === $String ? $String(message.client_steam_id) : message.client_steam_id; else - object.client_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber() : message.client_steam_id; - if (message.client_session_id != null && message.hasOwnProperty("client_session_id")) + object.client_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === $Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber(true) : message.client_steam_id; + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) object.client_session_id = message.client_session_id; - if (message.source_app_id != null && message.hasOwnProperty("source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) object.source_app_id = message.source_app_id; - if (message.job_id_source != null && message.hasOwnProperty("job_id_source")) - if (typeof message.job_id_source === "number") - object.job_id_source = options.longs === String ? String(message.job_id_source) : message.job_id_source; + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.job_id_source = typeof message.job_id_source === "number" ? $BigInt(message.job_id_source) : $util.Long.fromBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0, true).toBigInt(); + else if (typeof message.job_id_source === "number") + object.job_id_source = options.longs === $String ? $String(message.job_id_source) : message.job_id_source; else - object.job_id_source = options.longs === String ? $util.Long.prototype.toString.call(message.job_id_source) : options.longs === Number ? new $util.LongBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0).toNumber() : message.job_id_source; - if (message.job_id_target != null && message.hasOwnProperty("job_id_target")) - if (typeof message.job_id_target === "number") - object.job_id_target = options.longs === String ? String(message.job_id_target) : message.job_id_target; + object.job_id_source = options.longs === $String ? $util.Long.prototype.toString.call(message.job_id_source) : options.longs === $Number ? new $util.LongBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0).toNumber(true) : message.job_id_source; + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.job_id_target = typeof message.job_id_target === "number" ? $BigInt(message.job_id_target) : $util.Long.fromBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0, true).toBigInt(); + else if (typeof message.job_id_target === "number") + object.job_id_target = options.longs === $String ? $String(message.job_id_target) : message.job_id_target; else - object.job_id_target = options.longs === String ? $util.Long.prototype.toString.call(message.job_id_target) : options.longs === Number ? new $util.LongBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0).toNumber() : message.job_id_target; - if (message.target_job_name != null && message.hasOwnProperty("target_job_name")) + object.job_id_target = options.longs === $String ? $util.Long.prototype.toString.call(message.job_id_target) : options.longs === $Number ? new $util.LongBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0).toNumber(true) : message.job_id_target; + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) object.target_job_name = message.target_job_name; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) object.error_message = message.error_message; - if (message.gc_msg_src != null && message.hasOwnProperty("gc_msg_src")) - object.gc_msg_src = options.enums === String ? $root.GCProtoBufMsgSrc[message.gc_msg_src] : message.gc_msg_src; - if (message.gc_dir_index_source != null && message.hasOwnProperty("gc_dir_index_source")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) + object.gc_msg_src = options.enums === $String ? $root.GCProtoBufMsgSrc[message.gc_msg_src] === $undefined ? message.gc_msg_src : $root.GCProtoBufMsgSrc[message.gc_msg_src] : message.gc_msg_src; + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) object.gc_dir_index_source = message.gc_dir_index_source; return object; }; @@ -22298,8 +29067,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgProtoBufHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgProtoBufHeader.prototype.toJSON = function() { + return CMsgProtoBufHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgProtoBufHeader + * @function getTypeUrl + * @memberof CMsgProtoBufHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgProtoBufHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgProtoBufHeader"; }; return CMsgProtoBufHeader; @@ -22309,29 +29092,42 @@ /** * Properties of a CMsgWebAPIKey. - * @exports ICMsgWebAPIKey - * @interface ICMsgWebAPIKey + * @typedef {Object} CMsgWebAPIKey.$Properties * @property {number|null} [status] CMsgWebAPIKey status * @property {number|null} [account_id] CMsgWebAPIKey account_id * @property {number|null} [publisher_group_id] CMsgWebAPIKey publisher_group_id * @property {number|null} [key_id] CMsgWebAPIKey key_id * @property {string|null} [domain] CMsgWebAPIKey domain + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgWebAPIKey. + * @exports ICMsgWebAPIKey + * @interface ICMsgWebAPIKey + * @augments CMsgWebAPIKey.$Properties + * @deprecated Use CMsgWebAPIKey.$Properties instead. + */ + + /** + * Shape of a CMsgWebAPIKey. + * @typedef {CMsgWebAPIKey.$Properties} CMsgWebAPIKey.$Shape */ /** * Constructs a new CMsgWebAPIKey. * @exports CMsgWebAPIKey * @classdesc Represents a CMsgWebAPIKey. - * @implements ICMsgWebAPIKey * @constructor - * @param {ICMsgWebAPIKey=} [properties] Properties to set + * @param {CMsgWebAPIKey.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgWebAPIKey(properties) { + var CMsgWebAPIKey = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgWebAPIKey status. @@ -22378,10 +29174,14 @@ * @function create * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey=} [properties] Properties to set + * @param {CMsgWebAPIKey.$Properties=} [properties] Properties to set * @returns {CMsgWebAPIKey} CMsgWebAPIKey instance + * @type {{ + * (properties: CMsgWebAPIKey.$Shape): CMsgWebAPIKey & CMsgWebAPIKey.$Shape; + * (properties?: CMsgWebAPIKey.$Properties): CMsgWebAPIKey; + * }} */ - CMsgWebAPIKey.create = function create(properties) { + CMsgWebAPIKey.create = function(properties) { return new CMsgWebAPIKey(properties); }; @@ -22390,23 +29190,30 @@ * @function encode * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey} message CMsgWebAPIKey message or plain object to encode + * @param {CMsgWebAPIKey.$Properties} message CMsgWebAPIKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIKey.encode = function encode(message, writer) { + CMsgWebAPIKey.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.status); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_id); - if (message.publisher_group_id != null && Object.hasOwnProperty.call(message, "publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.publisher_group_id); - if (message.key_id != null && Object.hasOwnProperty.call(message, "key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.key_id); - if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.domain); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22415,12 +29222,12 @@ * @function encodeDelimited * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey} message CMsgWebAPIKey message or plain object to encode + * @param {CMsgWebAPIKey.$Properties} message CMsgWebAPIKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgWebAPIKey.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22430,37 +29237,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgWebAPIKey} CMsgWebAPIKey + * @returns {CMsgWebAPIKey & CMsgWebAPIKey.$Shape} CMsgWebAPIKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIKey.decode = function decode(reader, length) { + CMsgWebAPIKey.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgWebAPIKey(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgWebAPIKey(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.uint32(); - break; - case 2: - message.account_id = reader.uint32(); - break; - case 3: - message.publisher_group_id = reader.uint32(); - break; - case 4: - message.key_id = reader.uint32(); - break; - case 5: - message.domain = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.status = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.publisher_group_id = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.key_id = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.domain = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22470,11 +29306,11 @@ * @memberof CMsgWebAPIKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgWebAPIKey} CMsgWebAPIKey + * @returns {CMsgWebAPIKey & CMsgWebAPIKey.$Shape} CMsgWebAPIKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIKey.decodeDelimited = function decodeDelimited(reader) { + CMsgWebAPIKey.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22488,22 +29324,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgWebAPIKey.verify = function verify(message) { + CMsgWebAPIKey.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) if (!$util.isInteger(message.status)) return "status: integer expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.publisher_group_id != null && message.hasOwnProperty("publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) if (!$util.isInteger(message.publisher_group_id)) return "publisher_group_id: integer expected"; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) if (!$util.isInteger(message.key_id)) return "key_id: integer expected"; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) if (!$util.isString(message.domain)) return "domain: string expected"; return null; @@ -22517,9 +29357,15 @@ * @param {Object.} object Plain object * @returns {CMsgWebAPIKey} CMsgWebAPIKey */ - CMsgWebAPIKey.fromObject = function fromObject(object) { + CMsgWebAPIKey.fromObject = function (object, _depth) { if (object instanceof $root.CMsgWebAPIKey) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgWebAPIKey: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgWebAPIKey(); if (object.status != null) message.status = object.status >>> 0; @@ -22530,7 +29376,7 @@ if (object.key_id != null) message.key_id = object.key_id >>> 0; if (object.domain != null) - message.domain = String(object.domain); + message.domain = $String(object.domain); return message; }; @@ -22543,9 +29389,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgWebAPIKey.toObject = function toObject(message, options) { + CMsgWebAPIKey.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.status = 255; @@ -22554,15 +29404,15 @@ object.key_id = 0; object.domain = ""; } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.publisher_group_id != null && message.hasOwnProperty("publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) object.publisher_group_id = message.publisher_group_id; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) object.key_id = message.key_id; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) object.domain = message.domain; return object; }; @@ -22574,8 +29424,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgWebAPIKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgWebAPIKey.prototype.toJSON = function() { + return CMsgWebAPIKey.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgWebAPIKey + * @function getTypeUrl + * @memberof CMsgWebAPIKey + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgWebAPIKey.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgWebAPIKey"; }; return CMsgWebAPIKey; @@ -22585,35 +29449,48 @@ /** * Properties of a CMsgHttpRequest. - * @exports ICMsgHttpRequest - * @interface ICMsgHttpRequest + * @typedef {Object} CMsgHttpRequest.$Properties * @property {number|null} [request_method] CMsgHttpRequest request_method * @property {string|null} [hostname] CMsgHttpRequest hostname * @property {string|null} [url] CMsgHttpRequest url - * @property {Array.|null} [headers] CMsgHttpRequest headers - * @property {Array.|null} [get_params] CMsgHttpRequest get_params - * @property {Array.|null} [post_params] CMsgHttpRequest post_params + * @property {Array.|null} [headers] CMsgHttpRequest headers + * @property {Array.|null} [get_params] CMsgHttpRequest get_params + * @property {Array.|null} [post_params] CMsgHttpRequest post_params * @property {Uint8Array|null} [body] CMsgHttpRequest body * @property {number|null} [absolute_timeout] CMsgHttpRequest absolute_timeout + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHttpRequest. + * @exports ICMsgHttpRequest + * @interface ICMsgHttpRequest + * @augments CMsgHttpRequest.$Properties + * @deprecated Use CMsgHttpRequest.$Properties instead. + */ + + /** + * Shape of a CMsgHttpRequest. + * @typedef {CMsgHttpRequest.$Properties} CMsgHttpRequest.$Shape */ /** * Constructs a new CMsgHttpRequest. * @exports CMsgHttpRequest * @classdesc Represents a CMsgHttpRequest. - * @implements ICMsgHttpRequest * @constructor - * @param {ICMsgHttpRequest=} [properties] Properties to set + * @param {CMsgHttpRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHttpRequest(properties) { + var CMsgHttpRequest = function (properties) { this.headers = []; this.get_params = []; this.post_params = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHttpRequest request_method. @@ -22641,7 +29518,7 @@ /** * CMsgHttpRequest headers. - * @member {Array.} headers + * @member {Array.} headers * @memberof CMsgHttpRequest * @instance */ @@ -22649,7 +29526,7 @@ /** * CMsgHttpRequest get_params. - * @member {Array.} get_params + * @member {Array.} get_params * @memberof CMsgHttpRequest * @instance */ @@ -22657,7 +29534,7 @@ /** * CMsgHttpRequest post_params. - * @member {Array.} post_params + * @member {Array.} post_params * @memberof CMsgHttpRequest * @instance */ @@ -22684,10 +29561,14 @@ * @function create * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest=} [properties] Properties to set + * @param {CMsgHttpRequest.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest} CMsgHttpRequest instance + * @type {{ + * (properties: CMsgHttpRequest.$Shape): CMsgHttpRequest & CMsgHttpRequest.$Shape; + * (properties?: CMsgHttpRequest.$Properties): CMsgHttpRequest; + * }} */ - CMsgHttpRequest.create = function create(properties) { + CMsgHttpRequest.create = function(properties) { return new CMsgHttpRequest(properties); }; @@ -22696,32 +29577,39 @@ * @function encode * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest} message CMsgHttpRequest message or plain object to encode + * @param {CMsgHttpRequest.$Properties} message CMsgHttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpRequest.encode = function encode(message, writer) { + CMsgHttpRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.request_method != null && Object.hasOwnProperty.call(message, "request_method")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.request_method); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.hostname); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.url); if (message.headers != null && message.headers.length) for (var i = 0; i < message.headers.length; ++i) - $root.CMsgHttpRequest.RequestHeader.encode(message.headers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgHttpRequest.RequestHeader.encode(message.headers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.get_params != null && message.get_params.length) for (var i = 0; i < message.get_params.length; ++i) - $root.CMsgHttpRequest.QueryParam.encode(message.get_params[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.CMsgHttpRequest.QueryParam.encode(message.get_params[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.post_params != null && message.post_params.length) for (var i = 0; i < message.post_params.length; ++i) - $root.CMsgHttpRequest.QueryParam.encode(message.post_params[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.CMsgHttpRequest.QueryParam.encode(message.post_params[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.body); - if (message.absolute_timeout != null && Object.hasOwnProperty.call(message, "absolute_timeout")) + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.absolute_timeout); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22730,12 +29618,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest} message CMsgHttpRequest message or plain object to encode + * @param {CMsgHttpRequest.$Properties} message CMsgHttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHttpRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22745,52 +29633,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest} CMsgHttpRequest + * @returns {CMsgHttpRequest & CMsgHttpRequest.$Shape} CMsgHttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpRequest.decode = function decode(reader, length) { + CMsgHttpRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.request_method = reader.uint32(); - break; - case 2: - message.hostname = reader.string(); - break; - case 3: - message.url = reader.string(); - break; - case 4: - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.CMsgHttpRequest.RequestHeader.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.get_params && message.get_params.length)) - message.get_params = []; - message.get_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.post_params && message.post_params.length)) - message.post_params = []; - message.post_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32())); - break; - case 7: - message.body = reader.bytes(); - break; - case 8: - message.absolute_timeout = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.request_method = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.hostname = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.url = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push($root.CMsgHttpRequest.RequestHeader.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.get_params && message.get_params.length)) + message.get_params = []; + message.get_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.post_params && message.post_params.length)) + message.post_params = []; + message.post_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.body = reader.bytes(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.absolute_timeout = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22800,11 +29726,11 @@ * @memberof CMsgHttpRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest} CMsgHttpRequest + * @returns {CMsgHttpRequest & CMsgHttpRequest.$Shape} CMsgHttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgHttpRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22818,49 +29744,53 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHttpRequest.verify = function verify(message) { + CMsgHttpRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.request_method != null && message.hasOwnProperty("request_method")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) if (!$util.isInteger(message.request_method)) return "request_method: integer expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) if (!$util.isString(message.hostname)) return "hostname: string expected"; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) + if (message.headers != null && $Object.hasOwnProperty.call(message, "headers")) { + if (!$Array.isArray(message.headers)) return "headers: array expected"; for (var i = 0; i < message.headers.length; ++i) { - var error = $root.CMsgHttpRequest.RequestHeader.verify(message.headers[i]); + var error = $root.CMsgHttpRequest.RequestHeader.verify(message.headers[i], _depth + 1); if (error) return "headers." + error; } } - if (message.get_params != null && message.hasOwnProperty("get_params")) { - if (!Array.isArray(message.get_params)) + if (message.get_params != null && $Object.hasOwnProperty.call(message, "get_params")) { + if (!$Array.isArray(message.get_params)) return "get_params: array expected"; for (var i = 0; i < message.get_params.length; ++i) { - var error = $root.CMsgHttpRequest.QueryParam.verify(message.get_params[i]); + var error = $root.CMsgHttpRequest.QueryParam.verify(message.get_params[i], _depth + 1); if (error) return "get_params." + error; } } - if (message.post_params != null && message.hasOwnProperty("post_params")) { - if (!Array.isArray(message.post_params)) + if (message.post_params != null && $Object.hasOwnProperty.call(message, "post_params")) { + if (!$Array.isArray(message.post_params)) return "post_params: array expected"; for (var i = 0; i < message.post_params.length; ++i) { - var error = $root.CMsgHttpRequest.QueryParam.verify(message.post_params[i]); + var error = $root.CMsgHttpRequest.QueryParam.verify(message.post_params[i], _depth + 1); if (error) return "post_params." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) return "body: buffer expected"; - if (message.absolute_timeout != null && message.hasOwnProperty("absolute_timeout")) + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) if (!$util.isInteger(message.absolute_timeout)) return "absolute_timeout: integer expected"; return null; @@ -22874,50 +29804,56 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest} CMsgHttpRequest */ - CMsgHttpRequest.fromObject = function fromObject(object) { + CMsgHttpRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest(); if (object.request_method != null) message.request_method = object.request_method >>> 0; if (object.hostname != null) - message.hostname = String(object.hostname); + message.hostname = $String(object.hostname); if (object.url != null) - message.url = String(object.url); + message.url = $String(object.url); if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".CMsgHttpRequest.headers: array expected"); - message.headers = []; + if (!$Array.isArray(object.headers)) + throw $TypeError(".CMsgHttpRequest.headers: array expected"); + message.headers = $Array(object.headers.length); for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".CMsgHttpRequest.headers: object expected"); - message.headers[i] = $root.CMsgHttpRequest.RequestHeader.fromObject(object.headers[i]); + if (!$util.isObject(object.headers[i])) + throw $TypeError(".CMsgHttpRequest.headers: object expected"); + message.headers[i] = $root.CMsgHttpRequest.RequestHeader.fromObject(object.headers[i], _depth + 1); } } if (object.get_params) { - if (!Array.isArray(object.get_params)) - throw TypeError(".CMsgHttpRequest.get_params: array expected"); - message.get_params = []; + if (!$Array.isArray(object.get_params)) + throw $TypeError(".CMsgHttpRequest.get_params: array expected"); + message.get_params = $Array(object.get_params.length); for (var i = 0; i < object.get_params.length; ++i) { - if (typeof object.get_params[i] !== "object") - throw TypeError(".CMsgHttpRequest.get_params: object expected"); - message.get_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.get_params[i]); + if (!$util.isObject(object.get_params[i])) + throw $TypeError(".CMsgHttpRequest.get_params: object expected"); + message.get_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.get_params[i], _depth + 1); } } if (object.post_params) { - if (!Array.isArray(object.post_params)) - throw TypeError(".CMsgHttpRequest.post_params: array expected"); - message.post_params = []; + if (!$Array.isArray(object.post_params)) + throw $TypeError(".CMsgHttpRequest.post_params: array expected"); + message.post_params = $Array(object.post_params.length); for (var i = 0; i < object.post_params.length; ++i) { - if (typeof object.post_params[i] !== "object") - throw TypeError(".CMsgHttpRequest.post_params: object expected"); - message.post_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.post_params[i]); + if (!$util.isObject(object.post_params[i])) + throw $TypeError(".CMsgHttpRequest.post_params: object expected"); + message.post_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.post_params[i], _depth + 1); } } if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; if (object.absolute_timeout != null) message.absolute_timeout = object.absolute_timeout >>> 0; @@ -22933,9 +29869,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHttpRequest.toObject = function toObject(message, options) { + CMsgHttpRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.headers = []; @@ -22946,39 +29886,39 @@ object.request_method = 0; object.hostname = ""; object.url = ""; - if (options.bytes === String) + if (options.bytes === $String) object.body = ""; else { object.body = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.body = $util.newBuffer(object.body); } object.absolute_timeout = 0; } - if (message.request_method != null && message.hasOwnProperty("request_method")) + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) object.request_method = message.request_method; - if (message.hostname != null && message.hasOwnProperty("hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) object.hostname = message.hostname; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) object.url = message.url; if (message.headers && message.headers.length) { - object.headers = []; + object.headers = $Array(message.headers.length); for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.CMsgHttpRequest.RequestHeader.toObject(message.headers[j], options); + object.headers[j] = $root.CMsgHttpRequest.RequestHeader.toObject(message.headers[j], options, _depth + 1); } if (message.get_params && message.get_params.length) { - object.get_params = []; + object.get_params = $Array(message.get_params.length); for (var j = 0; j < message.get_params.length; ++j) - object.get_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.get_params[j], options); + object.get_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.get_params[j], options, _depth + 1); } if (message.post_params && message.post_params.length) { - object.post_params = []; + object.post_params = $Array(message.post_params.length); for (var j = 0; j < message.post_params.length; ++j) - object.post_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.post_params[j], options); + object.post_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.post_params[j], options, _depth + 1); } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; - if (message.absolute_timeout != null && message.hasOwnProperty("absolute_timeout")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = options.bytes === $String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.body) : message.body; + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) object.absolute_timeout = message.absolute_timeout; return object; }; @@ -22990,34 +29930,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgHttpRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHttpRequest.prototype.toJSON = function() { + return CMsgHttpRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHttpRequest + * @function getTypeUrl + * @memberof CMsgHttpRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHttpRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest"; }; CMsgHttpRequest.RequestHeader = (function() { /** * Properties of a RequestHeader. - * @memberof CMsgHttpRequest - * @interface IRequestHeader + * @typedef {Object} CMsgHttpRequest.RequestHeader.$Properties * @property {string|null} [name] RequestHeader name * @property {string|null} [value] RequestHeader value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RequestHeader. + * @memberof CMsgHttpRequest + * @interface IRequestHeader + * @augments CMsgHttpRequest.RequestHeader.$Properties + * @deprecated Use CMsgHttpRequest.RequestHeader.$Properties instead. + */ + + /** + * Shape of a RequestHeader. + * @typedef {CMsgHttpRequest.RequestHeader.$Properties} CMsgHttpRequest.RequestHeader.$Shape */ /** * Constructs a new RequestHeader. * @memberof CMsgHttpRequest * @classdesc Represents a RequestHeader. - * @implements IRequestHeader * @constructor - * @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set + * @param {CMsgHttpRequest.RequestHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function RequestHeader(properties) { + var RequestHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * RequestHeader name. @@ -23040,10 +30007,14 @@ * @function create * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set + * @param {CMsgHttpRequest.RequestHeader.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest.RequestHeader} RequestHeader instance + * @type {{ + * (properties: CMsgHttpRequest.RequestHeader.$Shape): CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape; + * (properties?: CMsgHttpRequest.RequestHeader.$Properties): CMsgHttpRequest.RequestHeader; + * }} */ - RequestHeader.create = function create(properties) { + RequestHeader.create = function(properties) { return new RequestHeader(properties); }; @@ -23052,17 +30023,24 @@ * @function encode * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader} message RequestHeader message or plain object to encode + * @param {CMsgHttpRequest.RequestHeader.$Properties} message RequestHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestHeader.encode = function encode(message, writer) { + RequestHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23071,12 +30049,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader} message RequestHeader message or plain object to encode + * @param {CMsgHttpRequest.RequestHeader.$Properties} message RequestHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RequestHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23086,28 +30064,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest.RequestHeader} RequestHeader + * @returns {CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape} RequestHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestHeader.decode = function decode(reader, length) { + RequestHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest.RequestHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest.RequestHeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23117,11 +30115,11 @@ * @memberof CMsgHttpRequest.RequestHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest.RequestHeader} RequestHeader + * @returns {CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape} RequestHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestHeader.decodeDelimited = function decodeDelimited(reader) { + RequestHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23135,13 +30133,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RequestHeader.verify = function verify(message) { + RequestHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -23155,14 +30157,20 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest.RequestHeader} RequestHeader */ - RequestHeader.fromObject = function fromObject(object) { + RequestHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest.RequestHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest.RequestHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest.RequestHeader(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -23175,17 +30183,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RequestHeader.toObject = function toObject(message, options) { + RequestHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -23197,8 +30209,22 @@ * @instance * @returns {Object.} JSON object */ - RequestHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + RequestHeader.prototype.toJSON = function() { + return RequestHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RequestHeader + * @function getTypeUrl + * @memberof CMsgHttpRequest.RequestHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RequestHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest.RequestHeader"; }; return RequestHeader; @@ -23208,26 +30234,39 @@ /** * Properties of a QueryParam. - * @memberof CMsgHttpRequest - * @interface IQueryParam + * @typedef {Object} CMsgHttpRequest.QueryParam.$Properties * @property {string|null} [name] QueryParam name * @property {Uint8Array|null} [value] QueryParam value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a QueryParam. + * @memberof CMsgHttpRequest + * @interface IQueryParam + * @augments CMsgHttpRequest.QueryParam.$Properties + * @deprecated Use CMsgHttpRequest.QueryParam.$Properties instead. + */ + + /** + * Shape of a QueryParam. + * @typedef {CMsgHttpRequest.QueryParam.$Properties} CMsgHttpRequest.QueryParam.$Shape */ /** * Constructs a new QueryParam. * @memberof CMsgHttpRequest * @classdesc Represents a QueryParam. - * @implements IQueryParam * @constructor - * @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set + * @param {CMsgHttpRequest.QueryParam.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function QueryParam(properties) { + var QueryParam = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * QueryParam name. @@ -23250,10 +30289,14 @@ * @function create * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set + * @param {CMsgHttpRequest.QueryParam.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest.QueryParam} QueryParam instance + * @type {{ + * (properties: CMsgHttpRequest.QueryParam.$Shape): CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape; + * (properties?: CMsgHttpRequest.QueryParam.$Properties): CMsgHttpRequest.QueryParam; + * }} */ - QueryParam.create = function create(properties) { + QueryParam.create = function(properties) { return new QueryParam(properties); }; @@ -23262,17 +30305,24 @@ * @function encode * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam} message QueryParam message or plain object to encode + * @param {CMsgHttpRequest.QueryParam.$Properties} message QueryParam message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParam.encode = function encode(message, writer) { + QueryParam.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23281,12 +30331,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam} message QueryParam message or plain object to encode + * @param {CMsgHttpRequest.QueryParam.$Properties} message QueryParam message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueryParam.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23296,28 +30346,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest.QueryParam} QueryParam + * @returns {CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape} QueryParam * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParam.decode = function decode(reader, length) { + QueryParam.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest.QueryParam(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest.QueryParam(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23327,11 +30397,11 @@ * @memberof CMsgHttpRequest.QueryParam * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest.QueryParam} QueryParam + * @returns {CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape} QueryParam * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParam.decodeDelimited = function decodeDelimited(reader) { + QueryParam.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23345,13 +30415,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryParam.verify = function verify(message) { + QueryParam.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -23365,16 +30439,22 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest.QueryParam} QueryParam */ - QueryParam.fromObject = function fromObject(object) { + QueryParam.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest.QueryParam) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest.QueryParam: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest.QueryParam(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -23388,24 +30468,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryParam.toObject = function toObject(message, options) { + QueryParam.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -23416,8 +30500,22 @@ * @instance * @returns {Object.} JSON object */ - QueryParam.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + QueryParam.prototype.toJSON = function() { + return QueryParam.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for QueryParam + * @function getTypeUrl + * @memberof CMsgHttpRequest.QueryParam + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + QueryParam.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest.QueryParam"; }; return QueryParam; @@ -23430,31 +30528,44 @@ /** * Properties of a CMsgWebAPIRequest. - * @exports ICMsgWebAPIRequest - * @interface ICMsgWebAPIRequest + * @typedef {Object} CMsgWebAPIRequest.$Properties * @property {string|null} [UNUSED_job_name] CMsgWebAPIRequest UNUSED_job_name * @property {string|null} [interface_name] CMsgWebAPIRequest interface_name * @property {string|null} [method_name] CMsgWebAPIRequest method_name * @property {number|null} [version] CMsgWebAPIRequest version - * @property {ICMsgWebAPIKey|null} [api_key] CMsgWebAPIRequest api_key - * @property {ICMsgHttpRequest|null} [request] CMsgWebAPIRequest request + * @property {CMsgWebAPIKey.$Properties|null} [api_key] CMsgWebAPIRequest api_key + * @property {CMsgHttpRequest.$Properties|null} [request] CMsgWebAPIRequest request * @property {number|null} [routing_app_id] CMsgWebAPIRequest routing_app_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgWebAPIRequest. + * @exports ICMsgWebAPIRequest + * @interface ICMsgWebAPIRequest + * @augments CMsgWebAPIRequest.$Properties + * @deprecated Use CMsgWebAPIRequest.$Properties instead. + */ + + /** + * Shape of a CMsgWebAPIRequest. + * @typedef {CMsgWebAPIRequest.$Properties} CMsgWebAPIRequest.$Shape */ /** * Constructs a new CMsgWebAPIRequest. * @exports CMsgWebAPIRequest * @classdesc Represents a CMsgWebAPIRequest. - * @implements ICMsgWebAPIRequest * @constructor - * @param {ICMsgWebAPIRequest=} [properties] Properties to set + * @param {CMsgWebAPIRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgWebAPIRequest(properties) { + var CMsgWebAPIRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgWebAPIRequest UNUSED_job_name. @@ -23490,7 +30601,7 @@ /** * CMsgWebAPIRequest api_key. - * @member {ICMsgWebAPIKey|null|undefined} api_key + * @member {CMsgWebAPIKey.$Properties|null|undefined} api_key * @memberof CMsgWebAPIRequest * @instance */ @@ -23498,7 +30609,7 @@ /** * CMsgWebAPIRequest request. - * @member {ICMsgHttpRequest|null|undefined} request + * @member {CMsgHttpRequest.$Properties|null|undefined} request * @memberof CMsgWebAPIRequest * @instance */ @@ -23517,10 +30628,14 @@ * @function create * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest=} [properties] Properties to set + * @param {CMsgWebAPIRequest.$Properties=} [properties] Properties to set * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest instance + * @type {{ + * (properties: CMsgWebAPIRequest.$Shape): CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape; + * (properties?: CMsgWebAPIRequest.$Properties): CMsgWebAPIRequest; + * }} */ - CMsgWebAPIRequest.create = function create(properties) { + CMsgWebAPIRequest.create = function(properties) { return new CMsgWebAPIRequest(properties); }; @@ -23529,27 +30644,34 @@ * @function encode * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest} message CMsgWebAPIRequest message or plain object to encode + * @param {CMsgWebAPIRequest.$Properties} message CMsgWebAPIRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIRequest.encode = function encode(message, writer) { + CMsgWebAPIRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.UNUSED_job_name != null && Object.hasOwnProperty.call(message, "UNUSED_job_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.UNUSED_job_name); - if (message.interface_name != null && Object.hasOwnProperty.call(message, "interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.interface_name); - if (message.method_name != null && Object.hasOwnProperty.call(message, "method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.method_name); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.version); - if (message.api_key != null && Object.hasOwnProperty.call(message, "api_key")) - $root.CMsgWebAPIKey.encode(message.api_key, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.request != null && Object.hasOwnProperty.call(message, "request")) - $root.CMsgHttpRequest.encode(message.request, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.routing_app_id != null && Object.hasOwnProperty.call(message, "routing_app_id")) + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) + $root.CMsgWebAPIKey.encode(message.api_key, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) + $root.CMsgHttpRequest.encode(message.request, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.routing_app_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23558,12 +30680,12 @@ * @function encodeDelimited * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest} message CMsgWebAPIRequest message or plain object to encode + * @param {CMsgWebAPIRequest.$Properties} message CMsgWebAPIRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgWebAPIRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23573,43 +30695,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest + * @returns {CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape} CMsgWebAPIRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIRequest.decode = function decode(reader, length) { + CMsgWebAPIRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgWebAPIRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgWebAPIRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.UNUSED_job_name = reader.string(); - break; - case 2: - message.interface_name = reader.string(); - break; - case 3: - message.method_name = reader.string(); - break; - case 4: - message.version = reader.uint32(); - break; - case 5: - message.api_key = $root.CMsgWebAPIKey.decode(reader, reader.uint32()); - break; - case 6: - message.request = $root.CMsgHttpRequest.decode(reader, reader.uint32()); - break; - case 7: - message.routing_app_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.UNUSED_job_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.interface_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.method_name = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.api_key = $root.CMsgWebAPIKey.decode(reader, reader.uint32(), $undefined, _depth + 1, message.api_key); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.request = $root.CMsgHttpRequest.decode(reader, reader.uint32(), $undefined, _depth + 1, message.request); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.routing_app_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23619,11 +30776,11 @@ * @memberof CMsgWebAPIRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest + * @returns {CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape} CMsgWebAPIRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgWebAPIRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23637,32 +30794,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgWebAPIRequest.verify = function verify(message) { + CMsgWebAPIRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.UNUSED_job_name != null && message.hasOwnProperty("UNUSED_job_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) if (!$util.isString(message.UNUSED_job_name)) return "UNUSED_job_name: string expected"; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) if (!$util.isString(message.interface_name)) return "interface_name: string expected"; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) if (!$util.isString(message.method_name)) return "method_name: string expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.api_key != null && message.hasOwnProperty("api_key")) { - var error = $root.CMsgWebAPIKey.verify(message.api_key); + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) { + var error = $root.CMsgWebAPIKey.verify(message.api_key, _depth + 1); if (error) return "api_key." + error; } - if (message.request != null && message.hasOwnProperty("request")) { - var error = $root.CMsgHttpRequest.verify(message.request); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) { + var error = $root.CMsgHttpRequest.verify(message.request, _depth + 1); if (error) return "request." + error; } - if (message.routing_app_id != null && message.hasOwnProperty("routing_app_id")) + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) if (!$util.isInteger(message.routing_app_id)) return "routing_app_id: integer expected"; return null; @@ -23676,27 +30837,33 @@ * @param {Object.} object Plain object * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest */ - CMsgWebAPIRequest.fromObject = function fromObject(object) { + CMsgWebAPIRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgWebAPIRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgWebAPIRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgWebAPIRequest(); if (object.UNUSED_job_name != null) - message.UNUSED_job_name = String(object.UNUSED_job_name); + message.UNUSED_job_name = $String(object.UNUSED_job_name); if (object.interface_name != null) - message.interface_name = String(object.interface_name); + message.interface_name = $String(object.interface_name); if (object.method_name != null) - message.method_name = String(object.method_name); + message.method_name = $String(object.method_name); if (object.version != null) message.version = object.version >>> 0; if (object.api_key != null) { - if (typeof object.api_key !== "object") - throw TypeError(".CMsgWebAPIRequest.api_key: object expected"); - message.api_key = $root.CMsgWebAPIKey.fromObject(object.api_key); + if (!$util.isObject(object.api_key)) + throw $TypeError(".CMsgWebAPIRequest.api_key: object expected"); + message.api_key = $root.CMsgWebAPIKey.fromObject(object.api_key, _depth + 1); } if (object.request != null) { - if (typeof object.request !== "object") - throw TypeError(".CMsgWebAPIRequest.request: object expected"); - message.request = $root.CMsgHttpRequest.fromObject(object.request); + if (!$util.isObject(object.request)) + throw $TypeError(".CMsgWebAPIRequest.request: object expected"); + message.request = $root.CMsgHttpRequest.fromObject(object.request, _depth + 1); } if (object.routing_app_id != null) message.routing_app_id = object.routing_app_id >>> 0; @@ -23712,9 +30879,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgWebAPIRequest.toObject = function toObject(message, options) { + CMsgWebAPIRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.UNUSED_job_name = ""; @@ -23725,19 +30896,19 @@ object.request = null; object.routing_app_id = 0; } - if (message.UNUSED_job_name != null && message.hasOwnProperty("UNUSED_job_name")) + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) object.UNUSED_job_name = message.UNUSED_job_name; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) object.interface_name = message.interface_name; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) object.method_name = message.method_name; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.api_key != null && message.hasOwnProperty("api_key")) - object.api_key = $root.CMsgWebAPIKey.toObject(message.api_key, options); - if (message.request != null && message.hasOwnProperty("request")) - object.request = $root.CMsgHttpRequest.toObject(message.request, options); - if (message.routing_app_id != null && message.hasOwnProperty("routing_app_id")) + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) + object.api_key = $root.CMsgWebAPIKey.toObject(message.api_key, options, _depth + 1); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) + object.request = $root.CMsgHttpRequest.toObject(message.request, options, _depth + 1); + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) object.routing_app_id = message.routing_app_id; return object; }; @@ -23749,8 +30920,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgWebAPIRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgWebAPIRequest.prototype.toJSON = function() { + return CMsgWebAPIRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgWebAPIRequest + * @function getTypeUrl + * @memberof CMsgWebAPIRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgWebAPIRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgWebAPIRequest"; }; return CMsgWebAPIRequest; @@ -23760,28 +30945,41 @@ /** * Properties of a CMsgHttpResponse. - * @exports ICMsgHttpResponse - * @interface ICMsgHttpResponse + * @typedef {Object} CMsgHttpResponse.$Properties * @property {number|null} [status_code] CMsgHttpResponse status_code - * @property {Array.|null} [headers] CMsgHttpResponse headers + * @property {Array.|null} [headers] CMsgHttpResponse headers * @property {Uint8Array|null} [body] CMsgHttpResponse body + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHttpResponse. + * @exports ICMsgHttpResponse + * @interface ICMsgHttpResponse + * @augments CMsgHttpResponse.$Properties + * @deprecated Use CMsgHttpResponse.$Properties instead. + */ + + /** + * Shape of a CMsgHttpResponse. + * @typedef {CMsgHttpResponse.$Properties} CMsgHttpResponse.$Shape */ /** * Constructs a new CMsgHttpResponse. * @exports CMsgHttpResponse * @classdesc Represents a CMsgHttpResponse. - * @implements ICMsgHttpResponse * @constructor - * @param {ICMsgHttpResponse=} [properties] Properties to set + * @param {CMsgHttpResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHttpResponse(properties) { + var CMsgHttpResponse = function (properties) { this.headers = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHttpResponse status_code. @@ -23793,7 +30991,7 @@ /** * CMsgHttpResponse headers. - * @member {Array.} headers + * @member {Array.} headers * @memberof CMsgHttpResponse * @instance */ @@ -23812,10 +31010,14 @@ * @function create * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse=} [properties] Properties to set + * @param {CMsgHttpResponse.$Properties=} [properties] Properties to set * @returns {CMsgHttpResponse} CMsgHttpResponse instance + * @type {{ + * (properties: CMsgHttpResponse.$Shape): CMsgHttpResponse & CMsgHttpResponse.$Shape; + * (properties?: CMsgHttpResponse.$Properties): CMsgHttpResponse; + * }} */ - CMsgHttpResponse.create = function create(properties) { + CMsgHttpResponse.create = function(properties) { return new CMsgHttpResponse(properties); }; @@ -23824,20 +31026,27 @@ * @function encode * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse} message CMsgHttpResponse message or plain object to encode + * @param {CMsgHttpResponse.$Properties} message CMsgHttpResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpResponse.encode = function encode(message, writer) { + CMsgHttpResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.status_code); if (message.headers != null && message.headers.length) for (var i = 0; i < message.headers.length; ++i) - $root.CMsgHttpResponse.ResponseHeader.encode(message.headers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.CMsgHttpResponse.ResponseHeader.encode(message.headers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.body); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23846,12 +31055,12 @@ * @function encodeDelimited * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse} message CMsgHttpResponse message or plain object to encode + * @param {CMsgHttpResponse.$Properties} message CMsgHttpResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHttpResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23861,33 +31070,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpResponse} CMsgHttpResponse + * @returns {CMsgHttpResponse & CMsgHttpResponse.$Shape} CMsgHttpResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpResponse.decode = function decode(reader, length) { + CMsgHttpResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status_code = reader.uint32(); - break; - case 2: - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.CMsgHttpResponse.ResponseHeader.decode(reader, reader.uint32())); - break; - case 3: - message.body = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.status_code = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push($root.CMsgHttpResponse.ResponseHeader.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.body = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23897,11 +31129,11 @@ * @memberof CMsgHttpResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpResponse} CMsgHttpResponse + * @returns {CMsgHttpResponse & CMsgHttpResponse.$Shape} CMsgHttpResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgHttpResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23915,22 +31147,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHttpResponse.verify = function verify(message) { + CMsgHttpResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status_code != null && message.hasOwnProperty("status_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) if (!$util.isInteger(message.status_code)) return "status_code: integer expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) + if (message.headers != null && $Object.hasOwnProperty.call(message, "headers")) { + if (!$Array.isArray(message.headers)) return "headers: array expected"; for (var i = 0; i < message.headers.length; ++i) { - var error = $root.CMsgHttpResponse.ResponseHeader.verify(message.headers[i]); + var error = $root.CMsgHttpResponse.ResponseHeader.verify(message.headers[i], _depth + 1); if (error) return "headers." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) return "body: buffer expected"; return null; @@ -23944,26 +31180,32 @@ * @param {Object.} object Plain object * @returns {CMsgHttpResponse} CMsgHttpResponse */ - CMsgHttpResponse.fromObject = function fromObject(object) { + CMsgHttpResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpResponse(); if (object.status_code != null) message.status_code = object.status_code >>> 0; if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".CMsgHttpResponse.headers: array expected"); - message.headers = []; + if (!$Array.isArray(object.headers)) + throw $TypeError(".CMsgHttpResponse.headers: array expected"); + message.headers = $Array(object.headers.length); for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".CMsgHttpResponse.headers: object expected"); - message.headers[i] = $root.CMsgHttpResponse.ResponseHeader.fromObject(object.headers[i]); + if (!$util.isObject(object.headers[i])) + throw $TypeError(".CMsgHttpResponse.headers: object expected"); + message.headers[i] = $root.CMsgHttpResponse.ResponseHeader.fromObject(object.headers[i], _depth + 1); } } if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; return message; }; @@ -23977,31 +31219,35 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHttpResponse.toObject = function toObject(message, options) { + CMsgHttpResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.headers = []; if (options.defaults) { object.status_code = 0; - if (options.bytes === String) + if (options.bytes === $String) object.body = ""; else { object.body = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.body = $util.newBuffer(object.body); } } - if (message.status_code != null && message.hasOwnProperty("status_code")) + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) object.status_code = message.status_code; if (message.headers && message.headers.length) { - object.headers = []; + object.headers = $Array(message.headers.length); for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.CMsgHttpResponse.ResponseHeader.toObject(message.headers[j], options); + object.headers[j] = $root.CMsgHttpResponse.ResponseHeader.toObject(message.headers[j], options, _depth + 1); } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = options.bytes === $String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.body) : message.body; return object; }; @@ -24012,34 +31258,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgHttpResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHttpResponse.prototype.toJSON = function() { + return CMsgHttpResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHttpResponse + * @function getTypeUrl + * @memberof CMsgHttpResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHttpResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpResponse"; }; CMsgHttpResponse.ResponseHeader = (function() { /** * Properties of a ResponseHeader. - * @memberof CMsgHttpResponse - * @interface IResponseHeader + * @typedef {Object} CMsgHttpResponse.ResponseHeader.$Properties * @property {string|null} [name] ResponseHeader name * @property {string|null} [value] ResponseHeader value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ResponseHeader. + * @memberof CMsgHttpResponse + * @interface IResponseHeader + * @augments CMsgHttpResponse.ResponseHeader.$Properties + * @deprecated Use CMsgHttpResponse.ResponseHeader.$Properties instead. + */ + + /** + * Shape of a ResponseHeader. + * @typedef {CMsgHttpResponse.ResponseHeader.$Properties} CMsgHttpResponse.ResponseHeader.$Shape */ /** * Constructs a new ResponseHeader. * @memberof CMsgHttpResponse * @classdesc Represents a ResponseHeader. - * @implements IResponseHeader * @constructor - * @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set + * @param {CMsgHttpResponse.ResponseHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ResponseHeader(properties) { + var ResponseHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ResponseHeader name. @@ -24062,10 +31335,14 @@ * @function create * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set + * @param {CMsgHttpResponse.ResponseHeader.$Properties=} [properties] Properties to set * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader instance + * @type {{ + * (properties: CMsgHttpResponse.ResponseHeader.$Shape): CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape; + * (properties?: CMsgHttpResponse.ResponseHeader.$Properties): CMsgHttpResponse.ResponseHeader; + * }} */ - ResponseHeader.create = function create(properties) { + ResponseHeader.create = function(properties) { return new ResponseHeader(properties); }; @@ -24074,17 +31351,24 @@ * @function encode * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader} message ResponseHeader message or plain object to encode + * @param {CMsgHttpResponse.ResponseHeader.$Properties} message ResponseHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseHeader.encode = function encode(message, writer) { + ResponseHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24093,12 +31377,12 @@ * @function encodeDelimited * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader} message ResponseHeader message or plain object to encode + * @param {CMsgHttpResponse.ResponseHeader.$Properties} message ResponseHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ResponseHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24108,28 +31392,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader + * @returns {CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape} ResponseHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseHeader.decode = function decode(reader, length) { + ResponseHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpResponse.ResponseHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpResponse.ResponseHeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24139,11 +31443,11 @@ * @memberof CMsgHttpResponse.ResponseHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader + * @returns {CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape} ResponseHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseHeader.decodeDelimited = function decodeDelimited(reader) { + ResponseHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24157,13 +31461,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseHeader.verify = function verify(message) { + ResponseHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -24177,14 +31485,20 @@ * @param {Object.} object Plain object * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader */ - ResponseHeader.fromObject = function fromObject(object) { + ResponseHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpResponse.ResponseHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpResponse.ResponseHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpResponse.ResponseHeader(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -24197,17 +31511,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseHeader.toObject = function toObject(message, options) { + ResponseHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -24219,8 +31537,22 @@ * @instance * @returns {Object.} JSON object */ - ResponseHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ResponseHeader.prototype.toJSON = function() { + return ResponseHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ResponseHeader + * @function getTypeUrl + * @memberof CMsgHttpResponse.ResponseHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ResponseHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpResponse.ResponseHeader"; }; return ResponseHeader; @@ -24233,26 +31565,39 @@ /** * Properties of a CMsgAMFindAccounts. - * @exports ICMsgAMFindAccounts - * @interface ICMsgAMFindAccounts + * @typedef {Object} CMsgAMFindAccounts.$Properties * @property {number|null} [search_type] CMsgAMFindAccounts search_type * @property {string|null} [search_string] CMsgAMFindAccounts search_string + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMFindAccounts. + * @exports ICMsgAMFindAccounts + * @interface ICMsgAMFindAccounts + * @augments CMsgAMFindAccounts.$Properties + * @deprecated Use CMsgAMFindAccounts.$Properties instead. + */ + + /** + * Shape of a CMsgAMFindAccounts. + * @typedef {CMsgAMFindAccounts.$Properties} CMsgAMFindAccounts.$Shape */ /** * Constructs a new CMsgAMFindAccounts. * @exports CMsgAMFindAccounts * @classdesc Represents a CMsgAMFindAccounts. - * @implements ICMsgAMFindAccounts * @constructor - * @param {ICMsgAMFindAccounts=} [properties] Properties to set + * @param {CMsgAMFindAccounts.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMFindAccounts(properties) { + var CMsgAMFindAccounts = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMFindAccounts search_type. @@ -24275,10 +31620,14 @@ * @function create * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts=} [properties] Properties to set + * @param {CMsgAMFindAccounts.$Properties=} [properties] Properties to set * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts instance + * @type {{ + * (properties: CMsgAMFindAccounts.$Shape): CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape; + * (properties?: CMsgAMFindAccounts.$Properties): CMsgAMFindAccounts; + * }} */ - CMsgAMFindAccounts.create = function create(properties) { + CMsgAMFindAccounts.create = function(properties) { return new CMsgAMFindAccounts(properties); }; @@ -24287,17 +31636,24 @@ * @function encode * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts} message CMsgAMFindAccounts message or plain object to encode + * @param {CMsgAMFindAccounts.$Properties} message CMsgAMFindAccounts message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccounts.encode = function encode(message, writer) { + CMsgAMFindAccounts.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.search_type != null && Object.hasOwnProperty.call(message, "search_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.search_type); - if (message.search_string != null && Object.hasOwnProperty.call(message, "search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.search_string); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24306,12 +31662,12 @@ * @function encodeDelimited * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts} message CMsgAMFindAccounts message or plain object to encode + * @param {CMsgAMFindAccounts.$Properties} message CMsgAMFindAccounts message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccounts.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMFindAccounts.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24321,28 +31677,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts + * @returns {CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape} CMsgAMFindAccounts * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccounts.decode = function decode(reader, length) { + CMsgAMFindAccounts.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMFindAccounts(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMFindAccounts(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.search_type = reader.uint32(); - break; - case 2: - message.search_string = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.search_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.search_string = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24352,11 +31728,11 @@ * @memberof CMsgAMFindAccounts * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts + * @returns {CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape} CMsgAMFindAccounts * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccounts.decodeDelimited = function decodeDelimited(reader) { + CMsgAMFindAccounts.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24370,13 +31746,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMFindAccounts.verify = function verify(message) { + CMsgAMFindAccounts.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.search_type != null && message.hasOwnProperty("search_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) if (!$util.isInteger(message.search_type)) return "search_type: integer expected"; - if (message.search_string != null && message.hasOwnProperty("search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) if (!$util.isString(message.search_string)) return "search_string: string expected"; return null; @@ -24390,14 +31770,20 @@ * @param {Object.} object Plain object * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts */ - CMsgAMFindAccounts.fromObject = function fromObject(object) { + CMsgAMFindAccounts.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMFindAccounts) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMFindAccounts: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMFindAccounts(); if (object.search_type != null) message.search_type = object.search_type >>> 0; if (object.search_string != null) - message.search_string = String(object.search_string); + message.search_string = $String(object.search_string); return message; }; @@ -24410,17 +31796,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMFindAccounts.toObject = function toObject(message, options) { + CMsgAMFindAccounts.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.search_type = 0; object.search_string = ""; } - if (message.search_type != null && message.hasOwnProperty("search_type")) + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) object.search_type = message.search_type; - if (message.search_string != null && message.hasOwnProperty("search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) object.search_string = message.search_string; return object; }; @@ -24432,8 +31822,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMFindAccounts.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMFindAccounts.prototype.toJSON = function() { + return CMsgAMFindAccounts.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMFindAccounts + * @function getTypeUrl + * @memberof CMsgAMFindAccounts + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMFindAccounts.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMFindAccounts"; }; return CMsgAMFindAccounts; @@ -24441,28 +31845,41 @@ $root.CMsgAMFindAccountsResponse = (function() { + /** + * Properties of a CMsgAMFindAccountsResponse. + * @typedef {Object} CMsgAMFindAccountsResponse.$Properties + * @property {Array.|null} [steam_id] CMsgAMFindAccountsResponse steam_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMFindAccountsResponse. * @exports ICMsgAMFindAccountsResponse * @interface ICMsgAMFindAccountsResponse - * @property {Array.|null} [steam_id] CMsgAMFindAccountsResponse steam_id + * @augments CMsgAMFindAccountsResponse.$Properties + * @deprecated Use CMsgAMFindAccountsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMFindAccountsResponse. + * @typedef {CMsgAMFindAccountsResponse.$Properties} CMsgAMFindAccountsResponse.$Shape */ /** * Constructs a new CMsgAMFindAccountsResponse. * @exports CMsgAMFindAccountsResponse * @classdesc Represents a CMsgAMFindAccountsResponse. - * @implements ICMsgAMFindAccountsResponse * @constructor - * @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set + * @param {CMsgAMFindAccountsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMFindAccountsResponse(properties) { + var CMsgAMFindAccountsResponse = function (properties) { this.steam_id = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMFindAccountsResponse steam_id. @@ -24477,10 +31894,14 @@ * @function create * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set + * @param {CMsgAMFindAccountsResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse instance + * @type {{ + * (properties: CMsgAMFindAccountsResponse.$Shape): CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape; + * (properties?: CMsgAMFindAccountsResponse.$Properties): CMsgAMFindAccountsResponse; + * }} */ - CMsgAMFindAccountsResponse.create = function create(properties) { + CMsgAMFindAccountsResponse.create = function(properties) { return new CMsgAMFindAccountsResponse(properties); }; @@ -24489,16 +31910,23 @@ * @function encode * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse} message CMsgAMFindAccountsResponse message or plain object to encode + * @param {CMsgAMFindAccountsResponse.$Properties} message CMsgAMFindAccountsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccountsResponse.encode = function encode(message, writer) { + CMsgAMFindAccountsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.steam_id != null && message.steam_id.length) for (var i = 0; i < message.steam_id.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24507,12 +31935,12 @@ * @function encodeDelimited * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse} message CMsgAMFindAccountsResponse message or plain object to encode + * @param {CMsgAMFindAccountsResponse.$Properties} message CMsgAMFindAccountsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccountsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMFindAccountsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24522,32 +31950,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse + * @returns {CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape} CMsgAMFindAccountsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccountsResponse.decode = function decode(reader, length) { + CMsgAMFindAccountsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMFindAccountsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMFindAccountsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.steam_id && message.steam_id.length)) - message.steam_id = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.steam_id.push(reader.fixed64()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.steam_id && message.steam_id.length)) + message.steam_id = []; + reader.fixed64s(message.steam_id); + continue; + } + if (wireType !== 1) + break; + if (!(message.steam_id && message.steam_id.length)) + message.steam_id = []; message.steam_id.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24557,11 +32003,11 @@ * @memberof CMsgAMFindAccountsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse + * @returns {CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape} CMsgAMFindAccountsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccountsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMFindAccountsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24575,11 +32021,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMFindAccountsResponse.verify = function verify(message) { + CMsgAMFindAccountsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) { - if (!Array.isArray(message.steam_id)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) { + if (!$Array.isArray(message.steam_id)) return "steam_id: array expected"; for (var i = 0; i < message.steam_id.length; ++i) if (!$util.isInteger(message.steam_id[i]) && !(message.steam_id[i] && $util.isInteger(message.steam_id[i].low) && $util.isInteger(message.steam_id[i].high))) @@ -24596,23 +32046,29 @@ * @param {Object.} object Plain object * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse */ - CMsgAMFindAccountsResponse.fromObject = function fromObject(object) { + CMsgAMFindAccountsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMFindAccountsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMFindAccountsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMFindAccountsResponse(); if (object.steam_id) { - if (!Array.isArray(object.steam_id)) - throw TypeError(".CMsgAMFindAccountsResponse.steam_id: array expected"); - message.steam_id = []; + if (!$Array.isArray(object.steam_id)) + throw $TypeError(".CMsgAMFindAccountsResponse.steam_id: array expected"); + message.steam_id = $Array(object.steam_id.length); for (var i = 0; i < object.steam_id.length; ++i) if ($util.Long) - (message.steam_id[i] = $util.Long.fromValue(object.steam_id[i])).unsigned = false; + message.steam_id[i] = $util.Long.fromValue(object.steam_id[i], true); else if (typeof object.steam_id[i] === "string") - message.steam_id[i] = parseInt(object.steam_id[i], 10); + message.steam_id[i] = $parseInt(object.steam_id[i], 10); else if (typeof object.steam_id[i] === "number") message.steam_id[i] = object.steam_id[i]; else if (typeof object.steam_id[i] === "object") - message.steam_id[i] = new $util.LongBits(object.steam_id[i].low >>> 0, object.steam_id[i].high >>> 0).toNumber(); + message.steam_id[i] = new $util.LongBits(object.steam_id[i].low >>> 0, object.steam_id[i].high >>> 0).toNumber(true); } return message; }; @@ -24626,19 +32082,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMFindAccountsResponse.toObject = function toObject(message, options) { + CMsgAMFindAccountsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.steam_id = []; if (message.steam_id && message.steam_id.length) { - object.steam_id = []; + object.steam_id = $Array(message.steam_id.length); for (var j = 0; j < message.steam_id.length; ++j) - if (typeof message.steam_id[j] === "number") - object.steam_id[j] = options.longs === String ? String(message.steam_id[j]) : message.steam_id[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id[j] = typeof message.steam_id[j] === "number" ? $BigInt(message.steam_id[j]) : $util.Long.fromBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0, true).toBigInt(); + else if (typeof message.steam_id[j] === "number") + object.steam_id[j] = options.longs === $String ? $String(message.steam_id[j]) : message.steam_id[j]; else - object.steam_id[j] = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id[j]) : options.longs === Number ? new $util.LongBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0).toNumber() : message.steam_id[j]; + object.steam_id[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id[j]) : options.longs === $Number ? new $util.LongBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0).toNumber(true) : message.steam_id[j]; } return object; }; @@ -24650,8 +32112,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMFindAccountsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMFindAccountsResponse.prototype.toJSON = function() { + return CMsgAMFindAccountsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMFindAccountsResponse + * @function getTypeUrl + * @memberof CMsgAMFindAccountsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMFindAccountsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMFindAccountsResponse"; }; return CMsgAMFindAccountsResponse; @@ -24661,8 +32137,7 @@ /** * Properties of a CMsgNotifyWatchdog. - * @exports ICMsgNotifyWatchdog - * @interface ICMsgNotifyWatchdog + * @typedef {Object} CMsgNotifyWatchdog.$Properties * @property {number|null} [source] CMsgNotifyWatchdog source * @property {number|null} [alert_type] CMsgNotifyWatchdog alert_type * @property {number|null} [alert_destination] CMsgNotifyWatchdog alert_destination @@ -24670,22 +32145,36 @@ * @property {number|null} [time] CMsgNotifyWatchdog time * @property {number|null} [appid] CMsgNotifyWatchdog appid * @property {string|null} [text] CMsgNotifyWatchdog text + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgNotifyWatchdog. + * @exports ICMsgNotifyWatchdog + * @interface ICMsgNotifyWatchdog + * @augments CMsgNotifyWatchdog.$Properties + * @deprecated Use CMsgNotifyWatchdog.$Properties instead. + */ + + /** + * Shape of a CMsgNotifyWatchdog. + * @typedef {CMsgNotifyWatchdog.$Properties} CMsgNotifyWatchdog.$Shape */ /** * Constructs a new CMsgNotifyWatchdog. * @exports CMsgNotifyWatchdog * @classdesc Represents a CMsgNotifyWatchdog. - * @implements ICMsgNotifyWatchdog * @constructor - * @param {ICMsgNotifyWatchdog=} [properties] Properties to set + * @param {CMsgNotifyWatchdog.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotifyWatchdog(properties) { + var CMsgNotifyWatchdog = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgNotifyWatchdog source. @@ -24748,10 +32237,14 @@ * @function create * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog=} [properties] Properties to set + * @param {CMsgNotifyWatchdog.$Properties=} [properties] Properties to set * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog instance + * @type {{ + * (properties: CMsgNotifyWatchdog.$Shape): CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape; + * (properties?: CMsgNotifyWatchdog.$Properties): CMsgNotifyWatchdog; + * }} */ - CMsgNotifyWatchdog.create = function create(properties) { + CMsgNotifyWatchdog.create = function(properties) { return new CMsgNotifyWatchdog(properties); }; @@ -24760,27 +32253,34 @@ * @function encode * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog} message CMsgNotifyWatchdog message or plain object to encode + * @param {CMsgNotifyWatchdog.$Properties} message CMsgNotifyWatchdog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotifyWatchdog.encode = function encode(message, writer) { + CMsgNotifyWatchdog.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.source); - if (message.alert_type != null && Object.hasOwnProperty.call(message, "alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.alert_type); - if (message.alert_destination != null && Object.hasOwnProperty.call(message, "alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.alert_destination); - if (message.critical != null && Object.hasOwnProperty.call(message, "critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.critical); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.time); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.appid); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.text); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24789,12 +32289,12 @@ * @function encodeDelimited * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog} message CMsgNotifyWatchdog message or plain object to encode + * @param {CMsgNotifyWatchdog.$Properties} message CMsgNotifyWatchdog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotifyWatchdog.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotifyWatchdog.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24804,43 +32304,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog + * @returns {CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape} CMsgNotifyWatchdog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotifyWatchdog.decode = function decode(reader, length) { + CMsgNotifyWatchdog.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotifyWatchdog(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotifyWatchdog(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source = reader.uint32(); - break; - case 2: - message.alert_type = reader.uint32(); - break; - case 3: - message.alert_destination = reader.uint32(); - break; - case 4: - message.critical = reader.bool(); - break; - case 5: - message.time = reader.uint32(); - break; - case 6: - message.appid = reader.uint32(); - break; - case 7: - message.text = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.source = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.alert_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.alert_destination = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.critical = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.time = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.text = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24850,11 +32385,11 @@ * @memberof CMsgNotifyWatchdog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog + * @returns {CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape} CMsgNotifyWatchdog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotifyWatchdog.decodeDelimited = function decodeDelimited(reader) { + CMsgNotifyWatchdog.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24868,28 +32403,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotifyWatchdog.verify = function verify(message) { + CMsgNotifyWatchdog.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) if (!$util.isInteger(message.source)) return "source: integer expected"; - if (message.alert_type != null && message.hasOwnProperty("alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) if (!$util.isInteger(message.alert_type)) return "alert_type: integer expected"; - if (message.alert_destination != null && message.hasOwnProperty("alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) if (!$util.isInteger(message.alert_destination)) return "alert_destination: integer expected"; - if (message.critical != null && message.hasOwnProperty("critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) if (typeof message.critical !== "boolean") return "critical: boolean expected"; - if (message.time != null && message.hasOwnProperty("time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) if (!$util.isInteger(message.time)) return "time: integer expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) if (!$util.isString(message.text)) return "text: string expected"; return null; @@ -24903,9 +32442,15 @@ * @param {Object.} object Plain object * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog */ - CMsgNotifyWatchdog.fromObject = function fromObject(object) { + CMsgNotifyWatchdog.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotifyWatchdog) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotifyWatchdog: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotifyWatchdog(); if (object.source != null) message.source = object.source >>> 0; @@ -24914,13 +32459,13 @@ if (object.alert_destination != null) message.alert_destination = object.alert_destination >>> 0; if (object.critical != null) - message.critical = Boolean(object.critical); + message.critical = $Boolean(object.critical); if (object.time != null) message.time = object.time >>> 0; if (object.appid != null) message.appid = object.appid >>> 0; if (object.text != null) - message.text = String(object.text); + message.text = $String(object.text); return message; }; @@ -24933,9 +32478,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotifyWatchdog.toObject = function toObject(message, options) { + CMsgNotifyWatchdog.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.source = 0; @@ -24946,19 +32495,19 @@ object.appid = 0; object.text = ""; } - if (message.source != null && message.hasOwnProperty("source")) + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) object.source = message.source; - if (message.alert_type != null && message.hasOwnProperty("alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) object.alert_type = message.alert_type; - if (message.alert_destination != null && message.hasOwnProperty("alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) object.alert_destination = message.alert_destination; - if (message.critical != null && message.hasOwnProperty("critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) object.critical = message.critical; - if (message.time != null && message.hasOwnProperty("time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) object.time = message.time; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) object.text = message.text; return object; }; @@ -24970,8 +32519,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotifyWatchdog.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotifyWatchdog.prototype.toJSON = function() { + return CMsgNotifyWatchdog.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotifyWatchdog + * @function getTypeUrl + * @memberof CMsgNotifyWatchdog + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotifyWatchdog.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotifyWatchdog"; }; return CMsgNotifyWatchdog; @@ -24979,27 +32542,40 @@ $root.CMsgAMGetLicenses = (function() { + /** + * Properties of a CMsgAMGetLicenses. + * @typedef {Object} CMsgAMGetLicenses.$Properties + * @property {number|Long|null} [steamid] CMsgAMGetLicenses steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMGetLicenses. * @exports ICMsgAMGetLicenses * @interface ICMsgAMGetLicenses - * @property {number|Long|null} [steamid] CMsgAMGetLicenses steamid + * @augments CMsgAMGetLicenses.$Properties + * @deprecated Use CMsgAMGetLicenses.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetLicenses. + * @typedef {CMsgAMGetLicenses.$Properties} CMsgAMGetLicenses.$Shape */ /** * Constructs a new CMsgAMGetLicenses. * @exports CMsgAMGetLicenses * @classdesc Represents a CMsgAMGetLicenses. - * @implements ICMsgAMGetLicenses * @constructor - * @param {ICMsgAMGetLicenses=} [properties] Properties to set + * @param {CMsgAMGetLicenses.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetLicenses(properties) { + var CMsgAMGetLicenses = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetLicenses steamid. @@ -25007,17 +32583,21 @@ * @memberof CMsgAMGetLicenses * @instance */ - CMsgAMGetLicenses.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetLicenses.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgAMGetLicenses instance using the specified properties. * @function create * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses=} [properties] Properties to set + * @param {CMsgAMGetLicenses.$Properties=} [properties] Properties to set * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses instance + * @type {{ + * (properties: CMsgAMGetLicenses.$Shape): CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape; + * (properties?: CMsgAMGetLicenses.$Properties): CMsgAMGetLicenses; + * }} */ - CMsgAMGetLicenses.create = function create(properties) { + CMsgAMGetLicenses.create = function(properties) { return new CMsgAMGetLicenses(properties); }; @@ -25026,15 +32606,22 @@ * @function encode * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses} message CMsgAMGetLicenses message or plain object to encode + * @param {CMsgAMGetLicenses.$Properties} message CMsgAMGetLicenses message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicenses.encode = function encode(message, writer) { + CMsgAMGetLicenses.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25043,12 +32630,12 @@ * @function encodeDelimited * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses} message CMsgAMGetLicenses message or plain object to encode + * @param {CMsgAMGetLicenses.$Properties} message CMsgAMGetLicenses message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicenses.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetLicenses.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25058,25 +32645,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses + * @returns {CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape} CMsgAMGetLicenses * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicenses.decode = function decode(reader, length) { + CMsgAMGetLicenses.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetLicenses(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetLicenses(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25086,11 +32690,11 @@ * @memberof CMsgAMGetLicenses * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses + * @returns {CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape} CMsgAMGetLicenses * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicenses.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetLicenses.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25104,10 +32708,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetLicenses.verify = function verify(message) { + CMsgAMGetLicenses.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -25121,19 +32729,25 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses */ - CMsgAMGetLicenses.fromObject = function fromObject(object) { + CMsgAMGetLicenses.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetLicenses) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetLicenses: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetLicenses(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -25146,21 +32760,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetLicenses.toObject = function toObject(message, options) { + CMsgAMGetLicenses.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -25171,8 +32791,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetLicenses.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetLicenses.prototype.toJSON = function() { + return CMsgAMGetLicenses.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetLicenses + * @function getTypeUrl + * @memberof CMsgAMGetLicenses + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetLicenses.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetLicenses"; }; return CMsgAMGetLicenses; @@ -25182,27 +32816,40 @@ /** * Properties of a CMsgPackageLicense. - * @exports ICMsgPackageLicense - * @interface ICMsgPackageLicense + * @typedef {Object} CMsgPackageLicense.$Properties * @property {number|null} [package_id] CMsgPackageLicense package_id * @property {number|null} [time_created] CMsgPackageLicense time_created * @property {number|null} [owner_id] CMsgPackageLicense owner_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPackageLicense. + * @exports ICMsgPackageLicense + * @interface ICMsgPackageLicense + * @augments CMsgPackageLicense.$Properties + * @deprecated Use CMsgPackageLicense.$Properties instead. + */ + + /** + * Shape of a CMsgPackageLicense. + * @typedef {CMsgPackageLicense.$Properties} CMsgPackageLicense.$Shape */ /** * Constructs a new CMsgPackageLicense. * @exports CMsgPackageLicense * @classdesc Represents a CMsgPackageLicense. - * @implements ICMsgPackageLicense * @constructor - * @param {ICMsgPackageLicense=} [properties] Properties to set + * @param {CMsgPackageLicense.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPackageLicense(properties) { + var CMsgPackageLicense = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPackageLicense package_id. @@ -25233,10 +32880,14 @@ * @function create * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense=} [properties] Properties to set + * @param {CMsgPackageLicense.$Properties=} [properties] Properties to set * @returns {CMsgPackageLicense} CMsgPackageLicense instance + * @type {{ + * (properties: CMsgPackageLicense.$Shape): CMsgPackageLicense & CMsgPackageLicense.$Shape; + * (properties?: CMsgPackageLicense.$Properties): CMsgPackageLicense; + * }} */ - CMsgPackageLicense.create = function create(properties) { + CMsgPackageLicense.create = function(properties) { return new CMsgPackageLicense(properties); }; @@ -25245,19 +32896,26 @@ * @function encode * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense} message CMsgPackageLicense message or plain object to encode + * @param {CMsgPackageLicense.$Properties} message CMsgPackageLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPackageLicense.encode = function encode(message, writer) { + CMsgPackageLicense.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.package_id != null && Object.hasOwnProperty.call(message, "package_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.package_id); - if (message.time_created != null && Object.hasOwnProperty.call(message, "time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.time_created); - if (message.owner_id != null && Object.hasOwnProperty.call(message, "owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.owner_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25266,12 +32924,12 @@ * @function encodeDelimited * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense} message CMsgPackageLicense message or plain object to encode + * @param {CMsgPackageLicense.$Properties} message CMsgPackageLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPackageLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPackageLicense.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25281,31 +32939,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPackageLicense} CMsgPackageLicense + * @returns {CMsgPackageLicense & CMsgPackageLicense.$Shape} CMsgPackageLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPackageLicense.decode = function decode(reader, length) { + CMsgPackageLicense.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPackageLicense(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPackageLicense(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.package_id = reader.uint32(); - break; - case 2: - message.time_created = reader.uint32(); - break; - case 3: - message.owner_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.package_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.time_created = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.owner_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25315,11 +32996,11 @@ * @memberof CMsgPackageLicense * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPackageLicense} CMsgPackageLicense + * @returns {CMsgPackageLicense & CMsgPackageLicense.$Shape} CMsgPackageLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPackageLicense.decodeDelimited = function decodeDelimited(reader) { + CMsgPackageLicense.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25333,16 +33014,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPackageLicense.verify = function verify(message) { + CMsgPackageLicense.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) if (!$util.isInteger(message.package_id)) return "package_id: integer expected"; - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) if (!$util.isInteger(message.time_created)) return "time_created: integer expected"; - if (message.owner_id != null && message.hasOwnProperty("owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) if (!$util.isInteger(message.owner_id)) return "owner_id: integer expected"; return null; @@ -25356,9 +33041,15 @@ * @param {Object.} object Plain object * @returns {CMsgPackageLicense} CMsgPackageLicense */ - CMsgPackageLicense.fromObject = function fromObject(object) { + CMsgPackageLicense.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPackageLicense) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPackageLicense: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPackageLicense(); if (object.package_id != null) message.package_id = object.package_id >>> 0; @@ -25378,20 +33069,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPackageLicense.toObject = function toObject(message, options) { + CMsgPackageLicense.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.package_id = 0; object.time_created = 0; object.owner_id = 0; } - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) object.package_id = message.package_id; - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) object.time_created = message.time_created; - if (message.owner_id != null && message.hasOwnProperty("owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) object.owner_id = message.owner_id; return object; }; @@ -25403,8 +33098,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPackageLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPackageLicense.prototype.toJSON = function() { + return CMsgPackageLicense.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPackageLicense + * @function getTypeUrl + * @memberof CMsgPackageLicense + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPackageLicense.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPackageLicense"; }; return CMsgPackageLicense; @@ -25412,33 +33121,46 @@ $root.CMsgAMGetLicensesResponse = (function() { + /** + * Properties of a CMsgAMGetLicensesResponse. + * @typedef {Object} CMsgAMGetLicensesResponse.$Properties + * @property {Array.|null} [license] CMsgAMGetLicensesResponse license + * @property {number|null} [result] CMsgAMGetLicensesResponse result + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMGetLicensesResponse. * @exports ICMsgAMGetLicensesResponse * @interface ICMsgAMGetLicensesResponse - * @property {Array.|null} [license] CMsgAMGetLicensesResponse license - * @property {number|null} [result] CMsgAMGetLicensesResponse result + * @augments CMsgAMGetLicensesResponse.$Properties + * @deprecated Use CMsgAMGetLicensesResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetLicensesResponse. + * @typedef {CMsgAMGetLicensesResponse.$Properties} CMsgAMGetLicensesResponse.$Shape */ /** * Constructs a new CMsgAMGetLicensesResponse. * @exports CMsgAMGetLicensesResponse * @classdesc Represents a CMsgAMGetLicensesResponse. - * @implements ICMsgAMGetLicensesResponse * @constructor - * @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set + * @param {CMsgAMGetLicensesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetLicensesResponse(properties) { + var CMsgAMGetLicensesResponse = function (properties) { this.license = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetLicensesResponse license. - * @member {Array.} license + * @member {Array.} license * @memberof CMsgAMGetLicensesResponse * @instance */ @@ -25457,10 +33179,14 @@ * @function create * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set + * @param {CMsgAMGetLicensesResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse instance + * @type {{ + * (properties: CMsgAMGetLicensesResponse.$Shape): CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape; + * (properties?: CMsgAMGetLicensesResponse.$Properties): CMsgAMGetLicensesResponse; + * }} */ - CMsgAMGetLicensesResponse.create = function create(properties) { + CMsgAMGetLicensesResponse.create = function(properties) { return new CMsgAMGetLicensesResponse(properties); }; @@ -25469,18 +33195,25 @@ * @function encode * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse} message CMsgAMGetLicensesResponse message or plain object to encode + * @param {CMsgAMGetLicensesResponse.$Properties} message CMsgAMGetLicensesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicensesResponse.encode = function encode(message, writer) { + CMsgAMGetLicensesResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.license != null && message.license.length) for (var i = 0; i < message.license.length; ++i) - $root.CMsgPackageLicense.encode(message.license[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.CMsgPackageLicense.encode(message.license[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.result); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25489,12 +33222,12 @@ * @function encodeDelimited * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse} message CMsgAMGetLicensesResponse message or plain object to encode + * @param {CMsgAMGetLicensesResponse.$Properties} message CMsgAMGetLicensesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicensesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetLicensesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25504,30 +33237,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse + * @returns {CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape} CMsgAMGetLicensesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicensesResponse.decode = function decode(reader, length) { + CMsgAMGetLicensesResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetLicensesResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetLicensesResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.license && message.license.length)) - message.license = []; - message.license.push($root.CMsgPackageLicense.decode(reader, reader.uint32())); - break; - case 2: - message.result = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.license && message.license.length)) + message.license = []; + message.license.push($root.CMsgPackageLicense.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25537,11 +33290,11 @@ * @memberof CMsgAMGetLicensesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse + * @returns {CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape} CMsgAMGetLicensesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicensesResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetLicensesResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25555,19 +33308,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetLicensesResponse.verify = function verify(message) { + CMsgAMGetLicensesResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.license != null && message.hasOwnProperty("license")) { - if (!Array.isArray(message.license)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.license != null && $Object.hasOwnProperty.call(message, "license")) { + if (!$Array.isArray(message.license)) return "license: array expected"; for (var i = 0; i < message.license.length; ++i) { - var error = $root.CMsgPackageLicense.verify(message.license[i]); + var error = $root.CMsgPackageLicense.verify(message.license[i], _depth + 1); if (error) return "license." + error; } } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; return null; @@ -25581,18 +33338,24 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse */ - CMsgAMGetLicensesResponse.fromObject = function fromObject(object) { + CMsgAMGetLicensesResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetLicensesResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetLicensesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetLicensesResponse(); if (object.license) { - if (!Array.isArray(object.license)) - throw TypeError(".CMsgAMGetLicensesResponse.license: array expected"); - message.license = []; + if (!$Array.isArray(object.license)) + throw $TypeError(".CMsgAMGetLicensesResponse.license: array expected"); + message.license = $Array(object.license.length); for (var i = 0; i < object.license.length; ++i) { - if (typeof object.license[i] !== "object") - throw TypeError(".CMsgAMGetLicensesResponse.license: object expected"); - message.license[i] = $root.CMsgPackageLicense.fromObject(object.license[i]); + if (!$util.isObject(object.license[i])) + throw $TypeError(".CMsgAMGetLicensesResponse.license: object expected"); + message.license[i] = $root.CMsgPackageLicense.fromObject(object.license[i], _depth + 1); } } if (object.result != null) @@ -25609,20 +33372,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetLicensesResponse.toObject = function toObject(message, options) { + CMsgAMGetLicensesResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.license = []; if (options.defaults) object.result = 0; if (message.license && message.license.length) { - object.license = []; + object.license = $Array(message.license.length); for (var j = 0; j < message.license.length; ++j) - object.license[j] = $root.CMsgPackageLicense.toObject(message.license[j], options); + object.license[j] = $root.CMsgPackageLicense.toObject(message.license[j], options, _depth + 1); } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; return object; }; @@ -25634,8 +33401,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetLicensesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetLicensesResponse.prototype.toJSON = function() { + return CMsgAMGetLicensesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetLicensesResponse + * @function getTypeUrl + * @memberof CMsgAMGetLicensesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetLicensesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetLicensesResponse"; }; return CMsgAMGetLicensesResponse; @@ -25645,28 +33426,41 @@ /** * Properties of a CMsgAMGetUserGameStats. - * @exports ICMsgAMGetUserGameStats - * @interface ICMsgAMGetUserGameStats + * @typedef {Object} CMsgAMGetUserGameStats.$Properties * @property {number|Long|null} [steam_id] CMsgAMGetUserGameStats steam_id * @property {number|Long|null} [game_id] CMsgAMGetUserGameStats game_id * @property {Array.|null} [stats] CMsgAMGetUserGameStats stats + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGetUserGameStats. + * @exports ICMsgAMGetUserGameStats + * @interface ICMsgAMGetUserGameStats + * @augments CMsgAMGetUserGameStats.$Properties + * @deprecated Use CMsgAMGetUserGameStats.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetUserGameStats. + * @typedef {CMsgAMGetUserGameStats.$Properties} CMsgAMGetUserGameStats.$Shape */ /** * Constructs a new CMsgAMGetUserGameStats. * @exports CMsgAMGetUserGameStats * @classdesc Represents a CMsgAMGetUserGameStats. - * @implements ICMsgAMGetUserGameStats * @constructor - * @param {ICMsgAMGetUserGameStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetUserGameStats(properties) { + var CMsgAMGetUserGameStats = function (properties) { this.stats = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetUserGameStats steam_id. @@ -25674,7 +33468,7 @@ * @memberof CMsgAMGetUserGameStats * @instance */ - CMsgAMGetUserGameStats.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStats.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStats game_id. @@ -25682,7 +33476,7 @@ * @memberof CMsgAMGetUserGameStats * @instance */ - CMsgAMGetUserGameStats.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStats.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStats stats. @@ -25697,10 +33491,14 @@ * @function create * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStats.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats instance + * @type {{ + * (properties: CMsgAMGetUserGameStats.$Shape): CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape; + * (properties?: CMsgAMGetUserGameStats.$Properties): CMsgAMGetUserGameStats; + * }} */ - CMsgAMGetUserGameStats.create = function create(properties) { + CMsgAMGetUserGameStats.create = function(properties) { return new CMsgAMGetUserGameStats(properties); }; @@ -25709,20 +33507,27 @@ * @function encode * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats} message CMsgAMGetUserGameStats message or plain object to encode + * @param {CMsgAMGetUserGameStats.$Properties} message CMsgAMGetUserGameStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStats.encode = function encode(message, writer) { + CMsgAMGetUserGameStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.game_id != null && Object.hasOwnProperty.call(message, "game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.game_id); if (message.stats != null && message.stats.length) for (var i = 0; i < message.stats.length; ++i) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stats[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25731,12 +33536,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats} message CMsgAMGetUserGameStats message or plain object to encode + * @param {CMsgAMGetUserGameStats.$Properties} message CMsgAMGetUserGameStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetUserGameStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25746,38 +33551,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats + * @returns {CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape} CMsgAMGetUserGameStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStats.decode = function decode(reader, length) { + CMsgAMGetUserGameStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - message.game_id = reader.fixed64(); - break; - case 3: - if (!(message.stats && message.stats.length)) - message.stats = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.stats.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.game_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.stats && message.stats.length)) + message.stats = []; + reader.uint32s(message.stats); + continue; + } + if (wireType !== 0) + break; + if (!(message.stats && message.stats.length)) + message.stats = []; message.stats.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25787,11 +33616,11 @@ * @memberof CMsgAMGetUserGameStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats + * @returns {CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape} CMsgAMGetUserGameStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStats.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetUserGameStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25805,17 +33634,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetUserGameStats.verify = function verify(message) { + CMsgAMGetUserGameStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.game_id != null && message.hasOwnProperty("game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) if (!$util.isInteger(message.game_id) && !(message.game_id && $util.isInteger(message.game_id.low) && $util.isInteger(message.game_id.high))) return "game_id: integer|Long expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - if (!Array.isArray(message.stats)) + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) { + if (!$Array.isArray(message.stats)) return "stats: array expected"; for (var i = 0; i < message.stats.length; ++i) if (!$util.isInteger(message.stats[i])) @@ -25832,32 +33665,38 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats */ - CMsgAMGetUserGameStats.fromObject = function fromObject(object) { + CMsgAMGetUserGameStats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStats(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.game_id != null) if ($util.Long) - (message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false; + message.game_id = $util.Long.fromValue(object.game_id, true); else if (typeof object.game_id === "string") - message.game_id = parseInt(object.game_id, 10); + message.game_id = $parseInt(object.game_id, 10); else if (typeof object.game_id === "number") message.game_id = object.game_id; else if (typeof object.game_id === "object") - message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(); + message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(true); if (object.stats) { - if (!Array.isArray(object.stats)) - throw TypeError(".CMsgAMGetUserGameStats.stats: array expected"); - message.stats = []; + if (!$Array.isArray(object.stats)) + throw $TypeError(".CMsgAMGetUserGameStats.stats: array expected"); + message.stats = $Array(object.stats.length); for (var i = 0; i < object.stats.length; ++i) message.stats[i] = object.stats[i] >>> 0; } @@ -25873,36 +33712,44 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetUserGameStats.toObject = function toObject(message, options) { + CMsgAMGetUserGameStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.stats = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.game_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.game_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.game_id = options.longs === String ? "0" : 0; + object.game_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.game_id != null && message.hasOwnProperty("game_id")) - if (typeof message.game_id === "number") - object.game_id = options.longs === String ? String(message.game_id) : message.game_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.game_id = typeof message.game_id === "number" ? $BigInt(message.game_id) : $util.Long.fromBits(message.game_id.low >>> 0, message.game_id.high >>> 0, true).toBigInt(); + else if (typeof message.game_id === "number") + object.game_id = options.longs === $String ? $String(message.game_id) : message.game_id; else - object.game_id = options.longs === String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber() : message.game_id; + object.game_id = options.longs === $String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === $Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber(true) : message.game_id; if (message.stats && message.stats.length) { - object.stats = []; + object.stats = $Array(message.stats.length); for (var j = 0; j < message.stats.length; ++j) object.stats[j] = message.stats[j]; } @@ -25916,8 +33763,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetUserGameStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetUserGameStats.prototype.toJSON = function() { + return CMsgAMGetUserGameStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetUserGameStats + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetUserGameStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStats"; }; return CMsgAMGetUserGameStats; @@ -25927,31 +33788,44 @@ /** * Properties of a CMsgAMGetUserGameStatsResponse. - * @exports ICMsgAMGetUserGameStatsResponse - * @interface ICMsgAMGetUserGameStatsResponse + * @typedef {Object} CMsgAMGetUserGameStatsResponse.$Properties * @property {number|Long|null} [steam_id] CMsgAMGetUserGameStatsResponse steam_id * @property {number|Long|null} [game_id] CMsgAMGetUserGameStatsResponse game_id * @property {number|null} [eresult] CMsgAMGetUserGameStatsResponse eresult - * @property {Array.|null} [stats] CMsgAMGetUserGameStatsResponse stats - * @property {Array.|null} [achievement_blocks] CMsgAMGetUserGameStatsResponse achievement_blocks + * @property {Array.|null} [stats] CMsgAMGetUserGameStatsResponse stats + * @property {Array.|null} [achievement_blocks] CMsgAMGetUserGameStatsResponse achievement_blocks + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGetUserGameStatsResponse. + * @exports ICMsgAMGetUserGameStatsResponse + * @interface ICMsgAMGetUserGameStatsResponse + * @augments CMsgAMGetUserGameStatsResponse.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetUserGameStatsResponse. + * @typedef {CMsgAMGetUserGameStatsResponse.$Properties} CMsgAMGetUserGameStatsResponse.$Shape */ /** * Constructs a new CMsgAMGetUserGameStatsResponse. * @exports CMsgAMGetUserGameStatsResponse * @classdesc Represents a CMsgAMGetUserGameStatsResponse. - * @implements ICMsgAMGetUserGameStatsResponse * @constructor - * @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetUserGameStatsResponse(properties) { + var CMsgAMGetUserGameStatsResponse = function (properties) { this.stats = []; this.achievement_blocks = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetUserGameStatsResponse steam_id. @@ -25959,7 +33833,7 @@ * @memberof CMsgAMGetUserGameStatsResponse * @instance */ - CMsgAMGetUserGameStatsResponse.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStatsResponse.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStatsResponse game_id. @@ -25967,7 +33841,7 @@ * @memberof CMsgAMGetUserGameStatsResponse * @instance */ - CMsgAMGetUserGameStatsResponse.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStatsResponse.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStatsResponse eresult. @@ -25979,7 +33853,7 @@ /** * CMsgAMGetUserGameStatsResponse stats. - * @member {Array.} stats + * @member {Array.} stats * @memberof CMsgAMGetUserGameStatsResponse * @instance */ @@ -25987,7 +33861,7 @@ /** * CMsgAMGetUserGameStatsResponse achievement_blocks. - * @member {Array.} achievement_blocks + * @member {Array.} achievement_blocks * @memberof CMsgAMGetUserGameStatsResponse * @instance */ @@ -25998,10 +33872,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.$Shape): CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.$Properties): CMsgAMGetUserGameStatsResponse; + * }} */ - CMsgAMGetUserGameStatsResponse.create = function create(properties) { + CMsgAMGetUserGameStatsResponse.create = function(properties) { return new CMsgAMGetUserGameStatsResponse(properties); }; @@ -26010,25 +33888,32 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse} message CMsgAMGetUserGameStatsResponse message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.$Properties} message CMsgAMGetUserGameStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStatsResponse.encode = function encode(message, writer) { + CMsgAMGetUserGameStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.game_id != null && Object.hasOwnProperty.call(message, "game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.game_id); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.eresult); if (message.stats != null && message.stats.length) for (var i = 0; i < message.stats.length; ++i) - $root.CMsgAMGetUserGameStatsResponse.Stats.encode(message.stats[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgAMGetUserGameStatsResponse.Stats.encode(message.stats[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.achievement_blocks != null && message.achievement_blocks.length) for (var i = 0; i < message.achievement_blocks.length; ++i) - $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.encode(message.achievement_blocks[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.encode(message.achievement_blocks[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26037,12 +33922,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse} message CMsgAMGetUserGameStatsResponse message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.$Properties} message CMsgAMGetUserGameStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetUserGameStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26052,41 +33937,70 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse + * @returns {CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape} CMsgAMGetUserGameStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStatsResponse.decode = function decode(reader, length) { + CMsgAMGetUserGameStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.game_id = reader.fixed64(); - break; - case 3: - message.eresult = reader.int32(); - break; - case 4: - if (!(message.stats && message.stats.length)) - message.stats = []; - message.stats.push($root.CMsgAMGetUserGameStatsResponse.Stats.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.achievement_blocks && message.achievement_blocks.length)) - message.achievement_blocks = []; - message.achievement_blocks.push($root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.game_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.stats && message.stats.length)) + message.stats = []; + message.stats.push($root.CMsgAMGetUserGameStatsResponse.Stats.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.achievement_blocks && message.achievement_blocks.length)) + message.achievement_blocks = []; + message.achievement_blocks.push($root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26096,11 +34010,11 @@ * @memberof CMsgAMGetUserGameStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse + * @returns {CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape} CMsgAMGetUserGameStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetUserGameStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26114,32 +34028,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetUserGameStatsResponse.verify = function verify(message) { + CMsgAMGetUserGameStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.game_id != null && message.hasOwnProperty("game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) if (!$util.isInteger(message.game_id) && !(message.game_id && $util.isInteger(message.game_id.low) && $util.isInteger(message.game_id.high))) return "game_id: integer|Long expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - if (!Array.isArray(message.stats)) + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) { + if (!$Array.isArray(message.stats)) return "stats: array expected"; for (var i = 0; i < message.stats.length; ++i) { - var error = $root.CMsgAMGetUserGameStatsResponse.Stats.verify(message.stats[i]); + var error = $root.CMsgAMGetUserGameStatsResponse.Stats.verify(message.stats[i], _depth + 1); if (error) return "stats." + error; } } - if (message.achievement_blocks != null && message.hasOwnProperty("achievement_blocks")) { - if (!Array.isArray(message.achievement_blocks)) + if (message.achievement_blocks != null && $Object.hasOwnProperty.call(message, "achievement_blocks")) { + if (!$Array.isArray(message.achievement_blocks)) return "achievement_blocks: array expected"; for (var i = 0; i < message.achievement_blocks.length; ++i) { - var error = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify(message.achievement_blocks[i]); + var error = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify(message.achievement_blocks[i], _depth + 1); if (error) return "achievement_blocks." + error; } @@ -26155,48 +34073,54 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse */ - CMsgAMGetUserGameStatsResponse.fromObject = function fromObject(object) { + CMsgAMGetUserGameStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.game_id != null) if ($util.Long) - (message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false; + message.game_id = $util.Long.fromValue(object.game_id, true); else if (typeof object.game_id === "string") - message.game_id = parseInt(object.game_id, 10); + message.game_id = $parseInt(object.game_id, 10); else if (typeof object.game_id === "number") message.game_id = object.game_id; else if (typeof object.game_id === "object") - message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(); + message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(true); if (object.eresult != null) message.eresult = object.eresult | 0; if (object.stats) { - if (!Array.isArray(object.stats)) - throw TypeError(".CMsgAMGetUserGameStatsResponse.stats: array expected"); - message.stats = []; + if (!$Array.isArray(object.stats)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.stats: array expected"); + message.stats = $Array(object.stats.length); for (var i = 0; i < object.stats.length; ++i) { - if (typeof object.stats[i] !== "object") - throw TypeError(".CMsgAMGetUserGameStatsResponse.stats: object expected"); - message.stats[i] = $root.CMsgAMGetUserGameStatsResponse.Stats.fromObject(object.stats[i]); + if (!$util.isObject(object.stats[i])) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.stats: object expected"); + message.stats[i] = $root.CMsgAMGetUserGameStatsResponse.Stats.fromObject(object.stats[i], _depth + 1); } } if (object.achievement_blocks) { - if (!Array.isArray(object.achievement_blocks)) - throw TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: array expected"); - message.achievement_blocks = []; + if (!$Array.isArray(object.achievement_blocks)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: array expected"); + message.achievement_blocks = $Array(object.achievement_blocks.length); for (var i = 0; i < object.achievement_blocks.length; ++i) { - if (typeof object.achievement_blocks[i] !== "object") - throw TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: object expected"); - message.achievement_blocks[i] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.fromObject(object.achievement_blocks[i]); + if (!$util.isObject(object.achievement_blocks[i])) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: object expected"); + message.achievement_blocks[i] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.fromObject(object.achievement_blocks[i], _depth + 1); } } return message; @@ -26211,9 +34135,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetUserGameStatsResponse.toObject = function toObject(message, options) { + CMsgAMGetUserGameStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.stats = []; @@ -26221,38 +34149,42 @@ } if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.game_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.game_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.game_id = options.longs === String ? "0" : 0; + object.game_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.eresult = 2; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.game_id != null && message.hasOwnProperty("game_id")) - if (typeof message.game_id === "number") - object.game_id = options.longs === String ? String(message.game_id) : message.game_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.game_id = typeof message.game_id === "number" ? $BigInt(message.game_id) : $util.Long.fromBits(message.game_id.low >>> 0, message.game_id.high >>> 0, true).toBigInt(); + else if (typeof message.game_id === "number") + object.game_id = options.longs === $String ? $String(message.game_id) : message.game_id; else - object.game_id = options.longs === String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber() : message.game_id; - if (message.eresult != null && message.hasOwnProperty("eresult")) + object.game_id = options.longs === $String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === $Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber(true) : message.game_id; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; if (message.stats && message.stats.length) { - object.stats = []; + object.stats = $Array(message.stats.length); for (var j = 0; j < message.stats.length; ++j) - object.stats[j] = $root.CMsgAMGetUserGameStatsResponse.Stats.toObject(message.stats[j], options); + object.stats[j] = $root.CMsgAMGetUserGameStatsResponse.Stats.toObject(message.stats[j], options, _depth + 1); } if (message.achievement_blocks && message.achievement_blocks.length) { - object.achievement_blocks = []; + object.achievement_blocks = $Array(message.achievement_blocks.length); for (var j = 0; j < message.achievement_blocks.length; ++j) - object.achievement_blocks[j] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.toObject(message.achievement_blocks[j], options); + object.achievement_blocks[j] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.toObject(message.achievement_blocks[j], options, _depth + 1); } return object; }; @@ -26264,34 +34196,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetUserGameStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetUserGameStatsResponse.prototype.toJSON = function() { + return CMsgAMGetUserGameStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetUserGameStatsResponse + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetUserGameStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse"; }; CMsgAMGetUserGameStatsResponse.Stats = (function() { /** * Properties of a Stats. - * @memberof CMsgAMGetUserGameStatsResponse - * @interface IStats + * @typedef {Object} CMsgAMGetUserGameStatsResponse.Stats.$Properties * @property {number|null} [stat_id] Stats stat_id * @property {number|null} [stat_value] Stats stat_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Stats. + * @memberof CMsgAMGetUserGameStatsResponse + * @interface IStats + * @augments CMsgAMGetUserGameStatsResponse.Stats.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.Stats.$Properties instead. + */ + + /** + * Shape of a Stats. + * @typedef {CMsgAMGetUserGameStatsResponse.Stats.$Properties} CMsgAMGetUserGameStatsResponse.Stats.$Shape */ /** * Constructs a new Stats. * @memberof CMsgAMGetUserGameStatsResponse * @classdesc Represents a Stats. - * @implements IStats * @constructor - * @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Stats(properties) { + var Stats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Stats stat_id. @@ -26314,10 +34273,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.Stats.$Shape): CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.Stats.$Properties): CMsgAMGetUserGameStatsResponse.Stats; + * }} */ - Stats.create = function create(properties) { + Stats.create = function(properties) { return new Stats(properties); }; @@ -26326,17 +34289,24 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats} message Stats message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stats.encode = function encode(message, writer) { + Stats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.stat_id != null && Object.hasOwnProperty.call(message, "stat_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.stat_id); - if (message.stat_value != null && Object.hasOwnProperty.call(message, "stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.stat_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26345,12 +34315,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats} message Stats message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Stats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26360,28 +34330,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats + * @returns {CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stats.decode = function decode(reader, length) { + Stats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse.Stats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse.Stats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stat_id = reader.uint32(); - break; - case 2: - message.stat_value = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.stat_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.stat_value = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26391,11 +34381,11 @@ * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats + * @returns {CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stats.decodeDelimited = function decodeDelimited(reader) { + Stats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26409,13 +34399,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Stats.verify = function verify(message) { + Stats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.stat_id != null && message.hasOwnProperty("stat_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) if (!$util.isInteger(message.stat_id)) return "stat_id: integer expected"; - if (message.stat_value != null && message.hasOwnProperty("stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) if (!$util.isInteger(message.stat_value)) return "stat_value: integer expected"; return null; @@ -26429,9 +34423,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats */ - Stats.fromObject = function fromObject(object) { + Stats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Stats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.Stats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse.Stats(); if (object.stat_id != null) message.stat_id = object.stat_id >>> 0; @@ -26449,17 +34449,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Stats.toObject = function toObject(message, options) { + Stats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.stat_id = 0; object.stat_value = 0; } - if (message.stat_id != null && message.hasOwnProperty("stat_id")) + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) object.stat_id = message.stat_id; - if (message.stat_value != null && message.hasOwnProperty("stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) object.stat_value = message.stat_value; return object; }; @@ -26471,8 +34475,22 @@ * @instance * @returns {Object.} JSON object */ - Stats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Stats.prototype.toJSON = function() { + return Stats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Stats + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse.Stats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Stats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse.Stats"; }; return Stats; @@ -26482,27 +34500,40 @@ /** * Properties of an Achievement_Blocks. - * @memberof CMsgAMGetUserGameStatsResponse - * @interface IAchievement_Blocks + * @typedef {Object} CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties * @property {number|null} [achievement_id] Achievement_Blocks achievement_id * @property {number|null} [achievement_bit_id] Achievement_Blocks achievement_bit_id * @property {number|null} [unlock_time] Achievement_Blocks unlock_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Achievement_Blocks. + * @memberof CMsgAMGetUserGameStatsResponse + * @interface IAchievement_Blocks + * @augments CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties instead. + */ + + /** + * Shape of an Achievement_Blocks. + * @typedef {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape */ /** * Constructs a new Achievement_Blocks. * @memberof CMsgAMGetUserGameStatsResponse * @classdesc Represents an Achievement_Blocks. - * @implements IAchievement_Blocks * @constructor - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Achievement_Blocks(properties) { + var Achievement_Blocks = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Achievement_Blocks achievement_id. @@ -26533,10 +34564,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape): CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties): CMsgAMGetUserGameStatsResponse.Achievement_Blocks; + * }} */ - Achievement_Blocks.create = function create(properties) { + Achievement_Blocks.create = function(properties) { return new Achievement_Blocks(properties); }; @@ -26545,19 +34580,26 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} message Achievement_Blocks message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} message Achievement_Blocks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Achievement_Blocks.encode = function encode(message, writer) { + Achievement_Blocks.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.achievement_id != null && Object.hasOwnProperty.call(message, "achievement_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.achievement_id); - if (message.achievement_bit_id != null && Object.hasOwnProperty.call(message, "achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.achievement_bit_id); - if (message.unlock_time != null && Object.hasOwnProperty.call(message, "unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.unlock_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26566,12 +34608,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} message Achievement_Blocks message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} message Achievement_Blocks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Achievement_Blocks.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Achievement_Blocks.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26581,31 +34623,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks + * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape} Achievement_Blocks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Achievement_Blocks.decode = function decode(reader, length) { + Achievement_Blocks.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.achievement_id = reader.uint32(); - break; - case 2: - message.achievement_bit_id = reader.uint32(); - break; - case 3: - message.unlock_time = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.achievement_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.achievement_bit_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.unlock_time = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26615,11 +34680,11 @@ * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks + * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape} Achievement_Blocks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Achievement_Blocks.decodeDelimited = function decodeDelimited(reader) { + Achievement_Blocks.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26633,16 +34698,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Achievement_Blocks.verify = function verify(message) { + Achievement_Blocks.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.achievement_id != null && message.hasOwnProperty("achievement_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) if (!$util.isInteger(message.achievement_id)) return "achievement_id: integer expected"; - if (message.achievement_bit_id != null && message.hasOwnProperty("achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) if (!$util.isInteger(message.achievement_bit_id)) return "achievement_bit_id: integer expected"; - if (message.unlock_time != null && message.hasOwnProperty("unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) if (!$util.isInteger(message.unlock_time)) return "unlock_time: integer expected"; return null; @@ -26656,9 +34725,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks */ - Achievement_Blocks.fromObject = function fromObject(object) { + Achievement_Blocks.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.Achievement_Blocks: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); if (object.achievement_id != null) message.achievement_id = object.achievement_id >>> 0; @@ -26678,20 +34753,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Achievement_Blocks.toObject = function toObject(message, options) { + Achievement_Blocks.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.achievement_id = 0; object.achievement_bit_id = 0; object.unlock_time = 0; } - if (message.achievement_id != null && message.hasOwnProperty("achievement_id")) + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) object.achievement_id = message.achievement_id; - if (message.achievement_bit_id != null && message.hasOwnProperty("achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) object.achievement_bit_id = message.achievement_bit_id; - if (message.unlock_time != null && message.hasOwnProperty("unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) object.unlock_time = message.unlock_time; return object; }; @@ -26703,8 +34782,22 @@ * @instance * @returns {Object.} JSON object */ - Achievement_Blocks.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Achievement_Blocks.prototype.toJSON = function() { + return Achievement_Blocks.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Achievement_Blocks + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Achievement_Blocks.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse.Achievement_Blocks"; }; return Achievement_Blocks; @@ -26717,26 +34810,39 @@ /** * Properties of a CMsgGCGetCommandList. - * @exports ICMsgGCGetCommandList - * @interface ICMsgGCGetCommandList + * @typedef {Object} CMsgGCGetCommandList.$Properties * @property {number|null} [app_id] CMsgGCGetCommandList app_id * @property {string|null} [command_prefix] CMsgGCGetCommandList command_prefix + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetCommandList. + * @exports ICMsgGCGetCommandList + * @interface ICMsgGCGetCommandList + * @augments CMsgGCGetCommandList.$Properties + * @deprecated Use CMsgGCGetCommandList.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetCommandList. + * @typedef {CMsgGCGetCommandList.$Properties} CMsgGCGetCommandList.$Shape */ /** * Constructs a new CMsgGCGetCommandList. * @exports CMsgGCGetCommandList * @classdesc Represents a CMsgGCGetCommandList. - * @implements ICMsgGCGetCommandList * @constructor - * @param {ICMsgGCGetCommandList=} [properties] Properties to set + * @param {CMsgGCGetCommandList.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetCommandList(properties) { + var CMsgGCGetCommandList = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetCommandList app_id. @@ -26759,10 +34865,14 @@ * @function create * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList=} [properties] Properties to set + * @param {CMsgGCGetCommandList.$Properties=} [properties] Properties to set * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList instance + * @type {{ + * (properties: CMsgGCGetCommandList.$Shape): CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape; + * (properties?: CMsgGCGetCommandList.$Properties): CMsgGCGetCommandList; + * }} */ - CMsgGCGetCommandList.create = function create(properties) { + CMsgGCGetCommandList.create = function(properties) { return new CMsgGCGetCommandList(properties); }; @@ -26771,17 +34881,24 @@ * @function encode * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList} message CMsgGCGetCommandList message or plain object to encode + * @param {CMsgGCGetCommandList.$Properties} message CMsgGCGetCommandList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandList.encode = function encode(message, writer) { + CMsgGCGetCommandList.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_id); - if (message.command_prefix != null && Object.hasOwnProperty.call(message, "command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.command_prefix); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26790,12 +34907,12 @@ * @function encodeDelimited * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList} message CMsgGCGetCommandList message or plain object to encode + * @param {CMsgGCGetCommandList.$Properties} message CMsgGCGetCommandList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetCommandList.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26805,28 +34922,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList + * @returns {CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape} CMsgGCGetCommandList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandList.decode = function decode(reader, length) { + CMsgGCGetCommandList.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetCommandList(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetCommandList(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_id = reader.uint32(); - break; - case 2: - message.command_prefix = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.command_prefix = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26836,11 +34973,11 @@ * @memberof CMsgGCGetCommandList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList + * @returns {CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape} CMsgGCGetCommandList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandList.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetCommandList.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26854,13 +34991,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetCommandList.verify = function verify(message) { + CMsgGCGetCommandList.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.command_prefix != null && message.hasOwnProperty("command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) if (!$util.isString(message.command_prefix)) return "command_prefix: string expected"; return null; @@ -26874,14 +35015,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList */ - CMsgGCGetCommandList.fromObject = function fromObject(object) { + CMsgGCGetCommandList.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetCommandList) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetCommandList: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetCommandList(); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.command_prefix != null) - message.command_prefix = String(object.command_prefix); + message.command_prefix = $String(object.command_prefix); return message; }; @@ -26894,17 +35041,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetCommandList.toObject = function toObject(message, options) { + CMsgGCGetCommandList.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.app_id = 0; object.command_prefix = ""; } - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.command_prefix != null && message.hasOwnProperty("command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) object.command_prefix = message.command_prefix; return object; }; @@ -26916,8 +35067,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetCommandList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetCommandList.prototype.toJSON = function() { + return CMsgGCGetCommandList.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetCommandList + * @function getTypeUrl + * @memberof CMsgGCGetCommandList + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetCommandList.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetCommandList"; }; return CMsgGCGetCommandList; @@ -26925,28 +35090,41 @@ $root.CMsgGCGetCommandListResponse = (function() { + /** + * Properties of a CMsgGCGetCommandListResponse. + * @typedef {Object} CMsgGCGetCommandListResponse.$Properties + * @property {Array.|null} [command_name] CMsgGCGetCommandListResponse command_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetCommandListResponse. * @exports ICMsgGCGetCommandListResponse * @interface ICMsgGCGetCommandListResponse - * @property {Array.|null} [command_name] CMsgGCGetCommandListResponse command_name + * @augments CMsgGCGetCommandListResponse.$Properties + * @deprecated Use CMsgGCGetCommandListResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetCommandListResponse. + * @typedef {CMsgGCGetCommandListResponse.$Properties} CMsgGCGetCommandListResponse.$Shape */ /** * Constructs a new CMsgGCGetCommandListResponse. * @exports CMsgGCGetCommandListResponse * @classdesc Represents a CMsgGCGetCommandListResponse. - * @implements ICMsgGCGetCommandListResponse * @constructor - * @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set + * @param {CMsgGCGetCommandListResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetCommandListResponse(properties) { + var CMsgGCGetCommandListResponse = function (properties) { this.command_name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetCommandListResponse command_name. @@ -26961,10 +35139,14 @@ * @function create * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set + * @param {CMsgGCGetCommandListResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse instance + * @type {{ + * (properties: CMsgGCGetCommandListResponse.$Shape): CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape; + * (properties?: CMsgGCGetCommandListResponse.$Properties): CMsgGCGetCommandListResponse; + * }} */ - CMsgGCGetCommandListResponse.create = function create(properties) { + CMsgGCGetCommandListResponse.create = function(properties) { return new CMsgGCGetCommandListResponse(properties); }; @@ -26973,16 +35155,23 @@ * @function encode * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse} message CMsgGCGetCommandListResponse message or plain object to encode + * @param {CMsgGCGetCommandListResponse.$Properties} message CMsgGCGetCommandListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandListResponse.encode = function encode(message, writer) { + CMsgGCGetCommandListResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.command_name != null && message.command_name.length) for (var i = 0; i < message.command_name.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.command_name[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26991,12 +35180,12 @@ * @function encodeDelimited * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse} message CMsgGCGetCommandListResponse message or plain object to encode + * @param {CMsgGCGetCommandListResponse.$Properties} message CMsgGCGetCommandListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetCommandListResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27006,27 +35195,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse + * @returns {CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape} CMsgGCGetCommandListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandListResponse.decode = function decode(reader, length) { + CMsgGCGetCommandListResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetCommandListResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetCommandListResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.command_name && message.command_name.length)) - message.command_name = []; - message.command_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.command_name && message.command_name.length)) + message.command_name = []; + message.command_name.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27036,11 +35242,11 @@ * @memberof CMsgGCGetCommandListResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse + * @returns {CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape} CMsgGCGetCommandListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandListResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetCommandListResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27054,11 +35260,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetCommandListResponse.verify = function verify(message) { + CMsgGCGetCommandListResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.command_name != null && message.hasOwnProperty("command_name")) { - if (!Array.isArray(message.command_name)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.command_name != null && $Object.hasOwnProperty.call(message, "command_name")) { + if (!$Array.isArray(message.command_name)) return "command_name: array expected"; for (var i = 0; i < message.command_name.length; ++i) if (!$util.isString(message.command_name[i])) @@ -27075,16 +35285,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse */ - CMsgGCGetCommandListResponse.fromObject = function fromObject(object) { + CMsgGCGetCommandListResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetCommandListResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetCommandListResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetCommandListResponse(); if (object.command_name) { - if (!Array.isArray(object.command_name)) - throw TypeError(".CMsgGCGetCommandListResponse.command_name: array expected"); - message.command_name = []; + if (!$Array.isArray(object.command_name)) + throw $TypeError(".CMsgGCGetCommandListResponse.command_name: array expected"); + message.command_name = $Array(object.command_name.length); for (var i = 0; i < object.command_name.length; ++i) - message.command_name[i] = String(object.command_name[i]); + message.command_name[i] = $String(object.command_name[i]); } return message; }; @@ -27098,14 +35314,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetCommandListResponse.toObject = function toObject(message, options) { + CMsgGCGetCommandListResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.command_name = []; if (message.command_name && message.command_name.length) { - object.command_name = []; + object.command_name = $Array(message.command_name.length); for (var j = 0; j < message.command_name.length; ++j) object.command_name[j] = message.command_name[j]; } @@ -27119,8 +35339,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetCommandListResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetCommandListResponse.prototype.toJSON = function() { + return CMsgGCGetCommandListResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetCommandListResponse + * @function getTypeUrl + * @memberof CMsgGCGetCommandListResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetCommandListResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetCommandListResponse"; }; return CMsgGCGetCommandListResponse; @@ -27128,28 +35362,41 @@ $root.CGCMsgMemCachedGet = (function() { + /** + * Properties of a CGCMsgMemCachedGet. + * @typedef {Object} CGCMsgMemCachedGet.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedGet keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedGet. * @exports ICGCMsgMemCachedGet * @interface ICGCMsgMemCachedGet - * @property {Array.|null} [keys] CGCMsgMemCachedGet keys + * @augments CGCMsgMemCachedGet.$Properties + * @deprecated Use CGCMsgMemCachedGet.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedGet. + * @typedef {CGCMsgMemCachedGet.$Properties} CGCMsgMemCachedGet.$Shape */ /** * Constructs a new CGCMsgMemCachedGet. * @exports CGCMsgMemCachedGet * @classdesc Represents a CGCMsgMemCachedGet. - * @implements ICGCMsgMemCachedGet * @constructor - * @param {ICGCMsgMemCachedGet=} [properties] Properties to set + * @param {CGCMsgMemCachedGet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedGet(properties) { + var CGCMsgMemCachedGet = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedGet keys. @@ -27164,10 +35411,14 @@ * @function create * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet=} [properties] Properties to set + * @param {CGCMsgMemCachedGet.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet instance + * @type {{ + * (properties: CGCMsgMemCachedGet.$Shape): CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape; + * (properties?: CGCMsgMemCachedGet.$Properties): CGCMsgMemCachedGet; + * }} */ - CGCMsgMemCachedGet.create = function create(properties) { + CGCMsgMemCachedGet.create = function(properties) { return new CGCMsgMemCachedGet(properties); }; @@ -27176,16 +35427,23 @@ * @function encode * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet} message CGCMsgMemCachedGet message or plain object to encode + * @param {CGCMsgMemCachedGet.$Properties} message CGCMsgMemCachedGet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGet.encode = function encode(message, writer) { + CGCMsgMemCachedGet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keys[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27194,12 +35452,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet} message CGCMsgMemCachedGet message or plain object to encode + * @param {CGCMsgMemCachedGet.$Properties} message CGCMsgMemCachedGet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedGet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27209,27 +35467,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet + * @returns {CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape} CGCMsgMemCachedGet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGet.decode = function decode(reader, length) { + CGCMsgMemCachedGet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27239,11 +35514,11 @@ * @memberof CGCMsgMemCachedGet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet + * @returns {CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape} CGCMsgMemCachedGet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGet.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedGet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27257,11 +35532,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedGet.verify = function verify(message) { + CGCMsgMemCachedGet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) if (!$util.isString(message.keys[i])) @@ -27278,16 +35557,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet */ - CGCMsgMemCachedGet.fromObject = function fromObject(object) { + CGCMsgMemCachedGet.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGet) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGet(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedGet.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedGet.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) - message.keys[i] = String(object.keys[i]); + message.keys[i] = $String(object.keys[i]); } return message; }; @@ -27301,14 +35586,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedGet.toObject = function toObject(message, options) { + CGCMsgMemCachedGet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) object.keys[j] = message.keys[j]; } @@ -27322,8 +35611,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedGet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedGet.prototype.toJSON = function() { + return CGCMsgMemCachedGet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedGet + * @function getTypeUrl + * @memberof CGCMsgMemCachedGet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedGet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGet"; }; return CGCMsgMemCachedGet; @@ -27331,32 +35634,45 @@ $root.CGCMsgMemCachedGetResponse = (function() { + /** + * Properties of a CGCMsgMemCachedGetResponse. + * @typedef {Object} CGCMsgMemCachedGetResponse.$Properties + * @property {Array.|null} [values] CGCMsgMemCachedGetResponse values + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedGetResponse. * @exports ICGCMsgMemCachedGetResponse * @interface ICGCMsgMemCachedGetResponse - * @property {Array.|null} [values] CGCMsgMemCachedGetResponse values + * @augments CGCMsgMemCachedGetResponse.$Properties + * @deprecated Use CGCMsgMemCachedGetResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedGetResponse. + * @typedef {CGCMsgMemCachedGetResponse.$Properties} CGCMsgMemCachedGetResponse.$Shape */ /** * Constructs a new CGCMsgMemCachedGetResponse. * @exports CGCMsgMemCachedGetResponse * @classdesc Represents a CGCMsgMemCachedGetResponse. - * @implements ICGCMsgMemCachedGetResponse * @constructor - * @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedGetResponse(properties) { + var CGCMsgMemCachedGetResponse = function (properties) { this.values = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedGetResponse values. - * @member {Array.} values + * @member {Array.} values * @memberof CGCMsgMemCachedGetResponse * @instance */ @@ -27367,10 +35683,14 @@ * @function create * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse instance + * @type {{ + * (properties: CGCMsgMemCachedGetResponse.$Shape): CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape; + * (properties?: CGCMsgMemCachedGetResponse.$Properties): CGCMsgMemCachedGetResponse; + * }} */ - CGCMsgMemCachedGetResponse.create = function create(properties) { + CGCMsgMemCachedGetResponse.create = function(properties) { return new CGCMsgMemCachedGetResponse(properties); }; @@ -27379,16 +35699,23 @@ * @function encode * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse} message CGCMsgMemCachedGetResponse message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.$Properties} message CGCMsgMemCachedGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGetResponse.encode = function encode(message, writer) { + CGCMsgMemCachedGetResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.values != null && message.values.length) for (var i = 0; i < message.values.length; ++i) - $root.CGCMsgMemCachedGetResponse.ValueTag.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CGCMsgMemCachedGetResponse.ValueTag.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27397,12 +35724,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse} message CGCMsgMemCachedGetResponse message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.$Properties} message CGCMsgMemCachedGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedGetResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27412,27 +35739,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse + * @returns {CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape} CGCMsgMemCachedGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGetResponse.decode = function decode(reader, length) { + CGCMsgMemCachedGetResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGetResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGetResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.CGCMsgMemCachedGetResponse.ValueTag.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.CGCMsgMemCachedGetResponse.ValueTag.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27442,11 +35786,11 @@ * @memberof CGCMsgMemCachedGetResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse + * @returns {CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape} CGCMsgMemCachedGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGetResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedGetResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27460,14 +35804,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedGetResponse.verify = function verify(message) { + CGCMsgMemCachedGetResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.values != null && $Object.hasOwnProperty.call(message, "values")) { + if (!$Array.isArray(message.values)) return "values: array expected"; for (var i = 0; i < message.values.length; ++i) { - var error = $root.CGCMsgMemCachedGetResponse.ValueTag.verify(message.values[i]); + var error = $root.CGCMsgMemCachedGetResponse.ValueTag.verify(message.values[i], _depth + 1); if (error) return "values." + error; } @@ -27483,18 +35831,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse */ - CGCMsgMemCachedGetResponse.fromObject = function fromObject(object) { + CGCMsgMemCachedGetResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGetResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGetResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGetResponse(); if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".CGCMsgMemCachedGetResponse.values: array expected"); - message.values = []; + if (!$Array.isArray(object.values)) + throw $TypeError(".CGCMsgMemCachedGetResponse.values: array expected"); + message.values = $Array(object.values.length); for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".CGCMsgMemCachedGetResponse.values: object expected"); - message.values[i] = $root.CGCMsgMemCachedGetResponse.ValueTag.fromObject(object.values[i]); + if (!$util.isObject(object.values[i])) + throw $TypeError(".CGCMsgMemCachedGetResponse.values: object expected"); + message.values[i] = $root.CGCMsgMemCachedGetResponse.ValueTag.fromObject(object.values[i], _depth + 1); } } return message; @@ -27509,16 +35863,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedGetResponse.toObject = function toObject(message, options) { + CGCMsgMemCachedGetResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.values = []; if (message.values && message.values.length) { - object.values = []; + object.values = $Array(message.values.length); for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.CGCMsgMemCachedGetResponse.ValueTag.toObject(message.values[j], options); + object.values[j] = $root.CGCMsgMemCachedGetResponse.ValueTag.toObject(message.values[j], options, _depth + 1); } return object; }; @@ -27530,34 +35888,61 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedGetResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedGetResponse.prototype.toJSON = function() { + return CGCMsgMemCachedGetResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedGetResponse + * @function getTypeUrl + * @memberof CGCMsgMemCachedGetResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedGetResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGetResponse"; }; CGCMsgMemCachedGetResponse.ValueTag = (function() { /** * Properties of a ValueTag. - * @memberof CGCMsgMemCachedGetResponse - * @interface IValueTag + * @typedef {Object} CGCMsgMemCachedGetResponse.ValueTag.$Properties * @property {boolean|null} [found] ValueTag found * @property {Uint8Array|null} [value] ValueTag value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ValueTag. + * @memberof CGCMsgMemCachedGetResponse + * @interface IValueTag + * @augments CGCMsgMemCachedGetResponse.ValueTag.$Properties + * @deprecated Use CGCMsgMemCachedGetResponse.ValueTag.$Properties instead. + */ + + /** + * Shape of a ValueTag. + * @typedef {CGCMsgMemCachedGetResponse.ValueTag.$Properties} CGCMsgMemCachedGetResponse.ValueTag.$Shape */ /** * Constructs a new ValueTag. * @memberof CGCMsgMemCachedGetResponse * @classdesc Represents a ValueTag. - * @implements IValueTag * @constructor - * @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ValueTag(properties) { + var ValueTag = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ValueTag found. @@ -27580,10 +35965,14 @@ * @function create * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag instance + * @type {{ + * (properties: CGCMsgMemCachedGetResponse.ValueTag.$Shape): CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape; + * (properties?: CGCMsgMemCachedGetResponse.ValueTag.$Properties): CGCMsgMemCachedGetResponse.ValueTag; + * }} */ - ValueTag.create = function create(properties) { + ValueTag.create = function(properties) { return new ValueTag(properties); }; @@ -27592,17 +35981,24 @@ * @function encode * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag} message ValueTag message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties} message ValueTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValueTag.encode = function encode(message, writer) { + ValueTag.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.found != null && Object.hasOwnProperty.call(message, "found")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.found); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27611,12 +36007,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag} message ValueTag message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties} message ValueTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValueTag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValueTag.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27626,28 +36022,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag + * @returns {CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape} ValueTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValueTag.decode = function decode(reader, length) { + ValueTag.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGetResponse.ValueTag(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGetResponse.ValueTag(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.found = reader.bool(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.found = reader.bool(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27657,11 +36073,11 @@ * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag + * @returns {CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape} ValueTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValueTag.decodeDelimited = function decodeDelimited(reader) { + ValueTag.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27675,13 +36091,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValueTag.verify = function verify(message) { + ValueTag.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.found != null && message.hasOwnProperty("found")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) if (typeof message.found !== "boolean") return "found: boolean expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -27695,16 +36115,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag */ - ValueTag.fromObject = function fromObject(object) { + ValueTag.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGetResponse.ValueTag) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGetResponse.ValueTag: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGetResponse.ValueTag(); if (object.found != null) - message.found = Boolean(object.found); + message.found = $Boolean(object.found); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -27718,24 +36144,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValueTag.toObject = function toObject(message, options) { + ValueTag.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.found = false; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.found != null && message.hasOwnProperty("found")) + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) object.found = message.found; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -27746,8 +36176,22 @@ * @instance * @returns {Object.} JSON object */ - ValueTag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ValueTag.prototype.toJSON = function() { + return ValueTag.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ValueTag + * @function getTypeUrl + * @memberof CGCMsgMemCachedGetResponse.ValueTag + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ValueTag.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGetResponse.ValueTag"; }; return ValueTag; @@ -27758,32 +36202,45 @@ $root.CGCMsgMemCachedSet = (function() { + /** + * Properties of a CGCMsgMemCachedSet. + * @typedef {Object} CGCMsgMemCachedSet.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedSet keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedSet. * @exports ICGCMsgMemCachedSet * @interface ICGCMsgMemCachedSet - * @property {Array.|null} [keys] CGCMsgMemCachedSet keys + * @augments CGCMsgMemCachedSet.$Properties + * @deprecated Use CGCMsgMemCachedSet.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedSet. + * @typedef {CGCMsgMemCachedSet.$Properties} CGCMsgMemCachedSet.$Shape */ /** * Constructs a new CGCMsgMemCachedSet. * @exports CGCMsgMemCachedSet * @classdesc Represents a CGCMsgMemCachedSet. - * @implements ICGCMsgMemCachedSet * @constructor - * @param {ICGCMsgMemCachedSet=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedSet(properties) { + var CGCMsgMemCachedSet = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedSet keys. - * @member {Array.} keys + * @member {Array.} keys * @memberof CGCMsgMemCachedSet * @instance */ @@ -27794,10 +36251,14 @@ * @function create * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet instance + * @type {{ + * (properties: CGCMsgMemCachedSet.$Shape): CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape; + * (properties?: CGCMsgMemCachedSet.$Properties): CGCMsgMemCachedSet; + * }} */ - CGCMsgMemCachedSet.create = function create(properties) { + CGCMsgMemCachedSet.create = function(properties) { return new CGCMsgMemCachedSet(properties); }; @@ -27806,16 +36267,23 @@ * @function encode * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet} message CGCMsgMemCachedSet message or plain object to encode + * @param {CGCMsgMemCachedSet.$Properties} message CGCMsgMemCachedSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedSet.encode = function encode(message, writer) { + CGCMsgMemCachedSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) - $root.CGCMsgMemCachedSet.KeyPair.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CGCMsgMemCachedSet.KeyPair.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27824,12 +36292,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet} message CGCMsgMemCachedSet message or plain object to encode + * @param {CGCMsgMemCachedSet.$Properties} message CGCMsgMemCachedSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27839,27 +36307,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet + * @returns {CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape} CGCMsgMemCachedSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedSet.decode = function decode(reader, length) { + CGCMsgMemCachedSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.CGCMsgMemCachedSet.KeyPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push($root.CGCMsgMemCachedSet.KeyPair.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27869,11 +36354,11 @@ * @memberof CGCMsgMemCachedSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet + * @returns {CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape} CGCMsgMemCachedSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedSet.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27887,14 +36372,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedSet.verify = function verify(message) { + CGCMsgMemCachedSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) { - var error = $root.CGCMsgMemCachedSet.KeyPair.verify(message.keys[i]); + var error = $root.CGCMsgMemCachedSet.KeyPair.verify(message.keys[i], _depth + 1); if (error) return "keys." + error; } @@ -27910,18 +36399,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet */ - CGCMsgMemCachedSet.fromObject = function fromObject(object) { + CGCMsgMemCachedSet.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedSet(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedSet.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedSet.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".CGCMsgMemCachedSet.keys: object expected"); - message.keys[i] = $root.CGCMsgMemCachedSet.KeyPair.fromObject(object.keys[i]); + if (!$util.isObject(object.keys[i])) + throw $TypeError(".CGCMsgMemCachedSet.keys: object expected"); + message.keys[i] = $root.CGCMsgMemCachedSet.KeyPair.fromObject(object.keys[i], _depth + 1); } } return message; @@ -27936,16 +36431,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedSet.toObject = function toObject(message, options) { + CGCMsgMemCachedSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.CGCMsgMemCachedSet.KeyPair.toObject(message.keys[j], options); + object.keys[j] = $root.CGCMsgMemCachedSet.KeyPair.toObject(message.keys[j], options, _depth + 1); } return object; }; @@ -27957,34 +36456,61 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedSet.prototype.toJSON = function() { + return CGCMsgMemCachedSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedSet + * @function getTypeUrl + * @memberof CGCMsgMemCachedSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedSet"; }; CGCMsgMemCachedSet.KeyPair = (function() { /** * Properties of a KeyPair. - * @memberof CGCMsgMemCachedSet - * @interface IKeyPair + * @typedef {Object} CGCMsgMemCachedSet.KeyPair.$Properties * @property {string|null} [name] KeyPair name * @property {Uint8Array|null} [value] KeyPair value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a KeyPair. + * @memberof CGCMsgMemCachedSet + * @interface IKeyPair + * @augments CGCMsgMemCachedSet.KeyPair.$Properties + * @deprecated Use CGCMsgMemCachedSet.KeyPair.$Properties instead. + */ + + /** + * Shape of a KeyPair. + * @typedef {CGCMsgMemCachedSet.KeyPair.$Properties} CGCMsgMemCachedSet.KeyPair.$Shape */ /** * Constructs a new KeyPair. * @memberof CGCMsgMemCachedSet * @classdesc Represents a KeyPair. - * @implements IKeyPair * @constructor - * @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.KeyPair.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function KeyPair(properties) { + var KeyPair = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * KeyPair name. @@ -28007,10 +36533,14 @@ * @function create * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.KeyPair.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair instance + * @type {{ + * (properties: CGCMsgMemCachedSet.KeyPair.$Shape): CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape; + * (properties?: CGCMsgMemCachedSet.KeyPair.$Properties): CGCMsgMemCachedSet.KeyPair; + * }} */ - KeyPair.create = function create(properties) { + KeyPair.create = function(properties) { return new KeyPair(properties); }; @@ -28019,17 +36549,24 @@ * @function encode * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair} message KeyPair message or plain object to encode + * @param {CGCMsgMemCachedSet.KeyPair.$Properties} message KeyPair message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyPair.encode = function encode(message, writer) { + KeyPair.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28038,12 +36575,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair} message KeyPair message or plain object to encode + * @param {CGCMsgMemCachedSet.KeyPair.$Properties} message KeyPair message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyPair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + KeyPair.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28053,28 +36590,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair + * @returns {CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape} KeyPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyPair.decode = function decode(reader, length) { + KeyPair.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedSet.KeyPair(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedSet.KeyPair(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28084,11 +36641,11 @@ * @memberof CGCMsgMemCachedSet.KeyPair * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair + * @returns {CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape} KeyPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyPair.decodeDelimited = function decodeDelimited(reader) { + KeyPair.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28102,13 +36659,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KeyPair.verify = function verify(message) { + KeyPair.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -28122,16 +36683,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair */ - KeyPair.fromObject = function fromObject(object) { + KeyPair.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedSet.KeyPair) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedSet.KeyPair: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedSet.KeyPair(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -28145,24 +36712,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KeyPair.toObject = function toObject(message, options) { + KeyPair.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -28173,8 +36744,22 @@ * @instance * @returns {Object.} JSON object */ - KeyPair.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + KeyPair.prototype.toJSON = function() { + return KeyPair.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for KeyPair + * @function getTypeUrl + * @memberof CGCMsgMemCachedSet.KeyPair + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + KeyPair.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedSet.KeyPair"; }; return KeyPair; @@ -28185,28 +36770,41 @@ $root.CGCMsgMemCachedDelete = (function() { + /** + * Properties of a CGCMsgMemCachedDelete. + * @typedef {Object} CGCMsgMemCachedDelete.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedDelete keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedDelete. * @exports ICGCMsgMemCachedDelete * @interface ICGCMsgMemCachedDelete - * @property {Array.|null} [keys] CGCMsgMemCachedDelete keys + * @augments CGCMsgMemCachedDelete.$Properties + * @deprecated Use CGCMsgMemCachedDelete.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedDelete. + * @typedef {CGCMsgMemCachedDelete.$Properties} CGCMsgMemCachedDelete.$Shape */ /** * Constructs a new CGCMsgMemCachedDelete. * @exports CGCMsgMemCachedDelete * @classdesc Represents a CGCMsgMemCachedDelete. - * @implements ICGCMsgMemCachedDelete * @constructor - * @param {ICGCMsgMemCachedDelete=} [properties] Properties to set + * @param {CGCMsgMemCachedDelete.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedDelete(properties) { + var CGCMsgMemCachedDelete = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedDelete keys. @@ -28221,10 +36819,14 @@ * @function create * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete=} [properties] Properties to set + * @param {CGCMsgMemCachedDelete.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete instance + * @type {{ + * (properties: CGCMsgMemCachedDelete.$Shape): CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape; + * (properties?: CGCMsgMemCachedDelete.$Properties): CGCMsgMemCachedDelete; + * }} */ - CGCMsgMemCachedDelete.create = function create(properties) { + CGCMsgMemCachedDelete.create = function(properties) { return new CGCMsgMemCachedDelete(properties); }; @@ -28233,16 +36835,23 @@ * @function encode * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete} message CGCMsgMemCachedDelete message or plain object to encode + * @param {CGCMsgMemCachedDelete.$Properties} message CGCMsgMemCachedDelete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedDelete.encode = function encode(message, writer) { + CGCMsgMemCachedDelete.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keys[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28251,12 +36860,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete} message CGCMsgMemCachedDelete message or plain object to encode + * @param {CGCMsgMemCachedDelete.$Properties} message CGCMsgMemCachedDelete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedDelete.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedDelete.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28266,27 +36875,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete + * @returns {CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape} CGCMsgMemCachedDelete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedDelete.decode = function decode(reader, length) { + CGCMsgMemCachedDelete.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedDelete(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedDelete(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28296,11 +36922,11 @@ * @memberof CGCMsgMemCachedDelete * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete + * @returns {CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape} CGCMsgMemCachedDelete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedDelete.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedDelete.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28314,11 +36940,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedDelete.verify = function verify(message) { + CGCMsgMemCachedDelete.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) if (!$util.isString(message.keys[i])) @@ -28335,16 +36965,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete */ - CGCMsgMemCachedDelete.fromObject = function fromObject(object) { + CGCMsgMemCachedDelete.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedDelete) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedDelete: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedDelete(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedDelete.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedDelete.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) - message.keys[i] = String(object.keys[i]); + message.keys[i] = $String(object.keys[i]); } return message; }; @@ -28358,14 +36994,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedDelete.toObject = function toObject(message, options) { + CGCMsgMemCachedDelete.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) object.keys[j] = message.keys[j]; } @@ -28379,8 +37019,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedDelete.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedDelete.prototype.toJSON = function() { + return CGCMsgMemCachedDelete.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedDelete + * @function getTypeUrl + * @memberof CGCMsgMemCachedDelete + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedDelete.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedDelete"; }; return CGCMsgMemCachedDelete; @@ -28388,36 +37042,53 @@ $root.CGCMsgMemCachedStats = (function() { + /** + * Properties of a CGCMsgMemCachedStats. + * @typedef {Object} CGCMsgMemCachedStats.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedStats. * @exports ICGCMsgMemCachedStats * @interface ICGCMsgMemCachedStats + * @augments CGCMsgMemCachedStats.$Properties + * @deprecated Use CGCMsgMemCachedStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedStats. + * @typedef {CGCMsgMemCachedStats.$Properties} CGCMsgMemCachedStats.$Shape */ /** * Constructs a new CGCMsgMemCachedStats. * @exports CGCMsgMemCachedStats * @classdesc Represents a CGCMsgMemCachedStats. - * @implements ICGCMsgMemCachedStats * @constructor - * @param {ICGCMsgMemCachedStats=} [properties] Properties to set + * @param {CGCMsgMemCachedStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedStats(properties) { + var CGCMsgMemCachedStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CGCMsgMemCachedStats instance using the specified properties. * @function create * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats=} [properties] Properties to set + * @param {CGCMsgMemCachedStats.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats instance + * @type {{ + * (properties: CGCMsgMemCachedStats.$Shape): CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape; + * (properties?: CGCMsgMemCachedStats.$Properties): CGCMsgMemCachedStats; + * }} */ - CGCMsgMemCachedStats.create = function create(properties) { + CGCMsgMemCachedStats.create = function(properties) { return new CGCMsgMemCachedStats(properties); }; @@ -28426,13 +37097,20 @@ * @function encode * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats} message CGCMsgMemCachedStats message or plain object to encode + * @param {CGCMsgMemCachedStats.$Properties} message CGCMsgMemCachedStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStats.encode = function encode(message, writer) { + CGCMsgMemCachedStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28441,12 +37119,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats} message CGCMsgMemCachedStats message or plain object to encode + * @param {CGCMsgMemCachedStats.$Properties} message CGCMsgMemCachedStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28456,22 +37134,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats + * @returns {CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape} CGCMsgMemCachedStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStats.decode = function decode(reader, length) { + CGCMsgMemCachedStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28481,11 +37170,11 @@ * @memberof CGCMsgMemCachedStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats + * @returns {CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape} CGCMsgMemCachedStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28499,9 +37188,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedStats.verify = function verify(message) { + CGCMsgMemCachedStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -28513,9 +37206,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats */ - CGCMsgMemCachedStats.fromObject = function fromObject(object) { + CGCMsgMemCachedStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CGCMsgMemCachedStats(); }; @@ -28528,7 +37227,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedStats.toObject = function toObject() { + CGCMsgMemCachedStats.toObject = function () { return {}; }; @@ -28539,8 +37238,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedStats.prototype.toJSON = function() { + return CGCMsgMemCachedStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedStats + * @function getTypeUrl + * @memberof CGCMsgMemCachedStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedStats"; }; return CGCMsgMemCachedStats; @@ -28550,8 +37263,7 @@ /** * Properties of a CGCMsgMemCachedStatsResponse. - * @exports ICGCMsgMemCachedStatsResponse - * @interface ICGCMsgMemCachedStatsResponse + * @typedef {Object} CGCMsgMemCachedStatsResponse.$Properties * @property {number|Long|null} [curr_connections] CGCMsgMemCachedStatsResponse curr_connections * @property {number|Long|null} [cmd_get] CGCMsgMemCachedStatsResponse cmd_get * @property {number|Long|null} [cmd_set] CGCMsgMemCachedStatsResponse cmd_set @@ -28566,22 +37278,36 @@ * @property {number|Long|null} [curr_items] CGCMsgMemCachedStatsResponse curr_items * @property {number|Long|null} [evictions] CGCMsgMemCachedStatsResponse evictions * @property {number|Long|null} [bytes] CGCMsgMemCachedStatsResponse bytes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgMemCachedStatsResponse. + * @exports ICGCMsgMemCachedStatsResponse + * @interface ICGCMsgMemCachedStatsResponse + * @augments CGCMsgMemCachedStatsResponse.$Properties + * @deprecated Use CGCMsgMemCachedStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedStatsResponse. + * @typedef {CGCMsgMemCachedStatsResponse.$Properties} CGCMsgMemCachedStatsResponse.$Shape */ /** * Constructs a new CGCMsgMemCachedStatsResponse. * @exports CGCMsgMemCachedStatsResponse * @classdesc Represents a CGCMsgMemCachedStatsResponse. - * @implements ICGCMsgMemCachedStatsResponse * @constructor - * @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedStatsResponse(properties) { + var CGCMsgMemCachedStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedStatsResponse curr_connections. @@ -28700,10 +37426,14 @@ * @function create * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse instance + * @type {{ + * (properties: CGCMsgMemCachedStatsResponse.$Shape): CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape; + * (properties?: CGCMsgMemCachedStatsResponse.$Properties): CGCMsgMemCachedStatsResponse; + * }} */ - CGCMsgMemCachedStatsResponse.create = function create(properties) { + CGCMsgMemCachedStatsResponse.create = function(properties) { return new CGCMsgMemCachedStatsResponse(properties); }; @@ -28712,41 +37442,48 @@ * @function encode * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse} message CGCMsgMemCachedStatsResponse message or plain object to encode + * @param {CGCMsgMemCachedStatsResponse.$Properties} message CGCMsgMemCachedStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStatsResponse.encode = function encode(message, writer) { + CGCMsgMemCachedStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.curr_connections != null && Object.hasOwnProperty.call(message, "curr_connections")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.curr_connections); - if (message.cmd_get != null && Object.hasOwnProperty.call(message, "cmd_get")) + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.cmd_get); - if (message.cmd_set != null && Object.hasOwnProperty.call(message, "cmd_set")) + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.cmd_set); - if (message.cmd_flush != null && Object.hasOwnProperty.call(message, "cmd_flush")) + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.cmd_flush); - if (message.get_hits != null && Object.hasOwnProperty.call(message, "get_hits")) + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.get_hits); - if (message.get_misses != null && Object.hasOwnProperty.call(message, "get_misses")) + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.get_misses); - if (message.delete_hits != null && Object.hasOwnProperty.call(message, "delete_hits")) + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.delete_hits); - if (message.delete_misses != null && Object.hasOwnProperty.call(message, "delete_misses")) + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.delete_misses); - if (message.bytes_read != null && Object.hasOwnProperty.call(message, "bytes_read")) + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.bytes_read); - if (message.bytes_written != null && Object.hasOwnProperty.call(message, "bytes_written")) + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.bytes_written); - if (message.limit_maxbytes != null && Object.hasOwnProperty.call(message, "limit_maxbytes")) + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.limit_maxbytes); - if (message.curr_items != null && Object.hasOwnProperty.call(message, "curr_items")) + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.curr_items); - if (message.evictions != null && Object.hasOwnProperty.call(message, "evictions")) + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.evictions); - if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) writer.uint32(/* id 14, wireType 0 =*/112).uint64(message.bytes); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28755,12 +37492,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse} message CGCMsgMemCachedStatsResponse message or plain object to encode + * @param {CGCMsgMemCachedStatsResponse.$Properties} message CGCMsgMemCachedStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28770,64 +37507,120 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse + * @returns {CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape} CGCMsgMemCachedStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStatsResponse.decode = function decode(reader, length) { + CGCMsgMemCachedStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.curr_connections = reader.uint64(); - break; - case 2: - message.cmd_get = reader.uint64(); - break; - case 3: - message.cmd_set = reader.uint64(); - break; - case 4: - message.cmd_flush = reader.uint64(); - break; - case 5: - message.get_hits = reader.uint64(); - break; - case 6: - message.get_misses = reader.uint64(); - break; - case 7: - message.delete_hits = reader.uint64(); - break; - case 8: - message.delete_misses = reader.uint64(); - break; - case 9: - message.bytes_read = reader.uint64(); - break; - case 10: - message.bytes_written = reader.uint64(); - break; - case 11: - message.limit_maxbytes = reader.uint64(); - break; - case 12: - message.curr_items = reader.uint64(); - break; - case 13: - message.evictions = reader.uint64(); - break; - case 14: - message.bytes = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.curr_connections = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.cmd_get = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.cmd_set = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.cmd_flush = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.get_hits = reader.uint64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.get_misses = reader.uint64(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.delete_hits = reader.uint64(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.delete_misses = reader.uint64(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.bytes_read = reader.uint64(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.bytes_written = reader.uint64(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.limit_maxbytes = reader.uint64(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.curr_items = reader.uint64(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.evictions = reader.uint64(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.bytes = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28837,11 +37630,11 @@ * @memberof CGCMsgMemCachedStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse + * @returns {CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape} CGCMsgMemCachedStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28855,49 +37648,53 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedStatsResponse.verify = function verify(message) { + CGCMsgMemCachedStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.curr_connections != null && message.hasOwnProperty("curr_connections")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) if (!$util.isInteger(message.curr_connections) && !(message.curr_connections && $util.isInteger(message.curr_connections.low) && $util.isInteger(message.curr_connections.high))) return "curr_connections: integer|Long expected"; - if (message.cmd_get != null && message.hasOwnProperty("cmd_get")) + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) if (!$util.isInteger(message.cmd_get) && !(message.cmd_get && $util.isInteger(message.cmd_get.low) && $util.isInteger(message.cmd_get.high))) return "cmd_get: integer|Long expected"; - if (message.cmd_set != null && message.hasOwnProperty("cmd_set")) + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) if (!$util.isInteger(message.cmd_set) && !(message.cmd_set && $util.isInteger(message.cmd_set.low) && $util.isInteger(message.cmd_set.high))) return "cmd_set: integer|Long expected"; - if (message.cmd_flush != null && message.hasOwnProperty("cmd_flush")) + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) if (!$util.isInteger(message.cmd_flush) && !(message.cmd_flush && $util.isInteger(message.cmd_flush.low) && $util.isInteger(message.cmd_flush.high))) return "cmd_flush: integer|Long expected"; - if (message.get_hits != null && message.hasOwnProperty("get_hits")) + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) if (!$util.isInteger(message.get_hits) && !(message.get_hits && $util.isInteger(message.get_hits.low) && $util.isInteger(message.get_hits.high))) return "get_hits: integer|Long expected"; - if (message.get_misses != null && message.hasOwnProperty("get_misses")) + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) if (!$util.isInteger(message.get_misses) && !(message.get_misses && $util.isInteger(message.get_misses.low) && $util.isInteger(message.get_misses.high))) return "get_misses: integer|Long expected"; - if (message.delete_hits != null && message.hasOwnProperty("delete_hits")) + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) if (!$util.isInteger(message.delete_hits) && !(message.delete_hits && $util.isInteger(message.delete_hits.low) && $util.isInteger(message.delete_hits.high))) return "delete_hits: integer|Long expected"; - if (message.delete_misses != null && message.hasOwnProperty("delete_misses")) + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) if (!$util.isInteger(message.delete_misses) && !(message.delete_misses && $util.isInteger(message.delete_misses.low) && $util.isInteger(message.delete_misses.high))) return "delete_misses: integer|Long expected"; - if (message.bytes_read != null && message.hasOwnProperty("bytes_read")) + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) if (!$util.isInteger(message.bytes_read) && !(message.bytes_read && $util.isInteger(message.bytes_read.low) && $util.isInteger(message.bytes_read.high))) return "bytes_read: integer|Long expected"; - if (message.bytes_written != null && message.hasOwnProperty("bytes_written")) + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) if (!$util.isInteger(message.bytes_written) && !(message.bytes_written && $util.isInteger(message.bytes_written.low) && $util.isInteger(message.bytes_written.high))) return "bytes_written: integer|Long expected"; - if (message.limit_maxbytes != null && message.hasOwnProperty("limit_maxbytes")) + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) if (!$util.isInteger(message.limit_maxbytes) && !(message.limit_maxbytes && $util.isInteger(message.limit_maxbytes.low) && $util.isInteger(message.limit_maxbytes.high))) return "limit_maxbytes: integer|Long expected"; - if (message.curr_items != null && message.hasOwnProperty("curr_items")) + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) if (!$util.isInteger(message.curr_items) && !(message.curr_items && $util.isInteger(message.curr_items.low) && $util.isInteger(message.curr_items.high))) return "curr_items: integer|Long expected"; - if (message.evictions != null && message.hasOwnProperty("evictions")) + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) if (!$util.isInteger(message.evictions) && !(message.evictions && $util.isInteger(message.evictions.low) && $util.isInteger(message.evictions.high))) return "evictions: integer|Long expected"; - if (message.bytes != null && message.hasOwnProperty("bytes")) + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) if (!$util.isInteger(message.bytes) && !(message.bytes && $util.isInteger(message.bytes.low) && $util.isInteger(message.bytes.high))) return "bytes: integer|Long expected"; return null; @@ -28911,132 +37708,138 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse */ - CGCMsgMemCachedStatsResponse.fromObject = function fromObject(object) { + CGCMsgMemCachedStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedStatsResponse(); if (object.curr_connections != null) if ($util.Long) - (message.curr_connections = $util.Long.fromValue(object.curr_connections)).unsigned = true; + message.curr_connections = $util.Long.fromValue(object.curr_connections, true); else if (typeof object.curr_connections === "string") - message.curr_connections = parseInt(object.curr_connections, 10); + message.curr_connections = $parseInt(object.curr_connections, 10); else if (typeof object.curr_connections === "number") message.curr_connections = object.curr_connections; else if (typeof object.curr_connections === "object") message.curr_connections = new $util.LongBits(object.curr_connections.low >>> 0, object.curr_connections.high >>> 0).toNumber(true); if (object.cmd_get != null) if ($util.Long) - (message.cmd_get = $util.Long.fromValue(object.cmd_get)).unsigned = true; + message.cmd_get = $util.Long.fromValue(object.cmd_get, true); else if (typeof object.cmd_get === "string") - message.cmd_get = parseInt(object.cmd_get, 10); + message.cmd_get = $parseInt(object.cmd_get, 10); else if (typeof object.cmd_get === "number") message.cmd_get = object.cmd_get; else if (typeof object.cmd_get === "object") message.cmd_get = new $util.LongBits(object.cmd_get.low >>> 0, object.cmd_get.high >>> 0).toNumber(true); if (object.cmd_set != null) if ($util.Long) - (message.cmd_set = $util.Long.fromValue(object.cmd_set)).unsigned = true; + message.cmd_set = $util.Long.fromValue(object.cmd_set, true); else if (typeof object.cmd_set === "string") - message.cmd_set = parseInt(object.cmd_set, 10); + message.cmd_set = $parseInt(object.cmd_set, 10); else if (typeof object.cmd_set === "number") message.cmd_set = object.cmd_set; else if (typeof object.cmd_set === "object") message.cmd_set = new $util.LongBits(object.cmd_set.low >>> 0, object.cmd_set.high >>> 0).toNumber(true); if (object.cmd_flush != null) if ($util.Long) - (message.cmd_flush = $util.Long.fromValue(object.cmd_flush)).unsigned = true; + message.cmd_flush = $util.Long.fromValue(object.cmd_flush, true); else if (typeof object.cmd_flush === "string") - message.cmd_flush = parseInt(object.cmd_flush, 10); + message.cmd_flush = $parseInt(object.cmd_flush, 10); else if (typeof object.cmd_flush === "number") message.cmd_flush = object.cmd_flush; else if (typeof object.cmd_flush === "object") message.cmd_flush = new $util.LongBits(object.cmd_flush.low >>> 0, object.cmd_flush.high >>> 0).toNumber(true); if (object.get_hits != null) if ($util.Long) - (message.get_hits = $util.Long.fromValue(object.get_hits)).unsigned = true; + message.get_hits = $util.Long.fromValue(object.get_hits, true); else if (typeof object.get_hits === "string") - message.get_hits = parseInt(object.get_hits, 10); + message.get_hits = $parseInt(object.get_hits, 10); else if (typeof object.get_hits === "number") message.get_hits = object.get_hits; else if (typeof object.get_hits === "object") message.get_hits = new $util.LongBits(object.get_hits.low >>> 0, object.get_hits.high >>> 0).toNumber(true); if (object.get_misses != null) if ($util.Long) - (message.get_misses = $util.Long.fromValue(object.get_misses)).unsigned = true; + message.get_misses = $util.Long.fromValue(object.get_misses, true); else if (typeof object.get_misses === "string") - message.get_misses = parseInt(object.get_misses, 10); + message.get_misses = $parseInt(object.get_misses, 10); else if (typeof object.get_misses === "number") message.get_misses = object.get_misses; else if (typeof object.get_misses === "object") message.get_misses = new $util.LongBits(object.get_misses.low >>> 0, object.get_misses.high >>> 0).toNumber(true); if (object.delete_hits != null) if ($util.Long) - (message.delete_hits = $util.Long.fromValue(object.delete_hits)).unsigned = true; + message.delete_hits = $util.Long.fromValue(object.delete_hits, true); else if (typeof object.delete_hits === "string") - message.delete_hits = parseInt(object.delete_hits, 10); + message.delete_hits = $parseInt(object.delete_hits, 10); else if (typeof object.delete_hits === "number") message.delete_hits = object.delete_hits; else if (typeof object.delete_hits === "object") message.delete_hits = new $util.LongBits(object.delete_hits.low >>> 0, object.delete_hits.high >>> 0).toNumber(true); if (object.delete_misses != null) if ($util.Long) - (message.delete_misses = $util.Long.fromValue(object.delete_misses)).unsigned = true; + message.delete_misses = $util.Long.fromValue(object.delete_misses, true); else if (typeof object.delete_misses === "string") - message.delete_misses = parseInt(object.delete_misses, 10); + message.delete_misses = $parseInt(object.delete_misses, 10); else if (typeof object.delete_misses === "number") message.delete_misses = object.delete_misses; else if (typeof object.delete_misses === "object") message.delete_misses = new $util.LongBits(object.delete_misses.low >>> 0, object.delete_misses.high >>> 0).toNumber(true); if (object.bytes_read != null) if ($util.Long) - (message.bytes_read = $util.Long.fromValue(object.bytes_read)).unsigned = true; + message.bytes_read = $util.Long.fromValue(object.bytes_read, true); else if (typeof object.bytes_read === "string") - message.bytes_read = parseInt(object.bytes_read, 10); + message.bytes_read = $parseInt(object.bytes_read, 10); else if (typeof object.bytes_read === "number") message.bytes_read = object.bytes_read; else if (typeof object.bytes_read === "object") message.bytes_read = new $util.LongBits(object.bytes_read.low >>> 0, object.bytes_read.high >>> 0).toNumber(true); if (object.bytes_written != null) if ($util.Long) - (message.bytes_written = $util.Long.fromValue(object.bytes_written)).unsigned = true; + message.bytes_written = $util.Long.fromValue(object.bytes_written, true); else if (typeof object.bytes_written === "string") - message.bytes_written = parseInt(object.bytes_written, 10); + message.bytes_written = $parseInt(object.bytes_written, 10); else if (typeof object.bytes_written === "number") message.bytes_written = object.bytes_written; else if (typeof object.bytes_written === "object") message.bytes_written = new $util.LongBits(object.bytes_written.low >>> 0, object.bytes_written.high >>> 0).toNumber(true); if (object.limit_maxbytes != null) if ($util.Long) - (message.limit_maxbytes = $util.Long.fromValue(object.limit_maxbytes)).unsigned = true; + message.limit_maxbytes = $util.Long.fromValue(object.limit_maxbytes, true); else if (typeof object.limit_maxbytes === "string") - message.limit_maxbytes = parseInt(object.limit_maxbytes, 10); + message.limit_maxbytes = $parseInt(object.limit_maxbytes, 10); else if (typeof object.limit_maxbytes === "number") message.limit_maxbytes = object.limit_maxbytes; else if (typeof object.limit_maxbytes === "object") message.limit_maxbytes = new $util.LongBits(object.limit_maxbytes.low >>> 0, object.limit_maxbytes.high >>> 0).toNumber(true); if (object.curr_items != null) if ($util.Long) - (message.curr_items = $util.Long.fromValue(object.curr_items)).unsigned = true; + message.curr_items = $util.Long.fromValue(object.curr_items, true); else if (typeof object.curr_items === "string") - message.curr_items = parseInt(object.curr_items, 10); + message.curr_items = $parseInt(object.curr_items, 10); else if (typeof object.curr_items === "number") message.curr_items = object.curr_items; else if (typeof object.curr_items === "object") message.curr_items = new $util.LongBits(object.curr_items.low >>> 0, object.curr_items.high >>> 0).toNumber(true); if (object.evictions != null) if ($util.Long) - (message.evictions = $util.Long.fromValue(object.evictions)).unsigned = true; + message.evictions = $util.Long.fromValue(object.evictions, true); else if (typeof object.evictions === "string") - message.evictions = parseInt(object.evictions, 10); + message.evictions = $parseInt(object.evictions, 10); else if (typeof object.evictions === "number") message.evictions = object.evictions; else if (typeof object.evictions === "object") message.evictions = new $util.LongBits(object.evictions.low >>> 0, object.evictions.high >>> 0).toNumber(true); if (object.bytes != null) if ($util.Long) - (message.bytes = $util.Long.fromValue(object.bytes)).unsigned = true; + message.bytes = $util.Long.fromValue(object.bytes, true); else if (typeof object.bytes === "string") - message.bytes = parseInt(object.bytes, 10); + message.bytes = $parseInt(object.bytes, 10); else if (typeof object.bytes === "number") message.bytes = object.bytes; else if (typeof object.bytes === "object") @@ -29053,152 +37856,184 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedStatsResponse.toObject = function toObject(message, options) { + CGCMsgMemCachedStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.curr_connections = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.curr_connections = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.curr_connections = options.longs === String ? "0" : 0; + object.curr_connections = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_get = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_get = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_get = options.longs === String ? "0" : 0; + object.cmd_get = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_set = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_set = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_set = options.longs === String ? "0" : 0; + object.cmd_set = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_flush = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_flush = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_flush = options.longs === String ? "0" : 0; + object.cmd_flush = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.get_hits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.get_hits = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.get_hits = options.longs === String ? "0" : 0; + object.get_hits = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.get_misses = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.get_misses = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.get_misses = options.longs === String ? "0" : 0; + object.get_misses = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.delete_hits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.delete_hits = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.delete_hits = options.longs === String ? "0" : 0; + object.delete_hits = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.delete_misses = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.delete_misses = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.delete_misses = options.longs === String ? "0" : 0; + object.delete_misses = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes_read = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes_read = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes_read = options.longs === String ? "0" : 0; + object.bytes_read = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes_written = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes_written = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes_written = options.longs === String ? "0" : 0; + object.bytes_written = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.limit_maxbytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.limit_maxbytes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.limit_maxbytes = options.longs === String ? "0" : 0; + object.limit_maxbytes = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.curr_items = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.curr_items = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.curr_items = options.longs === String ? "0" : 0; + object.curr_items = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.evictions = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.evictions = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.evictions = options.longs === String ? "0" : 0; + object.evictions = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes = options.longs === String ? "0" : 0; + object.bytes = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.curr_connections != null && message.hasOwnProperty("curr_connections")) - if (typeof message.curr_connections === "number") - object.curr_connections = options.longs === String ? String(message.curr_connections) : message.curr_connections; + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.curr_connections = typeof message.curr_connections === "number" ? $BigInt(message.curr_connections) : $util.Long.fromBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0, true).toBigInt(); + else if (typeof message.curr_connections === "number") + object.curr_connections = options.longs === $String ? $String(message.curr_connections) : message.curr_connections; else - object.curr_connections = options.longs === String ? $util.Long.prototype.toString.call(message.curr_connections) : options.longs === Number ? new $util.LongBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0).toNumber(true) : message.curr_connections; - if (message.cmd_get != null && message.hasOwnProperty("cmd_get")) - if (typeof message.cmd_get === "number") - object.cmd_get = options.longs === String ? String(message.cmd_get) : message.cmd_get; + object.curr_connections = options.longs === $String ? $util.Long.prototype.toString.call(message.curr_connections) : options.longs === $Number ? new $util.LongBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0).toNumber(true) : message.curr_connections; + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_get = typeof message.cmd_get === "number" ? $BigInt(message.cmd_get) : $util.Long.fromBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_get === "number") + object.cmd_get = options.longs === $String ? $String(message.cmd_get) : message.cmd_get; else - object.cmd_get = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_get) : options.longs === Number ? new $util.LongBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0).toNumber(true) : message.cmd_get; - if (message.cmd_set != null && message.hasOwnProperty("cmd_set")) - if (typeof message.cmd_set === "number") - object.cmd_set = options.longs === String ? String(message.cmd_set) : message.cmd_set; + object.cmd_get = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_get) : options.longs === $Number ? new $util.LongBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0).toNumber(true) : message.cmd_get; + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_set = typeof message.cmd_set === "number" ? $BigInt(message.cmd_set) : $util.Long.fromBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_set === "number") + object.cmd_set = options.longs === $String ? $String(message.cmd_set) : message.cmd_set; else - object.cmd_set = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_set) : options.longs === Number ? new $util.LongBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0).toNumber(true) : message.cmd_set; - if (message.cmd_flush != null && message.hasOwnProperty("cmd_flush")) - if (typeof message.cmd_flush === "number") - object.cmd_flush = options.longs === String ? String(message.cmd_flush) : message.cmd_flush; + object.cmd_set = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_set) : options.longs === $Number ? new $util.LongBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0).toNumber(true) : message.cmd_set; + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_flush = typeof message.cmd_flush === "number" ? $BigInt(message.cmd_flush) : $util.Long.fromBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_flush === "number") + object.cmd_flush = options.longs === $String ? $String(message.cmd_flush) : message.cmd_flush; else - object.cmd_flush = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_flush) : options.longs === Number ? new $util.LongBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0).toNumber(true) : message.cmd_flush; - if (message.get_hits != null && message.hasOwnProperty("get_hits")) - if (typeof message.get_hits === "number") - object.get_hits = options.longs === String ? String(message.get_hits) : message.get_hits; + object.cmd_flush = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_flush) : options.longs === $Number ? new $util.LongBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0).toNumber(true) : message.cmd_flush; + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.get_hits = typeof message.get_hits === "number" ? $BigInt(message.get_hits) : $util.Long.fromBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0, true).toBigInt(); + else if (typeof message.get_hits === "number") + object.get_hits = options.longs === $String ? $String(message.get_hits) : message.get_hits; else - object.get_hits = options.longs === String ? $util.Long.prototype.toString.call(message.get_hits) : options.longs === Number ? new $util.LongBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0).toNumber(true) : message.get_hits; - if (message.get_misses != null && message.hasOwnProperty("get_misses")) - if (typeof message.get_misses === "number") - object.get_misses = options.longs === String ? String(message.get_misses) : message.get_misses; + object.get_hits = options.longs === $String ? $util.Long.prototype.toString.call(message.get_hits) : options.longs === $Number ? new $util.LongBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0).toNumber(true) : message.get_hits; + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.get_misses = typeof message.get_misses === "number" ? $BigInt(message.get_misses) : $util.Long.fromBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0, true).toBigInt(); + else if (typeof message.get_misses === "number") + object.get_misses = options.longs === $String ? $String(message.get_misses) : message.get_misses; else - object.get_misses = options.longs === String ? $util.Long.prototype.toString.call(message.get_misses) : options.longs === Number ? new $util.LongBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0).toNumber(true) : message.get_misses; - if (message.delete_hits != null && message.hasOwnProperty("delete_hits")) - if (typeof message.delete_hits === "number") - object.delete_hits = options.longs === String ? String(message.delete_hits) : message.delete_hits; + object.get_misses = options.longs === $String ? $util.Long.prototype.toString.call(message.get_misses) : options.longs === $Number ? new $util.LongBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0).toNumber(true) : message.get_misses; + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.delete_hits = typeof message.delete_hits === "number" ? $BigInt(message.delete_hits) : $util.Long.fromBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0, true).toBigInt(); + else if (typeof message.delete_hits === "number") + object.delete_hits = options.longs === $String ? $String(message.delete_hits) : message.delete_hits; else - object.delete_hits = options.longs === String ? $util.Long.prototype.toString.call(message.delete_hits) : options.longs === Number ? new $util.LongBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0).toNumber(true) : message.delete_hits; - if (message.delete_misses != null && message.hasOwnProperty("delete_misses")) - if (typeof message.delete_misses === "number") - object.delete_misses = options.longs === String ? String(message.delete_misses) : message.delete_misses; + object.delete_hits = options.longs === $String ? $util.Long.prototype.toString.call(message.delete_hits) : options.longs === $Number ? new $util.LongBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0).toNumber(true) : message.delete_hits; + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.delete_misses = typeof message.delete_misses === "number" ? $BigInt(message.delete_misses) : $util.Long.fromBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0, true).toBigInt(); + else if (typeof message.delete_misses === "number") + object.delete_misses = options.longs === $String ? $String(message.delete_misses) : message.delete_misses; else - object.delete_misses = options.longs === String ? $util.Long.prototype.toString.call(message.delete_misses) : options.longs === Number ? new $util.LongBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0).toNumber(true) : message.delete_misses; - if (message.bytes_read != null && message.hasOwnProperty("bytes_read")) - if (typeof message.bytes_read === "number") - object.bytes_read = options.longs === String ? String(message.bytes_read) : message.bytes_read; + object.delete_misses = options.longs === $String ? $util.Long.prototype.toString.call(message.delete_misses) : options.longs === $Number ? new $util.LongBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0).toNumber(true) : message.delete_misses; + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes_read = typeof message.bytes_read === "number" ? $BigInt(message.bytes_read) : $util.Long.fromBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0, true).toBigInt(); + else if (typeof message.bytes_read === "number") + object.bytes_read = options.longs === $String ? $String(message.bytes_read) : message.bytes_read; else - object.bytes_read = options.longs === String ? $util.Long.prototype.toString.call(message.bytes_read) : options.longs === Number ? new $util.LongBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0).toNumber(true) : message.bytes_read; - if (message.bytes_written != null && message.hasOwnProperty("bytes_written")) - if (typeof message.bytes_written === "number") - object.bytes_written = options.longs === String ? String(message.bytes_written) : message.bytes_written; + object.bytes_read = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes_read) : options.longs === $Number ? new $util.LongBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0).toNumber(true) : message.bytes_read; + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes_written = typeof message.bytes_written === "number" ? $BigInt(message.bytes_written) : $util.Long.fromBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0, true).toBigInt(); + else if (typeof message.bytes_written === "number") + object.bytes_written = options.longs === $String ? $String(message.bytes_written) : message.bytes_written; else - object.bytes_written = options.longs === String ? $util.Long.prototype.toString.call(message.bytes_written) : options.longs === Number ? new $util.LongBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0).toNumber(true) : message.bytes_written; - if (message.limit_maxbytes != null && message.hasOwnProperty("limit_maxbytes")) - if (typeof message.limit_maxbytes === "number") - object.limit_maxbytes = options.longs === String ? String(message.limit_maxbytes) : message.limit_maxbytes; + object.bytes_written = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes_written) : options.longs === $Number ? new $util.LongBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0).toNumber(true) : message.bytes_written; + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.limit_maxbytes = typeof message.limit_maxbytes === "number" ? $BigInt(message.limit_maxbytes) : $util.Long.fromBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0, true).toBigInt(); + else if (typeof message.limit_maxbytes === "number") + object.limit_maxbytes = options.longs === $String ? $String(message.limit_maxbytes) : message.limit_maxbytes; else - object.limit_maxbytes = options.longs === String ? $util.Long.prototype.toString.call(message.limit_maxbytes) : options.longs === Number ? new $util.LongBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0).toNumber(true) : message.limit_maxbytes; - if (message.curr_items != null && message.hasOwnProperty("curr_items")) - if (typeof message.curr_items === "number") - object.curr_items = options.longs === String ? String(message.curr_items) : message.curr_items; + object.limit_maxbytes = options.longs === $String ? $util.Long.prototype.toString.call(message.limit_maxbytes) : options.longs === $Number ? new $util.LongBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0).toNumber(true) : message.limit_maxbytes; + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.curr_items = typeof message.curr_items === "number" ? $BigInt(message.curr_items) : $util.Long.fromBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0, true).toBigInt(); + else if (typeof message.curr_items === "number") + object.curr_items = options.longs === $String ? $String(message.curr_items) : message.curr_items; else - object.curr_items = options.longs === String ? $util.Long.prototype.toString.call(message.curr_items) : options.longs === Number ? new $util.LongBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0).toNumber(true) : message.curr_items; - if (message.evictions != null && message.hasOwnProperty("evictions")) - if (typeof message.evictions === "number") - object.evictions = options.longs === String ? String(message.evictions) : message.evictions; + object.curr_items = options.longs === $String ? $util.Long.prototype.toString.call(message.curr_items) : options.longs === $Number ? new $util.LongBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0).toNumber(true) : message.curr_items; + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.evictions = typeof message.evictions === "number" ? $BigInt(message.evictions) : $util.Long.fromBits(message.evictions.low >>> 0, message.evictions.high >>> 0, true).toBigInt(); + else if (typeof message.evictions === "number") + object.evictions = options.longs === $String ? $String(message.evictions) : message.evictions; else - object.evictions = options.longs === String ? $util.Long.prototype.toString.call(message.evictions) : options.longs === Number ? new $util.LongBits(message.evictions.low >>> 0, message.evictions.high >>> 0).toNumber(true) : message.evictions; - if (message.bytes != null && message.hasOwnProperty("bytes")) - if (typeof message.bytes === "number") - object.bytes = options.longs === String ? String(message.bytes) : message.bytes; + object.evictions = options.longs === $String ? $util.Long.prototype.toString.call(message.evictions) : options.longs === $Number ? new $util.LongBits(message.evictions.low >>> 0, message.evictions.high >>> 0).toNumber(true) : message.evictions; + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes = typeof message.bytes === "number" ? $BigInt(message.bytes) : $util.Long.fromBits(message.bytes.low >>> 0, message.bytes.high >>> 0, true).toBigInt(); + else if (typeof message.bytes === "number") + object.bytes = options.longs === $String ? $String(message.bytes) : message.bytes; else - object.bytes = options.longs === String ? $util.Long.prototype.toString.call(message.bytes) : options.longs === Number ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber(true) : message.bytes; + object.bytes = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes) : options.longs === $Number ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber(true) : message.bytes; return object; }; @@ -29209,8 +38044,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedStatsResponse.prototype.toJSON = function() { + return CGCMsgMemCachedStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedStatsResponse + * @function getTypeUrl + * @memberof CGCMsgMemCachedStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedStatsResponse"; }; return CGCMsgMemCachedStatsResponse; @@ -29218,27 +38067,40 @@ $root.CGCMsgSQLStats = (function() { + /** + * Properties of a CGCMsgSQLStats. + * @typedef {Object} CGCMsgSQLStats.$Properties + * @property {number|null} [schema_catalog] CGCMsgSQLStats schema_catalog + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgSQLStats. * @exports ICGCMsgSQLStats * @interface ICGCMsgSQLStats - * @property {number|null} [schema_catalog] CGCMsgSQLStats schema_catalog + * @augments CGCMsgSQLStats.$Properties + * @deprecated Use CGCMsgSQLStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgSQLStats. + * @typedef {CGCMsgSQLStats.$Properties} CGCMsgSQLStats.$Shape */ /** * Constructs a new CGCMsgSQLStats. * @exports CGCMsgSQLStats * @classdesc Represents a CGCMsgSQLStats. - * @implements ICGCMsgSQLStats * @constructor - * @param {ICGCMsgSQLStats=} [properties] Properties to set + * @param {CGCMsgSQLStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSQLStats(properties) { + var CGCMsgSQLStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSQLStats schema_catalog. @@ -29253,10 +38115,14 @@ * @function create * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats=} [properties] Properties to set + * @param {CGCMsgSQLStats.$Properties=} [properties] Properties to set * @returns {CGCMsgSQLStats} CGCMsgSQLStats instance + * @type {{ + * (properties: CGCMsgSQLStats.$Shape): CGCMsgSQLStats & CGCMsgSQLStats.$Shape; + * (properties?: CGCMsgSQLStats.$Properties): CGCMsgSQLStats; + * }} */ - CGCMsgSQLStats.create = function create(properties) { + CGCMsgSQLStats.create = function(properties) { return new CGCMsgSQLStats(properties); }; @@ -29265,15 +38131,22 @@ * @function encode * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats} message CGCMsgSQLStats message or plain object to encode + * @param {CGCMsgSQLStats.$Properties} message CGCMsgSQLStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStats.encode = function encode(message, writer) { + CGCMsgSQLStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.schema_catalog != null && Object.hasOwnProperty.call(message, "schema_catalog")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.schema_catalog); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29282,12 +38155,12 @@ * @function encodeDelimited * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats} message CGCMsgSQLStats message or plain object to encode + * @param {CGCMsgSQLStats.$Properties} message CGCMsgSQLStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSQLStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29297,25 +38170,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSQLStats} CGCMsgSQLStats + * @returns {CGCMsgSQLStats & CGCMsgSQLStats.$Shape} CGCMsgSQLStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStats.decode = function decode(reader, length) { + CGCMsgSQLStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSQLStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSQLStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.schema_catalog = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.schema_catalog = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29325,11 +38215,11 @@ * @memberof CGCMsgSQLStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSQLStats} CGCMsgSQLStats + * @returns {CGCMsgSQLStats & CGCMsgSQLStats.$Shape} CGCMsgSQLStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSQLStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29343,10 +38233,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSQLStats.verify = function verify(message) { + CGCMsgSQLStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) if (!$util.isInteger(message.schema_catalog)) return "schema_catalog: integer expected"; return null; @@ -29360,9 +38254,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgSQLStats} CGCMsgSQLStats */ - CGCMsgSQLStats.fromObject = function fromObject(object) { + CGCMsgSQLStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSQLStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSQLStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSQLStats(); if (object.schema_catalog != null) message.schema_catalog = object.schema_catalog >>> 0; @@ -29378,13 +38278,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSQLStats.toObject = function toObject(message, options) { + CGCMsgSQLStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.schema_catalog = 0; - if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog")) + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) object.schema_catalog = message.schema_catalog; return object; }; @@ -29396,8 +38300,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSQLStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSQLStats.prototype.toJSON = function() { + return CGCMsgSQLStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSQLStats + * @function getTypeUrl + * @memberof CGCMsgSQLStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSQLStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSQLStats"; }; return CGCMsgSQLStats; @@ -29407,8 +38325,7 @@ /** * Properties of a CGCMsgSQLStatsResponse. - * @exports ICGCMsgSQLStatsResponse - * @interface ICGCMsgSQLStatsResponse + * @typedef {Object} CGCMsgSQLStatsResponse.$Properties * @property {number|null} [threads] CGCMsgSQLStatsResponse threads * @property {number|null} [threads_connected] CGCMsgSQLStatsResponse threads_connected * @property {number|null} [threads_active] CGCMsgSQLStatsResponse threads_active @@ -29418,22 +38335,36 @@ * @property {number|null} [deadlock_retries] CGCMsgSQLStatsResponse deadlock_retries * @property {number|null} [operations_timed_out_in_queue] CGCMsgSQLStatsResponse operations_timed_out_in_queue * @property {number|null} [errors] CGCMsgSQLStatsResponse errors + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgSQLStatsResponse. + * @exports ICGCMsgSQLStatsResponse + * @interface ICGCMsgSQLStatsResponse + * @augments CGCMsgSQLStatsResponse.$Properties + * @deprecated Use CGCMsgSQLStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgSQLStatsResponse. + * @typedef {CGCMsgSQLStatsResponse.$Properties} CGCMsgSQLStatsResponse.$Shape */ /** * Constructs a new CGCMsgSQLStatsResponse. * @exports CGCMsgSQLStatsResponse * @classdesc Represents a CGCMsgSQLStatsResponse. - * @implements ICGCMsgSQLStatsResponse * @constructor - * @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set + * @param {CGCMsgSQLStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSQLStatsResponse(properties) { + var CGCMsgSQLStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSQLStatsResponse threads. @@ -29512,10 +38443,14 @@ * @function create * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set + * @param {CGCMsgSQLStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse instance + * @type {{ + * (properties: CGCMsgSQLStatsResponse.$Shape): CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape; + * (properties?: CGCMsgSQLStatsResponse.$Properties): CGCMsgSQLStatsResponse; + * }} */ - CGCMsgSQLStatsResponse.create = function create(properties) { + CGCMsgSQLStatsResponse.create = function(properties) { return new CGCMsgSQLStatsResponse(properties); }; @@ -29524,31 +38459,38 @@ * @function encode * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse} message CGCMsgSQLStatsResponse message or plain object to encode + * @param {CGCMsgSQLStatsResponse.$Properties} message CGCMsgSQLStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStatsResponse.encode = function encode(message, writer) { + CGCMsgSQLStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.threads != null && Object.hasOwnProperty.call(message, "threads")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.threads); - if (message.threads_connected != null && Object.hasOwnProperty.call(message, "threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.threads_connected); - if (message.threads_active != null && Object.hasOwnProperty.call(message, "threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.threads_active); - if (message.operations_submitted != null && Object.hasOwnProperty.call(message, "operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.operations_submitted); - if (message.prepared_statements_executed != null && Object.hasOwnProperty.call(message, "prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.prepared_statements_executed); - if (message.non_prepared_statements_executed != null && Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.non_prepared_statements_executed); - if (message.deadlock_retries != null && Object.hasOwnProperty.call(message, "deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.deadlock_retries); - if (message.operations_timed_out_in_queue != null && Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.operations_timed_out_in_queue); - if (message.errors != null && Object.hasOwnProperty.call(message, "errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.errors); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29557,12 +38499,12 @@ * @function encodeDelimited * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse} message CGCMsgSQLStatsResponse message or plain object to encode + * @param {CGCMsgSQLStatsResponse.$Properties} message CGCMsgSQLStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSQLStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29572,49 +38514,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse + * @returns {CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape} CGCMsgSQLStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStatsResponse.decode = function decode(reader, length) { + CGCMsgSQLStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSQLStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSQLStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.threads = reader.uint32(); - break; - case 2: - message.threads_connected = reader.uint32(); - break; - case 3: - message.threads_active = reader.uint32(); - break; - case 4: - message.operations_submitted = reader.uint32(); - break; - case 5: - message.prepared_statements_executed = reader.uint32(); - break; - case 6: - message.non_prepared_statements_executed = reader.uint32(); - break; - case 7: - message.deadlock_retries = reader.uint32(); - break; - case 8: - message.operations_timed_out_in_queue = reader.uint32(); - break; - case 9: - message.errors = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.threads = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.threads_connected = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.threads_active = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.operations_submitted = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.prepared_statements_executed = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.non_prepared_statements_executed = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.deadlock_retries = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.operations_timed_out_in_queue = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.errors = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29624,11 +38607,11 @@ * @memberof CGCMsgSQLStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse + * @returns {CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape} CGCMsgSQLStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSQLStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29642,34 +38625,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSQLStatsResponse.verify = function verify(message) { + CGCMsgSQLStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.threads != null && message.hasOwnProperty("threads")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) if (!$util.isInteger(message.threads)) return "threads: integer expected"; - if (message.threads_connected != null && message.hasOwnProperty("threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) if (!$util.isInteger(message.threads_connected)) return "threads_connected: integer expected"; - if (message.threads_active != null && message.hasOwnProperty("threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) if (!$util.isInteger(message.threads_active)) return "threads_active: integer expected"; - if (message.operations_submitted != null && message.hasOwnProperty("operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) if (!$util.isInteger(message.operations_submitted)) return "operations_submitted: integer expected"; - if (message.prepared_statements_executed != null && message.hasOwnProperty("prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) if (!$util.isInteger(message.prepared_statements_executed)) return "prepared_statements_executed: integer expected"; - if (message.non_prepared_statements_executed != null && message.hasOwnProperty("non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) if (!$util.isInteger(message.non_prepared_statements_executed)) return "non_prepared_statements_executed: integer expected"; - if (message.deadlock_retries != null && message.hasOwnProperty("deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) if (!$util.isInteger(message.deadlock_retries)) return "deadlock_retries: integer expected"; - if (message.operations_timed_out_in_queue != null && message.hasOwnProperty("operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) if (!$util.isInteger(message.operations_timed_out_in_queue)) return "operations_timed_out_in_queue: integer expected"; - if (message.errors != null && message.hasOwnProperty("errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) if (!$util.isInteger(message.errors)) return "errors: integer expected"; return null; @@ -29683,9 +38670,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse */ - CGCMsgSQLStatsResponse.fromObject = function fromObject(object) { + CGCMsgSQLStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSQLStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSQLStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSQLStatsResponse(); if (object.threads != null) message.threads = object.threads >>> 0; @@ -29717,9 +38710,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSQLStatsResponse.toObject = function toObject(message, options) { + CGCMsgSQLStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.threads = 0; @@ -29732,23 +38729,23 @@ object.operations_timed_out_in_queue = 0; object.errors = 0; } - if (message.threads != null && message.hasOwnProperty("threads")) + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) object.threads = message.threads; - if (message.threads_connected != null && message.hasOwnProperty("threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) object.threads_connected = message.threads_connected; - if (message.threads_active != null && message.hasOwnProperty("threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) object.threads_active = message.threads_active; - if (message.operations_submitted != null && message.hasOwnProperty("operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) object.operations_submitted = message.operations_submitted; - if (message.prepared_statements_executed != null && message.hasOwnProperty("prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) object.prepared_statements_executed = message.prepared_statements_executed; - if (message.non_prepared_statements_executed != null && message.hasOwnProperty("non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) object.non_prepared_statements_executed = message.non_prepared_statements_executed; - if (message.deadlock_retries != null && message.hasOwnProperty("deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) object.deadlock_retries = message.deadlock_retries; - if (message.operations_timed_out_in_queue != null && message.hasOwnProperty("operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) object.operations_timed_out_in_queue = message.operations_timed_out_in_queue; - if (message.errors != null && message.hasOwnProperty("errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) object.errors = message.errors; return object; }; @@ -29760,8 +38757,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSQLStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSQLStatsResponse.prototype.toJSON = function() { + return CGCMsgSQLStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSQLStatsResponse + * @function getTypeUrl + * @memberof CGCMsgSQLStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSQLStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSQLStatsResponse"; }; return CGCMsgSQLStatsResponse; @@ -29771,28 +38782,41 @@ /** * Properties of a CMsgAMAddFreeLicense. - * @exports ICMsgAMAddFreeLicense - * @interface ICMsgAMAddFreeLicense + * @typedef {Object} CMsgAMAddFreeLicense.$Properties * @property {number|Long|null} [steamid] CMsgAMAddFreeLicense steamid * @property {number|null} [ip_public] CMsgAMAddFreeLicense ip_public * @property {number|null} [packageid] CMsgAMAddFreeLicense packageid * @property {string|null} [store_country_code] CMsgAMAddFreeLicense store_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMAddFreeLicense. + * @exports ICMsgAMAddFreeLicense + * @interface ICMsgAMAddFreeLicense + * @augments CMsgAMAddFreeLicense.$Properties + * @deprecated Use CMsgAMAddFreeLicense.$Properties instead. + */ + + /** + * Shape of a CMsgAMAddFreeLicense. + * @typedef {CMsgAMAddFreeLicense.$Properties} CMsgAMAddFreeLicense.$Shape */ /** * Constructs a new CMsgAMAddFreeLicense. * @exports CMsgAMAddFreeLicense * @classdesc Represents a CMsgAMAddFreeLicense. - * @implements ICMsgAMAddFreeLicense * @constructor - * @param {ICMsgAMAddFreeLicense=} [properties] Properties to set + * @param {CMsgAMAddFreeLicense.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMAddFreeLicense(properties) { + var CMsgAMAddFreeLicense = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMAddFreeLicense steamid. @@ -29800,7 +38824,7 @@ * @memberof CMsgAMAddFreeLicense * @instance */ - CMsgAMAddFreeLicense.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMAddFreeLicense.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMAddFreeLicense ip_public. @@ -29831,10 +38855,14 @@ * @function create * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense=} [properties] Properties to set + * @param {CMsgAMAddFreeLicense.$Properties=} [properties] Properties to set * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense instance + * @type {{ + * (properties: CMsgAMAddFreeLicense.$Shape): CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape; + * (properties?: CMsgAMAddFreeLicense.$Properties): CMsgAMAddFreeLicense; + * }} */ - CMsgAMAddFreeLicense.create = function create(properties) { + CMsgAMAddFreeLicense.create = function(properties) { return new CMsgAMAddFreeLicense(properties); }; @@ -29843,21 +38871,28 @@ * @function encode * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense} message CMsgAMAddFreeLicense message or plain object to encode + * @param {CMsgAMAddFreeLicense.$Properties} message CMsgAMAddFreeLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicense.encode = function encode(message, writer) { + CMsgAMAddFreeLicense.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.ip_public != null && Object.hasOwnProperty.call(message, "ip_public")) + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ip_public); - if (message.packageid != null && Object.hasOwnProperty.call(message, "packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.packageid); - if (message.store_country_code != null && Object.hasOwnProperty.call(message, "store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.store_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29866,12 +38901,12 @@ * @function encodeDelimited * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense} message CMsgAMAddFreeLicense message or plain object to encode + * @param {CMsgAMAddFreeLicense.$Properties} message CMsgAMAddFreeLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMAddFreeLicense.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29881,34 +38916,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense + * @returns {CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape} CMsgAMAddFreeLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicense.decode = function decode(reader, length) { + CMsgAMAddFreeLicense.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMAddFreeLicense(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMAddFreeLicense(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.ip_public = reader.uint32(); - break; - case 3: - message.packageid = reader.uint32(); - break; - case 4: - message.store_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.ip_public = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.packageid = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.store_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29918,11 +38979,11 @@ * @memberof CMsgAMAddFreeLicense * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense + * @returns {CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape} CMsgAMAddFreeLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicense.decodeDelimited = function decodeDelimited(reader) { + CMsgAMAddFreeLicense.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29936,19 +38997,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMAddFreeLicense.verify = function verify(message) { + CMsgAMAddFreeLicense.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.ip_public != null && message.hasOwnProperty("ip_public")) + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) if (!$util.isInteger(message.ip_public)) return "ip_public: integer expected"; - if (message.packageid != null && message.hasOwnProperty("packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) if (!$util.isInteger(message.packageid)) return "packageid: integer expected"; - if (message.store_country_code != null && message.hasOwnProperty("store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) if (!$util.isString(message.store_country_code)) return "store_country_code: string expected"; return null; @@ -29962,25 +39027,31 @@ * @param {Object.} object Plain object * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense */ - CMsgAMAddFreeLicense.fromObject = function fromObject(object) { + CMsgAMAddFreeLicense.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMAddFreeLicense) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMAddFreeLicense: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMAddFreeLicense(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.ip_public != null) message.ip_public = object.ip_public >>> 0; if (object.packageid != null) message.packageid = object.packageid >>> 0; if (object.store_country_code != null) - message.store_country_code = String(object.store_country_code); + message.store_country_code = $String(object.store_country_code); return message; }; @@ -29993,30 +39064,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMAddFreeLicense.toObject = function toObject(message, options) { + CMsgAMAddFreeLicense.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.ip_public = 0; object.packageid = 0; object.store_country_code = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.ip_public != null && message.hasOwnProperty("ip_public")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) object.ip_public = message.ip_public; - if (message.packageid != null && message.hasOwnProperty("packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) object.packageid = message.packageid; - if (message.store_country_code != null && message.hasOwnProperty("store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) object.store_country_code = message.store_country_code; return object; }; @@ -30028,8 +39105,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMAddFreeLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMAddFreeLicense.prototype.toJSON = function() { + return CMsgAMAddFreeLicense.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMAddFreeLicense + * @function getTypeUrl + * @memberof CMsgAMAddFreeLicense + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMAddFreeLicense.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMAddFreeLicense"; }; return CMsgAMAddFreeLicense; @@ -30039,27 +39130,40 @@ /** * Properties of a CMsgAMAddFreeLicenseResponse. - * @exports ICMsgAMAddFreeLicenseResponse - * @interface ICMsgAMAddFreeLicenseResponse + * @typedef {Object} CMsgAMAddFreeLicenseResponse.$Properties * @property {number|null} [eresult] CMsgAMAddFreeLicenseResponse eresult * @property {number|null} [purchase_result_detail] CMsgAMAddFreeLicenseResponse purchase_result_detail * @property {number|Long|null} [transid] CMsgAMAddFreeLicenseResponse transid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMAddFreeLicenseResponse. + * @exports ICMsgAMAddFreeLicenseResponse + * @interface ICMsgAMAddFreeLicenseResponse + * @augments CMsgAMAddFreeLicenseResponse.$Properties + * @deprecated Use CMsgAMAddFreeLicenseResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMAddFreeLicenseResponse. + * @typedef {CMsgAMAddFreeLicenseResponse.$Properties} CMsgAMAddFreeLicenseResponse.$Shape */ /** * Constructs a new CMsgAMAddFreeLicenseResponse. * @exports CMsgAMAddFreeLicenseResponse * @classdesc Represents a CMsgAMAddFreeLicenseResponse. - * @implements ICMsgAMAddFreeLicenseResponse * @constructor - * @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set + * @param {CMsgAMAddFreeLicenseResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMAddFreeLicenseResponse(properties) { + var CMsgAMAddFreeLicenseResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMAddFreeLicenseResponse eresult. @@ -30083,17 +39187,21 @@ * @memberof CMsgAMAddFreeLicenseResponse * @instance */ - CMsgAMAddFreeLicenseResponse.prototype.transid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMAddFreeLicenseResponse.prototype.transid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgAMAddFreeLicenseResponse instance using the specified properties. * @function create * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set + * @param {CMsgAMAddFreeLicenseResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse instance + * @type {{ + * (properties: CMsgAMAddFreeLicenseResponse.$Shape): CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape; + * (properties?: CMsgAMAddFreeLicenseResponse.$Properties): CMsgAMAddFreeLicenseResponse; + * }} */ - CMsgAMAddFreeLicenseResponse.create = function create(properties) { + CMsgAMAddFreeLicenseResponse.create = function(properties) { return new CMsgAMAddFreeLicenseResponse(properties); }; @@ -30102,19 +39210,26 @@ * @function encode * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse} message CMsgAMAddFreeLicenseResponse message or plain object to encode + * @param {CMsgAMAddFreeLicenseResponse.$Properties} message CMsgAMAddFreeLicenseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicenseResponse.encode = function encode(message, writer) { + CMsgAMAddFreeLicenseResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); - if (message.purchase_result_detail != null && Object.hasOwnProperty.call(message, "purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.purchase_result_detail); - if (message.transid != null && Object.hasOwnProperty.call(message, "transid")) + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.transid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30123,12 +39238,12 @@ * @function encodeDelimited * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse} message CMsgAMAddFreeLicenseResponse message or plain object to encode + * @param {CMsgAMAddFreeLicenseResponse.$Properties} message CMsgAMAddFreeLicenseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicenseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMAddFreeLicenseResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30138,31 +39253,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse + * @returns {CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape} CMsgAMAddFreeLicenseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicenseResponse.decode = function decode(reader, length) { + CMsgAMAddFreeLicenseResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMAddFreeLicenseResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMAddFreeLicenseResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - case 2: - message.purchase_result_detail = reader.int32(); - break; - case 3: - message.transid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.purchase_result_detail = reader.int32(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.transid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30172,11 +39310,11 @@ * @memberof CMsgAMAddFreeLicenseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse + * @returns {CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape} CMsgAMAddFreeLicenseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicenseResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMAddFreeLicenseResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30190,16 +39328,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMAddFreeLicenseResponse.verify = function verify(message) { + CMsgAMAddFreeLicenseResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.purchase_result_detail != null && message.hasOwnProperty("purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) if (!$util.isInteger(message.purchase_result_detail)) return "purchase_result_detail: integer expected"; - if (message.transid != null && message.hasOwnProperty("transid")) + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) if (!$util.isInteger(message.transid) && !(message.transid && $util.isInteger(message.transid.low) && $util.isInteger(message.transid.high))) return "transid: integer|Long expected"; return null; @@ -30213,9 +39355,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse */ - CMsgAMAddFreeLicenseResponse.fromObject = function fromObject(object) { + CMsgAMAddFreeLicenseResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMAddFreeLicenseResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMAddFreeLicenseResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMAddFreeLicenseResponse(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -30223,13 +39371,13 @@ message.purchase_result_detail = object.purchase_result_detail | 0; if (object.transid != null) if ($util.Long) - (message.transid = $util.Long.fromValue(object.transid)).unsigned = false; + message.transid = $util.Long.fromValue(object.transid, true); else if (typeof object.transid === "string") - message.transid = parseInt(object.transid, 10); + message.transid = $parseInt(object.transid, 10); else if (typeof object.transid === "number") message.transid = object.transid; else if (typeof object.transid === "object") - message.transid = new $util.LongBits(object.transid.low >>> 0, object.transid.high >>> 0).toNumber(); + message.transid = new $util.LongBits(object.transid.low >>> 0, object.transid.high >>> 0).toNumber(true); return message; }; @@ -30242,28 +39390,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMAddFreeLicenseResponse.toObject = function toObject(message, options) { + CMsgAMAddFreeLicenseResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.purchase_result_detail = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.transid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.transid = options.longs === String ? "0" : 0; + object.transid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.purchase_result_detail != null && message.hasOwnProperty("purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) object.purchase_result_detail = message.purchase_result_detail; - if (message.transid != null && message.hasOwnProperty("transid")) - if (typeof message.transid === "number") - object.transid = options.longs === String ? String(message.transid) : message.transid; + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.transid = typeof message.transid === "number" ? $BigInt(message.transid) : $util.Long.fromBits(message.transid.low >>> 0, message.transid.high >>> 0, true).toBigInt(); + else if (typeof message.transid === "number") + object.transid = options.longs === $String ? $String(message.transid) : message.transid; else - object.transid = options.longs === String ? $util.Long.prototype.toString.call(message.transid) : options.longs === Number ? new $util.LongBits(message.transid.low >>> 0, message.transid.high >>> 0).toNumber() : message.transid; + object.transid = options.longs === $String ? $util.Long.prototype.toString.call(message.transid) : options.longs === $Number ? new $util.LongBits(message.transid.low >>> 0, message.transid.high >>> 0).toNumber(true) : message.transid; return object; }; @@ -30274,8 +39428,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMAddFreeLicenseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMAddFreeLicenseResponse.prototype.toJSON = function() { + return CMsgAMAddFreeLicenseResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMAddFreeLicenseResponse + * @function getTypeUrl + * @memberof CMsgAMAddFreeLicenseResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMAddFreeLicenseResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMAddFreeLicenseResponse"; }; return CMsgAMAddFreeLicenseResponse; @@ -30283,28 +39451,41 @@ $root.CGCMsgGetIPLocation = (function() { + /** + * Properties of a CGCMsgGetIPLocation. + * @typedef {Object} CGCMsgGetIPLocation.$Properties + * @property {Array.|null} [ips] CGCMsgGetIPLocation ips + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetIPLocation. * @exports ICGCMsgGetIPLocation * @interface ICGCMsgGetIPLocation - * @property {Array.|null} [ips] CGCMsgGetIPLocation ips + * @augments CGCMsgGetIPLocation.$Properties + * @deprecated Use CGCMsgGetIPLocation.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetIPLocation. + * @typedef {CGCMsgGetIPLocation.$Properties} CGCMsgGetIPLocation.$Shape */ /** * Constructs a new CGCMsgGetIPLocation. * @exports CGCMsgGetIPLocation * @classdesc Represents a CGCMsgGetIPLocation. - * @implements ICGCMsgGetIPLocation * @constructor - * @param {ICGCMsgGetIPLocation=} [properties] Properties to set + * @param {CGCMsgGetIPLocation.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetIPLocation(properties) { + var CGCMsgGetIPLocation = function (properties) { this.ips = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetIPLocation ips. @@ -30319,10 +39500,14 @@ * @function create * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation=} [properties] Properties to set + * @param {CGCMsgGetIPLocation.$Properties=} [properties] Properties to set * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation instance + * @type {{ + * (properties: CGCMsgGetIPLocation.$Shape): CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape; + * (properties?: CGCMsgGetIPLocation.$Properties): CGCMsgGetIPLocation; + * }} */ - CGCMsgGetIPLocation.create = function create(properties) { + CGCMsgGetIPLocation.create = function(properties) { return new CGCMsgGetIPLocation(properties); }; @@ -30331,16 +39516,23 @@ * @function encode * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation} message CGCMsgGetIPLocation message or plain object to encode + * @param {CGCMsgGetIPLocation.$Properties} message CGCMsgGetIPLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocation.encode = function encode(message, writer) { + CGCMsgGetIPLocation.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.ips != null && message.ips.length) for (var i = 0; i < message.ips.length; ++i) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.ips[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30349,12 +39541,12 @@ * @function encodeDelimited * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation} message CGCMsgGetIPLocation message or plain object to encode + * @param {CGCMsgGetIPLocation.$Properties} message CGCMsgGetIPLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetIPLocation.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30364,32 +39556,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation + * @returns {CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape} CGCMsgGetIPLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocation.decode = function decode(reader, length) { + CGCMsgGetIPLocation.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetIPLocation(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetIPLocation(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.ips && message.ips.length)) - message.ips = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ips.push(reader.fixed32()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.ips && message.ips.length)) + message.ips = []; + reader.fixed32s(message.ips); + continue; + } + if (wireType !== 5) + break; + if (!(message.ips && message.ips.length)) + message.ips = []; message.ips.push(reader.fixed32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30399,11 +39609,11 @@ * @memberof CGCMsgGetIPLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation + * @returns {CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape} CGCMsgGetIPLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocation.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetIPLocation.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30417,11 +39627,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetIPLocation.verify = function verify(message) { + CGCMsgGetIPLocation.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ips != null && message.hasOwnProperty("ips")) { - if (!Array.isArray(message.ips)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ips != null && $Object.hasOwnProperty.call(message, "ips")) { + if (!$Array.isArray(message.ips)) return "ips: array expected"; for (var i = 0; i < message.ips.length; ++i) if (!$util.isInteger(message.ips[i])) @@ -30438,14 +39652,20 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation */ - CGCMsgGetIPLocation.fromObject = function fromObject(object) { + CGCMsgGetIPLocation.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetIPLocation) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetIPLocation: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetIPLocation(); if (object.ips) { - if (!Array.isArray(object.ips)) - throw TypeError(".CGCMsgGetIPLocation.ips: array expected"); - message.ips = []; + if (!$Array.isArray(object.ips)) + throw $TypeError(".CGCMsgGetIPLocation.ips: array expected"); + message.ips = $Array(object.ips.length); for (var i = 0; i < object.ips.length; ++i) message.ips[i] = object.ips[i] >>> 0; } @@ -30461,14 +39681,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetIPLocation.toObject = function toObject(message, options) { + CGCMsgGetIPLocation.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.ips = []; if (message.ips && message.ips.length) { - object.ips = []; + object.ips = $Array(message.ips.length); for (var j = 0; j < message.ips.length; ++j) object.ips[j] = message.ips[j]; } @@ -30482,8 +39706,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetIPLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetIPLocation.prototype.toJSON = function() { + return CGCMsgGetIPLocation.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetIPLocation + * @function getTypeUrl + * @memberof CGCMsgGetIPLocation + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetIPLocation.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetIPLocation"; }; return CGCMsgGetIPLocation; @@ -30493,30 +39731,43 @@ /** * Properties of a CIPLocationInfo. - * @exports ICIPLocationInfo - * @interface ICIPLocationInfo + * @typedef {Object} CIPLocationInfo.$Properties * @property {number|null} [ip] CIPLocationInfo ip * @property {number|null} [latitude] CIPLocationInfo latitude * @property {number|null} [longitude] CIPLocationInfo longitude * @property {string|null} [country] CIPLocationInfo country * @property {string|null} [state] CIPLocationInfo state * @property {string|null} [city] CIPLocationInfo city + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CIPLocationInfo. + * @exports ICIPLocationInfo + * @interface ICIPLocationInfo + * @augments CIPLocationInfo.$Properties + * @deprecated Use CIPLocationInfo.$Properties instead. + */ + + /** + * Shape of a CIPLocationInfo. + * @typedef {CIPLocationInfo.$Properties} CIPLocationInfo.$Shape */ /** * Constructs a new CIPLocationInfo. * @exports CIPLocationInfo * @classdesc Represents a CIPLocationInfo. - * @implements ICIPLocationInfo * @constructor - * @param {ICIPLocationInfo=} [properties] Properties to set + * @param {CIPLocationInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CIPLocationInfo(properties) { + var CIPLocationInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CIPLocationInfo ip. @@ -30571,10 +39822,14 @@ * @function create * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo=} [properties] Properties to set + * @param {CIPLocationInfo.$Properties=} [properties] Properties to set * @returns {CIPLocationInfo} CIPLocationInfo instance + * @type {{ + * (properties: CIPLocationInfo.$Shape): CIPLocationInfo & CIPLocationInfo.$Shape; + * (properties?: CIPLocationInfo.$Properties): CIPLocationInfo; + * }} */ - CIPLocationInfo.create = function create(properties) { + CIPLocationInfo.create = function(properties) { return new CIPLocationInfo(properties); }; @@ -30583,25 +39838,32 @@ * @function encode * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo} message CIPLocationInfo message or plain object to encode + * @param {CIPLocationInfo.$Properties} message CIPLocationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CIPLocationInfo.encode = function encode(message, writer) { + CIPLocationInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.ip); - if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.latitude); - if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.longitude); - if (message.country != null && Object.hasOwnProperty.call(message, "country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.state); - if (message.city != null && Object.hasOwnProperty.call(message, "city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.city); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30610,12 +39872,12 @@ * @function encodeDelimited * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo} message CIPLocationInfo message or plain object to encode + * @param {CIPLocationInfo.$Properties} message CIPLocationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CIPLocationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CIPLocationInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30625,40 +39887,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CIPLocationInfo} CIPLocationInfo + * @returns {CIPLocationInfo & CIPLocationInfo.$Shape} CIPLocationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CIPLocationInfo.decode = function decode(reader, length) { + CIPLocationInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CIPLocationInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CIPLocationInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ip = reader.uint32(); - break; - case 2: - message.latitude = reader.float(); - break; - case 3: - message.longitude = reader.float(); - break; - case 4: - message.country = reader.string(); - break; - case 5: - message.state = reader.string(); - break; - case 6: - message.city = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ip = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.latitude = reader.float(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.longitude = reader.float(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.country = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.state = reader.string(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.city = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30668,11 +39962,11 @@ * @memberof CIPLocationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CIPLocationInfo} CIPLocationInfo + * @returns {CIPLocationInfo & CIPLocationInfo.$Shape} CIPLocationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CIPLocationInfo.decodeDelimited = function decodeDelimited(reader) { + CIPLocationInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30686,25 +39980,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CIPLocationInfo.verify = function verify(message) { + CIPLocationInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ip != null && message.hasOwnProperty("ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) if (!$util.isInteger(message.ip)) return "ip: integer expected"; - if (message.latitude != null && message.hasOwnProperty("latitude")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) if (typeof message.latitude !== "number") return "latitude: number expected"; - if (message.longitude != null && message.hasOwnProperty("longitude")) + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) if (typeof message.longitude !== "number") return "longitude: number expected"; - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) if (!$util.isString(message.country)) return "country: string expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) if (!$util.isString(message.state)) return "state: string expected"; - if (message.city != null && message.hasOwnProperty("city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) if (!$util.isString(message.city)) return "city: string expected"; return null; @@ -30718,22 +40016,28 @@ * @param {Object.} object Plain object * @returns {CIPLocationInfo} CIPLocationInfo */ - CIPLocationInfo.fromObject = function fromObject(object) { + CIPLocationInfo.fromObject = function (object, _depth) { if (object instanceof $root.CIPLocationInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CIPLocationInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CIPLocationInfo(); if (object.ip != null) message.ip = object.ip >>> 0; if (object.latitude != null) - message.latitude = Number(object.latitude); + message.latitude = $Number(object.latitude); if (object.longitude != null) - message.longitude = Number(object.longitude); + message.longitude = $Number(object.longitude); if (object.country != null) - message.country = String(object.country); + message.country = $String(object.country); if (object.state != null) - message.state = String(object.state); + message.state = $String(object.state); if (object.city != null) - message.city = String(object.city); + message.city = $String(object.city); return message; }; @@ -30746,9 +40050,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CIPLocationInfo.toObject = function toObject(message, options) { + CIPLocationInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.ip = 0; @@ -30758,17 +40066,17 @@ object.state = ""; object.city = ""; } - if (message.ip != null && message.hasOwnProperty("ip")) + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) object.ip = message.ip; - if (message.latitude != null && message.hasOwnProperty("latitude")) - object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; - if (message.longitude != null && message.hasOwnProperty("longitude")) - object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; - if (message.country != null && message.hasOwnProperty("country")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) + object.latitude = options.json && !$isFinite(message.latitude) ? $String(message.latitude) : message.latitude; + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) + object.longitude = options.json && !$isFinite(message.longitude) ? $String(message.longitude) : message.longitude; + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) object.country = message.country; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) object.state = message.state; - if (message.city != null && message.hasOwnProperty("city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) object.city = message.city; return object; }; @@ -30780,8 +40088,22 @@ * @instance * @returns {Object.} JSON object */ - CIPLocationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CIPLocationInfo.prototype.toJSON = function() { + return CIPLocationInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CIPLocationInfo + * @function getTypeUrl + * @memberof CIPLocationInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CIPLocationInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CIPLocationInfo"; }; return CIPLocationInfo; @@ -30789,32 +40111,45 @@ $root.CGCMsgGetIPLocationResponse = (function() { + /** + * Properties of a CGCMsgGetIPLocationResponse. + * @typedef {Object} CGCMsgGetIPLocationResponse.$Properties + * @property {Array.|null} [infos] CGCMsgGetIPLocationResponse infos + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetIPLocationResponse. * @exports ICGCMsgGetIPLocationResponse * @interface ICGCMsgGetIPLocationResponse - * @property {Array.|null} [infos] CGCMsgGetIPLocationResponse infos + * @augments CGCMsgGetIPLocationResponse.$Properties + * @deprecated Use CGCMsgGetIPLocationResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetIPLocationResponse. + * @typedef {CGCMsgGetIPLocationResponse.$Properties} CGCMsgGetIPLocationResponse.$Shape */ /** * Constructs a new CGCMsgGetIPLocationResponse. * @exports CGCMsgGetIPLocationResponse * @classdesc Represents a CGCMsgGetIPLocationResponse. - * @implements ICGCMsgGetIPLocationResponse * @constructor - * @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set + * @param {CGCMsgGetIPLocationResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetIPLocationResponse(properties) { + var CGCMsgGetIPLocationResponse = function (properties) { this.infos = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetIPLocationResponse infos. - * @member {Array.} infos + * @member {Array.} infos * @memberof CGCMsgGetIPLocationResponse * @instance */ @@ -30825,10 +40160,14 @@ * @function create * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set + * @param {CGCMsgGetIPLocationResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse instance + * @type {{ + * (properties: CGCMsgGetIPLocationResponse.$Shape): CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape; + * (properties?: CGCMsgGetIPLocationResponse.$Properties): CGCMsgGetIPLocationResponse; + * }} */ - CGCMsgGetIPLocationResponse.create = function create(properties) { + CGCMsgGetIPLocationResponse.create = function(properties) { return new CGCMsgGetIPLocationResponse(properties); }; @@ -30837,16 +40176,23 @@ * @function encode * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse} message CGCMsgGetIPLocationResponse message or plain object to encode + * @param {CGCMsgGetIPLocationResponse.$Properties} message CGCMsgGetIPLocationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocationResponse.encode = function encode(message, writer) { + CGCMsgGetIPLocationResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.infos != null && message.infos.length) for (var i = 0; i < message.infos.length; ++i) - $root.CIPLocationInfo.encode(message.infos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CIPLocationInfo.encode(message.infos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30855,12 +40201,12 @@ * @function encodeDelimited * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse} message CGCMsgGetIPLocationResponse message or plain object to encode + * @param {CGCMsgGetIPLocationResponse.$Properties} message CGCMsgGetIPLocationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetIPLocationResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30870,27 +40216,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse + * @returns {CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape} CGCMsgGetIPLocationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocationResponse.decode = function decode(reader, length) { + CGCMsgGetIPLocationResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetIPLocationResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetIPLocationResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.infos && message.infos.length)) - message.infos = []; - message.infos.push($root.CIPLocationInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.infos && message.infos.length)) + message.infos = []; + message.infos.push($root.CIPLocationInfo.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30900,11 +40263,11 @@ * @memberof CGCMsgGetIPLocationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse + * @returns {CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape} CGCMsgGetIPLocationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocationResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetIPLocationResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30918,14 +40281,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetIPLocationResponse.verify = function verify(message) { + CGCMsgGetIPLocationResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.infos != null && message.hasOwnProperty("infos")) { - if (!Array.isArray(message.infos)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.infos != null && $Object.hasOwnProperty.call(message, "infos")) { + if (!$Array.isArray(message.infos)) return "infos: array expected"; for (var i = 0; i < message.infos.length; ++i) { - var error = $root.CIPLocationInfo.verify(message.infos[i]); + var error = $root.CIPLocationInfo.verify(message.infos[i], _depth + 1); if (error) return "infos." + error; } @@ -30941,18 +40308,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse */ - CGCMsgGetIPLocationResponse.fromObject = function fromObject(object) { + CGCMsgGetIPLocationResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetIPLocationResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetIPLocationResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetIPLocationResponse(); if (object.infos) { - if (!Array.isArray(object.infos)) - throw TypeError(".CGCMsgGetIPLocationResponse.infos: array expected"); - message.infos = []; + if (!$Array.isArray(object.infos)) + throw $TypeError(".CGCMsgGetIPLocationResponse.infos: array expected"); + message.infos = $Array(object.infos.length); for (var i = 0; i < object.infos.length; ++i) { - if (typeof object.infos[i] !== "object") - throw TypeError(".CGCMsgGetIPLocationResponse.infos: object expected"); - message.infos[i] = $root.CIPLocationInfo.fromObject(object.infos[i]); + if (!$util.isObject(object.infos[i])) + throw $TypeError(".CGCMsgGetIPLocationResponse.infos: object expected"); + message.infos[i] = $root.CIPLocationInfo.fromObject(object.infos[i], _depth + 1); } } return message; @@ -30967,16 +40340,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetIPLocationResponse.toObject = function toObject(message, options) { + CGCMsgGetIPLocationResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.infos = []; if (message.infos && message.infos.length) { - object.infos = []; + object.infos = $Array(message.infos.length); for (var j = 0; j < message.infos.length; ++j) - object.infos[j] = $root.CIPLocationInfo.toObject(message.infos[j], options); + object.infos[j] = $root.CIPLocationInfo.toObject(message.infos[j], options, _depth + 1); } return object; }; @@ -30988,8 +40365,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetIPLocationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetIPLocationResponse.prototype.toJSON = function() { + return CGCMsgGetIPLocationResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetIPLocationResponse + * @function getTypeUrl + * @memberof CGCMsgGetIPLocationResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetIPLocationResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetIPLocationResponse"; }; return CGCMsgGetIPLocationResponse; @@ -30999,26 +40390,39 @@ /** * Properties of a CGCMsgSystemStatsSchema. - * @exports ICGCMsgSystemStatsSchema - * @interface ICGCMsgSystemStatsSchema + * @typedef {Object} CGCMsgSystemStatsSchema.$Properties * @property {number|null} [gc_app_id] CGCMsgSystemStatsSchema gc_app_id * @property {Uint8Array|null} [schema_kv] CGCMsgSystemStatsSchema schema_kv + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgSystemStatsSchema. + * @exports ICGCMsgSystemStatsSchema + * @interface ICGCMsgSystemStatsSchema + * @augments CGCMsgSystemStatsSchema.$Properties + * @deprecated Use CGCMsgSystemStatsSchema.$Properties instead. + */ + + /** + * Shape of a CGCMsgSystemStatsSchema. + * @typedef {CGCMsgSystemStatsSchema.$Properties} CGCMsgSystemStatsSchema.$Shape */ /** * Constructs a new CGCMsgSystemStatsSchema. * @exports CGCMsgSystemStatsSchema * @classdesc Represents a CGCMsgSystemStatsSchema. - * @implements ICGCMsgSystemStatsSchema * @constructor - * @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set + * @param {CGCMsgSystemStatsSchema.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSystemStatsSchema(properties) { + var CGCMsgSystemStatsSchema = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSystemStatsSchema gc_app_id. @@ -31041,10 +40445,14 @@ * @function create * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set + * @param {CGCMsgSystemStatsSchema.$Properties=} [properties] Properties to set * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema instance + * @type {{ + * (properties: CGCMsgSystemStatsSchema.$Shape): CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape; + * (properties?: CGCMsgSystemStatsSchema.$Properties): CGCMsgSystemStatsSchema; + * }} */ - CGCMsgSystemStatsSchema.create = function create(properties) { + CGCMsgSystemStatsSchema.create = function(properties) { return new CGCMsgSystemStatsSchema(properties); }; @@ -31053,17 +40461,24 @@ * @function encode * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema} message CGCMsgSystemStatsSchema message or plain object to encode + * @param {CGCMsgSystemStatsSchema.$Properties} message CGCMsgSystemStatsSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSystemStatsSchema.encode = function encode(message, writer) { + CGCMsgSystemStatsSchema.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gc_app_id != null && Object.hasOwnProperty.call(message, "gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gc_app_id); - if (message.schema_kv != null && Object.hasOwnProperty.call(message, "schema_kv")) + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.schema_kv); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31072,12 +40487,12 @@ * @function encodeDelimited * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema} message CGCMsgSystemStatsSchema message or plain object to encode + * @param {CGCMsgSystemStatsSchema.$Properties} message CGCMsgSystemStatsSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSystemStatsSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSystemStatsSchema.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31087,28 +40502,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema + * @returns {CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape} CGCMsgSystemStatsSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSystemStatsSchema.decode = function decode(reader, length) { + CGCMsgSystemStatsSchema.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSystemStatsSchema(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSystemStatsSchema(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gc_app_id = reader.uint32(); - break; - case 2: - message.schema_kv = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gc_app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.schema_kv = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31118,11 +40553,11 @@ * @memberof CGCMsgSystemStatsSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema + * @returns {CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape} CGCMsgSystemStatsSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSystemStatsSchema.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSystemStatsSchema.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31136,13 +40571,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSystemStatsSchema.verify = function verify(message) { + CGCMsgSystemStatsSchema.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) if (!$util.isInteger(message.gc_app_id)) return "gc_app_id: integer expected"; - if (message.schema_kv != null && message.hasOwnProperty("schema_kv")) + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) if (!(message.schema_kv && typeof message.schema_kv.length === "number" || $util.isString(message.schema_kv))) return "schema_kv: buffer expected"; return null; @@ -31156,16 +40595,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema */ - CGCMsgSystemStatsSchema.fromObject = function fromObject(object) { + CGCMsgSystemStatsSchema.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSystemStatsSchema) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSystemStatsSchema: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSystemStatsSchema(); if (object.gc_app_id != null) message.gc_app_id = object.gc_app_id >>> 0; if (object.schema_kv != null) if (typeof object.schema_kv === "string") $util.base64.decode(object.schema_kv, message.schema_kv = $util.newBuffer($util.base64.length(object.schema_kv)), 0); - else if (object.schema_kv.length) + else if (object.schema_kv.length >= 0) message.schema_kv = object.schema_kv; return message; }; @@ -31179,24 +40624,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSystemStatsSchema.toObject = function toObject(message, options) { + CGCMsgSystemStatsSchema.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gc_app_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.schema_kv = ""; else { object.schema_kv = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.schema_kv = $util.newBuffer(object.schema_kv); } } - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) object.gc_app_id = message.gc_app_id; - if (message.schema_kv != null && message.hasOwnProperty("schema_kv")) - object.schema_kv = options.bytes === String ? $util.base64.encode(message.schema_kv, 0, message.schema_kv.length) : options.bytes === Array ? Array.prototype.slice.call(message.schema_kv) : message.schema_kv; + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) + object.schema_kv = options.bytes === $String ? $util.base64.encode(message.schema_kv, 0, message.schema_kv.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.schema_kv) : message.schema_kv; return object; }; @@ -31207,8 +40656,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSystemStatsSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSystemStatsSchema.prototype.toJSON = function() { + return CGCMsgSystemStatsSchema.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSystemStatsSchema + * @function getTypeUrl + * @memberof CGCMsgSystemStatsSchema + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSystemStatsSchema.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSystemStatsSchema"; }; return CGCMsgSystemStatsSchema; @@ -31216,36 +40679,53 @@ $root.CGCMsgGetSystemStats = (function() { + /** + * Properties of a CGCMsgGetSystemStats. + * @typedef {Object} CGCMsgGetSystemStats.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetSystemStats. * @exports ICGCMsgGetSystemStats * @interface ICGCMsgGetSystemStats + * @augments CGCMsgGetSystemStats.$Properties + * @deprecated Use CGCMsgGetSystemStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetSystemStats. + * @typedef {CGCMsgGetSystemStats.$Properties} CGCMsgGetSystemStats.$Shape */ /** * Constructs a new CGCMsgGetSystemStats. * @exports CGCMsgGetSystemStats * @classdesc Represents a CGCMsgGetSystemStats. - * @implements ICGCMsgGetSystemStats * @constructor - * @param {ICGCMsgGetSystemStats=} [properties] Properties to set + * @param {CGCMsgGetSystemStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetSystemStats(properties) { + var CGCMsgGetSystemStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CGCMsgGetSystemStats instance using the specified properties. * @function create * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats=} [properties] Properties to set + * @param {CGCMsgGetSystemStats.$Properties=} [properties] Properties to set * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats instance + * @type {{ + * (properties: CGCMsgGetSystemStats.$Shape): CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape; + * (properties?: CGCMsgGetSystemStats.$Properties): CGCMsgGetSystemStats; + * }} */ - CGCMsgGetSystemStats.create = function create(properties) { + CGCMsgGetSystemStats.create = function(properties) { return new CGCMsgGetSystemStats(properties); }; @@ -31254,13 +40734,20 @@ * @function encode * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats} message CGCMsgGetSystemStats message or plain object to encode + * @param {CGCMsgGetSystemStats.$Properties} message CGCMsgGetSystemStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStats.encode = function encode(message, writer) { + CGCMsgGetSystemStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31269,12 +40756,12 @@ * @function encodeDelimited * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats} message CGCMsgGetSystemStats message or plain object to encode + * @param {CGCMsgGetSystemStats.$Properties} message CGCMsgGetSystemStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetSystemStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31284,22 +40771,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats + * @returns {CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape} CGCMsgGetSystemStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStats.decode = function decode(reader, length) { + CGCMsgGetSystemStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetSystemStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetSystemStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31309,11 +40807,11 @@ * @memberof CGCMsgGetSystemStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats + * @returns {CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape} CGCMsgGetSystemStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetSystemStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31327,9 +40825,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetSystemStats.verify = function verify(message) { + CGCMsgGetSystemStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -31341,9 +40843,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats */ - CGCMsgGetSystemStats.fromObject = function fromObject(object) { + CGCMsgGetSystemStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetSystemStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetSystemStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CGCMsgGetSystemStats(); }; @@ -31356,7 +40864,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetSystemStats.toObject = function toObject() { + CGCMsgGetSystemStats.toObject = function () { return {}; }; @@ -31367,8 +40875,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetSystemStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetSystemStats.prototype.toJSON = function() { + return CGCMsgGetSystemStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetSystemStats + * @function getTypeUrl + * @memberof CGCMsgGetSystemStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetSystemStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetSystemStats"; }; return CGCMsgGetSystemStats; @@ -31378,8 +40900,7 @@ /** * Properties of a CGCMsgGetSystemStatsResponse. - * @exports ICGCMsgGetSystemStatsResponse - * @interface ICGCMsgGetSystemStatsResponse + * @typedef {Object} CGCMsgGetSystemStatsResponse.$Properties * @property {number|null} [gc_app_id] CGCMsgGetSystemStatsResponse gc_app_id * @property {Uint8Array|null} [stats_kv] CGCMsgGetSystemStatsResponse stats_kv * @property {number|null} [active_jobs] CGCMsgGetSystemStatsResponse active_jobs @@ -31393,22 +40914,36 @@ * @property {number|null} [steamid_locks] CGCMsgGetSystemStatsResponse steamid_locks * @property {number|null} [logon_queue] CGCMsgGetSystemStatsResponse logon_queue * @property {number|null} [logon_jobs] CGCMsgGetSystemStatsResponse logon_jobs + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgGetSystemStatsResponse. + * @exports ICGCMsgGetSystemStatsResponse + * @interface ICGCMsgGetSystemStatsResponse + * @augments CGCMsgGetSystemStatsResponse.$Properties + * @deprecated Use CGCMsgGetSystemStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetSystemStatsResponse. + * @typedef {CGCMsgGetSystemStatsResponse.$Properties} CGCMsgGetSystemStatsResponse.$Shape */ /** * Constructs a new CGCMsgGetSystemStatsResponse. * @exports CGCMsgGetSystemStatsResponse * @classdesc Represents a CGCMsgGetSystemStatsResponse. - * @implements ICGCMsgGetSystemStatsResponse * @constructor - * @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set + * @param {CGCMsgGetSystemStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetSystemStatsResponse(properties) { + var CGCMsgGetSystemStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetSystemStatsResponse gc_app_id. @@ -31519,10 +41054,14 @@ * @function create * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set + * @param {CGCMsgGetSystemStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse instance + * @type {{ + * (properties: CGCMsgGetSystemStatsResponse.$Shape): CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape; + * (properties?: CGCMsgGetSystemStatsResponse.$Properties): CGCMsgGetSystemStatsResponse; + * }} */ - CGCMsgGetSystemStatsResponse.create = function create(properties) { + CGCMsgGetSystemStatsResponse.create = function(properties) { return new CGCMsgGetSystemStatsResponse(properties); }; @@ -31531,39 +41070,46 @@ * @function encode * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse} message CGCMsgGetSystemStatsResponse message or plain object to encode + * @param {CGCMsgGetSystemStatsResponse.$Properties} message CGCMsgGetSystemStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStatsResponse.encode = function encode(message, writer) { + CGCMsgGetSystemStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gc_app_id != null && Object.hasOwnProperty.call(message, "gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gc_app_id); - if (message.stats_kv != null && Object.hasOwnProperty.call(message, "stats_kv")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.stats_kv); - if (message.active_jobs != null && Object.hasOwnProperty.call(message, "active_jobs")) + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.active_jobs); - if (message.yielding_jobs != null && Object.hasOwnProperty.call(message, "yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.yielding_jobs); - if (message.user_sessions != null && Object.hasOwnProperty.call(message, "user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.user_sessions); - if (message.game_server_sessions != null && Object.hasOwnProperty.call(message, "game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.game_server_sessions); - if (message.socaches != null && Object.hasOwnProperty.call(message, "socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.socaches); - if (message.socaches_to_unload != null && Object.hasOwnProperty.call(message, "socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.socaches_to_unload); - if (message.socaches_loading != null && Object.hasOwnProperty.call(message, "socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.socaches_loading); - if (message.writeback_queue != null && Object.hasOwnProperty.call(message, "writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.writeback_queue); - if (message.steamid_locks != null && Object.hasOwnProperty.call(message, "steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.steamid_locks); - if (message.logon_queue != null && Object.hasOwnProperty.call(message, "logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.logon_queue); - if (message.logon_jobs != null && Object.hasOwnProperty.call(message, "logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.logon_jobs); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31572,12 +41118,12 @@ * @function encodeDelimited * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse} message CGCMsgGetSystemStatsResponse message or plain object to encode + * @param {CGCMsgGetSystemStatsResponse.$Properties} message CGCMsgGetSystemStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetSystemStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31587,61 +41133,114 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse + * @returns {CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape} CGCMsgGetSystemStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStatsResponse.decode = function decode(reader, length) { + CGCMsgGetSystemStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetSystemStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetSystemStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gc_app_id = reader.uint32(); - break; - case 2: - message.stats_kv = reader.bytes(); - break; - case 3: - message.active_jobs = reader.uint32(); - break; - case 4: - message.yielding_jobs = reader.uint32(); - break; - case 5: - message.user_sessions = reader.uint32(); - break; - case 6: - message.game_server_sessions = reader.uint32(); - break; - case 7: - message.socaches = reader.uint32(); - break; - case 8: - message.socaches_to_unload = reader.uint32(); - break; - case 9: - message.socaches_loading = reader.uint32(); - break; - case 10: - message.writeback_queue = reader.uint32(); - break; - case 11: - message.steamid_locks = reader.uint32(); - break; - case 12: - message.logon_queue = reader.uint32(); - break; - case 13: - message.logon_jobs = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gc_app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.stats_kv = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.active_jobs = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.yielding_jobs = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.user_sessions = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.game_server_sessions = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.socaches = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.socaches_to_unload = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.socaches_loading = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.writeback_queue = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.steamid_locks = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.logon_queue = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.logon_jobs = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31651,11 +41250,11 @@ * @memberof CGCMsgGetSystemStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse + * @returns {CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape} CGCMsgGetSystemStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetSystemStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31669,46 +41268,50 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetSystemStatsResponse.verify = function verify(message) { + CGCMsgGetSystemStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) if (!$util.isInteger(message.gc_app_id)) return "gc_app_id: integer expected"; - if (message.stats_kv != null && message.hasOwnProperty("stats_kv")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) if (!(message.stats_kv && typeof message.stats_kv.length === "number" || $util.isString(message.stats_kv))) return "stats_kv: buffer expected"; - if (message.active_jobs != null && message.hasOwnProperty("active_jobs")) + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) if (!$util.isInteger(message.active_jobs)) return "active_jobs: integer expected"; - if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) if (!$util.isInteger(message.yielding_jobs)) return "yielding_jobs: integer expected"; - if (message.user_sessions != null && message.hasOwnProperty("user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) if (!$util.isInteger(message.user_sessions)) return "user_sessions: integer expected"; - if (message.game_server_sessions != null && message.hasOwnProperty("game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) if (!$util.isInteger(message.game_server_sessions)) return "game_server_sessions: integer expected"; - if (message.socaches != null && message.hasOwnProperty("socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) if (!$util.isInteger(message.socaches)) return "socaches: integer expected"; - if (message.socaches_to_unload != null && message.hasOwnProperty("socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) if (!$util.isInteger(message.socaches_to_unload)) return "socaches_to_unload: integer expected"; - if (message.socaches_loading != null && message.hasOwnProperty("socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) if (!$util.isInteger(message.socaches_loading)) return "socaches_loading: integer expected"; - if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) if (!$util.isInteger(message.writeback_queue)) return "writeback_queue: integer expected"; - if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) if (!$util.isInteger(message.steamid_locks)) return "steamid_locks: integer expected"; - if (message.logon_queue != null && message.hasOwnProperty("logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) if (!$util.isInteger(message.logon_queue)) return "logon_queue: integer expected"; - if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) if (!$util.isInteger(message.logon_jobs)) return "logon_jobs: integer expected"; return null; @@ -31722,16 +41325,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse */ - CGCMsgGetSystemStatsResponse.fromObject = function fromObject(object) { + CGCMsgGetSystemStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetSystemStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetSystemStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetSystemStatsResponse(); if (object.gc_app_id != null) message.gc_app_id = object.gc_app_id >>> 0; if (object.stats_kv != null) if (typeof object.stats_kv === "string") $util.base64.decode(object.stats_kv, message.stats_kv = $util.newBuffer($util.base64.length(object.stats_kv)), 0); - else if (object.stats_kv.length) + else if (object.stats_kv.length >= 0) message.stats_kv = object.stats_kv; if (object.active_jobs != null) message.active_jobs = object.active_jobs >>> 0; @@ -31767,17 +41376,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetSystemStatsResponse.toObject = function toObject(message, options) { + CGCMsgGetSystemStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gc_app_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.stats_kv = ""; else { object.stats_kv = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.stats_kv = $util.newBuffer(object.stats_kv); } object.active_jobs = 0; @@ -31792,31 +41405,31 @@ object.logon_queue = 0; object.logon_jobs = 0; } - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) object.gc_app_id = message.gc_app_id; - if (message.stats_kv != null && message.hasOwnProperty("stats_kv")) - object.stats_kv = options.bytes === String ? $util.base64.encode(message.stats_kv, 0, message.stats_kv.length) : options.bytes === Array ? Array.prototype.slice.call(message.stats_kv) : message.stats_kv; - if (message.active_jobs != null && message.hasOwnProperty("active_jobs")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) + object.stats_kv = options.bytes === $String ? $util.base64.encode(message.stats_kv, 0, message.stats_kv.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.stats_kv) : message.stats_kv; + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) object.active_jobs = message.active_jobs; - if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) object.yielding_jobs = message.yielding_jobs; - if (message.user_sessions != null && message.hasOwnProperty("user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) object.user_sessions = message.user_sessions; - if (message.game_server_sessions != null && message.hasOwnProperty("game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) object.game_server_sessions = message.game_server_sessions; - if (message.socaches != null && message.hasOwnProperty("socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) object.socaches = message.socaches; - if (message.socaches_to_unload != null && message.hasOwnProperty("socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) object.socaches_to_unload = message.socaches_to_unload; - if (message.socaches_loading != null && message.hasOwnProperty("socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) object.socaches_loading = message.socaches_loading; - if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) object.writeback_queue = message.writeback_queue; - if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) object.steamid_locks = message.steamid_locks; - if (message.logon_queue != null && message.hasOwnProperty("logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) object.logon_queue = message.logon_queue; - if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) object.logon_jobs = message.logon_jobs; return object; }; @@ -31828,8 +41441,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetSystemStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetSystemStatsResponse.prototype.toJSON = function() { + return CGCMsgGetSystemStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetSystemStatsResponse + * @function getTypeUrl + * @memberof CGCMsgGetSystemStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetSystemStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetSystemStatsResponse"; }; return CGCMsgGetSystemStatsResponse; @@ -31839,32 +41466,45 @@ /** * Properties of a CMsgAMSendEmail. - * @exports ICMsgAMSendEmail - * @interface ICMsgAMSendEmail + * @typedef {Object} CMsgAMSendEmail.$Properties * @property {number|Long|null} [steamid] CMsgAMSendEmail steamid * @property {number|null} [email_msg_type] CMsgAMSendEmail email_msg_type * @property {number|null} [email_format] CMsgAMSendEmail email_format - * @property {Array.|null} [persona_name_tokens] CMsgAMSendEmail persona_name_tokens + * @property {Array.|null} [persona_name_tokens] CMsgAMSendEmail persona_name_tokens * @property {number|null} [source_gc] CMsgAMSendEmail source_gc - * @property {Array.|null} [tokens] CMsgAMSendEmail tokens + * @property {Array.|null} [tokens] CMsgAMSendEmail tokens + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMSendEmail. + * @exports ICMsgAMSendEmail + * @interface ICMsgAMSendEmail + * @augments CMsgAMSendEmail.$Properties + * @deprecated Use CMsgAMSendEmail.$Properties instead. + */ + + /** + * Shape of a CMsgAMSendEmail. + * @typedef {CMsgAMSendEmail.$Properties} CMsgAMSendEmail.$Shape */ /** * Constructs a new CMsgAMSendEmail. * @exports CMsgAMSendEmail * @classdesc Represents a CMsgAMSendEmail. - * @implements ICMsgAMSendEmail * @constructor - * @param {ICMsgAMSendEmail=} [properties] Properties to set + * @param {CMsgAMSendEmail.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMSendEmail(properties) { + var CMsgAMSendEmail = function (properties) { this.persona_name_tokens = []; this.tokens = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMSendEmail steamid. @@ -31872,7 +41512,7 @@ * @memberof CMsgAMSendEmail * @instance */ - CMsgAMSendEmail.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMSendEmail.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMSendEmail email_msg_type. @@ -31892,7 +41532,7 @@ /** * CMsgAMSendEmail persona_name_tokens. - * @member {Array.} persona_name_tokens + * @member {Array.} persona_name_tokens * @memberof CMsgAMSendEmail * @instance */ @@ -31908,7 +41548,7 @@ /** * CMsgAMSendEmail tokens. - * @member {Array.} tokens + * @member {Array.} tokens * @memberof CMsgAMSendEmail * @instance */ @@ -31919,10 +41559,14 @@ * @function create * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail=} [properties] Properties to set + * @param {CMsgAMSendEmail.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail} CMsgAMSendEmail instance + * @type {{ + * (properties: CMsgAMSendEmail.$Shape): CMsgAMSendEmail & CMsgAMSendEmail.$Shape; + * (properties?: CMsgAMSendEmail.$Properties): CMsgAMSendEmail; + * }} */ - CMsgAMSendEmail.create = function create(properties) { + CMsgAMSendEmail.create = function(properties) { return new CMsgAMSendEmail(properties); }; @@ -31931,27 +41575,34 @@ * @function encode * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail} message CMsgAMSendEmail message or plain object to encode + * @param {CMsgAMSendEmail.$Properties} message CMsgAMSendEmail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmail.encode = function encode(message, writer) { + CMsgAMSendEmail.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.email_msg_type != null && Object.hasOwnProperty.call(message, "email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type); - if (message.email_format != null && Object.hasOwnProperty.call(message, "email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.email_format); if (message.persona_name_tokens != null && message.persona_name_tokens.length) for (var i = 0; i < message.persona_name_tokens.length; ++i) - $root.CMsgAMSendEmail.PersonaNameReplacementToken.encode(message.persona_name_tokens[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.source_gc != null && Object.hasOwnProperty.call(message, "source_gc")) + $root.CMsgAMSendEmail.PersonaNameReplacementToken.encode(message.persona_name_tokens[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.source_gc); if (message.tokens != null && message.tokens.length) for (var i = 0; i < message.tokens.length; ++i) - $root.CMsgAMSendEmail.ReplacementToken.encode(message.tokens[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.CMsgAMSendEmail.ReplacementToken.encode(message.tokens[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31960,12 +41611,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail} message CMsgAMSendEmail message or plain object to encode + * @param {CMsgAMSendEmail.$Properties} message CMsgAMSendEmail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMSendEmail.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31975,44 +41626,76 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail} CMsgAMSendEmail + * @returns {CMsgAMSendEmail & CMsgAMSendEmail.$Shape} CMsgAMSendEmail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmail.decode = function decode(reader, length) { + CMsgAMSendEmail.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.email_msg_type = reader.uint32(); - break; - case 3: - message.email_format = reader.uint32(); - break; - case 5: - if (!(message.persona_name_tokens && message.persona_name_tokens.length)) - message.persona_name_tokens = []; - message.persona_name_tokens.push($root.CMsgAMSendEmail.PersonaNameReplacementToken.decode(reader, reader.uint32())); - break; - case 6: - message.source_gc = reader.uint32(); - break; - case 7: - if (!(message.tokens && message.tokens.length)) - message.tokens = []; - message.tokens.push($root.CMsgAMSendEmail.ReplacementToken.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.email_msg_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.email_format = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.persona_name_tokens && message.persona_name_tokens.length)) + message.persona_name_tokens = []; + message.persona_name_tokens.push($root.CMsgAMSendEmail.PersonaNameReplacementToken.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.source_gc = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.CMsgAMSendEmail.ReplacementToken.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32022,11 +41705,11 @@ * @memberof CMsgAMSendEmail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail} CMsgAMSendEmail + * @returns {CMsgAMSendEmail & CMsgAMSendEmail.$Shape} CMsgAMSendEmail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmail.decodeDelimited = function decodeDelimited(reader) { + CMsgAMSendEmail.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32040,35 +41723,39 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMSendEmail.verify = function verify(message) { + CMsgAMSendEmail.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) if (!$util.isInteger(message.email_msg_type)) return "email_msg_type: integer expected"; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) if (!$util.isInteger(message.email_format)) return "email_format: integer expected"; - if (message.persona_name_tokens != null && message.hasOwnProperty("persona_name_tokens")) { - if (!Array.isArray(message.persona_name_tokens)) + if (message.persona_name_tokens != null && $Object.hasOwnProperty.call(message, "persona_name_tokens")) { + if (!$Array.isArray(message.persona_name_tokens)) return "persona_name_tokens: array expected"; for (var i = 0; i < message.persona_name_tokens.length; ++i) { - var error = $root.CMsgAMSendEmail.PersonaNameReplacementToken.verify(message.persona_name_tokens[i]); + var error = $root.CMsgAMSendEmail.PersonaNameReplacementToken.verify(message.persona_name_tokens[i], _depth + 1); if (error) return "persona_name_tokens." + error; } } - if (message.source_gc != null && message.hasOwnProperty("source_gc")) + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) if (!$util.isInteger(message.source_gc)) return "source_gc: integer expected"; - if (message.tokens != null && message.hasOwnProperty("tokens")) { - if (!Array.isArray(message.tokens)) + if (message.tokens != null && $Object.hasOwnProperty.call(message, "tokens")) { + if (!$Array.isArray(message.tokens)) return "tokens: array expected"; for (var i = 0; i < message.tokens.length; ++i) { - var error = $root.CMsgAMSendEmail.ReplacementToken.verify(message.tokens[i]); + var error = $root.CMsgAMSendEmail.ReplacementToken.verify(message.tokens[i], _depth + 1); if (error) return "tokens." + error; } @@ -32084,43 +41771,49 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail} CMsgAMSendEmail */ - CMsgAMSendEmail.fromObject = function fromObject(object) { + CMsgAMSendEmail.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.email_msg_type != null) message.email_msg_type = object.email_msg_type >>> 0; if (object.email_format != null) message.email_format = object.email_format >>> 0; if (object.persona_name_tokens) { - if (!Array.isArray(object.persona_name_tokens)) - throw TypeError(".CMsgAMSendEmail.persona_name_tokens: array expected"); - message.persona_name_tokens = []; + if (!$Array.isArray(object.persona_name_tokens)) + throw $TypeError(".CMsgAMSendEmail.persona_name_tokens: array expected"); + message.persona_name_tokens = $Array(object.persona_name_tokens.length); for (var i = 0; i < object.persona_name_tokens.length; ++i) { - if (typeof object.persona_name_tokens[i] !== "object") - throw TypeError(".CMsgAMSendEmail.persona_name_tokens: object expected"); - message.persona_name_tokens[i] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.fromObject(object.persona_name_tokens[i]); + if (!$util.isObject(object.persona_name_tokens[i])) + throw $TypeError(".CMsgAMSendEmail.persona_name_tokens: object expected"); + message.persona_name_tokens[i] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.fromObject(object.persona_name_tokens[i], _depth + 1); } } if (object.source_gc != null) message.source_gc = object.source_gc >>> 0; if (object.tokens) { - if (!Array.isArray(object.tokens)) - throw TypeError(".CMsgAMSendEmail.tokens: array expected"); - message.tokens = []; + if (!$Array.isArray(object.tokens)) + throw $TypeError(".CMsgAMSendEmail.tokens: array expected"); + message.tokens = $Array(object.tokens.length); for (var i = 0; i < object.tokens.length; ++i) { - if (typeof object.tokens[i] !== "object") - throw TypeError(".CMsgAMSendEmail.tokens: object expected"); - message.tokens[i] = $root.CMsgAMSendEmail.ReplacementToken.fromObject(object.tokens[i]); + if (!$util.isObject(object.tokens[i])) + throw $TypeError(".CMsgAMSendEmail.tokens: object expected"); + message.tokens[i] = $root.CMsgAMSendEmail.ReplacementToken.fromObject(object.tokens[i], _depth + 1); } } return message; @@ -32135,9 +41828,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMSendEmail.toObject = function toObject(message, options) { + CMsgAMSendEmail.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.persona_name_tokens = []; @@ -32145,34 +41842,36 @@ } if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.email_msg_type = 0; object.email_format = 0; object.source_gc = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) object.email_msg_type = message.email_msg_type; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) object.email_format = message.email_format; if (message.persona_name_tokens && message.persona_name_tokens.length) { - object.persona_name_tokens = []; + object.persona_name_tokens = $Array(message.persona_name_tokens.length); for (var j = 0; j < message.persona_name_tokens.length; ++j) - object.persona_name_tokens[j] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.toObject(message.persona_name_tokens[j], options); + object.persona_name_tokens[j] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.toObject(message.persona_name_tokens[j], options, _depth + 1); } - if (message.source_gc != null && message.hasOwnProperty("source_gc")) + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) object.source_gc = message.source_gc; if (message.tokens && message.tokens.length) { - object.tokens = []; + object.tokens = $Array(message.tokens.length); for (var j = 0; j < message.tokens.length; ++j) - object.tokens[j] = $root.CMsgAMSendEmail.ReplacementToken.toObject(message.tokens[j], options); + object.tokens[j] = $root.CMsgAMSendEmail.ReplacementToken.toObject(message.tokens[j], options, _depth + 1); } return object; }; @@ -32184,34 +41883,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMSendEmail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMSendEmail.prototype.toJSON = function() { + return CMsgAMSendEmail.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMSendEmail + * @function getTypeUrl + * @memberof CMsgAMSendEmail + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMSendEmail.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail"; }; CMsgAMSendEmail.ReplacementToken = (function() { /** * Properties of a ReplacementToken. - * @memberof CMsgAMSendEmail - * @interface IReplacementToken + * @typedef {Object} CMsgAMSendEmail.ReplacementToken.$Properties * @property {string|null} [token_name] ReplacementToken token_name * @property {string|null} [token_value] ReplacementToken token_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ReplacementToken. + * @memberof CMsgAMSendEmail + * @interface IReplacementToken + * @augments CMsgAMSendEmail.ReplacementToken.$Properties + * @deprecated Use CMsgAMSendEmail.ReplacementToken.$Properties instead. + */ + + /** + * Shape of a ReplacementToken. + * @typedef {CMsgAMSendEmail.ReplacementToken.$Properties} CMsgAMSendEmail.ReplacementToken.$Shape */ /** * Constructs a new ReplacementToken. * @memberof CMsgAMSendEmail * @classdesc Represents a ReplacementToken. - * @implements IReplacementToken * @constructor - * @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.ReplacementToken.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ReplacementToken(properties) { + var ReplacementToken = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ReplacementToken token_name. @@ -32234,10 +41960,14 @@ * @function create * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.ReplacementToken.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken instance + * @type {{ + * (properties: CMsgAMSendEmail.ReplacementToken.$Shape): CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape; + * (properties?: CMsgAMSendEmail.ReplacementToken.$Properties): CMsgAMSendEmail.ReplacementToken; + * }} */ - ReplacementToken.create = function create(properties) { + ReplacementToken.create = function(properties) { return new ReplacementToken(properties); }; @@ -32246,17 +41976,24 @@ * @function encode * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken} message ReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.ReplacementToken.$Properties} message ReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplacementToken.encode = function encode(message, writer) { + ReplacementToken.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.token_name != null && Object.hasOwnProperty.call(message, "token_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.token_name); - if (message.token_value != null && Object.hasOwnProperty.call(message, "token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32265,12 +42002,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken} message ReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.ReplacementToken.$Properties} message ReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplacementToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ReplacementToken.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32280,28 +42017,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken + * @returns {CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape} ReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplacementToken.decode = function decode(reader, length) { + ReplacementToken.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail.ReplacementToken(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail.ReplacementToken(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.token_name = reader.string(); - break; - case 2: - message.token_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.token_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.token_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32311,11 +42068,11 @@ * @memberof CMsgAMSendEmail.ReplacementToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken + * @returns {CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape} ReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplacementToken.decodeDelimited = function decodeDelimited(reader) { + ReplacementToken.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32329,13 +42086,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReplacementToken.verify = function verify(message) { + ReplacementToken.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) if (!$util.isString(message.token_name)) return "token_name: string expected"; - if (message.token_value != null && message.hasOwnProperty("token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) if (!$util.isString(message.token_value)) return "token_value: string expected"; return null; @@ -32349,14 +42110,20 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken */ - ReplacementToken.fromObject = function fromObject(object) { + ReplacementToken.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail.ReplacementToken) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail.ReplacementToken: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail.ReplacementToken(); if (object.token_name != null) - message.token_name = String(object.token_name); + message.token_name = $String(object.token_name); if (object.token_value != null) - message.token_value = String(object.token_value); + message.token_value = $String(object.token_value); return message; }; @@ -32369,17 +42136,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReplacementToken.toObject = function toObject(message, options) { + ReplacementToken.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.token_name = ""; object.token_value = ""; } - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) object.token_name = message.token_name; - if (message.token_value != null && message.hasOwnProperty("token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) object.token_value = message.token_value; return object; }; @@ -32391,8 +42162,22 @@ * @instance * @returns {Object.} JSON object */ - ReplacementToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ReplacementToken.prototype.toJSON = function() { + return ReplacementToken.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ReplacementToken + * @function getTypeUrl + * @memberof CMsgAMSendEmail.ReplacementToken + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ReplacementToken.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail.ReplacementToken"; }; return ReplacementToken; @@ -32402,26 +42187,39 @@ /** * Properties of a PersonaNameReplacementToken. - * @memberof CMsgAMSendEmail - * @interface IPersonaNameReplacementToken + * @typedef {Object} CMsgAMSendEmail.PersonaNameReplacementToken.$Properties * @property {number|Long|null} [steamid] PersonaNameReplacementToken steamid * @property {string|null} [token_name] PersonaNameReplacementToken token_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PersonaNameReplacementToken. + * @memberof CMsgAMSendEmail + * @interface IPersonaNameReplacementToken + * @augments CMsgAMSendEmail.PersonaNameReplacementToken.$Properties + * @deprecated Use CMsgAMSendEmail.PersonaNameReplacementToken.$Properties instead. + */ + + /** + * Shape of a PersonaNameReplacementToken. + * @typedef {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} CMsgAMSendEmail.PersonaNameReplacementToken.$Shape */ /** * Constructs a new PersonaNameReplacementToken. * @memberof CMsgAMSendEmail * @classdesc Represents a PersonaNameReplacementToken. - * @implements IPersonaNameReplacementToken * @constructor - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PersonaNameReplacementToken(properties) { + var PersonaNameReplacementToken = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PersonaNameReplacementToken steamid. @@ -32429,7 +42227,7 @@ * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @instance */ - PersonaNameReplacementToken.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PersonaNameReplacementToken.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * PersonaNameReplacementToken token_name. @@ -32444,10 +42242,14 @@ * @function create * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken instance + * @type {{ + * (properties: CMsgAMSendEmail.PersonaNameReplacementToken.$Shape): CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape; + * (properties?: CMsgAMSendEmail.PersonaNameReplacementToken.$Properties): CMsgAMSendEmail.PersonaNameReplacementToken; + * }} */ - PersonaNameReplacementToken.create = function create(properties) { + PersonaNameReplacementToken.create = function(properties) { return new PersonaNameReplacementToken(properties); }; @@ -32456,17 +42258,24 @@ * @function encode * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken} message PersonaNameReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} message PersonaNameReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaNameReplacementToken.encode = function encode(message, writer) { + PersonaNameReplacementToken.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.token_name != null && Object.hasOwnProperty.call(message, "token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32475,12 +42284,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken} message PersonaNameReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} message PersonaNameReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaNameReplacementToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PersonaNameReplacementToken.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32490,28 +42299,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken + * @returns {CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape} PersonaNameReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaNameReplacementToken.decode = function decode(reader, length) { + PersonaNameReplacementToken.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.token_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.token_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32521,11 +42350,11 @@ * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken + * @returns {CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape} PersonaNameReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaNameReplacementToken.decodeDelimited = function decodeDelimited(reader) { + PersonaNameReplacementToken.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32539,13 +42368,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PersonaNameReplacementToken.verify = function verify(message) { + PersonaNameReplacementToken.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) if (!$util.isString(message.token_name)) return "token_name: string expected"; return null; @@ -32559,21 +42392,27 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken */ - PersonaNameReplacementToken.fromObject = function fromObject(object) { + PersonaNameReplacementToken.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail.PersonaNameReplacementToken) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail.PersonaNameReplacementToken: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.token_name != null) - message.token_name = String(object.token_name); + message.token_name = $String(object.token_name); return message; }; @@ -32586,24 +42425,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PersonaNameReplacementToken.toObject = function toObject(message, options) { + PersonaNameReplacementToken.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.token_name = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.token_name != null && message.hasOwnProperty("token_name")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) object.token_name = message.token_name; return object; }; @@ -32615,8 +42460,22 @@ * @instance * @returns {Object.} JSON object */ - PersonaNameReplacementToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PersonaNameReplacementToken.prototype.toJSON = function() { + return PersonaNameReplacementToken.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PersonaNameReplacementToken + * @function getTypeUrl + * @memberof CMsgAMSendEmail.PersonaNameReplacementToken + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PersonaNameReplacementToken.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail.PersonaNameReplacementToken"; }; return PersonaNameReplacementToken; @@ -32627,27 +42486,40 @@ $root.CMsgAMSendEmailResponse = (function() { + /** + * Properties of a CMsgAMSendEmailResponse. + * @typedef {Object} CMsgAMSendEmailResponse.$Properties + * @property {number|null} [eresult] CMsgAMSendEmailResponse eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMSendEmailResponse. * @exports ICMsgAMSendEmailResponse * @interface ICMsgAMSendEmailResponse - * @property {number|null} [eresult] CMsgAMSendEmailResponse eresult + * @augments CMsgAMSendEmailResponse.$Properties + * @deprecated Use CMsgAMSendEmailResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMSendEmailResponse. + * @typedef {CMsgAMSendEmailResponse.$Properties} CMsgAMSendEmailResponse.$Shape */ /** * Constructs a new CMsgAMSendEmailResponse. * @exports CMsgAMSendEmailResponse * @classdesc Represents a CMsgAMSendEmailResponse. - * @implements ICMsgAMSendEmailResponse * @constructor - * @param {ICMsgAMSendEmailResponse=} [properties] Properties to set + * @param {CMsgAMSendEmailResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMSendEmailResponse(properties) { + var CMsgAMSendEmailResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMSendEmailResponse eresult. @@ -32662,10 +42534,14 @@ * @function create * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse=} [properties] Properties to set + * @param {CMsgAMSendEmailResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse instance + * @type {{ + * (properties: CMsgAMSendEmailResponse.$Shape): CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape; + * (properties?: CMsgAMSendEmailResponse.$Properties): CMsgAMSendEmailResponse; + * }} */ - CMsgAMSendEmailResponse.create = function create(properties) { + CMsgAMSendEmailResponse.create = function(properties) { return new CMsgAMSendEmailResponse(properties); }; @@ -32674,15 +42550,22 @@ * @function encode * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse} message CMsgAMSendEmailResponse message or plain object to encode + * @param {CMsgAMSendEmailResponse.$Properties} message CMsgAMSendEmailResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmailResponse.encode = function encode(message, writer) { + CMsgAMSendEmailResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32691,12 +42574,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse} message CMsgAMSendEmailResponse message or plain object to encode + * @param {CMsgAMSendEmailResponse.$Properties} message CMsgAMSendEmailResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmailResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMSendEmailResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32706,25 +42589,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse + * @returns {CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape} CMsgAMSendEmailResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmailResponse.decode = function decode(reader, length) { + CMsgAMSendEmailResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmailResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmailResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32734,11 +42634,11 @@ * @memberof CMsgAMSendEmailResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse + * @returns {CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape} CMsgAMSendEmailResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmailResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMSendEmailResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32752,10 +42652,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMSendEmailResponse.verify = function verify(message) { + CMsgAMSendEmailResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -32769,9 +42673,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse */ - CMsgAMSendEmailResponse.fromObject = function fromObject(object) { + CMsgAMSendEmailResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmailResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmailResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmailResponse(); if (object.eresult != null) message.eresult = object.eresult >>> 0; @@ -32787,13 +42697,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMSendEmailResponse.toObject = function toObject(message, options) { + CMsgAMSendEmailResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -32805,8 +42719,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMSendEmailResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMSendEmailResponse.prototype.toJSON = function() { + return CMsgAMSendEmailResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMSendEmailResponse + * @function getTypeUrl + * @memberof CMsgAMSendEmailResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMSendEmailResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmailResponse"; }; return CMsgAMSendEmailResponse; @@ -32816,28 +42744,41 @@ /** * Properties of a CMsgGCGetEmailTemplate. - * @exports ICMsgGCGetEmailTemplate - * @interface ICMsgGCGetEmailTemplate + * @typedef {Object} CMsgGCGetEmailTemplate.$Properties * @property {number|null} [app_id] CMsgGCGetEmailTemplate app_id * @property {number|null} [email_msg_type] CMsgGCGetEmailTemplate email_msg_type * @property {number|null} [email_lang] CMsgGCGetEmailTemplate email_lang * @property {number|null} [email_format] CMsgGCGetEmailTemplate email_format + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetEmailTemplate. + * @exports ICMsgGCGetEmailTemplate + * @interface ICMsgGCGetEmailTemplate + * @augments CMsgGCGetEmailTemplate.$Properties + * @deprecated Use CMsgGCGetEmailTemplate.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetEmailTemplate. + * @typedef {CMsgGCGetEmailTemplate.$Properties} CMsgGCGetEmailTemplate.$Shape */ /** * Constructs a new CMsgGCGetEmailTemplate. * @exports CMsgGCGetEmailTemplate * @classdesc Represents a CMsgGCGetEmailTemplate. - * @implements ICMsgGCGetEmailTemplate * @constructor - * @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplate.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetEmailTemplate(properties) { + var CMsgGCGetEmailTemplate = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetEmailTemplate app_id. @@ -32876,10 +42817,14 @@ * @function create * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplate.$Properties=} [properties] Properties to set * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate instance + * @type {{ + * (properties: CMsgGCGetEmailTemplate.$Shape): CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape; + * (properties?: CMsgGCGetEmailTemplate.$Properties): CMsgGCGetEmailTemplate; + * }} */ - CMsgGCGetEmailTemplate.create = function create(properties) { + CMsgGCGetEmailTemplate.create = function(properties) { return new CMsgGCGetEmailTemplate(properties); }; @@ -32888,21 +42833,28 @@ * @function encode * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate} message CMsgGCGetEmailTemplate message or plain object to encode + * @param {CMsgGCGetEmailTemplate.$Properties} message CMsgGCGetEmailTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplate.encode = function encode(message, writer) { + CMsgGCGetEmailTemplate.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_id); - if (message.email_msg_type != null && Object.hasOwnProperty.call(message, "email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type); - if (message.email_lang != null && Object.hasOwnProperty.call(message, "email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.email_lang); - if (message.email_format != null && Object.hasOwnProperty.call(message, "email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.email_format); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32911,12 +42863,12 @@ * @function encodeDelimited * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate} message CMsgGCGetEmailTemplate message or plain object to encode + * @param {CMsgGCGetEmailTemplate.$Properties} message CMsgGCGetEmailTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetEmailTemplate.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32926,34 +42878,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate + * @returns {CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape} CMsgGCGetEmailTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplate.decode = function decode(reader, length) { + CMsgGCGetEmailTemplate.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetEmailTemplate(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetEmailTemplate(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_id = reader.uint32(); - break; - case 2: - message.email_msg_type = reader.uint32(); - break; - case 3: - message.email_lang = reader.int32(); - break; - case 4: - message.email_format = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.email_msg_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.email_lang = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.email_format = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32963,11 +42941,11 @@ * @memberof CMsgGCGetEmailTemplate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate + * @returns {CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape} CMsgGCGetEmailTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplate.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetEmailTemplate.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32981,19 +42959,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetEmailTemplate.verify = function verify(message) { + CMsgGCGetEmailTemplate.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) if (!$util.isInteger(message.email_msg_type)) return "email_msg_type: integer expected"; - if (message.email_lang != null && message.hasOwnProperty("email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) if (!$util.isInteger(message.email_lang)) return "email_lang: integer expected"; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) if (!$util.isInteger(message.email_format)) return "email_format: integer expected"; return null; @@ -33007,9 +42989,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate */ - CMsgGCGetEmailTemplate.fromObject = function fromObject(object) { + CMsgGCGetEmailTemplate.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetEmailTemplate) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetEmailTemplate: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetEmailTemplate(); if (object.app_id != null) message.app_id = object.app_id >>> 0; @@ -33031,9 +43019,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetEmailTemplate.toObject = function toObject(message, options) { + CMsgGCGetEmailTemplate.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.app_id = 0; @@ -33041,13 +43033,13 @@ object.email_lang = 0; object.email_format = 0; } - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) object.email_msg_type = message.email_msg_type; - if (message.email_lang != null && message.hasOwnProperty("email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) object.email_lang = message.email_lang; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) object.email_format = message.email_format; return object; }; @@ -33059,8 +43051,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetEmailTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetEmailTemplate.prototype.toJSON = function() { + return CMsgGCGetEmailTemplate.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetEmailTemplate + * @function getTypeUrl + * @memberof CMsgGCGetEmailTemplate + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetEmailTemplate.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetEmailTemplate"; }; return CMsgGCGetEmailTemplate; @@ -33070,27 +43076,40 @@ /** * Properties of a CMsgGCGetEmailTemplateResponse. - * @exports ICMsgGCGetEmailTemplateResponse - * @interface ICMsgGCGetEmailTemplateResponse + * @typedef {Object} CMsgGCGetEmailTemplateResponse.$Properties * @property {number|null} [eresult] CMsgGCGetEmailTemplateResponse eresult * @property {boolean|null} [template_exists] CMsgGCGetEmailTemplateResponse template_exists * @property {string|null} [template] CMsgGCGetEmailTemplateResponse template + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetEmailTemplateResponse. + * @exports ICMsgGCGetEmailTemplateResponse + * @interface ICMsgGCGetEmailTemplateResponse + * @augments CMsgGCGetEmailTemplateResponse.$Properties + * @deprecated Use CMsgGCGetEmailTemplateResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetEmailTemplateResponse. + * @typedef {CMsgGCGetEmailTemplateResponse.$Properties} CMsgGCGetEmailTemplateResponse.$Shape */ /** * Constructs a new CMsgGCGetEmailTemplateResponse. * @exports CMsgGCGetEmailTemplateResponse * @classdesc Represents a CMsgGCGetEmailTemplateResponse. - * @implements ICMsgGCGetEmailTemplateResponse * @constructor - * @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplateResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetEmailTemplateResponse(properties) { + var CMsgGCGetEmailTemplateResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetEmailTemplateResponse eresult. @@ -33121,10 +43140,14 @@ * @function create * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplateResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse instance + * @type {{ + * (properties: CMsgGCGetEmailTemplateResponse.$Shape): CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape; + * (properties?: CMsgGCGetEmailTemplateResponse.$Properties): CMsgGCGetEmailTemplateResponse; + * }} */ - CMsgGCGetEmailTemplateResponse.create = function create(properties) { + CMsgGCGetEmailTemplateResponse.create = function(properties) { return new CMsgGCGetEmailTemplateResponse(properties); }; @@ -33133,19 +43156,26 @@ * @function encode * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse} message CMsgGCGetEmailTemplateResponse message or plain object to encode + * @param {CMsgGCGetEmailTemplateResponse.$Properties} message CMsgGCGetEmailTemplateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplateResponse.encode = function encode(message, writer) { + CMsgGCGetEmailTemplateResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult); - if (message.template_exists != null && Object.hasOwnProperty.call(message, "template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.template_exists); - if (message.template != null && Object.hasOwnProperty.call(message, "template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.template); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33154,12 +43184,12 @@ * @function encodeDelimited * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse} message CMsgGCGetEmailTemplateResponse message or plain object to encode + * @param {CMsgGCGetEmailTemplateResponse.$Properties} message CMsgGCGetEmailTemplateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetEmailTemplateResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33169,31 +43199,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse + * @returns {CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape} CMsgGCGetEmailTemplateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplateResponse.decode = function decode(reader, length) { + CMsgGCGetEmailTemplateResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetEmailTemplateResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetEmailTemplateResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.uint32(); - break; - case 2: - message.template_exists = reader.bool(); - break; - case 3: - message.template = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.template_exists = reader.bool(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.template = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33203,11 +43256,11 @@ * @memberof CMsgGCGetEmailTemplateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse + * @returns {CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape} CMsgGCGetEmailTemplateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplateResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetEmailTemplateResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33221,16 +43274,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetEmailTemplateResponse.verify = function verify(message) { + CMsgGCGetEmailTemplateResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.template_exists != null && message.hasOwnProperty("template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) if (typeof message.template_exists !== "boolean") return "template_exists: boolean expected"; - if (message.template != null && message.hasOwnProperty("template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) if (!$util.isString(message.template)) return "template: string expected"; return null; @@ -33244,16 +43301,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse */ - CMsgGCGetEmailTemplateResponse.fromObject = function fromObject(object) { + CMsgGCGetEmailTemplateResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetEmailTemplateResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetEmailTemplateResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetEmailTemplateResponse(); if (object.eresult != null) message.eresult = object.eresult >>> 0; if (object.template_exists != null) - message.template_exists = Boolean(object.template_exists); + message.template_exists = $Boolean(object.template_exists); if (object.template != null) - message.template = String(object.template); + message.template = $String(object.template); return message; }; @@ -33266,20 +43329,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetEmailTemplateResponse.toObject = function toObject(message, options) { + CMsgGCGetEmailTemplateResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.template_exists = false; object.template = ""; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.template_exists != null && message.hasOwnProperty("template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) object.template_exists = message.template_exists; - if (message.template != null && message.hasOwnProperty("template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) object.template = message.template; return object; }; @@ -33291,8 +43358,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetEmailTemplateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetEmailTemplateResponse.prototype.toJSON = function() { + return CMsgGCGetEmailTemplateResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetEmailTemplateResponse + * @function getTypeUrl + * @memberof CMsgGCGetEmailTemplateResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetEmailTemplateResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetEmailTemplateResponse"; }; return CMsgGCGetEmailTemplateResponse; @@ -33302,29 +43383,42 @@ /** * Properties of a CMsgAMGrantGuestPasses2. - * @exports ICMsgAMGrantGuestPasses2 - * @interface ICMsgAMGrantGuestPasses2 + * @typedef {Object} CMsgAMGrantGuestPasses2.$Properties * @property {number|Long|null} [steam_id] CMsgAMGrantGuestPasses2 steam_id * @property {number|null} [package_id] CMsgAMGrantGuestPasses2 package_id * @property {number|null} [passes_to_grant] CMsgAMGrantGuestPasses2 passes_to_grant * @property {number|null} [days_to_expiration] CMsgAMGrantGuestPasses2 days_to_expiration * @property {number|null} [action] CMsgAMGrantGuestPasses2 action + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGrantGuestPasses2. + * @exports ICMsgAMGrantGuestPasses2 + * @interface ICMsgAMGrantGuestPasses2 + * @augments CMsgAMGrantGuestPasses2.$Properties + * @deprecated Use CMsgAMGrantGuestPasses2.$Properties instead. + */ + + /** + * Shape of a CMsgAMGrantGuestPasses2. + * @typedef {CMsgAMGrantGuestPasses2.$Properties} CMsgAMGrantGuestPasses2.$Shape */ /** * Constructs a new CMsgAMGrantGuestPasses2. * @exports CMsgAMGrantGuestPasses2 * @classdesc Represents a CMsgAMGrantGuestPasses2. - * @implements ICMsgAMGrantGuestPasses2 * @constructor - * @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGrantGuestPasses2(properties) { + var CMsgAMGrantGuestPasses2 = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGrantGuestPasses2 steam_id. @@ -33332,7 +43426,7 @@ * @memberof CMsgAMGrantGuestPasses2 * @instance */ - CMsgAMGrantGuestPasses2.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGrantGuestPasses2.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGrantGuestPasses2 package_id. @@ -33371,10 +43465,14 @@ * @function create * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2.$Properties=} [properties] Properties to set * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 instance + * @type {{ + * (properties: CMsgAMGrantGuestPasses2.$Shape): CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape; + * (properties?: CMsgAMGrantGuestPasses2.$Properties): CMsgAMGrantGuestPasses2; + * }} */ - CMsgAMGrantGuestPasses2.create = function create(properties) { + CMsgAMGrantGuestPasses2.create = function(properties) { return new CMsgAMGrantGuestPasses2(properties); }; @@ -33383,23 +43481,30 @@ * @function encode * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2} message CMsgAMGrantGuestPasses2 message or plain object to encode + * @param {CMsgAMGrantGuestPasses2.$Properties} message CMsgAMGrantGuestPasses2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2.encode = function encode(message, writer) { + CMsgAMGrantGuestPasses2.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.package_id != null && Object.hasOwnProperty.call(message, "package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.package_id); - if (message.passes_to_grant != null && Object.hasOwnProperty.call(message, "passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.passes_to_grant); - if (message.days_to_expiration != null && Object.hasOwnProperty.call(message, "days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.days_to_expiration); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.action); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33408,12 +43513,12 @@ * @function encodeDelimited * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2} message CMsgAMGrantGuestPasses2 message or plain object to encode + * @param {CMsgAMGrantGuestPasses2.$Properties} message CMsgAMGrantGuestPasses2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGrantGuestPasses2.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33423,37 +43528,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 + * @returns {CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape} CMsgAMGrantGuestPasses2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2.decode = function decode(reader, length) { + CMsgAMGrantGuestPasses2.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGrantGuestPasses2(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGrantGuestPasses2(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.package_id = reader.uint32(); - break; - case 3: - message.passes_to_grant = reader.int32(); - break; - case 4: - message.days_to_expiration = reader.int32(); - break; - case 5: - message.action = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.package_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.passes_to_grant = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.days_to_expiration = reader.int32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.action = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33463,11 +43597,11 @@ * @memberof CMsgAMGrantGuestPasses2 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 + * @returns {CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape} CMsgAMGrantGuestPasses2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGrantGuestPasses2.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33481,22 +43615,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGrantGuestPasses2.verify = function verify(message) { + CMsgAMGrantGuestPasses2.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) if (!$util.isInteger(message.package_id)) return "package_id: integer expected"; - if (message.passes_to_grant != null && message.hasOwnProperty("passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) if (!$util.isInteger(message.passes_to_grant)) return "passes_to_grant: integer expected"; - if (message.days_to_expiration != null && message.hasOwnProperty("days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) if (!$util.isInteger(message.days_to_expiration)) return "days_to_expiration: integer expected"; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) if (!$util.isInteger(message.action)) return "action: integer expected"; return null; @@ -33510,19 +43648,25 @@ * @param {Object.} object Plain object * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 */ - CMsgAMGrantGuestPasses2.fromObject = function fromObject(object) { + CMsgAMGrantGuestPasses2.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGrantGuestPasses2) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGrantGuestPasses2: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGrantGuestPasses2(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.package_id != null) message.package_id = object.package_id >>> 0; if (object.passes_to_grant != null) @@ -33543,33 +43687,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGrantGuestPasses2.toObject = function toObject(message, options) { + CMsgAMGrantGuestPasses2.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.package_id = 0; object.passes_to_grant = 0; object.days_to_expiration = 0; object.action = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.package_id != null && message.hasOwnProperty("package_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) object.package_id = message.package_id; - if (message.passes_to_grant != null && message.hasOwnProperty("passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) object.passes_to_grant = message.passes_to_grant; - if (message.days_to_expiration != null && message.hasOwnProperty("days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) object.days_to_expiration = message.days_to_expiration; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) object.action = message.action; return object; }; @@ -33581,8 +43731,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGrantGuestPasses2.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGrantGuestPasses2.prototype.toJSON = function() { + return CMsgAMGrantGuestPasses2.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGrantGuestPasses2 + * @function getTypeUrl + * @memberof CMsgAMGrantGuestPasses2 + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGrantGuestPasses2.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGrantGuestPasses2"; }; return CMsgAMGrantGuestPasses2; @@ -33592,26 +43756,39 @@ /** * Properties of a CMsgAMGrantGuestPasses2Response. - * @exports ICMsgAMGrantGuestPasses2Response - * @interface ICMsgAMGrantGuestPasses2Response + * @typedef {Object} CMsgAMGrantGuestPasses2Response.$Properties * @property {number|null} [eresult] CMsgAMGrantGuestPasses2Response eresult * @property {number|null} [passes_granted] CMsgAMGrantGuestPasses2Response passes_granted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGrantGuestPasses2Response. + * @exports ICMsgAMGrantGuestPasses2Response + * @interface ICMsgAMGrantGuestPasses2Response + * @augments CMsgAMGrantGuestPasses2Response.$Properties + * @deprecated Use CMsgAMGrantGuestPasses2Response.$Properties instead. + */ + + /** + * Shape of a CMsgAMGrantGuestPasses2Response. + * @typedef {CMsgAMGrantGuestPasses2Response.$Properties} CMsgAMGrantGuestPasses2Response.$Shape */ /** * Constructs a new CMsgAMGrantGuestPasses2Response. * @exports CMsgAMGrantGuestPasses2Response * @classdesc Represents a CMsgAMGrantGuestPasses2Response. - * @implements ICMsgAMGrantGuestPasses2Response * @constructor - * @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGrantGuestPasses2Response(properties) { + var CMsgAMGrantGuestPasses2Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGrantGuestPasses2Response eresult. @@ -33634,10 +43811,14 @@ * @function create * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2Response.$Properties=} [properties] Properties to set * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response instance + * @type {{ + * (properties: CMsgAMGrantGuestPasses2Response.$Shape): CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape; + * (properties?: CMsgAMGrantGuestPasses2Response.$Properties): CMsgAMGrantGuestPasses2Response; + * }} */ - CMsgAMGrantGuestPasses2Response.create = function create(properties) { + CMsgAMGrantGuestPasses2Response.create = function(properties) { return new CMsgAMGrantGuestPasses2Response(properties); }; @@ -33646,17 +43827,24 @@ * @function encode * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response} message CMsgAMGrantGuestPasses2Response message or plain object to encode + * @param {CMsgAMGrantGuestPasses2Response.$Properties} message CMsgAMGrantGuestPasses2Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2Response.encode = function encode(message, writer) { + CMsgAMGrantGuestPasses2Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); - if (message.passes_granted != null && Object.hasOwnProperty.call(message, "passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.passes_granted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33665,12 +43853,12 @@ * @function encodeDelimited * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response} message CMsgAMGrantGuestPasses2Response message or plain object to encode + * @param {CMsgAMGrantGuestPasses2Response.$Properties} message CMsgAMGrantGuestPasses2Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGrantGuestPasses2Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33680,28 +43868,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response + * @returns {CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape} CMsgAMGrantGuestPasses2Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2Response.decode = function decode(reader, length) { + CMsgAMGrantGuestPasses2Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGrantGuestPasses2Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGrantGuestPasses2Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - case 2: - message.passes_granted = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.passes_granted = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33711,11 +43919,11 @@ * @memberof CMsgAMGrantGuestPasses2Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response + * @returns {CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape} CMsgAMGrantGuestPasses2Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2Response.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGrantGuestPasses2Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33729,13 +43937,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGrantGuestPasses2Response.verify = function verify(message) { + CMsgAMGrantGuestPasses2Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.passes_granted != null && message.hasOwnProperty("passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) if (!$util.isInteger(message.passes_granted)) return "passes_granted: integer expected"; return null; @@ -33749,9 +43961,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response */ - CMsgAMGrantGuestPasses2Response.fromObject = function fromObject(object) { + CMsgAMGrantGuestPasses2Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGrantGuestPasses2Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGrantGuestPasses2Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGrantGuestPasses2Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -33769,17 +43987,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGrantGuestPasses2Response.toObject = function toObject(message, options) { + CMsgAMGrantGuestPasses2Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.passes_granted = 0; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.passes_granted != null && message.hasOwnProperty("passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) object.passes_granted = message.passes_granted; return object; }; @@ -33791,8 +44013,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGrantGuestPasses2Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGrantGuestPasses2Response.prototype.toJSON = function() { + return CMsgAMGrantGuestPasses2Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGrantGuestPasses2Response + * @function getTypeUrl + * @memberof CMsgAMGrantGuestPasses2Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGrantGuestPasses2Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGrantGuestPasses2Response"; }; return CMsgAMGrantGuestPasses2Response; @@ -33802,26 +44038,39 @@ /** * Properties of a CGCSystemMsg_GetAccountDetails. - * @exports ICGCSystemMsg_GetAccountDetails - * @interface ICGCSystemMsg_GetAccountDetails + * @typedef {Object} CGCSystemMsg_GetAccountDetails.$Properties * @property {number|Long|null} [steamid] CGCSystemMsg_GetAccountDetails steamid * @property {number|null} [appid] CGCSystemMsg_GetAccountDetails appid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetAccountDetails. + * @exports ICGCSystemMsg_GetAccountDetails + * @interface ICGCSystemMsg_GetAccountDetails + * @augments CGCSystemMsg_GetAccountDetails.$Properties + * @deprecated Use CGCSystemMsg_GetAccountDetails.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetAccountDetails. + * @typedef {CGCSystemMsg_GetAccountDetails.$Properties} CGCSystemMsg_GetAccountDetails.$Shape */ /** * Constructs a new CGCSystemMsg_GetAccountDetails. * @exports CGCSystemMsg_GetAccountDetails * @classdesc Represents a CGCSystemMsg_GetAccountDetails. - * @implements ICGCSystemMsg_GetAccountDetails * @constructor - * @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetAccountDetails(properties) { + var CGCSystemMsg_GetAccountDetails = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetAccountDetails steamid. @@ -33829,7 +44078,7 @@ * @memberof CGCSystemMsg_GetAccountDetails * @instance */ - CGCSystemMsg_GetAccountDetails.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCSystemMsg_GetAccountDetails.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CGCSystemMsg_GetAccountDetails appid. @@ -33844,10 +44093,14 @@ * @function create * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails instance + * @type {{ + * (properties: CGCSystemMsg_GetAccountDetails.$Shape): CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape; + * (properties?: CGCSystemMsg_GetAccountDetails.$Properties): CGCSystemMsg_GetAccountDetails; + * }} */ - CGCSystemMsg_GetAccountDetails.create = function create(properties) { + CGCSystemMsg_GetAccountDetails.create = function(properties) { return new CGCSystemMsg_GetAccountDetails(properties); }; @@ -33856,17 +44109,24 @@ * @function encode * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails} message CGCSystemMsg_GetAccountDetails message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails.$Properties} message CGCSystemMsg_GetAccountDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails.encode = function encode(message, writer) { + CGCSystemMsg_GetAccountDetails.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33875,12 +44135,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails} message CGCSystemMsg_GetAccountDetails message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails.$Properties} message CGCSystemMsg_GetAccountDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetAccountDetails.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33890,28 +44150,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails + * @returns {CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape} CGCSystemMsg_GetAccountDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails.decode = function decode(reader, length) { + CGCSystemMsg_GetAccountDetails.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetAccountDetails(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetAccountDetails(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33921,11 +44201,11 @@ * @memberof CGCSystemMsg_GetAccountDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails + * @returns {CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape} CGCSystemMsg_GetAccountDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetAccountDetails.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33939,13 +44219,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetAccountDetails.verify = function verify(message) { + CGCSystemMsg_GetAccountDetails.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; return null; @@ -33959,19 +44243,25 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails */ - CGCSystemMsg_GetAccountDetails.fromObject = function fromObject(object) { + CGCSystemMsg_GetAccountDetails.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetAccountDetails) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetAccountDetails: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetAccountDetails(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; return message; @@ -33986,24 +44276,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetAccountDetails.toObject = function toObject(message, options) { + CGCSystemMsg_GetAccountDetails.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; return object; }; @@ -34015,8 +44311,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetAccountDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetAccountDetails.prototype.toJSON = function() { + return CGCSystemMsg_GetAccountDetails.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetAccountDetails + * @function getTypeUrl + * @memberof CGCSystemMsg_GetAccountDetails + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetAccountDetails.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetAccountDetails"; }; return CGCSystemMsg_GetAccountDetails; @@ -34026,8 +44336,7 @@ /** * Properties of a CGCSystemMsg_GetAccountDetails_Response. - * @exports ICGCSystemMsg_GetAccountDetails_Response - * @interface ICGCSystemMsg_GetAccountDetails_Response + * @typedef {Object} CGCSystemMsg_GetAccountDetails_Response.$Properties * @property {number|null} [eresult_deprecated] CGCSystemMsg_GetAccountDetails_Response eresult_deprecated * @property {string|null} [account_name] CGCSystemMsg_GetAccountDetails_Response account_name * @property {string|null} [persona_name] CGCSystemMsg_GetAccountDetails_Response persona_name @@ -34062,22 +44371,36 @@ * @property {number|null} [rt_identity_linked] CGCSystemMsg_GetAccountDetails_Response rt_identity_linked * @property {number|null} [rt_birth_date] CGCSystemMsg_GetAccountDetails_Response rt_birth_date * @property {string|null} [txn_country_code] CGCSystemMsg_GetAccountDetails_Response txn_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetAccountDetails_Response. + * @exports ICGCSystemMsg_GetAccountDetails_Response + * @interface ICGCSystemMsg_GetAccountDetails_Response + * @augments CGCSystemMsg_GetAccountDetails_Response.$Properties + * @deprecated Use CGCSystemMsg_GetAccountDetails_Response.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetAccountDetails_Response. + * @typedef {CGCSystemMsg_GetAccountDetails_Response.$Properties} CGCSystemMsg_GetAccountDetails_Response.$Shape */ /** * Constructs a new CGCSystemMsg_GetAccountDetails_Response. * @exports CGCSystemMsg_GetAccountDetails_Response * @classdesc Represents a CGCSystemMsg_GetAccountDetails_Response. - * @implements ICGCSystemMsg_GetAccountDetails_Response * @constructor - * @param {ICGCSystemMsg_GetAccountDetails_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetAccountDetails_Response(properties) { + var CGCSystemMsg_GetAccountDetails_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetAccountDetails_Response eresult_deprecated. @@ -34356,10 +44679,14 @@ * @function create * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response instance + * @type {{ + * (properties: CGCSystemMsg_GetAccountDetails_Response.$Shape): CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape; + * (properties?: CGCSystemMsg_GetAccountDetails_Response.$Properties): CGCSystemMsg_GetAccountDetails_Response; + * }} */ - CGCSystemMsg_GetAccountDetails_Response.create = function create(properties) { + CGCSystemMsg_GetAccountDetails_Response.create = function(properties) { return new CGCSystemMsg_GetAccountDetails_Response(properties); }; @@ -34368,81 +44695,88 @@ * @function encode * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails_Response.encode = function encode(message, writer) { + CGCSystemMsg_GetAccountDetails_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult_deprecated != null && Object.hasOwnProperty.call(message, "eresult_deprecated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult_deprecated); - if (message.account_name != null && Object.hasOwnProperty.call(message, "account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.account_name); - if (message.persona_name != null && Object.hasOwnProperty.call(message, "persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.persona_name); - if (message.is_profile_public != null && Object.hasOwnProperty.call(message, "is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_profile_public); - if (message.is_inventory_public != null && Object.hasOwnProperty.call(message, "is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_inventory_public); - if (message.is_vac_banned != null && Object.hasOwnProperty.call(message, "is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.is_vac_banned); - if (message.is_cyber_cafe != null && Object.hasOwnProperty.call(message, "is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.is_cyber_cafe); - if (message.is_school_account != null && Object.hasOwnProperty.call(message, "is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.is_school_account); - if (message.is_limited != null && Object.hasOwnProperty.call(message, "is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.is_limited); - if (message.is_subscribed != null && Object.hasOwnProperty.call(message, "is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.is_subscribed); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message["package"]); - if (message.is_free_trial_account != null && Object.hasOwnProperty.call(message, "is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) writer.uint32(/* id 13, wireType 0 =*/104).bool(message.is_free_trial_account); - if (message.free_trial_expiration != null && Object.hasOwnProperty.call(message, "free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.free_trial_expiration); - if (message.is_low_violence != null && Object.hasOwnProperty.call(message, "is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) writer.uint32(/* id 15, wireType 0 =*/120).bool(message.is_low_violence); - if (message.is_account_locked_down != null && Object.hasOwnProperty.call(message, "is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.is_account_locked_down); - if (message.is_community_banned != null && Object.hasOwnProperty.call(message, "is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.is_community_banned); - if (message.is_trade_banned != null && Object.hasOwnProperty.call(message, "is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.is_trade_banned); - if (message.trade_ban_expiration != null && Object.hasOwnProperty.call(message, "trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.trade_ban_expiration); - if (message.accountid != null && Object.hasOwnProperty.call(message, "accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.accountid); - if (message.suspension_end_time != null && Object.hasOwnProperty.call(message, "suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.suspension_end_time); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) writer.uint32(/* id 22, wireType 2 =*/178).string(message.currency); - if (message.steam_level != null && Object.hasOwnProperty.call(message, "steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.steam_level); - if (message.friend_count != null && Object.hasOwnProperty.call(message, "friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.friend_count); - if (message.account_creation_time != null && Object.hasOwnProperty.call(message, "account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.account_creation_time); - if (message.is_steamguard_enabled != null && Object.hasOwnProperty.call(message, "is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.is_steamguard_enabled); - if (message.is_phone_verified != null && Object.hasOwnProperty.call(message, "is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) writer.uint32(/* id 28, wireType 0 =*/224).bool(message.is_phone_verified); - if (message.is_two_factor_auth_enabled != null && Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) writer.uint32(/* id 29, wireType 0 =*/232).bool(message.is_two_factor_auth_enabled); - if (message.two_factor_enabled_time != null && Object.hasOwnProperty.call(message, "two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.two_factor_enabled_time); - if (message.phone_verification_time != null && Object.hasOwnProperty.call(message, "phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.phone_verification_time); - if (message.phone_id != null && Object.hasOwnProperty.call(message, "phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) writer.uint32(/* id 33, wireType 0 =*/264).uint64(message.phone_id); - if (message.is_phone_identifying != null && Object.hasOwnProperty.call(message, "is_phone_identifying")) + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) writer.uint32(/* id 34, wireType 0 =*/272).bool(message.is_phone_identifying); - if (message.rt_identity_linked != null && Object.hasOwnProperty.call(message, "rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) writer.uint32(/* id 35, wireType 0 =*/280).uint32(message.rt_identity_linked); - if (message.rt_birth_date != null && Object.hasOwnProperty.call(message, "rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) writer.uint32(/* id 36, wireType 0 =*/288).uint32(message.rt_birth_date); - if (message.txn_country_code != null && Object.hasOwnProperty.call(message, "txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.txn_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -34451,12 +44785,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetAccountDetails_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -34466,124 +44800,240 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response + * @returns {CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape} CGCSystemMsg_GetAccountDetails_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails_Response.decode = function decode(reader, length) { + CGCSystemMsg_GetAccountDetails_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetAccountDetails_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetAccountDetails_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult_deprecated = reader.uint32(); - break; - case 2: - message.account_name = reader.string(); - break; - case 3: - message.persona_name = reader.string(); - break; - case 4: - message.is_profile_public = reader.bool(); - break; - case 5: - message.is_inventory_public = reader.bool(); - break; - case 7: - message.is_vac_banned = reader.bool(); - break; - case 8: - message.is_cyber_cafe = reader.bool(); - break; - case 9: - message.is_school_account = reader.bool(); - break; - case 10: - message.is_limited = reader.bool(); - break; - case 11: - message.is_subscribed = reader.bool(); - break; - case 12: - message["package"] = reader.uint32(); - break; - case 13: - message.is_free_trial_account = reader.bool(); - break; - case 14: - message.free_trial_expiration = reader.uint32(); - break; - case 15: - message.is_low_violence = reader.bool(); - break; - case 16: - message.is_account_locked_down = reader.bool(); - break; - case 17: - message.is_community_banned = reader.bool(); - break; - case 18: - message.is_trade_banned = reader.bool(); - break; - case 19: - message.trade_ban_expiration = reader.uint32(); - break; - case 20: - message.accountid = reader.uint32(); - break; - case 21: - message.suspension_end_time = reader.uint32(); - break; - case 22: - message.currency = reader.string(); - break; - case 23: - message.steam_level = reader.uint32(); - break; - case 24: - message.friend_count = reader.uint32(); - break; - case 25: - message.account_creation_time = reader.uint32(); - break; - case 27: - message.is_steamguard_enabled = reader.bool(); - break; - case 28: - message.is_phone_verified = reader.bool(); - break; - case 29: - message.is_two_factor_auth_enabled = reader.bool(); - break; - case 30: - message.two_factor_enabled_time = reader.uint32(); - break; - case 31: - message.phone_verification_time = reader.uint32(); - break; - case 33: - message.phone_id = reader.uint64(); - break; - case 34: - message.is_phone_identifying = reader.bool(); - break; - case 35: - message.rt_identity_linked = reader.uint32(); - break; - case 36: - message.rt_birth_date = reader.uint32(); - break; - case 37: - message.txn_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult_deprecated = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.account_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.persona_name = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_profile_public = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_inventory_public = reader.bool(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.is_vac_banned = reader.bool(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.is_cyber_cafe = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.is_school_account = reader.bool(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.is_limited = reader.bool(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.is_subscribed = reader.bool(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message["package"] = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.is_free_trial_account = reader.bool(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.free_trial_expiration = reader.uint32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.is_low_violence = reader.bool(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.is_account_locked_down = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.is_community_banned = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.is_trade_banned = reader.bool(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.trade_ban_expiration = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.accountid = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.suspension_end_time = reader.uint32(); + continue; + } + case 22: { + if (wireType !== 2) + break; + message.currency = reader.string(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.steam_level = reader.uint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.friend_count = reader.uint32(); + continue; + } + case 25: { + if (wireType !== 0) + break; + message.account_creation_time = reader.uint32(); + continue; + } + case 27: { + if (wireType !== 0) + break; + message.is_steamguard_enabled = reader.bool(); + continue; + } + case 28: { + if (wireType !== 0) + break; + message.is_phone_verified = reader.bool(); + continue; + } + case 29: { + if (wireType !== 0) + break; + message.is_two_factor_auth_enabled = reader.bool(); + continue; + } + case 30: { + if (wireType !== 0) + break; + message.two_factor_enabled_time = reader.uint32(); + continue; + } + case 31: { + if (wireType !== 0) + break; + message.phone_verification_time = reader.uint32(); + continue; + } + case 33: { + if (wireType !== 0) + break; + message.phone_id = reader.uint64(); + continue; + } + case 34: { + if (wireType !== 0) + break; + message.is_phone_identifying = reader.bool(); + continue; + } + case 35: { + if (wireType !== 0) + break; + message.rt_identity_linked = reader.uint32(); + continue; + } + case 36: { + if (wireType !== 0) + break; + message.rt_birth_date = reader.uint32(); + continue; + } + case 37: { + if (wireType !== 2) + break; + message.txn_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -34593,11 +45043,11 @@ * @memberof CGCSystemMsg_GetAccountDetails_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response + * @returns {CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape} CGCSystemMsg_GetAccountDetails_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails_Response.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetAccountDetails_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34611,109 +45061,113 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetAccountDetails_Response.verify = function verify(message) { + CGCSystemMsg_GetAccountDetails_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) if (!$util.isInteger(message.eresult_deprecated)) return "eresult_deprecated: integer expected"; - if (message.account_name != null && message.hasOwnProperty("account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) if (!$util.isString(message.account_name)) return "account_name: string expected"; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) if (!$util.isString(message.persona_name)) return "persona_name: string expected"; - if (message.is_profile_public != null && message.hasOwnProperty("is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) if (typeof message.is_profile_public !== "boolean") return "is_profile_public: boolean expected"; - if (message.is_inventory_public != null && message.hasOwnProperty("is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) if (typeof message.is_inventory_public !== "boolean") return "is_inventory_public: boolean expected"; - if (message.is_vac_banned != null && message.hasOwnProperty("is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) if (typeof message.is_vac_banned !== "boolean") return "is_vac_banned: boolean expected"; - if (message.is_cyber_cafe != null && message.hasOwnProperty("is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) if (typeof message.is_cyber_cafe !== "boolean") return "is_cyber_cafe: boolean expected"; - if (message.is_school_account != null && message.hasOwnProperty("is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) if (typeof message.is_school_account !== "boolean") return "is_school_account: boolean expected"; - if (message.is_limited != null && message.hasOwnProperty("is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) if (typeof message.is_limited !== "boolean") return "is_limited: boolean expected"; - if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) if (typeof message.is_subscribed !== "boolean") return "is_subscribed: boolean expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) if (!$util.isInteger(message["package"])) return "package: integer expected"; - if (message.is_free_trial_account != null && message.hasOwnProperty("is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) if (typeof message.is_free_trial_account !== "boolean") return "is_free_trial_account: boolean expected"; - if (message.free_trial_expiration != null && message.hasOwnProperty("free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) if (!$util.isInteger(message.free_trial_expiration)) return "free_trial_expiration: integer expected"; - if (message.is_low_violence != null && message.hasOwnProperty("is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) if (typeof message.is_low_violence !== "boolean") return "is_low_violence: boolean expected"; - if (message.is_account_locked_down != null && message.hasOwnProperty("is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) if (typeof message.is_account_locked_down !== "boolean") return "is_account_locked_down: boolean expected"; - if (message.is_community_banned != null && message.hasOwnProperty("is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) if (typeof message.is_community_banned !== "boolean") return "is_community_banned: boolean expected"; - if (message.is_trade_banned != null && message.hasOwnProperty("is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) if (typeof message.is_trade_banned !== "boolean") return "is_trade_banned: boolean expected"; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) if (!$util.isInteger(message.trade_ban_expiration)) return "trade_ban_expiration: integer expected"; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) if (!$util.isInteger(message.accountid)) return "accountid: integer expected"; - if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) if (!$util.isInteger(message.suspension_end_time)) return "suspension_end_time: integer expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) if (!$util.isString(message.currency)) return "currency: string expected"; - if (message.steam_level != null && message.hasOwnProperty("steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) if (!$util.isInteger(message.steam_level)) return "steam_level: integer expected"; - if (message.friend_count != null && message.hasOwnProperty("friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) if (!$util.isInteger(message.friend_count)) return "friend_count: integer expected"; - if (message.account_creation_time != null && message.hasOwnProperty("account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) if (!$util.isInteger(message.account_creation_time)) return "account_creation_time: integer expected"; - if (message.is_steamguard_enabled != null && message.hasOwnProperty("is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) if (typeof message.is_steamguard_enabled !== "boolean") return "is_steamguard_enabled: boolean expected"; - if (message.is_phone_verified != null && message.hasOwnProperty("is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) if (typeof message.is_phone_verified !== "boolean") return "is_phone_verified: boolean expected"; - if (message.is_two_factor_auth_enabled != null && message.hasOwnProperty("is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) if (typeof message.is_two_factor_auth_enabled !== "boolean") return "is_two_factor_auth_enabled: boolean expected"; - if (message.two_factor_enabled_time != null && message.hasOwnProperty("two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) if (!$util.isInteger(message.two_factor_enabled_time)) return "two_factor_enabled_time: integer expected"; - if (message.phone_verification_time != null && message.hasOwnProperty("phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) if (!$util.isInteger(message.phone_verification_time)) return "phone_verification_time: integer expected"; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) if (!$util.isInteger(message.phone_id) && !(message.phone_id && $util.isInteger(message.phone_id.low) && $util.isInteger(message.phone_id.high))) return "phone_id: integer|Long expected"; - if (message.is_phone_identifying != null && message.hasOwnProperty("is_phone_identifying")) + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) if (typeof message.is_phone_identifying !== "boolean") return "is_phone_identifying: boolean expected"; - if (message.rt_identity_linked != null && message.hasOwnProperty("rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) if (!$util.isInteger(message.rt_identity_linked)) return "rt_identity_linked: integer expected"; - if (message.rt_birth_date != null && message.hasOwnProperty("rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) if (!$util.isInteger(message.rt_birth_date)) return "rt_birth_date: integer expected"; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) if (!$util.isString(message.txn_country_code)) return "txn_country_code: string expected"; return null; @@ -34727,44 +45181,50 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response */ - CGCSystemMsg_GetAccountDetails_Response.fromObject = function fromObject(object) { + CGCSystemMsg_GetAccountDetails_Response.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetAccountDetails_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetAccountDetails_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetAccountDetails_Response(); if (object.eresult_deprecated != null) message.eresult_deprecated = object.eresult_deprecated >>> 0; if (object.account_name != null) - message.account_name = String(object.account_name); + message.account_name = $String(object.account_name); if (object.persona_name != null) - message.persona_name = String(object.persona_name); + message.persona_name = $String(object.persona_name); if (object.is_profile_public != null) - message.is_profile_public = Boolean(object.is_profile_public); + message.is_profile_public = $Boolean(object.is_profile_public); if (object.is_inventory_public != null) - message.is_inventory_public = Boolean(object.is_inventory_public); + message.is_inventory_public = $Boolean(object.is_inventory_public); if (object.is_vac_banned != null) - message.is_vac_banned = Boolean(object.is_vac_banned); + message.is_vac_banned = $Boolean(object.is_vac_banned); if (object.is_cyber_cafe != null) - message.is_cyber_cafe = Boolean(object.is_cyber_cafe); + message.is_cyber_cafe = $Boolean(object.is_cyber_cafe); if (object.is_school_account != null) - message.is_school_account = Boolean(object.is_school_account); + message.is_school_account = $Boolean(object.is_school_account); if (object.is_limited != null) - message.is_limited = Boolean(object.is_limited); + message.is_limited = $Boolean(object.is_limited); if (object.is_subscribed != null) - message.is_subscribed = Boolean(object.is_subscribed); + message.is_subscribed = $Boolean(object.is_subscribed); if (object["package"] != null) message["package"] = object["package"] >>> 0; if (object.is_free_trial_account != null) - message.is_free_trial_account = Boolean(object.is_free_trial_account); + message.is_free_trial_account = $Boolean(object.is_free_trial_account); if (object.free_trial_expiration != null) message.free_trial_expiration = object.free_trial_expiration >>> 0; if (object.is_low_violence != null) - message.is_low_violence = Boolean(object.is_low_violence); + message.is_low_violence = $Boolean(object.is_low_violence); if (object.is_account_locked_down != null) - message.is_account_locked_down = Boolean(object.is_account_locked_down); + message.is_account_locked_down = $Boolean(object.is_account_locked_down); if (object.is_community_banned != null) - message.is_community_banned = Boolean(object.is_community_banned); + message.is_community_banned = $Boolean(object.is_community_banned); if (object.is_trade_banned != null) - message.is_trade_banned = Boolean(object.is_trade_banned); + message.is_trade_banned = $Boolean(object.is_trade_banned); if (object.trade_ban_expiration != null) message.trade_ban_expiration = object.trade_ban_expiration >>> 0; if (object.accountid != null) @@ -34772,7 +45232,7 @@ if (object.suspension_end_time != null) message.suspension_end_time = object.suspension_end_time >>> 0; if (object.currency != null) - message.currency = String(object.currency); + message.currency = $String(object.currency); if (object.steam_level != null) message.steam_level = object.steam_level >>> 0; if (object.friend_count != null) @@ -34780,32 +45240,32 @@ if (object.account_creation_time != null) message.account_creation_time = object.account_creation_time >>> 0; if (object.is_steamguard_enabled != null) - message.is_steamguard_enabled = Boolean(object.is_steamguard_enabled); + message.is_steamguard_enabled = $Boolean(object.is_steamguard_enabled); if (object.is_phone_verified != null) - message.is_phone_verified = Boolean(object.is_phone_verified); + message.is_phone_verified = $Boolean(object.is_phone_verified); if (object.is_two_factor_auth_enabled != null) - message.is_two_factor_auth_enabled = Boolean(object.is_two_factor_auth_enabled); + message.is_two_factor_auth_enabled = $Boolean(object.is_two_factor_auth_enabled); if (object.two_factor_enabled_time != null) message.two_factor_enabled_time = object.two_factor_enabled_time >>> 0; if (object.phone_verification_time != null) message.phone_verification_time = object.phone_verification_time >>> 0; if (object.phone_id != null) if ($util.Long) - (message.phone_id = $util.Long.fromValue(object.phone_id)).unsigned = true; + message.phone_id = $util.Long.fromValue(object.phone_id, true); else if (typeof object.phone_id === "string") - message.phone_id = parseInt(object.phone_id, 10); + message.phone_id = $parseInt(object.phone_id, 10); else if (typeof object.phone_id === "number") message.phone_id = object.phone_id; else if (typeof object.phone_id === "object") message.phone_id = new $util.LongBits(object.phone_id.low >>> 0, object.phone_id.high >>> 0).toNumber(true); if (object.is_phone_identifying != null) - message.is_phone_identifying = Boolean(object.is_phone_identifying); + message.is_phone_identifying = $Boolean(object.is_phone_identifying); if (object.rt_identity_linked != null) message.rt_identity_linked = object.rt_identity_linked >>> 0; if (object.rt_birth_date != null) message.rt_birth_date = object.rt_birth_date >>> 0; if (object.txn_country_code != null) - message.txn_country_code = String(object.txn_country_code); + message.txn_country_code = $String(object.txn_country_code); return message; }; @@ -34818,9 +45278,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetAccountDetails_Response.toObject = function toObject(message, options) { + CGCSystemMsg_GetAccountDetails_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult_deprecated = 2; @@ -34854,84 +45318,86 @@ object.phone_verification_time = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.phone_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.phone_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.phone_id = options.longs === String ? "0" : 0; + object.phone_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.is_phone_identifying = false; object.rt_identity_linked = 0; object.rt_birth_date = 0; object.txn_country_code = ""; } - if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated")) + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) object.eresult_deprecated = message.eresult_deprecated; - if (message.account_name != null && message.hasOwnProperty("account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) object.account_name = message.account_name; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) object.persona_name = message.persona_name; - if (message.is_profile_public != null && message.hasOwnProperty("is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) object.is_profile_public = message.is_profile_public; - if (message.is_inventory_public != null && message.hasOwnProperty("is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) object.is_inventory_public = message.is_inventory_public; - if (message.is_vac_banned != null && message.hasOwnProperty("is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) object.is_vac_banned = message.is_vac_banned; - if (message.is_cyber_cafe != null && message.hasOwnProperty("is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) object.is_cyber_cafe = message.is_cyber_cafe; - if (message.is_school_account != null && message.hasOwnProperty("is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) object.is_school_account = message.is_school_account; - if (message.is_limited != null && message.hasOwnProperty("is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) object.is_limited = message.is_limited; - if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) object.is_subscribed = message.is_subscribed; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; - if (message.is_free_trial_account != null && message.hasOwnProperty("is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) object.is_free_trial_account = message.is_free_trial_account; - if (message.free_trial_expiration != null && message.hasOwnProperty("free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) object.free_trial_expiration = message.free_trial_expiration; - if (message.is_low_violence != null && message.hasOwnProperty("is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) object.is_low_violence = message.is_low_violence; - if (message.is_account_locked_down != null && message.hasOwnProperty("is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) object.is_account_locked_down = message.is_account_locked_down; - if (message.is_community_banned != null && message.hasOwnProperty("is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) object.is_community_banned = message.is_community_banned; - if (message.is_trade_banned != null && message.hasOwnProperty("is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) object.is_trade_banned = message.is_trade_banned; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) object.trade_ban_expiration = message.trade_ban_expiration; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) object.accountid = message.accountid; - if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) object.suspension_end_time = message.suspension_end_time; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) object.currency = message.currency; - if (message.steam_level != null && message.hasOwnProperty("steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) object.steam_level = message.steam_level; - if (message.friend_count != null && message.hasOwnProperty("friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) object.friend_count = message.friend_count; - if (message.account_creation_time != null && message.hasOwnProperty("account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) object.account_creation_time = message.account_creation_time; - if (message.is_steamguard_enabled != null && message.hasOwnProperty("is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) object.is_steamguard_enabled = message.is_steamguard_enabled; - if (message.is_phone_verified != null && message.hasOwnProperty("is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) object.is_phone_verified = message.is_phone_verified; - if (message.is_two_factor_auth_enabled != null && message.hasOwnProperty("is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) object.is_two_factor_auth_enabled = message.is_two_factor_auth_enabled; - if (message.two_factor_enabled_time != null && message.hasOwnProperty("two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) object.two_factor_enabled_time = message.two_factor_enabled_time; - if (message.phone_verification_time != null && message.hasOwnProperty("phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) object.phone_verification_time = message.phone_verification_time; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) - if (typeof message.phone_id === "number") - object.phone_id = options.longs === String ? String(message.phone_id) : message.phone_id; + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.phone_id = typeof message.phone_id === "number" ? $BigInt(message.phone_id) : $util.Long.fromBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0, true).toBigInt(); + else if (typeof message.phone_id === "number") + object.phone_id = options.longs === $String ? $String(message.phone_id) : message.phone_id; else - object.phone_id = options.longs === String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; - if (message.is_phone_identifying != null && message.hasOwnProperty("is_phone_identifying")) + object.phone_id = options.longs === $String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === $Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) object.is_phone_identifying = message.is_phone_identifying; - if (message.rt_identity_linked != null && message.hasOwnProperty("rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) object.rt_identity_linked = message.rt_identity_linked; - if (message.rt_birth_date != null && message.hasOwnProperty("rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) object.rt_birth_date = message.rt_birth_date; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) object.txn_country_code = message.txn_country_code; return object; }; @@ -34943,8 +45409,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetAccountDetails_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetAccountDetails_Response.prototype.toJSON = function() { + return CGCSystemMsg_GetAccountDetails_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetAccountDetails_Response + * @function getTypeUrl + * @memberof CGCSystemMsg_GetAccountDetails_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetAccountDetails_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetAccountDetails_Response"; }; return CGCSystemMsg_GetAccountDetails_Response; @@ -34954,26 +45434,39 @@ /** * Properties of a CMsgGCCheckClanMembership. - * @exports ICMsgGCCheckClanMembership - * @interface ICMsgGCCheckClanMembership + * @typedef {Object} CMsgGCCheckClanMembership.$Properties * @property {number|Long|null} [steamid] CMsgGCCheckClanMembership steamid * @property {number|null} [clanid] CMsgGCCheckClanMembership clanid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckClanMembership. + * @exports ICMsgGCCheckClanMembership + * @interface ICMsgGCCheckClanMembership + * @augments CMsgGCCheckClanMembership.$Properties + * @deprecated Use CMsgGCCheckClanMembership.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckClanMembership. + * @typedef {CMsgGCCheckClanMembership.$Properties} CMsgGCCheckClanMembership.$Shape */ /** * Constructs a new CMsgGCCheckClanMembership. * @exports CMsgGCCheckClanMembership * @classdesc Represents a CMsgGCCheckClanMembership. - * @implements ICMsgGCCheckClanMembership * @constructor - * @param {ICMsgGCCheckClanMembership=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckClanMembership(properties) { + var CMsgGCCheckClanMembership = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckClanMembership steamid. @@ -34981,7 +45474,7 @@ * @memberof CMsgGCCheckClanMembership * @instance */ - CMsgGCCheckClanMembership.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckClanMembership.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCCheckClanMembership clanid. @@ -34996,10 +45489,14 @@ * @function create * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership instance + * @type {{ + * (properties: CMsgGCCheckClanMembership.$Shape): CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape; + * (properties?: CMsgGCCheckClanMembership.$Properties): CMsgGCCheckClanMembership; + * }} */ - CMsgGCCheckClanMembership.create = function create(properties) { + CMsgGCCheckClanMembership.create = function(properties) { return new CMsgGCCheckClanMembership(properties); }; @@ -35008,17 +45505,24 @@ * @function encode * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership} message CMsgGCCheckClanMembership message or plain object to encode + * @param {CMsgGCCheckClanMembership.$Properties} message CMsgGCCheckClanMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership.encode = function encode(message, writer) { + CMsgGCCheckClanMembership.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.clanid != null && Object.hasOwnProperty.call(message, "clanid")) + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.clanid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -35027,12 +45531,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership} message CMsgGCCheckClanMembership message or plain object to encode + * @param {CMsgGCCheckClanMembership.$Properties} message CMsgGCCheckClanMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckClanMembership.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -35042,28 +45546,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership + * @returns {CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape} CMsgGCCheckClanMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership.decode = function decode(reader, length) { + CMsgGCCheckClanMembership.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckClanMembership(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckClanMembership(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.clanid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.clanid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -35073,11 +45597,11 @@ * @memberof CMsgGCCheckClanMembership * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership + * @returns {CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape} CMsgGCCheckClanMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckClanMembership.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -35091,13 +45615,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckClanMembership.verify = function verify(message) { + CMsgGCCheckClanMembership.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.clanid != null && message.hasOwnProperty("clanid")) + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) if (!$util.isInteger(message.clanid)) return "clanid: integer expected"; return null; @@ -35111,19 +45639,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership */ - CMsgGCCheckClanMembership.fromObject = function fromObject(object) { + CMsgGCCheckClanMembership.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckClanMembership) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckClanMembership: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckClanMembership(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.clanid != null) message.clanid = object.clanid >>> 0; return message; @@ -35138,24 +45672,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckClanMembership.toObject = function toObject(message, options) { + CMsgGCCheckClanMembership.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.clanid = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.clanid != null && message.hasOwnProperty("clanid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) object.clanid = message.clanid; return object; }; @@ -35167,8 +45707,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckClanMembership.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckClanMembership.prototype.toJSON = function() { + return CMsgGCCheckClanMembership.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckClanMembership + * @function getTypeUrl + * @memberof CMsgGCCheckClanMembership + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckClanMembership.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckClanMembership"; }; return CMsgGCCheckClanMembership; @@ -35176,27 +45730,40 @@ $root.CMsgGCCheckClanMembership_Response = (function() { + /** + * Properties of a CMsgGCCheckClanMembership_Response. + * @typedef {Object} CMsgGCCheckClanMembership_Response.$Properties + * @property {boolean|null} [ismember] CMsgGCCheckClanMembership_Response ismember + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCCheckClanMembership_Response. * @exports ICMsgGCCheckClanMembership_Response * @interface ICMsgGCCheckClanMembership_Response - * @property {boolean|null} [ismember] CMsgGCCheckClanMembership_Response ismember + * @augments CMsgGCCheckClanMembership_Response.$Properties + * @deprecated Use CMsgGCCheckClanMembership_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckClanMembership_Response. + * @typedef {CMsgGCCheckClanMembership_Response.$Properties} CMsgGCCheckClanMembership_Response.$Shape */ /** * Constructs a new CMsgGCCheckClanMembership_Response. * @exports CMsgGCCheckClanMembership_Response * @classdesc Represents a CMsgGCCheckClanMembership_Response. - * @implements ICMsgGCCheckClanMembership_Response * @constructor - * @param {ICMsgGCCheckClanMembership_Response=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckClanMembership_Response(properties) { + var CMsgGCCheckClanMembership_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckClanMembership_Response ismember. @@ -35211,10 +45778,14 @@ * @function create * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response instance + * @type {{ + * (properties: CMsgGCCheckClanMembership_Response.$Shape): CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape; + * (properties?: CMsgGCCheckClanMembership_Response.$Properties): CMsgGCCheckClanMembership_Response; + * }} */ - CMsgGCCheckClanMembership_Response.create = function create(properties) { + CMsgGCCheckClanMembership_Response.create = function(properties) { return new CMsgGCCheckClanMembership_Response(properties); }; @@ -35223,15 +45794,22 @@ * @function encode * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response} message CMsgGCCheckClanMembership_Response message or plain object to encode + * @param {CMsgGCCheckClanMembership_Response.$Properties} message CMsgGCCheckClanMembership_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership_Response.encode = function encode(message, writer) { + CMsgGCCheckClanMembership_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ismember != null && Object.hasOwnProperty.call(message, "ismember")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.ismember); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -35240,12 +45818,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response} message CMsgGCCheckClanMembership_Response message or plain object to encode + * @param {CMsgGCCheckClanMembership_Response.$Properties} message CMsgGCCheckClanMembership_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckClanMembership_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -35255,25 +45833,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response + * @returns {CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape} CMsgGCCheckClanMembership_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership_Response.decode = function decode(reader, length) { + CMsgGCCheckClanMembership_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckClanMembership_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckClanMembership_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ismember = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ismember = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -35283,11 +45878,11 @@ * @memberof CMsgGCCheckClanMembership_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response + * @returns {CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape} CMsgGCCheckClanMembership_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckClanMembership_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -35301,10 +45896,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckClanMembership_Response.verify = function verify(message) { + CMsgGCCheckClanMembership_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ismember != null && message.hasOwnProperty("ismember")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) if (typeof message.ismember !== "boolean") return "ismember: boolean expected"; return null; @@ -35318,12 +45917,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response */ - CMsgGCCheckClanMembership_Response.fromObject = function fromObject(object) { + CMsgGCCheckClanMembership_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckClanMembership_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckClanMembership_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckClanMembership_Response(); if (object.ismember != null) - message.ismember = Boolean(object.ismember); + message.ismember = $Boolean(object.ismember); return message; }; @@ -35336,13 +45941,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckClanMembership_Response.toObject = function toObject(message, options) { + CMsgGCCheckClanMembership_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.ismember = false; - if (message.ismember != null && message.hasOwnProperty("ismember")) + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) object.ismember = message.ismember; return object; }; @@ -35354,8 +45963,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckClanMembership_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckClanMembership_Response.prototype.toJSON = function() { + return CMsgGCCheckClanMembership_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckClanMembership_Response + * @function getTypeUrl + * @memberof CMsgGCCheckClanMembership_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckClanMembership_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckClanMembership_Response"; }; return CMsgGCCheckClanMembership_Response; @@ -35363,28 +45986,41 @@ $root.CMsgGCGetPersonaNames = (function() { + /** + * Properties of a CMsgGCGetPersonaNames. + * @typedef {Object} CMsgGCGetPersonaNames.$Properties + * @property {Array.|null} [steamids] CMsgGCGetPersonaNames steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPersonaNames. * @exports ICMsgGCGetPersonaNames * @interface ICMsgGCGetPersonaNames - * @property {Array.|null} [steamids] CMsgGCGetPersonaNames steamids + * @augments CMsgGCGetPersonaNames.$Properties + * @deprecated Use CMsgGCGetPersonaNames.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPersonaNames. + * @typedef {CMsgGCGetPersonaNames.$Properties} CMsgGCGetPersonaNames.$Shape */ /** * Constructs a new CMsgGCGetPersonaNames. * @exports CMsgGCGetPersonaNames * @classdesc Represents a CMsgGCGetPersonaNames. - * @implements ICMsgGCGetPersonaNames * @constructor - * @param {ICMsgGCGetPersonaNames=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPersonaNames(properties) { + var CMsgGCGetPersonaNames = function (properties) { this.steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPersonaNames steamids. @@ -35399,10 +46035,14 @@ * @function create * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames instance + * @type {{ + * (properties: CMsgGCGetPersonaNames.$Shape): CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape; + * (properties?: CMsgGCGetPersonaNames.$Properties): CMsgGCGetPersonaNames; + * }} */ - CMsgGCGetPersonaNames.create = function create(properties) { + CMsgGCGetPersonaNames.create = function(properties) { return new CMsgGCGetPersonaNames(properties); }; @@ -35411,16 +46051,23 @@ * @function encode * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames} message CMsgGCGetPersonaNames message or plain object to encode + * @param {CMsgGCGetPersonaNames.$Properties} message CMsgGCGetPersonaNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames.encode = function encode(message, writer) { + CMsgGCGetPersonaNames.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.steamids != null && message.steamids.length) for (var i = 0; i < message.steamids.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -35429,12 +46076,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames} message CMsgGCGetPersonaNames message or plain object to encode + * @param {CMsgGCGetPersonaNames.$Properties} message CMsgGCGetPersonaNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPersonaNames.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -35444,32 +46091,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames + * @returns {CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape} CMsgGCGetPersonaNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames.decode = function decode(reader, length) { + CMsgGCGetPersonaNames.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.steamids && message.steamids.length)) - message.steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.steamids.push(reader.fixed64()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.steamids && message.steamids.length)) + message.steamids = []; + reader.fixed64s(message.steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.steamids && message.steamids.length)) + message.steamids = []; message.steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -35479,11 +46144,11 @@ * @memberof CMsgGCGetPersonaNames * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames + * @returns {CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape} CMsgGCGetPersonaNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPersonaNames.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -35497,11 +46162,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPersonaNames.verify = function verify(message) { + CMsgGCGetPersonaNames.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamids != null && message.hasOwnProperty("steamids")) { - if (!Array.isArray(message.steamids)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamids != null && $Object.hasOwnProperty.call(message, "steamids")) { + if (!$Array.isArray(message.steamids)) return "steamids: array expected"; for (var i = 0; i < message.steamids.length; ++i) if (!$util.isInteger(message.steamids[i]) && !(message.steamids[i] && $util.isInteger(message.steamids[i].low) && $util.isInteger(message.steamids[i].high))) @@ -35518,23 +46187,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames */ - CMsgGCGetPersonaNames.fromObject = function fromObject(object) { + CMsgGCGetPersonaNames.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames(); if (object.steamids) { - if (!Array.isArray(object.steamids)) - throw TypeError(".CMsgGCGetPersonaNames.steamids: array expected"); - message.steamids = []; + if (!$Array.isArray(object.steamids)) + throw $TypeError(".CMsgGCGetPersonaNames.steamids: array expected"); + message.steamids = $Array(object.steamids.length); for (var i = 0; i < object.steamids.length; ++i) if ($util.Long) - (message.steamids[i] = $util.Long.fromValue(object.steamids[i])).unsigned = false; + message.steamids[i] = $util.Long.fromValue(object.steamids[i], true); else if (typeof object.steamids[i] === "string") - message.steamids[i] = parseInt(object.steamids[i], 10); + message.steamids[i] = $parseInt(object.steamids[i], 10); else if (typeof object.steamids[i] === "number") message.steamids[i] = object.steamids[i]; else if (typeof object.steamids[i] === "object") - message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(); + message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -35548,19 +46223,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPersonaNames.toObject = function toObject(message, options) { + CMsgGCGetPersonaNames.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.steamids = []; if (message.steamids && message.steamids.length) { - object.steamids = []; + object.steamids = $Array(message.steamids.length); for (var j = 0; j < message.steamids.length; ++j) - if (typeof message.steamids[j] === "number") - object.steamids[j] = options.longs === String ? String(message.steamids[j]) : message.steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamids[j] = typeof message.steamids[j] === "number" ? $BigInt(message.steamids[j]) : $util.Long.fromBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.steamids[j] === "number") + object.steamids[j] = options.longs === $String ? $String(message.steamids[j]) : message.steamids[j]; else - object.steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber() : message.steamids[j]; + object.steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === $Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber(true) : message.steamids[j]; } return object; }; @@ -35572,8 +46253,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPersonaNames.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPersonaNames.prototype.toJSON = function() { + return CMsgGCGetPersonaNames.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPersonaNames + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPersonaNames.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames"; }; return CMsgGCGetPersonaNames; @@ -35581,34 +46276,47 @@ $root.CMsgGCGetPersonaNames_Response = (function() { + /** + * Properties of a CMsgGCGetPersonaNames_Response. + * @typedef {Object} CMsgGCGetPersonaNames_Response.$Properties + * @property {Array.|null} [succeeded_lookups] CMsgGCGetPersonaNames_Response succeeded_lookups + * @property {Array.|null} [failed_lookup_steamids] CMsgGCGetPersonaNames_Response failed_lookup_steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPersonaNames_Response. * @exports ICMsgGCGetPersonaNames_Response * @interface ICMsgGCGetPersonaNames_Response - * @property {Array.|null} [succeeded_lookups] CMsgGCGetPersonaNames_Response succeeded_lookups - * @property {Array.|null} [failed_lookup_steamids] CMsgGCGetPersonaNames_Response failed_lookup_steamids + * @augments CMsgGCGetPersonaNames_Response.$Properties + * @deprecated Use CMsgGCGetPersonaNames_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPersonaNames_Response. + * @typedef {CMsgGCGetPersonaNames_Response.$Properties} CMsgGCGetPersonaNames_Response.$Shape */ /** * Constructs a new CMsgGCGetPersonaNames_Response. * @exports CMsgGCGetPersonaNames_Response * @classdesc Represents a CMsgGCGetPersonaNames_Response. - * @implements ICMsgGCGetPersonaNames_Response * @constructor - * @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPersonaNames_Response(properties) { + var CMsgGCGetPersonaNames_Response = function (properties) { this.succeeded_lookups = []; this.failed_lookup_steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPersonaNames_Response succeeded_lookups. - * @member {Array.} succeeded_lookups + * @member {Array.} succeeded_lookups * @memberof CMsgGCGetPersonaNames_Response * @instance */ @@ -35627,10 +46335,14 @@ * @function create * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response instance + * @type {{ + * (properties: CMsgGCGetPersonaNames_Response.$Shape): CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape; + * (properties?: CMsgGCGetPersonaNames_Response.$Properties): CMsgGCGetPersonaNames_Response; + * }} */ - CMsgGCGetPersonaNames_Response.create = function create(properties) { + CMsgGCGetPersonaNames_Response.create = function(properties) { return new CMsgGCGetPersonaNames_Response(properties); }; @@ -35639,19 +46351,26 @@ * @function encode * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response} message CMsgGCGetPersonaNames_Response message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.$Properties} message CMsgGCGetPersonaNames_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames_Response.encode = function encode(message, writer) { + CMsgGCGetPersonaNames_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.succeeded_lookups != null && message.succeeded_lookups.length) for (var i = 0; i < message.succeeded_lookups.length; ++i) - $root.CMsgGCGetPersonaNames_Response.PersonaName.encode(message.succeeded_lookups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCGetPersonaNames_Response.PersonaName.encode(message.succeeded_lookups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); if (message.failed_lookup_steamids != null && message.failed_lookup_steamids.length) for (var i = 0; i < message.failed_lookup_steamids.length; ++i) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.failed_lookup_steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -35660,12 +46379,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response} message CMsgGCGetPersonaNames_Response message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.$Properties} message CMsgGCGetPersonaNames_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPersonaNames_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -35675,37 +46394,58 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response + * @returns {CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape} CMsgGCGetPersonaNames_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames_Response.decode = function decode(reader, length) { + CMsgGCGetPersonaNames_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.succeeded_lookups && message.succeeded_lookups.length)) - message.succeeded_lookups = []; - message.succeeded_lookups.push($root.CMsgGCGetPersonaNames_Response.PersonaName.decode(reader, reader.uint32())); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) - message.failed_lookup_steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.failed_lookup_steamids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.succeeded_lookups && message.succeeded_lookups.length)) + message.succeeded_lookups = []; + message.succeeded_lookups.push($root.CMsgGCGetPersonaNames_Response.PersonaName.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) + message.failed_lookup_steamids = []; + reader.fixed64s(message.failed_lookup_steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) + message.failed_lookup_steamids = []; message.failed_lookup_steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -35715,11 +46455,11 @@ * @memberof CMsgGCGetPersonaNames_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response + * @returns {CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape} CMsgGCGetPersonaNames_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPersonaNames_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -35733,20 +46473,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPersonaNames_Response.verify = function verify(message) { + CMsgGCGetPersonaNames_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.succeeded_lookups != null && message.hasOwnProperty("succeeded_lookups")) { - if (!Array.isArray(message.succeeded_lookups)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.succeeded_lookups != null && $Object.hasOwnProperty.call(message, "succeeded_lookups")) { + if (!$Array.isArray(message.succeeded_lookups)) return "succeeded_lookups: array expected"; for (var i = 0; i < message.succeeded_lookups.length; ++i) { - var error = $root.CMsgGCGetPersonaNames_Response.PersonaName.verify(message.succeeded_lookups[i]); + var error = $root.CMsgGCGetPersonaNames_Response.PersonaName.verify(message.succeeded_lookups[i], _depth + 1); if (error) return "succeeded_lookups." + error; } } - if (message.failed_lookup_steamids != null && message.hasOwnProperty("failed_lookup_steamids")) { - if (!Array.isArray(message.failed_lookup_steamids)) + if (message.failed_lookup_steamids != null && $Object.hasOwnProperty.call(message, "failed_lookup_steamids")) { + if (!$Array.isArray(message.failed_lookup_steamids)) return "failed_lookup_steamids: array expected"; for (var i = 0; i < message.failed_lookup_steamids.length; ++i) if (!$util.isInteger(message.failed_lookup_steamids[i]) && !(message.failed_lookup_steamids[i] && $util.isInteger(message.failed_lookup_steamids[i].low) && $util.isInteger(message.failed_lookup_steamids[i].high))) @@ -35763,33 +46507,39 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response */ - CMsgGCGetPersonaNames_Response.fromObject = function fromObject(object) { + CMsgGCGetPersonaNames_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames_Response(); if (object.succeeded_lookups) { - if (!Array.isArray(object.succeeded_lookups)) - throw TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: array expected"); - message.succeeded_lookups = []; + if (!$Array.isArray(object.succeeded_lookups)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: array expected"); + message.succeeded_lookups = $Array(object.succeeded_lookups.length); for (var i = 0; i < object.succeeded_lookups.length; ++i) { - if (typeof object.succeeded_lookups[i] !== "object") - throw TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: object expected"); - message.succeeded_lookups[i] = $root.CMsgGCGetPersonaNames_Response.PersonaName.fromObject(object.succeeded_lookups[i]); + if (!$util.isObject(object.succeeded_lookups[i])) + throw $TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: object expected"); + message.succeeded_lookups[i] = $root.CMsgGCGetPersonaNames_Response.PersonaName.fromObject(object.succeeded_lookups[i], _depth + 1); } } if (object.failed_lookup_steamids) { - if (!Array.isArray(object.failed_lookup_steamids)) - throw TypeError(".CMsgGCGetPersonaNames_Response.failed_lookup_steamids: array expected"); - message.failed_lookup_steamids = []; + if (!$Array.isArray(object.failed_lookup_steamids)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.failed_lookup_steamids: array expected"); + message.failed_lookup_steamids = $Array(object.failed_lookup_steamids.length); for (var i = 0; i < object.failed_lookup_steamids.length; ++i) if ($util.Long) - (message.failed_lookup_steamids[i] = $util.Long.fromValue(object.failed_lookup_steamids[i])).unsigned = false; + message.failed_lookup_steamids[i] = $util.Long.fromValue(object.failed_lookup_steamids[i], true); else if (typeof object.failed_lookup_steamids[i] === "string") - message.failed_lookup_steamids[i] = parseInt(object.failed_lookup_steamids[i], 10); + message.failed_lookup_steamids[i] = $parseInt(object.failed_lookup_steamids[i], 10); else if (typeof object.failed_lookup_steamids[i] === "number") message.failed_lookup_steamids[i] = object.failed_lookup_steamids[i]; else if (typeof object.failed_lookup_steamids[i] === "object") - message.failed_lookup_steamids[i] = new $util.LongBits(object.failed_lookup_steamids[i].low >>> 0, object.failed_lookup_steamids[i].high >>> 0).toNumber(); + message.failed_lookup_steamids[i] = new $util.LongBits(object.failed_lookup_steamids[i].low >>> 0, object.failed_lookup_steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -35803,26 +46553,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPersonaNames_Response.toObject = function toObject(message, options) { + CMsgGCGetPersonaNames_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.succeeded_lookups = []; object.failed_lookup_steamids = []; } if (message.succeeded_lookups && message.succeeded_lookups.length) { - object.succeeded_lookups = []; + object.succeeded_lookups = $Array(message.succeeded_lookups.length); for (var j = 0; j < message.succeeded_lookups.length; ++j) - object.succeeded_lookups[j] = $root.CMsgGCGetPersonaNames_Response.PersonaName.toObject(message.succeeded_lookups[j], options); + object.succeeded_lookups[j] = $root.CMsgGCGetPersonaNames_Response.PersonaName.toObject(message.succeeded_lookups[j], options, _depth + 1); } if (message.failed_lookup_steamids && message.failed_lookup_steamids.length) { - object.failed_lookup_steamids = []; + object.failed_lookup_steamids = $Array(message.failed_lookup_steamids.length); for (var j = 0; j < message.failed_lookup_steamids.length; ++j) - if (typeof message.failed_lookup_steamids[j] === "number") - object.failed_lookup_steamids[j] = options.longs === String ? String(message.failed_lookup_steamids[j]) : message.failed_lookup_steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.failed_lookup_steamids[j] = typeof message.failed_lookup_steamids[j] === "number" ? $BigInt(message.failed_lookup_steamids[j]) : $util.Long.fromBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.failed_lookup_steamids[j] === "number") + object.failed_lookup_steamids[j] = options.longs === $String ? $String(message.failed_lookup_steamids[j]) : message.failed_lookup_steamids[j]; else - object.failed_lookup_steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.failed_lookup_steamids[j]) : options.longs === Number ? new $util.LongBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0).toNumber() : message.failed_lookup_steamids[j]; + object.failed_lookup_steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.failed_lookup_steamids[j]) : options.longs === $Number ? new $util.LongBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0).toNumber(true) : message.failed_lookup_steamids[j]; } return object; }; @@ -35834,34 +46590,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPersonaNames_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPersonaNames_Response.prototype.toJSON = function() { + return CMsgGCGetPersonaNames_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPersonaNames_Response + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPersonaNames_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames_Response"; }; CMsgGCGetPersonaNames_Response.PersonaName = (function() { /** * Properties of a PersonaName. - * @memberof CMsgGCGetPersonaNames_Response - * @interface IPersonaName + * @typedef {Object} CMsgGCGetPersonaNames_Response.PersonaName.$Properties * @property {number|Long|null} [steamid] PersonaName steamid * @property {string|null} [persona_name] PersonaName persona_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PersonaName. + * @memberof CMsgGCGetPersonaNames_Response + * @interface IPersonaName + * @augments CMsgGCGetPersonaNames_Response.PersonaName.$Properties + * @deprecated Use CMsgGCGetPersonaNames_Response.PersonaName.$Properties instead. + */ + + /** + * Shape of a PersonaName. + * @typedef {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} CMsgGCGetPersonaNames_Response.PersonaName.$Shape */ /** * Constructs a new PersonaName. * @memberof CMsgGCGetPersonaNames_Response * @classdesc Represents a PersonaName. - * @implements IPersonaName * @constructor - * @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PersonaName(properties) { + var PersonaName = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PersonaName steamid. @@ -35869,7 +46652,7 @@ * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @instance */ - PersonaName.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PersonaName.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * PersonaName persona_name. @@ -35884,10 +46667,14 @@ * @function create * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName instance + * @type {{ + * (properties: CMsgGCGetPersonaNames_Response.PersonaName.$Shape): CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape; + * (properties?: CMsgGCGetPersonaNames_Response.PersonaName.$Properties): CMsgGCGetPersonaNames_Response.PersonaName; + * }} */ - PersonaName.create = function create(properties) { + PersonaName.create = function(properties) { return new PersonaName(properties); }; @@ -35896,17 +46683,24 @@ * @function encode * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName} message PersonaName message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} message PersonaName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaName.encode = function encode(message, writer) { + PersonaName.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.persona_name != null && Object.hasOwnProperty.call(message, "persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.persona_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -35915,12 +46709,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName} message PersonaName message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} message PersonaName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PersonaName.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -35930,28 +46724,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName + * @returns {CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape} PersonaName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaName.decode = function decode(reader, length) { + PersonaName.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames_Response.PersonaName(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames_Response.PersonaName(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.persona_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.persona_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -35961,11 +46775,11 @@ * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName + * @returns {CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape} PersonaName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaName.decodeDelimited = function decodeDelimited(reader) { + PersonaName.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -35979,13 +46793,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PersonaName.verify = function verify(message) { + PersonaName.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) if (!$util.isString(message.persona_name)) return "persona_name: string expected"; return null; @@ -35999,21 +46817,27 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName */ - PersonaName.fromObject = function fromObject(object) { + PersonaName.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames_Response.PersonaName) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.PersonaName: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames_Response.PersonaName(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.persona_name != null) - message.persona_name = String(object.persona_name); + message.persona_name = $String(object.persona_name); return message; }; @@ -36026,24 +46850,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PersonaName.toObject = function toObject(message, options) { + PersonaName.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.persona_name = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) object.persona_name = message.persona_name; return object; }; @@ -36055,8 +46885,22 @@ * @instance * @returns {Object.} JSON object */ - PersonaName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PersonaName.prototype.toJSON = function() { + return PersonaName.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PersonaName + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames_Response.PersonaName + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PersonaName.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames_Response.PersonaName"; }; return PersonaName; @@ -36069,26 +46913,39 @@ /** * Properties of a CMsgGCCheckFriendship. - * @exports ICMsgGCCheckFriendship - * @interface ICMsgGCCheckFriendship + * @typedef {Object} CMsgGCCheckFriendship.$Properties * @property {number|Long|null} [steamid_left] CMsgGCCheckFriendship steamid_left * @property {number|Long|null} [steamid_right] CMsgGCCheckFriendship steamid_right + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckFriendship. + * @exports ICMsgGCCheckFriendship + * @interface ICMsgGCCheckFriendship + * @augments CMsgGCCheckFriendship.$Properties + * @deprecated Use CMsgGCCheckFriendship.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckFriendship. + * @typedef {CMsgGCCheckFriendship.$Properties} CMsgGCCheckFriendship.$Shape */ /** * Constructs a new CMsgGCCheckFriendship. * @exports CMsgGCCheckFriendship * @classdesc Represents a CMsgGCCheckFriendship. - * @implements ICMsgGCCheckFriendship * @constructor - * @param {ICMsgGCCheckFriendship=} [properties] Properties to set + * @param {CMsgGCCheckFriendship.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckFriendship(properties) { + var CMsgGCCheckFriendship = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckFriendship steamid_left. @@ -36096,7 +46953,7 @@ * @memberof CMsgGCCheckFriendship * @instance */ - CMsgGCCheckFriendship.prototype.steamid_left = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckFriendship.prototype.steamid_left = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCCheckFriendship steamid_right. @@ -36104,17 +46961,21 @@ * @memberof CMsgGCCheckFriendship * @instance */ - CMsgGCCheckFriendship.prototype.steamid_right = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckFriendship.prototype.steamid_right = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCCheckFriendship instance using the specified properties. * @function create * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship=} [properties] Properties to set + * @param {CMsgGCCheckFriendship.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship instance + * @type {{ + * (properties: CMsgGCCheckFriendship.$Shape): CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape; + * (properties?: CMsgGCCheckFriendship.$Properties): CMsgGCCheckFriendship; + * }} */ - CMsgGCCheckFriendship.create = function create(properties) { + CMsgGCCheckFriendship.create = function(properties) { return new CMsgGCCheckFriendship(properties); }; @@ -36123,17 +46984,24 @@ * @function encode * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship} message CMsgGCCheckFriendship message or plain object to encode + * @param {CMsgGCCheckFriendship.$Properties} message CMsgGCCheckFriendship message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship.encode = function encode(message, writer) { + CMsgGCCheckFriendship.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid_left != null && Object.hasOwnProperty.call(message, "steamid_left")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid_left); - if (message.steamid_right != null && Object.hasOwnProperty.call(message, "steamid_right")) + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.steamid_right); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -36142,12 +47010,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship} message CMsgGCCheckFriendship message or plain object to encode + * @param {CMsgGCCheckFriendship.$Properties} message CMsgGCCheckFriendship message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckFriendship.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -36157,28 +47025,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship + * @returns {CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape} CMsgGCCheckFriendship * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship.decode = function decode(reader, length) { + CMsgGCCheckFriendship.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckFriendship(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckFriendship(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid_left = reader.fixed64(); - break; - case 2: - message.steamid_right = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid_left = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.steamid_right = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -36188,11 +47076,11 @@ * @memberof CMsgGCCheckFriendship * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship + * @returns {CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape} CMsgGCCheckFriendship * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckFriendship.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -36206,13 +47094,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckFriendship.verify = function verify(message) { + CMsgGCCheckFriendship.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid_left != null && message.hasOwnProperty("steamid_left")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) if (!$util.isInteger(message.steamid_left) && !(message.steamid_left && $util.isInteger(message.steamid_left.low) && $util.isInteger(message.steamid_left.high))) return "steamid_left: integer|Long expected"; - if (message.steamid_right != null && message.hasOwnProperty("steamid_right")) + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) if (!$util.isInteger(message.steamid_right) && !(message.steamid_right && $util.isInteger(message.steamid_right.low) && $util.isInteger(message.steamid_right.high))) return "steamid_right: integer|Long expected"; return null; @@ -36226,28 +47118,34 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship */ - CMsgGCCheckFriendship.fromObject = function fromObject(object) { + CMsgGCCheckFriendship.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckFriendship) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckFriendship: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckFriendship(); if (object.steamid_left != null) if ($util.Long) - (message.steamid_left = $util.Long.fromValue(object.steamid_left)).unsigned = false; + message.steamid_left = $util.Long.fromValue(object.steamid_left, true); else if (typeof object.steamid_left === "string") - message.steamid_left = parseInt(object.steamid_left, 10); + message.steamid_left = $parseInt(object.steamid_left, 10); else if (typeof object.steamid_left === "number") message.steamid_left = object.steamid_left; else if (typeof object.steamid_left === "object") - message.steamid_left = new $util.LongBits(object.steamid_left.low >>> 0, object.steamid_left.high >>> 0).toNumber(); + message.steamid_left = new $util.LongBits(object.steamid_left.low >>> 0, object.steamid_left.high >>> 0).toNumber(true); if (object.steamid_right != null) if ($util.Long) - (message.steamid_right = $util.Long.fromValue(object.steamid_right)).unsigned = false; + message.steamid_right = $util.Long.fromValue(object.steamid_right, true); else if (typeof object.steamid_right === "string") - message.steamid_right = parseInt(object.steamid_right, 10); + message.steamid_right = $parseInt(object.steamid_right, 10); else if (typeof object.steamid_right === "number") message.steamid_right = object.steamid_right; else if (typeof object.steamid_right === "object") - message.steamid_right = new $util.LongBits(object.steamid_right.low >>> 0, object.steamid_right.high >>> 0).toNumber(); + message.steamid_right = new $util.LongBits(object.steamid_right.low >>> 0, object.steamid_right.high >>> 0).toNumber(true); return message; }; @@ -36260,32 +47158,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckFriendship.toObject = function toObject(message, options) { + CMsgGCCheckFriendship.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid_left = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid_left = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid_left = options.longs === String ? "0" : 0; + object.steamid_left = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid_right = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid_right = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid_right = options.longs === String ? "0" : 0; + object.steamid_right = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steamid_left != null && message.hasOwnProperty("steamid_left")) - if (typeof message.steamid_left === "number") - object.steamid_left = options.longs === String ? String(message.steamid_left) : message.steamid_left; + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid_left = typeof message.steamid_left === "number" ? $BigInt(message.steamid_left) : $util.Long.fromBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0, true).toBigInt(); + else if (typeof message.steamid_left === "number") + object.steamid_left = options.longs === $String ? $String(message.steamid_left) : message.steamid_left; else - object.steamid_left = options.longs === String ? $util.Long.prototype.toString.call(message.steamid_left) : options.longs === Number ? new $util.LongBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0).toNumber() : message.steamid_left; - if (message.steamid_right != null && message.hasOwnProperty("steamid_right")) - if (typeof message.steamid_right === "number") - object.steamid_right = options.longs === String ? String(message.steamid_right) : message.steamid_right; + object.steamid_left = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid_left) : options.longs === $Number ? new $util.LongBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0).toNumber(true) : message.steamid_left; + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid_right = typeof message.steamid_right === "number" ? $BigInt(message.steamid_right) : $util.Long.fromBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0, true).toBigInt(); + else if (typeof message.steamid_right === "number") + object.steamid_right = options.longs === $String ? $String(message.steamid_right) : message.steamid_right; else - object.steamid_right = options.longs === String ? $util.Long.prototype.toString.call(message.steamid_right) : options.longs === Number ? new $util.LongBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0).toNumber() : message.steamid_right; + object.steamid_right = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid_right) : options.longs === $Number ? new $util.LongBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0).toNumber(true) : message.steamid_right; return object; }; @@ -36296,8 +47202,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckFriendship.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckFriendship.prototype.toJSON = function() { + return CMsgGCCheckFriendship.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckFriendship + * @function getTypeUrl + * @memberof CMsgGCCheckFriendship + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckFriendship.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckFriendship"; }; return CMsgGCCheckFriendship; @@ -36307,26 +47227,39 @@ /** * Properties of a CMsgGCCheckFriendship_Response. - * @exports ICMsgGCCheckFriendship_Response - * @interface ICMsgGCCheckFriendship_Response + * @typedef {Object} CMsgGCCheckFriendship_Response.$Properties * @property {boolean|null} [success] CMsgGCCheckFriendship_Response success * @property {boolean|null} [found_friendship] CMsgGCCheckFriendship_Response found_friendship + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckFriendship_Response. + * @exports ICMsgGCCheckFriendship_Response + * @interface ICMsgGCCheckFriendship_Response + * @augments CMsgGCCheckFriendship_Response.$Properties + * @deprecated Use CMsgGCCheckFriendship_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckFriendship_Response. + * @typedef {CMsgGCCheckFriendship_Response.$Properties} CMsgGCCheckFriendship_Response.$Shape */ /** * Constructs a new CMsgGCCheckFriendship_Response. * @exports CMsgGCCheckFriendship_Response * @classdesc Represents a CMsgGCCheckFriendship_Response. - * @implements ICMsgGCCheckFriendship_Response * @constructor - * @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set + * @param {CMsgGCCheckFriendship_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckFriendship_Response(properties) { + var CMsgGCCheckFriendship_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckFriendship_Response success. @@ -36349,10 +47282,14 @@ * @function create * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set + * @param {CMsgGCCheckFriendship_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response instance + * @type {{ + * (properties: CMsgGCCheckFriendship_Response.$Shape): CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape; + * (properties?: CMsgGCCheckFriendship_Response.$Properties): CMsgGCCheckFriendship_Response; + * }} */ - CMsgGCCheckFriendship_Response.create = function create(properties) { + CMsgGCCheckFriendship_Response.create = function(properties) { return new CMsgGCCheckFriendship_Response(properties); }; @@ -36361,17 +47298,24 @@ * @function encode * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response} message CMsgGCCheckFriendship_Response message or plain object to encode + * @param {CMsgGCCheckFriendship_Response.$Properties} message CMsgGCCheckFriendship_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship_Response.encode = function encode(message, writer) { + CMsgGCCheckFriendship_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.success != null && Object.hasOwnProperty.call(message, "success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); - if (message.found_friendship != null && Object.hasOwnProperty.call(message, "found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.found_friendship); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -36380,12 +47324,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response} message CMsgGCCheckFriendship_Response message or plain object to encode + * @param {CMsgGCCheckFriendship_Response.$Properties} message CMsgGCCheckFriendship_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckFriendship_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -36395,28 +47339,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response + * @returns {CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape} CMsgGCCheckFriendship_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship_Response.decode = function decode(reader, length) { + CMsgGCCheckFriendship_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckFriendship_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckFriendship_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - case 2: - message.found_friendship = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.success = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.found_friendship = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -36426,11 +47390,11 @@ * @memberof CMsgGCCheckFriendship_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response + * @returns {CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape} CMsgGCCheckFriendship_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckFriendship_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -36444,13 +47408,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckFriendship_Response.verify = function verify(message) { + CMsgGCCheckFriendship_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.success != null && message.hasOwnProperty("success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.found_friendship != null && message.hasOwnProperty("found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) if (typeof message.found_friendship !== "boolean") return "found_friendship: boolean expected"; return null; @@ -36464,14 +47432,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response */ - CMsgGCCheckFriendship_Response.fromObject = function fromObject(object) { + CMsgGCCheckFriendship_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckFriendship_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckFriendship_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckFriendship_Response(); if (object.success != null) - message.success = Boolean(object.success); + message.success = $Boolean(object.success); if (object.found_friendship != null) - message.found_friendship = Boolean(object.found_friendship); + message.found_friendship = $Boolean(object.found_friendship); return message; }; @@ -36484,17 +47458,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckFriendship_Response.toObject = function toObject(message, options) { + CMsgGCCheckFriendship_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.success = false; object.found_friendship = false; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.found_friendship != null && message.hasOwnProperty("found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) object.found_friendship = message.found_friendship; return object; }; @@ -36506,8 +47484,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckFriendship_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckFriendship_Response.prototype.toJSON = function() { + return CMsgGCCheckFriendship_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckFriendship_Response + * @function getTypeUrl + * @memberof CMsgGCCheckFriendship_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckFriendship_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckFriendship_Response"; }; return CMsgGCCheckFriendship_Response; @@ -36515,29 +47507,42 @@ $root.CMsgGCMsgMasterSetDirectory = (function() { + /** + * Properties of a CMsgGCMsgMasterSetDirectory. + * @typedef {Object} CMsgGCMsgMasterSetDirectory.$Properties + * @property {number|null} [master_dir_index] CMsgGCMsgMasterSetDirectory master_dir_index + * @property {Array.|null} [dir] CMsgGCMsgMasterSetDirectory dir + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetDirectory. * @exports ICMsgGCMsgMasterSetDirectory * @interface ICMsgGCMsgMasterSetDirectory - * @property {number|null} [master_dir_index] CMsgGCMsgMasterSetDirectory master_dir_index - * @property {Array.|null} [dir] CMsgGCMsgMasterSetDirectory dir + * @augments CMsgGCMsgMasterSetDirectory.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetDirectory. + * @typedef {CMsgGCMsgMasterSetDirectory.$Properties} CMsgGCMsgMasterSetDirectory.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetDirectory. * @exports CMsgGCMsgMasterSetDirectory * @classdesc Represents a CMsgGCMsgMasterSetDirectory. - * @implements ICMsgGCMsgMasterSetDirectory * @constructor - * @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetDirectory(properties) { + var CMsgGCMsgMasterSetDirectory = function (properties) { this.dir = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetDirectory master_dir_index. @@ -36549,7 +47554,7 @@ /** * CMsgGCMsgMasterSetDirectory dir. - * @member {Array.} dir + * @member {Array.} dir * @memberof CMsgGCMsgMasterSetDirectory * @instance */ @@ -36560,10 +47565,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory.$Shape): CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory.$Properties): CMsgGCMsgMasterSetDirectory; + * }} */ - CMsgGCMsgMasterSetDirectory.create = function create(properties) { + CMsgGCMsgMasterSetDirectory.create = function(properties) { return new CMsgGCMsgMasterSetDirectory(properties); }; @@ -36572,18 +47581,25 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory} message CMsgGCMsgMasterSetDirectory message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.$Properties} message CMsgGCMsgMasterSetDirectory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory.encode = function encode(message, writer) { + CMsgGCMsgMasterSetDirectory.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.master_dir_index != null && Object.hasOwnProperty.call(message, "master_dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.master_dir_index); if (message.dir != null && message.dir.length) for (var i = 0; i < message.dir.length; ++i) - $root.CMsgGCMsgMasterSetDirectory.SubGC.encode(message.dir[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgGCMsgMasterSetDirectory.SubGC.encode(message.dir[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -36592,12 +47608,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory} message CMsgGCMsgMasterSetDirectory message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.$Properties} message CMsgGCMsgMasterSetDirectory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetDirectory.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -36607,30 +47623,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory + * @returns {CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape} CMsgGCMsgMasterSetDirectory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory.decode = function decode(reader, length) { + CMsgGCMsgMasterSetDirectory.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.master_dir_index = reader.uint32(); - break; - case 2: - if (!(message.dir && message.dir.length)) - message.dir = []; - message.dir.push($root.CMsgGCMsgMasterSetDirectory.SubGC.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.master_dir_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.dir && message.dir.length)) + message.dir = []; + message.dir.push($root.CMsgGCMsgMasterSetDirectory.SubGC.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -36640,11 +47676,11 @@ * @memberof CMsgGCMsgMasterSetDirectory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory + * @returns {CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape} CMsgGCMsgMasterSetDirectory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetDirectory.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -36658,17 +47694,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetDirectory.verify = function verify(message) { + CMsgGCMsgMasterSetDirectory.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.master_dir_index != null && message.hasOwnProperty("master_dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) if (!$util.isInteger(message.master_dir_index)) return "master_dir_index: integer expected"; - if (message.dir != null && message.hasOwnProperty("dir")) { - if (!Array.isArray(message.dir)) + if (message.dir != null && $Object.hasOwnProperty.call(message, "dir")) { + if (!$Array.isArray(message.dir)) return "dir: array expected"; for (var i = 0; i < message.dir.length; ++i) { - var error = $root.CMsgGCMsgMasterSetDirectory.SubGC.verify(message.dir[i]); + var error = $root.CMsgGCMsgMasterSetDirectory.SubGC.verify(message.dir[i], _depth + 1); if (error) return "dir." + error; } @@ -36684,20 +47724,26 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory */ - CMsgGCMsgMasterSetDirectory.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetDirectory.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory(); if (object.master_dir_index != null) message.master_dir_index = object.master_dir_index >>> 0; if (object.dir) { - if (!Array.isArray(object.dir)) - throw TypeError(".CMsgGCMsgMasterSetDirectory.dir: array expected"); - message.dir = []; + if (!$Array.isArray(object.dir)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.dir: array expected"); + message.dir = $Array(object.dir.length); for (var i = 0; i < object.dir.length; ++i) { - if (typeof object.dir[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetDirectory.dir: object expected"); - message.dir[i] = $root.CMsgGCMsgMasterSetDirectory.SubGC.fromObject(object.dir[i]); + if (!$util.isObject(object.dir[i])) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.dir: object expected"); + message.dir[i] = $root.CMsgGCMsgMasterSetDirectory.SubGC.fromObject(object.dir[i], _depth + 1); } } return message; @@ -36712,20 +47758,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetDirectory.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetDirectory.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.dir = []; if (options.defaults) object.master_dir_index = 0; - if (message.master_dir_index != null && message.hasOwnProperty("master_dir_index")) + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) object.master_dir_index = message.master_dir_index; if (message.dir && message.dir.length) { - object.dir = []; + object.dir = $Array(message.dir.length); for (var j = 0; j < message.dir.length; ++j) - object.dir[j] = $root.CMsgGCMsgMasterSetDirectory.SubGC.toObject(message.dir[j], options); + object.dir[j] = $root.CMsgGCMsgMasterSetDirectory.SubGC.toObject(message.dir[j], options, _depth + 1); } return object; }; @@ -36737,37 +47787,64 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetDirectory.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetDirectory.prototype.toJSON = function() { + return CMsgGCMsgMasterSetDirectory.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetDirectory + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetDirectory.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory"; }; CMsgGCMsgMasterSetDirectory.SubGC = (function() { /** * Properties of a SubGC. - * @memberof CMsgGCMsgMasterSetDirectory - * @interface ISubGC + * @typedef {Object} CMsgGCMsgMasterSetDirectory.SubGC.$Properties * @property {number|null} [dir_index] SubGC dir_index * @property {string|null} [name] SubGC name * @property {string|null} [box] SubGC box * @property {string|null} [command_line] SubGC command_line * @property {string|null} [gc_binary] SubGC gc_binary + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SubGC. + * @memberof CMsgGCMsgMasterSetDirectory + * @interface ISubGC + * @augments CMsgGCMsgMasterSetDirectory.SubGC.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory.SubGC.$Properties instead. + */ + + /** + * Shape of a SubGC. + * @typedef {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} CMsgGCMsgMasterSetDirectory.SubGC.$Shape */ /** * Constructs a new SubGC. * @memberof CMsgGCMsgMasterSetDirectory * @classdesc Represents a SubGC. - * @implements ISubGC * @constructor - * @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SubGC(properties) { + var SubGC = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SubGC dir_index. @@ -36814,10 +47891,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory.SubGC.$Shape): CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory.SubGC.$Properties): CMsgGCMsgMasterSetDirectory.SubGC; + * }} */ - SubGC.create = function create(properties) { + SubGC.create = function(properties) { return new SubGC(properties); }; @@ -36826,23 +47907,30 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC} message SubGC message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} message SubGC message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubGC.encode = function encode(message, writer) { + SubGC.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.box != null && Object.hasOwnProperty.call(message, "box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.box); - if (message.command_line != null && Object.hasOwnProperty.call(message, "command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.command_line); - if (message.gc_binary != null && Object.hasOwnProperty.call(message, "gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.gc_binary); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -36851,12 +47939,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC} message SubGC message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} message SubGC message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubGC.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SubGC.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -36866,37 +47954,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC + * @returns {CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape} SubGC * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubGC.decode = function decode(reader, length) { + SubGC.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory.SubGC(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory.SubGC(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.box = reader.string(); - break; - case 4: - message.command_line = reader.string(); - break; - case 5: - message.gc_binary = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.box = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.command_line = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.gc_binary = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -36906,11 +48023,11 @@ * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC + * @returns {CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape} SubGC * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubGC.decodeDelimited = function decodeDelimited(reader) { + SubGC.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -36924,22 +48041,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SubGC.verify = function verify(message) { + SubGC.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.box != null && message.hasOwnProperty("box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) if (!$util.isString(message.box)) return "box: string expected"; - if (message.command_line != null && message.hasOwnProperty("command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) if (!$util.isString(message.command_line)) return "command_line: string expected"; - if (message.gc_binary != null && message.hasOwnProperty("gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) if (!$util.isString(message.gc_binary)) return "gc_binary: string expected"; return null; @@ -36953,20 +48074,26 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC */ - SubGC.fromObject = function fromObject(object) { + SubGC.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory.SubGC) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.SubGC: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory.SubGC(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.box != null) - message.box = String(object.box); + message.box = $String(object.box); if (object.command_line != null) - message.command_line = String(object.command_line); + message.command_line = $String(object.command_line); if (object.gc_binary != null) - message.gc_binary = String(object.gc_binary); + message.gc_binary = $String(object.gc_binary); return message; }; @@ -36979,9 +48106,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SubGC.toObject = function toObject(message, options) { + SubGC.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.dir_index = 0; @@ -36990,15 +48121,15 @@ object.command_line = ""; object.gc_binary = ""; } - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.box != null && message.hasOwnProperty("box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) object.box = message.box; - if (message.command_line != null && message.hasOwnProperty("command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) object.command_line = message.command_line; - if (message.gc_binary != null && message.hasOwnProperty("gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) object.gc_binary = message.gc_binary; return object; }; @@ -37010,8 +48141,22 @@ * @instance * @returns {Object.} JSON object */ - SubGC.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SubGC.prototype.toJSON = function() { + return SubGC.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SubGC + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory.SubGC + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SubGC.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory.SubGC"; }; return SubGC; @@ -37022,27 +48167,40 @@ $root.CMsgGCMsgMasterSetDirectory_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetDirectory_Response. + * @typedef {Object} CMsgGCMsgMasterSetDirectory_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetDirectory_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetDirectory_Response. * @exports ICMsgGCMsgMasterSetDirectory_Response * @interface ICMsgGCMsgMasterSetDirectory_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetDirectory_Response eresult + * @augments CMsgGCMsgMasterSetDirectory_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetDirectory_Response. + * @typedef {CMsgGCMsgMasterSetDirectory_Response.$Properties} CMsgGCMsgMasterSetDirectory_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetDirectory_Response. * @exports CMsgGCMsgMasterSetDirectory_Response * @classdesc Represents a CMsgGCMsgMasterSetDirectory_Response. - * @implements ICMsgGCMsgMasterSetDirectory_Response * @constructor - * @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetDirectory_Response(properties) { + var CMsgGCMsgMasterSetDirectory_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetDirectory_Response eresult. @@ -37057,10 +48215,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory_Response.$Shape): CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory_Response.$Properties): CMsgGCMsgMasterSetDirectory_Response; + * }} */ - CMsgGCMsgMasterSetDirectory_Response.create = function create(properties) { + CMsgGCMsgMasterSetDirectory_Response.create = function(properties) { return new CMsgGCMsgMasterSetDirectory_Response(properties); }; @@ -37069,15 +48231,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetDirectory_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -37086,12 +48255,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetDirectory_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -37101,25 +48270,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response + * @returns {CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape} CMsgGCMsgMasterSetDirectory_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetDirectory_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -37129,11 +48315,11 @@ * @memberof CMsgGCMsgMasterSetDirectory_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response + * @returns {CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape} CMsgGCMsgMasterSetDirectory_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetDirectory_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -37147,10 +48333,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetDirectory_Response.verify = function verify(message) { + CMsgGCMsgMasterSetDirectory_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -37164,9 +48354,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response */ - CMsgGCMsgMasterSetDirectory_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetDirectory_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -37182,13 +48378,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetDirectory_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetDirectory_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -37200,8 +48400,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetDirectory_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetDirectory_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetDirectory_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetDirectory_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetDirectory_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory_Response"; }; return CMsgGCMsgMasterSetDirectory_Response; @@ -37209,27 +48423,40 @@ $root.CMsgGCMsgWebAPIJobRequestForwardResponse = (function() { + /** + * Properties of a CMsgGCMsgWebAPIJobRequestForwardResponse. + * @typedef {Object} CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties + * @property {number|null} [dir_index] CMsgGCMsgWebAPIJobRequestForwardResponse dir_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgWebAPIJobRequestForwardResponse. * @exports ICMsgGCMsgWebAPIJobRequestForwardResponse * @interface ICMsgGCMsgWebAPIJobRequestForwardResponse - * @property {number|null} [dir_index] CMsgGCMsgWebAPIJobRequestForwardResponse dir_index + * @augments CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties + * @deprecated Use CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgWebAPIJobRequestForwardResponse. + * @typedef {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape */ /** * Constructs a new CMsgGCMsgWebAPIJobRequestForwardResponse. * @exports CMsgGCMsgWebAPIJobRequestForwardResponse * @classdesc Represents a CMsgGCMsgWebAPIJobRequestForwardResponse. - * @implements ICMsgGCMsgWebAPIJobRequestForwardResponse * @constructor - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgWebAPIJobRequestForwardResponse(properties) { + var CMsgGCMsgWebAPIJobRequestForwardResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgWebAPIJobRequestForwardResponse dir_index. @@ -37244,10 +48471,14 @@ * @function create * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse instance + * @type {{ + * (properties: CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape): CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape; + * (properties?: CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties): CMsgGCMsgWebAPIJobRequestForwardResponse; + * }} */ - CMsgGCMsgWebAPIJobRequestForwardResponse.create = function create(properties) { + CMsgGCMsgWebAPIJobRequestForwardResponse.create = function(properties) { return new CMsgGCMsgWebAPIJobRequestForwardResponse(properties); }; @@ -37256,15 +48487,22 @@ * @function encode * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgWebAPIJobRequestForwardResponse.encode = function encode(message, writer) { + CMsgGCMsgWebAPIJobRequestForwardResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -37273,12 +48511,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgWebAPIJobRequestForwardResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgWebAPIJobRequestForwardResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -37288,25 +48526,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse + * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape} CMsgGCMsgWebAPIJobRequestForwardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgWebAPIJobRequestForwardResponse.decode = function decode(reader, length) { + CMsgGCMsgWebAPIJobRequestForwardResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -37316,11 +48571,11 @@ * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse + * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape} CMsgGCMsgWebAPIJobRequestForwardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgWebAPIJobRequestForwardResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgWebAPIJobRequestForwardResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -37334,10 +48589,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgWebAPIJobRequestForwardResponse.verify = function verify(message) { + CMsgGCMsgWebAPIJobRequestForwardResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; return null; @@ -37351,9 +48610,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse */ - CMsgGCMsgWebAPIJobRequestForwardResponse.fromObject = function fromObject(object) { + CMsgGCMsgWebAPIJobRequestForwardResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgWebAPIJobRequestForwardResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgWebAPIJobRequestForwardResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; @@ -37369,13 +48634,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgWebAPIJobRequestForwardResponse.toObject = function toObject(message, options) { + CMsgGCMsgWebAPIJobRequestForwardResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.dir_index = 0; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; return object; }; @@ -37387,8 +48656,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.toJSON = function() { + return CMsgGCMsgWebAPIJobRequestForwardResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgWebAPIJobRequestForwardResponse + * @function getTypeUrl + * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgWebAPIJobRequestForwardResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgWebAPIJobRequestForwardResponse"; }; return CMsgGCMsgWebAPIJobRequestForwardResponse; @@ -37396,27 +48679,40 @@ $root.CGCSystemMsg_GetPurchaseTrust_Request = (function() { + /** + * Properties of a CGCSystemMsg_GetPurchaseTrust_Request. + * @typedef {Object} CGCSystemMsg_GetPurchaseTrust_Request.$Properties + * @property {number|Long|null} [steamid] CGCSystemMsg_GetPurchaseTrust_Request steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCSystemMsg_GetPurchaseTrust_Request. * @exports ICGCSystemMsg_GetPurchaseTrust_Request * @interface ICGCSystemMsg_GetPurchaseTrust_Request - * @property {number|Long|null} [steamid] CGCSystemMsg_GetPurchaseTrust_Request steamid + * @augments CGCSystemMsg_GetPurchaseTrust_Request.$Properties + * @deprecated Use CGCSystemMsg_GetPurchaseTrust_Request.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetPurchaseTrust_Request. + * @typedef {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} CGCSystemMsg_GetPurchaseTrust_Request.$Shape */ /** * Constructs a new CGCSystemMsg_GetPurchaseTrust_Request. * @exports CGCSystemMsg_GetPurchaseTrust_Request * @classdesc Represents a CGCSystemMsg_GetPurchaseTrust_Request. - * @implements ICGCSystemMsg_GetPurchaseTrust_Request * @constructor - * @param {ICGCSystemMsg_GetPurchaseTrust_Request=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetPurchaseTrust_Request(properties) { + var CGCSystemMsg_GetPurchaseTrust_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetPurchaseTrust_Request steamid. @@ -37424,17 +48720,21 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @instance */ - CGCSystemMsg_GetPurchaseTrust_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCSystemMsg_GetPurchaseTrust_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CGCSystemMsg_GetPurchaseTrust_Request instance using the specified properties. * @function create * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request instance + * @type {{ + * (properties: CGCSystemMsg_GetPurchaseTrust_Request.$Shape): CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape; + * (properties?: CGCSystemMsg_GetPurchaseTrust_Request.$Properties): CGCSystemMsg_GetPurchaseTrust_Request; + * }} */ - CGCSystemMsg_GetPurchaseTrust_Request.create = function create(properties) { + CGCSystemMsg_GetPurchaseTrust_Request.create = function(properties) { return new CGCSystemMsg_GetPurchaseTrust_Request(properties); }; @@ -37443,15 +48743,22 @@ * @function encode * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Request.encode = function encode(message, writer) { + CGCSystemMsg_GetPurchaseTrust_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -37460,12 +48767,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetPurchaseTrust_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -37475,25 +48782,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request + * @returns {CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape} CGCSystemMsg_GetPurchaseTrust_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Request.decode = function decode(reader, length) { + CGCSystemMsg_GetPurchaseTrust_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetPurchaseTrust_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetPurchaseTrust_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -37503,11 +48827,11 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request + * @returns {CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape} CGCSystemMsg_GetPurchaseTrust_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Request.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetPurchaseTrust_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -37521,10 +48845,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetPurchaseTrust_Request.verify = function verify(message) { + CGCSystemMsg_GetPurchaseTrust_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -37538,19 +48866,25 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request */ - CGCSystemMsg_GetPurchaseTrust_Request.fromObject = function fromObject(object) { + CGCSystemMsg_GetPurchaseTrust_Request.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetPurchaseTrust_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetPurchaseTrust_Request(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -37563,21 +48897,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetPurchaseTrust_Request.toObject = function toObject(message, options) { + CGCSystemMsg_GetPurchaseTrust_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -37588,8 +48928,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetPurchaseTrust_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetPurchaseTrust_Request.prototype.toJSON = function() { + return CGCSystemMsg_GetPurchaseTrust_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetPurchaseTrust_Request + * @function getTypeUrl + * @memberof CGCSystemMsg_GetPurchaseTrust_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetPurchaseTrust_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetPurchaseTrust_Request"; }; return CGCSystemMsg_GetPurchaseTrust_Request; @@ -37599,28 +48953,41 @@ /** * Properties of a CGCSystemMsg_GetPurchaseTrust_Response. - * @exports ICGCSystemMsg_GetPurchaseTrust_Response - * @interface ICGCSystemMsg_GetPurchaseTrust_Response + * @typedef {Object} CGCSystemMsg_GetPurchaseTrust_Response.$Properties * @property {boolean|null} [has_prior_purchase_history] CGCSystemMsg_GetPurchaseTrust_Response has_prior_purchase_history * @property {boolean|null} [has_no_recent_password_resets] CGCSystemMsg_GetPurchaseTrust_Response has_no_recent_password_resets * @property {boolean|null} [is_wallet_cash_trusted] CGCSystemMsg_GetPurchaseTrust_Response is_wallet_cash_trusted * @property {number|null} [time_all_trusted] CGCSystemMsg_GetPurchaseTrust_Response time_all_trusted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetPurchaseTrust_Response. + * @exports ICGCSystemMsg_GetPurchaseTrust_Response + * @interface ICGCSystemMsg_GetPurchaseTrust_Response + * @augments CGCSystemMsg_GetPurchaseTrust_Response.$Properties + * @deprecated Use CGCSystemMsg_GetPurchaseTrust_Response.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetPurchaseTrust_Response. + * @typedef {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} CGCSystemMsg_GetPurchaseTrust_Response.$Shape */ /** * Constructs a new CGCSystemMsg_GetPurchaseTrust_Response. * @exports CGCSystemMsg_GetPurchaseTrust_Response * @classdesc Represents a CGCSystemMsg_GetPurchaseTrust_Response. - * @implements ICGCSystemMsg_GetPurchaseTrust_Response * @constructor - * @param {ICGCSystemMsg_GetPurchaseTrust_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetPurchaseTrust_Response(properties) { + var CGCSystemMsg_GetPurchaseTrust_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetPurchaseTrust_Response has_prior_purchase_history. @@ -37659,10 +49026,14 @@ * @function create * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response instance + * @type {{ + * (properties: CGCSystemMsg_GetPurchaseTrust_Response.$Shape): CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape; + * (properties?: CGCSystemMsg_GetPurchaseTrust_Response.$Properties): CGCSystemMsg_GetPurchaseTrust_Response; + * }} */ - CGCSystemMsg_GetPurchaseTrust_Response.create = function create(properties) { + CGCSystemMsg_GetPurchaseTrust_Response.create = function(properties) { return new CGCSystemMsg_GetPurchaseTrust_Response(properties); }; @@ -37671,21 +49042,28 @@ * @function encode * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Response.encode = function encode(message, writer) { + CGCSystemMsg_GetPurchaseTrust_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.has_prior_purchase_history != null && Object.hasOwnProperty.call(message, "has_prior_purchase_history")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.has_prior_purchase_history); - if (message.has_no_recent_password_resets != null && Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.has_no_recent_password_resets); - if (message.is_wallet_cash_trusted != null && Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_wallet_cash_trusted); - if (message.time_all_trusted != null && Object.hasOwnProperty.call(message, "time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time_all_trusted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -37694,12 +49072,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetPurchaseTrust_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -37709,34 +49087,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response + * @returns {CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape} CGCSystemMsg_GetPurchaseTrust_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Response.decode = function decode(reader, length) { + CGCSystemMsg_GetPurchaseTrust_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetPurchaseTrust_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetPurchaseTrust_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.has_prior_purchase_history = reader.bool(); - break; - case 2: - message.has_no_recent_password_resets = reader.bool(); - break; - case 3: - message.is_wallet_cash_trusted = reader.bool(); - break; - case 4: - message.time_all_trusted = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.has_prior_purchase_history = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.has_no_recent_password_resets = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_wallet_cash_trusted = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.time_all_trusted = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -37746,11 +49150,11 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response + * @returns {CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape} CGCSystemMsg_GetPurchaseTrust_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Response.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetPurchaseTrust_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -37764,19 +49168,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetPurchaseTrust_Response.verify = function verify(message) { + CGCSystemMsg_GetPurchaseTrust_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.has_prior_purchase_history != null && message.hasOwnProperty("has_prior_purchase_history")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) if (typeof message.has_prior_purchase_history !== "boolean") return "has_prior_purchase_history: boolean expected"; - if (message.has_no_recent_password_resets != null && message.hasOwnProperty("has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) if (typeof message.has_no_recent_password_resets !== "boolean") return "has_no_recent_password_resets: boolean expected"; - if (message.is_wallet_cash_trusted != null && message.hasOwnProperty("is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) if (typeof message.is_wallet_cash_trusted !== "boolean") return "is_wallet_cash_trusted: boolean expected"; - if (message.time_all_trusted != null && message.hasOwnProperty("time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) if (!$util.isInteger(message.time_all_trusted)) return "time_all_trusted: integer expected"; return null; @@ -37790,16 +49198,22 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response */ - CGCSystemMsg_GetPurchaseTrust_Response.fromObject = function fromObject(object) { + CGCSystemMsg_GetPurchaseTrust_Response.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetPurchaseTrust_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetPurchaseTrust_Response(); if (object.has_prior_purchase_history != null) - message.has_prior_purchase_history = Boolean(object.has_prior_purchase_history); + message.has_prior_purchase_history = $Boolean(object.has_prior_purchase_history); if (object.has_no_recent_password_resets != null) - message.has_no_recent_password_resets = Boolean(object.has_no_recent_password_resets); + message.has_no_recent_password_resets = $Boolean(object.has_no_recent_password_resets); if (object.is_wallet_cash_trusted != null) - message.is_wallet_cash_trusted = Boolean(object.is_wallet_cash_trusted); + message.is_wallet_cash_trusted = $Boolean(object.is_wallet_cash_trusted); if (object.time_all_trusted != null) message.time_all_trusted = object.time_all_trusted >>> 0; return message; @@ -37814,9 +49228,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetPurchaseTrust_Response.toObject = function toObject(message, options) { + CGCSystemMsg_GetPurchaseTrust_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.has_prior_purchase_history = false; @@ -37824,13 +49242,13 @@ object.is_wallet_cash_trusted = false; object.time_all_trusted = 0; } - if (message.has_prior_purchase_history != null && message.hasOwnProperty("has_prior_purchase_history")) + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) object.has_prior_purchase_history = message.has_prior_purchase_history; - if (message.has_no_recent_password_resets != null && message.hasOwnProperty("has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) object.has_no_recent_password_resets = message.has_no_recent_password_resets; - if (message.is_wallet_cash_trusted != null && message.hasOwnProperty("is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) object.is_wallet_cash_trusted = message.is_wallet_cash_trusted; - if (message.time_all_trusted != null && message.hasOwnProperty("time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) object.time_all_trusted = message.time_all_trusted; return object; }; @@ -37842,8 +49260,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetPurchaseTrust_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetPurchaseTrust_Response.prototype.toJSON = function() { + return CGCSystemMsg_GetPurchaseTrust_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetPurchaseTrust_Response + * @function getTypeUrl + * @memberof CGCSystemMsg_GetPurchaseTrust_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetPurchaseTrust_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetPurchaseTrust_Response"; }; return CGCSystemMsg_GetPurchaseTrust_Response; @@ -37853,29 +49285,42 @@ /** * Properties of a CMsgGCHAccountVacStatusChange. - * @exports ICMsgGCHAccountVacStatusChange - * @interface ICMsgGCHAccountVacStatusChange + * @typedef {Object} CMsgGCHAccountVacStatusChange.$Properties * @property {number|Long|null} [steam_id] CMsgGCHAccountVacStatusChange steam_id * @property {number|null} [app_id] CMsgGCHAccountVacStatusChange app_id * @property {number|null} [rtime_vacban_starts] CMsgGCHAccountVacStatusChange rtime_vacban_starts * @property {boolean|null} [is_banned_now] CMsgGCHAccountVacStatusChange is_banned_now * @property {boolean|null} [is_banned_future] CMsgGCHAccountVacStatusChange is_banned_future + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountVacStatusChange. + * @exports ICMsgGCHAccountVacStatusChange + * @interface ICMsgGCHAccountVacStatusChange + * @augments CMsgGCHAccountVacStatusChange.$Properties + * @deprecated Use CMsgGCHAccountVacStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountVacStatusChange. + * @typedef {CMsgGCHAccountVacStatusChange.$Properties} CMsgGCHAccountVacStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountVacStatusChange. * @exports CMsgGCHAccountVacStatusChange * @classdesc Represents a CMsgGCHAccountVacStatusChange. - * @implements ICMsgGCHAccountVacStatusChange * @constructor - * @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountVacStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountVacStatusChange(properties) { + var CMsgGCHAccountVacStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountVacStatusChange steam_id. @@ -37883,7 +49328,7 @@ * @memberof CMsgGCHAccountVacStatusChange * @instance */ - CMsgGCHAccountVacStatusChange.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountVacStatusChange.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountVacStatusChange app_id. @@ -37922,10 +49367,14 @@ * @function create * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountVacStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountVacStatusChange.$Shape): CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape; + * (properties?: CMsgGCHAccountVacStatusChange.$Properties): CMsgGCHAccountVacStatusChange; + * }} */ - CMsgGCHAccountVacStatusChange.create = function create(properties) { + CMsgGCHAccountVacStatusChange.create = function(properties) { return new CMsgGCHAccountVacStatusChange(properties); }; @@ -37934,23 +49383,30 @@ * @function encode * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange} message CMsgGCHAccountVacStatusChange message or plain object to encode + * @param {CMsgGCHAccountVacStatusChange.$Properties} message CMsgGCHAccountVacStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountVacStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountVacStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id); - if (message.rtime_vacban_starts != null && Object.hasOwnProperty.call(message, "rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rtime_vacban_starts); - if (message.is_banned_now != null && Object.hasOwnProperty.call(message, "is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_banned_now); - if (message.is_banned_future != null && Object.hasOwnProperty.call(message, "is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_banned_future); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -37959,12 +49415,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange} message CMsgGCHAccountVacStatusChange message or plain object to encode + * @param {CMsgGCHAccountVacStatusChange.$Properties} message CMsgGCHAccountVacStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountVacStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountVacStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -37974,37 +49430,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange + * @returns {CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape} CMsgGCHAccountVacStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountVacStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountVacStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountVacStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountVacStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.app_id = reader.uint32(); - break; - case 3: - message.rtime_vacban_starts = reader.uint32(); - break; - case 4: - message.is_banned_now = reader.bool(); - break; - case 5: - message.is_banned_future = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.rtime_vacban_starts = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_banned_now = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_banned_future = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -38014,11 +49499,11 @@ * @memberof CMsgGCHAccountVacStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange + * @returns {CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape} CMsgGCHAccountVacStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountVacStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountVacStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -38032,22 +49517,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountVacStatusChange.verify = function verify(message) { + CMsgGCHAccountVacStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.rtime_vacban_starts != null && message.hasOwnProperty("rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) if (!$util.isInteger(message.rtime_vacban_starts)) return "rtime_vacban_starts: integer expected"; - if (message.is_banned_now != null && message.hasOwnProperty("is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) if (typeof message.is_banned_now !== "boolean") return "is_banned_now: boolean expected"; - if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) if (typeof message.is_banned_future !== "boolean") return "is_banned_future: boolean expected"; return null; @@ -38061,27 +49550,33 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange */ - CMsgGCHAccountVacStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountVacStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountVacStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountVacStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountVacStatusChange(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.rtime_vacban_starts != null) message.rtime_vacban_starts = object.rtime_vacban_starts >>> 0; if (object.is_banned_now != null) - message.is_banned_now = Boolean(object.is_banned_now); + message.is_banned_now = $Boolean(object.is_banned_now); if (object.is_banned_future != null) - message.is_banned_future = Boolean(object.is_banned_future); + message.is_banned_future = $Boolean(object.is_banned_future); return message; }; @@ -38094,33 +49589,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountVacStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountVacStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.app_id = 0; object.rtime_vacban_starts = 0; object.is_banned_now = false; object.is_banned_future = false; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.rtime_vacban_starts != null && message.hasOwnProperty("rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) object.rtime_vacban_starts = message.rtime_vacban_starts; - if (message.is_banned_now != null && message.hasOwnProperty("is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) object.is_banned_now = message.is_banned_now; - if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) object.is_banned_future = message.is_banned_future; return object; }; @@ -38132,8 +49633,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountVacStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountVacStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountVacStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountVacStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountVacStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountVacStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountVacStatusChange"; }; return CMsgGCHAccountVacStatusChange; @@ -38143,28 +49658,41 @@ /** * Properties of a CMsgGCHAccountTradeBanStatusChange. - * @exports ICMsgGCHAccountTradeBanStatusChange - * @interface ICMsgGCHAccountTradeBanStatusChange + * @typedef {Object} CMsgGCHAccountTradeBanStatusChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountTradeBanStatusChange steamid * @property {number|null} [appid] CMsgGCHAccountTradeBanStatusChange appid * @property {boolean|null} [is_banned] CMsgGCHAccountTradeBanStatusChange is_banned * @property {number|null} [time_banned_until] CMsgGCHAccountTradeBanStatusChange time_banned_until + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountTradeBanStatusChange. + * @exports ICMsgGCHAccountTradeBanStatusChange + * @interface ICMsgGCHAccountTradeBanStatusChange + * @augments CMsgGCHAccountTradeBanStatusChange.$Properties + * @deprecated Use CMsgGCHAccountTradeBanStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountTradeBanStatusChange. + * @typedef {CMsgGCHAccountTradeBanStatusChange.$Properties} CMsgGCHAccountTradeBanStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountTradeBanStatusChange. * @exports CMsgGCHAccountTradeBanStatusChange * @classdesc Represents a CMsgGCHAccountTradeBanStatusChange. - * @implements ICMsgGCHAccountTradeBanStatusChange * @constructor - * @param {ICMsgGCHAccountTradeBanStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountTradeBanStatusChange(properties) { + var CMsgGCHAccountTradeBanStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountTradeBanStatusChange steamid. @@ -38172,7 +49700,7 @@ * @memberof CMsgGCHAccountTradeBanStatusChange * @instance */ - CMsgGCHAccountTradeBanStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountTradeBanStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountTradeBanStatusChange appid. @@ -38203,10 +49731,14 @@ * @function create * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountTradeBanStatusChange.$Shape): CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape; + * (properties?: CMsgGCHAccountTradeBanStatusChange.$Properties): CMsgGCHAccountTradeBanStatusChange; + * }} */ - CMsgGCHAccountTradeBanStatusChange.create = function create(properties) { + CMsgGCHAccountTradeBanStatusChange.create = function(properties) { return new CMsgGCHAccountTradeBanStatusChange(properties); }; @@ -38215,21 +49747,28 @@ * @function encode * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTradeBanStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountTradeBanStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_banned != null && Object.hasOwnProperty.call(message, "is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_banned); - if (message.time_banned_until != null && Object.hasOwnProperty.call(message, "time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time_banned_until); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -38238,12 +49777,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTradeBanStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountTradeBanStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -38253,34 +49792,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange + * @returns {CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape} CMsgGCHAccountTradeBanStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTradeBanStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountTradeBanStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountTradeBanStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountTradeBanStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_banned = reader.bool(); - break; - case 4: - message.time_banned_until = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_banned = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.time_banned_until = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -38290,11 +49855,11 @@ * @memberof CMsgGCHAccountTradeBanStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange + * @returns {CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape} CMsgGCHAccountTradeBanStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTradeBanStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountTradeBanStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -38308,19 +49873,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountTradeBanStatusChange.verify = function verify(message) { + CMsgGCHAccountTradeBanStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_banned != null && message.hasOwnProperty("is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) if (typeof message.is_banned !== "boolean") return "is_banned: boolean expected"; - if (message.time_banned_until != null && message.hasOwnProperty("time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) if (!$util.isInteger(message.time_banned_until)) return "time_banned_until: integer expected"; return null; @@ -38334,23 +49903,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange */ - CMsgGCHAccountTradeBanStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountTradeBanStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountTradeBanStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountTradeBanStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountTradeBanStatusChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_banned != null) - message.is_banned = Boolean(object.is_banned); + message.is_banned = $Boolean(object.is_banned); if (object.time_banned_until != null) message.time_banned_until = object.time_banned_until >>> 0; return message; @@ -38365,30 +49940,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountTradeBanStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountTradeBanStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_banned = false; object.time_banned_until = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_banned != null && message.hasOwnProperty("is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) object.is_banned = message.is_banned; - if (message.time_banned_until != null && message.hasOwnProperty("time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) object.time_banned_until = message.time_banned_until; return object; }; @@ -38400,8 +49981,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountTradeBanStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountTradeBanStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountTradeBanStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountTradeBanStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountTradeBanStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountTradeBanStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountTradeBanStatusChange"; }; return CMsgGCHAccountTradeBanStatusChange; @@ -38411,27 +50006,40 @@ /** * Properties of a CMsgGCHAccountLockStatusChange. - * @exports ICMsgGCHAccountLockStatusChange - * @interface ICMsgGCHAccountLockStatusChange + * @typedef {Object} CMsgGCHAccountLockStatusChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountLockStatusChange steamid * @property {number|null} [appid] CMsgGCHAccountLockStatusChange appid * @property {boolean|null} [is_locked] CMsgGCHAccountLockStatusChange is_locked + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountLockStatusChange. + * @exports ICMsgGCHAccountLockStatusChange + * @interface ICMsgGCHAccountLockStatusChange + * @augments CMsgGCHAccountLockStatusChange.$Properties + * @deprecated Use CMsgGCHAccountLockStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountLockStatusChange. + * @typedef {CMsgGCHAccountLockStatusChange.$Properties} CMsgGCHAccountLockStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountLockStatusChange. * @exports CMsgGCHAccountLockStatusChange * @classdesc Represents a CMsgGCHAccountLockStatusChange. - * @implements ICMsgGCHAccountLockStatusChange * @constructor - * @param {ICMsgGCHAccountLockStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountLockStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountLockStatusChange(properties) { + var CMsgGCHAccountLockStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountLockStatusChange steamid. @@ -38439,7 +50047,7 @@ * @memberof CMsgGCHAccountLockStatusChange * @instance */ - CMsgGCHAccountLockStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountLockStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountLockStatusChange appid. @@ -38462,10 +50070,14 @@ * @function create * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountLockStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountLockStatusChange.$Shape): CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape; + * (properties?: CMsgGCHAccountLockStatusChange.$Properties): CMsgGCHAccountLockStatusChange; + * }} */ - CMsgGCHAccountLockStatusChange.create = function create(properties) { + CMsgGCHAccountLockStatusChange.create = function(properties) { return new CMsgGCHAccountLockStatusChange(properties); }; @@ -38474,19 +50086,26 @@ * @function encode * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange} message CMsgGCHAccountLockStatusChange message or plain object to encode + * @param {CMsgGCHAccountLockStatusChange.$Properties} message CMsgGCHAccountLockStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountLockStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountLockStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_locked != null && Object.hasOwnProperty.call(message, "is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_locked); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -38495,12 +50114,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange} message CMsgGCHAccountLockStatusChange message or plain object to encode + * @param {CMsgGCHAccountLockStatusChange.$Properties} message CMsgGCHAccountLockStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountLockStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountLockStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -38510,31 +50129,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange + * @returns {CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape} CMsgGCHAccountLockStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountLockStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountLockStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountLockStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountLockStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_locked = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_locked = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -38544,11 +50186,11 @@ * @memberof CMsgGCHAccountLockStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange + * @returns {CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape} CMsgGCHAccountLockStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountLockStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountLockStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -38562,16 +50204,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountLockStatusChange.verify = function verify(message) { + CMsgGCHAccountLockStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_locked != null && message.hasOwnProperty("is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) if (typeof message.is_locked !== "boolean") return "is_locked: boolean expected"; return null; @@ -38585,23 +50231,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange */ - CMsgGCHAccountLockStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountLockStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountLockStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountLockStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountLockStatusChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_locked != null) - message.is_locked = Boolean(object.is_locked); + message.is_locked = $Boolean(object.is_locked); return message; }; @@ -38614,27 +50266,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountLockStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountLockStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_locked = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_locked != null && message.hasOwnProperty("is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) object.is_locked = message.is_locked; return object; }; @@ -38646,8 +50304,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountLockStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountLockStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountLockStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountLockStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountLockStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountLockStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountLockStatusChange"; }; return CMsgGCHAccountLockStatusChange; @@ -38657,27 +50329,40 @@ /** * Properties of a CMsgGCHVacVerificationChange. - * @exports ICMsgGCHVacVerificationChange - * @interface ICMsgGCHVacVerificationChange + * @typedef {Object} CMsgGCHVacVerificationChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHVacVerificationChange steamid * @property {number|null} [appid] CMsgGCHVacVerificationChange appid * @property {boolean|null} [is_verified] CMsgGCHVacVerificationChange is_verified + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHVacVerificationChange. + * @exports ICMsgGCHVacVerificationChange + * @interface ICMsgGCHVacVerificationChange + * @augments CMsgGCHVacVerificationChange.$Properties + * @deprecated Use CMsgGCHVacVerificationChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHVacVerificationChange. + * @typedef {CMsgGCHVacVerificationChange.$Properties} CMsgGCHVacVerificationChange.$Shape */ /** * Constructs a new CMsgGCHVacVerificationChange. * @exports CMsgGCHVacVerificationChange * @classdesc Represents a CMsgGCHVacVerificationChange. - * @implements ICMsgGCHVacVerificationChange * @constructor - * @param {ICMsgGCHVacVerificationChange=} [properties] Properties to set + * @param {CMsgGCHVacVerificationChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHVacVerificationChange(properties) { + var CMsgGCHVacVerificationChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHVacVerificationChange steamid. @@ -38685,7 +50370,7 @@ * @memberof CMsgGCHVacVerificationChange * @instance */ - CMsgGCHVacVerificationChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHVacVerificationChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHVacVerificationChange appid. @@ -38708,10 +50393,14 @@ * @function create * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange=} [properties] Properties to set + * @param {CMsgGCHVacVerificationChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange instance + * @type {{ + * (properties: CMsgGCHVacVerificationChange.$Shape): CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape; + * (properties?: CMsgGCHVacVerificationChange.$Properties): CMsgGCHVacVerificationChange; + * }} */ - CMsgGCHVacVerificationChange.create = function create(properties) { + CMsgGCHVacVerificationChange.create = function(properties) { return new CMsgGCHVacVerificationChange(properties); }; @@ -38720,19 +50409,26 @@ * @function encode * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange} message CMsgGCHVacVerificationChange message or plain object to encode + * @param {CMsgGCHVacVerificationChange.$Properties} message CMsgGCHVacVerificationChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHVacVerificationChange.encode = function encode(message, writer) { + CMsgGCHVacVerificationChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_verified != null && Object.hasOwnProperty.call(message, "is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_verified); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -38741,12 +50437,12 @@ * @function encodeDelimited * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange} message CMsgGCHVacVerificationChange message or plain object to encode + * @param {CMsgGCHVacVerificationChange.$Properties} message CMsgGCHVacVerificationChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHVacVerificationChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHVacVerificationChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -38756,31 +50452,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange + * @returns {CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape} CMsgGCHVacVerificationChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHVacVerificationChange.decode = function decode(reader, length) { + CMsgGCHVacVerificationChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHVacVerificationChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHVacVerificationChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_verified = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_verified = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -38790,11 +50509,11 @@ * @memberof CMsgGCHVacVerificationChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange + * @returns {CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape} CMsgGCHVacVerificationChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHVacVerificationChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHVacVerificationChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -38808,16 +50527,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHVacVerificationChange.verify = function verify(message) { + CMsgGCHVacVerificationChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) if (typeof message.is_verified !== "boolean") return "is_verified: boolean expected"; return null; @@ -38831,23 +50554,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange */ - CMsgGCHVacVerificationChange.fromObject = function fromObject(object) { + CMsgGCHVacVerificationChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHVacVerificationChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHVacVerificationChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHVacVerificationChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_verified != null) - message.is_verified = Boolean(object.is_verified); + message.is_verified = $Boolean(object.is_verified); return message; }; @@ -38860,27 +50589,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHVacVerificationChange.toObject = function toObject(message, options) { + CMsgGCHVacVerificationChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_verified = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) object.is_verified = message.is_verified; return object; }; @@ -38892,8 +50627,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHVacVerificationChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHVacVerificationChange.prototype.toJSON = function() { + return CMsgGCHVacVerificationChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHVacVerificationChange + * @function getTypeUrl + * @memberof CMsgGCHVacVerificationChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHVacVerificationChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHVacVerificationChange"; }; return CMsgGCHVacVerificationChange; @@ -38903,29 +50652,42 @@ /** * Properties of a CMsgGCHAccountPhoneNumberChange. - * @exports ICMsgGCHAccountPhoneNumberChange - * @interface ICMsgGCHAccountPhoneNumberChange + * @typedef {Object} CMsgGCHAccountPhoneNumberChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountPhoneNumberChange steamid * @property {number|null} [appid] CMsgGCHAccountPhoneNumberChange appid * @property {number|Long|null} [phone_id] CMsgGCHAccountPhoneNumberChange phone_id * @property {boolean|null} [is_verified] CMsgGCHAccountPhoneNumberChange is_verified * @property {boolean|null} [is_identifying] CMsgGCHAccountPhoneNumberChange is_identifying + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountPhoneNumberChange. + * @exports ICMsgGCHAccountPhoneNumberChange + * @interface ICMsgGCHAccountPhoneNumberChange + * @augments CMsgGCHAccountPhoneNumberChange.$Properties + * @deprecated Use CMsgGCHAccountPhoneNumberChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountPhoneNumberChange. + * @typedef {CMsgGCHAccountPhoneNumberChange.$Properties} CMsgGCHAccountPhoneNumberChange.$Shape */ /** * Constructs a new CMsgGCHAccountPhoneNumberChange. * @exports CMsgGCHAccountPhoneNumberChange * @classdesc Represents a CMsgGCHAccountPhoneNumberChange. - * @implements ICMsgGCHAccountPhoneNumberChange * @constructor - * @param {ICMsgGCHAccountPhoneNumberChange=} [properties] Properties to set + * @param {CMsgGCHAccountPhoneNumberChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountPhoneNumberChange(properties) { + var CMsgGCHAccountPhoneNumberChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountPhoneNumberChange steamid. @@ -38933,7 +50695,7 @@ * @memberof CMsgGCHAccountPhoneNumberChange * @instance */ - CMsgGCHAccountPhoneNumberChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountPhoneNumberChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountPhoneNumberChange appid. @@ -38972,10 +50734,14 @@ * @function create * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange=} [properties] Properties to set + * @param {CMsgGCHAccountPhoneNumberChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange instance + * @type {{ + * (properties: CMsgGCHAccountPhoneNumberChange.$Shape): CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape; + * (properties?: CMsgGCHAccountPhoneNumberChange.$Properties): CMsgGCHAccountPhoneNumberChange; + * }} */ - CMsgGCHAccountPhoneNumberChange.create = function create(properties) { + CMsgGCHAccountPhoneNumberChange.create = function(properties) { return new CMsgGCHAccountPhoneNumberChange(properties); }; @@ -38984,23 +50750,30 @@ * @function encode * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange} message CMsgGCHAccountPhoneNumberChange message or plain object to encode + * @param {CMsgGCHAccountPhoneNumberChange.$Properties} message CMsgGCHAccountPhoneNumberChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountPhoneNumberChange.encode = function encode(message, writer) { + CMsgGCHAccountPhoneNumberChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.phone_id != null && Object.hasOwnProperty.call(message, "phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.phone_id); - if (message.is_verified != null && Object.hasOwnProperty.call(message, "is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_verified); - if (message.is_identifying != null && Object.hasOwnProperty.call(message, "is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_identifying); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -39009,12 +50782,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange} message CMsgGCHAccountPhoneNumberChange message or plain object to encode + * @param {CMsgGCHAccountPhoneNumberChange.$Properties} message CMsgGCHAccountPhoneNumberChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountPhoneNumberChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountPhoneNumberChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -39024,37 +50797,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange + * @returns {CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape} CMsgGCHAccountPhoneNumberChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountPhoneNumberChange.decode = function decode(reader, length) { + CMsgGCHAccountPhoneNumberChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountPhoneNumberChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountPhoneNumberChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.phone_id = reader.uint64(); - break; - case 4: - message.is_verified = reader.bool(); - break; - case 5: - message.is_identifying = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.phone_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_verified = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_identifying = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -39064,11 +50866,11 @@ * @memberof CMsgGCHAccountPhoneNumberChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange + * @returns {CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape} CMsgGCHAccountPhoneNumberChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountPhoneNumberChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountPhoneNumberChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -39082,22 +50884,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountPhoneNumberChange.verify = function verify(message) { + CMsgGCHAccountPhoneNumberChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) if (!$util.isInteger(message.phone_id) && !(message.phone_id && $util.isInteger(message.phone_id.low) && $util.isInteger(message.phone_id.high))) return "phone_id: integer|Long expected"; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) if (typeof message.is_verified !== "boolean") return "is_verified: boolean expected"; - if (message.is_identifying != null && message.hasOwnProperty("is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) if (typeof message.is_identifying !== "boolean") return "is_identifying: boolean expected"; return null; @@ -39111,34 +50917,40 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange */ - CMsgGCHAccountPhoneNumberChange.fromObject = function fromObject(object) { + CMsgGCHAccountPhoneNumberChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountPhoneNumberChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountPhoneNumberChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountPhoneNumberChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.phone_id != null) if ($util.Long) - (message.phone_id = $util.Long.fromValue(object.phone_id)).unsigned = true; + message.phone_id = $util.Long.fromValue(object.phone_id, true); else if (typeof object.phone_id === "string") - message.phone_id = parseInt(object.phone_id, 10); + message.phone_id = $parseInt(object.phone_id, 10); else if (typeof object.phone_id === "number") message.phone_id = object.phone_id; else if (typeof object.phone_id === "object") message.phone_id = new $util.LongBits(object.phone_id.low >>> 0, object.phone_id.high >>> 0).toNumber(true); if (object.is_verified != null) - message.is_verified = Boolean(object.is_verified); + message.is_verified = $Boolean(object.is_verified); if (object.is_identifying != null) - message.is_identifying = Boolean(object.is_identifying); + message.is_identifying = $Boolean(object.is_identifying); return message; }; @@ -39151,40 +50963,48 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountPhoneNumberChange.toObject = function toObject(message, options) { + CMsgGCHAccountPhoneNumberChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.phone_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.phone_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.phone_id = options.longs === String ? "0" : 0; + object.phone_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.is_verified = false; object.is_identifying = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) - if (typeof message.phone_id === "number") - object.phone_id = options.longs === String ? String(message.phone_id) : message.phone_id; + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.phone_id = typeof message.phone_id === "number" ? $BigInt(message.phone_id) : $util.Long.fromBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0, true).toBigInt(); + else if (typeof message.phone_id === "number") + object.phone_id = options.longs === $String ? $String(message.phone_id) : message.phone_id; else - object.phone_id = options.longs === String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + object.phone_id = options.longs === $String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === $Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) object.is_verified = message.is_verified; - if (message.is_identifying != null && message.hasOwnProperty("is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) object.is_identifying = message.is_identifying; return object; }; @@ -39196,8 +51016,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountPhoneNumberChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountPhoneNumberChange.prototype.toJSON = function() { + return CMsgGCHAccountPhoneNumberChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountPhoneNumberChange + * @function getTypeUrl + * @memberof CMsgGCHAccountPhoneNumberChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountPhoneNumberChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountPhoneNumberChange"; }; return CMsgGCHAccountPhoneNumberChange; @@ -39207,27 +51041,40 @@ /** * Properties of a CMsgGCHAccountTwoFactorChange. - * @exports ICMsgGCHAccountTwoFactorChange - * @interface ICMsgGCHAccountTwoFactorChange + * @typedef {Object} CMsgGCHAccountTwoFactorChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountTwoFactorChange steamid * @property {number|null} [appid] CMsgGCHAccountTwoFactorChange appid * @property {boolean|null} [twofactor_enabled] CMsgGCHAccountTwoFactorChange twofactor_enabled + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountTwoFactorChange. + * @exports ICMsgGCHAccountTwoFactorChange + * @interface ICMsgGCHAccountTwoFactorChange + * @augments CMsgGCHAccountTwoFactorChange.$Properties + * @deprecated Use CMsgGCHAccountTwoFactorChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountTwoFactorChange. + * @typedef {CMsgGCHAccountTwoFactorChange.$Properties} CMsgGCHAccountTwoFactorChange.$Shape */ /** * Constructs a new CMsgGCHAccountTwoFactorChange. * @exports CMsgGCHAccountTwoFactorChange * @classdesc Represents a CMsgGCHAccountTwoFactorChange. - * @implements ICMsgGCHAccountTwoFactorChange * @constructor - * @param {ICMsgGCHAccountTwoFactorChange=} [properties] Properties to set + * @param {CMsgGCHAccountTwoFactorChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountTwoFactorChange(properties) { + var CMsgGCHAccountTwoFactorChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountTwoFactorChange steamid. @@ -39235,7 +51082,7 @@ * @memberof CMsgGCHAccountTwoFactorChange * @instance */ - CMsgGCHAccountTwoFactorChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountTwoFactorChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountTwoFactorChange appid. @@ -39258,10 +51105,14 @@ * @function create * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange=} [properties] Properties to set + * @param {CMsgGCHAccountTwoFactorChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange instance + * @type {{ + * (properties: CMsgGCHAccountTwoFactorChange.$Shape): CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape; + * (properties?: CMsgGCHAccountTwoFactorChange.$Properties): CMsgGCHAccountTwoFactorChange; + * }} */ - CMsgGCHAccountTwoFactorChange.create = function create(properties) { + CMsgGCHAccountTwoFactorChange.create = function(properties) { return new CMsgGCHAccountTwoFactorChange(properties); }; @@ -39270,19 +51121,26 @@ * @function encode * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange} message CMsgGCHAccountTwoFactorChange message or plain object to encode + * @param {CMsgGCHAccountTwoFactorChange.$Properties} message CMsgGCHAccountTwoFactorChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTwoFactorChange.encode = function encode(message, writer) { + CMsgGCHAccountTwoFactorChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.twofactor_enabled != null && Object.hasOwnProperty.call(message, "twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.twofactor_enabled); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -39291,12 +51149,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange} message CMsgGCHAccountTwoFactorChange message or plain object to encode + * @param {CMsgGCHAccountTwoFactorChange.$Properties} message CMsgGCHAccountTwoFactorChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTwoFactorChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountTwoFactorChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -39306,31 +51164,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange + * @returns {CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape} CMsgGCHAccountTwoFactorChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTwoFactorChange.decode = function decode(reader, length) { + CMsgGCHAccountTwoFactorChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountTwoFactorChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountTwoFactorChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.twofactor_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.twofactor_enabled = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -39340,11 +51221,11 @@ * @memberof CMsgGCHAccountTwoFactorChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange + * @returns {CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape} CMsgGCHAccountTwoFactorChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTwoFactorChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountTwoFactorChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -39358,16 +51239,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountTwoFactorChange.verify = function verify(message) { + CMsgGCHAccountTwoFactorChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.twofactor_enabled != null && message.hasOwnProperty("twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) if (typeof message.twofactor_enabled !== "boolean") return "twofactor_enabled: boolean expected"; return null; @@ -39381,23 +51266,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange */ - CMsgGCHAccountTwoFactorChange.fromObject = function fromObject(object) { + CMsgGCHAccountTwoFactorChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountTwoFactorChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountTwoFactorChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountTwoFactorChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.twofactor_enabled != null) - message.twofactor_enabled = Boolean(object.twofactor_enabled); + message.twofactor_enabled = $Boolean(object.twofactor_enabled); return message; }; @@ -39410,27 +51301,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountTwoFactorChange.toObject = function toObject(message, options) { + CMsgGCHAccountTwoFactorChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.twofactor_enabled = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.twofactor_enabled != null && message.hasOwnProperty("twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) object.twofactor_enabled = message.twofactor_enabled; return object; }; @@ -39442,8 +51339,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountTwoFactorChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountTwoFactorChange.prototype.toJSON = function() { + return CMsgGCHAccountTwoFactorChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountTwoFactorChange + * @function getTypeUrl + * @memberof CMsgGCHAccountTwoFactorChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountTwoFactorChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountTwoFactorChange"; }; return CMsgGCHAccountTwoFactorChange; @@ -39451,27 +51362,40 @@ $root.CMsgGCGetPartnerAccountLink = (function() { + /** + * Properties of a CMsgGCGetPartnerAccountLink. + * @typedef {Object} CMsgGCGetPartnerAccountLink.$Properties + * @property {number|Long|null} [steamid] CMsgGCGetPartnerAccountLink steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPartnerAccountLink. * @exports ICMsgGCGetPartnerAccountLink * @interface ICMsgGCGetPartnerAccountLink - * @property {number|Long|null} [steamid] CMsgGCGetPartnerAccountLink steamid + * @augments CMsgGCGetPartnerAccountLink.$Properties + * @deprecated Use CMsgGCGetPartnerAccountLink.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPartnerAccountLink. + * @typedef {CMsgGCGetPartnerAccountLink.$Properties} CMsgGCGetPartnerAccountLink.$Shape */ /** * Constructs a new CMsgGCGetPartnerAccountLink. * @exports CMsgGCGetPartnerAccountLink * @classdesc Represents a CMsgGCGetPartnerAccountLink. - * @implements ICMsgGCGetPartnerAccountLink * @constructor - * @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPartnerAccountLink(properties) { + var CMsgGCGetPartnerAccountLink = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPartnerAccountLink steamid. @@ -39479,17 +51403,21 @@ * @memberof CMsgGCGetPartnerAccountLink * @instance */ - CMsgGCGetPartnerAccountLink.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCGetPartnerAccountLink.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCGetPartnerAccountLink instance using the specified properties. * @function create * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink instance + * @type {{ + * (properties: CMsgGCGetPartnerAccountLink.$Shape): CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape; + * (properties?: CMsgGCGetPartnerAccountLink.$Properties): CMsgGCGetPartnerAccountLink; + * }} */ - CMsgGCGetPartnerAccountLink.create = function create(properties) { + CMsgGCGetPartnerAccountLink.create = function(properties) { return new CMsgGCGetPartnerAccountLink(properties); }; @@ -39498,15 +51426,22 @@ * @function encode * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink} message CMsgGCGetPartnerAccountLink message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink.$Properties} message CMsgGCGetPartnerAccountLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink.encode = function encode(message, writer) { + CMsgGCGetPartnerAccountLink.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -39515,12 +51450,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink} message CMsgGCGetPartnerAccountLink message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink.$Properties} message CMsgGCGetPartnerAccountLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPartnerAccountLink.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -39530,25 +51465,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink + * @returns {CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape} CMsgGCGetPartnerAccountLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink.decode = function decode(reader, length) { + CMsgGCGetPartnerAccountLink.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPartnerAccountLink(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPartnerAccountLink(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -39558,11 +51510,11 @@ * @memberof CMsgGCGetPartnerAccountLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink + * @returns {CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape} CMsgGCGetPartnerAccountLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPartnerAccountLink.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -39576,10 +51528,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPartnerAccountLink.verify = function verify(message) { + CMsgGCGetPartnerAccountLink.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -39593,19 +51549,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink */ - CMsgGCGetPartnerAccountLink.fromObject = function fromObject(object) { + CMsgGCGetPartnerAccountLink.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPartnerAccountLink) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPartnerAccountLink: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPartnerAccountLink(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -39618,21 +51580,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPartnerAccountLink.toObject = function toObject(message, options) { + CMsgGCGetPartnerAccountLink.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -39643,8 +51611,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPartnerAccountLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPartnerAccountLink.prototype.toJSON = function() { + return CMsgGCGetPartnerAccountLink.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPartnerAccountLink + * @function getTypeUrl + * @memberof CMsgGCGetPartnerAccountLink + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPartnerAccountLink.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPartnerAccountLink"; }; return CMsgGCGetPartnerAccountLink; @@ -39654,26 +51636,39 @@ /** * Properties of a CMsgGCGetPartnerAccountLink_Response. - * @exports ICMsgGCGetPartnerAccountLink_Response - * @interface ICMsgGCGetPartnerAccountLink_Response + * @typedef {Object} CMsgGCGetPartnerAccountLink_Response.$Properties * @property {number|null} [pwid] CMsgGCGetPartnerAccountLink_Response pwid * @property {number|null} [nexonid] CMsgGCGetPartnerAccountLink_Response nexonid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetPartnerAccountLink_Response. + * @exports ICMsgGCGetPartnerAccountLink_Response + * @interface ICMsgGCGetPartnerAccountLink_Response + * @augments CMsgGCGetPartnerAccountLink_Response.$Properties + * @deprecated Use CMsgGCGetPartnerAccountLink_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPartnerAccountLink_Response. + * @typedef {CMsgGCGetPartnerAccountLink_Response.$Properties} CMsgGCGetPartnerAccountLink_Response.$Shape */ /** * Constructs a new CMsgGCGetPartnerAccountLink_Response. * @exports CMsgGCGetPartnerAccountLink_Response * @classdesc Represents a CMsgGCGetPartnerAccountLink_Response. - * @implements ICMsgGCGetPartnerAccountLink_Response * @constructor - * @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPartnerAccountLink_Response(properties) { + var CMsgGCGetPartnerAccountLink_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPartnerAccountLink_Response pwid. @@ -39696,10 +51691,14 @@ * @function create * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response instance + * @type {{ + * (properties: CMsgGCGetPartnerAccountLink_Response.$Shape): CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape; + * (properties?: CMsgGCGetPartnerAccountLink_Response.$Properties): CMsgGCGetPartnerAccountLink_Response; + * }} */ - CMsgGCGetPartnerAccountLink_Response.create = function create(properties) { + CMsgGCGetPartnerAccountLink_Response.create = function(properties) { return new CMsgGCGetPartnerAccountLink_Response(properties); }; @@ -39708,17 +51707,24 @@ * @function encode * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink_Response.encode = function encode(message, writer) { + CMsgGCGetPartnerAccountLink_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.pwid != null && Object.hasOwnProperty.call(message, "pwid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.pwid); - if (message.nexonid != null && Object.hasOwnProperty.call(message, "nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.nexonid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -39727,12 +51733,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPartnerAccountLink_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -39742,28 +51748,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response + * @returns {CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape} CMsgGCGetPartnerAccountLink_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink_Response.decode = function decode(reader, length) { + CMsgGCGetPartnerAccountLink_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPartnerAccountLink_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPartnerAccountLink_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pwid = reader.uint32(); - break; - case 2: - message.nexonid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.pwid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.nexonid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -39773,11 +51799,11 @@ * @memberof CMsgGCGetPartnerAccountLink_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response + * @returns {CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape} CMsgGCGetPartnerAccountLink_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPartnerAccountLink_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -39791,13 +51817,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPartnerAccountLink_Response.verify = function verify(message) { + CMsgGCGetPartnerAccountLink_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pwid != null && message.hasOwnProperty("pwid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) if (!$util.isInteger(message.pwid)) return "pwid: integer expected"; - if (message.nexonid != null && message.hasOwnProperty("nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) if (!$util.isInteger(message.nexonid)) return "nexonid: integer expected"; return null; @@ -39811,9 +51841,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response */ - CMsgGCGetPartnerAccountLink_Response.fromObject = function fromObject(object) { + CMsgGCGetPartnerAccountLink_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPartnerAccountLink_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPartnerAccountLink_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPartnerAccountLink_Response(); if (object.pwid != null) message.pwid = object.pwid >>> 0; @@ -39831,17 +51867,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPartnerAccountLink_Response.toObject = function toObject(message, options) { + CMsgGCGetPartnerAccountLink_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.pwid = 0; object.nexonid = 0; } - if (message.pwid != null && message.hasOwnProperty("pwid")) + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) object.pwid = message.pwid; - if (message.nexonid != null && message.hasOwnProperty("nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) object.nexonid = message.nexonid; return object; }; @@ -39853,8 +51893,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPartnerAccountLink_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPartnerAccountLink_Response.prototype.toJSON = function() { + return CMsgGCGetPartnerAccountLink_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPartnerAccountLink_Response + * @function getTypeUrl + * @memberof CMsgGCGetPartnerAccountLink_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPartnerAccountLink_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPartnerAccountLink_Response"; }; return CMsgGCGetPartnerAccountLink_Response; @@ -39864,30 +51918,43 @@ /** * Properties of a CMsgGCRoutingInfo. - * @exports ICMsgGCRoutingInfo - * @interface ICMsgGCRoutingInfo + * @typedef {Object} CMsgGCRoutingInfo.$Properties * @property {Array.|null} [dir_index] CMsgGCRoutingInfo dir_index * @property {CMsgGCRoutingInfo.RoutingMethod|null} [method] CMsgGCRoutingInfo method * @property {CMsgGCRoutingInfo.RoutingMethod|null} [fallback] CMsgGCRoutingInfo fallback * @property {number|null} [protobuf_field] CMsgGCRoutingInfo protobuf_field * @property {string|null} [webapi_param] CMsgGCRoutingInfo webapi_param + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRoutingInfo. + * @exports ICMsgGCRoutingInfo + * @interface ICMsgGCRoutingInfo + * @augments CMsgGCRoutingInfo.$Properties + * @deprecated Use CMsgGCRoutingInfo.$Properties instead. + */ + + /** + * Shape of a CMsgGCRoutingInfo. + * @typedef {CMsgGCRoutingInfo.$Properties} CMsgGCRoutingInfo.$Shape */ /** * Constructs a new CMsgGCRoutingInfo. * @exports CMsgGCRoutingInfo * @classdesc Represents a CMsgGCRoutingInfo. - * @implements ICMsgGCRoutingInfo * @constructor - * @param {ICMsgGCRoutingInfo=} [properties] Properties to set + * @param {CMsgGCRoutingInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRoutingInfo(properties) { + var CMsgGCRoutingInfo = function (properties) { this.dir_index = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRoutingInfo dir_index. @@ -39934,10 +52001,14 @@ * @function create * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo=} [properties] Properties to set + * @param {CMsgGCRoutingInfo.$Properties=} [properties] Properties to set * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo instance + * @type {{ + * (properties: CMsgGCRoutingInfo.$Shape): CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape; + * (properties?: CMsgGCRoutingInfo.$Properties): CMsgGCRoutingInfo; + * }} */ - CMsgGCRoutingInfo.create = function create(properties) { + CMsgGCRoutingInfo.create = function(properties) { return new CMsgGCRoutingInfo(properties); }; @@ -39946,24 +52017,31 @@ * @function encode * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo} message CMsgGCRoutingInfo message or plain object to encode + * @param {CMsgGCRoutingInfo.$Properties} message CMsgGCRoutingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRoutingInfo.encode = function encode(message, writer) { + CMsgGCRoutingInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.dir_index != null && message.dir_index.length) for (var i = 0; i < message.dir_index.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index[i]); - if (message.method != null && Object.hasOwnProperty.call(message, "method")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.method); - if (message.fallback != null && Object.hasOwnProperty.call(message, "fallback")) + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.fallback); - if (message.protobuf_field != null && Object.hasOwnProperty.call(message, "protobuf_field")) + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.protobuf_field); - if (message.webapi_param != null && Object.hasOwnProperty.call(message, "webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.webapi_param); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -39972,12 +52050,12 @@ * @function encodeDelimited * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo} message CMsgGCRoutingInfo message or plain object to encode + * @param {CMsgGCRoutingInfo.$Properties} message CMsgGCRoutingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRoutingInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRoutingInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -39987,44 +52065,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo + * @returns {CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape} CMsgGCRoutingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRoutingInfo.decode = function decode(reader, length) { + CMsgGCRoutingInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRoutingInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRoutingInfo(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.dir_index && message.dir_index.length)) - message.dir_index = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.dir_index.push(reader.uint32()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.dir_index && message.dir_index.length)) + message.dir_index = []; + reader.uint32s(message.dir_index); + continue; + } + if (wireType !== 0) + break; + if (!(message.dir_index && message.dir_index.length)) + message.dir_index = []; message.dir_index.push(reader.uint32()); - break; - case 2: - message.method = reader.int32(); - break; - case 3: - message.fallback = reader.int32(); - break; - case 4: - message.protobuf_field = reader.uint32(); - break; - case 5: - message.webapi_param = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCRoutingInfo.RoutingMethod[value] !== $undefined) + message.method = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCRoutingInfo.RoutingMethod[value] !== $undefined) + message.fallback = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 4: { + if (wireType !== 0) + break; + message.protobuf_field = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.webapi_param = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -40034,11 +52154,11 @@ * @memberof CMsgGCRoutingInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo + * @returns {CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape} CMsgGCRoutingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRoutingInfo.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRoutingInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -40052,17 +52172,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRoutingInfo.verify = function verify(message) { + CMsgGCRoutingInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) { - if (!Array.isArray(message.dir_index)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) { + if (!$Array.isArray(message.dir_index)) return "dir_index: array expected"; for (var i = 0; i < message.dir_index.length; ++i) if (!$util.isInteger(message.dir_index[i])) return "dir_index: integer[] expected"; } - if (message.method != null && message.hasOwnProperty("method")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) switch (message.method) { default: return "method: enum value expected"; @@ -40073,7 +52197,7 @@ case 4: break; } - if (message.fallback != null && message.hasOwnProperty("fallback")) + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) switch (message.fallback) { default: return "fallback: enum value expected"; @@ -40084,10 +52208,10 @@ case 4: break; } - if (message.protobuf_field != null && message.hasOwnProperty("protobuf_field")) + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) if (!$util.isInteger(message.protobuf_field)) return "protobuf_field: integer expected"; - if (message.webapi_param != null && message.hasOwnProperty("webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) if (!$util.isString(message.webapi_param)) return "webapi_param: string expected"; return null; @@ -40101,14 +52225,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo */ - CMsgGCRoutingInfo.fromObject = function fromObject(object) { + CMsgGCRoutingInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRoutingInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRoutingInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRoutingInfo(); if (object.dir_index) { - if (!Array.isArray(object.dir_index)) - throw TypeError(".CMsgGCRoutingInfo.dir_index: array expected"); - message.dir_index = []; + if (!$Array.isArray(object.dir_index)) + throw $TypeError(".CMsgGCRoutingInfo.dir_index: array expected"); + message.dir_index = $Array(object.dir_index.length); for (var i = 0; i < object.dir_index.length; ++i) message.dir_index[i] = object.dir_index[i] >>> 0; } @@ -40133,6 +52263,7 @@ case 4: message.method = 4; break; + default: } switch (object.fallback) { case "RANDOM": @@ -40155,11 +52286,12 @@ case 4: message.fallback = 4; break; + default: } if (object.protobuf_field != null) message.protobuf_field = object.protobuf_field >>> 0; if (object.webapi_param != null) - message.webapi_param = String(object.webapi_param); + message.webapi_param = $String(object.webapi_param); return message; }; @@ -40172,30 +52304,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRoutingInfo.toObject = function toObject(message, options) { + CMsgGCRoutingInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.dir_index = []; if (options.defaults) { - object.method = options.enums === String ? "RANDOM" : 0; - object.fallback = options.enums === String ? "DISCARD" : 1; + object.method = options.enums === $String ? "RANDOM" : 0; + object.fallback = options.enums === $String ? "DISCARD" : 1; object.protobuf_field = 0; object.webapi_param = ""; } if (message.dir_index && message.dir_index.length) { - object.dir_index = []; + object.dir_index = $Array(message.dir_index.length); for (var j = 0; j < message.dir_index.length; ++j) object.dir_index[j] = message.dir_index[j]; } - if (message.method != null && message.hasOwnProperty("method")) - object.method = options.enums === String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.method] : message.method; - if (message.fallback != null && message.hasOwnProperty("fallback")) - object.fallback = options.enums === String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] : message.fallback; - if (message.protobuf_field != null && message.hasOwnProperty("protobuf_field")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) + object.method = options.enums === $String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.method] === $undefined ? message.method : $root.CMsgGCRoutingInfo.RoutingMethod[message.method] : message.method; + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) + object.fallback = options.enums === $String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] === $undefined ? message.fallback : $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] : message.fallback; + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) object.protobuf_field = message.protobuf_field; - if (message.webapi_param != null && message.hasOwnProperty("webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) object.webapi_param = message.webapi_param; return object; }; @@ -40207,8 +52343,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRoutingInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRoutingInfo.prototype.toJSON = function() { + return CMsgGCRoutingInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRoutingInfo + * @function getTypeUrl + * @memberof CMsgGCRoutingInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRoutingInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRoutingInfo"; }; /** @@ -40222,7 +52372,7 @@ * @property {number} WEBAPI_PARAM_UINT64=4 WEBAPI_PARAM_UINT64 value */ CMsgGCRoutingInfo.RoutingMethod = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "RANDOM"] = 0; values[valuesById[1] = "DISCARD"] = 1; values[valuesById[2] = "CLIENT_STEAMID"] = 2; @@ -40236,32 +52386,45 @@ $root.CMsgGCMsgMasterSetWebAPIRouting = (function() { + /** + * Properties of a CMsgGCMsgMasterSetWebAPIRouting. + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting.$Properties + * @property {Array.|null} [entries] CMsgGCMsgMasterSetWebAPIRouting entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetWebAPIRouting. * @exports ICMsgGCMsgMasterSetWebAPIRouting * @interface ICMsgGCMsgMasterSetWebAPIRouting - * @property {Array.|null} [entries] CMsgGCMsgMasterSetWebAPIRouting entries + * @augments CMsgGCMsgMasterSetWebAPIRouting.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetWebAPIRouting. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting.$Properties} CMsgGCMsgMasterSetWebAPIRouting.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetWebAPIRouting. * @exports CMsgGCMsgMasterSetWebAPIRouting * @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting. - * @implements ICMsgGCMsgMasterSetWebAPIRouting * @constructor - * @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetWebAPIRouting(properties) { + var CMsgGCMsgMasterSetWebAPIRouting = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetWebAPIRouting entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCMsgMasterSetWebAPIRouting * @instance */ @@ -40272,10 +52435,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting.$Shape): CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting.$Properties): CMsgGCMsgMasterSetWebAPIRouting; + * }} */ - CMsgGCMsgMasterSetWebAPIRouting.create = function create(properties) { + CMsgGCMsgMasterSetWebAPIRouting.create = function(properties) { return new CMsgGCMsgMasterSetWebAPIRouting(properties); }; @@ -40284,16 +52451,23 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting.encode = function encode(message, writer) { + CMsgGCMsgMasterSetWebAPIRouting.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -40302,12 +52476,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetWebAPIRouting.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -40317,27 +52491,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting + * @returns {CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape} CMsgGCMsgMasterSetWebAPIRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting.decode = function decode(reader, length) { + CMsgGCMsgMasterSetWebAPIRouting.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCMsgMasterSetWebAPIRouting.Entry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCMsgMasterSetWebAPIRouting.Entry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -40347,11 +52538,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting + * @returns {CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape} CMsgGCMsgMasterSetWebAPIRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetWebAPIRouting.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -40365,14 +52556,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetWebAPIRouting.verify = function verify(message) { + CMsgGCMsgMasterSetWebAPIRouting.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.verify(message.entries[i]); + var error = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -40388,18 +52583,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting */ - CMsgGCMsgMasterSetWebAPIRouting.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetWebAPIRouting.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: object expected"); - message.entries[i] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: object expected"); + message.entries[i] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -40414,16 +52615,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetWebAPIRouting.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetWebAPIRouting.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -40435,35 +52640,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetWebAPIRouting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetWebAPIRouting.prototype.toJSON = function() { + return CMsgGCMsgMasterSetWebAPIRouting.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetWebAPIRouting + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetWebAPIRouting.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting"; }; CMsgGCMsgMasterSetWebAPIRouting.Entry = (function() { /** * Properties of an Entry. - * @memberof CMsgGCMsgMasterSetWebAPIRouting - * @interface IEntry + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties * @property {string|null} [interface_name] Entry interface_name * @property {string|null} [method_name] Entry method_name - * @property {ICMsgGCRoutingInfo|null} [routing] Entry routing + * @property {CMsgGCRoutingInfo.$Properties|null} [routing] Entry routing + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Entry. + * @memberof CMsgGCMsgMasterSetWebAPIRouting + * @interface IEntry + * @augments CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties instead. + */ + + /** + * Shape of an Entry. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape */ /** * Constructs a new Entry. * @memberof CMsgGCMsgMasterSetWebAPIRouting * @classdesc Represents an Entry. - * @implements IEntry * @constructor - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Entry(properties) { + var Entry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Entry interface_name. @@ -40483,7 +52715,7 @@ /** * Entry routing. - * @member {ICMsgGCRoutingInfo|null|undefined} routing + * @member {CMsgGCRoutingInfo.$Properties|null|undefined} routing * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @instance */ @@ -40494,10 +52726,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape): CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties): CMsgGCMsgMasterSetWebAPIRouting.Entry; + * }} */ - Entry.create = function create(properties) { + Entry.create = function(properties) { return new Entry(properties); }; @@ -40506,19 +52742,26 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.interface_name != null && Object.hasOwnProperty.call(message, "interface_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.interface_name); - if (message.method_name != null && Object.hasOwnProperty.call(message, "method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.method_name); - if (message.routing != null && Object.hasOwnProperty.call(message, "routing")) - $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -40527,12 +52770,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Entry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -40542,31 +52785,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + Entry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.interface_name = reader.string(); - break; - case 2: - message.method_name = reader.string(); - break; - case 3: - message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.interface_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.method_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routing); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -40576,11 +52842,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + Entry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -40594,17 +52860,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + Entry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) if (!$util.isString(message.interface_name)) return "interface_name: string expected"; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) if (!$util.isString(message.method_name)) return "method_name: string expected"; - if (message.routing != null && message.hasOwnProperty("routing")) { - var error = $root.CMsgGCRoutingInfo.verify(message.routing); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) { + var error = $root.CMsgGCRoutingInfo.verify(message.routing, _depth + 1); if (error) return "routing." + error; } @@ -40619,18 +52889,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry */ - Entry.fromObject = function fromObject(object) { + Entry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting.Entry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); if (object.interface_name != null) - message.interface_name = String(object.interface_name); + message.interface_name = $String(object.interface_name); if (object.method_name != null) - message.method_name = String(object.method_name); + message.method_name = $String(object.method_name); if (object.routing != null) { - if (typeof object.routing !== "object") - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry.routing: object expected"); - message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing); + if (!$util.isObject(object.routing)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry.routing: object expected"); + message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing, _depth + 1); } return message; }; @@ -40644,21 +52920,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.interface_name = ""; object.method_name = ""; object.routing = null; } - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) object.interface_name = message.interface_name; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) object.method_name = message.method_name; - if (message.routing != null && message.hasOwnProperty("routing")) - object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options, _depth + 1); return object; }; @@ -40669,8 +52949,22 @@ * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Entry.prototype.toJSON = function() { + return Entry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Entry + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Entry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting.Entry"; }; return Entry; @@ -40681,32 +52975,45 @@ $root.CMsgGCMsgMasterSetClientMsgRouting = (function() { + /** + * Properties of a CMsgGCMsgMasterSetClientMsgRouting. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting.$Properties + * @property {Array.|null} [entries] CMsgGCMsgMasterSetClientMsgRouting entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetClientMsgRouting. * @exports ICMsgGCMsgMasterSetClientMsgRouting * @interface ICMsgGCMsgMasterSetClientMsgRouting - * @property {Array.|null} [entries] CMsgGCMsgMasterSetClientMsgRouting entries + * @augments CMsgGCMsgMasterSetClientMsgRouting.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetClientMsgRouting. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting.$Properties} CMsgGCMsgMasterSetClientMsgRouting.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetClientMsgRouting. * @exports CMsgGCMsgMasterSetClientMsgRouting * @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting. - * @implements ICMsgGCMsgMasterSetClientMsgRouting * @constructor - * @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetClientMsgRouting(properties) { + var CMsgGCMsgMasterSetClientMsgRouting = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetClientMsgRouting entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCMsgMasterSetClientMsgRouting * @instance */ @@ -40717,10 +53024,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting.$Shape): CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting.$Properties): CMsgGCMsgMasterSetClientMsgRouting; + * }} */ - CMsgGCMsgMasterSetClientMsgRouting.create = function create(properties) { + CMsgGCMsgMasterSetClientMsgRouting.create = function(properties) { return new CMsgGCMsgMasterSetClientMsgRouting(properties); }; @@ -40729,16 +53040,23 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting.encode = function encode(message, writer) { + CMsgGCMsgMasterSetClientMsgRouting.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -40747,12 +53065,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetClientMsgRouting.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -40762,27 +53080,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting + * @returns {CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape} CMsgGCMsgMasterSetClientMsgRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting.decode = function decode(reader, length) { + CMsgGCMsgMasterSetClientMsgRouting.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCMsgMasterSetClientMsgRouting.Entry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCMsgMasterSetClientMsgRouting.Entry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -40792,11 +53127,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting + * @returns {CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape} CMsgGCMsgMasterSetClientMsgRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetClientMsgRouting.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -40810,14 +53145,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetClientMsgRouting.verify = function verify(message) { + CMsgGCMsgMasterSetClientMsgRouting.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.verify(message.entries[i]); + var error = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -40833,18 +53172,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting */ - CMsgGCMsgMasterSetClientMsgRouting.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetClientMsgRouting.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: object expected"); - message.entries[i] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: object expected"); + message.entries[i] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -40859,16 +53204,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetClientMsgRouting.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetClientMsgRouting.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -40880,34 +53229,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetClientMsgRouting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetClientMsgRouting.prototype.toJSON = function() { + return CMsgGCMsgMasterSetClientMsgRouting.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetClientMsgRouting + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetClientMsgRouting.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting"; }; CMsgGCMsgMasterSetClientMsgRouting.Entry = (function() { + /** + * Properties of an Entry. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties + * @property {number|null} [msg_type] Entry msg_type + * @property {CMsgGCRoutingInfo.$Properties|null} [routing] Entry routing + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an Entry. * @memberof CMsgGCMsgMasterSetClientMsgRouting * @interface IEntry - * @property {number|null} [msg_type] Entry msg_type - * @property {ICMsgGCRoutingInfo|null} [routing] Entry routing + * @augments CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties instead. + */ + + /** + * Shape of an Entry. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape */ /** * Constructs a new Entry. * @memberof CMsgGCMsgMasterSetClientMsgRouting * @classdesc Represents an Entry. - * @implements IEntry * @constructor - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Entry(properties) { + var Entry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Entry msg_type. @@ -40919,7 +53295,7 @@ /** * Entry routing. - * @member {ICMsgGCRoutingInfo|null|undefined} routing + * @member {CMsgGCRoutingInfo.$Properties|null|undefined} routing * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @instance */ @@ -40930,10 +53306,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape): CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties): CMsgGCMsgMasterSetClientMsgRouting.Entry; + * }} */ - Entry.create = function create(properties) { + Entry.create = function(properties) { return new Entry(properties); }; @@ -40942,17 +53322,24 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.msg_type != null && Object.hasOwnProperty.call(message, "msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.msg_type); - if (message.routing != null && Object.hasOwnProperty.call(message, "routing")) - $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -40961,12 +53348,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Entry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -40976,28 +53363,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + Entry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg_type = reader.uint32(); - break; - case 2: - message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.msg_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routing); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -41007,11 +53414,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + Entry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -41025,14 +53432,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + Entry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) if (!$util.isInteger(message.msg_type)) return "msg_type: integer expected"; - if (message.routing != null && message.hasOwnProperty("routing")) { - var error = $root.CMsgGCRoutingInfo.verify(message.routing); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) { + var error = $root.CMsgGCRoutingInfo.verify(message.routing, _depth + 1); if (error) return "routing." + error; } @@ -41047,16 +53458,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry */ - Entry.fromObject = function fromObject(object) { + Entry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting.Entry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); if (object.msg_type != null) message.msg_type = object.msg_type >>> 0; if (object.routing != null) { - if (typeof object.routing !== "object") - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry.routing: object expected"); - message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing); + if (!$util.isObject(object.routing)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry.routing: object expected"); + message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing, _depth + 1); } return message; }; @@ -41070,18 +53487,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.msg_type = 0; object.routing = null; } - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) object.msg_type = message.msg_type; - if (message.routing != null && message.hasOwnProperty("routing")) - object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options, _depth + 1); return object; }; @@ -41092,8 +53513,22 @@ * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Entry.prototype.toJSON = function() { + return Entry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Entry + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Entry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting.Entry"; }; return Entry; @@ -41104,27 +53539,40 @@ $root.CMsgGCMsgMasterSetWebAPIRouting_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetWebAPIRouting_Response. + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetWebAPIRouting_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetWebAPIRouting_Response. * @exports ICMsgGCMsgMasterSetWebAPIRouting_Response * @interface ICMsgGCMsgMasterSetWebAPIRouting_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetWebAPIRouting_Response eresult + * @augments CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetWebAPIRouting_Response. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetWebAPIRouting_Response. * @exports CMsgGCMsgMasterSetWebAPIRouting_Response * @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting_Response. - * @implements ICMsgGCMsgMasterSetWebAPIRouting_Response * @constructor - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetWebAPIRouting_Response(properties) { + var CMsgGCMsgMasterSetWebAPIRouting_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetWebAPIRouting_Response eresult. @@ -41139,10 +53587,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape): CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties): CMsgGCMsgMasterSetWebAPIRouting_Response; + * }} */ - CMsgGCMsgMasterSetWebAPIRouting_Response.create = function create(properties) { + CMsgGCMsgMasterSetWebAPIRouting_Response.create = function(properties) { return new CMsgGCMsgMasterSetWebAPIRouting_Response(properties); }; @@ -41151,15 +53603,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetWebAPIRouting_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -41168,12 +53627,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetWebAPIRouting_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -41183,25 +53642,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response + * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape} CMsgGCMsgMasterSetWebAPIRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetWebAPIRouting_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -41211,11 +53687,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response + * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape} CMsgGCMsgMasterSetWebAPIRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetWebAPIRouting_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -41229,10 +53705,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetWebAPIRouting_Response.verify = function verify(message) { + CMsgGCMsgMasterSetWebAPIRouting_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -41246,9 +53726,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response */ - CMsgGCMsgMasterSetWebAPIRouting_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetWebAPIRouting_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -41264,13 +53750,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetWebAPIRouting_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetWebAPIRouting_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -41282,8 +53772,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetWebAPIRouting_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetWebAPIRouting_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetWebAPIRouting_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting_Response"; }; return CMsgGCMsgMasterSetWebAPIRouting_Response; @@ -41291,27 +53795,40 @@ $root.CMsgGCMsgMasterSetClientMsgRouting_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetClientMsgRouting_Response. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetClientMsgRouting_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetClientMsgRouting_Response. * @exports ICMsgGCMsgMasterSetClientMsgRouting_Response * @interface ICMsgGCMsgMasterSetClientMsgRouting_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetClientMsgRouting_Response eresult + * @augments CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetClientMsgRouting_Response. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetClientMsgRouting_Response. * @exports CMsgGCMsgMasterSetClientMsgRouting_Response * @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting_Response. - * @implements ICMsgGCMsgMasterSetClientMsgRouting_Response * @constructor - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetClientMsgRouting_Response(properties) { + var CMsgGCMsgMasterSetClientMsgRouting_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetClientMsgRouting_Response eresult. @@ -41326,10 +53843,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape): CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties): CMsgGCMsgMasterSetClientMsgRouting_Response; + * }} */ - CMsgGCMsgMasterSetClientMsgRouting_Response.create = function create(properties) { + CMsgGCMsgMasterSetClientMsgRouting_Response.create = function(properties) { return new CMsgGCMsgMasterSetClientMsgRouting_Response(properties); }; @@ -41338,15 +53859,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetClientMsgRouting_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -41355,12 +53883,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetClientMsgRouting_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -41370,25 +53898,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response + * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape} CMsgGCMsgMasterSetClientMsgRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetClientMsgRouting_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -41398,11 +53943,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response + * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape} CMsgGCMsgMasterSetClientMsgRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetClientMsgRouting_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -41416,10 +53961,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetClientMsgRouting_Response.verify = function verify(message) { + CMsgGCMsgMasterSetClientMsgRouting_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -41433,9 +53982,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response */ - CMsgGCMsgMasterSetClientMsgRouting_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetClientMsgRouting_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -41451,13 +54006,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetClientMsgRouting_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetClientMsgRouting_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -41469,8 +54028,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetClientMsgRouting_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetClientMsgRouting_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetClientMsgRouting_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting_Response"; }; return CMsgGCMsgMasterSetClientMsgRouting_Response; @@ -41480,29 +54053,42 @@ /** * Properties of a CMsgGCMsgSetOptions. - * @exports ICMsgGCMsgSetOptions - * @interface ICMsgGCMsgSetOptions + * @typedef {Object} CMsgGCMsgSetOptions.$Properties * @property {Array.|null} [options] CMsgGCMsgSetOptions options - * @property {Array.|null} [client_msg_ranges] CMsgGCMsgSetOptions client_msg_ranges + * @property {Array.|null} [client_msg_ranges] CMsgGCMsgSetOptions client_msg_ranges * @property {CMsgGCMsgSetOptions.GCSQLVersion|null} [gcsql_version] CMsgGCMsgSetOptions gcsql_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCMsgSetOptions. + * @exports ICMsgGCMsgSetOptions + * @interface ICMsgGCMsgSetOptions + * @augments CMsgGCMsgSetOptions.$Properties + * @deprecated Use CMsgGCMsgSetOptions.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgSetOptions. + * @typedef {CMsgGCMsgSetOptions.$Properties} CMsgGCMsgSetOptions.$Shape */ /** * Constructs a new CMsgGCMsgSetOptions. * @exports CMsgGCMsgSetOptions * @classdesc Represents a CMsgGCMsgSetOptions. - * @implements ICMsgGCMsgSetOptions * @constructor - * @param {ICMsgGCMsgSetOptions=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgSetOptions(properties) { + var CMsgGCMsgSetOptions = function (properties) { this.options = []; this.client_msg_ranges = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgSetOptions options. @@ -41514,7 +54100,7 @@ /** * CMsgGCMsgSetOptions client_msg_ranges. - * @member {Array.} client_msg_ranges + * @member {Array.} client_msg_ranges * @memberof CMsgGCMsgSetOptions * @instance */ @@ -41533,10 +54119,14 @@ * @function create * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions instance + * @type {{ + * (properties: CMsgGCMsgSetOptions.$Shape): CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape; + * (properties?: CMsgGCMsgSetOptions.$Properties): CMsgGCMsgSetOptions; + * }} */ - CMsgGCMsgSetOptions.create = function create(properties) { + CMsgGCMsgSetOptions.create = function(properties) { return new CMsgGCMsgSetOptions(properties); }; @@ -41545,21 +54135,28 @@ * @function encode * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions} message CMsgGCMsgSetOptions message or plain object to encode + * @param {CMsgGCMsgSetOptions.$Properties} message CMsgGCMsgSetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgSetOptions.encode = function encode(message, writer) { + CMsgGCMsgSetOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.options != null && message.options.length) for (var i = 0; i < message.options.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.options[i]); if (message.client_msg_ranges != null && message.client_msg_ranges.length) for (var i = 0; i < message.client_msg_ranges.length; ++i) - $root.CMsgGCMsgSetOptions.MessageRange.encode(message.client_msg_ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gcsql_version != null && Object.hasOwnProperty.call(message, "gcsql_version")) + $root.CMsgGCMsgSetOptions.MessageRange.encode(message.client_msg_ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.gcsql_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -41568,12 +54165,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions} message CMsgGCMsgSetOptions message or plain object to encode + * @param {CMsgGCMsgSetOptions.$Properties} message CMsgGCMsgSetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgSetOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgSetOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -41583,40 +54180,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions + * @returns {CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape} CMsgGCMsgSetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgSetOptions.decode = function decode(reader, length) { + CMsgGCMsgSetOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgSetOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgSetOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.options && message.options.length)) - message.options = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.options.push(reader.int32()); - } else - message.options.push(reader.int32()); - break; - case 2: - if (!(message.client_msg_ranges && message.client_msg_ranges.length)) - message.client_msg_ranges = []; - message.client_msg_ranges.push($root.CMsgGCMsgSetOptions.MessageRange.decode(reader, reader.uint32())); - break; - case 3: - message.gcsql_version = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + start = reader.pos; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.Option[value] !== $undefined) { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push($util.rawField(1, 0, reader.raw(start, reader.pos))); + } + } + continue; + } + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.Option[value] !== $undefined) { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.client_msg_ranges && message.client_msg_ranges.length)) + message.client_msg_ranges = []; + message.client_msg_ranges.push($root.CMsgGCMsgSetOptions.MessageRange.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.GCSQLVersion[value] !== $undefined) + message.gcsql_version = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -41626,11 +54269,11 @@ * @memberof CMsgGCMsgSetOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions + * @returns {CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape} CMsgGCMsgSetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgSetOptions.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgSetOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -41644,11 +54287,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgSetOptions.verify = function verify(message) { + CMsgGCMsgSetOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + if (!$Array.isArray(message.options)) return "options: array expected"; for (var i = 0; i < message.options.length; ++i) switch (message.options[i]) { @@ -41661,16 +54308,16 @@ break; } } - if (message.client_msg_ranges != null && message.hasOwnProperty("client_msg_ranges")) { - if (!Array.isArray(message.client_msg_ranges)) + if (message.client_msg_ranges != null && $Object.hasOwnProperty.call(message, "client_msg_ranges")) { + if (!$Array.isArray(message.client_msg_ranges)) return "client_msg_ranges: array expected"; for (var i = 0; i < message.client_msg_ranges.length; ++i) { - var error = $root.CMsgGCMsgSetOptions.MessageRange.verify(message.client_msg_ranges[i]); + var error = $root.CMsgGCMsgSetOptions.MessageRange.verify(message.client_msg_ranges[i], _depth + 1); if (error) return "client_msg_ranges." + error; } } - if (message.gcsql_version != null && message.hasOwnProperty("gcsql_version")) + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) switch (message.gcsql_version) { default: return "gcsql_version: enum value expected"; @@ -41689,43 +54336,49 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions */ - CMsgGCMsgSetOptions.fromObject = function fromObject(object) { + CMsgGCMsgSetOptions.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgSetOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgSetOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgSetOptions(); if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".CMsgGCMsgSetOptions.options: array expected"); + if (!$Array.isArray(object.options)) + throw $TypeError(".CMsgGCMsgSetOptions.options: array expected"); message.options = []; for (var i = 0; i < object.options.length; ++i) switch (object.options[i]) { - default: case "NOTIFY_USER_SESSIONS": case 0: - message.options[i] = 0; + message.options[message.options.length] = 0; break; case "NOTIFY_SERVER_SESSIONS": case 1: - message.options[i] = 1; + message.options[message.options.length] = 1; break; case "NOTIFY_ACHIEVEMENTS": case 2: - message.options[i] = 2; + message.options[message.options.length] = 2; break; case "NOTIFY_VAC_ACTION": case 3: - message.options[i] = 3; + message.options[message.options.length] = 3; break; + default: } } if (object.client_msg_ranges) { - if (!Array.isArray(object.client_msg_ranges)) - throw TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: array expected"); - message.client_msg_ranges = []; + if (!$Array.isArray(object.client_msg_ranges)) + throw $TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: array expected"); + message.client_msg_ranges = $Array(object.client_msg_ranges.length); for (var i = 0; i < object.client_msg_ranges.length; ++i) { - if (typeof object.client_msg_ranges[i] !== "object") - throw TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: object expected"); - message.client_msg_ranges[i] = $root.CMsgGCMsgSetOptions.MessageRange.fromObject(object.client_msg_ranges[i]); + if (!$util.isObject(object.client_msg_ranges[i])) + throw $TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: object expected"); + message.client_msg_ranges[i] = $root.CMsgGCMsgSetOptions.MessageRange.fromObject(object.client_msg_ranges[i], _depth + 1); } } switch (object.gcsql_version) { @@ -41737,6 +54390,7 @@ case 2: message.gcsql_version = 2; break; + default: } return message; }; @@ -41750,28 +54404,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgSetOptions.toObject = function toObject(message, options) { + CMsgGCMsgSetOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.options = []; object.client_msg_ranges = []; } if (options.defaults) - object.gcsql_version = options.enums === String ? "GCSQL_VERSION_BASELINE" : 1; + object.gcsql_version = options.enums === $String ? "GCSQL_VERSION_BASELINE" : 1; if (message.options && message.options.length) { - object.options = []; + object.options = $Array(message.options.length); for (var j = 0; j < message.options.length; ++j) - object.options[j] = options.enums === String ? $root.CMsgGCMsgSetOptions.Option[message.options[j]] : message.options[j]; + object.options[j] = options.enums === $String ? $root.CMsgGCMsgSetOptions.Option[message.options[j]] === $undefined ? message.options[j] : $root.CMsgGCMsgSetOptions.Option[message.options[j]] : message.options[j]; } if (message.client_msg_ranges && message.client_msg_ranges.length) { - object.client_msg_ranges = []; + object.client_msg_ranges = $Array(message.client_msg_ranges.length); for (var j = 0; j < message.client_msg_ranges.length; ++j) - object.client_msg_ranges[j] = $root.CMsgGCMsgSetOptions.MessageRange.toObject(message.client_msg_ranges[j], options); + object.client_msg_ranges[j] = $root.CMsgGCMsgSetOptions.MessageRange.toObject(message.client_msg_ranges[j], options, _depth + 1); } - if (message.gcsql_version != null && message.hasOwnProperty("gcsql_version")) - object.gcsql_version = options.enums === String ? $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] : message.gcsql_version; + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) + object.gcsql_version = options.enums === $String ? $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] === $undefined ? message.gcsql_version : $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] : message.gcsql_version; return object; }; @@ -41782,34 +54440,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgSetOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgSetOptions.prototype.toJSON = function() { + return CMsgGCMsgSetOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgSetOptions + * @function getTypeUrl + * @memberof CMsgGCMsgSetOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgSetOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgSetOptions"; }; CMsgGCMsgSetOptions.MessageRange = (function() { /** * Properties of a MessageRange. - * @memberof CMsgGCMsgSetOptions - * @interface IMessageRange + * @typedef {Object} CMsgGCMsgSetOptions.MessageRange.$Properties * @property {number} low MessageRange low * @property {number} high MessageRange high + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MessageRange. + * @memberof CMsgGCMsgSetOptions + * @interface IMessageRange + * @augments CMsgGCMsgSetOptions.MessageRange.$Properties + * @deprecated Use CMsgGCMsgSetOptions.MessageRange.$Properties instead. + */ + + /** + * Shape of a MessageRange. + * @typedef {CMsgGCMsgSetOptions.MessageRange.$Properties} CMsgGCMsgSetOptions.MessageRange.$Shape */ /** * Constructs a new MessageRange. * @memberof CMsgGCMsgSetOptions * @classdesc Represents a MessageRange. - * @implements IMessageRange * @constructor - * @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MessageRange(properties) { + var MessageRange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MessageRange low. @@ -41832,10 +54517,14 @@ * @function create * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange instance + * @type {{ + * (properties: CMsgGCMsgSetOptions.MessageRange.$Shape): CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape; + * (properties?: CMsgGCMsgSetOptions.MessageRange.$Properties): CMsgGCMsgSetOptions.MessageRange; + * }} */ - MessageRange.create = function create(properties) { + MessageRange.create = function(properties) { return new MessageRange(properties); }; @@ -41844,15 +54533,22 @@ * @function encode * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange} message MessageRange message or plain object to encode + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties} message MessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageRange.encode = function encode(message, writer) { + MessageRange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.low); writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.high); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -41861,12 +54557,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange} message MessageRange message or plain object to encode + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties} message MessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageRange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -41876,31 +54572,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange + * @returns {CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape} MessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageRange.decode = function decode(reader, length) { + MessageRange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgSetOptions.MessageRange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgSetOptions.MessageRange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.low = reader.uint32(); - break; - case 2: - message.high = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.low = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.high = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("low")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "low")) throw $util.ProtocolError("missing required 'low'", { instance: message }); - if (!message.hasOwnProperty("high")) + if (!$Object.hasOwnProperty.call(message, "high")) throw $util.ProtocolError("missing required 'high'", { instance: message }); return message; }; @@ -41911,11 +54627,11 @@ * @memberof CMsgGCMsgSetOptions.MessageRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange + * @returns {CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape} MessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageRange.decodeDelimited = function decodeDelimited(reader) { + MessageRange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -41929,9 +54645,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageRange.verify = function verify(message) { + MessageRange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isInteger(message.low)) return "low: integer expected"; if (!$util.isInteger(message.high)) @@ -41947,9 +54667,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange */ - MessageRange.fromObject = function fromObject(object) { + MessageRange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgSetOptions.MessageRange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgSetOptions.MessageRange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgSetOptions.MessageRange(); if (object.low != null) message.low = object.low >>> 0; @@ -41967,17 +54693,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageRange.toObject = function toObject(message, options) { + MessageRange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.low = 0; object.high = 0; } - if (message.low != null && message.hasOwnProperty("low")) + if (message.low != null && $Object.hasOwnProperty.call(message, "low")) object.low = message.low; - if (message.high != null && message.hasOwnProperty("high")) + if (message.high != null && $Object.hasOwnProperty.call(message, "high")) object.high = message.high; return object; }; @@ -41989,8 +54719,22 @@ * @instance * @returns {Object.} JSON object */ - MessageRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MessageRange.prototype.toJSON = function() { + return MessageRange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MessageRange + * @function getTypeUrl + * @memberof CMsgGCMsgSetOptions.MessageRange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MessageRange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgSetOptions.MessageRange"; }; return MessageRange; @@ -42006,7 +54750,7 @@ * @property {number} NOTIFY_VAC_ACTION=3 NOTIFY_VAC_ACTION value */ CMsgGCMsgSetOptions.Option = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "NOTIFY_USER_SESSIONS"] = 0; values[valuesById[1] = "NOTIFY_SERVER_SESSIONS"] = 1; values[valuesById[2] = "NOTIFY_ACHIEVEMENTS"] = 2; @@ -42022,7 +54766,7 @@ * @property {number} GCSQL_VERSION_BOOLTYPE=2 GCSQL_VERSION_BOOLTYPE value */ CMsgGCMsgSetOptions.GCSQLVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "GCSQL_VERSION_BASELINE"] = 1; values[valuesById[2] = "GCSQL_VERSION_BOOLTYPE"] = 2; return values; @@ -42035,8 +54779,7 @@ /** * Properties of a CMsgGCHUpdateSession. - * @exports ICMsgGCHUpdateSession - * @interface ICMsgGCHUpdateSession + * @typedef {Object} CMsgGCHUpdateSession.$Properties * @property {number|Long|null} [steam_id] CMsgGCHUpdateSession steam_id * @property {number|null} [app_id] CMsgGCHUpdateSession app_id * @property {boolean|null} [online] CMsgGCHUpdateSession online @@ -42045,24 +54788,38 @@ * @property {number|null} [server_port] CMsgGCHUpdateSession server_port * @property {number|null} [os_type] CMsgGCHUpdateSession os_type * @property {number|null} [client_addr] CMsgGCHUpdateSession client_addr - * @property {Array.|null} [extra_fields] CMsgGCHUpdateSession extra_fields + * @property {Array.|null} [extra_fields] CMsgGCHUpdateSession extra_fields + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHUpdateSession. + * @exports ICMsgGCHUpdateSession + * @interface ICMsgGCHUpdateSession + * @augments CMsgGCHUpdateSession.$Properties + * @deprecated Use CMsgGCHUpdateSession.$Properties instead. + */ + + /** + * Shape of a CMsgGCHUpdateSession. + * @typedef {CMsgGCHUpdateSession.$Properties} CMsgGCHUpdateSession.$Shape */ /** * Constructs a new CMsgGCHUpdateSession. * @exports CMsgGCHUpdateSession * @classdesc Represents a CMsgGCHUpdateSession. - * @implements ICMsgGCHUpdateSession * @constructor - * @param {ICMsgGCHUpdateSession=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHUpdateSession(properties) { + var CMsgGCHUpdateSession = function (properties) { this.extra_fields = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHUpdateSession steam_id. @@ -42070,7 +54827,7 @@ * @memberof CMsgGCHUpdateSession * @instance */ - CMsgGCHUpdateSession.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHUpdateSession.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHUpdateSession app_id. @@ -42094,7 +54851,7 @@ * @memberof CMsgGCHUpdateSession * @instance */ - CMsgGCHUpdateSession.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHUpdateSession.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHUpdateSession server_addr. @@ -42130,7 +54887,7 @@ /** * CMsgGCHUpdateSession extra_fields. - * @member {Array.} extra_fields + * @member {Array.} extra_fields * @memberof CMsgGCHUpdateSession * @instance */ @@ -42141,10 +54898,14 @@ * @function create * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.$Properties=} [properties] Properties to set * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession instance + * @type {{ + * (properties: CMsgGCHUpdateSession.$Shape): CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape; + * (properties?: CMsgGCHUpdateSession.$Properties): CMsgGCHUpdateSession; + * }} */ - CMsgGCHUpdateSession.create = function create(properties) { + CMsgGCHUpdateSession.create = function(properties) { return new CMsgGCHUpdateSession(properties); }; @@ -42153,32 +54914,39 @@ * @function encode * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession} message CMsgGCHUpdateSession message or plain object to encode + * @param {CMsgGCHUpdateSession.$Properties} message CMsgGCHUpdateSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHUpdateSession.encode = function encode(message, writer) { + CMsgGCHUpdateSession.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id); - if (message.online != null && Object.hasOwnProperty.call(message, "online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.online); - if (message.server_steam_id != null && Object.hasOwnProperty.call(message, "server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.server_steam_id); - if (message.server_addr != null && Object.hasOwnProperty.call(message, "server_addr")) + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.server_addr); - if (message.server_port != null && Object.hasOwnProperty.call(message, "server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.server_port); - if (message.os_type != null && Object.hasOwnProperty.call(message, "os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.os_type); - if (message.client_addr != null && Object.hasOwnProperty.call(message, "client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.client_addr); if (message.extra_fields != null && message.extra_fields.length) for (var i = 0; i < message.extra_fields.length; ++i) - $root.CMsgGCHUpdateSession.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.CMsgGCHUpdateSession.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -42187,12 +54955,12 @@ * @function encodeDelimited * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession} message CMsgGCHUpdateSession message or plain object to encode + * @param {CMsgGCHUpdateSession.$Properties} message CMsgGCHUpdateSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHUpdateSession.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHUpdateSession.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -42202,51 +54970,92 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession + * @returns {CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape} CMsgGCHUpdateSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHUpdateSession.decode = function decode(reader, length) { + CMsgGCHUpdateSession.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHUpdateSession(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHUpdateSession(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.app_id = reader.uint32(); - break; - case 3: - message.online = reader.bool(); - break; - case 4: - message.server_steam_id = reader.fixed64(); - break; - case 5: - message.server_addr = reader.uint32(); - break; - case 6: - message.server_port = reader.uint32(); - break; - case 7: - message.os_type = reader.uint32(); - break; - case 8: - message.client_addr = reader.uint32(); - break; - case 9: - if (!(message.extra_fields && message.extra_fields.length)) - message.extra_fields = []; - message.extra_fields.push($root.CMsgGCHUpdateSession.ExtraField.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.online = reader.bool(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.server_steam_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.server_addr = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.server_port = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.os_type = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.client_addr = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 2) + break; + if (!(message.extra_fields && message.extra_fields.length)) + message.extra_fields = []; + message.extra_fields.push($root.CMsgGCHUpdateSession.ExtraField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -42256,11 +55065,11 @@ * @memberof CMsgGCHUpdateSession * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession + * @returns {CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape} CMsgGCHUpdateSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHUpdateSession.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHUpdateSession.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -42274,38 +55083,42 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHUpdateSession.verify = function verify(message) { + CMsgGCHUpdateSession.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) if (typeof message.online !== "boolean") return "online: boolean expected"; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) if (!$util.isInteger(message.server_steam_id) && !(message.server_steam_id && $util.isInteger(message.server_steam_id.low) && $util.isInteger(message.server_steam_id.high))) return "server_steam_id: integer|Long expected"; - if (message.server_addr != null && message.hasOwnProperty("server_addr")) + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) if (!$util.isInteger(message.server_addr)) return "server_addr: integer expected"; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) if (!$util.isInteger(message.server_port)) return "server_port: integer expected"; - if (message.os_type != null && message.hasOwnProperty("os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) if (!$util.isInteger(message.os_type)) return "os_type: integer expected"; - if (message.client_addr != null && message.hasOwnProperty("client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) if (!$util.isInteger(message.client_addr)) return "client_addr: integer expected"; - if (message.extra_fields != null && message.hasOwnProperty("extra_fields")) { - if (!Array.isArray(message.extra_fields)) + if (message.extra_fields != null && $Object.hasOwnProperty.call(message, "extra_fields")) { + if (!$Array.isArray(message.extra_fields)) return "extra_fields: array expected"; for (var i = 0; i < message.extra_fields.length; ++i) { - var error = $root.CMsgGCHUpdateSession.ExtraField.verify(message.extra_fields[i]); + var error = $root.CMsgGCHUpdateSession.ExtraField.verify(message.extra_fields[i], _depth + 1); if (error) return "extra_fields." + error; } @@ -42321,32 +55134,38 @@ * @param {Object.} object Plain object * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession */ - CMsgGCHUpdateSession.fromObject = function fromObject(object) { + CMsgGCHUpdateSession.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHUpdateSession) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHUpdateSession: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHUpdateSession(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.online != null) - message.online = Boolean(object.online); + message.online = $Boolean(object.online); if (object.server_steam_id != null) if ($util.Long) - (message.server_steam_id = $util.Long.fromValue(object.server_steam_id)).unsigned = false; + message.server_steam_id = $util.Long.fromValue(object.server_steam_id, true); else if (typeof object.server_steam_id === "string") - message.server_steam_id = parseInt(object.server_steam_id, 10); + message.server_steam_id = $parseInt(object.server_steam_id, 10); else if (typeof object.server_steam_id === "number") message.server_steam_id = object.server_steam_id; else if (typeof object.server_steam_id === "object") - message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(); + message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(true); if (object.server_addr != null) message.server_addr = object.server_addr >>> 0; if (object.server_port != null) @@ -42356,13 +55175,13 @@ if (object.client_addr != null) message.client_addr = object.client_addr >>> 0; if (object.extra_fields) { - if (!Array.isArray(object.extra_fields)) - throw TypeError(".CMsgGCHUpdateSession.extra_fields: array expected"); - message.extra_fields = []; + if (!$Array.isArray(object.extra_fields)) + throw $TypeError(".CMsgGCHUpdateSession.extra_fields: array expected"); + message.extra_fields = $Array(object.extra_fields.length); for (var i = 0; i < object.extra_fields.length; ++i) { - if (typeof object.extra_fields[i] !== "object") - throw TypeError(".CMsgGCHUpdateSession.extra_fields: object expected"); - message.extra_fields[i] = $root.CMsgGCHUpdateSession.ExtraField.fromObject(object.extra_fields[i]); + if (!$util.isObject(object.extra_fields[i])) + throw $TypeError(".CMsgGCHUpdateSession.extra_fields: object expected"); + message.extra_fields[i] = $root.CMsgGCHUpdateSession.ExtraField.fromObject(object.extra_fields[i], _depth + 1); } } return message; @@ -42377,56 +55196,64 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHUpdateSession.toObject = function toObject(message, options) { + CMsgGCHUpdateSession.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.extra_fields = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.app_id = 0; object.online = false; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.server_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.server_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.server_steam_id = options.longs === String ? "0" : 0; + object.server_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.server_addr = 0; object.server_port = 0; object.os_type = 0; object.client_addr = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) object.online = message.online; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) - if (typeof message.server_steam_id === "number") - object.server_steam_id = options.longs === String ? String(message.server_steam_id) : message.server_steam_id; + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.server_steam_id = typeof message.server_steam_id === "number" ? $BigInt(message.server_steam_id) : $util.Long.fromBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.server_steam_id === "number") + object.server_steam_id = options.longs === $String ? $String(message.server_steam_id) : message.server_steam_id; else - object.server_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber() : message.server_steam_id; - if (message.server_addr != null && message.hasOwnProperty("server_addr")) + object.server_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === $Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber(true) : message.server_steam_id; + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) object.server_addr = message.server_addr; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) object.server_port = message.server_port; - if (message.os_type != null && message.hasOwnProperty("os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) object.os_type = message.os_type; - if (message.client_addr != null && message.hasOwnProperty("client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) object.client_addr = message.client_addr; if (message.extra_fields && message.extra_fields.length) { - object.extra_fields = []; + object.extra_fields = $Array(message.extra_fields.length); for (var j = 0; j < message.extra_fields.length; ++j) - object.extra_fields[j] = $root.CMsgGCHUpdateSession.ExtraField.toObject(message.extra_fields[j], options); + object.extra_fields[j] = $root.CMsgGCHUpdateSession.ExtraField.toObject(message.extra_fields[j], options, _depth + 1); } return object; }; @@ -42438,34 +55265,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHUpdateSession.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHUpdateSession.prototype.toJSON = function() { + return CMsgGCHUpdateSession.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHUpdateSession + * @function getTypeUrl + * @memberof CMsgGCHUpdateSession + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHUpdateSession.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHUpdateSession"; }; CMsgGCHUpdateSession.ExtraField = (function() { /** * Properties of an ExtraField. - * @memberof CMsgGCHUpdateSession - * @interface IExtraField + * @typedef {Object} CMsgGCHUpdateSession.ExtraField.$Properties * @property {string|null} [name] ExtraField name * @property {string|null} [value] ExtraField value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtraField. + * @memberof CMsgGCHUpdateSession + * @interface IExtraField + * @augments CMsgGCHUpdateSession.ExtraField.$Properties + * @deprecated Use CMsgGCHUpdateSession.ExtraField.$Properties instead. + */ + + /** + * Shape of an ExtraField. + * @typedef {CMsgGCHUpdateSession.ExtraField.$Properties} CMsgGCHUpdateSession.ExtraField.$Shape */ /** * Constructs a new ExtraField. * @memberof CMsgGCHUpdateSession * @classdesc Represents an ExtraField. - * @implements IExtraField * @constructor - * @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.ExtraField.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtraField(properties) { + var ExtraField = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtraField name. @@ -42488,10 +55342,14 @@ * @function create * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.ExtraField.$Properties=} [properties] Properties to set * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField instance + * @type {{ + * (properties: CMsgGCHUpdateSession.ExtraField.$Shape): CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape; + * (properties?: CMsgGCHUpdateSession.ExtraField.$Properties): CMsgGCHUpdateSession.ExtraField; + * }} */ - ExtraField.create = function create(properties) { + ExtraField.create = function(properties) { return new ExtraField(properties); }; @@ -42500,17 +55358,24 @@ * @function encode * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgGCHUpdateSession.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encode = function encode(message, writer) { + ExtraField.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -42519,12 +55384,12 @@ * @function encodeDelimited * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgGCHUpdateSession.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtraField.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -42534,28 +55399,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField + * @returns {CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decode = function decode(reader, length) { + ExtraField.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHUpdateSession.ExtraField(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHUpdateSession.ExtraField(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -42565,11 +55450,11 @@ * @memberof CMsgGCHUpdateSession.ExtraField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField + * @returns {CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decodeDelimited = function decodeDelimited(reader) { + ExtraField.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -42583,13 +55468,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtraField.verify = function verify(message) { + ExtraField.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -42603,14 +55492,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField */ - ExtraField.fromObject = function fromObject(object) { + ExtraField.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHUpdateSession.ExtraField) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHUpdateSession.ExtraField: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHUpdateSession.ExtraField(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -42623,17 +55518,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtraField.toObject = function toObject(message, options) { + ExtraField.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -42645,8 +55544,22 @@ * @instance * @returns {Object.} JSON object */ - ExtraField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtraField.prototype.toJSON = function() { + return ExtraField.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtraField + * @function getTypeUrl + * @memberof CMsgGCHUpdateSession.ExtraField + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtraField.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHUpdateSession.ExtraField"; }; return ExtraField; @@ -42659,27 +55572,40 @@ /** * Properties of a CMsgNotificationOfSuspiciousActivity. - * @exports ICMsgNotificationOfSuspiciousActivity - * @interface ICMsgNotificationOfSuspiciousActivity + * @typedef {Object} CMsgNotificationOfSuspiciousActivity.$Properties * @property {number|Long|null} [steamid] CMsgNotificationOfSuspiciousActivity steamid * @property {number|null} [appid] CMsgNotificationOfSuspiciousActivity appid - * @property {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null} [multiple_instances] CMsgNotificationOfSuspiciousActivity multiple_instances + * @property {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties|null} [multiple_instances] CMsgNotificationOfSuspiciousActivity multiple_instances + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgNotificationOfSuspiciousActivity. + * @exports ICMsgNotificationOfSuspiciousActivity + * @interface ICMsgNotificationOfSuspiciousActivity + * @augments CMsgNotificationOfSuspiciousActivity.$Properties + * @deprecated Use CMsgNotificationOfSuspiciousActivity.$Properties instead. + */ + + /** + * Shape of a CMsgNotificationOfSuspiciousActivity. + * @typedef {CMsgNotificationOfSuspiciousActivity.$Properties} CMsgNotificationOfSuspiciousActivity.$Shape */ /** * Constructs a new CMsgNotificationOfSuspiciousActivity. * @exports CMsgNotificationOfSuspiciousActivity * @classdesc Represents a CMsgNotificationOfSuspiciousActivity. - * @implements ICMsgNotificationOfSuspiciousActivity * @constructor - * @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotificationOfSuspiciousActivity(properties) { + var CMsgNotificationOfSuspiciousActivity = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgNotificationOfSuspiciousActivity steamid. @@ -42687,7 +55613,7 @@ * @memberof CMsgNotificationOfSuspiciousActivity * @instance */ - CMsgNotificationOfSuspiciousActivity.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgNotificationOfSuspiciousActivity.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgNotificationOfSuspiciousActivity appid. @@ -42699,7 +55625,7 @@ /** * CMsgNotificationOfSuspiciousActivity multiple_instances. - * @member {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null|undefined} multiple_instances + * @member {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties|null|undefined} multiple_instances * @memberof CMsgNotificationOfSuspiciousActivity * @instance */ @@ -42710,10 +55636,14 @@ * @function create * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.$Properties=} [properties] Properties to set * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity instance + * @type {{ + * (properties: CMsgNotificationOfSuspiciousActivity.$Shape): CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape; + * (properties?: CMsgNotificationOfSuspiciousActivity.$Properties): CMsgNotificationOfSuspiciousActivity; + * }} */ - CMsgNotificationOfSuspiciousActivity.create = function create(properties) { + CMsgNotificationOfSuspiciousActivity.create = function(properties) { return new CMsgNotificationOfSuspiciousActivity(properties); }; @@ -42722,19 +55652,26 @@ * @function encode * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity} message CMsgNotificationOfSuspiciousActivity message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.$Properties} message CMsgNotificationOfSuspiciousActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationOfSuspiciousActivity.encode = function encode(message, writer) { + CMsgNotificationOfSuspiciousActivity.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.multiple_instances != null && Object.hasOwnProperty.call(message, "multiple_instances")) - $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.encode(message.multiple_instances, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) + $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.encode(message.multiple_instances, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -42743,12 +55680,12 @@ * @function encodeDelimited * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity} message CMsgNotificationOfSuspiciousActivity message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.$Properties} message CMsgNotificationOfSuspiciousActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationOfSuspiciousActivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotificationOfSuspiciousActivity.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -42758,31 +55695,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity + * @returns {CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape} CMsgNotificationOfSuspiciousActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationOfSuspiciousActivity.decode = function decode(reader, length) { + CMsgNotificationOfSuspiciousActivity.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationOfSuspiciousActivity(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationOfSuspiciousActivity(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.decode(reader, reader.uint32(), $undefined, _depth + 1, message.multiple_instances); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -42792,11 +55752,11 @@ * @memberof CMsgNotificationOfSuspiciousActivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity + * @returns {CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape} CMsgNotificationOfSuspiciousActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationOfSuspiciousActivity.decodeDelimited = function decodeDelimited(reader) { + CMsgNotificationOfSuspiciousActivity.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -42810,17 +55770,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotificationOfSuspiciousActivity.verify = function verify(message) { + CMsgNotificationOfSuspiciousActivity.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.multiple_instances != null && message.hasOwnProperty("multiple_instances")) { - var error = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify(message.multiple_instances); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) { + var error = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify(message.multiple_instances, _depth + 1); if (error) return "multiple_instances." + error; } @@ -42835,25 +55799,31 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity */ - CMsgNotificationOfSuspiciousActivity.fromObject = function fromObject(object) { + CMsgNotificationOfSuspiciousActivity.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationOfSuspiciousActivity) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotificationOfSuspiciousActivity(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.multiple_instances != null) { - if (typeof object.multiple_instances !== "object") - throw TypeError(".CMsgNotificationOfSuspiciousActivity.multiple_instances: object expected"); - message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.fromObject(object.multiple_instances); + if (!$util.isObject(object.multiple_instances)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.multiple_instances: object expected"); + message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.fromObject(object.multiple_instances, _depth + 1); } return message; }; @@ -42867,28 +55837,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotificationOfSuspiciousActivity.toObject = function toObject(message, options) { + CMsgNotificationOfSuspiciousActivity.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.multiple_instances = null; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.multiple_instances != null && message.hasOwnProperty("multiple_instances")) - object.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.toObject(message.multiple_instances, options); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) + object.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.toObject(message.multiple_instances, options, _depth + 1); return object; }; @@ -42899,35 +55875,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotificationOfSuspiciousActivity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotificationOfSuspiciousActivity.prototype.toJSON = function() { + return CMsgNotificationOfSuspiciousActivity.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotificationOfSuspiciousActivity + * @function getTypeUrl + * @memberof CMsgNotificationOfSuspiciousActivity + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotificationOfSuspiciousActivity.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationOfSuspiciousActivity"; }; CMsgNotificationOfSuspiciousActivity.MultipleGameInstances = (function() { /** * Properties of a MultipleGameInstances. - * @memberof CMsgNotificationOfSuspiciousActivity - * @interface IMultipleGameInstances + * @typedef {Object} CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties * @property {number|null} [app_instance_count] MultipleGameInstances app_instance_count * @property {Array.|null} [other_steamids] MultipleGameInstances other_steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MultipleGameInstances. + * @memberof CMsgNotificationOfSuspiciousActivity + * @interface IMultipleGameInstances + * @augments CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties + * @deprecated Use CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties instead. + */ + + /** + * Shape of a MultipleGameInstances. + * @typedef {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape */ /** * Constructs a new MultipleGameInstances. * @memberof CMsgNotificationOfSuspiciousActivity * @classdesc Represents a MultipleGameInstances. - * @implements IMultipleGameInstances * @constructor - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MultipleGameInstances(properties) { + var MultipleGameInstances = function (properties) { this.other_steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MultipleGameInstances app_instance_count. @@ -42950,10 +55953,14 @@ * @function create * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties=} [properties] Properties to set * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances instance + * @type {{ + * (properties: CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape): CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape; + * (properties?: CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties): CMsgNotificationOfSuspiciousActivity.MultipleGameInstances; + * }} */ - MultipleGameInstances.create = function create(properties) { + MultipleGameInstances.create = function(properties) { return new MultipleGameInstances(properties); }; @@ -42962,18 +55969,25 @@ * @function encode * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} message MultipleGameInstances message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} message MultipleGameInstances message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultipleGameInstances.encode = function encode(message, writer) { + MultipleGameInstances.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_instance_count != null && Object.hasOwnProperty.call(message, "app_instance_count")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_instance_count); if (message.other_steamids != null && message.other_steamids.length) for (var i = 0; i < message.other_steamids.length; ++i) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.other_steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -42982,12 +55996,12 @@ * @function encodeDelimited * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} message MultipleGameInstances message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} message MultipleGameInstances message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultipleGameInstances.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MultipleGameInstances.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -42997,35 +56011,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances + * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape} MultipleGameInstances * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultipleGameInstances.decode = function decode(reader, length) { + MultipleGameInstances.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_instance_count = reader.uint32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.other_steamids && message.other_steamids.length)) - message.other_steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.other_steamids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_instance_count = reader.uint32(); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.other_steamids && message.other_steamids.length)) + message.other_steamids = []; + reader.fixed64s(message.other_steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.other_steamids && message.other_steamids.length)) + message.other_steamids = []; message.other_steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -43035,11 +56070,11 @@ * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances + * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape} MultipleGameInstances * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultipleGameInstances.decodeDelimited = function decodeDelimited(reader) { + MultipleGameInstances.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -43053,14 +56088,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MultipleGameInstances.verify = function verify(message) { + MultipleGameInstances.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_instance_count != null && message.hasOwnProperty("app_instance_count")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) if (!$util.isInteger(message.app_instance_count)) return "app_instance_count: integer expected"; - if (message.other_steamids != null && message.hasOwnProperty("other_steamids")) { - if (!Array.isArray(message.other_steamids)) + if (message.other_steamids != null && $Object.hasOwnProperty.call(message, "other_steamids")) { + if (!$Array.isArray(message.other_steamids)) return "other_steamids: array expected"; for (var i = 0; i < message.other_steamids.length; ++i) if (!$util.isInteger(message.other_steamids[i]) && !(message.other_steamids[i] && $util.isInteger(message.other_steamids[i].low) && $util.isInteger(message.other_steamids[i].high))) @@ -43077,25 +56116,31 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances */ - MultipleGameInstances.fromObject = function fromObject(object) { + MultipleGameInstances.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); if (object.app_instance_count != null) message.app_instance_count = object.app_instance_count >>> 0; if (object.other_steamids) { - if (!Array.isArray(object.other_steamids)) - throw TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.other_steamids: array expected"); - message.other_steamids = []; + if (!$Array.isArray(object.other_steamids)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.other_steamids: array expected"); + message.other_steamids = $Array(object.other_steamids.length); for (var i = 0; i < object.other_steamids.length; ++i) if ($util.Long) - (message.other_steamids[i] = $util.Long.fromValue(object.other_steamids[i])).unsigned = false; + message.other_steamids[i] = $util.Long.fromValue(object.other_steamids[i], true); else if (typeof object.other_steamids[i] === "string") - message.other_steamids[i] = parseInt(object.other_steamids[i], 10); + message.other_steamids[i] = $parseInt(object.other_steamids[i], 10); else if (typeof object.other_steamids[i] === "number") message.other_steamids[i] = object.other_steamids[i]; else if (typeof object.other_steamids[i] === "object") - message.other_steamids[i] = new $util.LongBits(object.other_steamids[i].low >>> 0, object.other_steamids[i].high >>> 0).toNumber(); + message.other_steamids[i] = new $util.LongBits(object.other_steamids[i].low >>> 0, object.other_steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -43109,23 +56154,29 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MultipleGameInstances.toObject = function toObject(message, options) { + MultipleGameInstances.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.other_steamids = []; if (options.defaults) object.app_instance_count = 0; - if (message.app_instance_count != null && message.hasOwnProperty("app_instance_count")) + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) object.app_instance_count = message.app_instance_count; if (message.other_steamids && message.other_steamids.length) { - object.other_steamids = []; + object.other_steamids = $Array(message.other_steamids.length); for (var j = 0; j < message.other_steamids.length; ++j) - if (typeof message.other_steamids[j] === "number") - object.other_steamids[j] = options.longs === String ? String(message.other_steamids[j]) : message.other_steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.other_steamids[j] = typeof message.other_steamids[j] === "number" ? $BigInt(message.other_steamids[j]) : $util.Long.fromBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.other_steamids[j] === "number") + object.other_steamids[j] = options.longs === $String ? $String(message.other_steamids[j]) : message.other_steamids[j]; else - object.other_steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.other_steamids[j]) : options.longs === Number ? new $util.LongBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0).toNumber() : message.other_steamids[j]; + object.other_steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.other_steamids[j]) : options.longs === $Number ? new $util.LongBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0).toNumber(true) : message.other_steamids[j]; } return object; }; @@ -43137,8 +56188,22 @@ * @instance * @returns {Object.} JSON object */ - MultipleGameInstances.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MultipleGameInstances.prototype.toJSON = function() { + return MultipleGameInstances.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MultipleGameInstances + * @function getTypeUrl + * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MultipleGameInstances.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationOfSuspiciousActivity.MultipleGameInstances"; }; return MultipleGameInstances; @@ -43167,32 +56232,45 @@ protobuf.FileDescriptorSet = (function() { + /** + * Properties of a FileDescriptorSet. + * @typedef {Object} google.protobuf.FileDescriptorSet.$Properties + * @property {Array.|null} [file] FileDescriptorSet file + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a FileDescriptorSet. * @memberof google.protobuf * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @augments google.protobuf.FileDescriptorSet.$Properties + * @deprecated Use google.protobuf.FileDescriptorSet.$Properties instead. + */ + + /** + * Shape of a FileDescriptorSet. + * @typedef {google.protobuf.FileDescriptorSet.$Properties} google.protobuf.FileDescriptorSet.$Shape */ /** * Constructs a new FileDescriptorSet. * @memberof google.protobuf * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorSet(properties) { + var FileDescriptorSet = function (properties) { this.file = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorSet file. - * @member {Array.} file + * @member {Array.} file * @memberof google.protobuf.FileDescriptorSet * @instance */ @@ -43203,10 +56281,14 @@ * @function create * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @type {{ + * (properties: google.protobuf.FileDescriptorSet.$Shape): google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape; + * (properties?: google.protobuf.FileDescriptorSet.$Properties): google.protobuf.FileDescriptorSet; + * }} */ - FileDescriptorSet.create = function create(properties) { + FileDescriptorSet.create = function(properties) { return new FileDescriptorSet(properties); }; @@ -43215,16 +56297,23 @@ * @function encode * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + FileDescriptorSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.file != null && message.file.length) for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -43233,12 +56322,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -43248,27 +56337,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decode = function decode(reader, length) { + FileDescriptorSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -43278,11 +56384,11 @@ * @memberof google.protobuf.FileDescriptorSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -43296,14 +56402,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorSet.verify = function verify(message) { + FileDescriptorSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.file != null && $Object.hasOwnProperty.call(message, "file")) { + if (!$Array.isArray(message.file)) return "file: array expected"; for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i], _depth + 1); if (error) return "file." + error; } @@ -43319,18 +56429,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - FileDescriptorSet.fromObject = function fromObject(object) { + FileDescriptorSet.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorSet(); if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; + if (!$Array.isArray(object.file)) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = $Array(object.file.length); for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + if (!$util.isObject(object.file[i])) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], _depth + 1); } } return message; @@ -43345,16 +56461,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + FileDescriptorSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.file = []; if (message.file && message.file.length) { - object.file = []; + object.file = $Array(message.file.length); for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options, _depth + 1); } return object; }; @@ -43366,8 +56486,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorSet.prototype.toJSON = function() { + return FileDescriptorSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorSet"; }; return FileDescriptorSet; @@ -43377,38 +56511,51 @@ /** * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto + * @typedef {Object} google.protobuf.FileDescriptorProto.$Properties * @property {string|null} [name] FileDescriptorProto name * @property {string|null} ["package"] FileDescriptorProto package * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.|null} [message_type] FileDescriptorProto message_type + * @property {Array.|null} [enum_type] FileDescriptorProto enum_type + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.FileOptions.$Properties|null} [options] FileDescriptorProto options + * @property {google.protobuf.SourceCodeInfo.$Properties|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @augments google.protobuf.FileDescriptorProto.$Properties + * @deprecated Use google.protobuf.FileDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FileDescriptorProto. + * @typedef {google.protobuf.FileDescriptorProto.$Properties} google.protobuf.FileDescriptorProto.$Shape */ /** * Constructs a new FileDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorProto(properties) { + var FileDescriptorProto = function (properties) { this.dependency = []; this.message_type = []; this.enum_type = []; this.service = []; this.extension = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorProto name. @@ -43436,7 +56583,7 @@ /** * FileDescriptorProto message_type. - * @member {Array.} message_type + * @member {Array.} message_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -43444,7 +56591,7 @@ /** * FileDescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -43452,7 +56599,7 @@ /** * FileDescriptorProto service. - * @member {Array.} service + * @member {Array.} service * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -43460,7 +56607,7 @@ /** * FileDescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -43468,7 +56615,7 @@ /** * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options + * @member {google.protobuf.FileOptions.$Properties|null|undefined} options * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -43476,7 +56623,7 @@ /** * FileDescriptorProto source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info + * @member {google.protobuf.SourceCodeInfo.$Properties|null|undefined} source_code_info * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -43487,10 +56634,14 @@ * @function create * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FileDescriptorProto.$Shape): google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape; + * (properties?: google.protobuf.FileDescriptorProto.$Properties): google.protobuf.FileDescriptorProto; + * }} */ - FileDescriptorProto.create = function create(properties) { + FileDescriptorProto.create = function(properties) { return new FileDescriptorProto(properties); }; @@ -43499,36 +56650,43 @@ * @function encode * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + FileDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); if (message.dependency != null && message.dependency.length) for (var i = 0; i < message.dependency.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); if (message.message_type != null && message.message_type.length) for (var i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.service != null && message.service.length) for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -43537,12 +56695,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -43552,59 +56710,100 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decode = function decode(reader, length) { + FileDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message["package"] = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.message_type && message.message_type.length)) + message.message_type = []; + message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.source_code_info); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -43614,11 +56813,11 @@ * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -43632,65 +56831,69 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorProto.verify = function verify(message) { + FileDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) if (!$util.isString(message["package"])) return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) + if (message.dependency != null && $Object.hasOwnProperty.call(message, "dependency")) { + if (!$Array.isArray(message.dependency)) return "dependency: array expected"; for (var i = 0; i < message.dependency.length; ++i) if (!$util.isString(message.dependency[i])) return "dependency: string[] expected"; } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) + if (message.message_type != null && $Object.hasOwnProperty.call(message, "message_type")) { + if (!$Array.isArray(message.message_type)) return "message_type: array expected"; for (var i = 0; i < message.message_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i], _depth + 1); if (error) return "message_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) + if (message.service != null && $Object.hasOwnProperty.call(message, "service")) { + if (!$Array.isArray(message.service)) return "service: array expected"; for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i], _depth + 1); if (error) return "service." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info, _depth + 1); if (error) return "source_code_info." + error; } @@ -43705,70 +56908,76 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - FileDescriptorProto.fromObject = function fromObject(object) { + FileDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object["package"] != null) - message["package"] = String(object["package"]); + message["package"] = $String(object["package"]); if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; + if (!$Array.isArray(object.dependency)) + throw $TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = $Array(object.dependency.length); for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); + message.dependency[i] = $String(object.dependency[i]); } if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; + if (!$Array.isArray(object.message_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); + message.message_type = $Array(object.message_type.length); for (var i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); + if (!$util.isObject(object.message_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); + message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; + if (!$Array.isArray(object.service)) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = $Array(object.service.length); for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + if (!$util.isObject(object.service[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options, _depth + 1); } if (object.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); + if (!$util.isObject(object.source_code_info)) + throw $TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); + message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info, _depth + 1); } return message; }; @@ -43782,9 +56991,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.dependency = []; @@ -43799,39 +57012,39 @@ object.options = null; object.source_code_info = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; if (message.dependency && message.dependency.length) { - object.dependency = []; + object.dependency = $Array(message.dependency.length); for (var j = 0; j < message.dependency.length; ++j) object.dependency[j] = message.dependency[j]; } if (message.message_type && message.message_type.length) { - object.message_type = []; + object.message_type = $Array(message.message_type.length); for (var j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); + object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.service && message.service.length) { - object.service = []; + object.service = $Array(message.service.length); for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, _depth + 1); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options, _depth + 1); return object; }; @@ -43842,8 +57055,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorProto.prototype.toJSON = function() { + return FileDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorProto"; }; return FileDescriptorProto; @@ -43851,38 +57078,51 @@ protobuf.DescriptorProto = (function() { + /** + * Properties of a DescriptorProto. + * @typedef {Object} google.protobuf.DescriptorProto.$Properties + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nested_type] DescriptorProto nested_type + * @property {Array.|null} [enum_type] DescriptorProto enum_type + * @property {Array.|null} [extension_range] DescriptorProto extension_range + * @property {google.protobuf.MessageOptions.$Properties|null} [options] DescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a DescriptorProto. * @memberof google.protobuf * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @augments google.protobuf.DescriptorProto.$Properties + * @deprecated Use google.protobuf.DescriptorProto.$Properties instead. + */ + + /** + * Shape of a DescriptorProto. + * @typedef {google.protobuf.DescriptorProto.$Properties} google.protobuf.DescriptorProto.$Shape */ /** * Constructs a new DescriptorProto. * @memberof google.protobuf * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function DescriptorProto(properties) { + var DescriptorProto = function (properties) { this.field = []; this.extension = []; this.nested_type = []; this.enum_type = []; this.extension_range = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * DescriptorProto name. @@ -43894,7 +57134,7 @@ /** * DescriptorProto field. - * @member {Array.} field + * @member {Array.} field * @memberof google.protobuf.DescriptorProto * @instance */ @@ -43902,7 +57142,7 @@ /** * DescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.DescriptorProto * @instance */ @@ -43910,7 +57150,7 @@ /** * DescriptorProto nested_type. - * @member {Array.} nested_type + * @member {Array.} nested_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -43918,7 +57158,7 @@ /** * DescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -43926,7 +57166,7 @@ /** * DescriptorProto extension_range. - * @member {Array.} extension_range + * @member {Array.} extension_range * @memberof google.protobuf.DescriptorProto * @instance */ @@ -43934,7 +57174,7 @@ /** * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options + * @member {google.protobuf.MessageOptions.$Properties|null|undefined} options * @memberof google.protobuf.DescriptorProto * @instance */ @@ -43945,10 +57185,14 @@ * @function create * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.$Shape): google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape; + * (properties?: google.protobuf.DescriptorProto.$Properties): google.protobuf.DescriptorProto; + * }} */ - DescriptorProto.create = function create(properties) { + DescriptorProto.create = function(properties) { return new DescriptorProto(properties); }; @@ -43957,32 +57201,39 @@ * @function encode * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + DescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); if (message.nested_type != null && message.nested_type.length) for (var i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.extension_range != null && message.extension_range.length) for (var i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -43991,12 +57242,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -44006,53 +57257,88 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decode = function decode(reader, length) { + DescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.nested_type && message.nested_type.length)) + message.nested_type = []; + message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.extension_range && message.extension_range.length)) + message.extension_range = []; + message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -44062,11 +57348,11 @@ * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + DescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -44080,59 +57366,63 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DescriptorProto.verify = function verify(message) { + DescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) { + if (!$Array.isArray(message.field)) return "field: array expected"; for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i], _depth + 1); if (error) return "field." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) + if (message.nested_type != null && $Object.hasOwnProperty.call(message, "nested_type")) { + if (!$Array.isArray(message.nested_type)) return "nested_type: array expected"; for (var i = 0; i < message.nested_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i], _depth + 1); if (error) return "nested_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) + if (message.extension_range != null && $Object.hasOwnProperty.call(message, "extension_range")) { + if (!$Array.isArray(message.extension_range)) return "extension_range: array expected"; for (var i = 0; i < message.extension_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i], _depth + 1); if (error) return "extension_range." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -44147,66 +57437,72 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto} DescriptorProto */ - DescriptorProto.fromObject = function fromObject(object) { + DescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; + if (!$Array.isArray(object.field)) + throw $TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = $Array(object.field.length); for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + if (!$util.isObject(object.field[i])) + throw $TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; + if (!$Array.isArray(object.nested_type)) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); + message.nested_type = $Array(object.nested_type.length); for (var i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); + if (!$util.isObject(object.nested_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); + message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; + if (!$Array.isArray(object.extension_range)) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); + message.extension_range = $Array(object.extension_range.length); for (var i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); + if (!$util.isObject(object.extension_range[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); + message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -44220,9 +57516,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + DescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.field = []; @@ -44235,35 +57535,35 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.field && message.field.length) { - object.field = []; + object.field = $Array(message.field.length); for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options, _depth + 1); } if (message.nested_type && message.nested_type.length) { - object.nested_type = []; + object.nested_type = $Array(message.nested_type.length); for (var j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); + object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.extension_range && message.extension_range.length) { - object.extension_range = []; + object.extension_range = $Array(message.extension_range.length); for (var j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options); + object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -44274,34 +57574,61 @@ * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + DescriptorProto.prototype.toJSON = function() { + return DescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + DescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto"; }; DescriptorProto.ExtensionRange = (function() { /** * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange + * @typedef {Object} google.protobuf.DescriptorProto.ExtensionRange.$Properties * @property {number|null} [start] ExtensionRange start * @property {number|null} [end] ExtensionRange end + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @augments google.protobuf.DescriptorProto.ExtensionRange.$Properties + * @deprecated Use google.protobuf.DescriptorProto.ExtensionRange.$Properties instead. + */ + + /** + * Shape of an ExtensionRange. + * @typedef {google.protobuf.DescriptorProto.ExtensionRange.$Properties} google.protobuf.DescriptorProto.ExtensionRange.$Shape */ /** * Constructs a new ExtensionRange. * @memberof google.protobuf.DescriptorProto * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtensionRange(properties) { + var ExtensionRange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtensionRange start. @@ -44324,10 +57651,14 @@ * @function create * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.ExtensionRange.$Shape): google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape; + * (properties?: google.protobuf.DescriptorProto.ExtensionRange.$Properties): google.protobuf.DescriptorProto.ExtensionRange; + * }} */ - ExtensionRange.create = function create(properties) { + ExtensionRange.create = function(properties) { return new ExtensionRange(properties); }; @@ -44336,17 +57667,24 @@ * @function encode * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encode = function encode(message, writer) { + ExtensionRange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -44355,12 +57693,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtensionRange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -44370,28 +57708,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decode = function decode(reader, length) { + ExtensionRange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto.ExtensionRange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.start = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.end = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -44401,11 +57759,11 @@ * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + ExtensionRange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -44419,13 +57777,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtensionRange.verify = function verify(message) { + ExtensionRange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -44439,9 +57801,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange */ - ExtensionRange.fromObject = function fromObject(object) { + ExtensionRange.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); if (object.start != null) message.start = object.start | 0; @@ -44459,17 +57827,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRange.toObject = function toObject(message, options) { + ExtensionRange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -44481,8 +57853,22 @@ * @instance * @returns {Object.} JSON object */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtensionRange.prototype.toJSON = function() { + return ExtensionRange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtensionRange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto.ExtensionRange"; }; return ExtensionRange; @@ -44495,8 +57881,7 @@ /** * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto + * @typedef {Object} google.protobuf.FieldDescriptorProto.$Properties * @property {string|null} [name] FieldDescriptorProto name * @property {number|null} [number] FieldDescriptorProto number * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label @@ -44504,23 +57889,37 @@ * @property {string|null} [type_name] FieldDescriptorProto type_name * @property {string|null} [extendee] FieldDescriptorProto extendee * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {google.protobuf.FieldOptions.$Properties|null} [options] FieldDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @augments google.protobuf.FieldDescriptorProto.$Properties + * @deprecated Use google.protobuf.FieldDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FieldDescriptorProto. + * @typedef {google.protobuf.FieldDescriptorProto.$Properties} google.protobuf.FieldDescriptorProto.$Shape */ /** * Constructs a new FieldDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FieldDescriptorProto(properties) { + var FieldDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldDescriptorProto name. @@ -44580,7 +57979,7 @@ /** * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options + * @member {google.protobuf.FieldOptions.$Properties|null|undefined} options * @memberof google.protobuf.FieldDescriptorProto * @instance */ @@ -44591,10 +57990,14 @@ * @function create * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FieldDescriptorProto.$Shape): google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape; + * (properties?: google.protobuf.FieldDescriptorProto.$Properties): google.protobuf.FieldDescriptorProto; + * }} */ - FieldDescriptorProto.create = function create(properties) { + FieldDescriptorProto.create = function(properties) { return new FieldDescriptorProto(properties); }; @@ -44603,29 +58006,36 @@ * @function encode * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + FieldDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.type_name != null && Object.hasOwnProperty.call(message, "type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -44634,12 +58044,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -44649,46 +58059,96 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decode = function decode(reader, length) { + FieldDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldDescriptorProto(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Label[value] !== $undefined) + message.label = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 5: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Type[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 6: { + if (wireType !== 2) + break; + message.type_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.extendee = reader.string(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.default_value = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -44698,11 +58158,11 @@ * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FieldDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -44716,16 +58176,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldDescriptorProto.verify = function verify(message) { + FieldDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) switch (message.label) { default: return "label: enum value expected"; @@ -44734,7 +58198,7 @@ case 3: break; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -44758,17 +58222,17 @@ case 18: break; } - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) if (!$util.isString(message.type_name)) return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) if (!$util.isString(message.extendee)) return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) if (!$util.isString(message.default_value)) return "default_value: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -44783,12 +58247,18 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - FieldDescriptorProto.fromObject = function fromObject(object) { + FieldDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; switch (object.label) { @@ -44804,6 +58274,7 @@ case 3: message.label = 3; break; + default: } switch (object.type) { case "TYPE_DOUBLE": @@ -44878,17 +58349,18 @@ case 18: message.type = 18; break; + default: } if (object.type_name != null) - message.type_name = String(object.type_name); + message.type_name = $String(object.type_name); if (object.extendee != null) - message.extendee = String(object.extendee); + message.extendee = $String(object.extendee); if (object.default_value != null) - message.default_value = String(object.default_value); + message.default_value = $String(object.default_value); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -44902,36 +58374,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + FieldDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.extendee = ""; object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.label = options.enums === $String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === $String ? "TYPE_DOUBLE" : 1; object.type_name = ""; object.default_value = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) + object.label = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === $undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === $undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -44942,8 +58418,22 @@ * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldDescriptorProto.prototype.toJSON = function() { + return FieldDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldDescriptorProto"; }; /** @@ -44970,7 +58460,7 @@ * @property {number} TYPE_SINT64=18 TYPE_SINT64 value */ FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "TYPE_DOUBLE"] = 1; values[valuesById[2] = "TYPE_FLOAT"] = 2; values[valuesById[3] = "TYPE_INT64"] = 3; @@ -45001,7 +58491,7 @@ * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value */ FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "LABEL_OPTIONAL"] = 1; values[valuesById[2] = "LABEL_REQUIRED"] = 2; values[valuesById[3] = "LABEL_REPEATED"] = 3; @@ -45013,30 +58503,43 @@ protobuf.EnumDescriptorProto = (function() { + /** + * Properties of an EnumDescriptorProto. + * @typedef {Object} google.protobuf.EnumDescriptorProto.$Properties + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.EnumOptions.$Properties|null} [options] EnumDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumDescriptorProto. * @memberof google.protobuf * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @augments google.protobuf.EnumDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumDescriptorProto. + * @typedef {google.protobuf.EnumDescriptorProto.$Properties} google.protobuf.EnumDescriptorProto.$Shape */ /** * Constructs a new EnumDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumDescriptorProto(properties) { + var EnumDescriptorProto = function (properties) { this.value = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumDescriptorProto name. @@ -45048,7 +58551,7 @@ /** * EnumDescriptorProto value. - * @member {Array.} value + * @member {Array.} value * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -45056,7 +58559,7 @@ /** * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options + * @member {google.protobuf.EnumOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -45067,10 +58570,14 @@ * @function create * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumDescriptorProto.$Shape): google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumDescriptorProto.$Properties): google.protobuf.EnumDescriptorProto; + * }} */ - EnumDescriptorProto.create = function create(properties) { + EnumDescriptorProto.create = function(properties) { return new EnumDescriptorProto(properties); }; @@ -45079,20 +58586,27 @@ * @function encode * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + EnumDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -45101,12 +58615,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -45116,33 +58630,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decode = function decode(reader, length) { + EnumDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -45152,11 +58689,11 @@ * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -45170,23 +58707,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumDescriptorProto.verify = function verify(message) { + EnumDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) { + if (!$Array.isArray(message.value)) return "value: array expected"; for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i], _depth + 1); if (error) return "value." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -45201,26 +58742,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - EnumDescriptorProto.fromObject = function fromObject(object) { + EnumDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; + if (!$Array.isArray(object.value)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = $Array(object.value.length); for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + if (!$util.isObject(object.value[i])) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -45234,9 +58781,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.value = []; @@ -45244,15 +58795,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.value && message.value.length) { - object.value = []; + object.value = $Array(message.value.length); for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -45263,8 +58814,22 @@ * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumDescriptorProto.prototype.toJSON = function() { + return EnumDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumDescriptorProto"; }; return EnumDescriptorProto; @@ -45274,27 +58839,40 @@ /** * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto + * @typedef {Object} google.protobuf.EnumValueDescriptorProto.$Properties * @property {string|null} [name] EnumValueDescriptorProto name * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + * @property {google.protobuf.EnumValueOptions.$Properties|null} [options] EnumValueDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @augments google.protobuf.EnumValueDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumValueDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumValueDescriptorProto. + * @typedef {google.protobuf.EnumValueDescriptorProto.$Properties} google.protobuf.EnumValueDescriptorProto.$Shape */ /** * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueDescriptorProto(properties) { + var EnumValueDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueDescriptorProto name. @@ -45314,7 +58892,7 @@ /** * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @member {google.protobuf.EnumValueOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ @@ -45325,10 +58903,14 @@ * @function create * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumValueDescriptorProto.$Shape): google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumValueDescriptorProto.$Properties): google.protobuf.EnumValueDescriptorProto; + * }} */ - EnumValueDescriptorProto.create = function create(properties) { + EnumValueDescriptorProto.create = function(properties) { return new EnumValueDescriptorProto(properties); }; @@ -45337,19 +58919,26 @@ * @function encode * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer) { + EnumValueDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -45358,12 +58947,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -45373,31 +58962,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decode = function decode(reader, length) { + EnumValueDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -45407,11 +59019,11 @@ * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumValueDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -45425,17 +59037,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueDescriptorProto.verify = function verify(message) { + EnumValueDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -45450,18 +59066,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { + EnumValueDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -45475,21 +59097,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + EnumValueDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.number = 0; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -45500,8 +59126,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueDescriptorProto.prototype.toJSON = function() { + return EnumValueDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueDescriptorProto"; }; return EnumValueDescriptorProto; @@ -45509,30 +59149,43 @@ protobuf.ServiceDescriptorProto = (function() { + /** + * Properties of a ServiceDescriptorProto. + * @typedef {Object} google.protobuf.ServiceDescriptorProto.$Properties + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.ServiceOptions.$Properties|null} [options] ServiceDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceDescriptorProto. * @memberof google.protobuf * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + * @augments google.protobuf.ServiceDescriptorProto.$Properties + * @deprecated Use google.protobuf.ServiceDescriptorProto.$Properties instead. + */ + + /** + * Shape of a ServiceDescriptorProto. + * @typedef {google.protobuf.ServiceDescriptorProto.$Properties} google.protobuf.ServiceDescriptorProto.$Shape */ /** * Constructs a new ServiceDescriptorProto. * @memberof google.protobuf * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceDescriptorProto(properties) { + var ServiceDescriptorProto = function (properties) { this.method = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceDescriptorProto name. @@ -45544,7 +59197,7 @@ /** * ServiceDescriptorProto method. - * @member {Array.} method + * @member {Array.} method * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -45552,7 +59205,7 @@ /** * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options + * @member {google.protobuf.ServiceOptions.$Properties|null|undefined} options * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -45563,10 +59216,14 @@ * @function create * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @type {{ + * (properties: google.protobuf.ServiceDescriptorProto.$Shape): google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape; + * (properties?: google.protobuf.ServiceDescriptorProto.$Properties): google.protobuf.ServiceDescriptorProto; + * }} */ - ServiceDescriptorProto.create = function create(properties) { + ServiceDescriptorProto.create = function(properties) { return new ServiceDescriptorProto(properties); }; @@ -45575,20 +59232,27 @@ * @function encode * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + ServiceDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -45597,12 +59261,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -45612,33 +59276,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decode = function decode(reader, length) { + ServiceDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -45648,11 +59335,11 @@ * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ServiceDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -45666,23 +59353,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceDescriptorProto.verify = function verify(message) { + ServiceDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) { + if (!$Array.isArray(message.method)) return "method: array expected"; for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i], _depth + 1); if (error) return "method." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -45697,26 +59388,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - ServiceDescriptorProto.fromObject = function fromObject(object) { + ServiceDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; + if (!$Array.isArray(object.method)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = $Array(object.method.length); for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + if (!$util.isObject(object.method[i])) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -45730,9 +59427,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.method = []; @@ -45740,15 +59441,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.method && message.method.length) { - object.method = []; + object.method = $Array(message.method.length); for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -45759,8 +59460,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceDescriptorProto.prototype.toJSON = function() { + return ServiceDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceDescriptorProto"; }; return ServiceDescriptorProto; @@ -45770,28 +59485,41 @@ /** * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto + * @typedef {Object} google.protobuf.MethodDescriptorProto.$Properties * @property {string|null} [name] MethodDescriptorProto name * @property {string|null} [input_type] MethodDescriptorProto input_type * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {google.protobuf.MethodOptions.$Properties|null} [options] MethodDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @augments google.protobuf.MethodDescriptorProto.$Properties + * @deprecated Use google.protobuf.MethodDescriptorProto.$Properties instead. + */ + + /** + * Shape of a MethodDescriptorProto. + * @typedef {google.protobuf.MethodDescriptorProto.$Properties} google.protobuf.MethodDescriptorProto.$Shape */ /** * Constructs a new MethodDescriptorProto. * @memberof google.protobuf * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodDescriptorProto(properties) { + var MethodDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodDescriptorProto name. @@ -45819,7 +59547,7 @@ /** * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options + * @member {google.protobuf.MethodOptions.$Properties|null|undefined} options * @memberof google.protobuf.MethodDescriptorProto * @instance */ @@ -45830,10 +59558,14 @@ * @function create * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @type {{ + * (properties: google.protobuf.MethodDescriptorProto.$Shape): google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape; + * (properties?: google.protobuf.MethodDescriptorProto.$Properties): google.protobuf.MethodDescriptorProto; + * }} */ - MethodDescriptorProto.create = function create(properties) { + MethodDescriptorProto.create = function(properties) { return new MethodDescriptorProto(properties); }; @@ -45842,21 +59574,28 @@ * @function encode * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + MethodDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.input_type != null && Object.hasOwnProperty.call(message, "input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -45865,12 +59604,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -45880,34 +59619,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decode = function decode(reader, length) { + MethodDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.input_type = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.output_type = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -45917,11 +59682,11 @@ * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MethodDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -45935,20 +59700,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodDescriptorProto.verify = function verify(message) { + MethodDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) if (!$util.isString(message.input_type)) return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) if (!$util.isString(message.output_type)) return "output_type: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -45963,20 +59732,26 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - MethodDescriptorProto.fromObject = function fromObject(object) { + MethodDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.input_type != null) - message.input_type = String(object.input_type); + message.input_type = $String(object.input_type); if (object.output_type != null) - message.output_type = String(object.output_type); + message.output_type = $String(object.output_type); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -45990,9 +59765,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -46000,14 +59779,14 @@ object.output_type = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -46018,8 +59797,22 @@ * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodDescriptorProto.prototype.toJSON = function() { + return MethodDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodDescriptorProto"; }; return MethodDescriptorProto; @@ -46029,8 +59822,7 @@ /** * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions + * @typedef {Object} google.protobuf.FileOptions.$Properties * @property {string|null} [java_package] FileOptions java_package * @property {string|null} [java_outer_classname] FileOptions java_outer_classname * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files @@ -46039,24 +59831,38 @@ * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services * @property {boolean|null} [java_generic_services] FileOptions java_generic_services * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @augments google.protobuf.FileOptions.$Properties + * @deprecated Use google.protobuf.FileOptions.$Properties instead. + */ + + /** + * Shape of a FileOptions. + * @typedef {google.protobuf.FileOptions.$Properties} google.protobuf.FileOptions.$Shape */ /** * Constructs a new FileOptions. * @memberof google.protobuf * @classdesc Represents a FileOptions. - * @implements IFileOptions * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileOptions(properties) { + var FileOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileOptions java_package. @@ -46124,7 +59930,7 @@ /** * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FileOptions * @instance */ @@ -46135,10 +59941,14 @@ * @function create * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileOptions} FileOptions instance + * @type {{ + * (properties: google.protobuf.FileOptions.$Shape): google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape; + * (properties?: google.protobuf.FileOptions.$Properties): google.protobuf.FileOptions; + * }} */ - FileOptions.create = function create(properties) { + FileOptions.create = function(properties) { return new FileOptions(properties); }; @@ -46147,32 +59957,39 @@ * @function encode * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + FileOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.java_package != null && Object.hasOwnProperty.call(message, "java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -46181,12 +59998,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -46196,51 +60013,98 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decode = function decode(reader, length) { + FileOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.java_package = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.java_outer_classname = reader.string(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.java_multiple_files = reader.bool(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.java_generate_equals_and_hash = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FileOptions.OptimizeMode[value] !== $undefined) + message.optimize_for = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 16: { + if (wireType !== 0) + break; + message.cc_generic_services = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.java_generic_services = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.py_generic_services = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -46250,11 +60114,11 @@ * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -46268,22 +60132,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileOptions.verify = function verify(message) { + FileOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) if (!$util.isString(message.java_package)) return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) if (!$util.isString(message.java_outer_classname)) return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) if (typeof message.java_multiple_files !== "boolean") return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) if (typeof message.java_generate_equals_and_hash !== "boolean") return "java_generate_equals_and_hash: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) switch (message.optimize_for) { default: return "optimize_for: enum value expected"; @@ -46292,20 +60160,20 @@ case 3: break; } - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) if (typeof message.cc_generic_services !== "boolean") return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) if (typeof message.java_generic_services !== "boolean") return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) if (typeof message.py_generic_services !== "boolean") return "py_generic_services: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -46321,18 +60189,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileOptions} FileOptions */ - FileOptions.fromObject = function fromObject(object) { + FileOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileOptions(); if (object.java_package != null) - message.java_package = String(object.java_package); + message.java_package = $String(object.java_package); if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); + message.java_outer_classname = $String(object.java_outer_classname); if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); + message.java_multiple_files = $Boolean(object.java_multiple_files); if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); + message.java_generate_equals_and_hash = $Boolean(object.java_generate_equals_and_hash); switch (object.optimize_for) { case "SPEED": case 1: @@ -46346,21 +60220,22 @@ case 3: message.optimize_for = 3; break; + default: } if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); + message.cc_generic_services = $Boolean(object.cc_generic_services); if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); + message.java_generic_services = $Boolean(object.java_generic_services); if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); + message.py_generic_services = $Boolean(object.py_generic_services); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -46375,42 +60250,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + FileOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { object.java_package = ""; object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; + object.optimize_for = options.enums === $String ? "SPEED" : 1; object.java_multiple_files = false; object.cc_generic_services = false; object.java_generic_services = false; object.py_generic_services = false; object.java_generate_equals_and_hash = false; } - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) + object.optimize_for = options.enums === $String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] === $undefined ? message.optimize_for : $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) object.java_multiple_files = message.java_multiple_files; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -46422,8 +60301,22 @@ * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileOptions.prototype.toJSON = function() { + return FileOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileOptions"; }; /** @@ -46435,7 +60328,7 @@ * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value */ FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "SPEED"] = 1; values[valuesById[2] = "CODE_SIZE"] = 2; values[valuesById[3] = "LITE_RUNTIME"] = 3; @@ -46449,30 +60342,45 @@ /** * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions + * @typedef {Object} google.protobuf.MessageOptions.$Properties * @property {boolean|null} [message_set_wire_format] MessageOptions message_set_wire_format * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option * @property {number|null} [".msgpool_soft_limit"] MessageOptions .msgpool_soft_limit * @property {number|null} [".msgpool_hard_limit"] MessageOptions .msgpool_hard_limit + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @augments google.protobuf.MessageOptions.$Properties + * @deprecated Use google.protobuf.MessageOptions.$Properties instead. + */ + + /** + * Shape of a MessageOptions. + * @typedef {google.protobuf.MessageOptions.$Properties} google.protobuf.MessageOptions.$Shape */ /** * Constructs a new MessageOptions. * @memberof google.protobuf * @classdesc Represents a MessageOptions. - * @implements IMessageOptions * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set + * @property {number} ".msgpool_soft_limit" MessageOptions .msgpool_soft_limit + * @property {number} ".msgpool_hard_limit" MessageOptions .msgpool_hard_limit + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MessageOptions(properties) { + var MessageOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MessageOptions message_set_wire_format. @@ -46492,26 +60400,13 @@ /** * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MessageOptions * @instance */ MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * MessageOptions .msgpool_soft_limit. - * @member {number} .msgpool_soft_limit - * @memberof google.protobuf.MessageOptions - * @instance - */ MessageOptions.prototype[".msgpool_soft_limit"] = 32; - - /** - * MessageOptions .msgpool_hard_limit. - * @member {number} .msgpool_hard_limit - * @memberof google.protobuf.MessageOptions - * @instance - */ MessageOptions.prototype[".msgpool_hard_limit"] = 384; /** @@ -46519,10 +60414,14 @@ * @function create * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @type {{ + * (properties: google.protobuf.MessageOptions.$Shape): google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape; + * (properties?: google.protobuf.MessageOptions.$Properties): google.protobuf.MessageOptions; + * }} */ - MessageOptions.create = function create(properties) { + MessageOptions.create = function(properties) { return new MessageOptions(properties); }; @@ -46531,24 +60430,31 @@ * @function encode * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + MessageOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".msgpool_soft_limit"] != null && Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) writer.uint32(/* id 60000, wireType 0 =*/480000).int32(message[".msgpool_soft_limit"]); - if (message[".msgpool_hard_limit"] != null && Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) writer.uint32(/* id 60001, wireType 0 =*/480008).int32(message[".msgpool_hard_limit"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -46557,12 +60463,12 @@ * @function encodeDelimited * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -46572,39 +60478,68 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decode = function decode(reader, length) { + MessageOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MessageOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 60000: - message[".msgpool_soft_limit"] = reader.int32(); - break; - case 60001: - message[".msgpool_hard_limit"] = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.message_set_wire_format = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.no_standard_descriptor_accessor = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 60000: { + if (wireType !== 0) + break; + message[".msgpool_soft_limit"] = reader.int32(); + continue; + } + case 60001: { + if (wireType !== 0) + break; + message[".msgpool_hard_limit"] = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -46614,11 +60549,11 @@ * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -46632,28 +60567,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageOptions.verify = function verify(message) { + MessageOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) if (typeof message.message_set_wire_format !== "boolean") return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) if (typeof message.no_standard_descriptor_accessor !== "boolean") return "no_standard_descriptor_accessor: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".msgpool_soft_limit")) + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) if (!$util.isInteger(message[".msgpool_soft_limit"])) return ".msgpool_soft_limit: integer expected"; - if (message[".msgpool_hard_limit"] != null && message.hasOwnProperty(".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) if (!$util.isInteger(message[".msgpool_hard_limit"])) return ".msgpool_hard_limit: integer expected"; return null; @@ -46667,22 +60606,28 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MessageOptions} MessageOptions */ - MessageOptions.fromObject = function fromObject(object) { + MessageOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MessageOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MessageOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MessageOptions(); if (object.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); + message.message_set_wire_format = $Boolean(object.message_set_wire_format); if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); + message.no_standard_descriptor_accessor = $Boolean(object.no_standard_descriptor_accessor); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } if (object[".msgpool_soft_limit"] != null) @@ -46701,9 +60646,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + MessageOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; @@ -46713,18 +60662,18 @@ object[".msgpool_soft_limit"] = 32; object[".msgpool_hard_limit"] = 384; } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".msgpool_soft_limit")) + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) object[".msgpool_soft_limit"] = message[".msgpool_soft_limit"]; - if (message[".msgpool_hard_limit"] != null && message.hasOwnProperty(".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) object[".msgpool_hard_limit"] = message[".msgpool_hard_limit"]; return object; }; @@ -46736,8 +60685,22 @@ * @instance * @returns {Object.} JSON object */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MessageOptions.prototype.toJSON = function() { + return MessageOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MessageOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MessageOptions"; }; return MessageOptions; @@ -46747,31 +60710,45 @@ /** * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions + * @typedef {Object} google.protobuf.FieldOptions.$Properties * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype * @property {boolean|null} [packed] FieldOptions packed * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {string|null} [experimental_map_key] FieldOptions experimental_map_key - * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option * @property {boolean|null} [".key_field"] FieldOptions .key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @augments google.protobuf.FieldOptions.$Properties + * @deprecated Use google.protobuf.FieldOptions.$Properties instead. + */ + + /** + * Shape of a FieldOptions. + * @typedef {google.protobuf.FieldOptions.$Properties} google.protobuf.FieldOptions.$Shape */ /** * Constructs a new FieldOptions. * @memberof google.protobuf * @classdesc Represents a FieldOptions. - * @implements IFieldOptions * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set + * @property {boolean} ".key_field" FieldOptions .key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FieldOptions(properties) { + var FieldOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldOptions ctype. @@ -46807,18 +60784,12 @@ /** * FieldOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * FieldOptions .key_field. - * @member {boolean} .key_field - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".key_field"] = false; /** @@ -46826,10 +60797,14 @@ * @function create * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @type {{ + * (properties: google.protobuf.FieldOptions.$Shape): google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape; + * (properties?: google.protobuf.FieldOptions.$Properties): google.protobuf.FieldOptions; + * }} */ - FieldOptions.create = function create(properties) { + FieldOptions.create = function(properties) { return new FieldOptions(properties); }; @@ -46838,26 +60813,33 @@ * @function encode * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + FieldOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.experimental_map_key != null && Object.hasOwnProperty.call(message, "experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.experimental_map_key); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".key_field"] != null && Object.hasOwnProperty.call(message, ".key_field")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) writer.uint32(/* id 60000, wireType 0 =*/480000).bool(message[".key_field"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -46866,12 +60848,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -46881,42 +60863,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decode = function decode(reader, length) { + FieldOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 9: - message.experimental_map_key = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 60000: - message[".key_field"] = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldOptions.CType[value] !== $undefined) + message.ctype = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + message.packed = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.deprecated = reader.bool(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.experimental_map_key = reader.string(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 60000: { + if (wireType !== 0) + break; + message[".key_field"] = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -46926,11 +60946,11 @@ * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -46944,10 +60964,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldOptions.verify = function verify(message) { + FieldOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) switch (message.ctype) { default: return "ctype: enum value expected"; @@ -46956,25 +60980,25 @@ case 2: break; } - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) if (typeof message.packed !== "boolean") return "packed: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) if (!$util.isString(message.experimental_map_key)) return "experimental_map_key: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".key_field"] != null && message.hasOwnProperty(".key_field")) + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) if (typeof message[".key_field"] !== "boolean") return ".key_field: boolean expected"; return null; @@ -46988,9 +61012,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldOptions} FieldOptions */ - FieldOptions.fromObject = function fromObject(object) { + FieldOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { case "STRING": @@ -47005,25 +61035,26 @@ case 2: message.ctype = 2; break; + default: } if (object.packed != null) - message.packed = Boolean(object.packed); + message.packed = $Boolean(object.packed); if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); + message.deprecated = $Boolean(object.deprecated); if (object.experimental_map_key != null) - message.experimental_map_key = String(object.experimental_map_key); + message.experimental_map_key = $String(object.experimental_map_key); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } if (object[".key_field"] != null) - message[".key_field"] = Boolean(object[".key_field"]); + message[".key_field"] = $Boolean(object[".key_field"]); return message; }; @@ -47036,33 +61067,37 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + FieldOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; + object.ctype = options.enums === $String ? "STRING" : 0; object.packed = false; object.deprecated = false; object.experimental_map_key = ""; object[".key_field"] = false; } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) + object.ctype = options.enums === $String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === $undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) object.experimental_map_key = message.experimental_map_key; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".key_field"] != null && message.hasOwnProperty(".key_field")) + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) object[".key_field"] = message[".key_field"]; return object; }; @@ -47074,8 +61109,22 @@ * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldOptions.prototype.toJSON = function() { + return FieldOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldOptions"; }; /** @@ -47087,7 +61136,7 @@ * @property {number} STRING_PIECE=2 STRING_PIECE value */ FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "STRING"] = 0; values[valuesById[1] = "CORD"] = 1; values[valuesById[2] = "STRING_PIECE"] = 2; @@ -47099,32 +61148,45 @@ protobuf.EnumOptions = (function() { + /** + * Properties of an EnumOptions. + * @typedef {Object} google.protobuf.EnumOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumOptions. * @memberof google.protobuf * @interface IEnumOptions - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @augments google.protobuf.EnumOptions.$Properties + * @deprecated Use google.protobuf.EnumOptions.$Properties instead. + */ + + /** + * Shape of an EnumOptions. + * @typedef {google.protobuf.EnumOptions.$Properties} google.protobuf.EnumOptions.$Shape */ /** * Constructs a new EnumOptions. * @memberof google.protobuf * @classdesc Represents an EnumOptions. - * @implements IEnumOptions * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumOptions(properties) { + var EnumOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumOptions * @instance */ @@ -47135,10 +61197,14 @@ * @function create * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @type {{ + * (properties: google.protobuf.EnumOptions.$Shape): google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape; + * (properties?: google.protobuf.EnumOptions.$Properties): google.protobuf.EnumOptions; + * }} */ - EnumOptions.create = function create(properties) { + EnumOptions.create = function(properties) { return new EnumOptions(properties); }; @@ -47147,16 +61213,23 @@ * @function encode * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + EnumOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -47165,12 +61238,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -47180,27 +61253,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length) { + EnumOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -47210,11 +61300,11 @@ * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -47228,14 +61318,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumOptions.verify = function verify(message) { + EnumOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -47251,18 +61345,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumOptions} EnumOptions */ - EnumOptions.fromObject = function fromObject(object) { + EnumOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -47277,16 +61377,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + EnumOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -47298,8 +61402,22 @@ * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumOptions.prototype.toJSON = function() { + return EnumOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumOptions"; }; return EnumOptions; @@ -47307,32 +61425,45 @@ protobuf.EnumValueOptions = (function() { + /** + * Properties of an EnumValueOptions. + * @typedef {Object} google.protobuf.EnumValueOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumValueOptions. * @memberof google.protobuf * @interface IEnumValueOptions - * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @augments google.protobuf.EnumValueOptions.$Properties + * @deprecated Use google.protobuf.EnumValueOptions.$Properties instead. + */ + + /** + * Shape of an EnumValueOptions. + * @typedef {google.protobuf.EnumValueOptions.$Properties} google.protobuf.EnumValueOptions.$Shape */ /** * Constructs a new EnumValueOptions. * @memberof google.protobuf * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueOptions(properties) { + var EnumValueOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumValueOptions * @instance */ @@ -47343,10 +61474,14 @@ * @function create * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @type {{ + * (properties: google.protobuf.EnumValueOptions.$Shape): google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape; + * (properties?: google.protobuf.EnumValueOptions.$Properties): google.protobuf.EnumValueOptions; + * }} */ - EnumValueOptions.create = function create(properties) { + EnumValueOptions.create = function(properties) { return new EnumValueOptions(properties); }; @@ -47355,16 +61490,23 @@ * @function encode * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + EnumValueOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -47373,12 +61515,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -47388,27 +61530,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + EnumValueOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -47418,11 +61577,11 @@ * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -47436,14 +61595,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueOptions.verify = function verify(message) { + EnumValueOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -47459,18 +61622,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - EnumValueOptions.fromObject = function fromObject(object) { + EnumValueOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -47485,16 +61654,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -47506,8 +61679,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueOptions.prototype.toJSON = function() { + return EnumValueOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueOptions"; }; return EnumValueOptions; @@ -47515,32 +61702,45 @@ protobuf.ServiceOptions = (function() { + /** + * Properties of a ServiceOptions. + * @typedef {Object} google.protobuf.ServiceOptions.$Properties + * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceOptions. * @memberof google.protobuf * @interface IServiceOptions - * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @augments google.protobuf.ServiceOptions.$Properties + * @deprecated Use google.protobuf.ServiceOptions.$Properties instead. + */ + + /** + * Shape of a ServiceOptions. + * @typedef {google.protobuf.ServiceOptions.$Properties} google.protobuf.ServiceOptions.$Shape */ /** * Constructs a new ServiceOptions. * @memberof google.protobuf * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceOptions(properties) { + var ServiceOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.ServiceOptions * @instance */ @@ -47551,10 +61751,14 @@ * @function create * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @type {{ + * (properties: google.protobuf.ServiceOptions.$Shape): google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape; + * (properties?: google.protobuf.ServiceOptions.$Properties): google.protobuf.ServiceOptions; + * }} */ - ServiceOptions.create = function create(properties) { + ServiceOptions.create = function(properties) { return new ServiceOptions(properties); }; @@ -47563,16 +61767,23 @@ * @function encode * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + ServiceOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -47581,12 +61792,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -47596,27 +61807,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + ServiceOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -47626,11 +61854,11 @@ * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -47644,14 +61872,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + ServiceOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -47667,18 +61899,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - ServiceOptions.fromObject = function fromObject(object) { + ServiceOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -47693,16 +61931,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -47714,8 +61956,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceOptions.prototype.toJSON = function() { + return ServiceOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceOptions"; }; return ServiceOptions; @@ -47723,32 +61979,45 @@ protobuf.MethodOptions = (function() { + /** + * Properties of a MethodOptions. + * @typedef {Object} google.protobuf.MethodOptions.$Properties + * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a MethodOptions. * @memberof google.protobuf * @interface IMethodOptions - * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @augments google.protobuf.MethodOptions.$Properties + * @deprecated Use google.protobuf.MethodOptions.$Properties instead. + */ + + /** + * Shape of a MethodOptions. + * @typedef {google.protobuf.MethodOptions.$Properties} google.protobuf.MethodOptions.$Shape */ /** * Constructs a new MethodOptions. * @memberof google.protobuf * @classdesc Represents a MethodOptions. - * @implements IMethodOptions * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodOptions(properties) { + var MethodOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MethodOptions * @instance */ @@ -47759,10 +62028,14 @@ * @function create * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @type {{ + * (properties: google.protobuf.MethodOptions.$Shape): google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape; + * (properties?: google.protobuf.MethodOptions.$Properties): google.protobuf.MethodOptions; + * }} */ - MethodOptions.create = function create(properties) { + MethodOptions.create = function(properties) { return new MethodOptions(properties); }; @@ -47771,16 +62044,23 @@ * @function encode * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + MethodOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -47789,12 +62069,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -47804,27 +62084,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + MethodOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -47834,11 +62131,11 @@ * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -47852,14 +62149,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + MethodOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -47875,18 +62176,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodOptions} MethodOptions */ - MethodOptions.fromObject = function fromObject(object) { + MethodOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -47901,16 +62208,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + MethodOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -47922,8 +62233,22 @@ * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodOptions.prototype.toJSON = function() { + return MethodOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodOptions"; }; return MethodOptions; @@ -47933,36 +62258,49 @@ /** * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name + * @typedef {Object} google.protobuf.UninterpretedOption.$Properties + * @property {Array.|null} [name] UninterpretedOption name * @property {string|null} [identifier_value] UninterpretedOption identifier_value * @property {number|Long|null} [positive_int_value] UninterpretedOption positive_int_value * @property {number|Long|null} [negative_int_value] UninterpretedOption negative_int_value * @property {number|null} [double_value] UninterpretedOption double_value * @property {Uint8Array|null} [string_value] UninterpretedOption string_value * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @augments google.protobuf.UninterpretedOption.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.$Properties instead. + */ + + /** + * Shape of an UninterpretedOption. + * @typedef {google.protobuf.UninterpretedOption.$Properties} google.protobuf.UninterpretedOption.$Shape */ /** * Constructs a new UninterpretedOption. * @memberof google.protobuf * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function UninterpretedOption(properties) { + var UninterpretedOption = function (properties) { this.name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * UninterpretedOption name. - * @member {Array.} name + * @member {Array.} name * @memberof google.protobuf.UninterpretedOption * @instance */ @@ -48021,10 +62359,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.$Shape): google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape; + * (properties?: google.protobuf.UninterpretedOption.$Properties): google.protobuf.UninterpretedOption; + * }} */ - UninterpretedOption.create = function create(properties) { + UninterpretedOption.create = function(properties) { return new UninterpretedOption(properties); }; @@ -48033,28 +62375,35 @@ * @function encode * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + UninterpretedOption.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -48063,12 +62412,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + UninterpretedOption.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -48078,45 +62427,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + UninterpretedOption.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 2) + break; + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.identifier_value = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.positive_int_value = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.negative_int_value = reader.int64(); + continue; + } + case 6: { + if (wireType !== 1) + break; + message.double_value = reader.double(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.string_value = reader.bytes(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.aggregate_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -48126,11 +62510,11 @@ * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -48144,34 +62528,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + UninterpretedOption.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) { + if (!$Array.isArray(message.name)) return "name: array expected"; for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i], _depth + 1); if (error) return "name." + error; } } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) if (!$util.isString(message.identifier_value)) return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) if (typeof message.double_value !== "number") return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) if (!$util.isString(message.aggregate_value)) return "aggregate_value: string expected"; return null; @@ -48185,49 +62573,55 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - UninterpretedOption.fromObject = function fromObject(object) { + UninterpretedOption.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption(); if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; + if (!$Array.isArray(object.name)) + throw $TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = $Array(object.name.length); for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + if (!$util.isObject(object.name[i])) + throw $TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], _depth + 1); } } if (object.identifier_value != null) - message.identifier_value = String(object.identifier_value); + message.identifier_value = $String(object.identifier_value); if (object.positive_int_value != null) if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; + message.positive_int_value = $util.Long.fromValue(object.positive_int_value, true); else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); + message.positive_int_value = $parseInt(object.positive_int_value, 10); else if (typeof object.positive_int_value === "number") message.positive_int_value = object.positive_int_value; else if (typeof object.positive_int_value === "object") message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); if (object.negative_int_value != null) if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; + message.negative_int_value = $util.Long.fromValue(object.negative_int_value, false); else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); + message.negative_int_value = $parseInt(object.negative_int_value, 10); else if (typeof object.negative_int_value === "number") message.negative_int_value = object.negative_int_value; else if (typeof object.negative_int_value === "object") message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); if (object.double_value != null) - message.double_value = Number(object.double_value); + message.double_value = $Number(object.double_value); if (object.string_value != null) if (typeof object.string_value === "string") $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) + else if (object.string_value.length >= 0) message.string_value = object.string_value; if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); + message.aggregate_value = $String(object.aggregate_value); return message; }; @@ -48240,9 +62634,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.name = []; @@ -48250,46 +62648,50 @@ object.identifier_value = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.positive_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.positive_int_value = options.longs === String ? "0" : 0; + object.positive_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.negative_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.negative_int_value = options.longs === String ? "0" : 0; + object.negative_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.double_value = 0; - if (options.bytes === String) + if (options.bytes === $String) object.string_value = ""; else { object.string_value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.string_value = $util.newBuffer(object.string_value); } object.aggregate_value = ""; } if (message.name && message.name.length) { - object.name = []; + object.name = $Array(message.name.length); for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options, _depth + 1); } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.positive_int_value = typeof message.positive_int_value === "number" ? $BigInt(message.positive_int_value) : $util.Long.fromBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0, true).toBigInt(); + else if (typeof message.positive_int_value === "number") + object.positive_int_value = options.longs === $String ? $String(message.positive_int_value) : message.positive_int_value; else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; + object.positive_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === $Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.negative_int_value = typeof message.negative_int_value === "number" ? $BigInt(message.negative_int_value) : $util.Long.fromBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0, false).toBigInt(); + else if (typeof message.negative_int_value === "number") + object.negative_int_value = options.longs === $String ? $String(message.negative_int_value) : message.negative_int_value; else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + object.negative_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === $Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) + object.double_value = options.json && !$isFinite(message.double_value) ? $String(message.double_value) : message.double_value; + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) + object.string_value = options.bytes === $String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.string_value) : message.string_value; + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) object.aggregate_value = message.aggregate_value; return object; }; @@ -48301,34 +62703,61 @@ * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + UninterpretedOption.prototype.toJSON = function() { + return UninterpretedOption.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + UninterpretedOption.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption"; }; UninterpretedOption.NamePart = (function() { /** * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart + * @typedef {Object} google.protobuf.UninterpretedOption.NamePart.$Properties * @property {string} name_part NamePart name_part * @property {boolean} is_extension NamePart is_extension + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @augments google.protobuf.UninterpretedOption.NamePart.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.NamePart.$Properties instead. + */ + + /** + * Shape of a NamePart. + * @typedef {google.protobuf.UninterpretedOption.NamePart.$Properties} google.protobuf.UninterpretedOption.NamePart.$Shape */ /** * Constructs a new NamePart. * @memberof google.protobuf.UninterpretedOption * @classdesc Represents a NamePart. - * @implements INamePart * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function NamePart(properties) { + var NamePart = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * NamePart name_part. @@ -48351,10 +62780,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.NamePart.$Shape): google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape; + * (properties?: google.protobuf.UninterpretedOption.NamePart.$Properties): google.protobuf.UninterpretedOption.NamePart; + * }} */ - NamePart.create = function create(properties) { + NamePart.create = function(properties) { return new NamePart(properties); }; @@ -48363,15 +62796,22 @@ * @function encode * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + NamePart.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 2 =*/10).string(message.name_part); writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -48380,12 +62820,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + NamePart.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -48395,31 +62835,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decode = function decode(reader, length) { + NamePart.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption.NamePart(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name_part = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.is_extension = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("name_part")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "name_part")) throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) + if (!$Object.hasOwnProperty.call(message, "is_extension")) throw $util.ProtocolError("missing required 'is_extension'", { instance: message }); return message; }; @@ -48430,11 +62890,11 @@ * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decodeDelimited = function decodeDelimited(reader) { + NamePart.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -48448,9 +62908,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NamePart.verify = function verify(message) { + NamePart.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isString(message.name_part)) return "name_part: string expected"; if (typeof message.is_extension !== "boolean") @@ -48466,14 +62930,20 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart */ - NamePart.fromObject = function fromObject(object) { + NamePart.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption.NamePart(); if (object.name_part != null) - message.name_part = String(object.name_part); + message.name_part = $String(object.name_part); if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); + message.is_extension = $Boolean(object.is_extension); return message; }; @@ -48486,17 +62956,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + NamePart.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name_part = ""; object.is_extension = false; } - if (message.name_part != null && message.hasOwnProperty("name_part")) + if (message.name_part != null && $Object.hasOwnProperty.call(message, "name_part")) object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) + if (message.is_extension != null && $Object.hasOwnProperty.call(message, "is_extension")) object.is_extension = message.is_extension; return object; }; @@ -48508,8 +62982,22 @@ * @instance * @returns {Object.} JSON object */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + NamePart.prototype.toJSON = function() { + return NamePart.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + NamePart.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption.NamePart"; }; return NamePart; @@ -48520,32 +63008,45 @@ protobuf.SourceCodeInfo = (function() { + /** + * Properties of a SourceCodeInfo. + * @typedef {Object} google.protobuf.SourceCodeInfo.$Properties + * @property {Array.|null} [location] SourceCodeInfo location + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a SourceCodeInfo. * @memberof google.protobuf * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @augments google.protobuf.SourceCodeInfo.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.$Properties instead. + */ + + /** + * Shape of a SourceCodeInfo. + * @typedef {google.protobuf.SourceCodeInfo.$Properties} google.protobuf.SourceCodeInfo.$Shape */ /** * Constructs a new SourceCodeInfo. * @memberof google.protobuf * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SourceCodeInfo(properties) { + var SourceCodeInfo = function (properties) { this.location = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SourceCodeInfo location. - * @member {Array.} location + * @member {Array.} location * @memberof google.protobuf.SourceCodeInfo * @instance */ @@ -48556,10 +63057,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.$Shape): google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.$Properties): google.protobuf.SourceCodeInfo; + * }} */ - SourceCodeInfo.create = function create(properties) { + SourceCodeInfo.create = function(properties) { return new SourceCodeInfo(properties); }; @@ -48568,16 +63073,23 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + SourceCodeInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.location != null && message.location.length) for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -48586,12 +63098,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SourceCodeInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -48601,27 +63113,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + SourceCodeInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -48631,11 +63160,11 @@ * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -48649,14 +63178,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + SourceCodeInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.location != null && $Object.hasOwnProperty.call(message, "location")) { + if (!$Array.isArray(message.location)) return "location: array expected"; for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i], _depth + 1); if (error) return "location." + error; } @@ -48672,18 +63205,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - SourceCodeInfo.fromObject = function fromObject(object) { + SourceCodeInfo.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo(); if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; + if (!$Array.isArray(object.location)) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = $Array(object.location.length); for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + if (!$util.isObject(object.location[i])) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], _depth + 1); } } return message; @@ -48698,16 +63237,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.location = []; if (message.location && message.location.length) { - object.location = []; + object.location = $Array(message.location.length); for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options, _depth + 1); } return object; }; @@ -48719,36 +63262,63 @@ * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SourceCodeInfo.prototype.toJSON = function() { + return SourceCodeInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SourceCodeInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo"; }; SourceCodeInfo.Location = (function() { /** * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation + * @typedef {Object} google.protobuf.SourceCodeInfo.Location.$Properties * @property {Array.|null} [path] Location path * @property {Array.|null} [span] Location span + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @augments google.protobuf.SourceCodeInfo.Location.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.Location.$Properties instead. + */ + + /** + * Shape of a Location. + * @typedef {google.protobuf.SourceCodeInfo.Location.$Properties} google.protobuf.SourceCodeInfo.Location.$Shape */ /** * Constructs a new Location. * @memberof google.protobuf.SourceCodeInfo * @classdesc Represents a Location. - * @implements ILocation * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Location(properties) { + var Location = function (properties) { this.path = []; this.span = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Location path. @@ -48771,10 +63341,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.Location.$Shape): google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.Location.$Properties): google.protobuf.SourceCodeInfo.Location; + * }} */ - Location.create = function create(properties) { + Location.create = function(properties) { return new Location(properties); }; @@ -48783,25 +63357,24 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer) { + Location.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && message.path.length) + writer.uint32(/* id 1, wireType 2 =*/10).int32s(message.path); + if (message.span != null && message.span.length) + writer.uint32(/* id 2, wireType 2 =*/18).int32s(message.span); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -48810,12 +63383,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Location.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -48825,42 +63398,64 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decode = function decode(reader, length) { + Location.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.path && message.path.length)) + message.path = []; + reader.int32s(message.path); + continue; + } + if (wireType !== 0) + break; + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.int32()); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.span && message.span.length)) + message.span = []; + reader.int32s(message.span); + continue; + } + if (wireType !== 0) + break; + if (!(message.span && message.span.length)) + message.span = []; message.span.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -48870,11 +63465,11 @@ * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -48888,18 +63483,22 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Location.verify = function verify(message) { + Location.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) { + if (!$Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) + if (message.span != null && $Object.hasOwnProperty.call(message, "span")) { + if (!$Array.isArray(message.span)) return "span: array expected"; for (var i = 0; i < message.span.length; ++i) if (!$util.isInteger(message.span[i])) @@ -48916,21 +63515,27 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo.Location} Location */ - Location.fromObject = function fromObject(object) { + Location.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo.Location(); if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; + if (!$Array.isArray(object.path)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = $Array(object.path.length); for (var i = 0; i < object.path.length; ++i) message.path[i] = object.path[i] | 0; } if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; + if (!$Array.isArray(object.span)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = $Array(object.span.length); for (var i = 0; i < object.span.length; ++i) message.span[i] = object.span[i] | 0; } @@ -48946,21 +63551,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + Location.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.path = []; object.span = []; } if (message.path && message.path.length) { - object.path = []; + object.path = $Array(message.path.length); for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } if (message.span && message.span.length) { - object.span = []; + object.span = $Array(message.span.length); for (var j = 0; j < message.span.length; ++j) object.span[j] = message.span[j]; } @@ -48974,8 +63583,22 @@ * @instance * @returns {Object.} JSON object */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Location.prototype.toJSON = function() { + return Location.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Location.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo.Location"; }; return Location; diff --git a/protobufs/generated/econ_gcmessages.js b/protobufs/generated/econ_gcmessages.js index 482a12c..4a873a1 100644 --- a/protobufs/generated/econ_gcmessages.js +++ b/protobufs/generated/econ_gcmessages.js @@ -1,4 +1,4 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-mixed-operators, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars, default-case, jsdoc/require-param*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) @@ -12,13 +12,14 @@ // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + var $Object = $util.global.Object, $undefined = $util.global.undefined, $Error = $util.global.Error, $TypeError = $util.global.TypeError, $parseInt = $util.global.parseInt, $String = $util.global.String, $Number = $util.global.Number, $BigInt = $util.global.BigInt, $Array = $util.global.Array, $Boolean = $util.global.Boolean, $isFinite = $util.global.isFinite; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); /** * EGCItemMsg enum. - * @exports EGCItemMsg + * @name EGCItemMsg * @enum {number} * @property {number} k_EMsgGCBase=1000 k_EMsgGCBase value * @property {number} k_EMsgGCSetSingleItemPosition=1001 k_EMsgGCSetSingleItemPosition value @@ -187,7 +188,7 @@ * @property {number} k_EMsgGCCraftCommonStatClock=2574 k_EMsgGCCraftCommonStatClock value */ $root.EGCItemMsg = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1000] = "k_EMsgGCBase"] = 1000; values[valuesById[1001] = "k_EMsgGCSetSingleItemPosition"] = 1001; values[valuesById[1002] = "k_EMsgGCCraft"] = 1002; @@ -358,7 +359,7 @@ /** * EGCMsgResponse enum. - * @exports EGCMsgResponse + * @name EGCMsgResponse * @enum {number} * @property {number} k_EGCMsgResponseOK=0 k_EGCMsgResponseOK value * @property {number} k_EGCMsgResponseDenied=1 k_EGCMsgResponseDenied value @@ -371,7 +372,7 @@ * @property {number} k_EGCMsgFailedToCreate=8 k_EGCMsgFailedToCreate value */ $root.EGCMsgResponse = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "k_EGCMsgResponseOK"] = 0; values[valuesById[1] = "k_EGCMsgResponseDenied"] = 1; values[valuesById[2] = "k_EGCMsgResponseServerError"] = 2; @@ -386,7 +387,7 @@ /** * EUnlockStyle enum. - * @exports EUnlockStyle + * @name EUnlockStyle * @enum {number} * @property {number} k_UnlockStyle_Succeeded=0 k_UnlockStyle_Succeeded value * @property {number} k_UnlockStyle_Failed_PreReq=1 k_UnlockStyle_Failed_PreReq value @@ -397,7 +398,7 @@ * @property {number} k_UnlockStyle_Failed_CantAffordGem=6 k_UnlockStyle_Failed_CantAffordGem value */ $root.EUnlockStyle = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "k_UnlockStyle_Succeeded"] = 0; values[valuesById[1] = "k_UnlockStyle_Failed_PreReq"] = 1; values[valuesById[2] = "k_UnlockStyle_Failed_CantAfford"] = 2; @@ -410,7 +411,7 @@ /** * EItemPurgatoryResponse_Finalize enum. - * @exports EItemPurgatoryResponse_Finalize + * @name EItemPurgatoryResponse_Finalize * @enum {number} * @property {number} k_ItemPurgatoryResponse_Finalize_Succeeded=0 k_ItemPurgatoryResponse_Finalize_Succeeded value * @property {number} k_ItemPurgatoryResponse_Finalize_Failed_Incomplete=1 k_ItemPurgatoryResponse_Finalize_Failed_Incomplete value @@ -420,7 +421,7 @@ * @property {number} k_ItemPurgatoryResponse_Finalize_BackpackFull=5 k_ItemPurgatoryResponse_Finalize_BackpackFull value */ $root.EItemPurgatoryResponse_Finalize = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "k_ItemPurgatoryResponse_Finalize_Succeeded"] = 0; values[valuesById[1] = "k_ItemPurgatoryResponse_Finalize_Failed_Incomplete"] = 1; values[valuesById[2] = "k_ItemPurgatoryResponse_Finalize_Failed_ItemsNotInPurgatory"] = 2; @@ -432,7 +433,7 @@ /** * EItemPurgatoryResponse_Refund enum. - * @exports EItemPurgatoryResponse_Refund + * @name EItemPurgatoryResponse_Refund * @enum {number} * @property {number} k_ItemPurgatoryResponse_Refund_Succeeded=0 k_ItemPurgatoryResponse_Refund_Succeeded value * @property {number} k_ItemPurgatoryResponse_Refund_Failed_ItemNotInPurgatory=1 k_ItemPurgatoryResponse_Refund_Failed_ItemNotInPurgatory value @@ -442,7 +443,7 @@ * @property {number} k_ItemPurgatoryResponse_Refund_Failed_NexonWebAPI=5 k_ItemPurgatoryResponse_Refund_Failed_NexonWebAPI value */ $root.EItemPurgatoryResponse_Refund = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "k_ItemPurgatoryResponse_Refund_Succeeded"] = 0; values[valuesById[1] = "k_ItemPurgatoryResponse_Refund_Failed_ItemNotInPurgatory"] = 1; values[valuesById[2] = "k_ItemPurgatoryResponse_Refund_Failed_CouldNotFindItem"] = 2; @@ -456,26 +457,39 @@ /** * Properties of a CMsgApplyAutograph. - * @exports ICMsgApplyAutograph - * @interface ICMsgApplyAutograph + * @typedef {Object} CMsgApplyAutograph.$Properties * @property {number|Long|null} [autograph_item_id] CMsgApplyAutograph autograph_item_id * @property {number|Long|null} [item_item_id] CMsgApplyAutograph item_item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyAutograph. + * @exports ICMsgApplyAutograph + * @interface ICMsgApplyAutograph + * @augments CMsgApplyAutograph.$Properties + * @deprecated Use CMsgApplyAutograph.$Properties instead. + */ + + /** + * Shape of a CMsgApplyAutograph. + * @typedef {CMsgApplyAutograph.$Properties} CMsgApplyAutograph.$Shape */ /** * Constructs a new CMsgApplyAutograph. * @exports CMsgApplyAutograph * @classdesc Represents a CMsgApplyAutograph. - * @implements ICMsgApplyAutograph * @constructor - * @param {ICMsgApplyAutograph=} [properties] Properties to set + * @param {CMsgApplyAutograph.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyAutograph(properties) { + var CMsgApplyAutograph = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyAutograph autograph_item_id. @@ -498,10 +512,14 @@ * @function create * @memberof CMsgApplyAutograph * @static - * @param {ICMsgApplyAutograph=} [properties] Properties to set + * @param {CMsgApplyAutograph.$Properties=} [properties] Properties to set * @returns {CMsgApplyAutograph} CMsgApplyAutograph instance + * @type {{ + * (properties: CMsgApplyAutograph.$Shape): CMsgApplyAutograph & CMsgApplyAutograph.$Shape; + * (properties?: CMsgApplyAutograph.$Properties): CMsgApplyAutograph; + * }} */ - CMsgApplyAutograph.create = function create(properties) { + CMsgApplyAutograph.create = function(properties) { return new CMsgApplyAutograph(properties); }; @@ -510,17 +528,24 @@ * @function encode * @memberof CMsgApplyAutograph * @static - * @param {ICMsgApplyAutograph} message CMsgApplyAutograph message or plain object to encode + * @param {CMsgApplyAutograph.$Properties} message CMsgApplyAutograph message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyAutograph.encode = function encode(message, writer) { + CMsgApplyAutograph.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.autograph_item_id != null && Object.hasOwnProperty.call(message, "autograph_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.autograph_item_id != null && $Object.hasOwnProperty.call(message, "autograph_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.autograph_item_id); - if (message.item_item_id != null && Object.hasOwnProperty.call(message, "item_item_id")) + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -529,12 +554,12 @@ * @function encodeDelimited * @memberof CMsgApplyAutograph * @static - * @param {ICMsgApplyAutograph} message CMsgApplyAutograph message or plain object to encode + * @param {CMsgApplyAutograph.$Properties} message CMsgApplyAutograph message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyAutograph.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyAutograph.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -544,28 +569,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyAutograph} CMsgApplyAutograph + * @returns {CMsgApplyAutograph & CMsgApplyAutograph.$Shape} CMsgApplyAutograph * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyAutograph.decode = function decode(reader, length) { + CMsgApplyAutograph.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyAutograph(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyAutograph(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.autograph_item_id = reader.uint64(); - break; - case 2: - message.item_item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.autograph_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -575,11 +620,11 @@ * @memberof CMsgApplyAutograph * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyAutograph} CMsgApplyAutograph + * @returns {CMsgApplyAutograph & CMsgApplyAutograph.$Shape} CMsgApplyAutograph * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyAutograph.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyAutograph.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -593,13 +638,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyAutograph.verify = function verify(message) { + CMsgApplyAutograph.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.autograph_item_id != null && message.hasOwnProperty("autograph_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.autograph_item_id != null && $Object.hasOwnProperty.call(message, "autograph_item_id")) if (!$util.isInteger(message.autograph_item_id) && !(message.autograph_item_id && $util.isInteger(message.autograph_item_id.low) && $util.isInteger(message.autograph_item_id.high))) return "autograph_item_id: integer|Long expected"; - if (message.item_item_id != null && message.hasOwnProperty("item_item_id")) + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) if (!$util.isInteger(message.item_item_id) && !(message.item_item_id && $util.isInteger(message.item_item_id.low) && $util.isInteger(message.item_item_id.high))) return "item_item_id: integer|Long expected"; return null; @@ -613,24 +662,30 @@ * @param {Object.} object Plain object * @returns {CMsgApplyAutograph} CMsgApplyAutograph */ - CMsgApplyAutograph.fromObject = function fromObject(object) { + CMsgApplyAutograph.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyAutograph) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyAutograph: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyAutograph(); if (object.autograph_item_id != null) if ($util.Long) - (message.autograph_item_id = $util.Long.fromValue(object.autograph_item_id)).unsigned = true; + message.autograph_item_id = $util.Long.fromValue(object.autograph_item_id, true); else if (typeof object.autograph_item_id === "string") - message.autograph_item_id = parseInt(object.autograph_item_id, 10); + message.autograph_item_id = $parseInt(object.autograph_item_id, 10); else if (typeof object.autograph_item_id === "number") message.autograph_item_id = object.autograph_item_id; else if (typeof object.autograph_item_id === "object") message.autograph_item_id = new $util.LongBits(object.autograph_item_id.low >>> 0, object.autograph_item_id.high >>> 0).toNumber(true); if (object.item_item_id != null) if ($util.Long) - (message.item_item_id = $util.Long.fromValue(object.item_item_id)).unsigned = true; + message.item_item_id = $util.Long.fromValue(object.item_item_id, true); else if (typeof object.item_item_id === "string") - message.item_item_id = parseInt(object.item_item_id, 10); + message.item_item_id = $parseInt(object.item_item_id, 10); else if (typeof object.item_item_id === "number") message.item_item_id = object.item_item_id; else if (typeof object.item_item_id === "object") @@ -647,32 +702,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyAutograph.toObject = function toObject(message, options) { + CMsgApplyAutograph.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.autograph_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.autograph_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.autograph_item_id = options.longs === String ? "0" : 0; + object.autograph_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_item_id = options.longs === String ? "0" : 0; + object.item_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.autograph_item_id != null && message.hasOwnProperty("autograph_item_id")) - if (typeof message.autograph_item_id === "number") - object.autograph_item_id = options.longs === String ? String(message.autograph_item_id) : message.autograph_item_id; + if (message.autograph_item_id != null && $Object.hasOwnProperty.call(message, "autograph_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.autograph_item_id = typeof message.autograph_item_id === "number" ? $BigInt(message.autograph_item_id) : $util.Long.fromBits(message.autograph_item_id.low >>> 0, message.autograph_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.autograph_item_id === "number") + object.autograph_item_id = options.longs === $String ? $String(message.autograph_item_id) : message.autograph_item_id; else - object.autograph_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.autograph_item_id) : options.longs === Number ? new $util.LongBits(message.autograph_item_id.low >>> 0, message.autograph_item_id.high >>> 0).toNumber(true) : message.autograph_item_id; - if (message.item_item_id != null && message.hasOwnProperty("item_item_id")) - if (typeof message.item_item_id === "number") - object.item_item_id = options.longs === String ? String(message.item_item_id) : message.item_item_id; + object.autograph_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.autograph_item_id) : options.longs === $Number ? new $util.LongBits(message.autograph_item_id.low >>> 0, message.autograph_item_id.high >>> 0).toNumber(true) : message.autograph_item_id; + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_item_id = typeof message.item_item_id === "number" ? $BigInt(message.item_item_id) : $util.Long.fromBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_item_id === "number") + object.item_item_id = options.longs === $String ? $String(message.item_item_id) : message.item_item_id; else - object.item_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_item_id) : options.longs === Number ? new $util.LongBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0).toNumber(true) : message.item_item_id; + object.item_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_item_id) : options.longs === $Number ? new $util.LongBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0).toNumber(true) : message.item_item_id; return object; }; @@ -683,8 +746,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyAutograph.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyAutograph.prototype.toJSON = function() { + return CMsgApplyAutograph.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyAutograph + * @function getTypeUrl + * @memberof CMsgApplyAutograph + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyAutograph.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyAutograph"; }; return CMsgApplyAutograph; @@ -692,29 +769,42 @@ $root.CMsgEconPlayerStrangeCountAdjustment = (function() { + /** + * Properties of a CMsgEconPlayerStrangeCountAdjustment. + * @typedef {Object} CMsgEconPlayerStrangeCountAdjustment.$Properties + * @property {number|null} [account_id] CMsgEconPlayerStrangeCountAdjustment account_id + * @property {Array.|null} [strange_count_adjustments] CMsgEconPlayerStrangeCountAdjustment strange_count_adjustments + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgEconPlayerStrangeCountAdjustment. * @exports ICMsgEconPlayerStrangeCountAdjustment * @interface ICMsgEconPlayerStrangeCountAdjustment - * @property {number|null} [account_id] CMsgEconPlayerStrangeCountAdjustment account_id - * @property {Array.|null} [strange_count_adjustments] CMsgEconPlayerStrangeCountAdjustment strange_count_adjustments + * @augments CMsgEconPlayerStrangeCountAdjustment.$Properties + * @deprecated Use CMsgEconPlayerStrangeCountAdjustment.$Properties instead. + */ + + /** + * Shape of a CMsgEconPlayerStrangeCountAdjustment. + * @typedef {CMsgEconPlayerStrangeCountAdjustment.$Properties} CMsgEconPlayerStrangeCountAdjustment.$Shape */ /** * Constructs a new CMsgEconPlayerStrangeCountAdjustment. * @exports CMsgEconPlayerStrangeCountAdjustment * @classdesc Represents a CMsgEconPlayerStrangeCountAdjustment. - * @implements ICMsgEconPlayerStrangeCountAdjustment * @constructor - * @param {ICMsgEconPlayerStrangeCountAdjustment=} [properties] Properties to set + * @param {CMsgEconPlayerStrangeCountAdjustment.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgEconPlayerStrangeCountAdjustment(properties) { + var CMsgEconPlayerStrangeCountAdjustment = function (properties) { this.strange_count_adjustments = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgEconPlayerStrangeCountAdjustment account_id. @@ -726,7 +816,7 @@ /** * CMsgEconPlayerStrangeCountAdjustment strange_count_adjustments. - * @member {Array.} strange_count_adjustments + * @member {Array.} strange_count_adjustments * @memberof CMsgEconPlayerStrangeCountAdjustment * @instance */ @@ -737,10 +827,14 @@ * @function create * @memberof CMsgEconPlayerStrangeCountAdjustment * @static - * @param {ICMsgEconPlayerStrangeCountAdjustment=} [properties] Properties to set + * @param {CMsgEconPlayerStrangeCountAdjustment.$Properties=} [properties] Properties to set * @returns {CMsgEconPlayerStrangeCountAdjustment} CMsgEconPlayerStrangeCountAdjustment instance + * @type {{ + * (properties: CMsgEconPlayerStrangeCountAdjustment.$Shape): CMsgEconPlayerStrangeCountAdjustment & CMsgEconPlayerStrangeCountAdjustment.$Shape; + * (properties?: CMsgEconPlayerStrangeCountAdjustment.$Properties): CMsgEconPlayerStrangeCountAdjustment; + * }} */ - CMsgEconPlayerStrangeCountAdjustment.create = function create(properties) { + CMsgEconPlayerStrangeCountAdjustment.create = function(properties) { return new CMsgEconPlayerStrangeCountAdjustment(properties); }; @@ -749,18 +843,25 @@ * @function encode * @memberof CMsgEconPlayerStrangeCountAdjustment * @static - * @param {ICMsgEconPlayerStrangeCountAdjustment} message CMsgEconPlayerStrangeCountAdjustment message or plain object to encode + * @param {CMsgEconPlayerStrangeCountAdjustment.$Properties} message CMsgEconPlayerStrangeCountAdjustment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgEconPlayerStrangeCountAdjustment.encode = function encode(message, writer) { + CMsgEconPlayerStrangeCountAdjustment.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); if (message.strange_count_adjustments != null && message.strange_count_adjustments.length) for (var i = 0; i < message.strange_count_adjustments.length; ++i) - $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.encode(message.strange_count_adjustments[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.encode(message.strange_count_adjustments[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -769,12 +870,12 @@ * @function encodeDelimited * @memberof CMsgEconPlayerStrangeCountAdjustment * @static - * @param {ICMsgEconPlayerStrangeCountAdjustment} message CMsgEconPlayerStrangeCountAdjustment message or plain object to encode + * @param {CMsgEconPlayerStrangeCountAdjustment.$Properties} message CMsgEconPlayerStrangeCountAdjustment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgEconPlayerStrangeCountAdjustment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgEconPlayerStrangeCountAdjustment.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -784,30 +885,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgEconPlayerStrangeCountAdjustment} CMsgEconPlayerStrangeCountAdjustment + * @returns {CMsgEconPlayerStrangeCountAdjustment & CMsgEconPlayerStrangeCountAdjustment.$Shape} CMsgEconPlayerStrangeCountAdjustment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgEconPlayerStrangeCountAdjustment.decode = function decode(reader, length) { + CMsgEconPlayerStrangeCountAdjustment.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgEconPlayerStrangeCountAdjustment(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgEconPlayerStrangeCountAdjustment(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - if (!(message.strange_count_adjustments && message.strange_count_adjustments.length)) - message.strange_count_adjustments = []; - message.strange_count_adjustments.push($root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.strange_count_adjustments && message.strange_count_adjustments.length)) + message.strange_count_adjustments = []; + message.strange_count_adjustments.push($root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -817,11 +938,11 @@ * @memberof CMsgEconPlayerStrangeCountAdjustment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgEconPlayerStrangeCountAdjustment} CMsgEconPlayerStrangeCountAdjustment + * @returns {CMsgEconPlayerStrangeCountAdjustment & CMsgEconPlayerStrangeCountAdjustment.$Shape} CMsgEconPlayerStrangeCountAdjustment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgEconPlayerStrangeCountAdjustment.decodeDelimited = function decodeDelimited(reader) { + CMsgEconPlayerStrangeCountAdjustment.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -835,17 +956,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgEconPlayerStrangeCountAdjustment.verify = function verify(message) { + CMsgEconPlayerStrangeCountAdjustment.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.strange_count_adjustments != null && message.hasOwnProperty("strange_count_adjustments")) { - if (!Array.isArray(message.strange_count_adjustments)) + if (message.strange_count_adjustments != null && $Object.hasOwnProperty.call(message, "strange_count_adjustments")) { + if (!$Array.isArray(message.strange_count_adjustments)) return "strange_count_adjustments: array expected"; for (var i = 0; i < message.strange_count_adjustments.length; ++i) { - var error = $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.verify(message.strange_count_adjustments[i]); + var error = $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.verify(message.strange_count_adjustments[i], _depth + 1); if (error) return "strange_count_adjustments." + error; } @@ -861,20 +986,26 @@ * @param {Object.} object Plain object * @returns {CMsgEconPlayerStrangeCountAdjustment} CMsgEconPlayerStrangeCountAdjustment */ - CMsgEconPlayerStrangeCountAdjustment.fromObject = function fromObject(object) { + CMsgEconPlayerStrangeCountAdjustment.fromObject = function (object, _depth) { if (object instanceof $root.CMsgEconPlayerStrangeCountAdjustment) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgEconPlayerStrangeCountAdjustment: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgEconPlayerStrangeCountAdjustment(); if (object.account_id != null) message.account_id = object.account_id >>> 0; if (object.strange_count_adjustments) { - if (!Array.isArray(object.strange_count_adjustments)) - throw TypeError(".CMsgEconPlayerStrangeCountAdjustment.strange_count_adjustments: array expected"); - message.strange_count_adjustments = []; + if (!$Array.isArray(object.strange_count_adjustments)) + throw $TypeError(".CMsgEconPlayerStrangeCountAdjustment.strange_count_adjustments: array expected"); + message.strange_count_adjustments = $Array(object.strange_count_adjustments.length); for (var i = 0; i < object.strange_count_adjustments.length; ++i) { - if (typeof object.strange_count_adjustments[i] !== "object") - throw TypeError(".CMsgEconPlayerStrangeCountAdjustment.strange_count_adjustments: object expected"); - message.strange_count_adjustments[i] = $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.fromObject(object.strange_count_adjustments[i]); + if (!$util.isObject(object.strange_count_adjustments[i])) + throw $TypeError(".CMsgEconPlayerStrangeCountAdjustment.strange_count_adjustments: object expected"); + message.strange_count_adjustments[i] = $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.fromObject(object.strange_count_adjustments[i], _depth + 1); } } return message; @@ -889,20 +1020,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgEconPlayerStrangeCountAdjustment.toObject = function toObject(message, options) { + CMsgEconPlayerStrangeCountAdjustment.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.strange_count_adjustments = []; if (options.defaults) object.account_id = 0; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; if (message.strange_count_adjustments && message.strange_count_adjustments.length) { - object.strange_count_adjustments = []; + object.strange_count_adjustments = $Array(message.strange_count_adjustments.length); for (var j = 0; j < message.strange_count_adjustments.length; ++j) - object.strange_count_adjustments[j] = $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.toObject(message.strange_count_adjustments[j], options); + object.strange_count_adjustments[j] = $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.toObject(message.strange_count_adjustments[j], options, _depth + 1); } return object; }; @@ -914,35 +1049,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgEconPlayerStrangeCountAdjustment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgEconPlayerStrangeCountAdjustment.prototype.toJSON = function() { + return CMsgEconPlayerStrangeCountAdjustment.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgEconPlayerStrangeCountAdjustment + * @function getTypeUrl + * @memberof CMsgEconPlayerStrangeCountAdjustment + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgEconPlayerStrangeCountAdjustment.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgEconPlayerStrangeCountAdjustment"; }; CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment = (function() { /** * Properties of a CStrangeCountAdjustment. - * @memberof CMsgEconPlayerStrangeCountAdjustment - * @interface ICStrangeCountAdjustment + * @typedef {Object} CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Properties * @property {number|null} [event_type] CStrangeCountAdjustment event_type * @property {number|Long|null} [item_id] CStrangeCountAdjustment item_id * @property {number|null} [adjustment] CStrangeCountAdjustment adjustment + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CStrangeCountAdjustment. + * @memberof CMsgEconPlayerStrangeCountAdjustment + * @interface ICStrangeCountAdjustment + * @augments CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Properties + * @deprecated Use CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Properties instead. + */ + + /** + * Shape of a CStrangeCountAdjustment. + * @typedef {CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Properties} CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Shape */ /** * Constructs a new CStrangeCountAdjustment. * @memberof CMsgEconPlayerStrangeCountAdjustment * @classdesc Represents a CStrangeCountAdjustment. - * @implements ICStrangeCountAdjustment * @constructor - * @param {CMsgEconPlayerStrangeCountAdjustment.ICStrangeCountAdjustment=} [properties] Properties to set + * @param {CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CStrangeCountAdjustment(properties) { + var CStrangeCountAdjustment = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CStrangeCountAdjustment event_type. @@ -973,10 +1135,14 @@ * @function create * @memberof CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment * @static - * @param {CMsgEconPlayerStrangeCountAdjustment.ICStrangeCountAdjustment=} [properties] Properties to set + * @param {CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Properties=} [properties] Properties to set * @returns {CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment} CStrangeCountAdjustment instance + * @type {{ + * (properties: CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Shape): CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment & CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Shape; + * (properties?: CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Properties): CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment; + * }} */ - CStrangeCountAdjustment.create = function create(properties) { + CStrangeCountAdjustment.create = function(properties) { return new CStrangeCountAdjustment(properties); }; @@ -985,19 +1151,26 @@ * @function encode * @memberof CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment * @static - * @param {CMsgEconPlayerStrangeCountAdjustment.ICStrangeCountAdjustment} message CStrangeCountAdjustment message or plain object to encode + * @param {CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Properties} message CStrangeCountAdjustment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CStrangeCountAdjustment.encode = function encode(message, writer) { + CStrangeCountAdjustment.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.event_type != null && Object.hasOwnProperty.call(message, "event_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.event_type); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_id); - if (message.adjustment != null && Object.hasOwnProperty.call(message, "adjustment")) + if (message.adjustment != null && $Object.hasOwnProperty.call(message, "adjustment")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.adjustment); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1006,12 +1179,12 @@ * @function encodeDelimited * @memberof CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment * @static - * @param {CMsgEconPlayerStrangeCountAdjustment.ICStrangeCountAdjustment} message CStrangeCountAdjustment message or plain object to encode + * @param {CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Properties} message CStrangeCountAdjustment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CStrangeCountAdjustment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CStrangeCountAdjustment.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1021,31 +1194,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment} CStrangeCountAdjustment + * @returns {CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment & CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Shape} CStrangeCountAdjustment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CStrangeCountAdjustment.decode = function decode(reader, length) { + CStrangeCountAdjustment.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.event_type = reader.uint32(); - break; - case 2: - message.item_id = reader.uint64(); - break; - case 3: - message.adjustment = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.event_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.adjustment = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1055,11 +1251,11 @@ * @memberof CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment} CStrangeCountAdjustment + * @returns {CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment & CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment.$Shape} CStrangeCountAdjustment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CStrangeCountAdjustment.decodeDelimited = function decodeDelimited(reader) { + CStrangeCountAdjustment.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1073,16 +1269,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CStrangeCountAdjustment.verify = function verify(message) { + CStrangeCountAdjustment.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) if (!$util.isInteger(message.event_type)) return "event_type: integer expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.adjustment != null && message.hasOwnProperty("adjustment")) + if (message.adjustment != null && $Object.hasOwnProperty.call(message, "adjustment")) if (!$util.isInteger(message.adjustment)) return "adjustment: integer expected"; return null; @@ -1096,17 +1296,23 @@ * @param {Object.} object Plain object * @returns {CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment} CStrangeCountAdjustment */ - CStrangeCountAdjustment.fromObject = function fromObject(object) { + CStrangeCountAdjustment.fromObject = function (object, _depth) { if (object instanceof $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment(); if (object.event_type != null) message.event_type = object.event_type >>> 0; if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -1125,27 +1331,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CStrangeCountAdjustment.toObject = function toObject(message, options) { + CStrangeCountAdjustment.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.event_type = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.adjustment = 0; } - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) object.event_type = message.event_type; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.adjustment != null && message.hasOwnProperty("adjustment")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.adjustment != null && $Object.hasOwnProperty.call(message, "adjustment")) object.adjustment = message.adjustment; return object; }; @@ -1157,8 +1369,22 @@ * @instance * @returns {Object.} JSON object */ - CStrangeCountAdjustment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CStrangeCountAdjustment.prototype.toJSON = function() { + return CStrangeCountAdjustment.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CStrangeCountAdjustment + * @function getTypeUrl + * @memberof CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CStrangeCountAdjustment.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgEconPlayerStrangeCountAdjustment.CStrangeCountAdjustment"; }; return CStrangeCountAdjustment; @@ -1169,28 +1395,41 @@ $root.CMsgRequestItemPurgatory_FinalizePurchase = (function() { + /** + * Properties of a CMsgRequestItemPurgatory_FinalizePurchase. + * @typedef {Object} CMsgRequestItemPurgatory_FinalizePurchase.$Properties + * @property {Array.|null} [item_ids] CMsgRequestItemPurgatory_FinalizePurchase item_ids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgRequestItemPurgatory_FinalizePurchase. * @exports ICMsgRequestItemPurgatory_FinalizePurchase * @interface ICMsgRequestItemPurgatory_FinalizePurchase - * @property {Array.|null} [item_ids] CMsgRequestItemPurgatory_FinalizePurchase item_ids + * @augments CMsgRequestItemPurgatory_FinalizePurchase.$Properties + * @deprecated Use CMsgRequestItemPurgatory_FinalizePurchase.$Properties instead. + */ + + /** + * Shape of a CMsgRequestItemPurgatory_FinalizePurchase. + * @typedef {CMsgRequestItemPurgatory_FinalizePurchase.$Properties} CMsgRequestItemPurgatory_FinalizePurchase.$Shape */ /** * Constructs a new CMsgRequestItemPurgatory_FinalizePurchase. * @exports CMsgRequestItemPurgatory_FinalizePurchase * @classdesc Represents a CMsgRequestItemPurgatory_FinalizePurchase. - * @implements ICMsgRequestItemPurgatory_FinalizePurchase * @constructor - * @param {ICMsgRequestItemPurgatory_FinalizePurchase=} [properties] Properties to set + * @param {CMsgRequestItemPurgatory_FinalizePurchase.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgRequestItemPurgatory_FinalizePurchase(properties) { + var CMsgRequestItemPurgatory_FinalizePurchase = function (properties) { this.item_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgRequestItemPurgatory_FinalizePurchase item_ids. @@ -1205,10 +1444,14 @@ * @function create * @memberof CMsgRequestItemPurgatory_FinalizePurchase * @static - * @param {ICMsgRequestItemPurgatory_FinalizePurchase=} [properties] Properties to set + * @param {CMsgRequestItemPurgatory_FinalizePurchase.$Properties=} [properties] Properties to set * @returns {CMsgRequestItemPurgatory_FinalizePurchase} CMsgRequestItemPurgatory_FinalizePurchase instance + * @type {{ + * (properties: CMsgRequestItemPurgatory_FinalizePurchase.$Shape): CMsgRequestItemPurgatory_FinalizePurchase & CMsgRequestItemPurgatory_FinalizePurchase.$Shape; + * (properties?: CMsgRequestItemPurgatory_FinalizePurchase.$Properties): CMsgRequestItemPurgatory_FinalizePurchase; + * }} */ - CMsgRequestItemPurgatory_FinalizePurchase.create = function create(properties) { + CMsgRequestItemPurgatory_FinalizePurchase.create = function(properties) { return new CMsgRequestItemPurgatory_FinalizePurchase(properties); }; @@ -1217,16 +1460,23 @@ * @function encode * @memberof CMsgRequestItemPurgatory_FinalizePurchase * @static - * @param {ICMsgRequestItemPurgatory_FinalizePurchase} message CMsgRequestItemPurgatory_FinalizePurchase message or plain object to encode + * @param {CMsgRequestItemPurgatory_FinalizePurchase.$Properties} message CMsgRequestItemPurgatory_FinalizePurchase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestItemPurgatory_FinalizePurchase.encode = function encode(message, writer) { + CMsgRequestItemPurgatory_FinalizePurchase.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.item_ids != null && message.item_ids.length) for (var i = 0; i < message.item_ids.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_ids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1235,12 +1485,12 @@ * @function encodeDelimited * @memberof CMsgRequestItemPurgatory_FinalizePurchase * @static - * @param {ICMsgRequestItemPurgatory_FinalizePurchase} message CMsgRequestItemPurgatory_FinalizePurchase message or plain object to encode + * @param {CMsgRequestItemPurgatory_FinalizePurchase.$Properties} message CMsgRequestItemPurgatory_FinalizePurchase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestItemPurgatory_FinalizePurchase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgRequestItemPurgatory_FinalizePurchase.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1250,32 +1500,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgRequestItemPurgatory_FinalizePurchase} CMsgRequestItemPurgatory_FinalizePurchase + * @returns {CMsgRequestItemPurgatory_FinalizePurchase & CMsgRequestItemPurgatory_FinalizePurchase.$Shape} CMsgRequestItemPurgatory_FinalizePurchase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestItemPurgatory_FinalizePurchase.decode = function decode(reader, length) { + CMsgRequestItemPurgatory_FinalizePurchase.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgRequestItemPurgatory_FinalizePurchase(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgRequestItemPurgatory_FinalizePurchase(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.item_ids && message.item_ids.length)) - message.item_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.item_ids.push(reader.uint64()); - } else - message.item_ids.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.item_ids && message.item_ids.length)) + message.item_ids = []; + reader.uint64s(message.item_ids); + continue; + } + if (wireType !== 0) + break; + if (!(message.item_ids && message.item_ids.length)) + message.item_ids = []; + message.item_ids.push(reader.uint64()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1285,11 +1553,11 @@ * @memberof CMsgRequestItemPurgatory_FinalizePurchase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgRequestItemPurgatory_FinalizePurchase} CMsgRequestItemPurgatory_FinalizePurchase + * @returns {CMsgRequestItemPurgatory_FinalizePurchase & CMsgRequestItemPurgatory_FinalizePurchase.$Shape} CMsgRequestItemPurgatory_FinalizePurchase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestItemPurgatory_FinalizePurchase.decodeDelimited = function decodeDelimited(reader) { + CMsgRequestItemPurgatory_FinalizePurchase.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1303,11 +1571,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgRequestItemPurgatory_FinalizePurchase.verify = function verify(message) { + CMsgRequestItemPurgatory_FinalizePurchase.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_ids != null && message.hasOwnProperty("item_ids")) { - if (!Array.isArray(message.item_ids)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_ids != null && $Object.hasOwnProperty.call(message, "item_ids")) { + if (!$Array.isArray(message.item_ids)) return "item_ids: array expected"; for (var i = 0; i < message.item_ids.length; ++i) if (!$util.isInteger(message.item_ids[i]) && !(message.item_ids[i] && $util.isInteger(message.item_ids[i].low) && $util.isInteger(message.item_ids[i].high))) @@ -1324,19 +1596,25 @@ * @param {Object.} object Plain object * @returns {CMsgRequestItemPurgatory_FinalizePurchase} CMsgRequestItemPurgatory_FinalizePurchase */ - CMsgRequestItemPurgatory_FinalizePurchase.fromObject = function fromObject(object) { + CMsgRequestItemPurgatory_FinalizePurchase.fromObject = function (object, _depth) { if (object instanceof $root.CMsgRequestItemPurgatory_FinalizePurchase) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgRequestItemPurgatory_FinalizePurchase: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgRequestItemPurgatory_FinalizePurchase(); if (object.item_ids) { - if (!Array.isArray(object.item_ids)) - throw TypeError(".CMsgRequestItemPurgatory_FinalizePurchase.item_ids: array expected"); - message.item_ids = []; + if (!$Array.isArray(object.item_ids)) + throw $TypeError(".CMsgRequestItemPurgatory_FinalizePurchase.item_ids: array expected"); + message.item_ids = $Array(object.item_ids.length); for (var i = 0; i < object.item_ids.length; ++i) if ($util.Long) - (message.item_ids[i] = $util.Long.fromValue(object.item_ids[i])).unsigned = true; + message.item_ids[i] = $util.Long.fromValue(object.item_ids[i], true); else if (typeof object.item_ids[i] === "string") - message.item_ids[i] = parseInt(object.item_ids[i], 10); + message.item_ids[i] = $parseInt(object.item_ids[i], 10); else if (typeof object.item_ids[i] === "number") message.item_ids[i] = object.item_ids[i]; else if (typeof object.item_ids[i] === "object") @@ -1354,19 +1632,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgRequestItemPurgatory_FinalizePurchase.toObject = function toObject(message, options) { + CMsgRequestItemPurgatory_FinalizePurchase.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.item_ids = []; if (message.item_ids && message.item_ids.length) { - object.item_ids = []; + object.item_ids = $Array(message.item_ids.length); for (var j = 0; j < message.item_ids.length; ++j) - if (typeof message.item_ids[j] === "number") - object.item_ids[j] = options.longs === String ? String(message.item_ids[j]) : message.item_ids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_ids[j] = typeof message.item_ids[j] === "number" ? $BigInt(message.item_ids[j]) : $util.Long.fromBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0, true).toBigInt(); + else if (typeof message.item_ids[j] === "number") + object.item_ids[j] = options.longs === $String ? $String(message.item_ids[j]) : message.item_ids[j]; else - object.item_ids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.item_ids[j]) : options.longs === Number ? new $util.LongBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0).toNumber(true) : message.item_ids[j]; + object.item_ids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.item_ids[j]) : options.longs === $Number ? new $util.LongBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0).toNumber(true) : message.item_ids[j]; } return object; }; @@ -1378,8 +1662,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgRequestItemPurgatory_FinalizePurchase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgRequestItemPurgatory_FinalizePurchase.prototype.toJSON = function() { + return CMsgRequestItemPurgatory_FinalizePurchase.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgRequestItemPurgatory_FinalizePurchase + * @function getTypeUrl + * @memberof CMsgRequestItemPurgatory_FinalizePurchase + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgRequestItemPurgatory_FinalizePurchase.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgRequestItemPurgatory_FinalizePurchase"; }; return CMsgRequestItemPurgatory_FinalizePurchase; @@ -1387,27 +1685,40 @@ $root.CMsgRequestItemPurgatory_FinalizePurchaseResponse = (function() { + /** + * Properties of a CMsgRequestItemPurgatory_FinalizePurchaseResponse. + * @typedef {Object} CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Properties + * @property {number|null} [result] CMsgRequestItemPurgatory_FinalizePurchaseResponse result + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgRequestItemPurgatory_FinalizePurchaseResponse. * @exports ICMsgRequestItemPurgatory_FinalizePurchaseResponse * @interface ICMsgRequestItemPurgatory_FinalizePurchaseResponse - * @property {number|null} [result] CMsgRequestItemPurgatory_FinalizePurchaseResponse result + * @augments CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Properties + * @deprecated Use CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Properties instead. + */ + + /** + * Shape of a CMsgRequestItemPurgatory_FinalizePurchaseResponse. + * @typedef {CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Properties} CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Shape */ /** * Constructs a new CMsgRequestItemPurgatory_FinalizePurchaseResponse. * @exports CMsgRequestItemPurgatory_FinalizePurchaseResponse * @classdesc Represents a CMsgRequestItemPurgatory_FinalizePurchaseResponse. - * @implements ICMsgRequestItemPurgatory_FinalizePurchaseResponse * @constructor - * @param {ICMsgRequestItemPurgatory_FinalizePurchaseResponse=} [properties] Properties to set + * @param {CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgRequestItemPurgatory_FinalizePurchaseResponse(properties) { + var CMsgRequestItemPurgatory_FinalizePurchaseResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgRequestItemPurgatory_FinalizePurchaseResponse result. @@ -1422,10 +1733,14 @@ * @function create * @memberof CMsgRequestItemPurgatory_FinalizePurchaseResponse * @static - * @param {ICMsgRequestItemPurgatory_FinalizePurchaseResponse=} [properties] Properties to set + * @param {CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Properties=} [properties] Properties to set * @returns {CMsgRequestItemPurgatory_FinalizePurchaseResponse} CMsgRequestItemPurgatory_FinalizePurchaseResponse instance + * @type {{ + * (properties: CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Shape): CMsgRequestItemPurgatory_FinalizePurchaseResponse & CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Shape; + * (properties?: CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Properties): CMsgRequestItemPurgatory_FinalizePurchaseResponse; + * }} */ - CMsgRequestItemPurgatory_FinalizePurchaseResponse.create = function create(properties) { + CMsgRequestItemPurgatory_FinalizePurchaseResponse.create = function(properties) { return new CMsgRequestItemPurgatory_FinalizePurchaseResponse(properties); }; @@ -1434,15 +1749,22 @@ * @function encode * @memberof CMsgRequestItemPurgatory_FinalizePurchaseResponse * @static - * @param {ICMsgRequestItemPurgatory_FinalizePurchaseResponse} message CMsgRequestItemPurgatory_FinalizePurchaseResponse message or plain object to encode + * @param {CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Properties} message CMsgRequestItemPurgatory_FinalizePurchaseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestItemPurgatory_FinalizePurchaseResponse.encode = function encode(message, writer) { + CMsgRequestItemPurgatory_FinalizePurchaseResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.result); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1451,12 +1773,12 @@ * @function encodeDelimited * @memberof CMsgRequestItemPurgatory_FinalizePurchaseResponse * @static - * @param {ICMsgRequestItemPurgatory_FinalizePurchaseResponse} message CMsgRequestItemPurgatory_FinalizePurchaseResponse message or plain object to encode + * @param {CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Properties} message CMsgRequestItemPurgatory_FinalizePurchaseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestItemPurgatory_FinalizePurchaseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgRequestItemPurgatory_FinalizePurchaseResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1466,25 +1788,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgRequestItemPurgatory_FinalizePurchaseResponse} CMsgRequestItemPurgatory_FinalizePurchaseResponse + * @returns {CMsgRequestItemPurgatory_FinalizePurchaseResponse & CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Shape} CMsgRequestItemPurgatory_FinalizePurchaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestItemPurgatory_FinalizePurchaseResponse.decode = function decode(reader, length) { + CMsgRequestItemPurgatory_FinalizePurchaseResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgRequestItemPurgatory_FinalizePurchaseResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgRequestItemPurgatory_FinalizePurchaseResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1494,11 +1833,11 @@ * @memberof CMsgRequestItemPurgatory_FinalizePurchaseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgRequestItemPurgatory_FinalizePurchaseResponse} CMsgRequestItemPurgatory_FinalizePurchaseResponse + * @returns {CMsgRequestItemPurgatory_FinalizePurchaseResponse & CMsgRequestItemPurgatory_FinalizePurchaseResponse.$Shape} CMsgRequestItemPurgatory_FinalizePurchaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestItemPurgatory_FinalizePurchaseResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgRequestItemPurgatory_FinalizePurchaseResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1512,10 +1851,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgRequestItemPurgatory_FinalizePurchaseResponse.verify = function verify(message) { + CMsgRequestItemPurgatory_FinalizePurchaseResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; return null; @@ -1529,9 +1872,15 @@ * @param {Object.} object Plain object * @returns {CMsgRequestItemPurgatory_FinalizePurchaseResponse} CMsgRequestItemPurgatory_FinalizePurchaseResponse */ - CMsgRequestItemPurgatory_FinalizePurchaseResponse.fromObject = function fromObject(object) { + CMsgRequestItemPurgatory_FinalizePurchaseResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgRequestItemPurgatory_FinalizePurchaseResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgRequestItemPurgatory_FinalizePurchaseResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgRequestItemPurgatory_FinalizePurchaseResponse(); if (object.result != null) message.result = object.result >>> 0; @@ -1547,13 +1896,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgRequestItemPurgatory_FinalizePurchaseResponse.toObject = function toObject(message, options) { + CMsgRequestItemPurgatory_FinalizePurchaseResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.result = 0; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; return object; }; @@ -1565,8 +1918,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgRequestItemPurgatory_FinalizePurchaseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgRequestItemPurgatory_FinalizePurchaseResponse.prototype.toJSON = function() { + return CMsgRequestItemPurgatory_FinalizePurchaseResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgRequestItemPurgatory_FinalizePurchaseResponse + * @function getTypeUrl + * @memberof CMsgRequestItemPurgatory_FinalizePurchaseResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgRequestItemPurgatory_FinalizePurchaseResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgRequestItemPurgatory_FinalizePurchaseResponse"; }; return CMsgRequestItemPurgatory_FinalizePurchaseResponse; @@ -1574,27 +1941,40 @@ $root.CMsgRequestItemPurgatory_RefundPurchase = (function() { + /** + * Properties of a CMsgRequestItemPurgatory_RefundPurchase. + * @typedef {Object} CMsgRequestItemPurgatory_RefundPurchase.$Properties + * @property {number|Long|null} [item_id] CMsgRequestItemPurgatory_RefundPurchase item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgRequestItemPurgatory_RefundPurchase. * @exports ICMsgRequestItemPurgatory_RefundPurchase * @interface ICMsgRequestItemPurgatory_RefundPurchase - * @property {number|Long|null} [item_id] CMsgRequestItemPurgatory_RefundPurchase item_id + * @augments CMsgRequestItemPurgatory_RefundPurchase.$Properties + * @deprecated Use CMsgRequestItemPurgatory_RefundPurchase.$Properties instead. + */ + + /** + * Shape of a CMsgRequestItemPurgatory_RefundPurchase. + * @typedef {CMsgRequestItemPurgatory_RefundPurchase.$Properties} CMsgRequestItemPurgatory_RefundPurchase.$Shape */ /** * Constructs a new CMsgRequestItemPurgatory_RefundPurchase. * @exports CMsgRequestItemPurgatory_RefundPurchase * @classdesc Represents a CMsgRequestItemPurgatory_RefundPurchase. - * @implements ICMsgRequestItemPurgatory_RefundPurchase * @constructor - * @param {ICMsgRequestItemPurgatory_RefundPurchase=} [properties] Properties to set + * @param {CMsgRequestItemPurgatory_RefundPurchase.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgRequestItemPurgatory_RefundPurchase(properties) { + var CMsgRequestItemPurgatory_RefundPurchase = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgRequestItemPurgatory_RefundPurchase item_id. @@ -1609,10 +1989,14 @@ * @function create * @memberof CMsgRequestItemPurgatory_RefundPurchase * @static - * @param {ICMsgRequestItemPurgatory_RefundPurchase=} [properties] Properties to set + * @param {CMsgRequestItemPurgatory_RefundPurchase.$Properties=} [properties] Properties to set * @returns {CMsgRequestItemPurgatory_RefundPurchase} CMsgRequestItemPurgatory_RefundPurchase instance + * @type {{ + * (properties: CMsgRequestItemPurgatory_RefundPurchase.$Shape): CMsgRequestItemPurgatory_RefundPurchase & CMsgRequestItemPurgatory_RefundPurchase.$Shape; + * (properties?: CMsgRequestItemPurgatory_RefundPurchase.$Properties): CMsgRequestItemPurgatory_RefundPurchase; + * }} */ - CMsgRequestItemPurgatory_RefundPurchase.create = function create(properties) { + CMsgRequestItemPurgatory_RefundPurchase.create = function(properties) { return new CMsgRequestItemPurgatory_RefundPurchase(properties); }; @@ -1621,15 +2005,22 @@ * @function encode * @memberof CMsgRequestItemPurgatory_RefundPurchase * @static - * @param {ICMsgRequestItemPurgatory_RefundPurchase} message CMsgRequestItemPurgatory_RefundPurchase message or plain object to encode + * @param {CMsgRequestItemPurgatory_RefundPurchase.$Properties} message CMsgRequestItemPurgatory_RefundPurchase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestItemPurgatory_RefundPurchase.encode = function encode(message, writer) { + CMsgRequestItemPurgatory_RefundPurchase.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1638,12 +2029,12 @@ * @function encodeDelimited * @memberof CMsgRequestItemPurgatory_RefundPurchase * @static - * @param {ICMsgRequestItemPurgatory_RefundPurchase} message CMsgRequestItemPurgatory_RefundPurchase message or plain object to encode + * @param {CMsgRequestItemPurgatory_RefundPurchase.$Properties} message CMsgRequestItemPurgatory_RefundPurchase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestItemPurgatory_RefundPurchase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgRequestItemPurgatory_RefundPurchase.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1653,25 +2044,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgRequestItemPurgatory_RefundPurchase} CMsgRequestItemPurgatory_RefundPurchase + * @returns {CMsgRequestItemPurgatory_RefundPurchase & CMsgRequestItemPurgatory_RefundPurchase.$Shape} CMsgRequestItemPurgatory_RefundPurchase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestItemPurgatory_RefundPurchase.decode = function decode(reader, length) { + CMsgRequestItemPurgatory_RefundPurchase.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgRequestItemPurgatory_RefundPurchase(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgRequestItemPurgatory_RefundPurchase(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1681,11 +2089,11 @@ * @memberof CMsgRequestItemPurgatory_RefundPurchase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgRequestItemPurgatory_RefundPurchase} CMsgRequestItemPurgatory_RefundPurchase + * @returns {CMsgRequestItemPurgatory_RefundPurchase & CMsgRequestItemPurgatory_RefundPurchase.$Shape} CMsgRequestItemPurgatory_RefundPurchase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestItemPurgatory_RefundPurchase.decodeDelimited = function decodeDelimited(reader) { + CMsgRequestItemPurgatory_RefundPurchase.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1699,10 +2107,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgRequestItemPurgatory_RefundPurchase.verify = function verify(message) { + CMsgRequestItemPurgatory_RefundPurchase.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; return null; @@ -1716,15 +2128,21 @@ * @param {Object.} object Plain object * @returns {CMsgRequestItemPurgatory_RefundPurchase} CMsgRequestItemPurgatory_RefundPurchase */ - CMsgRequestItemPurgatory_RefundPurchase.fromObject = function fromObject(object) { + CMsgRequestItemPurgatory_RefundPurchase.fromObject = function (object, _depth) { if (object instanceof $root.CMsgRequestItemPurgatory_RefundPurchase) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgRequestItemPurgatory_RefundPurchase: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgRequestItemPurgatory_RefundPurchase(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -1741,21 +2159,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgRequestItemPurgatory_RefundPurchase.toObject = function toObject(message, options) { + CMsgRequestItemPurgatory_RefundPurchase.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; return object; }; @@ -1766,8 +2190,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgRequestItemPurgatory_RefundPurchase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgRequestItemPurgatory_RefundPurchase.prototype.toJSON = function() { + return CMsgRequestItemPurgatory_RefundPurchase.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgRequestItemPurgatory_RefundPurchase + * @function getTypeUrl + * @memberof CMsgRequestItemPurgatory_RefundPurchase + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgRequestItemPurgatory_RefundPurchase.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgRequestItemPurgatory_RefundPurchase"; }; return CMsgRequestItemPurgatory_RefundPurchase; @@ -1775,27 +2213,40 @@ $root.CMsgRequestItemPurgatory_RefundPurchaseResponse = (function() { + /** + * Properties of a CMsgRequestItemPurgatory_RefundPurchaseResponse. + * @typedef {Object} CMsgRequestItemPurgatory_RefundPurchaseResponse.$Properties + * @property {number|null} [result] CMsgRequestItemPurgatory_RefundPurchaseResponse result + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgRequestItemPurgatory_RefundPurchaseResponse. * @exports ICMsgRequestItemPurgatory_RefundPurchaseResponse * @interface ICMsgRequestItemPurgatory_RefundPurchaseResponse - * @property {number|null} [result] CMsgRequestItemPurgatory_RefundPurchaseResponse result + * @augments CMsgRequestItemPurgatory_RefundPurchaseResponse.$Properties + * @deprecated Use CMsgRequestItemPurgatory_RefundPurchaseResponse.$Properties instead. + */ + + /** + * Shape of a CMsgRequestItemPurgatory_RefundPurchaseResponse. + * @typedef {CMsgRequestItemPurgatory_RefundPurchaseResponse.$Properties} CMsgRequestItemPurgatory_RefundPurchaseResponse.$Shape */ /** * Constructs a new CMsgRequestItemPurgatory_RefundPurchaseResponse. * @exports CMsgRequestItemPurgatory_RefundPurchaseResponse * @classdesc Represents a CMsgRequestItemPurgatory_RefundPurchaseResponse. - * @implements ICMsgRequestItemPurgatory_RefundPurchaseResponse * @constructor - * @param {ICMsgRequestItemPurgatory_RefundPurchaseResponse=} [properties] Properties to set + * @param {CMsgRequestItemPurgatory_RefundPurchaseResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgRequestItemPurgatory_RefundPurchaseResponse(properties) { + var CMsgRequestItemPurgatory_RefundPurchaseResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgRequestItemPurgatory_RefundPurchaseResponse result. @@ -1810,10 +2261,14 @@ * @function create * @memberof CMsgRequestItemPurgatory_RefundPurchaseResponse * @static - * @param {ICMsgRequestItemPurgatory_RefundPurchaseResponse=} [properties] Properties to set + * @param {CMsgRequestItemPurgatory_RefundPurchaseResponse.$Properties=} [properties] Properties to set * @returns {CMsgRequestItemPurgatory_RefundPurchaseResponse} CMsgRequestItemPurgatory_RefundPurchaseResponse instance + * @type {{ + * (properties: CMsgRequestItemPurgatory_RefundPurchaseResponse.$Shape): CMsgRequestItemPurgatory_RefundPurchaseResponse & CMsgRequestItemPurgatory_RefundPurchaseResponse.$Shape; + * (properties?: CMsgRequestItemPurgatory_RefundPurchaseResponse.$Properties): CMsgRequestItemPurgatory_RefundPurchaseResponse; + * }} */ - CMsgRequestItemPurgatory_RefundPurchaseResponse.create = function create(properties) { + CMsgRequestItemPurgatory_RefundPurchaseResponse.create = function(properties) { return new CMsgRequestItemPurgatory_RefundPurchaseResponse(properties); }; @@ -1822,15 +2277,22 @@ * @function encode * @memberof CMsgRequestItemPurgatory_RefundPurchaseResponse * @static - * @param {ICMsgRequestItemPurgatory_RefundPurchaseResponse} message CMsgRequestItemPurgatory_RefundPurchaseResponse message or plain object to encode + * @param {CMsgRequestItemPurgatory_RefundPurchaseResponse.$Properties} message CMsgRequestItemPurgatory_RefundPurchaseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestItemPurgatory_RefundPurchaseResponse.encode = function encode(message, writer) { + CMsgRequestItemPurgatory_RefundPurchaseResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.result); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1839,12 +2301,12 @@ * @function encodeDelimited * @memberof CMsgRequestItemPurgatory_RefundPurchaseResponse * @static - * @param {ICMsgRequestItemPurgatory_RefundPurchaseResponse} message CMsgRequestItemPurgatory_RefundPurchaseResponse message or plain object to encode + * @param {CMsgRequestItemPurgatory_RefundPurchaseResponse.$Properties} message CMsgRequestItemPurgatory_RefundPurchaseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestItemPurgatory_RefundPurchaseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgRequestItemPurgatory_RefundPurchaseResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1854,25 +2316,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgRequestItemPurgatory_RefundPurchaseResponse} CMsgRequestItemPurgatory_RefundPurchaseResponse + * @returns {CMsgRequestItemPurgatory_RefundPurchaseResponse & CMsgRequestItemPurgatory_RefundPurchaseResponse.$Shape} CMsgRequestItemPurgatory_RefundPurchaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestItemPurgatory_RefundPurchaseResponse.decode = function decode(reader, length) { + CMsgRequestItemPurgatory_RefundPurchaseResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgRequestItemPurgatory_RefundPurchaseResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgRequestItemPurgatory_RefundPurchaseResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1882,11 +2361,11 @@ * @memberof CMsgRequestItemPurgatory_RefundPurchaseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgRequestItemPurgatory_RefundPurchaseResponse} CMsgRequestItemPurgatory_RefundPurchaseResponse + * @returns {CMsgRequestItemPurgatory_RefundPurchaseResponse & CMsgRequestItemPurgatory_RefundPurchaseResponse.$Shape} CMsgRequestItemPurgatory_RefundPurchaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestItemPurgatory_RefundPurchaseResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgRequestItemPurgatory_RefundPurchaseResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1900,10 +2379,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgRequestItemPurgatory_RefundPurchaseResponse.verify = function verify(message) { + CMsgRequestItemPurgatory_RefundPurchaseResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; return null; @@ -1917,9 +2400,15 @@ * @param {Object.} object Plain object * @returns {CMsgRequestItemPurgatory_RefundPurchaseResponse} CMsgRequestItemPurgatory_RefundPurchaseResponse */ - CMsgRequestItemPurgatory_RefundPurchaseResponse.fromObject = function fromObject(object) { + CMsgRequestItemPurgatory_RefundPurchaseResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgRequestItemPurgatory_RefundPurchaseResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgRequestItemPurgatory_RefundPurchaseResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgRequestItemPurgatory_RefundPurchaseResponse(); if (object.result != null) message.result = object.result >>> 0; @@ -1935,13 +2424,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgRequestItemPurgatory_RefundPurchaseResponse.toObject = function toObject(message, options) { + CMsgRequestItemPurgatory_RefundPurchaseResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.result = 0; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; return object; }; @@ -1953,8 +2446,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgRequestItemPurgatory_RefundPurchaseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgRequestItemPurgatory_RefundPurchaseResponse.prototype.toJSON = function() { + return CMsgRequestItemPurgatory_RefundPurchaseResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgRequestItemPurgatory_RefundPurchaseResponse + * @function getTypeUrl + * @memberof CMsgRequestItemPurgatory_RefundPurchaseResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgRequestItemPurgatory_RefundPurchaseResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgRequestItemPurgatory_RefundPurchaseResponse"; }; return CMsgRequestItemPurgatory_RefundPurchaseResponse; @@ -1962,28 +2469,41 @@ $root.CMsgCraftingResponse = (function() { + /** + * Properties of a CMsgCraftingResponse. + * @typedef {Object} CMsgCraftingResponse.$Properties + * @property {Array.|null} [item_ids] CMsgCraftingResponse item_ids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgCraftingResponse. * @exports ICMsgCraftingResponse * @interface ICMsgCraftingResponse - * @property {Array.|null} [item_ids] CMsgCraftingResponse item_ids + * @augments CMsgCraftingResponse.$Properties + * @deprecated Use CMsgCraftingResponse.$Properties instead. + */ + + /** + * Shape of a CMsgCraftingResponse. + * @typedef {CMsgCraftingResponse.$Properties} CMsgCraftingResponse.$Shape */ /** * Constructs a new CMsgCraftingResponse. * @exports CMsgCraftingResponse * @classdesc Represents a CMsgCraftingResponse. - * @implements ICMsgCraftingResponse * @constructor - * @param {ICMsgCraftingResponse=} [properties] Properties to set + * @param {CMsgCraftingResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgCraftingResponse(properties) { + var CMsgCraftingResponse = function (properties) { this.item_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgCraftingResponse item_ids. @@ -1998,10 +2518,14 @@ * @function create * @memberof CMsgCraftingResponse * @static - * @param {ICMsgCraftingResponse=} [properties] Properties to set + * @param {CMsgCraftingResponse.$Properties=} [properties] Properties to set * @returns {CMsgCraftingResponse} CMsgCraftingResponse instance + * @type {{ + * (properties: CMsgCraftingResponse.$Shape): CMsgCraftingResponse & CMsgCraftingResponse.$Shape; + * (properties?: CMsgCraftingResponse.$Properties): CMsgCraftingResponse; + * }} */ - CMsgCraftingResponse.create = function create(properties) { + CMsgCraftingResponse.create = function(properties) { return new CMsgCraftingResponse(properties); }; @@ -2010,16 +2534,23 @@ * @function encode * @memberof CMsgCraftingResponse * @static - * @param {ICMsgCraftingResponse} message CMsgCraftingResponse message or plain object to encode + * @param {CMsgCraftingResponse.$Properties} message CMsgCraftingResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgCraftingResponse.encode = function encode(message, writer) { + CMsgCraftingResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.item_ids != null && message.item_ids.length) for (var i = 0; i < message.item_ids.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_ids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2028,12 +2559,12 @@ * @function encodeDelimited * @memberof CMsgCraftingResponse * @static - * @param {ICMsgCraftingResponse} message CMsgCraftingResponse message or plain object to encode + * @param {CMsgCraftingResponse.$Properties} message CMsgCraftingResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgCraftingResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgCraftingResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2043,32 +2574,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgCraftingResponse} CMsgCraftingResponse + * @returns {CMsgCraftingResponse & CMsgCraftingResponse.$Shape} CMsgCraftingResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgCraftingResponse.decode = function decode(reader, length) { + CMsgCraftingResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgCraftingResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgCraftingResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.item_ids && message.item_ids.length)) - message.item_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.item_ids.push(reader.uint64()); - } else - message.item_ids.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.item_ids && message.item_ids.length)) + message.item_ids = []; + reader.uint64s(message.item_ids); + continue; + } + if (wireType !== 0) + break; + if (!(message.item_ids && message.item_ids.length)) + message.item_ids = []; + message.item_ids.push(reader.uint64()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2078,11 +2627,11 @@ * @memberof CMsgCraftingResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgCraftingResponse} CMsgCraftingResponse + * @returns {CMsgCraftingResponse & CMsgCraftingResponse.$Shape} CMsgCraftingResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgCraftingResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgCraftingResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2096,11 +2645,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgCraftingResponse.verify = function verify(message) { + CMsgCraftingResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_ids != null && message.hasOwnProperty("item_ids")) { - if (!Array.isArray(message.item_ids)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_ids != null && $Object.hasOwnProperty.call(message, "item_ids")) { + if (!$Array.isArray(message.item_ids)) return "item_ids: array expected"; for (var i = 0; i < message.item_ids.length; ++i) if (!$util.isInteger(message.item_ids[i]) && !(message.item_ids[i] && $util.isInteger(message.item_ids[i].low) && $util.isInteger(message.item_ids[i].high))) @@ -2117,19 +2670,25 @@ * @param {Object.} object Plain object * @returns {CMsgCraftingResponse} CMsgCraftingResponse */ - CMsgCraftingResponse.fromObject = function fromObject(object) { + CMsgCraftingResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgCraftingResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgCraftingResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgCraftingResponse(); if (object.item_ids) { - if (!Array.isArray(object.item_ids)) - throw TypeError(".CMsgCraftingResponse.item_ids: array expected"); - message.item_ids = []; + if (!$Array.isArray(object.item_ids)) + throw $TypeError(".CMsgCraftingResponse.item_ids: array expected"); + message.item_ids = $Array(object.item_ids.length); for (var i = 0; i < object.item_ids.length; ++i) if ($util.Long) - (message.item_ids[i] = $util.Long.fromValue(object.item_ids[i])).unsigned = true; + message.item_ids[i] = $util.Long.fromValue(object.item_ids[i], true); else if (typeof object.item_ids[i] === "string") - message.item_ids[i] = parseInt(object.item_ids[i], 10); + message.item_ids[i] = $parseInt(object.item_ids[i], 10); else if (typeof object.item_ids[i] === "number") message.item_ids[i] = object.item_ids[i]; else if (typeof object.item_ids[i] === "object") @@ -2147,19 +2706,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgCraftingResponse.toObject = function toObject(message, options) { + CMsgCraftingResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.item_ids = []; if (message.item_ids && message.item_ids.length) { - object.item_ids = []; + object.item_ids = $Array(message.item_ids.length); for (var j = 0; j < message.item_ids.length; ++j) - if (typeof message.item_ids[j] === "number") - object.item_ids[j] = options.longs === String ? String(message.item_ids[j]) : message.item_ids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_ids[j] = typeof message.item_ids[j] === "number" ? $BigInt(message.item_ids[j]) : $util.Long.fromBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0, true).toBigInt(); + else if (typeof message.item_ids[j] === "number") + object.item_ids[j] = options.longs === $String ? $String(message.item_ids[j]) : message.item_ids[j]; else - object.item_ids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.item_ids[j]) : options.longs === Number ? new $util.LongBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0).toNumber(true) : message.item_ids[j]; + object.item_ids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.item_ids[j]) : options.longs === $Number ? new $util.LongBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0).toNumber(true) : message.item_ids[j]; } return object; }; @@ -2171,8 +2736,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgCraftingResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgCraftingResponse.prototype.toJSON = function() { + return CMsgCraftingResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgCraftingResponse + * @function getTypeUrl + * @memberof CMsgCraftingResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgCraftingResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgCraftingResponse"; }; return CMsgCraftingResponse; @@ -2182,26 +2761,39 @@ /** * Properties of a CMsgGCRequestStoreSalesData. - * @exports ICMsgGCRequestStoreSalesData - * @interface ICMsgGCRequestStoreSalesData + * @typedef {Object} CMsgGCRequestStoreSalesData.$Properties * @property {number|null} [version] CMsgGCRequestStoreSalesData version * @property {number|null} [currency] CMsgGCRequestStoreSalesData currency + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRequestStoreSalesData. + * @exports ICMsgGCRequestStoreSalesData + * @interface ICMsgGCRequestStoreSalesData + * @augments CMsgGCRequestStoreSalesData.$Properties + * @deprecated Use CMsgGCRequestStoreSalesData.$Properties instead. + */ + + /** + * Shape of a CMsgGCRequestStoreSalesData. + * @typedef {CMsgGCRequestStoreSalesData.$Properties} CMsgGCRequestStoreSalesData.$Shape */ /** * Constructs a new CMsgGCRequestStoreSalesData. * @exports CMsgGCRequestStoreSalesData * @classdesc Represents a CMsgGCRequestStoreSalesData. - * @implements ICMsgGCRequestStoreSalesData * @constructor - * @param {ICMsgGCRequestStoreSalesData=} [properties] Properties to set + * @param {CMsgGCRequestStoreSalesData.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRequestStoreSalesData(properties) { + var CMsgGCRequestStoreSalesData = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRequestStoreSalesData version. @@ -2224,10 +2816,14 @@ * @function create * @memberof CMsgGCRequestStoreSalesData * @static - * @param {ICMsgGCRequestStoreSalesData=} [properties] Properties to set + * @param {CMsgGCRequestStoreSalesData.$Properties=} [properties] Properties to set * @returns {CMsgGCRequestStoreSalesData} CMsgGCRequestStoreSalesData instance + * @type {{ + * (properties: CMsgGCRequestStoreSalesData.$Shape): CMsgGCRequestStoreSalesData & CMsgGCRequestStoreSalesData.$Shape; + * (properties?: CMsgGCRequestStoreSalesData.$Properties): CMsgGCRequestStoreSalesData; + * }} */ - CMsgGCRequestStoreSalesData.create = function create(properties) { + CMsgGCRequestStoreSalesData.create = function(properties) { return new CMsgGCRequestStoreSalesData(properties); }; @@ -2236,17 +2832,24 @@ * @function encode * @memberof CMsgGCRequestStoreSalesData * @static - * @param {ICMsgGCRequestStoreSalesData} message CMsgGCRequestStoreSalesData message or plain object to encode + * @param {CMsgGCRequestStoreSalesData.$Properties} message CMsgGCRequestStoreSalesData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestStoreSalesData.encode = function encode(message, writer) { + CMsgGCRequestStoreSalesData.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.currency); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2255,12 +2858,12 @@ * @function encodeDelimited * @memberof CMsgGCRequestStoreSalesData * @static - * @param {ICMsgGCRequestStoreSalesData} message CMsgGCRequestStoreSalesData message or plain object to encode + * @param {CMsgGCRequestStoreSalesData.$Properties} message CMsgGCRequestStoreSalesData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestStoreSalesData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRequestStoreSalesData.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2270,42 +2873,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRequestStoreSalesData} CMsgGCRequestStoreSalesData + * @returns {CMsgGCRequestStoreSalesData & CMsgGCRequestStoreSalesData.$Shape} CMsgGCRequestStoreSalesData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestStoreSalesData.decode = function decode(reader, length) { + CMsgGCRequestStoreSalesData.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRequestStoreSalesData(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRequestStoreSalesData(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.uint32(); - break; - case 2: - message.currency = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } - } - return message; - }; - + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.currency = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + /** * Decodes a CMsgGCRequestStoreSalesData message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof CMsgGCRequestStoreSalesData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRequestStoreSalesData} CMsgGCRequestStoreSalesData + * @returns {CMsgGCRequestStoreSalesData & CMsgGCRequestStoreSalesData.$Shape} CMsgGCRequestStoreSalesData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestStoreSalesData.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRequestStoreSalesData.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2319,13 +2942,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRequestStoreSalesData.verify = function verify(message) { + CMsgGCRequestStoreSalesData.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) if (!$util.isInteger(message.currency)) return "currency: integer expected"; return null; @@ -2339,9 +2966,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCRequestStoreSalesData} CMsgGCRequestStoreSalesData */ - CMsgGCRequestStoreSalesData.fromObject = function fromObject(object) { + CMsgGCRequestStoreSalesData.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRequestStoreSalesData) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRequestStoreSalesData: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRequestStoreSalesData(); if (object.version != null) message.version = object.version >>> 0; @@ -2359,17 +2992,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRequestStoreSalesData.toObject = function toObject(message, options) { + CMsgGCRequestStoreSalesData.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.version = 0; object.currency = 0; } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) object.currency = message.currency; return object; }; @@ -2381,8 +3018,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRequestStoreSalesData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRequestStoreSalesData.prototype.toJSON = function() { + return CMsgGCRequestStoreSalesData.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRequestStoreSalesData + * @function getTypeUrl + * @memberof CMsgGCRequestStoreSalesData + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRequestStoreSalesData.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRequestStoreSalesData"; }; return CMsgGCRequestStoreSalesData; @@ -2392,32 +3043,45 @@ /** * Properties of a CMsgGCRequestStoreSalesDataResponse. - * @exports ICMsgGCRequestStoreSalesDataResponse - * @interface ICMsgGCRequestStoreSalesDataResponse - * @property {Array.|null} [sale_price] CMsgGCRequestStoreSalesDataResponse sale_price + * @typedef {Object} CMsgGCRequestStoreSalesDataResponse.$Properties + * @property {Array.|null} [sale_price] CMsgGCRequestStoreSalesDataResponse sale_price * @property {number|null} [version] CMsgGCRequestStoreSalesDataResponse version * @property {number|null} [expiration_time] CMsgGCRequestStoreSalesDataResponse expiration_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRequestStoreSalesDataResponse. + * @exports ICMsgGCRequestStoreSalesDataResponse + * @interface ICMsgGCRequestStoreSalesDataResponse + * @augments CMsgGCRequestStoreSalesDataResponse.$Properties + * @deprecated Use CMsgGCRequestStoreSalesDataResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCRequestStoreSalesDataResponse. + * @typedef {CMsgGCRequestStoreSalesDataResponse.$Properties} CMsgGCRequestStoreSalesDataResponse.$Shape */ /** * Constructs a new CMsgGCRequestStoreSalesDataResponse. * @exports CMsgGCRequestStoreSalesDataResponse * @classdesc Represents a CMsgGCRequestStoreSalesDataResponse. - * @implements ICMsgGCRequestStoreSalesDataResponse * @constructor - * @param {ICMsgGCRequestStoreSalesDataResponse=} [properties] Properties to set + * @param {CMsgGCRequestStoreSalesDataResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRequestStoreSalesDataResponse(properties) { + var CMsgGCRequestStoreSalesDataResponse = function (properties) { this.sale_price = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRequestStoreSalesDataResponse sale_price. - * @member {Array.} sale_price + * @member {Array.} sale_price * @memberof CMsgGCRequestStoreSalesDataResponse * @instance */ @@ -2444,10 +3108,14 @@ * @function create * @memberof CMsgGCRequestStoreSalesDataResponse * @static - * @param {ICMsgGCRequestStoreSalesDataResponse=} [properties] Properties to set + * @param {CMsgGCRequestStoreSalesDataResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCRequestStoreSalesDataResponse} CMsgGCRequestStoreSalesDataResponse instance + * @type {{ + * (properties: CMsgGCRequestStoreSalesDataResponse.$Shape): CMsgGCRequestStoreSalesDataResponse & CMsgGCRequestStoreSalesDataResponse.$Shape; + * (properties?: CMsgGCRequestStoreSalesDataResponse.$Properties): CMsgGCRequestStoreSalesDataResponse; + * }} */ - CMsgGCRequestStoreSalesDataResponse.create = function create(properties) { + CMsgGCRequestStoreSalesDataResponse.create = function(properties) { return new CMsgGCRequestStoreSalesDataResponse(properties); }; @@ -2456,20 +3124,27 @@ * @function encode * @memberof CMsgGCRequestStoreSalesDataResponse * @static - * @param {ICMsgGCRequestStoreSalesDataResponse} message CMsgGCRequestStoreSalesDataResponse message or plain object to encode + * @param {CMsgGCRequestStoreSalesDataResponse.$Properties} message CMsgGCRequestStoreSalesDataResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestStoreSalesDataResponse.encode = function encode(message, writer) { + CMsgGCRequestStoreSalesDataResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.sale_price != null && message.sale_price.length) for (var i = 0; i < message.sale_price.length; ++i) - $root.CMsgGCRequestStoreSalesDataResponse.Price.encode(message.sale_price[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.CMsgGCRequestStoreSalesDataResponse.Price.encode(message.sale_price[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.version); - if (message.expiration_time != null && Object.hasOwnProperty.call(message, "expiration_time")) + if (message.expiration_time != null && $Object.hasOwnProperty.call(message, "expiration_time")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.expiration_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2478,12 +3153,12 @@ * @function encodeDelimited * @memberof CMsgGCRequestStoreSalesDataResponse * @static - * @param {ICMsgGCRequestStoreSalesDataResponse} message CMsgGCRequestStoreSalesDataResponse message or plain object to encode + * @param {CMsgGCRequestStoreSalesDataResponse.$Properties} message CMsgGCRequestStoreSalesDataResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestStoreSalesDataResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRequestStoreSalesDataResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2493,33 +3168,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRequestStoreSalesDataResponse} CMsgGCRequestStoreSalesDataResponse + * @returns {CMsgGCRequestStoreSalesDataResponse & CMsgGCRequestStoreSalesDataResponse.$Shape} CMsgGCRequestStoreSalesDataResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestStoreSalesDataResponse.decode = function decode(reader, length) { + CMsgGCRequestStoreSalesDataResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRequestStoreSalesDataResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRequestStoreSalesDataResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.sale_price && message.sale_price.length)) - message.sale_price = []; - message.sale_price.push($root.CMsgGCRequestStoreSalesDataResponse.Price.decode(reader, reader.uint32())); - break; - case 2: - message.version = reader.uint32(); - break; - case 3: - message.expiration_time = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.sale_price && message.sale_price.length)) + message.sale_price = []; + message.sale_price.push($root.CMsgGCRequestStoreSalesDataResponse.Price.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.expiration_time = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2529,11 +3227,11 @@ * @memberof CMsgGCRequestStoreSalesDataResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRequestStoreSalesDataResponse} CMsgGCRequestStoreSalesDataResponse + * @returns {CMsgGCRequestStoreSalesDataResponse & CMsgGCRequestStoreSalesDataResponse.$Shape} CMsgGCRequestStoreSalesDataResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestStoreSalesDataResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRequestStoreSalesDataResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2547,22 +3245,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRequestStoreSalesDataResponse.verify = function verify(message) { + CMsgGCRequestStoreSalesDataResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sale_price != null && message.hasOwnProperty("sale_price")) { - if (!Array.isArray(message.sale_price)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.sale_price != null && $Object.hasOwnProperty.call(message, "sale_price")) { + if (!$Array.isArray(message.sale_price)) return "sale_price: array expected"; for (var i = 0; i < message.sale_price.length; ++i) { - var error = $root.CMsgGCRequestStoreSalesDataResponse.Price.verify(message.sale_price[i]); + var error = $root.CMsgGCRequestStoreSalesDataResponse.Price.verify(message.sale_price[i], _depth + 1); if (error) return "sale_price." + error; } } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.expiration_time != null && message.hasOwnProperty("expiration_time")) + if (message.expiration_time != null && $Object.hasOwnProperty.call(message, "expiration_time")) if (!$util.isInteger(message.expiration_time)) return "expiration_time: integer expected"; return null; @@ -2576,18 +3278,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCRequestStoreSalesDataResponse} CMsgGCRequestStoreSalesDataResponse */ - CMsgGCRequestStoreSalesDataResponse.fromObject = function fromObject(object) { + CMsgGCRequestStoreSalesDataResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRequestStoreSalesDataResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRequestStoreSalesDataResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRequestStoreSalesDataResponse(); if (object.sale_price) { - if (!Array.isArray(object.sale_price)) - throw TypeError(".CMsgGCRequestStoreSalesDataResponse.sale_price: array expected"); - message.sale_price = []; + if (!$Array.isArray(object.sale_price)) + throw $TypeError(".CMsgGCRequestStoreSalesDataResponse.sale_price: array expected"); + message.sale_price = $Array(object.sale_price.length); for (var i = 0; i < object.sale_price.length; ++i) { - if (typeof object.sale_price[i] !== "object") - throw TypeError(".CMsgGCRequestStoreSalesDataResponse.sale_price: object expected"); - message.sale_price[i] = $root.CMsgGCRequestStoreSalesDataResponse.Price.fromObject(object.sale_price[i]); + if (!$util.isObject(object.sale_price[i])) + throw $TypeError(".CMsgGCRequestStoreSalesDataResponse.sale_price: object expected"); + message.sale_price[i] = $root.CMsgGCRequestStoreSalesDataResponse.Price.fromObject(object.sale_price[i], _depth + 1); } } if (object.version != null) @@ -2606,9 +3314,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRequestStoreSalesDataResponse.toObject = function toObject(message, options) { + CMsgGCRequestStoreSalesDataResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.sale_price = []; @@ -2617,13 +3329,13 @@ object.expiration_time = 0; } if (message.sale_price && message.sale_price.length) { - object.sale_price = []; + object.sale_price = $Array(message.sale_price.length); for (var j = 0; j < message.sale_price.length; ++j) - object.sale_price[j] = $root.CMsgGCRequestStoreSalesDataResponse.Price.toObject(message.sale_price[j], options); + object.sale_price[j] = $root.CMsgGCRequestStoreSalesDataResponse.Price.toObject(message.sale_price[j], options, _depth + 1); } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.expiration_time != null && message.hasOwnProperty("expiration_time")) + if (message.expiration_time != null && $Object.hasOwnProperty.call(message, "expiration_time")) object.expiration_time = message.expiration_time; return object; }; @@ -2635,34 +3347,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRequestStoreSalesDataResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRequestStoreSalesDataResponse.prototype.toJSON = function() { + return CMsgGCRequestStoreSalesDataResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRequestStoreSalesDataResponse + * @function getTypeUrl + * @memberof CMsgGCRequestStoreSalesDataResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRequestStoreSalesDataResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRequestStoreSalesDataResponse"; }; CMsgGCRequestStoreSalesDataResponse.Price = (function() { /** * Properties of a Price. - * @memberof CMsgGCRequestStoreSalesDataResponse - * @interface IPrice + * @typedef {Object} CMsgGCRequestStoreSalesDataResponse.Price.$Properties * @property {number|null} [item_def] Price item_def * @property {number|null} [price] Price price + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Price. + * @memberof CMsgGCRequestStoreSalesDataResponse + * @interface IPrice + * @augments CMsgGCRequestStoreSalesDataResponse.Price.$Properties + * @deprecated Use CMsgGCRequestStoreSalesDataResponse.Price.$Properties instead. + */ + + /** + * Shape of a Price. + * @typedef {CMsgGCRequestStoreSalesDataResponse.Price.$Properties} CMsgGCRequestStoreSalesDataResponse.Price.$Shape */ /** * Constructs a new Price. * @memberof CMsgGCRequestStoreSalesDataResponse * @classdesc Represents a Price. - * @implements IPrice * @constructor - * @param {CMsgGCRequestStoreSalesDataResponse.IPrice=} [properties] Properties to set + * @param {CMsgGCRequestStoreSalesDataResponse.Price.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Price(properties) { + var Price = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Price item_def. @@ -2685,10 +3424,14 @@ * @function create * @memberof CMsgGCRequestStoreSalesDataResponse.Price * @static - * @param {CMsgGCRequestStoreSalesDataResponse.IPrice=} [properties] Properties to set + * @param {CMsgGCRequestStoreSalesDataResponse.Price.$Properties=} [properties] Properties to set * @returns {CMsgGCRequestStoreSalesDataResponse.Price} Price instance + * @type {{ + * (properties: CMsgGCRequestStoreSalesDataResponse.Price.$Shape): CMsgGCRequestStoreSalesDataResponse.Price & CMsgGCRequestStoreSalesDataResponse.Price.$Shape; + * (properties?: CMsgGCRequestStoreSalesDataResponse.Price.$Properties): CMsgGCRequestStoreSalesDataResponse.Price; + * }} */ - Price.create = function create(properties) { + Price.create = function(properties) { return new Price(properties); }; @@ -2697,17 +3440,24 @@ * @function encode * @memberof CMsgGCRequestStoreSalesDataResponse.Price * @static - * @param {CMsgGCRequestStoreSalesDataResponse.IPrice} message Price message or plain object to encode + * @param {CMsgGCRequestStoreSalesDataResponse.Price.$Properties} message Price message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Price.encode = function encode(message, writer) { + Price.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_def != null && Object.hasOwnProperty.call(message, "item_def")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.item_def); - if (message.price != null && Object.hasOwnProperty.call(message, "price")) + if (message.price != null && $Object.hasOwnProperty.call(message, "price")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.price); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2716,12 +3466,12 @@ * @function encodeDelimited * @memberof CMsgGCRequestStoreSalesDataResponse.Price * @static - * @param {CMsgGCRequestStoreSalesDataResponse.IPrice} message Price message or plain object to encode + * @param {CMsgGCRequestStoreSalesDataResponse.Price.$Properties} message Price message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Price.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Price.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2731,28 +3481,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRequestStoreSalesDataResponse.Price} Price + * @returns {CMsgGCRequestStoreSalesDataResponse.Price & CMsgGCRequestStoreSalesDataResponse.Price.$Shape} Price * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Price.decode = function decode(reader, length) { + Price.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRequestStoreSalesDataResponse.Price(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRequestStoreSalesDataResponse.Price(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_def = reader.uint32(); - break; - case 2: - message.price = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_def = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.price = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2762,11 +3532,11 @@ * @memberof CMsgGCRequestStoreSalesDataResponse.Price * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRequestStoreSalesDataResponse.Price} Price + * @returns {CMsgGCRequestStoreSalesDataResponse.Price & CMsgGCRequestStoreSalesDataResponse.Price.$Shape} Price * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Price.decodeDelimited = function decodeDelimited(reader) { + Price.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2780,13 +3550,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Price.verify = function verify(message) { + Price.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_def != null && message.hasOwnProperty("item_def")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) if (!$util.isInteger(message.item_def)) return "item_def: integer expected"; - if (message.price != null && message.hasOwnProperty("price")) + if (message.price != null && $Object.hasOwnProperty.call(message, "price")) if (!$util.isInteger(message.price)) return "price: integer expected"; return null; @@ -2800,9 +3574,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCRequestStoreSalesDataResponse.Price} Price */ - Price.fromObject = function fromObject(object) { + Price.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRequestStoreSalesDataResponse.Price) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRequestStoreSalesDataResponse.Price: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRequestStoreSalesDataResponse.Price(); if (object.item_def != null) message.item_def = object.item_def >>> 0; @@ -2820,17 +3600,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Price.toObject = function toObject(message, options) { + Price.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.item_def = 0; object.price = 0; } - if (message.item_def != null && message.hasOwnProperty("item_def")) + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) object.item_def = message.item_def; - if (message.price != null && message.hasOwnProperty("price")) + if (message.price != null && $Object.hasOwnProperty.call(message, "price")) object.price = message.price; return object; }; @@ -2842,8 +3626,22 @@ * @instance * @returns {Object.} JSON object */ - Price.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Price.prototype.toJSON = function() { + return Price.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Price + * @function getTypeUrl + * @memberof CMsgGCRequestStoreSalesDataResponse.Price + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Price.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRequestStoreSalesDataResponse.Price"; }; return Price; @@ -2856,26 +3654,39 @@ /** * Properties of a CMsgGCRequestStoreSalesDataUpToDateResponse. - * @exports ICMsgGCRequestStoreSalesDataUpToDateResponse - * @interface ICMsgGCRequestStoreSalesDataUpToDateResponse + * @typedef {Object} CMsgGCRequestStoreSalesDataUpToDateResponse.$Properties * @property {number|null} [version] CMsgGCRequestStoreSalesDataUpToDateResponse version * @property {number|null} [expiration_time] CMsgGCRequestStoreSalesDataUpToDateResponse expiration_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRequestStoreSalesDataUpToDateResponse. + * @exports ICMsgGCRequestStoreSalesDataUpToDateResponse + * @interface ICMsgGCRequestStoreSalesDataUpToDateResponse + * @augments CMsgGCRequestStoreSalesDataUpToDateResponse.$Properties + * @deprecated Use CMsgGCRequestStoreSalesDataUpToDateResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCRequestStoreSalesDataUpToDateResponse. + * @typedef {CMsgGCRequestStoreSalesDataUpToDateResponse.$Properties} CMsgGCRequestStoreSalesDataUpToDateResponse.$Shape */ /** * Constructs a new CMsgGCRequestStoreSalesDataUpToDateResponse. * @exports CMsgGCRequestStoreSalesDataUpToDateResponse * @classdesc Represents a CMsgGCRequestStoreSalesDataUpToDateResponse. - * @implements ICMsgGCRequestStoreSalesDataUpToDateResponse * @constructor - * @param {ICMsgGCRequestStoreSalesDataUpToDateResponse=} [properties] Properties to set + * @param {CMsgGCRequestStoreSalesDataUpToDateResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRequestStoreSalesDataUpToDateResponse(properties) { + var CMsgGCRequestStoreSalesDataUpToDateResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRequestStoreSalesDataUpToDateResponse version. @@ -2898,10 +3709,14 @@ * @function create * @memberof CMsgGCRequestStoreSalesDataUpToDateResponse * @static - * @param {ICMsgGCRequestStoreSalesDataUpToDateResponse=} [properties] Properties to set + * @param {CMsgGCRequestStoreSalesDataUpToDateResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCRequestStoreSalesDataUpToDateResponse} CMsgGCRequestStoreSalesDataUpToDateResponse instance + * @type {{ + * (properties: CMsgGCRequestStoreSalesDataUpToDateResponse.$Shape): CMsgGCRequestStoreSalesDataUpToDateResponse & CMsgGCRequestStoreSalesDataUpToDateResponse.$Shape; + * (properties?: CMsgGCRequestStoreSalesDataUpToDateResponse.$Properties): CMsgGCRequestStoreSalesDataUpToDateResponse; + * }} */ - CMsgGCRequestStoreSalesDataUpToDateResponse.create = function create(properties) { + CMsgGCRequestStoreSalesDataUpToDateResponse.create = function(properties) { return new CMsgGCRequestStoreSalesDataUpToDateResponse(properties); }; @@ -2910,17 +3725,24 @@ * @function encode * @memberof CMsgGCRequestStoreSalesDataUpToDateResponse * @static - * @param {ICMsgGCRequestStoreSalesDataUpToDateResponse} message CMsgGCRequestStoreSalesDataUpToDateResponse message or plain object to encode + * @param {CMsgGCRequestStoreSalesDataUpToDateResponse.$Properties} message CMsgGCRequestStoreSalesDataUpToDateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestStoreSalesDataUpToDateResponse.encode = function encode(message, writer) { + CMsgGCRequestStoreSalesDataUpToDateResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); - if (message.expiration_time != null && Object.hasOwnProperty.call(message, "expiration_time")) + if (message.expiration_time != null && $Object.hasOwnProperty.call(message, "expiration_time")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.expiration_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2929,12 +3751,12 @@ * @function encodeDelimited * @memberof CMsgGCRequestStoreSalesDataUpToDateResponse * @static - * @param {ICMsgGCRequestStoreSalesDataUpToDateResponse} message CMsgGCRequestStoreSalesDataUpToDateResponse message or plain object to encode + * @param {CMsgGCRequestStoreSalesDataUpToDateResponse.$Properties} message CMsgGCRequestStoreSalesDataUpToDateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestStoreSalesDataUpToDateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRequestStoreSalesDataUpToDateResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2944,28 +3766,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRequestStoreSalesDataUpToDateResponse} CMsgGCRequestStoreSalesDataUpToDateResponse + * @returns {CMsgGCRequestStoreSalesDataUpToDateResponse & CMsgGCRequestStoreSalesDataUpToDateResponse.$Shape} CMsgGCRequestStoreSalesDataUpToDateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestStoreSalesDataUpToDateResponse.decode = function decode(reader, length) { + CMsgGCRequestStoreSalesDataUpToDateResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRequestStoreSalesDataUpToDateResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRequestStoreSalesDataUpToDateResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.uint32(); - break; - case 2: - message.expiration_time = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.expiration_time = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2975,11 +3817,11 @@ * @memberof CMsgGCRequestStoreSalesDataUpToDateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRequestStoreSalesDataUpToDateResponse} CMsgGCRequestStoreSalesDataUpToDateResponse + * @returns {CMsgGCRequestStoreSalesDataUpToDateResponse & CMsgGCRequestStoreSalesDataUpToDateResponse.$Shape} CMsgGCRequestStoreSalesDataUpToDateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestStoreSalesDataUpToDateResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRequestStoreSalesDataUpToDateResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2993,13 +3835,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRequestStoreSalesDataUpToDateResponse.verify = function verify(message) { + CMsgGCRequestStoreSalesDataUpToDateResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.expiration_time != null && message.hasOwnProperty("expiration_time")) + if (message.expiration_time != null && $Object.hasOwnProperty.call(message, "expiration_time")) if (!$util.isInteger(message.expiration_time)) return "expiration_time: integer expected"; return null; @@ -3013,9 +3859,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCRequestStoreSalesDataUpToDateResponse} CMsgGCRequestStoreSalesDataUpToDateResponse */ - CMsgGCRequestStoreSalesDataUpToDateResponse.fromObject = function fromObject(object) { + CMsgGCRequestStoreSalesDataUpToDateResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRequestStoreSalesDataUpToDateResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRequestStoreSalesDataUpToDateResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRequestStoreSalesDataUpToDateResponse(); if (object.version != null) message.version = object.version >>> 0; @@ -3033,17 +3885,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRequestStoreSalesDataUpToDateResponse.toObject = function toObject(message, options) { + CMsgGCRequestStoreSalesDataUpToDateResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.version = 0; object.expiration_time = 0; } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.expiration_time != null && message.hasOwnProperty("expiration_time")) + if (message.expiration_time != null && $Object.hasOwnProperty.call(message, "expiration_time")) object.expiration_time = message.expiration_time; return object; }; @@ -3055,8 +3911,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRequestStoreSalesDataUpToDateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRequestStoreSalesDataUpToDateResponse.prototype.toJSON = function() { + return CMsgGCRequestStoreSalesDataUpToDateResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRequestStoreSalesDataUpToDateResponse + * @function getTypeUrl + * @memberof CMsgGCRequestStoreSalesDataUpToDateResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRequestStoreSalesDataUpToDateResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRequestStoreSalesDataUpToDateResponse"; }; return CMsgGCRequestStoreSalesDataUpToDateResponse; @@ -3064,36 +3934,53 @@ $root.CMsgGCToGCPingRequest = (function() { + /** + * Properties of a CMsgGCToGCPingRequest. + * @typedef {Object} CMsgGCToGCPingRequest.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCToGCPingRequest. * @exports ICMsgGCToGCPingRequest * @interface ICMsgGCToGCPingRequest + * @augments CMsgGCToGCPingRequest.$Properties + * @deprecated Use CMsgGCToGCPingRequest.$Properties instead. + */ + + /** + * Shape of a CMsgGCToGCPingRequest. + * @typedef {CMsgGCToGCPingRequest.$Properties} CMsgGCToGCPingRequest.$Shape */ /** * Constructs a new CMsgGCToGCPingRequest. * @exports CMsgGCToGCPingRequest * @classdesc Represents a CMsgGCToGCPingRequest. - * @implements ICMsgGCToGCPingRequest * @constructor - * @param {ICMsgGCToGCPingRequest=} [properties] Properties to set + * @param {CMsgGCToGCPingRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCToGCPingRequest(properties) { + var CMsgGCToGCPingRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgGCToGCPingRequest instance using the specified properties. * @function create * @memberof CMsgGCToGCPingRequest * @static - * @param {ICMsgGCToGCPingRequest=} [properties] Properties to set + * @param {CMsgGCToGCPingRequest.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCPingRequest} CMsgGCToGCPingRequest instance + * @type {{ + * (properties: CMsgGCToGCPingRequest.$Shape): CMsgGCToGCPingRequest & CMsgGCToGCPingRequest.$Shape; + * (properties?: CMsgGCToGCPingRequest.$Properties): CMsgGCToGCPingRequest; + * }} */ - CMsgGCToGCPingRequest.create = function create(properties) { + CMsgGCToGCPingRequest.create = function(properties) { return new CMsgGCToGCPingRequest(properties); }; @@ -3102,13 +3989,20 @@ * @function encode * @memberof CMsgGCToGCPingRequest * @static - * @param {ICMsgGCToGCPingRequest} message CMsgGCToGCPingRequest message or plain object to encode + * @param {CMsgGCToGCPingRequest.$Properties} message CMsgGCToGCPingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCPingRequest.encode = function encode(message, writer) { + CMsgGCToGCPingRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3117,12 +4011,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCPingRequest * @static - * @param {ICMsgGCToGCPingRequest} message CMsgGCToGCPingRequest message or plain object to encode + * @param {CMsgGCToGCPingRequest.$Properties} message CMsgGCToGCPingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCPingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCToGCPingRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3132,22 +4026,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCPingRequest} CMsgGCToGCPingRequest + * @returns {CMsgGCToGCPingRequest & CMsgGCToGCPingRequest.$Shape} CMsgGCToGCPingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCPingRequest.decode = function decode(reader, length) { + CMsgGCToGCPingRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCPingRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCPingRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3157,11 +4062,11 @@ * @memberof CMsgGCToGCPingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCPingRequest} CMsgGCToGCPingRequest + * @returns {CMsgGCToGCPingRequest & CMsgGCToGCPingRequest.$Shape} CMsgGCToGCPingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCPingRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgGCToGCPingRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3175,9 +4080,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCToGCPingRequest.verify = function verify(message) { + CMsgGCToGCPingRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -3189,9 +4098,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCPingRequest} CMsgGCToGCPingRequest */ - CMsgGCToGCPingRequest.fromObject = function fromObject(object) { + CMsgGCToGCPingRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCPingRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCPingRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgGCToGCPingRequest(); }; @@ -3204,7 +4119,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCToGCPingRequest.toObject = function toObject() { + CMsgGCToGCPingRequest.toObject = function () { return {}; }; @@ -3215,8 +4130,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCToGCPingRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCToGCPingRequest.prototype.toJSON = function() { + return CMsgGCToGCPingRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCToGCPingRequest + * @function getTypeUrl + * @memberof CMsgGCToGCPingRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCToGCPingRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCPingRequest"; }; return CMsgGCToGCPingRequest; @@ -3224,36 +4153,53 @@ $root.CMsgGCToGCPingResponse = (function() { + /** + * Properties of a CMsgGCToGCPingResponse. + * @typedef {Object} CMsgGCToGCPingResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCToGCPingResponse. * @exports ICMsgGCToGCPingResponse * @interface ICMsgGCToGCPingResponse + * @augments CMsgGCToGCPingResponse.$Properties + * @deprecated Use CMsgGCToGCPingResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCToGCPingResponse. + * @typedef {CMsgGCToGCPingResponse.$Properties} CMsgGCToGCPingResponse.$Shape */ /** * Constructs a new CMsgGCToGCPingResponse. * @exports CMsgGCToGCPingResponse * @classdesc Represents a CMsgGCToGCPingResponse. - * @implements ICMsgGCToGCPingResponse * @constructor - * @param {ICMsgGCToGCPingResponse=} [properties] Properties to set + * @param {CMsgGCToGCPingResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCToGCPingResponse(properties) { + var CMsgGCToGCPingResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgGCToGCPingResponse instance using the specified properties. * @function create * @memberof CMsgGCToGCPingResponse * @static - * @param {ICMsgGCToGCPingResponse=} [properties] Properties to set + * @param {CMsgGCToGCPingResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCPingResponse} CMsgGCToGCPingResponse instance + * @type {{ + * (properties: CMsgGCToGCPingResponse.$Shape): CMsgGCToGCPingResponse & CMsgGCToGCPingResponse.$Shape; + * (properties?: CMsgGCToGCPingResponse.$Properties): CMsgGCToGCPingResponse; + * }} */ - CMsgGCToGCPingResponse.create = function create(properties) { + CMsgGCToGCPingResponse.create = function(properties) { return new CMsgGCToGCPingResponse(properties); }; @@ -3262,13 +4208,20 @@ * @function encode * @memberof CMsgGCToGCPingResponse * @static - * @param {ICMsgGCToGCPingResponse} message CMsgGCToGCPingResponse message or plain object to encode + * @param {CMsgGCToGCPingResponse.$Properties} message CMsgGCToGCPingResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCPingResponse.encode = function encode(message, writer) { + CMsgGCToGCPingResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3277,12 +4230,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCPingResponse * @static - * @param {ICMsgGCToGCPingResponse} message CMsgGCToGCPingResponse message or plain object to encode + * @param {CMsgGCToGCPingResponse.$Properties} message CMsgGCToGCPingResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCPingResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCToGCPingResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3292,22 +4245,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCPingResponse} CMsgGCToGCPingResponse + * @returns {CMsgGCToGCPingResponse & CMsgGCToGCPingResponse.$Shape} CMsgGCToGCPingResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCPingResponse.decode = function decode(reader, length) { + CMsgGCToGCPingResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCPingResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCPingResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3317,11 +4281,11 @@ * @memberof CMsgGCToGCPingResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCPingResponse} CMsgGCToGCPingResponse + * @returns {CMsgGCToGCPingResponse & CMsgGCToGCPingResponse.$Shape} CMsgGCToGCPingResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCPingResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCToGCPingResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3335,9 +4299,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCToGCPingResponse.verify = function verify(message) { + CMsgGCToGCPingResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -3349,9 +4317,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCPingResponse} CMsgGCToGCPingResponse */ - CMsgGCToGCPingResponse.fromObject = function fromObject(object) { + CMsgGCToGCPingResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCPingResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCPingResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgGCToGCPingResponse(); }; @@ -3364,7 +4338,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCToGCPingResponse.toObject = function toObject() { + CMsgGCToGCPingResponse.toObject = function () { return {}; }; @@ -3375,8 +4349,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCToGCPingResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCToGCPingResponse.prototype.toJSON = function() { + return CMsgGCToGCPingResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCToGCPingResponse + * @function getTypeUrl + * @memberof CMsgGCToGCPingResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCToGCPingResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCPingResponse"; }; return CMsgGCToGCPingResponse; @@ -3384,27 +4372,40 @@ $root.CMsgGCToGCGetUserSessionServer = (function() { + /** + * Properties of a CMsgGCToGCGetUserSessionServer. + * @typedef {Object} CMsgGCToGCGetUserSessionServer.$Properties + * @property {number|null} [account_id] CMsgGCToGCGetUserSessionServer account_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCToGCGetUserSessionServer. * @exports ICMsgGCToGCGetUserSessionServer * @interface ICMsgGCToGCGetUserSessionServer - * @property {number|null} [account_id] CMsgGCToGCGetUserSessionServer account_id + * @augments CMsgGCToGCGetUserSessionServer.$Properties + * @deprecated Use CMsgGCToGCGetUserSessionServer.$Properties instead. + */ + + /** + * Shape of a CMsgGCToGCGetUserSessionServer. + * @typedef {CMsgGCToGCGetUserSessionServer.$Properties} CMsgGCToGCGetUserSessionServer.$Shape */ /** * Constructs a new CMsgGCToGCGetUserSessionServer. * @exports CMsgGCToGCGetUserSessionServer * @classdesc Represents a CMsgGCToGCGetUserSessionServer. - * @implements ICMsgGCToGCGetUserSessionServer * @constructor - * @param {ICMsgGCToGCGetUserSessionServer=} [properties] Properties to set + * @param {CMsgGCToGCGetUserSessionServer.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCToGCGetUserSessionServer(properties) { + var CMsgGCToGCGetUserSessionServer = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCToGCGetUserSessionServer account_id. @@ -3419,10 +4420,14 @@ * @function create * @memberof CMsgGCToGCGetUserSessionServer * @static - * @param {ICMsgGCToGCGetUserSessionServer=} [properties] Properties to set + * @param {CMsgGCToGCGetUserSessionServer.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCGetUserSessionServer} CMsgGCToGCGetUserSessionServer instance + * @type {{ + * (properties: CMsgGCToGCGetUserSessionServer.$Shape): CMsgGCToGCGetUserSessionServer & CMsgGCToGCGetUserSessionServer.$Shape; + * (properties?: CMsgGCToGCGetUserSessionServer.$Properties): CMsgGCToGCGetUserSessionServer; + * }} */ - CMsgGCToGCGetUserSessionServer.create = function create(properties) { + CMsgGCToGCGetUserSessionServer.create = function(properties) { return new CMsgGCToGCGetUserSessionServer(properties); }; @@ -3431,15 +4436,22 @@ * @function encode * @memberof CMsgGCToGCGetUserSessionServer * @static - * @param {ICMsgGCToGCGetUserSessionServer} message CMsgGCToGCGetUserSessionServer message or plain object to encode + * @param {CMsgGCToGCGetUserSessionServer.$Properties} message CMsgGCToGCGetUserSessionServer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCGetUserSessionServer.encode = function encode(message, writer) { + CMsgGCToGCGetUserSessionServer.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3448,12 +4460,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCGetUserSessionServer * @static - * @param {ICMsgGCToGCGetUserSessionServer} message CMsgGCToGCGetUserSessionServer message or plain object to encode + * @param {CMsgGCToGCGetUserSessionServer.$Properties} message CMsgGCToGCGetUserSessionServer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCGetUserSessionServer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCToGCGetUserSessionServer.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3463,25 +4475,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCGetUserSessionServer} CMsgGCToGCGetUserSessionServer + * @returns {CMsgGCToGCGetUserSessionServer & CMsgGCToGCGetUserSessionServer.$Shape} CMsgGCToGCGetUserSessionServer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCGetUserSessionServer.decode = function decode(reader, length) { + CMsgGCToGCGetUserSessionServer.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCGetUserSessionServer(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCGetUserSessionServer(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3491,11 +4520,11 @@ * @memberof CMsgGCToGCGetUserSessionServer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCGetUserSessionServer} CMsgGCToGCGetUserSessionServer + * @returns {CMsgGCToGCGetUserSessionServer & CMsgGCToGCGetUserSessionServer.$Shape} CMsgGCToGCGetUserSessionServer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCGetUserSessionServer.decodeDelimited = function decodeDelimited(reader) { + CMsgGCToGCGetUserSessionServer.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3509,10 +4538,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCToGCGetUserSessionServer.verify = function verify(message) { + CMsgGCToGCGetUserSessionServer.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; return null; @@ -3526,9 +4559,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCGetUserSessionServer} CMsgGCToGCGetUserSessionServer */ - CMsgGCToGCGetUserSessionServer.fromObject = function fromObject(object) { + CMsgGCToGCGetUserSessionServer.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCGetUserSessionServer) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCGetUserSessionServer: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCToGCGetUserSessionServer(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -3544,13 +4583,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCToGCGetUserSessionServer.toObject = function toObject(message, options) { + CMsgGCToGCGetUserSessionServer.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.account_id = 0; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; return object; }; @@ -3562,8 +4605,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCToGCGetUserSessionServer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCToGCGetUserSessionServer.prototype.toJSON = function() { + return CMsgGCToGCGetUserSessionServer.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCToGCGetUserSessionServer + * @function getTypeUrl + * @memberof CMsgGCToGCGetUserSessionServer + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCToGCGetUserSessionServer.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCGetUserSessionServer"; }; return CMsgGCToGCGetUserSessionServer; @@ -3571,27 +4628,40 @@ $root.CMsgGCToGCGetUserSessionServerResponse = (function() { + /** + * Properties of a CMsgGCToGCGetUserSessionServerResponse. + * @typedef {Object} CMsgGCToGCGetUserSessionServerResponse.$Properties + * @property {number|Long|null} [server_steam_id] CMsgGCToGCGetUserSessionServerResponse server_steam_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCToGCGetUserSessionServerResponse. * @exports ICMsgGCToGCGetUserSessionServerResponse * @interface ICMsgGCToGCGetUserSessionServerResponse - * @property {number|Long|null} [server_steam_id] CMsgGCToGCGetUserSessionServerResponse server_steam_id + * @augments CMsgGCToGCGetUserSessionServerResponse.$Properties + * @deprecated Use CMsgGCToGCGetUserSessionServerResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCToGCGetUserSessionServerResponse. + * @typedef {CMsgGCToGCGetUserSessionServerResponse.$Properties} CMsgGCToGCGetUserSessionServerResponse.$Shape */ /** * Constructs a new CMsgGCToGCGetUserSessionServerResponse. * @exports CMsgGCToGCGetUserSessionServerResponse * @classdesc Represents a CMsgGCToGCGetUserSessionServerResponse. - * @implements ICMsgGCToGCGetUserSessionServerResponse * @constructor - * @param {ICMsgGCToGCGetUserSessionServerResponse=} [properties] Properties to set + * @param {CMsgGCToGCGetUserSessionServerResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCToGCGetUserSessionServerResponse(properties) { + var CMsgGCToGCGetUserSessionServerResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCToGCGetUserSessionServerResponse server_steam_id. @@ -3599,17 +4669,21 @@ * @memberof CMsgGCToGCGetUserSessionServerResponse * @instance */ - CMsgGCToGCGetUserSessionServerResponse.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCToGCGetUserSessionServerResponse.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCToGCGetUserSessionServerResponse instance using the specified properties. * @function create * @memberof CMsgGCToGCGetUserSessionServerResponse * @static - * @param {ICMsgGCToGCGetUserSessionServerResponse=} [properties] Properties to set + * @param {CMsgGCToGCGetUserSessionServerResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCGetUserSessionServerResponse} CMsgGCToGCGetUserSessionServerResponse instance + * @type {{ + * (properties: CMsgGCToGCGetUserSessionServerResponse.$Shape): CMsgGCToGCGetUserSessionServerResponse & CMsgGCToGCGetUserSessionServerResponse.$Shape; + * (properties?: CMsgGCToGCGetUserSessionServerResponse.$Properties): CMsgGCToGCGetUserSessionServerResponse; + * }} */ - CMsgGCToGCGetUserSessionServerResponse.create = function create(properties) { + CMsgGCToGCGetUserSessionServerResponse.create = function(properties) { return new CMsgGCToGCGetUserSessionServerResponse(properties); }; @@ -3618,15 +4692,22 @@ * @function encode * @memberof CMsgGCToGCGetUserSessionServerResponse * @static - * @param {ICMsgGCToGCGetUserSessionServerResponse} message CMsgGCToGCGetUserSessionServerResponse message or plain object to encode + * @param {CMsgGCToGCGetUserSessionServerResponse.$Properties} message CMsgGCToGCGetUserSessionServerResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCGetUserSessionServerResponse.encode = function encode(message, writer) { + CMsgGCToGCGetUserSessionServerResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.server_steam_id != null && Object.hasOwnProperty.call(message, "server_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.server_steam_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3635,12 +4716,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCGetUserSessionServerResponse * @static - * @param {ICMsgGCToGCGetUserSessionServerResponse} message CMsgGCToGCGetUserSessionServerResponse message or plain object to encode + * @param {CMsgGCToGCGetUserSessionServerResponse.$Properties} message CMsgGCToGCGetUserSessionServerResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCGetUserSessionServerResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCToGCGetUserSessionServerResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3650,25 +4731,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCGetUserSessionServerResponse} CMsgGCToGCGetUserSessionServerResponse + * @returns {CMsgGCToGCGetUserSessionServerResponse & CMsgGCToGCGetUserSessionServerResponse.$Shape} CMsgGCToGCGetUserSessionServerResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCGetUserSessionServerResponse.decode = function decode(reader, length) { + CMsgGCToGCGetUserSessionServerResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCGetUserSessionServerResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCGetUserSessionServerResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.server_steam_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.server_steam_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3678,11 +4776,11 @@ * @memberof CMsgGCToGCGetUserSessionServerResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCGetUserSessionServerResponse} CMsgGCToGCGetUserSessionServerResponse + * @returns {CMsgGCToGCGetUserSessionServerResponse & CMsgGCToGCGetUserSessionServerResponse.$Shape} CMsgGCToGCGetUserSessionServerResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCGetUserSessionServerResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCToGCGetUserSessionServerResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3696,10 +4794,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCToGCGetUserSessionServerResponse.verify = function verify(message) { + CMsgGCToGCGetUserSessionServerResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) if (!$util.isInteger(message.server_steam_id) && !(message.server_steam_id && $util.isInteger(message.server_steam_id.low) && $util.isInteger(message.server_steam_id.high))) return "server_steam_id: integer|Long expected"; return null; @@ -3713,19 +4815,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCGetUserSessionServerResponse} CMsgGCToGCGetUserSessionServerResponse */ - CMsgGCToGCGetUserSessionServerResponse.fromObject = function fromObject(object) { + CMsgGCToGCGetUserSessionServerResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCGetUserSessionServerResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCGetUserSessionServerResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCToGCGetUserSessionServerResponse(); if (object.server_steam_id != null) if ($util.Long) - (message.server_steam_id = $util.Long.fromValue(object.server_steam_id)).unsigned = false; + message.server_steam_id = $util.Long.fromValue(object.server_steam_id, true); else if (typeof object.server_steam_id === "string") - message.server_steam_id = parseInt(object.server_steam_id, 10); + message.server_steam_id = $parseInt(object.server_steam_id, 10); else if (typeof object.server_steam_id === "number") message.server_steam_id = object.server_steam_id; else if (typeof object.server_steam_id === "object") - message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(); + message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(true); return message; }; @@ -3738,21 +4846,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCToGCGetUserSessionServerResponse.toObject = function toObject(message, options) { + CMsgGCToGCGetUserSessionServerResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.server_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.server_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.server_steam_id = options.longs === String ? "0" : 0; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) - if (typeof message.server_steam_id === "number") - object.server_steam_id = options.longs === String ? String(message.server_steam_id) : message.server_steam_id; + object.server_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.server_steam_id = typeof message.server_steam_id === "number" ? $BigInt(message.server_steam_id) : $util.Long.fromBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.server_steam_id === "number") + object.server_steam_id = options.longs === $String ? $String(message.server_steam_id) : message.server_steam_id; else - object.server_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber() : message.server_steam_id; + object.server_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === $Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber(true) : message.server_steam_id; return object; }; @@ -3763,8 +4877,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCToGCGetUserSessionServerResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCToGCGetUserSessionServerResponse.prototype.toJSON = function() { + return CMsgGCToGCGetUserSessionServerResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCToGCGetUserSessionServerResponse + * @function getTypeUrl + * @memberof CMsgGCToGCGetUserSessionServerResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCToGCGetUserSessionServerResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCGetUserSessionServerResponse"; }; return CMsgGCToGCGetUserSessionServerResponse; @@ -3774,26 +4902,39 @@ /** * Properties of a CMsgGCToGCGetUserServerMembers. - * @exports ICMsgGCToGCGetUserServerMembers - * @interface ICMsgGCToGCGetUserServerMembers + * @typedef {Object} CMsgGCToGCGetUserServerMembers.$Properties * @property {number|null} [account_id] CMsgGCToGCGetUserServerMembers account_id * @property {number|null} [max_spectators] CMsgGCToGCGetUserServerMembers max_spectators + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCToGCGetUserServerMembers. + * @exports ICMsgGCToGCGetUserServerMembers + * @interface ICMsgGCToGCGetUserServerMembers + * @augments CMsgGCToGCGetUserServerMembers.$Properties + * @deprecated Use CMsgGCToGCGetUserServerMembers.$Properties instead. + */ + + /** + * Shape of a CMsgGCToGCGetUserServerMembers. + * @typedef {CMsgGCToGCGetUserServerMembers.$Properties} CMsgGCToGCGetUserServerMembers.$Shape */ /** * Constructs a new CMsgGCToGCGetUserServerMembers. * @exports CMsgGCToGCGetUserServerMembers * @classdesc Represents a CMsgGCToGCGetUserServerMembers. - * @implements ICMsgGCToGCGetUserServerMembers * @constructor - * @param {ICMsgGCToGCGetUserServerMembers=} [properties] Properties to set + * @param {CMsgGCToGCGetUserServerMembers.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCToGCGetUserServerMembers(properties) { + var CMsgGCToGCGetUserServerMembers = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCToGCGetUserServerMembers account_id. @@ -3816,10 +4957,14 @@ * @function create * @memberof CMsgGCToGCGetUserServerMembers * @static - * @param {ICMsgGCToGCGetUserServerMembers=} [properties] Properties to set + * @param {CMsgGCToGCGetUserServerMembers.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCGetUserServerMembers} CMsgGCToGCGetUserServerMembers instance + * @type {{ + * (properties: CMsgGCToGCGetUserServerMembers.$Shape): CMsgGCToGCGetUserServerMembers & CMsgGCToGCGetUserServerMembers.$Shape; + * (properties?: CMsgGCToGCGetUserServerMembers.$Properties): CMsgGCToGCGetUserServerMembers; + * }} */ - CMsgGCToGCGetUserServerMembers.create = function create(properties) { + CMsgGCToGCGetUserServerMembers.create = function(properties) { return new CMsgGCToGCGetUserServerMembers(properties); }; @@ -3828,17 +4973,24 @@ * @function encode * @memberof CMsgGCToGCGetUserServerMembers * @static - * @param {ICMsgGCToGCGetUserServerMembers} message CMsgGCToGCGetUserServerMembers message or plain object to encode + * @param {CMsgGCToGCGetUserServerMembers.$Properties} message CMsgGCToGCGetUserServerMembers message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCGetUserServerMembers.encode = function encode(message, writer) { + CMsgGCToGCGetUserServerMembers.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.max_spectators != null && Object.hasOwnProperty.call(message, "max_spectators")) + if (message.max_spectators != null && $Object.hasOwnProperty.call(message, "max_spectators")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.max_spectators); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3847,12 +4999,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCGetUserServerMembers * @static - * @param {ICMsgGCToGCGetUserServerMembers} message CMsgGCToGCGetUserServerMembers message or plain object to encode + * @param {CMsgGCToGCGetUserServerMembers.$Properties} message CMsgGCToGCGetUserServerMembers message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCGetUserServerMembers.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCToGCGetUserServerMembers.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3862,28 +5014,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCGetUserServerMembers} CMsgGCToGCGetUserServerMembers + * @returns {CMsgGCToGCGetUserServerMembers & CMsgGCToGCGetUserServerMembers.$Shape} CMsgGCToGCGetUserServerMembers * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCGetUserServerMembers.decode = function decode(reader, length) { + CMsgGCToGCGetUserServerMembers.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCGetUserServerMembers(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCGetUserServerMembers(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.max_spectators = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.max_spectators = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3893,11 +5065,11 @@ * @memberof CMsgGCToGCGetUserServerMembers * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCGetUserServerMembers} CMsgGCToGCGetUserServerMembers + * @returns {CMsgGCToGCGetUserServerMembers & CMsgGCToGCGetUserServerMembers.$Shape} CMsgGCToGCGetUserServerMembers * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCGetUserServerMembers.decodeDelimited = function decodeDelimited(reader) { + CMsgGCToGCGetUserServerMembers.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3911,13 +5083,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCToGCGetUserServerMembers.verify = function verify(message) { + CMsgGCToGCGetUserServerMembers.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.max_spectators != null && message.hasOwnProperty("max_spectators")) + if (message.max_spectators != null && $Object.hasOwnProperty.call(message, "max_spectators")) if (!$util.isInteger(message.max_spectators)) return "max_spectators: integer expected"; return null; @@ -3931,9 +5107,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCGetUserServerMembers} CMsgGCToGCGetUserServerMembers */ - CMsgGCToGCGetUserServerMembers.fromObject = function fromObject(object) { + CMsgGCToGCGetUserServerMembers.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCGetUserServerMembers) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCGetUserServerMembers: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCToGCGetUserServerMembers(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -3951,17 +5133,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCToGCGetUserServerMembers.toObject = function toObject(message, options) { + CMsgGCToGCGetUserServerMembers.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; object.max_spectators = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.max_spectators != null && message.hasOwnProperty("max_spectators")) + if (message.max_spectators != null && $Object.hasOwnProperty.call(message, "max_spectators")) object.max_spectators = message.max_spectators; return object; }; @@ -3973,8 +5159,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCToGCGetUserServerMembers.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCToGCGetUserServerMembers.prototype.toJSON = function() { + return CMsgGCToGCGetUserServerMembers.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCToGCGetUserServerMembers + * @function getTypeUrl + * @memberof CMsgGCToGCGetUserServerMembers + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCToGCGetUserServerMembers.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCGetUserServerMembers"; }; return CMsgGCToGCGetUserServerMembers; @@ -3982,28 +5182,41 @@ $root.CMsgGCToGCGetUserServerMembersResponse = (function() { + /** + * Properties of a CMsgGCToGCGetUserServerMembersResponse. + * @typedef {Object} CMsgGCToGCGetUserServerMembersResponse.$Properties + * @property {Array.|null} [member_account_id] CMsgGCToGCGetUserServerMembersResponse member_account_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCToGCGetUserServerMembersResponse. * @exports ICMsgGCToGCGetUserServerMembersResponse * @interface ICMsgGCToGCGetUserServerMembersResponse - * @property {Array.|null} [member_account_id] CMsgGCToGCGetUserServerMembersResponse member_account_id + * @augments CMsgGCToGCGetUserServerMembersResponse.$Properties + * @deprecated Use CMsgGCToGCGetUserServerMembersResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCToGCGetUserServerMembersResponse. + * @typedef {CMsgGCToGCGetUserServerMembersResponse.$Properties} CMsgGCToGCGetUserServerMembersResponse.$Shape */ /** * Constructs a new CMsgGCToGCGetUserServerMembersResponse. * @exports CMsgGCToGCGetUserServerMembersResponse * @classdesc Represents a CMsgGCToGCGetUserServerMembersResponse. - * @implements ICMsgGCToGCGetUserServerMembersResponse * @constructor - * @param {ICMsgGCToGCGetUserServerMembersResponse=} [properties] Properties to set + * @param {CMsgGCToGCGetUserServerMembersResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCToGCGetUserServerMembersResponse(properties) { + var CMsgGCToGCGetUserServerMembersResponse = function (properties) { this.member_account_id = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCToGCGetUserServerMembersResponse member_account_id. @@ -4018,10 +5231,14 @@ * @function create * @memberof CMsgGCToGCGetUserServerMembersResponse * @static - * @param {ICMsgGCToGCGetUserServerMembersResponse=} [properties] Properties to set + * @param {CMsgGCToGCGetUserServerMembersResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCGetUserServerMembersResponse} CMsgGCToGCGetUserServerMembersResponse instance + * @type {{ + * (properties: CMsgGCToGCGetUserServerMembersResponse.$Shape): CMsgGCToGCGetUserServerMembersResponse & CMsgGCToGCGetUserServerMembersResponse.$Shape; + * (properties?: CMsgGCToGCGetUserServerMembersResponse.$Properties): CMsgGCToGCGetUserServerMembersResponse; + * }} */ - CMsgGCToGCGetUserServerMembersResponse.create = function create(properties) { + CMsgGCToGCGetUserServerMembersResponse.create = function(properties) { return new CMsgGCToGCGetUserServerMembersResponse(properties); }; @@ -4030,16 +5247,23 @@ * @function encode * @memberof CMsgGCToGCGetUserServerMembersResponse * @static - * @param {ICMsgGCToGCGetUserServerMembersResponse} message CMsgGCToGCGetUserServerMembersResponse message or plain object to encode + * @param {CMsgGCToGCGetUserServerMembersResponse.$Properties} message CMsgGCToGCGetUserServerMembersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCGetUserServerMembersResponse.encode = function encode(message, writer) { + CMsgGCToGCGetUserServerMembersResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.member_account_id != null && message.member_account_id.length) for (var i = 0; i < message.member_account_id.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.member_account_id[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4048,12 +5272,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCGetUserServerMembersResponse * @static - * @param {ICMsgGCToGCGetUserServerMembersResponse} message CMsgGCToGCGetUserServerMembersResponse message or plain object to encode + * @param {CMsgGCToGCGetUserServerMembersResponse.$Properties} message CMsgGCToGCGetUserServerMembersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCGetUserServerMembersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCToGCGetUserServerMembersResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4063,32 +5287,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCGetUserServerMembersResponse} CMsgGCToGCGetUserServerMembersResponse + * @returns {CMsgGCToGCGetUserServerMembersResponse & CMsgGCToGCGetUserServerMembersResponse.$Shape} CMsgGCToGCGetUserServerMembersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCGetUserServerMembersResponse.decode = function decode(reader, length) { + CMsgGCToGCGetUserServerMembersResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCGetUserServerMembersResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCGetUserServerMembersResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.member_account_id && message.member_account_id.length)) - message.member_account_id = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.member_account_id.push(reader.uint32()); - } else - message.member_account_id.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.member_account_id && message.member_account_id.length)) + message.member_account_id = []; + reader.uint32s(message.member_account_id); + continue; + } + if (wireType !== 0) + break; + if (!(message.member_account_id && message.member_account_id.length)) + message.member_account_id = []; + message.member_account_id.push(reader.uint32()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4098,11 +5340,11 @@ * @memberof CMsgGCToGCGetUserServerMembersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCGetUserServerMembersResponse} CMsgGCToGCGetUserServerMembersResponse + * @returns {CMsgGCToGCGetUserServerMembersResponse & CMsgGCToGCGetUserServerMembersResponse.$Shape} CMsgGCToGCGetUserServerMembersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCGetUserServerMembersResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCToGCGetUserServerMembersResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4116,11 +5358,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCToGCGetUserServerMembersResponse.verify = function verify(message) { + CMsgGCToGCGetUserServerMembersResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.member_account_id != null && message.hasOwnProperty("member_account_id")) { - if (!Array.isArray(message.member_account_id)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.member_account_id != null && $Object.hasOwnProperty.call(message, "member_account_id")) { + if (!$Array.isArray(message.member_account_id)) return "member_account_id: array expected"; for (var i = 0; i < message.member_account_id.length; ++i) if (!$util.isInteger(message.member_account_id[i])) @@ -4137,14 +5383,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCGetUserServerMembersResponse} CMsgGCToGCGetUserServerMembersResponse */ - CMsgGCToGCGetUserServerMembersResponse.fromObject = function fromObject(object) { + CMsgGCToGCGetUserServerMembersResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCGetUserServerMembersResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCGetUserServerMembersResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCToGCGetUserServerMembersResponse(); if (object.member_account_id) { - if (!Array.isArray(object.member_account_id)) - throw TypeError(".CMsgGCToGCGetUserServerMembersResponse.member_account_id: array expected"); - message.member_account_id = []; + if (!$Array.isArray(object.member_account_id)) + throw $TypeError(".CMsgGCToGCGetUserServerMembersResponse.member_account_id: array expected"); + message.member_account_id = $Array(object.member_account_id.length); for (var i = 0; i < object.member_account_id.length; ++i) message.member_account_id[i] = object.member_account_id[i] >>> 0; } @@ -4160,14 +5412,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCToGCGetUserServerMembersResponse.toObject = function toObject(message, options) { + CMsgGCToGCGetUserServerMembersResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.member_account_id = []; if (message.member_account_id && message.member_account_id.length) { - object.member_account_id = []; + object.member_account_id = $Array(message.member_account_id.length); for (var j = 0; j < message.member_account_id.length; ++j) object.member_account_id[j] = message.member_account_id[j]; } @@ -4181,8 +5437,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCToGCGetUserServerMembersResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCToGCGetUserServerMembersResponse.prototype.toJSON = function() { + return CMsgGCToGCGetUserServerMembersResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCToGCGetUserServerMembersResponse + * @function getTypeUrl + * @memberof CMsgGCToGCGetUserServerMembersResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCToGCGetUserServerMembersResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCGetUserServerMembersResponse"; }; return CMsgGCToGCGetUserServerMembersResponse; @@ -4190,28 +5460,41 @@ $root.CMsgLookupMultipleAccountNames = (function() { + /** + * Properties of a CMsgLookupMultipleAccountNames. + * @typedef {Object} CMsgLookupMultipleAccountNames.$Properties + * @property {Array.|null} [accountids] CMsgLookupMultipleAccountNames accountids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgLookupMultipleAccountNames. * @exports ICMsgLookupMultipleAccountNames * @interface ICMsgLookupMultipleAccountNames - * @property {Array.|null} [accountids] CMsgLookupMultipleAccountNames accountids + * @augments CMsgLookupMultipleAccountNames.$Properties + * @deprecated Use CMsgLookupMultipleAccountNames.$Properties instead. + */ + + /** + * Shape of a CMsgLookupMultipleAccountNames. + * @typedef {CMsgLookupMultipleAccountNames.$Properties} CMsgLookupMultipleAccountNames.$Shape */ /** * Constructs a new CMsgLookupMultipleAccountNames. * @exports CMsgLookupMultipleAccountNames * @classdesc Represents a CMsgLookupMultipleAccountNames. - * @implements ICMsgLookupMultipleAccountNames * @constructor - * @param {ICMsgLookupMultipleAccountNames=} [properties] Properties to set + * @param {CMsgLookupMultipleAccountNames.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgLookupMultipleAccountNames(properties) { + var CMsgLookupMultipleAccountNames = function (properties) { this.accountids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgLookupMultipleAccountNames accountids. @@ -4226,10 +5509,14 @@ * @function create * @memberof CMsgLookupMultipleAccountNames * @static - * @param {ICMsgLookupMultipleAccountNames=} [properties] Properties to set + * @param {CMsgLookupMultipleAccountNames.$Properties=} [properties] Properties to set * @returns {CMsgLookupMultipleAccountNames} CMsgLookupMultipleAccountNames instance + * @type {{ + * (properties: CMsgLookupMultipleAccountNames.$Shape): CMsgLookupMultipleAccountNames & CMsgLookupMultipleAccountNames.$Shape; + * (properties?: CMsgLookupMultipleAccountNames.$Properties): CMsgLookupMultipleAccountNames; + * }} */ - CMsgLookupMultipleAccountNames.create = function create(properties) { + CMsgLookupMultipleAccountNames.create = function(properties) { return new CMsgLookupMultipleAccountNames(properties); }; @@ -4238,19 +5525,22 @@ * @function encode * @memberof CMsgLookupMultipleAccountNames * @static - * @param {ICMsgLookupMultipleAccountNames} message CMsgLookupMultipleAccountNames message or plain object to encode + * @param {CMsgLookupMultipleAccountNames.$Properties} message CMsgLookupMultipleAccountNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgLookupMultipleAccountNames.encode = function encode(message, writer) { + CMsgLookupMultipleAccountNames.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.accountids != null && message.accountids.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.accountids.length; ++i) - writer.uint32(message.accountids[i]); - writer.ldelim(); - } + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.accountids != null && message.accountids.length) + writer.uint32(/* id 1, wireType 2 =*/10).uint32s(message.accountids); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4259,12 +5549,12 @@ * @function encodeDelimited * @memberof CMsgLookupMultipleAccountNames * @static - * @param {ICMsgLookupMultipleAccountNames} message CMsgLookupMultipleAccountNames message or plain object to encode + * @param {CMsgLookupMultipleAccountNames.$Properties} message CMsgLookupMultipleAccountNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgLookupMultipleAccountNames.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgLookupMultipleAccountNames.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4274,32 +5564,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgLookupMultipleAccountNames} CMsgLookupMultipleAccountNames + * @returns {CMsgLookupMultipleAccountNames & CMsgLookupMultipleAccountNames.$Shape} CMsgLookupMultipleAccountNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgLookupMultipleAccountNames.decode = function decode(reader, length) { + CMsgLookupMultipleAccountNames.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgLookupMultipleAccountNames(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgLookupMultipleAccountNames(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.accountids && message.accountids.length)) - message.accountids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.accountids.push(reader.uint32()); - } else - message.accountids.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.accountids && message.accountids.length)) + message.accountids = []; + reader.uint32s(message.accountids); + continue; + } + if (wireType !== 0) + break; + if (!(message.accountids && message.accountids.length)) + message.accountids = []; + message.accountids.push(reader.uint32()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4309,11 +5617,11 @@ * @memberof CMsgLookupMultipleAccountNames * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgLookupMultipleAccountNames} CMsgLookupMultipleAccountNames + * @returns {CMsgLookupMultipleAccountNames & CMsgLookupMultipleAccountNames.$Shape} CMsgLookupMultipleAccountNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgLookupMultipleAccountNames.decodeDelimited = function decodeDelimited(reader) { + CMsgLookupMultipleAccountNames.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4327,11 +5635,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgLookupMultipleAccountNames.verify = function verify(message) { + CMsgLookupMultipleAccountNames.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.accountids != null && message.hasOwnProperty("accountids")) { - if (!Array.isArray(message.accountids)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.accountids != null && $Object.hasOwnProperty.call(message, "accountids")) { + if (!$Array.isArray(message.accountids)) return "accountids: array expected"; for (var i = 0; i < message.accountids.length; ++i) if (!$util.isInteger(message.accountids[i])) @@ -4348,14 +5660,20 @@ * @param {Object.} object Plain object * @returns {CMsgLookupMultipleAccountNames} CMsgLookupMultipleAccountNames */ - CMsgLookupMultipleAccountNames.fromObject = function fromObject(object) { + CMsgLookupMultipleAccountNames.fromObject = function (object, _depth) { if (object instanceof $root.CMsgLookupMultipleAccountNames) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgLookupMultipleAccountNames: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgLookupMultipleAccountNames(); if (object.accountids) { - if (!Array.isArray(object.accountids)) - throw TypeError(".CMsgLookupMultipleAccountNames.accountids: array expected"); - message.accountids = []; + if (!$Array.isArray(object.accountids)) + throw $TypeError(".CMsgLookupMultipleAccountNames.accountids: array expected"); + message.accountids = $Array(object.accountids.length); for (var i = 0; i < object.accountids.length; ++i) message.accountids[i] = object.accountids[i] >>> 0; } @@ -4371,14 +5689,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgLookupMultipleAccountNames.toObject = function toObject(message, options) { + CMsgLookupMultipleAccountNames.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.accountids = []; if (message.accountids && message.accountids.length) { - object.accountids = []; + object.accountids = $Array(message.accountids.length); for (var j = 0; j < message.accountids.length; ++j) object.accountids[j] = message.accountids[j]; } @@ -4392,8 +5714,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgLookupMultipleAccountNames.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgLookupMultipleAccountNames.prototype.toJSON = function() { + return CMsgLookupMultipleAccountNames.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgLookupMultipleAccountNames + * @function getTypeUrl + * @memberof CMsgLookupMultipleAccountNames + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgLookupMultipleAccountNames.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgLookupMultipleAccountNames"; }; return CMsgLookupMultipleAccountNames; @@ -4401,32 +5737,45 @@ $root.CMsgLookupMultipleAccountNamesResponse = (function() { + /** + * Properties of a CMsgLookupMultipleAccountNamesResponse. + * @typedef {Object} CMsgLookupMultipleAccountNamesResponse.$Properties + * @property {Array.|null} [accounts] CMsgLookupMultipleAccountNamesResponse accounts + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgLookupMultipleAccountNamesResponse. * @exports ICMsgLookupMultipleAccountNamesResponse * @interface ICMsgLookupMultipleAccountNamesResponse - * @property {Array.|null} [accounts] CMsgLookupMultipleAccountNamesResponse accounts + * @augments CMsgLookupMultipleAccountNamesResponse.$Properties + * @deprecated Use CMsgLookupMultipleAccountNamesResponse.$Properties instead. + */ + + /** + * Shape of a CMsgLookupMultipleAccountNamesResponse. + * @typedef {CMsgLookupMultipleAccountNamesResponse.$Properties} CMsgLookupMultipleAccountNamesResponse.$Shape */ /** * Constructs a new CMsgLookupMultipleAccountNamesResponse. * @exports CMsgLookupMultipleAccountNamesResponse * @classdesc Represents a CMsgLookupMultipleAccountNamesResponse. - * @implements ICMsgLookupMultipleAccountNamesResponse * @constructor - * @param {ICMsgLookupMultipleAccountNamesResponse=} [properties] Properties to set + * @param {CMsgLookupMultipleAccountNamesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgLookupMultipleAccountNamesResponse(properties) { + var CMsgLookupMultipleAccountNamesResponse = function (properties) { this.accounts = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgLookupMultipleAccountNamesResponse accounts. - * @member {Array.} accounts + * @member {Array.} accounts * @memberof CMsgLookupMultipleAccountNamesResponse * @instance */ @@ -4437,10 +5786,14 @@ * @function create * @memberof CMsgLookupMultipleAccountNamesResponse * @static - * @param {ICMsgLookupMultipleAccountNamesResponse=} [properties] Properties to set + * @param {CMsgLookupMultipleAccountNamesResponse.$Properties=} [properties] Properties to set * @returns {CMsgLookupMultipleAccountNamesResponse} CMsgLookupMultipleAccountNamesResponse instance + * @type {{ + * (properties: CMsgLookupMultipleAccountNamesResponse.$Shape): CMsgLookupMultipleAccountNamesResponse & CMsgLookupMultipleAccountNamesResponse.$Shape; + * (properties?: CMsgLookupMultipleAccountNamesResponse.$Properties): CMsgLookupMultipleAccountNamesResponse; + * }} */ - CMsgLookupMultipleAccountNamesResponse.create = function create(properties) { + CMsgLookupMultipleAccountNamesResponse.create = function(properties) { return new CMsgLookupMultipleAccountNamesResponse(properties); }; @@ -4449,16 +5802,23 @@ * @function encode * @memberof CMsgLookupMultipleAccountNamesResponse * @static - * @param {ICMsgLookupMultipleAccountNamesResponse} message CMsgLookupMultipleAccountNamesResponse message or plain object to encode + * @param {CMsgLookupMultipleAccountNamesResponse.$Properties} message CMsgLookupMultipleAccountNamesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgLookupMultipleAccountNamesResponse.encode = function encode(message, writer) { + CMsgLookupMultipleAccountNamesResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.accounts != null && message.accounts.length) for (var i = 0; i < message.accounts.length; ++i) - $root.CMsgLookupMultipleAccountNamesResponse.Account.encode(message.accounts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgLookupMultipleAccountNamesResponse.Account.encode(message.accounts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4467,12 +5827,12 @@ * @function encodeDelimited * @memberof CMsgLookupMultipleAccountNamesResponse * @static - * @param {ICMsgLookupMultipleAccountNamesResponse} message CMsgLookupMultipleAccountNamesResponse message or plain object to encode + * @param {CMsgLookupMultipleAccountNamesResponse.$Properties} message CMsgLookupMultipleAccountNamesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgLookupMultipleAccountNamesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgLookupMultipleAccountNamesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4482,27 +5842,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgLookupMultipleAccountNamesResponse} CMsgLookupMultipleAccountNamesResponse + * @returns {CMsgLookupMultipleAccountNamesResponse & CMsgLookupMultipleAccountNamesResponse.$Shape} CMsgLookupMultipleAccountNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgLookupMultipleAccountNamesResponse.decode = function decode(reader, length) { + CMsgLookupMultipleAccountNamesResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgLookupMultipleAccountNamesResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgLookupMultipleAccountNamesResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.accounts && message.accounts.length)) - message.accounts = []; - message.accounts.push($root.CMsgLookupMultipleAccountNamesResponse.Account.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.accounts && message.accounts.length)) + message.accounts = []; + message.accounts.push($root.CMsgLookupMultipleAccountNamesResponse.Account.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4512,11 +5889,11 @@ * @memberof CMsgLookupMultipleAccountNamesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgLookupMultipleAccountNamesResponse} CMsgLookupMultipleAccountNamesResponse + * @returns {CMsgLookupMultipleAccountNamesResponse & CMsgLookupMultipleAccountNamesResponse.$Shape} CMsgLookupMultipleAccountNamesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgLookupMultipleAccountNamesResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgLookupMultipleAccountNamesResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4530,14 +5907,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgLookupMultipleAccountNamesResponse.verify = function verify(message) { + CMsgLookupMultipleAccountNamesResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.accounts != null && message.hasOwnProperty("accounts")) { - if (!Array.isArray(message.accounts)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.accounts != null && $Object.hasOwnProperty.call(message, "accounts")) { + if (!$Array.isArray(message.accounts)) return "accounts: array expected"; for (var i = 0; i < message.accounts.length; ++i) { - var error = $root.CMsgLookupMultipleAccountNamesResponse.Account.verify(message.accounts[i]); + var error = $root.CMsgLookupMultipleAccountNamesResponse.Account.verify(message.accounts[i], _depth + 1); if (error) return "accounts." + error; } @@ -4553,18 +5934,24 @@ * @param {Object.} object Plain object * @returns {CMsgLookupMultipleAccountNamesResponse} CMsgLookupMultipleAccountNamesResponse */ - CMsgLookupMultipleAccountNamesResponse.fromObject = function fromObject(object) { + CMsgLookupMultipleAccountNamesResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgLookupMultipleAccountNamesResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgLookupMultipleAccountNamesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgLookupMultipleAccountNamesResponse(); if (object.accounts) { - if (!Array.isArray(object.accounts)) - throw TypeError(".CMsgLookupMultipleAccountNamesResponse.accounts: array expected"); - message.accounts = []; + if (!$Array.isArray(object.accounts)) + throw $TypeError(".CMsgLookupMultipleAccountNamesResponse.accounts: array expected"); + message.accounts = $Array(object.accounts.length); for (var i = 0; i < object.accounts.length; ++i) { - if (typeof object.accounts[i] !== "object") - throw TypeError(".CMsgLookupMultipleAccountNamesResponse.accounts: object expected"); - message.accounts[i] = $root.CMsgLookupMultipleAccountNamesResponse.Account.fromObject(object.accounts[i]); + if (!$util.isObject(object.accounts[i])) + throw $TypeError(".CMsgLookupMultipleAccountNamesResponse.accounts: object expected"); + message.accounts[i] = $root.CMsgLookupMultipleAccountNamesResponse.Account.fromObject(object.accounts[i], _depth + 1); } } return message; @@ -4579,16 +5966,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgLookupMultipleAccountNamesResponse.toObject = function toObject(message, options) { + CMsgLookupMultipleAccountNamesResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.accounts = []; if (message.accounts && message.accounts.length) { - object.accounts = []; + object.accounts = $Array(message.accounts.length); for (var j = 0; j < message.accounts.length; ++j) - object.accounts[j] = $root.CMsgLookupMultipleAccountNamesResponse.Account.toObject(message.accounts[j], options); + object.accounts[j] = $root.CMsgLookupMultipleAccountNamesResponse.Account.toObject(message.accounts[j], options, _depth + 1); } return object; }; @@ -4600,34 +5991,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgLookupMultipleAccountNamesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgLookupMultipleAccountNamesResponse.prototype.toJSON = function() { + return CMsgLookupMultipleAccountNamesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgLookupMultipleAccountNamesResponse + * @function getTypeUrl + * @memberof CMsgLookupMultipleAccountNamesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgLookupMultipleAccountNamesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgLookupMultipleAccountNamesResponse"; }; CMsgLookupMultipleAccountNamesResponse.Account = (function() { /** * Properties of an Account. - * @memberof CMsgLookupMultipleAccountNamesResponse - * @interface IAccount + * @typedef {Object} CMsgLookupMultipleAccountNamesResponse.Account.$Properties * @property {number|null} [accountid] Account accountid * @property {string|null} [persona] Account persona + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Account. + * @memberof CMsgLookupMultipleAccountNamesResponse + * @interface IAccount + * @augments CMsgLookupMultipleAccountNamesResponse.Account.$Properties + * @deprecated Use CMsgLookupMultipleAccountNamesResponse.Account.$Properties instead. + */ + + /** + * Shape of an Account. + * @typedef {CMsgLookupMultipleAccountNamesResponse.Account.$Properties} CMsgLookupMultipleAccountNamesResponse.Account.$Shape */ /** * Constructs a new Account. * @memberof CMsgLookupMultipleAccountNamesResponse * @classdesc Represents an Account. - * @implements IAccount * @constructor - * @param {CMsgLookupMultipleAccountNamesResponse.IAccount=} [properties] Properties to set + * @param {CMsgLookupMultipleAccountNamesResponse.Account.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Account(properties) { + var Account = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Account accountid. @@ -4650,10 +6068,14 @@ * @function create * @memberof CMsgLookupMultipleAccountNamesResponse.Account * @static - * @param {CMsgLookupMultipleAccountNamesResponse.IAccount=} [properties] Properties to set + * @param {CMsgLookupMultipleAccountNamesResponse.Account.$Properties=} [properties] Properties to set * @returns {CMsgLookupMultipleAccountNamesResponse.Account} Account instance + * @type {{ + * (properties: CMsgLookupMultipleAccountNamesResponse.Account.$Shape): CMsgLookupMultipleAccountNamesResponse.Account & CMsgLookupMultipleAccountNamesResponse.Account.$Shape; + * (properties?: CMsgLookupMultipleAccountNamesResponse.Account.$Properties): CMsgLookupMultipleAccountNamesResponse.Account; + * }} */ - Account.create = function create(properties) { + Account.create = function(properties) { return new Account(properties); }; @@ -4662,17 +6084,24 @@ * @function encode * @memberof CMsgLookupMultipleAccountNamesResponse.Account * @static - * @param {CMsgLookupMultipleAccountNamesResponse.IAccount} message Account message or plain object to encode + * @param {CMsgLookupMultipleAccountNamesResponse.Account.$Properties} message Account message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Account.encode = function encode(message, writer) { + Account.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.accountid != null && Object.hasOwnProperty.call(message, "accountid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.accountid); - if (message.persona != null && Object.hasOwnProperty.call(message, "persona")) + if (message.persona != null && $Object.hasOwnProperty.call(message, "persona")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.persona); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4681,12 +6110,12 @@ * @function encodeDelimited * @memberof CMsgLookupMultipleAccountNamesResponse.Account * @static - * @param {CMsgLookupMultipleAccountNamesResponse.IAccount} message Account message or plain object to encode + * @param {CMsgLookupMultipleAccountNamesResponse.Account.$Properties} message Account message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Account.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Account.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4696,28 +6125,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgLookupMultipleAccountNamesResponse.Account} Account + * @returns {CMsgLookupMultipleAccountNamesResponse.Account & CMsgLookupMultipleAccountNamesResponse.Account.$Shape} Account * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Account.decode = function decode(reader, length) { + Account.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgLookupMultipleAccountNamesResponse.Account(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgLookupMultipleAccountNamesResponse.Account(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.accountid = reader.uint32(); - break; - case 2: - message.persona = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.accountid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.persona = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4727,11 +6176,11 @@ * @memberof CMsgLookupMultipleAccountNamesResponse.Account * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgLookupMultipleAccountNamesResponse.Account} Account + * @returns {CMsgLookupMultipleAccountNamesResponse.Account & CMsgLookupMultipleAccountNamesResponse.Account.$Shape} Account * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Account.decodeDelimited = function decodeDelimited(reader) { + Account.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4745,13 +6194,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Account.verify = function verify(message) { + Account.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) if (!$util.isInteger(message.accountid)) return "accountid: integer expected"; - if (message.persona != null && message.hasOwnProperty("persona")) + if (message.persona != null && $Object.hasOwnProperty.call(message, "persona")) if (!$util.isString(message.persona)) return "persona: string expected"; return null; @@ -4765,14 +6218,20 @@ * @param {Object.} object Plain object * @returns {CMsgLookupMultipleAccountNamesResponse.Account} Account */ - Account.fromObject = function fromObject(object) { + Account.fromObject = function (object, _depth) { if (object instanceof $root.CMsgLookupMultipleAccountNamesResponse.Account) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgLookupMultipleAccountNamesResponse.Account: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgLookupMultipleAccountNamesResponse.Account(); if (object.accountid != null) message.accountid = object.accountid >>> 0; if (object.persona != null) - message.persona = String(object.persona); + message.persona = $String(object.persona); return message; }; @@ -4785,17 +6244,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Account.toObject = function toObject(message, options) { + Account.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.accountid = 0; object.persona = ""; } - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) object.accountid = message.accountid; - if (message.persona != null && message.hasOwnProperty("persona")) + if (message.persona != null && $Object.hasOwnProperty.call(message, "persona")) object.persona = message.persona; return object; }; @@ -4807,8 +6270,22 @@ * @instance * @returns {Object.} JSON object */ - Account.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Account.prototype.toJSON = function() { + return Account.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Account + * @function getTypeUrl + * @memberof CMsgLookupMultipleAccountNamesResponse.Account + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Account.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgLookupMultipleAccountNamesResponse.Account"; }; return Account; @@ -4821,26 +6298,39 @@ /** * Properties of a CMsgGCToGCGrantSelfMadeItemToAccount. - * @exports ICMsgGCToGCGrantSelfMadeItemToAccount - * @interface ICMsgGCToGCGrantSelfMadeItemToAccount + * @typedef {Object} CMsgGCToGCGrantSelfMadeItemToAccount.$Properties * @property {number|null} [item_def_index] CMsgGCToGCGrantSelfMadeItemToAccount item_def_index * @property {number|null} [accountid] CMsgGCToGCGrantSelfMadeItemToAccount accountid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCToGCGrantSelfMadeItemToAccount. + * @exports ICMsgGCToGCGrantSelfMadeItemToAccount + * @interface ICMsgGCToGCGrantSelfMadeItemToAccount + * @augments CMsgGCToGCGrantSelfMadeItemToAccount.$Properties + * @deprecated Use CMsgGCToGCGrantSelfMadeItemToAccount.$Properties instead. + */ + + /** + * Shape of a CMsgGCToGCGrantSelfMadeItemToAccount. + * @typedef {CMsgGCToGCGrantSelfMadeItemToAccount.$Properties} CMsgGCToGCGrantSelfMadeItemToAccount.$Shape */ /** * Constructs a new CMsgGCToGCGrantSelfMadeItemToAccount. * @exports CMsgGCToGCGrantSelfMadeItemToAccount * @classdesc Represents a CMsgGCToGCGrantSelfMadeItemToAccount. - * @implements ICMsgGCToGCGrantSelfMadeItemToAccount * @constructor - * @param {ICMsgGCToGCGrantSelfMadeItemToAccount=} [properties] Properties to set + * @param {CMsgGCToGCGrantSelfMadeItemToAccount.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCToGCGrantSelfMadeItemToAccount(properties) { + var CMsgGCToGCGrantSelfMadeItemToAccount = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCToGCGrantSelfMadeItemToAccount item_def_index. @@ -4863,10 +6353,14 @@ * @function create * @memberof CMsgGCToGCGrantSelfMadeItemToAccount * @static - * @param {ICMsgGCToGCGrantSelfMadeItemToAccount=} [properties] Properties to set + * @param {CMsgGCToGCGrantSelfMadeItemToAccount.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCGrantSelfMadeItemToAccount} CMsgGCToGCGrantSelfMadeItemToAccount instance + * @type {{ + * (properties: CMsgGCToGCGrantSelfMadeItemToAccount.$Shape): CMsgGCToGCGrantSelfMadeItemToAccount & CMsgGCToGCGrantSelfMadeItemToAccount.$Shape; + * (properties?: CMsgGCToGCGrantSelfMadeItemToAccount.$Properties): CMsgGCToGCGrantSelfMadeItemToAccount; + * }} */ - CMsgGCToGCGrantSelfMadeItemToAccount.create = function create(properties) { + CMsgGCToGCGrantSelfMadeItemToAccount.create = function(properties) { return new CMsgGCToGCGrantSelfMadeItemToAccount(properties); }; @@ -4875,17 +6369,24 @@ * @function encode * @memberof CMsgGCToGCGrantSelfMadeItemToAccount * @static - * @param {ICMsgGCToGCGrantSelfMadeItemToAccount} message CMsgGCToGCGrantSelfMadeItemToAccount message or plain object to encode + * @param {CMsgGCToGCGrantSelfMadeItemToAccount.$Properties} message CMsgGCToGCGrantSelfMadeItemToAccount message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCGrantSelfMadeItemToAccount.encode = function encode(message, writer) { + CMsgGCToGCGrantSelfMadeItemToAccount.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_def_index != null && Object.hasOwnProperty.call(message, "item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.item_def_index); - if (message.accountid != null && Object.hasOwnProperty.call(message, "accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.accountid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4894,12 +6395,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCGrantSelfMadeItemToAccount * @static - * @param {ICMsgGCToGCGrantSelfMadeItemToAccount} message CMsgGCToGCGrantSelfMadeItemToAccount message or plain object to encode + * @param {CMsgGCToGCGrantSelfMadeItemToAccount.$Properties} message CMsgGCToGCGrantSelfMadeItemToAccount message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCGrantSelfMadeItemToAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCToGCGrantSelfMadeItemToAccount.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4909,28 +6410,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCGrantSelfMadeItemToAccount} CMsgGCToGCGrantSelfMadeItemToAccount + * @returns {CMsgGCToGCGrantSelfMadeItemToAccount & CMsgGCToGCGrantSelfMadeItemToAccount.$Shape} CMsgGCToGCGrantSelfMadeItemToAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCGrantSelfMadeItemToAccount.decode = function decode(reader, length) { + CMsgGCToGCGrantSelfMadeItemToAccount.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCGrantSelfMadeItemToAccount(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCGrantSelfMadeItemToAccount(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_def_index = reader.uint32(); - break; - case 2: - message.accountid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_def_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.accountid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4940,11 +6461,11 @@ * @memberof CMsgGCToGCGrantSelfMadeItemToAccount * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCGrantSelfMadeItemToAccount} CMsgGCToGCGrantSelfMadeItemToAccount + * @returns {CMsgGCToGCGrantSelfMadeItemToAccount & CMsgGCToGCGrantSelfMadeItemToAccount.$Shape} CMsgGCToGCGrantSelfMadeItemToAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCGrantSelfMadeItemToAccount.decodeDelimited = function decodeDelimited(reader) { + CMsgGCToGCGrantSelfMadeItemToAccount.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4958,13 +6479,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCToGCGrantSelfMadeItemToAccount.verify = function verify(message) { + CMsgGCToGCGrantSelfMadeItemToAccount.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) if (!$util.isInteger(message.item_def_index)) return "item_def_index: integer expected"; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) if (!$util.isInteger(message.accountid)) return "accountid: integer expected"; return null; @@ -4978,9 +6503,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCGrantSelfMadeItemToAccount} CMsgGCToGCGrantSelfMadeItemToAccount */ - CMsgGCToGCGrantSelfMadeItemToAccount.fromObject = function fromObject(object) { + CMsgGCToGCGrantSelfMadeItemToAccount.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCGrantSelfMadeItemToAccount) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCGrantSelfMadeItemToAccount: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCToGCGrantSelfMadeItemToAccount(); if (object.item_def_index != null) message.item_def_index = object.item_def_index >>> 0; @@ -4998,17 +6529,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCToGCGrantSelfMadeItemToAccount.toObject = function toObject(message, options) { + CMsgGCToGCGrantSelfMadeItemToAccount.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.item_def_index = 0; object.accountid = 0; } - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) object.item_def_index = message.item_def_index; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) object.accountid = message.accountid; return object; }; @@ -5020,8 +6555,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCToGCGrantSelfMadeItemToAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCToGCGrantSelfMadeItemToAccount.prototype.toJSON = function() { + return CMsgGCToGCGrantSelfMadeItemToAccount.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCToGCGrantSelfMadeItemToAccount + * @function getTypeUrl + * @memberof CMsgGCToGCGrantSelfMadeItemToAccount + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCToGCGrantSelfMadeItemToAccount.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCGrantSelfMadeItemToAccount"; }; return CMsgGCToGCGrantSelfMadeItemToAccount; @@ -5031,26 +6580,39 @@ /** * Properties of a CMsgGCToGCThankedByNewUser. - * @exports ICMsgGCToGCThankedByNewUser - * @interface ICMsgGCToGCThankedByNewUser + * @typedef {Object} CMsgGCToGCThankedByNewUser.$Properties * @property {number|null} [new_user_accountid] CMsgGCToGCThankedByNewUser new_user_accountid * @property {number|null} [thanked_user_accountid] CMsgGCToGCThankedByNewUser thanked_user_accountid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCToGCThankedByNewUser. + * @exports ICMsgGCToGCThankedByNewUser + * @interface ICMsgGCToGCThankedByNewUser + * @augments CMsgGCToGCThankedByNewUser.$Properties + * @deprecated Use CMsgGCToGCThankedByNewUser.$Properties instead. + */ + + /** + * Shape of a CMsgGCToGCThankedByNewUser. + * @typedef {CMsgGCToGCThankedByNewUser.$Properties} CMsgGCToGCThankedByNewUser.$Shape */ /** * Constructs a new CMsgGCToGCThankedByNewUser. * @exports CMsgGCToGCThankedByNewUser * @classdesc Represents a CMsgGCToGCThankedByNewUser. - * @implements ICMsgGCToGCThankedByNewUser * @constructor - * @param {ICMsgGCToGCThankedByNewUser=} [properties] Properties to set + * @param {CMsgGCToGCThankedByNewUser.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCToGCThankedByNewUser(properties) { + var CMsgGCToGCThankedByNewUser = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCToGCThankedByNewUser new_user_accountid. @@ -5073,10 +6635,14 @@ * @function create * @memberof CMsgGCToGCThankedByNewUser * @static - * @param {ICMsgGCToGCThankedByNewUser=} [properties] Properties to set + * @param {CMsgGCToGCThankedByNewUser.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCThankedByNewUser} CMsgGCToGCThankedByNewUser instance + * @type {{ + * (properties: CMsgGCToGCThankedByNewUser.$Shape): CMsgGCToGCThankedByNewUser & CMsgGCToGCThankedByNewUser.$Shape; + * (properties?: CMsgGCToGCThankedByNewUser.$Properties): CMsgGCToGCThankedByNewUser; + * }} */ - CMsgGCToGCThankedByNewUser.create = function create(properties) { + CMsgGCToGCThankedByNewUser.create = function(properties) { return new CMsgGCToGCThankedByNewUser(properties); }; @@ -5085,17 +6651,24 @@ * @function encode * @memberof CMsgGCToGCThankedByNewUser * @static - * @param {ICMsgGCToGCThankedByNewUser} message CMsgGCToGCThankedByNewUser message or plain object to encode + * @param {CMsgGCToGCThankedByNewUser.$Properties} message CMsgGCToGCThankedByNewUser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCThankedByNewUser.encode = function encode(message, writer) { + CMsgGCToGCThankedByNewUser.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.new_user_accountid != null && Object.hasOwnProperty.call(message, "new_user_accountid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.new_user_accountid != null && $Object.hasOwnProperty.call(message, "new_user_accountid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.new_user_accountid); - if (message.thanked_user_accountid != null && Object.hasOwnProperty.call(message, "thanked_user_accountid")) + if (message.thanked_user_accountid != null && $Object.hasOwnProperty.call(message, "thanked_user_accountid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.thanked_user_accountid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5104,12 +6677,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCThankedByNewUser * @static - * @param {ICMsgGCToGCThankedByNewUser} message CMsgGCToGCThankedByNewUser message or plain object to encode + * @param {CMsgGCToGCThankedByNewUser.$Properties} message CMsgGCToGCThankedByNewUser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCThankedByNewUser.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCToGCThankedByNewUser.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5119,28 +6692,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCThankedByNewUser} CMsgGCToGCThankedByNewUser + * @returns {CMsgGCToGCThankedByNewUser & CMsgGCToGCThankedByNewUser.$Shape} CMsgGCToGCThankedByNewUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCThankedByNewUser.decode = function decode(reader, length) { + CMsgGCToGCThankedByNewUser.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCThankedByNewUser(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCThankedByNewUser(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.new_user_accountid = reader.uint32(); - break; - case 2: - message.thanked_user_accountid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.new_user_accountid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.thanked_user_accountid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5150,11 +6743,11 @@ * @memberof CMsgGCToGCThankedByNewUser * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCThankedByNewUser} CMsgGCToGCThankedByNewUser + * @returns {CMsgGCToGCThankedByNewUser & CMsgGCToGCThankedByNewUser.$Shape} CMsgGCToGCThankedByNewUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCThankedByNewUser.decodeDelimited = function decodeDelimited(reader) { + CMsgGCToGCThankedByNewUser.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5168,13 +6761,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCToGCThankedByNewUser.verify = function verify(message) { + CMsgGCToGCThankedByNewUser.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.new_user_accountid != null && message.hasOwnProperty("new_user_accountid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.new_user_accountid != null && $Object.hasOwnProperty.call(message, "new_user_accountid")) if (!$util.isInteger(message.new_user_accountid)) return "new_user_accountid: integer expected"; - if (message.thanked_user_accountid != null && message.hasOwnProperty("thanked_user_accountid")) + if (message.thanked_user_accountid != null && $Object.hasOwnProperty.call(message, "thanked_user_accountid")) if (!$util.isInteger(message.thanked_user_accountid)) return "thanked_user_accountid: integer expected"; return null; @@ -5188,9 +6785,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCThankedByNewUser} CMsgGCToGCThankedByNewUser */ - CMsgGCToGCThankedByNewUser.fromObject = function fromObject(object) { + CMsgGCToGCThankedByNewUser.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCThankedByNewUser) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCThankedByNewUser: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCToGCThankedByNewUser(); if (object.new_user_accountid != null) message.new_user_accountid = object.new_user_accountid >>> 0; @@ -5208,17 +6811,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCToGCThankedByNewUser.toObject = function toObject(message, options) { + CMsgGCToGCThankedByNewUser.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.new_user_accountid = 0; object.thanked_user_accountid = 0; } - if (message.new_user_accountid != null && message.hasOwnProperty("new_user_accountid")) + if (message.new_user_accountid != null && $Object.hasOwnProperty.call(message, "new_user_accountid")) object.new_user_accountid = message.new_user_accountid; - if (message.thanked_user_accountid != null && message.hasOwnProperty("thanked_user_accountid")) + if (message.thanked_user_accountid != null && $Object.hasOwnProperty.call(message, "thanked_user_accountid")) object.thanked_user_accountid = message.thanked_user_accountid; return object; }; @@ -5230,8 +6837,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCToGCThankedByNewUser.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCToGCThankedByNewUser.prototype.toJSON = function() { + return CMsgGCToGCThankedByNewUser.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCToGCThankedByNewUser + * @function getTypeUrl + * @memberof CMsgGCToGCThankedByNewUser + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCToGCThankedByNewUser.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCThankedByNewUser"; }; return CMsgGCToGCThankedByNewUser; @@ -5241,26 +6862,39 @@ /** * Properties of a CMsgGCShuffleCrateContents. - * @exports ICMsgGCShuffleCrateContents - * @interface ICMsgGCShuffleCrateContents + * @typedef {Object} CMsgGCShuffleCrateContents.$Properties * @property {number|Long|null} [crate_item_id] CMsgGCShuffleCrateContents crate_item_id * @property {string|null} [user_code_string] CMsgGCShuffleCrateContents user_code_string + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCShuffleCrateContents. + * @exports ICMsgGCShuffleCrateContents + * @interface ICMsgGCShuffleCrateContents + * @augments CMsgGCShuffleCrateContents.$Properties + * @deprecated Use CMsgGCShuffleCrateContents.$Properties instead. + */ + + /** + * Shape of a CMsgGCShuffleCrateContents. + * @typedef {CMsgGCShuffleCrateContents.$Properties} CMsgGCShuffleCrateContents.$Shape */ /** * Constructs a new CMsgGCShuffleCrateContents. * @exports CMsgGCShuffleCrateContents * @classdesc Represents a CMsgGCShuffleCrateContents. - * @implements ICMsgGCShuffleCrateContents * @constructor - * @param {ICMsgGCShuffleCrateContents=} [properties] Properties to set + * @param {CMsgGCShuffleCrateContents.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCShuffleCrateContents(properties) { + var CMsgGCShuffleCrateContents = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCShuffleCrateContents crate_item_id. @@ -5283,10 +6917,14 @@ * @function create * @memberof CMsgGCShuffleCrateContents * @static - * @param {ICMsgGCShuffleCrateContents=} [properties] Properties to set + * @param {CMsgGCShuffleCrateContents.$Properties=} [properties] Properties to set * @returns {CMsgGCShuffleCrateContents} CMsgGCShuffleCrateContents instance + * @type {{ + * (properties: CMsgGCShuffleCrateContents.$Shape): CMsgGCShuffleCrateContents & CMsgGCShuffleCrateContents.$Shape; + * (properties?: CMsgGCShuffleCrateContents.$Properties): CMsgGCShuffleCrateContents; + * }} */ - CMsgGCShuffleCrateContents.create = function create(properties) { + CMsgGCShuffleCrateContents.create = function(properties) { return new CMsgGCShuffleCrateContents(properties); }; @@ -5295,17 +6933,24 @@ * @function encode * @memberof CMsgGCShuffleCrateContents * @static - * @param {ICMsgGCShuffleCrateContents} message CMsgGCShuffleCrateContents message or plain object to encode + * @param {CMsgGCShuffleCrateContents.$Properties} message CMsgGCShuffleCrateContents message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCShuffleCrateContents.encode = function encode(message, writer) { + CMsgGCShuffleCrateContents.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.crate_item_id != null && Object.hasOwnProperty.call(message, "crate_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.crate_item_id != null && $Object.hasOwnProperty.call(message, "crate_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.crate_item_id); - if (message.user_code_string != null && Object.hasOwnProperty.call(message, "user_code_string")) + if (message.user_code_string != null && $Object.hasOwnProperty.call(message, "user_code_string")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.user_code_string); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5314,12 +6959,12 @@ * @function encodeDelimited * @memberof CMsgGCShuffleCrateContents * @static - * @param {ICMsgGCShuffleCrateContents} message CMsgGCShuffleCrateContents message or plain object to encode + * @param {CMsgGCShuffleCrateContents.$Properties} message CMsgGCShuffleCrateContents message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCShuffleCrateContents.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCShuffleCrateContents.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5329,28 +6974,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCShuffleCrateContents} CMsgGCShuffleCrateContents + * @returns {CMsgGCShuffleCrateContents & CMsgGCShuffleCrateContents.$Shape} CMsgGCShuffleCrateContents * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCShuffleCrateContents.decode = function decode(reader, length) { + CMsgGCShuffleCrateContents.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCShuffleCrateContents(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCShuffleCrateContents(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.crate_item_id = reader.uint64(); - break; - case 2: - message.user_code_string = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.crate_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.user_code_string = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5360,11 +7025,11 @@ * @memberof CMsgGCShuffleCrateContents * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCShuffleCrateContents} CMsgGCShuffleCrateContents + * @returns {CMsgGCShuffleCrateContents & CMsgGCShuffleCrateContents.$Shape} CMsgGCShuffleCrateContents * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCShuffleCrateContents.decodeDelimited = function decodeDelimited(reader) { + CMsgGCShuffleCrateContents.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5378,13 +7043,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCShuffleCrateContents.verify = function verify(message) { + CMsgGCShuffleCrateContents.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.crate_item_id != null && message.hasOwnProperty("crate_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.crate_item_id != null && $Object.hasOwnProperty.call(message, "crate_item_id")) if (!$util.isInteger(message.crate_item_id) && !(message.crate_item_id && $util.isInteger(message.crate_item_id.low) && $util.isInteger(message.crate_item_id.high))) return "crate_item_id: integer|Long expected"; - if (message.user_code_string != null && message.hasOwnProperty("user_code_string")) + if (message.user_code_string != null && $Object.hasOwnProperty.call(message, "user_code_string")) if (!$util.isString(message.user_code_string)) return "user_code_string: string expected"; return null; @@ -5398,21 +7067,27 @@ * @param {Object.} object Plain object * @returns {CMsgGCShuffleCrateContents} CMsgGCShuffleCrateContents */ - CMsgGCShuffleCrateContents.fromObject = function fromObject(object) { + CMsgGCShuffleCrateContents.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCShuffleCrateContents) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCShuffleCrateContents: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCShuffleCrateContents(); if (object.crate_item_id != null) if ($util.Long) - (message.crate_item_id = $util.Long.fromValue(object.crate_item_id)).unsigned = true; + message.crate_item_id = $util.Long.fromValue(object.crate_item_id, true); else if (typeof object.crate_item_id === "string") - message.crate_item_id = parseInt(object.crate_item_id, 10); + message.crate_item_id = $parseInt(object.crate_item_id, 10); else if (typeof object.crate_item_id === "number") message.crate_item_id = object.crate_item_id; else if (typeof object.crate_item_id === "object") message.crate_item_id = new $util.LongBits(object.crate_item_id.low >>> 0, object.crate_item_id.high >>> 0).toNumber(true); if (object.user_code_string != null) - message.user_code_string = String(object.user_code_string); + message.user_code_string = $String(object.user_code_string); return message; }; @@ -5425,24 +7100,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCShuffleCrateContents.toObject = function toObject(message, options) { + CMsgGCShuffleCrateContents.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.crate_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.crate_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.crate_item_id = options.longs === String ? "0" : 0; + object.crate_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.user_code_string = ""; } - if (message.crate_item_id != null && message.hasOwnProperty("crate_item_id")) - if (typeof message.crate_item_id === "number") - object.crate_item_id = options.longs === String ? String(message.crate_item_id) : message.crate_item_id; + if (message.crate_item_id != null && $Object.hasOwnProperty.call(message, "crate_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.crate_item_id = typeof message.crate_item_id === "number" ? $BigInt(message.crate_item_id) : $util.Long.fromBits(message.crate_item_id.low >>> 0, message.crate_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.crate_item_id === "number") + object.crate_item_id = options.longs === $String ? $String(message.crate_item_id) : message.crate_item_id; else - object.crate_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.crate_item_id) : options.longs === Number ? new $util.LongBits(message.crate_item_id.low >>> 0, message.crate_item_id.high >>> 0).toNumber(true) : message.crate_item_id; - if (message.user_code_string != null && message.hasOwnProperty("user_code_string")) + object.crate_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.crate_item_id) : options.longs === $Number ? new $util.LongBits(message.crate_item_id.low >>> 0, message.crate_item_id.high >>> 0).toNumber(true) : message.crate_item_id; + if (message.user_code_string != null && $Object.hasOwnProperty.call(message, "user_code_string")) object.user_code_string = message.user_code_string; return object; }; @@ -5454,8 +7135,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCShuffleCrateContents.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCShuffleCrateContents.prototype.toJSON = function() { + return CMsgGCShuffleCrateContents.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCShuffleCrateContents + * @function getTypeUrl + * @memberof CMsgGCShuffleCrateContents + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCShuffleCrateContents.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCShuffleCrateContents"; }; return CMsgGCShuffleCrateContents; @@ -5465,28 +7160,41 @@ /** * Properties of a CMsgGCQuestObjective_Progress. - * @exports ICMsgGCQuestObjective_Progress - * @interface ICMsgGCQuestObjective_Progress + * @typedef {Object} CMsgGCQuestObjective_Progress.$Properties * @property {number|Long|null} [quest_id] CMsgGCQuestObjective_Progress quest_id * @property {number|null} [quest_attrib_index] CMsgGCQuestObjective_Progress quest_attrib_index * @property {number|null} [delta] CMsgGCQuestObjective_Progress delta * @property {number|Long|null} [owner_steamid] CMsgGCQuestObjective_Progress owner_steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCQuestObjective_Progress. + * @exports ICMsgGCQuestObjective_Progress + * @interface ICMsgGCQuestObjective_Progress + * @augments CMsgGCQuestObjective_Progress.$Properties + * @deprecated Use CMsgGCQuestObjective_Progress.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestObjective_Progress. + * @typedef {CMsgGCQuestObjective_Progress.$Properties} CMsgGCQuestObjective_Progress.$Shape */ /** * Constructs a new CMsgGCQuestObjective_Progress. * @exports CMsgGCQuestObjective_Progress * @classdesc Represents a CMsgGCQuestObjective_Progress. - * @implements ICMsgGCQuestObjective_Progress * @constructor - * @param {ICMsgGCQuestObjective_Progress=} [properties] Properties to set + * @param {CMsgGCQuestObjective_Progress.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestObjective_Progress(properties) { + var CMsgGCQuestObjective_Progress = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestObjective_Progress quest_id. @@ -5518,17 +7226,21 @@ * @memberof CMsgGCQuestObjective_Progress * @instance */ - CMsgGCQuestObjective_Progress.prototype.owner_steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCQuestObjective_Progress.prototype.owner_steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCQuestObjective_Progress instance using the specified properties. * @function create * @memberof CMsgGCQuestObjective_Progress * @static - * @param {ICMsgGCQuestObjective_Progress=} [properties] Properties to set + * @param {CMsgGCQuestObjective_Progress.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestObjective_Progress} CMsgGCQuestObjective_Progress instance + * @type {{ + * (properties: CMsgGCQuestObjective_Progress.$Shape): CMsgGCQuestObjective_Progress & CMsgGCQuestObjective_Progress.$Shape; + * (properties?: CMsgGCQuestObjective_Progress.$Properties): CMsgGCQuestObjective_Progress; + * }} */ - CMsgGCQuestObjective_Progress.create = function create(properties) { + CMsgGCQuestObjective_Progress.create = function(properties) { return new CMsgGCQuestObjective_Progress(properties); }; @@ -5537,21 +7249,28 @@ * @function encode * @memberof CMsgGCQuestObjective_Progress * @static - * @param {ICMsgGCQuestObjective_Progress} message CMsgGCQuestObjective_Progress message or plain object to encode + * @param {CMsgGCQuestObjective_Progress.$Properties} message CMsgGCQuestObjective_Progress message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestObjective_Progress.encode = function encode(message, writer) { + CMsgGCQuestObjective_Progress.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.quest_id != null && Object.hasOwnProperty.call(message, "quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.quest_id); - if (message.quest_attrib_index != null && Object.hasOwnProperty.call(message, "quest_attrib_index")) + if (message.quest_attrib_index != null && $Object.hasOwnProperty.call(message, "quest_attrib_index")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.quest_attrib_index); - if (message.delta != null && Object.hasOwnProperty.call(message, "delta")) + if (message.delta != null && $Object.hasOwnProperty.call(message, "delta")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.delta); - if (message.owner_steamid != null && Object.hasOwnProperty.call(message, "owner_steamid")) + if (message.owner_steamid != null && $Object.hasOwnProperty.call(message, "owner_steamid")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.owner_steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5560,12 +7279,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestObjective_Progress * @static - * @param {ICMsgGCQuestObjective_Progress} message CMsgGCQuestObjective_Progress message or plain object to encode + * @param {CMsgGCQuestObjective_Progress.$Properties} message CMsgGCQuestObjective_Progress message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestObjective_Progress.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestObjective_Progress.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5575,34 +7294,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestObjective_Progress} CMsgGCQuestObjective_Progress + * @returns {CMsgGCQuestObjective_Progress & CMsgGCQuestObjective_Progress.$Shape} CMsgGCQuestObjective_Progress * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestObjective_Progress.decode = function decode(reader, length) { + CMsgGCQuestObjective_Progress.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestObjective_Progress(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestObjective_Progress(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quest_id = reader.uint64(); - break; - case 2: - message.quest_attrib_index = reader.uint32(); - break; - case 3: - message.delta = reader.uint32(); - break; - case 4: - message.owner_steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.quest_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.quest_attrib_index = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.delta = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.owner_steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5612,11 +7357,11 @@ * @memberof CMsgGCQuestObjective_Progress * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestObjective_Progress} CMsgGCQuestObjective_Progress + * @returns {CMsgGCQuestObjective_Progress & CMsgGCQuestObjective_Progress.$Shape} CMsgGCQuestObjective_Progress * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestObjective_Progress.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestObjective_Progress.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5630,19 +7375,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestObjective_Progress.verify = function verify(message) { + CMsgGCQuestObjective_Progress.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) if (!$util.isInteger(message.quest_id) && !(message.quest_id && $util.isInteger(message.quest_id.low) && $util.isInteger(message.quest_id.high))) return "quest_id: integer|Long expected"; - if (message.quest_attrib_index != null && message.hasOwnProperty("quest_attrib_index")) + if (message.quest_attrib_index != null && $Object.hasOwnProperty.call(message, "quest_attrib_index")) if (!$util.isInteger(message.quest_attrib_index)) return "quest_attrib_index: integer expected"; - if (message.delta != null && message.hasOwnProperty("delta")) + if (message.delta != null && $Object.hasOwnProperty.call(message, "delta")) if (!$util.isInteger(message.delta)) return "delta: integer expected"; - if (message.owner_steamid != null && message.hasOwnProperty("owner_steamid")) + if (message.owner_steamid != null && $Object.hasOwnProperty.call(message, "owner_steamid")) if (!$util.isInteger(message.owner_steamid) && !(message.owner_steamid && $util.isInteger(message.owner_steamid.low) && $util.isInteger(message.owner_steamid.high))) return "owner_steamid: integer|Long expected"; return null; @@ -5656,15 +7405,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestObjective_Progress} CMsgGCQuestObjective_Progress */ - CMsgGCQuestObjective_Progress.fromObject = function fromObject(object) { + CMsgGCQuestObjective_Progress.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestObjective_Progress) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestObjective_Progress: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestObjective_Progress(); if (object.quest_id != null) if ($util.Long) - (message.quest_id = $util.Long.fromValue(object.quest_id)).unsigned = true; + message.quest_id = $util.Long.fromValue(object.quest_id, true); else if (typeof object.quest_id === "string") - message.quest_id = parseInt(object.quest_id, 10); + message.quest_id = $parseInt(object.quest_id, 10); else if (typeof object.quest_id === "number") message.quest_id = object.quest_id; else if (typeof object.quest_id === "object") @@ -5675,13 +7430,13 @@ message.delta = object.delta >>> 0; if (object.owner_steamid != null) if ($util.Long) - (message.owner_steamid = $util.Long.fromValue(object.owner_steamid)).unsigned = false; + message.owner_steamid = $util.Long.fromValue(object.owner_steamid, true); else if (typeof object.owner_steamid === "string") - message.owner_steamid = parseInt(object.owner_steamid, 10); + message.owner_steamid = $parseInt(object.owner_steamid, 10); else if (typeof object.owner_steamid === "number") message.owner_steamid = object.owner_steamid; else if (typeof object.owner_steamid === "object") - message.owner_steamid = new $util.LongBits(object.owner_steamid.low >>> 0, object.owner_steamid.high >>> 0).toNumber(); + message.owner_steamid = new $util.LongBits(object.owner_steamid.low >>> 0, object.owner_steamid.high >>> 0).toNumber(true); return message; }; @@ -5694,38 +7449,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestObjective_Progress.toObject = function toObject(message, options) { + CMsgGCQuestObjective_Progress.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.quest_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.quest_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.quest_id = options.longs === String ? "0" : 0; + object.quest_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.quest_attrib_index = 0; object.delta = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.owner_steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.owner_steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.owner_steamid = options.longs === String ? "0" : 0; + object.owner_steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.quest_id != null && message.hasOwnProperty("quest_id")) - if (typeof message.quest_id === "number") - object.quest_id = options.longs === String ? String(message.quest_id) : message.quest_id; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.quest_id = typeof message.quest_id === "number" ? $BigInt(message.quest_id) : $util.Long.fromBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0, true).toBigInt(); + else if (typeof message.quest_id === "number") + object.quest_id = options.longs === $String ? $String(message.quest_id) : message.quest_id; else - object.quest_id = options.longs === String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; - if (message.quest_attrib_index != null && message.hasOwnProperty("quest_attrib_index")) + object.quest_id = options.longs === $String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === $Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; + if (message.quest_attrib_index != null && $Object.hasOwnProperty.call(message, "quest_attrib_index")) object.quest_attrib_index = message.quest_attrib_index; - if (message.delta != null && message.hasOwnProperty("delta")) + if (message.delta != null && $Object.hasOwnProperty.call(message, "delta")) object.delta = message.delta; - if (message.owner_steamid != null && message.hasOwnProperty("owner_steamid")) - if (typeof message.owner_steamid === "number") - object.owner_steamid = options.longs === String ? String(message.owner_steamid) : message.owner_steamid; + if (message.owner_steamid != null && $Object.hasOwnProperty.call(message, "owner_steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.owner_steamid = typeof message.owner_steamid === "number" ? $BigInt(message.owner_steamid) : $util.Long.fromBits(message.owner_steamid.low >>> 0, message.owner_steamid.high >>> 0, true).toBigInt(); + else if (typeof message.owner_steamid === "number") + object.owner_steamid = options.longs === $String ? $String(message.owner_steamid) : message.owner_steamid; else - object.owner_steamid = options.longs === String ? $util.Long.prototype.toString.call(message.owner_steamid) : options.longs === Number ? new $util.LongBits(message.owner_steamid.low >>> 0, message.owner_steamid.high >>> 0).toNumber() : message.owner_steamid; + object.owner_steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.owner_steamid) : options.longs === $Number ? new $util.LongBits(message.owner_steamid.low >>> 0, message.owner_steamid.high >>> 0).toNumber(true) : message.owner_steamid; return object; }; @@ -5736,8 +7499,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestObjective_Progress.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestObjective_Progress.prototype.toJSON = function() { + return CMsgGCQuestObjective_Progress.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestObjective_Progress + * @function getTypeUrl + * @memberof CMsgGCQuestObjective_Progress + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestObjective_Progress.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestObjective_Progress"; }; return CMsgGCQuestObjective_Progress; @@ -5747,30 +7524,43 @@ /** * Properties of a CMsgGCQuestObjective_PointsChange. - * @exports ICMsgGCQuestObjective_PointsChange - * @interface ICMsgGCQuestObjective_PointsChange + * @typedef {Object} CMsgGCQuestObjective_PointsChange.$Properties * @property {number|Long|null} [quest_id] CMsgGCQuestObjective_PointsChange quest_id * @property {number|Long|null} [owner_steamid] CMsgGCQuestObjective_PointsChange owner_steamid * @property {boolean|null} [update_base_points] CMsgGCQuestObjective_PointsChange update_base_points * @property {number|null} [points_0] CMsgGCQuestObjective_PointsChange points_0 * @property {number|null} [points_1] CMsgGCQuestObjective_PointsChange points_1 * @property {number|null} [points_2] CMsgGCQuestObjective_PointsChange points_2 + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCQuestObjective_PointsChange. + * @exports ICMsgGCQuestObjective_PointsChange + * @interface ICMsgGCQuestObjective_PointsChange + * @augments CMsgGCQuestObjective_PointsChange.$Properties + * @deprecated Use CMsgGCQuestObjective_PointsChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestObjective_PointsChange. + * @typedef {CMsgGCQuestObjective_PointsChange.$Properties} CMsgGCQuestObjective_PointsChange.$Shape */ /** * Constructs a new CMsgGCQuestObjective_PointsChange. * @exports CMsgGCQuestObjective_PointsChange * @classdesc Represents a CMsgGCQuestObjective_PointsChange. - * @implements ICMsgGCQuestObjective_PointsChange * @constructor - * @param {ICMsgGCQuestObjective_PointsChange=} [properties] Properties to set + * @param {CMsgGCQuestObjective_PointsChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestObjective_PointsChange(properties) { + var CMsgGCQuestObjective_PointsChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestObjective_PointsChange quest_id. @@ -5786,7 +7576,7 @@ * @memberof CMsgGCQuestObjective_PointsChange * @instance */ - CMsgGCQuestObjective_PointsChange.prototype.owner_steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCQuestObjective_PointsChange.prototype.owner_steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCQuestObjective_PointsChange update_base_points. @@ -5825,10 +7615,14 @@ * @function create * @memberof CMsgGCQuestObjective_PointsChange * @static - * @param {ICMsgGCQuestObjective_PointsChange=} [properties] Properties to set + * @param {CMsgGCQuestObjective_PointsChange.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestObjective_PointsChange} CMsgGCQuestObjective_PointsChange instance + * @type {{ + * (properties: CMsgGCQuestObjective_PointsChange.$Shape): CMsgGCQuestObjective_PointsChange & CMsgGCQuestObjective_PointsChange.$Shape; + * (properties?: CMsgGCQuestObjective_PointsChange.$Properties): CMsgGCQuestObjective_PointsChange; + * }} */ - CMsgGCQuestObjective_PointsChange.create = function create(properties) { + CMsgGCQuestObjective_PointsChange.create = function(properties) { return new CMsgGCQuestObjective_PointsChange(properties); }; @@ -5837,25 +7631,32 @@ * @function encode * @memberof CMsgGCQuestObjective_PointsChange * @static - * @param {ICMsgGCQuestObjective_PointsChange} message CMsgGCQuestObjective_PointsChange message or plain object to encode + * @param {CMsgGCQuestObjective_PointsChange.$Properties} message CMsgGCQuestObjective_PointsChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestObjective_PointsChange.encode = function encode(message, writer) { + CMsgGCQuestObjective_PointsChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.quest_id != null && Object.hasOwnProperty.call(message, "quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.quest_id); - if (message.owner_steamid != null && Object.hasOwnProperty.call(message, "owner_steamid")) + if (message.owner_steamid != null && $Object.hasOwnProperty.call(message, "owner_steamid")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.owner_steamid); - if (message.update_base_points != null && Object.hasOwnProperty.call(message, "update_base_points")) + if (message.update_base_points != null && $Object.hasOwnProperty.call(message, "update_base_points")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.update_base_points); - if (message.points_0 != null && Object.hasOwnProperty.call(message, "points_0")) + if (message.points_0 != null && $Object.hasOwnProperty.call(message, "points_0")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.points_0); - if (message.points_1 != null && Object.hasOwnProperty.call(message, "points_1")) + if (message.points_1 != null && $Object.hasOwnProperty.call(message, "points_1")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.points_1); - if (message.points_2 != null && Object.hasOwnProperty.call(message, "points_2")) + if (message.points_2 != null && $Object.hasOwnProperty.call(message, "points_2")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.points_2); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5864,12 +7665,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestObjective_PointsChange * @static - * @param {ICMsgGCQuestObjective_PointsChange} message CMsgGCQuestObjective_PointsChange message or plain object to encode + * @param {CMsgGCQuestObjective_PointsChange.$Properties} message CMsgGCQuestObjective_PointsChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestObjective_PointsChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestObjective_PointsChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5879,42 +7680,74 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestObjective_PointsChange} CMsgGCQuestObjective_PointsChange + * @returns {CMsgGCQuestObjective_PointsChange & CMsgGCQuestObjective_PointsChange.$Shape} CMsgGCQuestObjective_PointsChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestObjective_PointsChange.decode = function decode(reader, length) { + CMsgGCQuestObjective_PointsChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestObjective_PointsChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestObjective_PointsChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quest_id = reader.uint64(); - break; - case 4: - message.owner_steamid = reader.fixed64(); - break; - case 5: - message.update_base_points = reader.bool(); - break; - case 6: - message.points_0 = reader.uint32(); - break; - case 7: - message.points_1 = reader.uint32(); - break; - case 8: - message.points_2 = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } - } - return message; - }; + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.quest_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.owner_steamid = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.update_base_points = reader.bool(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.points_0 = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.points_1 = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.points_2 = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; /** * Decodes a CMsgGCQuestObjective_PointsChange message from the specified reader or buffer, length delimited. @@ -5922,11 +7755,11 @@ * @memberof CMsgGCQuestObjective_PointsChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestObjective_PointsChange} CMsgGCQuestObjective_PointsChange + * @returns {CMsgGCQuestObjective_PointsChange & CMsgGCQuestObjective_PointsChange.$Shape} CMsgGCQuestObjective_PointsChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestObjective_PointsChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestObjective_PointsChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5940,25 +7773,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestObjective_PointsChange.verify = function verify(message) { + CMsgGCQuestObjective_PointsChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) if (!$util.isInteger(message.quest_id) && !(message.quest_id && $util.isInteger(message.quest_id.low) && $util.isInteger(message.quest_id.high))) return "quest_id: integer|Long expected"; - if (message.owner_steamid != null && message.hasOwnProperty("owner_steamid")) + if (message.owner_steamid != null && $Object.hasOwnProperty.call(message, "owner_steamid")) if (!$util.isInteger(message.owner_steamid) && !(message.owner_steamid && $util.isInteger(message.owner_steamid.low) && $util.isInteger(message.owner_steamid.high))) return "owner_steamid: integer|Long expected"; - if (message.update_base_points != null && message.hasOwnProperty("update_base_points")) + if (message.update_base_points != null && $Object.hasOwnProperty.call(message, "update_base_points")) if (typeof message.update_base_points !== "boolean") return "update_base_points: boolean expected"; - if (message.points_0 != null && message.hasOwnProperty("points_0")) + if (message.points_0 != null && $Object.hasOwnProperty.call(message, "points_0")) if (!$util.isInteger(message.points_0)) return "points_0: integer expected"; - if (message.points_1 != null && message.hasOwnProperty("points_1")) + if (message.points_1 != null && $Object.hasOwnProperty.call(message, "points_1")) if (!$util.isInteger(message.points_1)) return "points_1: integer expected"; - if (message.points_2 != null && message.hasOwnProperty("points_2")) + if (message.points_2 != null && $Object.hasOwnProperty.call(message, "points_2")) if (!$util.isInteger(message.points_2)) return "points_2: integer expected"; return null; @@ -5972,30 +7809,36 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestObjective_PointsChange} CMsgGCQuestObjective_PointsChange */ - CMsgGCQuestObjective_PointsChange.fromObject = function fromObject(object) { + CMsgGCQuestObjective_PointsChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestObjective_PointsChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestObjective_PointsChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestObjective_PointsChange(); if (object.quest_id != null) if ($util.Long) - (message.quest_id = $util.Long.fromValue(object.quest_id)).unsigned = true; + message.quest_id = $util.Long.fromValue(object.quest_id, true); else if (typeof object.quest_id === "string") - message.quest_id = parseInt(object.quest_id, 10); + message.quest_id = $parseInt(object.quest_id, 10); else if (typeof object.quest_id === "number") message.quest_id = object.quest_id; else if (typeof object.quest_id === "object") message.quest_id = new $util.LongBits(object.quest_id.low >>> 0, object.quest_id.high >>> 0).toNumber(true); if (object.owner_steamid != null) if ($util.Long) - (message.owner_steamid = $util.Long.fromValue(object.owner_steamid)).unsigned = false; + message.owner_steamid = $util.Long.fromValue(object.owner_steamid, true); else if (typeof object.owner_steamid === "string") - message.owner_steamid = parseInt(object.owner_steamid, 10); + message.owner_steamid = $parseInt(object.owner_steamid, 10); else if (typeof object.owner_steamid === "number") message.owner_steamid = object.owner_steamid; else if (typeof object.owner_steamid === "object") - message.owner_steamid = new $util.LongBits(object.owner_steamid.low >>> 0, object.owner_steamid.high >>> 0).toNumber(); + message.owner_steamid = new $util.LongBits(object.owner_steamid.low >>> 0, object.owner_steamid.high >>> 0).toNumber(true); if (object.update_base_points != null) - message.update_base_points = Boolean(object.update_base_points); + message.update_base_points = $Boolean(object.update_base_points); if (object.points_0 != null) message.points_0 = object.points_0 >>> 0; if (object.points_1 != null) @@ -6014,43 +7857,51 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestObjective_PointsChange.toObject = function toObject(message, options) { + CMsgGCQuestObjective_PointsChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.quest_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.quest_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.quest_id = options.longs === String ? "0" : 0; + object.quest_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.owner_steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.owner_steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.owner_steamid = options.longs === String ? "0" : 0; + object.owner_steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.update_base_points = false; object.points_0 = 0; object.points_1 = 0; object.points_2 = 0; } - if (message.quest_id != null && message.hasOwnProperty("quest_id")) - if (typeof message.quest_id === "number") - object.quest_id = options.longs === String ? String(message.quest_id) : message.quest_id; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.quest_id = typeof message.quest_id === "number" ? $BigInt(message.quest_id) : $util.Long.fromBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0, true).toBigInt(); + else if (typeof message.quest_id === "number") + object.quest_id = options.longs === $String ? $String(message.quest_id) : message.quest_id; else - object.quest_id = options.longs === String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; - if (message.owner_steamid != null && message.hasOwnProperty("owner_steamid")) - if (typeof message.owner_steamid === "number") - object.owner_steamid = options.longs === String ? String(message.owner_steamid) : message.owner_steamid; + object.quest_id = options.longs === $String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === $Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; + if (message.owner_steamid != null && $Object.hasOwnProperty.call(message, "owner_steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.owner_steamid = typeof message.owner_steamid === "number" ? $BigInt(message.owner_steamid) : $util.Long.fromBits(message.owner_steamid.low >>> 0, message.owner_steamid.high >>> 0, true).toBigInt(); + else if (typeof message.owner_steamid === "number") + object.owner_steamid = options.longs === $String ? $String(message.owner_steamid) : message.owner_steamid; else - object.owner_steamid = options.longs === String ? $util.Long.prototype.toString.call(message.owner_steamid) : options.longs === Number ? new $util.LongBits(message.owner_steamid.low >>> 0, message.owner_steamid.high >>> 0).toNumber() : message.owner_steamid; - if (message.update_base_points != null && message.hasOwnProperty("update_base_points")) + object.owner_steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.owner_steamid) : options.longs === $Number ? new $util.LongBits(message.owner_steamid.low >>> 0, message.owner_steamid.high >>> 0).toNumber(true) : message.owner_steamid; + if (message.update_base_points != null && $Object.hasOwnProperty.call(message, "update_base_points")) object.update_base_points = message.update_base_points; - if (message.points_0 != null && message.hasOwnProperty("points_0")) + if (message.points_0 != null && $Object.hasOwnProperty.call(message, "points_0")) object.points_0 = message.points_0; - if (message.points_1 != null && message.hasOwnProperty("points_1")) + if (message.points_1 != null && $Object.hasOwnProperty.call(message, "points_1")) object.points_1 = message.points_1; - if (message.points_2 != null && message.hasOwnProperty("points_2")) + if (message.points_2 != null && $Object.hasOwnProperty.call(message, "points_2")) object.points_2 = message.points_2; return object; }; @@ -6062,8 +7913,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestObjective_PointsChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestObjective_PointsChange.prototype.toJSON = function() { + return CMsgGCQuestObjective_PointsChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestObjective_PointsChange + * @function getTypeUrl + * @memberof CMsgGCQuestObjective_PointsChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestObjective_PointsChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestObjective_PointsChange"; }; return CMsgGCQuestObjective_PointsChange; @@ -6071,27 +7936,40 @@ $root.CMsgGCQuestComplete_Request = (function() { + /** + * Properties of a CMsgGCQuestComplete_Request. + * @typedef {Object} CMsgGCQuestComplete_Request.$Properties + * @property {number|Long|null} [quest_id] CMsgGCQuestComplete_Request quest_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCQuestComplete_Request. * @exports ICMsgGCQuestComplete_Request * @interface ICMsgGCQuestComplete_Request - * @property {number|Long|null} [quest_id] CMsgGCQuestComplete_Request quest_id + * @augments CMsgGCQuestComplete_Request.$Properties + * @deprecated Use CMsgGCQuestComplete_Request.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestComplete_Request. + * @typedef {CMsgGCQuestComplete_Request.$Properties} CMsgGCQuestComplete_Request.$Shape */ /** * Constructs a new CMsgGCQuestComplete_Request. * @exports CMsgGCQuestComplete_Request * @classdesc Represents a CMsgGCQuestComplete_Request. - * @implements ICMsgGCQuestComplete_Request * @constructor - * @param {ICMsgGCQuestComplete_Request=} [properties] Properties to set + * @param {CMsgGCQuestComplete_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestComplete_Request(properties) { + var CMsgGCQuestComplete_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestComplete_Request quest_id. @@ -6106,10 +7984,14 @@ * @function create * @memberof CMsgGCQuestComplete_Request * @static - * @param {ICMsgGCQuestComplete_Request=} [properties] Properties to set + * @param {CMsgGCQuestComplete_Request.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestComplete_Request} CMsgGCQuestComplete_Request instance + * @type {{ + * (properties: CMsgGCQuestComplete_Request.$Shape): CMsgGCQuestComplete_Request & CMsgGCQuestComplete_Request.$Shape; + * (properties?: CMsgGCQuestComplete_Request.$Properties): CMsgGCQuestComplete_Request; + * }} */ - CMsgGCQuestComplete_Request.create = function create(properties) { + CMsgGCQuestComplete_Request.create = function(properties) { return new CMsgGCQuestComplete_Request(properties); }; @@ -6118,15 +8000,22 @@ * @function encode * @memberof CMsgGCQuestComplete_Request * @static - * @param {ICMsgGCQuestComplete_Request} message CMsgGCQuestComplete_Request message or plain object to encode + * @param {CMsgGCQuestComplete_Request.$Properties} message CMsgGCQuestComplete_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestComplete_Request.encode = function encode(message, writer) { + CMsgGCQuestComplete_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.quest_id != null && Object.hasOwnProperty.call(message, "quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.quest_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6135,12 +8024,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestComplete_Request * @static - * @param {ICMsgGCQuestComplete_Request} message CMsgGCQuestComplete_Request message or plain object to encode + * @param {CMsgGCQuestComplete_Request.$Properties} message CMsgGCQuestComplete_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestComplete_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestComplete_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6150,25 +8039,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestComplete_Request} CMsgGCQuestComplete_Request + * @returns {CMsgGCQuestComplete_Request & CMsgGCQuestComplete_Request.$Shape} CMsgGCQuestComplete_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestComplete_Request.decode = function decode(reader, length) { + CMsgGCQuestComplete_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestComplete_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestComplete_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quest_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.quest_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6178,11 +8084,11 @@ * @memberof CMsgGCQuestComplete_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestComplete_Request} CMsgGCQuestComplete_Request + * @returns {CMsgGCQuestComplete_Request & CMsgGCQuestComplete_Request.$Shape} CMsgGCQuestComplete_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestComplete_Request.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestComplete_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6196,10 +8102,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestComplete_Request.verify = function verify(message) { + CMsgGCQuestComplete_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) if (!$util.isInteger(message.quest_id) && !(message.quest_id && $util.isInteger(message.quest_id.low) && $util.isInteger(message.quest_id.high))) return "quest_id: integer|Long expected"; return null; @@ -6213,15 +8123,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestComplete_Request} CMsgGCQuestComplete_Request */ - CMsgGCQuestComplete_Request.fromObject = function fromObject(object) { + CMsgGCQuestComplete_Request.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestComplete_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestComplete_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestComplete_Request(); if (object.quest_id != null) if ($util.Long) - (message.quest_id = $util.Long.fromValue(object.quest_id)).unsigned = true; + message.quest_id = $util.Long.fromValue(object.quest_id, true); else if (typeof object.quest_id === "string") - message.quest_id = parseInt(object.quest_id, 10); + message.quest_id = $parseInt(object.quest_id, 10); else if (typeof object.quest_id === "number") message.quest_id = object.quest_id; else if (typeof object.quest_id === "object") @@ -6238,21 +8154,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestComplete_Request.toObject = function toObject(message, options) { + CMsgGCQuestComplete_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.quest_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.quest_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.quest_id = options.longs === String ? "0" : 0; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) - if (typeof message.quest_id === "number") - object.quest_id = options.longs === String ? String(message.quest_id) : message.quest_id; + object.quest_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.quest_id = typeof message.quest_id === "number" ? $BigInt(message.quest_id) : $util.Long.fromBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0, true).toBigInt(); + else if (typeof message.quest_id === "number") + object.quest_id = options.longs === $String ? $String(message.quest_id) : message.quest_id; else - object.quest_id = options.longs === String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; + object.quest_id = options.longs === $String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === $Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; return object; }; @@ -6263,8 +8185,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestComplete_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestComplete_Request.prototype.toJSON = function() { + return CMsgGCQuestComplete_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestComplete_Request + * @function getTypeUrl + * @memberof CMsgGCQuestComplete_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestComplete_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestComplete_Request"; }; return CMsgGCQuestComplete_Request; @@ -6272,36 +8208,53 @@ $root.CMsgGCQuestCompleted = (function() { + /** + * Properties of a CMsgGCQuestCompleted. + * @typedef {Object} CMsgGCQuestCompleted.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCQuestCompleted. * @exports ICMsgGCQuestCompleted * @interface ICMsgGCQuestCompleted + * @augments CMsgGCQuestCompleted.$Properties + * @deprecated Use CMsgGCQuestCompleted.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestCompleted. + * @typedef {CMsgGCQuestCompleted.$Properties} CMsgGCQuestCompleted.$Shape */ /** * Constructs a new CMsgGCQuestCompleted. * @exports CMsgGCQuestCompleted * @classdesc Represents a CMsgGCQuestCompleted. - * @implements ICMsgGCQuestCompleted * @constructor - * @param {ICMsgGCQuestCompleted=} [properties] Properties to set + * @param {CMsgGCQuestCompleted.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestCompleted(properties) { + var CMsgGCQuestCompleted = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgGCQuestCompleted instance using the specified properties. * @function create * @memberof CMsgGCQuestCompleted * @static - * @param {ICMsgGCQuestCompleted=} [properties] Properties to set + * @param {CMsgGCQuestCompleted.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestCompleted} CMsgGCQuestCompleted instance + * @type {{ + * (properties: CMsgGCQuestCompleted.$Shape): CMsgGCQuestCompleted & CMsgGCQuestCompleted.$Shape; + * (properties?: CMsgGCQuestCompleted.$Properties): CMsgGCQuestCompleted; + * }} */ - CMsgGCQuestCompleted.create = function create(properties) { + CMsgGCQuestCompleted.create = function(properties) { return new CMsgGCQuestCompleted(properties); }; @@ -6310,13 +8263,20 @@ * @function encode * @memberof CMsgGCQuestCompleted * @static - * @param {ICMsgGCQuestCompleted} message CMsgGCQuestCompleted message or plain object to encode + * @param {CMsgGCQuestCompleted.$Properties} message CMsgGCQuestCompleted message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestCompleted.encode = function encode(message, writer) { + CMsgGCQuestCompleted.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6325,12 +8285,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestCompleted * @static - * @param {ICMsgGCQuestCompleted} message CMsgGCQuestCompleted message or plain object to encode + * @param {CMsgGCQuestCompleted.$Properties} message CMsgGCQuestCompleted message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestCompleted.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestCompleted.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6340,22 +8300,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestCompleted} CMsgGCQuestCompleted + * @returns {CMsgGCQuestCompleted & CMsgGCQuestCompleted.$Shape} CMsgGCQuestCompleted * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestCompleted.decode = function decode(reader, length) { + CMsgGCQuestCompleted.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestCompleted(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestCompleted(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6365,11 +8336,11 @@ * @memberof CMsgGCQuestCompleted * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestCompleted} CMsgGCQuestCompleted + * @returns {CMsgGCQuestCompleted & CMsgGCQuestCompleted.$Shape} CMsgGCQuestCompleted * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestCompleted.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestCompleted.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6383,9 +8354,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestCompleted.verify = function verify(message) { + CMsgGCQuestCompleted.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -6397,9 +8372,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestCompleted} CMsgGCQuestCompleted */ - CMsgGCQuestCompleted.fromObject = function fromObject(object) { + CMsgGCQuestCompleted.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestCompleted) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestCompleted: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgGCQuestCompleted(); }; @@ -6412,7 +8393,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestCompleted.toObject = function toObject() { + CMsgGCQuestCompleted.toObject = function () { return {}; }; @@ -6423,8 +8404,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestCompleted.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestCompleted.prototype.toJSON = function() { + return CMsgGCQuestCompleted.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestCompleted + * @function getTypeUrl + * @memberof CMsgGCQuestCompleted + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestCompleted.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestCompleted"; }; return CMsgGCQuestCompleted; @@ -6432,27 +8427,40 @@ $root.CMsgGCQuestObjective_RequestLoanerItems = (function() { + /** + * Properties of a CMsgGCQuestObjective_RequestLoanerItems. + * @typedef {Object} CMsgGCQuestObjective_RequestLoanerItems.$Properties + * @property {number|Long|null} [quest_id] CMsgGCQuestObjective_RequestLoanerItems quest_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCQuestObjective_RequestLoanerItems. * @exports ICMsgGCQuestObjective_RequestLoanerItems * @interface ICMsgGCQuestObjective_RequestLoanerItems - * @property {number|Long|null} [quest_id] CMsgGCQuestObjective_RequestLoanerItems quest_id + * @augments CMsgGCQuestObjective_RequestLoanerItems.$Properties + * @deprecated Use CMsgGCQuestObjective_RequestLoanerItems.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestObjective_RequestLoanerItems. + * @typedef {CMsgGCQuestObjective_RequestLoanerItems.$Properties} CMsgGCQuestObjective_RequestLoanerItems.$Shape */ /** * Constructs a new CMsgGCQuestObjective_RequestLoanerItems. * @exports CMsgGCQuestObjective_RequestLoanerItems * @classdesc Represents a CMsgGCQuestObjective_RequestLoanerItems. - * @implements ICMsgGCQuestObjective_RequestLoanerItems * @constructor - * @param {ICMsgGCQuestObjective_RequestLoanerItems=} [properties] Properties to set + * @param {CMsgGCQuestObjective_RequestLoanerItems.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestObjective_RequestLoanerItems(properties) { + var CMsgGCQuestObjective_RequestLoanerItems = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestObjective_RequestLoanerItems quest_id. @@ -6467,10 +8475,14 @@ * @function create * @memberof CMsgGCQuestObjective_RequestLoanerItems * @static - * @param {ICMsgGCQuestObjective_RequestLoanerItems=} [properties] Properties to set + * @param {CMsgGCQuestObjective_RequestLoanerItems.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestObjective_RequestLoanerItems} CMsgGCQuestObjective_RequestLoanerItems instance + * @type {{ + * (properties: CMsgGCQuestObjective_RequestLoanerItems.$Shape): CMsgGCQuestObjective_RequestLoanerItems & CMsgGCQuestObjective_RequestLoanerItems.$Shape; + * (properties?: CMsgGCQuestObjective_RequestLoanerItems.$Properties): CMsgGCQuestObjective_RequestLoanerItems; + * }} */ - CMsgGCQuestObjective_RequestLoanerItems.create = function create(properties) { + CMsgGCQuestObjective_RequestLoanerItems.create = function(properties) { return new CMsgGCQuestObjective_RequestLoanerItems(properties); }; @@ -6479,15 +8491,22 @@ * @function encode * @memberof CMsgGCQuestObjective_RequestLoanerItems * @static - * @param {ICMsgGCQuestObjective_RequestLoanerItems} message CMsgGCQuestObjective_RequestLoanerItems message or plain object to encode + * @param {CMsgGCQuestObjective_RequestLoanerItems.$Properties} message CMsgGCQuestObjective_RequestLoanerItems message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestObjective_RequestLoanerItems.encode = function encode(message, writer) { + CMsgGCQuestObjective_RequestLoanerItems.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.quest_id != null && Object.hasOwnProperty.call(message, "quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.quest_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6496,12 +8515,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestObjective_RequestLoanerItems * @static - * @param {ICMsgGCQuestObjective_RequestLoanerItems} message CMsgGCQuestObjective_RequestLoanerItems message or plain object to encode + * @param {CMsgGCQuestObjective_RequestLoanerItems.$Properties} message CMsgGCQuestObjective_RequestLoanerItems message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestObjective_RequestLoanerItems.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestObjective_RequestLoanerItems.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6511,25 +8530,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestObjective_RequestLoanerItems} CMsgGCQuestObjective_RequestLoanerItems + * @returns {CMsgGCQuestObjective_RequestLoanerItems & CMsgGCQuestObjective_RequestLoanerItems.$Shape} CMsgGCQuestObjective_RequestLoanerItems * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestObjective_RequestLoanerItems.decode = function decode(reader, length) { + CMsgGCQuestObjective_RequestLoanerItems.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestObjective_RequestLoanerItems(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestObjective_RequestLoanerItems(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quest_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.quest_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6539,11 +8575,11 @@ * @memberof CMsgGCQuestObjective_RequestLoanerItems * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestObjective_RequestLoanerItems} CMsgGCQuestObjective_RequestLoanerItems + * @returns {CMsgGCQuestObjective_RequestLoanerItems & CMsgGCQuestObjective_RequestLoanerItems.$Shape} CMsgGCQuestObjective_RequestLoanerItems * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestObjective_RequestLoanerItems.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestObjective_RequestLoanerItems.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6557,10 +8593,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestObjective_RequestLoanerItems.verify = function verify(message) { + CMsgGCQuestObjective_RequestLoanerItems.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) if (!$util.isInteger(message.quest_id) && !(message.quest_id && $util.isInteger(message.quest_id.low) && $util.isInteger(message.quest_id.high))) return "quest_id: integer|Long expected"; return null; @@ -6574,15 +8614,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestObjective_RequestLoanerItems} CMsgGCQuestObjective_RequestLoanerItems */ - CMsgGCQuestObjective_RequestLoanerItems.fromObject = function fromObject(object) { + CMsgGCQuestObjective_RequestLoanerItems.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestObjective_RequestLoanerItems) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestObjective_RequestLoanerItems: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestObjective_RequestLoanerItems(); if (object.quest_id != null) if ($util.Long) - (message.quest_id = $util.Long.fromValue(object.quest_id)).unsigned = true; + message.quest_id = $util.Long.fromValue(object.quest_id, true); else if (typeof object.quest_id === "string") - message.quest_id = parseInt(object.quest_id, 10); + message.quest_id = $parseInt(object.quest_id, 10); else if (typeof object.quest_id === "number") message.quest_id = object.quest_id; else if (typeof object.quest_id === "object") @@ -6599,21 +8645,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestObjective_RequestLoanerItems.toObject = function toObject(message, options) { + CMsgGCQuestObjective_RequestLoanerItems.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.quest_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.quest_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.quest_id = options.longs === String ? "0" : 0; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) - if (typeof message.quest_id === "number") - object.quest_id = options.longs === String ? String(message.quest_id) : message.quest_id; + object.quest_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.quest_id = typeof message.quest_id === "number" ? $BigInt(message.quest_id) : $util.Long.fromBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0, true).toBigInt(); + else if (typeof message.quest_id === "number") + object.quest_id = options.longs === $String ? $String(message.quest_id) : message.quest_id; else - object.quest_id = options.longs === String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; + object.quest_id = options.longs === $String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === $Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; return object; }; @@ -6624,8 +8676,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestObjective_RequestLoanerItems.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestObjective_RequestLoanerItems.prototype.toJSON = function() { + return CMsgGCQuestObjective_RequestLoanerItems.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestObjective_RequestLoanerItems + * @function getTypeUrl + * @memberof CMsgGCQuestObjective_RequestLoanerItems + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestObjective_RequestLoanerItems.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestObjective_RequestLoanerItems"; }; return CMsgGCQuestObjective_RequestLoanerItems; @@ -6633,36 +8699,53 @@ $root.CMsgGCQuestObjective_RequestLoanerResponse = (function() { + /** + * Properties of a CMsgGCQuestObjective_RequestLoanerResponse. + * @typedef {Object} CMsgGCQuestObjective_RequestLoanerResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCQuestObjective_RequestLoanerResponse. * @exports ICMsgGCQuestObjective_RequestLoanerResponse * @interface ICMsgGCQuestObjective_RequestLoanerResponse + * @augments CMsgGCQuestObjective_RequestLoanerResponse.$Properties + * @deprecated Use CMsgGCQuestObjective_RequestLoanerResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestObjective_RequestLoanerResponse. + * @typedef {CMsgGCQuestObjective_RequestLoanerResponse.$Properties} CMsgGCQuestObjective_RequestLoanerResponse.$Shape */ /** * Constructs a new CMsgGCQuestObjective_RequestLoanerResponse. * @exports CMsgGCQuestObjective_RequestLoanerResponse * @classdesc Represents a CMsgGCQuestObjective_RequestLoanerResponse. - * @implements ICMsgGCQuestObjective_RequestLoanerResponse * @constructor - * @param {ICMsgGCQuestObjective_RequestLoanerResponse=} [properties] Properties to set + * @param {CMsgGCQuestObjective_RequestLoanerResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestObjective_RequestLoanerResponse(properties) { + var CMsgGCQuestObjective_RequestLoanerResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgGCQuestObjective_RequestLoanerResponse instance using the specified properties. * @function create * @memberof CMsgGCQuestObjective_RequestLoanerResponse * @static - * @param {ICMsgGCQuestObjective_RequestLoanerResponse=} [properties] Properties to set + * @param {CMsgGCQuestObjective_RequestLoanerResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestObjective_RequestLoanerResponse} CMsgGCQuestObjective_RequestLoanerResponse instance + * @type {{ + * (properties: CMsgGCQuestObjective_RequestLoanerResponse.$Shape): CMsgGCQuestObjective_RequestLoanerResponse & CMsgGCQuestObjective_RequestLoanerResponse.$Shape; + * (properties?: CMsgGCQuestObjective_RequestLoanerResponse.$Properties): CMsgGCQuestObjective_RequestLoanerResponse; + * }} */ - CMsgGCQuestObjective_RequestLoanerResponse.create = function create(properties) { + CMsgGCQuestObjective_RequestLoanerResponse.create = function(properties) { return new CMsgGCQuestObjective_RequestLoanerResponse(properties); }; @@ -6671,13 +8754,20 @@ * @function encode * @memberof CMsgGCQuestObjective_RequestLoanerResponse * @static - * @param {ICMsgGCQuestObjective_RequestLoanerResponse} message CMsgGCQuestObjective_RequestLoanerResponse message or plain object to encode + * @param {CMsgGCQuestObjective_RequestLoanerResponse.$Properties} message CMsgGCQuestObjective_RequestLoanerResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestObjective_RequestLoanerResponse.encode = function encode(message, writer) { + CMsgGCQuestObjective_RequestLoanerResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6686,12 +8776,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestObjective_RequestLoanerResponse * @static - * @param {ICMsgGCQuestObjective_RequestLoanerResponse} message CMsgGCQuestObjective_RequestLoanerResponse message or plain object to encode + * @param {CMsgGCQuestObjective_RequestLoanerResponse.$Properties} message CMsgGCQuestObjective_RequestLoanerResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestObjective_RequestLoanerResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestObjective_RequestLoanerResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6701,22 +8791,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestObjective_RequestLoanerResponse} CMsgGCQuestObjective_RequestLoanerResponse + * @returns {CMsgGCQuestObjective_RequestLoanerResponse & CMsgGCQuestObjective_RequestLoanerResponse.$Shape} CMsgGCQuestObjective_RequestLoanerResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestObjective_RequestLoanerResponse.decode = function decode(reader, length) { + CMsgGCQuestObjective_RequestLoanerResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestObjective_RequestLoanerResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestObjective_RequestLoanerResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6726,11 +8827,11 @@ * @memberof CMsgGCQuestObjective_RequestLoanerResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestObjective_RequestLoanerResponse} CMsgGCQuestObjective_RequestLoanerResponse + * @returns {CMsgGCQuestObjective_RequestLoanerResponse & CMsgGCQuestObjective_RequestLoanerResponse.$Shape} CMsgGCQuestObjective_RequestLoanerResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestObjective_RequestLoanerResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestObjective_RequestLoanerResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6744,9 +8845,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestObjective_RequestLoanerResponse.verify = function verify(message) { + CMsgGCQuestObjective_RequestLoanerResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -6758,9 +8863,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestObjective_RequestLoanerResponse} CMsgGCQuestObjective_RequestLoanerResponse */ - CMsgGCQuestObjective_RequestLoanerResponse.fromObject = function fromObject(object) { + CMsgGCQuestObjective_RequestLoanerResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestObjective_RequestLoanerResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestObjective_RequestLoanerResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgGCQuestObjective_RequestLoanerResponse(); }; @@ -6773,7 +8884,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestObjective_RequestLoanerResponse.toObject = function toObject() { + CMsgGCQuestObjective_RequestLoanerResponse.toObject = function () { return {}; }; @@ -6784,8 +8895,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestObjective_RequestLoanerResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestObjective_RequestLoanerResponse.prototype.toJSON = function() { + return CMsgGCQuestObjective_RequestLoanerResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestObjective_RequestLoanerResponse + * @function getTypeUrl + * @memberof CMsgGCQuestObjective_RequestLoanerResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestObjective_RequestLoanerResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestObjective_RequestLoanerResponse"; }; return CMsgGCQuestObjective_RequestLoanerResponse; @@ -6793,28 +8918,41 @@ $root.CMsgCraftCollectionUpgrade = (function() { + /** + * Properties of a CMsgCraftCollectionUpgrade. + * @typedef {Object} CMsgCraftCollectionUpgrade.$Properties + * @property {Array.|null} [item_id] CMsgCraftCollectionUpgrade item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgCraftCollectionUpgrade. * @exports ICMsgCraftCollectionUpgrade * @interface ICMsgCraftCollectionUpgrade - * @property {Array.|null} [item_id] CMsgCraftCollectionUpgrade item_id + * @augments CMsgCraftCollectionUpgrade.$Properties + * @deprecated Use CMsgCraftCollectionUpgrade.$Properties instead. + */ + + /** + * Shape of a CMsgCraftCollectionUpgrade. + * @typedef {CMsgCraftCollectionUpgrade.$Properties} CMsgCraftCollectionUpgrade.$Shape */ /** * Constructs a new CMsgCraftCollectionUpgrade. * @exports CMsgCraftCollectionUpgrade * @classdesc Represents a CMsgCraftCollectionUpgrade. - * @implements ICMsgCraftCollectionUpgrade * @constructor - * @param {ICMsgCraftCollectionUpgrade=} [properties] Properties to set + * @param {CMsgCraftCollectionUpgrade.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgCraftCollectionUpgrade(properties) { + var CMsgCraftCollectionUpgrade = function (properties) { this.item_id = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgCraftCollectionUpgrade item_id. @@ -6829,10 +8967,14 @@ * @function create * @memberof CMsgCraftCollectionUpgrade * @static - * @param {ICMsgCraftCollectionUpgrade=} [properties] Properties to set + * @param {CMsgCraftCollectionUpgrade.$Properties=} [properties] Properties to set * @returns {CMsgCraftCollectionUpgrade} CMsgCraftCollectionUpgrade instance + * @type {{ + * (properties: CMsgCraftCollectionUpgrade.$Shape): CMsgCraftCollectionUpgrade & CMsgCraftCollectionUpgrade.$Shape; + * (properties?: CMsgCraftCollectionUpgrade.$Properties): CMsgCraftCollectionUpgrade; + * }} */ - CMsgCraftCollectionUpgrade.create = function create(properties) { + CMsgCraftCollectionUpgrade.create = function(properties) { return new CMsgCraftCollectionUpgrade(properties); }; @@ -6841,16 +8983,23 @@ * @function encode * @memberof CMsgCraftCollectionUpgrade * @static - * @param {ICMsgCraftCollectionUpgrade} message CMsgCraftCollectionUpgrade message or plain object to encode + * @param {CMsgCraftCollectionUpgrade.$Properties} message CMsgCraftCollectionUpgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgCraftCollectionUpgrade.encode = function encode(message, writer) { + CMsgCraftCollectionUpgrade.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.item_id != null && message.item_id.length) for (var i = 0; i < message.item_id.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6859,12 +9008,12 @@ * @function encodeDelimited * @memberof CMsgCraftCollectionUpgrade * @static - * @param {ICMsgCraftCollectionUpgrade} message CMsgCraftCollectionUpgrade message or plain object to encode + * @param {CMsgCraftCollectionUpgrade.$Properties} message CMsgCraftCollectionUpgrade message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgCraftCollectionUpgrade.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgCraftCollectionUpgrade.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6874,32 +9023,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgCraftCollectionUpgrade} CMsgCraftCollectionUpgrade + * @returns {CMsgCraftCollectionUpgrade & CMsgCraftCollectionUpgrade.$Shape} CMsgCraftCollectionUpgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgCraftCollectionUpgrade.decode = function decode(reader, length) { + CMsgCraftCollectionUpgrade.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgCraftCollectionUpgrade(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgCraftCollectionUpgrade(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.item_id && message.item_id.length)) - message.item_id = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.item_id.push(reader.uint64()); - } else - message.item_id.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.item_id && message.item_id.length)) + message.item_id = []; + reader.uint64s(message.item_id); + continue; + } + if (wireType !== 0) + break; + if (!(message.item_id && message.item_id.length)) + message.item_id = []; + message.item_id.push(reader.uint64()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6909,11 +9076,11 @@ * @memberof CMsgCraftCollectionUpgrade * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgCraftCollectionUpgrade} CMsgCraftCollectionUpgrade + * @returns {CMsgCraftCollectionUpgrade & CMsgCraftCollectionUpgrade.$Shape} CMsgCraftCollectionUpgrade * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgCraftCollectionUpgrade.decodeDelimited = function decodeDelimited(reader) { + CMsgCraftCollectionUpgrade.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6927,11 +9094,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgCraftCollectionUpgrade.verify = function verify(message) { + CMsgCraftCollectionUpgrade.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) { - if (!Array.isArray(message.item_id)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) { + if (!$Array.isArray(message.item_id)) return "item_id: array expected"; for (var i = 0; i < message.item_id.length; ++i) if (!$util.isInteger(message.item_id[i]) && !(message.item_id[i] && $util.isInteger(message.item_id[i].low) && $util.isInteger(message.item_id[i].high))) @@ -6948,19 +9119,25 @@ * @param {Object.} object Plain object * @returns {CMsgCraftCollectionUpgrade} CMsgCraftCollectionUpgrade */ - CMsgCraftCollectionUpgrade.fromObject = function fromObject(object) { + CMsgCraftCollectionUpgrade.fromObject = function (object, _depth) { if (object instanceof $root.CMsgCraftCollectionUpgrade) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgCraftCollectionUpgrade: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgCraftCollectionUpgrade(); if (object.item_id) { - if (!Array.isArray(object.item_id)) - throw TypeError(".CMsgCraftCollectionUpgrade.item_id: array expected"); - message.item_id = []; + if (!$Array.isArray(object.item_id)) + throw $TypeError(".CMsgCraftCollectionUpgrade.item_id: array expected"); + message.item_id = $Array(object.item_id.length); for (var i = 0; i < object.item_id.length; ++i) if ($util.Long) - (message.item_id[i] = $util.Long.fromValue(object.item_id[i])).unsigned = true; + message.item_id[i] = $util.Long.fromValue(object.item_id[i], true); else if (typeof object.item_id[i] === "string") - message.item_id[i] = parseInt(object.item_id[i], 10); + message.item_id[i] = $parseInt(object.item_id[i], 10); else if (typeof object.item_id[i] === "number") message.item_id[i] = object.item_id[i]; else if (typeof object.item_id[i] === "object") @@ -6978,19 +9155,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgCraftCollectionUpgrade.toObject = function toObject(message, options) { + CMsgCraftCollectionUpgrade.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.item_id = []; if (message.item_id && message.item_id.length) { - object.item_id = []; + object.item_id = $Array(message.item_id.length); for (var j = 0; j < message.item_id.length; ++j) - if (typeof message.item_id[j] === "number") - object.item_id[j] = options.longs === String ? String(message.item_id[j]) : message.item_id[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id[j] = typeof message.item_id[j] === "number" ? $BigInt(message.item_id[j]) : $util.Long.fromBits(message.item_id[j].low >>> 0, message.item_id[j].high >>> 0, true).toBigInt(); + else if (typeof message.item_id[j] === "number") + object.item_id[j] = options.longs === $String ? $String(message.item_id[j]) : message.item_id[j]; else - object.item_id[j] = options.longs === String ? $util.Long.prototype.toString.call(message.item_id[j]) : options.longs === Number ? new $util.LongBits(message.item_id[j].low >>> 0, message.item_id[j].high >>> 0).toNumber(true) : message.item_id[j]; + object.item_id[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id[j]) : options.longs === $Number ? new $util.LongBits(message.item_id[j].low >>> 0, message.item_id[j].high >>> 0).toNumber(true) : message.item_id[j]; } return object; }; @@ -7002,8 +9185,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgCraftCollectionUpgrade.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgCraftCollectionUpgrade.prototype.toJSON = function() { + return CMsgCraftCollectionUpgrade.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgCraftCollectionUpgrade + * @function getTypeUrl + * @memberof CMsgCraftCollectionUpgrade + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgCraftCollectionUpgrade.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgCraftCollectionUpgrade"; }; return CMsgCraftCollectionUpgrade; @@ -7013,27 +9210,40 @@ /** * Properties of a CMsgCraftHalloweenOffering. - * @exports ICMsgCraftHalloweenOffering - * @interface ICMsgCraftHalloweenOffering + * @typedef {Object} CMsgCraftHalloweenOffering.$Properties * @property {number|Long|null} [tool_id] CMsgCraftHalloweenOffering tool_id * @property {Array.|null} [item_id] CMsgCraftHalloweenOffering item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgCraftHalloweenOffering. + * @exports ICMsgCraftHalloweenOffering + * @interface ICMsgCraftHalloweenOffering + * @augments CMsgCraftHalloweenOffering.$Properties + * @deprecated Use CMsgCraftHalloweenOffering.$Properties instead. + */ + + /** + * Shape of a CMsgCraftHalloweenOffering. + * @typedef {CMsgCraftHalloweenOffering.$Properties} CMsgCraftHalloweenOffering.$Shape */ /** * Constructs a new CMsgCraftHalloweenOffering. * @exports CMsgCraftHalloweenOffering * @classdesc Represents a CMsgCraftHalloweenOffering. - * @implements ICMsgCraftHalloweenOffering * @constructor - * @param {ICMsgCraftHalloweenOffering=} [properties] Properties to set + * @param {CMsgCraftHalloweenOffering.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgCraftHalloweenOffering(properties) { + var CMsgCraftHalloweenOffering = function (properties) { this.item_id = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgCraftHalloweenOffering tool_id. @@ -7056,10 +9266,14 @@ * @function create * @memberof CMsgCraftHalloweenOffering * @static - * @param {ICMsgCraftHalloweenOffering=} [properties] Properties to set + * @param {CMsgCraftHalloweenOffering.$Properties=} [properties] Properties to set * @returns {CMsgCraftHalloweenOffering} CMsgCraftHalloweenOffering instance + * @type {{ + * (properties: CMsgCraftHalloweenOffering.$Shape): CMsgCraftHalloweenOffering & CMsgCraftHalloweenOffering.$Shape; + * (properties?: CMsgCraftHalloweenOffering.$Properties): CMsgCraftHalloweenOffering; + * }} */ - CMsgCraftHalloweenOffering.create = function create(properties) { + CMsgCraftHalloweenOffering.create = function(properties) { return new CMsgCraftHalloweenOffering(properties); }; @@ -7068,18 +9282,25 @@ * @function encode * @memberof CMsgCraftHalloweenOffering * @static - * @param {ICMsgCraftHalloweenOffering} message CMsgCraftHalloweenOffering message or plain object to encode + * @param {CMsgCraftHalloweenOffering.$Properties} message CMsgCraftHalloweenOffering message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgCraftHalloweenOffering.encode = function encode(message, writer) { + CMsgCraftHalloweenOffering.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.tool_id != null && Object.hasOwnProperty.call(message, "tool_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tool_id != null && $Object.hasOwnProperty.call(message, "tool_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.tool_id); if (message.item_id != null && message.item_id.length) for (var i = 0; i < message.item_id.length; ++i) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_id[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7088,12 +9309,12 @@ * @function encodeDelimited * @memberof CMsgCraftHalloweenOffering * @static - * @param {ICMsgCraftHalloweenOffering} message CMsgCraftHalloweenOffering message or plain object to encode + * @param {CMsgCraftHalloweenOffering.$Properties} message CMsgCraftHalloweenOffering message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgCraftHalloweenOffering.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgCraftHalloweenOffering.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7103,35 +9324,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgCraftHalloweenOffering} CMsgCraftHalloweenOffering + * @returns {CMsgCraftHalloweenOffering & CMsgCraftHalloweenOffering.$Shape} CMsgCraftHalloweenOffering * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgCraftHalloweenOffering.decode = function decode(reader, length) { + CMsgCraftHalloweenOffering.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgCraftHalloweenOffering(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgCraftHalloweenOffering(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tool_id = reader.uint64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.item_id && message.item_id.length)) - message.item_id = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.item_id.push(reader.uint64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.tool_id = reader.uint64(); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.item_id && message.item_id.length)) + message.item_id = []; + reader.uint64s(message.item_id); + continue; + } + if (wireType !== 0) + break; + if (!(message.item_id && message.item_id.length)) + message.item_id = []; message.item_id.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7141,11 +9383,11 @@ * @memberof CMsgCraftHalloweenOffering * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgCraftHalloweenOffering} CMsgCraftHalloweenOffering + * @returns {CMsgCraftHalloweenOffering & CMsgCraftHalloweenOffering.$Shape} CMsgCraftHalloweenOffering * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgCraftHalloweenOffering.decodeDelimited = function decodeDelimited(reader) { + CMsgCraftHalloweenOffering.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7159,14 +9401,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgCraftHalloweenOffering.verify = function verify(message) { + CMsgCraftHalloweenOffering.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tool_id != null && message.hasOwnProperty("tool_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tool_id != null && $Object.hasOwnProperty.call(message, "tool_id")) if (!$util.isInteger(message.tool_id) && !(message.tool_id && $util.isInteger(message.tool_id.low) && $util.isInteger(message.tool_id.high))) return "tool_id: integer|Long expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) { - if (!Array.isArray(message.item_id)) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) { + if (!$Array.isArray(message.item_id)) return "item_id: array expected"; for (var i = 0; i < message.item_id.length; ++i) if (!$util.isInteger(message.item_id[i]) && !(message.item_id[i] && $util.isInteger(message.item_id[i].low) && $util.isInteger(message.item_id[i].high))) @@ -7183,28 +9429,34 @@ * @param {Object.} object Plain object * @returns {CMsgCraftHalloweenOffering} CMsgCraftHalloweenOffering */ - CMsgCraftHalloweenOffering.fromObject = function fromObject(object) { + CMsgCraftHalloweenOffering.fromObject = function (object, _depth) { if (object instanceof $root.CMsgCraftHalloweenOffering) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgCraftHalloweenOffering: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgCraftHalloweenOffering(); if (object.tool_id != null) if ($util.Long) - (message.tool_id = $util.Long.fromValue(object.tool_id)).unsigned = true; + message.tool_id = $util.Long.fromValue(object.tool_id, true); else if (typeof object.tool_id === "string") - message.tool_id = parseInt(object.tool_id, 10); + message.tool_id = $parseInt(object.tool_id, 10); else if (typeof object.tool_id === "number") message.tool_id = object.tool_id; else if (typeof object.tool_id === "object") message.tool_id = new $util.LongBits(object.tool_id.low >>> 0, object.tool_id.high >>> 0).toNumber(true); if (object.item_id) { - if (!Array.isArray(object.item_id)) - throw TypeError(".CMsgCraftHalloweenOffering.item_id: array expected"); - message.item_id = []; + if (!$Array.isArray(object.item_id)) + throw $TypeError(".CMsgCraftHalloweenOffering.item_id: array expected"); + message.item_id = $Array(object.item_id.length); for (var i = 0; i < object.item_id.length; ++i) if ($util.Long) - (message.item_id[i] = $util.Long.fromValue(object.item_id[i])).unsigned = true; + message.item_id[i] = $util.Long.fromValue(object.item_id[i], true); else if (typeof object.item_id[i] === "string") - message.item_id[i] = parseInt(object.item_id[i], 10); + message.item_id[i] = $parseInt(object.item_id[i], 10); else if (typeof object.item_id[i] === "number") message.item_id[i] = object.item_id[i]; else if (typeof object.item_id[i] === "object") @@ -7222,30 +9474,38 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgCraftHalloweenOffering.toObject = function toObject(message, options) { + CMsgCraftHalloweenOffering.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.item_id = []; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.tool_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.tool_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.tool_id = options.longs === String ? "0" : 0; - if (message.tool_id != null && message.hasOwnProperty("tool_id")) - if (typeof message.tool_id === "number") - object.tool_id = options.longs === String ? String(message.tool_id) : message.tool_id; + object.tool_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.tool_id != null && $Object.hasOwnProperty.call(message, "tool_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.tool_id = typeof message.tool_id === "number" ? $BigInt(message.tool_id) : $util.Long.fromBits(message.tool_id.low >>> 0, message.tool_id.high >>> 0, true).toBigInt(); + else if (typeof message.tool_id === "number") + object.tool_id = options.longs === $String ? $String(message.tool_id) : message.tool_id; else - object.tool_id = options.longs === String ? $util.Long.prototype.toString.call(message.tool_id) : options.longs === Number ? new $util.LongBits(message.tool_id.low >>> 0, message.tool_id.high >>> 0).toNumber(true) : message.tool_id; + object.tool_id = options.longs === $String ? $util.Long.prototype.toString.call(message.tool_id) : options.longs === $Number ? new $util.LongBits(message.tool_id.low >>> 0, message.tool_id.high >>> 0).toNumber(true) : message.tool_id; if (message.item_id && message.item_id.length) { - object.item_id = []; + object.item_id = $Array(message.item_id.length); for (var j = 0; j < message.item_id.length; ++j) - if (typeof message.item_id[j] === "number") - object.item_id[j] = options.longs === String ? String(message.item_id[j]) : message.item_id[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id[j] = typeof message.item_id[j] === "number" ? $BigInt(message.item_id[j]) : $util.Long.fromBits(message.item_id[j].low >>> 0, message.item_id[j].high >>> 0, true).toBigInt(); + else if (typeof message.item_id[j] === "number") + object.item_id[j] = options.longs === $String ? $String(message.item_id[j]) : message.item_id[j]; else - object.item_id[j] = options.longs === String ? $util.Long.prototype.toString.call(message.item_id[j]) : options.longs === Number ? new $util.LongBits(message.item_id[j].low >>> 0, message.item_id[j].high >>> 0).toNumber(true) : message.item_id[j]; + object.item_id[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id[j]) : options.longs === $Number ? new $util.LongBits(message.item_id[j].low >>> 0, message.item_id[j].high >>> 0).toNumber(true) : message.item_id[j]; } return object; }; @@ -7257,8 +9517,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgCraftHalloweenOffering.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgCraftHalloweenOffering.prototype.toJSON = function() { + return CMsgCraftHalloweenOffering.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgCraftHalloweenOffering + * @function getTypeUrl + * @memberof CMsgCraftHalloweenOffering + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgCraftHalloweenOffering.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgCraftHalloweenOffering"; }; return CMsgCraftHalloweenOffering; @@ -7268,27 +9542,40 @@ /** * Properties of a CMsgCraftCommonStatClock. - * @exports ICMsgCraftCommonStatClock - * @interface ICMsgCraftCommonStatClock + * @typedef {Object} CMsgCraftCommonStatClock.$Properties * @property {number|Long|null} [tool_id] CMsgCraftCommonStatClock tool_id * @property {Array.|null} [item_id] CMsgCraftCommonStatClock item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgCraftCommonStatClock. + * @exports ICMsgCraftCommonStatClock + * @interface ICMsgCraftCommonStatClock + * @augments CMsgCraftCommonStatClock.$Properties + * @deprecated Use CMsgCraftCommonStatClock.$Properties instead. + */ + + /** + * Shape of a CMsgCraftCommonStatClock. + * @typedef {CMsgCraftCommonStatClock.$Properties} CMsgCraftCommonStatClock.$Shape */ /** * Constructs a new CMsgCraftCommonStatClock. * @exports CMsgCraftCommonStatClock * @classdesc Represents a CMsgCraftCommonStatClock. - * @implements ICMsgCraftCommonStatClock * @constructor - * @param {ICMsgCraftCommonStatClock=} [properties] Properties to set + * @param {CMsgCraftCommonStatClock.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgCraftCommonStatClock(properties) { + var CMsgCraftCommonStatClock = function (properties) { this.item_id = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgCraftCommonStatClock tool_id. @@ -7311,10 +9598,14 @@ * @function create * @memberof CMsgCraftCommonStatClock * @static - * @param {ICMsgCraftCommonStatClock=} [properties] Properties to set + * @param {CMsgCraftCommonStatClock.$Properties=} [properties] Properties to set * @returns {CMsgCraftCommonStatClock} CMsgCraftCommonStatClock instance + * @type {{ + * (properties: CMsgCraftCommonStatClock.$Shape): CMsgCraftCommonStatClock & CMsgCraftCommonStatClock.$Shape; + * (properties?: CMsgCraftCommonStatClock.$Properties): CMsgCraftCommonStatClock; + * }} */ - CMsgCraftCommonStatClock.create = function create(properties) { + CMsgCraftCommonStatClock.create = function(properties) { return new CMsgCraftCommonStatClock(properties); }; @@ -7323,18 +9614,25 @@ * @function encode * @memberof CMsgCraftCommonStatClock * @static - * @param {ICMsgCraftCommonStatClock} message CMsgCraftCommonStatClock message or plain object to encode + * @param {CMsgCraftCommonStatClock.$Properties} message CMsgCraftCommonStatClock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgCraftCommonStatClock.encode = function encode(message, writer) { + CMsgCraftCommonStatClock.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.tool_id != null && Object.hasOwnProperty.call(message, "tool_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tool_id != null && $Object.hasOwnProperty.call(message, "tool_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.tool_id); if (message.item_id != null && message.item_id.length) for (var i = 0; i < message.item_id.length; ++i) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_id[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7343,12 +9641,12 @@ * @function encodeDelimited * @memberof CMsgCraftCommonStatClock * @static - * @param {ICMsgCraftCommonStatClock} message CMsgCraftCommonStatClock message or plain object to encode + * @param {CMsgCraftCommonStatClock.$Properties} message CMsgCraftCommonStatClock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgCraftCommonStatClock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgCraftCommonStatClock.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7358,35 +9656,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgCraftCommonStatClock} CMsgCraftCommonStatClock + * @returns {CMsgCraftCommonStatClock & CMsgCraftCommonStatClock.$Shape} CMsgCraftCommonStatClock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgCraftCommonStatClock.decode = function decode(reader, length) { + CMsgCraftCommonStatClock.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgCraftCommonStatClock(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgCraftCommonStatClock(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tool_id = reader.uint64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.item_id && message.item_id.length)) - message.item_id = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.item_id.push(reader.uint64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.tool_id = reader.uint64(); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.item_id && message.item_id.length)) + message.item_id = []; + reader.uint64s(message.item_id); + continue; + } + if (wireType !== 0) + break; + if (!(message.item_id && message.item_id.length)) + message.item_id = []; message.item_id.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7396,11 +9715,11 @@ * @memberof CMsgCraftCommonStatClock * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgCraftCommonStatClock} CMsgCraftCommonStatClock + * @returns {CMsgCraftCommonStatClock & CMsgCraftCommonStatClock.$Shape} CMsgCraftCommonStatClock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgCraftCommonStatClock.decodeDelimited = function decodeDelimited(reader) { + CMsgCraftCommonStatClock.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7414,14 +9733,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgCraftCommonStatClock.verify = function verify(message) { + CMsgCraftCommonStatClock.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tool_id != null && message.hasOwnProperty("tool_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tool_id != null && $Object.hasOwnProperty.call(message, "tool_id")) if (!$util.isInteger(message.tool_id) && !(message.tool_id && $util.isInteger(message.tool_id.low) && $util.isInteger(message.tool_id.high))) return "tool_id: integer|Long expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) { - if (!Array.isArray(message.item_id)) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) { + if (!$Array.isArray(message.item_id)) return "item_id: array expected"; for (var i = 0; i < message.item_id.length; ++i) if (!$util.isInteger(message.item_id[i]) && !(message.item_id[i] && $util.isInteger(message.item_id[i].low) && $util.isInteger(message.item_id[i].high))) @@ -7438,28 +9761,34 @@ * @param {Object.} object Plain object * @returns {CMsgCraftCommonStatClock} CMsgCraftCommonStatClock */ - CMsgCraftCommonStatClock.fromObject = function fromObject(object) { + CMsgCraftCommonStatClock.fromObject = function (object, _depth) { if (object instanceof $root.CMsgCraftCommonStatClock) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgCraftCommonStatClock: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgCraftCommonStatClock(); if (object.tool_id != null) if ($util.Long) - (message.tool_id = $util.Long.fromValue(object.tool_id)).unsigned = true; + message.tool_id = $util.Long.fromValue(object.tool_id, true); else if (typeof object.tool_id === "string") - message.tool_id = parseInt(object.tool_id, 10); + message.tool_id = $parseInt(object.tool_id, 10); else if (typeof object.tool_id === "number") message.tool_id = object.tool_id; else if (typeof object.tool_id === "object") message.tool_id = new $util.LongBits(object.tool_id.low >>> 0, object.tool_id.high >>> 0).toNumber(true); if (object.item_id) { - if (!Array.isArray(object.item_id)) - throw TypeError(".CMsgCraftCommonStatClock.item_id: array expected"); - message.item_id = []; + if (!$Array.isArray(object.item_id)) + throw $TypeError(".CMsgCraftCommonStatClock.item_id: array expected"); + message.item_id = $Array(object.item_id.length); for (var i = 0; i < object.item_id.length; ++i) if ($util.Long) - (message.item_id[i] = $util.Long.fromValue(object.item_id[i])).unsigned = true; + message.item_id[i] = $util.Long.fromValue(object.item_id[i], true); else if (typeof object.item_id[i] === "string") - message.item_id[i] = parseInt(object.item_id[i], 10); + message.item_id[i] = $parseInt(object.item_id[i], 10); else if (typeof object.item_id[i] === "number") message.item_id[i] = object.item_id[i]; else if (typeof object.item_id[i] === "object") @@ -7477,30 +9806,38 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgCraftCommonStatClock.toObject = function toObject(message, options) { + CMsgCraftCommonStatClock.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.item_id = []; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.tool_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.tool_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.tool_id = options.longs === String ? "0" : 0; - if (message.tool_id != null && message.hasOwnProperty("tool_id")) - if (typeof message.tool_id === "number") - object.tool_id = options.longs === String ? String(message.tool_id) : message.tool_id; + object.tool_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.tool_id != null && $Object.hasOwnProperty.call(message, "tool_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.tool_id = typeof message.tool_id === "number" ? $BigInt(message.tool_id) : $util.Long.fromBits(message.tool_id.low >>> 0, message.tool_id.high >>> 0, true).toBigInt(); + else if (typeof message.tool_id === "number") + object.tool_id = options.longs === $String ? $String(message.tool_id) : message.tool_id; else - object.tool_id = options.longs === String ? $util.Long.prototype.toString.call(message.tool_id) : options.longs === Number ? new $util.LongBits(message.tool_id.low >>> 0, message.tool_id.high >>> 0).toNumber(true) : message.tool_id; + object.tool_id = options.longs === $String ? $util.Long.prototype.toString.call(message.tool_id) : options.longs === $Number ? new $util.LongBits(message.tool_id.low >>> 0, message.tool_id.high >>> 0).toNumber(true) : message.tool_id; if (message.item_id && message.item_id.length) { - object.item_id = []; + object.item_id = $Array(message.item_id.length); for (var j = 0; j < message.item_id.length; ++j) - if (typeof message.item_id[j] === "number") - object.item_id[j] = options.longs === String ? String(message.item_id[j]) : message.item_id[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id[j] = typeof message.item_id[j] === "number" ? $BigInt(message.item_id[j]) : $util.Long.fromBits(message.item_id[j].low >>> 0, message.item_id[j].high >>> 0, true).toBigInt(); + else if (typeof message.item_id[j] === "number") + object.item_id[j] = options.longs === $String ? $String(message.item_id[j]) : message.item_id[j]; else - object.item_id[j] = options.longs === String ? $util.Long.prototype.toString.call(message.item_id[j]) : options.longs === Number ? new $util.LongBits(message.item_id[j].low >>> 0, message.item_id[j].high >>> 0).toNumber(true) : message.item_id[j]; + object.item_id[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id[j]) : options.longs === $Number ? new $util.LongBits(message.item_id[j].low >>> 0, message.item_id[j].high >>> 0).toNumber(true) : message.item_id[j]; } return object; }; @@ -7512,8 +9849,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgCraftCommonStatClock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgCraftCommonStatClock.prototype.toJSON = function() { + return CMsgCraftCommonStatClock.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgCraftCommonStatClock + * @function getTypeUrl + * @memberof CMsgCraftCommonStatClock + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgCraftCommonStatClock.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgCraftCommonStatClock"; }; return CMsgCraftCommonStatClock; @@ -7521,27 +9872,40 @@ $root.CMsgGCQuestDiscard_Request = (function() { + /** + * Properties of a CMsgGCQuestDiscard_Request. + * @typedef {Object} CMsgGCQuestDiscard_Request.$Properties + * @property {number|Long|null} [quest_id] CMsgGCQuestDiscard_Request quest_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCQuestDiscard_Request. * @exports ICMsgGCQuestDiscard_Request * @interface ICMsgGCQuestDiscard_Request - * @property {number|Long|null} [quest_id] CMsgGCQuestDiscard_Request quest_id + * @augments CMsgGCQuestDiscard_Request.$Properties + * @deprecated Use CMsgGCQuestDiscard_Request.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestDiscard_Request. + * @typedef {CMsgGCQuestDiscard_Request.$Properties} CMsgGCQuestDiscard_Request.$Shape */ /** * Constructs a new CMsgGCQuestDiscard_Request. * @exports CMsgGCQuestDiscard_Request * @classdesc Represents a CMsgGCQuestDiscard_Request. - * @implements ICMsgGCQuestDiscard_Request * @constructor - * @param {ICMsgGCQuestDiscard_Request=} [properties] Properties to set + * @param {CMsgGCQuestDiscard_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestDiscard_Request(properties) { + var CMsgGCQuestDiscard_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestDiscard_Request quest_id. @@ -7556,10 +9920,14 @@ * @function create * @memberof CMsgGCQuestDiscard_Request * @static - * @param {ICMsgGCQuestDiscard_Request=} [properties] Properties to set + * @param {CMsgGCQuestDiscard_Request.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestDiscard_Request} CMsgGCQuestDiscard_Request instance + * @type {{ + * (properties: CMsgGCQuestDiscard_Request.$Shape): CMsgGCQuestDiscard_Request & CMsgGCQuestDiscard_Request.$Shape; + * (properties?: CMsgGCQuestDiscard_Request.$Properties): CMsgGCQuestDiscard_Request; + * }} */ - CMsgGCQuestDiscard_Request.create = function create(properties) { + CMsgGCQuestDiscard_Request.create = function(properties) { return new CMsgGCQuestDiscard_Request(properties); }; @@ -7568,15 +9936,22 @@ * @function encode * @memberof CMsgGCQuestDiscard_Request * @static - * @param {ICMsgGCQuestDiscard_Request} message CMsgGCQuestDiscard_Request message or plain object to encode + * @param {CMsgGCQuestDiscard_Request.$Properties} message CMsgGCQuestDiscard_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestDiscard_Request.encode = function encode(message, writer) { + CMsgGCQuestDiscard_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.quest_id != null && Object.hasOwnProperty.call(message, "quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.quest_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7585,12 +9960,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestDiscard_Request * @static - * @param {ICMsgGCQuestDiscard_Request} message CMsgGCQuestDiscard_Request message or plain object to encode + * @param {CMsgGCQuestDiscard_Request.$Properties} message CMsgGCQuestDiscard_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestDiscard_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestDiscard_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7600,25 +9975,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestDiscard_Request} CMsgGCQuestDiscard_Request + * @returns {CMsgGCQuestDiscard_Request & CMsgGCQuestDiscard_Request.$Shape} CMsgGCQuestDiscard_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestDiscard_Request.decode = function decode(reader, length) { + CMsgGCQuestDiscard_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestDiscard_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestDiscard_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quest_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.quest_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7628,11 +10020,11 @@ * @memberof CMsgGCQuestDiscard_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestDiscard_Request} CMsgGCQuestDiscard_Request + * @returns {CMsgGCQuestDiscard_Request & CMsgGCQuestDiscard_Request.$Shape} CMsgGCQuestDiscard_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestDiscard_Request.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestDiscard_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7646,10 +10038,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestDiscard_Request.verify = function verify(message) { + CMsgGCQuestDiscard_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) if (!$util.isInteger(message.quest_id) && !(message.quest_id && $util.isInteger(message.quest_id.low) && $util.isInteger(message.quest_id.high))) return "quest_id: integer|Long expected"; return null; @@ -7663,15 +10059,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestDiscard_Request} CMsgGCQuestDiscard_Request */ - CMsgGCQuestDiscard_Request.fromObject = function fromObject(object) { + CMsgGCQuestDiscard_Request.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestDiscard_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestDiscard_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestDiscard_Request(); if (object.quest_id != null) if ($util.Long) - (message.quest_id = $util.Long.fromValue(object.quest_id)).unsigned = true; + message.quest_id = $util.Long.fromValue(object.quest_id, true); else if (typeof object.quest_id === "string") - message.quest_id = parseInt(object.quest_id, 10); + message.quest_id = $parseInt(object.quest_id, 10); else if (typeof object.quest_id === "number") message.quest_id = object.quest_id; else if (typeof object.quest_id === "object") @@ -7688,21 +10090,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestDiscard_Request.toObject = function toObject(message, options) { + CMsgGCQuestDiscard_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.quest_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.quest_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.quest_id = options.longs === String ? "0" : 0; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) - if (typeof message.quest_id === "number") - object.quest_id = options.longs === String ? String(message.quest_id) : message.quest_id; + object.quest_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.quest_id = typeof message.quest_id === "number" ? $BigInt(message.quest_id) : $util.Long.fromBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0, true).toBigInt(); + else if (typeof message.quest_id === "number") + object.quest_id = options.longs === $String ? $String(message.quest_id) : message.quest_id; else - object.quest_id = options.longs === String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; + object.quest_id = options.longs === $String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === $Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; return object; }; @@ -7713,8 +10121,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestDiscard_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestDiscard_Request.prototype.toJSON = function() { + return CMsgGCQuestDiscard_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestDiscard_Request + * @function getTypeUrl + * @memberof CMsgGCQuestDiscard_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestDiscard_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestDiscard_Request"; }; return CMsgGCQuestDiscard_Request; @@ -7722,7 +10144,7 @@ /** * GCProtoBufMsgSrc enum. - * @exports GCProtoBufMsgSrc + * @name GCProtoBufMsgSrc * @enum {number} * @property {number} GCProtoBufMsgSrc_Unspecified=0 GCProtoBufMsgSrc_Unspecified value * @property {number} GCProtoBufMsgSrc_FromSystem=1 GCProtoBufMsgSrc_FromSystem value @@ -7731,7 +10153,7 @@ * @property {number} GCProtoBufMsgSrc_ReplySystem=4 GCProtoBufMsgSrc_ReplySystem value */ $root.GCProtoBufMsgSrc = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "GCProtoBufMsgSrc_Unspecified"] = 0; values[valuesById[1] = "GCProtoBufMsgSrc_FromSystem"] = 1; values[valuesById[2] = "GCProtoBufMsgSrc_FromSteamID"] = 2; @@ -7744,8 +10166,7 @@ /** * Properties of a CMsgProtoBufHeader. - * @exports ICMsgProtoBufHeader - * @interface ICMsgProtoBufHeader + * @typedef {Object} CMsgProtoBufHeader.$Properties * @property {number|Long|null} [client_steam_id] CMsgProtoBufHeader client_steam_id * @property {number|null} [client_session_id] CMsgProtoBufHeader client_session_id * @property {number|null} [source_app_id] CMsgProtoBufHeader source_app_id @@ -7756,22 +10177,36 @@ * @property {string|null} [error_message] CMsgProtoBufHeader error_message * @property {GCProtoBufMsgSrc|null} [gc_msg_src] CMsgProtoBufHeader gc_msg_src * @property {number|null} [gc_dir_index_source] CMsgProtoBufHeader gc_dir_index_source + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgProtoBufHeader. + * @exports ICMsgProtoBufHeader + * @interface ICMsgProtoBufHeader + * @augments CMsgProtoBufHeader.$Properties + * @deprecated Use CMsgProtoBufHeader.$Properties instead. + */ + + /** + * Shape of a CMsgProtoBufHeader. + * @typedef {CMsgProtoBufHeader.$Properties} CMsgProtoBufHeader.$Shape */ /** * Constructs a new CMsgProtoBufHeader. * @exports CMsgProtoBufHeader * @classdesc Represents a CMsgProtoBufHeader. - * @implements ICMsgProtoBufHeader * @constructor - * @param {ICMsgProtoBufHeader=} [properties] Properties to set + * @param {CMsgProtoBufHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgProtoBufHeader(properties) { + var CMsgProtoBufHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgProtoBufHeader client_steam_id. @@ -7779,7 +10214,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgProtoBufHeader.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgProtoBufHeader client_session_id. @@ -7803,7 +10238,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.job_id_source = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000; + CMsgProtoBufHeader.prototype.job_id_source = $util.Long ? $util.Long.fromBits(-1,-1,true) : 18446744073709552000; /** * CMsgProtoBufHeader job_id_target. @@ -7811,7 +10246,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.job_id_target = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000; + CMsgProtoBufHeader.prototype.job_id_target = $util.Long ? $util.Long.fromBits(-1,-1,true) : 18446744073709552000; /** * CMsgProtoBufHeader target_job_name. @@ -7858,10 +10293,14 @@ * @function create * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader=} [properties] Properties to set + * @param {CMsgProtoBufHeader.$Properties=} [properties] Properties to set * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader instance + * @type {{ + * (properties: CMsgProtoBufHeader.$Shape): CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape; + * (properties?: CMsgProtoBufHeader.$Properties): CMsgProtoBufHeader; + * }} */ - CMsgProtoBufHeader.create = function create(properties) { + CMsgProtoBufHeader.create = function(properties) { return new CMsgProtoBufHeader(properties); }; @@ -7870,33 +10309,40 @@ * @function encode * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader} message CMsgProtoBufHeader message or plain object to encode + * @param {CMsgProtoBufHeader.$Properties} message CMsgProtoBufHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoBufHeader.encode = function encode(message, writer) { + CMsgProtoBufHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.client_steam_id != null && Object.hasOwnProperty.call(message, "client_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.client_steam_id); - if (message.client_session_id != null && Object.hasOwnProperty.call(message, "client_session_id")) + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.client_session_id); - if (message.source_app_id != null && Object.hasOwnProperty.call(message, "source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.source_app_id); - if (message.job_id_source != null && Object.hasOwnProperty.call(message, "job_id_source")) + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) writer.uint32(/* id 10, wireType 1 =*/81).fixed64(message.job_id_source); - if (message.job_id_target != null && Object.hasOwnProperty.call(message, "job_id_target")) + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) writer.uint32(/* id 11, wireType 1 =*/89).fixed64(message.job_id_target); - if (message.target_job_name != null && Object.hasOwnProperty.call(message, "target_job_name")) + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.target_job_name); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.eresult); - if (message.error_message != null && Object.hasOwnProperty.call(message, "error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) writer.uint32(/* id 14, wireType 2 =*/114).string(message.error_message); - if (message.gc_msg_src != null && Object.hasOwnProperty.call(message, "gc_msg_src")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) writer.uint32(/* id 200, wireType 0 =*/1600).int32(message.gc_msg_src); - if (message.gc_dir_index_source != null && Object.hasOwnProperty.call(message, "gc_dir_index_source")) + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) writer.uint32(/* id 201, wireType 0 =*/1608).uint32(message.gc_dir_index_source); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7905,12 +10351,12 @@ * @function encodeDelimited * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader} message CMsgProtoBufHeader message or plain object to encode + * @param {CMsgProtoBufHeader.$Properties} message CMsgProtoBufHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoBufHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgProtoBufHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7920,52 +10366,102 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader + * @returns {CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape} CMsgProtoBufHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoBufHeader.decode = function decode(reader, length) { + CMsgProtoBufHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgProtoBufHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgProtoBufHeader(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_steam_id = reader.fixed64(); - break; - case 2: - message.client_session_id = reader.int32(); - break; - case 3: - message.source_app_id = reader.uint32(); - break; - case 10: - message.job_id_source = reader.fixed64(); - break; - case 11: - message.job_id_target = reader.fixed64(); - break; - case 12: - message.target_job_name = reader.string(); - break; - case 13: - message.eresult = reader.int32(); - break; - case 14: - message.error_message = reader.string(); - break; - case 200: - message.gc_msg_src = reader.int32(); - break; - case 201: - message.gc_dir_index_source = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.client_steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.client_session_id = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.source_app_id = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 1) + break; + message.job_id_source = reader.fixed64(); + continue; + } + case 11: { + if (wireType !== 1) + break; + message.job_id_target = reader.fixed64(); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.target_job_name = reader.string(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 14: { + if (wireType !== 2) + break; + message.error_message = reader.string(); + continue; + } + case 200: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.GCProtoBufMsgSrc[value] !== $undefined) + message.gc_msg_src = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 201: { + if (wireType !== 0) + break; + message.gc_dir_index_source = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7975,11 +10471,11 @@ * @memberof CMsgProtoBufHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader + * @returns {CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape} CMsgProtoBufHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoBufHeader.decodeDelimited = function decodeDelimited(reader) { + CMsgProtoBufHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7993,34 +10489,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgProtoBufHeader.verify = function verify(message) { + CMsgProtoBufHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) if (!$util.isInteger(message.client_steam_id) && !(message.client_steam_id && $util.isInteger(message.client_steam_id.low) && $util.isInteger(message.client_steam_id.high))) return "client_steam_id: integer|Long expected"; - if (message.client_session_id != null && message.hasOwnProperty("client_session_id")) + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) if (!$util.isInteger(message.client_session_id)) return "client_session_id: integer expected"; - if (message.source_app_id != null && message.hasOwnProperty("source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) if (!$util.isInteger(message.source_app_id)) return "source_app_id: integer expected"; - if (message.job_id_source != null && message.hasOwnProperty("job_id_source")) + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) if (!$util.isInteger(message.job_id_source) && !(message.job_id_source && $util.isInteger(message.job_id_source.low) && $util.isInteger(message.job_id_source.high))) return "job_id_source: integer|Long expected"; - if (message.job_id_target != null && message.hasOwnProperty("job_id_target")) + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) if (!$util.isInteger(message.job_id_target) && !(message.job_id_target && $util.isInteger(message.job_id_target.low) && $util.isInteger(message.job_id_target.high))) return "job_id_target: integer|Long expected"; - if (message.target_job_name != null && message.hasOwnProperty("target_job_name")) + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) if (!$util.isString(message.target_job_name)) return "target_job_name: string expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) if (!$util.isString(message.error_message)) return "error_message: string expected"; - if (message.gc_msg_src != null && message.hasOwnProperty("gc_msg_src")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) switch (message.gc_msg_src) { default: return "gc_msg_src: enum value expected"; @@ -8031,7 +10531,7 @@ case 4: break; } - if (message.gc_dir_index_source != null && message.hasOwnProperty("gc_dir_index_source")) + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) if (!$util.isInteger(message.gc_dir_index_source)) return "gc_dir_index_source: integer expected"; return null; @@ -8045,47 +10545,53 @@ * @param {Object.} object Plain object * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader */ - CMsgProtoBufHeader.fromObject = function fromObject(object) { + CMsgProtoBufHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgProtoBufHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgProtoBufHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgProtoBufHeader(); if (object.client_steam_id != null) if ($util.Long) - (message.client_steam_id = $util.Long.fromValue(object.client_steam_id)).unsigned = false; + message.client_steam_id = $util.Long.fromValue(object.client_steam_id, true); else if (typeof object.client_steam_id === "string") - message.client_steam_id = parseInt(object.client_steam_id, 10); + message.client_steam_id = $parseInt(object.client_steam_id, 10); else if (typeof object.client_steam_id === "number") message.client_steam_id = object.client_steam_id; else if (typeof object.client_steam_id === "object") - message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(); + message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(true); if (object.client_session_id != null) message.client_session_id = object.client_session_id | 0; if (object.source_app_id != null) message.source_app_id = object.source_app_id >>> 0; if (object.job_id_source != null) if ($util.Long) - (message.job_id_source = $util.Long.fromValue(object.job_id_source)).unsigned = false; + message.job_id_source = $util.Long.fromValue(object.job_id_source, true); else if (typeof object.job_id_source === "string") - message.job_id_source = parseInt(object.job_id_source, 10); + message.job_id_source = $parseInt(object.job_id_source, 10); else if (typeof object.job_id_source === "number") message.job_id_source = object.job_id_source; else if (typeof object.job_id_source === "object") - message.job_id_source = new $util.LongBits(object.job_id_source.low >>> 0, object.job_id_source.high >>> 0).toNumber(); + message.job_id_source = new $util.LongBits(object.job_id_source.low >>> 0, object.job_id_source.high >>> 0).toNumber(true); if (object.job_id_target != null) if ($util.Long) - (message.job_id_target = $util.Long.fromValue(object.job_id_target)).unsigned = false; + message.job_id_target = $util.Long.fromValue(object.job_id_target, true); else if (typeof object.job_id_target === "string") - message.job_id_target = parseInt(object.job_id_target, 10); + message.job_id_target = $parseInt(object.job_id_target, 10); else if (typeof object.job_id_target === "number") message.job_id_target = object.job_id_target; else if (typeof object.job_id_target === "object") - message.job_id_target = new $util.LongBits(object.job_id_target.low >>> 0, object.job_id_target.high >>> 0).toNumber(); + message.job_id_target = new $util.LongBits(object.job_id_target.low >>> 0, object.job_id_target.high >>> 0).toNumber(true); if (object.target_job_name != null) - message.target_job_name = String(object.target_job_name); + message.target_job_name = $String(object.target_job_name); if (object.eresult != null) message.eresult = object.eresult | 0; if (object.error_message != null) - message.error_message = String(object.error_message); + message.error_message = $String(object.error_message); switch (object.gc_msg_src) { case "GCProtoBufMsgSrc_Unspecified": case 0: @@ -8107,6 +10613,7 @@ case 4: message.gc_msg_src = 4; break; + default: } if (object.gc_dir_index_source != null) message.gc_dir_index_source = object.gc_dir_index_source >>> 0; @@ -8122,62 +10629,72 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgProtoBufHeader.toObject = function toObject(message, options) { + CMsgProtoBufHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.client_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.client_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.client_steam_id = options.longs === String ? "0" : 0; + object.client_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.client_session_id = 0; object.source_app_id = 0; if ($util.Long) { - var long = new $util.Long(-1, 2147483647, false); - object.job_id_source = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(-1, -1, true); + object.job_id_source = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.job_id_source = options.longs === String ? "9223372036854775807" : 9223372036854776000; + object.job_id_source = options.longs === $String ? "18446744073709551615" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("18446744073709551615") : 18446744073709552000; if ($util.Long) { - var long = new $util.Long(-1, 2147483647, false); - object.job_id_target = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(-1, -1, true); + object.job_id_target = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.job_id_target = options.longs === String ? "9223372036854775807" : 9223372036854776000; + object.job_id_target = options.longs === $String ? "18446744073709551615" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("18446744073709551615") : 18446744073709552000; object.target_job_name = ""; object.eresult = 2; object.error_message = ""; - object.gc_msg_src = options.enums === String ? "GCProtoBufMsgSrc_Unspecified" : 0; + object.gc_msg_src = options.enums === $String ? "GCProtoBufMsgSrc_Unspecified" : 0; object.gc_dir_index_source = 0; } - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) - if (typeof message.client_steam_id === "number") - object.client_steam_id = options.longs === String ? String(message.client_steam_id) : message.client_steam_id; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.client_steam_id = typeof message.client_steam_id === "number" ? $BigInt(message.client_steam_id) : $util.Long.fromBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.client_steam_id === "number") + object.client_steam_id = options.longs === $String ? $String(message.client_steam_id) : message.client_steam_id; else - object.client_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber() : message.client_steam_id; - if (message.client_session_id != null && message.hasOwnProperty("client_session_id")) + object.client_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === $Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber(true) : message.client_steam_id; + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) object.client_session_id = message.client_session_id; - if (message.source_app_id != null && message.hasOwnProperty("source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) object.source_app_id = message.source_app_id; - if (message.job_id_source != null && message.hasOwnProperty("job_id_source")) - if (typeof message.job_id_source === "number") - object.job_id_source = options.longs === String ? String(message.job_id_source) : message.job_id_source; + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.job_id_source = typeof message.job_id_source === "number" ? $BigInt(message.job_id_source) : $util.Long.fromBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0, true).toBigInt(); + else if (typeof message.job_id_source === "number") + object.job_id_source = options.longs === $String ? $String(message.job_id_source) : message.job_id_source; else - object.job_id_source = options.longs === String ? $util.Long.prototype.toString.call(message.job_id_source) : options.longs === Number ? new $util.LongBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0).toNumber() : message.job_id_source; - if (message.job_id_target != null && message.hasOwnProperty("job_id_target")) - if (typeof message.job_id_target === "number") - object.job_id_target = options.longs === String ? String(message.job_id_target) : message.job_id_target; + object.job_id_source = options.longs === $String ? $util.Long.prototype.toString.call(message.job_id_source) : options.longs === $Number ? new $util.LongBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0).toNumber(true) : message.job_id_source; + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.job_id_target = typeof message.job_id_target === "number" ? $BigInt(message.job_id_target) : $util.Long.fromBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0, true).toBigInt(); + else if (typeof message.job_id_target === "number") + object.job_id_target = options.longs === $String ? $String(message.job_id_target) : message.job_id_target; else - object.job_id_target = options.longs === String ? $util.Long.prototype.toString.call(message.job_id_target) : options.longs === Number ? new $util.LongBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0).toNumber() : message.job_id_target; - if (message.target_job_name != null && message.hasOwnProperty("target_job_name")) + object.job_id_target = options.longs === $String ? $util.Long.prototype.toString.call(message.job_id_target) : options.longs === $Number ? new $util.LongBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0).toNumber(true) : message.job_id_target; + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) object.target_job_name = message.target_job_name; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) object.error_message = message.error_message; - if (message.gc_msg_src != null && message.hasOwnProperty("gc_msg_src")) - object.gc_msg_src = options.enums === String ? $root.GCProtoBufMsgSrc[message.gc_msg_src] : message.gc_msg_src; - if (message.gc_dir_index_source != null && message.hasOwnProperty("gc_dir_index_source")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) + object.gc_msg_src = options.enums === $String ? $root.GCProtoBufMsgSrc[message.gc_msg_src] === $undefined ? message.gc_msg_src : $root.GCProtoBufMsgSrc[message.gc_msg_src] : message.gc_msg_src; + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) object.gc_dir_index_source = message.gc_dir_index_source; return object; }; @@ -8189,8 +10706,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgProtoBufHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgProtoBufHeader.prototype.toJSON = function() { + return CMsgProtoBufHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgProtoBufHeader + * @function getTypeUrl + * @memberof CMsgProtoBufHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgProtoBufHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgProtoBufHeader"; }; return CMsgProtoBufHeader; @@ -8200,29 +10731,42 @@ /** * Properties of a CMsgWebAPIKey. - * @exports ICMsgWebAPIKey - * @interface ICMsgWebAPIKey + * @typedef {Object} CMsgWebAPIKey.$Properties * @property {number|null} [status] CMsgWebAPIKey status * @property {number|null} [account_id] CMsgWebAPIKey account_id * @property {number|null} [publisher_group_id] CMsgWebAPIKey publisher_group_id * @property {number|null} [key_id] CMsgWebAPIKey key_id * @property {string|null} [domain] CMsgWebAPIKey domain + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgWebAPIKey. + * @exports ICMsgWebAPIKey + * @interface ICMsgWebAPIKey + * @augments CMsgWebAPIKey.$Properties + * @deprecated Use CMsgWebAPIKey.$Properties instead. + */ + + /** + * Shape of a CMsgWebAPIKey. + * @typedef {CMsgWebAPIKey.$Properties} CMsgWebAPIKey.$Shape */ /** * Constructs a new CMsgWebAPIKey. * @exports CMsgWebAPIKey * @classdesc Represents a CMsgWebAPIKey. - * @implements ICMsgWebAPIKey * @constructor - * @param {ICMsgWebAPIKey=} [properties] Properties to set + * @param {CMsgWebAPIKey.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgWebAPIKey(properties) { + var CMsgWebAPIKey = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgWebAPIKey status. @@ -8269,10 +10813,14 @@ * @function create * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey=} [properties] Properties to set + * @param {CMsgWebAPIKey.$Properties=} [properties] Properties to set * @returns {CMsgWebAPIKey} CMsgWebAPIKey instance + * @type {{ + * (properties: CMsgWebAPIKey.$Shape): CMsgWebAPIKey & CMsgWebAPIKey.$Shape; + * (properties?: CMsgWebAPIKey.$Properties): CMsgWebAPIKey; + * }} */ - CMsgWebAPIKey.create = function create(properties) { + CMsgWebAPIKey.create = function(properties) { return new CMsgWebAPIKey(properties); }; @@ -8281,23 +10829,30 @@ * @function encode * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey} message CMsgWebAPIKey message or plain object to encode + * @param {CMsgWebAPIKey.$Properties} message CMsgWebAPIKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIKey.encode = function encode(message, writer) { + CMsgWebAPIKey.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.status); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_id); - if (message.publisher_group_id != null && Object.hasOwnProperty.call(message, "publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.publisher_group_id); - if (message.key_id != null && Object.hasOwnProperty.call(message, "key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.key_id); - if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.domain); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8306,12 +10861,12 @@ * @function encodeDelimited * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey} message CMsgWebAPIKey message or plain object to encode + * @param {CMsgWebAPIKey.$Properties} message CMsgWebAPIKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgWebAPIKey.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8321,37 +10876,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgWebAPIKey} CMsgWebAPIKey + * @returns {CMsgWebAPIKey & CMsgWebAPIKey.$Shape} CMsgWebAPIKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIKey.decode = function decode(reader, length) { + CMsgWebAPIKey.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgWebAPIKey(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgWebAPIKey(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.uint32(); - break; - case 2: - message.account_id = reader.uint32(); - break; - case 3: - message.publisher_group_id = reader.uint32(); - break; - case 4: - message.key_id = reader.uint32(); - break; - case 5: - message.domain = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.status = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.publisher_group_id = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.key_id = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.domain = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8361,11 +10945,11 @@ * @memberof CMsgWebAPIKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgWebAPIKey} CMsgWebAPIKey + * @returns {CMsgWebAPIKey & CMsgWebAPIKey.$Shape} CMsgWebAPIKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIKey.decodeDelimited = function decodeDelimited(reader) { + CMsgWebAPIKey.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8379,22 +10963,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgWebAPIKey.verify = function verify(message) { + CMsgWebAPIKey.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) if (!$util.isInteger(message.status)) return "status: integer expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.publisher_group_id != null && message.hasOwnProperty("publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) if (!$util.isInteger(message.publisher_group_id)) return "publisher_group_id: integer expected"; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) if (!$util.isInteger(message.key_id)) return "key_id: integer expected"; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) if (!$util.isString(message.domain)) return "domain: string expected"; return null; @@ -8408,9 +10996,15 @@ * @param {Object.} object Plain object * @returns {CMsgWebAPIKey} CMsgWebAPIKey */ - CMsgWebAPIKey.fromObject = function fromObject(object) { + CMsgWebAPIKey.fromObject = function (object, _depth) { if (object instanceof $root.CMsgWebAPIKey) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgWebAPIKey: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgWebAPIKey(); if (object.status != null) message.status = object.status >>> 0; @@ -8421,7 +11015,7 @@ if (object.key_id != null) message.key_id = object.key_id >>> 0; if (object.domain != null) - message.domain = String(object.domain); + message.domain = $String(object.domain); return message; }; @@ -8434,9 +11028,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgWebAPIKey.toObject = function toObject(message, options) { + CMsgWebAPIKey.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.status = 255; @@ -8445,15 +11043,15 @@ object.key_id = 0; object.domain = ""; } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.publisher_group_id != null && message.hasOwnProperty("publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) object.publisher_group_id = message.publisher_group_id; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) object.key_id = message.key_id; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) object.domain = message.domain; return object; }; @@ -8465,8 +11063,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgWebAPIKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgWebAPIKey.prototype.toJSON = function() { + return CMsgWebAPIKey.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgWebAPIKey + * @function getTypeUrl + * @memberof CMsgWebAPIKey + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgWebAPIKey.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgWebAPIKey"; }; return CMsgWebAPIKey; @@ -8476,35 +11088,48 @@ /** * Properties of a CMsgHttpRequest. - * @exports ICMsgHttpRequest - * @interface ICMsgHttpRequest + * @typedef {Object} CMsgHttpRequest.$Properties * @property {number|null} [request_method] CMsgHttpRequest request_method * @property {string|null} [hostname] CMsgHttpRequest hostname * @property {string|null} [url] CMsgHttpRequest url - * @property {Array.|null} [headers] CMsgHttpRequest headers - * @property {Array.|null} [get_params] CMsgHttpRequest get_params - * @property {Array.|null} [post_params] CMsgHttpRequest post_params + * @property {Array.|null} [headers] CMsgHttpRequest headers + * @property {Array.|null} [get_params] CMsgHttpRequest get_params + * @property {Array.|null} [post_params] CMsgHttpRequest post_params * @property {Uint8Array|null} [body] CMsgHttpRequest body * @property {number|null} [absolute_timeout] CMsgHttpRequest absolute_timeout + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHttpRequest. + * @exports ICMsgHttpRequest + * @interface ICMsgHttpRequest + * @augments CMsgHttpRequest.$Properties + * @deprecated Use CMsgHttpRequest.$Properties instead. + */ + + /** + * Shape of a CMsgHttpRequest. + * @typedef {CMsgHttpRequest.$Properties} CMsgHttpRequest.$Shape */ /** * Constructs a new CMsgHttpRequest. * @exports CMsgHttpRequest * @classdesc Represents a CMsgHttpRequest. - * @implements ICMsgHttpRequest * @constructor - * @param {ICMsgHttpRequest=} [properties] Properties to set + * @param {CMsgHttpRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHttpRequest(properties) { + var CMsgHttpRequest = function (properties) { this.headers = []; this.get_params = []; this.post_params = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHttpRequest request_method. @@ -8532,7 +11157,7 @@ /** * CMsgHttpRequest headers. - * @member {Array.} headers + * @member {Array.} headers * @memberof CMsgHttpRequest * @instance */ @@ -8540,7 +11165,7 @@ /** * CMsgHttpRequest get_params. - * @member {Array.} get_params + * @member {Array.} get_params * @memberof CMsgHttpRequest * @instance */ @@ -8548,7 +11173,7 @@ /** * CMsgHttpRequest post_params. - * @member {Array.} post_params + * @member {Array.} post_params * @memberof CMsgHttpRequest * @instance */ @@ -8575,10 +11200,14 @@ * @function create * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest=} [properties] Properties to set + * @param {CMsgHttpRequest.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest} CMsgHttpRequest instance + * @type {{ + * (properties: CMsgHttpRequest.$Shape): CMsgHttpRequest & CMsgHttpRequest.$Shape; + * (properties?: CMsgHttpRequest.$Properties): CMsgHttpRequest; + * }} */ - CMsgHttpRequest.create = function create(properties) { + CMsgHttpRequest.create = function(properties) { return new CMsgHttpRequest(properties); }; @@ -8587,32 +11216,39 @@ * @function encode * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest} message CMsgHttpRequest message or plain object to encode + * @param {CMsgHttpRequest.$Properties} message CMsgHttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpRequest.encode = function encode(message, writer) { + CMsgHttpRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.request_method != null && Object.hasOwnProperty.call(message, "request_method")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.request_method); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.hostname); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.url); if (message.headers != null && message.headers.length) for (var i = 0; i < message.headers.length; ++i) - $root.CMsgHttpRequest.RequestHeader.encode(message.headers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgHttpRequest.RequestHeader.encode(message.headers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.get_params != null && message.get_params.length) for (var i = 0; i < message.get_params.length; ++i) - $root.CMsgHttpRequest.QueryParam.encode(message.get_params[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.CMsgHttpRequest.QueryParam.encode(message.get_params[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.post_params != null && message.post_params.length) for (var i = 0; i < message.post_params.length; ++i) - $root.CMsgHttpRequest.QueryParam.encode(message.post_params[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.CMsgHttpRequest.QueryParam.encode(message.post_params[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.body); - if (message.absolute_timeout != null && Object.hasOwnProperty.call(message, "absolute_timeout")) + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.absolute_timeout); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8621,12 +11257,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest} message CMsgHttpRequest message or plain object to encode + * @param {CMsgHttpRequest.$Properties} message CMsgHttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHttpRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8636,52 +11272,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest} CMsgHttpRequest + * @returns {CMsgHttpRequest & CMsgHttpRequest.$Shape} CMsgHttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpRequest.decode = function decode(reader, length) { + CMsgHttpRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.request_method = reader.uint32(); - break; - case 2: - message.hostname = reader.string(); - break; - case 3: - message.url = reader.string(); - break; - case 4: - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.CMsgHttpRequest.RequestHeader.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.get_params && message.get_params.length)) - message.get_params = []; - message.get_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.post_params && message.post_params.length)) - message.post_params = []; - message.post_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32())); - break; - case 7: - message.body = reader.bytes(); - break; - case 8: - message.absolute_timeout = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.request_method = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.hostname = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.url = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push($root.CMsgHttpRequest.RequestHeader.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.get_params && message.get_params.length)) + message.get_params = []; + message.get_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.post_params && message.post_params.length)) + message.post_params = []; + message.post_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.body = reader.bytes(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.absolute_timeout = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8691,11 +11365,11 @@ * @memberof CMsgHttpRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest} CMsgHttpRequest + * @returns {CMsgHttpRequest & CMsgHttpRequest.$Shape} CMsgHttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgHttpRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8709,49 +11383,53 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHttpRequest.verify = function verify(message) { + CMsgHttpRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.request_method != null && message.hasOwnProperty("request_method")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) if (!$util.isInteger(message.request_method)) return "request_method: integer expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) if (!$util.isString(message.hostname)) return "hostname: string expected"; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) + if (message.headers != null && $Object.hasOwnProperty.call(message, "headers")) { + if (!$Array.isArray(message.headers)) return "headers: array expected"; for (var i = 0; i < message.headers.length; ++i) { - var error = $root.CMsgHttpRequest.RequestHeader.verify(message.headers[i]); + var error = $root.CMsgHttpRequest.RequestHeader.verify(message.headers[i], _depth + 1); if (error) return "headers." + error; } } - if (message.get_params != null && message.hasOwnProperty("get_params")) { - if (!Array.isArray(message.get_params)) + if (message.get_params != null && $Object.hasOwnProperty.call(message, "get_params")) { + if (!$Array.isArray(message.get_params)) return "get_params: array expected"; for (var i = 0; i < message.get_params.length; ++i) { - var error = $root.CMsgHttpRequest.QueryParam.verify(message.get_params[i]); + var error = $root.CMsgHttpRequest.QueryParam.verify(message.get_params[i], _depth + 1); if (error) return "get_params." + error; } } - if (message.post_params != null && message.hasOwnProperty("post_params")) { - if (!Array.isArray(message.post_params)) + if (message.post_params != null && $Object.hasOwnProperty.call(message, "post_params")) { + if (!$Array.isArray(message.post_params)) return "post_params: array expected"; for (var i = 0; i < message.post_params.length; ++i) { - var error = $root.CMsgHttpRequest.QueryParam.verify(message.post_params[i]); + var error = $root.CMsgHttpRequest.QueryParam.verify(message.post_params[i], _depth + 1); if (error) return "post_params." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) return "body: buffer expected"; - if (message.absolute_timeout != null && message.hasOwnProperty("absolute_timeout")) + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) if (!$util.isInteger(message.absolute_timeout)) return "absolute_timeout: integer expected"; return null; @@ -8765,50 +11443,56 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest} CMsgHttpRequest */ - CMsgHttpRequest.fromObject = function fromObject(object) { + CMsgHttpRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest(); if (object.request_method != null) message.request_method = object.request_method >>> 0; if (object.hostname != null) - message.hostname = String(object.hostname); + message.hostname = $String(object.hostname); if (object.url != null) - message.url = String(object.url); + message.url = $String(object.url); if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".CMsgHttpRequest.headers: array expected"); - message.headers = []; + if (!$Array.isArray(object.headers)) + throw $TypeError(".CMsgHttpRequest.headers: array expected"); + message.headers = $Array(object.headers.length); for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".CMsgHttpRequest.headers: object expected"); - message.headers[i] = $root.CMsgHttpRequest.RequestHeader.fromObject(object.headers[i]); + if (!$util.isObject(object.headers[i])) + throw $TypeError(".CMsgHttpRequest.headers: object expected"); + message.headers[i] = $root.CMsgHttpRequest.RequestHeader.fromObject(object.headers[i], _depth + 1); } } if (object.get_params) { - if (!Array.isArray(object.get_params)) - throw TypeError(".CMsgHttpRequest.get_params: array expected"); - message.get_params = []; + if (!$Array.isArray(object.get_params)) + throw $TypeError(".CMsgHttpRequest.get_params: array expected"); + message.get_params = $Array(object.get_params.length); for (var i = 0; i < object.get_params.length; ++i) { - if (typeof object.get_params[i] !== "object") - throw TypeError(".CMsgHttpRequest.get_params: object expected"); - message.get_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.get_params[i]); + if (!$util.isObject(object.get_params[i])) + throw $TypeError(".CMsgHttpRequest.get_params: object expected"); + message.get_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.get_params[i], _depth + 1); } } if (object.post_params) { - if (!Array.isArray(object.post_params)) - throw TypeError(".CMsgHttpRequest.post_params: array expected"); - message.post_params = []; + if (!$Array.isArray(object.post_params)) + throw $TypeError(".CMsgHttpRequest.post_params: array expected"); + message.post_params = $Array(object.post_params.length); for (var i = 0; i < object.post_params.length; ++i) { - if (typeof object.post_params[i] !== "object") - throw TypeError(".CMsgHttpRequest.post_params: object expected"); - message.post_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.post_params[i]); + if (!$util.isObject(object.post_params[i])) + throw $TypeError(".CMsgHttpRequest.post_params: object expected"); + message.post_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.post_params[i], _depth + 1); } } if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; if (object.absolute_timeout != null) message.absolute_timeout = object.absolute_timeout >>> 0; @@ -8824,9 +11508,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHttpRequest.toObject = function toObject(message, options) { + CMsgHttpRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.headers = []; @@ -8837,39 +11525,39 @@ object.request_method = 0; object.hostname = ""; object.url = ""; - if (options.bytes === String) + if (options.bytes === $String) object.body = ""; else { object.body = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.body = $util.newBuffer(object.body); } object.absolute_timeout = 0; } - if (message.request_method != null && message.hasOwnProperty("request_method")) + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) object.request_method = message.request_method; - if (message.hostname != null && message.hasOwnProperty("hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) object.hostname = message.hostname; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) object.url = message.url; if (message.headers && message.headers.length) { - object.headers = []; + object.headers = $Array(message.headers.length); for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.CMsgHttpRequest.RequestHeader.toObject(message.headers[j], options); + object.headers[j] = $root.CMsgHttpRequest.RequestHeader.toObject(message.headers[j], options, _depth + 1); } if (message.get_params && message.get_params.length) { - object.get_params = []; + object.get_params = $Array(message.get_params.length); for (var j = 0; j < message.get_params.length; ++j) - object.get_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.get_params[j], options); + object.get_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.get_params[j], options, _depth + 1); } if (message.post_params && message.post_params.length) { - object.post_params = []; + object.post_params = $Array(message.post_params.length); for (var j = 0; j < message.post_params.length; ++j) - object.post_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.post_params[j], options); + object.post_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.post_params[j], options, _depth + 1); } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; - if (message.absolute_timeout != null && message.hasOwnProperty("absolute_timeout")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = options.bytes === $String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.body) : message.body; + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) object.absolute_timeout = message.absolute_timeout; return object; }; @@ -8881,34 +11569,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgHttpRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHttpRequest.prototype.toJSON = function() { + return CMsgHttpRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHttpRequest + * @function getTypeUrl + * @memberof CMsgHttpRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHttpRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest"; }; CMsgHttpRequest.RequestHeader = (function() { /** * Properties of a RequestHeader. - * @memberof CMsgHttpRequest - * @interface IRequestHeader + * @typedef {Object} CMsgHttpRequest.RequestHeader.$Properties * @property {string|null} [name] RequestHeader name * @property {string|null} [value] RequestHeader value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RequestHeader. + * @memberof CMsgHttpRequest + * @interface IRequestHeader + * @augments CMsgHttpRequest.RequestHeader.$Properties + * @deprecated Use CMsgHttpRequest.RequestHeader.$Properties instead. + */ + + /** + * Shape of a RequestHeader. + * @typedef {CMsgHttpRequest.RequestHeader.$Properties} CMsgHttpRequest.RequestHeader.$Shape */ /** * Constructs a new RequestHeader. * @memberof CMsgHttpRequest * @classdesc Represents a RequestHeader. - * @implements IRequestHeader * @constructor - * @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set + * @param {CMsgHttpRequest.RequestHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function RequestHeader(properties) { + var RequestHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * RequestHeader name. @@ -8931,10 +11646,14 @@ * @function create * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set + * @param {CMsgHttpRequest.RequestHeader.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest.RequestHeader} RequestHeader instance + * @type {{ + * (properties: CMsgHttpRequest.RequestHeader.$Shape): CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape; + * (properties?: CMsgHttpRequest.RequestHeader.$Properties): CMsgHttpRequest.RequestHeader; + * }} */ - RequestHeader.create = function create(properties) { + RequestHeader.create = function(properties) { return new RequestHeader(properties); }; @@ -8943,17 +11662,24 @@ * @function encode * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader} message RequestHeader message or plain object to encode + * @param {CMsgHttpRequest.RequestHeader.$Properties} message RequestHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestHeader.encode = function encode(message, writer) { + RequestHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8962,12 +11688,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader} message RequestHeader message or plain object to encode + * @param {CMsgHttpRequest.RequestHeader.$Properties} message RequestHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RequestHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8977,28 +11703,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest.RequestHeader} RequestHeader + * @returns {CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape} RequestHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestHeader.decode = function decode(reader, length) { + RequestHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest.RequestHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest.RequestHeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9008,11 +11754,11 @@ * @memberof CMsgHttpRequest.RequestHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest.RequestHeader} RequestHeader + * @returns {CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape} RequestHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestHeader.decodeDelimited = function decodeDelimited(reader) { + RequestHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9026,13 +11772,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RequestHeader.verify = function verify(message) { + RequestHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -9046,14 +11796,20 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest.RequestHeader} RequestHeader */ - RequestHeader.fromObject = function fromObject(object) { + RequestHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest.RequestHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest.RequestHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest.RequestHeader(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -9066,17 +11822,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RequestHeader.toObject = function toObject(message, options) { + RequestHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -9088,8 +11848,22 @@ * @instance * @returns {Object.} JSON object */ - RequestHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + RequestHeader.prototype.toJSON = function() { + return RequestHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RequestHeader + * @function getTypeUrl + * @memberof CMsgHttpRequest.RequestHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RequestHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest.RequestHeader"; }; return RequestHeader; @@ -9099,26 +11873,39 @@ /** * Properties of a QueryParam. - * @memberof CMsgHttpRequest - * @interface IQueryParam + * @typedef {Object} CMsgHttpRequest.QueryParam.$Properties * @property {string|null} [name] QueryParam name * @property {Uint8Array|null} [value] QueryParam value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a QueryParam. + * @memberof CMsgHttpRequest + * @interface IQueryParam + * @augments CMsgHttpRequest.QueryParam.$Properties + * @deprecated Use CMsgHttpRequest.QueryParam.$Properties instead. + */ + + /** + * Shape of a QueryParam. + * @typedef {CMsgHttpRequest.QueryParam.$Properties} CMsgHttpRequest.QueryParam.$Shape */ /** * Constructs a new QueryParam. * @memberof CMsgHttpRequest * @classdesc Represents a QueryParam. - * @implements IQueryParam * @constructor - * @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set + * @param {CMsgHttpRequest.QueryParam.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function QueryParam(properties) { + var QueryParam = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * QueryParam name. @@ -9141,10 +11928,14 @@ * @function create * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set + * @param {CMsgHttpRequest.QueryParam.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest.QueryParam} QueryParam instance + * @type {{ + * (properties: CMsgHttpRequest.QueryParam.$Shape): CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape; + * (properties?: CMsgHttpRequest.QueryParam.$Properties): CMsgHttpRequest.QueryParam; + * }} */ - QueryParam.create = function create(properties) { + QueryParam.create = function(properties) { return new QueryParam(properties); }; @@ -9153,17 +11944,24 @@ * @function encode * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam} message QueryParam message or plain object to encode + * @param {CMsgHttpRequest.QueryParam.$Properties} message QueryParam message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParam.encode = function encode(message, writer) { + QueryParam.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9172,12 +11970,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam} message QueryParam message or plain object to encode + * @param {CMsgHttpRequest.QueryParam.$Properties} message QueryParam message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueryParam.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9187,28 +11985,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest.QueryParam} QueryParam + * @returns {CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape} QueryParam * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParam.decode = function decode(reader, length) { + QueryParam.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest.QueryParam(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest.QueryParam(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9218,11 +12036,11 @@ * @memberof CMsgHttpRequest.QueryParam * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest.QueryParam} QueryParam + * @returns {CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape} QueryParam * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParam.decodeDelimited = function decodeDelimited(reader) { + QueryParam.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9236,13 +12054,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryParam.verify = function verify(message) { + QueryParam.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -9256,16 +12078,22 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest.QueryParam} QueryParam */ - QueryParam.fromObject = function fromObject(object) { + QueryParam.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest.QueryParam) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest.QueryParam: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest.QueryParam(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -9279,24 +12107,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryParam.toObject = function toObject(message, options) { + QueryParam.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -9307,8 +12139,22 @@ * @instance * @returns {Object.} JSON object */ - QueryParam.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + QueryParam.prototype.toJSON = function() { + return QueryParam.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for QueryParam + * @function getTypeUrl + * @memberof CMsgHttpRequest.QueryParam + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + QueryParam.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest.QueryParam"; }; return QueryParam; @@ -9321,31 +12167,44 @@ /** * Properties of a CMsgWebAPIRequest. - * @exports ICMsgWebAPIRequest - * @interface ICMsgWebAPIRequest + * @typedef {Object} CMsgWebAPIRequest.$Properties * @property {string|null} [UNUSED_job_name] CMsgWebAPIRequest UNUSED_job_name * @property {string|null} [interface_name] CMsgWebAPIRequest interface_name * @property {string|null} [method_name] CMsgWebAPIRequest method_name * @property {number|null} [version] CMsgWebAPIRequest version - * @property {ICMsgWebAPIKey|null} [api_key] CMsgWebAPIRequest api_key - * @property {ICMsgHttpRequest|null} [request] CMsgWebAPIRequest request + * @property {CMsgWebAPIKey.$Properties|null} [api_key] CMsgWebAPIRequest api_key + * @property {CMsgHttpRequest.$Properties|null} [request] CMsgWebAPIRequest request * @property {number|null} [routing_app_id] CMsgWebAPIRequest routing_app_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgWebAPIRequest. + * @exports ICMsgWebAPIRequest + * @interface ICMsgWebAPIRequest + * @augments CMsgWebAPIRequest.$Properties + * @deprecated Use CMsgWebAPIRequest.$Properties instead. + */ + + /** + * Shape of a CMsgWebAPIRequest. + * @typedef {CMsgWebAPIRequest.$Properties} CMsgWebAPIRequest.$Shape */ /** * Constructs a new CMsgWebAPIRequest. * @exports CMsgWebAPIRequest * @classdesc Represents a CMsgWebAPIRequest. - * @implements ICMsgWebAPIRequest * @constructor - * @param {ICMsgWebAPIRequest=} [properties] Properties to set + * @param {CMsgWebAPIRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgWebAPIRequest(properties) { + var CMsgWebAPIRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgWebAPIRequest UNUSED_job_name. @@ -9381,7 +12240,7 @@ /** * CMsgWebAPIRequest api_key. - * @member {ICMsgWebAPIKey|null|undefined} api_key + * @member {CMsgWebAPIKey.$Properties|null|undefined} api_key * @memberof CMsgWebAPIRequest * @instance */ @@ -9389,7 +12248,7 @@ /** * CMsgWebAPIRequest request. - * @member {ICMsgHttpRequest|null|undefined} request + * @member {CMsgHttpRequest.$Properties|null|undefined} request * @memberof CMsgWebAPIRequest * @instance */ @@ -9408,10 +12267,14 @@ * @function create * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest=} [properties] Properties to set + * @param {CMsgWebAPIRequest.$Properties=} [properties] Properties to set * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest instance + * @type {{ + * (properties: CMsgWebAPIRequest.$Shape): CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape; + * (properties?: CMsgWebAPIRequest.$Properties): CMsgWebAPIRequest; + * }} */ - CMsgWebAPIRequest.create = function create(properties) { + CMsgWebAPIRequest.create = function(properties) { return new CMsgWebAPIRequest(properties); }; @@ -9420,27 +12283,34 @@ * @function encode * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest} message CMsgWebAPIRequest message or plain object to encode + * @param {CMsgWebAPIRequest.$Properties} message CMsgWebAPIRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIRequest.encode = function encode(message, writer) { + CMsgWebAPIRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.UNUSED_job_name != null && Object.hasOwnProperty.call(message, "UNUSED_job_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.UNUSED_job_name); - if (message.interface_name != null && Object.hasOwnProperty.call(message, "interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.interface_name); - if (message.method_name != null && Object.hasOwnProperty.call(message, "method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.method_name); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.version); - if (message.api_key != null && Object.hasOwnProperty.call(message, "api_key")) - $root.CMsgWebAPIKey.encode(message.api_key, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.request != null && Object.hasOwnProperty.call(message, "request")) - $root.CMsgHttpRequest.encode(message.request, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.routing_app_id != null && Object.hasOwnProperty.call(message, "routing_app_id")) + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) + $root.CMsgWebAPIKey.encode(message.api_key, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) + $root.CMsgHttpRequest.encode(message.request, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.routing_app_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9449,12 +12319,12 @@ * @function encodeDelimited * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest} message CMsgWebAPIRequest message or plain object to encode + * @param {CMsgWebAPIRequest.$Properties} message CMsgWebAPIRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgWebAPIRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9464,43 +12334,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest + * @returns {CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape} CMsgWebAPIRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIRequest.decode = function decode(reader, length) { + CMsgWebAPIRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgWebAPIRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgWebAPIRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.UNUSED_job_name = reader.string(); - break; - case 2: - message.interface_name = reader.string(); - break; - case 3: - message.method_name = reader.string(); - break; - case 4: - message.version = reader.uint32(); - break; - case 5: - message.api_key = $root.CMsgWebAPIKey.decode(reader, reader.uint32()); - break; - case 6: - message.request = $root.CMsgHttpRequest.decode(reader, reader.uint32()); - break; - case 7: - message.routing_app_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.UNUSED_job_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.interface_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.method_name = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.api_key = $root.CMsgWebAPIKey.decode(reader, reader.uint32(), $undefined, _depth + 1, message.api_key); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.request = $root.CMsgHttpRequest.decode(reader, reader.uint32(), $undefined, _depth + 1, message.request); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.routing_app_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9510,11 +12415,11 @@ * @memberof CMsgWebAPIRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest + * @returns {CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape} CMsgWebAPIRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgWebAPIRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9528,32 +12433,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgWebAPIRequest.verify = function verify(message) { + CMsgWebAPIRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.UNUSED_job_name != null && message.hasOwnProperty("UNUSED_job_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) if (!$util.isString(message.UNUSED_job_name)) return "UNUSED_job_name: string expected"; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) if (!$util.isString(message.interface_name)) return "interface_name: string expected"; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) if (!$util.isString(message.method_name)) return "method_name: string expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.api_key != null && message.hasOwnProperty("api_key")) { - var error = $root.CMsgWebAPIKey.verify(message.api_key); + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) { + var error = $root.CMsgWebAPIKey.verify(message.api_key, _depth + 1); if (error) return "api_key." + error; } - if (message.request != null && message.hasOwnProperty("request")) { - var error = $root.CMsgHttpRequest.verify(message.request); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) { + var error = $root.CMsgHttpRequest.verify(message.request, _depth + 1); if (error) return "request." + error; } - if (message.routing_app_id != null && message.hasOwnProperty("routing_app_id")) + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) if (!$util.isInteger(message.routing_app_id)) return "routing_app_id: integer expected"; return null; @@ -9567,27 +12476,33 @@ * @param {Object.} object Plain object * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest */ - CMsgWebAPIRequest.fromObject = function fromObject(object) { + CMsgWebAPIRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgWebAPIRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgWebAPIRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgWebAPIRequest(); if (object.UNUSED_job_name != null) - message.UNUSED_job_name = String(object.UNUSED_job_name); + message.UNUSED_job_name = $String(object.UNUSED_job_name); if (object.interface_name != null) - message.interface_name = String(object.interface_name); + message.interface_name = $String(object.interface_name); if (object.method_name != null) - message.method_name = String(object.method_name); + message.method_name = $String(object.method_name); if (object.version != null) message.version = object.version >>> 0; if (object.api_key != null) { - if (typeof object.api_key !== "object") - throw TypeError(".CMsgWebAPIRequest.api_key: object expected"); - message.api_key = $root.CMsgWebAPIKey.fromObject(object.api_key); + if (!$util.isObject(object.api_key)) + throw $TypeError(".CMsgWebAPIRequest.api_key: object expected"); + message.api_key = $root.CMsgWebAPIKey.fromObject(object.api_key, _depth + 1); } if (object.request != null) { - if (typeof object.request !== "object") - throw TypeError(".CMsgWebAPIRequest.request: object expected"); - message.request = $root.CMsgHttpRequest.fromObject(object.request); + if (!$util.isObject(object.request)) + throw $TypeError(".CMsgWebAPIRequest.request: object expected"); + message.request = $root.CMsgHttpRequest.fromObject(object.request, _depth + 1); } if (object.routing_app_id != null) message.routing_app_id = object.routing_app_id >>> 0; @@ -9603,9 +12518,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgWebAPIRequest.toObject = function toObject(message, options) { + CMsgWebAPIRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.UNUSED_job_name = ""; @@ -9616,19 +12535,19 @@ object.request = null; object.routing_app_id = 0; } - if (message.UNUSED_job_name != null && message.hasOwnProperty("UNUSED_job_name")) + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) object.UNUSED_job_name = message.UNUSED_job_name; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) object.interface_name = message.interface_name; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) object.method_name = message.method_name; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.api_key != null && message.hasOwnProperty("api_key")) - object.api_key = $root.CMsgWebAPIKey.toObject(message.api_key, options); - if (message.request != null && message.hasOwnProperty("request")) - object.request = $root.CMsgHttpRequest.toObject(message.request, options); - if (message.routing_app_id != null && message.hasOwnProperty("routing_app_id")) + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) + object.api_key = $root.CMsgWebAPIKey.toObject(message.api_key, options, _depth + 1); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) + object.request = $root.CMsgHttpRequest.toObject(message.request, options, _depth + 1); + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) object.routing_app_id = message.routing_app_id; return object; }; @@ -9640,8 +12559,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgWebAPIRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgWebAPIRequest.prototype.toJSON = function() { + return CMsgWebAPIRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgWebAPIRequest + * @function getTypeUrl + * @memberof CMsgWebAPIRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgWebAPIRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgWebAPIRequest"; }; return CMsgWebAPIRequest; @@ -9651,28 +12584,41 @@ /** * Properties of a CMsgHttpResponse. - * @exports ICMsgHttpResponse - * @interface ICMsgHttpResponse + * @typedef {Object} CMsgHttpResponse.$Properties * @property {number|null} [status_code] CMsgHttpResponse status_code - * @property {Array.|null} [headers] CMsgHttpResponse headers + * @property {Array.|null} [headers] CMsgHttpResponse headers * @property {Uint8Array|null} [body] CMsgHttpResponse body + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHttpResponse. + * @exports ICMsgHttpResponse + * @interface ICMsgHttpResponse + * @augments CMsgHttpResponse.$Properties + * @deprecated Use CMsgHttpResponse.$Properties instead. + */ + + /** + * Shape of a CMsgHttpResponse. + * @typedef {CMsgHttpResponse.$Properties} CMsgHttpResponse.$Shape */ /** * Constructs a new CMsgHttpResponse. * @exports CMsgHttpResponse * @classdesc Represents a CMsgHttpResponse. - * @implements ICMsgHttpResponse * @constructor - * @param {ICMsgHttpResponse=} [properties] Properties to set + * @param {CMsgHttpResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHttpResponse(properties) { + var CMsgHttpResponse = function (properties) { this.headers = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHttpResponse status_code. @@ -9684,7 +12630,7 @@ /** * CMsgHttpResponse headers. - * @member {Array.} headers + * @member {Array.} headers * @memberof CMsgHttpResponse * @instance */ @@ -9703,10 +12649,14 @@ * @function create * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse=} [properties] Properties to set + * @param {CMsgHttpResponse.$Properties=} [properties] Properties to set * @returns {CMsgHttpResponse} CMsgHttpResponse instance + * @type {{ + * (properties: CMsgHttpResponse.$Shape): CMsgHttpResponse & CMsgHttpResponse.$Shape; + * (properties?: CMsgHttpResponse.$Properties): CMsgHttpResponse; + * }} */ - CMsgHttpResponse.create = function create(properties) { + CMsgHttpResponse.create = function(properties) { return new CMsgHttpResponse(properties); }; @@ -9715,20 +12665,27 @@ * @function encode * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse} message CMsgHttpResponse message or plain object to encode + * @param {CMsgHttpResponse.$Properties} message CMsgHttpResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpResponse.encode = function encode(message, writer) { + CMsgHttpResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.status_code); if (message.headers != null && message.headers.length) for (var i = 0; i < message.headers.length; ++i) - $root.CMsgHttpResponse.ResponseHeader.encode(message.headers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.CMsgHttpResponse.ResponseHeader.encode(message.headers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.body); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9737,12 +12694,12 @@ * @function encodeDelimited * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse} message CMsgHttpResponse message or plain object to encode + * @param {CMsgHttpResponse.$Properties} message CMsgHttpResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHttpResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9752,33 +12709,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpResponse} CMsgHttpResponse + * @returns {CMsgHttpResponse & CMsgHttpResponse.$Shape} CMsgHttpResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpResponse.decode = function decode(reader, length) { + CMsgHttpResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status_code = reader.uint32(); - break; - case 2: - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.CMsgHttpResponse.ResponseHeader.decode(reader, reader.uint32())); - break; - case 3: - message.body = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.status_code = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push($root.CMsgHttpResponse.ResponseHeader.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.body = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9788,11 +12768,11 @@ * @memberof CMsgHttpResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpResponse} CMsgHttpResponse + * @returns {CMsgHttpResponse & CMsgHttpResponse.$Shape} CMsgHttpResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgHttpResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9806,22 +12786,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHttpResponse.verify = function verify(message) { + CMsgHttpResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status_code != null && message.hasOwnProperty("status_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) if (!$util.isInteger(message.status_code)) return "status_code: integer expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) + if (message.headers != null && $Object.hasOwnProperty.call(message, "headers")) { + if (!$Array.isArray(message.headers)) return "headers: array expected"; for (var i = 0; i < message.headers.length; ++i) { - var error = $root.CMsgHttpResponse.ResponseHeader.verify(message.headers[i]); + var error = $root.CMsgHttpResponse.ResponseHeader.verify(message.headers[i], _depth + 1); if (error) return "headers." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) return "body: buffer expected"; return null; @@ -9835,26 +12819,32 @@ * @param {Object.} object Plain object * @returns {CMsgHttpResponse} CMsgHttpResponse */ - CMsgHttpResponse.fromObject = function fromObject(object) { + CMsgHttpResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpResponse(); if (object.status_code != null) message.status_code = object.status_code >>> 0; if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".CMsgHttpResponse.headers: array expected"); - message.headers = []; + if (!$Array.isArray(object.headers)) + throw $TypeError(".CMsgHttpResponse.headers: array expected"); + message.headers = $Array(object.headers.length); for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".CMsgHttpResponse.headers: object expected"); - message.headers[i] = $root.CMsgHttpResponse.ResponseHeader.fromObject(object.headers[i]); + if (!$util.isObject(object.headers[i])) + throw $TypeError(".CMsgHttpResponse.headers: object expected"); + message.headers[i] = $root.CMsgHttpResponse.ResponseHeader.fromObject(object.headers[i], _depth + 1); } } if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; return message; }; @@ -9868,31 +12858,35 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHttpResponse.toObject = function toObject(message, options) { + CMsgHttpResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.headers = []; if (options.defaults) { object.status_code = 0; - if (options.bytes === String) + if (options.bytes === $String) object.body = ""; else { object.body = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.body = $util.newBuffer(object.body); } } - if (message.status_code != null && message.hasOwnProperty("status_code")) + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) object.status_code = message.status_code; if (message.headers && message.headers.length) { - object.headers = []; + object.headers = $Array(message.headers.length); for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.CMsgHttpResponse.ResponseHeader.toObject(message.headers[j], options); + object.headers[j] = $root.CMsgHttpResponse.ResponseHeader.toObject(message.headers[j], options, _depth + 1); } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = options.bytes === $String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.body) : message.body; return object; }; @@ -9903,34 +12897,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgHttpResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHttpResponse.prototype.toJSON = function() { + return CMsgHttpResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHttpResponse + * @function getTypeUrl + * @memberof CMsgHttpResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHttpResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpResponse"; }; CMsgHttpResponse.ResponseHeader = (function() { /** * Properties of a ResponseHeader. - * @memberof CMsgHttpResponse - * @interface IResponseHeader + * @typedef {Object} CMsgHttpResponse.ResponseHeader.$Properties * @property {string|null} [name] ResponseHeader name * @property {string|null} [value] ResponseHeader value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ResponseHeader. + * @memberof CMsgHttpResponse + * @interface IResponseHeader + * @augments CMsgHttpResponse.ResponseHeader.$Properties + * @deprecated Use CMsgHttpResponse.ResponseHeader.$Properties instead. + */ + + /** + * Shape of a ResponseHeader. + * @typedef {CMsgHttpResponse.ResponseHeader.$Properties} CMsgHttpResponse.ResponseHeader.$Shape */ /** * Constructs a new ResponseHeader. * @memberof CMsgHttpResponse * @classdesc Represents a ResponseHeader. - * @implements IResponseHeader * @constructor - * @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set + * @param {CMsgHttpResponse.ResponseHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ResponseHeader(properties) { + var ResponseHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ResponseHeader name. @@ -9953,10 +12974,14 @@ * @function create * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set + * @param {CMsgHttpResponse.ResponseHeader.$Properties=} [properties] Properties to set * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader instance + * @type {{ + * (properties: CMsgHttpResponse.ResponseHeader.$Shape): CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape; + * (properties?: CMsgHttpResponse.ResponseHeader.$Properties): CMsgHttpResponse.ResponseHeader; + * }} */ - ResponseHeader.create = function create(properties) { + ResponseHeader.create = function(properties) { return new ResponseHeader(properties); }; @@ -9965,17 +12990,24 @@ * @function encode * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader} message ResponseHeader message or plain object to encode + * @param {CMsgHttpResponse.ResponseHeader.$Properties} message ResponseHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseHeader.encode = function encode(message, writer) { + ResponseHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9984,12 +13016,12 @@ * @function encodeDelimited * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader} message ResponseHeader message or plain object to encode + * @param {CMsgHttpResponse.ResponseHeader.$Properties} message ResponseHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ResponseHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9999,28 +13031,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader + * @returns {CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape} ResponseHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseHeader.decode = function decode(reader, length) { + ResponseHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpResponse.ResponseHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpResponse.ResponseHeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10030,11 +13082,11 @@ * @memberof CMsgHttpResponse.ResponseHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader + * @returns {CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape} ResponseHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseHeader.decodeDelimited = function decodeDelimited(reader) { + ResponseHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10048,13 +13100,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseHeader.verify = function verify(message) { + ResponseHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -10068,14 +13124,20 @@ * @param {Object.} object Plain object * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader */ - ResponseHeader.fromObject = function fromObject(object) { + ResponseHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpResponse.ResponseHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpResponse.ResponseHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpResponse.ResponseHeader(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -10088,17 +13150,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseHeader.toObject = function toObject(message, options) { + ResponseHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -10110,8 +13176,22 @@ * @instance * @returns {Object.} JSON object */ - ResponseHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ResponseHeader.prototype.toJSON = function() { + return ResponseHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ResponseHeader + * @function getTypeUrl + * @memberof CMsgHttpResponse.ResponseHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ResponseHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpResponse.ResponseHeader"; }; return ResponseHeader; @@ -10124,26 +13204,39 @@ /** * Properties of a CMsgAMFindAccounts. - * @exports ICMsgAMFindAccounts - * @interface ICMsgAMFindAccounts + * @typedef {Object} CMsgAMFindAccounts.$Properties * @property {number|null} [search_type] CMsgAMFindAccounts search_type * @property {string|null} [search_string] CMsgAMFindAccounts search_string + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMFindAccounts. + * @exports ICMsgAMFindAccounts + * @interface ICMsgAMFindAccounts + * @augments CMsgAMFindAccounts.$Properties + * @deprecated Use CMsgAMFindAccounts.$Properties instead. + */ + + /** + * Shape of a CMsgAMFindAccounts. + * @typedef {CMsgAMFindAccounts.$Properties} CMsgAMFindAccounts.$Shape */ /** * Constructs a new CMsgAMFindAccounts. * @exports CMsgAMFindAccounts * @classdesc Represents a CMsgAMFindAccounts. - * @implements ICMsgAMFindAccounts * @constructor - * @param {ICMsgAMFindAccounts=} [properties] Properties to set + * @param {CMsgAMFindAccounts.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMFindAccounts(properties) { + var CMsgAMFindAccounts = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMFindAccounts search_type. @@ -10166,10 +13259,14 @@ * @function create * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts=} [properties] Properties to set + * @param {CMsgAMFindAccounts.$Properties=} [properties] Properties to set * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts instance + * @type {{ + * (properties: CMsgAMFindAccounts.$Shape): CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape; + * (properties?: CMsgAMFindAccounts.$Properties): CMsgAMFindAccounts; + * }} */ - CMsgAMFindAccounts.create = function create(properties) { + CMsgAMFindAccounts.create = function(properties) { return new CMsgAMFindAccounts(properties); }; @@ -10178,17 +13275,24 @@ * @function encode * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts} message CMsgAMFindAccounts message or plain object to encode + * @param {CMsgAMFindAccounts.$Properties} message CMsgAMFindAccounts message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccounts.encode = function encode(message, writer) { + CMsgAMFindAccounts.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.search_type != null && Object.hasOwnProperty.call(message, "search_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.search_type); - if (message.search_string != null && Object.hasOwnProperty.call(message, "search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.search_string); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10197,12 +13301,12 @@ * @function encodeDelimited * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts} message CMsgAMFindAccounts message or plain object to encode + * @param {CMsgAMFindAccounts.$Properties} message CMsgAMFindAccounts message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccounts.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMFindAccounts.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10212,28 +13316,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts + * @returns {CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape} CMsgAMFindAccounts * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccounts.decode = function decode(reader, length) { + CMsgAMFindAccounts.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMFindAccounts(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMFindAccounts(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.search_type = reader.uint32(); - break; - case 2: - message.search_string = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.search_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.search_string = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10243,11 +13367,11 @@ * @memberof CMsgAMFindAccounts * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts + * @returns {CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape} CMsgAMFindAccounts * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccounts.decodeDelimited = function decodeDelimited(reader) { + CMsgAMFindAccounts.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10261,13 +13385,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMFindAccounts.verify = function verify(message) { + CMsgAMFindAccounts.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.search_type != null && message.hasOwnProperty("search_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) if (!$util.isInteger(message.search_type)) return "search_type: integer expected"; - if (message.search_string != null && message.hasOwnProperty("search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) if (!$util.isString(message.search_string)) return "search_string: string expected"; return null; @@ -10281,14 +13409,20 @@ * @param {Object.} object Plain object * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts */ - CMsgAMFindAccounts.fromObject = function fromObject(object) { + CMsgAMFindAccounts.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMFindAccounts) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMFindAccounts: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMFindAccounts(); if (object.search_type != null) message.search_type = object.search_type >>> 0; if (object.search_string != null) - message.search_string = String(object.search_string); + message.search_string = $String(object.search_string); return message; }; @@ -10301,17 +13435,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMFindAccounts.toObject = function toObject(message, options) { + CMsgAMFindAccounts.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.search_type = 0; object.search_string = ""; } - if (message.search_type != null && message.hasOwnProperty("search_type")) + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) object.search_type = message.search_type; - if (message.search_string != null && message.hasOwnProperty("search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) object.search_string = message.search_string; return object; }; @@ -10323,8 +13461,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMFindAccounts.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMFindAccounts.prototype.toJSON = function() { + return CMsgAMFindAccounts.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMFindAccounts + * @function getTypeUrl + * @memberof CMsgAMFindAccounts + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMFindAccounts.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMFindAccounts"; }; return CMsgAMFindAccounts; @@ -10332,28 +13484,41 @@ $root.CMsgAMFindAccountsResponse = (function() { + /** + * Properties of a CMsgAMFindAccountsResponse. + * @typedef {Object} CMsgAMFindAccountsResponse.$Properties + * @property {Array.|null} [steam_id] CMsgAMFindAccountsResponse steam_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMFindAccountsResponse. * @exports ICMsgAMFindAccountsResponse * @interface ICMsgAMFindAccountsResponse - * @property {Array.|null} [steam_id] CMsgAMFindAccountsResponse steam_id + * @augments CMsgAMFindAccountsResponse.$Properties + * @deprecated Use CMsgAMFindAccountsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMFindAccountsResponse. + * @typedef {CMsgAMFindAccountsResponse.$Properties} CMsgAMFindAccountsResponse.$Shape */ /** * Constructs a new CMsgAMFindAccountsResponse. * @exports CMsgAMFindAccountsResponse * @classdesc Represents a CMsgAMFindAccountsResponse. - * @implements ICMsgAMFindAccountsResponse * @constructor - * @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set + * @param {CMsgAMFindAccountsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMFindAccountsResponse(properties) { + var CMsgAMFindAccountsResponse = function (properties) { this.steam_id = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMFindAccountsResponse steam_id. @@ -10368,10 +13533,14 @@ * @function create * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set + * @param {CMsgAMFindAccountsResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse instance + * @type {{ + * (properties: CMsgAMFindAccountsResponse.$Shape): CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape; + * (properties?: CMsgAMFindAccountsResponse.$Properties): CMsgAMFindAccountsResponse; + * }} */ - CMsgAMFindAccountsResponse.create = function create(properties) { + CMsgAMFindAccountsResponse.create = function(properties) { return new CMsgAMFindAccountsResponse(properties); }; @@ -10380,16 +13549,23 @@ * @function encode * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse} message CMsgAMFindAccountsResponse message or plain object to encode + * @param {CMsgAMFindAccountsResponse.$Properties} message CMsgAMFindAccountsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccountsResponse.encode = function encode(message, writer) { + CMsgAMFindAccountsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.steam_id != null && message.steam_id.length) for (var i = 0; i < message.steam_id.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10398,12 +13574,12 @@ * @function encodeDelimited * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse} message CMsgAMFindAccountsResponse message or plain object to encode + * @param {CMsgAMFindAccountsResponse.$Properties} message CMsgAMFindAccountsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccountsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMFindAccountsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10413,32 +13589,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse + * @returns {CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape} CMsgAMFindAccountsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccountsResponse.decode = function decode(reader, length) { + CMsgAMFindAccountsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMFindAccountsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMFindAccountsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.steam_id && message.steam_id.length)) - message.steam_id = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.steam_id.push(reader.fixed64()); - } else - message.steam_id.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.steam_id && message.steam_id.length)) + message.steam_id = []; + reader.fixed64s(message.steam_id); + continue; + } + if (wireType !== 1) + break; + if (!(message.steam_id && message.steam_id.length)) + message.steam_id = []; + message.steam_id.push(reader.fixed64()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10448,11 +13642,11 @@ * @memberof CMsgAMFindAccountsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse + * @returns {CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape} CMsgAMFindAccountsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccountsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMFindAccountsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10466,11 +13660,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMFindAccountsResponse.verify = function verify(message) { + CMsgAMFindAccountsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) { - if (!Array.isArray(message.steam_id)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) { + if (!$Array.isArray(message.steam_id)) return "steam_id: array expected"; for (var i = 0; i < message.steam_id.length; ++i) if (!$util.isInteger(message.steam_id[i]) && !(message.steam_id[i] && $util.isInteger(message.steam_id[i].low) && $util.isInteger(message.steam_id[i].high))) @@ -10487,23 +13685,29 @@ * @param {Object.} object Plain object * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse */ - CMsgAMFindAccountsResponse.fromObject = function fromObject(object) { + CMsgAMFindAccountsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMFindAccountsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMFindAccountsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMFindAccountsResponse(); if (object.steam_id) { - if (!Array.isArray(object.steam_id)) - throw TypeError(".CMsgAMFindAccountsResponse.steam_id: array expected"); - message.steam_id = []; + if (!$Array.isArray(object.steam_id)) + throw $TypeError(".CMsgAMFindAccountsResponse.steam_id: array expected"); + message.steam_id = $Array(object.steam_id.length); for (var i = 0; i < object.steam_id.length; ++i) if ($util.Long) - (message.steam_id[i] = $util.Long.fromValue(object.steam_id[i])).unsigned = false; + message.steam_id[i] = $util.Long.fromValue(object.steam_id[i], true); else if (typeof object.steam_id[i] === "string") - message.steam_id[i] = parseInt(object.steam_id[i], 10); + message.steam_id[i] = $parseInt(object.steam_id[i], 10); else if (typeof object.steam_id[i] === "number") message.steam_id[i] = object.steam_id[i]; else if (typeof object.steam_id[i] === "object") - message.steam_id[i] = new $util.LongBits(object.steam_id[i].low >>> 0, object.steam_id[i].high >>> 0).toNumber(); + message.steam_id[i] = new $util.LongBits(object.steam_id[i].low >>> 0, object.steam_id[i].high >>> 0).toNumber(true); } return message; }; @@ -10517,19 +13721,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMFindAccountsResponse.toObject = function toObject(message, options) { + CMsgAMFindAccountsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.steam_id = []; if (message.steam_id && message.steam_id.length) { - object.steam_id = []; + object.steam_id = $Array(message.steam_id.length); for (var j = 0; j < message.steam_id.length; ++j) - if (typeof message.steam_id[j] === "number") - object.steam_id[j] = options.longs === String ? String(message.steam_id[j]) : message.steam_id[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id[j] = typeof message.steam_id[j] === "number" ? $BigInt(message.steam_id[j]) : $util.Long.fromBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0, true).toBigInt(); + else if (typeof message.steam_id[j] === "number") + object.steam_id[j] = options.longs === $String ? $String(message.steam_id[j]) : message.steam_id[j]; else - object.steam_id[j] = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id[j]) : options.longs === Number ? new $util.LongBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0).toNumber() : message.steam_id[j]; + object.steam_id[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id[j]) : options.longs === $Number ? new $util.LongBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0).toNumber(true) : message.steam_id[j]; } return object; }; @@ -10541,8 +13751,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMFindAccountsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMFindAccountsResponse.prototype.toJSON = function() { + return CMsgAMFindAccountsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMFindAccountsResponse + * @function getTypeUrl + * @memberof CMsgAMFindAccountsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMFindAccountsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMFindAccountsResponse"; }; return CMsgAMFindAccountsResponse; @@ -10552,8 +13776,7 @@ /** * Properties of a CMsgNotifyWatchdog. - * @exports ICMsgNotifyWatchdog - * @interface ICMsgNotifyWatchdog + * @typedef {Object} CMsgNotifyWatchdog.$Properties * @property {number|null} [source] CMsgNotifyWatchdog source * @property {number|null} [alert_type] CMsgNotifyWatchdog alert_type * @property {number|null} [alert_destination] CMsgNotifyWatchdog alert_destination @@ -10561,22 +13784,36 @@ * @property {number|null} [time] CMsgNotifyWatchdog time * @property {number|null} [appid] CMsgNotifyWatchdog appid * @property {string|null} [text] CMsgNotifyWatchdog text + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgNotifyWatchdog. + * @exports ICMsgNotifyWatchdog + * @interface ICMsgNotifyWatchdog + * @augments CMsgNotifyWatchdog.$Properties + * @deprecated Use CMsgNotifyWatchdog.$Properties instead. + */ + + /** + * Shape of a CMsgNotifyWatchdog. + * @typedef {CMsgNotifyWatchdog.$Properties} CMsgNotifyWatchdog.$Shape */ /** * Constructs a new CMsgNotifyWatchdog. * @exports CMsgNotifyWatchdog * @classdesc Represents a CMsgNotifyWatchdog. - * @implements ICMsgNotifyWatchdog * @constructor - * @param {ICMsgNotifyWatchdog=} [properties] Properties to set + * @param {CMsgNotifyWatchdog.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotifyWatchdog(properties) { + var CMsgNotifyWatchdog = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgNotifyWatchdog source. @@ -10639,10 +13876,14 @@ * @function create * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog=} [properties] Properties to set + * @param {CMsgNotifyWatchdog.$Properties=} [properties] Properties to set * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog instance + * @type {{ + * (properties: CMsgNotifyWatchdog.$Shape): CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape; + * (properties?: CMsgNotifyWatchdog.$Properties): CMsgNotifyWatchdog; + * }} */ - CMsgNotifyWatchdog.create = function create(properties) { + CMsgNotifyWatchdog.create = function(properties) { return new CMsgNotifyWatchdog(properties); }; @@ -10651,27 +13892,34 @@ * @function encode * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog} message CMsgNotifyWatchdog message or plain object to encode + * @param {CMsgNotifyWatchdog.$Properties} message CMsgNotifyWatchdog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotifyWatchdog.encode = function encode(message, writer) { + CMsgNotifyWatchdog.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.source); - if (message.alert_type != null && Object.hasOwnProperty.call(message, "alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.alert_type); - if (message.alert_destination != null && Object.hasOwnProperty.call(message, "alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.alert_destination); - if (message.critical != null && Object.hasOwnProperty.call(message, "critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.critical); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.time); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.appid); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.text); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10680,12 +13928,12 @@ * @function encodeDelimited * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog} message CMsgNotifyWatchdog message or plain object to encode + * @param {CMsgNotifyWatchdog.$Properties} message CMsgNotifyWatchdog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotifyWatchdog.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotifyWatchdog.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10695,43 +13943,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog + * @returns {CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape} CMsgNotifyWatchdog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotifyWatchdog.decode = function decode(reader, length) { + CMsgNotifyWatchdog.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotifyWatchdog(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotifyWatchdog(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source = reader.uint32(); - break; - case 2: - message.alert_type = reader.uint32(); - break; - case 3: - message.alert_destination = reader.uint32(); - break; - case 4: - message.critical = reader.bool(); - break; - case 5: - message.time = reader.uint32(); - break; - case 6: - message.appid = reader.uint32(); - break; - case 7: - message.text = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.source = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.alert_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.alert_destination = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.critical = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.time = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.text = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10741,11 +14024,11 @@ * @memberof CMsgNotifyWatchdog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog + * @returns {CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape} CMsgNotifyWatchdog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotifyWatchdog.decodeDelimited = function decodeDelimited(reader) { + CMsgNotifyWatchdog.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10759,28 +14042,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotifyWatchdog.verify = function verify(message) { + CMsgNotifyWatchdog.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) if (!$util.isInteger(message.source)) return "source: integer expected"; - if (message.alert_type != null && message.hasOwnProperty("alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) if (!$util.isInteger(message.alert_type)) return "alert_type: integer expected"; - if (message.alert_destination != null && message.hasOwnProperty("alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) if (!$util.isInteger(message.alert_destination)) return "alert_destination: integer expected"; - if (message.critical != null && message.hasOwnProperty("critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) if (typeof message.critical !== "boolean") return "critical: boolean expected"; - if (message.time != null && message.hasOwnProperty("time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) if (!$util.isInteger(message.time)) return "time: integer expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) if (!$util.isString(message.text)) return "text: string expected"; return null; @@ -10794,9 +14081,15 @@ * @param {Object.} object Plain object * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog */ - CMsgNotifyWatchdog.fromObject = function fromObject(object) { + CMsgNotifyWatchdog.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotifyWatchdog) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotifyWatchdog: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotifyWatchdog(); if (object.source != null) message.source = object.source >>> 0; @@ -10805,13 +14098,13 @@ if (object.alert_destination != null) message.alert_destination = object.alert_destination >>> 0; if (object.critical != null) - message.critical = Boolean(object.critical); + message.critical = $Boolean(object.critical); if (object.time != null) message.time = object.time >>> 0; if (object.appid != null) message.appid = object.appid >>> 0; if (object.text != null) - message.text = String(object.text); + message.text = $String(object.text); return message; }; @@ -10824,9 +14117,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotifyWatchdog.toObject = function toObject(message, options) { + CMsgNotifyWatchdog.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.source = 0; @@ -10837,19 +14134,19 @@ object.appid = 0; object.text = ""; } - if (message.source != null && message.hasOwnProperty("source")) + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) object.source = message.source; - if (message.alert_type != null && message.hasOwnProperty("alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) object.alert_type = message.alert_type; - if (message.alert_destination != null && message.hasOwnProperty("alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) object.alert_destination = message.alert_destination; - if (message.critical != null && message.hasOwnProperty("critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) object.critical = message.critical; - if (message.time != null && message.hasOwnProperty("time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) object.time = message.time; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) object.text = message.text; return object; }; @@ -10861,8 +14158,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotifyWatchdog.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotifyWatchdog.prototype.toJSON = function() { + return CMsgNotifyWatchdog.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotifyWatchdog + * @function getTypeUrl + * @memberof CMsgNotifyWatchdog + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotifyWatchdog.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotifyWatchdog"; }; return CMsgNotifyWatchdog; @@ -10870,27 +14181,40 @@ $root.CMsgAMGetLicenses = (function() { + /** + * Properties of a CMsgAMGetLicenses. + * @typedef {Object} CMsgAMGetLicenses.$Properties + * @property {number|Long|null} [steamid] CMsgAMGetLicenses steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMGetLicenses. * @exports ICMsgAMGetLicenses * @interface ICMsgAMGetLicenses - * @property {number|Long|null} [steamid] CMsgAMGetLicenses steamid + * @augments CMsgAMGetLicenses.$Properties + * @deprecated Use CMsgAMGetLicenses.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetLicenses. + * @typedef {CMsgAMGetLicenses.$Properties} CMsgAMGetLicenses.$Shape */ /** * Constructs a new CMsgAMGetLicenses. * @exports CMsgAMGetLicenses * @classdesc Represents a CMsgAMGetLicenses. - * @implements ICMsgAMGetLicenses * @constructor - * @param {ICMsgAMGetLicenses=} [properties] Properties to set + * @param {CMsgAMGetLicenses.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetLicenses(properties) { + var CMsgAMGetLicenses = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetLicenses steamid. @@ -10898,17 +14222,21 @@ * @memberof CMsgAMGetLicenses * @instance */ - CMsgAMGetLicenses.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetLicenses.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgAMGetLicenses instance using the specified properties. * @function create * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses=} [properties] Properties to set + * @param {CMsgAMGetLicenses.$Properties=} [properties] Properties to set * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses instance + * @type {{ + * (properties: CMsgAMGetLicenses.$Shape): CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape; + * (properties?: CMsgAMGetLicenses.$Properties): CMsgAMGetLicenses; + * }} */ - CMsgAMGetLicenses.create = function create(properties) { + CMsgAMGetLicenses.create = function(properties) { return new CMsgAMGetLicenses(properties); }; @@ -10917,15 +14245,22 @@ * @function encode * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses} message CMsgAMGetLicenses message or plain object to encode + * @param {CMsgAMGetLicenses.$Properties} message CMsgAMGetLicenses message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicenses.encode = function encode(message, writer) { + CMsgAMGetLicenses.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10934,12 +14269,12 @@ * @function encodeDelimited * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses} message CMsgAMGetLicenses message or plain object to encode + * @param {CMsgAMGetLicenses.$Properties} message CMsgAMGetLicenses message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicenses.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetLicenses.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10949,25 +14284,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses + * @returns {CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape} CMsgAMGetLicenses * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicenses.decode = function decode(reader, length) { + CMsgAMGetLicenses.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetLicenses(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetLicenses(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10977,11 +14329,11 @@ * @memberof CMsgAMGetLicenses * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses + * @returns {CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape} CMsgAMGetLicenses * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicenses.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetLicenses.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10995,10 +14347,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetLicenses.verify = function verify(message) { + CMsgAMGetLicenses.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -11012,19 +14368,25 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses */ - CMsgAMGetLicenses.fromObject = function fromObject(object) { + CMsgAMGetLicenses.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetLicenses) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetLicenses: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetLicenses(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -11037,21 +14399,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetLicenses.toObject = function toObject(message, options) { + CMsgAMGetLicenses.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -11062,8 +14430,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetLicenses.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetLicenses.prototype.toJSON = function() { + return CMsgAMGetLicenses.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetLicenses + * @function getTypeUrl + * @memberof CMsgAMGetLicenses + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetLicenses.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetLicenses"; }; return CMsgAMGetLicenses; @@ -11073,27 +14455,40 @@ /** * Properties of a CMsgPackageLicense. - * @exports ICMsgPackageLicense - * @interface ICMsgPackageLicense + * @typedef {Object} CMsgPackageLicense.$Properties * @property {number|null} [package_id] CMsgPackageLicense package_id * @property {number|null} [time_created] CMsgPackageLicense time_created * @property {number|null} [owner_id] CMsgPackageLicense owner_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPackageLicense. + * @exports ICMsgPackageLicense + * @interface ICMsgPackageLicense + * @augments CMsgPackageLicense.$Properties + * @deprecated Use CMsgPackageLicense.$Properties instead. + */ + + /** + * Shape of a CMsgPackageLicense. + * @typedef {CMsgPackageLicense.$Properties} CMsgPackageLicense.$Shape */ /** * Constructs a new CMsgPackageLicense. * @exports CMsgPackageLicense * @classdesc Represents a CMsgPackageLicense. - * @implements ICMsgPackageLicense * @constructor - * @param {ICMsgPackageLicense=} [properties] Properties to set + * @param {CMsgPackageLicense.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPackageLicense(properties) { + var CMsgPackageLicense = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPackageLicense package_id. @@ -11124,10 +14519,14 @@ * @function create * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense=} [properties] Properties to set + * @param {CMsgPackageLicense.$Properties=} [properties] Properties to set * @returns {CMsgPackageLicense} CMsgPackageLicense instance + * @type {{ + * (properties: CMsgPackageLicense.$Shape): CMsgPackageLicense & CMsgPackageLicense.$Shape; + * (properties?: CMsgPackageLicense.$Properties): CMsgPackageLicense; + * }} */ - CMsgPackageLicense.create = function create(properties) { + CMsgPackageLicense.create = function(properties) { return new CMsgPackageLicense(properties); }; @@ -11136,19 +14535,26 @@ * @function encode * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense} message CMsgPackageLicense message or plain object to encode + * @param {CMsgPackageLicense.$Properties} message CMsgPackageLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPackageLicense.encode = function encode(message, writer) { + CMsgPackageLicense.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.package_id != null && Object.hasOwnProperty.call(message, "package_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.package_id); - if (message.time_created != null && Object.hasOwnProperty.call(message, "time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.time_created); - if (message.owner_id != null && Object.hasOwnProperty.call(message, "owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.owner_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11157,12 +14563,12 @@ * @function encodeDelimited * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense} message CMsgPackageLicense message or plain object to encode + * @param {CMsgPackageLicense.$Properties} message CMsgPackageLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPackageLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPackageLicense.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11172,31 +14578,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPackageLicense} CMsgPackageLicense + * @returns {CMsgPackageLicense & CMsgPackageLicense.$Shape} CMsgPackageLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPackageLicense.decode = function decode(reader, length) { + CMsgPackageLicense.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPackageLicense(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPackageLicense(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.package_id = reader.uint32(); - break; - case 2: - message.time_created = reader.uint32(); - break; - case 3: - message.owner_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.package_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.time_created = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.owner_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11206,11 +14635,11 @@ * @memberof CMsgPackageLicense * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPackageLicense} CMsgPackageLicense + * @returns {CMsgPackageLicense & CMsgPackageLicense.$Shape} CMsgPackageLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPackageLicense.decodeDelimited = function decodeDelimited(reader) { + CMsgPackageLicense.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11224,16 +14653,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPackageLicense.verify = function verify(message) { + CMsgPackageLicense.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) if (!$util.isInteger(message.package_id)) return "package_id: integer expected"; - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) if (!$util.isInteger(message.time_created)) return "time_created: integer expected"; - if (message.owner_id != null && message.hasOwnProperty("owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) if (!$util.isInteger(message.owner_id)) return "owner_id: integer expected"; return null; @@ -11247,9 +14680,15 @@ * @param {Object.} object Plain object * @returns {CMsgPackageLicense} CMsgPackageLicense */ - CMsgPackageLicense.fromObject = function fromObject(object) { + CMsgPackageLicense.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPackageLicense) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPackageLicense: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPackageLicense(); if (object.package_id != null) message.package_id = object.package_id >>> 0; @@ -11269,20 +14708,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPackageLicense.toObject = function toObject(message, options) { + CMsgPackageLicense.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.package_id = 0; object.time_created = 0; object.owner_id = 0; } - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) object.package_id = message.package_id; - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) object.time_created = message.time_created; - if (message.owner_id != null && message.hasOwnProperty("owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) object.owner_id = message.owner_id; return object; }; @@ -11294,8 +14737,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPackageLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPackageLicense.prototype.toJSON = function() { + return CMsgPackageLicense.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPackageLicense + * @function getTypeUrl + * @memberof CMsgPackageLicense + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPackageLicense.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPackageLicense"; }; return CMsgPackageLicense; @@ -11303,33 +14760,46 @@ $root.CMsgAMGetLicensesResponse = (function() { + /** + * Properties of a CMsgAMGetLicensesResponse. + * @typedef {Object} CMsgAMGetLicensesResponse.$Properties + * @property {Array.|null} [license] CMsgAMGetLicensesResponse license + * @property {number|null} [result] CMsgAMGetLicensesResponse result + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMGetLicensesResponse. * @exports ICMsgAMGetLicensesResponse * @interface ICMsgAMGetLicensesResponse - * @property {Array.|null} [license] CMsgAMGetLicensesResponse license - * @property {number|null} [result] CMsgAMGetLicensesResponse result + * @augments CMsgAMGetLicensesResponse.$Properties + * @deprecated Use CMsgAMGetLicensesResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetLicensesResponse. + * @typedef {CMsgAMGetLicensesResponse.$Properties} CMsgAMGetLicensesResponse.$Shape */ /** * Constructs a new CMsgAMGetLicensesResponse. * @exports CMsgAMGetLicensesResponse * @classdesc Represents a CMsgAMGetLicensesResponse. - * @implements ICMsgAMGetLicensesResponse * @constructor - * @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set + * @param {CMsgAMGetLicensesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetLicensesResponse(properties) { + var CMsgAMGetLicensesResponse = function (properties) { this.license = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetLicensesResponse license. - * @member {Array.} license + * @member {Array.} license * @memberof CMsgAMGetLicensesResponse * @instance */ @@ -11348,10 +14818,14 @@ * @function create * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set + * @param {CMsgAMGetLicensesResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse instance + * @type {{ + * (properties: CMsgAMGetLicensesResponse.$Shape): CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape; + * (properties?: CMsgAMGetLicensesResponse.$Properties): CMsgAMGetLicensesResponse; + * }} */ - CMsgAMGetLicensesResponse.create = function create(properties) { + CMsgAMGetLicensesResponse.create = function(properties) { return new CMsgAMGetLicensesResponse(properties); }; @@ -11360,18 +14834,25 @@ * @function encode * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse} message CMsgAMGetLicensesResponse message or plain object to encode + * @param {CMsgAMGetLicensesResponse.$Properties} message CMsgAMGetLicensesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicensesResponse.encode = function encode(message, writer) { + CMsgAMGetLicensesResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.license != null && message.license.length) for (var i = 0; i < message.license.length; ++i) - $root.CMsgPackageLicense.encode(message.license[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.CMsgPackageLicense.encode(message.license[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.result); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11380,12 +14861,12 @@ * @function encodeDelimited * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse} message CMsgAMGetLicensesResponse message or plain object to encode + * @param {CMsgAMGetLicensesResponse.$Properties} message CMsgAMGetLicensesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicensesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetLicensesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11395,30 +14876,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse + * @returns {CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape} CMsgAMGetLicensesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicensesResponse.decode = function decode(reader, length) { + CMsgAMGetLicensesResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetLicensesResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetLicensesResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.license && message.license.length)) - message.license = []; - message.license.push($root.CMsgPackageLicense.decode(reader, reader.uint32())); - break; - case 2: - message.result = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.license && message.license.length)) + message.license = []; + message.license.push($root.CMsgPackageLicense.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11428,11 +14929,11 @@ * @memberof CMsgAMGetLicensesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse + * @returns {CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape} CMsgAMGetLicensesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicensesResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetLicensesResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11446,19 +14947,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetLicensesResponse.verify = function verify(message) { + CMsgAMGetLicensesResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.license != null && message.hasOwnProperty("license")) { - if (!Array.isArray(message.license)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.license != null && $Object.hasOwnProperty.call(message, "license")) { + if (!$Array.isArray(message.license)) return "license: array expected"; for (var i = 0; i < message.license.length; ++i) { - var error = $root.CMsgPackageLicense.verify(message.license[i]); + var error = $root.CMsgPackageLicense.verify(message.license[i], _depth + 1); if (error) return "license." + error; } } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; return null; @@ -11472,18 +14977,24 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse */ - CMsgAMGetLicensesResponse.fromObject = function fromObject(object) { + CMsgAMGetLicensesResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetLicensesResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetLicensesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetLicensesResponse(); if (object.license) { - if (!Array.isArray(object.license)) - throw TypeError(".CMsgAMGetLicensesResponse.license: array expected"); - message.license = []; + if (!$Array.isArray(object.license)) + throw $TypeError(".CMsgAMGetLicensesResponse.license: array expected"); + message.license = $Array(object.license.length); for (var i = 0; i < object.license.length; ++i) { - if (typeof object.license[i] !== "object") - throw TypeError(".CMsgAMGetLicensesResponse.license: object expected"); - message.license[i] = $root.CMsgPackageLicense.fromObject(object.license[i]); + if (!$util.isObject(object.license[i])) + throw $TypeError(".CMsgAMGetLicensesResponse.license: object expected"); + message.license[i] = $root.CMsgPackageLicense.fromObject(object.license[i], _depth + 1); } } if (object.result != null) @@ -11500,20 +15011,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetLicensesResponse.toObject = function toObject(message, options) { + CMsgAMGetLicensesResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.license = []; if (options.defaults) object.result = 0; if (message.license && message.license.length) { - object.license = []; + object.license = $Array(message.license.length); for (var j = 0; j < message.license.length; ++j) - object.license[j] = $root.CMsgPackageLicense.toObject(message.license[j], options); + object.license[j] = $root.CMsgPackageLicense.toObject(message.license[j], options, _depth + 1); } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; return object; }; @@ -11525,8 +15040,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetLicensesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetLicensesResponse.prototype.toJSON = function() { + return CMsgAMGetLicensesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetLicensesResponse + * @function getTypeUrl + * @memberof CMsgAMGetLicensesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetLicensesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetLicensesResponse"; }; return CMsgAMGetLicensesResponse; @@ -11536,28 +15065,41 @@ /** * Properties of a CMsgAMGetUserGameStats. - * @exports ICMsgAMGetUserGameStats - * @interface ICMsgAMGetUserGameStats + * @typedef {Object} CMsgAMGetUserGameStats.$Properties * @property {number|Long|null} [steam_id] CMsgAMGetUserGameStats steam_id * @property {number|Long|null} [game_id] CMsgAMGetUserGameStats game_id * @property {Array.|null} [stats] CMsgAMGetUserGameStats stats + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGetUserGameStats. + * @exports ICMsgAMGetUserGameStats + * @interface ICMsgAMGetUserGameStats + * @augments CMsgAMGetUserGameStats.$Properties + * @deprecated Use CMsgAMGetUserGameStats.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetUserGameStats. + * @typedef {CMsgAMGetUserGameStats.$Properties} CMsgAMGetUserGameStats.$Shape */ /** * Constructs a new CMsgAMGetUserGameStats. * @exports CMsgAMGetUserGameStats * @classdesc Represents a CMsgAMGetUserGameStats. - * @implements ICMsgAMGetUserGameStats * @constructor - * @param {ICMsgAMGetUserGameStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetUserGameStats(properties) { + var CMsgAMGetUserGameStats = function (properties) { this.stats = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetUserGameStats steam_id. @@ -11565,7 +15107,7 @@ * @memberof CMsgAMGetUserGameStats * @instance */ - CMsgAMGetUserGameStats.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStats.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStats game_id. @@ -11573,7 +15115,7 @@ * @memberof CMsgAMGetUserGameStats * @instance */ - CMsgAMGetUserGameStats.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStats.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStats stats. @@ -11588,10 +15130,14 @@ * @function create * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStats.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats instance + * @type {{ + * (properties: CMsgAMGetUserGameStats.$Shape): CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape; + * (properties?: CMsgAMGetUserGameStats.$Properties): CMsgAMGetUserGameStats; + * }} */ - CMsgAMGetUserGameStats.create = function create(properties) { + CMsgAMGetUserGameStats.create = function(properties) { return new CMsgAMGetUserGameStats(properties); }; @@ -11600,20 +15146,27 @@ * @function encode * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats} message CMsgAMGetUserGameStats message or plain object to encode + * @param {CMsgAMGetUserGameStats.$Properties} message CMsgAMGetUserGameStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStats.encode = function encode(message, writer) { + CMsgAMGetUserGameStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.game_id != null && Object.hasOwnProperty.call(message, "game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.game_id); if (message.stats != null && message.stats.length) for (var i = 0; i < message.stats.length; ++i) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stats[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11622,12 +15175,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats} message CMsgAMGetUserGameStats message or plain object to encode + * @param {CMsgAMGetUserGameStats.$Properties} message CMsgAMGetUserGameStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetUserGameStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11637,38 +15190,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats + * @returns {CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape} CMsgAMGetUserGameStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStats.decode = function decode(reader, length) { + CMsgAMGetUserGameStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.game_id = reader.fixed64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 3: - if (!(message.stats && message.stats.length)) - message.stats = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.stats.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.game_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.stats && message.stats.length)) + message.stats = []; + reader.uint32s(message.stats); + continue; + } + if (wireType !== 0) + break; + if (!(message.stats && message.stats.length)) + message.stats = []; message.stats.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11678,11 +15255,11 @@ * @memberof CMsgAMGetUserGameStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats + * @returns {CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape} CMsgAMGetUserGameStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStats.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetUserGameStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11696,17 +15273,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetUserGameStats.verify = function verify(message) { + CMsgAMGetUserGameStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.game_id != null && message.hasOwnProperty("game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) if (!$util.isInteger(message.game_id) && !(message.game_id && $util.isInteger(message.game_id.low) && $util.isInteger(message.game_id.high))) return "game_id: integer|Long expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - if (!Array.isArray(message.stats)) + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) { + if (!$Array.isArray(message.stats)) return "stats: array expected"; for (var i = 0; i < message.stats.length; ++i) if (!$util.isInteger(message.stats[i])) @@ -11723,32 +15304,38 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats */ - CMsgAMGetUserGameStats.fromObject = function fromObject(object) { + CMsgAMGetUserGameStats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStats(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.game_id != null) if ($util.Long) - (message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false; + message.game_id = $util.Long.fromValue(object.game_id, true); else if (typeof object.game_id === "string") - message.game_id = parseInt(object.game_id, 10); + message.game_id = $parseInt(object.game_id, 10); else if (typeof object.game_id === "number") message.game_id = object.game_id; else if (typeof object.game_id === "object") - message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(); + message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(true); if (object.stats) { - if (!Array.isArray(object.stats)) - throw TypeError(".CMsgAMGetUserGameStats.stats: array expected"); - message.stats = []; + if (!$Array.isArray(object.stats)) + throw $TypeError(".CMsgAMGetUserGameStats.stats: array expected"); + message.stats = $Array(object.stats.length); for (var i = 0; i < object.stats.length; ++i) message.stats[i] = object.stats[i] >>> 0; } @@ -11764,36 +15351,44 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetUserGameStats.toObject = function toObject(message, options) { + CMsgAMGetUserGameStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.stats = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.game_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.game_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.game_id = options.longs === String ? "0" : 0; + object.game_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.game_id != null && message.hasOwnProperty("game_id")) - if (typeof message.game_id === "number") - object.game_id = options.longs === String ? String(message.game_id) : message.game_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.game_id = typeof message.game_id === "number" ? $BigInt(message.game_id) : $util.Long.fromBits(message.game_id.low >>> 0, message.game_id.high >>> 0, true).toBigInt(); + else if (typeof message.game_id === "number") + object.game_id = options.longs === $String ? $String(message.game_id) : message.game_id; else - object.game_id = options.longs === String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber() : message.game_id; + object.game_id = options.longs === $String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === $Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber(true) : message.game_id; if (message.stats && message.stats.length) { - object.stats = []; + object.stats = $Array(message.stats.length); for (var j = 0; j < message.stats.length; ++j) object.stats[j] = message.stats[j]; } @@ -11807,8 +15402,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetUserGameStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetUserGameStats.prototype.toJSON = function() { + return CMsgAMGetUserGameStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetUserGameStats + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetUserGameStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStats"; }; return CMsgAMGetUserGameStats; @@ -11818,31 +15427,44 @@ /** * Properties of a CMsgAMGetUserGameStatsResponse. - * @exports ICMsgAMGetUserGameStatsResponse - * @interface ICMsgAMGetUserGameStatsResponse + * @typedef {Object} CMsgAMGetUserGameStatsResponse.$Properties * @property {number|Long|null} [steam_id] CMsgAMGetUserGameStatsResponse steam_id * @property {number|Long|null} [game_id] CMsgAMGetUserGameStatsResponse game_id * @property {number|null} [eresult] CMsgAMGetUserGameStatsResponse eresult - * @property {Array.|null} [stats] CMsgAMGetUserGameStatsResponse stats - * @property {Array.|null} [achievement_blocks] CMsgAMGetUserGameStatsResponse achievement_blocks + * @property {Array.|null} [stats] CMsgAMGetUserGameStatsResponse stats + * @property {Array.|null} [achievement_blocks] CMsgAMGetUserGameStatsResponse achievement_blocks + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGetUserGameStatsResponse. + * @exports ICMsgAMGetUserGameStatsResponse + * @interface ICMsgAMGetUserGameStatsResponse + * @augments CMsgAMGetUserGameStatsResponse.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetUserGameStatsResponse. + * @typedef {CMsgAMGetUserGameStatsResponse.$Properties} CMsgAMGetUserGameStatsResponse.$Shape */ /** * Constructs a new CMsgAMGetUserGameStatsResponse. * @exports CMsgAMGetUserGameStatsResponse * @classdesc Represents a CMsgAMGetUserGameStatsResponse. - * @implements ICMsgAMGetUserGameStatsResponse * @constructor - * @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetUserGameStatsResponse(properties) { + var CMsgAMGetUserGameStatsResponse = function (properties) { this.stats = []; this.achievement_blocks = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetUserGameStatsResponse steam_id. @@ -11850,7 +15472,7 @@ * @memberof CMsgAMGetUserGameStatsResponse * @instance */ - CMsgAMGetUserGameStatsResponse.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStatsResponse.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStatsResponse game_id. @@ -11858,7 +15480,7 @@ * @memberof CMsgAMGetUserGameStatsResponse * @instance */ - CMsgAMGetUserGameStatsResponse.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStatsResponse.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStatsResponse eresult. @@ -11870,7 +15492,7 @@ /** * CMsgAMGetUserGameStatsResponse stats. - * @member {Array.} stats + * @member {Array.} stats * @memberof CMsgAMGetUserGameStatsResponse * @instance */ @@ -11878,7 +15500,7 @@ /** * CMsgAMGetUserGameStatsResponse achievement_blocks. - * @member {Array.} achievement_blocks + * @member {Array.} achievement_blocks * @memberof CMsgAMGetUserGameStatsResponse * @instance */ @@ -11889,10 +15511,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.$Shape): CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.$Properties): CMsgAMGetUserGameStatsResponse; + * }} */ - CMsgAMGetUserGameStatsResponse.create = function create(properties) { + CMsgAMGetUserGameStatsResponse.create = function(properties) { return new CMsgAMGetUserGameStatsResponse(properties); }; @@ -11901,25 +15527,32 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse} message CMsgAMGetUserGameStatsResponse message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.$Properties} message CMsgAMGetUserGameStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStatsResponse.encode = function encode(message, writer) { + CMsgAMGetUserGameStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.game_id != null && Object.hasOwnProperty.call(message, "game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.game_id); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.eresult); if (message.stats != null && message.stats.length) for (var i = 0; i < message.stats.length; ++i) - $root.CMsgAMGetUserGameStatsResponse.Stats.encode(message.stats[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgAMGetUserGameStatsResponse.Stats.encode(message.stats[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.achievement_blocks != null && message.achievement_blocks.length) for (var i = 0; i < message.achievement_blocks.length; ++i) - $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.encode(message.achievement_blocks[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.encode(message.achievement_blocks[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11928,12 +15561,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse} message CMsgAMGetUserGameStatsResponse message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.$Properties} message CMsgAMGetUserGameStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetUserGameStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11943,41 +15576,70 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse + * @returns {CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape} CMsgAMGetUserGameStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStatsResponse.decode = function decode(reader, length) { + CMsgAMGetUserGameStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.game_id = reader.fixed64(); - break; - case 3: - message.eresult = reader.int32(); - break; - case 4: - if (!(message.stats && message.stats.length)) - message.stats = []; - message.stats.push($root.CMsgAMGetUserGameStatsResponse.Stats.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.achievement_blocks && message.achievement_blocks.length)) - message.achievement_blocks = []; - message.achievement_blocks.push($root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.game_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.stats && message.stats.length)) + message.stats = []; + message.stats.push($root.CMsgAMGetUserGameStatsResponse.Stats.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.achievement_blocks && message.achievement_blocks.length)) + message.achievement_blocks = []; + message.achievement_blocks.push($root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11987,11 +15649,11 @@ * @memberof CMsgAMGetUserGameStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse + * @returns {CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape} CMsgAMGetUserGameStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetUserGameStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12005,32 +15667,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetUserGameStatsResponse.verify = function verify(message) { + CMsgAMGetUserGameStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.game_id != null && message.hasOwnProperty("game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) if (!$util.isInteger(message.game_id) && !(message.game_id && $util.isInteger(message.game_id.low) && $util.isInteger(message.game_id.high))) return "game_id: integer|Long expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - if (!Array.isArray(message.stats)) + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) { + if (!$Array.isArray(message.stats)) return "stats: array expected"; for (var i = 0; i < message.stats.length; ++i) { - var error = $root.CMsgAMGetUserGameStatsResponse.Stats.verify(message.stats[i]); + var error = $root.CMsgAMGetUserGameStatsResponse.Stats.verify(message.stats[i], _depth + 1); if (error) return "stats." + error; } } - if (message.achievement_blocks != null && message.hasOwnProperty("achievement_blocks")) { - if (!Array.isArray(message.achievement_blocks)) + if (message.achievement_blocks != null && $Object.hasOwnProperty.call(message, "achievement_blocks")) { + if (!$Array.isArray(message.achievement_blocks)) return "achievement_blocks: array expected"; for (var i = 0; i < message.achievement_blocks.length; ++i) { - var error = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify(message.achievement_blocks[i]); + var error = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify(message.achievement_blocks[i], _depth + 1); if (error) return "achievement_blocks." + error; } @@ -12046,48 +15712,54 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse */ - CMsgAMGetUserGameStatsResponse.fromObject = function fromObject(object) { + CMsgAMGetUserGameStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.game_id != null) if ($util.Long) - (message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false; + message.game_id = $util.Long.fromValue(object.game_id, true); else if (typeof object.game_id === "string") - message.game_id = parseInt(object.game_id, 10); + message.game_id = $parseInt(object.game_id, 10); else if (typeof object.game_id === "number") message.game_id = object.game_id; else if (typeof object.game_id === "object") - message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(); + message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(true); if (object.eresult != null) message.eresult = object.eresult | 0; if (object.stats) { - if (!Array.isArray(object.stats)) - throw TypeError(".CMsgAMGetUserGameStatsResponse.stats: array expected"); - message.stats = []; + if (!$Array.isArray(object.stats)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.stats: array expected"); + message.stats = $Array(object.stats.length); for (var i = 0; i < object.stats.length; ++i) { - if (typeof object.stats[i] !== "object") - throw TypeError(".CMsgAMGetUserGameStatsResponse.stats: object expected"); - message.stats[i] = $root.CMsgAMGetUserGameStatsResponse.Stats.fromObject(object.stats[i]); + if (!$util.isObject(object.stats[i])) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.stats: object expected"); + message.stats[i] = $root.CMsgAMGetUserGameStatsResponse.Stats.fromObject(object.stats[i], _depth + 1); } } if (object.achievement_blocks) { - if (!Array.isArray(object.achievement_blocks)) - throw TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: array expected"); - message.achievement_blocks = []; + if (!$Array.isArray(object.achievement_blocks)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: array expected"); + message.achievement_blocks = $Array(object.achievement_blocks.length); for (var i = 0; i < object.achievement_blocks.length; ++i) { - if (typeof object.achievement_blocks[i] !== "object") - throw TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: object expected"); - message.achievement_blocks[i] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.fromObject(object.achievement_blocks[i]); + if (!$util.isObject(object.achievement_blocks[i])) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: object expected"); + message.achievement_blocks[i] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.fromObject(object.achievement_blocks[i], _depth + 1); } } return message; @@ -12102,9 +15774,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetUserGameStatsResponse.toObject = function toObject(message, options) { + CMsgAMGetUserGameStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.stats = []; @@ -12112,38 +15788,42 @@ } if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.game_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.game_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.game_id = options.longs === String ? "0" : 0; + object.game_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.eresult = 2; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.game_id != null && message.hasOwnProperty("game_id")) - if (typeof message.game_id === "number") - object.game_id = options.longs === String ? String(message.game_id) : message.game_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.game_id = typeof message.game_id === "number" ? $BigInt(message.game_id) : $util.Long.fromBits(message.game_id.low >>> 0, message.game_id.high >>> 0, true).toBigInt(); + else if (typeof message.game_id === "number") + object.game_id = options.longs === $String ? $String(message.game_id) : message.game_id; else - object.game_id = options.longs === String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber() : message.game_id; - if (message.eresult != null && message.hasOwnProperty("eresult")) + object.game_id = options.longs === $String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === $Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber(true) : message.game_id; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; if (message.stats && message.stats.length) { - object.stats = []; + object.stats = $Array(message.stats.length); for (var j = 0; j < message.stats.length; ++j) - object.stats[j] = $root.CMsgAMGetUserGameStatsResponse.Stats.toObject(message.stats[j], options); + object.stats[j] = $root.CMsgAMGetUserGameStatsResponse.Stats.toObject(message.stats[j], options, _depth + 1); } if (message.achievement_blocks && message.achievement_blocks.length) { - object.achievement_blocks = []; + object.achievement_blocks = $Array(message.achievement_blocks.length); for (var j = 0; j < message.achievement_blocks.length; ++j) - object.achievement_blocks[j] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.toObject(message.achievement_blocks[j], options); + object.achievement_blocks[j] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.toObject(message.achievement_blocks[j], options, _depth + 1); } return object; }; @@ -12155,34 +15835,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetUserGameStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetUserGameStatsResponse.prototype.toJSON = function() { + return CMsgAMGetUserGameStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetUserGameStatsResponse + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetUserGameStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse"; }; CMsgAMGetUserGameStatsResponse.Stats = (function() { /** * Properties of a Stats. - * @memberof CMsgAMGetUserGameStatsResponse - * @interface IStats + * @typedef {Object} CMsgAMGetUserGameStatsResponse.Stats.$Properties * @property {number|null} [stat_id] Stats stat_id * @property {number|null} [stat_value] Stats stat_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Stats. + * @memberof CMsgAMGetUserGameStatsResponse + * @interface IStats + * @augments CMsgAMGetUserGameStatsResponse.Stats.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.Stats.$Properties instead. + */ + + /** + * Shape of a Stats. + * @typedef {CMsgAMGetUserGameStatsResponse.Stats.$Properties} CMsgAMGetUserGameStatsResponse.Stats.$Shape */ /** * Constructs a new Stats. * @memberof CMsgAMGetUserGameStatsResponse * @classdesc Represents a Stats. - * @implements IStats * @constructor - * @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Stats(properties) { + var Stats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Stats stat_id. @@ -12205,10 +15912,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.Stats.$Shape): CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.Stats.$Properties): CMsgAMGetUserGameStatsResponse.Stats; + * }} */ - Stats.create = function create(properties) { + Stats.create = function(properties) { return new Stats(properties); }; @@ -12217,17 +15928,24 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats} message Stats message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stats.encode = function encode(message, writer) { + Stats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.stat_id != null && Object.hasOwnProperty.call(message, "stat_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.stat_id); - if (message.stat_value != null && Object.hasOwnProperty.call(message, "stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.stat_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12236,12 +15954,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats} message Stats message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Stats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12251,28 +15969,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats + * @returns {CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stats.decode = function decode(reader, length) { + Stats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse.Stats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse.Stats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stat_id = reader.uint32(); - break; - case 2: - message.stat_value = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.stat_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.stat_value = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12282,11 +16020,11 @@ * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats + * @returns {CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stats.decodeDelimited = function decodeDelimited(reader) { + Stats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12300,13 +16038,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Stats.verify = function verify(message) { + Stats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.stat_id != null && message.hasOwnProperty("stat_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) if (!$util.isInteger(message.stat_id)) return "stat_id: integer expected"; - if (message.stat_value != null && message.hasOwnProperty("stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) if (!$util.isInteger(message.stat_value)) return "stat_value: integer expected"; return null; @@ -12320,9 +16062,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats */ - Stats.fromObject = function fromObject(object) { + Stats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Stats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.Stats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse.Stats(); if (object.stat_id != null) message.stat_id = object.stat_id >>> 0; @@ -12340,17 +16088,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Stats.toObject = function toObject(message, options) { + Stats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.stat_id = 0; object.stat_value = 0; } - if (message.stat_id != null && message.hasOwnProperty("stat_id")) + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) object.stat_id = message.stat_id; - if (message.stat_value != null && message.hasOwnProperty("stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) object.stat_value = message.stat_value; return object; }; @@ -12362,8 +16114,22 @@ * @instance * @returns {Object.} JSON object */ - Stats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Stats.prototype.toJSON = function() { + return Stats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Stats + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse.Stats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Stats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse.Stats"; }; return Stats; @@ -12373,27 +16139,40 @@ /** * Properties of an Achievement_Blocks. - * @memberof CMsgAMGetUserGameStatsResponse - * @interface IAchievement_Blocks + * @typedef {Object} CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties * @property {number|null} [achievement_id] Achievement_Blocks achievement_id * @property {number|null} [achievement_bit_id] Achievement_Blocks achievement_bit_id * @property {number|null} [unlock_time] Achievement_Blocks unlock_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Achievement_Blocks. + * @memberof CMsgAMGetUserGameStatsResponse + * @interface IAchievement_Blocks + * @augments CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties instead. + */ + + /** + * Shape of an Achievement_Blocks. + * @typedef {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape */ /** * Constructs a new Achievement_Blocks. * @memberof CMsgAMGetUserGameStatsResponse * @classdesc Represents an Achievement_Blocks. - * @implements IAchievement_Blocks * @constructor - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Achievement_Blocks(properties) { + var Achievement_Blocks = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Achievement_Blocks achievement_id. @@ -12424,10 +16203,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape): CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties): CMsgAMGetUserGameStatsResponse.Achievement_Blocks; + * }} */ - Achievement_Blocks.create = function create(properties) { + Achievement_Blocks.create = function(properties) { return new Achievement_Blocks(properties); }; @@ -12436,19 +16219,26 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} message Achievement_Blocks message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} message Achievement_Blocks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Achievement_Blocks.encode = function encode(message, writer) { + Achievement_Blocks.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.achievement_id != null && Object.hasOwnProperty.call(message, "achievement_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.achievement_id); - if (message.achievement_bit_id != null && Object.hasOwnProperty.call(message, "achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.achievement_bit_id); - if (message.unlock_time != null && Object.hasOwnProperty.call(message, "unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.unlock_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12457,12 +16247,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} message Achievement_Blocks message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} message Achievement_Blocks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Achievement_Blocks.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Achievement_Blocks.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12472,31 +16262,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks + * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape} Achievement_Blocks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Achievement_Blocks.decode = function decode(reader, length) { + Achievement_Blocks.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.achievement_id = reader.uint32(); - break; - case 2: - message.achievement_bit_id = reader.uint32(); - break; - case 3: - message.unlock_time = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.achievement_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.achievement_bit_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.unlock_time = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12506,11 +16319,11 @@ * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks + * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape} Achievement_Blocks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Achievement_Blocks.decodeDelimited = function decodeDelimited(reader) { + Achievement_Blocks.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12524,16 +16337,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Achievement_Blocks.verify = function verify(message) { + Achievement_Blocks.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.achievement_id != null && message.hasOwnProperty("achievement_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) if (!$util.isInteger(message.achievement_id)) return "achievement_id: integer expected"; - if (message.achievement_bit_id != null && message.hasOwnProperty("achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) if (!$util.isInteger(message.achievement_bit_id)) return "achievement_bit_id: integer expected"; - if (message.unlock_time != null && message.hasOwnProperty("unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) if (!$util.isInteger(message.unlock_time)) return "unlock_time: integer expected"; return null; @@ -12547,9 +16364,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks */ - Achievement_Blocks.fromObject = function fromObject(object) { + Achievement_Blocks.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.Achievement_Blocks: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); if (object.achievement_id != null) message.achievement_id = object.achievement_id >>> 0; @@ -12569,20 +16392,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Achievement_Blocks.toObject = function toObject(message, options) { + Achievement_Blocks.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.achievement_id = 0; object.achievement_bit_id = 0; object.unlock_time = 0; } - if (message.achievement_id != null && message.hasOwnProperty("achievement_id")) + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) object.achievement_id = message.achievement_id; - if (message.achievement_bit_id != null && message.hasOwnProperty("achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) object.achievement_bit_id = message.achievement_bit_id; - if (message.unlock_time != null && message.hasOwnProperty("unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) object.unlock_time = message.unlock_time; return object; }; @@ -12594,8 +16421,22 @@ * @instance * @returns {Object.} JSON object */ - Achievement_Blocks.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Achievement_Blocks.prototype.toJSON = function() { + return Achievement_Blocks.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Achievement_Blocks + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Achievement_Blocks.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse.Achievement_Blocks"; }; return Achievement_Blocks; @@ -12608,26 +16449,39 @@ /** * Properties of a CMsgGCGetCommandList. - * @exports ICMsgGCGetCommandList - * @interface ICMsgGCGetCommandList + * @typedef {Object} CMsgGCGetCommandList.$Properties * @property {number|null} [app_id] CMsgGCGetCommandList app_id * @property {string|null} [command_prefix] CMsgGCGetCommandList command_prefix + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetCommandList. + * @exports ICMsgGCGetCommandList + * @interface ICMsgGCGetCommandList + * @augments CMsgGCGetCommandList.$Properties + * @deprecated Use CMsgGCGetCommandList.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetCommandList. + * @typedef {CMsgGCGetCommandList.$Properties} CMsgGCGetCommandList.$Shape */ /** * Constructs a new CMsgGCGetCommandList. * @exports CMsgGCGetCommandList * @classdesc Represents a CMsgGCGetCommandList. - * @implements ICMsgGCGetCommandList * @constructor - * @param {ICMsgGCGetCommandList=} [properties] Properties to set + * @param {CMsgGCGetCommandList.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetCommandList(properties) { + var CMsgGCGetCommandList = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetCommandList app_id. @@ -12650,10 +16504,14 @@ * @function create * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList=} [properties] Properties to set + * @param {CMsgGCGetCommandList.$Properties=} [properties] Properties to set * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList instance + * @type {{ + * (properties: CMsgGCGetCommandList.$Shape): CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape; + * (properties?: CMsgGCGetCommandList.$Properties): CMsgGCGetCommandList; + * }} */ - CMsgGCGetCommandList.create = function create(properties) { + CMsgGCGetCommandList.create = function(properties) { return new CMsgGCGetCommandList(properties); }; @@ -12662,17 +16520,24 @@ * @function encode * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList} message CMsgGCGetCommandList message or plain object to encode + * @param {CMsgGCGetCommandList.$Properties} message CMsgGCGetCommandList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandList.encode = function encode(message, writer) { + CMsgGCGetCommandList.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_id); - if (message.command_prefix != null && Object.hasOwnProperty.call(message, "command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.command_prefix); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12681,12 +16546,12 @@ * @function encodeDelimited * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList} message CMsgGCGetCommandList message or plain object to encode + * @param {CMsgGCGetCommandList.$Properties} message CMsgGCGetCommandList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetCommandList.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12696,28 +16561,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList + * @returns {CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape} CMsgGCGetCommandList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandList.decode = function decode(reader, length) { + CMsgGCGetCommandList.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetCommandList(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetCommandList(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_id = reader.uint32(); - break; - case 2: - message.command_prefix = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.command_prefix = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12727,11 +16612,11 @@ * @memberof CMsgGCGetCommandList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList + * @returns {CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape} CMsgGCGetCommandList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandList.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetCommandList.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12745,13 +16630,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetCommandList.verify = function verify(message) { + CMsgGCGetCommandList.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.command_prefix != null && message.hasOwnProperty("command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) if (!$util.isString(message.command_prefix)) return "command_prefix: string expected"; return null; @@ -12765,14 +16654,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList */ - CMsgGCGetCommandList.fromObject = function fromObject(object) { + CMsgGCGetCommandList.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetCommandList) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetCommandList: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetCommandList(); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.command_prefix != null) - message.command_prefix = String(object.command_prefix); + message.command_prefix = $String(object.command_prefix); return message; }; @@ -12785,17 +16680,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetCommandList.toObject = function toObject(message, options) { + CMsgGCGetCommandList.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.app_id = 0; object.command_prefix = ""; } - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.command_prefix != null && message.hasOwnProperty("command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) object.command_prefix = message.command_prefix; return object; }; @@ -12807,8 +16706,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetCommandList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetCommandList.prototype.toJSON = function() { + return CMsgGCGetCommandList.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetCommandList + * @function getTypeUrl + * @memberof CMsgGCGetCommandList + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetCommandList.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetCommandList"; }; return CMsgGCGetCommandList; @@ -12816,28 +16729,41 @@ $root.CMsgGCGetCommandListResponse = (function() { + /** + * Properties of a CMsgGCGetCommandListResponse. + * @typedef {Object} CMsgGCGetCommandListResponse.$Properties + * @property {Array.|null} [command_name] CMsgGCGetCommandListResponse command_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetCommandListResponse. * @exports ICMsgGCGetCommandListResponse * @interface ICMsgGCGetCommandListResponse - * @property {Array.|null} [command_name] CMsgGCGetCommandListResponse command_name + * @augments CMsgGCGetCommandListResponse.$Properties + * @deprecated Use CMsgGCGetCommandListResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetCommandListResponse. + * @typedef {CMsgGCGetCommandListResponse.$Properties} CMsgGCGetCommandListResponse.$Shape */ /** * Constructs a new CMsgGCGetCommandListResponse. * @exports CMsgGCGetCommandListResponse * @classdesc Represents a CMsgGCGetCommandListResponse. - * @implements ICMsgGCGetCommandListResponse * @constructor - * @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set + * @param {CMsgGCGetCommandListResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetCommandListResponse(properties) { + var CMsgGCGetCommandListResponse = function (properties) { this.command_name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetCommandListResponse command_name. @@ -12852,10 +16778,14 @@ * @function create * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set + * @param {CMsgGCGetCommandListResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse instance + * @type {{ + * (properties: CMsgGCGetCommandListResponse.$Shape): CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape; + * (properties?: CMsgGCGetCommandListResponse.$Properties): CMsgGCGetCommandListResponse; + * }} */ - CMsgGCGetCommandListResponse.create = function create(properties) { + CMsgGCGetCommandListResponse.create = function(properties) { return new CMsgGCGetCommandListResponse(properties); }; @@ -12864,16 +16794,23 @@ * @function encode * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse} message CMsgGCGetCommandListResponse message or plain object to encode + * @param {CMsgGCGetCommandListResponse.$Properties} message CMsgGCGetCommandListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandListResponse.encode = function encode(message, writer) { + CMsgGCGetCommandListResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.command_name != null && message.command_name.length) for (var i = 0; i < message.command_name.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.command_name[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12882,12 +16819,12 @@ * @function encodeDelimited * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse} message CMsgGCGetCommandListResponse message or plain object to encode + * @param {CMsgGCGetCommandListResponse.$Properties} message CMsgGCGetCommandListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetCommandListResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12897,27 +16834,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse + * @returns {CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape} CMsgGCGetCommandListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandListResponse.decode = function decode(reader, length) { + CMsgGCGetCommandListResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetCommandListResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetCommandListResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.command_name && message.command_name.length)) - message.command_name = []; - message.command_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.command_name && message.command_name.length)) + message.command_name = []; + message.command_name.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12927,11 +16881,11 @@ * @memberof CMsgGCGetCommandListResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse + * @returns {CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape} CMsgGCGetCommandListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandListResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetCommandListResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12945,11 +16899,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetCommandListResponse.verify = function verify(message) { + CMsgGCGetCommandListResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.command_name != null && message.hasOwnProperty("command_name")) { - if (!Array.isArray(message.command_name)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.command_name != null && $Object.hasOwnProperty.call(message, "command_name")) { + if (!$Array.isArray(message.command_name)) return "command_name: array expected"; for (var i = 0; i < message.command_name.length; ++i) if (!$util.isString(message.command_name[i])) @@ -12966,16 +16924,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse */ - CMsgGCGetCommandListResponse.fromObject = function fromObject(object) { + CMsgGCGetCommandListResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetCommandListResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetCommandListResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetCommandListResponse(); if (object.command_name) { - if (!Array.isArray(object.command_name)) - throw TypeError(".CMsgGCGetCommandListResponse.command_name: array expected"); - message.command_name = []; + if (!$Array.isArray(object.command_name)) + throw $TypeError(".CMsgGCGetCommandListResponse.command_name: array expected"); + message.command_name = $Array(object.command_name.length); for (var i = 0; i < object.command_name.length; ++i) - message.command_name[i] = String(object.command_name[i]); + message.command_name[i] = $String(object.command_name[i]); } return message; }; @@ -12989,14 +16953,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetCommandListResponse.toObject = function toObject(message, options) { + CMsgGCGetCommandListResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.command_name = []; if (message.command_name && message.command_name.length) { - object.command_name = []; + object.command_name = $Array(message.command_name.length); for (var j = 0; j < message.command_name.length; ++j) object.command_name[j] = message.command_name[j]; } @@ -13010,8 +16978,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetCommandListResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetCommandListResponse.prototype.toJSON = function() { + return CMsgGCGetCommandListResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetCommandListResponse + * @function getTypeUrl + * @memberof CMsgGCGetCommandListResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetCommandListResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetCommandListResponse"; }; return CMsgGCGetCommandListResponse; @@ -13019,28 +17001,41 @@ $root.CGCMsgMemCachedGet = (function() { + /** + * Properties of a CGCMsgMemCachedGet. + * @typedef {Object} CGCMsgMemCachedGet.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedGet keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedGet. * @exports ICGCMsgMemCachedGet * @interface ICGCMsgMemCachedGet - * @property {Array.|null} [keys] CGCMsgMemCachedGet keys + * @augments CGCMsgMemCachedGet.$Properties + * @deprecated Use CGCMsgMemCachedGet.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedGet. + * @typedef {CGCMsgMemCachedGet.$Properties} CGCMsgMemCachedGet.$Shape */ /** * Constructs a new CGCMsgMemCachedGet. * @exports CGCMsgMemCachedGet * @classdesc Represents a CGCMsgMemCachedGet. - * @implements ICGCMsgMemCachedGet * @constructor - * @param {ICGCMsgMemCachedGet=} [properties] Properties to set + * @param {CGCMsgMemCachedGet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedGet(properties) { + var CGCMsgMemCachedGet = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedGet keys. @@ -13055,10 +17050,14 @@ * @function create * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet=} [properties] Properties to set + * @param {CGCMsgMemCachedGet.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet instance + * @type {{ + * (properties: CGCMsgMemCachedGet.$Shape): CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape; + * (properties?: CGCMsgMemCachedGet.$Properties): CGCMsgMemCachedGet; + * }} */ - CGCMsgMemCachedGet.create = function create(properties) { + CGCMsgMemCachedGet.create = function(properties) { return new CGCMsgMemCachedGet(properties); }; @@ -13067,16 +17066,23 @@ * @function encode * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet} message CGCMsgMemCachedGet message or plain object to encode + * @param {CGCMsgMemCachedGet.$Properties} message CGCMsgMemCachedGet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGet.encode = function encode(message, writer) { + CGCMsgMemCachedGet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keys[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13085,12 +17091,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet} message CGCMsgMemCachedGet message or plain object to encode + * @param {CGCMsgMemCachedGet.$Properties} message CGCMsgMemCachedGet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedGet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13100,27 +17106,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet + * @returns {CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape} CGCMsgMemCachedGet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGet.decode = function decode(reader, length) { + CGCMsgMemCachedGet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13130,11 +17153,11 @@ * @memberof CGCMsgMemCachedGet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet + * @returns {CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape} CGCMsgMemCachedGet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGet.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedGet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13148,11 +17171,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedGet.verify = function verify(message) { + CGCMsgMemCachedGet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) if (!$util.isString(message.keys[i])) @@ -13169,16 +17196,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet */ - CGCMsgMemCachedGet.fromObject = function fromObject(object) { + CGCMsgMemCachedGet.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGet) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGet(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedGet.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedGet.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) - message.keys[i] = String(object.keys[i]); + message.keys[i] = $String(object.keys[i]); } return message; }; @@ -13192,14 +17225,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedGet.toObject = function toObject(message, options) { + CGCMsgMemCachedGet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) object.keys[j] = message.keys[j]; } @@ -13213,8 +17250,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedGet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedGet.prototype.toJSON = function() { + return CGCMsgMemCachedGet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedGet + * @function getTypeUrl + * @memberof CGCMsgMemCachedGet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedGet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGet"; }; return CGCMsgMemCachedGet; @@ -13222,32 +17273,45 @@ $root.CGCMsgMemCachedGetResponse = (function() { + /** + * Properties of a CGCMsgMemCachedGetResponse. + * @typedef {Object} CGCMsgMemCachedGetResponse.$Properties + * @property {Array.|null} [values] CGCMsgMemCachedGetResponse values + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedGetResponse. * @exports ICGCMsgMemCachedGetResponse * @interface ICGCMsgMemCachedGetResponse - * @property {Array.|null} [values] CGCMsgMemCachedGetResponse values + * @augments CGCMsgMemCachedGetResponse.$Properties + * @deprecated Use CGCMsgMemCachedGetResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedGetResponse. + * @typedef {CGCMsgMemCachedGetResponse.$Properties} CGCMsgMemCachedGetResponse.$Shape */ /** * Constructs a new CGCMsgMemCachedGetResponse. * @exports CGCMsgMemCachedGetResponse * @classdesc Represents a CGCMsgMemCachedGetResponse. - * @implements ICGCMsgMemCachedGetResponse * @constructor - * @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedGetResponse(properties) { + var CGCMsgMemCachedGetResponse = function (properties) { this.values = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedGetResponse values. - * @member {Array.} values + * @member {Array.} values * @memberof CGCMsgMemCachedGetResponse * @instance */ @@ -13258,10 +17322,14 @@ * @function create * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse instance + * @type {{ + * (properties: CGCMsgMemCachedGetResponse.$Shape): CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape; + * (properties?: CGCMsgMemCachedGetResponse.$Properties): CGCMsgMemCachedGetResponse; + * }} */ - CGCMsgMemCachedGetResponse.create = function create(properties) { + CGCMsgMemCachedGetResponse.create = function(properties) { return new CGCMsgMemCachedGetResponse(properties); }; @@ -13270,16 +17338,23 @@ * @function encode * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse} message CGCMsgMemCachedGetResponse message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.$Properties} message CGCMsgMemCachedGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGetResponse.encode = function encode(message, writer) { + CGCMsgMemCachedGetResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.values != null && message.values.length) for (var i = 0; i < message.values.length; ++i) - $root.CGCMsgMemCachedGetResponse.ValueTag.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CGCMsgMemCachedGetResponse.ValueTag.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13288,12 +17363,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse} message CGCMsgMemCachedGetResponse message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.$Properties} message CGCMsgMemCachedGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedGetResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13303,27 +17378,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse + * @returns {CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape} CGCMsgMemCachedGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGetResponse.decode = function decode(reader, length) { + CGCMsgMemCachedGetResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGetResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGetResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.CGCMsgMemCachedGetResponse.ValueTag.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.CGCMsgMemCachedGetResponse.ValueTag.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13333,11 +17425,11 @@ * @memberof CGCMsgMemCachedGetResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse + * @returns {CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape} CGCMsgMemCachedGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGetResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedGetResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13351,14 +17443,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedGetResponse.verify = function verify(message) { + CGCMsgMemCachedGetResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.values != null && $Object.hasOwnProperty.call(message, "values")) { + if (!$Array.isArray(message.values)) return "values: array expected"; for (var i = 0; i < message.values.length; ++i) { - var error = $root.CGCMsgMemCachedGetResponse.ValueTag.verify(message.values[i]); + var error = $root.CGCMsgMemCachedGetResponse.ValueTag.verify(message.values[i], _depth + 1); if (error) return "values." + error; } @@ -13374,18 +17470,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse */ - CGCMsgMemCachedGetResponse.fromObject = function fromObject(object) { + CGCMsgMemCachedGetResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGetResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGetResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGetResponse(); if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".CGCMsgMemCachedGetResponse.values: array expected"); - message.values = []; + if (!$Array.isArray(object.values)) + throw $TypeError(".CGCMsgMemCachedGetResponse.values: array expected"); + message.values = $Array(object.values.length); for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".CGCMsgMemCachedGetResponse.values: object expected"); - message.values[i] = $root.CGCMsgMemCachedGetResponse.ValueTag.fromObject(object.values[i]); + if (!$util.isObject(object.values[i])) + throw $TypeError(".CGCMsgMemCachedGetResponse.values: object expected"); + message.values[i] = $root.CGCMsgMemCachedGetResponse.ValueTag.fromObject(object.values[i], _depth + 1); } } return message; @@ -13400,16 +17502,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedGetResponse.toObject = function toObject(message, options) { + CGCMsgMemCachedGetResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.values = []; if (message.values && message.values.length) { - object.values = []; + object.values = $Array(message.values.length); for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.CGCMsgMemCachedGetResponse.ValueTag.toObject(message.values[j], options); + object.values[j] = $root.CGCMsgMemCachedGetResponse.ValueTag.toObject(message.values[j], options, _depth + 1); } return object; }; @@ -13421,34 +17527,61 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedGetResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedGetResponse.prototype.toJSON = function() { + return CGCMsgMemCachedGetResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedGetResponse + * @function getTypeUrl + * @memberof CGCMsgMemCachedGetResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedGetResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGetResponse"; }; CGCMsgMemCachedGetResponse.ValueTag = (function() { /** * Properties of a ValueTag. - * @memberof CGCMsgMemCachedGetResponse - * @interface IValueTag + * @typedef {Object} CGCMsgMemCachedGetResponse.ValueTag.$Properties * @property {boolean|null} [found] ValueTag found * @property {Uint8Array|null} [value] ValueTag value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ValueTag. + * @memberof CGCMsgMemCachedGetResponse + * @interface IValueTag + * @augments CGCMsgMemCachedGetResponse.ValueTag.$Properties + * @deprecated Use CGCMsgMemCachedGetResponse.ValueTag.$Properties instead. + */ + + /** + * Shape of a ValueTag. + * @typedef {CGCMsgMemCachedGetResponse.ValueTag.$Properties} CGCMsgMemCachedGetResponse.ValueTag.$Shape */ /** * Constructs a new ValueTag. * @memberof CGCMsgMemCachedGetResponse * @classdesc Represents a ValueTag. - * @implements IValueTag * @constructor - * @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ValueTag(properties) { + var ValueTag = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ValueTag found. @@ -13471,10 +17604,14 @@ * @function create * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag instance + * @type {{ + * (properties: CGCMsgMemCachedGetResponse.ValueTag.$Shape): CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape; + * (properties?: CGCMsgMemCachedGetResponse.ValueTag.$Properties): CGCMsgMemCachedGetResponse.ValueTag; + * }} */ - ValueTag.create = function create(properties) { + ValueTag.create = function(properties) { return new ValueTag(properties); }; @@ -13483,17 +17620,24 @@ * @function encode * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag} message ValueTag message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties} message ValueTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValueTag.encode = function encode(message, writer) { + ValueTag.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.found != null && Object.hasOwnProperty.call(message, "found")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.found); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13502,12 +17646,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag} message ValueTag message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties} message ValueTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValueTag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValueTag.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13517,28 +17661,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag + * @returns {CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape} ValueTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValueTag.decode = function decode(reader, length) { + ValueTag.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGetResponse.ValueTag(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGetResponse.ValueTag(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.found = reader.bool(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.found = reader.bool(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13548,11 +17712,11 @@ * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag + * @returns {CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape} ValueTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValueTag.decodeDelimited = function decodeDelimited(reader) { + ValueTag.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13566,13 +17730,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValueTag.verify = function verify(message) { + ValueTag.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.found != null && message.hasOwnProperty("found")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) if (typeof message.found !== "boolean") return "found: boolean expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -13586,16 +17754,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag */ - ValueTag.fromObject = function fromObject(object) { + ValueTag.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGetResponse.ValueTag) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGetResponse.ValueTag: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGetResponse.ValueTag(); if (object.found != null) - message.found = Boolean(object.found); + message.found = $Boolean(object.found); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -13609,24 +17783,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValueTag.toObject = function toObject(message, options) { + ValueTag.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.found = false; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.found != null && message.hasOwnProperty("found")) + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) object.found = message.found; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -13637,8 +17815,22 @@ * @instance * @returns {Object.} JSON object */ - ValueTag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ValueTag.prototype.toJSON = function() { + return ValueTag.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ValueTag + * @function getTypeUrl + * @memberof CGCMsgMemCachedGetResponse.ValueTag + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ValueTag.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGetResponse.ValueTag"; }; return ValueTag; @@ -13649,32 +17841,45 @@ $root.CGCMsgMemCachedSet = (function() { + /** + * Properties of a CGCMsgMemCachedSet. + * @typedef {Object} CGCMsgMemCachedSet.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedSet keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedSet. * @exports ICGCMsgMemCachedSet * @interface ICGCMsgMemCachedSet - * @property {Array.|null} [keys] CGCMsgMemCachedSet keys + * @augments CGCMsgMemCachedSet.$Properties + * @deprecated Use CGCMsgMemCachedSet.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedSet. + * @typedef {CGCMsgMemCachedSet.$Properties} CGCMsgMemCachedSet.$Shape */ /** * Constructs a new CGCMsgMemCachedSet. * @exports CGCMsgMemCachedSet * @classdesc Represents a CGCMsgMemCachedSet. - * @implements ICGCMsgMemCachedSet * @constructor - * @param {ICGCMsgMemCachedSet=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedSet(properties) { + var CGCMsgMemCachedSet = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedSet keys. - * @member {Array.} keys + * @member {Array.} keys * @memberof CGCMsgMemCachedSet * @instance */ @@ -13685,10 +17890,14 @@ * @function create * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet instance + * @type {{ + * (properties: CGCMsgMemCachedSet.$Shape): CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape; + * (properties?: CGCMsgMemCachedSet.$Properties): CGCMsgMemCachedSet; + * }} */ - CGCMsgMemCachedSet.create = function create(properties) { + CGCMsgMemCachedSet.create = function(properties) { return new CGCMsgMemCachedSet(properties); }; @@ -13697,16 +17906,23 @@ * @function encode * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet} message CGCMsgMemCachedSet message or plain object to encode + * @param {CGCMsgMemCachedSet.$Properties} message CGCMsgMemCachedSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedSet.encode = function encode(message, writer) { + CGCMsgMemCachedSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) - $root.CGCMsgMemCachedSet.KeyPair.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CGCMsgMemCachedSet.KeyPair.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13715,12 +17931,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet} message CGCMsgMemCachedSet message or plain object to encode + * @param {CGCMsgMemCachedSet.$Properties} message CGCMsgMemCachedSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13730,27 +17946,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet + * @returns {CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape} CGCMsgMemCachedSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedSet.decode = function decode(reader, length) { + CGCMsgMemCachedSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.CGCMsgMemCachedSet.KeyPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push($root.CGCMsgMemCachedSet.KeyPair.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13760,11 +17993,11 @@ * @memberof CGCMsgMemCachedSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet + * @returns {CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape} CGCMsgMemCachedSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedSet.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13778,14 +18011,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedSet.verify = function verify(message) { + CGCMsgMemCachedSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) { - var error = $root.CGCMsgMemCachedSet.KeyPair.verify(message.keys[i]); + var error = $root.CGCMsgMemCachedSet.KeyPair.verify(message.keys[i], _depth + 1); if (error) return "keys." + error; } @@ -13801,18 +18038,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet */ - CGCMsgMemCachedSet.fromObject = function fromObject(object) { + CGCMsgMemCachedSet.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedSet(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedSet.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedSet.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".CGCMsgMemCachedSet.keys: object expected"); - message.keys[i] = $root.CGCMsgMemCachedSet.KeyPair.fromObject(object.keys[i]); + if (!$util.isObject(object.keys[i])) + throw $TypeError(".CGCMsgMemCachedSet.keys: object expected"); + message.keys[i] = $root.CGCMsgMemCachedSet.KeyPair.fromObject(object.keys[i], _depth + 1); } } return message; @@ -13827,16 +18070,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedSet.toObject = function toObject(message, options) { + CGCMsgMemCachedSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.CGCMsgMemCachedSet.KeyPair.toObject(message.keys[j], options); + object.keys[j] = $root.CGCMsgMemCachedSet.KeyPair.toObject(message.keys[j], options, _depth + 1); } return object; }; @@ -13848,34 +18095,61 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedSet.prototype.toJSON = function() { + return CGCMsgMemCachedSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedSet + * @function getTypeUrl + * @memberof CGCMsgMemCachedSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedSet"; }; CGCMsgMemCachedSet.KeyPair = (function() { /** * Properties of a KeyPair. - * @memberof CGCMsgMemCachedSet - * @interface IKeyPair + * @typedef {Object} CGCMsgMemCachedSet.KeyPair.$Properties * @property {string|null} [name] KeyPair name * @property {Uint8Array|null} [value] KeyPair value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a KeyPair. + * @memberof CGCMsgMemCachedSet + * @interface IKeyPair + * @augments CGCMsgMemCachedSet.KeyPair.$Properties + * @deprecated Use CGCMsgMemCachedSet.KeyPair.$Properties instead. + */ + + /** + * Shape of a KeyPair. + * @typedef {CGCMsgMemCachedSet.KeyPair.$Properties} CGCMsgMemCachedSet.KeyPair.$Shape */ /** * Constructs a new KeyPair. * @memberof CGCMsgMemCachedSet * @classdesc Represents a KeyPair. - * @implements IKeyPair * @constructor - * @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.KeyPair.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function KeyPair(properties) { + var KeyPair = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * KeyPair name. @@ -13898,10 +18172,14 @@ * @function create * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.KeyPair.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair instance + * @type {{ + * (properties: CGCMsgMemCachedSet.KeyPair.$Shape): CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape; + * (properties?: CGCMsgMemCachedSet.KeyPair.$Properties): CGCMsgMemCachedSet.KeyPair; + * }} */ - KeyPair.create = function create(properties) { + KeyPair.create = function(properties) { return new KeyPair(properties); }; @@ -13910,17 +18188,24 @@ * @function encode * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair} message KeyPair message or plain object to encode + * @param {CGCMsgMemCachedSet.KeyPair.$Properties} message KeyPair message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyPair.encode = function encode(message, writer) { + KeyPair.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13929,12 +18214,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair} message KeyPair message or plain object to encode + * @param {CGCMsgMemCachedSet.KeyPair.$Properties} message KeyPair message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyPair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + KeyPair.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13944,28 +18229,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair + * @returns {CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape} KeyPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyPair.decode = function decode(reader, length) { + KeyPair.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedSet.KeyPair(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedSet.KeyPair(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13975,11 +18280,11 @@ * @memberof CGCMsgMemCachedSet.KeyPair * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair + * @returns {CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape} KeyPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyPair.decodeDelimited = function decodeDelimited(reader) { + KeyPair.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13993,13 +18298,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KeyPair.verify = function verify(message) { + KeyPair.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -14013,16 +18322,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair */ - KeyPair.fromObject = function fromObject(object) { + KeyPair.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedSet.KeyPair) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedSet.KeyPair: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedSet.KeyPair(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -14036,24 +18351,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KeyPair.toObject = function toObject(message, options) { + KeyPair.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -14064,8 +18383,22 @@ * @instance * @returns {Object.} JSON object */ - KeyPair.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + KeyPair.prototype.toJSON = function() { + return KeyPair.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for KeyPair + * @function getTypeUrl + * @memberof CGCMsgMemCachedSet.KeyPair + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + KeyPair.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedSet.KeyPair"; }; return KeyPair; @@ -14076,28 +18409,41 @@ $root.CGCMsgMemCachedDelete = (function() { + /** + * Properties of a CGCMsgMemCachedDelete. + * @typedef {Object} CGCMsgMemCachedDelete.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedDelete keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedDelete. * @exports ICGCMsgMemCachedDelete * @interface ICGCMsgMemCachedDelete - * @property {Array.|null} [keys] CGCMsgMemCachedDelete keys + * @augments CGCMsgMemCachedDelete.$Properties + * @deprecated Use CGCMsgMemCachedDelete.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedDelete. + * @typedef {CGCMsgMemCachedDelete.$Properties} CGCMsgMemCachedDelete.$Shape */ /** * Constructs a new CGCMsgMemCachedDelete. * @exports CGCMsgMemCachedDelete * @classdesc Represents a CGCMsgMemCachedDelete. - * @implements ICGCMsgMemCachedDelete * @constructor - * @param {ICGCMsgMemCachedDelete=} [properties] Properties to set + * @param {CGCMsgMemCachedDelete.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedDelete(properties) { + var CGCMsgMemCachedDelete = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedDelete keys. @@ -14112,10 +18458,14 @@ * @function create * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete=} [properties] Properties to set + * @param {CGCMsgMemCachedDelete.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete instance + * @type {{ + * (properties: CGCMsgMemCachedDelete.$Shape): CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape; + * (properties?: CGCMsgMemCachedDelete.$Properties): CGCMsgMemCachedDelete; + * }} */ - CGCMsgMemCachedDelete.create = function create(properties) { + CGCMsgMemCachedDelete.create = function(properties) { return new CGCMsgMemCachedDelete(properties); }; @@ -14124,16 +18474,23 @@ * @function encode * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete} message CGCMsgMemCachedDelete message or plain object to encode + * @param {CGCMsgMemCachedDelete.$Properties} message CGCMsgMemCachedDelete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedDelete.encode = function encode(message, writer) { + CGCMsgMemCachedDelete.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keys[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14142,12 +18499,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete} message CGCMsgMemCachedDelete message or plain object to encode + * @param {CGCMsgMemCachedDelete.$Properties} message CGCMsgMemCachedDelete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedDelete.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedDelete.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14157,27 +18514,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete + * @returns {CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape} CGCMsgMemCachedDelete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedDelete.decode = function decode(reader, length) { + CGCMsgMemCachedDelete.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedDelete(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedDelete(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14187,11 +18561,11 @@ * @memberof CGCMsgMemCachedDelete * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete + * @returns {CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape} CGCMsgMemCachedDelete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedDelete.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedDelete.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14205,11 +18579,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedDelete.verify = function verify(message) { + CGCMsgMemCachedDelete.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) if (!$util.isString(message.keys[i])) @@ -14226,16 +18604,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete */ - CGCMsgMemCachedDelete.fromObject = function fromObject(object) { + CGCMsgMemCachedDelete.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedDelete) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedDelete: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedDelete(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedDelete.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedDelete.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) - message.keys[i] = String(object.keys[i]); + message.keys[i] = $String(object.keys[i]); } return message; }; @@ -14249,14 +18633,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedDelete.toObject = function toObject(message, options) { + CGCMsgMemCachedDelete.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) object.keys[j] = message.keys[j]; } @@ -14270,8 +18658,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedDelete.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedDelete.prototype.toJSON = function() { + return CGCMsgMemCachedDelete.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedDelete + * @function getTypeUrl + * @memberof CGCMsgMemCachedDelete + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedDelete.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedDelete"; }; return CGCMsgMemCachedDelete; @@ -14279,36 +18681,53 @@ $root.CGCMsgMemCachedStats = (function() { + /** + * Properties of a CGCMsgMemCachedStats. + * @typedef {Object} CGCMsgMemCachedStats.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedStats. * @exports ICGCMsgMemCachedStats * @interface ICGCMsgMemCachedStats + * @augments CGCMsgMemCachedStats.$Properties + * @deprecated Use CGCMsgMemCachedStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedStats. + * @typedef {CGCMsgMemCachedStats.$Properties} CGCMsgMemCachedStats.$Shape */ /** * Constructs a new CGCMsgMemCachedStats. * @exports CGCMsgMemCachedStats * @classdesc Represents a CGCMsgMemCachedStats. - * @implements ICGCMsgMemCachedStats * @constructor - * @param {ICGCMsgMemCachedStats=} [properties] Properties to set + * @param {CGCMsgMemCachedStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedStats(properties) { + var CGCMsgMemCachedStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CGCMsgMemCachedStats instance using the specified properties. * @function create * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats=} [properties] Properties to set + * @param {CGCMsgMemCachedStats.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats instance + * @type {{ + * (properties: CGCMsgMemCachedStats.$Shape): CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape; + * (properties?: CGCMsgMemCachedStats.$Properties): CGCMsgMemCachedStats; + * }} */ - CGCMsgMemCachedStats.create = function create(properties) { + CGCMsgMemCachedStats.create = function(properties) { return new CGCMsgMemCachedStats(properties); }; @@ -14317,13 +18736,20 @@ * @function encode * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats} message CGCMsgMemCachedStats message or plain object to encode + * @param {CGCMsgMemCachedStats.$Properties} message CGCMsgMemCachedStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStats.encode = function encode(message, writer) { + CGCMsgMemCachedStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14332,12 +18758,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats} message CGCMsgMemCachedStats message or plain object to encode + * @param {CGCMsgMemCachedStats.$Properties} message CGCMsgMemCachedStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14347,22 +18773,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats + * @returns {CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape} CGCMsgMemCachedStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStats.decode = function decode(reader, length) { + CGCMsgMemCachedStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14372,11 +18809,11 @@ * @memberof CGCMsgMemCachedStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats + * @returns {CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape} CGCMsgMemCachedStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14390,9 +18827,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedStats.verify = function verify(message) { + CGCMsgMemCachedStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -14404,9 +18845,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats */ - CGCMsgMemCachedStats.fromObject = function fromObject(object) { + CGCMsgMemCachedStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CGCMsgMemCachedStats(); }; @@ -14419,7 +18866,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedStats.toObject = function toObject() { + CGCMsgMemCachedStats.toObject = function () { return {}; }; @@ -14430,8 +18877,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedStats.prototype.toJSON = function() { + return CGCMsgMemCachedStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedStats + * @function getTypeUrl + * @memberof CGCMsgMemCachedStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedStats"; }; return CGCMsgMemCachedStats; @@ -14441,8 +18902,7 @@ /** * Properties of a CGCMsgMemCachedStatsResponse. - * @exports ICGCMsgMemCachedStatsResponse - * @interface ICGCMsgMemCachedStatsResponse + * @typedef {Object} CGCMsgMemCachedStatsResponse.$Properties * @property {number|Long|null} [curr_connections] CGCMsgMemCachedStatsResponse curr_connections * @property {number|Long|null} [cmd_get] CGCMsgMemCachedStatsResponse cmd_get * @property {number|Long|null} [cmd_set] CGCMsgMemCachedStatsResponse cmd_set @@ -14457,22 +18917,36 @@ * @property {number|Long|null} [curr_items] CGCMsgMemCachedStatsResponse curr_items * @property {number|Long|null} [evictions] CGCMsgMemCachedStatsResponse evictions * @property {number|Long|null} [bytes] CGCMsgMemCachedStatsResponse bytes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgMemCachedStatsResponse. + * @exports ICGCMsgMemCachedStatsResponse + * @interface ICGCMsgMemCachedStatsResponse + * @augments CGCMsgMemCachedStatsResponse.$Properties + * @deprecated Use CGCMsgMemCachedStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedStatsResponse. + * @typedef {CGCMsgMemCachedStatsResponse.$Properties} CGCMsgMemCachedStatsResponse.$Shape */ /** * Constructs a new CGCMsgMemCachedStatsResponse. * @exports CGCMsgMemCachedStatsResponse * @classdesc Represents a CGCMsgMemCachedStatsResponse. - * @implements ICGCMsgMemCachedStatsResponse * @constructor - * @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedStatsResponse(properties) { + var CGCMsgMemCachedStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedStatsResponse curr_connections. @@ -14591,10 +19065,14 @@ * @function create * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse instance + * @type {{ + * (properties: CGCMsgMemCachedStatsResponse.$Shape): CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape; + * (properties?: CGCMsgMemCachedStatsResponse.$Properties): CGCMsgMemCachedStatsResponse; + * }} */ - CGCMsgMemCachedStatsResponse.create = function create(properties) { + CGCMsgMemCachedStatsResponse.create = function(properties) { return new CGCMsgMemCachedStatsResponse(properties); }; @@ -14603,41 +19081,48 @@ * @function encode * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse} message CGCMsgMemCachedStatsResponse message or plain object to encode + * @param {CGCMsgMemCachedStatsResponse.$Properties} message CGCMsgMemCachedStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStatsResponse.encode = function encode(message, writer) { + CGCMsgMemCachedStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.curr_connections != null && Object.hasOwnProperty.call(message, "curr_connections")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.curr_connections); - if (message.cmd_get != null && Object.hasOwnProperty.call(message, "cmd_get")) + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.cmd_get); - if (message.cmd_set != null && Object.hasOwnProperty.call(message, "cmd_set")) + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.cmd_set); - if (message.cmd_flush != null && Object.hasOwnProperty.call(message, "cmd_flush")) + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.cmd_flush); - if (message.get_hits != null && Object.hasOwnProperty.call(message, "get_hits")) + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.get_hits); - if (message.get_misses != null && Object.hasOwnProperty.call(message, "get_misses")) + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.get_misses); - if (message.delete_hits != null && Object.hasOwnProperty.call(message, "delete_hits")) + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.delete_hits); - if (message.delete_misses != null && Object.hasOwnProperty.call(message, "delete_misses")) + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.delete_misses); - if (message.bytes_read != null && Object.hasOwnProperty.call(message, "bytes_read")) + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.bytes_read); - if (message.bytes_written != null && Object.hasOwnProperty.call(message, "bytes_written")) + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.bytes_written); - if (message.limit_maxbytes != null && Object.hasOwnProperty.call(message, "limit_maxbytes")) + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.limit_maxbytes); - if (message.curr_items != null && Object.hasOwnProperty.call(message, "curr_items")) + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.curr_items); - if (message.evictions != null && Object.hasOwnProperty.call(message, "evictions")) + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.evictions); - if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) writer.uint32(/* id 14, wireType 0 =*/112).uint64(message.bytes); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14646,12 +19131,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse} message CGCMsgMemCachedStatsResponse message or plain object to encode + * @param {CGCMsgMemCachedStatsResponse.$Properties} message CGCMsgMemCachedStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14661,64 +19146,120 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse + * @returns {CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape} CGCMsgMemCachedStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStatsResponse.decode = function decode(reader, length) { + CGCMsgMemCachedStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.curr_connections = reader.uint64(); - break; - case 2: - message.cmd_get = reader.uint64(); - break; - case 3: - message.cmd_set = reader.uint64(); - break; - case 4: - message.cmd_flush = reader.uint64(); - break; - case 5: - message.get_hits = reader.uint64(); - break; - case 6: - message.get_misses = reader.uint64(); - break; - case 7: - message.delete_hits = reader.uint64(); - break; - case 8: - message.delete_misses = reader.uint64(); - break; - case 9: - message.bytes_read = reader.uint64(); - break; - case 10: - message.bytes_written = reader.uint64(); - break; - case 11: - message.limit_maxbytes = reader.uint64(); - break; - case 12: - message.curr_items = reader.uint64(); - break; - case 13: - message.evictions = reader.uint64(); - break; - case 14: - message.bytes = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.curr_connections = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.cmd_get = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.cmd_set = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.cmd_flush = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.get_hits = reader.uint64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.get_misses = reader.uint64(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.delete_hits = reader.uint64(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.delete_misses = reader.uint64(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.bytes_read = reader.uint64(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.bytes_written = reader.uint64(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.limit_maxbytes = reader.uint64(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.curr_items = reader.uint64(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.evictions = reader.uint64(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.bytes = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14728,11 +19269,11 @@ * @memberof CGCMsgMemCachedStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse + * @returns {CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape} CGCMsgMemCachedStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14746,49 +19287,53 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedStatsResponse.verify = function verify(message) { + CGCMsgMemCachedStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.curr_connections != null && message.hasOwnProperty("curr_connections")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) if (!$util.isInteger(message.curr_connections) && !(message.curr_connections && $util.isInteger(message.curr_connections.low) && $util.isInteger(message.curr_connections.high))) return "curr_connections: integer|Long expected"; - if (message.cmd_get != null && message.hasOwnProperty("cmd_get")) + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) if (!$util.isInteger(message.cmd_get) && !(message.cmd_get && $util.isInteger(message.cmd_get.low) && $util.isInteger(message.cmd_get.high))) return "cmd_get: integer|Long expected"; - if (message.cmd_set != null && message.hasOwnProperty("cmd_set")) + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) if (!$util.isInteger(message.cmd_set) && !(message.cmd_set && $util.isInteger(message.cmd_set.low) && $util.isInteger(message.cmd_set.high))) return "cmd_set: integer|Long expected"; - if (message.cmd_flush != null && message.hasOwnProperty("cmd_flush")) + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) if (!$util.isInteger(message.cmd_flush) && !(message.cmd_flush && $util.isInteger(message.cmd_flush.low) && $util.isInteger(message.cmd_flush.high))) return "cmd_flush: integer|Long expected"; - if (message.get_hits != null && message.hasOwnProperty("get_hits")) + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) if (!$util.isInteger(message.get_hits) && !(message.get_hits && $util.isInteger(message.get_hits.low) && $util.isInteger(message.get_hits.high))) return "get_hits: integer|Long expected"; - if (message.get_misses != null && message.hasOwnProperty("get_misses")) + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) if (!$util.isInteger(message.get_misses) && !(message.get_misses && $util.isInteger(message.get_misses.low) && $util.isInteger(message.get_misses.high))) return "get_misses: integer|Long expected"; - if (message.delete_hits != null && message.hasOwnProperty("delete_hits")) + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) if (!$util.isInteger(message.delete_hits) && !(message.delete_hits && $util.isInteger(message.delete_hits.low) && $util.isInteger(message.delete_hits.high))) return "delete_hits: integer|Long expected"; - if (message.delete_misses != null && message.hasOwnProperty("delete_misses")) + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) if (!$util.isInteger(message.delete_misses) && !(message.delete_misses && $util.isInteger(message.delete_misses.low) && $util.isInteger(message.delete_misses.high))) return "delete_misses: integer|Long expected"; - if (message.bytes_read != null && message.hasOwnProperty("bytes_read")) + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) if (!$util.isInteger(message.bytes_read) && !(message.bytes_read && $util.isInteger(message.bytes_read.low) && $util.isInteger(message.bytes_read.high))) return "bytes_read: integer|Long expected"; - if (message.bytes_written != null && message.hasOwnProperty("bytes_written")) + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) if (!$util.isInteger(message.bytes_written) && !(message.bytes_written && $util.isInteger(message.bytes_written.low) && $util.isInteger(message.bytes_written.high))) return "bytes_written: integer|Long expected"; - if (message.limit_maxbytes != null && message.hasOwnProperty("limit_maxbytes")) + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) if (!$util.isInteger(message.limit_maxbytes) && !(message.limit_maxbytes && $util.isInteger(message.limit_maxbytes.low) && $util.isInteger(message.limit_maxbytes.high))) return "limit_maxbytes: integer|Long expected"; - if (message.curr_items != null && message.hasOwnProperty("curr_items")) + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) if (!$util.isInteger(message.curr_items) && !(message.curr_items && $util.isInteger(message.curr_items.low) && $util.isInteger(message.curr_items.high))) return "curr_items: integer|Long expected"; - if (message.evictions != null && message.hasOwnProperty("evictions")) + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) if (!$util.isInteger(message.evictions) && !(message.evictions && $util.isInteger(message.evictions.low) && $util.isInteger(message.evictions.high))) return "evictions: integer|Long expected"; - if (message.bytes != null && message.hasOwnProperty("bytes")) + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) if (!$util.isInteger(message.bytes) && !(message.bytes && $util.isInteger(message.bytes.low) && $util.isInteger(message.bytes.high))) return "bytes: integer|Long expected"; return null; @@ -14802,132 +19347,138 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse */ - CGCMsgMemCachedStatsResponse.fromObject = function fromObject(object) { + CGCMsgMemCachedStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedStatsResponse(); if (object.curr_connections != null) if ($util.Long) - (message.curr_connections = $util.Long.fromValue(object.curr_connections)).unsigned = true; + message.curr_connections = $util.Long.fromValue(object.curr_connections, true); else if (typeof object.curr_connections === "string") - message.curr_connections = parseInt(object.curr_connections, 10); + message.curr_connections = $parseInt(object.curr_connections, 10); else if (typeof object.curr_connections === "number") message.curr_connections = object.curr_connections; else if (typeof object.curr_connections === "object") message.curr_connections = new $util.LongBits(object.curr_connections.low >>> 0, object.curr_connections.high >>> 0).toNumber(true); if (object.cmd_get != null) if ($util.Long) - (message.cmd_get = $util.Long.fromValue(object.cmd_get)).unsigned = true; + message.cmd_get = $util.Long.fromValue(object.cmd_get, true); else if (typeof object.cmd_get === "string") - message.cmd_get = parseInt(object.cmd_get, 10); + message.cmd_get = $parseInt(object.cmd_get, 10); else if (typeof object.cmd_get === "number") message.cmd_get = object.cmd_get; else if (typeof object.cmd_get === "object") message.cmd_get = new $util.LongBits(object.cmd_get.low >>> 0, object.cmd_get.high >>> 0).toNumber(true); if (object.cmd_set != null) if ($util.Long) - (message.cmd_set = $util.Long.fromValue(object.cmd_set)).unsigned = true; + message.cmd_set = $util.Long.fromValue(object.cmd_set, true); else if (typeof object.cmd_set === "string") - message.cmd_set = parseInt(object.cmd_set, 10); + message.cmd_set = $parseInt(object.cmd_set, 10); else if (typeof object.cmd_set === "number") message.cmd_set = object.cmd_set; else if (typeof object.cmd_set === "object") message.cmd_set = new $util.LongBits(object.cmd_set.low >>> 0, object.cmd_set.high >>> 0).toNumber(true); if (object.cmd_flush != null) if ($util.Long) - (message.cmd_flush = $util.Long.fromValue(object.cmd_flush)).unsigned = true; + message.cmd_flush = $util.Long.fromValue(object.cmd_flush, true); else if (typeof object.cmd_flush === "string") - message.cmd_flush = parseInt(object.cmd_flush, 10); + message.cmd_flush = $parseInt(object.cmd_flush, 10); else if (typeof object.cmd_flush === "number") message.cmd_flush = object.cmd_flush; else if (typeof object.cmd_flush === "object") message.cmd_flush = new $util.LongBits(object.cmd_flush.low >>> 0, object.cmd_flush.high >>> 0).toNumber(true); if (object.get_hits != null) if ($util.Long) - (message.get_hits = $util.Long.fromValue(object.get_hits)).unsigned = true; + message.get_hits = $util.Long.fromValue(object.get_hits, true); else if (typeof object.get_hits === "string") - message.get_hits = parseInt(object.get_hits, 10); + message.get_hits = $parseInt(object.get_hits, 10); else if (typeof object.get_hits === "number") message.get_hits = object.get_hits; else if (typeof object.get_hits === "object") message.get_hits = new $util.LongBits(object.get_hits.low >>> 0, object.get_hits.high >>> 0).toNumber(true); if (object.get_misses != null) if ($util.Long) - (message.get_misses = $util.Long.fromValue(object.get_misses)).unsigned = true; + message.get_misses = $util.Long.fromValue(object.get_misses, true); else if (typeof object.get_misses === "string") - message.get_misses = parseInt(object.get_misses, 10); + message.get_misses = $parseInt(object.get_misses, 10); else if (typeof object.get_misses === "number") message.get_misses = object.get_misses; else if (typeof object.get_misses === "object") message.get_misses = new $util.LongBits(object.get_misses.low >>> 0, object.get_misses.high >>> 0).toNumber(true); if (object.delete_hits != null) if ($util.Long) - (message.delete_hits = $util.Long.fromValue(object.delete_hits)).unsigned = true; + message.delete_hits = $util.Long.fromValue(object.delete_hits, true); else if (typeof object.delete_hits === "string") - message.delete_hits = parseInt(object.delete_hits, 10); + message.delete_hits = $parseInt(object.delete_hits, 10); else if (typeof object.delete_hits === "number") message.delete_hits = object.delete_hits; else if (typeof object.delete_hits === "object") message.delete_hits = new $util.LongBits(object.delete_hits.low >>> 0, object.delete_hits.high >>> 0).toNumber(true); if (object.delete_misses != null) if ($util.Long) - (message.delete_misses = $util.Long.fromValue(object.delete_misses)).unsigned = true; + message.delete_misses = $util.Long.fromValue(object.delete_misses, true); else if (typeof object.delete_misses === "string") - message.delete_misses = parseInt(object.delete_misses, 10); + message.delete_misses = $parseInt(object.delete_misses, 10); else if (typeof object.delete_misses === "number") message.delete_misses = object.delete_misses; else if (typeof object.delete_misses === "object") message.delete_misses = new $util.LongBits(object.delete_misses.low >>> 0, object.delete_misses.high >>> 0).toNumber(true); if (object.bytes_read != null) if ($util.Long) - (message.bytes_read = $util.Long.fromValue(object.bytes_read)).unsigned = true; + message.bytes_read = $util.Long.fromValue(object.bytes_read, true); else if (typeof object.bytes_read === "string") - message.bytes_read = parseInt(object.bytes_read, 10); + message.bytes_read = $parseInt(object.bytes_read, 10); else if (typeof object.bytes_read === "number") message.bytes_read = object.bytes_read; else if (typeof object.bytes_read === "object") message.bytes_read = new $util.LongBits(object.bytes_read.low >>> 0, object.bytes_read.high >>> 0).toNumber(true); if (object.bytes_written != null) if ($util.Long) - (message.bytes_written = $util.Long.fromValue(object.bytes_written)).unsigned = true; + message.bytes_written = $util.Long.fromValue(object.bytes_written, true); else if (typeof object.bytes_written === "string") - message.bytes_written = parseInt(object.bytes_written, 10); + message.bytes_written = $parseInt(object.bytes_written, 10); else if (typeof object.bytes_written === "number") message.bytes_written = object.bytes_written; else if (typeof object.bytes_written === "object") message.bytes_written = new $util.LongBits(object.bytes_written.low >>> 0, object.bytes_written.high >>> 0).toNumber(true); if (object.limit_maxbytes != null) if ($util.Long) - (message.limit_maxbytes = $util.Long.fromValue(object.limit_maxbytes)).unsigned = true; + message.limit_maxbytes = $util.Long.fromValue(object.limit_maxbytes, true); else if (typeof object.limit_maxbytes === "string") - message.limit_maxbytes = parseInt(object.limit_maxbytes, 10); + message.limit_maxbytes = $parseInt(object.limit_maxbytes, 10); else if (typeof object.limit_maxbytes === "number") message.limit_maxbytes = object.limit_maxbytes; else if (typeof object.limit_maxbytes === "object") message.limit_maxbytes = new $util.LongBits(object.limit_maxbytes.low >>> 0, object.limit_maxbytes.high >>> 0).toNumber(true); if (object.curr_items != null) if ($util.Long) - (message.curr_items = $util.Long.fromValue(object.curr_items)).unsigned = true; + message.curr_items = $util.Long.fromValue(object.curr_items, true); else if (typeof object.curr_items === "string") - message.curr_items = parseInt(object.curr_items, 10); + message.curr_items = $parseInt(object.curr_items, 10); else if (typeof object.curr_items === "number") message.curr_items = object.curr_items; else if (typeof object.curr_items === "object") message.curr_items = new $util.LongBits(object.curr_items.low >>> 0, object.curr_items.high >>> 0).toNumber(true); if (object.evictions != null) if ($util.Long) - (message.evictions = $util.Long.fromValue(object.evictions)).unsigned = true; + message.evictions = $util.Long.fromValue(object.evictions, true); else if (typeof object.evictions === "string") - message.evictions = parseInt(object.evictions, 10); + message.evictions = $parseInt(object.evictions, 10); else if (typeof object.evictions === "number") message.evictions = object.evictions; else if (typeof object.evictions === "object") message.evictions = new $util.LongBits(object.evictions.low >>> 0, object.evictions.high >>> 0).toNumber(true); if (object.bytes != null) if ($util.Long) - (message.bytes = $util.Long.fromValue(object.bytes)).unsigned = true; + message.bytes = $util.Long.fromValue(object.bytes, true); else if (typeof object.bytes === "string") - message.bytes = parseInt(object.bytes, 10); + message.bytes = $parseInt(object.bytes, 10); else if (typeof object.bytes === "number") message.bytes = object.bytes; else if (typeof object.bytes === "object") @@ -14944,152 +19495,184 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedStatsResponse.toObject = function toObject(message, options) { + CGCMsgMemCachedStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.curr_connections = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.curr_connections = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.curr_connections = options.longs === String ? "0" : 0; + object.curr_connections = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_get = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_get = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_get = options.longs === String ? "0" : 0; + object.cmd_get = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_set = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_set = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_set = options.longs === String ? "0" : 0; + object.cmd_set = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_flush = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_flush = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_flush = options.longs === String ? "0" : 0; + object.cmd_flush = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.get_hits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.get_hits = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.get_hits = options.longs === String ? "0" : 0; + object.get_hits = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.get_misses = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.get_misses = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.get_misses = options.longs === String ? "0" : 0; + object.get_misses = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.delete_hits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.delete_hits = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.delete_hits = options.longs === String ? "0" : 0; + object.delete_hits = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.delete_misses = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.delete_misses = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.delete_misses = options.longs === String ? "0" : 0; + object.delete_misses = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes_read = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes_read = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes_read = options.longs === String ? "0" : 0; + object.bytes_read = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes_written = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes_written = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes_written = options.longs === String ? "0" : 0; + object.bytes_written = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.limit_maxbytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.limit_maxbytes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.limit_maxbytes = options.longs === String ? "0" : 0; + object.limit_maxbytes = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.curr_items = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.curr_items = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.curr_items = options.longs === String ? "0" : 0; + object.curr_items = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.evictions = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.evictions = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.evictions = options.longs === String ? "0" : 0; + object.evictions = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes = options.longs === String ? "0" : 0; + object.bytes = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.curr_connections != null && message.hasOwnProperty("curr_connections")) - if (typeof message.curr_connections === "number") - object.curr_connections = options.longs === String ? String(message.curr_connections) : message.curr_connections; + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.curr_connections = typeof message.curr_connections === "number" ? $BigInt(message.curr_connections) : $util.Long.fromBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0, true).toBigInt(); + else if (typeof message.curr_connections === "number") + object.curr_connections = options.longs === $String ? $String(message.curr_connections) : message.curr_connections; else - object.curr_connections = options.longs === String ? $util.Long.prototype.toString.call(message.curr_connections) : options.longs === Number ? new $util.LongBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0).toNumber(true) : message.curr_connections; - if (message.cmd_get != null && message.hasOwnProperty("cmd_get")) - if (typeof message.cmd_get === "number") - object.cmd_get = options.longs === String ? String(message.cmd_get) : message.cmd_get; + object.curr_connections = options.longs === $String ? $util.Long.prototype.toString.call(message.curr_connections) : options.longs === $Number ? new $util.LongBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0).toNumber(true) : message.curr_connections; + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_get = typeof message.cmd_get === "number" ? $BigInt(message.cmd_get) : $util.Long.fromBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_get === "number") + object.cmd_get = options.longs === $String ? $String(message.cmd_get) : message.cmd_get; else - object.cmd_get = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_get) : options.longs === Number ? new $util.LongBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0).toNumber(true) : message.cmd_get; - if (message.cmd_set != null && message.hasOwnProperty("cmd_set")) - if (typeof message.cmd_set === "number") - object.cmd_set = options.longs === String ? String(message.cmd_set) : message.cmd_set; + object.cmd_get = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_get) : options.longs === $Number ? new $util.LongBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0).toNumber(true) : message.cmd_get; + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_set = typeof message.cmd_set === "number" ? $BigInt(message.cmd_set) : $util.Long.fromBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_set === "number") + object.cmd_set = options.longs === $String ? $String(message.cmd_set) : message.cmd_set; else - object.cmd_set = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_set) : options.longs === Number ? new $util.LongBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0).toNumber(true) : message.cmd_set; - if (message.cmd_flush != null && message.hasOwnProperty("cmd_flush")) - if (typeof message.cmd_flush === "number") - object.cmd_flush = options.longs === String ? String(message.cmd_flush) : message.cmd_flush; + object.cmd_set = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_set) : options.longs === $Number ? new $util.LongBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0).toNumber(true) : message.cmd_set; + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_flush = typeof message.cmd_flush === "number" ? $BigInt(message.cmd_flush) : $util.Long.fromBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_flush === "number") + object.cmd_flush = options.longs === $String ? $String(message.cmd_flush) : message.cmd_flush; else - object.cmd_flush = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_flush) : options.longs === Number ? new $util.LongBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0).toNumber(true) : message.cmd_flush; - if (message.get_hits != null && message.hasOwnProperty("get_hits")) - if (typeof message.get_hits === "number") - object.get_hits = options.longs === String ? String(message.get_hits) : message.get_hits; + object.cmd_flush = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_flush) : options.longs === $Number ? new $util.LongBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0).toNumber(true) : message.cmd_flush; + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.get_hits = typeof message.get_hits === "number" ? $BigInt(message.get_hits) : $util.Long.fromBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0, true).toBigInt(); + else if (typeof message.get_hits === "number") + object.get_hits = options.longs === $String ? $String(message.get_hits) : message.get_hits; else - object.get_hits = options.longs === String ? $util.Long.prototype.toString.call(message.get_hits) : options.longs === Number ? new $util.LongBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0).toNumber(true) : message.get_hits; - if (message.get_misses != null && message.hasOwnProperty("get_misses")) - if (typeof message.get_misses === "number") - object.get_misses = options.longs === String ? String(message.get_misses) : message.get_misses; + object.get_hits = options.longs === $String ? $util.Long.prototype.toString.call(message.get_hits) : options.longs === $Number ? new $util.LongBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0).toNumber(true) : message.get_hits; + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.get_misses = typeof message.get_misses === "number" ? $BigInt(message.get_misses) : $util.Long.fromBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0, true).toBigInt(); + else if (typeof message.get_misses === "number") + object.get_misses = options.longs === $String ? $String(message.get_misses) : message.get_misses; else - object.get_misses = options.longs === String ? $util.Long.prototype.toString.call(message.get_misses) : options.longs === Number ? new $util.LongBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0).toNumber(true) : message.get_misses; - if (message.delete_hits != null && message.hasOwnProperty("delete_hits")) - if (typeof message.delete_hits === "number") - object.delete_hits = options.longs === String ? String(message.delete_hits) : message.delete_hits; + object.get_misses = options.longs === $String ? $util.Long.prototype.toString.call(message.get_misses) : options.longs === $Number ? new $util.LongBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0).toNumber(true) : message.get_misses; + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.delete_hits = typeof message.delete_hits === "number" ? $BigInt(message.delete_hits) : $util.Long.fromBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0, true).toBigInt(); + else if (typeof message.delete_hits === "number") + object.delete_hits = options.longs === $String ? $String(message.delete_hits) : message.delete_hits; else - object.delete_hits = options.longs === String ? $util.Long.prototype.toString.call(message.delete_hits) : options.longs === Number ? new $util.LongBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0).toNumber(true) : message.delete_hits; - if (message.delete_misses != null && message.hasOwnProperty("delete_misses")) - if (typeof message.delete_misses === "number") - object.delete_misses = options.longs === String ? String(message.delete_misses) : message.delete_misses; + object.delete_hits = options.longs === $String ? $util.Long.prototype.toString.call(message.delete_hits) : options.longs === $Number ? new $util.LongBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0).toNumber(true) : message.delete_hits; + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.delete_misses = typeof message.delete_misses === "number" ? $BigInt(message.delete_misses) : $util.Long.fromBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0, true).toBigInt(); + else if (typeof message.delete_misses === "number") + object.delete_misses = options.longs === $String ? $String(message.delete_misses) : message.delete_misses; else - object.delete_misses = options.longs === String ? $util.Long.prototype.toString.call(message.delete_misses) : options.longs === Number ? new $util.LongBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0).toNumber(true) : message.delete_misses; - if (message.bytes_read != null && message.hasOwnProperty("bytes_read")) - if (typeof message.bytes_read === "number") - object.bytes_read = options.longs === String ? String(message.bytes_read) : message.bytes_read; + object.delete_misses = options.longs === $String ? $util.Long.prototype.toString.call(message.delete_misses) : options.longs === $Number ? new $util.LongBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0).toNumber(true) : message.delete_misses; + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes_read = typeof message.bytes_read === "number" ? $BigInt(message.bytes_read) : $util.Long.fromBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0, true).toBigInt(); + else if (typeof message.bytes_read === "number") + object.bytes_read = options.longs === $String ? $String(message.bytes_read) : message.bytes_read; else - object.bytes_read = options.longs === String ? $util.Long.prototype.toString.call(message.bytes_read) : options.longs === Number ? new $util.LongBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0).toNumber(true) : message.bytes_read; - if (message.bytes_written != null && message.hasOwnProperty("bytes_written")) - if (typeof message.bytes_written === "number") - object.bytes_written = options.longs === String ? String(message.bytes_written) : message.bytes_written; + object.bytes_read = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes_read) : options.longs === $Number ? new $util.LongBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0).toNumber(true) : message.bytes_read; + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes_written = typeof message.bytes_written === "number" ? $BigInt(message.bytes_written) : $util.Long.fromBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0, true).toBigInt(); + else if (typeof message.bytes_written === "number") + object.bytes_written = options.longs === $String ? $String(message.bytes_written) : message.bytes_written; else - object.bytes_written = options.longs === String ? $util.Long.prototype.toString.call(message.bytes_written) : options.longs === Number ? new $util.LongBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0).toNumber(true) : message.bytes_written; - if (message.limit_maxbytes != null && message.hasOwnProperty("limit_maxbytes")) - if (typeof message.limit_maxbytes === "number") - object.limit_maxbytes = options.longs === String ? String(message.limit_maxbytes) : message.limit_maxbytes; + object.bytes_written = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes_written) : options.longs === $Number ? new $util.LongBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0).toNumber(true) : message.bytes_written; + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.limit_maxbytes = typeof message.limit_maxbytes === "number" ? $BigInt(message.limit_maxbytes) : $util.Long.fromBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0, true).toBigInt(); + else if (typeof message.limit_maxbytes === "number") + object.limit_maxbytes = options.longs === $String ? $String(message.limit_maxbytes) : message.limit_maxbytes; else - object.limit_maxbytes = options.longs === String ? $util.Long.prototype.toString.call(message.limit_maxbytes) : options.longs === Number ? new $util.LongBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0).toNumber(true) : message.limit_maxbytes; - if (message.curr_items != null && message.hasOwnProperty("curr_items")) - if (typeof message.curr_items === "number") - object.curr_items = options.longs === String ? String(message.curr_items) : message.curr_items; + object.limit_maxbytes = options.longs === $String ? $util.Long.prototype.toString.call(message.limit_maxbytes) : options.longs === $Number ? new $util.LongBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0).toNumber(true) : message.limit_maxbytes; + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.curr_items = typeof message.curr_items === "number" ? $BigInt(message.curr_items) : $util.Long.fromBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0, true).toBigInt(); + else if (typeof message.curr_items === "number") + object.curr_items = options.longs === $String ? $String(message.curr_items) : message.curr_items; else - object.curr_items = options.longs === String ? $util.Long.prototype.toString.call(message.curr_items) : options.longs === Number ? new $util.LongBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0).toNumber(true) : message.curr_items; - if (message.evictions != null && message.hasOwnProperty("evictions")) - if (typeof message.evictions === "number") - object.evictions = options.longs === String ? String(message.evictions) : message.evictions; + object.curr_items = options.longs === $String ? $util.Long.prototype.toString.call(message.curr_items) : options.longs === $Number ? new $util.LongBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0).toNumber(true) : message.curr_items; + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.evictions = typeof message.evictions === "number" ? $BigInt(message.evictions) : $util.Long.fromBits(message.evictions.low >>> 0, message.evictions.high >>> 0, true).toBigInt(); + else if (typeof message.evictions === "number") + object.evictions = options.longs === $String ? $String(message.evictions) : message.evictions; else - object.evictions = options.longs === String ? $util.Long.prototype.toString.call(message.evictions) : options.longs === Number ? new $util.LongBits(message.evictions.low >>> 0, message.evictions.high >>> 0).toNumber(true) : message.evictions; - if (message.bytes != null && message.hasOwnProperty("bytes")) - if (typeof message.bytes === "number") - object.bytes = options.longs === String ? String(message.bytes) : message.bytes; + object.evictions = options.longs === $String ? $util.Long.prototype.toString.call(message.evictions) : options.longs === $Number ? new $util.LongBits(message.evictions.low >>> 0, message.evictions.high >>> 0).toNumber(true) : message.evictions; + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes = typeof message.bytes === "number" ? $BigInt(message.bytes) : $util.Long.fromBits(message.bytes.low >>> 0, message.bytes.high >>> 0, true).toBigInt(); + else if (typeof message.bytes === "number") + object.bytes = options.longs === $String ? $String(message.bytes) : message.bytes; else - object.bytes = options.longs === String ? $util.Long.prototype.toString.call(message.bytes) : options.longs === Number ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber(true) : message.bytes; + object.bytes = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes) : options.longs === $Number ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber(true) : message.bytes; return object; }; @@ -15100,8 +19683,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedStatsResponse.prototype.toJSON = function() { + return CGCMsgMemCachedStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedStatsResponse + * @function getTypeUrl + * @memberof CGCMsgMemCachedStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedStatsResponse"; }; return CGCMsgMemCachedStatsResponse; @@ -15109,27 +19706,40 @@ $root.CGCMsgSQLStats = (function() { + /** + * Properties of a CGCMsgSQLStats. + * @typedef {Object} CGCMsgSQLStats.$Properties + * @property {number|null} [schema_catalog] CGCMsgSQLStats schema_catalog + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgSQLStats. * @exports ICGCMsgSQLStats * @interface ICGCMsgSQLStats - * @property {number|null} [schema_catalog] CGCMsgSQLStats schema_catalog + * @augments CGCMsgSQLStats.$Properties + * @deprecated Use CGCMsgSQLStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgSQLStats. + * @typedef {CGCMsgSQLStats.$Properties} CGCMsgSQLStats.$Shape */ /** * Constructs a new CGCMsgSQLStats. * @exports CGCMsgSQLStats * @classdesc Represents a CGCMsgSQLStats. - * @implements ICGCMsgSQLStats * @constructor - * @param {ICGCMsgSQLStats=} [properties] Properties to set + * @param {CGCMsgSQLStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSQLStats(properties) { + var CGCMsgSQLStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSQLStats schema_catalog. @@ -15144,10 +19754,14 @@ * @function create * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats=} [properties] Properties to set + * @param {CGCMsgSQLStats.$Properties=} [properties] Properties to set * @returns {CGCMsgSQLStats} CGCMsgSQLStats instance + * @type {{ + * (properties: CGCMsgSQLStats.$Shape): CGCMsgSQLStats & CGCMsgSQLStats.$Shape; + * (properties?: CGCMsgSQLStats.$Properties): CGCMsgSQLStats; + * }} */ - CGCMsgSQLStats.create = function create(properties) { + CGCMsgSQLStats.create = function(properties) { return new CGCMsgSQLStats(properties); }; @@ -15156,15 +19770,22 @@ * @function encode * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats} message CGCMsgSQLStats message or plain object to encode + * @param {CGCMsgSQLStats.$Properties} message CGCMsgSQLStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStats.encode = function encode(message, writer) { + CGCMsgSQLStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.schema_catalog != null && Object.hasOwnProperty.call(message, "schema_catalog")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.schema_catalog); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15173,12 +19794,12 @@ * @function encodeDelimited * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats} message CGCMsgSQLStats message or plain object to encode + * @param {CGCMsgSQLStats.$Properties} message CGCMsgSQLStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSQLStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15188,25 +19809,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSQLStats} CGCMsgSQLStats + * @returns {CGCMsgSQLStats & CGCMsgSQLStats.$Shape} CGCMsgSQLStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStats.decode = function decode(reader, length) { + CGCMsgSQLStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSQLStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSQLStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.schema_catalog = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.schema_catalog = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15216,11 +19854,11 @@ * @memberof CGCMsgSQLStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSQLStats} CGCMsgSQLStats + * @returns {CGCMsgSQLStats & CGCMsgSQLStats.$Shape} CGCMsgSQLStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSQLStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15234,10 +19872,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSQLStats.verify = function verify(message) { + CGCMsgSQLStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) if (!$util.isInteger(message.schema_catalog)) return "schema_catalog: integer expected"; return null; @@ -15251,9 +19893,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgSQLStats} CGCMsgSQLStats */ - CGCMsgSQLStats.fromObject = function fromObject(object) { + CGCMsgSQLStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSQLStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSQLStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSQLStats(); if (object.schema_catalog != null) message.schema_catalog = object.schema_catalog >>> 0; @@ -15269,13 +19917,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSQLStats.toObject = function toObject(message, options) { + CGCMsgSQLStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.schema_catalog = 0; - if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog")) + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) object.schema_catalog = message.schema_catalog; return object; }; @@ -15287,8 +19939,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSQLStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSQLStats.prototype.toJSON = function() { + return CGCMsgSQLStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSQLStats + * @function getTypeUrl + * @memberof CGCMsgSQLStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSQLStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSQLStats"; }; return CGCMsgSQLStats; @@ -15298,8 +19964,7 @@ /** * Properties of a CGCMsgSQLStatsResponse. - * @exports ICGCMsgSQLStatsResponse - * @interface ICGCMsgSQLStatsResponse + * @typedef {Object} CGCMsgSQLStatsResponse.$Properties * @property {number|null} [threads] CGCMsgSQLStatsResponse threads * @property {number|null} [threads_connected] CGCMsgSQLStatsResponse threads_connected * @property {number|null} [threads_active] CGCMsgSQLStatsResponse threads_active @@ -15309,22 +19974,36 @@ * @property {number|null} [deadlock_retries] CGCMsgSQLStatsResponse deadlock_retries * @property {number|null} [operations_timed_out_in_queue] CGCMsgSQLStatsResponse operations_timed_out_in_queue * @property {number|null} [errors] CGCMsgSQLStatsResponse errors + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgSQLStatsResponse. + * @exports ICGCMsgSQLStatsResponse + * @interface ICGCMsgSQLStatsResponse + * @augments CGCMsgSQLStatsResponse.$Properties + * @deprecated Use CGCMsgSQLStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgSQLStatsResponse. + * @typedef {CGCMsgSQLStatsResponse.$Properties} CGCMsgSQLStatsResponse.$Shape */ /** * Constructs a new CGCMsgSQLStatsResponse. * @exports CGCMsgSQLStatsResponse * @classdesc Represents a CGCMsgSQLStatsResponse. - * @implements ICGCMsgSQLStatsResponse * @constructor - * @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set + * @param {CGCMsgSQLStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSQLStatsResponse(properties) { + var CGCMsgSQLStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSQLStatsResponse threads. @@ -15403,10 +20082,14 @@ * @function create * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set + * @param {CGCMsgSQLStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse instance + * @type {{ + * (properties: CGCMsgSQLStatsResponse.$Shape): CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape; + * (properties?: CGCMsgSQLStatsResponse.$Properties): CGCMsgSQLStatsResponse; + * }} */ - CGCMsgSQLStatsResponse.create = function create(properties) { + CGCMsgSQLStatsResponse.create = function(properties) { return new CGCMsgSQLStatsResponse(properties); }; @@ -15415,31 +20098,38 @@ * @function encode * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse} message CGCMsgSQLStatsResponse message or plain object to encode + * @param {CGCMsgSQLStatsResponse.$Properties} message CGCMsgSQLStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStatsResponse.encode = function encode(message, writer) { + CGCMsgSQLStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.threads != null && Object.hasOwnProperty.call(message, "threads")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.threads); - if (message.threads_connected != null && Object.hasOwnProperty.call(message, "threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.threads_connected); - if (message.threads_active != null && Object.hasOwnProperty.call(message, "threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.threads_active); - if (message.operations_submitted != null && Object.hasOwnProperty.call(message, "operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.operations_submitted); - if (message.prepared_statements_executed != null && Object.hasOwnProperty.call(message, "prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.prepared_statements_executed); - if (message.non_prepared_statements_executed != null && Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.non_prepared_statements_executed); - if (message.deadlock_retries != null && Object.hasOwnProperty.call(message, "deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.deadlock_retries); - if (message.operations_timed_out_in_queue != null && Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.operations_timed_out_in_queue); - if (message.errors != null && Object.hasOwnProperty.call(message, "errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.errors); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15448,12 +20138,12 @@ * @function encodeDelimited * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse} message CGCMsgSQLStatsResponse message or plain object to encode + * @param {CGCMsgSQLStatsResponse.$Properties} message CGCMsgSQLStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSQLStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15463,49 +20153,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse + * @returns {CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape} CGCMsgSQLStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStatsResponse.decode = function decode(reader, length) { + CGCMsgSQLStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSQLStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSQLStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.threads = reader.uint32(); - break; - case 2: - message.threads_connected = reader.uint32(); - break; - case 3: - message.threads_active = reader.uint32(); - break; - case 4: - message.operations_submitted = reader.uint32(); - break; - case 5: - message.prepared_statements_executed = reader.uint32(); - break; - case 6: - message.non_prepared_statements_executed = reader.uint32(); - break; - case 7: - message.deadlock_retries = reader.uint32(); - break; - case 8: - message.operations_timed_out_in_queue = reader.uint32(); - break; - case 9: - message.errors = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.threads = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.threads_connected = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.threads_active = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.operations_submitted = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.prepared_statements_executed = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.non_prepared_statements_executed = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.deadlock_retries = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.operations_timed_out_in_queue = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.errors = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15515,11 +20246,11 @@ * @memberof CGCMsgSQLStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse + * @returns {CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape} CGCMsgSQLStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSQLStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15533,34 +20264,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSQLStatsResponse.verify = function verify(message) { + CGCMsgSQLStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.threads != null && message.hasOwnProperty("threads")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) if (!$util.isInteger(message.threads)) return "threads: integer expected"; - if (message.threads_connected != null && message.hasOwnProperty("threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) if (!$util.isInteger(message.threads_connected)) return "threads_connected: integer expected"; - if (message.threads_active != null && message.hasOwnProperty("threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) if (!$util.isInteger(message.threads_active)) return "threads_active: integer expected"; - if (message.operations_submitted != null && message.hasOwnProperty("operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) if (!$util.isInteger(message.operations_submitted)) return "operations_submitted: integer expected"; - if (message.prepared_statements_executed != null && message.hasOwnProperty("prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) if (!$util.isInteger(message.prepared_statements_executed)) return "prepared_statements_executed: integer expected"; - if (message.non_prepared_statements_executed != null && message.hasOwnProperty("non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) if (!$util.isInteger(message.non_prepared_statements_executed)) return "non_prepared_statements_executed: integer expected"; - if (message.deadlock_retries != null && message.hasOwnProperty("deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) if (!$util.isInteger(message.deadlock_retries)) return "deadlock_retries: integer expected"; - if (message.operations_timed_out_in_queue != null && message.hasOwnProperty("operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) if (!$util.isInteger(message.operations_timed_out_in_queue)) return "operations_timed_out_in_queue: integer expected"; - if (message.errors != null && message.hasOwnProperty("errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) if (!$util.isInteger(message.errors)) return "errors: integer expected"; return null; @@ -15574,9 +20309,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse */ - CGCMsgSQLStatsResponse.fromObject = function fromObject(object) { + CGCMsgSQLStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSQLStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSQLStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSQLStatsResponse(); if (object.threads != null) message.threads = object.threads >>> 0; @@ -15608,9 +20349,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSQLStatsResponse.toObject = function toObject(message, options) { + CGCMsgSQLStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.threads = 0; @@ -15623,23 +20368,23 @@ object.operations_timed_out_in_queue = 0; object.errors = 0; } - if (message.threads != null && message.hasOwnProperty("threads")) + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) object.threads = message.threads; - if (message.threads_connected != null && message.hasOwnProperty("threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) object.threads_connected = message.threads_connected; - if (message.threads_active != null && message.hasOwnProperty("threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) object.threads_active = message.threads_active; - if (message.operations_submitted != null && message.hasOwnProperty("operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) object.operations_submitted = message.operations_submitted; - if (message.prepared_statements_executed != null && message.hasOwnProperty("prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) object.prepared_statements_executed = message.prepared_statements_executed; - if (message.non_prepared_statements_executed != null && message.hasOwnProperty("non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) object.non_prepared_statements_executed = message.non_prepared_statements_executed; - if (message.deadlock_retries != null && message.hasOwnProperty("deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) object.deadlock_retries = message.deadlock_retries; - if (message.operations_timed_out_in_queue != null && message.hasOwnProperty("operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) object.operations_timed_out_in_queue = message.operations_timed_out_in_queue; - if (message.errors != null && message.hasOwnProperty("errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) object.errors = message.errors; return object; }; @@ -15651,8 +20396,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSQLStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSQLStatsResponse.prototype.toJSON = function() { + return CGCMsgSQLStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSQLStatsResponse + * @function getTypeUrl + * @memberof CGCMsgSQLStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSQLStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSQLStatsResponse"; }; return CGCMsgSQLStatsResponse; @@ -15662,28 +20421,41 @@ /** * Properties of a CMsgAMAddFreeLicense. - * @exports ICMsgAMAddFreeLicense - * @interface ICMsgAMAddFreeLicense + * @typedef {Object} CMsgAMAddFreeLicense.$Properties * @property {number|Long|null} [steamid] CMsgAMAddFreeLicense steamid * @property {number|null} [ip_public] CMsgAMAddFreeLicense ip_public * @property {number|null} [packageid] CMsgAMAddFreeLicense packageid * @property {string|null} [store_country_code] CMsgAMAddFreeLicense store_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMAddFreeLicense. + * @exports ICMsgAMAddFreeLicense + * @interface ICMsgAMAddFreeLicense + * @augments CMsgAMAddFreeLicense.$Properties + * @deprecated Use CMsgAMAddFreeLicense.$Properties instead. + */ + + /** + * Shape of a CMsgAMAddFreeLicense. + * @typedef {CMsgAMAddFreeLicense.$Properties} CMsgAMAddFreeLicense.$Shape */ /** * Constructs a new CMsgAMAddFreeLicense. * @exports CMsgAMAddFreeLicense * @classdesc Represents a CMsgAMAddFreeLicense. - * @implements ICMsgAMAddFreeLicense * @constructor - * @param {ICMsgAMAddFreeLicense=} [properties] Properties to set + * @param {CMsgAMAddFreeLicense.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMAddFreeLicense(properties) { + var CMsgAMAddFreeLicense = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMAddFreeLicense steamid. @@ -15691,7 +20463,7 @@ * @memberof CMsgAMAddFreeLicense * @instance */ - CMsgAMAddFreeLicense.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMAddFreeLicense.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMAddFreeLicense ip_public. @@ -15722,10 +20494,14 @@ * @function create * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense=} [properties] Properties to set + * @param {CMsgAMAddFreeLicense.$Properties=} [properties] Properties to set * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense instance + * @type {{ + * (properties: CMsgAMAddFreeLicense.$Shape): CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape; + * (properties?: CMsgAMAddFreeLicense.$Properties): CMsgAMAddFreeLicense; + * }} */ - CMsgAMAddFreeLicense.create = function create(properties) { + CMsgAMAddFreeLicense.create = function(properties) { return new CMsgAMAddFreeLicense(properties); }; @@ -15734,21 +20510,28 @@ * @function encode * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense} message CMsgAMAddFreeLicense message or plain object to encode + * @param {CMsgAMAddFreeLicense.$Properties} message CMsgAMAddFreeLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicense.encode = function encode(message, writer) { + CMsgAMAddFreeLicense.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.ip_public != null && Object.hasOwnProperty.call(message, "ip_public")) + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ip_public); - if (message.packageid != null && Object.hasOwnProperty.call(message, "packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.packageid); - if (message.store_country_code != null && Object.hasOwnProperty.call(message, "store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.store_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15757,12 +20540,12 @@ * @function encodeDelimited * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense} message CMsgAMAddFreeLicense message or plain object to encode + * @param {CMsgAMAddFreeLicense.$Properties} message CMsgAMAddFreeLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMAddFreeLicense.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15772,34 +20555,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense + * @returns {CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape} CMsgAMAddFreeLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicense.decode = function decode(reader, length) { + CMsgAMAddFreeLicense.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMAddFreeLicense(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMAddFreeLicense(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.ip_public = reader.uint32(); - break; - case 3: - message.packageid = reader.uint32(); - break; - case 4: - message.store_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.ip_public = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.packageid = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.store_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15809,11 +20618,11 @@ * @memberof CMsgAMAddFreeLicense * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense + * @returns {CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape} CMsgAMAddFreeLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicense.decodeDelimited = function decodeDelimited(reader) { + CMsgAMAddFreeLicense.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15827,19 +20636,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMAddFreeLicense.verify = function verify(message) { + CMsgAMAddFreeLicense.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.ip_public != null && message.hasOwnProperty("ip_public")) + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) if (!$util.isInteger(message.ip_public)) return "ip_public: integer expected"; - if (message.packageid != null && message.hasOwnProperty("packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) if (!$util.isInteger(message.packageid)) return "packageid: integer expected"; - if (message.store_country_code != null && message.hasOwnProperty("store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) if (!$util.isString(message.store_country_code)) return "store_country_code: string expected"; return null; @@ -15853,25 +20666,31 @@ * @param {Object.} object Plain object * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense */ - CMsgAMAddFreeLicense.fromObject = function fromObject(object) { + CMsgAMAddFreeLicense.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMAddFreeLicense) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMAddFreeLicense: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMAddFreeLicense(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.ip_public != null) message.ip_public = object.ip_public >>> 0; if (object.packageid != null) message.packageid = object.packageid >>> 0; if (object.store_country_code != null) - message.store_country_code = String(object.store_country_code); + message.store_country_code = $String(object.store_country_code); return message; }; @@ -15884,30 +20703,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMAddFreeLicense.toObject = function toObject(message, options) { + CMsgAMAddFreeLicense.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.ip_public = 0; object.packageid = 0; object.store_country_code = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.ip_public != null && message.hasOwnProperty("ip_public")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) object.ip_public = message.ip_public; - if (message.packageid != null && message.hasOwnProperty("packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) object.packageid = message.packageid; - if (message.store_country_code != null && message.hasOwnProperty("store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) object.store_country_code = message.store_country_code; return object; }; @@ -15919,8 +20744,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMAddFreeLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMAddFreeLicense.prototype.toJSON = function() { + return CMsgAMAddFreeLicense.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMAddFreeLicense + * @function getTypeUrl + * @memberof CMsgAMAddFreeLicense + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMAddFreeLicense.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMAddFreeLicense"; }; return CMsgAMAddFreeLicense; @@ -15930,27 +20769,40 @@ /** * Properties of a CMsgAMAddFreeLicenseResponse. - * @exports ICMsgAMAddFreeLicenseResponse - * @interface ICMsgAMAddFreeLicenseResponse + * @typedef {Object} CMsgAMAddFreeLicenseResponse.$Properties * @property {number|null} [eresult] CMsgAMAddFreeLicenseResponse eresult * @property {number|null} [purchase_result_detail] CMsgAMAddFreeLicenseResponse purchase_result_detail * @property {number|Long|null} [transid] CMsgAMAddFreeLicenseResponse transid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMAddFreeLicenseResponse. + * @exports ICMsgAMAddFreeLicenseResponse + * @interface ICMsgAMAddFreeLicenseResponse + * @augments CMsgAMAddFreeLicenseResponse.$Properties + * @deprecated Use CMsgAMAddFreeLicenseResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMAddFreeLicenseResponse. + * @typedef {CMsgAMAddFreeLicenseResponse.$Properties} CMsgAMAddFreeLicenseResponse.$Shape */ /** * Constructs a new CMsgAMAddFreeLicenseResponse. * @exports CMsgAMAddFreeLicenseResponse * @classdesc Represents a CMsgAMAddFreeLicenseResponse. - * @implements ICMsgAMAddFreeLicenseResponse * @constructor - * @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set + * @param {CMsgAMAddFreeLicenseResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMAddFreeLicenseResponse(properties) { + var CMsgAMAddFreeLicenseResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMAddFreeLicenseResponse eresult. @@ -15974,17 +20826,21 @@ * @memberof CMsgAMAddFreeLicenseResponse * @instance */ - CMsgAMAddFreeLicenseResponse.prototype.transid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMAddFreeLicenseResponse.prototype.transid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgAMAddFreeLicenseResponse instance using the specified properties. * @function create * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set + * @param {CMsgAMAddFreeLicenseResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse instance + * @type {{ + * (properties: CMsgAMAddFreeLicenseResponse.$Shape): CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape; + * (properties?: CMsgAMAddFreeLicenseResponse.$Properties): CMsgAMAddFreeLicenseResponse; + * }} */ - CMsgAMAddFreeLicenseResponse.create = function create(properties) { + CMsgAMAddFreeLicenseResponse.create = function(properties) { return new CMsgAMAddFreeLicenseResponse(properties); }; @@ -15993,19 +20849,26 @@ * @function encode * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse} message CMsgAMAddFreeLicenseResponse message or plain object to encode + * @param {CMsgAMAddFreeLicenseResponse.$Properties} message CMsgAMAddFreeLicenseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicenseResponse.encode = function encode(message, writer) { + CMsgAMAddFreeLicenseResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); - if (message.purchase_result_detail != null && Object.hasOwnProperty.call(message, "purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.purchase_result_detail); - if (message.transid != null && Object.hasOwnProperty.call(message, "transid")) + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.transid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16014,12 +20877,12 @@ * @function encodeDelimited * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse} message CMsgAMAddFreeLicenseResponse message or plain object to encode + * @param {CMsgAMAddFreeLicenseResponse.$Properties} message CMsgAMAddFreeLicenseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicenseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMAddFreeLicenseResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16029,31 +20892,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse + * @returns {CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape} CMsgAMAddFreeLicenseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicenseResponse.decode = function decode(reader, length) { + CMsgAMAddFreeLicenseResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMAddFreeLicenseResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMAddFreeLicenseResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - case 2: - message.purchase_result_detail = reader.int32(); - break; - case 3: - message.transid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.purchase_result_detail = reader.int32(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.transid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16063,11 +20949,11 @@ * @memberof CMsgAMAddFreeLicenseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse + * @returns {CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape} CMsgAMAddFreeLicenseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicenseResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMAddFreeLicenseResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16081,16 +20967,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMAddFreeLicenseResponse.verify = function verify(message) { + CMsgAMAddFreeLicenseResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.purchase_result_detail != null && message.hasOwnProperty("purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) if (!$util.isInteger(message.purchase_result_detail)) return "purchase_result_detail: integer expected"; - if (message.transid != null && message.hasOwnProperty("transid")) + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) if (!$util.isInteger(message.transid) && !(message.transid && $util.isInteger(message.transid.low) && $util.isInteger(message.transid.high))) return "transid: integer|Long expected"; return null; @@ -16104,9 +20994,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse */ - CMsgAMAddFreeLicenseResponse.fromObject = function fromObject(object) { + CMsgAMAddFreeLicenseResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMAddFreeLicenseResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMAddFreeLicenseResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMAddFreeLicenseResponse(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -16114,13 +21010,13 @@ message.purchase_result_detail = object.purchase_result_detail | 0; if (object.transid != null) if ($util.Long) - (message.transid = $util.Long.fromValue(object.transid)).unsigned = false; + message.transid = $util.Long.fromValue(object.transid, true); else if (typeof object.transid === "string") - message.transid = parseInt(object.transid, 10); + message.transid = $parseInt(object.transid, 10); else if (typeof object.transid === "number") message.transid = object.transid; else if (typeof object.transid === "object") - message.transid = new $util.LongBits(object.transid.low >>> 0, object.transid.high >>> 0).toNumber(); + message.transid = new $util.LongBits(object.transid.low >>> 0, object.transid.high >>> 0).toNumber(true); return message; }; @@ -16133,28 +21029,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMAddFreeLicenseResponse.toObject = function toObject(message, options) { + CMsgAMAddFreeLicenseResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.purchase_result_detail = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.transid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.transid = options.longs === String ? "0" : 0; + object.transid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.purchase_result_detail != null && message.hasOwnProperty("purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) object.purchase_result_detail = message.purchase_result_detail; - if (message.transid != null && message.hasOwnProperty("transid")) - if (typeof message.transid === "number") - object.transid = options.longs === String ? String(message.transid) : message.transid; + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.transid = typeof message.transid === "number" ? $BigInt(message.transid) : $util.Long.fromBits(message.transid.low >>> 0, message.transid.high >>> 0, true).toBigInt(); + else if (typeof message.transid === "number") + object.transid = options.longs === $String ? $String(message.transid) : message.transid; else - object.transid = options.longs === String ? $util.Long.prototype.toString.call(message.transid) : options.longs === Number ? new $util.LongBits(message.transid.low >>> 0, message.transid.high >>> 0).toNumber() : message.transid; + object.transid = options.longs === $String ? $util.Long.prototype.toString.call(message.transid) : options.longs === $Number ? new $util.LongBits(message.transid.low >>> 0, message.transid.high >>> 0).toNumber(true) : message.transid; return object; }; @@ -16165,8 +21067,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMAddFreeLicenseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMAddFreeLicenseResponse.prototype.toJSON = function() { + return CMsgAMAddFreeLicenseResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMAddFreeLicenseResponse + * @function getTypeUrl + * @memberof CMsgAMAddFreeLicenseResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMAddFreeLicenseResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMAddFreeLicenseResponse"; }; return CMsgAMAddFreeLicenseResponse; @@ -16174,28 +21090,41 @@ $root.CGCMsgGetIPLocation = (function() { + /** + * Properties of a CGCMsgGetIPLocation. + * @typedef {Object} CGCMsgGetIPLocation.$Properties + * @property {Array.|null} [ips] CGCMsgGetIPLocation ips + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetIPLocation. * @exports ICGCMsgGetIPLocation * @interface ICGCMsgGetIPLocation - * @property {Array.|null} [ips] CGCMsgGetIPLocation ips + * @augments CGCMsgGetIPLocation.$Properties + * @deprecated Use CGCMsgGetIPLocation.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetIPLocation. + * @typedef {CGCMsgGetIPLocation.$Properties} CGCMsgGetIPLocation.$Shape */ /** * Constructs a new CGCMsgGetIPLocation. * @exports CGCMsgGetIPLocation * @classdesc Represents a CGCMsgGetIPLocation. - * @implements ICGCMsgGetIPLocation * @constructor - * @param {ICGCMsgGetIPLocation=} [properties] Properties to set + * @param {CGCMsgGetIPLocation.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetIPLocation(properties) { + var CGCMsgGetIPLocation = function (properties) { this.ips = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetIPLocation ips. @@ -16210,10 +21139,14 @@ * @function create * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation=} [properties] Properties to set + * @param {CGCMsgGetIPLocation.$Properties=} [properties] Properties to set * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation instance + * @type {{ + * (properties: CGCMsgGetIPLocation.$Shape): CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape; + * (properties?: CGCMsgGetIPLocation.$Properties): CGCMsgGetIPLocation; + * }} */ - CGCMsgGetIPLocation.create = function create(properties) { + CGCMsgGetIPLocation.create = function(properties) { return new CGCMsgGetIPLocation(properties); }; @@ -16222,16 +21155,23 @@ * @function encode * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation} message CGCMsgGetIPLocation message or plain object to encode + * @param {CGCMsgGetIPLocation.$Properties} message CGCMsgGetIPLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocation.encode = function encode(message, writer) { + CGCMsgGetIPLocation.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.ips != null && message.ips.length) for (var i = 0; i < message.ips.length; ++i) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.ips[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16240,12 +21180,12 @@ * @function encodeDelimited * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation} message CGCMsgGetIPLocation message or plain object to encode + * @param {CGCMsgGetIPLocation.$Properties} message CGCMsgGetIPLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetIPLocation.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16255,32 +21195,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation + * @returns {CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape} CGCMsgGetIPLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocation.decode = function decode(reader, length) { + CGCMsgGetIPLocation.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetIPLocation(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetIPLocation(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.ips && message.ips.length)) - message.ips = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ips.push(reader.fixed32()); - } else - message.ips.push(reader.fixed32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.ips && message.ips.length)) + message.ips = []; + reader.fixed32s(message.ips); + continue; + } + if (wireType !== 5) + break; + if (!(message.ips && message.ips.length)) + message.ips = []; + message.ips.push(reader.fixed32()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16290,11 +21248,11 @@ * @memberof CGCMsgGetIPLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation + * @returns {CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape} CGCMsgGetIPLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocation.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetIPLocation.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16308,11 +21266,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetIPLocation.verify = function verify(message) { + CGCMsgGetIPLocation.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ips != null && message.hasOwnProperty("ips")) { - if (!Array.isArray(message.ips)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ips != null && $Object.hasOwnProperty.call(message, "ips")) { + if (!$Array.isArray(message.ips)) return "ips: array expected"; for (var i = 0; i < message.ips.length; ++i) if (!$util.isInteger(message.ips[i])) @@ -16329,14 +21291,20 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation */ - CGCMsgGetIPLocation.fromObject = function fromObject(object) { + CGCMsgGetIPLocation.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetIPLocation) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetIPLocation: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetIPLocation(); if (object.ips) { - if (!Array.isArray(object.ips)) - throw TypeError(".CGCMsgGetIPLocation.ips: array expected"); - message.ips = []; + if (!$Array.isArray(object.ips)) + throw $TypeError(".CGCMsgGetIPLocation.ips: array expected"); + message.ips = $Array(object.ips.length); for (var i = 0; i < object.ips.length; ++i) message.ips[i] = object.ips[i] >>> 0; } @@ -16352,14 +21320,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetIPLocation.toObject = function toObject(message, options) { + CGCMsgGetIPLocation.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.ips = []; if (message.ips && message.ips.length) { - object.ips = []; + object.ips = $Array(message.ips.length); for (var j = 0; j < message.ips.length; ++j) object.ips[j] = message.ips[j]; } @@ -16373,8 +21345,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetIPLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetIPLocation.prototype.toJSON = function() { + return CGCMsgGetIPLocation.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetIPLocation + * @function getTypeUrl + * @memberof CGCMsgGetIPLocation + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetIPLocation.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetIPLocation"; }; return CGCMsgGetIPLocation; @@ -16384,30 +21370,43 @@ /** * Properties of a CIPLocationInfo. - * @exports ICIPLocationInfo - * @interface ICIPLocationInfo + * @typedef {Object} CIPLocationInfo.$Properties * @property {number|null} [ip] CIPLocationInfo ip * @property {number|null} [latitude] CIPLocationInfo latitude * @property {number|null} [longitude] CIPLocationInfo longitude * @property {string|null} [country] CIPLocationInfo country * @property {string|null} [state] CIPLocationInfo state * @property {string|null} [city] CIPLocationInfo city + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CIPLocationInfo. + * @exports ICIPLocationInfo + * @interface ICIPLocationInfo + * @augments CIPLocationInfo.$Properties + * @deprecated Use CIPLocationInfo.$Properties instead. + */ + + /** + * Shape of a CIPLocationInfo. + * @typedef {CIPLocationInfo.$Properties} CIPLocationInfo.$Shape */ /** * Constructs a new CIPLocationInfo. * @exports CIPLocationInfo * @classdesc Represents a CIPLocationInfo. - * @implements ICIPLocationInfo * @constructor - * @param {ICIPLocationInfo=} [properties] Properties to set + * @param {CIPLocationInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CIPLocationInfo(properties) { + var CIPLocationInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CIPLocationInfo ip. @@ -16462,10 +21461,14 @@ * @function create * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo=} [properties] Properties to set + * @param {CIPLocationInfo.$Properties=} [properties] Properties to set * @returns {CIPLocationInfo} CIPLocationInfo instance + * @type {{ + * (properties: CIPLocationInfo.$Shape): CIPLocationInfo & CIPLocationInfo.$Shape; + * (properties?: CIPLocationInfo.$Properties): CIPLocationInfo; + * }} */ - CIPLocationInfo.create = function create(properties) { + CIPLocationInfo.create = function(properties) { return new CIPLocationInfo(properties); }; @@ -16474,25 +21477,32 @@ * @function encode * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo} message CIPLocationInfo message or plain object to encode + * @param {CIPLocationInfo.$Properties} message CIPLocationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CIPLocationInfo.encode = function encode(message, writer) { + CIPLocationInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.ip); - if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.latitude); - if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.longitude); - if (message.country != null && Object.hasOwnProperty.call(message, "country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.state); - if (message.city != null && Object.hasOwnProperty.call(message, "city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.city); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16501,12 +21511,12 @@ * @function encodeDelimited * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo} message CIPLocationInfo message or plain object to encode + * @param {CIPLocationInfo.$Properties} message CIPLocationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CIPLocationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CIPLocationInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16516,40 +21526,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CIPLocationInfo} CIPLocationInfo + * @returns {CIPLocationInfo & CIPLocationInfo.$Shape} CIPLocationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CIPLocationInfo.decode = function decode(reader, length) { + CIPLocationInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CIPLocationInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CIPLocationInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ip = reader.uint32(); - break; - case 2: - message.latitude = reader.float(); - break; - case 3: - message.longitude = reader.float(); - break; - case 4: - message.country = reader.string(); - break; - case 5: - message.state = reader.string(); - break; - case 6: - message.city = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ip = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.latitude = reader.float(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.longitude = reader.float(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.country = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.state = reader.string(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.city = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16559,11 +21601,11 @@ * @memberof CIPLocationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CIPLocationInfo} CIPLocationInfo + * @returns {CIPLocationInfo & CIPLocationInfo.$Shape} CIPLocationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CIPLocationInfo.decodeDelimited = function decodeDelimited(reader) { + CIPLocationInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16577,25 +21619,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CIPLocationInfo.verify = function verify(message) { + CIPLocationInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ip != null && message.hasOwnProperty("ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) if (!$util.isInteger(message.ip)) return "ip: integer expected"; - if (message.latitude != null && message.hasOwnProperty("latitude")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) if (typeof message.latitude !== "number") return "latitude: number expected"; - if (message.longitude != null && message.hasOwnProperty("longitude")) + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) if (typeof message.longitude !== "number") return "longitude: number expected"; - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) if (!$util.isString(message.country)) return "country: string expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) if (!$util.isString(message.state)) return "state: string expected"; - if (message.city != null && message.hasOwnProperty("city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) if (!$util.isString(message.city)) return "city: string expected"; return null; @@ -16609,22 +21655,28 @@ * @param {Object.} object Plain object * @returns {CIPLocationInfo} CIPLocationInfo */ - CIPLocationInfo.fromObject = function fromObject(object) { + CIPLocationInfo.fromObject = function (object, _depth) { if (object instanceof $root.CIPLocationInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CIPLocationInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CIPLocationInfo(); if (object.ip != null) message.ip = object.ip >>> 0; if (object.latitude != null) - message.latitude = Number(object.latitude); + message.latitude = $Number(object.latitude); if (object.longitude != null) - message.longitude = Number(object.longitude); + message.longitude = $Number(object.longitude); if (object.country != null) - message.country = String(object.country); + message.country = $String(object.country); if (object.state != null) - message.state = String(object.state); + message.state = $String(object.state); if (object.city != null) - message.city = String(object.city); + message.city = $String(object.city); return message; }; @@ -16637,9 +21689,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CIPLocationInfo.toObject = function toObject(message, options) { + CIPLocationInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.ip = 0; @@ -16649,17 +21705,17 @@ object.state = ""; object.city = ""; } - if (message.ip != null && message.hasOwnProperty("ip")) + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) object.ip = message.ip; - if (message.latitude != null && message.hasOwnProperty("latitude")) - object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; - if (message.longitude != null && message.hasOwnProperty("longitude")) - object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; - if (message.country != null && message.hasOwnProperty("country")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) + object.latitude = options.json && !$isFinite(message.latitude) ? $String(message.latitude) : message.latitude; + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) + object.longitude = options.json && !$isFinite(message.longitude) ? $String(message.longitude) : message.longitude; + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) object.country = message.country; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) object.state = message.state; - if (message.city != null && message.hasOwnProperty("city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) object.city = message.city; return object; }; @@ -16671,8 +21727,22 @@ * @instance * @returns {Object.} JSON object */ - CIPLocationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CIPLocationInfo.prototype.toJSON = function() { + return CIPLocationInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CIPLocationInfo + * @function getTypeUrl + * @memberof CIPLocationInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CIPLocationInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CIPLocationInfo"; }; return CIPLocationInfo; @@ -16680,32 +21750,45 @@ $root.CGCMsgGetIPLocationResponse = (function() { + /** + * Properties of a CGCMsgGetIPLocationResponse. + * @typedef {Object} CGCMsgGetIPLocationResponse.$Properties + * @property {Array.|null} [infos] CGCMsgGetIPLocationResponse infos + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetIPLocationResponse. * @exports ICGCMsgGetIPLocationResponse * @interface ICGCMsgGetIPLocationResponse - * @property {Array.|null} [infos] CGCMsgGetIPLocationResponse infos + * @augments CGCMsgGetIPLocationResponse.$Properties + * @deprecated Use CGCMsgGetIPLocationResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetIPLocationResponse. + * @typedef {CGCMsgGetIPLocationResponse.$Properties} CGCMsgGetIPLocationResponse.$Shape */ /** * Constructs a new CGCMsgGetIPLocationResponse. * @exports CGCMsgGetIPLocationResponse * @classdesc Represents a CGCMsgGetIPLocationResponse. - * @implements ICGCMsgGetIPLocationResponse * @constructor - * @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set + * @param {CGCMsgGetIPLocationResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetIPLocationResponse(properties) { + var CGCMsgGetIPLocationResponse = function (properties) { this.infos = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetIPLocationResponse infos. - * @member {Array.} infos + * @member {Array.} infos * @memberof CGCMsgGetIPLocationResponse * @instance */ @@ -16716,10 +21799,14 @@ * @function create * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set + * @param {CGCMsgGetIPLocationResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse instance + * @type {{ + * (properties: CGCMsgGetIPLocationResponse.$Shape): CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape; + * (properties?: CGCMsgGetIPLocationResponse.$Properties): CGCMsgGetIPLocationResponse; + * }} */ - CGCMsgGetIPLocationResponse.create = function create(properties) { + CGCMsgGetIPLocationResponse.create = function(properties) { return new CGCMsgGetIPLocationResponse(properties); }; @@ -16728,16 +21815,23 @@ * @function encode * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse} message CGCMsgGetIPLocationResponse message or plain object to encode + * @param {CGCMsgGetIPLocationResponse.$Properties} message CGCMsgGetIPLocationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocationResponse.encode = function encode(message, writer) { + CGCMsgGetIPLocationResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.infos != null && message.infos.length) for (var i = 0; i < message.infos.length; ++i) - $root.CIPLocationInfo.encode(message.infos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CIPLocationInfo.encode(message.infos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16746,12 +21840,12 @@ * @function encodeDelimited * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse} message CGCMsgGetIPLocationResponse message or plain object to encode + * @param {CGCMsgGetIPLocationResponse.$Properties} message CGCMsgGetIPLocationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetIPLocationResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16761,27 +21855,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse + * @returns {CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape} CGCMsgGetIPLocationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocationResponse.decode = function decode(reader, length) { + CGCMsgGetIPLocationResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetIPLocationResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetIPLocationResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.infos && message.infos.length)) - message.infos = []; - message.infos.push($root.CIPLocationInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.infos && message.infos.length)) + message.infos = []; + message.infos.push($root.CIPLocationInfo.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16791,11 +21902,11 @@ * @memberof CGCMsgGetIPLocationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse + * @returns {CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape} CGCMsgGetIPLocationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocationResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetIPLocationResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16809,14 +21920,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetIPLocationResponse.verify = function verify(message) { + CGCMsgGetIPLocationResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.infos != null && message.hasOwnProperty("infos")) { - if (!Array.isArray(message.infos)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.infos != null && $Object.hasOwnProperty.call(message, "infos")) { + if (!$Array.isArray(message.infos)) return "infos: array expected"; for (var i = 0; i < message.infos.length; ++i) { - var error = $root.CIPLocationInfo.verify(message.infos[i]); + var error = $root.CIPLocationInfo.verify(message.infos[i], _depth + 1); if (error) return "infos." + error; } @@ -16832,18 +21947,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse */ - CGCMsgGetIPLocationResponse.fromObject = function fromObject(object) { + CGCMsgGetIPLocationResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetIPLocationResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetIPLocationResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetIPLocationResponse(); if (object.infos) { - if (!Array.isArray(object.infos)) - throw TypeError(".CGCMsgGetIPLocationResponse.infos: array expected"); - message.infos = []; + if (!$Array.isArray(object.infos)) + throw $TypeError(".CGCMsgGetIPLocationResponse.infos: array expected"); + message.infos = $Array(object.infos.length); for (var i = 0; i < object.infos.length; ++i) { - if (typeof object.infos[i] !== "object") - throw TypeError(".CGCMsgGetIPLocationResponse.infos: object expected"); - message.infos[i] = $root.CIPLocationInfo.fromObject(object.infos[i]); + if (!$util.isObject(object.infos[i])) + throw $TypeError(".CGCMsgGetIPLocationResponse.infos: object expected"); + message.infos[i] = $root.CIPLocationInfo.fromObject(object.infos[i], _depth + 1); } } return message; @@ -16858,16 +21979,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetIPLocationResponse.toObject = function toObject(message, options) { + CGCMsgGetIPLocationResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.infos = []; if (message.infos && message.infos.length) { - object.infos = []; + object.infos = $Array(message.infos.length); for (var j = 0; j < message.infos.length; ++j) - object.infos[j] = $root.CIPLocationInfo.toObject(message.infos[j], options); + object.infos[j] = $root.CIPLocationInfo.toObject(message.infos[j], options, _depth + 1); } return object; }; @@ -16879,8 +22004,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetIPLocationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetIPLocationResponse.prototype.toJSON = function() { + return CGCMsgGetIPLocationResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetIPLocationResponse + * @function getTypeUrl + * @memberof CGCMsgGetIPLocationResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetIPLocationResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetIPLocationResponse"; }; return CGCMsgGetIPLocationResponse; @@ -16890,26 +22029,39 @@ /** * Properties of a CGCMsgSystemStatsSchema. - * @exports ICGCMsgSystemStatsSchema - * @interface ICGCMsgSystemStatsSchema + * @typedef {Object} CGCMsgSystemStatsSchema.$Properties * @property {number|null} [gc_app_id] CGCMsgSystemStatsSchema gc_app_id * @property {Uint8Array|null} [schema_kv] CGCMsgSystemStatsSchema schema_kv + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgSystemStatsSchema. + * @exports ICGCMsgSystemStatsSchema + * @interface ICGCMsgSystemStatsSchema + * @augments CGCMsgSystemStatsSchema.$Properties + * @deprecated Use CGCMsgSystemStatsSchema.$Properties instead. + */ + + /** + * Shape of a CGCMsgSystemStatsSchema. + * @typedef {CGCMsgSystemStatsSchema.$Properties} CGCMsgSystemStatsSchema.$Shape */ /** * Constructs a new CGCMsgSystemStatsSchema. * @exports CGCMsgSystemStatsSchema * @classdesc Represents a CGCMsgSystemStatsSchema. - * @implements ICGCMsgSystemStatsSchema * @constructor - * @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set + * @param {CGCMsgSystemStatsSchema.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSystemStatsSchema(properties) { + var CGCMsgSystemStatsSchema = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSystemStatsSchema gc_app_id. @@ -16932,10 +22084,14 @@ * @function create * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set + * @param {CGCMsgSystemStatsSchema.$Properties=} [properties] Properties to set * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema instance + * @type {{ + * (properties: CGCMsgSystemStatsSchema.$Shape): CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape; + * (properties?: CGCMsgSystemStatsSchema.$Properties): CGCMsgSystemStatsSchema; + * }} */ - CGCMsgSystemStatsSchema.create = function create(properties) { + CGCMsgSystemStatsSchema.create = function(properties) { return new CGCMsgSystemStatsSchema(properties); }; @@ -16944,17 +22100,24 @@ * @function encode * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema} message CGCMsgSystemStatsSchema message or plain object to encode + * @param {CGCMsgSystemStatsSchema.$Properties} message CGCMsgSystemStatsSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSystemStatsSchema.encode = function encode(message, writer) { + CGCMsgSystemStatsSchema.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gc_app_id != null && Object.hasOwnProperty.call(message, "gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gc_app_id); - if (message.schema_kv != null && Object.hasOwnProperty.call(message, "schema_kv")) + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.schema_kv); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16963,12 +22126,12 @@ * @function encodeDelimited * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema} message CGCMsgSystemStatsSchema message or plain object to encode + * @param {CGCMsgSystemStatsSchema.$Properties} message CGCMsgSystemStatsSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSystemStatsSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSystemStatsSchema.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16978,28 +22141,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema + * @returns {CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape} CGCMsgSystemStatsSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSystemStatsSchema.decode = function decode(reader, length) { + CGCMsgSystemStatsSchema.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSystemStatsSchema(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSystemStatsSchema(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gc_app_id = reader.uint32(); - break; - case 2: - message.schema_kv = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gc_app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.schema_kv = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17009,11 +22192,11 @@ * @memberof CGCMsgSystemStatsSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema + * @returns {CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape} CGCMsgSystemStatsSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSystemStatsSchema.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSystemStatsSchema.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17027,13 +22210,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSystemStatsSchema.verify = function verify(message) { + CGCMsgSystemStatsSchema.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) if (!$util.isInteger(message.gc_app_id)) return "gc_app_id: integer expected"; - if (message.schema_kv != null && message.hasOwnProperty("schema_kv")) + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) if (!(message.schema_kv && typeof message.schema_kv.length === "number" || $util.isString(message.schema_kv))) return "schema_kv: buffer expected"; return null; @@ -17047,16 +22234,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema */ - CGCMsgSystemStatsSchema.fromObject = function fromObject(object) { + CGCMsgSystemStatsSchema.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSystemStatsSchema) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSystemStatsSchema: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSystemStatsSchema(); if (object.gc_app_id != null) message.gc_app_id = object.gc_app_id >>> 0; if (object.schema_kv != null) if (typeof object.schema_kv === "string") $util.base64.decode(object.schema_kv, message.schema_kv = $util.newBuffer($util.base64.length(object.schema_kv)), 0); - else if (object.schema_kv.length) + else if (object.schema_kv.length >= 0) message.schema_kv = object.schema_kv; return message; }; @@ -17070,24 +22263,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSystemStatsSchema.toObject = function toObject(message, options) { + CGCMsgSystemStatsSchema.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gc_app_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.schema_kv = ""; else { object.schema_kv = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.schema_kv = $util.newBuffer(object.schema_kv); } } - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) object.gc_app_id = message.gc_app_id; - if (message.schema_kv != null && message.hasOwnProperty("schema_kv")) - object.schema_kv = options.bytes === String ? $util.base64.encode(message.schema_kv, 0, message.schema_kv.length) : options.bytes === Array ? Array.prototype.slice.call(message.schema_kv) : message.schema_kv; + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) + object.schema_kv = options.bytes === $String ? $util.base64.encode(message.schema_kv, 0, message.schema_kv.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.schema_kv) : message.schema_kv; return object; }; @@ -17098,8 +22295,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSystemStatsSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSystemStatsSchema.prototype.toJSON = function() { + return CGCMsgSystemStatsSchema.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSystemStatsSchema + * @function getTypeUrl + * @memberof CGCMsgSystemStatsSchema + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSystemStatsSchema.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSystemStatsSchema"; }; return CGCMsgSystemStatsSchema; @@ -17107,36 +22318,53 @@ $root.CGCMsgGetSystemStats = (function() { + /** + * Properties of a CGCMsgGetSystemStats. + * @typedef {Object} CGCMsgGetSystemStats.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetSystemStats. * @exports ICGCMsgGetSystemStats * @interface ICGCMsgGetSystemStats + * @augments CGCMsgGetSystemStats.$Properties + * @deprecated Use CGCMsgGetSystemStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetSystemStats. + * @typedef {CGCMsgGetSystemStats.$Properties} CGCMsgGetSystemStats.$Shape */ /** * Constructs a new CGCMsgGetSystemStats. * @exports CGCMsgGetSystemStats * @classdesc Represents a CGCMsgGetSystemStats. - * @implements ICGCMsgGetSystemStats * @constructor - * @param {ICGCMsgGetSystemStats=} [properties] Properties to set + * @param {CGCMsgGetSystemStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetSystemStats(properties) { + var CGCMsgGetSystemStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CGCMsgGetSystemStats instance using the specified properties. * @function create * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats=} [properties] Properties to set + * @param {CGCMsgGetSystemStats.$Properties=} [properties] Properties to set * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats instance + * @type {{ + * (properties: CGCMsgGetSystemStats.$Shape): CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape; + * (properties?: CGCMsgGetSystemStats.$Properties): CGCMsgGetSystemStats; + * }} */ - CGCMsgGetSystemStats.create = function create(properties) { + CGCMsgGetSystemStats.create = function(properties) { return new CGCMsgGetSystemStats(properties); }; @@ -17145,13 +22373,20 @@ * @function encode * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats} message CGCMsgGetSystemStats message or plain object to encode + * @param {CGCMsgGetSystemStats.$Properties} message CGCMsgGetSystemStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStats.encode = function encode(message, writer) { + CGCMsgGetSystemStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17160,12 +22395,12 @@ * @function encodeDelimited * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats} message CGCMsgGetSystemStats message or plain object to encode + * @param {CGCMsgGetSystemStats.$Properties} message CGCMsgGetSystemStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetSystemStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17175,22 +22410,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats + * @returns {CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape} CGCMsgGetSystemStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStats.decode = function decode(reader, length) { + CGCMsgGetSystemStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetSystemStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetSystemStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17200,11 +22446,11 @@ * @memberof CGCMsgGetSystemStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats + * @returns {CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape} CGCMsgGetSystemStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetSystemStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17218,9 +22464,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetSystemStats.verify = function verify(message) { + CGCMsgGetSystemStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -17232,9 +22482,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats */ - CGCMsgGetSystemStats.fromObject = function fromObject(object) { + CGCMsgGetSystemStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetSystemStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetSystemStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CGCMsgGetSystemStats(); }; @@ -17247,7 +22503,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetSystemStats.toObject = function toObject() { + CGCMsgGetSystemStats.toObject = function () { return {}; }; @@ -17258,8 +22514,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetSystemStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetSystemStats.prototype.toJSON = function() { + return CGCMsgGetSystemStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetSystemStats + * @function getTypeUrl + * @memberof CGCMsgGetSystemStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetSystemStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetSystemStats"; }; return CGCMsgGetSystemStats; @@ -17269,8 +22539,7 @@ /** * Properties of a CGCMsgGetSystemStatsResponse. - * @exports ICGCMsgGetSystemStatsResponse - * @interface ICGCMsgGetSystemStatsResponse + * @typedef {Object} CGCMsgGetSystemStatsResponse.$Properties * @property {number|null} [gc_app_id] CGCMsgGetSystemStatsResponse gc_app_id * @property {Uint8Array|null} [stats_kv] CGCMsgGetSystemStatsResponse stats_kv * @property {number|null} [active_jobs] CGCMsgGetSystemStatsResponse active_jobs @@ -17284,22 +22553,36 @@ * @property {number|null} [steamid_locks] CGCMsgGetSystemStatsResponse steamid_locks * @property {number|null} [logon_queue] CGCMsgGetSystemStatsResponse logon_queue * @property {number|null} [logon_jobs] CGCMsgGetSystemStatsResponse logon_jobs + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgGetSystemStatsResponse. + * @exports ICGCMsgGetSystemStatsResponse + * @interface ICGCMsgGetSystemStatsResponse + * @augments CGCMsgGetSystemStatsResponse.$Properties + * @deprecated Use CGCMsgGetSystemStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetSystemStatsResponse. + * @typedef {CGCMsgGetSystemStatsResponse.$Properties} CGCMsgGetSystemStatsResponse.$Shape */ /** * Constructs a new CGCMsgGetSystemStatsResponse. * @exports CGCMsgGetSystemStatsResponse * @classdesc Represents a CGCMsgGetSystemStatsResponse. - * @implements ICGCMsgGetSystemStatsResponse * @constructor - * @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set + * @param {CGCMsgGetSystemStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetSystemStatsResponse(properties) { + var CGCMsgGetSystemStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetSystemStatsResponse gc_app_id. @@ -17410,10 +22693,14 @@ * @function create * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set + * @param {CGCMsgGetSystemStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse instance + * @type {{ + * (properties: CGCMsgGetSystemStatsResponse.$Shape): CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape; + * (properties?: CGCMsgGetSystemStatsResponse.$Properties): CGCMsgGetSystemStatsResponse; + * }} */ - CGCMsgGetSystemStatsResponse.create = function create(properties) { + CGCMsgGetSystemStatsResponse.create = function(properties) { return new CGCMsgGetSystemStatsResponse(properties); }; @@ -17422,39 +22709,46 @@ * @function encode * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse} message CGCMsgGetSystemStatsResponse message or plain object to encode + * @param {CGCMsgGetSystemStatsResponse.$Properties} message CGCMsgGetSystemStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStatsResponse.encode = function encode(message, writer) { + CGCMsgGetSystemStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gc_app_id != null && Object.hasOwnProperty.call(message, "gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gc_app_id); - if (message.stats_kv != null && Object.hasOwnProperty.call(message, "stats_kv")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.stats_kv); - if (message.active_jobs != null && Object.hasOwnProperty.call(message, "active_jobs")) + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.active_jobs); - if (message.yielding_jobs != null && Object.hasOwnProperty.call(message, "yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.yielding_jobs); - if (message.user_sessions != null && Object.hasOwnProperty.call(message, "user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.user_sessions); - if (message.game_server_sessions != null && Object.hasOwnProperty.call(message, "game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.game_server_sessions); - if (message.socaches != null && Object.hasOwnProperty.call(message, "socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.socaches); - if (message.socaches_to_unload != null && Object.hasOwnProperty.call(message, "socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.socaches_to_unload); - if (message.socaches_loading != null && Object.hasOwnProperty.call(message, "socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.socaches_loading); - if (message.writeback_queue != null && Object.hasOwnProperty.call(message, "writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.writeback_queue); - if (message.steamid_locks != null && Object.hasOwnProperty.call(message, "steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.steamid_locks); - if (message.logon_queue != null && Object.hasOwnProperty.call(message, "logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.logon_queue); - if (message.logon_jobs != null && Object.hasOwnProperty.call(message, "logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.logon_jobs); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17463,12 +22757,12 @@ * @function encodeDelimited * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse} message CGCMsgGetSystemStatsResponse message or plain object to encode + * @param {CGCMsgGetSystemStatsResponse.$Properties} message CGCMsgGetSystemStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetSystemStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17478,61 +22772,114 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse + * @returns {CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape} CGCMsgGetSystemStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStatsResponse.decode = function decode(reader, length) { + CGCMsgGetSystemStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetSystemStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetSystemStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gc_app_id = reader.uint32(); - break; - case 2: - message.stats_kv = reader.bytes(); - break; - case 3: - message.active_jobs = reader.uint32(); - break; - case 4: - message.yielding_jobs = reader.uint32(); - break; - case 5: - message.user_sessions = reader.uint32(); - break; - case 6: - message.game_server_sessions = reader.uint32(); - break; - case 7: - message.socaches = reader.uint32(); - break; - case 8: - message.socaches_to_unload = reader.uint32(); - break; - case 9: - message.socaches_loading = reader.uint32(); - break; - case 10: - message.writeback_queue = reader.uint32(); - break; - case 11: - message.steamid_locks = reader.uint32(); - break; - case 12: - message.logon_queue = reader.uint32(); - break; - case 13: - message.logon_jobs = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gc_app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.stats_kv = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.active_jobs = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.yielding_jobs = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.user_sessions = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.game_server_sessions = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.socaches = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.socaches_to_unload = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.socaches_loading = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.writeback_queue = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.steamid_locks = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.logon_queue = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.logon_jobs = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17542,11 +22889,11 @@ * @memberof CGCMsgGetSystemStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse + * @returns {CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape} CGCMsgGetSystemStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetSystemStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17560,46 +22907,50 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetSystemStatsResponse.verify = function verify(message) { + CGCMsgGetSystemStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) if (!$util.isInteger(message.gc_app_id)) return "gc_app_id: integer expected"; - if (message.stats_kv != null && message.hasOwnProperty("stats_kv")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) if (!(message.stats_kv && typeof message.stats_kv.length === "number" || $util.isString(message.stats_kv))) return "stats_kv: buffer expected"; - if (message.active_jobs != null && message.hasOwnProperty("active_jobs")) + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) if (!$util.isInteger(message.active_jobs)) return "active_jobs: integer expected"; - if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) if (!$util.isInteger(message.yielding_jobs)) return "yielding_jobs: integer expected"; - if (message.user_sessions != null && message.hasOwnProperty("user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) if (!$util.isInteger(message.user_sessions)) return "user_sessions: integer expected"; - if (message.game_server_sessions != null && message.hasOwnProperty("game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) if (!$util.isInteger(message.game_server_sessions)) return "game_server_sessions: integer expected"; - if (message.socaches != null && message.hasOwnProperty("socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) if (!$util.isInteger(message.socaches)) return "socaches: integer expected"; - if (message.socaches_to_unload != null && message.hasOwnProperty("socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) if (!$util.isInteger(message.socaches_to_unload)) return "socaches_to_unload: integer expected"; - if (message.socaches_loading != null && message.hasOwnProperty("socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) if (!$util.isInteger(message.socaches_loading)) return "socaches_loading: integer expected"; - if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) if (!$util.isInteger(message.writeback_queue)) return "writeback_queue: integer expected"; - if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) if (!$util.isInteger(message.steamid_locks)) return "steamid_locks: integer expected"; - if (message.logon_queue != null && message.hasOwnProperty("logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) if (!$util.isInteger(message.logon_queue)) return "logon_queue: integer expected"; - if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) if (!$util.isInteger(message.logon_jobs)) return "logon_jobs: integer expected"; return null; @@ -17613,16 +22964,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse */ - CGCMsgGetSystemStatsResponse.fromObject = function fromObject(object) { + CGCMsgGetSystemStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetSystemStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetSystemStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetSystemStatsResponse(); if (object.gc_app_id != null) message.gc_app_id = object.gc_app_id >>> 0; if (object.stats_kv != null) if (typeof object.stats_kv === "string") $util.base64.decode(object.stats_kv, message.stats_kv = $util.newBuffer($util.base64.length(object.stats_kv)), 0); - else if (object.stats_kv.length) + else if (object.stats_kv.length >= 0) message.stats_kv = object.stats_kv; if (object.active_jobs != null) message.active_jobs = object.active_jobs >>> 0; @@ -17658,17 +23015,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetSystemStatsResponse.toObject = function toObject(message, options) { + CGCMsgGetSystemStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gc_app_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.stats_kv = ""; else { object.stats_kv = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.stats_kv = $util.newBuffer(object.stats_kv); } object.active_jobs = 0; @@ -17683,31 +23044,31 @@ object.logon_queue = 0; object.logon_jobs = 0; } - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) object.gc_app_id = message.gc_app_id; - if (message.stats_kv != null && message.hasOwnProperty("stats_kv")) - object.stats_kv = options.bytes === String ? $util.base64.encode(message.stats_kv, 0, message.stats_kv.length) : options.bytes === Array ? Array.prototype.slice.call(message.stats_kv) : message.stats_kv; - if (message.active_jobs != null && message.hasOwnProperty("active_jobs")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) + object.stats_kv = options.bytes === $String ? $util.base64.encode(message.stats_kv, 0, message.stats_kv.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.stats_kv) : message.stats_kv; + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) object.active_jobs = message.active_jobs; - if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) object.yielding_jobs = message.yielding_jobs; - if (message.user_sessions != null && message.hasOwnProperty("user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) object.user_sessions = message.user_sessions; - if (message.game_server_sessions != null && message.hasOwnProperty("game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) object.game_server_sessions = message.game_server_sessions; - if (message.socaches != null && message.hasOwnProperty("socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) object.socaches = message.socaches; - if (message.socaches_to_unload != null && message.hasOwnProperty("socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) object.socaches_to_unload = message.socaches_to_unload; - if (message.socaches_loading != null && message.hasOwnProperty("socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) object.socaches_loading = message.socaches_loading; - if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) object.writeback_queue = message.writeback_queue; - if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) object.steamid_locks = message.steamid_locks; - if (message.logon_queue != null && message.hasOwnProperty("logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) object.logon_queue = message.logon_queue; - if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) object.logon_jobs = message.logon_jobs; return object; }; @@ -17719,8 +23080,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetSystemStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetSystemStatsResponse.prototype.toJSON = function() { + return CGCMsgGetSystemStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetSystemStatsResponse + * @function getTypeUrl + * @memberof CGCMsgGetSystemStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetSystemStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetSystemStatsResponse"; }; return CGCMsgGetSystemStatsResponse; @@ -17730,32 +23105,45 @@ /** * Properties of a CMsgAMSendEmail. - * @exports ICMsgAMSendEmail - * @interface ICMsgAMSendEmail + * @typedef {Object} CMsgAMSendEmail.$Properties * @property {number|Long|null} [steamid] CMsgAMSendEmail steamid * @property {number|null} [email_msg_type] CMsgAMSendEmail email_msg_type * @property {number|null} [email_format] CMsgAMSendEmail email_format - * @property {Array.|null} [persona_name_tokens] CMsgAMSendEmail persona_name_tokens + * @property {Array.|null} [persona_name_tokens] CMsgAMSendEmail persona_name_tokens * @property {number|null} [source_gc] CMsgAMSendEmail source_gc - * @property {Array.|null} [tokens] CMsgAMSendEmail tokens + * @property {Array.|null} [tokens] CMsgAMSendEmail tokens + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMSendEmail. + * @exports ICMsgAMSendEmail + * @interface ICMsgAMSendEmail + * @augments CMsgAMSendEmail.$Properties + * @deprecated Use CMsgAMSendEmail.$Properties instead. + */ + + /** + * Shape of a CMsgAMSendEmail. + * @typedef {CMsgAMSendEmail.$Properties} CMsgAMSendEmail.$Shape */ /** * Constructs a new CMsgAMSendEmail. * @exports CMsgAMSendEmail * @classdesc Represents a CMsgAMSendEmail. - * @implements ICMsgAMSendEmail * @constructor - * @param {ICMsgAMSendEmail=} [properties] Properties to set + * @param {CMsgAMSendEmail.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMSendEmail(properties) { + var CMsgAMSendEmail = function (properties) { this.persona_name_tokens = []; this.tokens = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMSendEmail steamid. @@ -17763,7 +23151,7 @@ * @memberof CMsgAMSendEmail * @instance */ - CMsgAMSendEmail.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMSendEmail.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMSendEmail email_msg_type. @@ -17783,7 +23171,7 @@ /** * CMsgAMSendEmail persona_name_tokens. - * @member {Array.} persona_name_tokens + * @member {Array.} persona_name_tokens * @memberof CMsgAMSendEmail * @instance */ @@ -17799,7 +23187,7 @@ /** * CMsgAMSendEmail tokens. - * @member {Array.} tokens + * @member {Array.} tokens * @memberof CMsgAMSendEmail * @instance */ @@ -17810,10 +23198,14 @@ * @function create * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail=} [properties] Properties to set + * @param {CMsgAMSendEmail.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail} CMsgAMSendEmail instance + * @type {{ + * (properties: CMsgAMSendEmail.$Shape): CMsgAMSendEmail & CMsgAMSendEmail.$Shape; + * (properties?: CMsgAMSendEmail.$Properties): CMsgAMSendEmail; + * }} */ - CMsgAMSendEmail.create = function create(properties) { + CMsgAMSendEmail.create = function(properties) { return new CMsgAMSendEmail(properties); }; @@ -17822,27 +23214,34 @@ * @function encode * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail} message CMsgAMSendEmail message or plain object to encode + * @param {CMsgAMSendEmail.$Properties} message CMsgAMSendEmail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmail.encode = function encode(message, writer) { + CMsgAMSendEmail.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.email_msg_type != null && Object.hasOwnProperty.call(message, "email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type); - if (message.email_format != null && Object.hasOwnProperty.call(message, "email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.email_format); if (message.persona_name_tokens != null && message.persona_name_tokens.length) for (var i = 0; i < message.persona_name_tokens.length; ++i) - $root.CMsgAMSendEmail.PersonaNameReplacementToken.encode(message.persona_name_tokens[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.source_gc != null && Object.hasOwnProperty.call(message, "source_gc")) + $root.CMsgAMSendEmail.PersonaNameReplacementToken.encode(message.persona_name_tokens[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.source_gc); if (message.tokens != null && message.tokens.length) for (var i = 0; i < message.tokens.length; ++i) - $root.CMsgAMSendEmail.ReplacementToken.encode(message.tokens[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.CMsgAMSendEmail.ReplacementToken.encode(message.tokens[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17851,12 +23250,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail} message CMsgAMSendEmail message or plain object to encode + * @param {CMsgAMSendEmail.$Properties} message CMsgAMSendEmail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMSendEmail.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17866,44 +23265,76 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail} CMsgAMSendEmail + * @returns {CMsgAMSendEmail & CMsgAMSendEmail.$Shape} CMsgAMSendEmail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmail.decode = function decode(reader, length) { + CMsgAMSendEmail.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.email_msg_type = reader.uint32(); - break; - case 3: - message.email_format = reader.uint32(); - break; - case 5: - if (!(message.persona_name_tokens && message.persona_name_tokens.length)) - message.persona_name_tokens = []; - message.persona_name_tokens.push($root.CMsgAMSendEmail.PersonaNameReplacementToken.decode(reader, reader.uint32())); - break; - case 6: - message.source_gc = reader.uint32(); - break; - case 7: - if (!(message.tokens && message.tokens.length)) - message.tokens = []; - message.tokens.push($root.CMsgAMSendEmail.ReplacementToken.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.email_msg_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.email_format = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.persona_name_tokens && message.persona_name_tokens.length)) + message.persona_name_tokens = []; + message.persona_name_tokens.push($root.CMsgAMSendEmail.PersonaNameReplacementToken.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.source_gc = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.CMsgAMSendEmail.ReplacementToken.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17913,11 +23344,11 @@ * @memberof CMsgAMSendEmail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail} CMsgAMSendEmail + * @returns {CMsgAMSendEmail & CMsgAMSendEmail.$Shape} CMsgAMSendEmail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmail.decodeDelimited = function decodeDelimited(reader) { + CMsgAMSendEmail.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17931,35 +23362,39 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMSendEmail.verify = function verify(message) { + CMsgAMSendEmail.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) if (!$util.isInteger(message.email_msg_type)) return "email_msg_type: integer expected"; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) if (!$util.isInteger(message.email_format)) return "email_format: integer expected"; - if (message.persona_name_tokens != null && message.hasOwnProperty("persona_name_tokens")) { - if (!Array.isArray(message.persona_name_tokens)) + if (message.persona_name_tokens != null && $Object.hasOwnProperty.call(message, "persona_name_tokens")) { + if (!$Array.isArray(message.persona_name_tokens)) return "persona_name_tokens: array expected"; for (var i = 0; i < message.persona_name_tokens.length; ++i) { - var error = $root.CMsgAMSendEmail.PersonaNameReplacementToken.verify(message.persona_name_tokens[i]); + var error = $root.CMsgAMSendEmail.PersonaNameReplacementToken.verify(message.persona_name_tokens[i], _depth + 1); if (error) return "persona_name_tokens." + error; } } - if (message.source_gc != null && message.hasOwnProperty("source_gc")) + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) if (!$util.isInteger(message.source_gc)) return "source_gc: integer expected"; - if (message.tokens != null && message.hasOwnProperty("tokens")) { - if (!Array.isArray(message.tokens)) + if (message.tokens != null && $Object.hasOwnProperty.call(message, "tokens")) { + if (!$Array.isArray(message.tokens)) return "tokens: array expected"; for (var i = 0; i < message.tokens.length; ++i) { - var error = $root.CMsgAMSendEmail.ReplacementToken.verify(message.tokens[i]); + var error = $root.CMsgAMSendEmail.ReplacementToken.verify(message.tokens[i], _depth + 1); if (error) return "tokens." + error; } @@ -17975,43 +23410,49 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail} CMsgAMSendEmail */ - CMsgAMSendEmail.fromObject = function fromObject(object) { + CMsgAMSendEmail.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.email_msg_type != null) message.email_msg_type = object.email_msg_type >>> 0; if (object.email_format != null) message.email_format = object.email_format >>> 0; if (object.persona_name_tokens) { - if (!Array.isArray(object.persona_name_tokens)) - throw TypeError(".CMsgAMSendEmail.persona_name_tokens: array expected"); - message.persona_name_tokens = []; + if (!$Array.isArray(object.persona_name_tokens)) + throw $TypeError(".CMsgAMSendEmail.persona_name_tokens: array expected"); + message.persona_name_tokens = $Array(object.persona_name_tokens.length); for (var i = 0; i < object.persona_name_tokens.length; ++i) { - if (typeof object.persona_name_tokens[i] !== "object") - throw TypeError(".CMsgAMSendEmail.persona_name_tokens: object expected"); - message.persona_name_tokens[i] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.fromObject(object.persona_name_tokens[i]); + if (!$util.isObject(object.persona_name_tokens[i])) + throw $TypeError(".CMsgAMSendEmail.persona_name_tokens: object expected"); + message.persona_name_tokens[i] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.fromObject(object.persona_name_tokens[i], _depth + 1); } } if (object.source_gc != null) message.source_gc = object.source_gc >>> 0; if (object.tokens) { - if (!Array.isArray(object.tokens)) - throw TypeError(".CMsgAMSendEmail.tokens: array expected"); - message.tokens = []; + if (!$Array.isArray(object.tokens)) + throw $TypeError(".CMsgAMSendEmail.tokens: array expected"); + message.tokens = $Array(object.tokens.length); for (var i = 0; i < object.tokens.length; ++i) { - if (typeof object.tokens[i] !== "object") - throw TypeError(".CMsgAMSendEmail.tokens: object expected"); - message.tokens[i] = $root.CMsgAMSendEmail.ReplacementToken.fromObject(object.tokens[i]); + if (!$util.isObject(object.tokens[i])) + throw $TypeError(".CMsgAMSendEmail.tokens: object expected"); + message.tokens[i] = $root.CMsgAMSendEmail.ReplacementToken.fromObject(object.tokens[i], _depth + 1); } } return message; @@ -18026,9 +23467,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMSendEmail.toObject = function toObject(message, options) { + CMsgAMSendEmail.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.persona_name_tokens = []; @@ -18036,34 +23481,36 @@ } if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.email_msg_type = 0; object.email_format = 0; object.source_gc = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) object.email_msg_type = message.email_msg_type; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) object.email_format = message.email_format; if (message.persona_name_tokens && message.persona_name_tokens.length) { - object.persona_name_tokens = []; + object.persona_name_tokens = $Array(message.persona_name_tokens.length); for (var j = 0; j < message.persona_name_tokens.length; ++j) - object.persona_name_tokens[j] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.toObject(message.persona_name_tokens[j], options); + object.persona_name_tokens[j] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.toObject(message.persona_name_tokens[j], options, _depth + 1); } - if (message.source_gc != null && message.hasOwnProperty("source_gc")) + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) object.source_gc = message.source_gc; if (message.tokens && message.tokens.length) { - object.tokens = []; + object.tokens = $Array(message.tokens.length); for (var j = 0; j < message.tokens.length; ++j) - object.tokens[j] = $root.CMsgAMSendEmail.ReplacementToken.toObject(message.tokens[j], options); + object.tokens[j] = $root.CMsgAMSendEmail.ReplacementToken.toObject(message.tokens[j], options, _depth + 1); } return object; }; @@ -18075,34 +23522,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMSendEmail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMSendEmail.prototype.toJSON = function() { + return CMsgAMSendEmail.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMSendEmail + * @function getTypeUrl + * @memberof CMsgAMSendEmail + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMSendEmail.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail"; }; CMsgAMSendEmail.ReplacementToken = (function() { /** * Properties of a ReplacementToken. - * @memberof CMsgAMSendEmail - * @interface IReplacementToken + * @typedef {Object} CMsgAMSendEmail.ReplacementToken.$Properties * @property {string|null} [token_name] ReplacementToken token_name * @property {string|null} [token_value] ReplacementToken token_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ReplacementToken. + * @memberof CMsgAMSendEmail + * @interface IReplacementToken + * @augments CMsgAMSendEmail.ReplacementToken.$Properties + * @deprecated Use CMsgAMSendEmail.ReplacementToken.$Properties instead. + */ + + /** + * Shape of a ReplacementToken. + * @typedef {CMsgAMSendEmail.ReplacementToken.$Properties} CMsgAMSendEmail.ReplacementToken.$Shape */ /** * Constructs a new ReplacementToken. * @memberof CMsgAMSendEmail * @classdesc Represents a ReplacementToken. - * @implements IReplacementToken * @constructor - * @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.ReplacementToken.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ReplacementToken(properties) { + var ReplacementToken = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ReplacementToken token_name. @@ -18125,10 +23599,14 @@ * @function create * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.ReplacementToken.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken instance + * @type {{ + * (properties: CMsgAMSendEmail.ReplacementToken.$Shape): CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape; + * (properties?: CMsgAMSendEmail.ReplacementToken.$Properties): CMsgAMSendEmail.ReplacementToken; + * }} */ - ReplacementToken.create = function create(properties) { + ReplacementToken.create = function(properties) { return new ReplacementToken(properties); }; @@ -18137,17 +23615,24 @@ * @function encode * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken} message ReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.ReplacementToken.$Properties} message ReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplacementToken.encode = function encode(message, writer) { + ReplacementToken.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.token_name != null && Object.hasOwnProperty.call(message, "token_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.token_name); - if (message.token_value != null && Object.hasOwnProperty.call(message, "token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18156,12 +23641,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken} message ReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.ReplacementToken.$Properties} message ReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplacementToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ReplacementToken.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18171,28 +23656,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken + * @returns {CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape} ReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplacementToken.decode = function decode(reader, length) { + ReplacementToken.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail.ReplacementToken(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail.ReplacementToken(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.token_name = reader.string(); - break; - case 2: - message.token_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.token_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.token_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18202,11 +23707,11 @@ * @memberof CMsgAMSendEmail.ReplacementToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken + * @returns {CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape} ReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplacementToken.decodeDelimited = function decodeDelimited(reader) { + ReplacementToken.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18220,13 +23725,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReplacementToken.verify = function verify(message) { + ReplacementToken.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) if (!$util.isString(message.token_name)) return "token_name: string expected"; - if (message.token_value != null && message.hasOwnProperty("token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) if (!$util.isString(message.token_value)) return "token_value: string expected"; return null; @@ -18240,14 +23749,20 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken */ - ReplacementToken.fromObject = function fromObject(object) { + ReplacementToken.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail.ReplacementToken) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail.ReplacementToken: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail.ReplacementToken(); if (object.token_name != null) - message.token_name = String(object.token_name); + message.token_name = $String(object.token_name); if (object.token_value != null) - message.token_value = String(object.token_value); + message.token_value = $String(object.token_value); return message; }; @@ -18260,17 +23775,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReplacementToken.toObject = function toObject(message, options) { + ReplacementToken.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.token_name = ""; object.token_value = ""; } - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) object.token_name = message.token_name; - if (message.token_value != null && message.hasOwnProperty("token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) object.token_value = message.token_value; return object; }; @@ -18282,8 +23801,22 @@ * @instance * @returns {Object.} JSON object */ - ReplacementToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ReplacementToken.prototype.toJSON = function() { + return ReplacementToken.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ReplacementToken + * @function getTypeUrl + * @memberof CMsgAMSendEmail.ReplacementToken + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ReplacementToken.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail.ReplacementToken"; }; return ReplacementToken; @@ -18293,26 +23826,39 @@ /** * Properties of a PersonaNameReplacementToken. - * @memberof CMsgAMSendEmail - * @interface IPersonaNameReplacementToken + * @typedef {Object} CMsgAMSendEmail.PersonaNameReplacementToken.$Properties * @property {number|Long|null} [steamid] PersonaNameReplacementToken steamid * @property {string|null} [token_name] PersonaNameReplacementToken token_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PersonaNameReplacementToken. + * @memberof CMsgAMSendEmail + * @interface IPersonaNameReplacementToken + * @augments CMsgAMSendEmail.PersonaNameReplacementToken.$Properties + * @deprecated Use CMsgAMSendEmail.PersonaNameReplacementToken.$Properties instead. + */ + + /** + * Shape of a PersonaNameReplacementToken. + * @typedef {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} CMsgAMSendEmail.PersonaNameReplacementToken.$Shape */ /** * Constructs a new PersonaNameReplacementToken. * @memberof CMsgAMSendEmail * @classdesc Represents a PersonaNameReplacementToken. - * @implements IPersonaNameReplacementToken * @constructor - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PersonaNameReplacementToken(properties) { + var PersonaNameReplacementToken = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PersonaNameReplacementToken steamid. @@ -18320,7 +23866,7 @@ * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @instance */ - PersonaNameReplacementToken.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PersonaNameReplacementToken.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * PersonaNameReplacementToken token_name. @@ -18335,10 +23881,14 @@ * @function create * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken instance + * @type {{ + * (properties: CMsgAMSendEmail.PersonaNameReplacementToken.$Shape): CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape; + * (properties?: CMsgAMSendEmail.PersonaNameReplacementToken.$Properties): CMsgAMSendEmail.PersonaNameReplacementToken; + * }} */ - PersonaNameReplacementToken.create = function create(properties) { + PersonaNameReplacementToken.create = function(properties) { return new PersonaNameReplacementToken(properties); }; @@ -18347,17 +23897,24 @@ * @function encode * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken} message PersonaNameReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} message PersonaNameReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaNameReplacementToken.encode = function encode(message, writer) { + PersonaNameReplacementToken.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.token_name != null && Object.hasOwnProperty.call(message, "token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18366,12 +23923,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken} message PersonaNameReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} message PersonaNameReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaNameReplacementToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PersonaNameReplacementToken.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18381,28 +23938,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken + * @returns {CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape} PersonaNameReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaNameReplacementToken.decode = function decode(reader, length) { + PersonaNameReplacementToken.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.token_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.token_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18412,11 +23989,11 @@ * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken + * @returns {CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape} PersonaNameReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaNameReplacementToken.decodeDelimited = function decodeDelimited(reader) { + PersonaNameReplacementToken.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18430,13 +24007,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PersonaNameReplacementToken.verify = function verify(message) { + PersonaNameReplacementToken.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) if (!$util.isString(message.token_name)) return "token_name: string expected"; return null; @@ -18450,21 +24031,27 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken */ - PersonaNameReplacementToken.fromObject = function fromObject(object) { + PersonaNameReplacementToken.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail.PersonaNameReplacementToken) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail.PersonaNameReplacementToken: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.token_name != null) - message.token_name = String(object.token_name); + message.token_name = $String(object.token_name); return message; }; @@ -18477,24 +24064,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PersonaNameReplacementToken.toObject = function toObject(message, options) { + PersonaNameReplacementToken.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.token_name = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.token_name != null && message.hasOwnProperty("token_name")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) object.token_name = message.token_name; return object; }; @@ -18506,8 +24099,22 @@ * @instance * @returns {Object.} JSON object */ - PersonaNameReplacementToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PersonaNameReplacementToken.prototype.toJSON = function() { + return PersonaNameReplacementToken.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PersonaNameReplacementToken + * @function getTypeUrl + * @memberof CMsgAMSendEmail.PersonaNameReplacementToken + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PersonaNameReplacementToken.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail.PersonaNameReplacementToken"; }; return PersonaNameReplacementToken; @@ -18518,27 +24125,40 @@ $root.CMsgAMSendEmailResponse = (function() { + /** + * Properties of a CMsgAMSendEmailResponse. + * @typedef {Object} CMsgAMSendEmailResponse.$Properties + * @property {number|null} [eresult] CMsgAMSendEmailResponse eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMSendEmailResponse. * @exports ICMsgAMSendEmailResponse * @interface ICMsgAMSendEmailResponse - * @property {number|null} [eresult] CMsgAMSendEmailResponse eresult + * @augments CMsgAMSendEmailResponse.$Properties + * @deprecated Use CMsgAMSendEmailResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMSendEmailResponse. + * @typedef {CMsgAMSendEmailResponse.$Properties} CMsgAMSendEmailResponse.$Shape */ /** * Constructs a new CMsgAMSendEmailResponse. * @exports CMsgAMSendEmailResponse * @classdesc Represents a CMsgAMSendEmailResponse. - * @implements ICMsgAMSendEmailResponse * @constructor - * @param {ICMsgAMSendEmailResponse=} [properties] Properties to set + * @param {CMsgAMSendEmailResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMSendEmailResponse(properties) { + var CMsgAMSendEmailResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMSendEmailResponse eresult. @@ -18553,10 +24173,14 @@ * @function create * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse=} [properties] Properties to set + * @param {CMsgAMSendEmailResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse instance + * @type {{ + * (properties: CMsgAMSendEmailResponse.$Shape): CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape; + * (properties?: CMsgAMSendEmailResponse.$Properties): CMsgAMSendEmailResponse; + * }} */ - CMsgAMSendEmailResponse.create = function create(properties) { + CMsgAMSendEmailResponse.create = function(properties) { return new CMsgAMSendEmailResponse(properties); }; @@ -18565,15 +24189,22 @@ * @function encode * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse} message CMsgAMSendEmailResponse message or plain object to encode + * @param {CMsgAMSendEmailResponse.$Properties} message CMsgAMSendEmailResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmailResponse.encode = function encode(message, writer) { + CMsgAMSendEmailResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18582,12 +24213,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse} message CMsgAMSendEmailResponse message or plain object to encode + * @param {CMsgAMSendEmailResponse.$Properties} message CMsgAMSendEmailResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmailResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMSendEmailResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18597,25 +24228,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse + * @returns {CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape} CMsgAMSendEmailResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmailResponse.decode = function decode(reader, length) { + CMsgAMSendEmailResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmailResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmailResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18625,11 +24273,11 @@ * @memberof CMsgAMSendEmailResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse + * @returns {CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape} CMsgAMSendEmailResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmailResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMSendEmailResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18643,10 +24291,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMSendEmailResponse.verify = function verify(message) { + CMsgAMSendEmailResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -18660,9 +24312,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse */ - CMsgAMSendEmailResponse.fromObject = function fromObject(object) { + CMsgAMSendEmailResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmailResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmailResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmailResponse(); if (object.eresult != null) message.eresult = object.eresult >>> 0; @@ -18678,13 +24336,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMSendEmailResponse.toObject = function toObject(message, options) { + CMsgAMSendEmailResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -18696,8 +24358,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMSendEmailResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMSendEmailResponse.prototype.toJSON = function() { + return CMsgAMSendEmailResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMSendEmailResponse + * @function getTypeUrl + * @memberof CMsgAMSendEmailResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMSendEmailResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmailResponse"; }; return CMsgAMSendEmailResponse; @@ -18707,28 +24383,41 @@ /** * Properties of a CMsgGCGetEmailTemplate. - * @exports ICMsgGCGetEmailTemplate - * @interface ICMsgGCGetEmailTemplate + * @typedef {Object} CMsgGCGetEmailTemplate.$Properties * @property {number|null} [app_id] CMsgGCGetEmailTemplate app_id * @property {number|null} [email_msg_type] CMsgGCGetEmailTemplate email_msg_type * @property {number|null} [email_lang] CMsgGCGetEmailTemplate email_lang * @property {number|null} [email_format] CMsgGCGetEmailTemplate email_format + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetEmailTemplate. + * @exports ICMsgGCGetEmailTemplate + * @interface ICMsgGCGetEmailTemplate + * @augments CMsgGCGetEmailTemplate.$Properties + * @deprecated Use CMsgGCGetEmailTemplate.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetEmailTemplate. + * @typedef {CMsgGCGetEmailTemplate.$Properties} CMsgGCGetEmailTemplate.$Shape */ /** * Constructs a new CMsgGCGetEmailTemplate. * @exports CMsgGCGetEmailTemplate * @classdesc Represents a CMsgGCGetEmailTemplate. - * @implements ICMsgGCGetEmailTemplate * @constructor - * @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplate.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetEmailTemplate(properties) { + var CMsgGCGetEmailTemplate = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetEmailTemplate app_id. @@ -18767,10 +24456,14 @@ * @function create * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplate.$Properties=} [properties] Properties to set * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate instance + * @type {{ + * (properties: CMsgGCGetEmailTemplate.$Shape): CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape; + * (properties?: CMsgGCGetEmailTemplate.$Properties): CMsgGCGetEmailTemplate; + * }} */ - CMsgGCGetEmailTemplate.create = function create(properties) { + CMsgGCGetEmailTemplate.create = function(properties) { return new CMsgGCGetEmailTemplate(properties); }; @@ -18779,21 +24472,28 @@ * @function encode * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate} message CMsgGCGetEmailTemplate message or plain object to encode + * @param {CMsgGCGetEmailTemplate.$Properties} message CMsgGCGetEmailTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplate.encode = function encode(message, writer) { + CMsgGCGetEmailTemplate.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_id); - if (message.email_msg_type != null && Object.hasOwnProperty.call(message, "email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type); - if (message.email_lang != null && Object.hasOwnProperty.call(message, "email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.email_lang); - if (message.email_format != null && Object.hasOwnProperty.call(message, "email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.email_format); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18802,12 +24502,12 @@ * @function encodeDelimited * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate} message CMsgGCGetEmailTemplate message or plain object to encode + * @param {CMsgGCGetEmailTemplate.$Properties} message CMsgGCGetEmailTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetEmailTemplate.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18817,34 +24517,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate + * @returns {CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape} CMsgGCGetEmailTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplate.decode = function decode(reader, length) { + CMsgGCGetEmailTemplate.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetEmailTemplate(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetEmailTemplate(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_id = reader.uint32(); - break; - case 2: - message.email_msg_type = reader.uint32(); - break; - case 3: - message.email_lang = reader.int32(); - break; - case 4: - message.email_format = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.email_msg_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.email_lang = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.email_format = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18854,11 +24580,11 @@ * @memberof CMsgGCGetEmailTemplate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate + * @returns {CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape} CMsgGCGetEmailTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplate.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetEmailTemplate.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18872,19 +24598,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetEmailTemplate.verify = function verify(message) { + CMsgGCGetEmailTemplate.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) if (!$util.isInteger(message.email_msg_type)) return "email_msg_type: integer expected"; - if (message.email_lang != null && message.hasOwnProperty("email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) if (!$util.isInteger(message.email_lang)) return "email_lang: integer expected"; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) if (!$util.isInteger(message.email_format)) return "email_format: integer expected"; return null; @@ -18898,9 +24628,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate */ - CMsgGCGetEmailTemplate.fromObject = function fromObject(object) { + CMsgGCGetEmailTemplate.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetEmailTemplate) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetEmailTemplate: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetEmailTemplate(); if (object.app_id != null) message.app_id = object.app_id >>> 0; @@ -18922,9 +24658,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetEmailTemplate.toObject = function toObject(message, options) { + CMsgGCGetEmailTemplate.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.app_id = 0; @@ -18932,13 +24672,13 @@ object.email_lang = 0; object.email_format = 0; } - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) object.email_msg_type = message.email_msg_type; - if (message.email_lang != null && message.hasOwnProperty("email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) object.email_lang = message.email_lang; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) object.email_format = message.email_format; return object; }; @@ -18950,8 +24690,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetEmailTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetEmailTemplate.prototype.toJSON = function() { + return CMsgGCGetEmailTemplate.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetEmailTemplate + * @function getTypeUrl + * @memberof CMsgGCGetEmailTemplate + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetEmailTemplate.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetEmailTemplate"; }; return CMsgGCGetEmailTemplate; @@ -18961,27 +24715,40 @@ /** * Properties of a CMsgGCGetEmailTemplateResponse. - * @exports ICMsgGCGetEmailTemplateResponse - * @interface ICMsgGCGetEmailTemplateResponse + * @typedef {Object} CMsgGCGetEmailTemplateResponse.$Properties * @property {number|null} [eresult] CMsgGCGetEmailTemplateResponse eresult * @property {boolean|null} [template_exists] CMsgGCGetEmailTemplateResponse template_exists * @property {string|null} [template] CMsgGCGetEmailTemplateResponse template + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetEmailTemplateResponse. + * @exports ICMsgGCGetEmailTemplateResponse + * @interface ICMsgGCGetEmailTemplateResponse + * @augments CMsgGCGetEmailTemplateResponse.$Properties + * @deprecated Use CMsgGCGetEmailTemplateResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetEmailTemplateResponse. + * @typedef {CMsgGCGetEmailTemplateResponse.$Properties} CMsgGCGetEmailTemplateResponse.$Shape */ /** * Constructs a new CMsgGCGetEmailTemplateResponse. * @exports CMsgGCGetEmailTemplateResponse * @classdesc Represents a CMsgGCGetEmailTemplateResponse. - * @implements ICMsgGCGetEmailTemplateResponse * @constructor - * @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplateResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetEmailTemplateResponse(properties) { + var CMsgGCGetEmailTemplateResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetEmailTemplateResponse eresult. @@ -19012,10 +24779,14 @@ * @function create * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplateResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse instance + * @type {{ + * (properties: CMsgGCGetEmailTemplateResponse.$Shape): CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape; + * (properties?: CMsgGCGetEmailTemplateResponse.$Properties): CMsgGCGetEmailTemplateResponse; + * }} */ - CMsgGCGetEmailTemplateResponse.create = function create(properties) { + CMsgGCGetEmailTemplateResponse.create = function(properties) { return new CMsgGCGetEmailTemplateResponse(properties); }; @@ -19024,19 +24795,26 @@ * @function encode * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse} message CMsgGCGetEmailTemplateResponse message or plain object to encode + * @param {CMsgGCGetEmailTemplateResponse.$Properties} message CMsgGCGetEmailTemplateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplateResponse.encode = function encode(message, writer) { + CMsgGCGetEmailTemplateResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult); - if (message.template_exists != null && Object.hasOwnProperty.call(message, "template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.template_exists); - if (message.template != null && Object.hasOwnProperty.call(message, "template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.template); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19045,12 +24823,12 @@ * @function encodeDelimited * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse} message CMsgGCGetEmailTemplateResponse message or plain object to encode + * @param {CMsgGCGetEmailTemplateResponse.$Properties} message CMsgGCGetEmailTemplateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetEmailTemplateResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19060,31 +24838,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse + * @returns {CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape} CMsgGCGetEmailTemplateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplateResponse.decode = function decode(reader, length) { + CMsgGCGetEmailTemplateResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetEmailTemplateResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetEmailTemplateResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.uint32(); - break; - case 2: - message.template_exists = reader.bool(); - break; - case 3: - message.template = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.template_exists = reader.bool(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.template = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19094,11 +24895,11 @@ * @memberof CMsgGCGetEmailTemplateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse + * @returns {CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape} CMsgGCGetEmailTemplateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplateResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetEmailTemplateResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19112,16 +24913,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetEmailTemplateResponse.verify = function verify(message) { + CMsgGCGetEmailTemplateResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.template_exists != null && message.hasOwnProperty("template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) if (typeof message.template_exists !== "boolean") return "template_exists: boolean expected"; - if (message.template != null && message.hasOwnProperty("template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) if (!$util.isString(message.template)) return "template: string expected"; return null; @@ -19135,16 +24940,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse */ - CMsgGCGetEmailTemplateResponse.fromObject = function fromObject(object) { + CMsgGCGetEmailTemplateResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetEmailTemplateResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetEmailTemplateResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetEmailTemplateResponse(); if (object.eresult != null) message.eresult = object.eresult >>> 0; if (object.template_exists != null) - message.template_exists = Boolean(object.template_exists); + message.template_exists = $Boolean(object.template_exists); if (object.template != null) - message.template = String(object.template); + message.template = $String(object.template); return message; }; @@ -19157,20 +24968,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetEmailTemplateResponse.toObject = function toObject(message, options) { + CMsgGCGetEmailTemplateResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.template_exists = false; object.template = ""; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.template_exists != null && message.hasOwnProperty("template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) object.template_exists = message.template_exists; - if (message.template != null && message.hasOwnProperty("template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) object.template = message.template; return object; }; @@ -19182,8 +24997,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetEmailTemplateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetEmailTemplateResponse.prototype.toJSON = function() { + return CMsgGCGetEmailTemplateResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetEmailTemplateResponse + * @function getTypeUrl + * @memberof CMsgGCGetEmailTemplateResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetEmailTemplateResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetEmailTemplateResponse"; }; return CMsgGCGetEmailTemplateResponse; @@ -19193,29 +25022,42 @@ /** * Properties of a CMsgAMGrantGuestPasses2. - * @exports ICMsgAMGrantGuestPasses2 - * @interface ICMsgAMGrantGuestPasses2 + * @typedef {Object} CMsgAMGrantGuestPasses2.$Properties * @property {number|Long|null} [steam_id] CMsgAMGrantGuestPasses2 steam_id * @property {number|null} [package_id] CMsgAMGrantGuestPasses2 package_id * @property {number|null} [passes_to_grant] CMsgAMGrantGuestPasses2 passes_to_grant * @property {number|null} [days_to_expiration] CMsgAMGrantGuestPasses2 days_to_expiration * @property {number|null} [action] CMsgAMGrantGuestPasses2 action + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGrantGuestPasses2. + * @exports ICMsgAMGrantGuestPasses2 + * @interface ICMsgAMGrantGuestPasses2 + * @augments CMsgAMGrantGuestPasses2.$Properties + * @deprecated Use CMsgAMGrantGuestPasses2.$Properties instead. + */ + + /** + * Shape of a CMsgAMGrantGuestPasses2. + * @typedef {CMsgAMGrantGuestPasses2.$Properties} CMsgAMGrantGuestPasses2.$Shape */ /** * Constructs a new CMsgAMGrantGuestPasses2. * @exports CMsgAMGrantGuestPasses2 * @classdesc Represents a CMsgAMGrantGuestPasses2. - * @implements ICMsgAMGrantGuestPasses2 * @constructor - * @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGrantGuestPasses2(properties) { + var CMsgAMGrantGuestPasses2 = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGrantGuestPasses2 steam_id. @@ -19223,7 +25065,7 @@ * @memberof CMsgAMGrantGuestPasses2 * @instance */ - CMsgAMGrantGuestPasses2.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGrantGuestPasses2.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGrantGuestPasses2 package_id. @@ -19262,10 +25104,14 @@ * @function create * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2.$Properties=} [properties] Properties to set * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 instance + * @type {{ + * (properties: CMsgAMGrantGuestPasses2.$Shape): CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape; + * (properties?: CMsgAMGrantGuestPasses2.$Properties): CMsgAMGrantGuestPasses2; + * }} */ - CMsgAMGrantGuestPasses2.create = function create(properties) { + CMsgAMGrantGuestPasses2.create = function(properties) { return new CMsgAMGrantGuestPasses2(properties); }; @@ -19274,23 +25120,30 @@ * @function encode * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2} message CMsgAMGrantGuestPasses2 message or plain object to encode + * @param {CMsgAMGrantGuestPasses2.$Properties} message CMsgAMGrantGuestPasses2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2.encode = function encode(message, writer) { + CMsgAMGrantGuestPasses2.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.package_id != null && Object.hasOwnProperty.call(message, "package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.package_id); - if (message.passes_to_grant != null && Object.hasOwnProperty.call(message, "passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.passes_to_grant); - if (message.days_to_expiration != null && Object.hasOwnProperty.call(message, "days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.days_to_expiration); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.action); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19299,12 +25152,12 @@ * @function encodeDelimited * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2} message CMsgAMGrantGuestPasses2 message or plain object to encode + * @param {CMsgAMGrantGuestPasses2.$Properties} message CMsgAMGrantGuestPasses2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGrantGuestPasses2.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19314,37 +25167,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 + * @returns {CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape} CMsgAMGrantGuestPasses2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2.decode = function decode(reader, length) { + CMsgAMGrantGuestPasses2.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGrantGuestPasses2(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGrantGuestPasses2(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.package_id = reader.uint32(); - break; - case 3: - message.passes_to_grant = reader.int32(); - break; - case 4: - message.days_to_expiration = reader.int32(); - break; - case 5: - message.action = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.package_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.passes_to_grant = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.days_to_expiration = reader.int32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.action = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19354,11 +25236,11 @@ * @memberof CMsgAMGrantGuestPasses2 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 + * @returns {CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape} CMsgAMGrantGuestPasses2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGrantGuestPasses2.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19372,22 +25254,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGrantGuestPasses2.verify = function verify(message) { + CMsgAMGrantGuestPasses2.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) if (!$util.isInteger(message.package_id)) return "package_id: integer expected"; - if (message.passes_to_grant != null && message.hasOwnProperty("passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) if (!$util.isInteger(message.passes_to_grant)) return "passes_to_grant: integer expected"; - if (message.days_to_expiration != null && message.hasOwnProperty("days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) if (!$util.isInteger(message.days_to_expiration)) return "days_to_expiration: integer expected"; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) if (!$util.isInteger(message.action)) return "action: integer expected"; return null; @@ -19401,19 +25287,25 @@ * @param {Object.} object Plain object * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 */ - CMsgAMGrantGuestPasses2.fromObject = function fromObject(object) { + CMsgAMGrantGuestPasses2.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGrantGuestPasses2) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGrantGuestPasses2: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGrantGuestPasses2(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.package_id != null) message.package_id = object.package_id >>> 0; if (object.passes_to_grant != null) @@ -19434,33 +25326,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGrantGuestPasses2.toObject = function toObject(message, options) { + CMsgAMGrantGuestPasses2.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.package_id = 0; object.passes_to_grant = 0; object.days_to_expiration = 0; object.action = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.package_id != null && message.hasOwnProperty("package_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) object.package_id = message.package_id; - if (message.passes_to_grant != null && message.hasOwnProperty("passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) object.passes_to_grant = message.passes_to_grant; - if (message.days_to_expiration != null && message.hasOwnProperty("days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) object.days_to_expiration = message.days_to_expiration; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) object.action = message.action; return object; }; @@ -19472,8 +25370,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGrantGuestPasses2.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGrantGuestPasses2.prototype.toJSON = function() { + return CMsgAMGrantGuestPasses2.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGrantGuestPasses2 + * @function getTypeUrl + * @memberof CMsgAMGrantGuestPasses2 + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGrantGuestPasses2.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGrantGuestPasses2"; }; return CMsgAMGrantGuestPasses2; @@ -19483,26 +25395,39 @@ /** * Properties of a CMsgAMGrantGuestPasses2Response. - * @exports ICMsgAMGrantGuestPasses2Response - * @interface ICMsgAMGrantGuestPasses2Response + * @typedef {Object} CMsgAMGrantGuestPasses2Response.$Properties * @property {number|null} [eresult] CMsgAMGrantGuestPasses2Response eresult * @property {number|null} [passes_granted] CMsgAMGrantGuestPasses2Response passes_granted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGrantGuestPasses2Response. + * @exports ICMsgAMGrantGuestPasses2Response + * @interface ICMsgAMGrantGuestPasses2Response + * @augments CMsgAMGrantGuestPasses2Response.$Properties + * @deprecated Use CMsgAMGrantGuestPasses2Response.$Properties instead. + */ + + /** + * Shape of a CMsgAMGrantGuestPasses2Response. + * @typedef {CMsgAMGrantGuestPasses2Response.$Properties} CMsgAMGrantGuestPasses2Response.$Shape */ /** * Constructs a new CMsgAMGrantGuestPasses2Response. * @exports CMsgAMGrantGuestPasses2Response * @classdesc Represents a CMsgAMGrantGuestPasses2Response. - * @implements ICMsgAMGrantGuestPasses2Response * @constructor - * @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGrantGuestPasses2Response(properties) { + var CMsgAMGrantGuestPasses2Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGrantGuestPasses2Response eresult. @@ -19525,10 +25450,14 @@ * @function create * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2Response.$Properties=} [properties] Properties to set * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response instance + * @type {{ + * (properties: CMsgAMGrantGuestPasses2Response.$Shape): CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape; + * (properties?: CMsgAMGrantGuestPasses2Response.$Properties): CMsgAMGrantGuestPasses2Response; + * }} */ - CMsgAMGrantGuestPasses2Response.create = function create(properties) { + CMsgAMGrantGuestPasses2Response.create = function(properties) { return new CMsgAMGrantGuestPasses2Response(properties); }; @@ -19537,17 +25466,24 @@ * @function encode * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response} message CMsgAMGrantGuestPasses2Response message or plain object to encode + * @param {CMsgAMGrantGuestPasses2Response.$Properties} message CMsgAMGrantGuestPasses2Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2Response.encode = function encode(message, writer) { + CMsgAMGrantGuestPasses2Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); - if (message.passes_granted != null && Object.hasOwnProperty.call(message, "passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.passes_granted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19556,12 +25492,12 @@ * @function encodeDelimited * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response} message CMsgAMGrantGuestPasses2Response message or plain object to encode + * @param {CMsgAMGrantGuestPasses2Response.$Properties} message CMsgAMGrantGuestPasses2Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGrantGuestPasses2Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19571,28 +25507,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response + * @returns {CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape} CMsgAMGrantGuestPasses2Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2Response.decode = function decode(reader, length) { + CMsgAMGrantGuestPasses2Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGrantGuestPasses2Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGrantGuestPasses2Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - case 2: - message.passes_granted = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.passes_granted = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19602,11 +25558,11 @@ * @memberof CMsgAMGrantGuestPasses2Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response + * @returns {CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape} CMsgAMGrantGuestPasses2Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2Response.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGrantGuestPasses2Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19620,13 +25576,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGrantGuestPasses2Response.verify = function verify(message) { + CMsgAMGrantGuestPasses2Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.passes_granted != null && message.hasOwnProperty("passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) if (!$util.isInteger(message.passes_granted)) return "passes_granted: integer expected"; return null; @@ -19640,9 +25600,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response */ - CMsgAMGrantGuestPasses2Response.fromObject = function fromObject(object) { + CMsgAMGrantGuestPasses2Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGrantGuestPasses2Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGrantGuestPasses2Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGrantGuestPasses2Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -19660,17 +25626,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGrantGuestPasses2Response.toObject = function toObject(message, options) { + CMsgAMGrantGuestPasses2Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.passes_granted = 0; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.passes_granted != null && message.hasOwnProperty("passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) object.passes_granted = message.passes_granted; return object; }; @@ -19679,11 +25649,25 @@ * Converts this CMsgAMGrantGuestPasses2Response to JSON. * @function toJSON * @memberof CMsgAMGrantGuestPasses2Response - * @instance - * @returns {Object.} JSON object + * @instance + * @returns {Object.} JSON object + */ + CMsgAMGrantGuestPasses2Response.prototype.toJSON = function() { + return CMsgAMGrantGuestPasses2Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGrantGuestPasses2Response + * @function getTypeUrl + * @memberof CMsgAMGrantGuestPasses2Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url */ - CMsgAMGrantGuestPasses2Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGrantGuestPasses2Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGrantGuestPasses2Response"; }; return CMsgAMGrantGuestPasses2Response; @@ -19693,26 +25677,39 @@ /** * Properties of a CGCSystemMsg_GetAccountDetails. - * @exports ICGCSystemMsg_GetAccountDetails - * @interface ICGCSystemMsg_GetAccountDetails + * @typedef {Object} CGCSystemMsg_GetAccountDetails.$Properties * @property {number|Long|null} [steamid] CGCSystemMsg_GetAccountDetails steamid * @property {number|null} [appid] CGCSystemMsg_GetAccountDetails appid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetAccountDetails. + * @exports ICGCSystemMsg_GetAccountDetails + * @interface ICGCSystemMsg_GetAccountDetails + * @augments CGCSystemMsg_GetAccountDetails.$Properties + * @deprecated Use CGCSystemMsg_GetAccountDetails.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetAccountDetails. + * @typedef {CGCSystemMsg_GetAccountDetails.$Properties} CGCSystemMsg_GetAccountDetails.$Shape */ /** * Constructs a new CGCSystemMsg_GetAccountDetails. * @exports CGCSystemMsg_GetAccountDetails * @classdesc Represents a CGCSystemMsg_GetAccountDetails. - * @implements ICGCSystemMsg_GetAccountDetails * @constructor - * @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetAccountDetails(properties) { + var CGCSystemMsg_GetAccountDetails = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetAccountDetails steamid. @@ -19720,7 +25717,7 @@ * @memberof CGCSystemMsg_GetAccountDetails * @instance */ - CGCSystemMsg_GetAccountDetails.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCSystemMsg_GetAccountDetails.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CGCSystemMsg_GetAccountDetails appid. @@ -19735,10 +25732,14 @@ * @function create * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails instance + * @type {{ + * (properties: CGCSystemMsg_GetAccountDetails.$Shape): CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape; + * (properties?: CGCSystemMsg_GetAccountDetails.$Properties): CGCSystemMsg_GetAccountDetails; + * }} */ - CGCSystemMsg_GetAccountDetails.create = function create(properties) { + CGCSystemMsg_GetAccountDetails.create = function(properties) { return new CGCSystemMsg_GetAccountDetails(properties); }; @@ -19747,17 +25748,24 @@ * @function encode * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails} message CGCSystemMsg_GetAccountDetails message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails.$Properties} message CGCSystemMsg_GetAccountDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails.encode = function encode(message, writer) { + CGCSystemMsg_GetAccountDetails.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19766,12 +25774,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails} message CGCSystemMsg_GetAccountDetails message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails.$Properties} message CGCSystemMsg_GetAccountDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetAccountDetails.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19781,28 +25789,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails + * @returns {CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape} CGCSystemMsg_GetAccountDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails.decode = function decode(reader, length) { + CGCSystemMsg_GetAccountDetails.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetAccountDetails(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetAccountDetails(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19812,11 +25840,11 @@ * @memberof CGCSystemMsg_GetAccountDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails + * @returns {CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape} CGCSystemMsg_GetAccountDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetAccountDetails.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19830,13 +25858,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetAccountDetails.verify = function verify(message) { + CGCSystemMsg_GetAccountDetails.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; return null; @@ -19850,19 +25882,25 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails */ - CGCSystemMsg_GetAccountDetails.fromObject = function fromObject(object) { + CGCSystemMsg_GetAccountDetails.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetAccountDetails) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetAccountDetails: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetAccountDetails(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; return message; @@ -19877,24 +25915,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetAccountDetails.toObject = function toObject(message, options) { + CGCSystemMsg_GetAccountDetails.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; return object; }; @@ -19906,8 +25950,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetAccountDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetAccountDetails.prototype.toJSON = function() { + return CGCSystemMsg_GetAccountDetails.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetAccountDetails + * @function getTypeUrl + * @memberof CGCSystemMsg_GetAccountDetails + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetAccountDetails.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetAccountDetails"; }; return CGCSystemMsg_GetAccountDetails; @@ -19917,8 +25975,7 @@ /** * Properties of a CGCSystemMsg_GetAccountDetails_Response. - * @exports ICGCSystemMsg_GetAccountDetails_Response - * @interface ICGCSystemMsg_GetAccountDetails_Response + * @typedef {Object} CGCSystemMsg_GetAccountDetails_Response.$Properties * @property {number|null} [eresult_deprecated] CGCSystemMsg_GetAccountDetails_Response eresult_deprecated * @property {string|null} [account_name] CGCSystemMsg_GetAccountDetails_Response account_name * @property {string|null} [persona_name] CGCSystemMsg_GetAccountDetails_Response persona_name @@ -19953,22 +26010,36 @@ * @property {number|null} [rt_identity_linked] CGCSystemMsg_GetAccountDetails_Response rt_identity_linked * @property {number|null} [rt_birth_date] CGCSystemMsg_GetAccountDetails_Response rt_birth_date * @property {string|null} [txn_country_code] CGCSystemMsg_GetAccountDetails_Response txn_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetAccountDetails_Response. + * @exports ICGCSystemMsg_GetAccountDetails_Response + * @interface ICGCSystemMsg_GetAccountDetails_Response + * @augments CGCSystemMsg_GetAccountDetails_Response.$Properties + * @deprecated Use CGCSystemMsg_GetAccountDetails_Response.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetAccountDetails_Response. + * @typedef {CGCSystemMsg_GetAccountDetails_Response.$Properties} CGCSystemMsg_GetAccountDetails_Response.$Shape */ /** * Constructs a new CGCSystemMsg_GetAccountDetails_Response. * @exports CGCSystemMsg_GetAccountDetails_Response * @classdesc Represents a CGCSystemMsg_GetAccountDetails_Response. - * @implements ICGCSystemMsg_GetAccountDetails_Response * @constructor - * @param {ICGCSystemMsg_GetAccountDetails_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetAccountDetails_Response(properties) { + var CGCSystemMsg_GetAccountDetails_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetAccountDetails_Response eresult_deprecated. @@ -20247,10 +26318,14 @@ * @function create * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response instance + * @type {{ + * (properties: CGCSystemMsg_GetAccountDetails_Response.$Shape): CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape; + * (properties?: CGCSystemMsg_GetAccountDetails_Response.$Properties): CGCSystemMsg_GetAccountDetails_Response; + * }} */ - CGCSystemMsg_GetAccountDetails_Response.create = function create(properties) { + CGCSystemMsg_GetAccountDetails_Response.create = function(properties) { return new CGCSystemMsg_GetAccountDetails_Response(properties); }; @@ -20259,81 +26334,88 @@ * @function encode * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails_Response.encode = function encode(message, writer) { + CGCSystemMsg_GetAccountDetails_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult_deprecated != null && Object.hasOwnProperty.call(message, "eresult_deprecated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult_deprecated); - if (message.account_name != null && Object.hasOwnProperty.call(message, "account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.account_name); - if (message.persona_name != null && Object.hasOwnProperty.call(message, "persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.persona_name); - if (message.is_profile_public != null && Object.hasOwnProperty.call(message, "is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_profile_public); - if (message.is_inventory_public != null && Object.hasOwnProperty.call(message, "is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_inventory_public); - if (message.is_vac_banned != null && Object.hasOwnProperty.call(message, "is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.is_vac_banned); - if (message.is_cyber_cafe != null && Object.hasOwnProperty.call(message, "is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.is_cyber_cafe); - if (message.is_school_account != null && Object.hasOwnProperty.call(message, "is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.is_school_account); - if (message.is_limited != null && Object.hasOwnProperty.call(message, "is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.is_limited); - if (message.is_subscribed != null && Object.hasOwnProperty.call(message, "is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.is_subscribed); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message["package"]); - if (message.is_free_trial_account != null && Object.hasOwnProperty.call(message, "is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) writer.uint32(/* id 13, wireType 0 =*/104).bool(message.is_free_trial_account); - if (message.free_trial_expiration != null && Object.hasOwnProperty.call(message, "free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.free_trial_expiration); - if (message.is_low_violence != null && Object.hasOwnProperty.call(message, "is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) writer.uint32(/* id 15, wireType 0 =*/120).bool(message.is_low_violence); - if (message.is_account_locked_down != null && Object.hasOwnProperty.call(message, "is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.is_account_locked_down); - if (message.is_community_banned != null && Object.hasOwnProperty.call(message, "is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.is_community_banned); - if (message.is_trade_banned != null && Object.hasOwnProperty.call(message, "is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.is_trade_banned); - if (message.trade_ban_expiration != null && Object.hasOwnProperty.call(message, "trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.trade_ban_expiration); - if (message.accountid != null && Object.hasOwnProperty.call(message, "accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.accountid); - if (message.suspension_end_time != null && Object.hasOwnProperty.call(message, "suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.suspension_end_time); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) writer.uint32(/* id 22, wireType 2 =*/178).string(message.currency); - if (message.steam_level != null && Object.hasOwnProperty.call(message, "steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.steam_level); - if (message.friend_count != null && Object.hasOwnProperty.call(message, "friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.friend_count); - if (message.account_creation_time != null && Object.hasOwnProperty.call(message, "account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.account_creation_time); - if (message.is_steamguard_enabled != null && Object.hasOwnProperty.call(message, "is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.is_steamguard_enabled); - if (message.is_phone_verified != null && Object.hasOwnProperty.call(message, "is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) writer.uint32(/* id 28, wireType 0 =*/224).bool(message.is_phone_verified); - if (message.is_two_factor_auth_enabled != null && Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) writer.uint32(/* id 29, wireType 0 =*/232).bool(message.is_two_factor_auth_enabled); - if (message.two_factor_enabled_time != null && Object.hasOwnProperty.call(message, "two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.two_factor_enabled_time); - if (message.phone_verification_time != null && Object.hasOwnProperty.call(message, "phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.phone_verification_time); - if (message.phone_id != null && Object.hasOwnProperty.call(message, "phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) writer.uint32(/* id 33, wireType 0 =*/264).uint64(message.phone_id); - if (message.is_phone_identifying != null && Object.hasOwnProperty.call(message, "is_phone_identifying")) + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) writer.uint32(/* id 34, wireType 0 =*/272).bool(message.is_phone_identifying); - if (message.rt_identity_linked != null && Object.hasOwnProperty.call(message, "rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) writer.uint32(/* id 35, wireType 0 =*/280).uint32(message.rt_identity_linked); - if (message.rt_birth_date != null && Object.hasOwnProperty.call(message, "rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) writer.uint32(/* id 36, wireType 0 =*/288).uint32(message.rt_birth_date); - if (message.txn_country_code != null && Object.hasOwnProperty.call(message, "txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.txn_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20342,12 +26424,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetAccountDetails_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20357,124 +26439,240 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response + * @returns {CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape} CGCSystemMsg_GetAccountDetails_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails_Response.decode = function decode(reader, length) { + CGCSystemMsg_GetAccountDetails_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetAccountDetails_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetAccountDetails_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult_deprecated = reader.uint32(); - break; - case 2: - message.account_name = reader.string(); - break; - case 3: - message.persona_name = reader.string(); - break; - case 4: - message.is_profile_public = reader.bool(); - break; - case 5: - message.is_inventory_public = reader.bool(); - break; - case 7: - message.is_vac_banned = reader.bool(); - break; - case 8: - message.is_cyber_cafe = reader.bool(); - break; - case 9: - message.is_school_account = reader.bool(); - break; - case 10: - message.is_limited = reader.bool(); - break; - case 11: - message.is_subscribed = reader.bool(); - break; - case 12: - message["package"] = reader.uint32(); - break; - case 13: - message.is_free_trial_account = reader.bool(); - break; - case 14: - message.free_trial_expiration = reader.uint32(); - break; - case 15: - message.is_low_violence = reader.bool(); - break; - case 16: - message.is_account_locked_down = reader.bool(); - break; - case 17: - message.is_community_banned = reader.bool(); - break; - case 18: - message.is_trade_banned = reader.bool(); - break; - case 19: - message.trade_ban_expiration = reader.uint32(); - break; - case 20: - message.accountid = reader.uint32(); - break; - case 21: - message.suspension_end_time = reader.uint32(); - break; - case 22: - message.currency = reader.string(); - break; - case 23: - message.steam_level = reader.uint32(); - break; - case 24: - message.friend_count = reader.uint32(); - break; - case 25: - message.account_creation_time = reader.uint32(); - break; - case 27: - message.is_steamguard_enabled = reader.bool(); - break; - case 28: - message.is_phone_verified = reader.bool(); - break; - case 29: - message.is_two_factor_auth_enabled = reader.bool(); - break; - case 30: - message.two_factor_enabled_time = reader.uint32(); - break; - case 31: - message.phone_verification_time = reader.uint32(); - break; - case 33: - message.phone_id = reader.uint64(); - break; - case 34: - message.is_phone_identifying = reader.bool(); - break; - case 35: - message.rt_identity_linked = reader.uint32(); - break; - case 36: - message.rt_birth_date = reader.uint32(); - break; - case 37: - message.txn_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult_deprecated = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.account_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.persona_name = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_profile_public = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_inventory_public = reader.bool(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.is_vac_banned = reader.bool(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.is_cyber_cafe = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.is_school_account = reader.bool(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.is_limited = reader.bool(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.is_subscribed = reader.bool(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message["package"] = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.is_free_trial_account = reader.bool(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.free_trial_expiration = reader.uint32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.is_low_violence = reader.bool(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.is_account_locked_down = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.is_community_banned = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.is_trade_banned = reader.bool(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.trade_ban_expiration = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.accountid = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.suspension_end_time = reader.uint32(); + continue; + } + case 22: { + if (wireType !== 2) + break; + message.currency = reader.string(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.steam_level = reader.uint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.friend_count = reader.uint32(); + continue; + } + case 25: { + if (wireType !== 0) + break; + message.account_creation_time = reader.uint32(); + continue; + } + case 27: { + if (wireType !== 0) + break; + message.is_steamguard_enabled = reader.bool(); + continue; + } + case 28: { + if (wireType !== 0) + break; + message.is_phone_verified = reader.bool(); + continue; + } + case 29: { + if (wireType !== 0) + break; + message.is_two_factor_auth_enabled = reader.bool(); + continue; + } + case 30: { + if (wireType !== 0) + break; + message.two_factor_enabled_time = reader.uint32(); + continue; + } + case 31: { + if (wireType !== 0) + break; + message.phone_verification_time = reader.uint32(); + continue; + } + case 33: { + if (wireType !== 0) + break; + message.phone_id = reader.uint64(); + continue; + } + case 34: { + if (wireType !== 0) + break; + message.is_phone_identifying = reader.bool(); + continue; + } + case 35: { + if (wireType !== 0) + break; + message.rt_identity_linked = reader.uint32(); + continue; + } + case 36: { + if (wireType !== 0) + break; + message.rt_birth_date = reader.uint32(); + continue; + } + case 37: { + if (wireType !== 2) + break; + message.txn_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20484,11 +26682,11 @@ * @memberof CGCSystemMsg_GetAccountDetails_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response + * @returns {CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape} CGCSystemMsg_GetAccountDetails_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails_Response.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetAccountDetails_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20502,109 +26700,113 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetAccountDetails_Response.verify = function verify(message) { + CGCSystemMsg_GetAccountDetails_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) if (!$util.isInteger(message.eresult_deprecated)) return "eresult_deprecated: integer expected"; - if (message.account_name != null && message.hasOwnProperty("account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) if (!$util.isString(message.account_name)) return "account_name: string expected"; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) if (!$util.isString(message.persona_name)) return "persona_name: string expected"; - if (message.is_profile_public != null && message.hasOwnProperty("is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) if (typeof message.is_profile_public !== "boolean") return "is_profile_public: boolean expected"; - if (message.is_inventory_public != null && message.hasOwnProperty("is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) if (typeof message.is_inventory_public !== "boolean") return "is_inventory_public: boolean expected"; - if (message.is_vac_banned != null && message.hasOwnProperty("is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) if (typeof message.is_vac_banned !== "boolean") return "is_vac_banned: boolean expected"; - if (message.is_cyber_cafe != null && message.hasOwnProperty("is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) if (typeof message.is_cyber_cafe !== "boolean") return "is_cyber_cafe: boolean expected"; - if (message.is_school_account != null && message.hasOwnProperty("is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) if (typeof message.is_school_account !== "boolean") return "is_school_account: boolean expected"; - if (message.is_limited != null && message.hasOwnProperty("is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) if (typeof message.is_limited !== "boolean") return "is_limited: boolean expected"; - if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) if (typeof message.is_subscribed !== "boolean") return "is_subscribed: boolean expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) if (!$util.isInteger(message["package"])) return "package: integer expected"; - if (message.is_free_trial_account != null && message.hasOwnProperty("is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) if (typeof message.is_free_trial_account !== "boolean") return "is_free_trial_account: boolean expected"; - if (message.free_trial_expiration != null && message.hasOwnProperty("free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) if (!$util.isInteger(message.free_trial_expiration)) return "free_trial_expiration: integer expected"; - if (message.is_low_violence != null && message.hasOwnProperty("is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) if (typeof message.is_low_violence !== "boolean") return "is_low_violence: boolean expected"; - if (message.is_account_locked_down != null && message.hasOwnProperty("is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) if (typeof message.is_account_locked_down !== "boolean") return "is_account_locked_down: boolean expected"; - if (message.is_community_banned != null && message.hasOwnProperty("is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) if (typeof message.is_community_banned !== "boolean") return "is_community_banned: boolean expected"; - if (message.is_trade_banned != null && message.hasOwnProperty("is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) if (typeof message.is_trade_banned !== "boolean") return "is_trade_banned: boolean expected"; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) if (!$util.isInteger(message.trade_ban_expiration)) return "trade_ban_expiration: integer expected"; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) if (!$util.isInteger(message.accountid)) return "accountid: integer expected"; - if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) if (!$util.isInteger(message.suspension_end_time)) return "suspension_end_time: integer expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) if (!$util.isString(message.currency)) return "currency: string expected"; - if (message.steam_level != null && message.hasOwnProperty("steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) if (!$util.isInteger(message.steam_level)) return "steam_level: integer expected"; - if (message.friend_count != null && message.hasOwnProperty("friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) if (!$util.isInteger(message.friend_count)) return "friend_count: integer expected"; - if (message.account_creation_time != null && message.hasOwnProperty("account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) if (!$util.isInteger(message.account_creation_time)) return "account_creation_time: integer expected"; - if (message.is_steamguard_enabled != null && message.hasOwnProperty("is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) if (typeof message.is_steamguard_enabled !== "boolean") return "is_steamguard_enabled: boolean expected"; - if (message.is_phone_verified != null && message.hasOwnProperty("is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) if (typeof message.is_phone_verified !== "boolean") return "is_phone_verified: boolean expected"; - if (message.is_two_factor_auth_enabled != null && message.hasOwnProperty("is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) if (typeof message.is_two_factor_auth_enabled !== "boolean") return "is_two_factor_auth_enabled: boolean expected"; - if (message.two_factor_enabled_time != null && message.hasOwnProperty("two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) if (!$util.isInteger(message.two_factor_enabled_time)) return "two_factor_enabled_time: integer expected"; - if (message.phone_verification_time != null && message.hasOwnProperty("phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) if (!$util.isInteger(message.phone_verification_time)) return "phone_verification_time: integer expected"; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) if (!$util.isInteger(message.phone_id) && !(message.phone_id && $util.isInteger(message.phone_id.low) && $util.isInteger(message.phone_id.high))) return "phone_id: integer|Long expected"; - if (message.is_phone_identifying != null && message.hasOwnProperty("is_phone_identifying")) + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) if (typeof message.is_phone_identifying !== "boolean") return "is_phone_identifying: boolean expected"; - if (message.rt_identity_linked != null && message.hasOwnProperty("rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) if (!$util.isInteger(message.rt_identity_linked)) return "rt_identity_linked: integer expected"; - if (message.rt_birth_date != null && message.hasOwnProperty("rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) if (!$util.isInteger(message.rt_birth_date)) return "rt_birth_date: integer expected"; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) if (!$util.isString(message.txn_country_code)) return "txn_country_code: string expected"; return null; @@ -20618,44 +26820,50 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response */ - CGCSystemMsg_GetAccountDetails_Response.fromObject = function fromObject(object) { + CGCSystemMsg_GetAccountDetails_Response.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetAccountDetails_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetAccountDetails_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetAccountDetails_Response(); if (object.eresult_deprecated != null) message.eresult_deprecated = object.eresult_deprecated >>> 0; if (object.account_name != null) - message.account_name = String(object.account_name); + message.account_name = $String(object.account_name); if (object.persona_name != null) - message.persona_name = String(object.persona_name); + message.persona_name = $String(object.persona_name); if (object.is_profile_public != null) - message.is_profile_public = Boolean(object.is_profile_public); + message.is_profile_public = $Boolean(object.is_profile_public); if (object.is_inventory_public != null) - message.is_inventory_public = Boolean(object.is_inventory_public); + message.is_inventory_public = $Boolean(object.is_inventory_public); if (object.is_vac_banned != null) - message.is_vac_banned = Boolean(object.is_vac_banned); + message.is_vac_banned = $Boolean(object.is_vac_banned); if (object.is_cyber_cafe != null) - message.is_cyber_cafe = Boolean(object.is_cyber_cafe); + message.is_cyber_cafe = $Boolean(object.is_cyber_cafe); if (object.is_school_account != null) - message.is_school_account = Boolean(object.is_school_account); + message.is_school_account = $Boolean(object.is_school_account); if (object.is_limited != null) - message.is_limited = Boolean(object.is_limited); + message.is_limited = $Boolean(object.is_limited); if (object.is_subscribed != null) - message.is_subscribed = Boolean(object.is_subscribed); + message.is_subscribed = $Boolean(object.is_subscribed); if (object["package"] != null) message["package"] = object["package"] >>> 0; if (object.is_free_trial_account != null) - message.is_free_trial_account = Boolean(object.is_free_trial_account); + message.is_free_trial_account = $Boolean(object.is_free_trial_account); if (object.free_trial_expiration != null) message.free_trial_expiration = object.free_trial_expiration >>> 0; if (object.is_low_violence != null) - message.is_low_violence = Boolean(object.is_low_violence); + message.is_low_violence = $Boolean(object.is_low_violence); if (object.is_account_locked_down != null) - message.is_account_locked_down = Boolean(object.is_account_locked_down); + message.is_account_locked_down = $Boolean(object.is_account_locked_down); if (object.is_community_banned != null) - message.is_community_banned = Boolean(object.is_community_banned); + message.is_community_banned = $Boolean(object.is_community_banned); if (object.is_trade_banned != null) - message.is_trade_banned = Boolean(object.is_trade_banned); + message.is_trade_banned = $Boolean(object.is_trade_banned); if (object.trade_ban_expiration != null) message.trade_ban_expiration = object.trade_ban_expiration >>> 0; if (object.accountid != null) @@ -20663,7 +26871,7 @@ if (object.suspension_end_time != null) message.suspension_end_time = object.suspension_end_time >>> 0; if (object.currency != null) - message.currency = String(object.currency); + message.currency = $String(object.currency); if (object.steam_level != null) message.steam_level = object.steam_level >>> 0; if (object.friend_count != null) @@ -20671,32 +26879,32 @@ if (object.account_creation_time != null) message.account_creation_time = object.account_creation_time >>> 0; if (object.is_steamguard_enabled != null) - message.is_steamguard_enabled = Boolean(object.is_steamguard_enabled); + message.is_steamguard_enabled = $Boolean(object.is_steamguard_enabled); if (object.is_phone_verified != null) - message.is_phone_verified = Boolean(object.is_phone_verified); + message.is_phone_verified = $Boolean(object.is_phone_verified); if (object.is_two_factor_auth_enabled != null) - message.is_two_factor_auth_enabled = Boolean(object.is_two_factor_auth_enabled); + message.is_two_factor_auth_enabled = $Boolean(object.is_two_factor_auth_enabled); if (object.two_factor_enabled_time != null) message.two_factor_enabled_time = object.two_factor_enabled_time >>> 0; if (object.phone_verification_time != null) message.phone_verification_time = object.phone_verification_time >>> 0; if (object.phone_id != null) if ($util.Long) - (message.phone_id = $util.Long.fromValue(object.phone_id)).unsigned = true; + message.phone_id = $util.Long.fromValue(object.phone_id, true); else if (typeof object.phone_id === "string") - message.phone_id = parseInt(object.phone_id, 10); + message.phone_id = $parseInt(object.phone_id, 10); else if (typeof object.phone_id === "number") message.phone_id = object.phone_id; else if (typeof object.phone_id === "object") message.phone_id = new $util.LongBits(object.phone_id.low >>> 0, object.phone_id.high >>> 0).toNumber(true); if (object.is_phone_identifying != null) - message.is_phone_identifying = Boolean(object.is_phone_identifying); + message.is_phone_identifying = $Boolean(object.is_phone_identifying); if (object.rt_identity_linked != null) message.rt_identity_linked = object.rt_identity_linked >>> 0; if (object.rt_birth_date != null) message.rt_birth_date = object.rt_birth_date >>> 0; if (object.txn_country_code != null) - message.txn_country_code = String(object.txn_country_code); + message.txn_country_code = $String(object.txn_country_code); return message; }; @@ -20709,9 +26917,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetAccountDetails_Response.toObject = function toObject(message, options) { + CGCSystemMsg_GetAccountDetails_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult_deprecated = 2; @@ -20745,84 +26957,86 @@ object.phone_verification_time = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.phone_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.phone_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.phone_id = options.longs === String ? "0" : 0; + object.phone_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.is_phone_identifying = false; object.rt_identity_linked = 0; object.rt_birth_date = 0; object.txn_country_code = ""; } - if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated")) + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) object.eresult_deprecated = message.eresult_deprecated; - if (message.account_name != null && message.hasOwnProperty("account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) object.account_name = message.account_name; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) object.persona_name = message.persona_name; - if (message.is_profile_public != null && message.hasOwnProperty("is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) object.is_profile_public = message.is_profile_public; - if (message.is_inventory_public != null && message.hasOwnProperty("is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) object.is_inventory_public = message.is_inventory_public; - if (message.is_vac_banned != null && message.hasOwnProperty("is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) object.is_vac_banned = message.is_vac_banned; - if (message.is_cyber_cafe != null && message.hasOwnProperty("is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) object.is_cyber_cafe = message.is_cyber_cafe; - if (message.is_school_account != null && message.hasOwnProperty("is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) object.is_school_account = message.is_school_account; - if (message.is_limited != null && message.hasOwnProperty("is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) object.is_limited = message.is_limited; - if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) object.is_subscribed = message.is_subscribed; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; - if (message.is_free_trial_account != null && message.hasOwnProperty("is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) object.is_free_trial_account = message.is_free_trial_account; - if (message.free_trial_expiration != null && message.hasOwnProperty("free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) object.free_trial_expiration = message.free_trial_expiration; - if (message.is_low_violence != null && message.hasOwnProperty("is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) object.is_low_violence = message.is_low_violence; - if (message.is_account_locked_down != null && message.hasOwnProperty("is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) object.is_account_locked_down = message.is_account_locked_down; - if (message.is_community_banned != null && message.hasOwnProperty("is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) object.is_community_banned = message.is_community_banned; - if (message.is_trade_banned != null && message.hasOwnProperty("is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) object.is_trade_banned = message.is_trade_banned; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) object.trade_ban_expiration = message.trade_ban_expiration; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) object.accountid = message.accountid; - if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) object.suspension_end_time = message.suspension_end_time; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) object.currency = message.currency; - if (message.steam_level != null && message.hasOwnProperty("steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) object.steam_level = message.steam_level; - if (message.friend_count != null && message.hasOwnProperty("friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) object.friend_count = message.friend_count; - if (message.account_creation_time != null && message.hasOwnProperty("account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) object.account_creation_time = message.account_creation_time; - if (message.is_steamguard_enabled != null && message.hasOwnProperty("is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) object.is_steamguard_enabled = message.is_steamguard_enabled; - if (message.is_phone_verified != null && message.hasOwnProperty("is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) object.is_phone_verified = message.is_phone_verified; - if (message.is_two_factor_auth_enabled != null && message.hasOwnProperty("is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) object.is_two_factor_auth_enabled = message.is_two_factor_auth_enabled; - if (message.two_factor_enabled_time != null && message.hasOwnProperty("two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) object.two_factor_enabled_time = message.two_factor_enabled_time; - if (message.phone_verification_time != null && message.hasOwnProperty("phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) object.phone_verification_time = message.phone_verification_time; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) - if (typeof message.phone_id === "number") - object.phone_id = options.longs === String ? String(message.phone_id) : message.phone_id; + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.phone_id = typeof message.phone_id === "number" ? $BigInt(message.phone_id) : $util.Long.fromBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0, true).toBigInt(); + else if (typeof message.phone_id === "number") + object.phone_id = options.longs === $String ? $String(message.phone_id) : message.phone_id; else - object.phone_id = options.longs === String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; - if (message.is_phone_identifying != null && message.hasOwnProperty("is_phone_identifying")) + object.phone_id = options.longs === $String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === $Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) object.is_phone_identifying = message.is_phone_identifying; - if (message.rt_identity_linked != null && message.hasOwnProperty("rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) object.rt_identity_linked = message.rt_identity_linked; - if (message.rt_birth_date != null && message.hasOwnProperty("rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) object.rt_birth_date = message.rt_birth_date; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) object.txn_country_code = message.txn_country_code; return object; }; @@ -20834,8 +27048,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetAccountDetails_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetAccountDetails_Response.prototype.toJSON = function() { + return CGCSystemMsg_GetAccountDetails_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetAccountDetails_Response + * @function getTypeUrl + * @memberof CGCSystemMsg_GetAccountDetails_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetAccountDetails_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetAccountDetails_Response"; }; return CGCSystemMsg_GetAccountDetails_Response; @@ -20845,26 +27073,39 @@ /** * Properties of a CMsgGCCheckClanMembership. - * @exports ICMsgGCCheckClanMembership - * @interface ICMsgGCCheckClanMembership + * @typedef {Object} CMsgGCCheckClanMembership.$Properties * @property {number|Long|null} [steamid] CMsgGCCheckClanMembership steamid * @property {number|null} [clanid] CMsgGCCheckClanMembership clanid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckClanMembership. + * @exports ICMsgGCCheckClanMembership + * @interface ICMsgGCCheckClanMembership + * @augments CMsgGCCheckClanMembership.$Properties + * @deprecated Use CMsgGCCheckClanMembership.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckClanMembership. + * @typedef {CMsgGCCheckClanMembership.$Properties} CMsgGCCheckClanMembership.$Shape */ /** * Constructs a new CMsgGCCheckClanMembership. * @exports CMsgGCCheckClanMembership * @classdesc Represents a CMsgGCCheckClanMembership. - * @implements ICMsgGCCheckClanMembership * @constructor - * @param {ICMsgGCCheckClanMembership=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckClanMembership(properties) { + var CMsgGCCheckClanMembership = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckClanMembership steamid. @@ -20872,7 +27113,7 @@ * @memberof CMsgGCCheckClanMembership * @instance */ - CMsgGCCheckClanMembership.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckClanMembership.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCCheckClanMembership clanid. @@ -20887,10 +27128,14 @@ * @function create * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership instance + * @type {{ + * (properties: CMsgGCCheckClanMembership.$Shape): CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape; + * (properties?: CMsgGCCheckClanMembership.$Properties): CMsgGCCheckClanMembership; + * }} */ - CMsgGCCheckClanMembership.create = function create(properties) { + CMsgGCCheckClanMembership.create = function(properties) { return new CMsgGCCheckClanMembership(properties); }; @@ -20899,17 +27144,24 @@ * @function encode * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership} message CMsgGCCheckClanMembership message or plain object to encode + * @param {CMsgGCCheckClanMembership.$Properties} message CMsgGCCheckClanMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership.encode = function encode(message, writer) { + CMsgGCCheckClanMembership.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.clanid != null && Object.hasOwnProperty.call(message, "clanid")) + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.clanid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20918,12 +27170,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership} message CMsgGCCheckClanMembership message or plain object to encode + * @param {CMsgGCCheckClanMembership.$Properties} message CMsgGCCheckClanMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckClanMembership.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20933,28 +27185,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership + * @returns {CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape} CMsgGCCheckClanMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership.decode = function decode(reader, length) { + CMsgGCCheckClanMembership.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckClanMembership(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckClanMembership(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.clanid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.clanid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20964,11 +27236,11 @@ * @memberof CMsgGCCheckClanMembership * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership + * @returns {CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape} CMsgGCCheckClanMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckClanMembership.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20982,13 +27254,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckClanMembership.verify = function verify(message) { + CMsgGCCheckClanMembership.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.clanid != null && message.hasOwnProperty("clanid")) + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) if (!$util.isInteger(message.clanid)) return "clanid: integer expected"; return null; @@ -21002,19 +27278,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership */ - CMsgGCCheckClanMembership.fromObject = function fromObject(object) { + CMsgGCCheckClanMembership.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckClanMembership) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckClanMembership: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckClanMembership(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.clanid != null) message.clanid = object.clanid >>> 0; return message; @@ -21029,24 +27311,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckClanMembership.toObject = function toObject(message, options) { + CMsgGCCheckClanMembership.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.clanid = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.clanid != null && message.hasOwnProperty("clanid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) object.clanid = message.clanid; return object; }; @@ -21058,8 +27346,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckClanMembership.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckClanMembership.prototype.toJSON = function() { + return CMsgGCCheckClanMembership.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckClanMembership + * @function getTypeUrl + * @memberof CMsgGCCheckClanMembership + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckClanMembership.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckClanMembership"; }; return CMsgGCCheckClanMembership; @@ -21067,27 +27369,40 @@ $root.CMsgGCCheckClanMembership_Response = (function() { + /** + * Properties of a CMsgGCCheckClanMembership_Response. + * @typedef {Object} CMsgGCCheckClanMembership_Response.$Properties + * @property {boolean|null} [ismember] CMsgGCCheckClanMembership_Response ismember + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCCheckClanMembership_Response. * @exports ICMsgGCCheckClanMembership_Response * @interface ICMsgGCCheckClanMembership_Response - * @property {boolean|null} [ismember] CMsgGCCheckClanMembership_Response ismember + * @augments CMsgGCCheckClanMembership_Response.$Properties + * @deprecated Use CMsgGCCheckClanMembership_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckClanMembership_Response. + * @typedef {CMsgGCCheckClanMembership_Response.$Properties} CMsgGCCheckClanMembership_Response.$Shape */ /** * Constructs a new CMsgGCCheckClanMembership_Response. * @exports CMsgGCCheckClanMembership_Response * @classdesc Represents a CMsgGCCheckClanMembership_Response. - * @implements ICMsgGCCheckClanMembership_Response * @constructor - * @param {ICMsgGCCheckClanMembership_Response=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckClanMembership_Response(properties) { + var CMsgGCCheckClanMembership_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckClanMembership_Response ismember. @@ -21102,10 +27417,14 @@ * @function create * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response instance + * @type {{ + * (properties: CMsgGCCheckClanMembership_Response.$Shape): CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape; + * (properties?: CMsgGCCheckClanMembership_Response.$Properties): CMsgGCCheckClanMembership_Response; + * }} */ - CMsgGCCheckClanMembership_Response.create = function create(properties) { + CMsgGCCheckClanMembership_Response.create = function(properties) { return new CMsgGCCheckClanMembership_Response(properties); }; @@ -21114,15 +27433,22 @@ * @function encode * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response} message CMsgGCCheckClanMembership_Response message or plain object to encode + * @param {CMsgGCCheckClanMembership_Response.$Properties} message CMsgGCCheckClanMembership_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership_Response.encode = function encode(message, writer) { + CMsgGCCheckClanMembership_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ismember != null && Object.hasOwnProperty.call(message, "ismember")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.ismember); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21131,12 +27457,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response} message CMsgGCCheckClanMembership_Response message or plain object to encode + * @param {CMsgGCCheckClanMembership_Response.$Properties} message CMsgGCCheckClanMembership_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckClanMembership_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21146,25 +27472,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response + * @returns {CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape} CMsgGCCheckClanMembership_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership_Response.decode = function decode(reader, length) { + CMsgGCCheckClanMembership_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckClanMembership_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckClanMembership_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ismember = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ismember = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21174,11 +27517,11 @@ * @memberof CMsgGCCheckClanMembership_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response + * @returns {CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape} CMsgGCCheckClanMembership_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckClanMembership_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21192,10 +27535,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckClanMembership_Response.verify = function verify(message) { + CMsgGCCheckClanMembership_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ismember != null && message.hasOwnProperty("ismember")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) if (typeof message.ismember !== "boolean") return "ismember: boolean expected"; return null; @@ -21209,12 +27556,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response */ - CMsgGCCheckClanMembership_Response.fromObject = function fromObject(object) { + CMsgGCCheckClanMembership_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckClanMembership_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckClanMembership_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckClanMembership_Response(); if (object.ismember != null) - message.ismember = Boolean(object.ismember); + message.ismember = $Boolean(object.ismember); return message; }; @@ -21227,13 +27580,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckClanMembership_Response.toObject = function toObject(message, options) { + CMsgGCCheckClanMembership_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.ismember = false; - if (message.ismember != null && message.hasOwnProperty("ismember")) + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) object.ismember = message.ismember; return object; }; @@ -21245,8 +27602,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckClanMembership_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckClanMembership_Response.prototype.toJSON = function() { + return CMsgGCCheckClanMembership_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckClanMembership_Response + * @function getTypeUrl + * @memberof CMsgGCCheckClanMembership_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckClanMembership_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckClanMembership_Response"; }; return CMsgGCCheckClanMembership_Response; @@ -21254,28 +27625,41 @@ $root.CMsgGCGetPersonaNames = (function() { + /** + * Properties of a CMsgGCGetPersonaNames. + * @typedef {Object} CMsgGCGetPersonaNames.$Properties + * @property {Array.|null} [steamids] CMsgGCGetPersonaNames steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPersonaNames. * @exports ICMsgGCGetPersonaNames * @interface ICMsgGCGetPersonaNames - * @property {Array.|null} [steamids] CMsgGCGetPersonaNames steamids + * @augments CMsgGCGetPersonaNames.$Properties + * @deprecated Use CMsgGCGetPersonaNames.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPersonaNames. + * @typedef {CMsgGCGetPersonaNames.$Properties} CMsgGCGetPersonaNames.$Shape */ /** * Constructs a new CMsgGCGetPersonaNames. * @exports CMsgGCGetPersonaNames * @classdesc Represents a CMsgGCGetPersonaNames. - * @implements ICMsgGCGetPersonaNames * @constructor - * @param {ICMsgGCGetPersonaNames=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPersonaNames(properties) { + var CMsgGCGetPersonaNames = function (properties) { this.steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPersonaNames steamids. @@ -21290,10 +27674,14 @@ * @function create * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames instance + * @type {{ + * (properties: CMsgGCGetPersonaNames.$Shape): CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape; + * (properties?: CMsgGCGetPersonaNames.$Properties): CMsgGCGetPersonaNames; + * }} */ - CMsgGCGetPersonaNames.create = function create(properties) { + CMsgGCGetPersonaNames.create = function(properties) { return new CMsgGCGetPersonaNames(properties); }; @@ -21302,16 +27690,23 @@ * @function encode * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames} message CMsgGCGetPersonaNames message or plain object to encode + * @param {CMsgGCGetPersonaNames.$Properties} message CMsgGCGetPersonaNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames.encode = function encode(message, writer) { + CMsgGCGetPersonaNames.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.steamids != null && message.steamids.length) for (var i = 0; i < message.steamids.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21320,12 +27715,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames} message CMsgGCGetPersonaNames message or plain object to encode + * @param {CMsgGCGetPersonaNames.$Properties} message CMsgGCGetPersonaNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPersonaNames.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21335,32 +27730,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames + * @returns {CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape} CMsgGCGetPersonaNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames.decode = function decode(reader, length) { + CMsgGCGetPersonaNames.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.steamids && message.steamids.length)) - message.steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.steamids.push(reader.fixed64()); - } else - message.steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.steamids && message.steamids.length)) + message.steamids = []; + reader.fixed64s(message.steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.steamids && message.steamids.length)) + message.steamids = []; + message.steamids.push(reader.fixed64()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21370,11 +27783,11 @@ * @memberof CMsgGCGetPersonaNames * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames + * @returns {CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape} CMsgGCGetPersonaNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPersonaNames.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21388,11 +27801,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPersonaNames.verify = function verify(message) { + CMsgGCGetPersonaNames.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamids != null && message.hasOwnProperty("steamids")) { - if (!Array.isArray(message.steamids)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamids != null && $Object.hasOwnProperty.call(message, "steamids")) { + if (!$Array.isArray(message.steamids)) return "steamids: array expected"; for (var i = 0; i < message.steamids.length; ++i) if (!$util.isInteger(message.steamids[i]) && !(message.steamids[i] && $util.isInteger(message.steamids[i].low) && $util.isInteger(message.steamids[i].high))) @@ -21409,23 +27826,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames */ - CMsgGCGetPersonaNames.fromObject = function fromObject(object) { + CMsgGCGetPersonaNames.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames(); if (object.steamids) { - if (!Array.isArray(object.steamids)) - throw TypeError(".CMsgGCGetPersonaNames.steamids: array expected"); - message.steamids = []; + if (!$Array.isArray(object.steamids)) + throw $TypeError(".CMsgGCGetPersonaNames.steamids: array expected"); + message.steamids = $Array(object.steamids.length); for (var i = 0; i < object.steamids.length; ++i) if ($util.Long) - (message.steamids[i] = $util.Long.fromValue(object.steamids[i])).unsigned = false; + message.steamids[i] = $util.Long.fromValue(object.steamids[i], true); else if (typeof object.steamids[i] === "string") - message.steamids[i] = parseInt(object.steamids[i], 10); + message.steamids[i] = $parseInt(object.steamids[i], 10); else if (typeof object.steamids[i] === "number") message.steamids[i] = object.steamids[i]; else if (typeof object.steamids[i] === "object") - message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(); + message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -21439,19 +27862,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPersonaNames.toObject = function toObject(message, options) { + CMsgGCGetPersonaNames.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.steamids = []; if (message.steamids && message.steamids.length) { - object.steamids = []; + object.steamids = $Array(message.steamids.length); for (var j = 0; j < message.steamids.length; ++j) - if (typeof message.steamids[j] === "number") - object.steamids[j] = options.longs === String ? String(message.steamids[j]) : message.steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamids[j] = typeof message.steamids[j] === "number" ? $BigInt(message.steamids[j]) : $util.Long.fromBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.steamids[j] === "number") + object.steamids[j] = options.longs === $String ? $String(message.steamids[j]) : message.steamids[j]; else - object.steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber() : message.steamids[j]; + object.steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === $Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber(true) : message.steamids[j]; } return object; }; @@ -21460,11 +27889,25 @@ * Converts this CMsgGCGetPersonaNames to JSON. * @function toJSON * @memberof CMsgGCGetPersonaNames - * @instance - * @returns {Object.} JSON object + * @instance + * @returns {Object.} JSON object + */ + CMsgGCGetPersonaNames.prototype.toJSON = function() { + return CMsgGCGetPersonaNames.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPersonaNames + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url */ - CMsgGCGetPersonaNames.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPersonaNames.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames"; }; return CMsgGCGetPersonaNames; @@ -21472,34 +27915,47 @@ $root.CMsgGCGetPersonaNames_Response = (function() { + /** + * Properties of a CMsgGCGetPersonaNames_Response. + * @typedef {Object} CMsgGCGetPersonaNames_Response.$Properties + * @property {Array.|null} [succeeded_lookups] CMsgGCGetPersonaNames_Response succeeded_lookups + * @property {Array.|null} [failed_lookup_steamids] CMsgGCGetPersonaNames_Response failed_lookup_steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPersonaNames_Response. * @exports ICMsgGCGetPersonaNames_Response * @interface ICMsgGCGetPersonaNames_Response - * @property {Array.|null} [succeeded_lookups] CMsgGCGetPersonaNames_Response succeeded_lookups - * @property {Array.|null} [failed_lookup_steamids] CMsgGCGetPersonaNames_Response failed_lookup_steamids + * @augments CMsgGCGetPersonaNames_Response.$Properties + * @deprecated Use CMsgGCGetPersonaNames_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPersonaNames_Response. + * @typedef {CMsgGCGetPersonaNames_Response.$Properties} CMsgGCGetPersonaNames_Response.$Shape */ /** * Constructs a new CMsgGCGetPersonaNames_Response. * @exports CMsgGCGetPersonaNames_Response * @classdesc Represents a CMsgGCGetPersonaNames_Response. - * @implements ICMsgGCGetPersonaNames_Response * @constructor - * @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPersonaNames_Response(properties) { + var CMsgGCGetPersonaNames_Response = function (properties) { this.succeeded_lookups = []; this.failed_lookup_steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPersonaNames_Response succeeded_lookups. - * @member {Array.} succeeded_lookups + * @member {Array.} succeeded_lookups * @memberof CMsgGCGetPersonaNames_Response * @instance */ @@ -21518,10 +27974,14 @@ * @function create * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response instance + * @type {{ + * (properties: CMsgGCGetPersonaNames_Response.$Shape): CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape; + * (properties?: CMsgGCGetPersonaNames_Response.$Properties): CMsgGCGetPersonaNames_Response; + * }} */ - CMsgGCGetPersonaNames_Response.create = function create(properties) { + CMsgGCGetPersonaNames_Response.create = function(properties) { return new CMsgGCGetPersonaNames_Response(properties); }; @@ -21530,19 +27990,26 @@ * @function encode * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response} message CMsgGCGetPersonaNames_Response message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.$Properties} message CMsgGCGetPersonaNames_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames_Response.encode = function encode(message, writer) { + CMsgGCGetPersonaNames_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.succeeded_lookups != null && message.succeeded_lookups.length) for (var i = 0; i < message.succeeded_lookups.length; ++i) - $root.CMsgGCGetPersonaNames_Response.PersonaName.encode(message.succeeded_lookups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCGetPersonaNames_Response.PersonaName.encode(message.succeeded_lookups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); if (message.failed_lookup_steamids != null && message.failed_lookup_steamids.length) for (var i = 0; i < message.failed_lookup_steamids.length; ++i) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.failed_lookup_steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21551,12 +28018,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response} message CMsgGCGetPersonaNames_Response message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.$Properties} message CMsgGCGetPersonaNames_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPersonaNames_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21566,37 +28033,58 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response + * @returns {CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape} CMsgGCGetPersonaNames_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames_Response.decode = function decode(reader, length) { + CMsgGCGetPersonaNames_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.succeeded_lookups && message.succeeded_lookups.length)) - message.succeeded_lookups = []; - message.succeeded_lookups.push($root.CMsgGCGetPersonaNames_Response.PersonaName.decode(reader, reader.uint32())); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) - message.failed_lookup_steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.failed_lookup_steamids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.succeeded_lookups && message.succeeded_lookups.length)) + message.succeeded_lookups = []; + message.succeeded_lookups.push($root.CMsgGCGetPersonaNames_Response.PersonaName.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) + message.failed_lookup_steamids = []; + reader.fixed64s(message.failed_lookup_steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) + message.failed_lookup_steamids = []; message.failed_lookup_steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21606,11 +28094,11 @@ * @memberof CMsgGCGetPersonaNames_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response + * @returns {CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape} CMsgGCGetPersonaNames_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPersonaNames_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21624,20 +28112,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPersonaNames_Response.verify = function verify(message) { + CMsgGCGetPersonaNames_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.succeeded_lookups != null && message.hasOwnProperty("succeeded_lookups")) { - if (!Array.isArray(message.succeeded_lookups)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.succeeded_lookups != null && $Object.hasOwnProperty.call(message, "succeeded_lookups")) { + if (!$Array.isArray(message.succeeded_lookups)) return "succeeded_lookups: array expected"; for (var i = 0; i < message.succeeded_lookups.length; ++i) { - var error = $root.CMsgGCGetPersonaNames_Response.PersonaName.verify(message.succeeded_lookups[i]); + var error = $root.CMsgGCGetPersonaNames_Response.PersonaName.verify(message.succeeded_lookups[i], _depth + 1); if (error) return "succeeded_lookups." + error; } } - if (message.failed_lookup_steamids != null && message.hasOwnProperty("failed_lookup_steamids")) { - if (!Array.isArray(message.failed_lookup_steamids)) + if (message.failed_lookup_steamids != null && $Object.hasOwnProperty.call(message, "failed_lookup_steamids")) { + if (!$Array.isArray(message.failed_lookup_steamids)) return "failed_lookup_steamids: array expected"; for (var i = 0; i < message.failed_lookup_steamids.length; ++i) if (!$util.isInteger(message.failed_lookup_steamids[i]) && !(message.failed_lookup_steamids[i] && $util.isInteger(message.failed_lookup_steamids[i].low) && $util.isInteger(message.failed_lookup_steamids[i].high))) @@ -21654,33 +28146,39 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response */ - CMsgGCGetPersonaNames_Response.fromObject = function fromObject(object) { + CMsgGCGetPersonaNames_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames_Response(); if (object.succeeded_lookups) { - if (!Array.isArray(object.succeeded_lookups)) - throw TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: array expected"); - message.succeeded_lookups = []; + if (!$Array.isArray(object.succeeded_lookups)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: array expected"); + message.succeeded_lookups = $Array(object.succeeded_lookups.length); for (var i = 0; i < object.succeeded_lookups.length; ++i) { - if (typeof object.succeeded_lookups[i] !== "object") - throw TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: object expected"); - message.succeeded_lookups[i] = $root.CMsgGCGetPersonaNames_Response.PersonaName.fromObject(object.succeeded_lookups[i]); + if (!$util.isObject(object.succeeded_lookups[i])) + throw $TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: object expected"); + message.succeeded_lookups[i] = $root.CMsgGCGetPersonaNames_Response.PersonaName.fromObject(object.succeeded_lookups[i], _depth + 1); } } if (object.failed_lookup_steamids) { - if (!Array.isArray(object.failed_lookup_steamids)) - throw TypeError(".CMsgGCGetPersonaNames_Response.failed_lookup_steamids: array expected"); - message.failed_lookup_steamids = []; + if (!$Array.isArray(object.failed_lookup_steamids)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.failed_lookup_steamids: array expected"); + message.failed_lookup_steamids = $Array(object.failed_lookup_steamids.length); for (var i = 0; i < object.failed_lookup_steamids.length; ++i) if ($util.Long) - (message.failed_lookup_steamids[i] = $util.Long.fromValue(object.failed_lookup_steamids[i])).unsigned = false; + message.failed_lookup_steamids[i] = $util.Long.fromValue(object.failed_lookup_steamids[i], true); else if (typeof object.failed_lookup_steamids[i] === "string") - message.failed_lookup_steamids[i] = parseInt(object.failed_lookup_steamids[i], 10); + message.failed_lookup_steamids[i] = $parseInt(object.failed_lookup_steamids[i], 10); else if (typeof object.failed_lookup_steamids[i] === "number") message.failed_lookup_steamids[i] = object.failed_lookup_steamids[i]; else if (typeof object.failed_lookup_steamids[i] === "object") - message.failed_lookup_steamids[i] = new $util.LongBits(object.failed_lookup_steamids[i].low >>> 0, object.failed_lookup_steamids[i].high >>> 0).toNumber(); + message.failed_lookup_steamids[i] = new $util.LongBits(object.failed_lookup_steamids[i].low >>> 0, object.failed_lookup_steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -21694,26 +28192,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPersonaNames_Response.toObject = function toObject(message, options) { + CMsgGCGetPersonaNames_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.succeeded_lookups = []; object.failed_lookup_steamids = []; } if (message.succeeded_lookups && message.succeeded_lookups.length) { - object.succeeded_lookups = []; + object.succeeded_lookups = $Array(message.succeeded_lookups.length); for (var j = 0; j < message.succeeded_lookups.length; ++j) - object.succeeded_lookups[j] = $root.CMsgGCGetPersonaNames_Response.PersonaName.toObject(message.succeeded_lookups[j], options); + object.succeeded_lookups[j] = $root.CMsgGCGetPersonaNames_Response.PersonaName.toObject(message.succeeded_lookups[j], options, _depth + 1); } if (message.failed_lookup_steamids && message.failed_lookup_steamids.length) { - object.failed_lookup_steamids = []; + object.failed_lookup_steamids = $Array(message.failed_lookup_steamids.length); for (var j = 0; j < message.failed_lookup_steamids.length; ++j) - if (typeof message.failed_lookup_steamids[j] === "number") - object.failed_lookup_steamids[j] = options.longs === String ? String(message.failed_lookup_steamids[j]) : message.failed_lookup_steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.failed_lookup_steamids[j] = typeof message.failed_lookup_steamids[j] === "number" ? $BigInt(message.failed_lookup_steamids[j]) : $util.Long.fromBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.failed_lookup_steamids[j] === "number") + object.failed_lookup_steamids[j] = options.longs === $String ? $String(message.failed_lookup_steamids[j]) : message.failed_lookup_steamids[j]; else - object.failed_lookup_steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.failed_lookup_steamids[j]) : options.longs === Number ? new $util.LongBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0).toNumber() : message.failed_lookup_steamids[j]; + object.failed_lookup_steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.failed_lookup_steamids[j]) : options.longs === $Number ? new $util.LongBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0).toNumber(true) : message.failed_lookup_steamids[j]; } return object; }; @@ -21725,34 +28229,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPersonaNames_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPersonaNames_Response.prototype.toJSON = function() { + return CMsgGCGetPersonaNames_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPersonaNames_Response + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPersonaNames_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames_Response"; }; CMsgGCGetPersonaNames_Response.PersonaName = (function() { /** * Properties of a PersonaName. - * @memberof CMsgGCGetPersonaNames_Response - * @interface IPersonaName + * @typedef {Object} CMsgGCGetPersonaNames_Response.PersonaName.$Properties * @property {number|Long|null} [steamid] PersonaName steamid * @property {string|null} [persona_name] PersonaName persona_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PersonaName. + * @memberof CMsgGCGetPersonaNames_Response + * @interface IPersonaName + * @augments CMsgGCGetPersonaNames_Response.PersonaName.$Properties + * @deprecated Use CMsgGCGetPersonaNames_Response.PersonaName.$Properties instead. + */ + + /** + * Shape of a PersonaName. + * @typedef {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} CMsgGCGetPersonaNames_Response.PersonaName.$Shape */ /** * Constructs a new PersonaName. * @memberof CMsgGCGetPersonaNames_Response * @classdesc Represents a PersonaName. - * @implements IPersonaName * @constructor - * @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PersonaName(properties) { + var PersonaName = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PersonaName steamid. @@ -21760,7 +28291,7 @@ * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @instance */ - PersonaName.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PersonaName.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * PersonaName persona_name. @@ -21775,10 +28306,14 @@ * @function create * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName instance + * @type {{ + * (properties: CMsgGCGetPersonaNames_Response.PersonaName.$Shape): CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape; + * (properties?: CMsgGCGetPersonaNames_Response.PersonaName.$Properties): CMsgGCGetPersonaNames_Response.PersonaName; + * }} */ - PersonaName.create = function create(properties) { + PersonaName.create = function(properties) { return new PersonaName(properties); }; @@ -21787,17 +28322,24 @@ * @function encode * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName} message PersonaName message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} message PersonaName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaName.encode = function encode(message, writer) { + PersonaName.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.persona_name != null && Object.hasOwnProperty.call(message, "persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.persona_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21806,12 +28348,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName} message PersonaName message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} message PersonaName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PersonaName.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21821,28 +28363,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName + * @returns {CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape} PersonaName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaName.decode = function decode(reader, length) { + PersonaName.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames_Response.PersonaName(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames_Response.PersonaName(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.persona_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.persona_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21852,11 +28414,11 @@ * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName + * @returns {CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape} PersonaName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaName.decodeDelimited = function decodeDelimited(reader) { + PersonaName.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21870,13 +28432,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PersonaName.verify = function verify(message) { + PersonaName.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) if (!$util.isString(message.persona_name)) return "persona_name: string expected"; return null; @@ -21890,21 +28456,27 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName */ - PersonaName.fromObject = function fromObject(object) { + PersonaName.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames_Response.PersonaName) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.PersonaName: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames_Response.PersonaName(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.persona_name != null) - message.persona_name = String(object.persona_name); + message.persona_name = $String(object.persona_name); return message; }; @@ -21917,24 +28489,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PersonaName.toObject = function toObject(message, options) { + PersonaName.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.persona_name = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) object.persona_name = message.persona_name; return object; }; @@ -21946,8 +28524,22 @@ * @instance * @returns {Object.} JSON object */ - PersonaName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PersonaName.prototype.toJSON = function() { + return PersonaName.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PersonaName + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames_Response.PersonaName + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PersonaName.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames_Response.PersonaName"; }; return PersonaName; @@ -21960,26 +28552,39 @@ /** * Properties of a CMsgGCCheckFriendship. - * @exports ICMsgGCCheckFriendship - * @interface ICMsgGCCheckFriendship + * @typedef {Object} CMsgGCCheckFriendship.$Properties * @property {number|Long|null} [steamid_left] CMsgGCCheckFriendship steamid_left * @property {number|Long|null} [steamid_right] CMsgGCCheckFriendship steamid_right + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckFriendship. + * @exports ICMsgGCCheckFriendship + * @interface ICMsgGCCheckFriendship + * @augments CMsgGCCheckFriendship.$Properties + * @deprecated Use CMsgGCCheckFriendship.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckFriendship. + * @typedef {CMsgGCCheckFriendship.$Properties} CMsgGCCheckFriendship.$Shape */ /** * Constructs a new CMsgGCCheckFriendship. * @exports CMsgGCCheckFriendship * @classdesc Represents a CMsgGCCheckFriendship. - * @implements ICMsgGCCheckFriendship * @constructor - * @param {ICMsgGCCheckFriendship=} [properties] Properties to set + * @param {CMsgGCCheckFriendship.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckFriendship(properties) { + var CMsgGCCheckFriendship = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckFriendship steamid_left. @@ -21987,7 +28592,7 @@ * @memberof CMsgGCCheckFriendship * @instance */ - CMsgGCCheckFriendship.prototype.steamid_left = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckFriendship.prototype.steamid_left = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCCheckFriendship steamid_right. @@ -21995,17 +28600,21 @@ * @memberof CMsgGCCheckFriendship * @instance */ - CMsgGCCheckFriendship.prototype.steamid_right = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckFriendship.prototype.steamid_right = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCCheckFriendship instance using the specified properties. * @function create * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship=} [properties] Properties to set + * @param {CMsgGCCheckFriendship.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship instance + * @type {{ + * (properties: CMsgGCCheckFriendship.$Shape): CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape; + * (properties?: CMsgGCCheckFriendship.$Properties): CMsgGCCheckFriendship; + * }} */ - CMsgGCCheckFriendship.create = function create(properties) { + CMsgGCCheckFriendship.create = function(properties) { return new CMsgGCCheckFriendship(properties); }; @@ -22014,17 +28623,24 @@ * @function encode * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship} message CMsgGCCheckFriendship message or plain object to encode + * @param {CMsgGCCheckFriendship.$Properties} message CMsgGCCheckFriendship message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship.encode = function encode(message, writer) { + CMsgGCCheckFriendship.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid_left != null && Object.hasOwnProperty.call(message, "steamid_left")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid_left); - if (message.steamid_right != null && Object.hasOwnProperty.call(message, "steamid_right")) + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.steamid_right); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22033,12 +28649,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship} message CMsgGCCheckFriendship message or plain object to encode + * @param {CMsgGCCheckFriendship.$Properties} message CMsgGCCheckFriendship message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckFriendship.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22048,28 +28664,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship + * @returns {CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape} CMsgGCCheckFriendship * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship.decode = function decode(reader, length) { + CMsgGCCheckFriendship.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckFriendship(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckFriendship(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid_left = reader.fixed64(); - break; - case 2: - message.steamid_right = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid_left = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.steamid_right = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22079,11 +28715,11 @@ * @memberof CMsgGCCheckFriendship * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship + * @returns {CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape} CMsgGCCheckFriendship * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckFriendship.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22097,13 +28733,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckFriendship.verify = function verify(message) { + CMsgGCCheckFriendship.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid_left != null && message.hasOwnProperty("steamid_left")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) if (!$util.isInteger(message.steamid_left) && !(message.steamid_left && $util.isInteger(message.steamid_left.low) && $util.isInteger(message.steamid_left.high))) return "steamid_left: integer|Long expected"; - if (message.steamid_right != null && message.hasOwnProperty("steamid_right")) + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) if (!$util.isInteger(message.steamid_right) && !(message.steamid_right && $util.isInteger(message.steamid_right.low) && $util.isInteger(message.steamid_right.high))) return "steamid_right: integer|Long expected"; return null; @@ -22117,28 +28757,34 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship */ - CMsgGCCheckFriendship.fromObject = function fromObject(object) { + CMsgGCCheckFriendship.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckFriendship) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckFriendship: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckFriendship(); if (object.steamid_left != null) if ($util.Long) - (message.steamid_left = $util.Long.fromValue(object.steamid_left)).unsigned = false; + message.steamid_left = $util.Long.fromValue(object.steamid_left, true); else if (typeof object.steamid_left === "string") - message.steamid_left = parseInt(object.steamid_left, 10); + message.steamid_left = $parseInt(object.steamid_left, 10); else if (typeof object.steamid_left === "number") message.steamid_left = object.steamid_left; else if (typeof object.steamid_left === "object") - message.steamid_left = new $util.LongBits(object.steamid_left.low >>> 0, object.steamid_left.high >>> 0).toNumber(); + message.steamid_left = new $util.LongBits(object.steamid_left.low >>> 0, object.steamid_left.high >>> 0).toNumber(true); if (object.steamid_right != null) if ($util.Long) - (message.steamid_right = $util.Long.fromValue(object.steamid_right)).unsigned = false; + message.steamid_right = $util.Long.fromValue(object.steamid_right, true); else if (typeof object.steamid_right === "string") - message.steamid_right = parseInt(object.steamid_right, 10); + message.steamid_right = $parseInt(object.steamid_right, 10); else if (typeof object.steamid_right === "number") message.steamid_right = object.steamid_right; else if (typeof object.steamid_right === "object") - message.steamid_right = new $util.LongBits(object.steamid_right.low >>> 0, object.steamid_right.high >>> 0).toNumber(); + message.steamid_right = new $util.LongBits(object.steamid_right.low >>> 0, object.steamid_right.high >>> 0).toNumber(true); return message; }; @@ -22151,32 +28797,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckFriendship.toObject = function toObject(message, options) { + CMsgGCCheckFriendship.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid_left = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid_left = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid_left = options.longs === String ? "0" : 0; + object.steamid_left = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid_right = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid_right = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid_right = options.longs === String ? "0" : 0; + object.steamid_right = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steamid_left != null && message.hasOwnProperty("steamid_left")) - if (typeof message.steamid_left === "number") - object.steamid_left = options.longs === String ? String(message.steamid_left) : message.steamid_left; + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid_left = typeof message.steamid_left === "number" ? $BigInt(message.steamid_left) : $util.Long.fromBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0, true).toBigInt(); + else if (typeof message.steamid_left === "number") + object.steamid_left = options.longs === $String ? $String(message.steamid_left) : message.steamid_left; else - object.steamid_left = options.longs === String ? $util.Long.prototype.toString.call(message.steamid_left) : options.longs === Number ? new $util.LongBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0).toNumber() : message.steamid_left; - if (message.steamid_right != null && message.hasOwnProperty("steamid_right")) - if (typeof message.steamid_right === "number") - object.steamid_right = options.longs === String ? String(message.steamid_right) : message.steamid_right; + object.steamid_left = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid_left) : options.longs === $Number ? new $util.LongBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0).toNumber(true) : message.steamid_left; + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid_right = typeof message.steamid_right === "number" ? $BigInt(message.steamid_right) : $util.Long.fromBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0, true).toBigInt(); + else if (typeof message.steamid_right === "number") + object.steamid_right = options.longs === $String ? $String(message.steamid_right) : message.steamid_right; else - object.steamid_right = options.longs === String ? $util.Long.prototype.toString.call(message.steamid_right) : options.longs === Number ? new $util.LongBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0).toNumber() : message.steamid_right; + object.steamid_right = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid_right) : options.longs === $Number ? new $util.LongBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0).toNumber(true) : message.steamid_right; return object; }; @@ -22187,8 +28841,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckFriendship.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckFriendship.prototype.toJSON = function() { + return CMsgGCCheckFriendship.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckFriendship + * @function getTypeUrl + * @memberof CMsgGCCheckFriendship + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckFriendship.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckFriendship"; }; return CMsgGCCheckFriendship; @@ -22198,26 +28866,39 @@ /** * Properties of a CMsgGCCheckFriendship_Response. - * @exports ICMsgGCCheckFriendship_Response - * @interface ICMsgGCCheckFriendship_Response + * @typedef {Object} CMsgGCCheckFriendship_Response.$Properties * @property {boolean|null} [success] CMsgGCCheckFriendship_Response success * @property {boolean|null} [found_friendship] CMsgGCCheckFriendship_Response found_friendship + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckFriendship_Response. + * @exports ICMsgGCCheckFriendship_Response + * @interface ICMsgGCCheckFriendship_Response + * @augments CMsgGCCheckFriendship_Response.$Properties + * @deprecated Use CMsgGCCheckFriendship_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckFriendship_Response. + * @typedef {CMsgGCCheckFriendship_Response.$Properties} CMsgGCCheckFriendship_Response.$Shape */ /** * Constructs a new CMsgGCCheckFriendship_Response. * @exports CMsgGCCheckFriendship_Response * @classdesc Represents a CMsgGCCheckFriendship_Response. - * @implements ICMsgGCCheckFriendship_Response * @constructor - * @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set + * @param {CMsgGCCheckFriendship_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckFriendship_Response(properties) { + var CMsgGCCheckFriendship_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckFriendship_Response success. @@ -22240,10 +28921,14 @@ * @function create * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set + * @param {CMsgGCCheckFriendship_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response instance + * @type {{ + * (properties: CMsgGCCheckFriendship_Response.$Shape): CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape; + * (properties?: CMsgGCCheckFriendship_Response.$Properties): CMsgGCCheckFriendship_Response; + * }} */ - CMsgGCCheckFriendship_Response.create = function create(properties) { + CMsgGCCheckFriendship_Response.create = function(properties) { return new CMsgGCCheckFriendship_Response(properties); }; @@ -22252,17 +28937,24 @@ * @function encode * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response} message CMsgGCCheckFriendship_Response message or plain object to encode + * @param {CMsgGCCheckFriendship_Response.$Properties} message CMsgGCCheckFriendship_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship_Response.encode = function encode(message, writer) { + CMsgGCCheckFriendship_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.success != null && Object.hasOwnProperty.call(message, "success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); - if (message.found_friendship != null && Object.hasOwnProperty.call(message, "found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.found_friendship); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22271,12 +28963,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response} message CMsgGCCheckFriendship_Response message or plain object to encode + * @param {CMsgGCCheckFriendship_Response.$Properties} message CMsgGCCheckFriendship_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckFriendship_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22286,28 +28978,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response + * @returns {CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape} CMsgGCCheckFriendship_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship_Response.decode = function decode(reader, length) { + CMsgGCCheckFriendship_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckFriendship_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckFriendship_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - case 2: - message.found_friendship = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.success = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.found_friendship = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22317,11 +29029,11 @@ * @memberof CMsgGCCheckFriendship_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response + * @returns {CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape} CMsgGCCheckFriendship_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckFriendship_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22335,13 +29047,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckFriendship_Response.verify = function verify(message) { + CMsgGCCheckFriendship_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.success != null && message.hasOwnProperty("success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.found_friendship != null && message.hasOwnProperty("found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) if (typeof message.found_friendship !== "boolean") return "found_friendship: boolean expected"; return null; @@ -22355,14 +29071,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response */ - CMsgGCCheckFriendship_Response.fromObject = function fromObject(object) { + CMsgGCCheckFriendship_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckFriendship_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckFriendship_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckFriendship_Response(); if (object.success != null) - message.success = Boolean(object.success); + message.success = $Boolean(object.success); if (object.found_friendship != null) - message.found_friendship = Boolean(object.found_friendship); + message.found_friendship = $Boolean(object.found_friendship); return message; }; @@ -22375,17 +29097,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckFriendship_Response.toObject = function toObject(message, options) { + CMsgGCCheckFriendship_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.success = false; object.found_friendship = false; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.found_friendship != null && message.hasOwnProperty("found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) object.found_friendship = message.found_friendship; return object; }; @@ -22397,8 +29123,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckFriendship_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckFriendship_Response.prototype.toJSON = function() { + return CMsgGCCheckFriendship_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckFriendship_Response + * @function getTypeUrl + * @memberof CMsgGCCheckFriendship_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckFriendship_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckFriendship_Response"; }; return CMsgGCCheckFriendship_Response; @@ -22406,29 +29146,42 @@ $root.CMsgGCMsgMasterSetDirectory = (function() { + /** + * Properties of a CMsgGCMsgMasterSetDirectory. + * @typedef {Object} CMsgGCMsgMasterSetDirectory.$Properties + * @property {number|null} [master_dir_index] CMsgGCMsgMasterSetDirectory master_dir_index + * @property {Array.|null} [dir] CMsgGCMsgMasterSetDirectory dir + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetDirectory. * @exports ICMsgGCMsgMasterSetDirectory * @interface ICMsgGCMsgMasterSetDirectory - * @property {number|null} [master_dir_index] CMsgGCMsgMasterSetDirectory master_dir_index - * @property {Array.|null} [dir] CMsgGCMsgMasterSetDirectory dir + * @augments CMsgGCMsgMasterSetDirectory.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetDirectory. + * @typedef {CMsgGCMsgMasterSetDirectory.$Properties} CMsgGCMsgMasterSetDirectory.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetDirectory. * @exports CMsgGCMsgMasterSetDirectory * @classdesc Represents a CMsgGCMsgMasterSetDirectory. - * @implements ICMsgGCMsgMasterSetDirectory * @constructor - * @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetDirectory(properties) { + var CMsgGCMsgMasterSetDirectory = function (properties) { this.dir = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetDirectory master_dir_index. @@ -22440,7 +29193,7 @@ /** * CMsgGCMsgMasterSetDirectory dir. - * @member {Array.} dir + * @member {Array.} dir * @memberof CMsgGCMsgMasterSetDirectory * @instance */ @@ -22451,10 +29204,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory.$Shape): CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory.$Properties): CMsgGCMsgMasterSetDirectory; + * }} */ - CMsgGCMsgMasterSetDirectory.create = function create(properties) { + CMsgGCMsgMasterSetDirectory.create = function(properties) { return new CMsgGCMsgMasterSetDirectory(properties); }; @@ -22463,18 +29220,25 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory} message CMsgGCMsgMasterSetDirectory message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.$Properties} message CMsgGCMsgMasterSetDirectory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory.encode = function encode(message, writer) { + CMsgGCMsgMasterSetDirectory.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.master_dir_index != null && Object.hasOwnProperty.call(message, "master_dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.master_dir_index); if (message.dir != null && message.dir.length) for (var i = 0; i < message.dir.length; ++i) - $root.CMsgGCMsgMasterSetDirectory.SubGC.encode(message.dir[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgGCMsgMasterSetDirectory.SubGC.encode(message.dir[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22483,12 +29247,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory} message CMsgGCMsgMasterSetDirectory message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.$Properties} message CMsgGCMsgMasterSetDirectory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetDirectory.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22498,30 +29262,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory + * @returns {CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape} CMsgGCMsgMasterSetDirectory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory.decode = function decode(reader, length) { + CMsgGCMsgMasterSetDirectory.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.master_dir_index = reader.uint32(); - break; - case 2: - if (!(message.dir && message.dir.length)) - message.dir = []; - message.dir.push($root.CMsgGCMsgMasterSetDirectory.SubGC.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.master_dir_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.dir && message.dir.length)) + message.dir = []; + message.dir.push($root.CMsgGCMsgMasterSetDirectory.SubGC.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22531,11 +29315,11 @@ * @memberof CMsgGCMsgMasterSetDirectory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory + * @returns {CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape} CMsgGCMsgMasterSetDirectory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetDirectory.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22549,17 +29333,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetDirectory.verify = function verify(message) { + CMsgGCMsgMasterSetDirectory.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.master_dir_index != null && message.hasOwnProperty("master_dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) if (!$util.isInteger(message.master_dir_index)) return "master_dir_index: integer expected"; - if (message.dir != null && message.hasOwnProperty("dir")) { - if (!Array.isArray(message.dir)) + if (message.dir != null && $Object.hasOwnProperty.call(message, "dir")) { + if (!$Array.isArray(message.dir)) return "dir: array expected"; for (var i = 0; i < message.dir.length; ++i) { - var error = $root.CMsgGCMsgMasterSetDirectory.SubGC.verify(message.dir[i]); + var error = $root.CMsgGCMsgMasterSetDirectory.SubGC.verify(message.dir[i], _depth + 1); if (error) return "dir." + error; } @@ -22575,20 +29363,26 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory */ - CMsgGCMsgMasterSetDirectory.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetDirectory.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory(); if (object.master_dir_index != null) message.master_dir_index = object.master_dir_index >>> 0; if (object.dir) { - if (!Array.isArray(object.dir)) - throw TypeError(".CMsgGCMsgMasterSetDirectory.dir: array expected"); - message.dir = []; + if (!$Array.isArray(object.dir)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.dir: array expected"); + message.dir = $Array(object.dir.length); for (var i = 0; i < object.dir.length; ++i) { - if (typeof object.dir[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetDirectory.dir: object expected"); - message.dir[i] = $root.CMsgGCMsgMasterSetDirectory.SubGC.fromObject(object.dir[i]); + if (!$util.isObject(object.dir[i])) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.dir: object expected"); + message.dir[i] = $root.CMsgGCMsgMasterSetDirectory.SubGC.fromObject(object.dir[i], _depth + 1); } } return message; @@ -22603,20 +29397,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetDirectory.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetDirectory.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.dir = []; if (options.defaults) object.master_dir_index = 0; - if (message.master_dir_index != null && message.hasOwnProperty("master_dir_index")) + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) object.master_dir_index = message.master_dir_index; if (message.dir && message.dir.length) { - object.dir = []; + object.dir = $Array(message.dir.length); for (var j = 0; j < message.dir.length; ++j) - object.dir[j] = $root.CMsgGCMsgMasterSetDirectory.SubGC.toObject(message.dir[j], options); + object.dir[j] = $root.CMsgGCMsgMasterSetDirectory.SubGC.toObject(message.dir[j], options, _depth + 1); } return object; }; @@ -22628,37 +29426,64 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetDirectory.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetDirectory.prototype.toJSON = function() { + return CMsgGCMsgMasterSetDirectory.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetDirectory + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetDirectory.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory"; }; CMsgGCMsgMasterSetDirectory.SubGC = (function() { /** * Properties of a SubGC. - * @memberof CMsgGCMsgMasterSetDirectory - * @interface ISubGC + * @typedef {Object} CMsgGCMsgMasterSetDirectory.SubGC.$Properties * @property {number|null} [dir_index] SubGC dir_index * @property {string|null} [name] SubGC name * @property {string|null} [box] SubGC box * @property {string|null} [command_line] SubGC command_line * @property {string|null} [gc_binary] SubGC gc_binary + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SubGC. + * @memberof CMsgGCMsgMasterSetDirectory + * @interface ISubGC + * @augments CMsgGCMsgMasterSetDirectory.SubGC.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory.SubGC.$Properties instead. + */ + + /** + * Shape of a SubGC. + * @typedef {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} CMsgGCMsgMasterSetDirectory.SubGC.$Shape */ /** * Constructs a new SubGC. * @memberof CMsgGCMsgMasterSetDirectory * @classdesc Represents a SubGC. - * @implements ISubGC * @constructor - * @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SubGC(properties) { + var SubGC = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SubGC dir_index. @@ -22705,10 +29530,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory.SubGC.$Shape): CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory.SubGC.$Properties): CMsgGCMsgMasterSetDirectory.SubGC; + * }} */ - SubGC.create = function create(properties) { + SubGC.create = function(properties) { return new SubGC(properties); }; @@ -22717,23 +29546,30 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC} message SubGC message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} message SubGC message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubGC.encode = function encode(message, writer) { + SubGC.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.box != null && Object.hasOwnProperty.call(message, "box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.box); - if (message.command_line != null && Object.hasOwnProperty.call(message, "command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.command_line); - if (message.gc_binary != null && Object.hasOwnProperty.call(message, "gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.gc_binary); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22742,12 +29578,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC} message SubGC message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} message SubGC message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubGC.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SubGC.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22757,37 +29593,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC + * @returns {CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape} SubGC * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubGC.decode = function decode(reader, length) { + SubGC.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory.SubGC(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory.SubGC(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.box = reader.string(); - break; - case 4: - message.command_line = reader.string(); - break; - case 5: - message.gc_binary = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.box = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.command_line = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.gc_binary = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22797,11 +29662,11 @@ * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC + * @returns {CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape} SubGC * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubGC.decodeDelimited = function decodeDelimited(reader) { + SubGC.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22815,22 +29680,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SubGC.verify = function verify(message) { + SubGC.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.box != null && message.hasOwnProperty("box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) if (!$util.isString(message.box)) return "box: string expected"; - if (message.command_line != null && message.hasOwnProperty("command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) if (!$util.isString(message.command_line)) return "command_line: string expected"; - if (message.gc_binary != null && message.hasOwnProperty("gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) if (!$util.isString(message.gc_binary)) return "gc_binary: string expected"; return null; @@ -22844,20 +29713,26 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC */ - SubGC.fromObject = function fromObject(object) { + SubGC.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory.SubGC) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.SubGC: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory.SubGC(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.box != null) - message.box = String(object.box); + message.box = $String(object.box); if (object.command_line != null) - message.command_line = String(object.command_line); + message.command_line = $String(object.command_line); if (object.gc_binary != null) - message.gc_binary = String(object.gc_binary); + message.gc_binary = $String(object.gc_binary); return message; }; @@ -22870,9 +29745,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SubGC.toObject = function toObject(message, options) { + SubGC.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.dir_index = 0; @@ -22881,15 +29760,15 @@ object.command_line = ""; object.gc_binary = ""; } - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.box != null && message.hasOwnProperty("box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) object.box = message.box; - if (message.command_line != null && message.hasOwnProperty("command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) object.command_line = message.command_line; - if (message.gc_binary != null && message.hasOwnProperty("gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) object.gc_binary = message.gc_binary; return object; }; @@ -22901,8 +29780,22 @@ * @instance * @returns {Object.} JSON object */ - SubGC.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SubGC.prototype.toJSON = function() { + return SubGC.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SubGC + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory.SubGC + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SubGC.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory.SubGC"; }; return SubGC; @@ -22913,27 +29806,40 @@ $root.CMsgGCMsgMasterSetDirectory_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetDirectory_Response. + * @typedef {Object} CMsgGCMsgMasterSetDirectory_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetDirectory_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetDirectory_Response. * @exports ICMsgGCMsgMasterSetDirectory_Response * @interface ICMsgGCMsgMasterSetDirectory_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetDirectory_Response eresult + * @augments CMsgGCMsgMasterSetDirectory_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetDirectory_Response. + * @typedef {CMsgGCMsgMasterSetDirectory_Response.$Properties} CMsgGCMsgMasterSetDirectory_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetDirectory_Response. * @exports CMsgGCMsgMasterSetDirectory_Response * @classdesc Represents a CMsgGCMsgMasterSetDirectory_Response. - * @implements ICMsgGCMsgMasterSetDirectory_Response * @constructor - * @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetDirectory_Response(properties) { + var CMsgGCMsgMasterSetDirectory_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetDirectory_Response eresult. @@ -22948,10 +29854,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory_Response.$Shape): CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory_Response.$Properties): CMsgGCMsgMasterSetDirectory_Response; + * }} */ - CMsgGCMsgMasterSetDirectory_Response.create = function create(properties) { + CMsgGCMsgMasterSetDirectory_Response.create = function(properties) { return new CMsgGCMsgMasterSetDirectory_Response(properties); }; @@ -22960,15 +29870,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetDirectory_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22977,12 +29894,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetDirectory_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22992,25 +29909,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response + * @returns {CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape} CMsgGCMsgMasterSetDirectory_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetDirectory_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23020,11 +29954,11 @@ * @memberof CMsgGCMsgMasterSetDirectory_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response + * @returns {CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape} CMsgGCMsgMasterSetDirectory_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetDirectory_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23038,10 +29972,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetDirectory_Response.verify = function verify(message) { + CMsgGCMsgMasterSetDirectory_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -23055,9 +29993,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response */ - CMsgGCMsgMasterSetDirectory_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetDirectory_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -23073,13 +30017,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetDirectory_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetDirectory_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -23091,8 +30039,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetDirectory_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetDirectory_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetDirectory_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetDirectory_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetDirectory_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory_Response"; }; return CMsgGCMsgMasterSetDirectory_Response; @@ -23100,27 +30062,40 @@ $root.CMsgGCMsgWebAPIJobRequestForwardResponse = (function() { + /** + * Properties of a CMsgGCMsgWebAPIJobRequestForwardResponse. + * @typedef {Object} CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties + * @property {number|null} [dir_index] CMsgGCMsgWebAPIJobRequestForwardResponse dir_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgWebAPIJobRequestForwardResponse. * @exports ICMsgGCMsgWebAPIJobRequestForwardResponse * @interface ICMsgGCMsgWebAPIJobRequestForwardResponse - * @property {number|null} [dir_index] CMsgGCMsgWebAPIJobRequestForwardResponse dir_index + * @augments CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties + * @deprecated Use CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgWebAPIJobRequestForwardResponse. + * @typedef {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape */ /** * Constructs a new CMsgGCMsgWebAPIJobRequestForwardResponse. * @exports CMsgGCMsgWebAPIJobRequestForwardResponse * @classdesc Represents a CMsgGCMsgWebAPIJobRequestForwardResponse. - * @implements ICMsgGCMsgWebAPIJobRequestForwardResponse * @constructor - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgWebAPIJobRequestForwardResponse(properties) { + var CMsgGCMsgWebAPIJobRequestForwardResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgWebAPIJobRequestForwardResponse dir_index. @@ -23135,10 +30110,14 @@ * @function create * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse instance + * @type {{ + * (properties: CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape): CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape; + * (properties?: CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties): CMsgGCMsgWebAPIJobRequestForwardResponse; + * }} */ - CMsgGCMsgWebAPIJobRequestForwardResponse.create = function create(properties) { + CMsgGCMsgWebAPIJobRequestForwardResponse.create = function(properties) { return new CMsgGCMsgWebAPIJobRequestForwardResponse(properties); }; @@ -23147,15 +30126,22 @@ * @function encode * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgWebAPIJobRequestForwardResponse.encode = function encode(message, writer) { + CMsgGCMsgWebAPIJobRequestForwardResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23164,12 +30150,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgWebAPIJobRequestForwardResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgWebAPIJobRequestForwardResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23179,25 +30165,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse + * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape} CMsgGCMsgWebAPIJobRequestForwardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgWebAPIJobRequestForwardResponse.decode = function decode(reader, length) { + CMsgGCMsgWebAPIJobRequestForwardResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23207,11 +30210,11 @@ * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse + * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape} CMsgGCMsgWebAPIJobRequestForwardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgWebAPIJobRequestForwardResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgWebAPIJobRequestForwardResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23225,10 +30228,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgWebAPIJobRequestForwardResponse.verify = function verify(message) { + CMsgGCMsgWebAPIJobRequestForwardResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; return null; @@ -23242,9 +30249,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse */ - CMsgGCMsgWebAPIJobRequestForwardResponse.fromObject = function fromObject(object) { + CMsgGCMsgWebAPIJobRequestForwardResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgWebAPIJobRequestForwardResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgWebAPIJobRequestForwardResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; @@ -23260,13 +30273,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgWebAPIJobRequestForwardResponse.toObject = function toObject(message, options) { + CMsgGCMsgWebAPIJobRequestForwardResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.dir_index = 0; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; return object; }; @@ -23278,8 +30295,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.toJSON = function() { + return CMsgGCMsgWebAPIJobRequestForwardResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgWebAPIJobRequestForwardResponse + * @function getTypeUrl + * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgWebAPIJobRequestForwardResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgWebAPIJobRequestForwardResponse"; }; return CMsgGCMsgWebAPIJobRequestForwardResponse; @@ -23287,27 +30318,40 @@ $root.CGCSystemMsg_GetPurchaseTrust_Request = (function() { + /** + * Properties of a CGCSystemMsg_GetPurchaseTrust_Request. + * @typedef {Object} CGCSystemMsg_GetPurchaseTrust_Request.$Properties + * @property {number|Long|null} [steamid] CGCSystemMsg_GetPurchaseTrust_Request steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCSystemMsg_GetPurchaseTrust_Request. * @exports ICGCSystemMsg_GetPurchaseTrust_Request * @interface ICGCSystemMsg_GetPurchaseTrust_Request - * @property {number|Long|null} [steamid] CGCSystemMsg_GetPurchaseTrust_Request steamid + * @augments CGCSystemMsg_GetPurchaseTrust_Request.$Properties + * @deprecated Use CGCSystemMsg_GetPurchaseTrust_Request.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetPurchaseTrust_Request. + * @typedef {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} CGCSystemMsg_GetPurchaseTrust_Request.$Shape */ /** * Constructs a new CGCSystemMsg_GetPurchaseTrust_Request. * @exports CGCSystemMsg_GetPurchaseTrust_Request * @classdesc Represents a CGCSystemMsg_GetPurchaseTrust_Request. - * @implements ICGCSystemMsg_GetPurchaseTrust_Request * @constructor - * @param {ICGCSystemMsg_GetPurchaseTrust_Request=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetPurchaseTrust_Request(properties) { + var CGCSystemMsg_GetPurchaseTrust_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetPurchaseTrust_Request steamid. @@ -23315,17 +30359,21 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @instance */ - CGCSystemMsg_GetPurchaseTrust_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCSystemMsg_GetPurchaseTrust_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CGCSystemMsg_GetPurchaseTrust_Request instance using the specified properties. * @function create * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request instance + * @type {{ + * (properties: CGCSystemMsg_GetPurchaseTrust_Request.$Shape): CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape; + * (properties?: CGCSystemMsg_GetPurchaseTrust_Request.$Properties): CGCSystemMsg_GetPurchaseTrust_Request; + * }} */ - CGCSystemMsg_GetPurchaseTrust_Request.create = function create(properties) { + CGCSystemMsg_GetPurchaseTrust_Request.create = function(properties) { return new CGCSystemMsg_GetPurchaseTrust_Request(properties); }; @@ -23334,15 +30382,22 @@ * @function encode * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Request.encode = function encode(message, writer) { + CGCSystemMsg_GetPurchaseTrust_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23351,12 +30406,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetPurchaseTrust_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23366,25 +30421,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request + * @returns {CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape} CGCSystemMsg_GetPurchaseTrust_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Request.decode = function decode(reader, length) { + CGCSystemMsg_GetPurchaseTrust_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetPurchaseTrust_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetPurchaseTrust_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23394,11 +30466,11 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request + * @returns {CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape} CGCSystemMsg_GetPurchaseTrust_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Request.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetPurchaseTrust_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23412,10 +30484,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetPurchaseTrust_Request.verify = function verify(message) { + CGCSystemMsg_GetPurchaseTrust_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -23429,19 +30505,25 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request */ - CGCSystemMsg_GetPurchaseTrust_Request.fromObject = function fromObject(object) { + CGCSystemMsg_GetPurchaseTrust_Request.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetPurchaseTrust_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetPurchaseTrust_Request(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -23454,21 +30536,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetPurchaseTrust_Request.toObject = function toObject(message, options) { + CGCSystemMsg_GetPurchaseTrust_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -23479,8 +30567,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetPurchaseTrust_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetPurchaseTrust_Request.prototype.toJSON = function() { + return CGCSystemMsg_GetPurchaseTrust_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetPurchaseTrust_Request + * @function getTypeUrl + * @memberof CGCSystemMsg_GetPurchaseTrust_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetPurchaseTrust_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetPurchaseTrust_Request"; }; return CGCSystemMsg_GetPurchaseTrust_Request; @@ -23490,28 +30592,41 @@ /** * Properties of a CGCSystemMsg_GetPurchaseTrust_Response. - * @exports ICGCSystemMsg_GetPurchaseTrust_Response - * @interface ICGCSystemMsg_GetPurchaseTrust_Response + * @typedef {Object} CGCSystemMsg_GetPurchaseTrust_Response.$Properties * @property {boolean|null} [has_prior_purchase_history] CGCSystemMsg_GetPurchaseTrust_Response has_prior_purchase_history * @property {boolean|null} [has_no_recent_password_resets] CGCSystemMsg_GetPurchaseTrust_Response has_no_recent_password_resets * @property {boolean|null} [is_wallet_cash_trusted] CGCSystemMsg_GetPurchaseTrust_Response is_wallet_cash_trusted * @property {number|null} [time_all_trusted] CGCSystemMsg_GetPurchaseTrust_Response time_all_trusted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetPurchaseTrust_Response. + * @exports ICGCSystemMsg_GetPurchaseTrust_Response + * @interface ICGCSystemMsg_GetPurchaseTrust_Response + * @augments CGCSystemMsg_GetPurchaseTrust_Response.$Properties + * @deprecated Use CGCSystemMsg_GetPurchaseTrust_Response.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetPurchaseTrust_Response. + * @typedef {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} CGCSystemMsg_GetPurchaseTrust_Response.$Shape */ /** * Constructs a new CGCSystemMsg_GetPurchaseTrust_Response. * @exports CGCSystemMsg_GetPurchaseTrust_Response * @classdesc Represents a CGCSystemMsg_GetPurchaseTrust_Response. - * @implements ICGCSystemMsg_GetPurchaseTrust_Response * @constructor - * @param {ICGCSystemMsg_GetPurchaseTrust_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetPurchaseTrust_Response(properties) { + var CGCSystemMsg_GetPurchaseTrust_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetPurchaseTrust_Response has_prior_purchase_history. @@ -23550,10 +30665,14 @@ * @function create * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response instance + * @type {{ + * (properties: CGCSystemMsg_GetPurchaseTrust_Response.$Shape): CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape; + * (properties?: CGCSystemMsg_GetPurchaseTrust_Response.$Properties): CGCSystemMsg_GetPurchaseTrust_Response; + * }} */ - CGCSystemMsg_GetPurchaseTrust_Response.create = function create(properties) { + CGCSystemMsg_GetPurchaseTrust_Response.create = function(properties) { return new CGCSystemMsg_GetPurchaseTrust_Response(properties); }; @@ -23562,21 +30681,28 @@ * @function encode * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Response.encode = function encode(message, writer) { + CGCSystemMsg_GetPurchaseTrust_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.has_prior_purchase_history != null && Object.hasOwnProperty.call(message, "has_prior_purchase_history")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.has_prior_purchase_history); - if (message.has_no_recent_password_resets != null && Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.has_no_recent_password_resets); - if (message.is_wallet_cash_trusted != null && Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_wallet_cash_trusted); - if (message.time_all_trusted != null && Object.hasOwnProperty.call(message, "time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time_all_trusted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23585,12 +30711,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetPurchaseTrust_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23600,34 +30726,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response + * @returns {CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape} CGCSystemMsg_GetPurchaseTrust_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Response.decode = function decode(reader, length) { + CGCSystemMsg_GetPurchaseTrust_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetPurchaseTrust_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetPurchaseTrust_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.has_prior_purchase_history = reader.bool(); - break; - case 2: - message.has_no_recent_password_resets = reader.bool(); - break; - case 3: - message.is_wallet_cash_trusted = reader.bool(); - break; - case 4: - message.time_all_trusted = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.has_prior_purchase_history = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.has_no_recent_password_resets = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_wallet_cash_trusted = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.time_all_trusted = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23637,11 +30789,11 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response + * @returns {CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape} CGCSystemMsg_GetPurchaseTrust_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Response.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetPurchaseTrust_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23655,19 +30807,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetPurchaseTrust_Response.verify = function verify(message) { + CGCSystemMsg_GetPurchaseTrust_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.has_prior_purchase_history != null && message.hasOwnProperty("has_prior_purchase_history")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) if (typeof message.has_prior_purchase_history !== "boolean") return "has_prior_purchase_history: boolean expected"; - if (message.has_no_recent_password_resets != null && message.hasOwnProperty("has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) if (typeof message.has_no_recent_password_resets !== "boolean") return "has_no_recent_password_resets: boolean expected"; - if (message.is_wallet_cash_trusted != null && message.hasOwnProperty("is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) if (typeof message.is_wallet_cash_trusted !== "boolean") return "is_wallet_cash_trusted: boolean expected"; - if (message.time_all_trusted != null && message.hasOwnProperty("time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) if (!$util.isInteger(message.time_all_trusted)) return "time_all_trusted: integer expected"; return null; @@ -23681,16 +30837,22 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response */ - CGCSystemMsg_GetPurchaseTrust_Response.fromObject = function fromObject(object) { + CGCSystemMsg_GetPurchaseTrust_Response.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetPurchaseTrust_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetPurchaseTrust_Response(); if (object.has_prior_purchase_history != null) - message.has_prior_purchase_history = Boolean(object.has_prior_purchase_history); + message.has_prior_purchase_history = $Boolean(object.has_prior_purchase_history); if (object.has_no_recent_password_resets != null) - message.has_no_recent_password_resets = Boolean(object.has_no_recent_password_resets); + message.has_no_recent_password_resets = $Boolean(object.has_no_recent_password_resets); if (object.is_wallet_cash_trusted != null) - message.is_wallet_cash_trusted = Boolean(object.is_wallet_cash_trusted); + message.is_wallet_cash_trusted = $Boolean(object.is_wallet_cash_trusted); if (object.time_all_trusted != null) message.time_all_trusted = object.time_all_trusted >>> 0; return message; @@ -23705,9 +30867,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetPurchaseTrust_Response.toObject = function toObject(message, options) { + CGCSystemMsg_GetPurchaseTrust_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.has_prior_purchase_history = false; @@ -23715,13 +30881,13 @@ object.is_wallet_cash_trusted = false; object.time_all_trusted = 0; } - if (message.has_prior_purchase_history != null && message.hasOwnProperty("has_prior_purchase_history")) + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) object.has_prior_purchase_history = message.has_prior_purchase_history; - if (message.has_no_recent_password_resets != null && message.hasOwnProperty("has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) object.has_no_recent_password_resets = message.has_no_recent_password_resets; - if (message.is_wallet_cash_trusted != null && message.hasOwnProperty("is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) object.is_wallet_cash_trusted = message.is_wallet_cash_trusted; - if (message.time_all_trusted != null && message.hasOwnProperty("time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) object.time_all_trusted = message.time_all_trusted; return object; }; @@ -23733,8 +30899,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetPurchaseTrust_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetPurchaseTrust_Response.prototype.toJSON = function() { + return CGCSystemMsg_GetPurchaseTrust_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetPurchaseTrust_Response + * @function getTypeUrl + * @memberof CGCSystemMsg_GetPurchaseTrust_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetPurchaseTrust_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetPurchaseTrust_Response"; }; return CGCSystemMsg_GetPurchaseTrust_Response; @@ -23744,29 +30924,42 @@ /** * Properties of a CMsgGCHAccountVacStatusChange. - * @exports ICMsgGCHAccountVacStatusChange - * @interface ICMsgGCHAccountVacStatusChange + * @typedef {Object} CMsgGCHAccountVacStatusChange.$Properties * @property {number|Long|null} [steam_id] CMsgGCHAccountVacStatusChange steam_id * @property {number|null} [app_id] CMsgGCHAccountVacStatusChange app_id * @property {number|null} [rtime_vacban_starts] CMsgGCHAccountVacStatusChange rtime_vacban_starts * @property {boolean|null} [is_banned_now] CMsgGCHAccountVacStatusChange is_banned_now * @property {boolean|null} [is_banned_future] CMsgGCHAccountVacStatusChange is_banned_future + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountVacStatusChange. + * @exports ICMsgGCHAccountVacStatusChange + * @interface ICMsgGCHAccountVacStatusChange + * @augments CMsgGCHAccountVacStatusChange.$Properties + * @deprecated Use CMsgGCHAccountVacStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountVacStatusChange. + * @typedef {CMsgGCHAccountVacStatusChange.$Properties} CMsgGCHAccountVacStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountVacStatusChange. * @exports CMsgGCHAccountVacStatusChange * @classdesc Represents a CMsgGCHAccountVacStatusChange. - * @implements ICMsgGCHAccountVacStatusChange * @constructor - * @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountVacStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountVacStatusChange(properties) { + var CMsgGCHAccountVacStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountVacStatusChange steam_id. @@ -23774,7 +30967,7 @@ * @memberof CMsgGCHAccountVacStatusChange * @instance */ - CMsgGCHAccountVacStatusChange.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountVacStatusChange.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountVacStatusChange app_id. @@ -23813,10 +31006,14 @@ * @function create * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountVacStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountVacStatusChange.$Shape): CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape; + * (properties?: CMsgGCHAccountVacStatusChange.$Properties): CMsgGCHAccountVacStatusChange; + * }} */ - CMsgGCHAccountVacStatusChange.create = function create(properties) { + CMsgGCHAccountVacStatusChange.create = function(properties) { return new CMsgGCHAccountVacStatusChange(properties); }; @@ -23825,23 +31022,30 @@ * @function encode * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange} message CMsgGCHAccountVacStatusChange message or plain object to encode + * @param {CMsgGCHAccountVacStatusChange.$Properties} message CMsgGCHAccountVacStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountVacStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountVacStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id); - if (message.rtime_vacban_starts != null && Object.hasOwnProperty.call(message, "rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rtime_vacban_starts); - if (message.is_banned_now != null && Object.hasOwnProperty.call(message, "is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_banned_now); - if (message.is_banned_future != null && Object.hasOwnProperty.call(message, "is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_banned_future); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23850,12 +31054,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange} message CMsgGCHAccountVacStatusChange message or plain object to encode + * @param {CMsgGCHAccountVacStatusChange.$Properties} message CMsgGCHAccountVacStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountVacStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountVacStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23865,37 +31069,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange + * @returns {CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape} CMsgGCHAccountVacStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountVacStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountVacStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountVacStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountVacStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.app_id = reader.uint32(); - break; - case 3: - message.rtime_vacban_starts = reader.uint32(); - break; - case 4: - message.is_banned_now = reader.bool(); - break; - case 5: - message.is_banned_future = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.rtime_vacban_starts = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_banned_now = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_banned_future = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23905,11 +31138,11 @@ * @memberof CMsgGCHAccountVacStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange + * @returns {CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape} CMsgGCHAccountVacStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountVacStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountVacStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23923,22 +31156,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountVacStatusChange.verify = function verify(message) { + CMsgGCHAccountVacStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.rtime_vacban_starts != null && message.hasOwnProperty("rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) if (!$util.isInteger(message.rtime_vacban_starts)) return "rtime_vacban_starts: integer expected"; - if (message.is_banned_now != null && message.hasOwnProperty("is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) if (typeof message.is_banned_now !== "boolean") return "is_banned_now: boolean expected"; - if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) if (typeof message.is_banned_future !== "boolean") return "is_banned_future: boolean expected"; return null; @@ -23952,27 +31189,33 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange */ - CMsgGCHAccountVacStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountVacStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountVacStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountVacStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountVacStatusChange(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.rtime_vacban_starts != null) message.rtime_vacban_starts = object.rtime_vacban_starts >>> 0; if (object.is_banned_now != null) - message.is_banned_now = Boolean(object.is_banned_now); + message.is_banned_now = $Boolean(object.is_banned_now); if (object.is_banned_future != null) - message.is_banned_future = Boolean(object.is_banned_future); + message.is_banned_future = $Boolean(object.is_banned_future); return message; }; @@ -23985,33 +31228,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountVacStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountVacStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.app_id = 0; object.rtime_vacban_starts = 0; object.is_banned_now = false; object.is_banned_future = false; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.rtime_vacban_starts != null && message.hasOwnProperty("rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) object.rtime_vacban_starts = message.rtime_vacban_starts; - if (message.is_banned_now != null && message.hasOwnProperty("is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) object.is_banned_now = message.is_banned_now; - if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) object.is_banned_future = message.is_banned_future; return object; }; @@ -24023,8 +31272,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountVacStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountVacStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountVacStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountVacStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountVacStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountVacStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountVacStatusChange"; }; return CMsgGCHAccountVacStatusChange; @@ -24034,28 +31297,41 @@ /** * Properties of a CMsgGCHAccountTradeBanStatusChange. - * @exports ICMsgGCHAccountTradeBanStatusChange - * @interface ICMsgGCHAccountTradeBanStatusChange + * @typedef {Object} CMsgGCHAccountTradeBanStatusChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountTradeBanStatusChange steamid * @property {number|null} [appid] CMsgGCHAccountTradeBanStatusChange appid * @property {boolean|null} [is_banned] CMsgGCHAccountTradeBanStatusChange is_banned * @property {number|null} [time_banned_until] CMsgGCHAccountTradeBanStatusChange time_banned_until + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountTradeBanStatusChange. + * @exports ICMsgGCHAccountTradeBanStatusChange + * @interface ICMsgGCHAccountTradeBanStatusChange + * @augments CMsgGCHAccountTradeBanStatusChange.$Properties + * @deprecated Use CMsgGCHAccountTradeBanStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountTradeBanStatusChange. + * @typedef {CMsgGCHAccountTradeBanStatusChange.$Properties} CMsgGCHAccountTradeBanStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountTradeBanStatusChange. * @exports CMsgGCHAccountTradeBanStatusChange * @classdesc Represents a CMsgGCHAccountTradeBanStatusChange. - * @implements ICMsgGCHAccountTradeBanStatusChange * @constructor - * @param {ICMsgGCHAccountTradeBanStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountTradeBanStatusChange(properties) { + var CMsgGCHAccountTradeBanStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountTradeBanStatusChange steamid. @@ -24063,7 +31339,7 @@ * @memberof CMsgGCHAccountTradeBanStatusChange * @instance */ - CMsgGCHAccountTradeBanStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountTradeBanStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountTradeBanStatusChange appid. @@ -24094,10 +31370,14 @@ * @function create * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountTradeBanStatusChange.$Shape): CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape; + * (properties?: CMsgGCHAccountTradeBanStatusChange.$Properties): CMsgGCHAccountTradeBanStatusChange; + * }} */ - CMsgGCHAccountTradeBanStatusChange.create = function create(properties) { + CMsgGCHAccountTradeBanStatusChange.create = function(properties) { return new CMsgGCHAccountTradeBanStatusChange(properties); }; @@ -24106,21 +31386,28 @@ * @function encode * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTradeBanStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountTradeBanStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_banned != null && Object.hasOwnProperty.call(message, "is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_banned); - if (message.time_banned_until != null && Object.hasOwnProperty.call(message, "time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time_banned_until); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24129,12 +31416,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTradeBanStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountTradeBanStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24144,34 +31431,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange + * @returns {CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape} CMsgGCHAccountTradeBanStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTradeBanStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountTradeBanStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountTradeBanStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountTradeBanStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_banned = reader.bool(); - break; - case 4: - message.time_banned_until = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_banned = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.time_banned_until = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24181,11 +31494,11 @@ * @memberof CMsgGCHAccountTradeBanStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange + * @returns {CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape} CMsgGCHAccountTradeBanStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTradeBanStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountTradeBanStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24199,19 +31512,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountTradeBanStatusChange.verify = function verify(message) { + CMsgGCHAccountTradeBanStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_banned != null && message.hasOwnProperty("is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) if (typeof message.is_banned !== "boolean") return "is_banned: boolean expected"; - if (message.time_banned_until != null && message.hasOwnProperty("time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) if (!$util.isInteger(message.time_banned_until)) return "time_banned_until: integer expected"; return null; @@ -24225,23 +31542,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange */ - CMsgGCHAccountTradeBanStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountTradeBanStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountTradeBanStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountTradeBanStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountTradeBanStatusChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_banned != null) - message.is_banned = Boolean(object.is_banned); + message.is_banned = $Boolean(object.is_banned); if (object.time_banned_until != null) message.time_banned_until = object.time_banned_until >>> 0; return message; @@ -24256,30 +31579,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountTradeBanStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountTradeBanStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_banned = false; object.time_banned_until = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_banned != null && message.hasOwnProperty("is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) object.is_banned = message.is_banned; - if (message.time_banned_until != null && message.hasOwnProperty("time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) object.time_banned_until = message.time_banned_until; return object; }; @@ -24291,8 +31620,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountTradeBanStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountTradeBanStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountTradeBanStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountTradeBanStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountTradeBanStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountTradeBanStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountTradeBanStatusChange"; }; return CMsgGCHAccountTradeBanStatusChange; @@ -24302,27 +31645,40 @@ /** * Properties of a CMsgGCHAccountLockStatusChange. - * @exports ICMsgGCHAccountLockStatusChange - * @interface ICMsgGCHAccountLockStatusChange + * @typedef {Object} CMsgGCHAccountLockStatusChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountLockStatusChange steamid * @property {number|null} [appid] CMsgGCHAccountLockStatusChange appid * @property {boolean|null} [is_locked] CMsgGCHAccountLockStatusChange is_locked + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountLockStatusChange. + * @exports ICMsgGCHAccountLockStatusChange + * @interface ICMsgGCHAccountLockStatusChange + * @augments CMsgGCHAccountLockStatusChange.$Properties + * @deprecated Use CMsgGCHAccountLockStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountLockStatusChange. + * @typedef {CMsgGCHAccountLockStatusChange.$Properties} CMsgGCHAccountLockStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountLockStatusChange. * @exports CMsgGCHAccountLockStatusChange * @classdesc Represents a CMsgGCHAccountLockStatusChange. - * @implements ICMsgGCHAccountLockStatusChange * @constructor - * @param {ICMsgGCHAccountLockStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountLockStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountLockStatusChange(properties) { + var CMsgGCHAccountLockStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountLockStatusChange steamid. @@ -24330,7 +31686,7 @@ * @memberof CMsgGCHAccountLockStatusChange * @instance */ - CMsgGCHAccountLockStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountLockStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountLockStatusChange appid. @@ -24353,10 +31709,14 @@ * @function create * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountLockStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountLockStatusChange.$Shape): CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape; + * (properties?: CMsgGCHAccountLockStatusChange.$Properties): CMsgGCHAccountLockStatusChange; + * }} */ - CMsgGCHAccountLockStatusChange.create = function create(properties) { + CMsgGCHAccountLockStatusChange.create = function(properties) { return new CMsgGCHAccountLockStatusChange(properties); }; @@ -24365,19 +31725,26 @@ * @function encode * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange} message CMsgGCHAccountLockStatusChange message or plain object to encode + * @param {CMsgGCHAccountLockStatusChange.$Properties} message CMsgGCHAccountLockStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountLockStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountLockStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_locked != null && Object.hasOwnProperty.call(message, "is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_locked); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24386,12 +31753,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange} message CMsgGCHAccountLockStatusChange message or plain object to encode + * @param {CMsgGCHAccountLockStatusChange.$Properties} message CMsgGCHAccountLockStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountLockStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountLockStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24401,31 +31768,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange + * @returns {CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape} CMsgGCHAccountLockStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountLockStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountLockStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountLockStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountLockStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_locked = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_locked = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24435,11 +31825,11 @@ * @memberof CMsgGCHAccountLockStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange + * @returns {CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape} CMsgGCHAccountLockStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountLockStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountLockStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24453,16 +31843,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountLockStatusChange.verify = function verify(message) { + CMsgGCHAccountLockStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_locked != null && message.hasOwnProperty("is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) if (typeof message.is_locked !== "boolean") return "is_locked: boolean expected"; return null; @@ -24476,23 +31870,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange */ - CMsgGCHAccountLockStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountLockStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountLockStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountLockStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountLockStatusChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_locked != null) - message.is_locked = Boolean(object.is_locked); + message.is_locked = $Boolean(object.is_locked); return message; }; @@ -24505,27 +31905,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountLockStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountLockStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_locked = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_locked != null && message.hasOwnProperty("is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) object.is_locked = message.is_locked; return object; }; @@ -24537,8 +31943,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountLockStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountLockStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountLockStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountLockStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountLockStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountLockStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountLockStatusChange"; }; return CMsgGCHAccountLockStatusChange; @@ -24548,27 +31968,40 @@ /** * Properties of a CMsgGCHVacVerificationChange. - * @exports ICMsgGCHVacVerificationChange - * @interface ICMsgGCHVacVerificationChange + * @typedef {Object} CMsgGCHVacVerificationChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHVacVerificationChange steamid * @property {number|null} [appid] CMsgGCHVacVerificationChange appid * @property {boolean|null} [is_verified] CMsgGCHVacVerificationChange is_verified + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHVacVerificationChange. + * @exports ICMsgGCHVacVerificationChange + * @interface ICMsgGCHVacVerificationChange + * @augments CMsgGCHVacVerificationChange.$Properties + * @deprecated Use CMsgGCHVacVerificationChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHVacVerificationChange. + * @typedef {CMsgGCHVacVerificationChange.$Properties} CMsgGCHVacVerificationChange.$Shape */ /** * Constructs a new CMsgGCHVacVerificationChange. * @exports CMsgGCHVacVerificationChange * @classdesc Represents a CMsgGCHVacVerificationChange. - * @implements ICMsgGCHVacVerificationChange * @constructor - * @param {ICMsgGCHVacVerificationChange=} [properties] Properties to set + * @param {CMsgGCHVacVerificationChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHVacVerificationChange(properties) { + var CMsgGCHVacVerificationChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHVacVerificationChange steamid. @@ -24576,7 +32009,7 @@ * @memberof CMsgGCHVacVerificationChange * @instance */ - CMsgGCHVacVerificationChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHVacVerificationChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHVacVerificationChange appid. @@ -24599,10 +32032,14 @@ * @function create * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange=} [properties] Properties to set + * @param {CMsgGCHVacVerificationChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange instance + * @type {{ + * (properties: CMsgGCHVacVerificationChange.$Shape): CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape; + * (properties?: CMsgGCHVacVerificationChange.$Properties): CMsgGCHVacVerificationChange; + * }} */ - CMsgGCHVacVerificationChange.create = function create(properties) { + CMsgGCHVacVerificationChange.create = function(properties) { return new CMsgGCHVacVerificationChange(properties); }; @@ -24611,19 +32048,26 @@ * @function encode * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange} message CMsgGCHVacVerificationChange message or plain object to encode + * @param {CMsgGCHVacVerificationChange.$Properties} message CMsgGCHVacVerificationChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHVacVerificationChange.encode = function encode(message, writer) { + CMsgGCHVacVerificationChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_verified != null && Object.hasOwnProperty.call(message, "is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_verified); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24632,12 +32076,12 @@ * @function encodeDelimited * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange} message CMsgGCHVacVerificationChange message or plain object to encode + * @param {CMsgGCHVacVerificationChange.$Properties} message CMsgGCHVacVerificationChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHVacVerificationChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHVacVerificationChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24647,31 +32091,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange + * @returns {CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape} CMsgGCHVacVerificationChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHVacVerificationChange.decode = function decode(reader, length) { + CMsgGCHVacVerificationChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHVacVerificationChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHVacVerificationChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_verified = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_verified = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24681,11 +32148,11 @@ * @memberof CMsgGCHVacVerificationChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange + * @returns {CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape} CMsgGCHVacVerificationChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHVacVerificationChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHVacVerificationChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24699,16 +32166,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHVacVerificationChange.verify = function verify(message) { + CMsgGCHVacVerificationChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) if (typeof message.is_verified !== "boolean") return "is_verified: boolean expected"; return null; @@ -24722,23 +32193,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange */ - CMsgGCHVacVerificationChange.fromObject = function fromObject(object) { + CMsgGCHVacVerificationChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHVacVerificationChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHVacVerificationChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHVacVerificationChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_verified != null) - message.is_verified = Boolean(object.is_verified); + message.is_verified = $Boolean(object.is_verified); return message; }; @@ -24751,27 +32228,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHVacVerificationChange.toObject = function toObject(message, options) { + CMsgGCHVacVerificationChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_verified = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) object.is_verified = message.is_verified; return object; }; @@ -24783,8 +32266,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHVacVerificationChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHVacVerificationChange.prototype.toJSON = function() { + return CMsgGCHVacVerificationChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHVacVerificationChange + * @function getTypeUrl + * @memberof CMsgGCHVacVerificationChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHVacVerificationChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHVacVerificationChange"; }; return CMsgGCHVacVerificationChange; @@ -24794,29 +32291,42 @@ /** * Properties of a CMsgGCHAccountPhoneNumberChange. - * @exports ICMsgGCHAccountPhoneNumberChange - * @interface ICMsgGCHAccountPhoneNumberChange + * @typedef {Object} CMsgGCHAccountPhoneNumberChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountPhoneNumberChange steamid * @property {number|null} [appid] CMsgGCHAccountPhoneNumberChange appid * @property {number|Long|null} [phone_id] CMsgGCHAccountPhoneNumberChange phone_id * @property {boolean|null} [is_verified] CMsgGCHAccountPhoneNumberChange is_verified * @property {boolean|null} [is_identifying] CMsgGCHAccountPhoneNumberChange is_identifying + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountPhoneNumberChange. + * @exports ICMsgGCHAccountPhoneNumberChange + * @interface ICMsgGCHAccountPhoneNumberChange + * @augments CMsgGCHAccountPhoneNumberChange.$Properties + * @deprecated Use CMsgGCHAccountPhoneNumberChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountPhoneNumberChange. + * @typedef {CMsgGCHAccountPhoneNumberChange.$Properties} CMsgGCHAccountPhoneNumberChange.$Shape */ /** * Constructs a new CMsgGCHAccountPhoneNumberChange. * @exports CMsgGCHAccountPhoneNumberChange * @classdesc Represents a CMsgGCHAccountPhoneNumberChange. - * @implements ICMsgGCHAccountPhoneNumberChange * @constructor - * @param {ICMsgGCHAccountPhoneNumberChange=} [properties] Properties to set + * @param {CMsgGCHAccountPhoneNumberChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountPhoneNumberChange(properties) { + var CMsgGCHAccountPhoneNumberChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountPhoneNumberChange steamid. @@ -24824,7 +32334,7 @@ * @memberof CMsgGCHAccountPhoneNumberChange * @instance */ - CMsgGCHAccountPhoneNumberChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountPhoneNumberChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountPhoneNumberChange appid. @@ -24863,10 +32373,14 @@ * @function create * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange=} [properties] Properties to set + * @param {CMsgGCHAccountPhoneNumberChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange instance + * @type {{ + * (properties: CMsgGCHAccountPhoneNumberChange.$Shape): CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape; + * (properties?: CMsgGCHAccountPhoneNumberChange.$Properties): CMsgGCHAccountPhoneNumberChange; + * }} */ - CMsgGCHAccountPhoneNumberChange.create = function create(properties) { + CMsgGCHAccountPhoneNumberChange.create = function(properties) { return new CMsgGCHAccountPhoneNumberChange(properties); }; @@ -24875,23 +32389,30 @@ * @function encode * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange} message CMsgGCHAccountPhoneNumberChange message or plain object to encode + * @param {CMsgGCHAccountPhoneNumberChange.$Properties} message CMsgGCHAccountPhoneNumberChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountPhoneNumberChange.encode = function encode(message, writer) { + CMsgGCHAccountPhoneNumberChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.phone_id != null && Object.hasOwnProperty.call(message, "phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.phone_id); - if (message.is_verified != null && Object.hasOwnProperty.call(message, "is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_verified); - if (message.is_identifying != null && Object.hasOwnProperty.call(message, "is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_identifying); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24900,12 +32421,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange} message CMsgGCHAccountPhoneNumberChange message or plain object to encode + * @param {CMsgGCHAccountPhoneNumberChange.$Properties} message CMsgGCHAccountPhoneNumberChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountPhoneNumberChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountPhoneNumberChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24915,37 +32436,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange + * @returns {CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape} CMsgGCHAccountPhoneNumberChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountPhoneNumberChange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountPhoneNumberChange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.phone_id = reader.uint64(); - break; - case 4: - message.is_verified = reader.bool(); - break; - case 5: - message.is_identifying = reader.bool(); - break; - default: - reader.skipType(tag & 7); + CMsgGCHAccountPhoneNumberChange.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountPhoneNumberChange(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.phone_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_verified = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_identifying = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24955,11 +32505,11 @@ * @memberof CMsgGCHAccountPhoneNumberChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange + * @returns {CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape} CMsgGCHAccountPhoneNumberChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountPhoneNumberChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountPhoneNumberChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24973,22 +32523,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountPhoneNumberChange.verify = function verify(message) { + CMsgGCHAccountPhoneNumberChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) if (!$util.isInteger(message.phone_id) && !(message.phone_id && $util.isInteger(message.phone_id.low) && $util.isInteger(message.phone_id.high))) return "phone_id: integer|Long expected"; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) if (typeof message.is_verified !== "boolean") return "is_verified: boolean expected"; - if (message.is_identifying != null && message.hasOwnProperty("is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) if (typeof message.is_identifying !== "boolean") return "is_identifying: boolean expected"; return null; @@ -25002,34 +32556,40 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange */ - CMsgGCHAccountPhoneNumberChange.fromObject = function fromObject(object) { + CMsgGCHAccountPhoneNumberChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountPhoneNumberChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountPhoneNumberChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountPhoneNumberChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.phone_id != null) if ($util.Long) - (message.phone_id = $util.Long.fromValue(object.phone_id)).unsigned = true; + message.phone_id = $util.Long.fromValue(object.phone_id, true); else if (typeof object.phone_id === "string") - message.phone_id = parseInt(object.phone_id, 10); + message.phone_id = $parseInt(object.phone_id, 10); else if (typeof object.phone_id === "number") message.phone_id = object.phone_id; else if (typeof object.phone_id === "object") message.phone_id = new $util.LongBits(object.phone_id.low >>> 0, object.phone_id.high >>> 0).toNumber(true); if (object.is_verified != null) - message.is_verified = Boolean(object.is_verified); + message.is_verified = $Boolean(object.is_verified); if (object.is_identifying != null) - message.is_identifying = Boolean(object.is_identifying); + message.is_identifying = $Boolean(object.is_identifying); return message; }; @@ -25042,40 +32602,48 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountPhoneNumberChange.toObject = function toObject(message, options) { + CMsgGCHAccountPhoneNumberChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.phone_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.phone_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.phone_id = options.longs === String ? "0" : 0; + object.phone_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.is_verified = false; object.is_identifying = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) - if (typeof message.phone_id === "number") - object.phone_id = options.longs === String ? String(message.phone_id) : message.phone_id; + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.phone_id = typeof message.phone_id === "number" ? $BigInt(message.phone_id) : $util.Long.fromBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0, true).toBigInt(); + else if (typeof message.phone_id === "number") + object.phone_id = options.longs === $String ? $String(message.phone_id) : message.phone_id; else - object.phone_id = options.longs === String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + object.phone_id = options.longs === $String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === $Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) object.is_verified = message.is_verified; - if (message.is_identifying != null && message.hasOwnProperty("is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) object.is_identifying = message.is_identifying; return object; }; @@ -25087,8 +32655,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountPhoneNumberChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountPhoneNumberChange.prototype.toJSON = function() { + return CMsgGCHAccountPhoneNumberChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountPhoneNumberChange + * @function getTypeUrl + * @memberof CMsgGCHAccountPhoneNumberChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountPhoneNumberChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountPhoneNumberChange"; }; return CMsgGCHAccountPhoneNumberChange; @@ -25098,27 +32680,40 @@ /** * Properties of a CMsgGCHAccountTwoFactorChange. - * @exports ICMsgGCHAccountTwoFactorChange - * @interface ICMsgGCHAccountTwoFactorChange + * @typedef {Object} CMsgGCHAccountTwoFactorChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountTwoFactorChange steamid * @property {number|null} [appid] CMsgGCHAccountTwoFactorChange appid * @property {boolean|null} [twofactor_enabled] CMsgGCHAccountTwoFactorChange twofactor_enabled + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountTwoFactorChange. + * @exports ICMsgGCHAccountTwoFactorChange + * @interface ICMsgGCHAccountTwoFactorChange + * @augments CMsgGCHAccountTwoFactorChange.$Properties + * @deprecated Use CMsgGCHAccountTwoFactorChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountTwoFactorChange. + * @typedef {CMsgGCHAccountTwoFactorChange.$Properties} CMsgGCHAccountTwoFactorChange.$Shape */ /** * Constructs a new CMsgGCHAccountTwoFactorChange. * @exports CMsgGCHAccountTwoFactorChange * @classdesc Represents a CMsgGCHAccountTwoFactorChange. - * @implements ICMsgGCHAccountTwoFactorChange * @constructor - * @param {ICMsgGCHAccountTwoFactorChange=} [properties] Properties to set + * @param {CMsgGCHAccountTwoFactorChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountTwoFactorChange(properties) { + var CMsgGCHAccountTwoFactorChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountTwoFactorChange steamid. @@ -25126,7 +32721,7 @@ * @memberof CMsgGCHAccountTwoFactorChange * @instance */ - CMsgGCHAccountTwoFactorChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountTwoFactorChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountTwoFactorChange appid. @@ -25149,10 +32744,14 @@ * @function create * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange=} [properties] Properties to set + * @param {CMsgGCHAccountTwoFactorChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange instance + * @type {{ + * (properties: CMsgGCHAccountTwoFactorChange.$Shape): CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape; + * (properties?: CMsgGCHAccountTwoFactorChange.$Properties): CMsgGCHAccountTwoFactorChange; + * }} */ - CMsgGCHAccountTwoFactorChange.create = function create(properties) { + CMsgGCHAccountTwoFactorChange.create = function(properties) { return new CMsgGCHAccountTwoFactorChange(properties); }; @@ -25161,19 +32760,26 @@ * @function encode * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange} message CMsgGCHAccountTwoFactorChange message or plain object to encode + * @param {CMsgGCHAccountTwoFactorChange.$Properties} message CMsgGCHAccountTwoFactorChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTwoFactorChange.encode = function encode(message, writer) { + CMsgGCHAccountTwoFactorChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.twofactor_enabled != null && Object.hasOwnProperty.call(message, "twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.twofactor_enabled); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25182,12 +32788,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange} message CMsgGCHAccountTwoFactorChange message or plain object to encode + * @param {CMsgGCHAccountTwoFactorChange.$Properties} message CMsgGCHAccountTwoFactorChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTwoFactorChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountTwoFactorChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25197,31 +32803,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange + * @returns {CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape} CMsgGCHAccountTwoFactorChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTwoFactorChange.decode = function decode(reader, length) { + CMsgGCHAccountTwoFactorChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountTwoFactorChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountTwoFactorChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.twofactor_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.twofactor_enabled = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25231,11 +32860,11 @@ * @memberof CMsgGCHAccountTwoFactorChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange + * @returns {CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape} CMsgGCHAccountTwoFactorChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTwoFactorChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountTwoFactorChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25249,16 +32878,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountTwoFactorChange.verify = function verify(message) { + CMsgGCHAccountTwoFactorChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.twofactor_enabled != null && message.hasOwnProperty("twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) if (typeof message.twofactor_enabled !== "boolean") return "twofactor_enabled: boolean expected"; return null; @@ -25272,23 +32905,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange */ - CMsgGCHAccountTwoFactorChange.fromObject = function fromObject(object) { + CMsgGCHAccountTwoFactorChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountTwoFactorChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountTwoFactorChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountTwoFactorChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.twofactor_enabled != null) - message.twofactor_enabled = Boolean(object.twofactor_enabled); + message.twofactor_enabled = $Boolean(object.twofactor_enabled); return message; }; @@ -25301,27 +32940,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountTwoFactorChange.toObject = function toObject(message, options) { + CMsgGCHAccountTwoFactorChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.twofactor_enabled = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.twofactor_enabled != null && message.hasOwnProperty("twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) object.twofactor_enabled = message.twofactor_enabled; return object; }; @@ -25333,8 +32978,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountTwoFactorChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountTwoFactorChange.prototype.toJSON = function() { + return CMsgGCHAccountTwoFactorChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountTwoFactorChange + * @function getTypeUrl + * @memberof CMsgGCHAccountTwoFactorChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountTwoFactorChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountTwoFactorChange"; }; return CMsgGCHAccountTwoFactorChange; @@ -25342,27 +33001,40 @@ $root.CMsgGCGetPartnerAccountLink = (function() { + /** + * Properties of a CMsgGCGetPartnerAccountLink. + * @typedef {Object} CMsgGCGetPartnerAccountLink.$Properties + * @property {number|Long|null} [steamid] CMsgGCGetPartnerAccountLink steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPartnerAccountLink. * @exports ICMsgGCGetPartnerAccountLink * @interface ICMsgGCGetPartnerAccountLink - * @property {number|Long|null} [steamid] CMsgGCGetPartnerAccountLink steamid + * @augments CMsgGCGetPartnerAccountLink.$Properties + * @deprecated Use CMsgGCGetPartnerAccountLink.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPartnerAccountLink. + * @typedef {CMsgGCGetPartnerAccountLink.$Properties} CMsgGCGetPartnerAccountLink.$Shape */ /** * Constructs a new CMsgGCGetPartnerAccountLink. * @exports CMsgGCGetPartnerAccountLink * @classdesc Represents a CMsgGCGetPartnerAccountLink. - * @implements ICMsgGCGetPartnerAccountLink * @constructor - * @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPartnerAccountLink(properties) { + var CMsgGCGetPartnerAccountLink = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPartnerAccountLink steamid. @@ -25370,17 +33042,21 @@ * @memberof CMsgGCGetPartnerAccountLink * @instance */ - CMsgGCGetPartnerAccountLink.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCGetPartnerAccountLink.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCGetPartnerAccountLink instance using the specified properties. * @function create * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink instance + * @type {{ + * (properties: CMsgGCGetPartnerAccountLink.$Shape): CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape; + * (properties?: CMsgGCGetPartnerAccountLink.$Properties): CMsgGCGetPartnerAccountLink; + * }} */ - CMsgGCGetPartnerAccountLink.create = function create(properties) { + CMsgGCGetPartnerAccountLink.create = function(properties) { return new CMsgGCGetPartnerAccountLink(properties); }; @@ -25389,15 +33065,22 @@ * @function encode * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink} message CMsgGCGetPartnerAccountLink message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink.$Properties} message CMsgGCGetPartnerAccountLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink.encode = function encode(message, writer) { + CMsgGCGetPartnerAccountLink.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25406,12 +33089,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink} message CMsgGCGetPartnerAccountLink message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink.$Properties} message CMsgGCGetPartnerAccountLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPartnerAccountLink.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25421,25 +33104,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink + * @returns {CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape} CMsgGCGetPartnerAccountLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink.decode = function decode(reader, length) { + CMsgGCGetPartnerAccountLink.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPartnerAccountLink(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPartnerAccountLink(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25449,11 +33149,11 @@ * @memberof CMsgGCGetPartnerAccountLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink + * @returns {CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape} CMsgGCGetPartnerAccountLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPartnerAccountLink.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25467,10 +33167,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPartnerAccountLink.verify = function verify(message) { + CMsgGCGetPartnerAccountLink.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -25484,19 +33188,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink */ - CMsgGCGetPartnerAccountLink.fromObject = function fromObject(object) { + CMsgGCGetPartnerAccountLink.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPartnerAccountLink) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPartnerAccountLink: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPartnerAccountLink(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -25509,21 +33219,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPartnerAccountLink.toObject = function toObject(message, options) { + CMsgGCGetPartnerAccountLink.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -25534,8 +33250,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPartnerAccountLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPartnerAccountLink.prototype.toJSON = function() { + return CMsgGCGetPartnerAccountLink.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPartnerAccountLink + * @function getTypeUrl + * @memberof CMsgGCGetPartnerAccountLink + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPartnerAccountLink.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPartnerAccountLink"; }; return CMsgGCGetPartnerAccountLink; @@ -25545,26 +33275,39 @@ /** * Properties of a CMsgGCGetPartnerAccountLink_Response. - * @exports ICMsgGCGetPartnerAccountLink_Response - * @interface ICMsgGCGetPartnerAccountLink_Response + * @typedef {Object} CMsgGCGetPartnerAccountLink_Response.$Properties * @property {number|null} [pwid] CMsgGCGetPartnerAccountLink_Response pwid * @property {number|null} [nexonid] CMsgGCGetPartnerAccountLink_Response nexonid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetPartnerAccountLink_Response. + * @exports ICMsgGCGetPartnerAccountLink_Response + * @interface ICMsgGCGetPartnerAccountLink_Response + * @augments CMsgGCGetPartnerAccountLink_Response.$Properties + * @deprecated Use CMsgGCGetPartnerAccountLink_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPartnerAccountLink_Response. + * @typedef {CMsgGCGetPartnerAccountLink_Response.$Properties} CMsgGCGetPartnerAccountLink_Response.$Shape */ /** * Constructs a new CMsgGCGetPartnerAccountLink_Response. * @exports CMsgGCGetPartnerAccountLink_Response * @classdesc Represents a CMsgGCGetPartnerAccountLink_Response. - * @implements ICMsgGCGetPartnerAccountLink_Response * @constructor - * @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPartnerAccountLink_Response(properties) { + var CMsgGCGetPartnerAccountLink_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPartnerAccountLink_Response pwid. @@ -25587,10 +33330,14 @@ * @function create * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response instance + * @type {{ + * (properties: CMsgGCGetPartnerAccountLink_Response.$Shape): CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape; + * (properties?: CMsgGCGetPartnerAccountLink_Response.$Properties): CMsgGCGetPartnerAccountLink_Response; + * }} */ - CMsgGCGetPartnerAccountLink_Response.create = function create(properties) { + CMsgGCGetPartnerAccountLink_Response.create = function(properties) { return new CMsgGCGetPartnerAccountLink_Response(properties); }; @@ -25599,17 +33346,24 @@ * @function encode * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink_Response.encode = function encode(message, writer) { + CMsgGCGetPartnerAccountLink_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.pwid != null && Object.hasOwnProperty.call(message, "pwid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.pwid); - if (message.nexonid != null && Object.hasOwnProperty.call(message, "nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.nexonid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25618,12 +33372,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPartnerAccountLink_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25633,28 +33387,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response + * @returns {CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape} CMsgGCGetPartnerAccountLink_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink_Response.decode = function decode(reader, length) { + CMsgGCGetPartnerAccountLink_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPartnerAccountLink_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPartnerAccountLink_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pwid = reader.uint32(); - break; - case 2: - message.nexonid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.pwid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.nexonid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25664,11 +33438,11 @@ * @memberof CMsgGCGetPartnerAccountLink_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response + * @returns {CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape} CMsgGCGetPartnerAccountLink_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPartnerAccountLink_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25682,13 +33456,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPartnerAccountLink_Response.verify = function verify(message) { + CMsgGCGetPartnerAccountLink_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pwid != null && message.hasOwnProperty("pwid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) if (!$util.isInteger(message.pwid)) return "pwid: integer expected"; - if (message.nexonid != null && message.hasOwnProperty("nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) if (!$util.isInteger(message.nexonid)) return "nexonid: integer expected"; return null; @@ -25702,9 +33480,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response */ - CMsgGCGetPartnerAccountLink_Response.fromObject = function fromObject(object) { + CMsgGCGetPartnerAccountLink_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPartnerAccountLink_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPartnerAccountLink_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPartnerAccountLink_Response(); if (object.pwid != null) message.pwid = object.pwid >>> 0; @@ -25722,17 +33506,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPartnerAccountLink_Response.toObject = function toObject(message, options) { + CMsgGCGetPartnerAccountLink_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.pwid = 0; object.nexonid = 0; } - if (message.pwid != null && message.hasOwnProperty("pwid")) + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) object.pwid = message.pwid; - if (message.nexonid != null && message.hasOwnProperty("nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) object.nexonid = message.nexonid; return object; }; @@ -25744,8 +33532,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPartnerAccountLink_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPartnerAccountLink_Response.prototype.toJSON = function() { + return CMsgGCGetPartnerAccountLink_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPartnerAccountLink_Response + * @function getTypeUrl + * @memberof CMsgGCGetPartnerAccountLink_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPartnerAccountLink_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPartnerAccountLink_Response"; }; return CMsgGCGetPartnerAccountLink_Response; @@ -25755,30 +33557,43 @@ /** * Properties of a CMsgGCRoutingInfo. - * @exports ICMsgGCRoutingInfo - * @interface ICMsgGCRoutingInfo + * @typedef {Object} CMsgGCRoutingInfo.$Properties * @property {Array.|null} [dir_index] CMsgGCRoutingInfo dir_index * @property {CMsgGCRoutingInfo.RoutingMethod|null} [method] CMsgGCRoutingInfo method * @property {CMsgGCRoutingInfo.RoutingMethod|null} [fallback] CMsgGCRoutingInfo fallback * @property {number|null} [protobuf_field] CMsgGCRoutingInfo protobuf_field * @property {string|null} [webapi_param] CMsgGCRoutingInfo webapi_param + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRoutingInfo. + * @exports ICMsgGCRoutingInfo + * @interface ICMsgGCRoutingInfo + * @augments CMsgGCRoutingInfo.$Properties + * @deprecated Use CMsgGCRoutingInfo.$Properties instead. + */ + + /** + * Shape of a CMsgGCRoutingInfo. + * @typedef {CMsgGCRoutingInfo.$Properties} CMsgGCRoutingInfo.$Shape */ /** * Constructs a new CMsgGCRoutingInfo. * @exports CMsgGCRoutingInfo * @classdesc Represents a CMsgGCRoutingInfo. - * @implements ICMsgGCRoutingInfo * @constructor - * @param {ICMsgGCRoutingInfo=} [properties] Properties to set + * @param {CMsgGCRoutingInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRoutingInfo(properties) { + var CMsgGCRoutingInfo = function (properties) { this.dir_index = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRoutingInfo dir_index. @@ -25825,10 +33640,14 @@ * @function create * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo=} [properties] Properties to set + * @param {CMsgGCRoutingInfo.$Properties=} [properties] Properties to set * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo instance + * @type {{ + * (properties: CMsgGCRoutingInfo.$Shape): CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape; + * (properties?: CMsgGCRoutingInfo.$Properties): CMsgGCRoutingInfo; + * }} */ - CMsgGCRoutingInfo.create = function create(properties) { + CMsgGCRoutingInfo.create = function(properties) { return new CMsgGCRoutingInfo(properties); }; @@ -25837,24 +33656,31 @@ * @function encode * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo} message CMsgGCRoutingInfo message or plain object to encode + * @param {CMsgGCRoutingInfo.$Properties} message CMsgGCRoutingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRoutingInfo.encode = function encode(message, writer) { + CMsgGCRoutingInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.dir_index != null && message.dir_index.length) for (var i = 0; i < message.dir_index.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index[i]); - if (message.method != null && Object.hasOwnProperty.call(message, "method")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.method); - if (message.fallback != null && Object.hasOwnProperty.call(message, "fallback")) + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.fallback); - if (message.protobuf_field != null && Object.hasOwnProperty.call(message, "protobuf_field")) + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.protobuf_field); - if (message.webapi_param != null && Object.hasOwnProperty.call(message, "webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.webapi_param); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25863,12 +33689,12 @@ * @function encodeDelimited * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo} message CMsgGCRoutingInfo message or plain object to encode + * @param {CMsgGCRoutingInfo.$Properties} message CMsgGCRoutingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRoutingInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRoutingInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25878,44 +33704,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo + * @returns {CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape} CMsgGCRoutingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRoutingInfo.decode = function decode(reader, length) { + CMsgGCRoutingInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRoutingInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRoutingInfo(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.dir_index && message.dir_index.length)) - message.dir_index = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.dir_index.push(reader.uint32()); - } else - message.dir_index.push(reader.uint32()); - break; - case 2: - message.method = reader.int32(); - break; - case 3: - message.fallback = reader.int32(); - break; - case 4: - message.protobuf_field = reader.uint32(); - break; - case 5: - message.webapi_param = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.dir_index && message.dir_index.length)) + message.dir_index = []; + reader.uint32s(message.dir_index); + continue; + } + if (wireType !== 0) + break; + if (!(message.dir_index && message.dir_index.length)) + message.dir_index = []; + message.dir_index.push(reader.uint32()); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCRoutingInfo.RoutingMethod[value] !== $undefined) + message.method = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCRoutingInfo.RoutingMethod[value] !== $undefined) + message.fallback = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 4: { + if (wireType !== 0) + break; + message.protobuf_field = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.webapi_param = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25925,11 +33793,11 @@ * @memberof CMsgGCRoutingInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo + * @returns {CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape} CMsgGCRoutingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRoutingInfo.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRoutingInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25943,17 +33811,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRoutingInfo.verify = function verify(message) { + CMsgGCRoutingInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) { - if (!Array.isArray(message.dir_index)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) { + if (!$Array.isArray(message.dir_index)) return "dir_index: array expected"; for (var i = 0; i < message.dir_index.length; ++i) if (!$util.isInteger(message.dir_index[i])) return "dir_index: integer[] expected"; } - if (message.method != null && message.hasOwnProperty("method")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) switch (message.method) { default: return "method: enum value expected"; @@ -25964,7 +33836,7 @@ case 4: break; } - if (message.fallback != null && message.hasOwnProperty("fallback")) + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) switch (message.fallback) { default: return "fallback: enum value expected"; @@ -25975,10 +33847,10 @@ case 4: break; } - if (message.protobuf_field != null && message.hasOwnProperty("protobuf_field")) + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) if (!$util.isInteger(message.protobuf_field)) return "protobuf_field: integer expected"; - if (message.webapi_param != null && message.hasOwnProperty("webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) if (!$util.isString(message.webapi_param)) return "webapi_param: string expected"; return null; @@ -25992,14 +33864,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo */ - CMsgGCRoutingInfo.fromObject = function fromObject(object) { + CMsgGCRoutingInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRoutingInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRoutingInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRoutingInfo(); if (object.dir_index) { - if (!Array.isArray(object.dir_index)) - throw TypeError(".CMsgGCRoutingInfo.dir_index: array expected"); - message.dir_index = []; + if (!$Array.isArray(object.dir_index)) + throw $TypeError(".CMsgGCRoutingInfo.dir_index: array expected"); + message.dir_index = $Array(object.dir_index.length); for (var i = 0; i < object.dir_index.length; ++i) message.dir_index[i] = object.dir_index[i] >>> 0; } @@ -26024,6 +33902,7 @@ case 4: message.method = 4; break; + default: } switch (object.fallback) { case "RANDOM": @@ -26046,11 +33925,12 @@ case 4: message.fallback = 4; break; + default: } if (object.protobuf_field != null) message.protobuf_field = object.protobuf_field >>> 0; if (object.webapi_param != null) - message.webapi_param = String(object.webapi_param); + message.webapi_param = $String(object.webapi_param); return message; }; @@ -26063,30 +33943,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRoutingInfo.toObject = function toObject(message, options) { + CMsgGCRoutingInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.dir_index = []; if (options.defaults) { - object.method = options.enums === String ? "RANDOM" : 0; - object.fallback = options.enums === String ? "DISCARD" : 1; + object.method = options.enums === $String ? "RANDOM" : 0; + object.fallback = options.enums === $String ? "DISCARD" : 1; object.protobuf_field = 0; object.webapi_param = ""; } if (message.dir_index && message.dir_index.length) { - object.dir_index = []; + object.dir_index = $Array(message.dir_index.length); for (var j = 0; j < message.dir_index.length; ++j) object.dir_index[j] = message.dir_index[j]; } - if (message.method != null && message.hasOwnProperty("method")) - object.method = options.enums === String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.method] : message.method; - if (message.fallback != null && message.hasOwnProperty("fallback")) - object.fallback = options.enums === String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] : message.fallback; - if (message.protobuf_field != null && message.hasOwnProperty("protobuf_field")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) + object.method = options.enums === $String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.method] === $undefined ? message.method : $root.CMsgGCRoutingInfo.RoutingMethod[message.method] : message.method; + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) + object.fallback = options.enums === $String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] === $undefined ? message.fallback : $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] : message.fallback; + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) object.protobuf_field = message.protobuf_field; - if (message.webapi_param != null && message.hasOwnProperty("webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) object.webapi_param = message.webapi_param; return object; }; @@ -26098,8 +33982,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRoutingInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRoutingInfo.prototype.toJSON = function() { + return CMsgGCRoutingInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRoutingInfo + * @function getTypeUrl + * @memberof CMsgGCRoutingInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRoutingInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRoutingInfo"; }; /** @@ -26113,7 +34011,7 @@ * @property {number} WEBAPI_PARAM_UINT64=4 WEBAPI_PARAM_UINT64 value */ CMsgGCRoutingInfo.RoutingMethod = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "RANDOM"] = 0; values[valuesById[1] = "DISCARD"] = 1; values[valuesById[2] = "CLIENT_STEAMID"] = 2; @@ -26127,32 +34025,45 @@ $root.CMsgGCMsgMasterSetWebAPIRouting = (function() { + /** + * Properties of a CMsgGCMsgMasterSetWebAPIRouting. + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting.$Properties + * @property {Array.|null} [entries] CMsgGCMsgMasterSetWebAPIRouting entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetWebAPIRouting. * @exports ICMsgGCMsgMasterSetWebAPIRouting * @interface ICMsgGCMsgMasterSetWebAPIRouting - * @property {Array.|null} [entries] CMsgGCMsgMasterSetWebAPIRouting entries + * @augments CMsgGCMsgMasterSetWebAPIRouting.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetWebAPIRouting. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting.$Properties} CMsgGCMsgMasterSetWebAPIRouting.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetWebAPIRouting. * @exports CMsgGCMsgMasterSetWebAPIRouting * @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting. - * @implements ICMsgGCMsgMasterSetWebAPIRouting * @constructor - * @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetWebAPIRouting(properties) { + var CMsgGCMsgMasterSetWebAPIRouting = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetWebAPIRouting entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCMsgMasterSetWebAPIRouting * @instance */ @@ -26163,10 +34074,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting.$Shape): CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting.$Properties): CMsgGCMsgMasterSetWebAPIRouting; + * }} */ - CMsgGCMsgMasterSetWebAPIRouting.create = function create(properties) { + CMsgGCMsgMasterSetWebAPIRouting.create = function(properties) { return new CMsgGCMsgMasterSetWebAPIRouting(properties); }; @@ -26175,16 +34090,23 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting.encode = function encode(message, writer) { + CMsgGCMsgMasterSetWebAPIRouting.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26193,12 +34115,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetWebAPIRouting.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26208,27 +34130,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting + * @returns {CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape} CMsgGCMsgMasterSetWebAPIRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting.decode = function decode(reader, length) { + CMsgGCMsgMasterSetWebAPIRouting.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCMsgMasterSetWebAPIRouting.Entry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCMsgMasterSetWebAPIRouting.Entry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26238,11 +34177,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting + * @returns {CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape} CMsgGCMsgMasterSetWebAPIRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetWebAPIRouting.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26256,14 +34195,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetWebAPIRouting.verify = function verify(message) { + CMsgGCMsgMasterSetWebAPIRouting.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.verify(message.entries[i]); + var error = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -26279,18 +34222,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting */ - CMsgGCMsgMasterSetWebAPIRouting.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetWebAPIRouting.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: object expected"); - message.entries[i] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: object expected"); + message.entries[i] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -26305,16 +34254,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetWebAPIRouting.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetWebAPIRouting.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -26326,35 +34279,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetWebAPIRouting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetWebAPIRouting.prototype.toJSON = function() { + return CMsgGCMsgMasterSetWebAPIRouting.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetWebAPIRouting + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetWebAPIRouting.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting"; }; CMsgGCMsgMasterSetWebAPIRouting.Entry = (function() { /** * Properties of an Entry. - * @memberof CMsgGCMsgMasterSetWebAPIRouting - * @interface IEntry + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties * @property {string|null} [interface_name] Entry interface_name * @property {string|null} [method_name] Entry method_name - * @property {ICMsgGCRoutingInfo|null} [routing] Entry routing + * @property {CMsgGCRoutingInfo.$Properties|null} [routing] Entry routing + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Entry. + * @memberof CMsgGCMsgMasterSetWebAPIRouting + * @interface IEntry + * @augments CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties instead. + */ + + /** + * Shape of an Entry. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape */ /** * Constructs a new Entry. * @memberof CMsgGCMsgMasterSetWebAPIRouting * @classdesc Represents an Entry. - * @implements IEntry * @constructor - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Entry(properties) { + var Entry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Entry interface_name. @@ -26374,7 +34354,7 @@ /** * Entry routing. - * @member {ICMsgGCRoutingInfo|null|undefined} routing + * @member {CMsgGCRoutingInfo.$Properties|null|undefined} routing * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @instance */ @@ -26385,10 +34365,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape): CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties): CMsgGCMsgMasterSetWebAPIRouting.Entry; + * }} */ - Entry.create = function create(properties) { + Entry.create = function(properties) { return new Entry(properties); }; @@ -26397,19 +34381,26 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.interface_name != null && Object.hasOwnProperty.call(message, "interface_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.interface_name); - if (message.method_name != null && Object.hasOwnProperty.call(message, "method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.method_name); - if (message.routing != null && Object.hasOwnProperty.call(message, "routing")) - $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26418,12 +34409,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Entry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26433,31 +34424,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + Entry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.interface_name = reader.string(); - break; - case 2: - message.method_name = reader.string(); - break; - case 3: - message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.interface_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.method_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routing); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26467,11 +34481,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + Entry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26485,17 +34499,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + Entry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) if (!$util.isString(message.interface_name)) return "interface_name: string expected"; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) if (!$util.isString(message.method_name)) return "method_name: string expected"; - if (message.routing != null && message.hasOwnProperty("routing")) { - var error = $root.CMsgGCRoutingInfo.verify(message.routing); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) { + var error = $root.CMsgGCRoutingInfo.verify(message.routing, _depth + 1); if (error) return "routing." + error; } @@ -26510,18 +34528,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry */ - Entry.fromObject = function fromObject(object) { + Entry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting.Entry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); if (object.interface_name != null) - message.interface_name = String(object.interface_name); + message.interface_name = $String(object.interface_name); if (object.method_name != null) - message.method_name = String(object.method_name); + message.method_name = $String(object.method_name); if (object.routing != null) { - if (typeof object.routing !== "object") - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry.routing: object expected"); - message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing); + if (!$util.isObject(object.routing)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry.routing: object expected"); + message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing, _depth + 1); } return message; }; @@ -26535,21 +34559,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.interface_name = ""; object.method_name = ""; object.routing = null; } - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) object.interface_name = message.interface_name; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) object.method_name = message.method_name; - if (message.routing != null && message.hasOwnProperty("routing")) - object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options, _depth + 1); return object; }; @@ -26560,8 +34588,22 @@ * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Entry.prototype.toJSON = function() { + return Entry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Entry + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Entry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting.Entry"; }; return Entry; @@ -26572,32 +34614,45 @@ $root.CMsgGCMsgMasterSetClientMsgRouting = (function() { + /** + * Properties of a CMsgGCMsgMasterSetClientMsgRouting. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting.$Properties + * @property {Array.|null} [entries] CMsgGCMsgMasterSetClientMsgRouting entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetClientMsgRouting. * @exports ICMsgGCMsgMasterSetClientMsgRouting * @interface ICMsgGCMsgMasterSetClientMsgRouting - * @property {Array.|null} [entries] CMsgGCMsgMasterSetClientMsgRouting entries + * @augments CMsgGCMsgMasterSetClientMsgRouting.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetClientMsgRouting. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting.$Properties} CMsgGCMsgMasterSetClientMsgRouting.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetClientMsgRouting. * @exports CMsgGCMsgMasterSetClientMsgRouting * @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting. - * @implements ICMsgGCMsgMasterSetClientMsgRouting * @constructor - * @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetClientMsgRouting(properties) { + var CMsgGCMsgMasterSetClientMsgRouting = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetClientMsgRouting entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCMsgMasterSetClientMsgRouting * @instance */ @@ -26608,10 +34663,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting.$Shape): CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting.$Properties): CMsgGCMsgMasterSetClientMsgRouting; + * }} */ - CMsgGCMsgMasterSetClientMsgRouting.create = function create(properties) { + CMsgGCMsgMasterSetClientMsgRouting.create = function(properties) { return new CMsgGCMsgMasterSetClientMsgRouting(properties); }; @@ -26620,16 +34679,23 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting.encode = function encode(message, writer) { + CMsgGCMsgMasterSetClientMsgRouting.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26638,12 +34704,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetClientMsgRouting.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26653,27 +34719,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting + * @returns {CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape} CMsgGCMsgMasterSetClientMsgRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting.decode = function decode(reader, length) { + CMsgGCMsgMasterSetClientMsgRouting.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCMsgMasterSetClientMsgRouting.Entry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCMsgMasterSetClientMsgRouting.Entry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26683,11 +34766,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting + * @returns {CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape} CMsgGCMsgMasterSetClientMsgRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetClientMsgRouting.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26701,14 +34784,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetClientMsgRouting.verify = function verify(message) { + CMsgGCMsgMasterSetClientMsgRouting.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.verify(message.entries[i]); + var error = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -26724,18 +34811,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting */ - CMsgGCMsgMasterSetClientMsgRouting.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetClientMsgRouting.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: object expected"); - message.entries[i] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: object expected"); + message.entries[i] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -26750,16 +34843,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetClientMsgRouting.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetClientMsgRouting.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -26771,34 +34868,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetClientMsgRouting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetClientMsgRouting.prototype.toJSON = function() { + return CMsgGCMsgMasterSetClientMsgRouting.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetClientMsgRouting + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetClientMsgRouting.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting"; }; CMsgGCMsgMasterSetClientMsgRouting.Entry = (function() { + /** + * Properties of an Entry. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties + * @property {number|null} [msg_type] Entry msg_type + * @property {CMsgGCRoutingInfo.$Properties|null} [routing] Entry routing + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an Entry. * @memberof CMsgGCMsgMasterSetClientMsgRouting * @interface IEntry - * @property {number|null} [msg_type] Entry msg_type - * @property {ICMsgGCRoutingInfo|null} [routing] Entry routing + * @augments CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties instead. + */ + + /** + * Shape of an Entry. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape */ /** * Constructs a new Entry. * @memberof CMsgGCMsgMasterSetClientMsgRouting * @classdesc Represents an Entry. - * @implements IEntry * @constructor - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Entry(properties) { + var Entry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Entry msg_type. @@ -26810,7 +34934,7 @@ /** * Entry routing. - * @member {ICMsgGCRoutingInfo|null|undefined} routing + * @member {CMsgGCRoutingInfo.$Properties|null|undefined} routing * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @instance */ @@ -26821,10 +34945,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape): CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties): CMsgGCMsgMasterSetClientMsgRouting.Entry; + * }} */ - Entry.create = function create(properties) { + Entry.create = function(properties) { return new Entry(properties); }; @@ -26833,17 +34961,24 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.msg_type != null && Object.hasOwnProperty.call(message, "msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.msg_type); - if (message.routing != null && Object.hasOwnProperty.call(message, "routing")) - $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26852,12 +34987,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Entry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26867,28 +35002,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + Entry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg_type = reader.uint32(); - break; - case 2: - message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.msg_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routing); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26898,11 +35053,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + Entry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26916,14 +35071,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + Entry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) if (!$util.isInteger(message.msg_type)) return "msg_type: integer expected"; - if (message.routing != null && message.hasOwnProperty("routing")) { - var error = $root.CMsgGCRoutingInfo.verify(message.routing); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) { + var error = $root.CMsgGCRoutingInfo.verify(message.routing, _depth + 1); if (error) return "routing." + error; } @@ -26938,16 +35097,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry */ - Entry.fromObject = function fromObject(object) { + Entry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting.Entry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); if (object.msg_type != null) message.msg_type = object.msg_type >>> 0; if (object.routing != null) { - if (typeof object.routing !== "object") - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry.routing: object expected"); - message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing); + if (!$util.isObject(object.routing)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry.routing: object expected"); + message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing, _depth + 1); } return message; }; @@ -26961,18 +35126,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.msg_type = 0; object.routing = null; } - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) object.msg_type = message.msg_type; - if (message.routing != null && message.hasOwnProperty("routing")) - object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options, _depth + 1); return object; }; @@ -26983,8 +35152,22 @@ * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Entry.prototype.toJSON = function() { + return Entry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Entry + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Entry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting.Entry"; }; return Entry; @@ -26995,27 +35178,40 @@ $root.CMsgGCMsgMasterSetWebAPIRouting_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetWebAPIRouting_Response. + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetWebAPIRouting_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetWebAPIRouting_Response. * @exports ICMsgGCMsgMasterSetWebAPIRouting_Response * @interface ICMsgGCMsgMasterSetWebAPIRouting_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetWebAPIRouting_Response eresult + * @augments CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetWebAPIRouting_Response. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetWebAPIRouting_Response. * @exports CMsgGCMsgMasterSetWebAPIRouting_Response * @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting_Response. - * @implements ICMsgGCMsgMasterSetWebAPIRouting_Response * @constructor - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetWebAPIRouting_Response(properties) { + var CMsgGCMsgMasterSetWebAPIRouting_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetWebAPIRouting_Response eresult. @@ -27030,10 +35226,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape): CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties): CMsgGCMsgMasterSetWebAPIRouting_Response; + * }} */ - CMsgGCMsgMasterSetWebAPIRouting_Response.create = function create(properties) { + CMsgGCMsgMasterSetWebAPIRouting_Response.create = function(properties) { return new CMsgGCMsgMasterSetWebAPIRouting_Response(properties); }; @@ -27042,15 +35242,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetWebAPIRouting_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27059,12 +35266,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetWebAPIRouting_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27074,25 +35281,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response + * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape} CMsgGCMsgMasterSetWebAPIRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetWebAPIRouting_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27102,11 +35326,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response + * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape} CMsgGCMsgMasterSetWebAPIRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetWebAPIRouting_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27120,10 +35344,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetWebAPIRouting_Response.verify = function verify(message) { + CMsgGCMsgMasterSetWebAPIRouting_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -27137,9 +35365,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response */ - CMsgGCMsgMasterSetWebAPIRouting_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetWebAPIRouting_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -27155,13 +35389,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetWebAPIRouting_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetWebAPIRouting_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -27173,8 +35411,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetWebAPIRouting_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetWebAPIRouting_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetWebAPIRouting_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting_Response"; }; return CMsgGCMsgMasterSetWebAPIRouting_Response; @@ -27182,27 +35434,40 @@ $root.CMsgGCMsgMasterSetClientMsgRouting_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetClientMsgRouting_Response. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetClientMsgRouting_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetClientMsgRouting_Response. * @exports ICMsgGCMsgMasterSetClientMsgRouting_Response * @interface ICMsgGCMsgMasterSetClientMsgRouting_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetClientMsgRouting_Response eresult + * @augments CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetClientMsgRouting_Response. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetClientMsgRouting_Response. * @exports CMsgGCMsgMasterSetClientMsgRouting_Response * @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting_Response. - * @implements ICMsgGCMsgMasterSetClientMsgRouting_Response * @constructor - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetClientMsgRouting_Response(properties) { + var CMsgGCMsgMasterSetClientMsgRouting_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetClientMsgRouting_Response eresult. @@ -27217,10 +35482,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape): CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties): CMsgGCMsgMasterSetClientMsgRouting_Response; + * }} */ - CMsgGCMsgMasterSetClientMsgRouting_Response.create = function create(properties) { + CMsgGCMsgMasterSetClientMsgRouting_Response.create = function(properties) { return new CMsgGCMsgMasterSetClientMsgRouting_Response(properties); }; @@ -27229,15 +35498,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetClientMsgRouting_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27246,12 +35522,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetClientMsgRouting_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27261,25 +35537,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response + * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape} CMsgGCMsgMasterSetClientMsgRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetClientMsgRouting_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27289,11 +35582,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response + * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape} CMsgGCMsgMasterSetClientMsgRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetClientMsgRouting_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27307,10 +35600,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetClientMsgRouting_Response.verify = function verify(message) { + CMsgGCMsgMasterSetClientMsgRouting_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -27324,9 +35621,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response */ - CMsgGCMsgMasterSetClientMsgRouting_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetClientMsgRouting_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -27342,13 +35645,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetClientMsgRouting_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetClientMsgRouting_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -27360,8 +35667,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetClientMsgRouting_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetClientMsgRouting_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetClientMsgRouting_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting_Response"; }; return CMsgGCMsgMasterSetClientMsgRouting_Response; @@ -27371,29 +35692,42 @@ /** * Properties of a CMsgGCMsgSetOptions. - * @exports ICMsgGCMsgSetOptions - * @interface ICMsgGCMsgSetOptions + * @typedef {Object} CMsgGCMsgSetOptions.$Properties * @property {Array.|null} [options] CMsgGCMsgSetOptions options - * @property {Array.|null} [client_msg_ranges] CMsgGCMsgSetOptions client_msg_ranges + * @property {Array.|null} [client_msg_ranges] CMsgGCMsgSetOptions client_msg_ranges * @property {CMsgGCMsgSetOptions.GCSQLVersion|null} [gcsql_version] CMsgGCMsgSetOptions gcsql_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCMsgSetOptions. + * @exports ICMsgGCMsgSetOptions + * @interface ICMsgGCMsgSetOptions + * @augments CMsgGCMsgSetOptions.$Properties + * @deprecated Use CMsgGCMsgSetOptions.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgSetOptions. + * @typedef {CMsgGCMsgSetOptions.$Properties} CMsgGCMsgSetOptions.$Shape */ /** * Constructs a new CMsgGCMsgSetOptions. * @exports CMsgGCMsgSetOptions * @classdesc Represents a CMsgGCMsgSetOptions. - * @implements ICMsgGCMsgSetOptions * @constructor - * @param {ICMsgGCMsgSetOptions=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgSetOptions(properties) { + var CMsgGCMsgSetOptions = function (properties) { this.options = []; this.client_msg_ranges = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgSetOptions options. @@ -27405,7 +35739,7 @@ /** * CMsgGCMsgSetOptions client_msg_ranges. - * @member {Array.} client_msg_ranges + * @member {Array.} client_msg_ranges * @memberof CMsgGCMsgSetOptions * @instance */ @@ -27424,10 +35758,14 @@ * @function create * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions instance + * @type {{ + * (properties: CMsgGCMsgSetOptions.$Shape): CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape; + * (properties?: CMsgGCMsgSetOptions.$Properties): CMsgGCMsgSetOptions; + * }} */ - CMsgGCMsgSetOptions.create = function create(properties) { + CMsgGCMsgSetOptions.create = function(properties) { return new CMsgGCMsgSetOptions(properties); }; @@ -27436,21 +35774,28 @@ * @function encode * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions} message CMsgGCMsgSetOptions message or plain object to encode + * @param {CMsgGCMsgSetOptions.$Properties} message CMsgGCMsgSetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgSetOptions.encode = function encode(message, writer) { + CMsgGCMsgSetOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.options != null && message.options.length) for (var i = 0; i < message.options.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.options[i]); if (message.client_msg_ranges != null && message.client_msg_ranges.length) for (var i = 0; i < message.client_msg_ranges.length; ++i) - $root.CMsgGCMsgSetOptions.MessageRange.encode(message.client_msg_ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gcsql_version != null && Object.hasOwnProperty.call(message, "gcsql_version")) + $root.CMsgGCMsgSetOptions.MessageRange.encode(message.client_msg_ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.gcsql_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27459,12 +35804,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions} message CMsgGCMsgSetOptions message or plain object to encode + * @param {CMsgGCMsgSetOptions.$Properties} message CMsgGCMsgSetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgSetOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgSetOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27474,40 +35819,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions + * @returns {CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape} CMsgGCMsgSetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgSetOptions.decode = function decode(reader, length) { + CMsgGCMsgSetOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgSetOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgSetOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.options && message.options.length)) - message.options = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.options.push(reader.int32()); - } else - message.options.push(reader.int32()); - break; - case 2: - if (!(message.client_msg_ranges && message.client_msg_ranges.length)) - message.client_msg_ranges = []; - message.client_msg_ranges.push($root.CMsgGCMsgSetOptions.MessageRange.decode(reader, reader.uint32())); - break; - case 3: - message.gcsql_version = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + start = reader.pos; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.Option[value] !== $undefined) { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push($util.rawField(1, 0, reader.raw(start, reader.pos))); + } + } + continue; + } + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.Option[value] !== $undefined) { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.client_msg_ranges && message.client_msg_ranges.length)) + message.client_msg_ranges = []; + message.client_msg_ranges.push($root.CMsgGCMsgSetOptions.MessageRange.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.GCSQLVersion[value] !== $undefined) + message.gcsql_version = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27517,11 +35908,11 @@ * @memberof CMsgGCMsgSetOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions + * @returns {CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape} CMsgGCMsgSetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgSetOptions.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgSetOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27535,11 +35926,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgSetOptions.verify = function verify(message) { + CMsgGCMsgSetOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + if (!$Array.isArray(message.options)) return "options: array expected"; for (var i = 0; i < message.options.length; ++i) switch (message.options[i]) { @@ -27552,16 +35947,16 @@ break; } } - if (message.client_msg_ranges != null && message.hasOwnProperty("client_msg_ranges")) { - if (!Array.isArray(message.client_msg_ranges)) + if (message.client_msg_ranges != null && $Object.hasOwnProperty.call(message, "client_msg_ranges")) { + if (!$Array.isArray(message.client_msg_ranges)) return "client_msg_ranges: array expected"; for (var i = 0; i < message.client_msg_ranges.length; ++i) { - var error = $root.CMsgGCMsgSetOptions.MessageRange.verify(message.client_msg_ranges[i]); + var error = $root.CMsgGCMsgSetOptions.MessageRange.verify(message.client_msg_ranges[i], _depth + 1); if (error) return "client_msg_ranges." + error; } } - if (message.gcsql_version != null && message.hasOwnProperty("gcsql_version")) + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) switch (message.gcsql_version) { default: return "gcsql_version: enum value expected"; @@ -27580,43 +35975,49 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions */ - CMsgGCMsgSetOptions.fromObject = function fromObject(object) { + CMsgGCMsgSetOptions.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgSetOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgSetOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgSetOptions(); if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".CMsgGCMsgSetOptions.options: array expected"); + if (!$Array.isArray(object.options)) + throw $TypeError(".CMsgGCMsgSetOptions.options: array expected"); message.options = []; for (var i = 0; i < object.options.length; ++i) switch (object.options[i]) { - default: case "NOTIFY_USER_SESSIONS": case 0: - message.options[i] = 0; + message.options[message.options.length] = 0; break; case "NOTIFY_SERVER_SESSIONS": case 1: - message.options[i] = 1; + message.options[message.options.length] = 1; break; case "NOTIFY_ACHIEVEMENTS": case 2: - message.options[i] = 2; + message.options[message.options.length] = 2; break; case "NOTIFY_VAC_ACTION": case 3: - message.options[i] = 3; + message.options[message.options.length] = 3; break; + default: } } if (object.client_msg_ranges) { - if (!Array.isArray(object.client_msg_ranges)) - throw TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: array expected"); - message.client_msg_ranges = []; + if (!$Array.isArray(object.client_msg_ranges)) + throw $TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: array expected"); + message.client_msg_ranges = $Array(object.client_msg_ranges.length); for (var i = 0; i < object.client_msg_ranges.length; ++i) { - if (typeof object.client_msg_ranges[i] !== "object") - throw TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: object expected"); - message.client_msg_ranges[i] = $root.CMsgGCMsgSetOptions.MessageRange.fromObject(object.client_msg_ranges[i]); + if (!$util.isObject(object.client_msg_ranges[i])) + throw $TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: object expected"); + message.client_msg_ranges[i] = $root.CMsgGCMsgSetOptions.MessageRange.fromObject(object.client_msg_ranges[i], _depth + 1); } } switch (object.gcsql_version) { @@ -27628,6 +36029,7 @@ case 2: message.gcsql_version = 2; break; + default: } return message; }; @@ -27641,28 +36043,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgSetOptions.toObject = function toObject(message, options) { + CMsgGCMsgSetOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.options = []; object.client_msg_ranges = []; } if (options.defaults) - object.gcsql_version = options.enums === String ? "GCSQL_VERSION_BASELINE" : 1; + object.gcsql_version = options.enums === $String ? "GCSQL_VERSION_BASELINE" : 1; if (message.options && message.options.length) { - object.options = []; + object.options = $Array(message.options.length); for (var j = 0; j < message.options.length; ++j) - object.options[j] = options.enums === String ? $root.CMsgGCMsgSetOptions.Option[message.options[j]] : message.options[j]; + object.options[j] = options.enums === $String ? $root.CMsgGCMsgSetOptions.Option[message.options[j]] === $undefined ? message.options[j] : $root.CMsgGCMsgSetOptions.Option[message.options[j]] : message.options[j]; } if (message.client_msg_ranges && message.client_msg_ranges.length) { - object.client_msg_ranges = []; + object.client_msg_ranges = $Array(message.client_msg_ranges.length); for (var j = 0; j < message.client_msg_ranges.length; ++j) - object.client_msg_ranges[j] = $root.CMsgGCMsgSetOptions.MessageRange.toObject(message.client_msg_ranges[j], options); + object.client_msg_ranges[j] = $root.CMsgGCMsgSetOptions.MessageRange.toObject(message.client_msg_ranges[j], options, _depth + 1); } - if (message.gcsql_version != null && message.hasOwnProperty("gcsql_version")) - object.gcsql_version = options.enums === String ? $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] : message.gcsql_version; + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) + object.gcsql_version = options.enums === $String ? $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] === $undefined ? message.gcsql_version : $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] : message.gcsql_version; return object; }; @@ -27673,34 +36079,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgSetOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgSetOptions.prototype.toJSON = function() { + return CMsgGCMsgSetOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgSetOptions + * @function getTypeUrl + * @memberof CMsgGCMsgSetOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgSetOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgSetOptions"; }; CMsgGCMsgSetOptions.MessageRange = (function() { /** * Properties of a MessageRange. - * @memberof CMsgGCMsgSetOptions - * @interface IMessageRange + * @typedef {Object} CMsgGCMsgSetOptions.MessageRange.$Properties * @property {number} low MessageRange low * @property {number} high MessageRange high + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MessageRange. + * @memberof CMsgGCMsgSetOptions + * @interface IMessageRange + * @augments CMsgGCMsgSetOptions.MessageRange.$Properties + * @deprecated Use CMsgGCMsgSetOptions.MessageRange.$Properties instead. + */ + + /** + * Shape of a MessageRange. + * @typedef {CMsgGCMsgSetOptions.MessageRange.$Properties} CMsgGCMsgSetOptions.MessageRange.$Shape */ /** * Constructs a new MessageRange. * @memberof CMsgGCMsgSetOptions * @classdesc Represents a MessageRange. - * @implements IMessageRange * @constructor - * @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MessageRange(properties) { + var MessageRange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MessageRange low. @@ -27723,10 +36156,14 @@ * @function create * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange instance + * @type {{ + * (properties: CMsgGCMsgSetOptions.MessageRange.$Shape): CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape; + * (properties?: CMsgGCMsgSetOptions.MessageRange.$Properties): CMsgGCMsgSetOptions.MessageRange; + * }} */ - MessageRange.create = function create(properties) { + MessageRange.create = function(properties) { return new MessageRange(properties); }; @@ -27735,15 +36172,22 @@ * @function encode * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange} message MessageRange message or plain object to encode + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties} message MessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageRange.encode = function encode(message, writer) { + MessageRange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.low); writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.high); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27752,12 +36196,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange} message MessageRange message or plain object to encode + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties} message MessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageRange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27767,31 +36211,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange + * @returns {CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape} MessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageRange.decode = function decode(reader, length) { + MessageRange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgSetOptions.MessageRange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgSetOptions.MessageRange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.low = reader.uint32(); - break; - case 2: - message.high = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.low = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.high = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("low")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "low")) throw $util.ProtocolError("missing required 'low'", { instance: message }); - if (!message.hasOwnProperty("high")) + if (!$Object.hasOwnProperty.call(message, "high")) throw $util.ProtocolError("missing required 'high'", { instance: message }); return message; }; @@ -27802,11 +36266,11 @@ * @memberof CMsgGCMsgSetOptions.MessageRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange + * @returns {CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape} MessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageRange.decodeDelimited = function decodeDelimited(reader) { + MessageRange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27820,9 +36284,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageRange.verify = function verify(message) { + MessageRange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isInteger(message.low)) return "low: integer expected"; if (!$util.isInteger(message.high)) @@ -27838,9 +36306,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange */ - MessageRange.fromObject = function fromObject(object) { + MessageRange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgSetOptions.MessageRange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgSetOptions.MessageRange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgSetOptions.MessageRange(); if (object.low != null) message.low = object.low >>> 0; @@ -27858,17 +36332,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageRange.toObject = function toObject(message, options) { + MessageRange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.low = 0; object.high = 0; } - if (message.low != null && message.hasOwnProperty("low")) + if (message.low != null && $Object.hasOwnProperty.call(message, "low")) object.low = message.low; - if (message.high != null && message.hasOwnProperty("high")) + if (message.high != null && $Object.hasOwnProperty.call(message, "high")) object.high = message.high; return object; }; @@ -27880,8 +36358,22 @@ * @instance * @returns {Object.} JSON object */ - MessageRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MessageRange.prototype.toJSON = function() { + return MessageRange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MessageRange + * @function getTypeUrl + * @memberof CMsgGCMsgSetOptions.MessageRange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MessageRange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgSetOptions.MessageRange"; }; return MessageRange; @@ -27897,7 +36389,7 @@ * @property {number} NOTIFY_VAC_ACTION=3 NOTIFY_VAC_ACTION value */ CMsgGCMsgSetOptions.Option = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "NOTIFY_USER_SESSIONS"] = 0; values[valuesById[1] = "NOTIFY_SERVER_SESSIONS"] = 1; values[valuesById[2] = "NOTIFY_ACHIEVEMENTS"] = 2; @@ -27913,7 +36405,7 @@ * @property {number} GCSQL_VERSION_BOOLTYPE=2 GCSQL_VERSION_BOOLTYPE value */ CMsgGCMsgSetOptions.GCSQLVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "GCSQL_VERSION_BASELINE"] = 1; values[valuesById[2] = "GCSQL_VERSION_BOOLTYPE"] = 2; return values; @@ -27926,8 +36418,7 @@ /** * Properties of a CMsgGCHUpdateSession. - * @exports ICMsgGCHUpdateSession - * @interface ICMsgGCHUpdateSession + * @typedef {Object} CMsgGCHUpdateSession.$Properties * @property {number|Long|null} [steam_id] CMsgGCHUpdateSession steam_id * @property {number|null} [app_id] CMsgGCHUpdateSession app_id * @property {boolean|null} [online] CMsgGCHUpdateSession online @@ -27936,24 +36427,38 @@ * @property {number|null} [server_port] CMsgGCHUpdateSession server_port * @property {number|null} [os_type] CMsgGCHUpdateSession os_type * @property {number|null} [client_addr] CMsgGCHUpdateSession client_addr - * @property {Array.|null} [extra_fields] CMsgGCHUpdateSession extra_fields + * @property {Array.|null} [extra_fields] CMsgGCHUpdateSession extra_fields + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHUpdateSession. + * @exports ICMsgGCHUpdateSession + * @interface ICMsgGCHUpdateSession + * @augments CMsgGCHUpdateSession.$Properties + * @deprecated Use CMsgGCHUpdateSession.$Properties instead. + */ + + /** + * Shape of a CMsgGCHUpdateSession. + * @typedef {CMsgGCHUpdateSession.$Properties} CMsgGCHUpdateSession.$Shape */ /** * Constructs a new CMsgGCHUpdateSession. * @exports CMsgGCHUpdateSession * @classdesc Represents a CMsgGCHUpdateSession. - * @implements ICMsgGCHUpdateSession * @constructor - * @param {ICMsgGCHUpdateSession=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHUpdateSession(properties) { + var CMsgGCHUpdateSession = function (properties) { this.extra_fields = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHUpdateSession steam_id. @@ -27961,7 +36466,7 @@ * @memberof CMsgGCHUpdateSession * @instance */ - CMsgGCHUpdateSession.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHUpdateSession.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHUpdateSession app_id. @@ -27985,7 +36490,7 @@ * @memberof CMsgGCHUpdateSession * @instance */ - CMsgGCHUpdateSession.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHUpdateSession.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHUpdateSession server_addr. @@ -28021,7 +36526,7 @@ /** * CMsgGCHUpdateSession extra_fields. - * @member {Array.} extra_fields + * @member {Array.} extra_fields * @memberof CMsgGCHUpdateSession * @instance */ @@ -28032,10 +36537,14 @@ * @function create * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.$Properties=} [properties] Properties to set * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession instance + * @type {{ + * (properties: CMsgGCHUpdateSession.$Shape): CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape; + * (properties?: CMsgGCHUpdateSession.$Properties): CMsgGCHUpdateSession; + * }} */ - CMsgGCHUpdateSession.create = function create(properties) { + CMsgGCHUpdateSession.create = function(properties) { return new CMsgGCHUpdateSession(properties); }; @@ -28044,32 +36553,39 @@ * @function encode * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession} message CMsgGCHUpdateSession message or plain object to encode + * @param {CMsgGCHUpdateSession.$Properties} message CMsgGCHUpdateSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHUpdateSession.encode = function encode(message, writer) { + CMsgGCHUpdateSession.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id); - if (message.online != null && Object.hasOwnProperty.call(message, "online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.online); - if (message.server_steam_id != null && Object.hasOwnProperty.call(message, "server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.server_steam_id); - if (message.server_addr != null && Object.hasOwnProperty.call(message, "server_addr")) + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.server_addr); - if (message.server_port != null && Object.hasOwnProperty.call(message, "server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.server_port); - if (message.os_type != null && Object.hasOwnProperty.call(message, "os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.os_type); - if (message.client_addr != null && Object.hasOwnProperty.call(message, "client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.client_addr); if (message.extra_fields != null && message.extra_fields.length) for (var i = 0; i < message.extra_fields.length; ++i) - $root.CMsgGCHUpdateSession.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.CMsgGCHUpdateSession.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28078,12 +36594,12 @@ * @function encodeDelimited * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession} message CMsgGCHUpdateSession message or plain object to encode + * @param {CMsgGCHUpdateSession.$Properties} message CMsgGCHUpdateSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHUpdateSession.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHUpdateSession.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28093,51 +36609,92 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession + * @returns {CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape} CMsgGCHUpdateSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHUpdateSession.decode = function decode(reader, length) { + CMsgGCHUpdateSession.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHUpdateSession(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHUpdateSession(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.app_id = reader.uint32(); - break; - case 3: - message.online = reader.bool(); - break; - case 4: - message.server_steam_id = reader.fixed64(); - break; - case 5: - message.server_addr = reader.uint32(); - break; - case 6: - message.server_port = reader.uint32(); - break; - case 7: - message.os_type = reader.uint32(); - break; - case 8: - message.client_addr = reader.uint32(); - break; - case 9: - if (!(message.extra_fields && message.extra_fields.length)) - message.extra_fields = []; - message.extra_fields.push($root.CMsgGCHUpdateSession.ExtraField.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.online = reader.bool(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.server_steam_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.server_addr = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.server_port = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.os_type = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.client_addr = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 2) + break; + if (!(message.extra_fields && message.extra_fields.length)) + message.extra_fields = []; + message.extra_fields.push($root.CMsgGCHUpdateSession.ExtraField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28147,11 +36704,11 @@ * @memberof CMsgGCHUpdateSession * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession + * @returns {CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape} CMsgGCHUpdateSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHUpdateSession.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHUpdateSession.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28165,38 +36722,42 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHUpdateSession.verify = function verify(message) { + CMsgGCHUpdateSession.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) if (typeof message.online !== "boolean") return "online: boolean expected"; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) if (!$util.isInteger(message.server_steam_id) && !(message.server_steam_id && $util.isInteger(message.server_steam_id.low) && $util.isInteger(message.server_steam_id.high))) return "server_steam_id: integer|Long expected"; - if (message.server_addr != null && message.hasOwnProperty("server_addr")) + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) if (!$util.isInteger(message.server_addr)) return "server_addr: integer expected"; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) if (!$util.isInteger(message.server_port)) return "server_port: integer expected"; - if (message.os_type != null && message.hasOwnProperty("os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) if (!$util.isInteger(message.os_type)) return "os_type: integer expected"; - if (message.client_addr != null && message.hasOwnProperty("client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) if (!$util.isInteger(message.client_addr)) return "client_addr: integer expected"; - if (message.extra_fields != null && message.hasOwnProperty("extra_fields")) { - if (!Array.isArray(message.extra_fields)) + if (message.extra_fields != null && $Object.hasOwnProperty.call(message, "extra_fields")) { + if (!$Array.isArray(message.extra_fields)) return "extra_fields: array expected"; for (var i = 0; i < message.extra_fields.length; ++i) { - var error = $root.CMsgGCHUpdateSession.ExtraField.verify(message.extra_fields[i]); + var error = $root.CMsgGCHUpdateSession.ExtraField.verify(message.extra_fields[i], _depth + 1); if (error) return "extra_fields." + error; } @@ -28212,32 +36773,38 @@ * @param {Object.} object Plain object * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession */ - CMsgGCHUpdateSession.fromObject = function fromObject(object) { + CMsgGCHUpdateSession.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHUpdateSession) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHUpdateSession: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHUpdateSession(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.online != null) - message.online = Boolean(object.online); + message.online = $Boolean(object.online); if (object.server_steam_id != null) if ($util.Long) - (message.server_steam_id = $util.Long.fromValue(object.server_steam_id)).unsigned = false; + message.server_steam_id = $util.Long.fromValue(object.server_steam_id, true); else if (typeof object.server_steam_id === "string") - message.server_steam_id = parseInt(object.server_steam_id, 10); + message.server_steam_id = $parseInt(object.server_steam_id, 10); else if (typeof object.server_steam_id === "number") message.server_steam_id = object.server_steam_id; else if (typeof object.server_steam_id === "object") - message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(); + message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(true); if (object.server_addr != null) message.server_addr = object.server_addr >>> 0; if (object.server_port != null) @@ -28247,13 +36814,13 @@ if (object.client_addr != null) message.client_addr = object.client_addr >>> 0; if (object.extra_fields) { - if (!Array.isArray(object.extra_fields)) - throw TypeError(".CMsgGCHUpdateSession.extra_fields: array expected"); - message.extra_fields = []; + if (!$Array.isArray(object.extra_fields)) + throw $TypeError(".CMsgGCHUpdateSession.extra_fields: array expected"); + message.extra_fields = $Array(object.extra_fields.length); for (var i = 0; i < object.extra_fields.length; ++i) { - if (typeof object.extra_fields[i] !== "object") - throw TypeError(".CMsgGCHUpdateSession.extra_fields: object expected"); - message.extra_fields[i] = $root.CMsgGCHUpdateSession.ExtraField.fromObject(object.extra_fields[i]); + if (!$util.isObject(object.extra_fields[i])) + throw $TypeError(".CMsgGCHUpdateSession.extra_fields: object expected"); + message.extra_fields[i] = $root.CMsgGCHUpdateSession.ExtraField.fromObject(object.extra_fields[i], _depth + 1); } } return message; @@ -28268,56 +36835,64 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHUpdateSession.toObject = function toObject(message, options) { + CMsgGCHUpdateSession.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.extra_fields = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.app_id = 0; object.online = false; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.server_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.server_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.server_steam_id = options.longs === String ? "0" : 0; + object.server_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.server_addr = 0; object.server_port = 0; object.os_type = 0; object.client_addr = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) object.online = message.online; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) - if (typeof message.server_steam_id === "number") - object.server_steam_id = options.longs === String ? String(message.server_steam_id) : message.server_steam_id; + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.server_steam_id = typeof message.server_steam_id === "number" ? $BigInt(message.server_steam_id) : $util.Long.fromBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.server_steam_id === "number") + object.server_steam_id = options.longs === $String ? $String(message.server_steam_id) : message.server_steam_id; else - object.server_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber() : message.server_steam_id; - if (message.server_addr != null && message.hasOwnProperty("server_addr")) + object.server_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === $Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber(true) : message.server_steam_id; + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) object.server_addr = message.server_addr; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) object.server_port = message.server_port; - if (message.os_type != null && message.hasOwnProperty("os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) object.os_type = message.os_type; - if (message.client_addr != null && message.hasOwnProperty("client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) object.client_addr = message.client_addr; if (message.extra_fields && message.extra_fields.length) { - object.extra_fields = []; + object.extra_fields = $Array(message.extra_fields.length); for (var j = 0; j < message.extra_fields.length; ++j) - object.extra_fields[j] = $root.CMsgGCHUpdateSession.ExtraField.toObject(message.extra_fields[j], options); + object.extra_fields[j] = $root.CMsgGCHUpdateSession.ExtraField.toObject(message.extra_fields[j], options, _depth + 1); } return object; }; @@ -28329,34 +36904,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHUpdateSession.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHUpdateSession.prototype.toJSON = function() { + return CMsgGCHUpdateSession.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHUpdateSession + * @function getTypeUrl + * @memberof CMsgGCHUpdateSession + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHUpdateSession.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHUpdateSession"; }; CMsgGCHUpdateSession.ExtraField = (function() { /** * Properties of an ExtraField. - * @memberof CMsgGCHUpdateSession - * @interface IExtraField + * @typedef {Object} CMsgGCHUpdateSession.ExtraField.$Properties * @property {string|null} [name] ExtraField name * @property {string|null} [value] ExtraField value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtraField. + * @memberof CMsgGCHUpdateSession + * @interface IExtraField + * @augments CMsgGCHUpdateSession.ExtraField.$Properties + * @deprecated Use CMsgGCHUpdateSession.ExtraField.$Properties instead. + */ + + /** + * Shape of an ExtraField. + * @typedef {CMsgGCHUpdateSession.ExtraField.$Properties} CMsgGCHUpdateSession.ExtraField.$Shape */ /** * Constructs a new ExtraField. * @memberof CMsgGCHUpdateSession * @classdesc Represents an ExtraField. - * @implements IExtraField * @constructor - * @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.ExtraField.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtraField(properties) { + var ExtraField = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtraField name. @@ -28379,10 +36981,14 @@ * @function create * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.ExtraField.$Properties=} [properties] Properties to set * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField instance + * @type {{ + * (properties: CMsgGCHUpdateSession.ExtraField.$Shape): CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape; + * (properties?: CMsgGCHUpdateSession.ExtraField.$Properties): CMsgGCHUpdateSession.ExtraField; + * }} */ - ExtraField.create = function create(properties) { + ExtraField.create = function(properties) { return new ExtraField(properties); }; @@ -28391,17 +36997,24 @@ * @function encode * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgGCHUpdateSession.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encode = function encode(message, writer) { + ExtraField.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28410,12 +37023,12 @@ * @function encodeDelimited * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgGCHUpdateSession.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtraField.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28425,28 +37038,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField + * @returns {CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decode = function decode(reader, length) { + ExtraField.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHUpdateSession.ExtraField(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHUpdateSession.ExtraField(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28456,11 +37089,11 @@ * @memberof CMsgGCHUpdateSession.ExtraField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField + * @returns {CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decodeDelimited = function decodeDelimited(reader) { + ExtraField.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28474,13 +37107,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtraField.verify = function verify(message) { + ExtraField.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -28494,14 +37131,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField */ - ExtraField.fromObject = function fromObject(object) { + ExtraField.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHUpdateSession.ExtraField) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHUpdateSession.ExtraField: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHUpdateSession.ExtraField(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -28514,17 +37157,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtraField.toObject = function toObject(message, options) { + ExtraField.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -28536,8 +37183,22 @@ * @instance * @returns {Object.} JSON object */ - ExtraField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtraField.prototype.toJSON = function() { + return ExtraField.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtraField + * @function getTypeUrl + * @memberof CMsgGCHUpdateSession.ExtraField + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtraField.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHUpdateSession.ExtraField"; }; return ExtraField; @@ -28550,27 +37211,40 @@ /** * Properties of a CMsgNotificationOfSuspiciousActivity. - * @exports ICMsgNotificationOfSuspiciousActivity - * @interface ICMsgNotificationOfSuspiciousActivity + * @typedef {Object} CMsgNotificationOfSuspiciousActivity.$Properties * @property {number|Long|null} [steamid] CMsgNotificationOfSuspiciousActivity steamid * @property {number|null} [appid] CMsgNotificationOfSuspiciousActivity appid - * @property {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null} [multiple_instances] CMsgNotificationOfSuspiciousActivity multiple_instances + * @property {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties|null} [multiple_instances] CMsgNotificationOfSuspiciousActivity multiple_instances + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgNotificationOfSuspiciousActivity. + * @exports ICMsgNotificationOfSuspiciousActivity + * @interface ICMsgNotificationOfSuspiciousActivity + * @augments CMsgNotificationOfSuspiciousActivity.$Properties + * @deprecated Use CMsgNotificationOfSuspiciousActivity.$Properties instead. + */ + + /** + * Shape of a CMsgNotificationOfSuspiciousActivity. + * @typedef {CMsgNotificationOfSuspiciousActivity.$Properties} CMsgNotificationOfSuspiciousActivity.$Shape */ /** * Constructs a new CMsgNotificationOfSuspiciousActivity. * @exports CMsgNotificationOfSuspiciousActivity * @classdesc Represents a CMsgNotificationOfSuspiciousActivity. - * @implements ICMsgNotificationOfSuspiciousActivity * @constructor - * @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotificationOfSuspiciousActivity(properties) { + var CMsgNotificationOfSuspiciousActivity = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgNotificationOfSuspiciousActivity steamid. @@ -28578,7 +37252,7 @@ * @memberof CMsgNotificationOfSuspiciousActivity * @instance */ - CMsgNotificationOfSuspiciousActivity.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgNotificationOfSuspiciousActivity.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgNotificationOfSuspiciousActivity appid. @@ -28590,7 +37264,7 @@ /** * CMsgNotificationOfSuspiciousActivity multiple_instances. - * @member {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null|undefined} multiple_instances + * @member {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties|null|undefined} multiple_instances * @memberof CMsgNotificationOfSuspiciousActivity * @instance */ @@ -28601,10 +37275,14 @@ * @function create * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.$Properties=} [properties] Properties to set * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity instance + * @type {{ + * (properties: CMsgNotificationOfSuspiciousActivity.$Shape): CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape; + * (properties?: CMsgNotificationOfSuspiciousActivity.$Properties): CMsgNotificationOfSuspiciousActivity; + * }} */ - CMsgNotificationOfSuspiciousActivity.create = function create(properties) { + CMsgNotificationOfSuspiciousActivity.create = function(properties) { return new CMsgNotificationOfSuspiciousActivity(properties); }; @@ -28613,19 +37291,26 @@ * @function encode * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity} message CMsgNotificationOfSuspiciousActivity message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.$Properties} message CMsgNotificationOfSuspiciousActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationOfSuspiciousActivity.encode = function encode(message, writer) { + CMsgNotificationOfSuspiciousActivity.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.multiple_instances != null && Object.hasOwnProperty.call(message, "multiple_instances")) - $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.encode(message.multiple_instances, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) + $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.encode(message.multiple_instances, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28634,12 +37319,12 @@ * @function encodeDelimited * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity} message CMsgNotificationOfSuspiciousActivity message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.$Properties} message CMsgNotificationOfSuspiciousActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationOfSuspiciousActivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotificationOfSuspiciousActivity.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28649,31 +37334,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity + * @returns {CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape} CMsgNotificationOfSuspiciousActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationOfSuspiciousActivity.decode = function decode(reader, length) { + CMsgNotificationOfSuspiciousActivity.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationOfSuspiciousActivity(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationOfSuspiciousActivity(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.decode(reader, reader.uint32(), $undefined, _depth + 1, message.multiple_instances); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28683,11 +37391,11 @@ * @memberof CMsgNotificationOfSuspiciousActivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity + * @returns {CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape} CMsgNotificationOfSuspiciousActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationOfSuspiciousActivity.decodeDelimited = function decodeDelimited(reader) { + CMsgNotificationOfSuspiciousActivity.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28701,17 +37409,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotificationOfSuspiciousActivity.verify = function verify(message) { + CMsgNotificationOfSuspiciousActivity.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.multiple_instances != null && message.hasOwnProperty("multiple_instances")) { - var error = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify(message.multiple_instances); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) { + var error = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify(message.multiple_instances, _depth + 1); if (error) return "multiple_instances." + error; } @@ -28726,25 +37438,31 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity */ - CMsgNotificationOfSuspiciousActivity.fromObject = function fromObject(object) { + CMsgNotificationOfSuspiciousActivity.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationOfSuspiciousActivity) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotificationOfSuspiciousActivity(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.multiple_instances != null) { - if (typeof object.multiple_instances !== "object") - throw TypeError(".CMsgNotificationOfSuspiciousActivity.multiple_instances: object expected"); - message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.fromObject(object.multiple_instances); + if (!$util.isObject(object.multiple_instances)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.multiple_instances: object expected"); + message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.fromObject(object.multiple_instances, _depth + 1); } return message; }; @@ -28758,28 +37476,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotificationOfSuspiciousActivity.toObject = function toObject(message, options) { + CMsgNotificationOfSuspiciousActivity.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.multiple_instances = null; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.multiple_instances != null && message.hasOwnProperty("multiple_instances")) - object.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.toObject(message.multiple_instances, options); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) + object.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.toObject(message.multiple_instances, options, _depth + 1); return object; }; @@ -28790,35 +37514,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotificationOfSuspiciousActivity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotificationOfSuspiciousActivity.prototype.toJSON = function() { + return CMsgNotificationOfSuspiciousActivity.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotificationOfSuspiciousActivity + * @function getTypeUrl + * @memberof CMsgNotificationOfSuspiciousActivity + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotificationOfSuspiciousActivity.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationOfSuspiciousActivity"; }; CMsgNotificationOfSuspiciousActivity.MultipleGameInstances = (function() { /** * Properties of a MultipleGameInstances. - * @memberof CMsgNotificationOfSuspiciousActivity - * @interface IMultipleGameInstances + * @typedef {Object} CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties * @property {number|null} [app_instance_count] MultipleGameInstances app_instance_count * @property {Array.|null} [other_steamids] MultipleGameInstances other_steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MultipleGameInstances. + * @memberof CMsgNotificationOfSuspiciousActivity + * @interface IMultipleGameInstances + * @augments CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties + * @deprecated Use CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties instead. + */ + + /** + * Shape of a MultipleGameInstances. + * @typedef {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape */ /** * Constructs a new MultipleGameInstances. * @memberof CMsgNotificationOfSuspiciousActivity * @classdesc Represents a MultipleGameInstances. - * @implements IMultipleGameInstances * @constructor - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MultipleGameInstances(properties) { + var MultipleGameInstances = function (properties) { this.other_steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MultipleGameInstances app_instance_count. @@ -28841,10 +37592,14 @@ * @function create * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties=} [properties] Properties to set * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances instance + * @type {{ + * (properties: CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape): CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape; + * (properties?: CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties): CMsgNotificationOfSuspiciousActivity.MultipleGameInstances; + * }} */ - MultipleGameInstances.create = function create(properties) { + MultipleGameInstances.create = function(properties) { return new MultipleGameInstances(properties); }; @@ -28853,18 +37608,25 @@ * @function encode * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} message MultipleGameInstances message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} message MultipleGameInstances message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultipleGameInstances.encode = function encode(message, writer) { + MultipleGameInstances.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_instance_count != null && Object.hasOwnProperty.call(message, "app_instance_count")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_instance_count); if (message.other_steamids != null && message.other_steamids.length) for (var i = 0; i < message.other_steamids.length; ++i) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.other_steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28873,12 +37635,12 @@ * @function encodeDelimited * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} message MultipleGameInstances message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} message MultipleGameInstances message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultipleGameInstances.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MultipleGameInstances.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28888,35 +37650,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances + * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape} MultipleGameInstances * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultipleGameInstances.decode = function decode(reader, length) { + MultipleGameInstances.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_instance_count = reader.uint32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.other_steamids && message.other_steamids.length)) - message.other_steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.other_steamids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_instance_count = reader.uint32(); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.other_steamids && message.other_steamids.length)) + message.other_steamids = []; + reader.fixed64s(message.other_steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.other_steamids && message.other_steamids.length)) + message.other_steamids = []; message.other_steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28926,11 +37709,11 @@ * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances + * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape} MultipleGameInstances * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultipleGameInstances.decodeDelimited = function decodeDelimited(reader) { + MultipleGameInstances.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28944,14 +37727,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MultipleGameInstances.verify = function verify(message) { + MultipleGameInstances.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_instance_count != null && message.hasOwnProperty("app_instance_count")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) if (!$util.isInteger(message.app_instance_count)) return "app_instance_count: integer expected"; - if (message.other_steamids != null && message.hasOwnProperty("other_steamids")) { - if (!Array.isArray(message.other_steamids)) + if (message.other_steamids != null && $Object.hasOwnProperty.call(message, "other_steamids")) { + if (!$Array.isArray(message.other_steamids)) return "other_steamids: array expected"; for (var i = 0; i < message.other_steamids.length; ++i) if (!$util.isInteger(message.other_steamids[i]) && !(message.other_steamids[i] && $util.isInteger(message.other_steamids[i].low) && $util.isInteger(message.other_steamids[i].high))) @@ -28968,25 +37755,31 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances */ - MultipleGameInstances.fromObject = function fromObject(object) { + MultipleGameInstances.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); if (object.app_instance_count != null) message.app_instance_count = object.app_instance_count >>> 0; if (object.other_steamids) { - if (!Array.isArray(object.other_steamids)) - throw TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.other_steamids: array expected"); - message.other_steamids = []; + if (!$Array.isArray(object.other_steamids)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.other_steamids: array expected"); + message.other_steamids = $Array(object.other_steamids.length); for (var i = 0; i < object.other_steamids.length; ++i) if ($util.Long) - (message.other_steamids[i] = $util.Long.fromValue(object.other_steamids[i])).unsigned = false; + message.other_steamids[i] = $util.Long.fromValue(object.other_steamids[i], true); else if (typeof object.other_steamids[i] === "string") - message.other_steamids[i] = parseInt(object.other_steamids[i], 10); + message.other_steamids[i] = $parseInt(object.other_steamids[i], 10); else if (typeof object.other_steamids[i] === "number") message.other_steamids[i] = object.other_steamids[i]; else if (typeof object.other_steamids[i] === "object") - message.other_steamids[i] = new $util.LongBits(object.other_steamids[i].low >>> 0, object.other_steamids[i].high >>> 0).toNumber(); + message.other_steamids[i] = new $util.LongBits(object.other_steamids[i].low >>> 0, object.other_steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -29000,23 +37793,29 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MultipleGameInstances.toObject = function toObject(message, options) { + MultipleGameInstances.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.other_steamids = []; if (options.defaults) object.app_instance_count = 0; - if (message.app_instance_count != null && message.hasOwnProperty("app_instance_count")) + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) object.app_instance_count = message.app_instance_count; if (message.other_steamids && message.other_steamids.length) { - object.other_steamids = []; + object.other_steamids = $Array(message.other_steamids.length); for (var j = 0; j < message.other_steamids.length; ++j) - if (typeof message.other_steamids[j] === "number") - object.other_steamids[j] = options.longs === String ? String(message.other_steamids[j]) : message.other_steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.other_steamids[j] = typeof message.other_steamids[j] === "number" ? $BigInt(message.other_steamids[j]) : $util.Long.fromBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.other_steamids[j] === "number") + object.other_steamids[j] = options.longs === $String ? $String(message.other_steamids[j]) : message.other_steamids[j]; else - object.other_steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.other_steamids[j]) : options.longs === Number ? new $util.LongBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0).toNumber() : message.other_steamids[j]; + object.other_steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.other_steamids[j]) : options.longs === $Number ? new $util.LongBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0).toNumber(true) : message.other_steamids[j]; } return object; }; @@ -29028,8 +37827,22 @@ * @instance * @returns {Object.} JSON object */ - MultipleGameInstances.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MultipleGameInstances.prototype.toJSON = function() { + return MultipleGameInstances.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MultipleGameInstances + * @function getTypeUrl + * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MultipleGameInstances.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationOfSuspiciousActivity.MultipleGameInstances"; }; return MultipleGameInstances; @@ -29058,32 +37871,45 @@ protobuf.FileDescriptorSet = (function() { + /** + * Properties of a FileDescriptorSet. + * @typedef {Object} google.protobuf.FileDescriptorSet.$Properties + * @property {Array.|null} [file] FileDescriptorSet file + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a FileDescriptorSet. * @memberof google.protobuf * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @augments google.protobuf.FileDescriptorSet.$Properties + * @deprecated Use google.protobuf.FileDescriptorSet.$Properties instead. + */ + + /** + * Shape of a FileDescriptorSet. + * @typedef {google.protobuf.FileDescriptorSet.$Properties} google.protobuf.FileDescriptorSet.$Shape */ /** * Constructs a new FileDescriptorSet. * @memberof google.protobuf * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorSet(properties) { + var FileDescriptorSet = function (properties) { this.file = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorSet file. - * @member {Array.} file + * @member {Array.} file * @memberof google.protobuf.FileDescriptorSet * @instance */ @@ -29094,10 +37920,14 @@ * @function create * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @type {{ + * (properties: google.protobuf.FileDescriptorSet.$Shape): google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape; + * (properties?: google.protobuf.FileDescriptorSet.$Properties): google.protobuf.FileDescriptorSet; + * }} */ - FileDescriptorSet.create = function create(properties) { + FileDescriptorSet.create = function(properties) { return new FileDescriptorSet(properties); }; @@ -29106,16 +37936,23 @@ * @function encode * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + FileDescriptorSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.file != null && message.file.length) for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29124,12 +37961,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29139,27 +37976,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decode = function decode(reader, length) { + FileDescriptorSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29169,11 +38023,11 @@ * @memberof google.protobuf.FileDescriptorSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29187,14 +38041,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorSet.verify = function verify(message) { + FileDescriptorSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.file != null && $Object.hasOwnProperty.call(message, "file")) { + if (!$Array.isArray(message.file)) return "file: array expected"; for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i], _depth + 1); if (error) return "file." + error; } @@ -29210,18 +38068,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - FileDescriptorSet.fromObject = function fromObject(object) { + FileDescriptorSet.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorSet(); if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; + if (!$Array.isArray(object.file)) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = $Array(object.file.length); for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + if (!$util.isObject(object.file[i])) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], _depth + 1); } } return message; @@ -29236,16 +38100,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + FileDescriptorSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.file = []; if (message.file && message.file.length) { - object.file = []; + object.file = $Array(message.file.length); for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options, _depth + 1); } return object; }; @@ -29257,8 +38125,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorSet.prototype.toJSON = function() { + return FileDescriptorSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorSet"; }; return FileDescriptorSet; @@ -29268,38 +38150,51 @@ /** * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto + * @typedef {Object} google.protobuf.FileDescriptorProto.$Properties * @property {string|null} [name] FileDescriptorProto name * @property {string|null} ["package"] FileDescriptorProto package * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.|null} [message_type] FileDescriptorProto message_type + * @property {Array.|null} [enum_type] FileDescriptorProto enum_type + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.FileOptions.$Properties|null} [options] FileDescriptorProto options + * @property {google.protobuf.SourceCodeInfo.$Properties|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @augments google.protobuf.FileDescriptorProto.$Properties + * @deprecated Use google.protobuf.FileDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FileDescriptorProto. + * @typedef {google.protobuf.FileDescriptorProto.$Properties} google.protobuf.FileDescriptorProto.$Shape */ /** * Constructs a new FileDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorProto(properties) { + var FileDescriptorProto = function (properties) { this.dependency = []; this.message_type = []; this.enum_type = []; this.service = []; this.extension = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorProto name. @@ -29327,7 +38222,7 @@ /** * FileDescriptorProto message_type. - * @member {Array.} message_type + * @member {Array.} message_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -29335,7 +38230,7 @@ /** * FileDescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -29343,7 +38238,7 @@ /** * FileDescriptorProto service. - * @member {Array.} service + * @member {Array.} service * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -29351,7 +38246,7 @@ /** * FileDescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -29359,7 +38254,7 @@ /** * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options + * @member {google.protobuf.FileOptions.$Properties|null|undefined} options * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -29367,7 +38262,7 @@ /** * FileDescriptorProto source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info + * @member {google.protobuf.SourceCodeInfo.$Properties|null|undefined} source_code_info * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -29378,10 +38273,14 @@ * @function create * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FileDescriptorProto.$Shape): google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape; + * (properties?: google.protobuf.FileDescriptorProto.$Properties): google.protobuf.FileDescriptorProto; + * }} */ - FileDescriptorProto.create = function create(properties) { + FileDescriptorProto.create = function(properties) { return new FileDescriptorProto(properties); }; @@ -29390,36 +38289,43 @@ * @function encode * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + FileDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); if (message.dependency != null && message.dependency.length) for (var i = 0; i < message.dependency.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); if (message.message_type != null && message.message_type.length) for (var i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.service != null && message.service.length) for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29428,12 +38334,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29443,59 +38349,100 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decode = function decode(reader, length) { + FileDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message["package"] = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.message_type && message.message_type.length)) + message.message_type = []; + message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.source_code_info); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29505,11 +38452,11 @@ * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29523,65 +38470,69 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorProto.verify = function verify(message) { + FileDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) if (!$util.isString(message["package"])) return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) + if (message.dependency != null && $Object.hasOwnProperty.call(message, "dependency")) { + if (!$Array.isArray(message.dependency)) return "dependency: array expected"; for (var i = 0; i < message.dependency.length; ++i) if (!$util.isString(message.dependency[i])) return "dependency: string[] expected"; } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) + if (message.message_type != null && $Object.hasOwnProperty.call(message, "message_type")) { + if (!$Array.isArray(message.message_type)) return "message_type: array expected"; for (var i = 0; i < message.message_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i], _depth + 1); if (error) return "message_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) + if (message.service != null && $Object.hasOwnProperty.call(message, "service")) { + if (!$Array.isArray(message.service)) return "service: array expected"; for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i], _depth + 1); if (error) return "service." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info, _depth + 1); if (error) return "source_code_info." + error; } @@ -29596,70 +38547,76 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - FileDescriptorProto.fromObject = function fromObject(object) { + FileDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object["package"] != null) - message["package"] = String(object["package"]); + message["package"] = $String(object["package"]); if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; + if (!$Array.isArray(object.dependency)) + throw $TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = $Array(object.dependency.length); for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); + message.dependency[i] = $String(object.dependency[i]); } if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; + if (!$Array.isArray(object.message_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); + message.message_type = $Array(object.message_type.length); for (var i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); + if (!$util.isObject(object.message_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); + message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; + if (!$Array.isArray(object.service)) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = $Array(object.service.length); for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + if (!$util.isObject(object.service[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options, _depth + 1); } if (object.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); + if (!$util.isObject(object.source_code_info)) + throw $TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); + message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info, _depth + 1); } return message; }; @@ -29673,9 +38630,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.dependency = []; @@ -29690,39 +38651,39 @@ object.options = null; object.source_code_info = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; if (message.dependency && message.dependency.length) { - object.dependency = []; + object.dependency = $Array(message.dependency.length); for (var j = 0; j < message.dependency.length; ++j) object.dependency[j] = message.dependency[j]; } if (message.message_type && message.message_type.length) { - object.message_type = []; + object.message_type = $Array(message.message_type.length); for (var j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); + object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.service && message.service.length) { - object.service = []; + object.service = $Array(message.service.length); for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, _depth + 1); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options, _depth + 1); return object; }; @@ -29733,8 +38694,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorProto.prototype.toJSON = function() { + return FileDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorProto"; }; return FileDescriptorProto; @@ -29742,38 +38717,51 @@ protobuf.DescriptorProto = (function() { + /** + * Properties of a DescriptorProto. + * @typedef {Object} google.protobuf.DescriptorProto.$Properties + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nested_type] DescriptorProto nested_type + * @property {Array.|null} [enum_type] DescriptorProto enum_type + * @property {Array.|null} [extension_range] DescriptorProto extension_range + * @property {google.protobuf.MessageOptions.$Properties|null} [options] DescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a DescriptorProto. * @memberof google.protobuf * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @augments google.protobuf.DescriptorProto.$Properties + * @deprecated Use google.protobuf.DescriptorProto.$Properties instead. + */ + + /** + * Shape of a DescriptorProto. + * @typedef {google.protobuf.DescriptorProto.$Properties} google.protobuf.DescriptorProto.$Shape */ /** * Constructs a new DescriptorProto. * @memberof google.protobuf * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function DescriptorProto(properties) { + var DescriptorProto = function (properties) { this.field = []; this.extension = []; this.nested_type = []; this.enum_type = []; this.extension_range = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * DescriptorProto name. @@ -29785,7 +38773,7 @@ /** * DescriptorProto field. - * @member {Array.} field + * @member {Array.} field * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29793,7 +38781,7 @@ /** * DescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29801,7 +38789,7 @@ /** * DescriptorProto nested_type. - * @member {Array.} nested_type + * @member {Array.} nested_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29809,7 +38797,7 @@ /** * DescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29817,7 +38805,7 @@ /** * DescriptorProto extension_range. - * @member {Array.} extension_range + * @member {Array.} extension_range * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29825,7 +38813,7 @@ /** * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options + * @member {google.protobuf.MessageOptions.$Properties|null|undefined} options * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29836,10 +38824,14 @@ * @function create * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.$Shape): google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape; + * (properties?: google.protobuf.DescriptorProto.$Properties): google.protobuf.DescriptorProto; + * }} */ - DescriptorProto.create = function create(properties) { + DescriptorProto.create = function(properties) { return new DescriptorProto(properties); }; @@ -29848,32 +38840,39 @@ * @function encode * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + DescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); if (message.nested_type != null && message.nested_type.length) for (var i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.extension_range != null && message.extension_range.length) for (var i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29882,12 +38881,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29897,53 +38896,88 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decode = function decode(reader, length) { + DescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.nested_type && message.nested_type.length)) + message.nested_type = []; + message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.extension_range && message.extension_range.length)) + message.extension_range = []; + message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29953,11 +38987,11 @@ * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + DescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29971,59 +39005,63 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DescriptorProto.verify = function verify(message) { + DescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) { + if (!$Array.isArray(message.field)) return "field: array expected"; for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i], _depth + 1); if (error) return "field." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) + if (message.nested_type != null && $Object.hasOwnProperty.call(message, "nested_type")) { + if (!$Array.isArray(message.nested_type)) return "nested_type: array expected"; for (var i = 0; i < message.nested_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i], _depth + 1); if (error) return "nested_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) + if (message.extension_range != null && $Object.hasOwnProperty.call(message, "extension_range")) { + if (!$Array.isArray(message.extension_range)) return "extension_range: array expected"; for (var i = 0; i < message.extension_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i], _depth + 1); if (error) return "extension_range." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -30038,66 +39076,72 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto} DescriptorProto */ - DescriptorProto.fromObject = function fromObject(object) { + DescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; + if (!$Array.isArray(object.field)) + throw $TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = $Array(object.field.length); for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + if (!$util.isObject(object.field[i])) + throw $TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; + if (!$Array.isArray(object.nested_type)) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); + message.nested_type = $Array(object.nested_type.length); for (var i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); + if (!$util.isObject(object.nested_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); + message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; + if (!$Array.isArray(object.extension_range)) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); + message.extension_range = $Array(object.extension_range.length); for (var i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); + if (!$util.isObject(object.extension_range[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); + message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -30111,9 +39155,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + DescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.field = []; @@ -30126,35 +39174,35 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.field && message.field.length) { - object.field = []; + object.field = $Array(message.field.length); for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options, _depth + 1); } if (message.nested_type && message.nested_type.length) { - object.nested_type = []; + object.nested_type = $Array(message.nested_type.length); for (var j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); + object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.extension_range && message.extension_range.length) { - object.extension_range = []; + object.extension_range = $Array(message.extension_range.length); for (var j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options); + object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -30165,34 +39213,61 @@ * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + DescriptorProto.prototype.toJSON = function() { + return DescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + DescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto"; }; DescriptorProto.ExtensionRange = (function() { /** * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange + * @typedef {Object} google.protobuf.DescriptorProto.ExtensionRange.$Properties * @property {number|null} [start] ExtensionRange start * @property {number|null} [end] ExtensionRange end + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @augments google.protobuf.DescriptorProto.ExtensionRange.$Properties + * @deprecated Use google.protobuf.DescriptorProto.ExtensionRange.$Properties instead. + */ + + /** + * Shape of an ExtensionRange. + * @typedef {google.protobuf.DescriptorProto.ExtensionRange.$Properties} google.protobuf.DescriptorProto.ExtensionRange.$Shape */ /** * Constructs a new ExtensionRange. * @memberof google.protobuf.DescriptorProto * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtensionRange(properties) { + var ExtensionRange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtensionRange start. @@ -30215,10 +39290,14 @@ * @function create * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.ExtensionRange.$Shape): google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape; + * (properties?: google.protobuf.DescriptorProto.ExtensionRange.$Properties): google.protobuf.DescriptorProto.ExtensionRange; + * }} */ - ExtensionRange.create = function create(properties) { + ExtensionRange.create = function(properties) { return new ExtensionRange(properties); }; @@ -30227,17 +39306,24 @@ * @function encode * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encode = function encode(message, writer) { + ExtensionRange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30246,12 +39332,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtensionRange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30261,28 +39347,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decode = function decode(reader, length) { + ExtensionRange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto.ExtensionRange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.start = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.end = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30292,11 +39398,11 @@ * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + ExtensionRange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30310,13 +39416,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtensionRange.verify = function verify(message) { + ExtensionRange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -30330,9 +39440,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange */ - ExtensionRange.fromObject = function fromObject(object) { + ExtensionRange.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); if (object.start != null) message.start = object.start | 0; @@ -30350,17 +39466,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRange.toObject = function toObject(message, options) { + ExtensionRange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -30372,8 +39492,22 @@ * @instance * @returns {Object.} JSON object */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtensionRange.prototype.toJSON = function() { + return ExtensionRange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtensionRange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto.ExtensionRange"; }; return ExtensionRange; @@ -30386,8 +39520,7 @@ /** * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto + * @typedef {Object} google.protobuf.FieldDescriptorProto.$Properties * @property {string|null} [name] FieldDescriptorProto name * @property {number|null} [number] FieldDescriptorProto number * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label @@ -30395,23 +39528,37 @@ * @property {string|null} [type_name] FieldDescriptorProto type_name * @property {string|null} [extendee] FieldDescriptorProto extendee * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {google.protobuf.FieldOptions.$Properties|null} [options] FieldDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @augments google.protobuf.FieldDescriptorProto.$Properties + * @deprecated Use google.protobuf.FieldDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FieldDescriptorProto. + * @typedef {google.protobuf.FieldDescriptorProto.$Properties} google.protobuf.FieldDescriptorProto.$Shape */ /** * Constructs a new FieldDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FieldDescriptorProto(properties) { + var FieldDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldDescriptorProto name. @@ -30471,7 +39618,7 @@ /** * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options + * @member {google.protobuf.FieldOptions.$Properties|null|undefined} options * @memberof google.protobuf.FieldDescriptorProto * @instance */ @@ -30482,10 +39629,14 @@ * @function create * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FieldDescriptorProto.$Shape): google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape; + * (properties?: google.protobuf.FieldDescriptorProto.$Properties): google.protobuf.FieldDescriptorProto; + * }} */ - FieldDescriptorProto.create = function create(properties) { + FieldDescriptorProto.create = function(properties) { return new FieldDescriptorProto(properties); }; @@ -30494,29 +39645,36 @@ * @function encode * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + FieldDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.type_name != null && Object.hasOwnProperty.call(message, "type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30525,12 +39683,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30540,46 +39698,96 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decode = function decode(reader, length) { + FieldDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldDescriptorProto(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Label[value] !== $undefined) + message.label = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 5: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Type[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 6: { + if (wireType !== 2) + break; + message.type_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.extendee = reader.string(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.default_value = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30589,11 +39797,11 @@ * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FieldDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30607,16 +39815,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldDescriptorProto.verify = function verify(message) { + FieldDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) switch (message.label) { default: return "label: enum value expected"; @@ -30625,7 +39837,7 @@ case 3: break; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -30649,17 +39861,17 @@ case 18: break; } - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) if (!$util.isString(message.type_name)) return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) if (!$util.isString(message.extendee)) return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) if (!$util.isString(message.default_value)) return "default_value: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -30674,12 +39886,18 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - FieldDescriptorProto.fromObject = function fromObject(object) { + FieldDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; switch (object.label) { @@ -30695,6 +39913,7 @@ case 3: message.label = 3; break; + default: } switch (object.type) { case "TYPE_DOUBLE": @@ -30769,17 +39988,18 @@ case 18: message.type = 18; break; + default: } if (object.type_name != null) - message.type_name = String(object.type_name); + message.type_name = $String(object.type_name); if (object.extendee != null) - message.extendee = String(object.extendee); + message.extendee = $String(object.extendee); if (object.default_value != null) - message.default_value = String(object.default_value); + message.default_value = $String(object.default_value); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -30793,36 +40013,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + FieldDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.extendee = ""; object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.label = options.enums === $String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === $String ? "TYPE_DOUBLE" : 1; object.type_name = ""; object.default_value = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) + object.label = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === $undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === $undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -30833,8 +40057,22 @@ * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldDescriptorProto.prototype.toJSON = function() { + return FieldDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldDescriptorProto"; }; /** @@ -30861,7 +40099,7 @@ * @property {number} TYPE_SINT64=18 TYPE_SINT64 value */ FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "TYPE_DOUBLE"] = 1; values[valuesById[2] = "TYPE_FLOAT"] = 2; values[valuesById[3] = "TYPE_INT64"] = 3; @@ -30892,7 +40130,7 @@ * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value */ FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "LABEL_OPTIONAL"] = 1; values[valuesById[2] = "LABEL_REQUIRED"] = 2; values[valuesById[3] = "LABEL_REPEATED"] = 3; @@ -30904,30 +40142,43 @@ protobuf.EnumDescriptorProto = (function() { + /** + * Properties of an EnumDescriptorProto. + * @typedef {Object} google.protobuf.EnumDescriptorProto.$Properties + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.EnumOptions.$Properties|null} [options] EnumDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumDescriptorProto. * @memberof google.protobuf * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @augments google.protobuf.EnumDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumDescriptorProto. + * @typedef {google.protobuf.EnumDescriptorProto.$Properties} google.protobuf.EnumDescriptorProto.$Shape */ /** * Constructs a new EnumDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumDescriptorProto(properties) { + var EnumDescriptorProto = function (properties) { this.value = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumDescriptorProto name. @@ -30939,7 +40190,7 @@ /** * EnumDescriptorProto value. - * @member {Array.} value + * @member {Array.} value * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -30947,7 +40198,7 @@ /** * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options + * @member {google.protobuf.EnumOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -30958,10 +40209,14 @@ * @function create * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumDescriptorProto.$Shape): google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumDescriptorProto.$Properties): google.protobuf.EnumDescriptorProto; + * }} */ - EnumDescriptorProto.create = function create(properties) { + EnumDescriptorProto.create = function(properties) { return new EnumDescriptorProto(properties); }; @@ -30970,20 +40225,27 @@ * @function encode * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + EnumDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30992,12 +40254,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31007,33 +40269,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decode = function decode(reader, length) { + EnumDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31043,11 +40328,11 @@ * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31061,23 +40346,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumDescriptorProto.verify = function verify(message) { + EnumDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) { + if (!$Array.isArray(message.value)) return "value: array expected"; for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i], _depth + 1); if (error) return "value." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -31092,26 +40381,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - EnumDescriptorProto.fromObject = function fromObject(object) { + EnumDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; + if (!$Array.isArray(object.value)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = $Array(object.value.length); for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + if (!$util.isObject(object.value[i])) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -31125,9 +40420,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.value = []; @@ -31135,15 +40434,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.value && message.value.length) { - object.value = []; + object.value = $Array(message.value.length); for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -31154,8 +40453,22 @@ * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumDescriptorProto.prototype.toJSON = function() { + return EnumDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumDescriptorProto"; }; return EnumDescriptorProto; @@ -31165,27 +40478,40 @@ /** * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto + * @typedef {Object} google.protobuf.EnumValueDescriptorProto.$Properties * @property {string|null} [name] EnumValueDescriptorProto name * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + * @property {google.protobuf.EnumValueOptions.$Properties|null} [options] EnumValueDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @augments google.protobuf.EnumValueDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumValueDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumValueDescriptorProto. + * @typedef {google.protobuf.EnumValueDescriptorProto.$Properties} google.protobuf.EnumValueDescriptorProto.$Shape */ /** * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueDescriptorProto(properties) { + var EnumValueDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueDescriptorProto name. @@ -31205,7 +40531,7 @@ /** * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @member {google.protobuf.EnumValueOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ @@ -31216,10 +40542,14 @@ * @function create * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumValueDescriptorProto.$Shape): google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumValueDescriptorProto.$Properties): google.protobuf.EnumValueDescriptorProto; + * }} */ - EnumValueDescriptorProto.create = function create(properties) { + EnumValueDescriptorProto.create = function(properties) { return new EnumValueDescriptorProto(properties); }; @@ -31228,19 +40558,26 @@ * @function encode * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer) { + EnumValueDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31249,12 +40586,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31264,31 +40601,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decode = function decode(reader, length) { + EnumValueDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31298,11 +40658,11 @@ * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumValueDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31316,17 +40676,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueDescriptorProto.verify = function verify(message) { + EnumValueDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -31341,18 +40705,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { + EnumValueDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -31366,21 +40736,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + EnumValueDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.number = 0; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -31391,8 +40765,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueDescriptorProto.prototype.toJSON = function() { + return EnumValueDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueDescriptorProto"; }; return EnumValueDescriptorProto; @@ -31400,30 +40788,43 @@ protobuf.ServiceDescriptorProto = (function() { + /** + * Properties of a ServiceDescriptorProto. + * @typedef {Object} google.protobuf.ServiceDescriptorProto.$Properties + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.ServiceOptions.$Properties|null} [options] ServiceDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceDescriptorProto. * @memberof google.protobuf * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + * @augments google.protobuf.ServiceDescriptorProto.$Properties + * @deprecated Use google.protobuf.ServiceDescriptorProto.$Properties instead. + */ + + /** + * Shape of a ServiceDescriptorProto. + * @typedef {google.protobuf.ServiceDescriptorProto.$Properties} google.protobuf.ServiceDescriptorProto.$Shape */ /** * Constructs a new ServiceDescriptorProto. * @memberof google.protobuf * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceDescriptorProto(properties) { + var ServiceDescriptorProto = function (properties) { this.method = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceDescriptorProto name. @@ -31435,7 +40836,7 @@ /** * ServiceDescriptorProto method. - * @member {Array.} method + * @member {Array.} method * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -31443,7 +40844,7 @@ /** * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options + * @member {google.protobuf.ServiceOptions.$Properties|null|undefined} options * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -31454,10 +40855,14 @@ * @function create * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @type {{ + * (properties: google.protobuf.ServiceDescriptorProto.$Shape): google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape; + * (properties?: google.protobuf.ServiceDescriptorProto.$Properties): google.protobuf.ServiceDescriptorProto; + * }} */ - ServiceDescriptorProto.create = function create(properties) { + ServiceDescriptorProto.create = function(properties) { return new ServiceDescriptorProto(properties); }; @@ -31466,20 +40871,27 @@ * @function encode * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + ServiceDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31488,12 +40900,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31503,33 +40915,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decode = function decode(reader, length) { + ServiceDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31539,11 +40974,11 @@ * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ServiceDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31557,23 +40992,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceDescriptorProto.verify = function verify(message) { + ServiceDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) { + if (!$Array.isArray(message.method)) return "method: array expected"; for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i], _depth + 1); if (error) return "method." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -31588,26 +41027,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - ServiceDescriptorProto.fromObject = function fromObject(object) { + ServiceDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; + if (!$Array.isArray(object.method)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = $Array(object.method.length); for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + if (!$util.isObject(object.method[i])) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -31621,9 +41066,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.method = []; @@ -31631,15 +41080,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.method && message.method.length) { - object.method = []; + object.method = $Array(message.method.length); for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -31650,8 +41099,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceDescriptorProto.prototype.toJSON = function() { + return ServiceDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceDescriptorProto"; }; return ServiceDescriptorProto; @@ -31661,28 +41124,41 @@ /** * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto + * @typedef {Object} google.protobuf.MethodDescriptorProto.$Properties * @property {string|null} [name] MethodDescriptorProto name * @property {string|null} [input_type] MethodDescriptorProto input_type * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {google.protobuf.MethodOptions.$Properties|null} [options] MethodDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @augments google.protobuf.MethodDescriptorProto.$Properties + * @deprecated Use google.protobuf.MethodDescriptorProto.$Properties instead. + */ + + /** + * Shape of a MethodDescriptorProto. + * @typedef {google.protobuf.MethodDescriptorProto.$Properties} google.protobuf.MethodDescriptorProto.$Shape */ /** * Constructs a new MethodDescriptorProto. * @memberof google.protobuf * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodDescriptorProto(properties) { + var MethodDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodDescriptorProto name. @@ -31710,7 +41186,7 @@ /** * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options + * @member {google.protobuf.MethodOptions.$Properties|null|undefined} options * @memberof google.protobuf.MethodDescriptorProto * @instance */ @@ -31721,10 +41197,14 @@ * @function create * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @type {{ + * (properties: google.protobuf.MethodDescriptorProto.$Shape): google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape; + * (properties?: google.protobuf.MethodDescriptorProto.$Properties): google.protobuf.MethodDescriptorProto; + * }} */ - MethodDescriptorProto.create = function create(properties) { + MethodDescriptorProto.create = function(properties) { return new MethodDescriptorProto(properties); }; @@ -31733,21 +41213,28 @@ * @function encode * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + MethodDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.input_type != null && Object.hasOwnProperty.call(message, "input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31756,12 +41243,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31771,34 +41258,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decode = function decode(reader, length) { + MethodDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.input_type = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.output_type = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31808,11 +41321,11 @@ * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MethodDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31826,20 +41339,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodDescriptorProto.verify = function verify(message) { + MethodDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) if (!$util.isString(message.input_type)) return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) if (!$util.isString(message.output_type)) return "output_type: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -31854,20 +41371,26 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - MethodDescriptorProto.fromObject = function fromObject(object) { + MethodDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.input_type != null) - message.input_type = String(object.input_type); + message.input_type = $String(object.input_type); if (object.output_type != null) - message.output_type = String(object.output_type); + message.output_type = $String(object.output_type); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -31881,9 +41404,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -31891,14 +41418,14 @@ object.output_type = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -31909,8 +41436,22 @@ * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodDescriptorProto.prototype.toJSON = function() { + return MethodDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodDescriptorProto"; }; return MethodDescriptorProto; @@ -31920,8 +41461,7 @@ /** * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions + * @typedef {Object} google.protobuf.FileOptions.$Properties * @property {string|null} [java_package] FileOptions java_package * @property {string|null} [java_outer_classname] FileOptions java_outer_classname * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files @@ -31930,24 +41470,38 @@ * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services * @property {boolean|null} [java_generic_services] FileOptions java_generic_services * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @augments google.protobuf.FileOptions.$Properties + * @deprecated Use google.protobuf.FileOptions.$Properties instead. + */ + + /** + * Shape of a FileOptions. + * @typedef {google.protobuf.FileOptions.$Properties} google.protobuf.FileOptions.$Shape */ /** * Constructs a new FileOptions. * @memberof google.protobuf * @classdesc Represents a FileOptions. - * @implements IFileOptions * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileOptions(properties) { + var FileOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileOptions java_package. @@ -32015,7 +41569,7 @@ /** * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FileOptions * @instance */ @@ -32026,10 +41580,14 @@ * @function create * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileOptions} FileOptions instance + * @type {{ + * (properties: google.protobuf.FileOptions.$Shape): google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape; + * (properties?: google.protobuf.FileOptions.$Properties): google.protobuf.FileOptions; + * }} */ - FileOptions.create = function create(properties) { + FileOptions.create = function(properties) { return new FileOptions(properties); }; @@ -32038,32 +41596,39 @@ * @function encode * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + FileOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.java_package != null && Object.hasOwnProperty.call(message, "java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32072,12 +41637,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32087,51 +41652,98 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decode = function decode(reader, length) { + FileOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.java_package = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.java_outer_classname = reader.string(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.java_multiple_files = reader.bool(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.java_generate_equals_and_hash = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FileOptions.OptimizeMode[value] !== $undefined) + message.optimize_for = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 16: { + if (wireType !== 0) + break; + message.cc_generic_services = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.java_generic_services = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.py_generic_services = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32141,11 +41753,11 @@ * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32159,22 +41771,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileOptions.verify = function verify(message) { + FileOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) if (!$util.isString(message.java_package)) return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) if (!$util.isString(message.java_outer_classname)) return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) if (typeof message.java_multiple_files !== "boolean") return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) if (typeof message.java_generate_equals_and_hash !== "boolean") return "java_generate_equals_and_hash: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) switch (message.optimize_for) { default: return "optimize_for: enum value expected"; @@ -32183,20 +41799,20 @@ case 3: break; } - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) if (typeof message.cc_generic_services !== "boolean") return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) if (typeof message.java_generic_services !== "boolean") return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) if (typeof message.py_generic_services !== "boolean") return "py_generic_services: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -32212,18 +41828,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileOptions} FileOptions */ - FileOptions.fromObject = function fromObject(object) { + FileOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileOptions(); if (object.java_package != null) - message.java_package = String(object.java_package); + message.java_package = $String(object.java_package); if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); + message.java_outer_classname = $String(object.java_outer_classname); if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); + message.java_multiple_files = $Boolean(object.java_multiple_files); if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); + message.java_generate_equals_and_hash = $Boolean(object.java_generate_equals_and_hash); switch (object.optimize_for) { case "SPEED": case 1: @@ -32237,21 +41859,22 @@ case 3: message.optimize_for = 3; break; + default: } if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); + message.cc_generic_services = $Boolean(object.cc_generic_services); if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); + message.java_generic_services = $Boolean(object.java_generic_services); if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); + message.py_generic_services = $Boolean(object.py_generic_services); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -32266,42 +41889,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + FileOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { object.java_package = ""; object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; + object.optimize_for = options.enums === $String ? "SPEED" : 1; object.java_multiple_files = false; object.cc_generic_services = false; object.java_generic_services = false; object.py_generic_services = false; object.java_generate_equals_and_hash = false; } - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) + object.optimize_for = options.enums === $String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] === $undefined ? message.optimize_for : $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) object.java_multiple_files = message.java_multiple_files; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -32313,8 +41940,22 @@ * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileOptions.prototype.toJSON = function() { + return FileOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileOptions"; }; /** @@ -32326,7 +41967,7 @@ * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value */ FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "SPEED"] = 1; values[valuesById[2] = "CODE_SIZE"] = 2; values[valuesById[3] = "LITE_RUNTIME"] = 3; @@ -32340,30 +41981,45 @@ /** * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions + * @typedef {Object} google.protobuf.MessageOptions.$Properties * @property {boolean|null} [message_set_wire_format] MessageOptions message_set_wire_format * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option * @property {number|null} [".msgpool_soft_limit"] MessageOptions .msgpool_soft_limit * @property {number|null} [".msgpool_hard_limit"] MessageOptions .msgpool_hard_limit + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @augments google.protobuf.MessageOptions.$Properties + * @deprecated Use google.protobuf.MessageOptions.$Properties instead. + */ + + /** + * Shape of a MessageOptions. + * @typedef {google.protobuf.MessageOptions.$Properties} google.protobuf.MessageOptions.$Shape */ /** * Constructs a new MessageOptions. * @memberof google.protobuf * @classdesc Represents a MessageOptions. - * @implements IMessageOptions * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set + * @property {number} ".msgpool_soft_limit" MessageOptions .msgpool_soft_limit + * @property {number} ".msgpool_hard_limit" MessageOptions .msgpool_hard_limit + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MessageOptions(properties) { + var MessageOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MessageOptions message_set_wire_format. @@ -32383,26 +42039,13 @@ /** * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MessageOptions * @instance */ MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * MessageOptions .msgpool_soft_limit. - * @member {number} .msgpool_soft_limit - * @memberof google.protobuf.MessageOptions - * @instance - */ MessageOptions.prototype[".msgpool_soft_limit"] = 32; - - /** - * MessageOptions .msgpool_hard_limit. - * @member {number} .msgpool_hard_limit - * @memberof google.protobuf.MessageOptions - * @instance - */ MessageOptions.prototype[".msgpool_hard_limit"] = 384; /** @@ -32410,10 +42053,14 @@ * @function create * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @type {{ + * (properties: google.protobuf.MessageOptions.$Shape): google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape; + * (properties?: google.protobuf.MessageOptions.$Properties): google.protobuf.MessageOptions; + * }} */ - MessageOptions.create = function create(properties) { + MessageOptions.create = function(properties) { return new MessageOptions(properties); }; @@ -32422,24 +42069,31 @@ * @function encode * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + MessageOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".msgpool_soft_limit"] != null && Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) writer.uint32(/* id 60000, wireType 0 =*/480000).int32(message[".msgpool_soft_limit"]); - if (message[".msgpool_hard_limit"] != null && Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) writer.uint32(/* id 60001, wireType 0 =*/480008).int32(message[".msgpool_hard_limit"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32448,12 +42102,12 @@ * @function encodeDelimited * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32463,39 +42117,68 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decode = function decode(reader, length) { + MessageOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MessageOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 60000: - message[".msgpool_soft_limit"] = reader.int32(); - break; - case 60001: - message[".msgpool_hard_limit"] = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.message_set_wire_format = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.no_standard_descriptor_accessor = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 60000: { + if (wireType !== 0) + break; + message[".msgpool_soft_limit"] = reader.int32(); + continue; + } + case 60001: { + if (wireType !== 0) + break; + message[".msgpool_hard_limit"] = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32505,11 +42188,11 @@ * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32523,28 +42206,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageOptions.verify = function verify(message) { + MessageOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) if (typeof message.message_set_wire_format !== "boolean") return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) if (typeof message.no_standard_descriptor_accessor !== "boolean") return "no_standard_descriptor_accessor: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".msgpool_soft_limit")) + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) if (!$util.isInteger(message[".msgpool_soft_limit"])) return ".msgpool_soft_limit: integer expected"; - if (message[".msgpool_hard_limit"] != null && message.hasOwnProperty(".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) if (!$util.isInteger(message[".msgpool_hard_limit"])) return ".msgpool_hard_limit: integer expected"; return null; @@ -32558,22 +42245,28 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MessageOptions} MessageOptions */ - MessageOptions.fromObject = function fromObject(object) { + MessageOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MessageOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MessageOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MessageOptions(); if (object.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); + message.message_set_wire_format = $Boolean(object.message_set_wire_format); if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); + message.no_standard_descriptor_accessor = $Boolean(object.no_standard_descriptor_accessor); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } if (object[".msgpool_soft_limit"] != null) @@ -32592,9 +42285,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + MessageOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; @@ -32604,18 +42301,18 @@ object[".msgpool_soft_limit"] = 32; object[".msgpool_hard_limit"] = 384; } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".msgpool_soft_limit")) + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) object[".msgpool_soft_limit"] = message[".msgpool_soft_limit"]; - if (message[".msgpool_hard_limit"] != null && message.hasOwnProperty(".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) object[".msgpool_hard_limit"] = message[".msgpool_hard_limit"]; return object; }; @@ -32627,8 +42324,22 @@ * @instance * @returns {Object.} JSON object */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MessageOptions.prototype.toJSON = function() { + return MessageOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MessageOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MessageOptions"; }; return MessageOptions; @@ -32638,31 +42349,45 @@ /** * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions + * @typedef {Object} google.protobuf.FieldOptions.$Properties * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype * @property {boolean|null} [packed] FieldOptions packed * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {string|null} [experimental_map_key] FieldOptions experimental_map_key - * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option * @property {boolean|null} [".key_field"] FieldOptions .key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @augments google.protobuf.FieldOptions.$Properties + * @deprecated Use google.protobuf.FieldOptions.$Properties instead. + */ + + /** + * Shape of a FieldOptions. + * @typedef {google.protobuf.FieldOptions.$Properties} google.protobuf.FieldOptions.$Shape */ /** * Constructs a new FieldOptions. * @memberof google.protobuf * @classdesc Represents a FieldOptions. - * @implements IFieldOptions * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set + * @property {boolean} ".key_field" FieldOptions .key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FieldOptions(properties) { + var FieldOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldOptions ctype. @@ -32698,18 +42423,12 @@ /** * FieldOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * FieldOptions .key_field. - * @member {boolean} .key_field - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".key_field"] = false; /** @@ -32717,10 +42436,14 @@ * @function create * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @type {{ + * (properties: google.protobuf.FieldOptions.$Shape): google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape; + * (properties?: google.protobuf.FieldOptions.$Properties): google.protobuf.FieldOptions; + * }} */ - FieldOptions.create = function create(properties) { + FieldOptions.create = function(properties) { return new FieldOptions(properties); }; @@ -32729,26 +42452,33 @@ * @function encode * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + FieldOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.experimental_map_key != null && Object.hasOwnProperty.call(message, "experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.experimental_map_key); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".key_field"] != null && Object.hasOwnProperty.call(message, ".key_field")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) writer.uint32(/* id 60000, wireType 0 =*/480000).bool(message[".key_field"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32757,12 +42487,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32772,42 +42502,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decode = function decode(reader, length) { + FieldOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 9: - message.experimental_map_key = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 60000: - message[".key_field"] = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldOptions.CType[value] !== $undefined) + message.ctype = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + message.packed = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.deprecated = reader.bool(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.experimental_map_key = reader.string(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 60000: { + if (wireType !== 0) + break; + message[".key_field"] = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32817,11 +42585,11 @@ * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32835,10 +42603,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldOptions.verify = function verify(message) { + FieldOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) switch (message.ctype) { default: return "ctype: enum value expected"; @@ -32847,25 +42619,25 @@ case 2: break; } - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) if (typeof message.packed !== "boolean") return "packed: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) if (!$util.isString(message.experimental_map_key)) return "experimental_map_key: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".key_field"] != null && message.hasOwnProperty(".key_field")) + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) if (typeof message[".key_field"] !== "boolean") return ".key_field: boolean expected"; return null; @@ -32879,9 +42651,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldOptions} FieldOptions */ - FieldOptions.fromObject = function fromObject(object) { + FieldOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { case "STRING": @@ -32896,25 +42674,26 @@ case 2: message.ctype = 2; break; + default: } if (object.packed != null) - message.packed = Boolean(object.packed); + message.packed = $Boolean(object.packed); if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); + message.deprecated = $Boolean(object.deprecated); if (object.experimental_map_key != null) - message.experimental_map_key = String(object.experimental_map_key); + message.experimental_map_key = $String(object.experimental_map_key); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } if (object[".key_field"] != null) - message[".key_field"] = Boolean(object[".key_field"]); + message[".key_field"] = $Boolean(object[".key_field"]); return message; }; @@ -32927,33 +42706,37 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + FieldOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; + object.ctype = options.enums === $String ? "STRING" : 0; object.packed = false; object.deprecated = false; object.experimental_map_key = ""; object[".key_field"] = false; } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) + object.ctype = options.enums === $String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === $undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) object.experimental_map_key = message.experimental_map_key; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".key_field"] != null && message.hasOwnProperty(".key_field")) + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) object[".key_field"] = message[".key_field"]; return object; }; @@ -32965,8 +42748,22 @@ * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldOptions.prototype.toJSON = function() { + return FieldOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldOptions"; }; /** @@ -32978,7 +42775,7 @@ * @property {number} STRING_PIECE=2 STRING_PIECE value */ FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "STRING"] = 0; values[valuesById[1] = "CORD"] = 1; values[valuesById[2] = "STRING_PIECE"] = 2; @@ -32990,32 +42787,45 @@ protobuf.EnumOptions = (function() { + /** + * Properties of an EnumOptions. + * @typedef {Object} google.protobuf.EnumOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumOptions. * @memberof google.protobuf * @interface IEnumOptions - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @augments google.protobuf.EnumOptions.$Properties + * @deprecated Use google.protobuf.EnumOptions.$Properties instead. + */ + + /** + * Shape of an EnumOptions. + * @typedef {google.protobuf.EnumOptions.$Properties} google.protobuf.EnumOptions.$Shape */ /** * Constructs a new EnumOptions. * @memberof google.protobuf * @classdesc Represents an EnumOptions. - * @implements IEnumOptions * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumOptions(properties) { + var EnumOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumOptions * @instance */ @@ -33026,10 +42836,14 @@ * @function create * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @type {{ + * (properties: google.protobuf.EnumOptions.$Shape): google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape; + * (properties?: google.protobuf.EnumOptions.$Properties): google.protobuf.EnumOptions; + * }} */ - EnumOptions.create = function create(properties) { + EnumOptions.create = function(properties) { return new EnumOptions(properties); }; @@ -33038,16 +42852,23 @@ * @function encode * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + EnumOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33056,12 +42877,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33071,27 +42892,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length) { + EnumOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33101,11 +42939,11 @@ * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33119,14 +42957,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumOptions.verify = function verify(message) { + EnumOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -33142,18 +42984,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumOptions} EnumOptions */ - EnumOptions.fromObject = function fromObject(object) { + EnumOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -33168,16 +43016,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + EnumOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -33189,8 +43041,22 @@ * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumOptions.prototype.toJSON = function() { + return EnumOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumOptions"; }; return EnumOptions; @@ -33198,32 +43064,45 @@ protobuf.EnumValueOptions = (function() { + /** + * Properties of an EnumValueOptions. + * @typedef {Object} google.protobuf.EnumValueOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumValueOptions. * @memberof google.protobuf * @interface IEnumValueOptions - * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @augments google.protobuf.EnumValueOptions.$Properties + * @deprecated Use google.protobuf.EnumValueOptions.$Properties instead. + */ + + /** + * Shape of an EnumValueOptions. + * @typedef {google.protobuf.EnumValueOptions.$Properties} google.protobuf.EnumValueOptions.$Shape */ /** * Constructs a new EnumValueOptions. * @memberof google.protobuf * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueOptions(properties) { + var EnumValueOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumValueOptions * @instance */ @@ -33234,10 +43113,14 @@ * @function create * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @type {{ + * (properties: google.protobuf.EnumValueOptions.$Shape): google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape; + * (properties?: google.protobuf.EnumValueOptions.$Properties): google.protobuf.EnumValueOptions; + * }} */ - EnumValueOptions.create = function create(properties) { + EnumValueOptions.create = function(properties) { return new EnumValueOptions(properties); }; @@ -33246,16 +43129,23 @@ * @function encode * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + EnumValueOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33264,12 +43154,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33279,27 +43169,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + EnumValueOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33309,11 +43216,11 @@ * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33327,14 +43234,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueOptions.verify = function verify(message) { + EnumValueOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -33350,18 +43261,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - EnumValueOptions.fromObject = function fromObject(object) { + EnumValueOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -33376,16 +43293,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -33397,8 +43318,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueOptions.prototype.toJSON = function() { + return EnumValueOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueOptions"; }; return EnumValueOptions; @@ -33406,32 +43341,45 @@ protobuf.ServiceOptions = (function() { + /** + * Properties of a ServiceOptions. + * @typedef {Object} google.protobuf.ServiceOptions.$Properties + * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceOptions. * @memberof google.protobuf * @interface IServiceOptions - * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @augments google.protobuf.ServiceOptions.$Properties + * @deprecated Use google.protobuf.ServiceOptions.$Properties instead. + */ + + /** + * Shape of a ServiceOptions. + * @typedef {google.protobuf.ServiceOptions.$Properties} google.protobuf.ServiceOptions.$Shape */ /** * Constructs a new ServiceOptions. * @memberof google.protobuf * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceOptions(properties) { + var ServiceOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.ServiceOptions * @instance */ @@ -33442,10 +43390,14 @@ * @function create * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @type {{ + * (properties: google.protobuf.ServiceOptions.$Shape): google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape; + * (properties?: google.protobuf.ServiceOptions.$Properties): google.protobuf.ServiceOptions; + * }} */ - ServiceOptions.create = function create(properties) { + ServiceOptions.create = function(properties) { return new ServiceOptions(properties); }; @@ -33454,16 +43406,23 @@ * @function encode * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + ServiceOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33472,12 +43431,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33487,27 +43446,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + ServiceOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33517,11 +43493,11 @@ * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33535,14 +43511,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + ServiceOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -33558,18 +43538,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - ServiceOptions.fromObject = function fromObject(object) { + ServiceOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -33584,16 +43570,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -33605,8 +43595,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceOptions.prototype.toJSON = function() { + return ServiceOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceOptions"; }; return ServiceOptions; @@ -33614,32 +43618,45 @@ protobuf.MethodOptions = (function() { + /** + * Properties of a MethodOptions. + * @typedef {Object} google.protobuf.MethodOptions.$Properties + * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a MethodOptions. * @memberof google.protobuf * @interface IMethodOptions - * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @augments google.protobuf.MethodOptions.$Properties + * @deprecated Use google.protobuf.MethodOptions.$Properties instead. + */ + + /** + * Shape of a MethodOptions. + * @typedef {google.protobuf.MethodOptions.$Properties} google.protobuf.MethodOptions.$Shape */ /** * Constructs a new MethodOptions. * @memberof google.protobuf * @classdesc Represents a MethodOptions. - * @implements IMethodOptions * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodOptions(properties) { + var MethodOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MethodOptions * @instance */ @@ -33650,10 +43667,14 @@ * @function create * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @type {{ + * (properties: google.protobuf.MethodOptions.$Shape): google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape; + * (properties?: google.protobuf.MethodOptions.$Properties): google.protobuf.MethodOptions; + * }} */ - MethodOptions.create = function create(properties) { + MethodOptions.create = function(properties) { return new MethodOptions(properties); }; @@ -33662,16 +43683,23 @@ * @function encode * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + MethodOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33680,12 +43708,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33695,27 +43723,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + MethodOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33725,11 +43770,11 @@ * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33743,14 +43788,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + MethodOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -33766,18 +43815,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodOptions} MethodOptions */ - MethodOptions.fromObject = function fromObject(object) { + MethodOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -33792,16 +43847,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + MethodOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -33813,8 +43872,22 @@ * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodOptions.prototype.toJSON = function() { + return MethodOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodOptions"; }; return MethodOptions; @@ -33824,36 +43897,49 @@ /** * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name + * @typedef {Object} google.protobuf.UninterpretedOption.$Properties + * @property {Array.|null} [name] UninterpretedOption name * @property {string|null} [identifier_value] UninterpretedOption identifier_value * @property {number|Long|null} [positive_int_value] UninterpretedOption positive_int_value * @property {number|Long|null} [negative_int_value] UninterpretedOption negative_int_value * @property {number|null} [double_value] UninterpretedOption double_value * @property {Uint8Array|null} [string_value] UninterpretedOption string_value * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @augments google.protobuf.UninterpretedOption.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.$Properties instead. + */ + + /** + * Shape of an UninterpretedOption. + * @typedef {google.protobuf.UninterpretedOption.$Properties} google.protobuf.UninterpretedOption.$Shape */ /** * Constructs a new UninterpretedOption. * @memberof google.protobuf * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function UninterpretedOption(properties) { + var UninterpretedOption = function (properties) { this.name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * UninterpretedOption name. - * @member {Array.} name + * @member {Array.} name * @memberof google.protobuf.UninterpretedOption * @instance */ @@ -33912,10 +43998,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.$Shape): google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape; + * (properties?: google.protobuf.UninterpretedOption.$Properties): google.protobuf.UninterpretedOption; + * }} */ - UninterpretedOption.create = function create(properties) { + UninterpretedOption.create = function(properties) { return new UninterpretedOption(properties); }; @@ -33924,28 +44014,35 @@ * @function encode * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + UninterpretedOption.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33954,12 +44051,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + UninterpretedOption.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33969,45 +44066,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + UninterpretedOption.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 2) + break; + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.identifier_value = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.positive_int_value = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.negative_int_value = reader.int64(); + continue; + } + case 6: { + if (wireType !== 1) + break; + message.double_value = reader.double(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.string_value = reader.bytes(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.aggregate_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -34017,11 +44149,11 @@ * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34035,34 +44167,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + UninterpretedOption.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) { + if (!$Array.isArray(message.name)) return "name: array expected"; for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i], _depth + 1); if (error) return "name." + error; } } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) if (!$util.isString(message.identifier_value)) return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) if (typeof message.double_value !== "number") return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) if (!$util.isString(message.aggregate_value)) return "aggregate_value: string expected"; return null; @@ -34076,49 +44212,55 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - UninterpretedOption.fromObject = function fromObject(object) { + UninterpretedOption.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption(); if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; + if (!$Array.isArray(object.name)) + throw $TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = $Array(object.name.length); for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + if (!$util.isObject(object.name[i])) + throw $TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], _depth + 1); } } if (object.identifier_value != null) - message.identifier_value = String(object.identifier_value); + message.identifier_value = $String(object.identifier_value); if (object.positive_int_value != null) if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; + message.positive_int_value = $util.Long.fromValue(object.positive_int_value, true); else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); + message.positive_int_value = $parseInt(object.positive_int_value, 10); else if (typeof object.positive_int_value === "number") message.positive_int_value = object.positive_int_value; else if (typeof object.positive_int_value === "object") message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); if (object.negative_int_value != null) if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; + message.negative_int_value = $util.Long.fromValue(object.negative_int_value, false); else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); + message.negative_int_value = $parseInt(object.negative_int_value, 10); else if (typeof object.negative_int_value === "number") message.negative_int_value = object.negative_int_value; else if (typeof object.negative_int_value === "object") message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); if (object.double_value != null) - message.double_value = Number(object.double_value); + message.double_value = $Number(object.double_value); if (object.string_value != null) if (typeof object.string_value === "string") $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) + else if (object.string_value.length >= 0) message.string_value = object.string_value; if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); + message.aggregate_value = $String(object.aggregate_value); return message; }; @@ -34131,9 +44273,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.name = []; @@ -34141,46 +44287,50 @@ object.identifier_value = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.positive_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.positive_int_value = options.longs === String ? "0" : 0; + object.positive_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.negative_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.negative_int_value = options.longs === String ? "0" : 0; + object.negative_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.double_value = 0; - if (options.bytes === String) + if (options.bytes === $String) object.string_value = ""; else { object.string_value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.string_value = $util.newBuffer(object.string_value); } object.aggregate_value = ""; } if (message.name && message.name.length) { - object.name = []; + object.name = $Array(message.name.length); for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options, _depth + 1); } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.positive_int_value = typeof message.positive_int_value === "number" ? $BigInt(message.positive_int_value) : $util.Long.fromBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0, true).toBigInt(); + else if (typeof message.positive_int_value === "number") + object.positive_int_value = options.longs === $String ? $String(message.positive_int_value) : message.positive_int_value; else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; + object.positive_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === $Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.negative_int_value = typeof message.negative_int_value === "number" ? $BigInt(message.negative_int_value) : $util.Long.fromBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0, false).toBigInt(); + else if (typeof message.negative_int_value === "number") + object.negative_int_value = options.longs === $String ? $String(message.negative_int_value) : message.negative_int_value; else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + object.negative_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === $Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) + object.double_value = options.json && !$isFinite(message.double_value) ? $String(message.double_value) : message.double_value; + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) + object.string_value = options.bytes === $String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.string_value) : message.string_value; + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) object.aggregate_value = message.aggregate_value; return object; }; @@ -34192,34 +44342,61 @@ * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + UninterpretedOption.prototype.toJSON = function() { + return UninterpretedOption.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + UninterpretedOption.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption"; }; UninterpretedOption.NamePart = (function() { /** * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart + * @typedef {Object} google.protobuf.UninterpretedOption.NamePart.$Properties * @property {string} name_part NamePart name_part * @property {boolean} is_extension NamePart is_extension + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @augments google.protobuf.UninterpretedOption.NamePart.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.NamePart.$Properties instead. + */ + + /** + * Shape of a NamePart. + * @typedef {google.protobuf.UninterpretedOption.NamePart.$Properties} google.protobuf.UninterpretedOption.NamePart.$Shape */ /** * Constructs a new NamePart. * @memberof google.protobuf.UninterpretedOption * @classdesc Represents a NamePart. - * @implements INamePart * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function NamePart(properties) { + var NamePart = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * NamePart name_part. @@ -34242,10 +44419,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.NamePart.$Shape): google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape; + * (properties?: google.protobuf.UninterpretedOption.NamePart.$Properties): google.protobuf.UninterpretedOption.NamePart; + * }} */ - NamePart.create = function create(properties) { + NamePart.create = function(properties) { return new NamePart(properties); }; @@ -34254,15 +44435,22 @@ * @function encode * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + NamePart.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 2 =*/10).string(message.name_part); writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -34271,12 +44459,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + NamePart.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -34286,31 +44474,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decode = function decode(reader, length) { + NamePart.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption.NamePart(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name_part = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.is_extension = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("name_part")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "name_part")) throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) + if (!$Object.hasOwnProperty.call(message, "is_extension")) throw $util.ProtocolError("missing required 'is_extension'", { instance: message }); return message; }; @@ -34321,11 +44529,11 @@ * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decodeDelimited = function decodeDelimited(reader) { + NamePart.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34339,9 +44547,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NamePart.verify = function verify(message) { + NamePart.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isString(message.name_part)) return "name_part: string expected"; if (typeof message.is_extension !== "boolean") @@ -34357,14 +44569,20 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart */ - NamePart.fromObject = function fromObject(object) { + NamePart.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption.NamePart(); if (object.name_part != null) - message.name_part = String(object.name_part); + message.name_part = $String(object.name_part); if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); + message.is_extension = $Boolean(object.is_extension); return message; }; @@ -34377,17 +44595,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + NamePart.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name_part = ""; object.is_extension = false; } - if (message.name_part != null && message.hasOwnProperty("name_part")) + if (message.name_part != null && $Object.hasOwnProperty.call(message, "name_part")) object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) + if (message.is_extension != null && $Object.hasOwnProperty.call(message, "is_extension")) object.is_extension = message.is_extension; return object; }; @@ -34399,8 +44621,22 @@ * @instance * @returns {Object.} JSON object */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + NamePart.prototype.toJSON = function() { + return NamePart.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + NamePart.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption.NamePart"; }; return NamePart; @@ -34411,32 +44647,45 @@ protobuf.SourceCodeInfo = (function() { + /** + * Properties of a SourceCodeInfo. + * @typedef {Object} google.protobuf.SourceCodeInfo.$Properties + * @property {Array.|null} [location] SourceCodeInfo location + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a SourceCodeInfo. * @memberof google.protobuf * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @augments google.protobuf.SourceCodeInfo.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.$Properties instead. + */ + + /** + * Shape of a SourceCodeInfo. + * @typedef {google.protobuf.SourceCodeInfo.$Properties} google.protobuf.SourceCodeInfo.$Shape */ /** * Constructs a new SourceCodeInfo. * @memberof google.protobuf * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SourceCodeInfo(properties) { + var SourceCodeInfo = function (properties) { this.location = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SourceCodeInfo location. - * @member {Array.} location + * @member {Array.} location * @memberof google.protobuf.SourceCodeInfo * @instance */ @@ -34447,10 +44696,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.$Shape): google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.$Properties): google.protobuf.SourceCodeInfo; + * }} */ - SourceCodeInfo.create = function create(properties) { + SourceCodeInfo.create = function(properties) { return new SourceCodeInfo(properties); }; @@ -34459,16 +44712,23 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + SourceCodeInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.location != null && message.location.length) for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -34477,12 +44737,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SourceCodeInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -34492,27 +44752,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + SourceCodeInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -34522,11 +44799,11 @@ * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34540,14 +44817,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + SourceCodeInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.location != null && $Object.hasOwnProperty.call(message, "location")) { + if (!$Array.isArray(message.location)) return "location: array expected"; for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i], _depth + 1); if (error) return "location." + error; } @@ -34563,18 +44844,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - SourceCodeInfo.fromObject = function fromObject(object) { + SourceCodeInfo.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo(); if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; + if (!$Array.isArray(object.location)) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = $Array(object.location.length); for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + if (!$util.isObject(object.location[i])) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], _depth + 1); } } return message; @@ -34589,16 +44876,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.location = []; if (message.location && message.location.length) { - object.location = []; + object.location = $Array(message.location.length); for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options, _depth + 1); } return object; }; @@ -34610,36 +44901,63 @@ * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SourceCodeInfo.prototype.toJSON = function() { + return SourceCodeInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SourceCodeInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo"; }; SourceCodeInfo.Location = (function() { /** * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation + * @typedef {Object} google.protobuf.SourceCodeInfo.Location.$Properties * @property {Array.|null} [path] Location path * @property {Array.|null} [span] Location span + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @augments google.protobuf.SourceCodeInfo.Location.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.Location.$Properties instead. + */ + + /** + * Shape of a Location. + * @typedef {google.protobuf.SourceCodeInfo.Location.$Properties} google.protobuf.SourceCodeInfo.Location.$Shape */ /** * Constructs a new Location. * @memberof google.protobuf.SourceCodeInfo * @classdesc Represents a Location. - * @implements ILocation * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Location(properties) { + var Location = function (properties) { this.path = []; this.span = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Location path. @@ -34662,10 +44980,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.Location.$Shape): google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.Location.$Properties): google.protobuf.SourceCodeInfo.Location; + * }} */ - Location.create = function create(properties) { + Location.create = function(properties) { return new Location(properties); }; @@ -34674,25 +44996,24 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer) { + Location.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && message.path.length) + writer.uint32(/* id 1, wireType 2 =*/10).int32s(message.path); + if (message.span != null && message.span.length) + writer.uint32(/* id 2, wireType 2 =*/18).int32s(message.span); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -34701,12 +45022,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Location.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -34716,42 +45037,64 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decode = function decode(reader, length) { + Location.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.path && message.path.length)) + message.path = []; + reader.int32s(message.path); + continue; + } + if (wireType !== 0) + break; + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.int32()); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.span && message.span.length)) + message.span = []; + reader.int32s(message.span); + continue; + } + if (wireType !== 0) + break; + if (!(message.span && message.span.length)) + message.span = []; message.span.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -34761,11 +45104,11 @@ * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34779,18 +45122,22 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Location.verify = function verify(message) { + Location.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) { + if (!$Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) + if (message.span != null && $Object.hasOwnProperty.call(message, "span")) { + if (!$Array.isArray(message.span)) return "span: array expected"; for (var i = 0; i < message.span.length; ++i) if (!$util.isInteger(message.span[i])) @@ -34807,21 +45154,27 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo.Location} Location */ - Location.fromObject = function fromObject(object) { + Location.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo.Location(); if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; + if (!$Array.isArray(object.path)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = $Array(object.path.length); for (var i = 0; i < object.path.length; ++i) message.path[i] = object.path[i] | 0; } if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; + if (!$Array.isArray(object.span)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = $Array(object.span.length); for (var i = 0; i < object.span.length; ++i) message.span[i] = object.span[i] | 0; } @@ -34837,21 +45190,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + Location.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.path = []; object.span = []; } if (message.path && message.path.length) { - object.path = []; + object.path = $Array(message.path.length); for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } if (message.span && message.span.length) { - object.span = []; + object.span = $Array(message.span.length); for (var j = 0; j < message.span.length; ++j) object.span[j] = message.span[j]; } @@ -34865,8 +45222,22 @@ * @instance * @returns {Object.} JSON object */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Location.prototype.toJSON = function() { + return Location.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Location.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo.Location"; }; return Location; diff --git a/protobufs/generated/gcsdk_gcmessages.js b/protobufs/generated/gcsdk_gcmessages.js index 2e0ce8c..a918d60 100644 --- a/protobufs/generated/gcsdk_gcmessages.js +++ b/protobufs/generated/gcsdk_gcmessages.js @@ -1,4 +1,4 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-mixed-operators, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars, default-case, jsdoc/require-param*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) @@ -12,20 +12,21 @@ // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + var $Object = $util.global.Object, $undefined = $util.global.undefined, $Error = $util.global.Error, $TypeError = $util.global.TypeError, $parseInt = $util.global.parseInt, $String = $util.global.String, $Number = $util.global.Number, $BigInt = $util.global.BigInt, $Array = $util.global.Array, $Boolean = $util.global.Boolean, $isFinite = $util.global.isFinite; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); /** * PartnerAccountType enum. - * @exports PartnerAccountType + * @name PartnerAccountType * @enum {number} * @property {number} PARTNER_NONE=0 PARTNER_NONE value * @property {number} PARTNER_PERFECT_WORLD=1 PARTNER_PERFECT_WORLD value * @property {number} PARTNER_NEXON=2 PARTNER_NEXON value */ $root.PartnerAccountType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "PARTNER_NONE"] = 0; values[valuesById[1] = "PARTNER_PERFECT_WORLD"] = 1; values[valuesById[2] = "PARTNER_NEXON"] = 2; @@ -34,7 +35,7 @@ /** * GCConnectionStatus enum. - * @exports GCConnectionStatus + * @name GCConnectionStatus * @enum {number} * @property {number} GCConnectionStatus_HAVE_SESSION=0 GCConnectionStatus_HAVE_SESSION value * @property {number} GCConnectionStatus_GC_GOING_DOWN=1 GCConnectionStatus_GC_GOING_DOWN value @@ -44,7 +45,7 @@ * @property {number} GCConnectionStatus_SUSPENDED=5 GCConnectionStatus_SUSPENDED value */ $root.GCConnectionStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "GCConnectionStatus_HAVE_SESSION"] = 0; values[valuesById[1] = "GCConnectionStatus_GC_GOING_DOWN"] = 1; values[valuesById[2] = "GCConnectionStatus_NO_SESSION"] = 2; @@ -58,26 +59,39 @@ /** * Properties of a CMsgSOIDOwner. - * @exports ICMsgSOIDOwner - * @interface ICMsgSOIDOwner + * @typedef {Object} CMsgSOIDOwner.$Properties * @property {number|null} [type] CMsgSOIDOwner type * @property {number|Long|null} [id] CMsgSOIDOwner id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSOIDOwner. + * @exports ICMsgSOIDOwner + * @interface ICMsgSOIDOwner + * @augments CMsgSOIDOwner.$Properties + * @deprecated Use CMsgSOIDOwner.$Properties instead. + */ + + /** + * Shape of a CMsgSOIDOwner. + * @typedef {CMsgSOIDOwner.$Properties} CMsgSOIDOwner.$Shape */ /** * Constructs a new CMsgSOIDOwner. * @exports CMsgSOIDOwner * @classdesc Represents a CMsgSOIDOwner. - * @implements ICMsgSOIDOwner * @constructor - * @param {ICMsgSOIDOwner=} [properties] Properties to set + * @param {CMsgSOIDOwner.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSOIDOwner(properties) { + var CMsgSOIDOwner = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSOIDOwner type. @@ -100,10 +114,14 @@ * @function create * @memberof CMsgSOIDOwner * @static - * @param {ICMsgSOIDOwner=} [properties] Properties to set + * @param {CMsgSOIDOwner.$Properties=} [properties] Properties to set * @returns {CMsgSOIDOwner} CMsgSOIDOwner instance + * @type {{ + * (properties: CMsgSOIDOwner.$Shape): CMsgSOIDOwner & CMsgSOIDOwner.$Shape; + * (properties?: CMsgSOIDOwner.$Properties): CMsgSOIDOwner; + * }} */ - CMsgSOIDOwner.create = function create(properties) { + CMsgSOIDOwner.create = function(properties) { return new CMsgSOIDOwner(properties); }; @@ -112,17 +130,24 @@ * @function encode * @memberof CMsgSOIDOwner * @static - * @param {ICMsgSOIDOwner} message CMsgSOIDOwner message or plain object to encode + * @param {CMsgSOIDOwner.$Properties} message CMsgSOIDOwner message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOIDOwner.encode = function encode(message, writer) { + CMsgSOIDOwner.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.type); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -131,12 +156,12 @@ * @function encodeDelimited * @memberof CMsgSOIDOwner * @static - * @param {ICMsgSOIDOwner} message CMsgSOIDOwner message or plain object to encode + * @param {CMsgSOIDOwner.$Properties} message CMsgSOIDOwner message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOIDOwner.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSOIDOwner.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -146,28 +171,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOIDOwner} CMsgSOIDOwner + * @returns {CMsgSOIDOwner & CMsgSOIDOwner.$Shape} CMsgSOIDOwner * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOIDOwner.decode = function decode(reader, length) { + CMsgSOIDOwner.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOIDOwner(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOIDOwner(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.uint32(); - break; - case 2: - message.id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -177,11 +222,11 @@ * @memberof CMsgSOIDOwner * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOIDOwner} CMsgSOIDOwner + * @returns {CMsgSOIDOwner & CMsgSOIDOwner.$Shape} CMsgSOIDOwner * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOIDOwner.decodeDelimited = function decodeDelimited(reader) { + CMsgSOIDOwner.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -195,13 +240,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSOIDOwner.verify = function verify(message) { + CMsgSOIDOwner.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) if (!$util.isInteger(message.type)) return "type: integer expected"; - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) return "id: integer|Long expected"; return null; @@ -215,17 +264,23 @@ * @param {Object.} object Plain object * @returns {CMsgSOIDOwner} CMsgSOIDOwner */ - CMsgSOIDOwner.fromObject = function fromObject(object) { + CMsgSOIDOwner.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOIDOwner) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOIDOwner: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOIDOwner(); if (object.type != null) message.type = object.type >>> 0; if (object.id != null) if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = true; + message.id = $util.Long.fromValue(object.id, true); else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); + message.id = $parseInt(object.id, 10); else if (typeof object.id === "number") message.id = object.id; else if (typeof object.id === "object") @@ -242,25 +297,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSOIDOwner.toObject = function toObject(message, options) { + CMsgSOIDOwner.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.type = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.id = options.longs === String ? "0" : 0; + object.id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.id = typeof message.id === "number" ? $BigInt(message.id) : $util.Long.fromBits(message.id.low >>> 0, message.id.high >>> 0, true).toBigInt(); + else if (typeof message.id === "number") + object.id = options.longs === $String ? $String(message.id) : message.id; else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; + object.id = options.longs === $String ? $util.Long.prototype.toString.call(message.id) : options.longs === $Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; return object; }; @@ -271,8 +332,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSOIDOwner.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSOIDOwner.prototype.toJSON = function() { + return CMsgSOIDOwner.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSOIDOwner + * @function getTypeUrl + * @memberof CMsgSOIDOwner + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSOIDOwner.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOIDOwner"; }; return CMsgSOIDOwner; @@ -282,30 +357,43 @@ /** * Properties of a CMsgSOSingleObject. - * @exports ICMsgSOSingleObject - * @interface ICMsgSOSingleObject + * @typedef {Object} CMsgSOSingleObject.$Properties * @property {number|Long|null} [owner] CMsgSOSingleObject owner * @property {number|null} [type_id] CMsgSOSingleObject type_id * @property {Uint8Array|null} [object_data] CMsgSOSingleObject object_data * @property {number|Long|null} [version] CMsgSOSingleObject version - * @property {ICMsgSOIDOwner|null} [owner_soid] CMsgSOSingleObject owner_soid + * @property {CMsgSOIDOwner.$Properties|null} [owner_soid] CMsgSOSingleObject owner_soid * @property {number|null} [service_id] CMsgSOSingleObject service_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSOSingleObject. + * @exports ICMsgSOSingleObject + * @interface ICMsgSOSingleObject + * @augments CMsgSOSingleObject.$Properties + * @deprecated Use CMsgSOSingleObject.$Properties instead. + */ + + /** + * Shape of a CMsgSOSingleObject. + * @typedef {CMsgSOSingleObject.$Properties} CMsgSOSingleObject.$Shape */ /** * Constructs a new CMsgSOSingleObject. * @exports CMsgSOSingleObject * @classdesc Represents a CMsgSOSingleObject. - * @implements ICMsgSOSingleObject * @constructor - * @param {ICMsgSOSingleObject=} [properties] Properties to set + * @param {CMsgSOSingleObject.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSOSingleObject(properties) { + var CMsgSOSingleObject = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSOSingleObject owner. @@ -313,7 +401,7 @@ * @memberof CMsgSOSingleObject * @instance */ - CMsgSOSingleObject.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOSingleObject.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSOSingleObject type_id. @@ -337,11 +425,11 @@ * @memberof CMsgSOSingleObject * @instance */ - CMsgSOSingleObject.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOSingleObject.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSOSingleObject owner_soid. - * @member {ICMsgSOIDOwner|null|undefined} owner_soid + * @member {CMsgSOIDOwner.$Properties|null|undefined} owner_soid * @memberof CMsgSOSingleObject * @instance */ @@ -360,10 +448,14 @@ * @function create * @memberof CMsgSOSingleObject * @static - * @param {ICMsgSOSingleObject=} [properties] Properties to set + * @param {CMsgSOSingleObject.$Properties=} [properties] Properties to set * @returns {CMsgSOSingleObject} CMsgSOSingleObject instance + * @type {{ + * (properties: CMsgSOSingleObject.$Shape): CMsgSOSingleObject & CMsgSOSingleObject.$Shape; + * (properties?: CMsgSOSingleObject.$Properties): CMsgSOSingleObject; + * }} */ - CMsgSOSingleObject.create = function create(properties) { + CMsgSOSingleObject.create = function(properties) { return new CMsgSOSingleObject(properties); }; @@ -372,25 +464,32 @@ * @function encode * @memberof CMsgSOSingleObject * @static - * @param {ICMsgSOSingleObject} message CMsgSOSingleObject message or plain object to encode + * @param {CMsgSOSingleObject.$Properties} message CMsgSOSingleObject message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOSingleObject.encode = function encode(message, writer) { + CMsgSOSingleObject.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.owner); - if (message.type_id != null && Object.hasOwnProperty.call(message, "type_id")) + if (message.type_id != null && $Object.hasOwnProperty.call(message, "type_id")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type_id); - if (message.object_data != null && Object.hasOwnProperty.call(message, "object_data")) + if (message.object_data != null && $Object.hasOwnProperty.call(message, "object_data")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.object_data); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.version); - if (message.owner_soid != null && Object.hasOwnProperty.call(message, "owner_soid")) - $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service_id != null && Object.hasOwnProperty.call(message, "service_id")) + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.service_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -399,12 +498,12 @@ * @function encodeDelimited * @memberof CMsgSOSingleObject * @static - * @param {ICMsgSOSingleObject} message CMsgSOSingleObject message or plain object to encode + * @param {CMsgSOSingleObject.$Properties} message CMsgSOSingleObject message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOSingleObject.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSOSingleObject.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -414,40 +513,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOSingleObject} CMsgSOSingleObject + * @returns {CMsgSOSingleObject & CMsgSOSingleObject.$Shape} CMsgSOSingleObject * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOSingleObject.decode = function decode(reader, length) { + CMsgSOSingleObject.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOSingleObject(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOSingleObject(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.fixed64(); - break; - case 2: - message.type_id = reader.int32(); - break; - case 3: - message.object_data = reader.bytes(); - break; - case 4: - message.version = reader.fixed64(); - break; - case 5: - message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32()); - break; - case 6: - message.service_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.owner = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.type_id = reader.int32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.object_data = reader.bytes(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.version = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32(), $undefined, _depth + 1, message.owner_soid); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.service_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -457,11 +588,11 @@ * @memberof CMsgSOSingleObject * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOSingleObject} CMsgSOSingleObject + * @returns {CMsgSOSingleObject & CMsgSOSingleObject.$Shape} CMsgSOSingleObject * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOSingleObject.decodeDelimited = function decodeDelimited(reader) { + CMsgSOSingleObject.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -475,27 +606,31 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSOSingleObject.verify = function verify(message) { + CMsgSOSingleObject.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) if (!$util.isInteger(message.owner) && !(message.owner && $util.isInteger(message.owner.low) && $util.isInteger(message.owner.high))) return "owner: integer|Long expected"; - if (message.type_id != null && message.hasOwnProperty("type_id")) + if (message.type_id != null && $Object.hasOwnProperty.call(message, "type_id")) if (!$util.isInteger(message.type_id)) return "type_id: integer expected"; - if (message.object_data != null && message.hasOwnProperty("object_data")) + if (message.object_data != null && $Object.hasOwnProperty.call(message, "object_data")) if (!(message.object_data && typeof message.object_data.length === "number" || $util.isString(message.object_data))) return "object_data: buffer expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) return "version: integer|Long expected"; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) { - var error = $root.CMsgSOIDOwner.verify(message.owner_soid); + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) { + var error = $root.CMsgSOIDOwner.verify(message.owner_soid, _depth + 1); if (error) return "owner_soid." + error; } - if (message.service_id != null && message.hasOwnProperty("service_id")) + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) if (!$util.isInteger(message.service_id)) return "service_id: integer expected"; return null; @@ -509,39 +644,45 @@ * @param {Object.} object Plain object * @returns {CMsgSOSingleObject} CMsgSOSingleObject */ - CMsgSOSingleObject.fromObject = function fromObject(object) { + CMsgSOSingleObject.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOSingleObject) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOSingleObject: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOSingleObject(); if (object.owner != null) if ($util.Long) - (message.owner = $util.Long.fromValue(object.owner)).unsigned = false; + message.owner = $util.Long.fromValue(object.owner, true); else if (typeof object.owner === "string") - message.owner = parseInt(object.owner, 10); + message.owner = $parseInt(object.owner, 10); else if (typeof object.owner === "number") message.owner = object.owner; else if (typeof object.owner === "object") - message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(); + message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(true); if (object.type_id != null) message.type_id = object.type_id | 0; if (object.object_data != null) if (typeof object.object_data === "string") $util.base64.decode(object.object_data, message.object_data = $util.newBuffer($util.base64.length(object.object_data)), 0); - else if (object.object_data.length) + else if (object.object_data.length >= 0) message.object_data = object.object_data; if (object.version != null) if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = false; + message.version = $util.Long.fromValue(object.version, true); else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); + message.version = $parseInt(object.version, 10); else if (typeof object.version === "number") message.version = object.version; else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); if (object.owner_soid != null) { - if (typeof object.owner_soid !== "object") - throw TypeError(".CMsgSOSingleObject.owner_soid: object expected"); - message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid); + if (!$util.isObject(object.owner_soid)) + throw $TypeError(".CMsgSOSingleObject.owner_soid: object expected"); + message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid, _depth + 1); } if (object.service_id != null) message.service_id = object.service_id >>> 0; @@ -557,49 +698,57 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSOSingleObject.toObject = function toObject(message, options) { + CMsgSOSingleObject.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.owner = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.owner = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.owner = options.longs === String ? "0" : 0; + object.owner = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.type_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.object_data = ""; else { object.object_data = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.object_data = $util.newBuffer(object.object_data); } if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.version = options.longs === String ? "0" : 0; + object.version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.owner_soid = null; object.service_id = 0; } - if (message.owner != null && message.hasOwnProperty("owner")) - if (typeof message.owner === "number") - object.owner = options.longs === String ? String(message.owner) : message.owner; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.owner = typeof message.owner === "number" ? $BigInt(message.owner) : $util.Long.fromBits(message.owner.low >>> 0, message.owner.high >>> 0, true).toBigInt(); + else if (typeof message.owner === "number") + object.owner = options.longs === $String ? $String(message.owner) : message.owner; else - object.owner = options.longs === String ? $util.Long.prototype.toString.call(message.owner) : options.longs === Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber() : message.owner; - if (message.type_id != null && message.hasOwnProperty("type_id")) + object.owner = options.longs === $String ? $util.Long.prototype.toString.call(message.owner) : options.longs === $Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber(true) : message.owner; + if (message.type_id != null && $Object.hasOwnProperty.call(message, "type_id")) object.type_id = message.type_id; - if (message.object_data != null && message.hasOwnProperty("object_data")) - object.object_data = options.bytes === String ? $util.base64.encode(message.object_data, 0, message.object_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.object_data) : message.object_data; - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; + if (message.object_data != null && $Object.hasOwnProperty.call(message, "object_data")) + object.object_data = options.bytes === $String ? $util.base64.encode(message.object_data, 0, message.object_data.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.object_data) : message.object_data; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.version = typeof message.version === "number" ? $BigInt(message.version) : $util.Long.fromBits(message.version.low >>> 0, message.version.high >>> 0, true).toBigInt(); + else if (typeof message.version === "number") + object.version = options.longs === $String ? $String(message.version) : message.version; else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) - object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options); - if (message.service_id != null && message.hasOwnProperty("service_id")) + object.version = options.longs === $String ? $util.Long.prototype.toString.call(message.version) : options.longs === $Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options, _depth + 1); + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) object.service_id = message.service_id; return object; }; @@ -611,8 +760,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSOSingleObject.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSOSingleObject.prototype.toJSON = function() { + return CMsgSOSingleObject.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSOSingleObject + * @function getTypeUrl + * @memberof CMsgSOSingleObject + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSOSingleObject.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOSingleObject"; }; return CMsgSOSingleObject; @@ -622,30 +785,43 @@ /** * Properties of a CMsgSOMultipleObjects. - * @exports ICMsgSOMultipleObjects - * @interface ICMsgSOMultipleObjects + * @typedef {Object} CMsgSOMultipleObjects.$Properties * @property {number|Long|null} [owner] CMsgSOMultipleObjects owner - * @property {Array.|null} [objects] CMsgSOMultipleObjects objects + * @property {Array.|null} [objects] CMsgSOMultipleObjects objects * @property {number|Long|null} [version] CMsgSOMultipleObjects version - * @property {ICMsgSOIDOwner|null} [owner_soid] CMsgSOMultipleObjects owner_soid + * @property {CMsgSOIDOwner.$Properties|null} [owner_soid] CMsgSOMultipleObjects owner_soid * @property {number|null} [service_id] CMsgSOMultipleObjects service_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSOMultipleObjects. + * @exports ICMsgSOMultipleObjects + * @interface ICMsgSOMultipleObjects + * @augments CMsgSOMultipleObjects.$Properties + * @deprecated Use CMsgSOMultipleObjects.$Properties instead. + */ + + /** + * Shape of a CMsgSOMultipleObjects. + * @typedef {CMsgSOMultipleObjects.$Properties} CMsgSOMultipleObjects.$Shape */ /** * Constructs a new CMsgSOMultipleObjects. * @exports CMsgSOMultipleObjects * @classdesc Represents a CMsgSOMultipleObjects. - * @implements ICMsgSOMultipleObjects * @constructor - * @param {ICMsgSOMultipleObjects=} [properties] Properties to set + * @param {CMsgSOMultipleObjects.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSOMultipleObjects(properties) { + var CMsgSOMultipleObjects = function (properties) { this.objects = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSOMultipleObjects owner. @@ -653,11 +829,11 @@ * @memberof CMsgSOMultipleObjects * @instance */ - CMsgSOMultipleObjects.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOMultipleObjects.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSOMultipleObjects objects. - * @member {Array.} objects + * @member {Array.} objects * @memberof CMsgSOMultipleObjects * @instance */ @@ -669,11 +845,11 @@ * @memberof CMsgSOMultipleObjects * @instance */ - CMsgSOMultipleObjects.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOMultipleObjects.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSOMultipleObjects owner_soid. - * @member {ICMsgSOIDOwner|null|undefined} owner_soid + * @member {CMsgSOIDOwner.$Properties|null|undefined} owner_soid * @memberof CMsgSOMultipleObjects * @instance */ @@ -692,10 +868,14 @@ * @function create * @memberof CMsgSOMultipleObjects * @static - * @param {ICMsgSOMultipleObjects=} [properties] Properties to set + * @param {CMsgSOMultipleObjects.$Properties=} [properties] Properties to set * @returns {CMsgSOMultipleObjects} CMsgSOMultipleObjects instance + * @type {{ + * (properties: CMsgSOMultipleObjects.$Shape): CMsgSOMultipleObjects & CMsgSOMultipleObjects.$Shape; + * (properties?: CMsgSOMultipleObjects.$Properties): CMsgSOMultipleObjects; + * }} */ - CMsgSOMultipleObjects.create = function create(properties) { + CMsgSOMultipleObjects.create = function(properties) { return new CMsgSOMultipleObjects(properties); }; @@ -704,24 +884,31 @@ * @function encode * @memberof CMsgSOMultipleObjects * @static - * @param {ICMsgSOMultipleObjects} message CMsgSOMultipleObjects message or plain object to encode + * @param {CMsgSOMultipleObjects.$Properties} message CMsgSOMultipleObjects message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOMultipleObjects.encode = function encode(message, writer) { + CMsgSOMultipleObjects.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.owner); if (message.objects != null && message.objects.length) for (var i = 0; i < message.objects.length; ++i) - $root.CMsgSOMultipleObjects.SingleObject.encode(message.objects[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.CMsgSOMultipleObjects.SingleObject.encode(message.objects[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.version); - if (message.owner_soid != null && Object.hasOwnProperty.call(message, "owner_soid")) - $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.service_id != null && Object.hasOwnProperty.call(message, "service_id")) + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.service_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -730,12 +917,12 @@ * @function encodeDelimited * @memberof CMsgSOMultipleObjects * @static - * @param {ICMsgSOMultipleObjects} message CMsgSOMultipleObjects message or plain object to encode + * @param {CMsgSOMultipleObjects.$Properties} message CMsgSOMultipleObjects message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOMultipleObjects.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSOMultipleObjects.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -745,39 +932,68 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOMultipleObjects} CMsgSOMultipleObjects + * @returns {CMsgSOMultipleObjects & CMsgSOMultipleObjects.$Shape} CMsgSOMultipleObjects * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOMultipleObjects.decode = function decode(reader, length) { + CMsgSOMultipleObjects.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOMultipleObjects(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOMultipleObjects(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.fixed64(); - break; - case 2: - if (!(message.objects && message.objects.length)) - message.objects = []; - message.objects.push($root.CMsgSOMultipleObjects.SingleObject.decode(reader, reader.uint32())); - break; - case 3: - message.version = reader.fixed64(); - break; - case 6: - message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32()); - break; - case 7: - message.service_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.owner = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.objects && message.objects.length)) + message.objects = []; + message.objects.push($root.CMsgSOMultipleObjects.SingleObject.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.version = reader.fixed64(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32(), $undefined, _depth + 1, message.owner_soid); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.service_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -787,11 +1003,11 @@ * @memberof CMsgSOMultipleObjects * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOMultipleObjects} CMsgSOMultipleObjects + * @returns {CMsgSOMultipleObjects & CMsgSOMultipleObjects.$Shape} CMsgSOMultipleObjects * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOMultipleObjects.decodeDelimited = function decodeDelimited(reader) { + CMsgSOMultipleObjects.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -805,30 +1021,34 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSOMultipleObjects.verify = function verify(message) { + CMsgSOMultipleObjects.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) if (!$util.isInteger(message.owner) && !(message.owner && $util.isInteger(message.owner.low) && $util.isInteger(message.owner.high))) return "owner: integer|Long expected"; - if (message.objects != null && message.hasOwnProperty("objects")) { - if (!Array.isArray(message.objects)) + if (message.objects != null && $Object.hasOwnProperty.call(message, "objects")) { + if (!$Array.isArray(message.objects)) return "objects: array expected"; for (var i = 0; i < message.objects.length; ++i) { - var error = $root.CMsgSOMultipleObjects.SingleObject.verify(message.objects[i]); + var error = $root.CMsgSOMultipleObjects.SingleObject.verify(message.objects[i], _depth + 1); if (error) return "objects." + error; } } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) return "version: integer|Long expected"; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) { - var error = $root.CMsgSOIDOwner.verify(message.owner_soid); + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) { + var error = $root.CMsgSOIDOwner.verify(message.owner_soid, _depth + 1); if (error) return "owner_soid." + error; } - if (message.service_id != null && message.hasOwnProperty("service_id")) + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) if (!$util.isInteger(message.service_id)) return "service_id: integer expected"; return null; @@ -842,42 +1062,48 @@ * @param {Object.} object Plain object * @returns {CMsgSOMultipleObjects} CMsgSOMultipleObjects */ - CMsgSOMultipleObjects.fromObject = function fromObject(object) { + CMsgSOMultipleObjects.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOMultipleObjects) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOMultipleObjects: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOMultipleObjects(); if (object.owner != null) if ($util.Long) - (message.owner = $util.Long.fromValue(object.owner)).unsigned = false; + message.owner = $util.Long.fromValue(object.owner, true); else if (typeof object.owner === "string") - message.owner = parseInt(object.owner, 10); + message.owner = $parseInt(object.owner, 10); else if (typeof object.owner === "number") message.owner = object.owner; else if (typeof object.owner === "object") - message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(); + message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(true); if (object.objects) { - if (!Array.isArray(object.objects)) - throw TypeError(".CMsgSOMultipleObjects.objects: array expected"); - message.objects = []; + if (!$Array.isArray(object.objects)) + throw $TypeError(".CMsgSOMultipleObjects.objects: array expected"); + message.objects = $Array(object.objects.length); for (var i = 0; i < object.objects.length; ++i) { - if (typeof object.objects[i] !== "object") - throw TypeError(".CMsgSOMultipleObjects.objects: object expected"); - message.objects[i] = $root.CMsgSOMultipleObjects.SingleObject.fromObject(object.objects[i]); + if (!$util.isObject(object.objects[i])) + throw $TypeError(".CMsgSOMultipleObjects.objects: object expected"); + message.objects[i] = $root.CMsgSOMultipleObjects.SingleObject.fromObject(object.objects[i], _depth + 1); } } if (object.version != null) if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = false; + message.version = $util.Long.fromValue(object.version, true); else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); + message.version = $parseInt(object.version, 10); else if (typeof object.version === "number") message.version = object.version; else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); if (object.owner_soid != null) { - if (typeof object.owner_soid !== "object") - throw TypeError(".CMsgSOMultipleObjects.owner_soid: object expected"); - message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid); + if (!$util.isObject(object.owner_soid)) + throw $TypeError(".CMsgSOMultipleObjects.owner_soid: object expected"); + message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid, _depth + 1); } if (object.service_id != null) message.service_id = object.service_id >>> 0; @@ -893,44 +1119,52 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSOMultipleObjects.toObject = function toObject(message, options) { + CMsgSOMultipleObjects.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.objects = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.owner = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.owner = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.owner = options.longs === String ? "0" : 0; + object.owner = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.version = options.longs === String ? "0" : 0; + object.version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.owner_soid = null; object.service_id = 0; } - if (message.owner != null && message.hasOwnProperty("owner")) - if (typeof message.owner === "number") - object.owner = options.longs === String ? String(message.owner) : message.owner; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.owner = typeof message.owner === "number" ? $BigInt(message.owner) : $util.Long.fromBits(message.owner.low >>> 0, message.owner.high >>> 0, true).toBigInt(); + else if (typeof message.owner === "number") + object.owner = options.longs === $String ? $String(message.owner) : message.owner; else - object.owner = options.longs === String ? $util.Long.prototype.toString.call(message.owner) : options.longs === Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber() : message.owner; + object.owner = options.longs === $String ? $util.Long.prototype.toString.call(message.owner) : options.longs === $Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber(true) : message.owner; if (message.objects && message.objects.length) { - object.objects = []; + object.objects = $Array(message.objects.length); for (var j = 0; j < message.objects.length; ++j) - object.objects[j] = $root.CMsgSOMultipleObjects.SingleObject.toObject(message.objects[j], options); + object.objects[j] = $root.CMsgSOMultipleObjects.SingleObject.toObject(message.objects[j], options, _depth + 1); } - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.version = typeof message.version === "number" ? $BigInt(message.version) : $util.Long.fromBits(message.version.low >>> 0, message.version.high >>> 0, true).toBigInt(); + else if (typeof message.version === "number") + object.version = options.longs === $String ? $String(message.version) : message.version; else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) - object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options); - if (message.service_id != null && message.hasOwnProperty("service_id")) + object.version = options.longs === $String ? $util.Long.prototype.toString.call(message.version) : options.longs === $Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options, _depth + 1); + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) object.service_id = message.service_id; return object; }; @@ -942,34 +1176,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgSOMultipleObjects.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSOMultipleObjects.prototype.toJSON = function() { + return CMsgSOMultipleObjects.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSOMultipleObjects + * @function getTypeUrl + * @memberof CMsgSOMultipleObjects + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSOMultipleObjects.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOMultipleObjects"; }; CMsgSOMultipleObjects.SingleObject = (function() { /** * Properties of a SingleObject. - * @memberof CMsgSOMultipleObjects - * @interface ISingleObject + * @typedef {Object} CMsgSOMultipleObjects.SingleObject.$Properties * @property {number|null} [type_id] SingleObject type_id * @property {Uint8Array|null} [object_data] SingleObject object_data + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SingleObject. + * @memberof CMsgSOMultipleObjects + * @interface ISingleObject + * @augments CMsgSOMultipleObjects.SingleObject.$Properties + * @deprecated Use CMsgSOMultipleObjects.SingleObject.$Properties instead. + */ + + /** + * Shape of a SingleObject. + * @typedef {CMsgSOMultipleObjects.SingleObject.$Properties} CMsgSOMultipleObjects.SingleObject.$Shape */ /** * Constructs a new SingleObject. * @memberof CMsgSOMultipleObjects * @classdesc Represents a SingleObject. - * @implements ISingleObject * @constructor - * @param {CMsgSOMultipleObjects.ISingleObject=} [properties] Properties to set + * @param {CMsgSOMultipleObjects.SingleObject.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SingleObject(properties) { + var SingleObject = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SingleObject type_id. @@ -992,10 +1253,14 @@ * @function create * @memberof CMsgSOMultipleObjects.SingleObject * @static - * @param {CMsgSOMultipleObjects.ISingleObject=} [properties] Properties to set + * @param {CMsgSOMultipleObjects.SingleObject.$Properties=} [properties] Properties to set * @returns {CMsgSOMultipleObjects.SingleObject} SingleObject instance + * @type {{ + * (properties: CMsgSOMultipleObjects.SingleObject.$Shape): CMsgSOMultipleObjects.SingleObject & CMsgSOMultipleObjects.SingleObject.$Shape; + * (properties?: CMsgSOMultipleObjects.SingleObject.$Properties): CMsgSOMultipleObjects.SingleObject; + * }} */ - SingleObject.create = function create(properties) { + SingleObject.create = function(properties) { return new SingleObject(properties); }; @@ -1004,17 +1269,24 @@ * @function encode * @memberof CMsgSOMultipleObjects.SingleObject * @static - * @param {CMsgSOMultipleObjects.ISingleObject} message SingleObject message or plain object to encode + * @param {CMsgSOMultipleObjects.SingleObject.$Properties} message SingleObject message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SingleObject.encode = function encode(message, writer) { + SingleObject.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.type_id != null && Object.hasOwnProperty.call(message, "type_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.type_id != null && $Object.hasOwnProperty.call(message, "type_id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type_id); - if (message.object_data != null && Object.hasOwnProperty.call(message, "object_data")) + if (message.object_data != null && $Object.hasOwnProperty.call(message, "object_data")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.object_data); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1023,12 +1295,12 @@ * @function encodeDelimited * @memberof CMsgSOMultipleObjects.SingleObject * @static - * @param {CMsgSOMultipleObjects.ISingleObject} message SingleObject message or plain object to encode + * @param {CMsgSOMultipleObjects.SingleObject.$Properties} message SingleObject message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SingleObject.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SingleObject.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1038,28 +1310,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOMultipleObjects.SingleObject} SingleObject + * @returns {CMsgSOMultipleObjects.SingleObject & CMsgSOMultipleObjects.SingleObject.$Shape} SingleObject * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SingleObject.decode = function decode(reader, length) { + SingleObject.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOMultipleObjects.SingleObject(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOMultipleObjects.SingleObject(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_id = reader.int32(); - break; - case 2: - message.object_data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.type_id = reader.int32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.object_data = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1069,11 +1361,11 @@ * @memberof CMsgSOMultipleObjects.SingleObject * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOMultipleObjects.SingleObject} SingleObject + * @returns {CMsgSOMultipleObjects.SingleObject & CMsgSOMultipleObjects.SingleObject.$Shape} SingleObject * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SingleObject.decodeDelimited = function decodeDelimited(reader) { + SingleObject.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1087,13 +1379,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SingleObject.verify = function verify(message) { + SingleObject.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type_id != null && message.hasOwnProperty("type_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.type_id != null && $Object.hasOwnProperty.call(message, "type_id")) if (!$util.isInteger(message.type_id)) return "type_id: integer expected"; - if (message.object_data != null && message.hasOwnProperty("object_data")) + if (message.object_data != null && $Object.hasOwnProperty.call(message, "object_data")) if (!(message.object_data && typeof message.object_data.length === "number" || $util.isString(message.object_data))) return "object_data: buffer expected"; return null; @@ -1107,16 +1403,22 @@ * @param {Object.} object Plain object * @returns {CMsgSOMultipleObjects.SingleObject} SingleObject */ - SingleObject.fromObject = function fromObject(object) { + SingleObject.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOMultipleObjects.SingleObject) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOMultipleObjects.SingleObject: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOMultipleObjects.SingleObject(); if (object.type_id != null) message.type_id = object.type_id | 0; if (object.object_data != null) if (typeof object.object_data === "string") $util.base64.decode(object.object_data, message.object_data = $util.newBuffer($util.base64.length(object.object_data)), 0); - else if (object.object_data.length) + else if (object.object_data.length >= 0) message.object_data = object.object_data; return message; }; @@ -1130,24 +1432,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SingleObject.toObject = function toObject(message, options) { + SingleObject.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.type_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.object_data = ""; else { object.object_data = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.object_data = $util.newBuffer(object.object_data); } } - if (message.type_id != null && message.hasOwnProperty("type_id")) + if (message.type_id != null && $Object.hasOwnProperty.call(message, "type_id")) object.type_id = message.type_id; - if (message.object_data != null && message.hasOwnProperty("object_data")) - object.object_data = options.bytes === String ? $util.base64.encode(message.object_data, 0, message.object_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.object_data) : message.object_data; + if (message.object_data != null && $Object.hasOwnProperty.call(message, "object_data")) + object.object_data = options.bytes === $String ? $util.base64.encode(message.object_data, 0, message.object_data.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.object_data) : message.object_data; return object; }; @@ -1158,8 +1464,22 @@ * @instance * @returns {Object.} JSON object */ - SingleObject.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SingleObject.prototype.toJSON = function() { + return SingleObject.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SingleObject + * @function getTypeUrl + * @memberof CMsgSOMultipleObjects.SingleObject + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SingleObject.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOMultipleObjects.SingleObject"; }; return SingleObject; @@ -1172,33 +1492,46 @@ /** * Properties of a CMsgSOCacheSubscribed. - * @exports ICMsgSOCacheSubscribed - * @interface ICMsgSOCacheSubscribed + * @typedef {Object} CMsgSOCacheSubscribed.$Properties * @property {number|Long|null} [owner] CMsgSOCacheSubscribed owner - * @property {Array.|null} [objects] CMsgSOCacheSubscribed objects + * @property {Array.|null} [objects] CMsgSOCacheSubscribed objects * @property {number|Long|null} [version] CMsgSOCacheSubscribed version - * @property {ICMsgSOIDOwner|null} [owner_soid] CMsgSOCacheSubscribed owner_soid + * @property {CMsgSOIDOwner.$Properties|null} [owner_soid] CMsgSOCacheSubscribed owner_soid * @property {number|null} [service_id] CMsgSOCacheSubscribed service_id * @property {Array.|null} [service_list] CMsgSOCacheSubscribed service_list * @property {number|Long|null} [sync_version] CMsgSOCacheSubscribed sync_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSOCacheSubscribed. + * @exports ICMsgSOCacheSubscribed + * @interface ICMsgSOCacheSubscribed + * @augments CMsgSOCacheSubscribed.$Properties + * @deprecated Use CMsgSOCacheSubscribed.$Properties instead. + */ + + /** + * Shape of a CMsgSOCacheSubscribed. + * @typedef {CMsgSOCacheSubscribed.$Properties} CMsgSOCacheSubscribed.$Shape */ /** * Constructs a new CMsgSOCacheSubscribed. * @exports CMsgSOCacheSubscribed * @classdesc Represents a CMsgSOCacheSubscribed. - * @implements ICMsgSOCacheSubscribed * @constructor - * @param {ICMsgSOCacheSubscribed=} [properties] Properties to set + * @param {CMsgSOCacheSubscribed.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSOCacheSubscribed(properties) { + var CMsgSOCacheSubscribed = function (properties) { this.objects = []; this.service_list = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSOCacheSubscribed owner. @@ -1206,11 +1539,11 @@ * @memberof CMsgSOCacheSubscribed * @instance */ - CMsgSOCacheSubscribed.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheSubscribed.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSOCacheSubscribed objects. - * @member {Array.} objects + * @member {Array.} objects * @memberof CMsgSOCacheSubscribed * @instance */ @@ -1222,11 +1555,11 @@ * @memberof CMsgSOCacheSubscribed * @instance */ - CMsgSOCacheSubscribed.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheSubscribed.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSOCacheSubscribed owner_soid. - * @member {ICMsgSOIDOwner|null|undefined} owner_soid + * @member {CMsgSOIDOwner.$Properties|null|undefined} owner_soid * @memberof CMsgSOCacheSubscribed * @instance */ @@ -1254,17 +1587,21 @@ * @memberof CMsgSOCacheSubscribed * @instance */ - CMsgSOCacheSubscribed.prototype.sync_version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheSubscribed.prototype.sync_version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgSOCacheSubscribed instance using the specified properties. * @function create * @memberof CMsgSOCacheSubscribed * @static - * @param {ICMsgSOCacheSubscribed=} [properties] Properties to set + * @param {CMsgSOCacheSubscribed.$Properties=} [properties] Properties to set * @returns {CMsgSOCacheSubscribed} CMsgSOCacheSubscribed instance + * @type {{ + * (properties: CMsgSOCacheSubscribed.$Shape): CMsgSOCacheSubscribed & CMsgSOCacheSubscribed.$Shape; + * (properties?: CMsgSOCacheSubscribed.$Properties): CMsgSOCacheSubscribed; + * }} */ - CMsgSOCacheSubscribed.create = function create(properties) { + CMsgSOCacheSubscribed.create = function(properties) { return new CMsgSOCacheSubscribed(properties); }; @@ -1273,29 +1610,36 @@ * @function encode * @memberof CMsgSOCacheSubscribed * @static - * @param {ICMsgSOCacheSubscribed} message CMsgSOCacheSubscribed message or plain object to encode + * @param {CMsgSOCacheSubscribed.$Properties} message CMsgSOCacheSubscribed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheSubscribed.encode = function encode(message, writer) { + CMsgSOCacheSubscribed.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.owner); if (message.objects != null && message.objects.length) for (var i = 0; i < message.objects.length; ++i) - $root.CMsgSOCacheSubscribed.SubscribedType.encode(message.objects[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.CMsgSOCacheSubscribed.SubscribedType.encode(message.objects[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.version); - if (message.owner_soid != null && Object.hasOwnProperty.call(message, "owner_soid")) - $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.service_id != null && Object.hasOwnProperty.call(message, "service_id")) + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.service_id); if (message.service_list != null && message.service_list.length) for (var i = 0; i < message.service_list.length; ++i) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.service_list[i]); - if (message.sync_version != null && Object.hasOwnProperty.call(message, "sync_version")) + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) writer.uint32(/* id 7, wireType 1 =*/57).fixed64(message.sync_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1304,12 +1648,12 @@ * @function encodeDelimited * @memberof CMsgSOCacheSubscribed * @static - * @param {ICMsgSOCacheSubscribed} message CMsgSOCacheSubscribed message or plain object to encode + * @param {CMsgSOCacheSubscribed.$Properties} message CMsgSOCacheSubscribed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheSubscribed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSOCacheSubscribed.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1319,52 +1663,88 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOCacheSubscribed} CMsgSOCacheSubscribed + * @returns {CMsgSOCacheSubscribed & CMsgSOCacheSubscribed.$Shape} CMsgSOCacheSubscribed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheSubscribed.decode = function decode(reader, length) { + CMsgSOCacheSubscribed.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOCacheSubscribed(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOCacheSubscribed(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.fixed64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.objects && message.objects.length)) - message.objects = []; - message.objects.push($root.CMsgSOCacheSubscribed.SubscribedType.decode(reader, reader.uint32())); - break; - case 3: - message.version = reader.fixed64(); - break; - case 4: - message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32()); - break; - case 5: - message.service_id = reader.uint32(); - break; - case 6: - if (!(message.service_list && message.service_list.length)) - message.service_list = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.service_list.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.owner = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.objects && message.objects.length)) + message.objects = []; + message.objects.push($root.CMsgSOCacheSubscribed.SubscribedType.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.version = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32(), $undefined, _depth + 1, message.owner_soid); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.service_id = reader.uint32(); + continue; + } + case 6: { + if (wireType === 2) { + if (!(message.service_list && message.service_list.length)) + message.service_list = []; + reader.uint32s(message.service_list); + continue; + } + if (wireType !== 0) + break; + if (!(message.service_list && message.service_list.length)) + message.service_list = []; message.service_list.push(reader.uint32()); - break; - case 7: - message.sync_version = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 7: { + if (wireType !== 1) + break; + message.sync_version = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1374,11 +1754,11 @@ * @memberof CMsgSOCacheSubscribed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOCacheSubscribed} CMsgSOCacheSubscribed + * @returns {CMsgSOCacheSubscribed & CMsgSOCacheSubscribed.$Shape} CMsgSOCacheSubscribed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheSubscribed.decodeDelimited = function decodeDelimited(reader) { + CMsgSOCacheSubscribed.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1392,40 +1772,44 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSOCacheSubscribed.verify = function verify(message) { + CMsgSOCacheSubscribed.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) if (!$util.isInteger(message.owner) && !(message.owner && $util.isInteger(message.owner.low) && $util.isInteger(message.owner.high))) return "owner: integer|Long expected"; - if (message.objects != null && message.hasOwnProperty("objects")) { - if (!Array.isArray(message.objects)) + if (message.objects != null && $Object.hasOwnProperty.call(message, "objects")) { + if (!$Array.isArray(message.objects)) return "objects: array expected"; for (var i = 0; i < message.objects.length; ++i) { - var error = $root.CMsgSOCacheSubscribed.SubscribedType.verify(message.objects[i]); + var error = $root.CMsgSOCacheSubscribed.SubscribedType.verify(message.objects[i], _depth + 1); if (error) return "objects." + error; } } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) return "version: integer|Long expected"; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) { - var error = $root.CMsgSOIDOwner.verify(message.owner_soid); + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) { + var error = $root.CMsgSOIDOwner.verify(message.owner_soid, _depth + 1); if (error) return "owner_soid." + error; } - if (message.service_id != null && message.hasOwnProperty("service_id")) + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) if (!$util.isInteger(message.service_id)) return "service_id: integer expected"; - if (message.service_list != null && message.hasOwnProperty("service_list")) { - if (!Array.isArray(message.service_list)) + if (message.service_list != null && $Object.hasOwnProperty.call(message, "service_list")) { + if (!$Array.isArray(message.service_list)) return "service_list: array expected"; for (var i = 0; i < message.service_list.length; ++i) if (!$util.isInteger(message.service_list[i])) return "service_list: integer[] expected"; } - if (message.sync_version != null && message.hasOwnProperty("sync_version")) + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) if (!$util.isInteger(message.sync_version) && !(message.sync_version && $util.isInteger(message.sync_version.low) && $util.isInteger(message.sync_version.high))) return "sync_version: integer|Long expected"; return null; @@ -1439,61 +1823,67 @@ * @param {Object.} object Plain object * @returns {CMsgSOCacheSubscribed} CMsgSOCacheSubscribed */ - CMsgSOCacheSubscribed.fromObject = function fromObject(object) { + CMsgSOCacheSubscribed.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOCacheSubscribed) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOCacheSubscribed: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOCacheSubscribed(); if (object.owner != null) if ($util.Long) - (message.owner = $util.Long.fromValue(object.owner)).unsigned = false; + message.owner = $util.Long.fromValue(object.owner, true); else if (typeof object.owner === "string") - message.owner = parseInt(object.owner, 10); + message.owner = $parseInt(object.owner, 10); else if (typeof object.owner === "number") message.owner = object.owner; else if (typeof object.owner === "object") - message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(); + message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(true); if (object.objects) { - if (!Array.isArray(object.objects)) - throw TypeError(".CMsgSOCacheSubscribed.objects: array expected"); - message.objects = []; + if (!$Array.isArray(object.objects)) + throw $TypeError(".CMsgSOCacheSubscribed.objects: array expected"); + message.objects = $Array(object.objects.length); for (var i = 0; i < object.objects.length; ++i) { - if (typeof object.objects[i] !== "object") - throw TypeError(".CMsgSOCacheSubscribed.objects: object expected"); - message.objects[i] = $root.CMsgSOCacheSubscribed.SubscribedType.fromObject(object.objects[i]); + if (!$util.isObject(object.objects[i])) + throw $TypeError(".CMsgSOCacheSubscribed.objects: object expected"); + message.objects[i] = $root.CMsgSOCacheSubscribed.SubscribedType.fromObject(object.objects[i], _depth + 1); } } if (object.version != null) if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = false; + message.version = $util.Long.fromValue(object.version, true); else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); + message.version = $parseInt(object.version, 10); else if (typeof object.version === "number") message.version = object.version; else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); if (object.owner_soid != null) { - if (typeof object.owner_soid !== "object") - throw TypeError(".CMsgSOCacheSubscribed.owner_soid: object expected"); - message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid); + if (!$util.isObject(object.owner_soid)) + throw $TypeError(".CMsgSOCacheSubscribed.owner_soid: object expected"); + message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid, _depth + 1); } if (object.service_id != null) message.service_id = object.service_id >>> 0; if (object.service_list) { - if (!Array.isArray(object.service_list)) - throw TypeError(".CMsgSOCacheSubscribed.service_list: array expected"); - message.service_list = []; + if (!$Array.isArray(object.service_list)) + throw $TypeError(".CMsgSOCacheSubscribed.service_list: array expected"); + message.service_list = $Array(object.service_list.length); for (var i = 0; i < object.service_list.length; ++i) message.service_list[i] = object.service_list[i] >>> 0; } if (object.sync_version != null) if ($util.Long) - (message.sync_version = $util.Long.fromValue(object.sync_version)).unsigned = false; + message.sync_version = $util.Long.fromValue(object.sync_version, true); else if (typeof object.sync_version === "string") - message.sync_version = parseInt(object.sync_version, 10); + message.sync_version = $parseInt(object.sync_version, 10); else if (typeof object.sync_version === "number") message.sync_version = object.sync_version; else if (typeof object.sync_version === "object") - message.sync_version = new $util.LongBits(object.sync_version.low >>> 0, object.sync_version.high >>> 0).toNumber(); + message.sync_version = new $util.LongBits(object.sync_version.low >>> 0, object.sync_version.high >>> 0).toNumber(true); return message; }; @@ -1506,9 +1896,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSOCacheSubscribed.toObject = function toObject(message, options) { + CMsgSOCacheSubscribed.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.objects = []; @@ -1516,52 +1910,58 @@ } if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.owner = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.owner = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.owner = options.longs === String ? "0" : 0; + object.owner = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.version = options.longs === String ? "0" : 0; + object.version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.owner_soid = null; object.service_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sync_version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.sync_version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.sync_version = options.longs === String ? "0" : 0; + object.sync_version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.owner != null && message.hasOwnProperty("owner")) - if (typeof message.owner === "number") - object.owner = options.longs === String ? String(message.owner) : message.owner; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.owner = typeof message.owner === "number" ? $BigInt(message.owner) : $util.Long.fromBits(message.owner.low >>> 0, message.owner.high >>> 0, true).toBigInt(); + else if (typeof message.owner === "number") + object.owner = options.longs === $String ? $String(message.owner) : message.owner; else - object.owner = options.longs === String ? $util.Long.prototype.toString.call(message.owner) : options.longs === Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber() : message.owner; + object.owner = options.longs === $String ? $util.Long.prototype.toString.call(message.owner) : options.longs === $Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber(true) : message.owner; if (message.objects && message.objects.length) { - object.objects = []; + object.objects = $Array(message.objects.length); for (var j = 0; j < message.objects.length; ++j) - object.objects[j] = $root.CMsgSOCacheSubscribed.SubscribedType.toObject(message.objects[j], options); + object.objects[j] = $root.CMsgSOCacheSubscribed.SubscribedType.toObject(message.objects[j], options, _depth + 1); } - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.version = typeof message.version === "number" ? $BigInt(message.version) : $util.Long.fromBits(message.version.low >>> 0, message.version.high >>> 0, true).toBigInt(); + else if (typeof message.version === "number") + object.version = options.longs === $String ? $String(message.version) : message.version; else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) - object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options); - if (message.service_id != null && message.hasOwnProperty("service_id")) + object.version = options.longs === $String ? $util.Long.prototype.toString.call(message.version) : options.longs === $Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options, _depth + 1); + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) object.service_id = message.service_id; if (message.service_list && message.service_list.length) { - object.service_list = []; + object.service_list = $Array(message.service_list.length); for (var j = 0; j < message.service_list.length; ++j) object.service_list[j] = message.service_list[j]; } - if (message.sync_version != null && message.hasOwnProperty("sync_version")) - if (typeof message.sync_version === "number") - object.sync_version = options.longs === String ? String(message.sync_version) : message.sync_version; + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.sync_version = typeof message.sync_version === "number" ? $BigInt(message.sync_version) : $util.Long.fromBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0, true).toBigInt(); + else if (typeof message.sync_version === "number") + object.sync_version = options.longs === $String ? $String(message.sync_version) : message.sync_version; else - object.sync_version = options.longs === String ? $util.Long.prototype.toString.call(message.sync_version) : options.longs === Number ? new $util.LongBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0).toNumber() : message.sync_version; + object.sync_version = options.longs === $String ? $util.Long.prototype.toString.call(message.sync_version) : options.longs === $Number ? new $util.LongBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0).toNumber(true) : message.sync_version; return object; }; @@ -1572,35 +1972,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgSOCacheSubscribed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSOCacheSubscribed.prototype.toJSON = function() { + return CMsgSOCacheSubscribed.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSOCacheSubscribed + * @function getTypeUrl + * @memberof CMsgSOCacheSubscribed + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSOCacheSubscribed.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOCacheSubscribed"; }; CMsgSOCacheSubscribed.SubscribedType = (function() { /** * Properties of a SubscribedType. - * @memberof CMsgSOCacheSubscribed - * @interface ISubscribedType + * @typedef {Object} CMsgSOCacheSubscribed.SubscribedType.$Properties * @property {number|null} [type_id] SubscribedType type_id * @property {Array.|null} [object_data] SubscribedType object_data + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SubscribedType. + * @memberof CMsgSOCacheSubscribed + * @interface ISubscribedType + * @augments CMsgSOCacheSubscribed.SubscribedType.$Properties + * @deprecated Use CMsgSOCacheSubscribed.SubscribedType.$Properties instead. + */ + + /** + * Shape of a SubscribedType. + * @typedef {CMsgSOCacheSubscribed.SubscribedType.$Properties} CMsgSOCacheSubscribed.SubscribedType.$Shape */ /** * Constructs a new SubscribedType. * @memberof CMsgSOCacheSubscribed * @classdesc Represents a SubscribedType. - * @implements ISubscribedType * @constructor - * @param {CMsgSOCacheSubscribed.ISubscribedType=} [properties] Properties to set + * @param {CMsgSOCacheSubscribed.SubscribedType.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SubscribedType(properties) { + var SubscribedType = function (properties) { this.object_data = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SubscribedType type_id. @@ -1623,10 +2050,14 @@ * @function create * @memberof CMsgSOCacheSubscribed.SubscribedType * @static - * @param {CMsgSOCacheSubscribed.ISubscribedType=} [properties] Properties to set + * @param {CMsgSOCacheSubscribed.SubscribedType.$Properties=} [properties] Properties to set * @returns {CMsgSOCacheSubscribed.SubscribedType} SubscribedType instance + * @type {{ + * (properties: CMsgSOCacheSubscribed.SubscribedType.$Shape): CMsgSOCacheSubscribed.SubscribedType & CMsgSOCacheSubscribed.SubscribedType.$Shape; + * (properties?: CMsgSOCacheSubscribed.SubscribedType.$Properties): CMsgSOCacheSubscribed.SubscribedType; + * }} */ - SubscribedType.create = function create(properties) { + SubscribedType.create = function(properties) { return new SubscribedType(properties); }; @@ -1635,18 +2066,25 @@ * @function encode * @memberof CMsgSOCacheSubscribed.SubscribedType * @static - * @param {CMsgSOCacheSubscribed.ISubscribedType} message SubscribedType message or plain object to encode + * @param {CMsgSOCacheSubscribed.SubscribedType.$Properties} message SubscribedType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubscribedType.encode = function encode(message, writer) { + SubscribedType.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.type_id != null && Object.hasOwnProperty.call(message, "type_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.type_id != null && $Object.hasOwnProperty.call(message, "type_id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type_id); if (message.object_data != null && message.object_data.length) for (var i = 0; i < message.object_data.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.object_data[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1655,12 +2093,12 @@ * @function encodeDelimited * @memberof CMsgSOCacheSubscribed.SubscribedType * @static - * @param {CMsgSOCacheSubscribed.ISubscribedType} message SubscribedType message or plain object to encode + * @param {CMsgSOCacheSubscribed.SubscribedType.$Properties} message SubscribedType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubscribedType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SubscribedType.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1670,30 +2108,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOCacheSubscribed.SubscribedType} SubscribedType + * @returns {CMsgSOCacheSubscribed.SubscribedType & CMsgSOCacheSubscribed.SubscribedType.$Shape} SubscribedType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubscribedType.decode = function decode(reader, length) { + SubscribedType.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOCacheSubscribed.SubscribedType(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOCacheSubscribed.SubscribedType(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type_id = reader.int32(); - break; - case 2: - if (!(message.object_data && message.object_data.length)) - message.object_data = []; - message.object_data.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.type_id = reader.int32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.object_data && message.object_data.length)) + message.object_data = []; + message.object_data.push(reader.bytes()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1703,11 +2161,11 @@ * @memberof CMsgSOCacheSubscribed.SubscribedType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOCacheSubscribed.SubscribedType} SubscribedType + * @returns {CMsgSOCacheSubscribed.SubscribedType & CMsgSOCacheSubscribed.SubscribedType.$Shape} SubscribedType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubscribedType.decodeDelimited = function decodeDelimited(reader) { + SubscribedType.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1721,14 +2179,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SubscribedType.verify = function verify(message) { + SubscribedType.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type_id != null && message.hasOwnProperty("type_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.type_id != null && $Object.hasOwnProperty.call(message, "type_id")) if (!$util.isInteger(message.type_id)) return "type_id: integer expected"; - if (message.object_data != null && message.hasOwnProperty("object_data")) { - if (!Array.isArray(message.object_data)) + if (message.object_data != null && $Object.hasOwnProperty.call(message, "object_data")) { + if (!$Array.isArray(message.object_data)) return "object_data: array expected"; for (var i = 0; i < message.object_data.length; ++i) if (!(message.object_data[i] && typeof message.object_data[i].length === "number" || $util.isString(message.object_data[i]))) @@ -1745,20 +2207,26 @@ * @param {Object.} object Plain object * @returns {CMsgSOCacheSubscribed.SubscribedType} SubscribedType */ - SubscribedType.fromObject = function fromObject(object) { + SubscribedType.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOCacheSubscribed.SubscribedType) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOCacheSubscribed.SubscribedType: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOCacheSubscribed.SubscribedType(); if (object.type_id != null) message.type_id = object.type_id | 0; if (object.object_data) { - if (!Array.isArray(object.object_data)) - throw TypeError(".CMsgSOCacheSubscribed.SubscribedType.object_data: array expected"); - message.object_data = []; + if (!$Array.isArray(object.object_data)) + throw $TypeError(".CMsgSOCacheSubscribed.SubscribedType.object_data: array expected"); + message.object_data = $Array(object.object_data.length); for (var i = 0; i < object.object_data.length; ++i) if (typeof object.object_data[i] === "string") $util.base64.decode(object.object_data[i], message.object_data[i] = $util.newBuffer($util.base64.length(object.object_data[i])), 0); - else if (object.object_data[i].length) + else if (object.object_data[i].length >= 0) message.object_data[i] = object.object_data[i]; } return message; @@ -1773,20 +2241,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SubscribedType.toObject = function toObject(message, options) { + SubscribedType.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.object_data = []; if (options.defaults) object.type_id = 0; - if (message.type_id != null && message.hasOwnProperty("type_id")) + if (message.type_id != null && $Object.hasOwnProperty.call(message, "type_id")) object.type_id = message.type_id; if (message.object_data && message.object_data.length) { - object.object_data = []; + object.object_data = $Array(message.object_data.length); for (var j = 0; j < message.object_data.length; ++j) - object.object_data[j] = options.bytes === String ? $util.base64.encode(message.object_data[j], 0, message.object_data[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.object_data[j]) : message.object_data[j]; + object.object_data[j] = options.bytes === $String ? $util.base64.encode(message.object_data[j], 0, message.object_data[j].length) : options.bytes === $Array ? $Array.prototype.slice.call(message.object_data[j]) : message.object_data[j]; } return object; }; @@ -1798,8 +2270,22 @@ * @instance * @returns {Object.} JSON object */ - SubscribedType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SubscribedType.prototype.toJSON = function() { + return SubscribedType.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SubscribedType + * @function getTypeUrl + * @memberof CMsgSOCacheSubscribed.SubscribedType + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SubscribedType.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOCacheSubscribed.SubscribedType"; }; return SubscribedType; @@ -1812,30 +2298,43 @@ /** * Properties of a CMsgSOCacheSubscribedUpToDate. - * @exports ICMsgSOCacheSubscribedUpToDate - * @interface ICMsgSOCacheSubscribedUpToDate + * @typedef {Object} CMsgSOCacheSubscribedUpToDate.$Properties * @property {number|Long|null} [version] CMsgSOCacheSubscribedUpToDate version - * @property {ICMsgSOIDOwner|null} [owner_soid] CMsgSOCacheSubscribedUpToDate owner_soid + * @property {CMsgSOIDOwner.$Properties|null} [owner_soid] CMsgSOCacheSubscribedUpToDate owner_soid * @property {number|null} [service_id] CMsgSOCacheSubscribedUpToDate service_id * @property {Array.|null} [service_list] CMsgSOCacheSubscribedUpToDate service_list * @property {number|Long|null} [sync_version] CMsgSOCacheSubscribedUpToDate sync_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSOCacheSubscribedUpToDate. + * @exports ICMsgSOCacheSubscribedUpToDate + * @interface ICMsgSOCacheSubscribedUpToDate + * @augments CMsgSOCacheSubscribedUpToDate.$Properties + * @deprecated Use CMsgSOCacheSubscribedUpToDate.$Properties instead. + */ + + /** + * Shape of a CMsgSOCacheSubscribedUpToDate. + * @typedef {CMsgSOCacheSubscribedUpToDate.$Properties} CMsgSOCacheSubscribedUpToDate.$Shape */ /** * Constructs a new CMsgSOCacheSubscribedUpToDate. * @exports CMsgSOCacheSubscribedUpToDate * @classdesc Represents a CMsgSOCacheSubscribedUpToDate. - * @implements ICMsgSOCacheSubscribedUpToDate * @constructor - * @param {ICMsgSOCacheSubscribedUpToDate=} [properties] Properties to set + * @param {CMsgSOCacheSubscribedUpToDate.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSOCacheSubscribedUpToDate(properties) { + var CMsgSOCacheSubscribedUpToDate = function (properties) { this.service_list = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSOCacheSubscribedUpToDate version. @@ -1843,11 +2342,11 @@ * @memberof CMsgSOCacheSubscribedUpToDate * @instance */ - CMsgSOCacheSubscribedUpToDate.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheSubscribedUpToDate.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSOCacheSubscribedUpToDate owner_soid. - * @member {ICMsgSOIDOwner|null|undefined} owner_soid + * @member {CMsgSOIDOwner.$Properties|null|undefined} owner_soid * @memberof CMsgSOCacheSubscribedUpToDate * @instance */ @@ -1875,17 +2374,21 @@ * @memberof CMsgSOCacheSubscribedUpToDate * @instance */ - CMsgSOCacheSubscribedUpToDate.prototype.sync_version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheSubscribedUpToDate.prototype.sync_version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgSOCacheSubscribedUpToDate instance using the specified properties. * @function create * @memberof CMsgSOCacheSubscribedUpToDate * @static - * @param {ICMsgSOCacheSubscribedUpToDate=} [properties] Properties to set + * @param {CMsgSOCacheSubscribedUpToDate.$Properties=} [properties] Properties to set * @returns {CMsgSOCacheSubscribedUpToDate} CMsgSOCacheSubscribedUpToDate instance + * @type {{ + * (properties: CMsgSOCacheSubscribedUpToDate.$Shape): CMsgSOCacheSubscribedUpToDate & CMsgSOCacheSubscribedUpToDate.$Shape; + * (properties?: CMsgSOCacheSubscribedUpToDate.$Properties): CMsgSOCacheSubscribedUpToDate; + * }} */ - CMsgSOCacheSubscribedUpToDate.create = function create(properties) { + CMsgSOCacheSubscribedUpToDate.create = function(properties) { return new CMsgSOCacheSubscribedUpToDate(properties); }; @@ -1894,24 +2397,31 @@ * @function encode * @memberof CMsgSOCacheSubscribedUpToDate * @static - * @param {ICMsgSOCacheSubscribedUpToDate} message CMsgSOCacheSubscribedUpToDate message or plain object to encode + * @param {CMsgSOCacheSubscribedUpToDate.$Properties} message CMsgSOCacheSubscribedUpToDate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheSubscribedUpToDate.encode = function encode(message, writer) { + CMsgSOCacheSubscribedUpToDate.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.version); - if (message.owner_soid != null && Object.hasOwnProperty.call(message, "owner_soid")) - $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.service_id != null && Object.hasOwnProperty.call(message, "service_id")) + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.service_id); if (message.service_list != null && message.service_list.length) for (var i = 0; i < message.service_list.length; ++i) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.service_list[i]); - if (message.sync_version != null && Object.hasOwnProperty.call(message, "sync_version")) + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.sync_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1920,12 +2430,12 @@ * @function encodeDelimited * @memberof CMsgSOCacheSubscribedUpToDate * @static - * @param {ICMsgSOCacheSubscribedUpToDate} message CMsgSOCacheSubscribedUpToDate message or plain object to encode + * @param {CMsgSOCacheSubscribedUpToDate.$Properties} message CMsgSOCacheSubscribedUpToDate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheSubscribedUpToDate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSOCacheSubscribedUpToDate.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1935,44 +2445,74 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOCacheSubscribedUpToDate} CMsgSOCacheSubscribedUpToDate + * @returns {CMsgSOCacheSubscribedUpToDate & CMsgSOCacheSubscribedUpToDate.$Shape} CMsgSOCacheSubscribedUpToDate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheSubscribedUpToDate.decode = function decode(reader, length) { + CMsgSOCacheSubscribedUpToDate.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOCacheSubscribedUpToDate(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOCacheSubscribedUpToDate(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.fixed64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32()); - break; - case 3: - message.service_id = reader.uint32(); - break; - case 4: - if (!(message.service_list && message.service_list.length)) - message.service_list = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.service_list.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.version = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32(), $undefined, _depth + 1, message.owner_soid); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.service_id = reader.uint32(); + continue; + } + case 4: { + if (wireType === 2) { + if (!(message.service_list && message.service_list.length)) + message.service_list = []; + reader.uint32s(message.service_list); + continue; + } + if (wireType !== 0) + break; + if (!(message.service_list && message.service_list.length)) + message.service_list = []; message.service_list.push(reader.uint32()); - break; - case 5: - message.sync_version = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 5: { + if (wireType !== 1) + break; + message.sync_version = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1982,11 +2522,11 @@ * @memberof CMsgSOCacheSubscribedUpToDate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOCacheSubscribedUpToDate} CMsgSOCacheSubscribedUpToDate + * @returns {CMsgSOCacheSubscribedUpToDate & CMsgSOCacheSubscribedUpToDate.$Shape} CMsgSOCacheSubscribedUpToDate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheSubscribedUpToDate.decodeDelimited = function decodeDelimited(reader) { + CMsgSOCacheSubscribedUpToDate.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2000,28 +2540,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSOCacheSubscribedUpToDate.verify = function verify(message) { + CMsgSOCacheSubscribedUpToDate.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) return "version: integer|Long expected"; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) { - var error = $root.CMsgSOIDOwner.verify(message.owner_soid); + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) { + var error = $root.CMsgSOIDOwner.verify(message.owner_soid, _depth + 1); if (error) return "owner_soid." + error; } - if (message.service_id != null && message.hasOwnProperty("service_id")) + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) if (!$util.isInteger(message.service_id)) return "service_id: integer expected"; - if (message.service_list != null && message.hasOwnProperty("service_list")) { - if (!Array.isArray(message.service_list)) + if (message.service_list != null && $Object.hasOwnProperty.call(message, "service_list")) { + if (!$Array.isArray(message.service_list)) return "service_list: array expected"; for (var i = 0; i < message.service_list.length; ++i) if (!$util.isInteger(message.service_list[i])) return "service_list: integer[] expected"; } - if (message.sync_version != null && message.hasOwnProperty("sync_version")) + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) if (!$util.isInteger(message.sync_version) && !(message.sync_version && $util.isInteger(message.sync_version.low) && $util.isInteger(message.sync_version.high))) return "sync_version: integer|Long expected"; return null; @@ -2035,42 +2579,48 @@ * @param {Object.} object Plain object * @returns {CMsgSOCacheSubscribedUpToDate} CMsgSOCacheSubscribedUpToDate */ - CMsgSOCacheSubscribedUpToDate.fromObject = function fromObject(object) { + CMsgSOCacheSubscribedUpToDate.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOCacheSubscribedUpToDate) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOCacheSubscribedUpToDate: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOCacheSubscribedUpToDate(); if (object.version != null) if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = false; + message.version = $util.Long.fromValue(object.version, true); else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); + message.version = $parseInt(object.version, 10); else if (typeof object.version === "number") message.version = object.version; else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); if (object.owner_soid != null) { - if (typeof object.owner_soid !== "object") - throw TypeError(".CMsgSOCacheSubscribedUpToDate.owner_soid: object expected"); - message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid); + if (!$util.isObject(object.owner_soid)) + throw $TypeError(".CMsgSOCacheSubscribedUpToDate.owner_soid: object expected"); + message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid, _depth + 1); } if (object.service_id != null) message.service_id = object.service_id >>> 0; if (object.service_list) { - if (!Array.isArray(object.service_list)) - throw TypeError(".CMsgSOCacheSubscribedUpToDate.service_list: array expected"); - message.service_list = []; + if (!$Array.isArray(object.service_list)) + throw $TypeError(".CMsgSOCacheSubscribedUpToDate.service_list: array expected"); + message.service_list = $Array(object.service_list.length); for (var i = 0; i < object.service_list.length; ++i) message.service_list[i] = object.service_list[i] >>> 0; } if (object.sync_version != null) if ($util.Long) - (message.sync_version = $util.Long.fromValue(object.sync_version)).unsigned = false; + message.sync_version = $util.Long.fromValue(object.sync_version, true); else if (typeof object.sync_version === "string") - message.sync_version = parseInt(object.sync_version, 10); + message.sync_version = $parseInt(object.sync_version, 10); else if (typeof object.sync_version === "number") message.sync_version = object.sync_version; else if (typeof object.sync_version === "object") - message.sync_version = new $util.LongBits(object.sync_version.low >>> 0, object.sync_version.high >>> 0).toNumber(); + message.sync_version = new $util.LongBits(object.sync_version.low >>> 0, object.sync_version.high >>> 0).toNumber(true); return message; }; @@ -2083,45 +2633,53 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSOCacheSubscribedUpToDate.toObject = function toObject(message, options) { + CMsgSOCacheSubscribedUpToDate.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.service_list = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.version = options.longs === String ? "0" : 0; + object.version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.owner_soid = null; object.service_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sync_version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.sync_version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.sync_version = options.longs === String ? "0" : 0; + object.sync_version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.version = typeof message.version === "number" ? $BigInt(message.version) : $util.Long.fromBits(message.version.low >>> 0, message.version.high >>> 0, true).toBigInt(); + else if (typeof message.version === "number") + object.version = options.longs === $String ? $String(message.version) : message.version; else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) - object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options); - if (message.service_id != null && message.hasOwnProperty("service_id")) + object.version = options.longs === $String ? $util.Long.prototype.toString.call(message.version) : options.longs === $Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options, _depth + 1); + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) object.service_id = message.service_id; if (message.service_list && message.service_list.length) { - object.service_list = []; + object.service_list = $Array(message.service_list.length); for (var j = 0; j < message.service_list.length; ++j) object.service_list[j] = message.service_list[j]; } - if (message.sync_version != null && message.hasOwnProperty("sync_version")) - if (typeof message.sync_version === "number") - object.sync_version = options.longs === String ? String(message.sync_version) : message.sync_version; + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.sync_version = typeof message.sync_version === "number" ? $BigInt(message.sync_version) : $util.Long.fromBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0, true).toBigInt(); + else if (typeof message.sync_version === "number") + object.sync_version = options.longs === $String ? $String(message.sync_version) : message.sync_version; else - object.sync_version = options.longs === String ? $util.Long.prototype.toString.call(message.sync_version) : options.longs === Number ? new $util.LongBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0).toNumber() : message.sync_version; + object.sync_version = options.longs === $String ? $util.Long.prototype.toString.call(message.sync_version) : options.longs === $Number ? new $util.LongBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0).toNumber(true) : message.sync_version; return object; }; @@ -2132,8 +2690,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSOCacheSubscribedUpToDate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSOCacheSubscribedUpToDate.prototype.toJSON = function() { + return CMsgSOCacheSubscribedUpToDate.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSOCacheSubscribedUpToDate + * @function getTypeUrl + * @memberof CMsgSOCacheSubscribedUpToDate + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSOCacheSubscribedUpToDate.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOCacheSubscribedUpToDate"; }; return CMsgSOCacheSubscribedUpToDate; @@ -2141,27 +2713,40 @@ $root.CMsgSOCacheUnsubscribed = (function() { + /** + * Properties of a CMsgSOCacheUnsubscribed. + * @typedef {Object} CMsgSOCacheUnsubscribed.$Properties + * @property {number|Long|null} [owner] CMsgSOCacheUnsubscribed owner + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSOCacheUnsubscribed. * @exports ICMsgSOCacheUnsubscribed * @interface ICMsgSOCacheUnsubscribed - * @property {number|Long|null} [owner] CMsgSOCacheUnsubscribed owner + * @augments CMsgSOCacheUnsubscribed.$Properties + * @deprecated Use CMsgSOCacheUnsubscribed.$Properties instead. + */ + + /** + * Shape of a CMsgSOCacheUnsubscribed. + * @typedef {CMsgSOCacheUnsubscribed.$Properties} CMsgSOCacheUnsubscribed.$Shape */ /** * Constructs a new CMsgSOCacheUnsubscribed. * @exports CMsgSOCacheUnsubscribed * @classdesc Represents a CMsgSOCacheUnsubscribed. - * @implements ICMsgSOCacheUnsubscribed * @constructor - * @param {ICMsgSOCacheUnsubscribed=} [properties] Properties to set + * @param {CMsgSOCacheUnsubscribed.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSOCacheUnsubscribed(properties) { + var CMsgSOCacheUnsubscribed = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSOCacheUnsubscribed owner. @@ -2169,17 +2754,21 @@ * @memberof CMsgSOCacheUnsubscribed * @instance */ - CMsgSOCacheUnsubscribed.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheUnsubscribed.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgSOCacheUnsubscribed instance using the specified properties. * @function create * @memberof CMsgSOCacheUnsubscribed * @static - * @param {ICMsgSOCacheUnsubscribed=} [properties] Properties to set + * @param {CMsgSOCacheUnsubscribed.$Properties=} [properties] Properties to set * @returns {CMsgSOCacheUnsubscribed} CMsgSOCacheUnsubscribed instance + * @type {{ + * (properties: CMsgSOCacheUnsubscribed.$Shape): CMsgSOCacheUnsubscribed & CMsgSOCacheUnsubscribed.$Shape; + * (properties?: CMsgSOCacheUnsubscribed.$Properties): CMsgSOCacheUnsubscribed; + * }} */ - CMsgSOCacheUnsubscribed.create = function create(properties) { + CMsgSOCacheUnsubscribed.create = function(properties) { return new CMsgSOCacheUnsubscribed(properties); }; @@ -2188,15 +2777,22 @@ * @function encode * @memberof CMsgSOCacheUnsubscribed * @static - * @param {ICMsgSOCacheUnsubscribed} message CMsgSOCacheUnsubscribed message or plain object to encode + * @param {CMsgSOCacheUnsubscribed.$Properties} message CMsgSOCacheUnsubscribed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheUnsubscribed.encode = function encode(message, writer) { + CMsgSOCacheUnsubscribed.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.owner); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2205,12 +2801,12 @@ * @function encodeDelimited * @memberof CMsgSOCacheUnsubscribed * @static - * @param {ICMsgSOCacheUnsubscribed} message CMsgSOCacheUnsubscribed message or plain object to encode + * @param {CMsgSOCacheUnsubscribed.$Properties} message CMsgSOCacheUnsubscribed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheUnsubscribed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSOCacheUnsubscribed.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2220,25 +2816,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOCacheUnsubscribed} CMsgSOCacheUnsubscribed + * @returns {CMsgSOCacheUnsubscribed & CMsgSOCacheUnsubscribed.$Shape} CMsgSOCacheUnsubscribed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheUnsubscribed.decode = function decode(reader, length) { + CMsgSOCacheUnsubscribed.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOCacheUnsubscribed(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOCacheUnsubscribed(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.owner = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2248,11 +2861,11 @@ * @memberof CMsgSOCacheUnsubscribed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOCacheUnsubscribed} CMsgSOCacheUnsubscribed + * @returns {CMsgSOCacheUnsubscribed & CMsgSOCacheUnsubscribed.$Shape} CMsgSOCacheUnsubscribed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheUnsubscribed.decodeDelimited = function decodeDelimited(reader) { + CMsgSOCacheUnsubscribed.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2266,10 +2879,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSOCacheUnsubscribed.verify = function verify(message) { + CMsgSOCacheUnsubscribed.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) if (!$util.isInteger(message.owner) && !(message.owner && $util.isInteger(message.owner.low) && $util.isInteger(message.owner.high))) return "owner: integer|Long expected"; return null; @@ -2283,19 +2900,25 @@ * @param {Object.} object Plain object * @returns {CMsgSOCacheUnsubscribed} CMsgSOCacheUnsubscribed */ - CMsgSOCacheUnsubscribed.fromObject = function fromObject(object) { + CMsgSOCacheUnsubscribed.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOCacheUnsubscribed) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOCacheUnsubscribed: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOCacheUnsubscribed(); if (object.owner != null) if ($util.Long) - (message.owner = $util.Long.fromValue(object.owner)).unsigned = false; + message.owner = $util.Long.fromValue(object.owner, true); else if (typeof object.owner === "string") - message.owner = parseInt(object.owner, 10); + message.owner = $parseInt(object.owner, 10); else if (typeof object.owner === "number") message.owner = object.owner; else if (typeof object.owner === "object") - message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(); + message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(true); return message; }; @@ -2308,21 +2931,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSOCacheUnsubscribed.toObject = function toObject(message, options) { + CMsgSOCacheUnsubscribed.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.owner = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.owner = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.owner = options.longs === String ? "0" : 0; - if (message.owner != null && message.hasOwnProperty("owner")) - if (typeof message.owner === "number") - object.owner = options.longs === String ? String(message.owner) : message.owner; + object.owner = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.owner = typeof message.owner === "number" ? $BigInt(message.owner) : $util.Long.fromBits(message.owner.low >>> 0, message.owner.high >>> 0, true).toBigInt(); + else if (typeof message.owner === "number") + object.owner = options.longs === $String ? $String(message.owner) : message.owner; else - object.owner = options.longs === String ? $util.Long.prototype.toString.call(message.owner) : options.longs === Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber() : message.owner; + object.owner = options.longs === $String ? $util.Long.prototype.toString.call(message.owner) : options.longs === $Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber(true) : message.owner; return object; }; @@ -2333,8 +2962,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSOCacheUnsubscribed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSOCacheUnsubscribed.prototype.toJSON = function() { + return CMsgSOCacheUnsubscribed.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSOCacheUnsubscribed + * @function getTypeUrl + * @memberof CMsgSOCacheUnsubscribed + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSOCacheUnsubscribed.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOCacheUnsubscribed"; }; return CMsgSOCacheUnsubscribed; @@ -2344,31 +2987,44 @@ /** * Properties of a CMsgSOCacheSubscriptionCheck. - * @exports ICMsgSOCacheSubscriptionCheck - * @interface ICMsgSOCacheSubscriptionCheck + * @typedef {Object} CMsgSOCacheSubscriptionCheck.$Properties * @property {number|Long|null} [owner] CMsgSOCacheSubscriptionCheck owner * @property {number|Long|null} [version] CMsgSOCacheSubscriptionCheck version - * @property {ICMsgSOIDOwner|null} [owner_soid] CMsgSOCacheSubscriptionCheck owner_soid + * @property {CMsgSOIDOwner.$Properties|null} [owner_soid] CMsgSOCacheSubscriptionCheck owner_soid * @property {number|null} [service_id] CMsgSOCacheSubscriptionCheck service_id * @property {Array.|null} [service_list] CMsgSOCacheSubscriptionCheck service_list * @property {number|Long|null} [sync_version] CMsgSOCacheSubscriptionCheck sync_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSOCacheSubscriptionCheck. + * @exports ICMsgSOCacheSubscriptionCheck + * @interface ICMsgSOCacheSubscriptionCheck + * @augments CMsgSOCacheSubscriptionCheck.$Properties + * @deprecated Use CMsgSOCacheSubscriptionCheck.$Properties instead. + */ + + /** + * Shape of a CMsgSOCacheSubscriptionCheck. + * @typedef {CMsgSOCacheSubscriptionCheck.$Properties} CMsgSOCacheSubscriptionCheck.$Shape */ /** * Constructs a new CMsgSOCacheSubscriptionCheck. * @exports CMsgSOCacheSubscriptionCheck * @classdesc Represents a CMsgSOCacheSubscriptionCheck. - * @implements ICMsgSOCacheSubscriptionCheck * @constructor - * @param {ICMsgSOCacheSubscriptionCheck=} [properties] Properties to set + * @param {CMsgSOCacheSubscriptionCheck.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSOCacheSubscriptionCheck(properties) { + var CMsgSOCacheSubscriptionCheck = function (properties) { this.service_list = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSOCacheSubscriptionCheck owner. @@ -2376,7 +3032,7 @@ * @memberof CMsgSOCacheSubscriptionCheck * @instance */ - CMsgSOCacheSubscriptionCheck.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheSubscriptionCheck.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSOCacheSubscriptionCheck version. @@ -2384,11 +3040,11 @@ * @memberof CMsgSOCacheSubscriptionCheck * @instance */ - CMsgSOCacheSubscriptionCheck.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheSubscriptionCheck.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSOCacheSubscriptionCheck owner_soid. - * @member {ICMsgSOIDOwner|null|undefined} owner_soid + * @member {CMsgSOIDOwner.$Properties|null|undefined} owner_soid * @memberof CMsgSOCacheSubscriptionCheck * @instance */ @@ -2416,17 +3072,21 @@ * @memberof CMsgSOCacheSubscriptionCheck * @instance */ - CMsgSOCacheSubscriptionCheck.prototype.sync_version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheSubscriptionCheck.prototype.sync_version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgSOCacheSubscriptionCheck instance using the specified properties. * @function create * @memberof CMsgSOCacheSubscriptionCheck * @static - * @param {ICMsgSOCacheSubscriptionCheck=} [properties] Properties to set + * @param {CMsgSOCacheSubscriptionCheck.$Properties=} [properties] Properties to set * @returns {CMsgSOCacheSubscriptionCheck} CMsgSOCacheSubscriptionCheck instance + * @type {{ + * (properties: CMsgSOCacheSubscriptionCheck.$Shape): CMsgSOCacheSubscriptionCheck & CMsgSOCacheSubscriptionCheck.$Shape; + * (properties?: CMsgSOCacheSubscriptionCheck.$Properties): CMsgSOCacheSubscriptionCheck; + * }} */ - CMsgSOCacheSubscriptionCheck.create = function create(properties) { + CMsgSOCacheSubscriptionCheck.create = function(properties) { return new CMsgSOCacheSubscriptionCheck(properties); }; @@ -2435,26 +3095,33 @@ * @function encode * @memberof CMsgSOCacheSubscriptionCheck * @static - * @param {ICMsgSOCacheSubscriptionCheck} message CMsgSOCacheSubscriptionCheck message or plain object to encode + * @param {CMsgSOCacheSubscriptionCheck.$Properties} message CMsgSOCacheSubscriptionCheck message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheSubscriptionCheck.encode = function encode(message, writer) { + CMsgSOCacheSubscriptionCheck.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.owner); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.version); - if (message.owner_soid != null && Object.hasOwnProperty.call(message, "owner_soid")) - $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.service_id != null && Object.hasOwnProperty.call(message, "service_id")) + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.service_id); if (message.service_list != null && message.service_list.length) for (var i = 0; i < message.service_list.length; ++i) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.service_list[i]); - if (message.sync_version != null && Object.hasOwnProperty.call(message, "sync_version")) + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) writer.uint32(/* id 6, wireType 1 =*/49).fixed64(message.sync_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2463,12 +3130,12 @@ * @function encodeDelimited * @memberof CMsgSOCacheSubscriptionCheck * @static - * @param {ICMsgSOCacheSubscriptionCheck} message CMsgSOCacheSubscriptionCheck message or plain object to encode + * @param {CMsgSOCacheSubscriptionCheck.$Properties} message CMsgSOCacheSubscriptionCheck message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheSubscriptionCheck.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSOCacheSubscriptionCheck.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2478,47 +3145,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOCacheSubscriptionCheck} CMsgSOCacheSubscriptionCheck + * @returns {CMsgSOCacheSubscriptionCheck & CMsgSOCacheSubscriptionCheck.$Shape} CMsgSOCacheSubscriptionCheck * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheSubscriptionCheck.decode = function decode(reader, length) { + CMsgSOCacheSubscriptionCheck.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOCacheSubscriptionCheck(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOCacheSubscriptionCheck(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.fixed64(); - break; - case 2: - message.version = reader.fixed64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 3: - message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32()); - break; - case 4: - message.service_id = reader.uint32(); - break; - case 5: - if (!(message.service_list && message.service_list.length)) - message.service_list = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.service_list.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.owner = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.version = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32(), $undefined, _depth + 1, message.owner_soid); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.service_id = reader.uint32(); + continue; + } + case 5: { + if (wireType === 2) { + if (!(message.service_list && message.service_list.length)) + message.service_list = []; + reader.uint32s(message.service_list); + continue; + } + if (wireType !== 0) + break; + if (!(message.service_list && message.service_list.length)) + message.service_list = []; message.service_list.push(reader.uint32()); - break; - case 6: - message.sync_version = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 6: { + if (wireType !== 1) + break; + message.sync_version = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2528,11 +3228,11 @@ * @memberof CMsgSOCacheSubscriptionCheck * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOCacheSubscriptionCheck} CMsgSOCacheSubscriptionCheck + * @returns {CMsgSOCacheSubscriptionCheck & CMsgSOCacheSubscriptionCheck.$Shape} CMsgSOCacheSubscriptionCheck * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheSubscriptionCheck.decodeDelimited = function decodeDelimited(reader) { + CMsgSOCacheSubscriptionCheck.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2546,31 +3246,35 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSOCacheSubscriptionCheck.verify = function verify(message) { + CMsgSOCacheSubscriptionCheck.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) if (!$util.isInteger(message.owner) && !(message.owner && $util.isInteger(message.owner.low) && $util.isInteger(message.owner.high))) return "owner: integer|Long expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) return "version: integer|Long expected"; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) { - var error = $root.CMsgSOIDOwner.verify(message.owner_soid); + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) { + var error = $root.CMsgSOIDOwner.verify(message.owner_soid, _depth + 1); if (error) return "owner_soid." + error; } - if (message.service_id != null && message.hasOwnProperty("service_id")) + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) if (!$util.isInteger(message.service_id)) return "service_id: integer expected"; - if (message.service_list != null && message.hasOwnProperty("service_list")) { - if (!Array.isArray(message.service_list)) + if (message.service_list != null && $Object.hasOwnProperty.call(message, "service_list")) { + if (!$Array.isArray(message.service_list)) return "service_list: array expected"; for (var i = 0; i < message.service_list.length; ++i) if (!$util.isInteger(message.service_list[i])) return "service_list: integer[] expected"; } - if (message.sync_version != null && message.hasOwnProperty("sync_version")) + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) if (!$util.isInteger(message.sync_version) && !(message.sync_version && $util.isInteger(message.sync_version.low) && $util.isInteger(message.sync_version.high))) return "sync_version: integer|Long expected"; return null; @@ -2584,51 +3288,57 @@ * @param {Object.} object Plain object * @returns {CMsgSOCacheSubscriptionCheck} CMsgSOCacheSubscriptionCheck */ - CMsgSOCacheSubscriptionCheck.fromObject = function fromObject(object) { + CMsgSOCacheSubscriptionCheck.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOCacheSubscriptionCheck) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOCacheSubscriptionCheck: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOCacheSubscriptionCheck(); if (object.owner != null) if ($util.Long) - (message.owner = $util.Long.fromValue(object.owner)).unsigned = false; + message.owner = $util.Long.fromValue(object.owner, true); else if (typeof object.owner === "string") - message.owner = parseInt(object.owner, 10); + message.owner = $parseInt(object.owner, 10); else if (typeof object.owner === "number") message.owner = object.owner; else if (typeof object.owner === "object") - message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(); + message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(true); if (object.version != null) if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = false; + message.version = $util.Long.fromValue(object.version, true); else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); + message.version = $parseInt(object.version, 10); else if (typeof object.version === "number") message.version = object.version; else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); if (object.owner_soid != null) { - if (typeof object.owner_soid !== "object") - throw TypeError(".CMsgSOCacheSubscriptionCheck.owner_soid: object expected"); - message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid); + if (!$util.isObject(object.owner_soid)) + throw $TypeError(".CMsgSOCacheSubscriptionCheck.owner_soid: object expected"); + message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid, _depth + 1); } if (object.service_id != null) message.service_id = object.service_id >>> 0; if (object.service_list) { - if (!Array.isArray(object.service_list)) - throw TypeError(".CMsgSOCacheSubscriptionCheck.service_list: array expected"); - message.service_list = []; + if (!$Array.isArray(object.service_list)) + throw $TypeError(".CMsgSOCacheSubscriptionCheck.service_list: array expected"); + message.service_list = $Array(object.service_list.length); for (var i = 0; i < object.service_list.length; ++i) message.service_list[i] = object.service_list[i] >>> 0; } if (object.sync_version != null) if ($util.Long) - (message.sync_version = $util.Long.fromValue(object.sync_version)).unsigned = false; + message.sync_version = $util.Long.fromValue(object.sync_version, true); else if (typeof object.sync_version === "string") - message.sync_version = parseInt(object.sync_version, 10); + message.sync_version = $parseInt(object.sync_version, 10); else if (typeof object.sync_version === "number") message.sync_version = object.sync_version; else if (typeof object.sync_version === "object") - message.sync_version = new $util.LongBits(object.sync_version.low >>> 0, object.sync_version.high >>> 0).toNumber(); + message.sync_version = new $util.LongBits(object.sync_version.low >>> 0, object.sync_version.high >>> 0).toNumber(true); return message; }; @@ -2641,55 +3351,65 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSOCacheSubscriptionCheck.toObject = function toObject(message, options) { + CMsgSOCacheSubscriptionCheck.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.service_list = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.owner = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.owner = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.owner = options.longs === String ? "0" : 0; + object.owner = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.version = options.longs === String ? "0" : 0; + object.version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.owner_soid = null; object.service_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sync_version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.sync_version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.sync_version = options.longs === String ? "0" : 0; + object.sync_version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.owner != null && message.hasOwnProperty("owner")) - if (typeof message.owner === "number") - object.owner = options.longs === String ? String(message.owner) : message.owner; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.owner = typeof message.owner === "number" ? $BigInt(message.owner) : $util.Long.fromBits(message.owner.low >>> 0, message.owner.high >>> 0, true).toBigInt(); + else if (typeof message.owner === "number") + object.owner = options.longs === $String ? $String(message.owner) : message.owner; else - object.owner = options.longs === String ? $util.Long.prototype.toString.call(message.owner) : options.longs === Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber() : message.owner; - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; + object.owner = options.longs === $String ? $util.Long.prototype.toString.call(message.owner) : options.longs === $Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber(true) : message.owner; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.version = typeof message.version === "number" ? $BigInt(message.version) : $util.Long.fromBits(message.version.low >>> 0, message.version.high >>> 0, true).toBigInt(); + else if (typeof message.version === "number") + object.version = options.longs === $String ? $String(message.version) : message.version; else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) - object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options); - if (message.service_id != null && message.hasOwnProperty("service_id")) + object.version = options.longs === $String ? $util.Long.prototype.toString.call(message.version) : options.longs === $Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options, _depth + 1); + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) object.service_id = message.service_id; if (message.service_list && message.service_list.length) { - object.service_list = []; + object.service_list = $Array(message.service_list.length); for (var j = 0; j < message.service_list.length; ++j) object.service_list[j] = message.service_list[j]; } - if (message.sync_version != null && message.hasOwnProperty("sync_version")) - if (typeof message.sync_version === "number") - object.sync_version = options.longs === String ? String(message.sync_version) : message.sync_version; + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.sync_version = typeof message.sync_version === "number" ? $BigInt(message.sync_version) : $util.Long.fromBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0, true).toBigInt(); + else if (typeof message.sync_version === "number") + object.sync_version = options.longs === $String ? $String(message.sync_version) : message.sync_version; else - object.sync_version = options.longs === String ? $util.Long.prototype.toString.call(message.sync_version) : options.longs === Number ? new $util.LongBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0).toNumber() : message.sync_version; + object.sync_version = options.longs === $String ? $util.Long.prototype.toString.call(message.sync_version) : options.longs === $Number ? new $util.LongBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0).toNumber(true) : message.sync_version; return object; }; @@ -2700,8 +3420,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSOCacheSubscriptionCheck.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSOCacheSubscriptionCheck.prototype.toJSON = function() { + return CMsgSOCacheSubscriptionCheck.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSOCacheSubscriptionCheck + * @function getTypeUrl + * @memberof CMsgSOCacheSubscriptionCheck + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSOCacheSubscriptionCheck.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOCacheSubscriptionCheck"; }; return CMsgSOCacheSubscriptionCheck; @@ -2709,28 +3443,41 @@ $root.CMsgSOCacheSubscriptionRefresh = (function() { + /** + * Properties of a CMsgSOCacheSubscriptionRefresh. + * @typedef {Object} CMsgSOCacheSubscriptionRefresh.$Properties + * @property {number|Long|null} [owner] CMsgSOCacheSubscriptionRefresh owner + * @property {CMsgSOIDOwner.$Properties|null} [owner_soid] CMsgSOCacheSubscriptionRefresh owner_soid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSOCacheSubscriptionRefresh. * @exports ICMsgSOCacheSubscriptionRefresh * @interface ICMsgSOCacheSubscriptionRefresh - * @property {number|Long|null} [owner] CMsgSOCacheSubscriptionRefresh owner - * @property {ICMsgSOIDOwner|null} [owner_soid] CMsgSOCacheSubscriptionRefresh owner_soid + * @augments CMsgSOCacheSubscriptionRefresh.$Properties + * @deprecated Use CMsgSOCacheSubscriptionRefresh.$Properties instead. + */ + + /** + * Shape of a CMsgSOCacheSubscriptionRefresh. + * @typedef {CMsgSOCacheSubscriptionRefresh.$Properties} CMsgSOCacheSubscriptionRefresh.$Shape */ /** * Constructs a new CMsgSOCacheSubscriptionRefresh. * @exports CMsgSOCacheSubscriptionRefresh * @classdesc Represents a CMsgSOCacheSubscriptionRefresh. - * @implements ICMsgSOCacheSubscriptionRefresh * @constructor - * @param {ICMsgSOCacheSubscriptionRefresh=} [properties] Properties to set + * @param {CMsgSOCacheSubscriptionRefresh.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSOCacheSubscriptionRefresh(properties) { + var CMsgSOCacheSubscriptionRefresh = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSOCacheSubscriptionRefresh owner. @@ -2738,11 +3485,11 @@ * @memberof CMsgSOCacheSubscriptionRefresh * @instance */ - CMsgSOCacheSubscriptionRefresh.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheSubscriptionRefresh.prototype.owner = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSOCacheSubscriptionRefresh owner_soid. - * @member {ICMsgSOIDOwner|null|undefined} owner_soid + * @member {CMsgSOIDOwner.$Properties|null|undefined} owner_soid * @memberof CMsgSOCacheSubscriptionRefresh * @instance */ @@ -2753,10 +3500,14 @@ * @function create * @memberof CMsgSOCacheSubscriptionRefresh * @static - * @param {ICMsgSOCacheSubscriptionRefresh=} [properties] Properties to set + * @param {CMsgSOCacheSubscriptionRefresh.$Properties=} [properties] Properties to set * @returns {CMsgSOCacheSubscriptionRefresh} CMsgSOCacheSubscriptionRefresh instance + * @type {{ + * (properties: CMsgSOCacheSubscriptionRefresh.$Shape): CMsgSOCacheSubscriptionRefresh & CMsgSOCacheSubscriptionRefresh.$Shape; + * (properties?: CMsgSOCacheSubscriptionRefresh.$Properties): CMsgSOCacheSubscriptionRefresh; + * }} */ - CMsgSOCacheSubscriptionRefresh.create = function create(properties) { + CMsgSOCacheSubscriptionRefresh.create = function(properties) { return new CMsgSOCacheSubscriptionRefresh(properties); }; @@ -2765,17 +3516,24 @@ * @function encode * @memberof CMsgSOCacheSubscriptionRefresh * @static - * @param {ICMsgSOCacheSubscriptionRefresh} message CMsgSOCacheSubscriptionRefresh message or plain object to encode + * @param {CMsgSOCacheSubscriptionRefresh.$Properties} message CMsgSOCacheSubscriptionRefresh message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheSubscriptionRefresh.encode = function encode(message, writer) { + CMsgSOCacheSubscriptionRefresh.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.owner); - if (message.owner_soid != null && Object.hasOwnProperty.call(message, "owner_soid")) - $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + $root.CMsgSOIDOwner.encode(message.owner_soid, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2784,12 +3542,12 @@ * @function encodeDelimited * @memberof CMsgSOCacheSubscriptionRefresh * @static - * @param {ICMsgSOCacheSubscriptionRefresh} message CMsgSOCacheSubscriptionRefresh message or plain object to encode + * @param {CMsgSOCacheSubscriptionRefresh.$Properties} message CMsgSOCacheSubscriptionRefresh message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheSubscriptionRefresh.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSOCacheSubscriptionRefresh.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2799,28 +3557,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOCacheSubscriptionRefresh} CMsgSOCacheSubscriptionRefresh + * @returns {CMsgSOCacheSubscriptionRefresh & CMsgSOCacheSubscriptionRefresh.$Shape} CMsgSOCacheSubscriptionRefresh * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheSubscriptionRefresh.decode = function decode(reader, length) { + CMsgSOCacheSubscriptionRefresh.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOCacheSubscriptionRefresh(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOCacheSubscriptionRefresh(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.fixed64(); - break; - case 2: - message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.owner = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.owner_soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32(), $undefined, _depth + 1, message.owner_soid); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2830,11 +3608,11 @@ * @memberof CMsgSOCacheSubscriptionRefresh * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOCacheSubscriptionRefresh} CMsgSOCacheSubscriptionRefresh + * @returns {CMsgSOCacheSubscriptionRefresh & CMsgSOCacheSubscriptionRefresh.$Shape} CMsgSOCacheSubscriptionRefresh * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheSubscriptionRefresh.decodeDelimited = function decodeDelimited(reader) { + CMsgSOCacheSubscriptionRefresh.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2848,14 +3626,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSOCacheSubscriptionRefresh.verify = function verify(message) { + CMsgSOCacheSubscriptionRefresh.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) if (!$util.isInteger(message.owner) && !(message.owner && $util.isInteger(message.owner.low) && $util.isInteger(message.owner.high))) return "owner: integer|Long expected"; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) { - var error = $root.CMsgSOIDOwner.verify(message.owner_soid); + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) { + var error = $root.CMsgSOIDOwner.verify(message.owner_soid, _depth + 1); if (error) return "owner_soid." + error; } @@ -2870,23 +3652,29 @@ * @param {Object.} object Plain object * @returns {CMsgSOCacheSubscriptionRefresh} CMsgSOCacheSubscriptionRefresh */ - CMsgSOCacheSubscriptionRefresh.fromObject = function fromObject(object) { + CMsgSOCacheSubscriptionRefresh.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOCacheSubscriptionRefresh) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOCacheSubscriptionRefresh: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOCacheSubscriptionRefresh(); if (object.owner != null) if ($util.Long) - (message.owner = $util.Long.fromValue(object.owner)).unsigned = false; + message.owner = $util.Long.fromValue(object.owner, true); else if (typeof object.owner === "string") - message.owner = parseInt(object.owner, 10); + message.owner = $parseInt(object.owner, 10); else if (typeof object.owner === "number") message.owner = object.owner; else if (typeof object.owner === "object") - message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(); + message.owner = new $util.LongBits(object.owner.low >>> 0, object.owner.high >>> 0).toNumber(true); if (object.owner_soid != null) { - if (typeof object.owner_soid !== "object") - throw TypeError(".CMsgSOCacheSubscriptionRefresh.owner_soid: object expected"); - message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid); + if (!$util.isObject(object.owner_soid)) + throw $TypeError(".CMsgSOCacheSubscriptionRefresh.owner_soid: object expected"); + message.owner_soid = $root.CMsgSOIDOwner.fromObject(object.owner_soid, _depth + 1); } return message; }; @@ -2900,37 +3688,57 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSOCacheSubscriptionRefresh.toObject = function toObject(message, options) { + CMsgSOCacheSubscriptionRefresh.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.owner = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.owner = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.owner = options.longs === String ? "0" : 0; + object.owner = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.owner_soid = null; } - if (message.owner != null && message.hasOwnProperty("owner")) - if (typeof message.owner === "number") - object.owner = options.longs === String ? String(message.owner) : message.owner; + if (message.owner != null && $Object.hasOwnProperty.call(message, "owner")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.owner = typeof message.owner === "number" ? $BigInt(message.owner) : $util.Long.fromBits(message.owner.low >>> 0, message.owner.high >>> 0, true).toBigInt(); + else if (typeof message.owner === "number") + object.owner = options.longs === $String ? $String(message.owner) : message.owner; else - object.owner = options.longs === String ? $util.Long.prototype.toString.call(message.owner) : options.longs === Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber() : message.owner; - if (message.owner_soid != null && message.hasOwnProperty("owner_soid")) - object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options); + object.owner = options.longs === $String ? $util.Long.prototype.toString.call(message.owner) : options.longs === $Number ? new $util.LongBits(message.owner.low >>> 0, message.owner.high >>> 0).toNumber(true) : message.owner; + if (message.owner_soid != null && $Object.hasOwnProperty.call(message, "owner_soid")) + object.owner_soid = $root.CMsgSOIDOwner.toObject(message.owner_soid, options, _depth + 1); return object; }; /** - * Converts this CMsgSOCacheSubscriptionRefresh to JSON. - * @function toJSON + * Converts this CMsgSOCacheSubscriptionRefresh to JSON. + * @function toJSON + * @memberof CMsgSOCacheSubscriptionRefresh + * @instance + * @returns {Object.} JSON object + */ + CMsgSOCacheSubscriptionRefresh.prototype.toJSON = function() { + return CMsgSOCacheSubscriptionRefresh.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSOCacheSubscriptionRefresh + * @function getTypeUrl * @memberof CMsgSOCacheSubscriptionRefresh - * @instance - * @returns {Object.} JSON object + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url */ - CMsgSOCacheSubscriptionRefresh.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSOCacheSubscriptionRefresh.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOCacheSubscriptionRefresh"; }; return CMsgSOCacheSubscriptionRefresh; @@ -2938,27 +3746,40 @@ $root.CMsgSOCacheVersion = (function() { + /** + * Properties of a CMsgSOCacheVersion. + * @typedef {Object} CMsgSOCacheVersion.$Properties + * @property {number|Long|null} [version] CMsgSOCacheVersion version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSOCacheVersion. * @exports ICMsgSOCacheVersion * @interface ICMsgSOCacheVersion - * @property {number|Long|null} [version] CMsgSOCacheVersion version + * @augments CMsgSOCacheVersion.$Properties + * @deprecated Use CMsgSOCacheVersion.$Properties instead. + */ + + /** + * Shape of a CMsgSOCacheVersion. + * @typedef {CMsgSOCacheVersion.$Properties} CMsgSOCacheVersion.$Shape */ /** * Constructs a new CMsgSOCacheVersion. * @exports CMsgSOCacheVersion * @classdesc Represents a CMsgSOCacheVersion. - * @implements ICMsgSOCacheVersion * @constructor - * @param {ICMsgSOCacheVersion=} [properties] Properties to set + * @param {CMsgSOCacheVersion.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSOCacheVersion(properties) { + var CMsgSOCacheVersion = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSOCacheVersion version. @@ -2966,17 +3787,21 @@ * @memberof CMsgSOCacheVersion * @instance */ - CMsgSOCacheVersion.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheVersion.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgSOCacheVersion instance using the specified properties. * @function create * @memberof CMsgSOCacheVersion * @static - * @param {ICMsgSOCacheVersion=} [properties] Properties to set + * @param {CMsgSOCacheVersion.$Properties=} [properties] Properties to set * @returns {CMsgSOCacheVersion} CMsgSOCacheVersion instance + * @type {{ + * (properties: CMsgSOCacheVersion.$Shape): CMsgSOCacheVersion & CMsgSOCacheVersion.$Shape; + * (properties?: CMsgSOCacheVersion.$Properties): CMsgSOCacheVersion; + * }} */ - CMsgSOCacheVersion.create = function create(properties) { + CMsgSOCacheVersion.create = function(properties) { return new CMsgSOCacheVersion(properties); }; @@ -2985,15 +3810,22 @@ * @function encode * @memberof CMsgSOCacheVersion * @static - * @param {ICMsgSOCacheVersion} message CMsgSOCacheVersion message or plain object to encode + * @param {CMsgSOCacheVersion.$Properties} message CMsgSOCacheVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheVersion.encode = function encode(message, writer) { + CMsgSOCacheVersion.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3002,12 +3834,12 @@ * @function encodeDelimited * @memberof CMsgSOCacheVersion * @static - * @param {ICMsgSOCacheVersion} message CMsgSOCacheVersion message or plain object to encode + * @param {CMsgSOCacheVersion.$Properties} message CMsgSOCacheVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSOCacheVersion.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3017,25 +3849,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOCacheVersion} CMsgSOCacheVersion + * @returns {CMsgSOCacheVersion & CMsgSOCacheVersion.$Shape} CMsgSOCacheVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheVersion.decode = function decode(reader, length) { + CMsgSOCacheVersion.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOCacheVersion(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOCacheVersion(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.version = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3045,11 +3894,11 @@ * @memberof CMsgSOCacheVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOCacheVersion} CMsgSOCacheVersion + * @returns {CMsgSOCacheVersion & CMsgSOCacheVersion.$Shape} CMsgSOCacheVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheVersion.decodeDelimited = function decodeDelimited(reader) { + CMsgSOCacheVersion.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3063,10 +3912,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSOCacheVersion.verify = function verify(message) { + CMsgSOCacheVersion.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) return "version: integer|Long expected"; return null; @@ -3080,19 +3933,25 @@ * @param {Object.} object Plain object * @returns {CMsgSOCacheVersion} CMsgSOCacheVersion */ - CMsgSOCacheVersion.fromObject = function fromObject(object) { + CMsgSOCacheVersion.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOCacheVersion) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOCacheVersion: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOCacheVersion(); if (object.version != null) if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = false; + message.version = $util.Long.fromValue(object.version, true); else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); + message.version = $parseInt(object.version, 10); else if (typeof object.version === "number") message.version = object.version; else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); return message; }; @@ -3105,21 +3964,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSOCacheVersion.toObject = function toObject(message, options) { + CMsgSOCacheVersion.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.version = options.longs === String ? "0" : 0; - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; + object.version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.version = typeof message.version === "number" ? $BigInt(message.version) : $util.Long.fromBits(message.version.low >>> 0, message.version.high >>> 0, true).toBigInt(); + else if (typeof message.version === "number") + object.version = options.longs === $String ? $String(message.version) : message.version; else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; + object.version = options.longs === $String ? $util.Long.prototype.toString.call(message.version) : options.longs === $Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; return object; }; @@ -3130,8 +3995,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSOCacheVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSOCacheVersion.prototype.toJSON = function() { + return CMsgSOCacheVersion.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSOCacheVersion + * @function getTypeUrl + * @memberof CMsgSOCacheVersion + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSOCacheVersion.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOCacheVersion"; }; return CMsgSOCacheVersion; @@ -3141,28 +4020,41 @@ /** * Properties of a CMsgGCMultiplexMessage. - * @exports ICMsgGCMultiplexMessage - * @interface ICMsgGCMultiplexMessage + * @typedef {Object} CMsgGCMultiplexMessage.$Properties * @property {number|null} [msgtype] CMsgGCMultiplexMessage msgtype * @property {Uint8Array|null} [payload] CMsgGCMultiplexMessage payload * @property {Array.|null} [steamids] CMsgGCMultiplexMessage steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCMultiplexMessage. + * @exports ICMsgGCMultiplexMessage + * @interface ICMsgGCMultiplexMessage + * @augments CMsgGCMultiplexMessage.$Properties + * @deprecated Use CMsgGCMultiplexMessage.$Properties instead. + */ + + /** + * Shape of a CMsgGCMultiplexMessage. + * @typedef {CMsgGCMultiplexMessage.$Properties} CMsgGCMultiplexMessage.$Shape */ /** * Constructs a new CMsgGCMultiplexMessage. * @exports CMsgGCMultiplexMessage * @classdesc Represents a CMsgGCMultiplexMessage. - * @implements ICMsgGCMultiplexMessage * @constructor - * @param {ICMsgGCMultiplexMessage=} [properties] Properties to set + * @param {CMsgGCMultiplexMessage.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMultiplexMessage(properties) { + var CMsgGCMultiplexMessage = function (properties) { this.steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMultiplexMessage msgtype. @@ -3193,10 +4085,14 @@ * @function create * @memberof CMsgGCMultiplexMessage * @static - * @param {ICMsgGCMultiplexMessage=} [properties] Properties to set + * @param {CMsgGCMultiplexMessage.$Properties=} [properties] Properties to set * @returns {CMsgGCMultiplexMessage} CMsgGCMultiplexMessage instance + * @type {{ + * (properties: CMsgGCMultiplexMessage.$Shape): CMsgGCMultiplexMessage & CMsgGCMultiplexMessage.$Shape; + * (properties?: CMsgGCMultiplexMessage.$Properties): CMsgGCMultiplexMessage; + * }} */ - CMsgGCMultiplexMessage.create = function create(properties) { + CMsgGCMultiplexMessage.create = function(properties) { return new CMsgGCMultiplexMessage(properties); }; @@ -3205,20 +4101,27 @@ * @function encode * @memberof CMsgGCMultiplexMessage * @static - * @param {ICMsgGCMultiplexMessage} message CMsgGCMultiplexMessage message or plain object to encode + * @param {CMsgGCMultiplexMessage.$Properties} message CMsgGCMultiplexMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMultiplexMessage.encode = function encode(message, writer) { + CMsgGCMultiplexMessage.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.msgtype != null && Object.hasOwnProperty.call(message, "msgtype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.msgtype != null && $Object.hasOwnProperty.call(message, "msgtype")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.msgtype); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + if (message.payload != null && $Object.hasOwnProperty.call(message, "payload")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.payload); if (message.steamids != null && message.steamids.length) for (var i = 0; i < message.steamids.length; ++i) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3227,12 +4130,12 @@ * @function encodeDelimited * @memberof CMsgGCMultiplexMessage * @static - * @param {ICMsgGCMultiplexMessage} message CMsgGCMultiplexMessage message or plain object to encode + * @param {CMsgGCMultiplexMessage.$Properties} message CMsgGCMultiplexMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMultiplexMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMultiplexMessage.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3242,38 +4145,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMultiplexMessage} CMsgGCMultiplexMessage + * @returns {CMsgGCMultiplexMessage & CMsgGCMultiplexMessage.$Shape} CMsgGCMultiplexMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMultiplexMessage.decode = function decode(reader, length) { + CMsgGCMultiplexMessage.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMultiplexMessage(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMultiplexMessage(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgtype = reader.uint32(); - break; - case 2: - message.payload = reader.bytes(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 3: - if (!(message.steamids && message.steamids.length)) - message.steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.steamids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.msgtype = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.payload = reader.bytes(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.steamids && message.steamids.length)) + message.steamids = []; + reader.fixed64s(message.steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.steamids && message.steamids.length)) + message.steamids = []; message.steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3283,11 +4210,11 @@ * @memberof CMsgGCMultiplexMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMultiplexMessage} CMsgGCMultiplexMessage + * @returns {CMsgGCMultiplexMessage & CMsgGCMultiplexMessage.$Shape} CMsgGCMultiplexMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMultiplexMessage.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMultiplexMessage.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3301,17 +4228,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMultiplexMessage.verify = function verify(message) { + CMsgGCMultiplexMessage.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.msgtype != null && message.hasOwnProperty("msgtype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.msgtype != null && $Object.hasOwnProperty.call(message, "msgtype")) if (!$util.isInteger(message.msgtype)) return "msgtype: integer expected"; - if (message.payload != null && message.hasOwnProperty("payload")) + if (message.payload != null && $Object.hasOwnProperty.call(message, "payload")) if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) return "payload: buffer expected"; - if (message.steamids != null && message.hasOwnProperty("steamids")) { - if (!Array.isArray(message.steamids)) + if (message.steamids != null && $Object.hasOwnProperty.call(message, "steamids")) { + if (!$Array.isArray(message.steamids)) return "steamids: array expected"; for (var i = 0; i < message.steamids.length; ++i) if (!$util.isInteger(message.steamids[i]) && !(message.steamids[i] && $util.isInteger(message.steamids[i].low) && $util.isInteger(message.steamids[i].high))) @@ -3328,30 +4259,36 @@ * @param {Object.} object Plain object * @returns {CMsgGCMultiplexMessage} CMsgGCMultiplexMessage */ - CMsgGCMultiplexMessage.fromObject = function fromObject(object) { + CMsgGCMultiplexMessage.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMultiplexMessage) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMultiplexMessage: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMultiplexMessage(); if (object.msgtype != null) message.msgtype = object.msgtype >>> 0; if (object.payload != null) if (typeof object.payload === "string") $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); - else if (object.payload.length) + else if (object.payload.length >= 0) message.payload = object.payload; if (object.steamids) { - if (!Array.isArray(object.steamids)) - throw TypeError(".CMsgGCMultiplexMessage.steamids: array expected"); - message.steamids = []; + if (!$Array.isArray(object.steamids)) + throw $TypeError(".CMsgGCMultiplexMessage.steamids: array expected"); + message.steamids = $Array(object.steamids.length); for (var i = 0; i < object.steamids.length; ++i) if ($util.Long) - (message.steamids[i] = $util.Long.fromValue(object.steamids[i])).unsigned = false; + message.steamids[i] = $util.Long.fromValue(object.steamids[i], true); else if (typeof object.steamids[i] === "string") - message.steamids[i] = parseInt(object.steamids[i], 10); + message.steamids[i] = $parseInt(object.steamids[i], 10); else if (typeof object.steamids[i] === "number") message.steamids[i] = object.steamids[i]; else if (typeof object.steamids[i] === "object") - message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(); + message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -3365,33 +4302,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMultiplexMessage.toObject = function toObject(message, options) { + CMsgGCMultiplexMessage.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.steamids = []; if (options.defaults) { object.msgtype = 0; - if (options.bytes === String) + if (options.bytes === $String) object.payload = ""; else { object.payload = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.payload = $util.newBuffer(object.payload); } } - if (message.msgtype != null && message.hasOwnProperty("msgtype")) + if (message.msgtype != null && $Object.hasOwnProperty.call(message, "msgtype")) object.msgtype = message.msgtype; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + if (message.payload != null && $Object.hasOwnProperty.call(message, "payload")) + object.payload = options.bytes === $String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.payload) : message.payload; if (message.steamids && message.steamids.length) { - object.steamids = []; + object.steamids = $Array(message.steamids.length); for (var j = 0; j < message.steamids.length; ++j) - if (typeof message.steamids[j] === "number") - object.steamids[j] = options.longs === String ? String(message.steamids[j]) : message.steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamids[j] = typeof message.steamids[j] === "number" ? $BigInt(message.steamids[j]) : $util.Long.fromBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.steamids[j] === "number") + object.steamids[j] = options.longs === $String ? $String(message.steamids[j]) : message.steamids[j]; else - object.steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber() : message.steamids[j]; + object.steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === $Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber(true) : message.steamids[j]; } return object; }; @@ -3403,8 +4346,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMultiplexMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMultiplexMessage.prototype.toJSON = function() { + return CMsgGCMultiplexMessage.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMultiplexMessage + * @function getTypeUrl + * @memberof CMsgGCMultiplexMessage + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMultiplexMessage.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMultiplexMessage"; }; return CMsgGCMultiplexMessage; @@ -3414,29 +4371,42 @@ /** * Properties of a CGCToGCMsgMasterAck. - * @exports ICGCToGCMsgMasterAck - * @interface ICGCToGCMsgMasterAck + * @typedef {Object} CGCToGCMsgMasterAck.$Properties * @property {number|null} [dir_index] CGCToGCMsgMasterAck dir_index * @property {string|null} [machine_name] CGCToGCMsgMasterAck machine_name * @property {string|null} [process_name] CGCToGCMsgMasterAck process_name * @property {Array.|null} [type_instances] CGCToGCMsgMasterAck type_instances + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCToGCMsgMasterAck. + * @exports ICGCToGCMsgMasterAck + * @interface ICGCToGCMsgMasterAck + * @augments CGCToGCMsgMasterAck.$Properties + * @deprecated Use CGCToGCMsgMasterAck.$Properties instead. + */ + + /** + * Shape of a CGCToGCMsgMasterAck. + * @typedef {CGCToGCMsgMasterAck.$Properties} CGCToGCMsgMasterAck.$Shape */ /** * Constructs a new CGCToGCMsgMasterAck. * @exports CGCToGCMsgMasterAck * @classdesc Represents a CGCToGCMsgMasterAck. - * @implements ICGCToGCMsgMasterAck * @constructor - * @param {ICGCToGCMsgMasterAck=} [properties] Properties to set + * @param {CGCToGCMsgMasterAck.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCToGCMsgMasterAck(properties) { + var CGCToGCMsgMasterAck = function (properties) { this.type_instances = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCToGCMsgMasterAck dir_index. @@ -3475,10 +4445,14 @@ * @function create * @memberof CGCToGCMsgMasterAck * @static - * @param {ICGCToGCMsgMasterAck=} [properties] Properties to set + * @param {CGCToGCMsgMasterAck.$Properties=} [properties] Properties to set * @returns {CGCToGCMsgMasterAck} CGCToGCMsgMasterAck instance + * @type {{ + * (properties: CGCToGCMsgMasterAck.$Shape): CGCToGCMsgMasterAck & CGCToGCMsgMasterAck.$Shape; + * (properties?: CGCToGCMsgMasterAck.$Properties): CGCToGCMsgMasterAck; + * }} */ - CGCToGCMsgMasterAck.create = function create(properties) { + CGCToGCMsgMasterAck.create = function(properties) { return new CGCToGCMsgMasterAck(properties); }; @@ -3487,22 +4461,29 @@ * @function encode * @memberof CGCToGCMsgMasterAck * @static - * @param {ICGCToGCMsgMasterAck} message CGCToGCMsgMasterAck message or plain object to encode + * @param {CGCToGCMsgMasterAck.$Properties} message CGCToGCMsgMasterAck message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCToGCMsgMasterAck.encode = function encode(message, writer) { + CGCToGCMsgMasterAck.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); - if (message.machine_name != null && Object.hasOwnProperty.call(message, "machine_name")) + if (message.machine_name != null && $Object.hasOwnProperty.call(message, "machine_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.machine_name); - if (message.process_name != null && Object.hasOwnProperty.call(message, "process_name")) + if (message.process_name != null && $Object.hasOwnProperty.call(message, "process_name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.process_name); if (message.type_instances != null && message.type_instances.length) for (var i = 0; i < message.type_instances.length; ++i) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.type_instances[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3511,12 +4492,12 @@ * @function encodeDelimited * @memberof CGCToGCMsgMasterAck * @static - * @param {ICGCToGCMsgMasterAck} message CGCToGCMsgMasterAck message or plain object to encode + * @param {CGCToGCMsgMasterAck.$Properties} message CGCToGCMsgMasterAck message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCToGCMsgMasterAck.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCToGCMsgMasterAck.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3526,41 +4507,68 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCToGCMsgMasterAck} CGCToGCMsgMasterAck + * @returns {CGCToGCMsgMasterAck & CGCToGCMsgMasterAck.$Shape} CGCToGCMsgMasterAck * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCToGCMsgMasterAck.decode = function decode(reader, length) { + CGCToGCMsgMasterAck.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCToGCMsgMasterAck(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCToGCMsgMasterAck(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - case 3: - message.machine_name = reader.string(); - break; - case 4: - message.process_name = reader.string(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 5: - if (!(message.type_instances && message.type_instances.length)) - message.type_instances = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.type_instances.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.machine_name = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.process_name = reader.string(); + continue; + } + case 5: { + if (wireType === 2) { + if (!(message.type_instances && message.type_instances.length)) + message.type_instances = []; + reader.uint32s(message.type_instances); + continue; + } + if (wireType !== 0) + break; + if (!(message.type_instances && message.type_instances.length)) + message.type_instances = []; message.type_instances.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3570,11 +4578,11 @@ * @memberof CGCToGCMsgMasterAck * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCToGCMsgMasterAck} CGCToGCMsgMasterAck + * @returns {CGCToGCMsgMasterAck & CGCToGCMsgMasterAck.$Shape} CGCToGCMsgMasterAck * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCToGCMsgMasterAck.decodeDelimited = function decodeDelimited(reader) { + CGCToGCMsgMasterAck.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3588,20 +4596,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCToGCMsgMasterAck.verify = function verify(message) { + CGCToGCMsgMasterAck.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; - if (message.machine_name != null && message.hasOwnProperty("machine_name")) + if (message.machine_name != null && $Object.hasOwnProperty.call(message, "machine_name")) if (!$util.isString(message.machine_name)) return "machine_name: string expected"; - if (message.process_name != null && message.hasOwnProperty("process_name")) + if (message.process_name != null && $Object.hasOwnProperty.call(message, "process_name")) if (!$util.isString(message.process_name)) return "process_name: string expected"; - if (message.type_instances != null && message.hasOwnProperty("type_instances")) { - if (!Array.isArray(message.type_instances)) + if (message.type_instances != null && $Object.hasOwnProperty.call(message, "type_instances")) { + if (!$Array.isArray(message.type_instances)) return "type_instances: array expected"; for (var i = 0; i < message.type_instances.length; ++i) if (!$util.isInteger(message.type_instances[i])) @@ -3618,20 +4630,26 @@ * @param {Object.} object Plain object * @returns {CGCToGCMsgMasterAck} CGCToGCMsgMasterAck */ - CGCToGCMsgMasterAck.fromObject = function fromObject(object) { + CGCToGCMsgMasterAck.fromObject = function (object, _depth) { if (object instanceof $root.CGCToGCMsgMasterAck) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCToGCMsgMasterAck: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCToGCMsgMasterAck(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; if (object.machine_name != null) - message.machine_name = String(object.machine_name); + message.machine_name = $String(object.machine_name); if (object.process_name != null) - message.process_name = String(object.process_name); + message.process_name = $String(object.process_name); if (object.type_instances) { - if (!Array.isArray(object.type_instances)) - throw TypeError(".CGCToGCMsgMasterAck.type_instances: array expected"); - message.type_instances = []; + if (!$Array.isArray(object.type_instances)) + throw $TypeError(".CGCToGCMsgMasterAck.type_instances: array expected"); + message.type_instances = $Array(object.type_instances.length); for (var i = 0; i < object.type_instances.length; ++i) message.type_instances[i] = object.type_instances[i] >>> 0; } @@ -3647,9 +4665,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCToGCMsgMasterAck.toObject = function toObject(message, options) { + CGCToGCMsgMasterAck.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.type_instances = []; @@ -3658,14 +4680,14 @@ object.machine_name = ""; object.process_name = ""; } - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; - if (message.machine_name != null && message.hasOwnProperty("machine_name")) + if (message.machine_name != null && $Object.hasOwnProperty.call(message, "machine_name")) object.machine_name = message.machine_name; - if (message.process_name != null && message.hasOwnProperty("process_name")) + if (message.process_name != null && $Object.hasOwnProperty.call(message, "process_name")) object.process_name = message.process_name; if (message.type_instances && message.type_instances.length) { - object.type_instances = []; + object.type_instances = $Array(message.type_instances.length); for (var j = 0; j < message.type_instances.length; ++j) object.type_instances[j] = message.type_instances[j]; } @@ -3679,8 +4701,22 @@ * @instance * @returns {Object.} JSON object */ - CGCToGCMsgMasterAck.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCToGCMsgMasterAck.prototype.toJSON = function() { + return CGCToGCMsgMasterAck.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCToGCMsgMasterAck + * @function getTypeUrl + * @memberof CGCToGCMsgMasterAck + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCToGCMsgMasterAck.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCToGCMsgMasterAck"; }; return CGCToGCMsgMasterAck; @@ -3688,27 +4724,40 @@ $root.CGCToGCMsgMasterAck_Response = (function() { + /** + * Properties of a CGCToGCMsgMasterAck_Response. + * @typedef {Object} CGCToGCMsgMasterAck_Response.$Properties + * @property {number|null} [eresult] CGCToGCMsgMasterAck_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCToGCMsgMasterAck_Response. * @exports ICGCToGCMsgMasterAck_Response * @interface ICGCToGCMsgMasterAck_Response - * @property {number|null} [eresult] CGCToGCMsgMasterAck_Response eresult + * @augments CGCToGCMsgMasterAck_Response.$Properties + * @deprecated Use CGCToGCMsgMasterAck_Response.$Properties instead. + */ + + /** + * Shape of a CGCToGCMsgMasterAck_Response. + * @typedef {CGCToGCMsgMasterAck_Response.$Properties} CGCToGCMsgMasterAck_Response.$Shape */ /** * Constructs a new CGCToGCMsgMasterAck_Response. * @exports CGCToGCMsgMasterAck_Response * @classdesc Represents a CGCToGCMsgMasterAck_Response. - * @implements ICGCToGCMsgMasterAck_Response * @constructor - * @param {ICGCToGCMsgMasterAck_Response=} [properties] Properties to set + * @param {CGCToGCMsgMasterAck_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCToGCMsgMasterAck_Response(properties) { + var CGCToGCMsgMasterAck_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCToGCMsgMasterAck_Response eresult. @@ -3723,10 +4772,14 @@ * @function create * @memberof CGCToGCMsgMasterAck_Response * @static - * @param {ICGCToGCMsgMasterAck_Response=} [properties] Properties to set + * @param {CGCToGCMsgMasterAck_Response.$Properties=} [properties] Properties to set * @returns {CGCToGCMsgMasterAck_Response} CGCToGCMsgMasterAck_Response instance + * @type {{ + * (properties: CGCToGCMsgMasterAck_Response.$Shape): CGCToGCMsgMasterAck_Response & CGCToGCMsgMasterAck_Response.$Shape; + * (properties?: CGCToGCMsgMasterAck_Response.$Properties): CGCToGCMsgMasterAck_Response; + * }} */ - CGCToGCMsgMasterAck_Response.create = function create(properties) { + CGCToGCMsgMasterAck_Response.create = function(properties) { return new CGCToGCMsgMasterAck_Response(properties); }; @@ -3735,15 +4788,22 @@ * @function encode * @memberof CGCToGCMsgMasterAck_Response * @static - * @param {ICGCToGCMsgMasterAck_Response} message CGCToGCMsgMasterAck_Response message or plain object to encode + * @param {CGCToGCMsgMasterAck_Response.$Properties} message CGCToGCMsgMasterAck_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCToGCMsgMasterAck_Response.encode = function encode(message, writer) { + CGCToGCMsgMasterAck_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3752,12 +4812,12 @@ * @function encodeDelimited * @memberof CGCToGCMsgMasterAck_Response * @static - * @param {ICGCToGCMsgMasterAck_Response} message CGCToGCMsgMasterAck_Response message or plain object to encode + * @param {CGCToGCMsgMasterAck_Response.$Properties} message CGCToGCMsgMasterAck_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCToGCMsgMasterAck_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCToGCMsgMasterAck_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3767,25 +4827,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCToGCMsgMasterAck_Response} CGCToGCMsgMasterAck_Response + * @returns {CGCToGCMsgMasterAck_Response & CGCToGCMsgMasterAck_Response.$Shape} CGCToGCMsgMasterAck_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCToGCMsgMasterAck_Response.decode = function decode(reader, length) { + CGCToGCMsgMasterAck_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCToGCMsgMasterAck_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCToGCMsgMasterAck_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3795,11 +4872,11 @@ * @memberof CGCToGCMsgMasterAck_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCToGCMsgMasterAck_Response} CGCToGCMsgMasterAck_Response + * @returns {CGCToGCMsgMasterAck_Response & CGCToGCMsgMasterAck_Response.$Shape} CGCToGCMsgMasterAck_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCToGCMsgMasterAck_Response.decodeDelimited = function decodeDelimited(reader) { + CGCToGCMsgMasterAck_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3813,10 +4890,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCToGCMsgMasterAck_Response.verify = function verify(message) { + CGCToGCMsgMasterAck_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -3830,9 +4911,15 @@ * @param {Object.} object Plain object * @returns {CGCToGCMsgMasterAck_Response} CGCToGCMsgMasterAck_Response */ - CGCToGCMsgMasterAck_Response.fromObject = function fromObject(object) { + CGCToGCMsgMasterAck_Response.fromObject = function (object, _depth) { if (object instanceof $root.CGCToGCMsgMasterAck_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCToGCMsgMasterAck_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCToGCMsgMasterAck_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -3848,13 +4935,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCToGCMsgMasterAck_Response.toObject = function toObject(message, options) { + CGCToGCMsgMasterAck_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -3866,8 +4957,22 @@ * @instance * @returns {Object.} JSON object */ - CGCToGCMsgMasterAck_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCToGCMsgMasterAck_Response.prototype.toJSON = function() { + return CGCToGCMsgMasterAck_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCToGCMsgMasterAck_Response + * @function getTypeUrl + * @memberof CGCToGCMsgMasterAck_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCToGCMsgMasterAck_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCToGCMsgMasterAck_Response"; }; return CGCToGCMsgMasterAck_Response; @@ -3875,32 +4980,45 @@ $root.CGCToGCMsgMasterStartupComplete = (function() { + /** + * Properties of a CGCToGCMsgMasterStartupComplete. + * @typedef {Object} CGCToGCMsgMasterStartupComplete.$Properties + * @property {Array.|null} [gc_info] CGCToGCMsgMasterStartupComplete gc_info + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCToGCMsgMasterStartupComplete. * @exports ICGCToGCMsgMasterStartupComplete * @interface ICGCToGCMsgMasterStartupComplete - * @property {Array.|null} [gc_info] CGCToGCMsgMasterStartupComplete gc_info + * @augments CGCToGCMsgMasterStartupComplete.$Properties + * @deprecated Use CGCToGCMsgMasterStartupComplete.$Properties instead. + */ + + /** + * Shape of a CGCToGCMsgMasterStartupComplete. + * @typedef {CGCToGCMsgMasterStartupComplete.$Properties} CGCToGCMsgMasterStartupComplete.$Shape */ /** * Constructs a new CGCToGCMsgMasterStartupComplete. * @exports CGCToGCMsgMasterStartupComplete * @classdesc Represents a CGCToGCMsgMasterStartupComplete. - * @implements ICGCToGCMsgMasterStartupComplete * @constructor - * @param {ICGCToGCMsgMasterStartupComplete=} [properties] Properties to set + * @param {CGCToGCMsgMasterStartupComplete.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCToGCMsgMasterStartupComplete(properties) { + var CGCToGCMsgMasterStartupComplete = function (properties) { this.gc_info = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCToGCMsgMasterStartupComplete gc_info. - * @member {Array.} gc_info + * @member {Array.} gc_info * @memberof CGCToGCMsgMasterStartupComplete * @instance */ @@ -3911,10 +5029,14 @@ * @function create * @memberof CGCToGCMsgMasterStartupComplete * @static - * @param {ICGCToGCMsgMasterStartupComplete=} [properties] Properties to set + * @param {CGCToGCMsgMasterStartupComplete.$Properties=} [properties] Properties to set * @returns {CGCToGCMsgMasterStartupComplete} CGCToGCMsgMasterStartupComplete instance + * @type {{ + * (properties: CGCToGCMsgMasterStartupComplete.$Shape): CGCToGCMsgMasterStartupComplete & CGCToGCMsgMasterStartupComplete.$Shape; + * (properties?: CGCToGCMsgMasterStartupComplete.$Properties): CGCToGCMsgMasterStartupComplete; + * }} */ - CGCToGCMsgMasterStartupComplete.create = function create(properties) { + CGCToGCMsgMasterStartupComplete.create = function(properties) { return new CGCToGCMsgMasterStartupComplete(properties); }; @@ -3923,16 +5045,23 @@ * @function encode * @memberof CGCToGCMsgMasterStartupComplete * @static - * @param {ICGCToGCMsgMasterStartupComplete} message CGCToGCMsgMasterStartupComplete message or plain object to encode + * @param {CGCToGCMsgMasterStartupComplete.$Properties} message CGCToGCMsgMasterStartupComplete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCToGCMsgMasterStartupComplete.encode = function encode(message, writer) { + CGCToGCMsgMasterStartupComplete.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.gc_info != null && message.gc_info.length) for (var i = 0; i < message.gc_info.length; ++i) - $root.CGCToGCMsgMasterStartupComplete.GCInfo.encode(message.gc_info[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CGCToGCMsgMasterStartupComplete.GCInfo.encode(message.gc_info[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3941,12 +5070,12 @@ * @function encodeDelimited * @memberof CGCToGCMsgMasterStartupComplete * @static - * @param {ICGCToGCMsgMasterStartupComplete} message CGCToGCMsgMasterStartupComplete message or plain object to encode + * @param {CGCToGCMsgMasterStartupComplete.$Properties} message CGCToGCMsgMasterStartupComplete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCToGCMsgMasterStartupComplete.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCToGCMsgMasterStartupComplete.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3956,27 +5085,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCToGCMsgMasterStartupComplete} CGCToGCMsgMasterStartupComplete + * @returns {CGCToGCMsgMasterStartupComplete & CGCToGCMsgMasterStartupComplete.$Shape} CGCToGCMsgMasterStartupComplete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCToGCMsgMasterStartupComplete.decode = function decode(reader, length) { + CGCToGCMsgMasterStartupComplete.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCToGCMsgMasterStartupComplete(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCToGCMsgMasterStartupComplete(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.gc_info && message.gc_info.length)) - message.gc_info = []; - message.gc_info.push($root.CGCToGCMsgMasterStartupComplete.GCInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.gc_info && message.gc_info.length)) + message.gc_info = []; + message.gc_info.push($root.CGCToGCMsgMasterStartupComplete.GCInfo.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3986,11 +5132,11 @@ * @memberof CGCToGCMsgMasterStartupComplete * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCToGCMsgMasterStartupComplete} CGCToGCMsgMasterStartupComplete + * @returns {CGCToGCMsgMasterStartupComplete & CGCToGCMsgMasterStartupComplete.$Shape} CGCToGCMsgMasterStartupComplete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCToGCMsgMasterStartupComplete.decodeDelimited = function decodeDelimited(reader) { + CGCToGCMsgMasterStartupComplete.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4004,14 +5150,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCToGCMsgMasterStartupComplete.verify = function verify(message) { + CGCToGCMsgMasterStartupComplete.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gc_info != null && message.hasOwnProperty("gc_info")) { - if (!Array.isArray(message.gc_info)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gc_info != null && $Object.hasOwnProperty.call(message, "gc_info")) { + if (!$Array.isArray(message.gc_info)) return "gc_info: array expected"; for (var i = 0; i < message.gc_info.length; ++i) { - var error = $root.CGCToGCMsgMasterStartupComplete.GCInfo.verify(message.gc_info[i]); + var error = $root.CGCToGCMsgMasterStartupComplete.GCInfo.verify(message.gc_info[i], _depth + 1); if (error) return "gc_info." + error; } @@ -4027,18 +5177,24 @@ * @param {Object.} object Plain object * @returns {CGCToGCMsgMasterStartupComplete} CGCToGCMsgMasterStartupComplete */ - CGCToGCMsgMasterStartupComplete.fromObject = function fromObject(object) { + CGCToGCMsgMasterStartupComplete.fromObject = function (object, _depth) { if (object instanceof $root.CGCToGCMsgMasterStartupComplete) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCToGCMsgMasterStartupComplete: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCToGCMsgMasterStartupComplete(); if (object.gc_info) { - if (!Array.isArray(object.gc_info)) - throw TypeError(".CGCToGCMsgMasterStartupComplete.gc_info: array expected"); - message.gc_info = []; + if (!$Array.isArray(object.gc_info)) + throw $TypeError(".CGCToGCMsgMasterStartupComplete.gc_info: array expected"); + message.gc_info = $Array(object.gc_info.length); for (var i = 0; i < object.gc_info.length; ++i) { - if (typeof object.gc_info[i] !== "object") - throw TypeError(".CGCToGCMsgMasterStartupComplete.gc_info: object expected"); - message.gc_info[i] = $root.CGCToGCMsgMasterStartupComplete.GCInfo.fromObject(object.gc_info[i]); + if (!$util.isObject(object.gc_info[i])) + throw $TypeError(".CGCToGCMsgMasterStartupComplete.gc_info: object expected"); + message.gc_info[i] = $root.CGCToGCMsgMasterStartupComplete.GCInfo.fromObject(object.gc_info[i], _depth + 1); } } return message; @@ -4053,16 +5209,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCToGCMsgMasterStartupComplete.toObject = function toObject(message, options) { + CGCToGCMsgMasterStartupComplete.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.gc_info = []; if (message.gc_info && message.gc_info.length) { - object.gc_info = []; + object.gc_info = $Array(message.gc_info.length); for (var j = 0; j < message.gc_info.length; ++j) - object.gc_info[j] = $root.CGCToGCMsgMasterStartupComplete.GCInfo.toObject(message.gc_info[j], options); + object.gc_info[j] = $root.CGCToGCMsgMasterStartupComplete.GCInfo.toObject(message.gc_info[j], options, _depth + 1); } return object; }; @@ -4074,34 +5234,61 @@ * @instance * @returns {Object.} JSON object */ - CGCToGCMsgMasterStartupComplete.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCToGCMsgMasterStartupComplete.prototype.toJSON = function() { + return CGCToGCMsgMasterStartupComplete.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCToGCMsgMasterStartupComplete + * @function getTypeUrl + * @memberof CGCToGCMsgMasterStartupComplete + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCToGCMsgMasterStartupComplete.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCToGCMsgMasterStartupComplete"; }; CGCToGCMsgMasterStartupComplete.GCInfo = (function() { /** * Properties of a GCInfo. - * @memberof CGCToGCMsgMasterStartupComplete - * @interface IGCInfo + * @typedef {Object} CGCToGCMsgMasterStartupComplete.GCInfo.$Properties * @property {number|null} [dir_index] GCInfo dir_index * @property {string|null} [machine_name] GCInfo machine_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GCInfo. + * @memberof CGCToGCMsgMasterStartupComplete + * @interface IGCInfo + * @augments CGCToGCMsgMasterStartupComplete.GCInfo.$Properties + * @deprecated Use CGCToGCMsgMasterStartupComplete.GCInfo.$Properties instead. + */ + + /** + * Shape of a GCInfo. + * @typedef {CGCToGCMsgMasterStartupComplete.GCInfo.$Properties} CGCToGCMsgMasterStartupComplete.GCInfo.$Shape */ /** * Constructs a new GCInfo. * @memberof CGCToGCMsgMasterStartupComplete * @classdesc Represents a GCInfo. - * @implements IGCInfo * @constructor - * @param {CGCToGCMsgMasterStartupComplete.IGCInfo=} [properties] Properties to set + * @param {CGCToGCMsgMasterStartupComplete.GCInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function GCInfo(properties) { + var GCInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * GCInfo dir_index. @@ -4124,10 +5311,14 @@ * @function create * @memberof CGCToGCMsgMasterStartupComplete.GCInfo * @static - * @param {CGCToGCMsgMasterStartupComplete.IGCInfo=} [properties] Properties to set + * @param {CGCToGCMsgMasterStartupComplete.GCInfo.$Properties=} [properties] Properties to set * @returns {CGCToGCMsgMasterStartupComplete.GCInfo} GCInfo instance + * @type {{ + * (properties: CGCToGCMsgMasterStartupComplete.GCInfo.$Shape): CGCToGCMsgMasterStartupComplete.GCInfo & CGCToGCMsgMasterStartupComplete.GCInfo.$Shape; + * (properties?: CGCToGCMsgMasterStartupComplete.GCInfo.$Properties): CGCToGCMsgMasterStartupComplete.GCInfo; + * }} */ - GCInfo.create = function create(properties) { + GCInfo.create = function(properties) { return new GCInfo(properties); }; @@ -4136,17 +5327,24 @@ * @function encode * @memberof CGCToGCMsgMasterStartupComplete.GCInfo * @static - * @param {CGCToGCMsgMasterStartupComplete.IGCInfo} message GCInfo message or plain object to encode + * @param {CGCToGCMsgMasterStartupComplete.GCInfo.$Properties} message GCInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GCInfo.encode = function encode(message, writer) { + GCInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); - if (message.machine_name != null && Object.hasOwnProperty.call(message, "machine_name")) + if (message.machine_name != null && $Object.hasOwnProperty.call(message, "machine_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.machine_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4155,12 +5353,12 @@ * @function encodeDelimited * @memberof CGCToGCMsgMasterStartupComplete.GCInfo * @static - * @param {CGCToGCMsgMasterStartupComplete.IGCInfo} message GCInfo message or plain object to encode + * @param {CGCToGCMsgMasterStartupComplete.GCInfo.$Properties} message GCInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GCInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + GCInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4170,28 +5368,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCToGCMsgMasterStartupComplete.GCInfo} GCInfo + * @returns {CGCToGCMsgMasterStartupComplete.GCInfo & CGCToGCMsgMasterStartupComplete.GCInfo.$Shape} GCInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GCInfo.decode = function decode(reader, length) { + GCInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCToGCMsgMasterStartupComplete.GCInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCToGCMsgMasterStartupComplete.GCInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - case 2: - message.machine_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.machine_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4201,11 +5419,11 @@ * @memberof CGCToGCMsgMasterStartupComplete.GCInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCToGCMsgMasterStartupComplete.GCInfo} GCInfo + * @returns {CGCToGCMsgMasterStartupComplete.GCInfo & CGCToGCMsgMasterStartupComplete.GCInfo.$Shape} GCInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GCInfo.decodeDelimited = function decodeDelimited(reader) { + GCInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4219,13 +5437,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GCInfo.verify = function verify(message) { + GCInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; - if (message.machine_name != null && message.hasOwnProperty("machine_name")) + if (message.machine_name != null && $Object.hasOwnProperty.call(message, "machine_name")) if (!$util.isString(message.machine_name)) return "machine_name: string expected"; return null; @@ -4239,14 +5461,20 @@ * @param {Object.} object Plain object * @returns {CGCToGCMsgMasterStartupComplete.GCInfo} GCInfo */ - GCInfo.fromObject = function fromObject(object) { + GCInfo.fromObject = function (object, _depth) { if (object instanceof $root.CGCToGCMsgMasterStartupComplete.GCInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCToGCMsgMasterStartupComplete.GCInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCToGCMsgMasterStartupComplete.GCInfo(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; if (object.machine_name != null) - message.machine_name = String(object.machine_name); + message.machine_name = $String(object.machine_name); return message; }; @@ -4259,17 +5487,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GCInfo.toObject = function toObject(message, options) { + GCInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.dir_index = 0; object.machine_name = ""; } - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; - if (message.machine_name != null && message.hasOwnProperty("machine_name")) + if (message.machine_name != null && $Object.hasOwnProperty.call(message, "machine_name")) object.machine_name = message.machine_name; return object; }; @@ -4281,8 +5513,22 @@ * @instance * @returns {Object.} JSON object */ - GCInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + GCInfo.prototype.toJSON = function() { + return GCInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GCInfo + * @function getTypeUrl + * @memberof CGCToGCMsgMasterStartupComplete.GCInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GCInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCToGCMsgMasterStartupComplete.GCInfo"; }; return GCInfo; @@ -4295,27 +5541,40 @@ /** * Properties of a CGCToGCMsgRouted. - * @exports ICGCToGCMsgRouted - * @interface ICGCToGCMsgRouted + * @typedef {Object} CGCToGCMsgRouted.$Properties * @property {number|null} [msg_type] CGCToGCMsgRouted msg_type * @property {number|Long|null} [sender_id] CGCToGCMsgRouted sender_id * @property {Uint8Array|null} [net_message] CGCToGCMsgRouted net_message + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCToGCMsgRouted. + * @exports ICGCToGCMsgRouted + * @interface ICGCToGCMsgRouted + * @augments CGCToGCMsgRouted.$Properties + * @deprecated Use CGCToGCMsgRouted.$Properties instead. + */ + + /** + * Shape of a CGCToGCMsgRouted. + * @typedef {CGCToGCMsgRouted.$Properties} CGCToGCMsgRouted.$Shape */ /** * Constructs a new CGCToGCMsgRouted. * @exports CGCToGCMsgRouted * @classdesc Represents a CGCToGCMsgRouted. - * @implements ICGCToGCMsgRouted * @constructor - * @param {ICGCToGCMsgRouted=} [properties] Properties to set + * @param {CGCToGCMsgRouted.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCToGCMsgRouted(properties) { + var CGCToGCMsgRouted = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCToGCMsgRouted msg_type. @@ -4331,7 +5590,7 @@ * @memberof CGCToGCMsgRouted * @instance */ - CGCToGCMsgRouted.prototype.sender_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCToGCMsgRouted.prototype.sender_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CGCToGCMsgRouted net_message. @@ -4346,10 +5605,14 @@ * @function create * @memberof CGCToGCMsgRouted * @static - * @param {ICGCToGCMsgRouted=} [properties] Properties to set + * @param {CGCToGCMsgRouted.$Properties=} [properties] Properties to set * @returns {CGCToGCMsgRouted} CGCToGCMsgRouted instance + * @type {{ + * (properties: CGCToGCMsgRouted.$Shape): CGCToGCMsgRouted & CGCToGCMsgRouted.$Shape; + * (properties?: CGCToGCMsgRouted.$Properties): CGCToGCMsgRouted; + * }} */ - CGCToGCMsgRouted.create = function create(properties) { + CGCToGCMsgRouted.create = function(properties) { return new CGCToGCMsgRouted(properties); }; @@ -4358,19 +5621,26 @@ * @function encode * @memberof CGCToGCMsgRouted * @static - * @param {ICGCToGCMsgRouted} message CGCToGCMsgRouted message or plain object to encode + * @param {CGCToGCMsgRouted.$Properties} message CGCToGCMsgRouted message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCToGCMsgRouted.encode = function encode(message, writer) { + CGCToGCMsgRouted.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.msg_type != null && Object.hasOwnProperty.call(message, "msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.msg_type); - if (message.sender_id != null && Object.hasOwnProperty.call(message, "sender_id")) + if (message.sender_id != null && $Object.hasOwnProperty.call(message, "sender_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.sender_id); - if (message.net_message != null && Object.hasOwnProperty.call(message, "net_message")) + if (message.net_message != null && $Object.hasOwnProperty.call(message, "net_message")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.net_message); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4379,12 +5649,12 @@ * @function encodeDelimited * @memberof CGCToGCMsgRouted * @static - * @param {ICGCToGCMsgRouted} message CGCToGCMsgRouted message or plain object to encode + * @param {CGCToGCMsgRouted.$Properties} message CGCToGCMsgRouted message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCToGCMsgRouted.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCToGCMsgRouted.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4394,31 +5664,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCToGCMsgRouted} CGCToGCMsgRouted + * @returns {CGCToGCMsgRouted & CGCToGCMsgRouted.$Shape} CGCToGCMsgRouted * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCToGCMsgRouted.decode = function decode(reader, length) { + CGCToGCMsgRouted.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCToGCMsgRouted(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCToGCMsgRouted(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg_type = reader.uint32(); - break; - case 2: - message.sender_id = reader.fixed64(); - break; - case 3: - message.net_message = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.msg_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.sender_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.net_message = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4428,11 +5721,11 @@ * @memberof CGCToGCMsgRouted * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCToGCMsgRouted} CGCToGCMsgRouted + * @returns {CGCToGCMsgRouted & CGCToGCMsgRouted.$Shape} CGCToGCMsgRouted * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCToGCMsgRouted.decodeDelimited = function decodeDelimited(reader) { + CGCToGCMsgRouted.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4446,16 +5739,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCToGCMsgRouted.verify = function verify(message) { + CGCToGCMsgRouted.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) if (!$util.isInteger(message.msg_type)) return "msg_type: integer expected"; - if (message.sender_id != null && message.hasOwnProperty("sender_id")) + if (message.sender_id != null && $Object.hasOwnProperty.call(message, "sender_id")) if (!$util.isInteger(message.sender_id) && !(message.sender_id && $util.isInteger(message.sender_id.low) && $util.isInteger(message.sender_id.high))) return "sender_id: integer|Long expected"; - if (message.net_message != null && message.hasOwnProperty("net_message")) + if (message.net_message != null && $Object.hasOwnProperty.call(message, "net_message")) if (!(message.net_message && typeof message.net_message.length === "number" || $util.isString(message.net_message))) return "net_message: buffer expected"; return null; @@ -4469,25 +5766,31 @@ * @param {Object.} object Plain object * @returns {CGCToGCMsgRouted} CGCToGCMsgRouted */ - CGCToGCMsgRouted.fromObject = function fromObject(object) { + CGCToGCMsgRouted.fromObject = function (object, _depth) { if (object instanceof $root.CGCToGCMsgRouted) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCToGCMsgRouted: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCToGCMsgRouted(); if (object.msg_type != null) message.msg_type = object.msg_type >>> 0; if (object.sender_id != null) if ($util.Long) - (message.sender_id = $util.Long.fromValue(object.sender_id)).unsigned = false; + message.sender_id = $util.Long.fromValue(object.sender_id, true); else if (typeof object.sender_id === "string") - message.sender_id = parseInt(object.sender_id, 10); + message.sender_id = $parseInt(object.sender_id, 10); else if (typeof object.sender_id === "number") message.sender_id = object.sender_id; else if (typeof object.sender_id === "object") - message.sender_id = new $util.LongBits(object.sender_id.low >>> 0, object.sender_id.high >>> 0).toNumber(); + message.sender_id = new $util.LongBits(object.sender_id.low >>> 0, object.sender_id.high >>> 0).toNumber(true); if (object.net_message != null) if (typeof object.net_message === "string") $util.base64.decode(object.net_message, message.net_message = $util.newBuffer($util.base64.length(object.net_message)), 0); - else if (object.net_message.length) + else if (object.net_message.length >= 0) message.net_message = object.net_message; return message; }; @@ -4501,34 +5804,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCToGCMsgRouted.toObject = function toObject(message, options) { + CGCToGCMsgRouted.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.msg_type = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sender_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.sender_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.sender_id = options.longs === String ? "0" : 0; - if (options.bytes === String) + object.sender_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (options.bytes === $String) object.net_message = ""; else { object.net_message = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.net_message = $util.newBuffer(object.net_message); } } - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) object.msg_type = message.msg_type; - if (message.sender_id != null && message.hasOwnProperty("sender_id")) - if (typeof message.sender_id === "number") - object.sender_id = options.longs === String ? String(message.sender_id) : message.sender_id; + if (message.sender_id != null && $Object.hasOwnProperty.call(message, "sender_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.sender_id = typeof message.sender_id === "number" ? $BigInt(message.sender_id) : $util.Long.fromBits(message.sender_id.low >>> 0, message.sender_id.high >>> 0, true).toBigInt(); + else if (typeof message.sender_id === "number") + object.sender_id = options.longs === $String ? $String(message.sender_id) : message.sender_id; else - object.sender_id = options.longs === String ? $util.Long.prototype.toString.call(message.sender_id) : options.longs === Number ? new $util.LongBits(message.sender_id.low >>> 0, message.sender_id.high >>> 0).toNumber() : message.sender_id; - if (message.net_message != null && message.hasOwnProperty("net_message")) - object.net_message = options.bytes === String ? $util.base64.encode(message.net_message, 0, message.net_message.length) : options.bytes === Array ? Array.prototype.slice.call(message.net_message) : message.net_message; + object.sender_id = options.longs === $String ? $util.Long.prototype.toString.call(message.sender_id) : options.longs === $Number ? new $util.LongBits(message.sender_id.low >>> 0, message.sender_id.high >>> 0).toNumber(true) : message.sender_id; + if (message.net_message != null && $Object.hasOwnProperty.call(message, "net_message")) + object.net_message = options.bytes === $String ? $util.base64.encode(message.net_message, 0, message.net_message.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.net_message) : message.net_message; return object; }; @@ -4539,8 +5848,22 @@ * @instance * @returns {Object.} JSON object */ - CGCToGCMsgRouted.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCToGCMsgRouted.prototype.toJSON = function() { + return CGCToGCMsgRouted.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCToGCMsgRouted + * @function getTypeUrl + * @memberof CGCToGCMsgRouted + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCToGCMsgRouted.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCToGCMsgRouted"; }; return CGCToGCMsgRouted; @@ -4550,26 +5873,39 @@ /** * Properties of a CGCToGCMsgRoutedReply. - * @exports ICGCToGCMsgRoutedReply - * @interface ICGCToGCMsgRoutedReply + * @typedef {Object} CGCToGCMsgRoutedReply.$Properties * @property {number|null} [msg_type] CGCToGCMsgRoutedReply msg_type * @property {Uint8Array|null} [net_message] CGCToGCMsgRoutedReply net_message + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCToGCMsgRoutedReply. + * @exports ICGCToGCMsgRoutedReply + * @interface ICGCToGCMsgRoutedReply + * @augments CGCToGCMsgRoutedReply.$Properties + * @deprecated Use CGCToGCMsgRoutedReply.$Properties instead. + */ + + /** + * Shape of a CGCToGCMsgRoutedReply. + * @typedef {CGCToGCMsgRoutedReply.$Properties} CGCToGCMsgRoutedReply.$Shape */ /** * Constructs a new CGCToGCMsgRoutedReply. * @exports CGCToGCMsgRoutedReply * @classdesc Represents a CGCToGCMsgRoutedReply. - * @implements ICGCToGCMsgRoutedReply * @constructor - * @param {ICGCToGCMsgRoutedReply=} [properties] Properties to set + * @param {CGCToGCMsgRoutedReply.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCToGCMsgRoutedReply(properties) { + var CGCToGCMsgRoutedReply = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCToGCMsgRoutedReply msg_type. @@ -4592,10 +5928,14 @@ * @function create * @memberof CGCToGCMsgRoutedReply * @static - * @param {ICGCToGCMsgRoutedReply=} [properties] Properties to set + * @param {CGCToGCMsgRoutedReply.$Properties=} [properties] Properties to set * @returns {CGCToGCMsgRoutedReply} CGCToGCMsgRoutedReply instance + * @type {{ + * (properties: CGCToGCMsgRoutedReply.$Shape): CGCToGCMsgRoutedReply & CGCToGCMsgRoutedReply.$Shape; + * (properties?: CGCToGCMsgRoutedReply.$Properties): CGCToGCMsgRoutedReply; + * }} */ - CGCToGCMsgRoutedReply.create = function create(properties) { + CGCToGCMsgRoutedReply.create = function(properties) { return new CGCToGCMsgRoutedReply(properties); }; @@ -4604,17 +5944,24 @@ * @function encode * @memberof CGCToGCMsgRoutedReply * @static - * @param {ICGCToGCMsgRoutedReply} message CGCToGCMsgRoutedReply message or plain object to encode + * @param {CGCToGCMsgRoutedReply.$Properties} message CGCToGCMsgRoutedReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCToGCMsgRoutedReply.encode = function encode(message, writer) { + CGCToGCMsgRoutedReply.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.msg_type != null && Object.hasOwnProperty.call(message, "msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.msg_type); - if (message.net_message != null && Object.hasOwnProperty.call(message, "net_message")) + if (message.net_message != null && $Object.hasOwnProperty.call(message, "net_message")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.net_message); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4623,12 +5970,12 @@ * @function encodeDelimited * @memberof CGCToGCMsgRoutedReply * @static - * @param {ICGCToGCMsgRoutedReply} message CGCToGCMsgRoutedReply message or plain object to encode + * @param {CGCToGCMsgRoutedReply.$Properties} message CGCToGCMsgRoutedReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCToGCMsgRoutedReply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCToGCMsgRoutedReply.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4638,28 +5985,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCToGCMsgRoutedReply} CGCToGCMsgRoutedReply + * @returns {CGCToGCMsgRoutedReply & CGCToGCMsgRoutedReply.$Shape} CGCToGCMsgRoutedReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCToGCMsgRoutedReply.decode = function decode(reader, length) { + CGCToGCMsgRoutedReply.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCToGCMsgRoutedReply(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCToGCMsgRoutedReply(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg_type = reader.uint32(); - break; - case 2: - message.net_message = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.msg_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.net_message = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4669,11 +6036,11 @@ * @memberof CGCToGCMsgRoutedReply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCToGCMsgRoutedReply} CGCToGCMsgRoutedReply + * @returns {CGCToGCMsgRoutedReply & CGCToGCMsgRoutedReply.$Shape} CGCToGCMsgRoutedReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCToGCMsgRoutedReply.decodeDelimited = function decodeDelimited(reader) { + CGCToGCMsgRoutedReply.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4687,13 +6054,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCToGCMsgRoutedReply.verify = function verify(message) { + CGCToGCMsgRoutedReply.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) if (!$util.isInteger(message.msg_type)) return "msg_type: integer expected"; - if (message.net_message != null && message.hasOwnProperty("net_message")) + if (message.net_message != null && $Object.hasOwnProperty.call(message, "net_message")) if (!(message.net_message && typeof message.net_message.length === "number" || $util.isString(message.net_message))) return "net_message: buffer expected"; return null; @@ -4707,16 +6078,22 @@ * @param {Object.} object Plain object * @returns {CGCToGCMsgRoutedReply} CGCToGCMsgRoutedReply */ - CGCToGCMsgRoutedReply.fromObject = function fromObject(object) { + CGCToGCMsgRoutedReply.fromObject = function (object, _depth) { if (object instanceof $root.CGCToGCMsgRoutedReply) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCToGCMsgRoutedReply: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCToGCMsgRoutedReply(); if (object.msg_type != null) message.msg_type = object.msg_type >>> 0; if (object.net_message != null) if (typeof object.net_message === "string") $util.base64.decode(object.net_message, message.net_message = $util.newBuffer($util.base64.length(object.net_message)), 0); - else if (object.net_message.length) + else if (object.net_message.length >= 0) message.net_message = object.net_message; return message; }; @@ -4730,24 +6107,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCToGCMsgRoutedReply.toObject = function toObject(message, options) { + CGCToGCMsgRoutedReply.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.msg_type = 0; - if (options.bytes === String) + if (options.bytes === $String) object.net_message = ""; else { object.net_message = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.net_message = $util.newBuffer(object.net_message); } } - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) object.msg_type = message.msg_type; - if (message.net_message != null && message.hasOwnProperty("net_message")) - object.net_message = options.bytes === String ? $util.base64.encode(message.net_message, 0, message.net_message.length) : options.bytes === Array ? Array.prototype.slice.call(message.net_message) : message.net_message; + if (message.net_message != null && $Object.hasOwnProperty.call(message, "net_message")) + object.net_message = options.bytes === $String ? $util.base64.encode(message.net_message, 0, message.net_message.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.net_message) : message.net_message; return object; }; @@ -4758,8 +6139,22 @@ * @instance * @returns {Object.} JSON object */ - CGCToGCMsgRoutedReply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCToGCMsgRoutedReply.prototype.toJSON = function() { + return CGCToGCMsgRoutedReply.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCToGCMsgRoutedReply + * @function getTypeUrl + * @memberof CGCToGCMsgRoutedReply + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCToGCMsgRoutedReply.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCToGCMsgRoutedReply"; }; return CGCToGCMsgRoutedReply; @@ -4767,32 +6162,45 @@ $root.CMsgGCUpdateSubGCSessionInfo = (function() { + /** + * Properties of a CMsgGCUpdateSubGCSessionInfo. + * @typedef {Object} CMsgGCUpdateSubGCSessionInfo.$Properties + * @property {Array.|null} [updates] CMsgGCUpdateSubGCSessionInfo updates + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCUpdateSubGCSessionInfo. * @exports ICMsgGCUpdateSubGCSessionInfo * @interface ICMsgGCUpdateSubGCSessionInfo - * @property {Array.|null} [updates] CMsgGCUpdateSubGCSessionInfo updates + * @augments CMsgGCUpdateSubGCSessionInfo.$Properties + * @deprecated Use CMsgGCUpdateSubGCSessionInfo.$Properties instead. + */ + + /** + * Shape of a CMsgGCUpdateSubGCSessionInfo. + * @typedef {CMsgGCUpdateSubGCSessionInfo.$Properties} CMsgGCUpdateSubGCSessionInfo.$Shape */ /** * Constructs a new CMsgGCUpdateSubGCSessionInfo. * @exports CMsgGCUpdateSubGCSessionInfo * @classdesc Represents a CMsgGCUpdateSubGCSessionInfo. - * @implements ICMsgGCUpdateSubGCSessionInfo * @constructor - * @param {ICMsgGCUpdateSubGCSessionInfo=} [properties] Properties to set + * @param {CMsgGCUpdateSubGCSessionInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCUpdateSubGCSessionInfo(properties) { + var CMsgGCUpdateSubGCSessionInfo = function (properties) { this.updates = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCUpdateSubGCSessionInfo updates. - * @member {Array.} updates + * @member {Array.} updates * @memberof CMsgGCUpdateSubGCSessionInfo * @instance */ @@ -4803,10 +6211,14 @@ * @function create * @memberof CMsgGCUpdateSubGCSessionInfo * @static - * @param {ICMsgGCUpdateSubGCSessionInfo=} [properties] Properties to set + * @param {CMsgGCUpdateSubGCSessionInfo.$Properties=} [properties] Properties to set * @returns {CMsgGCUpdateSubGCSessionInfo} CMsgGCUpdateSubGCSessionInfo instance + * @type {{ + * (properties: CMsgGCUpdateSubGCSessionInfo.$Shape): CMsgGCUpdateSubGCSessionInfo & CMsgGCUpdateSubGCSessionInfo.$Shape; + * (properties?: CMsgGCUpdateSubGCSessionInfo.$Properties): CMsgGCUpdateSubGCSessionInfo; + * }} */ - CMsgGCUpdateSubGCSessionInfo.create = function create(properties) { + CMsgGCUpdateSubGCSessionInfo.create = function(properties) { return new CMsgGCUpdateSubGCSessionInfo(properties); }; @@ -4815,16 +6227,23 @@ * @function encode * @memberof CMsgGCUpdateSubGCSessionInfo * @static - * @param {ICMsgGCUpdateSubGCSessionInfo} message CMsgGCUpdateSubGCSessionInfo message or plain object to encode + * @param {CMsgGCUpdateSubGCSessionInfo.$Properties} message CMsgGCUpdateSubGCSessionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCUpdateSubGCSessionInfo.encode = function encode(message, writer) { + CMsgGCUpdateSubGCSessionInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.updates != null && message.updates.length) for (var i = 0; i < message.updates.length; ++i) - $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.encode(message.updates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.encode(message.updates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4833,12 +6252,12 @@ * @function encodeDelimited * @memberof CMsgGCUpdateSubGCSessionInfo * @static - * @param {ICMsgGCUpdateSubGCSessionInfo} message CMsgGCUpdateSubGCSessionInfo message or plain object to encode + * @param {CMsgGCUpdateSubGCSessionInfo.$Properties} message CMsgGCUpdateSubGCSessionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCUpdateSubGCSessionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCUpdateSubGCSessionInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4848,27 +6267,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCUpdateSubGCSessionInfo} CMsgGCUpdateSubGCSessionInfo + * @returns {CMsgGCUpdateSubGCSessionInfo & CMsgGCUpdateSubGCSessionInfo.$Shape} CMsgGCUpdateSubGCSessionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCUpdateSubGCSessionInfo.decode = function decode(reader, length) { + CMsgGCUpdateSubGCSessionInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCUpdateSubGCSessionInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCUpdateSubGCSessionInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.updates && message.updates.length)) - message.updates = []; - message.updates.push($root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.updates && message.updates.length)) + message.updates = []; + message.updates.push($root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4878,11 +6314,11 @@ * @memberof CMsgGCUpdateSubGCSessionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCUpdateSubGCSessionInfo} CMsgGCUpdateSubGCSessionInfo + * @returns {CMsgGCUpdateSubGCSessionInfo & CMsgGCUpdateSubGCSessionInfo.$Shape} CMsgGCUpdateSubGCSessionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCUpdateSubGCSessionInfo.decodeDelimited = function decodeDelimited(reader) { + CMsgGCUpdateSubGCSessionInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4896,14 +6332,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCUpdateSubGCSessionInfo.verify = function verify(message) { + CMsgGCUpdateSubGCSessionInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updates != null && message.hasOwnProperty("updates")) { - if (!Array.isArray(message.updates)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.updates != null && $Object.hasOwnProperty.call(message, "updates")) { + if (!$Array.isArray(message.updates)) return "updates: array expected"; for (var i = 0; i < message.updates.length; ++i) { - var error = $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.verify(message.updates[i]); + var error = $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.verify(message.updates[i], _depth + 1); if (error) return "updates." + error; } @@ -4919,18 +6359,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCUpdateSubGCSessionInfo} CMsgGCUpdateSubGCSessionInfo */ - CMsgGCUpdateSubGCSessionInfo.fromObject = function fromObject(object) { + CMsgGCUpdateSubGCSessionInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCUpdateSubGCSessionInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCUpdateSubGCSessionInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCUpdateSubGCSessionInfo(); if (object.updates) { - if (!Array.isArray(object.updates)) - throw TypeError(".CMsgGCUpdateSubGCSessionInfo.updates: array expected"); - message.updates = []; + if (!$Array.isArray(object.updates)) + throw $TypeError(".CMsgGCUpdateSubGCSessionInfo.updates: array expected"); + message.updates = $Array(object.updates.length); for (var i = 0; i < object.updates.length; ++i) { - if (typeof object.updates[i] !== "object") - throw TypeError(".CMsgGCUpdateSubGCSessionInfo.updates: object expected"); - message.updates[i] = $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.fromObject(object.updates[i]); + if (!$util.isObject(object.updates[i])) + throw $TypeError(".CMsgGCUpdateSubGCSessionInfo.updates: object expected"); + message.updates[i] = $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.fromObject(object.updates[i], _depth + 1); } } return message; @@ -4945,16 +6391,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCUpdateSubGCSessionInfo.toObject = function toObject(message, options) { + CMsgGCUpdateSubGCSessionInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.updates = []; if (message.updates && message.updates.length) { - object.updates = []; + object.updates = $Array(message.updates.length); for (var j = 0; j < message.updates.length; ++j) - object.updates[j] = $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.toObject(message.updates[j], options); + object.updates[j] = $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.toObject(message.updates[j], options, _depth + 1); } return object; }; @@ -4966,35 +6416,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCUpdateSubGCSessionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCUpdateSubGCSessionInfo.prototype.toJSON = function() { + return CMsgGCUpdateSubGCSessionInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCUpdateSubGCSessionInfo + * @function getTypeUrl + * @memberof CMsgGCUpdateSubGCSessionInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCUpdateSubGCSessionInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCUpdateSubGCSessionInfo"; }; CMsgGCUpdateSubGCSessionInfo.CMsgUpdate = (function() { /** * Properties of a CMsgUpdate. - * @memberof CMsgGCUpdateSubGCSessionInfo - * @interface ICMsgUpdate + * @typedef {Object} CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Properties * @property {number|Long|null} [steamid] CMsgUpdate steamid * @property {number|null} [ip] CMsgUpdate ip * @property {boolean|null} [trusted] CMsgUpdate trusted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgUpdate. + * @memberof CMsgGCUpdateSubGCSessionInfo + * @interface ICMsgUpdate + * @augments CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Properties + * @deprecated Use CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Properties instead. + */ + + /** + * Shape of a CMsgUpdate. + * @typedef {CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Properties} CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Shape */ /** * Constructs a new CMsgUpdate. * @memberof CMsgGCUpdateSubGCSessionInfo * @classdesc Represents a CMsgUpdate. - * @implements ICMsgUpdate * @constructor - * @param {CMsgGCUpdateSubGCSessionInfo.ICMsgUpdate=} [properties] Properties to set + * @param {CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgUpdate(properties) { + var CMsgUpdate = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgUpdate steamid. @@ -5002,7 +6479,7 @@ * @memberof CMsgGCUpdateSubGCSessionInfo.CMsgUpdate * @instance */ - CMsgUpdate.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgUpdate.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgUpdate ip. @@ -5025,10 +6502,14 @@ * @function create * @memberof CMsgGCUpdateSubGCSessionInfo.CMsgUpdate * @static - * @param {CMsgGCUpdateSubGCSessionInfo.ICMsgUpdate=} [properties] Properties to set + * @param {CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Properties=} [properties] Properties to set * @returns {CMsgGCUpdateSubGCSessionInfo.CMsgUpdate} CMsgUpdate instance + * @type {{ + * (properties: CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Shape): CMsgGCUpdateSubGCSessionInfo.CMsgUpdate & CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Shape; + * (properties?: CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Properties): CMsgGCUpdateSubGCSessionInfo.CMsgUpdate; + * }} */ - CMsgUpdate.create = function create(properties) { + CMsgUpdate.create = function(properties) { return new CMsgUpdate(properties); }; @@ -5037,19 +6518,26 @@ * @function encode * @memberof CMsgGCUpdateSubGCSessionInfo.CMsgUpdate * @static - * @param {CMsgGCUpdateSubGCSessionInfo.ICMsgUpdate} message CMsgUpdate message or plain object to encode + * @param {CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Properties} message CMsgUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdate.encode = function encode(message, writer) { + CMsgUpdate.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.ip); - if (message.trusted != null && Object.hasOwnProperty.call(message, "trusted")) + if (message.trusted != null && $Object.hasOwnProperty.call(message, "trusted")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.trusted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5058,12 +6546,12 @@ * @function encodeDelimited * @memberof CMsgGCUpdateSubGCSessionInfo.CMsgUpdate * @static - * @param {CMsgGCUpdateSubGCSessionInfo.ICMsgUpdate} message CMsgUpdate message or plain object to encode + * @param {CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Properties} message CMsgUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgUpdate.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5073,31 +6561,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCUpdateSubGCSessionInfo.CMsgUpdate} CMsgUpdate + * @returns {CMsgGCUpdateSubGCSessionInfo.CMsgUpdate & CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Shape} CMsgUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdate.decode = function decode(reader, length) { + CMsgUpdate.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.ip = reader.fixed32(); - break; - case 3: - message.trusted = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.ip = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.trusted = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5107,11 +6618,11 @@ * @memberof CMsgGCUpdateSubGCSessionInfo.CMsgUpdate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCUpdateSubGCSessionInfo.CMsgUpdate} CMsgUpdate + * @returns {CMsgGCUpdateSubGCSessionInfo.CMsgUpdate & CMsgGCUpdateSubGCSessionInfo.CMsgUpdate.$Shape} CMsgUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdate.decodeDelimited = function decodeDelimited(reader) { + CMsgUpdate.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5125,16 +6636,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgUpdate.verify = function verify(message) { + CMsgUpdate.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.ip != null && message.hasOwnProperty("ip")) + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) if (!$util.isInteger(message.ip)) return "ip: integer expected"; - if (message.trusted != null && message.hasOwnProperty("trusted")) + if (message.trusted != null && $Object.hasOwnProperty.call(message, "trusted")) if (typeof message.trusted !== "boolean") return "trusted: boolean expected"; return null; @@ -5148,23 +6663,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCUpdateSubGCSessionInfo.CMsgUpdate} CMsgUpdate */ - CMsgUpdate.fromObject = function fromObject(object) { + CMsgUpdate.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCUpdateSubGCSessionInfo.CMsgUpdate: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCUpdateSubGCSessionInfo.CMsgUpdate(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.ip != null) message.ip = object.ip >>> 0; if (object.trusted != null) - message.trusted = Boolean(object.trusted); + message.trusted = $Boolean(object.trusted); return message; }; @@ -5177,27 +6698,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgUpdate.toObject = function toObject(message, options) { + CMsgUpdate.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.ip = 0; object.trusted = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.ip != null && message.hasOwnProperty("ip")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) object.ip = message.ip; - if (message.trusted != null && message.hasOwnProperty("trusted")) + if (message.trusted != null && $Object.hasOwnProperty.call(message, "trusted")) object.trusted = message.trusted; return object; }; @@ -5209,8 +6736,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgUpdate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgUpdate.prototype.toJSON = function() { + return CMsgUpdate.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgUpdate + * @function getTypeUrl + * @memberof CMsgGCUpdateSubGCSessionInfo.CMsgUpdate + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgUpdate.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCUpdateSubGCSessionInfo.CMsgUpdate"; }; return CMsgUpdate; @@ -5221,27 +6762,40 @@ $root.CMsgGCRequestSubGCSessionInfo = (function() { + /** + * Properties of a CMsgGCRequestSubGCSessionInfo. + * @typedef {Object} CMsgGCRequestSubGCSessionInfo.$Properties + * @property {number|Long|null} [steamid] CMsgGCRequestSubGCSessionInfo steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCRequestSubGCSessionInfo. * @exports ICMsgGCRequestSubGCSessionInfo * @interface ICMsgGCRequestSubGCSessionInfo - * @property {number|Long|null} [steamid] CMsgGCRequestSubGCSessionInfo steamid + * @augments CMsgGCRequestSubGCSessionInfo.$Properties + * @deprecated Use CMsgGCRequestSubGCSessionInfo.$Properties instead. + */ + + /** + * Shape of a CMsgGCRequestSubGCSessionInfo. + * @typedef {CMsgGCRequestSubGCSessionInfo.$Properties} CMsgGCRequestSubGCSessionInfo.$Shape */ /** * Constructs a new CMsgGCRequestSubGCSessionInfo. * @exports CMsgGCRequestSubGCSessionInfo * @classdesc Represents a CMsgGCRequestSubGCSessionInfo. - * @implements ICMsgGCRequestSubGCSessionInfo * @constructor - * @param {ICMsgGCRequestSubGCSessionInfo=} [properties] Properties to set + * @param {CMsgGCRequestSubGCSessionInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRequestSubGCSessionInfo(properties) { + var CMsgGCRequestSubGCSessionInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRequestSubGCSessionInfo steamid. @@ -5249,17 +6803,21 @@ * @memberof CMsgGCRequestSubGCSessionInfo * @instance */ - CMsgGCRequestSubGCSessionInfo.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCRequestSubGCSessionInfo.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCRequestSubGCSessionInfo instance using the specified properties. * @function create * @memberof CMsgGCRequestSubGCSessionInfo * @static - * @param {ICMsgGCRequestSubGCSessionInfo=} [properties] Properties to set + * @param {CMsgGCRequestSubGCSessionInfo.$Properties=} [properties] Properties to set * @returns {CMsgGCRequestSubGCSessionInfo} CMsgGCRequestSubGCSessionInfo instance + * @type {{ + * (properties: CMsgGCRequestSubGCSessionInfo.$Shape): CMsgGCRequestSubGCSessionInfo & CMsgGCRequestSubGCSessionInfo.$Shape; + * (properties?: CMsgGCRequestSubGCSessionInfo.$Properties): CMsgGCRequestSubGCSessionInfo; + * }} */ - CMsgGCRequestSubGCSessionInfo.create = function create(properties) { + CMsgGCRequestSubGCSessionInfo.create = function(properties) { return new CMsgGCRequestSubGCSessionInfo(properties); }; @@ -5268,15 +6826,22 @@ * @function encode * @memberof CMsgGCRequestSubGCSessionInfo * @static - * @param {ICMsgGCRequestSubGCSessionInfo} message CMsgGCRequestSubGCSessionInfo message or plain object to encode + * @param {CMsgGCRequestSubGCSessionInfo.$Properties} message CMsgGCRequestSubGCSessionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestSubGCSessionInfo.encode = function encode(message, writer) { + CMsgGCRequestSubGCSessionInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5285,12 +6850,12 @@ * @function encodeDelimited * @memberof CMsgGCRequestSubGCSessionInfo * @static - * @param {ICMsgGCRequestSubGCSessionInfo} message CMsgGCRequestSubGCSessionInfo message or plain object to encode + * @param {CMsgGCRequestSubGCSessionInfo.$Properties} message CMsgGCRequestSubGCSessionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestSubGCSessionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRequestSubGCSessionInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5300,25 +6865,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRequestSubGCSessionInfo} CMsgGCRequestSubGCSessionInfo + * @returns {CMsgGCRequestSubGCSessionInfo & CMsgGCRequestSubGCSessionInfo.$Shape} CMsgGCRequestSubGCSessionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestSubGCSessionInfo.decode = function decode(reader, length) { + CMsgGCRequestSubGCSessionInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRequestSubGCSessionInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRequestSubGCSessionInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5328,11 +6910,11 @@ * @memberof CMsgGCRequestSubGCSessionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRequestSubGCSessionInfo} CMsgGCRequestSubGCSessionInfo + * @returns {CMsgGCRequestSubGCSessionInfo & CMsgGCRequestSubGCSessionInfo.$Shape} CMsgGCRequestSubGCSessionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestSubGCSessionInfo.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRequestSubGCSessionInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5346,10 +6928,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRequestSubGCSessionInfo.verify = function verify(message) { + CMsgGCRequestSubGCSessionInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -5363,19 +6949,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCRequestSubGCSessionInfo} CMsgGCRequestSubGCSessionInfo */ - CMsgGCRequestSubGCSessionInfo.fromObject = function fromObject(object) { + CMsgGCRequestSubGCSessionInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRequestSubGCSessionInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRequestSubGCSessionInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRequestSubGCSessionInfo(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -5388,21 +6980,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRequestSubGCSessionInfo.toObject = function toObject(message, options) { + CMsgGCRequestSubGCSessionInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -5413,8 +7011,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRequestSubGCSessionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRequestSubGCSessionInfo.prototype.toJSON = function() { + return CMsgGCRequestSubGCSessionInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRequestSubGCSessionInfo + * @function getTypeUrl + * @memberof CMsgGCRequestSubGCSessionInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRequestSubGCSessionInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRequestSubGCSessionInfo"; }; return CMsgGCRequestSubGCSessionInfo; @@ -5424,26 +7036,39 @@ /** * Properties of a CMsgGCRequestSubGCSessionInfoResponse. - * @exports ICMsgGCRequestSubGCSessionInfoResponse - * @interface ICMsgGCRequestSubGCSessionInfoResponse + * @typedef {Object} CMsgGCRequestSubGCSessionInfoResponse.$Properties * @property {number|null} [ip] CMsgGCRequestSubGCSessionInfoResponse ip * @property {boolean|null} [trusted] CMsgGCRequestSubGCSessionInfoResponse trusted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRequestSubGCSessionInfoResponse. + * @exports ICMsgGCRequestSubGCSessionInfoResponse + * @interface ICMsgGCRequestSubGCSessionInfoResponse + * @augments CMsgGCRequestSubGCSessionInfoResponse.$Properties + * @deprecated Use CMsgGCRequestSubGCSessionInfoResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCRequestSubGCSessionInfoResponse. + * @typedef {CMsgGCRequestSubGCSessionInfoResponse.$Properties} CMsgGCRequestSubGCSessionInfoResponse.$Shape */ /** * Constructs a new CMsgGCRequestSubGCSessionInfoResponse. * @exports CMsgGCRequestSubGCSessionInfoResponse * @classdesc Represents a CMsgGCRequestSubGCSessionInfoResponse. - * @implements ICMsgGCRequestSubGCSessionInfoResponse * @constructor - * @param {ICMsgGCRequestSubGCSessionInfoResponse=} [properties] Properties to set + * @param {CMsgGCRequestSubGCSessionInfoResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRequestSubGCSessionInfoResponse(properties) { + var CMsgGCRequestSubGCSessionInfoResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRequestSubGCSessionInfoResponse ip. @@ -5466,10 +7091,14 @@ * @function create * @memberof CMsgGCRequestSubGCSessionInfoResponse * @static - * @param {ICMsgGCRequestSubGCSessionInfoResponse=} [properties] Properties to set + * @param {CMsgGCRequestSubGCSessionInfoResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCRequestSubGCSessionInfoResponse} CMsgGCRequestSubGCSessionInfoResponse instance + * @type {{ + * (properties: CMsgGCRequestSubGCSessionInfoResponse.$Shape): CMsgGCRequestSubGCSessionInfoResponse & CMsgGCRequestSubGCSessionInfoResponse.$Shape; + * (properties?: CMsgGCRequestSubGCSessionInfoResponse.$Properties): CMsgGCRequestSubGCSessionInfoResponse; + * }} */ - CMsgGCRequestSubGCSessionInfoResponse.create = function create(properties) { + CMsgGCRequestSubGCSessionInfoResponse.create = function(properties) { return new CMsgGCRequestSubGCSessionInfoResponse(properties); }; @@ -5478,17 +7107,24 @@ * @function encode * @memberof CMsgGCRequestSubGCSessionInfoResponse * @static - * @param {ICMsgGCRequestSubGCSessionInfoResponse} message CMsgGCRequestSubGCSessionInfoResponse message or plain object to encode + * @param {CMsgGCRequestSubGCSessionInfoResponse.$Properties} message CMsgGCRequestSubGCSessionInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestSubGCSessionInfoResponse.encode = function encode(message, writer) { + CMsgGCRequestSubGCSessionInfoResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.ip); - if (message.trusted != null && Object.hasOwnProperty.call(message, "trusted")) + if (message.trusted != null && $Object.hasOwnProperty.call(message, "trusted")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.trusted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5497,12 +7133,12 @@ * @function encodeDelimited * @memberof CMsgGCRequestSubGCSessionInfoResponse * @static - * @param {ICMsgGCRequestSubGCSessionInfoResponse} message CMsgGCRequestSubGCSessionInfoResponse message or plain object to encode + * @param {CMsgGCRequestSubGCSessionInfoResponse.$Properties} message CMsgGCRequestSubGCSessionInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestSubGCSessionInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRequestSubGCSessionInfoResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5512,28 +7148,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRequestSubGCSessionInfoResponse} CMsgGCRequestSubGCSessionInfoResponse + * @returns {CMsgGCRequestSubGCSessionInfoResponse & CMsgGCRequestSubGCSessionInfoResponse.$Shape} CMsgGCRequestSubGCSessionInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestSubGCSessionInfoResponse.decode = function decode(reader, length) { + CMsgGCRequestSubGCSessionInfoResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRequestSubGCSessionInfoResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRequestSubGCSessionInfoResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ip = reader.fixed32(); - break; - case 2: - message.trusted = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.ip = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.trusted = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5543,11 +7199,11 @@ * @memberof CMsgGCRequestSubGCSessionInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRequestSubGCSessionInfoResponse} CMsgGCRequestSubGCSessionInfoResponse + * @returns {CMsgGCRequestSubGCSessionInfoResponse & CMsgGCRequestSubGCSessionInfoResponse.$Shape} CMsgGCRequestSubGCSessionInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestSubGCSessionInfoResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRequestSubGCSessionInfoResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5561,13 +7217,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRequestSubGCSessionInfoResponse.verify = function verify(message) { + CMsgGCRequestSubGCSessionInfoResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ip != null && message.hasOwnProperty("ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) if (!$util.isInteger(message.ip)) return "ip: integer expected"; - if (message.trusted != null && message.hasOwnProperty("trusted")) + if (message.trusted != null && $Object.hasOwnProperty.call(message, "trusted")) if (typeof message.trusted !== "boolean") return "trusted: boolean expected"; return null; @@ -5581,14 +7241,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCRequestSubGCSessionInfoResponse} CMsgGCRequestSubGCSessionInfoResponse */ - CMsgGCRequestSubGCSessionInfoResponse.fromObject = function fromObject(object) { + CMsgGCRequestSubGCSessionInfoResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRequestSubGCSessionInfoResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRequestSubGCSessionInfoResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRequestSubGCSessionInfoResponse(); if (object.ip != null) message.ip = object.ip >>> 0; if (object.trusted != null) - message.trusted = Boolean(object.trusted); + message.trusted = $Boolean(object.trusted); return message; }; @@ -5601,17 +7267,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRequestSubGCSessionInfoResponse.toObject = function toObject(message, options) { + CMsgGCRequestSubGCSessionInfoResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.ip = 0; object.trusted = false; } - if (message.ip != null && message.hasOwnProperty("ip")) + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) object.ip = message.ip; - if (message.trusted != null && message.hasOwnProperty("trusted")) + if (message.trusted != null && $Object.hasOwnProperty.call(message, "trusted")) object.trusted = message.trusted; return object; }; @@ -5623,8 +7293,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRequestSubGCSessionInfoResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRequestSubGCSessionInfoResponse.prototype.toJSON = function() { + return CMsgGCRequestSubGCSessionInfoResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRequestSubGCSessionInfoResponse + * @function getTypeUrl + * @memberof CMsgGCRequestSubGCSessionInfoResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRequestSubGCSessionInfoResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRequestSubGCSessionInfoResponse"; }; return CMsgGCRequestSubGCSessionInfoResponse; @@ -5632,27 +7316,40 @@ $root.CMsgGCToGCIncrementRecruitmentLevel = (function() { + /** + * Properties of a CMsgGCToGCIncrementRecruitmentLevel. + * @typedef {Object} CMsgGCToGCIncrementRecruitmentLevel.$Properties + * @property {number|Long|null} [steamid] CMsgGCToGCIncrementRecruitmentLevel steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCToGCIncrementRecruitmentLevel. * @exports ICMsgGCToGCIncrementRecruitmentLevel * @interface ICMsgGCToGCIncrementRecruitmentLevel - * @property {number|Long|null} [steamid] CMsgGCToGCIncrementRecruitmentLevel steamid + * @augments CMsgGCToGCIncrementRecruitmentLevel.$Properties + * @deprecated Use CMsgGCToGCIncrementRecruitmentLevel.$Properties instead. + */ + + /** + * Shape of a CMsgGCToGCIncrementRecruitmentLevel. + * @typedef {CMsgGCToGCIncrementRecruitmentLevel.$Properties} CMsgGCToGCIncrementRecruitmentLevel.$Shape */ /** * Constructs a new CMsgGCToGCIncrementRecruitmentLevel. * @exports CMsgGCToGCIncrementRecruitmentLevel * @classdesc Represents a CMsgGCToGCIncrementRecruitmentLevel. - * @implements ICMsgGCToGCIncrementRecruitmentLevel * @constructor - * @param {ICMsgGCToGCIncrementRecruitmentLevel=} [properties] Properties to set + * @param {CMsgGCToGCIncrementRecruitmentLevel.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCToGCIncrementRecruitmentLevel(properties) { + var CMsgGCToGCIncrementRecruitmentLevel = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCToGCIncrementRecruitmentLevel steamid. @@ -5660,17 +7357,21 @@ * @memberof CMsgGCToGCIncrementRecruitmentLevel * @instance */ - CMsgGCToGCIncrementRecruitmentLevel.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCToGCIncrementRecruitmentLevel.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCToGCIncrementRecruitmentLevel instance using the specified properties. * @function create * @memberof CMsgGCToGCIncrementRecruitmentLevel * @static - * @param {ICMsgGCToGCIncrementRecruitmentLevel=} [properties] Properties to set + * @param {CMsgGCToGCIncrementRecruitmentLevel.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCIncrementRecruitmentLevel} CMsgGCToGCIncrementRecruitmentLevel instance + * @type {{ + * (properties: CMsgGCToGCIncrementRecruitmentLevel.$Shape): CMsgGCToGCIncrementRecruitmentLevel & CMsgGCToGCIncrementRecruitmentLevel.$Shape; + * (properties?: CMsgGCToGCIncrementRecruitmentLevel.$Properties): CMsgGCToGCIncrementRecruitmentLevel; + * }} */ - CMsgGCToGCIncrementRecruitmentLevel.create = function create(properties) { + CMsgGCToGCIncrementRecruitmentLevel.create = function(properties) { return new CMsgGCToGCIncrementRecruitmentLevel(properties); }; @@ -5679,15 +7380,22 @@ * @function encode * @memberof CMsgGCToGCIncrementRecruitmentLevel * @static - * @param {ICMsgGCToGCIncrementRecruitmentLevel} message CMsgGCToGCIncrementRecruitmentLevel message or plain object to encode + * @param {CMsgGCToGCIncrementRecruitmentLevel.$Properties} message CMsgGCToGCIncrementRecruitmentLevel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCIncrementRecruitmentLevel.encode = function encode(message, writer) { + CMsgGCToGCIncrementRecruitmentLevel.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5696,12 +7404,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCIncrementRecruitmentLevel * @static - * @param {ICMsgGCToGCIncrementRecruitmentLevel} message CMsgGCToGCIncrementRecruitmentLevel message or plain object to encode + * @param {CMsgGCToGCIncrementRecruitmentLevel.$Properties} message CMsgGCToGCIncrementRecruitmentLevel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCIncrementRecruitmentLevel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCToGCIncrementRecruitmentLevel.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5711,25 +7419,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCIncrementRecruitmentLevel} CMsgGCToGCIncrementRecruitmentLevel + * @returns {CMsgGCToGCIncrementRecruitmentLevel & CMsgGCToGCIncrementRecruitmentLevel.$Shape} CMsgGCToGCIncrementRecruitmentLevel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCIncrementRecruitmentLevel.decode = function decode(reader, length) { + CMsgGCToGCIncrementRecruitmentLevel.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCIncrementRecruitmentLevel(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCIncrementRecruitmentLevel(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5739,11 +7464,11 @@ * @memberof CMsgGCToGCIncrementRecruitmentLevel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCIncrementRecruitmentLevel} CMsgGCToGCIncrementRecruitmentLevel + * @returns {CMsgGCToGCIncrementRecruitmentLevel & CMsgGCToGCIncrementRecruitmentLevel.$Shape} CMsgGCToGCIncrementRecruitmentLevel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCIncrementRecruitmentLevel.decodeDelimited = function decodeDelimited(reader) { + CMsgGCToGCIncrementRecruitmentLevel.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5757,10 +7482,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCToGCIncrementRecruitmentLevel.verify = function verify(message) { + CMsgGCToGCIncrementRecruitmentLevel.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -5774,19 +7503,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCIncrementRecruitmentLevel} CMsgGCToGCIncrementRecruitmentLevel */ - CMsgGCToGCIncrementRecruitmentLevel.fromObject = function fromObject(object) { + CMsgGCToGCIncrementRecruitmentLevel.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCIncrementRecruitmentLevel) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCIncrementRecruitmentLevel: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCToGCIncrementRecruitmentLevel(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -5799,21 +7534,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCToGCIncrementRecruitmentLevel.toObject = function toObject(message, options) { + CMsgGCToGCIncrementRecruitmentLevel.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -5824,8 +7565,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCToGCIncrementRecruitmentLevel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCToGCIncrementRecruitmentLevel.prototype.toJSON = function() { + return CMsgGCToGCIncrementRecruitmentLevel.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCToGCIncrementRecruitmentLevel + * @function getTypeUrl + * @memberof CMsgGCToGCIncrementRecruitmentLevel + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCToGCIncrementRecruitmentLevel.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCIncrementRecruitmentLevel"; }; return CMsgGCToGCIncrementRecruitmentLevel; @@ -5835,31 +7590,44 @@ /** * Properties of a CMsgSOCacheHaveVersion. - * @exports ICMsgSOCacheHaveVersion - * @interface ICMsgSOCacheHaveVersion - * @property {ICMsgSOIDOwner|null} [soid] CMsgSOCacheHaveVersion soid + * @typedef {Object} CMsgSOCacheHaveVersion.$Properties + * @property {CMsgSOIDOwner.$Properties|null} [soid] CMsgSOCacheHaveVersion soid * @property {number|Long|null} [version] CMsgSOCacheHaveVersion version * @property {number|null} [service_id] CMsgSOCacheHaveVersion service_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSOCacheHaveVersion. + * @exports ICMsgSOCacheHaveVersion + * @interface ICMsgSOCacheHaveVersion + * @augments CMsgSOCacheHaveVersion.$Properties + * @deprecated Use CMsgSOCacheHaveVersion.$Properties instead. + */ + + /** + * Shape of a CMsgSOCacheHaveVersion. + * @typedef {CMsgSOCacheHaveVersion.$Properties} CMsgSOCacheHaveVersion.$Shape */ /** * Constructs a new CMsgSOCacheHaveVersion. * @exports CMsgSOCacheHaveVersion * @classdesc Represents a CMsgSOCacheHaveVersion. - * @implements ICMsgSOCacheHaveVersion * @constructor - * @param {ICMsgSOCacheHaveVersion=} [properties] Properties to set + * @param {CMsgSOCacheHaveVersion.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSOCacheHaveVersion(properties) { + var CMsgSOCacheHaveVersion = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSOCacheHaveVersion soid. - * @member {ICMsgSOIDOwner|null|undefined} soid + * @member {CMsgSOIDOwner.$Properties|null|undefined} soid * @memberof CMsgSOCacheHaveVersion * @instance */ @@ -5871,7 +7639,7 @@ * @memberof CMsgSOCacheHaveVersion * @instance */ - CMsgSOCacheHaveVersion.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSOCacheHaveVersion.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSOCacheHaveVersion service_id. @@ -5886,10 +7654,14 @@ * @function create * @memberof CMsgSOCacheHaveVersion * @static - * @param {ICMsgSOCacheHaveVersion=} [properties] Properties to set + * @param {CMsgSOCacheHaveVersion.$Properties=} [properties] Properties to set * @returns {CMsgSOCacheHaveVersion} CMsgSOCacheHaveVersion instance + * @type {{ + * (properties: CMsgSOCacheHaveVersion.$Shape): CMsgSOCacheHaveVersion & CMsgSOCacheHaveVersion.$Shape; + * (properties?: CMsgSOCacheHaveVersion.$Properties): CMsgSOCacheHaveVersion; + * }} */ - CMsgSOCacheHaveVersion.create = function create(properties) { + CMsgSOCacheHaveVersion.create = function(properties) { return new CMsgSOCacheHaveVersion(properties); }; @@ -5898,19 +7670,26 @@ * @function encode * @memberof CMsgSOCacheHaveVersion * @static - * @param {ICMsgSOCacheHaveVersion} message CMsgSOCacheHaveVersion message or plain object to encode + * @param {CMsgSOCacheHaveVersion.$Properties} message CMsgSOCacheHaveVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheHaveVersion.encode = function encode(message, writer) { + CMsgSOCacheHaveVersion.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.soid != null && Object.hasOwnProperty.call(message, "soid")) - $root.CMsgSOIDOwner.encode(message.soid, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.soid != null && $Object.hasOwnProperty.call(message, "soid")) + $root.CMsgSOIDOwner.encode(message.soid, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.version); - if (message.service_id != null && Object.hasOwnProperty.call(message, "service_id")) + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.service_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5919,12 +7698,12 @@ * @function encodeDelimited * @memberof CMsgSOCacheHaveVersion * @static - * @param {ICMsgSOCacheHaveVersion} message CMsgSOCacheHaveVersion message or plain object to encode + * @param {CMsgSOCacheHaveVersion.$Properties} message CMsgSOCacheHaveVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSOCacheHaveVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSOCacheHaveVersion.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5934,31 +7713,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSOCacheHaveVersion} CMsgSOCacheHaveVersion + * @returns {CMsgSOCacheHaveVersion & CMsgSOCacheHaveVersion.$Shape} CMsgSOCacheHaveVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheHaveVersion.decode = function decode(reader, length) { + CMsgSOCacheHaveVersion.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSOCacheHaveVersion(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSOCacheHaveVersion(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32()); - break; - case 2: - message.version = reader.fixed64(); - break; - case 3: - message.service_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.soid = $root.CMsgSOIDOwner.decode(reader, reader.uint32(), $undefined, _depth + 1, message.soid); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.version = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.service_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5968,11 +7770,11 @@ * @memberof CMsgSOCacheHaveVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSOCacheHaveVersion} CMsgSOCacheHaveVersion + * @returns {CMsgSOCacheHaveVersion & CMsgSOCacheHaveVersion.$Shape} CMsgSOCacheHaveVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSOCacheHaveVersion.decodeDelimited = function decodeDelimited(reader) { + CMsgSOCacheHaveVersion.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5986,18 +7788,22 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSOCacheHaveVersion.verify = function verify(message) { + CMsgSOCacheHaveVersion.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.soid != null && message.hasOwnProperty("soid")) { - var error = $root.CMsgSOIDOwner.verify(message.soid); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.soid != null && $Object.hasOwnProperty.call(message, "soid")) { + var error = $root.CMsgSOIDOwner.verify(message.soid, _depth + 1); if (error) return "soid." + error; } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) return "version: integer|Long expected"; - if (message.service_id != null && message.hasOwnProperty("service_id")) + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) if (!$util.isInteger(message.service_id)) return "service_id: integer expected"; return null; @@ -6011,24 +7817,30 @@ * @param {Object.} object Plain object * @returns {CMsgSOCacheHaveVersion} CMsgSOCacheHaveVersion */ - CMsgSOCacheHaveVersion.fromObject = function fromObject(object) { + CMsgSOCacheHaveVersion.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSOCacheHaveVersion) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSOCacheHaveVersion: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSOCacheHaveVersion(); if (object.soid != null) { - if (typeof object.soid !== "object") - throw TypeError(".CMsgSOCacheHaveVersion.soid: object expected"); - message.soid = $root.CMsgSOIDOwner.fromObject(object.soid); + if (!$util.isObject(object.soid)) + throw $TypeError(".CMsgSOCacheHaveVersion.soid: object expected"); + message.soid = $root.CMsgSOIDOwner.fromObject(object.soid, _depth + 1); } if (object.version != null) if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = false; + message.version = $util.Long.fromValue(object.version, true); else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); + message.version = $parseInt(object.version, 10); else if (typeof object.version === "number") message.version = object.version; else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); if (object.service_id != null) message.service_id = object.service_id >>> 0; return message; @@ -6043,27 +7855,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSOCacheHaveVersion.toObject = function toObject(message, options) { + CMsgSOCacheHaveVersion.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.soid = null; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.version = options.longs === String ? "0" : 0; + object.version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.service_id = 0; } - if (message.soid != null && message.hasOwnProperty("soid")) - object.soid = $root.CMsgSOIDOwner.toObject(message.soid, options); - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; + if (message.soid != null && $Object.hasOwnProperty.call(message, "soid")) + object.soid = $root.CMsgSOIDOwner.toObject(message.soid, options, _depth + 1); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.version = typeof message.version === "number" ? $BigInt(message.version) : $util.Long.fromBits(message.version.low >>> 0, message.version.high >>> 0, true).toBigInt(); + else if (typeof message.version === "number") + object.version = options.longs === $String ? $String(message.version) : message.version; else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; - if (message.service_id != null && message.hasOwnProperty("service_id")) + object.version = options.longs === $String ? $util.Long.prototype.toString.call(message.version) : options.longs === $Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) object.service_id = message.service_id; return object; }; @@ -6075,8 +7893,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSOCacheHaveVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSOCacheHaveVersion.prototype.toJSON = function() { + return CMsgSOCacheHaveVersion.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSOCacheHaveVersion + * @function getTypeUrl + * @memberof CMsgSOCacheHaveVersion + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSOCacheHaveVersion.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSOCacheHaveVersion"; }; return CMsgSOCacheHaveVersion; @@ -6086,30 +7918,43 @@ /** * Properties of a CMsgConnectionStatus. - * @exports ICMsgConnectionStatus - * @interface ICMsgConnectionStatus + * @typedef {Object} CMsgConnectionStatus.$Properties * @property {GCConnectionStatus|null} [status] CMsgConnectionStatus status * @property {number|null} [client_session_need] CMsgConnectionStatus client_session_need * @property {number|null} [queue_position] CMsgConnectionStatus queue_position * @property {number|null} [queue_size] CMsgConnectionStatus queue_size * @property {number|null} [wait_seconds] CMsgConnectionStatus wait_seconds * @property {number|null} [estimated_wait_seconds_remaining] CMsgConnectionStatus estimated_wait_seconds_remaining + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgConnectionStatus. + * @exports ICMsgConnectionStatus + * @interface ICMsgConnectionStatus + * @augments CMsgConnectionStatus.$Properties + * @deprecated Use CMsgConnectionStatus.$Properties instead. + */ + + /** + * Shape of a CMsgConnectionStatus. + * @typedef {CMsgConnectionStatus.$Properties} CMsgConnectionStatus.$Shape */ /** * Constructs a new CMsgConnectionStatus. * @exports CMsgConnectionStatus * @classdesc Represents a CMsgConnectionStatus. - * @implements ICMsgConnectionStatus * @constructor - * @param {ICMsgConnectionStatus=} [properties] Properties to set + * @param {CMsgConnectionStatus.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgConnectionStatus(properties) { + var CMsgConnectionStatus = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgConnectionStatus status. @@ -6164,10 +8009,14 @@ * @function create * @memberof CMsgConnectionStatus * @static - * @param {ICMsgConnectionStatus=} [properties] Properties to set + * @param {CMsgConnectionStatus.$Properties=} [properties] Properties to set * @returns {CMsgConnectionStatus} CMsgConnectionStatus instance + * @type {{ + * (properties: CMsgConnectionStatus.$Shape): CMsgConnectionStatus & CMsgConnectionStatus.$Shape; + * (properties?: CMsgConnectionStatus.$Properties): CMsgConnectionStatus; + * }} */ - CMsgConnectionStatus.create = function create(properties) { + CMsgConnectionStatus.create = function(properties) { return new CMsgConnectionStatus(properties); }; @@ -6176,25 +8025,32 @@ * @function encode * @memberof CMsgConnectionStatus * @static - * @param {ICMsgConnectionStatus} message CMsgConnectionStatus message or plain object to encode + * @param {CMsgConnectionStatus.$Properties} message CMsgConnectionStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConnectionStatus.encode = function encode(message, writer) { + CMsgConnectionStatus.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status); - if (message.client_session_need != null && Object.hasOwnProperty.call(message, "client_session_need")) + if (message.client_session_need != null && $Object.hasOwnProperty.call(message, "client_session_need")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.client_session_need); - if (message.queue_position != null && Object.hasOwnProperty.call(message, "queue_position")) + if (message.queue_position != null && $Object.hasOwnProperty.call(message, "queue_position")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.queue_position); - if (message.queue_size != null && Object.hasOwnProperty.call(message, "queue_size")) + if (message.queue_size != null && $Object.hasOwnProperty.call(message, "queue_size")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.queue_size); - if (message.wait_seconds != null && Object.hasOwnProperty.call(message, "wait_seconds")) + if (message.wait_seconds != null && $Object.hasOwnProperty.call(message, "wait_seconds")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.wait_seconds); - if (message.estimated_wait_seconds_remaining != null && Object.hasOwnProperty.call(message, "estimated_wait_seconds_remaining")) + if (message.estimated_wait_seconds_remaining != null && $Object.hasOwnProperty.call(message, "estimated_wait_seconds_remaining")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.estimated_wait_seconds_remaining); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6203,12 +8059,12 @@ * @function encodeDelimited * @memberof CMsgConnectionStatus * @static - * @param {ICMsgConnectionStatus} message CMsgConnectionStatus message or plain object to encode + * @param {CMsgConnectionStatus.$Properties} message CMsgConnectionStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConnectionStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgConnectionStatus.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6218,40 +8074,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgConnectionStatus} CMsgConnectionStatus + * @returns {CMsgConnectionStatus & CMsgConnectionStatus.$Shape} CMsgConnectionStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConnectionStatus.decode = function decode(reader, length) { + CMsgConnectionStatus.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgConnectionStatus(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgConnectionStatus(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.int32(); - break; - case 2: - message.client_session_need = reader.uint32(); - break; - case 3: - message.queue_position = reader.int32(); - break; - case 4: - message.queue_size = reader.int32(); - break; - case 5: - message.wait_seconds = reader.int32(); - break; - case 6: - message.estimated_wait_seconds_remaining = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.GCConnectionStatus[value] !== $undefined) + message.status = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + message.client_session_need = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.queue_position = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.queue_size = reader.int32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.wait_seconds = reader.int32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.estimated_wait_seconds_remaining = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6261,11 +8155,11 @@ * @memberof CMsgConnectionStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgConnectionStatus} CMsgConnectionStatus + * @returns {CMsgConnectionStatus & CMsgConnectionStatus.$Shape} CMsgConnectionStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConnectionStatus.decodeDelimited = function decodeDelimited(reader) { + CMsgConnectionStatus.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6279,10 +8173,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgConnectionStatus.verify = function verify(message) { + CMsgConnectionStatus.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -6294,19 +8192,19 @@ case 5: break; } - if (message.client_session_need != null && message.hasOwnProperty("client_session_need")) + if (message.client_session_need != null && $Object.hasOwnProperty.call(message, "client_session_need")) if (!$util.isInteger(message.client_session_need)) return "client_session_need: integer expected"; - if (message.queue_position != null && message.hasOwnProperty("queue_position")) + if (message.queue_position != null && $Object.hasOwnProperty.call(message, "queue_position")) if (!$util.isInteger(message.queue_position)) return "queue_position: integer expected"; - if (message.queue_size != null && message.hasOwnProperty("queue_size")) + if (message.queue_size != null && $Object.hasOwnProperty.call(message, "queue_size")) if (!$util.isInteger(message.queue_size)) return "queue_size: integer expected"; - if (message.wait_seconds != null && message.hasOwnProperty("wait_seconds")) + if (message.wait_seconds != null && $Object.hasOwnProperty.call(message, "wait_seconds")) if (!$util.isInteger(message.wait_seconds)) return "wait_seconds: integer expected"; - if (message.estimated_wait_seconds_remaining != null && message.hasOwnProperty("estimated_wait_seconds_remaining")) + if (message.estimated_wait_seconds_remaining != null && $Object.hasOwnProperty.call(message, "estimated_wait_seconds_remaining")) if (!$util.isInteger(message.estimated_wait_seconds_remaining)) return "estimated_wait_seconds_remaining: integer expected"; return null; @@ -6320,9 +8218,15 @@ * @param {Object.} object Plain object * @returns {CMsgConnectionStatus} CMsgConnectionStatus */ - CMsgConnectionStatus.fromObject = function fromObject(object) { + CMsgConnectionStatus.fromObject = function (object, _depth) { if (object instanceof $root.CMsgConnectionStatus) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgConnectionStatus: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgConnectionStatus(); switch (object.status) { case "GCConnectionStatus_HAVE_SESSION": @@ -6349,6 +8253,7 @@ case 5: message.status = 5; break; + default: } if (object.client_session_need != null) message.client_session_need = object.client_session_need >>> 0; @@ -6372,29 +8277,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgConnectionStatus.toObject = function toObject(message, options) { + CMsgConnectionStatus.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.status = options.enums === String ? "GCConnectionStatus_HAVE_SESSION" : 0; + object.status = options.enums === $String ? "GCConnectionStatus_HAVE_SESSION" : 0; object.client_session_need = 0; object.queue_position = 0; object.queue_size = 0; object.wait_seconds = 0; object.estimated_wait_seconds_remaining = 0; } - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.GCConnectionStatus[message.status] : message.status; - if (message.client_session_need != null && message.hasOwnProperty("client_session_need")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + object.status = options.enums === $String ? $root.GCConnectionStatus[message.status] === $undefined ? message.status : $root.GCConnectionStatus[message.status] : message.status; + if (message.client_session_need != null && $Object.hasOwnProperty.call(message, "client_session_need")) object.client_session_need = message.client_session_need; - if (message.queue_position != null && message.hasOwnProperty("queue_position")) + if (message.queue_position != null && $Object.hasOwnProperty.call(message, "queue_position")) object.queue_position = message.queue_position; - if (message.queue_size != null && message.hasOwnProperty("queue_size")) + if (message.queue_size != null && $Object.hasOwnProperty.call(message, "queue_size")) object.queue_size = message.queue_size; - if (message.wait_seconds != null && message.hasOwnProperty("wait_seconds")) + if (message.wait_seconds != null && $Object.hasOwnProperty.call(message, "wait_seconds")) object.wait_seconds = message.wait_seconds; - if (message.estimated_wait_seconds_remaining != null && message.hasOwnProperty("estimated_wait_seconds_remaining")) + if (message.estimated_wait_seconds_remaining != null && $Object.hasOwnProperty.call(message, "estimated_wait_seconds_remaining")) object.estimated_wait_seconds_remaining = message.estimated_wait_seconds_remaining; return object; }; @@ -6406,8 +8315,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgConnectionStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgConnectionStatus.prototype.toJSON = function() { + return CMsgConnectionStatus.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgConnectionStatus + * @function getTypeUrl + * @memberof CMsgConnectionStatus + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgConnectionStatus.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgConnectionStatus"; }; return CMsgConnectionStatus; @@ -6417,29 +8340,42 @@ /** * Properties of a CMsgGCToGCSOCacheSubscribe. - * @exports ICMsgGCToGCSOCacheSubscribe - * @interface ICMsgGCToGCSOCacheSubscribe + * @typedef {Object} CMsgGCToGCSOCacheSubscribe.$Properties * @property {number|Long|null} [subscriber] CMsgGCToGCSOCacheSubscribe subscriber * @property {number|Long|null} [subscribe_to] CMsgGCToGCSOCacheSubscribe subscribe_to * @property {number|Long|null} [sync_version] CMsgGCToGCSOCacheSubscribe sync_version - * @property {Array.|null} [have_versions] CMsgGCToGCSOCacheSubscribe have_versions + * @property {Array.|null} [have_versions] CMsgGCToGCSOCacheSubscribe have_versions + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCToGCSOCacheSubscribe. + * @exports ICMsgGCToGCSOCacheSubscribe + * @interface ICMsgGCToGCSOCacheSubscribe + * @augments CMsgGCToGCSOCacheSubscribe.$Properties + * @deprecated Use CMsgGCToGCSOCacheSubscribe.$Properties instead. + */ + + /** + * Shape of a CMsgGCToGCSOCacheSubscribe. + * @typedef {CMsgGCToGCSOCacheSubscribe.$Properties} CMsgGCToGCSOCacheSubscribe.$Shape */ /** * Constructs a new CMsgGCToGCSOCacheSubscribe. * @exports CMsgGCToGCSOCacheSubscribe * @classdesc Represents a CMsgGCToGCSOCacheSubscribe. - * @implements ICMsgGCToGCSOCacheSubscribe * @constructor - * @param {ICMsgGCToGCSOCacheSubscribe=} [properties] Properties to set + * @param {CMsgGCToGCSOCacheSubscribe.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCToGCSOCacheSubscribe(properties) { + var CMsgGCToGCSOCacheSubscribe = function (properties) { this.have_versions = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCToGCSOCacheSubscribe subscriber. @@ -6447,7 +8383,7 @@ * @memberof CMsgGCToGCSOCacheSubscribe * @instance */ - CMsgGCToGCSOCacheSubscribe.prototype.subscriber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCToGCSOCacheSubscribe.prototype.subscriber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCToGCSOCacheSubscribe subscribe_to. @@ -6455,7 +8391,7 @@ * @memberof CMsgGCToGCSOCacheSubscribe * @instance */ - CMsgGCToGCSOCacheSubscribe.prototype.subscribe_to = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCToGCSOCacheSubscribe.prototype.subscribe_to = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCToGCSOCacheSubscribe sync_version. @@ -6463,11 +8399,11 @@ * @memberof CMsgGCToGCSOCacheSubscribe * @instance */ - CMsgGCToGCSOCacheSubscribe.prototype.sync_version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCToGCSOCacheSubscribe.prototype.sync_version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCToGCSOCacheSubscribe have_versions. - * @member {Array.} have_versions + * @member {Array.} have_versions * @memberof CMsgGCToGCSOCacheSubscribe * @instance */ @@ -6478,10 +8414,14 @@ * @function create * @memberof CMsgGCToGCSOCacheSubscribe * @static - * @param {ICMsgGCToGCSOCacheSubscribe=} [properties] Properties to set + * @param {CMsgGCToGCSOCacheSubscribe.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCSOCacheSubscribe} CMsgGCToGCSOCacheSubscribe instance + * @type {{ + * (properties: CMsgGCToGCSOCacheSubscribe.$Shape): CMsgGCToGCSOCacheSubscribe & CMsgGCToGCSOCacheSubscribe.$Shape; + * (properties?: CMsgGCToGCSOCacheSubscribe.$Properties): CMsgGCToGCSOCacheSubscribe; + * }} */ - CMsgGCToGCSOCacheSubscribe.create = function create(properties) { + CMsgGCToGCSOCacheSubscribe.create = function(properties) { return new CMsgGCToGCSOCacheSubscribe(properties); }; @@ -6490,22 +8430,29 @@ * @function encode * @memberof CMsgGCToGCSOCacheSubscribe * @static - * @param {ICMsgGCToGCSOCacheSubscribe} message CMsgGCToGCSOCacheSubscribe message or plain object to encode + * @param {CMsgGCToGCSOCacheSubscribe.$Properties} message CMsgGCToGCSOCacheSubscribe message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCSOCacheSubscribe.encode = function encode(message, writer) { + CMsgGCToGCSOCacheSubscribe.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.subscriber != null && Object.hasOwnProperty.call(message, "subscriber")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.subscriber != null && $Object.hasOwnProperty.call(message, "subscriber")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.subscriber); - if (message.subscribe_to != null && Object.hasOwnProperty.call(message, "subscribe_to")) + if (message.subscribe_to != null && $Object.hasOwnProperty.call(message, "subscribe_to")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.subscribe_to); - if (message.sync_version != null && Object.hasOwnProperty.call(message, "sync_version")) + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.sync_version); if (message.have_versions != null && message.have_versions.length) for (var i = 0; i < message.have_versions.length; ++i) - $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.encode(message.have_versions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.encode(message.have_versions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6514,12 +8461,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCSOCacheSubscribe * @static - * @param {ICMsgGCToGCSOCacheSubscribe} message CMsgGCToGCSOCacheSubscribe message or plain object to encode + * @param {CMsgGCToGCSOCacheSubscribe.$Properties} message CMsgGCToGCSOCacheSubscribe message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCSOCacheSubscribe.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCToGCSOCacheSubscribe.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6529,36 +8476,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCSOCacheSubscribe} CMsgGCToGCSOCacheSubscribe + * @returns {CMsgGCToGCSOCacheSubscribe & CMsgGCToGCSOCacheSubscribe.$Shape} CMsgGCToGCSOCacheSubscribe * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCSOCacheSubscribe.decode = function decode(reader, length) { + CMsgGCToGCSOCacheSubscribe.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCSOCacheSubscribe(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCSOCacheSubscribe(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.subscriber = reader.fixed64(); - break; - case 2: - message.subscribe_to = reader.fixed64(); - break; - case 3: - message.sync_version = reader.fixed64(); - break; - case 4: - if (!(message.have_versions && message.have_versions.length)) - message.have_versions = []; - message.have_versions.push($root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.subscriber = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.subscribe_to = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.sync_version = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.have_versions && message.have_versions.length)) + message.have_versions = []; + message.have_versions.push($root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6568,11 +8541,11 @@ * @memberof CMsgGCToGCSOCacheSubscribe * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCSOCacheSubscribe} CMsgGCToGCSOCacheSubscribe + * @returns {CMsgGCToGCSOCacheSubscribe & CMsgGCToGCSOCacheSubscribe.$Shape} CMsgGCToGCSOCacheSubscribe * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCSOCacheSubscribe.decodeDelimited = function decodeDelimited(reader) { + CMsgGCToGCSOCacheSubscribe.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6586,23 +8559,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCToGCSOCacheSubscribe.verify = function verify(message) { + CMsgGCToGCSOCacheSubscribe.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.subscriber != null && message.hasOwnProperty("subscriber")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.subscriber != null && $Object.hasOwnProperty.call(message, "subscriber")) if (!$util.isInteger(message.subscriber) && !(message.subscriber && $util.isInteger(message.subscriber.low) && $util.isInteger(message.subscriber.high))) return "subscriber: integer|Long expected"; - if (message.subscribe_to != null && message.hasOwnProperty("subscribe_to")) + if (message.subscribe_to != null && $Object.hasOwnProperty.call(message, "subscribe_to")) if (!$util.isInteger(message.subscribe_to) && !(message.subscribe_to && $util.isInteger(message.subscribe_to.low) && $util.isInteger(message.subscribe_to.high))) return "subscribe_to: integer|Long expected"; - if (message.sync_version != null && message.hasOwnProperty("sync_version")) + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) if (!$util.isInteger(message.sync_version) && !(message.sync_version && $util.isInteger(message.sync_version.low) && $util.isInteger(message.sync_version.high))) return "sync_version: integer|Long expected"; - if (message.have_versions != null && message.hasOwnProperty("have_versions")) { - if (!Array.isArray(message.have_versions)) + if (message.have_versions != null && $Object.hasOwnProperty.call(message, "have_versions")) { + if (!$Array.isArray(message.have_versions)) return "have_versions: array expected"; for (var i = 0; i < message.have_versions.length; ++i) { - var error = $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.verify(message.have_versions[i]); + var error = $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.verify(message.have_versions[i], _depth + 1); if (error) return "have_versions." + error; } @@ -6618,45 +8595,51 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCSOCacheSubscribe} CMsgGCToGCSOCacheSubscribe */ - CMsgGCToGCSOCacheSubscribe.fromObject = function fromObject(object) { + CMsgGCToGCSOCacheSubscribe.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCSOCacheSubscribe) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCSOCacheSubscribe: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCToGCSOCacheSubscribe(); if (object.subscriber != null) if ($util.Long) - (message.subscriber = $util.Long.fromValue(object.subscriber)).unsigned = false; + message.subscriber = $util.Long.fromValue(object.subscriber, true); else if (typeof object.subscriber === "string") - message.subscriber = parseInt(object.subscriber, 10); + message.subscriber = $parseInt(object.subscriber, 10); else if (typeof object.subscriber === "number") message.subscriber = object.subscriber; else if (typeof object.subscriber === "object") - message.subscriber = new $util.LongBits(object.subscriber.low >>> 0, object.subscriber.high >>> 0).toNumber(); + message.subscriber = new $util.LongBits(object.subscriber.low >>> 0, object.subscriber.high >>> 0).toNumber(true); if (object.subscribe_to != null) if ($util.Long) - (message.subscribe_to = $util.Long.fromValue(object.subscribe_to)).unsigned = false; + message.subscribe_to = $util.Long.fromValue(object.subscribe_to, true); else if (typeof object.subscribe_to === "string") - message.subscribe_to = parseInt(object.subscribe_to, 10); + message.subscribe_to = $parseInt(object.subscribe_to, 10); else if (typeof object.subscribe_to === "number") message.subscribe_to = object.subscribe_to; else if (typeof object.subscribe_to === "object") - message.subscribe_to = new $util.LongBits(object.subscribe_to.low >>> 0, object.subscribe_to.high >>> 0).toNumber(); + message.subscribe_to = new $util.LongBits(object.subscribe_to.low >>> 0, object.subscribe_to.high >>> 0).toNumber(true); if (object.sync_version != null) if ($util.Long) - (message.sync_version = $util.Long.fromValue(object.sync_version)).unsigned = false; + message.sync_version = $util.Long.fromValue(object.sync_version, true); else if (typeof object.sync_version === "string") - message.sync_version = parseInt(object.sync_version, 10); + message.sync_version = $parseInt(object.sync_version, 10); else if (typeof object.sync_version === "number") message.sync_version = object.sync_version; else if (typeof object.sync_version === "object") - message.sync_version = new $util.LongBits(object.sync_version.low >>> 0, object.sync_version.high >>> 0).toNumber(); + message.sync_version = new $util.LongBits(object.sync_version.low >>> 0, object.sync_version.high >>> 0).toNumber(true); if (object.have_versions) { - if (!Array.isArray(object.have_versions)) - throw TypeError(".CMsgGCToGCSOCacheSubscribe.have_versions: array expected"); - message.have_versions = []; + if (!$Array.isArray(object.have_versions)) + throw $TypeError(".CMsgGCToGCSOCacheSubscribe.have_versions: array expected"); + message.have_versions = $Array(object.have_versions.length); for (var i = 0; i < object.have_versions.length; ++i) { - if (typeof object.have_versions[i] !== "object") - throw TypeError(".CMsgGCToGCSOCacheSubscribe.have_versions: object expected"); - message.have_versions[i] = $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.fromObject(object.have_versions[i]); + if (!$util.isObject(object.have_versions[i])) + throw $TypeError(".CMsgGCToGCSOCacheSubscribe.have_versions: object expected"); + message.have_versions[i] = $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.fromObject(object.have_versions[i], _depth + 1); } } return message; @@ -6671,48 +8654,58 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCToGCSOCacheSubscribe.toObject = function toObject(message, options) { + CMsgGCToGCSOCacheSubscribe.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.have_versions = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.subscriber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.subscriber = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.subscriber = options.longs === String ? "0" : 0; + object.subscriber = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.subscribe_to = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.subscribe_to = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.subscribe_to = options.longs === String ? "0" : 0; + object.subscribe_to = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sync_version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.sync_version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.sync_version = options.longs === String ? "0" : 0; + object.sync_version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.subscriber != null && message.hasOwnProperty("subscriber")) - if (typeof message.subscriber === "number") - object.subscriber = options.longs === String ? String(message.subscriber) : message.subscriber; + if (message.subscriber != null && $Object.hasOwnProperty.call(message, "subscriber")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.subscriber = typeof message.subscriber === "number" ? $BigInt(message.subscriber) : $util.Long.fromBits(message.subscriber.low >>> 0, message.subscriber.high >>> 0, true).toBigInt(); + else if (typeof message.subscriber === "number") + object.subscriber = options.longs === $String ? $String(message.subscriber) : message.subscriber; else - object.subscriber = options.longs === String ? $util.Long.prototype.toString.call(message.subscriber) : options.longs === Number ? new $util.LongBits(message.subscriber.low >>> 0, message.subscriber.high >>> 0).toNumber() : message.subscriber; - if (message.subscribe_to != null && message.hasOwnProperty("subscribe_to")) - if (typeof message.subscribe_to === "number") - object.subscribe_to = options.longs === String ? String(message.subscribe_to) : message.subscribe_to; + object.subscriber = options.longs === $String ? $util.Long.prototype.toString.call(message.subscriber) : options.longs === $Number ? new $util.LongBits(message.subscriber.low >>> 0, message.subscriber.high >>> 0).toNumber(true) : message.subscriber; + if (message.subscribe_to != null && $Object.hasOwnProperty.call(message, "subscribe_to")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.subscribe_to = typeof message.subscribe_to === "number" ? $BigInt(message.subscribe_to) : $util.Long.fromBits(message.subscribe_to.low >>> 0, message.subscribe_to.high >>> 0, true).toBigInt(); + else if (typeof message.subscribe_to === "number") + object.subscribe_to = options.longs === $String ? $String(message.subscribe_to) : message.subscribe_to; else - object.subscribe_to = options.longs === String ? $util.Long.prototype.toString.call(message.subscribe_to) : options.longs === Number ? new $util.LongBits(message.subscribe_to.low >>> 0, message.subscribe_to.high >>> 0).toNumber() : message.subscribe_to; - if (message.sync_version != null && message.hasOwnProperty("sync_version")) - if (typeof message.sync_version === "number") - object.sync_version = options.longs === String ? String(message.sync_version) : message.sync_version; + object.subscribe_to = options.longs === $String ? $util.Long.prototype.toString.call(message.subscribe_to) : options.longs === $Number ? new $util.LongBits(message.subscribe_to.low >>> 0, message.subscribe_to.high >>> 0).toNumber(true) : message.subscribe_to; + if (message.sync_version != null && $Object.hasOwnProperty.call(message, "sync_version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.sync_version = typeof message.sync_version === "number" ? $BigInt(message.sync_version) : $util.Long.fromBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0, true).toBigInt(); + else if (typeof message.sync_version === "number") + object.sync_version = options.longs === $String ? $String(message.sync_version) : message.sync_version; else - object.sync_version = options.longs === String ? $util.Long.prototype.toString.call(message.sync_version) : options.longs === Number ? new $util.LongBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0).toNumber() : message.sync_version; + object.sync_version = options.longs === $String ? $util.Long.prototype.toString.call(message.sync_version) : options.longs === $Number ? new $util.LongBits(message.sync_version.low >>> 0, message.sync_version.high >>> 0).toNumber(true) : message.sync_version; if (message.have_versions && message.have_versions.length) { - object.have_versions = []; + object.have_versions = $Array(message.have_versions.length); for (var j = 0; j < message.have_versions.length; ++j) - object.have_versions[j] = $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.toObject(message.have_versions[j], options); + object.have_versions[j] = $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.toObject(message.have_versions[j], options, _depth + 1); } return object; }; @@ -6724,34 +8717,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCToGCSOCacheSubscribe.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCToGCSOCacheSubscribe.prototype.toJSON = function() { + return CMsgGCToGCSOCacheSubscribe.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCToGCSOCacheSubscribe + * @function getTypeUrl + * @memberof CMsgGCToGCSOCacheSubscribe + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCToGCSOCacheSubscribe.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCSOCacheSubscribe"; }; CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions = (function() { /** * Properties of a CMsgHaveVersions. - * @memberof CMsgGCToGCSOCacheSubscribe - * @interface ICMsgHaveVersions + * @typedef {Object} CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Properties * @property {number|null} [service_id] CMsgHaveVersions service_id * @property {number|Long|null} [version] CMsgHaveVersions version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHaveVersions. + * @memberof CMsgGCToGCSOCacheSubscribe + * @interface ICMsgHaveVersions + * @augments CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Properties + * @deprecated Use CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Properties instead. + */ + + /** + * Shape of a CMsgHaveVersions. + * @typedef {CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Properties} CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Shape */ /** * Constructs a new CMsgHaveVersions. * @memberof CMsgGCToGCSOCacheSubscribe * @classdesc Represents a CMsgHaveVersions. - * @implements ICMsgHaveVersions * @constructor - * @param {CMsgGCToGCSOCacheSubscribe.ICMsgHaveVersions=} [properties] Properties to set + * @param {CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHaveVersions(properties) { + var CMsgHaveVersions = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHaveVersions service_id. @@ -6774,10 +8794,14 @@ * @function create * @memberof CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions * @static - * @param {CMsgGCToGCSOCacheSubscribe.ICMsgHaveVersions=} [properties] Properties to set + * @param {CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions} CMsgHaveVersions instance + * @type {{ + * (properties: CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Shape): CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions & CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Shape; + * (properties?: CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Properties): CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions; + * }} */ - CMsgHaveVersions.create = function create(properties) { + CMsgHaveVersions.create = function(properties) { return new CMsgHaveVersions(properties); }; @@ -6786,17 +8810,24 @@ * @function encode * @memberof CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions * @static - * @param {CMsgGCToGCSOCacheSubscribe.ICMsgHaveVersions} message CMsgHaveVersions message or plain object to encode + * @param {CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Properties} message CMsgHaveVersions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHaveVersions.encode = function encode(message, writer) { + CMsgHaveVersions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.service_id != null && Object.hasOwnProperty.call(message, "service_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.service_id); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6805,12 +8836,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions * @static - * @param {CMsgGCToGCSOCacheSubscribe.ICMsgHaveVersions} message CMsgHaveVersions message or plain object to encode + * @param {CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Properties} message CMsgHaveVersions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHaveVersions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHaveVersions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6820,28 +8851,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions} CMsgHaveVersions + * @returns {CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions & CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Shape} CMsgHaveVersions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHaveVersions.decode = function decode(reader, length) { + CMsgHaveVersions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.service_id = reader.uint32(); - break; - case 2: - message.version = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.service_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.version = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6851,11 +8902,11 @@ * @memberof CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions} CMsgHaveVersions + * @returns {CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions & CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions.$Shape} CMsgHaveVersions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHaveVersions.decodeDelimited = function decodeDelimited(reader) { + CMsgHaveVersions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6869,13 +8920,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHaveVersions.verify = function verify(message) { + CMsgHaveVersions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.service_id != null && message.hasOwnProperty("service_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) if (!$util.isInteger(message.service_id)) return "service_id: integer expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) return "version: integer|Long expected"; return null; @@ -6889,17 +8944,23 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions} CMsgHaveVersions */ - CMsgHaveVersions.fromObject = function fromObject(object) { + CMsgHaveVersions.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions(); if (object.service_id != null) message.service_id = object.service_id >>> 0; if (object.version != null) if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = true; + message.version = $util.Long.fromValue(object.version, true); else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); + message.version = $parseInt(object.version, 10); else if (typeof object.version === "number") message.version = object.version; else if (typeof object.version === "object") @@ -6916,25 +8977,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHaveVersions.toObject = function toObject(message, options) { + CMsgHaveVersions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.service_id = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.version = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.version = options.longs === String ? "0" : 0; + object.version = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.service_id != null && message.hasOwnProperty("service_id")) + if (message.service_id != null && $Object.hasOwnProperty.call(message, "service_id")) object.service_id = message.service_id; - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.version = typeof message.version === "number" ? $BigInt(message.version) : $util.Long.fromBits(message.version.low >>> 0, message.version.high >>> 0, true).toBigInt(); + else if (typeof message.version === "number") + object.version = options.longs === $String ? $String(message.version) : message.version; else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; + object.version = options.longs === $String ? $util.Long.prototype.toString.call(message.version) : options.longs === $Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; return object; }; @@ -6945,8 +9012,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgHaveVersions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHaveVersions.prototype.toJSON = function() { + return CMsgHaveVersions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHaveVersions + * @function getTypeUrl + * @memberof CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHaveVersions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCSOCacheSubscribe.CMsgHaveVersions"; }; return CMsgHaveVersions; @@ -6959,26 +9040,39 @@ /** * Properties of a CMsgGCToGCSOCacheUnsubscribe. - * @exports ICMsgGCToGCSOCacheUnsubscribe - * @interface ICMsgGCToGCSOCacheUnsubscribe + * @typedef {Object} CMsgGCToGCSOCacheUnsubscribe.$Properties * @property {number|Long|null} [subscriber] CMsgGCToGCSOCacheUnsubscribe subscriber * @property {number|Long|null} [unsubscribe_from] CMsgGCToGCSOCacheUnsubscribe unsubscribe_from + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCToGCSOCacheUnsubscribe. + * @exports ICMsgGCToGCSOCacheUnsubscribe + * @interface ICMsgGCToGCSOCacheUnsubscribe + * @augments CMsgGCToGCSOCacheUnsubscribe.$Properties + * @deprecated Use CMsgGCToGCSOCacheUnsubscribe.$Properties instead. + */ + + /** + * Shape of a CMsgGCToGCSOCacheUnsubscribe. + * @typedef {CMsgGCToGCSOCacheUnsubscribe.$Properties} CMsgGCToGCSOCacheUnsubscribe.$Shape */ /** * Constructs a new CMsgGCToGCSOCacheUnsubscribe. * @exports CMsgGCToGCSOCacheUnsubscribe * @classdesc Represents a CMsgGCToGCSOCacheUnsubscribe. - * @implements ICMsgGCToGCSOCacheUnsubscribe * @constructor - * @param {ICMsgGCToGCSOCacheUnsubscribe=} [properties] Properties to set + * @param {CMsgGCToGCSOCacheUnsubscribe.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCToGCSOCacheUnsubscribe(properties) { + var CMsgGCToGCSOCacheUnsubscribe = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCToGCSOCacheUnsubscribe subscriber. @@ -6986,7 +9080,7 @@ * @memberof CMsgGCToGCSOCacheUnsubscribe * @instance */ - CMsgGCToGCSOCacheUnsubscribe.prototype.subscriber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCToGCSOCacheUnsubscribe.prototype.subscriber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCToGCSOCacheUnsubscribe unsubscribe_from. @@ -6994,17 +9088,21 @@ * @memberof CMsgGCToGCSOCacheUnsubscribe * @instance */ - CMsgGCToGCSOCacheUnsubscribe.prototype.unsubscribe_from = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCToGCSOCacheUnsubscribe.prototype.unsubscribe_from = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCToGCSOCacheUnsubscribe instance using the specified properties. * @function create * @memberof CMsgGCToGCSOCacheUnsubscribe * @static - * @param {ICMsgGCToGCSOCacheUnsubscribe=} [properties] Properties to set + * @param {CMsgGCToGCSOCacheUnsubscribe.$Properties=} [properties] Properties to set * @returns {CMsgGCToGCSOCacheUnsubscribe} CMsgGCToGCSOCacheUnsubscribe instance + * @type {{ + * (properties: CMsgGCToGCSOCacheUnsubscribe.$Shape): CMsgGCToGCSOCacheUnsubscribe & CMsgGCToGCSOCacheUnsubscribe.$Shape; + * (properties?: CMsgGCToGCSOCacheUnsubscribe.$Properties): CMsgGCToGCSOCacheUnsubscribe; + * }} */ - CMsgGCToGCSOCacheUnsubscribe.create = function create(properties) { + CMsgGCToGCSOCacheUnsubscribe.create = function(properties) { return new CMsgGCToGCSOCacheUnsubscribe(properties); }; @@ -7013,17 +9111,24 @@ * @function encode * @memberof CMsgGCToGCSOCacheUnsubscribe * @static - * @param {ICMsgGCToGCSOCacheUnsubscribe} message CMsgGCToGCSOCacheUnsubscribe message or plain object to encode + * @param {CMsgGCToGCSOCacheUnsubscribe.$Properties} message CMsgGCToGCSOCacheUnsubscribe message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCSOCacheUnsubscribe.encode = function encode(message, writer) { + CMsgGCToGCSOCacheUnsubscribe.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.subscriber != null && Object.hasOwnProperty.call(message, "subscriber")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.subscriber != null && $Object.hasOwnProperty.call(message, "subscriber")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.subscriber); - if (message.unsubscribe_from != null && Object.hasOwnProperty.call(message, "unsubscribe_from")) + if (message.unsubscribe_from != null && $Object.hasOwnProperty.call(message, "unsubscribe_from")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.unsubscribe_from); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7032,12 +9137,12 @@ * @function encodeDelimited * @memberof CMsgGCToGCSOCacheUnsubscribe * @static - * @param {ICMsgGCToGCSOCacheUnsubscribe} message CMsgGCToGCSOCacheUnsubscribe message or plain object to encode + * @param {CMsgGCToGCSOCacheUnsubscribe.$Properties} message CMsgGCToGCSOCacheUnsubscribe message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCToGCSOCacheUnsubscribe.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCToGCSOCacheUnsubscribe.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7047,28 +9152,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCToGCSOCacheUnsubscribe} CMsgGCToGCSOCacheUnsubscribe + * @returns {CMsgGCToGCSOCacheUnsubscribe & CMsgGCToGCSOCacheUnsubscribe.$Shape} CMsgGCToGCSOCacheUnsubscribe * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCSOCacheUnsubscribe.decode = function decode(reader, length) { + CMsgGCToGCSOCacheUnsubscribe.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCToGCSOCacheUnsubscribe(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCToGCSOCacheUnsubscribe(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.subscriber = reader.fixed64(); - break; - case 2: - message.unsubscribe_from = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.subscriber = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.unsubscribe_from = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7078,11 +9203,11 @@ * @memberof CMsgGCToGCSOCacheUnsubscribe * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCToGCSOCacheUnsubscribe} CMsgGCToGCSOCacheUnsubscribe + * @returns {CMsgGCToGCSOCacheUnsubscribe & CMsgGCToGCSOCacheUnsubscribe.$Shape} CMsgGCToGCSOCacheUnsubscribe * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCToGCSOCacheUnsubscribe.decodeDelimited = function decodeDelimited(reader) { + CMsgGCToGCSOCacheUnsubscribe.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7096,13 +9221,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCToGCSOCacheUnsubscribe.verify = function verify(message) { + CMsgGCToGCSOCacheUnsubscribe.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.subscriber != null && message.hasOwnProperty("subscriber")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.subscriber != null && $Object.hasOwnProperty.call(message, "subscriber")) if (!$util.isInteger(message.subscriber) && !(message.subscriber && $util.isInteger(message.subscriber.low) && $util.isInteger(message.subscriber.high))) return "subscriber: integer|Long expected"; - if (message.unsubscribe_from != null && message.hasOwnProperty("unsubscribe_from")) + if (message.unsubscribe_from != null && $Object.hasOwnProperty.call(message, "unsubscribe_from")) if (!$util.isInteger(message.unsubscribe_from) && !(message.unsubscribe_from && $util.isInteger(message.unsubscribe_from.low) && $util.isInteger(message.unsubscribe_from.high))) return "unsubscribe_from: integer|Long expected"; return null; @@ -7116,28 +9245,34 @@ * @param {Object.} object Plain object * @returns {CMsgGCToGCSOCacheUnsubscribe} CMsgGCToGCSOCacheUnsubscribe */ - CMsgGCToGCSOCacheUnsubscribe.fromObject = function fromObject(object) { + CMsgGCToGCSOCacheUnsubscribe.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCToGCSOCacheUnsubscribe) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCToGCSOCacheUnsubscribe: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCToGCSOCacheUnsubscribe(); if (object.subscriber != null) if ($util.Long) - (message.subscriber = $util.Long.fromValue(object.subscriber)).unsigned = false; + message.subscriber = $util.Long.fromValue(object.subscriber, true); else if (typeof object.subscriber === "string") - message.subscriber = parseInt(object.subscriber, 10); + message.subscriber = $parseInt(object.subscriber, 10); else if (typeof object.subscriber === "number") message.subscriber = object.subscriber; else if (typeof object.subscriber === "object") - message.subscriber = new $util.LongBits(object.subscriber.low >>> 0, object.subscriber.high >>> 0).toNumber(); + message.subscriber = new $util.LongBits(object.subscriber.low >>> 0, object.subscriber.high >>> 0).toNumber(true); if (object.unsubscribe_from != null) if ($util.Long) - (message.unsubscribe_from = $util.Long.fromValue(object.unsubscribe_from)).unsigned = false; + message.unsubscribe_from = $util.Long.fromValue(object.unsubscribe_from, true); else if (typeof object.unsubscribe_from === "string") - message.unsubscribe_from = parseInt(object.unsubscribe_from, 10); + message.unsubscribe_from = $parseInt(object.unsubscribe_from, 10); else if (typeof object.unsubscribe_from === "number") message.unsubscribe_from = object.unsubscribe_from; else if (typeof object.unsubscribe_from === "object") - message.unsubscribe_from = new $util.LongBits(object.unsubscribe_from.low >>> 0, object.unsubscribe_from.high >>> 0).toNumber(); + message.unsubscribe_from = new $util.LongBits(object.unsubscribe_from.low >>> 0, object.unsubscribe_from.high >>> 0).toNumber(true); return message; }; @@ -7150,32 +9285,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCToGCSOCacheUnsubscribe.toObject = function toObject(message, options) { + CMsgGCToGCSOCacheUnsubscribe.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.subscriber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.subscriber = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.subscriber = options.longs === String ? "0" : 0; + object.subscriber = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.unsubscribe_from = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.unsubscribe_from = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.unsubscribe_from = options.longs === String ? "0" : 0; + object.unsubscribe_from = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.subscriber != null && message.hasOwnProperty("subscriber")) - if (typeof message.subscriber === "number") - object.subscriber = options.longs === String ? String(message.subscriber) : message.subscriber; + if (message.subscriber != null && $Object.hasOwnProperty.call(message, "subscriber")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.subscriber = typeof message.subscriber === "number" ? $BigInt(message.subscriber) : $util.Long.fromBits(message.subscriber.low >>> 0, message.subscriber.high >>> 0, true).toBigInt(); + else if (typeof message.subscriber === "number") + object.subscriber = options.longs === $String ? $String(message.subscriber) : message.subscriber; else - object.subscriber = options.longs === String ? $util.Long.prototype.toString.call(message.subscriber) : options.longs === Number ? new $util.LongBits(message.subscriber.low >>> 0, message.subscriber.high >>> 0).toNumber() : message.subscriber; - if (message.unsubscribe_from != null && message.hasOwnProperty("unsubscribe_from")) - if (typeof message.unsubscribe_from === "number") - object.unsubscribe_from = options.longs === String ? String(message.unsubscribe_from) : message.unsubscribe_from; + object.subscriber = options.longs === $String ? $util.Long.prototype.toString.call(message.subscriber) : options.longs === $Number ? new $util.LongBits(message.subscriber.low >>> 0, message.subscriber.high >>> 0).toNumber(true) : message.subscriber; + if (message.unsubscribe_from != null && $Object.hasOwnProperty.call(message, "unsubscribe_from")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.unsubscribe_from = typeof message.unsubscribe_from === "number" ? $BigInt(message.unsubscribe_from) : $util.Long.fromBits(message.unsubscribe_from.low >>> 0, message.unsubscribe_from.high >>> 0, true).toBigInt(); + else if (typeof message.unsubscribe_from === "number") + object.unsubscribe_from = options.longs === $String ? $String(message.unsubscribe_from) : message.unsubscribe_from; else - object.unsubscribe_from = options.longs === String ? $util.Long.prototype.toString.call(message.unsubscribe_from) : options.longs === Number ? new $util.LongBits(message.unsubscribe_from.low >>> 0, message.unsubscribe_from.high >>> 0).toNumber() : message.unsubscribe_from; + object.unsubscribe_from = options.longs === $String ? $util.Long.prototype.toString.call(message.unsubscribe_from) : options.longs === $Number ? new $util.LongBits(message.unsubscribe_from.low >>> 0, message.unsubscribe_from.high >>> 0).toNumber(true) : message.unsubscribe_from; return object; }; @@ -7186,8 +9329,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCToGCSOCacheUnsubscribe.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCToGCSOCacheUnsubscribe.prototype.toJSON = function() { + return CMsgGCToGCSOCacheUnsubscribe.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCToGCSOCacheUnsubscribe + * @function getTypeUrl + * @memberof CMsgGCToGCSOCacheUnsubscribe + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCToGCSOCacheUnsubscribe.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCToGCSOCacheUnsubscribe"; }; return CMsgGCToGCSOCacheUnsubscribe; @@ -7195,36 +9352,53 @@ $root.CMsgGCClientPing = (function() { + /** + * Properties of a CMsgGCClientPing. + * @typedef {Object} CMsgGCClientPing.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCClientPing. * @exports ICMsgGCClientPing * @interface ICMsgGCClientPing + * @augments CMsgGCClientPing.$Properties + * @deprecated Use CMsgGCClientPing.$Properties instead. + */ + + /** + * Shape of a CMsgGCClientPing. + * @typedef {CMsgGCClientPing.$Properties} CMsgGCClientPing.$Shape */ /** * Constructs a new CMsgGCClientPing. * @exports CMsgGCClientPing * @classdesc Represents a CMsgGCClientPing. - * @implements ICMsgGCClientPing * @constructor - * @param {ICMsgGCClientPing=} [properties] Properties to set + * @param {CMsgGCClientPing.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCClientPing(properties) { + var CMsgGCClientPing = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgGCClientPing instance using the specified properties. * @function create * @memberof CMsgGCClientPing * @static - * @param {ICMsgGCClientPing=} [properties] Properties to set + * @param {CMsgGCClientPing.$Properties=} [properties] Properties to set * @returns {CMsgGCClientPing} CMsgGCClientPing instance + * @type {{ + * (properties: CMsgGCClientPing.$Shape): CMsgGCClientPing & CMsgGCClientPing.$Shape; + * (properties?: CMsgGCClientPing.$Properties): CMsgGCClientPing; + * }} */ - CMsgGCClientPing.create = function create(properties) { + CMsgGCClientPing.create = function(properties) { return new CMsgGCClientPing(properties); }; @@ -7233,13 +9407,20 @@ * @function encode * @memberof CMsgGCClientPing * @static - * @param {ICMsgGCClientPing} message CMsgGCClientPing message or plain object to encode + * @param {CMsgGCClientPing.$Properties} message CMsgGCClientPing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientPing.encode = function encode(message, writer) { + CMsgGCClientPing.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7248,12 +9429,12 @@ * @function encodeDelimited * @memberof CMsgGCClientPing * @static - * @param {ICMsgGCClientPing} message CMsgGCClientPing message or plain object to encode + * @param {CMsgGCClientPing.$Properties} message CMsgGCClientPing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientPing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCClientPing.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7263,22 +9444,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCClientPing} CMsgGCClientPing + * @returns {CMsgGCClientPing & CMsgGCClientPing.$Shape} CMsgGCClientPing * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientPing.decode = function decode(reader, length) { + CMsgGCClientPing.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCClientPing(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCClientPing(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7288,11 +9480,11 @@ * @memberof CMsgGCClientPing * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCClientPing} CMsgGCClientPing + * @returns {CMsgGCClientPing & CMsgGCClientPing.$Shape} CMsgGCClientPing * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientPing.decodeDelimited = function decodeDelimited(reader) { + CMsgGCClientPing.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7306,9 +9498,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCClientPing.verify = function verify(message) { + CMsgGCClientPing.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -7320,9 +9516,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCClientPing} CMsgGCClientPing */ - CMsgGCClientPing.fromObject = function fromObject(object) { + CMsgGCClientPing.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCClientPing) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCClientPing: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgGCClientPing(); }; @@ -7335,7 +9537,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCClientPing.toObject = function toObject() { + CMsgGCClientPing.toObject = function () { return {}; }; @@ -7346,8 +9548,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCClientPing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCClientPing.prototype.toJSON = function() { + return CMsgGCClientPing.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCClientPing + * @function getTypeUrl + * @memberof CMsgGCClientPing + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCClientPing.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCClientPing"; }; return CMsgGCClientPing; @@ -7355,7 +9571,7 @@ /** * GCProtoBufMsgSrc enum. - * @exports GCProtoBufMsgSrc + * @name GCProtoBufMsgSrc * @enum {number} * @property {number} GCProtoBufMsgSrc_Unspecified=0 GCProtoBufMsgSrc_Unspecified value * @property {number} GCProtoBufMsgSrc_FromSystem=1 GCProtoBufMsgSrc_FromSystem value @@ -7364,7 +9580,7 @@ * @property {number} GCProtoBufMsgSrc_ReplySystem=4 GCProtoBufMsgSrc_ReplySystem value */ $root.GCProtoBufMsgSrc = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "GCProtoBufMsgSrc_Unspecified"] = 0; values[valuesById[1] = "GCProtoBufMsgSrc_FromSystem"] = 1; values[valuesById[2] = "GCProtoBufMsgSrc_FromSteamID"] = 2; @@ -7377,8 +9593,7 @@ /** * Properties of a CMsgProtoBufHeader. - * @exports ICMsgProtoBufHeader - * @interface ICMsgProtoBufHeader + * @typedef {Object} CMsgProtoBufHeader.$Properties * @property {number|Long|null} [client_steam_id] CMsgProtoBufHeader client_steam_id * @property {number|null} [client_session_id] CMsgProtoBufHeader client_session_id * @property {number|null} [source_app_id] CMsgProtoBufHeader source_app_id @@ -7389,22 +9604,36 @@ * @property {string|null} [error_message] CMsgProtoBufHeader error_message * @property {GCProtoBufMsgSrc|null} [gc_msg_src] CMsgProtoBufHeader gc_msg_src * @property {number|null} [gc_dir_index_source] CMsgProtoBufHeader gc_dir_index_source + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgProtoBufHeader. + * @exports ICMsgProtoBufHeader + * @interface ICMsgProtoBufHeader + * @augments CMsgProtoBufHeader.$Properties + * @deprecated Use CMsgProtoBufHeader.$Properties instead. + */ + + /** + * Shape of a CMsgProtoBufHeader. + * @typedef {CMsgProtoBufHeader.$Properties} CMsgProtoBufHeader.$Shape */ /** * Constructs a new CMsgProtoBufHeader. * @exports CMsgProtoBufHeader * @classdesc Represents a CMsgProtoBufHeader. - * @implements ICMsgProtoBufHeader * @constructor - * @param {ICMsgProtoBufHeader=} [properties] Properties to set + * @param {CMsgProtoBufHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgProtoBufHeader(properties) { + var CMsgProtoBufHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgProtoBufHeader client_steam_id. @@ -7412,7 +9641,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgProtoBufHeader.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgProtoBufHeader client_session_id. @@ -7436,7 +9665,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.job_id_source = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000; + CMsgProtoBufHeader.prototype.job_id_source = $util.Long ? $util.Long.fromBits(-1,-1,true) : 18446744073709552000; /** * CMsgProtoBufHeader job_id_target. @@ -7444,7 +9673,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.job_id_target = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000; + CMsgProtoBufHeader.prototype.job_id_target = $util.Long ? $util.Long.fromBits(-1,-1,true) : 18446744073709552000; /** * CMsgProtoBufHeader target_job_name. @@ -7491,10 +9720,14 @@ * @function create * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader=} [properties] Properties to set + * @param {CMsgProtoBufHeader.$Properties=} [properties] Properties to set * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader instance + * @type {{ + * (properties: CMsgProtoBufHeader.$Shape): CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape; + * (properties?: CMsgProtoBufHeader.$Properties): CMsgProtoBufHeader; + * }} */ - CMsgProtoBufHeader.create = function create(properties) { + CMsgProtoBufHeader.create = function(properties) { return new CMsgProtoBufHeader(properties); }; @@ -7503,33 +9736,40 @@ * @function encode * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader} message CMsgProtoBufHeader message or plain object to encode + * @param {CMsgProtoBufHeader.$Properties} message CMsgProtoBufHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoBufHeader.encode = function encode(message, writer) { + CMsgProtoBufHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.client_steam_id != null && Object.hasOwnProperty.call(message, "client_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.client_steam_id); - if (message.client_session_id != null && Object.hasOwnProperty.call(message, "client_session_id")) + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.client_session_id); - if (message.source_app_id != null && Object.hasOwnProperty.call(message, "source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.source_app_id); - if (message.job_id_source != null && Object.hasOwnProperty.call(message, "job_id_source")) + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) writer.uint32(/* id 10, wireType 1 =*/81).fixed64(message.job_id_source); - if (message.job_id_target != null && Object.hasOwnProperty.call(message, "job_id_target")) + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) writer.uint32(/* id 11, wireType 1 =*/89).fixed64(message.job_id_target); - if (message.target_job_name != null && Object.hasOwnProperty.call(message, "target_job_name")) + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.target_job_name); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.eresult); - if (message.error_message != null && Object.hasOwnProperty.call(message, "error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) writer.uint32(/* id 14, wireType 2 =*/114).string(message.error_message); - if (message.gc_msg_src != null && Object.hasOwnProperty.call(message, "gc_msg_src")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) writer.uint32(/* id 200, wireType 0 =*/1600).int32(message.gc_msg_src); - if (message.gc_dir_index_source != null && Object.hasOwnProperty.call(message, "gc_dir_index_source")) + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) writer.uint32(/* id 201, wireType 0 =*/1608).uint32(message.gc_dir_index_source); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7538,12 +9778,12 @@ * @function encodeDelimited * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader} message CMsgProtoBufHeader message or plain object to encode + * @param {CMsgProtoBufHeader.$Properties} message CMsgProtoBufHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoBufHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgProtoBufHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7553,52 +9793,102 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader + * @returns {CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape} CMsgProtoBufHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoBufHeader.decode = function decode(reader, length) { + CMsgProtoBufHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgProtoBufHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgProtoBufHeader(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_steam_id = reader.fixed64(); - break; - case 2: - message.client_session_id = reader.int32(); - break; - case 3: - message.source_app_id = reader.uint32(); - break; - case 10: - message.job_id_source = reader.fixed64(); - break; - case 11: - message.job_id_target = reader.fixed64(); - break; - case 12: - message.target_job_name = reader.string(); - break; - case 13: - message.eresult = reader.int32(); - break; - case 14: - message.error_message = reader.string(); - break; - case 200: - message.gc_msg_src = reader.int32(); - break; - case 201: - message.gc_dir_index_source = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.client_steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.client_session_id = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.source_app_id = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 1) + break; + message.job_id_source = reader.fixed64(); + continue; + } + case 11: { + if (wireType !== 1) + break; + message.job_id_target = reader.fixed64(); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.target_job_name = reader.string(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 14: { + if (wireType !== 2) + break; + message.error_message = reader.string(); + continue; + } + case 200: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.GCProtoBufMsgSrc[value] !== $undefined) + message.gc_msg_src = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 201: { + if (wireType !== 0) + break; + message.gc_dir_index_source = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7608,11 +9898,11 @@ * @memberof CMsgProtoBufHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader + * @returns {CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape} CMsgProtoBufHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoBufHeader.decodeDelimited = function decodeDelimited(reader) { + CMsgProtoBufHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7626,34 +9916,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgProtoBufHeader.verify = function verify(message) { + CMsgProtoBufHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) if (!$util.isInteger(message.client_steam_id) && !(message.client_steam_id && $util.isInteger(message.client_steam_id.low) && $util.isInteger(message.client_steam_id.high))) return "client_steam_id: integer|Long expected"; - if (message.client_session_id != null && message.hasOwnProperty("client_session_id")) + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) if (!$util.isInteger(message.client_session_id)) return "client_session_id: integer expected"; - if (message.source_app_id != null && message.hasOwnProperty("source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) if (!$util.isInteger(message.source_app_id)) return "source_app_id: integer expected"; - if (message.job_id_source != null && message.hasOwnProperty("job_id_source")) + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) if (!$util.isInteger(message.job_id_source) && !(message.job_id_source && $util.isInteger(message.job_id_source.low) && $util.isInteger(message.job_id_source.high))) return "job_id_source: integer|Long expected"; - if (message.job_id_target != null && message.hasOwnProperty("job_id_target")) + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) if (!$util.isInteger(message.job_id_target) && !(message.job_id_target && $util.isInteger(message.job_id_target.low) && $util.isInteger(message.job_id_target.high))) return "job_id_target: integer|Long expected"; - if (message.target_job_name != null && message.hasOwnProperty("target_job_name")) + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) if (!$util.isString(message.target_job_name)) return "target_job_name: string expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) if (!$util.isString(message.error_message)) return "error_message: string expected"; - if (message.gc_msg_src != null && message.hasOwnProperty("gc_msg_src")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) switch (message.gc_msg_src) { default: return "gc_msg_src: enum value expected"; @@ -7664,7 +9958,7 @@ case 4: break; } - if (message.gc_dir_index_source != null && message.hasOwnProperty("gc_dir_index_source")) + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) if (!$util.isInteger(message.gc_dir_index_source)) return "gc_dir_index_source: integer expected"; return null; @@ -7678,47 +9972,53 @@ * @param {Object.} object Plain object * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader */ - CMsgProtoBufHeader.fromObject = function fromObject(object) { + CMsgProtoBufHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgProtoBufHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgProtoBufHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgProtoBufHeader(); if (object.client_steam_id != null) if ($util.Long) - (message.client_steam_id = $util.Long.fromValue(object.client_steam_id)).unsigned = false; + message.client_steam_id = $util.Long.fromValue(object.client_steam_id, true); else if (typeof object.client_steam_id === "string") - message.client_steam_id = parseInt(object.client_steam_id, 10); + message.client_steam_id = $parseInt(object.client_steam_id, 10); else if (typeof object.client_steam_id === "number") message.client_steam_id = object.client_steam_id; else if (typeof object.client_steam_id === "object") - message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(); + message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(true); if (object.client_session_id != null) message.client_session_id = object.client_session_id | 0; if (object.source_app_id != null) message.source_app_id = object.source_app_id >>> 0; if (object.job_id_source != null) if ($util.Long) - (message.job_id_source = $util.Long.fromValue(object.job_id_source)).unsigned = false; + message.job_id_source = $util.Long.fromValue(object.job_id_source, true); else if (typeof object.job_id_source === "string") - message.job_id_source = parseInt(object.job_id_source, 10); + message.job_id_source = $parseInt(object.job_id_source, 10); else if (typeof object.job_id_source === "number") message.job_id_source = object.job_id_source; else if (typeof object.job_id_source === "object") - message.job_id_source = new $util.LongBits(object.job_id_source.low >>> 0, object.job_id_source.high >>> 0).toNumber(); + message.job_id_source = new $util.LongBits(object.job_id_source.low >>> 0, object.job_id_source.high >>> 0).toNumber(true); if (object.job_id_target != null) if ($util.Long) - (message.job_id_target = $util.Long.fromValue(object.job_id_target)).unsigned = false; + message.job_id_target = $util.Long.fromValue(object.job_id_target, true); else if (typeof object.job_id_target === "string") - message.job_id_target = parseInt(object.job_id_target, 10); + message.job_id_target = $parseInt(object.job_id_target, 10); else if (typeof object.job_id_target === "number") message.job_id_target = object.job_id_target; else if (typeof object.job_id_target === "object") - message.job_id_target = new $util.LongBits(object.job_id_target.low >>> 0, object.job_id_target.high >>> 0).toNumber(); + message.job_id_target = new $util.LongBits(object.job_id_target.low >>> 0, object.job_id_target.high >>> 0).toNumber(true); if (object.target_job_name != null) - message.target_job_name = String(object.target_job_name); + message.target_job_name = $String(object.target_job_name); if (object.eresult != null) message.eresult = object.eresult | 0; if (object.error_message != null) - message.error_message = String(object.error_message); + message.error_message = $String(object.error_message); switch (object.gc_msg_src) { case "GCProtoBufMsgSrc_Unspecified": case 0: @@ -7740,6 +10040,7 @@ case 4: message.gc_msg_src = 4; break; + default: } if (object.gc_dir_index_source != null) message.gc_dir_index_source = object.gc_dir_index_source >>> 0; @@ -7755,62 +10056,72 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgProtoBufHeader.toObject = function toObject(message, options) { + CMsgProtoBufHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.client_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.client_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.client_steam_id = options.longs === String ? "0" : 0; + object.client_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.client_session_id = 0; object.source_app_id = 0; if ($util.Long) { - var long = new $util.Long(-1, 2147483647, false); - object.job_id_source = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(-1, -1, true); + object.job_id_source = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.job_id_source = options.longs === String ? "9223372036854775807" : 9223372036854776000; + object.job_id_source = options.longs === $String ? "18446744073709551615" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("18446744073709551615") : 18446744073709552000; if ($util.Long) { - var long = new $util.Long(-1, 2147483647, false); - object.job_id_target = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(-1, -1, true); + object.job_id_target = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.job_id_target = options.longs === String ? "9223372036854775807" : 9223372036854776000; + object.job_id_target = options.longs === $String ? "18446744073709551615" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("18446744073709551615") : 18446744073709552000; object.target_job_name = ""; object.eresult = 2; object.error_message = ""; - object.gc_msg_src = options.enums === String ? "GCProtoBufMsgSrc_Unspecified" : 0; + object.gc_msg_src = options.enums === $String ? "GCProtoBufMsgSrc_Unspecified" : 0; object.gc_dir_index_source = 0; } - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) - if (typeof message.client_steam_id === "number") - object.client_steam_id = options.longs === String ? String(message.client_steam_id) : message.client_steam_id; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.client_steam_id = typeof message.client_steam_id === "number" ? $BigInt(message.client_steam_id) : $util.Long.fromBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.client_steam_id === "number") + object.client_steam_id = options.longs === $String ? $String(message.client_steam_id) : message.client_steam_id; else - object.client_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber() : message.client_steam_id; - if (message.client_session_id != null && message.hasOwnProperty("client_session_id")) + object.client_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === $Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber(true) : message.client_steam_id; + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) object.client_session_id = message.client_session_id; - if (message.source_app_id != null && message.hasOwnProperty("source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) object.source_app_id = message.source_app_id; - if (message.job_id_source != null && message.hasOwnProperty("job_id_source")) - if (typeof message.job_id_source === "number") - object.job_id_source = options.longs === String ? String(message.job_id_source) : message.job_id_source; + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.job_id_source = typeof message.job_id_source === "number" ? $BigInt(message.job_id_source) : $util.Long.fromBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0, true).toBigInt(); + else if (typeof message.job_id_source === "number") + object.job_id_source = options.longs === $String ? $String(message.job_id_source) : message.job_id_source; else - object.job_id_source = options.longs === String ? $util.Long.prototype.toString.call(message.job_id_source) : options.longs === Number ? new $util.LongBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0).toNumber() : message.job_id_source; - if (message.job_id_target != null && message.hasOwnProperty("job_id_target")) - if (typeof message.job_id_target === "number") - object.job_id_target = options.longs === String ? String(message.job_id_target) : message.job_id_target; + object.job_id_source = options.longs === $String ? $util.Long.prototype.toString.call(message.job_id_source) : options.longs === $Number ? new $util.LongBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0).toNumber(true) : message.job_id_source; + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.job_id_target = typeof message.job_id_target === "number" ? $BigInt(message.job_id_target) : $util.Long.fromBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0, true).toBigInt(); + else if (typeof message.job_id_target === "number") + object.job_id_target = options.longs === $String ? $String(message.job_id_target) : message.job_id_target; else - object.job_id_target = options.longs === String ? $util.Long.prototype.toString.call(message.job_id_target) : options.longs === Number ? new $util.LongBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0).toNumber() : message.job_id_target; - if (message.target_job_name != null && message.hasOwnProperty("target_job_name")) + object.job_id_target = options.longs === $String ? $util.Long.prototype.toString.call(message.job_id_target) : options.longs === $Number ? new $util.LongBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0).toNumber(true) : message.job_id_target; + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) object.target_job_name = message.target_job_name; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) object.error_message = message.error_message; - if (message.gc_msg_src != null && message.hasOwnProperty("gc_msg_src")) - object.gc_msg_src = options.enums === String ? $root.GCProtoBufMsgSrc[message.gc_msg_src] : message.gc_msg_src; - if (message.gc_dir_index_source != null && message.hasOwnProperty("gc_dir_index_source")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) + object.gc_msg_src = options.enums === $String ? $root.GCProtoBufMsgSrc[message.gc_msg_src] === $undefined ? message.gc_msg_src : $root.GCProtoBufMsgSrc[message.gc_msg_src] : message.gc_msg_src; + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) object.gc_dir_index_source = message.gc_dir_index_source; return object; }; @@ -7822,8 +10133,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgProtoBufHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgProtoBufHeader.prototype.toJSON = function() { + return CMsgProtoBufHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgProtoBufHeader + * @function getTypeUrl + * @memberof CMsgProtoBufHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgProtoBufHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgProtoBufHeader"; }; return CMsgProtoBufHeader; @@ -7833,29 +10158,42 @@ /** * Properties of a CMsgWebAPIKey. - * @exports ICMsgWebAPIKey - * @interface ICMsgWebAPIKey + * @typedef {Object} CMsgWebAPIKey.$Properties * @property {number|null} [status] CMsgWebAPIKey status * @property {number|null} [account_id] CMsgWebAPIKey account_id * @property {number|null} [publisher_group_id] CMsgWebAPIKey publisher_group_id * @property {number|null} [key_id] CMsgWebAPIKey key_id * @property {string|null} [domain] CMsgWebAPIKey domain + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgWebAPIKey. + * @exports ICMsgWebAPIKey + * @interface ICMsgWebAPIKey + * @augments CMsgWebAPIKey.$Properties + * @deprecated Use CMsgWebAPIKey.$Properties instead. + */ + + /** + * Shape of a CMsgWebAPIKey. + * @typedef {CMsgWebAPIKey.$Properties} CMsgWebAPIKey.$Shape */ /** * Constructs a new CMsgWebAPIKey. * @exports CMsgWebAPIKey * @classdesc Represents a CMsgWebAPIKey. - * @implements ICMsgWebAPIKey * @constructor - * @param {ICMsgWebAPIKey=} [properties] Properties to set + * @param {CMsgWebAPIKey.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgWebAPIKey(properties) { + var CMsgWebAPIKey = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgWebAPIKey status. @@ -7902,10 +10240,14 @@ * @function create * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey=} [properties] Properties to set + * @param {CMsgWebAPIKey.$Properties=} [properties] Properties to set * @returns {CMsgWebAPIKey} CMsgWebAPIKey instance + * @type {{ + * (properties: CMsgWebAPIKey.$Shape): CMsgWebAPIKey & CMsgWebAPIKey.$Shape; + * (properties?: CMsgWebAPIKey.$Properties): CMsgWebAPIKey; + * }} */ - CMsgWebAPIKey.create = function create(properties) { + CMsgWebAPIKey.create = function(properties) { return new CMsgWebAPIKey(properties); }; @@ -7914,23 +10256,30 @@ * @function encode * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey} message CMsgWebAPIKey message or plain object to encode + * @param {CMsgWebAPIKey.$Properties} message CMsgWebAPIKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIKey.encode = function encode(message, writer) { + CMsgWebAPIKey.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.status); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_id); - if (message.publisher_group_id != null && Object.hasOwnProperty.call(message, "publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.publisher_group_id); - if (message.key_id != null && Object.hasOwnProperty.call(message, "key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.key_id); - if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.domain); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7939,12 +10288,12 @@ * @function encodeDelimited * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey} message CMsgWebAPIKey message or plain object to encode + * @param {CMsgWebAPIKey.$Properties} message CMsgWebAPIKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgWebAPIKey.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7954,37 +10303,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgWebAPIKey} CMsgWebAPIKey + * @returns {CMsgWebAPIKey & CMsgWebAPIKey.$Shape} CMsgWebAPIKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIKey.decode = function decode(reader, length) { + CMsgWebAPIKey.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgWebAPIKey(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgWebAPIKey(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.uint32(); - break; - case 2: - message.account_id = reader.uint32(); - break; - case 3: - message.publisher_group_id = reader.uint32(); - break; - case 4: - message.key_id = reader.uint32(); - break; - case 5: - message.domain = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.status = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.publisher_group_id = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.key_id = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.domain = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7994,11 +10372,11 @@ * @memberof CMsgWebAPIKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgWebAPIKey} CMsgWebAPIKey + * @returns {CMsgWebAPIKey & CMsgWebAPIKey.$Shape} CMsgWebAPIKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIKey.decodeDelimited = function decodeDelimited(reader) { + CMsgWebAPIKey.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8012,22 +10390,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgWebAPIKey.verify = function verify(message) { + CMsgWebAPIKey.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) if (!$util.isInteger(message.status)) return "status: integer expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.publisher_group_id != null && message.hasOwnProperty("publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) if (!$util.isInteger(message.publisher_group_id)) return "publisher_group_id: integer expected"; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) if (!$util.isInteger(message.key_id)) return "key_id: integer expected"; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) if (!$util.isString(message.domain)) return "domain: string expected"; return null; @@ -8041,9 +10423,15 @@ * @param {Object.} object Plain object * @returns {CMsgWebAPIKey} CMsgWebAPIKey */ - CMsgWebAPIKey.fromObject = function fromObject(object) { + CMsgWebAPIKey.fromObject = function (object, _depth) { if (object instanceof $root.CMsgWebAPIKey) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgWebAPIKey: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgWebAPIKey(); if (object.status != null) message.status = object.status >>> 0; @@ -8054,7 +10442,7 @@ if (object.key_id != null) message.key_id = object.key_id >>> 0; if (object.domain != null) - message.domain = String(object.domain); + message.domain = $String(object.domain); return message; }; @@ -8067,9 +10455,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgWebAPIKey.toObject = function toObject(message, options) { + CMsgWebAPIKey.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.status = 255; @@ -8078,15 +10470,15 @@ object.key_id = 0; object.domain = ""; } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.publisher_group_id != null && message.hasOwnProperty("publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) object.publisher_group_id = message.publisher_group_id; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) object.key_id = message.key_id; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) object.domain = message.domain; return object; }; @@ -8098,8 +10490,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgWebAPIKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgWebAPIKey.prototype.toJSON = function() { + return CMsgWebAPIKey.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgWebAPIKey + * @function getTypeUrl + * @memberof CMsgWebAPIKey + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgWebAPIKey.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgWebAPIKey"; }; return CMsgWebAPIKey; @@ -8109,35 +10515,48 @@ /** * Properties of a CMsgHttpRequest. - * @exports ICMsgHttpRequest - * @interface ICMsgHttpRequest + * @typedef {Object} CMsgHttpRequest.$Properties * @property {number|null} [request_method] CMsgHttpRequest request_method * @property {string|null} [hostname] CMsgHttpRequest hostname * @property {string|null} [url] CMsgHttpRequest url - * @property {Array.|null} [headers] CMsgHttpRequest headers - * @property {Array.|null} [get_params] CMsgHttpRequest get_params - * @property {Array.|null} [post_params] CMsgHttpRequest post_params + * @property {Array.|null} [headers] CMsgHttpRequest headers + * @property {Array.|null} [get_params] CMsgHttpRequest get_params + * @property {Array.|null} [post_params] CMsgHttpRequest post_params * @property {Uint8Array|null} [body] CMsgHttpRequest body * @property {number|null} [absolute_timeout] CMsgHttpRequest absolute_timeout + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHttpRequest. + * @exports ICMsgHttpRequest + * @interface ICMsgHttpRequest + * @augments CMsgHttpRequest.$Properties + * @deprecated Use CMsgHttpRequest.$Properties instead. + */ + + /** + * Shape of a CMsgHttpRequest. + * @typedef {CMsgHttpRequest.$Properties} CMsgHttpRequest.$Shape */ /** * Constructs a new CMsgHttpRequest. * @exports CMsgHttpRequest * @classdesc Represents a CMsgHttpRequest. - * @implements ICMsgHttpRequest * @constructor - * @param {ICMsgHttpRequest=} [properties] Properties to set + * @param {CMsgHttpRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHttpRequest(properties) { + var CMsgHttpRequest = function (properties) { this.headers = []; this.get_params = []; this.post_params = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHttpRequest request_method. @@ -8165,7 +10584,7 @@ /** * CMsgHttpRequest headers. - * @member {Array.} headers + * @member {Array.} headers * @memberof CMsgHttpRequest * @instance */ @@ -8173,7 +10592,7 @@ /** * CMsgHttpRequest get_params. - * @member {Array.} get_params + * @member {Array.} get_params * @memberof CMsgHttpRequest * @instance */ @@ -8181,7 +10600,7 @@ /** * CMsgHttpRequest post_params. - * @member {Array.} post_params + * @member {Array.} post_params * @memberof CMsgHttpRequest * @instance */ @@ -8208,10 +10627,14 @@ * @function create * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest=} [properties] Properties to set + * @param {CMsgHttpRequest.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest} CMsgHttpRequest instance + * @type {{ + * (properties: CMsgHttpRequest.$Shape): CMsgHttpRequest & CMsgHttpRequest.$Shape; + * (properties?: CMsgHttpRequest.$Properties): CMsgHttpRequest; + * }} */ - CMsgHttpRequest.create = function create(properties) { + CMsgHttpRequest.create = function(properties) { return new CMsgHttpRequest(properties); }; @@ -8220,32 +10643,39 @@ * @function encode * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest} message CMsgHttpRequest message or plain object to encode + * @param {CMsgHttpRequest.$Properties} message CMsgHttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpRequest.encode = function encode(message, writer) { + CMsgHttpRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.request_method != null && Object.hasOwnProperty.call(message, "request_method")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.request_method); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.hostname); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.url); if (message.headers != null && message.headers.length) for (var i = 0; i < message.headers.length; ++i) - $root.CMsgHttpRequest.RequestHeader.encode(message.headers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgHttpRequest.RequestHeader.encode(message.headers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.get_params != null && message.get_params.length) for (var i = 0; i < message.get_params.length; ++i) - $root.CMsgHttpRequest.QueryParam.encode(message.get_params[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.CMsgHttpRequest.QueryParam.encode(message.get_params[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.post_params != null && message.post_params.length) for (var i = 0; i < message.post_params.length; ++i) - $root.CMsgHttpRequest.QueryParam.encode(message.post_params[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.CMsgHttpRequest.QueryParam.encode(message.post_params[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.body); - if (message.absolute_timeout != null && Object.hasOwnProperty.call(message, "absolute_timeout")) + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.absolute_timeout); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8254,12 +10684,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest} message CMsgHttpRequest message or plain object to encode + * @param {CMsgHttpRequest.$Properties} message CMsgHttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHttpRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8269,52 +10699,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest} CMsgHttpRequest + * @returns {CMsgHttpRequest & CMsgHttpRequest.$Shape} CMsgHttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpRequest.decode = function decode(reader, length) { + CMsgHttpRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.request_method = reader.uint32(); - break; - case 2: - message.hostname = reader.string(); - break; - case 3: - message.url = reader.string(); - break; - case 4: - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.CMsgHttpRequest.RequestHeader.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.get_params && message.get_params.length)) - message.get_params = []; - message.get_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.post_params && message.post_params.length)) - message.post_params = []; - message.post_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32())); - break; - case 7: - message.body = reader.bytes(); - break; - case 8: - message.absolute_timeout = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.request_method = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.hostname = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.url = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push($root.CMsgHttpRequest.RequestHeader.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.get_params && message.get_params.length)) + message.get_params = []; + message.get_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.post_params && message.post_params.length)) + message.post_params = []; + message.post_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.body = reader.bytes(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.absolute_timeout = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8324,11 +10792,11 @@ * @memberof CMsgHttpRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest} CMsgHttpRequest + * @returns {CMsgHttpRequest & CMsgHttpRequest.$Shape} CMsgHttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgHttpRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8342,49 +10810,53 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHttpRequest.verify = function verify(message) { + CMsgHttpRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.request_method != null && message.hasOwnProperty("request_method")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) if (!$util.isInteger(message.request_method)) return "request_method: integer expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) if (!$util.isString(message.hostname)) return "hostname: string expected"; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) + if (message.headers != null && $Object.hasOwnProperty.call(message, "headers")) { + if (!$Array.isArray(message.headers)) return "headers: array expected"; for (var i = 0; i < message.headers.length; ++i) { - var error = $root.CMsgHttpRequest.RequestHeader.verify(message.headers[i]); + var error = $root.CMsgHttpRequest.RequestHeader.verify(message.headers[i], _depth + 1); if (error) return "headers." + error; } } - if (message.get_params != null && message.hasOwnProperty("get_params")) { - if (!Array.isArray(message.get_params)) + if (message.get_params != null && $Object.hasOwnProperty.call(message, "get_params")) { + if (!$Array.isArray(message.get_params)) return "get_params: array expected"; for (var i = 0; i < message.get_params.length; ++i) { - var error = $root.CMsgHttpRequest.QueryParam.verify(message.get_params[i]); + var error = $root.CMsgHttpRequest.QueryParam.verify(message.get_params[i], _depth + 1); if (error) return "get_params." + error; } } - if (message.post_params != null && message.hasOwnProperty("post_params")) { - if (!Array.isArray(message.post_params)) + if (message.post_params != null && $Object.hasOwnProperty.call(message, "post_params")) { + if (!$Array.isArray(message.post_params)) return "post_params: array expected"; for (var i = 0; i < message.post_params.length; ++i) { - var error = $root.CMsgHttpRequest.QueryParam.verify(message.post_params[i]); + var error = $root.CMsgHttpRequest.QueryParam.verify(message.post_params[i], _depth + 1); if (error) return "post_params." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) return "body: buffer expected"; - if (message.absolute_timeout != null && message.hasOwnProperty("absolute_timeout")) + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) if (!$util.isInteger(message.absolute_timeout)) return "absolute_timeout: integer expected"; return null; @@ -8398,50 +10870,56 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest} CMsgHttpRequest */ - CMsgHttpRequest.fromObject = function fromObject(object) { + CMsgHttpRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest(); if (object.request_method != null) message.request_method = object.request_method >>> 0; if (object.hostname != null) - message.hostname = String(object.hostname); + message.hostname = $String(object.hostname); if (object.url != null) - message.url = String(object.url); + message.url = $String(object.url); if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".CMsgHttpRequest.headers: array expected"); - message.headers = []; + if (!$Array.isArray(object.headers)) + throw $TypeError(".CMsgHttpRequest.headers: array expected"); + message.headers = $Array(object.headers.length); for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".CMsgHttpRequest.headers: object expected"); - message.headers[i] = $root.CMsgHttpRequest.RequestHeader.fromObject(object.headers[i]); + if (!$util.isObject(object.headers[i])) + throw $TypeError(".CMsgHttpRequest.headers: object expected"); + message.headers[i] = $root.CMsgHttpRequest.RequestHeader.fromObject(object.headers[i], _depth + 1); } } if (object.get_params) { - if (!Array.isArray(object.get_params)) - throw TypeError(".CMsgHttpRequest.get_params: array expected"); - message.get_params = []; + if (!$Array.isArray(object.get_params)) + throw $TypeError(".CMsgHttpRequest.get_params: array expected"); + message.get_params = $Array(object.get_params.length); for (var i = 0; i < object.get_params.length; ++i) { - if (typeof object.get_params[i] !== "object") - throw TypeError(".CMsgHttpRequest.get_params: object expected"); - message.get_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.get_params[i]); + if (!$util.isObject(object.get_params[i])) + throw $TypeError(".CMsgHttpRequest.get_params: object expected"); + message.get_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.get_params[i], _depth + 1); } } if (object.post_params) { - if (!Array.isArray(object.post_params)) - throw TypeError(".CMsgHttpRequest.post_params: array expected"); - message.post_params = []; + if (!$Array.isArray(object.post_params)) + throw $TypeError(".CMsgHttpRequest.post_params: array expected"); + message.post_params = $Array(object.post_params.length); for (var i = 0; i < object.post_params.length; ++i) { - if (typeof object.post_params[i] !== "object") - throw TypeError(".CMsgHttpRequest.post_params: object expected"); - message.post_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.post_params[i]); + if (!$util.isObject(object.post_params[i])) + throw $TypeError(".CMsgHttpRequest.post_params: object expected"); + message.post_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.post_params[i], _depth + 1); } } if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; if (object.absolute_timeout != null) message.absolute_timeout = object.absolute_timeout >>> 0; @@ -8457,9 +10935,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHttpRequest.toObject = function toObject(message, options) { + CMsgHttpRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.headers = []; @@ -8470,39 +10952,39 @@ object.request_method = 0; object.hostname = ""; object.url = ""; - if (options.bytes === String) + if (options.bytes === $String) object.body = ""; else { object.body = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.body = $util.newBuffer(object.body); } object.absolute_timeout = 0; } - if (message.request_method != null && message.hasOwnProperty("request_method")) + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) object.request_method = message.request_method; - if (message.hostname != null && message.hasOwnProperty("hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) object.hostname = message.hostname; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) object.url = message.url; if (message.headers && message.headers.length) { - object.headers = []; + object.headers = $Array(message.headers.length); for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.CMsgHttpRequest.RequestHeader.toObject(message.headers[j], options); + object.headers[j] = $root.CMsgHttpRequest.RequestHeader.toObject(message.headers[j], options, _depth + 1); } if (message.get_params && message.get_params.length) { - object.get_params = []; + object.get_params = $Array(message.get_params.length); for (var j = 0; j < message.get_params.length; ++j) - object.get_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.get_params[j], options); + object.get_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.get_params[j], options, _depth + 1); } if (message.post_params && message.post_params.length) { - object.post_params = []; + object.post_params = $Array(message.post_params.length); for (var j = 0; j < message.post_params.length; ++j) - object.post_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.post_params[j], options); + object.post_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.post_params[j], options, _depth + 1); } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; - if (message.absolute_timeout != null && message.hasOwnProperty("absolute_timeout")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = options.bytes === $String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.body) : message.body; + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) object.absolute_timeout = message.absolute_timeout; return object; }; @@ -8514,34 +10996,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgHttpRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHttpRequest.prototype.toJSON = function() { + return CMsgHttpRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHttpRequest + * @function getTypeUrl + * @memberof CMsgHttpRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHttpRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest"; }; CMsgHttpRequest.RequestHeader = (function() { /** * Properties of a RequestHeader. - * @memberof CMsgHttpRequest - * @interface IRequestHeader + * @typedef {Object} CMsgHttpRequest.RequestHeader.$Properties * @property {string|null} [name] RequestHeader name * @property {string|null} [value] RequestHeader value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RequestHeader. + * @memberof CMsgHttpRequest + * @interface IRequestHeader + * @augments CMsgHttpRequest.RequestHeader.$Properties + * @deprecated Use CMsgHttpRequest.RequestHeader.$Properties instead. + */ + + /** + * Shape of a RequestHeader. + * @typedef {CMsgHttpRequest.RequestHeader.$Properties} CMsgHttpRequest.RequestHeader.$Shape */ /** * Constructs a new RequestHeader. * @memberof CMsgHttpRequest * @classdesc Represents a RequestHeader. - * @implements IRequestHeader * @constructor - * @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set + * @param {CMsgHttpRequest.RequestHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function RequestHeader(properties) { + var RequestHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * RequestHeader name. @@ -8564,10 +11073,14 @@ * @function create * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set + * @param {CMsgHttpRequest.RequestHeader.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest.RequestHeader} RequestHeader instance + * @type {{ + * (properties: CMsgHttpRequest.RequestHeader.$Shape): CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape; + * (properties?: CMsgHttpRequest.RequestHeader.$Properties): CMsgHttpRequest.RequestHeader; + * }} */ - RequestHeader.create = function create(properties) { + RequestHeader.create = function(properties) { return new RequestHeader(properties); }; @@ -8576,17 +11089,24 @@ * @function encode * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader} message RequestHeader message or plain object to encode + * @param {CMsgHttpRequest.RequestHeader.$Properties} message RequestHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestHeader.encode = function encode(message, writer) { + RequestHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8595,12 +11115,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader} message RequestHeader message or plain object to encode + * @param {CMsgHttpRequest.RequestHeader.$Properties} message RequestHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RequestHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8610,28 +11130,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest.RequestHeader} RequestHeader + * @returns {CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape} RequestHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestHeader.decode = function decode(reader, length) { + RequestHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest.RequestHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest.RequestHeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8641,11 +11181,11 @@ * @memberof CMsgHttpRequest.RequestHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest.RequestHeader} RequestHeader + * @returns {CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape} RequestHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestHeader.decodeDelimited = function decodeDelimited(reader) { + RequestHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8659,13 +11199,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RequestHeader.verify = function verify(message) { + RequestHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -8679,14 +11223,20 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest.RequestHeader} RequestHeader */ - RequestHeader.fromObject = function fromObject(object) { + RequestHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest.RequestHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest.RequestHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest.RequestHeader(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -8699,17 +11249,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RequestHeader.toObject = function toObject(message, options) { + RequestHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -8721,8 +11275,22 @@ * @instance * @returns {Object.} JSON object */ - RequestHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + RequestHeader.prototype.toJSON = function() { + return RequestHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RequestHeader + * @function getTypeUrl + * @memberof CMsgHttpRequest.RequestHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RequestHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest.RequestHeader"; }; return RequestHeader; @@ -8732,26 +11300,39 @@ /** * Properties of a QueryParam. - * @memberof CMsgHttpRequest - * @interface IQueryParam + * @typedef {Object} CMsgHttpRequest.QueryParam.$Properties * @property {string|null} [name] QueryParam name * @property {Uint8Array|null} [value] QueryParam value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a QueryParam. + * @memberof CMsgHttpRequest + * @interface IQueryParam + * @augments CMsgHttpRequest.QueryParam.$Properties + * @deprecated Use CMsgHttpRequest.QueryParam.$Properties instead. + */ + + /** + * Shape of a QueryParam. + * @typedef {CMsgHttpRequest.QueryParam.$Properties} CMsgHttpRequest.QueryParam.$Shape */ /** * Constructs a new QueryParam. * @memberof CMsgHttpRequest * @classdesc Represents a QueryParam. - * @implements IQueryParam * @constructor - * @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set + * @param {CMsgHttpRequest.QueryParam.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function QueryParam(properties) { + var QueryParam = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * QueryParam name. @@ -8774,10 +11355,14 @@ * @function create * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set + * @param {CMsgHttpRequest.QueryParam.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest.QueryParam} QueryParam instance + * @type {{ + * (properties: CMsgHttpRequest.QueryParam.$Shape): CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape; + * (properties?: CMsgHttpRequest.QueryParam.$Properties): CMsgHttpRequest.QueryParam; + * }} */ - QueryParam.create = function create(properties) { + QueryParam.create = function(properties) { return new QueryParam(properties); }; @@ -8786,17 +11371,24 @@ * @function encode * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam} message QueryParam message or plain object to encode + * @param {CMsgHttpRequest.QueryParam.$Properties} message QueryParam message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParam.encode = function encode(message, writer) { + QueryParam.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8805,12 +11397,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam} message QueryParam message or plain object to encode + * @param {CMsgHttpRequest.QueryParam.$Properties} message QueryParam message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueryParam.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8820,28 +11412,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest.QueryParam} QueryParam + * @returns {CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape} QueryParam * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParam.decode = function decode(reader, length) { + QueryParam.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest.QueryParam(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest.QueryParam(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8851,11 +11463,11 @@ * @memberof CMsgHttpRequest.QueryParam * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest.QueryParam} QueryParam + * @returns {CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape} QueryParam * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParam.decodeDelimited = function decodeDelimited(reader) { + QueryParam.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8869,13 +11481,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryParam.verify = function verify(message) { + QueryParam.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -8889,16 +11505,22 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest.QueryParam} QueryParam */ - QueryParam.fromObject = function fromObject(object) { + QueryParam.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest.QueryParam) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest.QueryParam: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest.QueryParam(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -8912,24 +11534,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryParam.toObject = function toObject(message, options) { + QueryParam.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -8940,8 +11566,22 @@ * @instance * @returns {Object.} JSON object */ - QueryParam.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + QueryParam.prototype.toJSON = function() { + return QueryParam.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for QueryParam + * @function getTypeUrl + * @memberof CMsgHttpRequest.QueryParam + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + QueryParam.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest.QueryParam"; }; return QueryParam; @@ -8954,31 +11594,44 @@ /** * Properties of a CMsgWebAPIRequest. - * @exports ICMsgWebAPIRequest - * @interface ICMsgWebAPIRequest + * @typedef {Object} CMsgWebAPIRequest.$Properties * @property {string|null} [UNUSED_job_name] CMsgWebAPIRequest UNUSED_job_name * @property {string|null} [interface_name] CMsgWebAPIRequest interface_name * @property {string|null} [method_name] CMsgWebAPIRequest method_name * @property {number|null} [version] CMsgWebAPIRequest version - * @property {ICMsgWebAPIKey|null} [api_key] CMsgWebAPIRequest api_key - * @property {ICMsgHttpRequest|null} [request] CMsgWebAPIRequest request + * @property {CMsgWebAPIKey.$Properties|null} [api_key] CMsgWebAPIRequest api_key + * @property {CMsgHttpRequest.$Properties|null} [request] CMsgWebAPIRequest request * @property {number|null} [routing_app_id] CMsgWebAPIRequest routing_app_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgWebAPIRequest. + * @exports ICMsgWebAPIRequest + * @interface ICMsgWebAPIRequest + * @augments CMsgWebAPIRequest.$Properties + * @deprecated Use CMsgWebAPIRequest.$Properties instead. + */ + + /** + * Shape of a CMsgWebAPIRequest. + * @typedef {CMsgWebAPIRequest.$Properties} CMsgWebAPIRequest.$Shape */ /** * Constructs a new CMsgWebAPIRequest. * @exports CMsgWebAPIRequest * @classdesc Represents a CMsgWebAPIRequest. - * @implements ICMsgWebAPIRequest * @constructor - * @param {ICMsgWebAPIRequest=} [properties] Properties to set + * @param {CMsgWebAPIRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgWebAPIRequest(properties) { + var CMsgWebAPIRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgWebAPIRequest UNUSED_job_name. @@ -9014,7 +11667,7 @@ /** * CMsgWebAPIRequest api_key. - * @member {ICMsgWebAPIKey|null|undefined} api_key + * @member {CMsgWebAPIKey.$Properties|null|undefined} api_key * @memberof CMsgWebAPIRequest * @instance */ @@ -9022,7 +11675,7 @@ /** * CMsgWebAPIRequest request. - * @member {ICMsgHttpRequest|null|undefined} request + * @member {CMsgHttpRequest.$Properties|null|undefined} request * @memberof CMsgWebAPIRequest * @instance */ @@ -9041,10 +11694,14 @@ * @function create * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest=} [properties] Properties to set + * @param {CMsgWebAPIRequest.$Properties=} [properties] Properties to set * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest instance + * @type {{ + * (properties: CMsgWebAPIRequest.$Shape): CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape; + * (properties?: CMsgWebAPIRequest.$Properties): CMsgWebAPIRequest; + * }} */ - CMsgWebAPIRequest.create = function create(properties) { + CMsgWebAPIRequest.create = function(properties) { return new CMsgWebAPIRequest(properties); }; @@ -9053,27 +11710,34 @@ * @function encode * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest} message CMsgWebAPIRequest message or plain object to encode + * @param {CMsgWebAPIRequest.$Properties} message CMsgWebAPIRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIRequest.encode = function encode(message, writer) { + CMsgWebAPIRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.UNUSED_job_name != null && Object.hasOwnProperty.call(message, "UNUSED_job_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.UNUSED_job_name); - if (message.interface_name != null && Object.hasOwnProperty.call(message, "interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.interface_name); - if (message.method_name != null && Object.hasOwnProperty.call(message, "method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.method_name); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.version); - if (message.api_key != null && Object.hasOwnProperty.call(message, "api_key")) - $root.CMsgWebAPIKey.encode(message.api_key, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.request != null && Object.hasOwnProperty.call(message, "request")) - $root.CMsgHttpRequest.encode(message.request, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.routing_app_id != null && Object.hasOwnProperty.call(message, "routing_app_id")) + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) + $root.CMsgWebAPIKey.encode(message.api_key, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) + $root.CMsgHttpRequest.encode(message.request, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.routing_app_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9082,12 +11746,12 @@ * @function encodeDelimited * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest} message CMsgWebAPIRequest message or plain object to encode + * @param {CMsgWebAPIRequest.$Properties} message CMsgWebAPIRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgWebAPIRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9097,43 +11761,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest + * @returns {CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape} CMsgWebAPIRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIRequest.decode = function decode(reader, length) { + CMsgWebAPIRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgWebAPIRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgWebAPIRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.UNUSED_job_name = reader.string(); - break; - case 2: - message.interface_name = reader.string(); - break; - case 3: - message.method_name = reader.string(); - break; - case 4: - message.version = reader.uint32(); - break; - case 5: - message.api_key = $root.CMsgWebAPIKey.decode(reader, reader.uint32()); - break; - case 6: - message.request = $root.CMsgHttpRequest.decode(reader, reader.uint32()); - break; - case 7: - message.routing_app_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.UNUSED_job_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.interface_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.method_name = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.api_key = $root.CMsgWebAPIKey.decode(reader, reader.uint32(), $undefined, _depth + 1, message.api_key); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.request = $root.CMsgHttpRequest.decode(reader, reader.uint32(), $undefined, _depth + 1, message.request); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.routing_app_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9143,11 +11842,11 @@ * @memberof CMsgWebAPIRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest + * @returns {CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape} CMsgWebAPIRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgWebAPIRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9161,32 +11860,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgWebAPIRequest.verify = function verify(message) { + CMsgWebAPIRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.UNUSED_job_name != null && message.hasOwnProperty("UNUSED_job_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) if (!$util.isString(message.UNUSED_job_name)) return "UNUSED_job_name: string expected"; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) if (!$util.isString(message.interface_name)) return "interface_name: string expected"; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) if (!$util.isString(message.method_name)) return "method_name: string expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.api_key != null && message.hasOwnProperty("api_key")) { - var error = $root.CMsgWebAPIKey.verify(message.api_key); + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) { + var error = $root.CMsgWebAPIKey.verify(message.api_key, _depth + 1); if (error) return "api_key." + error; } - if (message.request != null && message.hasOwnProperty("request")) { - var error = $root.CMsgHttpRequest.verify(message.request); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) { + var error = $root.CMsgHttpRequest.verify(message.request, _depth + 1); if (error) return "request." + error; } - if (message.routing_app_id != null && message.hasOwnProperty("routing_app_id")) + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) if (!$util.isInteger(message.routing_app_id)) return "routing_app_id: integer expected"; return null; @@ -9200,27 +11903,33 @@ * @param {Object.} object Plain object * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest */ - CMsgWebAPIRequest.fromObject = function fromObject(object) { + CMsgWebAPIRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgWebAPIRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgWebAPIRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgWebAPIRequest(); if (object.UNUSED_job_name != null) - message.UNUSED_job_name = String(object.UNUSED_job_name); + message.UNUSED_job_name = $String(object.UNUSED_job_name); if (object.interface_name != null) - message.interface_name = String(object.interface_name); + message.interface_name = $String(object.interface_name); if (object.method_name != null) - message.method_name = String(object.method_name); + message.method_name = $String(object.method_name); if (object.version != null) message.version = object.version >>> 0; if (object.api_key != null) { - if (typeof object.api_key !== "object") - throw TypeError(".CMsgWebAPIRequest.api_key: object expected"); - message.api_key = $root.CMsgWebAPIKey.fromObject(object.api_key); + if (!$util.isObject(object.api_key)) + throw $TypeError(".CMsgWebAPIRequest.api_key: object expected"); + message.api_key = $root.CMsgWebAPIKey.fromObject(object.api_key, _depth + 1); } if (object.request != null) { - if (typeof object.request !== "object") - throw TypeError(".CMsgWebAPIRequest.request: object expected"); - message.request = $root.CMsgHttpRequest.fromObject(object.request); + if (!$util.isObject(object.request)) + throw $TypeError(".CMsgWebAPIRequest.request: object expected"); + message.request = $root.CMsgHttpRequest.fromObject(object.request, _depth + 1); } if (object.routing_app_id != null) message.routing_app_id = object.routing_app_id >>> 0; @@ -9236,9 +11945,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgWebAPIRequest.toObject = function toObject(message, options) { + CMsgWebAPIRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.UNUSED_job_name = ""; @@ -9249,19 +11962,19 @@ object.request = null; object.routing_app_id = 0; } - if (message.UNUSED_job_name != null && message.hasOwnProperty("UNUSED_job_name")) + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) object.UNUSED_job_name = message.UNUSED_job_name; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) object.interface_name = message.interface_name; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) object.method_name = message.method_name; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.api_key != null && message.hasOwnProperty("api_key")) - object.api_key = $root.CMsgWebAPIKey.toObject(message.api_key, options); - if (message.request != null && message.hasOwnProperty("request")) - object.request = $root.CMsgHttpRequest.toObject(message.request, options); - if (message.routing_app_id != null && message.hasOwnProperty("routing_app_id")) + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) + object.api_key = $root.CMsgWebAPIKey.toObject(message.api_key, options, _depth + 1); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) + object.request = $root.CMsgHttpRequest.toObject(message.request, options, _depth + 1); + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) object.routing_app_id = message.routing_app_id; return object; }; @@ -9273,8 +11986,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgWebAPIRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgWebAPIRequest.prototype.toJSON = function() { + return CMsgWebAPIRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgWebAPIRequest + * @function getTypeUrl + * @memberof CMsgWebAPIRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgWebAPIRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgWebAPIRequest"; }; return CMsgWebAPIRequest; @@ -9284,28 +12011,41 @@ /** * Properties of a CMsgHttpResponse. - * @exports ICMsgHttpResponse - * @interface ICMsgHttpResponse + * @typedef {Object} CMsgHttpResponse.$Properties * @property {number|null} [status_code] CMsgHttpResponse status_code - * @property {Array.|null} [headers] CMsgHttpResponse headers + * @property {Array.|null} [headers] CMsgHttpResponse headers * @property {Uint8Array|null} [body] CMsgHttpResponse body + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHttpResponse. + * @exports ICMsgHttpResponse + * @interface ICMsgHttpResponse + * @augments CMsgHttpResponse.$Properties + * @deprecated Use CMsgHttpResponse.$Properties instead. + */ + + /** + * Shape of a CMsgHttpResponse. + * @typedef {CMsgHttpResponse.$Properties} CMsgHttpResponse.$Shape */ /** * Constructs a new CMsgHttpResponse. * @exports CMsgHttpResponse * @classdesc Represents a CMsgHttpResponse. - * @implements ICMsgHttpResponse * @constructor - * @param {ICMsgHttpResponse=} [properties] Properties to set + * @param {CMsgHttpResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHttpResponse(properties) { + var CMsgHttpResponse = function (properties) { this.headers = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHttpResponse status_code. @@ -9317,7 +12057,7 @@ /** * CMsgHttpResponse headers. - * @member {Array.} headers + * @member {Array.} headers * @memberof CMsgHttpResponse * @instance */ @@ -9336,10 +12076,14 @@ * @function create * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse=} [properties] Properties to set + * @param {CMsgHttpResponse.$Properties=} [properties] Properties to set * @returns {CMsgHttpResponse} CMsgHttpResponse instance + * @type {{ + * (properties: CMsgHttpResponse.$Shape): CMsgHttpResponse & CMsgHttpResponse.$Shape; + * (properties?: CMsgHttpResponse.$Properties): CMsgHttpResponse; + * }} */ - CMsgHttpResponse.create = function create(properties) { + CMsgHttpResponse.create = function(properties) { return new CMsgHttpResponse(properties); }; @@ -9348,20 +12092,27 @@ * @function encode * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse} message CMsgHttpResponse message or plain object to encode + * @param {CMsgHttpResponse.$Properties} message CMsgHttpResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpResponse.encode = function encode(message, writer) { + CMsgHttpResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.status_code); if (message.headers != null && message.headers.length) for (var i = 0; i < message.headers.length; ++i) - $root.CMsgHttpResponse.ResponseHeader.encode(message.headers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.CMsgHttpResponse.ResponseHeader.encode(message.headers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.body); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9370,12 +12121,12 @@ * @function encodeDelimited * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse} message CMsgHttpResponse message or plain object to encode + * @param {CMsgHttpResponse.$Properties} message CMsgHttpResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHttpResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9385,33 +12136,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpResponse} CMsgHttpResponse + * @returns {CMsgHttpResponse & CMsgHttpResponse.$Shape} CMsgHttpResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpResponse.decode = function decode(reader, length) { + CMsgHttpResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status_code = reader.uint32(); - break; - case 2: - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.CMsgHttpResponse.ResponseHeader.decode(reader, reader.uint32())); - break; - case 3: - message.body = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.status_code = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push($root.CMsgHttpResponse.ResponseHeader.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.body = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9421,11 +12195,11 @@ * @memberof CMsgHttpResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpResponse} CMsgHttpResponse + * @returns {CMsgHttpResponse & CMsgHttpResponse.$Shape} CMsgHttpResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgHttpResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9439,22 +12213,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHttpResponse.verify = function verify(message) { + CMsgHttpResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status_code != null && message.hasOwnProperty("status_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) if (!$util.isInteger(message.status_code)) return "status_code: integer expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) + if (message.headers != null && $Object.hasOwnProperty.call(message, "headers")) { + if (!$Array.isArray(message.headers)) return "headers: array expected"; for (var i = 0; i < message.headers.length; ++i) { - var error = $root.CMsgHttpResponse.ResponseHeader.verify(message.headers[i]); + var error = $root.CMsgHttpResponse.ResponseHeader.verify(message.headers[i], _depth + 1); if (error) return "headers." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) return "body: buffer expected"; return null; @@ -9468,26 +12246,32 @@ * @param {Object.} object Plain object * @returns {CMsgHttpResponse} CMsgHttpResponse */ - CMsgHttpResponse.fromObject = function fromObject(object) { + CMsgHttpResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpResponse(); if (object.status_code != null) message.status_code = object.status_code >>> 0; if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".CMsgHttpResponse.headers: array expected"); - message.headers = []; + if (!$Array.isArray(object.headers)) + throw $TypeError(".CMsgHttpResponse.headers: array expected"); + message.headers = $Array(object.headers.length); for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".CMsgHttpResponse.headers: object expected"); - message.headers[i] = $root.CMsgHttpResponse.ResponseHeader.fromObject(object.headers[i]); + if (!$util.isObject(object.headers[i])) + throw $TypeError(".CMsgHttpResponse.headers: object expected"); + message.headers[i] = $root.CMsgHttpResponse.ResponseHeader.fromObject(object.headers[i], _depth + 1); } } if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; return message; }; @@ -9501,31 +12285,35 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHttpResponse.toObject = function toObject(message, options) { + CMsgHttpResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.headers = []; if (options.defaults) { object.status_code = 0; - if (options.bytes === String) + if (options.bytes === $String) object.body = ""; else { object.body = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.body = $util.newBuffer(object.body); } } - if (message.status_code != null && message.hasOwnProperty("status_code")) + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) object.status_code = message.status_code; if (message.headers && message.headers.length) { - object.headers = []; + object.headers = $Array(message.headers.length); for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.CMsgHttpResponse.ResponseHeader.toObject(message.headers[j], options); + object.headers[j] = $root.CMsgHttpResponse.ResponseHeader.toObject(message.headers[j], options, _depth + 1); } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = options.bytes === $String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.body) : message.body; return object; }; @@ -9536,34 +12324,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgHttpResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHttpResponse.prototype.toJSON = function() { + return CMsgHttpResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHttpResponse + * @function getTypeUrl + * @memberof CMsgHttpResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHttpResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpResponse"; }; CMsgHttpResponse.ResponseHeader = (function() { /** * Properties of a ResponseHeader. - * @memberof CMsgHttpResponse - * @interface IResponseHeader + * @typedef {Object} CMsgHttpResponse.ResponseHeader.$Properties * @property {string|null} [name] ResponseHeader name * @property {string|null} [value] ResponseHeader value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ResponseHeader. + * @memberof CMsgHttpResponse + * @interface IResponseHeader + * @augments CMsgHttpResponse.ResponseHeader.$Properties + * @deprecated Use CMsgHttpResponse.ResponseHeader.$Properties instead. + */ + + /** + * Shape of a ResponseHeader. + * @typedef {CMsgHttpResponse.ResponseHeader.$Properties} CMsgHttpResponse.ResponseHeader.$Shape */ /** * Constructs a new ResponseHeader. * @memberof CMsgHttpResponse * @classdesc Represents a ResponseHeader. - * @implements IResponseHeader * @constructor - * @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set + * @param {CMsgHttpResponse.ResponseHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ResponseHeader(properties) { + var ResponseHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ResponseHeader name. @@ -9586,10 +12401,14 @@ * @function create * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set + * @param {CMsgHttpResponse.ResponseHeader.$Properties=} [properties] Properties to set * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader instance + * @type {{ + * (properties: CMsgHttpResponse.ResponseHeader.$Shape): CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape; + * (properties?: CMsgHttpResponse.ResponseHeader.$Properties): CMsgHttpResponse.ResponseHeader; + * }} */ - ResponseHeader.create = function create(properties) { + ResponseHeader.create = function(properties) { return new ResponseHeader(properties); }; @@ -9598,17 +12417,24 @@ * @function encode * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader} message ResponseHeader message or plain object to encode + * @param {CMsgHttpResponse.ResponseHeader.$Properties} message ResponseHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseHeader.encode = function encode(message, writer) { + ResponseHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9617,12 +12443,12 @@ * @function encodeDelimited * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader} message ResponseHeader message or plain object to encode + * @param {CMsgHttpResponse.ResponseHeader.$Properties} message ResponseHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ResponseHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9632,28 +12458,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader + * @returns {CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape} ResponseHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseHeader.decode = function decode(reader, length) { + ResponseHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpResponse.ResponseHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpResponse.ResponseHeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9663,11 +12509,11 @@ * @memberof CMsgHttpResponse.ResponseHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader + * @returns {CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape} ResponseHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseHeader.decodeDelimited = function decodeDelimited(reader) { + ResponseHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9681,13 +12527,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseHeader.verify = function verify(message) { + ResponseHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -9701,14 +12551,20 @@ * @param {Object.} object Plain object * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader */ - ResponseHeader.fromObject = function fromObject(object) { + ResponseHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpResponse.ResponseHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpResponse.ResponseHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpResponse.ResponseHeader(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -9721,17 +12577,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseHeader.toObject = function toObject(message, options) { + ResponseHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -9743,8 +12603,22 @@ * @instance * @returns {Object.} JSON object */ - ResponseHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ResponseHeader.prototype.toJSON = function() { + return ResponseHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ResponseHeader + * @function getTypeUrl + * @memberof CMsgHttpResponse.ResponseHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ResponseHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpResponse.ResponseHeader"; }; return ResponseHeader; @@ -9757,26 +12631,39 @@ /** * Properties of a CMsgAMFindAccounts. - * @exports ICMsgAMFindAccounts - * @interface ICMsgAMFindAccounts + * @typedef {Object} CMsgAMFindAccounts.$Properties * @property {number|null} [search_type] CMsgAMFindAccounts search_type * @property {string|null} [search_string] CMsgAMFindAccounts search_string + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMFindAccounts. + * @exports ICMsgAMFindAccounts + * @interface ICMsgAMFindAccounts + * @augments CMsgAMFindAccounts.$Properties + * @deprecated Use CMsgAMFindAccounts.$Properties instead. + */ + + /** + * Shape of a CMsgAMFindAccounts. + * @typedef {CMsgAMFindAccounts.$Properties} CMsgAMFindAccounts.$Shape */ /** * Constructs a new CMsgAMFindAccounts. * @exports CMsgAMFindAccounts * @classdesc Represents a CMsgAMFindAccounts. - * @implements ICMsgAMFindAccounts * @constructor - * @param {ICMsgAMFindAccounts=} [properties] Properties to set + * @param {CMsgAMFindAccounts.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMFindAccounts(properties) { + var CMsgAMFindAccounts = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMFindAccounts search_type. @@ -9799,10 +12686,14 @@ * @function create * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts=} [properties] Properties to set + * @param {CMsgAMFindAccounts.$Properties=} [properties] Properties to set * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts instance + * @type {{ + * (properties: CMsgAMFindAccounts.$Shape): CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape; + * (properties?: CMsgAMFindAccounts.$Properties): CMsgAMFindAccounts; + * }} */ - CMsgAMFindAccounts.create = function create(properties) { + CMsgAMFindAccounts.create = function(properties) { return new CMsgAMFindAccounts(properties); }; @@ -9811,17 +12702,24 @@ * @function encode * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts} message CMsgAMFindAccounts message or plain object to encode + * @param {CMsgAMFindAccounts.$Properties} message CMsgAMFindAccounts message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccounts.encode = function encode(message, writer) { + CMsgAMFindAccounts.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.search_type != null && Object.hasOwnProperty.call(message, "search_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.search_type); - if (message.search_string != null && Object.hasOwnProperty.call(message, "search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.search_string); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9830,12 +12728,12 @@ * @function encodeDelimited * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts} message CMsgAMFindAccounts message or plain object to encode + * @param {CMsgAMFindAccounts.$Properties} message CMsgAMFindAccounts message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccounts.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMFindAccounts.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9845,28 +12743,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts + * @returns {CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape} CMsgAMFindAccounts * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccounts.decode = function decode(reader, length) { + CMsgAMFindAccounts.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMFindAccounts(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMFindAccounts(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.search_type = reader.uint32(); - break; - case 2: - message.search_string = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.search_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.search_string = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9876,11 +12794,11 @@ * @memberof CMsgAMFindAccounts * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts + * @returns {CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape} CMsgAMFindAccounts * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccounts.decodeDelimited = function decodeDelimited(reader) { + CMsgAMFindAccounts.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9894,13 +12812,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMFindAccounts.verify = function verify(message) { + CMsgAMFindAccounts.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.search_type != null && message.hasOwnProperty("search_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) if (!$util.isInteger(message.search_type)) return "search_type: integer expected"; - if (message.search_string != null && message.hasOwnProperty("search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) if (!$util.isString(message.search_string)) return "search_string: string expected"; return null; @@ -9914,14 +12836,20 @@ * @param {Object.} object Plain object * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts */ - CMsgAMFindAccounts.fromObject = function fromObject(object) { + CMsgAMFindAccounts.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMFindAccounts) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMFindAccounts: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMFindAccounts(); if (object.search_type != null) message.search_type = object.search_type >>> 0; if (object.search_string != null) - message.search_string = String(object.search_string); + message.search_string = $String(object.search_string); return message; }; @@ -9934,17 +12862,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMFindAccounts.toObject = function toObject(message, options) { + CMsgAMFindAccounts.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.search_type = 0; object.search_string = ""; } - if (message.search_type != null && message.hasOwnProperty("search_type")) + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) object.search_type = message.search_type; - if (message.search_string != null && message.hasOwnProperty("search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) object.search_string = message.search_string; return object; }; @@ -9956,8 +12888,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMFindAccounts.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMFindAccounts.prototype.toJSON = function() { + return CMsgAMFindAccounts.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMFindAccounts + * @function getTypeUrl + * @memberof CMsgAMFindAccounts + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMFindAccounts.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMFindAccounts"; }; return CMsgAMFindAccounts; @@ -9965,28 +12911,41 @@ $root.CMsgAMFindAccountsResponse = (function() { + /** + * Properties of a CMsgAMFindAccountsResponse. + * @typedef {Object} CMsgAMFindAccountsResponse.$Properties + * @property {Array.|null} [steam_id] CMsgAMFindAccountsResponse steam_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMFindAccountsResponse. * @exports ICMsgAMFindAccountsResponse * @interface ICMsgAMFindAccountsResponse - * @property {Array.|null} [steam_id] CMsgAMFindAccountsResponse steam_id + * @augments CMsgAMFindAccountsResponse.$Properties + * @deprecated Use CMsgAMFindAccountsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMFindAccountsResponse. + * @typedef {CMsgAMFindAccountsResponse.$Properties} CMsgAMFindAccountsResponse.$Shape */ /** * Constructs a new CMsgAMFindAccountsResponse. * @exports CMsgAMFindAccountsResponse * @classdesc Represents a CMsgAMFindAccountsResponse. - * @implements ICMsgAMFindAccountsResponse * @constructor - * @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set + * @param {CMsgAMFindAccountsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMFindAccountsResponse(properties) { + var CMsgAMFindAccountsResponse = function (properties) { this.steam_id = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMFindAccountsResponse steam_id. @@ -10001,10 +12960,14 @@ * @function create * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set + * @param {CMsgAMFindAccountsResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse instance + * @type {{ + * (properties: CMsgAMFindAccountsResponse.$Shape): CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape; + * (properties?: CMsgAMFindAccountsResponse.$Properties): CMsgAMFindAccountsResponse; + * }} */ - CMsgAMFindAccountsResponse.create = function create(properties) { + CMsgAMFindAccountsResponse.create = function(properties) { return new CMsgAMFindAccountsResponse(properties); }; @@ -10013,16 +12976,23 @@ * @function encode * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse} message CMsgAMFindAccountsResponse message or plain object to encode + * @param {CMsgAMFindAccountsResponse.$Properties} message CMsgAMFindAccountsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccountsResponse.encode = function encode(message, writer) { + CMsgAMFindAccountsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.steam_id != null && message.steam_id.length) for (var i = 0; i < message.steam_id.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10031,12 +13001,12 @@ * @function encodeDelimited * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse} message CMsgAMFindAccountsResponse message or plain object to encode + * @param {CMsgAMFindAccountsResponse.$Properties} message CMsgAMFindAccountsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccountsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMFindAccountsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10046,32 +13016,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse + * @returns {CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape} CMsgAMFindAccountsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccountsResponse.decode = function decode(reader, length) { + CMsgAMFindAccountsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMFindAccountsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMFindAccountsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.steam_id && message.steam_id.length)) - message.steam_id = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.steam_id.push(reader.fixed64()); - } else - message.steam_id.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.steam_id && message.steam_id.length)) + message.steam_id = []; + reader.fixed64s(message.steam_id); + continue; + } + if (wireType !== 1) + break; + if (!(message.steam_id && message.steam_id.length)) + message.steam_id = []; + message.steam_id.push(reader.fixed64()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10081,11 +13069,11 @@ * @memberof CMsgAMFindAccountsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse + * @returns {CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape} CMsgAMFindAccountsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccountsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMFindAccountsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10099,11 +13087,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMFindAccountsResponse.verify = function verify(message) { + CMsgAMFindAccountsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) { - if (!Array.isArray(message.steam_id)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) { + if (!$Array.isArray(message.steam_id)) return "steam_id: array expected"; for (var i = 0; i < message.steam_id.length; ++i) if (!$util.isInteger(message.steam_id[i]) && !(message.steam_id[i] && $util.isInteger(message.steam_id[i].low) && $util.isInteger(message.steam_id[i].high))) @@ -10120,23 +13112,29 @@ * @param {Object.} object Plain object * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse */ - CMsgAMFindAccountsResponse.fromObject = function fromObject(object) { + CMsgAMFindAccountsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMFindAccountsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMFindAccountsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMFindAccountsResponse(); if (object.steam_id) { - if (!Array.isArray(object.steam_id)) - throw TypeError(".CMsgAMFindAccountsResponse.steam_id: array expected"); - message.steam_id = []; + if (!$Array.isArray(object.steam_id)) + throw $TypeError(".CMsgAMFindAccountsResponse.steam_id: array expected"); + message.steam_id = $Array(object.steam_id.length); for (var i = 0; i < object.steam_id.length; ++i) if ($util.Long) - (message.steam_id[i] = $util.Long.fromValue(object.steam_id[i])).unsigned = false; + message.steam_id[i] = $util.Long.fromValue(object.steam_id[i], true); else if (typeof object.steam_id[i] === "string") - message.steam_id[i] = parseInt(object.steam_id[i], 10); + message.steam_id[i] = $parseInt(object.steam_id[i], 10); else if (typeof object.steam_id[i] === "number") message.steam_id[i] = object.steam_id[i]; else if (typeof object.steam_id[i] === "object") - message.steam_id[i] = new $util.LongBits(object.steam_id[i].low >>> 0, object.steam_id[i].high >>> 0).toNumber(); + message.steam_id[i] = new $util.LongBits(object.steam_id[i].low >>> 0, object.steam_id[i].high >>> 0).toNumber(true); } return message; }; @@ -10150,19 +13148,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMFindAccountsResponse.toObject = function toObject(message, options) { + CMsgAMFindAccountsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.steam_id = []; if (message.steam_id && message.steam_id.length) { - object.steam_id = []; + object.steam_id = $Array(message.steam_id.length); for (var j = 0; j < message.steam_id.length; ++j) - if (typeof message.steam_id[j] === "number") - object.steam_id[j] = options.longs === String ? String(message.steam_id[j]) : message.steam_id[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id[j] = typeof message.steam_id[j] === "number" ? $BigInt(message.steam_id[j]) : $util.Long.fromBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0, true).toBigInt(); + else if (typeof message.steam_id[j] === "number") + object.steam_id[j] = options.longs === $String ? $String(message.steam_id[j]) : message.steam_id[j]; else - object.steam_id[j] = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id[j]) : options.longs === Number ? new $util.LongBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0).toNumber() : message.steam_id[j]; + object.steam_id[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id[j]) : options.longs === $Number ? new $util.LongBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0).toNumber(true) : message.steam_id[j]; } return object; }; @@ -10174,8 +13178,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMFindAccountsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMFindAccountsResponse.prototype.toJSON = function() { + return CMsgAMFindAccountsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMFindAccountsResponse + * @function getTypeUrl + * @memberof CMsgAMFindAccountsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMFindAccountsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMFindAccountsResponse"; }; return CMsgAMFindAccountsResponse; @@ -10185,8 +13203,7 @@ /** * Properties of a CMsgNotifyWatchdog. - * @exports ICMsgNotifyWatchdog - * @interface ICMsgNotifyWatchdog + * @typedef {Object} CMsgNotifyWatchdog.$Properties * @property {number|null} [source] CMsgNotifyWatchdog source * @property {number|null} [alert_type] CMsgNotifyWatchdog alert_type * @property {number|null} [alert_destination] CMsgNotifyWatchdog alert_destination @@ -10194,22 +13211,36 @@ * @property {number|null} [time] CMsgNotifyWatchdog time * @property {number|null} [appid] CMsgNotifyWatchdog appid * @property {string|null} [text] CMsgNotifyWatchdog text + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgNotifyWatchdog. + * @exports ICMsgNotifyWatchdog + * @interface ICMsgNotifyWatchdog + * @augments CMsgNotifyWatchdog.$Properties + * @deprecated Use CMsgNotifyWatchdog.$Properties instead. + */ + + /** + * Shape of a CMsgNotifyWatchdog. + * @typedef {CMsgNotifyWatchdog.$Properties} CMsgNotifyWatchdog.$Shape */ /** * Constructs a new CMsgNotifyWatchdog. * @exports CMsgNotifyWatchdog * @classdesc Represents a CMsgNotifyWatchdog. - * @implements ICMsgNotifyWatchdog * @constructor - * @param {ICMsgNotifyWatchdog=} [properties] Properties to set + * @param {CMsgNotifyWatchdog.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotifyWatchdog(properties) { + var CMsgNotifyWatchdog = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgNotifyWatchdog source. @@ -10272,10 +13303,14 @@ * @function create * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog=} [properties] Properties to set + * @param {CMsgNotifyWatchdog.$Properties=} [properties] Properties to set * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog instance + * @type {{ + * (properties: CMsgNotifyWatchdog.$Shape): CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape; + * (properties?: CMsgNotifyWatchdog.$Properties): CMsgNotifyWatchdog; + * }} */ - CMsgNotifyWatchdog.create = function create(properties) { + CMsgNotifyWatchdog.create = function(properties) { return new CMsgNotifyWatchdog(properties); }; @@ -10284,27 +13319,34 @@ * @function encode * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog} message CMsgNotifyWatchdog message or plain object to encode + * @param {CMsgNotifyWatchdog.$Properties} message CMsgNotifyWatchdog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotifyWatchdog.encode = function encode(message, writer) { + CMsgNotifyWatchdog.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.source); - if (message.alert_type != null && Object.hasOwnProperty.call(message, "alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.alert_type); - if (message.alert_destination != null && Object.hasOwnProperty.call(message, "alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.alert_destination); - if (message.critical != null && Object.hasOwnProperty.call(message, "critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.critical); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.time); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.appid); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.text); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10313,12 +13355,12 @@ * @function encodeDelimited * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog} message CMsgNotifyWatchdog message or plain object to encode + * @param {CMsgNotifyWatchdog.$Properties} message CMsgNotifyWatchdog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotifyWatchdog.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotifyWatchdog.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10328,43 +13370,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog + * @returns {CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape} CMsgNotifyWatchdog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotifyWatchdog.decode = function decode(reader, length) { + CMsgNotifyWatchdog.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotifyWatchdog(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotifyWatchdog(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source = reader.uint32(); - break; - case 2: - message.alert_type = reader.uint32(); - break; - case 3: - message.alert_destination = reader.uint32(); - break; - case 4: - message.critical = reader.bool(); - break; - case 5: - message.time = reader.uint32(); - break; - case 6: - message.appid = reader.uint32(); - break; - case 7: - message.text = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.source = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.alert_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.alert_destination = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.critical = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.time = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.text = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10374,11 +13451,11 @@ * @memberof CMsgNotifyWatchdog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog + * @returns {CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape} CMsgNotifyWatchdog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotifyWatchdog.decodeDelimited = function decodeDelimited(reader) { + CMsgNotifyWatchdog.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10392,28 +13469,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotifyWatchdog.verify = function verify(message) { + CMsgNotifyWatchdog.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) if (!$util.isInteger(message.source)) return "source: integer expected"; - if (message.alert_type != null && message.hasOwnProperty("alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) if (!$util.isInteger(message.alert_type)) return "alert_type: integer expected"; - if (message.alert_destination != null && message.hasOwnProperty("alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) if (!$util.isInteger(message.alert_destination)) return "alert_destination: integer expected"; - if (message.critical != null && message.hasOwnProperty("critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) if (typeof message.critical !== "boolean") return "critical: boolean expected"; - if (message.time != null && message.hasOwnProperty("time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) if (!$util.isInteger(message.time)) return "time: integer expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) if (!$util.isString(message.text)) return "text: string expected"; return null; @@ -10427,9 +13508,15 @@ * @param {Object.} object Plain object * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog */ - CMsgNotifyWatchdog.fromObject = function fromObject(object) { + CMsgNotifyWatchdog.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotifyWatchdog) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotifyWatchdog: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotifyWatchdog(); if (object.source != null) message.source = object.source >>> 0; @@ -10438,13 +13525,13 @@ if (object.alert_destination != null) message.alert_destination = object.alert_destination >>> 0; if (object.critical != null) - message.critical = Boolean(object.critical); + message.critical = $Boolean(object.critical); if (object.time != null) message.time = object.time >>> 0; if (object.appid != null) message.appid = object.appid >>> 0; if (object.text != null) - message.text = String(object.text); + message.text = $String(object.text); return message; }; @@ -10457,9 +13544,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotifyWatchdog.toObject = function toObject(message, options) { + CMsgNotifyWatchdog.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.source = 0; @@ -10470,19 +13561,19 @@ object.appid = 0; object.text = ""; } - if (message.source != null && message.hasOwnProperty("source")) + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) object.source = message.source; - if (message.alert_type != null && message.hasOwnProperty("alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) object.alert_type = message.alert_type; - if (message.alert_destination != null && message.hasOwnProperty("alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) object.alert_destination = message.alert_destination; - if (message.critical != null && message.hasOwnProperty("critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) object.critical = message.critical; - if (message.time != null && message.hasOwnProperty("time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) object.time = message.time; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) object.text = message.text; return object; }; @@ -10494,8 +13585,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotifyWatchdog.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotifyWatchdog.prototype.toJSON = function() { + return CMsgNotifyWatchdog.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotifyWatchdog + * @function getTypeUrl + * @memberof CMsgNotifyWatchdog + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotifyWatchdog.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotifyWatchdog"; }; return CMsgNotifyWatchdog; @@ -10503,27 +13608,40 @@ $root.CMsgAMGetLicenses = (function() { + /** + * Properties of a CMsgAMGetLicenses. + * @typedef {Object} CMsgAMGetLicenses.$Properties + * @property {number|Long|null} [steamid] CMsgAMGetLicenses steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMGetLicenses. * @exports ICMsgAMGetLicenses * @interface ICMsgAMGetLicenses - * @property {number|Long|null} [steamid] CMsgAMGetLicenses steamid + * @augments CMsgAMGetLicenses.$Properties + * @deprecated Use CMsgAMGetLicenses.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetLicenses. + * @typedef {CMsgAMGetLicenses.$Properties} CMsgAMGetLicenses.$Shape */ /** * Constructs a new CMsgAMGetLicenses. * @exports CMsgAMGetLicenses * @classdesc Represents a CMsgAMGetLicenses. - * @implements ICMsgAMGetLicenses * @constructor - * @param {ICMsgAMGetLicenses=} [properties] Properties to set + * @param {CMsgAMGetLicenses.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetLicenses(properties) { + var CMsgAMGetLicenses = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetLicenses steamid. @@ -10531,17 +13649,21 @@ * @memberof CMsgAMGetLicenses * @instance */ - CMsgAMGetLicenses.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetLicenses.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgAMGetLicenses instance using the specified properties. * @function create * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses=} [properties] Properties to set + * @param {CMsgAMGetLicenses.$Properties=} [properties] Properties to set * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses instance + * @type {{ + * (properties: CMsgAMGetLicenses.$Shape): CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape; + * (properties?: CMsgAMGetLicenses.$Properties): CMsgAMGetLicenses; + * }} */ - CMsgAMGetLicenses.create = function create(properties) { + CMsgAMGetLicenses.create = function(properties) { return new CMsgAMGetLicenses(properties); }; @@ -10550,15 +13672,22 @@ * @function encode * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses} message CMsgAMGetLicenses message or plain object to encode + * @param {CMsgAMGetLicenses.$Properties} message CMsgAMGetLicenses message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicenses.encode = function encode(message, writer) { + CMsgAMGetLicenses.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10567,12 +13696,12 @@ * @function encodeDelimited * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses} message CMsgAMGetLicenses message or plain object to encode + * @param {CMsgAMGetLicenses.$Properties} message CMsgAMGetLicenses message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicenses.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetLicenses.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10582,25 +13711,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses + * @returns {CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape} CMsgAMGetLicenses * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicenses.decode = function decode(reader, length) { + CMsgAMGetLicenses.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetLicenses(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetLicenses(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10610,11 +13756,11 @@ * @memberof CMsgAMGetLicenses * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses + * @returns {CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape} CMsgAMGetLicenses * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicenses.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetLicenses.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10628,10 +13774,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetLicenses.verify = function verify(message) { + CMsgAMGetLicenses.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -10645,19 +13795,25 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses */ - CMsgAMGetLicenses.fromObject = function fromObject(object) { + CMsgAMGetLicenses.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetLicenses) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetLicenses: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetLicenses(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -10670,21 +13826,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetLicenses.toObject = function toObject(message, options) { + CMsgAMGetLicenses.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -10695,8 +13857,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetLicenses.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetLicenses.prototype.toJSON = function() { + return CMsgAMGetLicenses.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetLicenses + * @function getTypeUrl + * @memberof CMsgAMGetLicenses + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetLicenses.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetLicenses"; }; return CMsgAMGetLicenses; @@ -10706,27 +13882,40 @@ /** * Properties of a CMsgPackageLicense. - * @exports ICMsgPackageLicense - * @interface ICMsgPackageLicense + * @typedef {Object} CMsgPackageLicense.$Properties * @property {number|null} [package_id] CMsgPackageLicense package_id * @property {number|null} [time_created] CMsgPackageLicense time_created * @property {number|null} [owner_id] CMsgPackageLicense owner_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPackageLicense. + * @exports ICMsgPackageLicense + * @interface ICMsgPackageLicense + * @augments CMsgPackageLicense.$Properties + * @deprecated Use CMsgPackageLicense.$Properties instead. + */ + + /** + * Shape of a CMsgPackageLicense. + * @typedef {CMsgPackageLicense.$Properties} CMsgPackageLicense.$Shape */ /** * Constructs a new CMsgPackageLicense. * @exports CMsgPackageLicense * @classdesc Represents a CMsgPackageLicense. - * @implements ICMsgPackageLicense * @constructor - * @param {ICMsgPackageLicense=} [properties] Properties to set + * @param {CMsgPackageLicense.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPackageLicense(properties) { + var CMsgPackageLicense = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPackageLicense package_id. @@ -10757,10 +13946,14 @@ * @function create * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense=} [properties] Properties to set + * @param {CMsgPackageLicense.$Properties=} [properties] Properties to set * @returns {CMsgPackageLicense} CMsgPackageLicense instance + * @type {{ + * (properties: CMsgPackageLicense.$Shape): CMsgPackageLicense & CMsgPackageLicense.$Shape; + * (properties?: CMsgPackageLicense.$Properties): CMsgPackageLicense; + * }} */ - CMsgPackageLicense.create = function create(properties) { + CMsgPackageLicense.create = function(properties) { return new CMsgPackageLicense(properties); }; @@ -10769,19 +13962,26 @@ * @function encode * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense} message CMsgPackageLicense message or plain object to encode + * @param {CMsgPackageLicense.$Properties} message CMsgPackageLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPackageLicense.encode = function encode(message, writer) { + CMsgPackageLicense.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.package_id != null && Object.hasOwnProperty.call(message, "package_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.package_id); - if (message.time_created != null && Object.hasOwnProperty.call(message, "time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.time_created); - if (message.owner_id != null && Object.hasOwnProperty.call(message, "owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.owner_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10790,12 +13990,12 @@ * @function encodeDelimited * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense} message CMsgPackageLicense message or plain object to encode + * @param {CMsgPackageLicense.$Properties} message CMsgPackageLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPackageLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPackageLicense.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10805,31 +14005,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPackageLicense} CMsgPackageLicense + * @returns {CMsgPackageLicense & CMsgPackageLicense.$Shape} CMsgPackageLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPackageLicense.decode = function decode(reader, length) { + CMsgPackageLicense.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPackageLicense(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPackageLicense(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.package_id = reader.uint32(); - break; - case 2: - message.time_created = reader.uint32(); - break; - case 3: - message.owner_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.package_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.time_created = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.owner_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10839,11 +14062,11 @@ * @memberof CMsgPackageLicense * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPackageLicense} CMsgPackageLicense + * @returns {CMsgPackageLicense & CMsgPackageLicense.$Shape} CMsgPackageLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPackageLicense.decodeDelimited = function decodeDelimited(reader) { + CMsgPackageLicense.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10857,16 +14080,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPackageLicense.verify = function verify(message) { + CMsgPackageLicense.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) if (!$util.isInteger(message.package_id)) return "package_id: integer expected"; - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) if (!$util.isInteger(message.time_created)) return "time_created: integer expected"; - if (message.owner_id != null && message.hasOwnProperty("owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) if (!$util.isInteger(message.owner_id)) return "owner_id: integer expected"; return null; @@ -10880,9 +14107,15 @@ * @param {Object.} object Plain object * @returns {CMsgPackageLicense} CMsgPackageLicense */ - CMsgPackageLicense.fromObject = function fromObject(object) { + CMsgPackageLicense.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPackageLicense) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPackageLicense: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPackageLicense(); if (object.package_id != null) message.package_id = object.package_id >>> 0; @@ -10902,20 +14135,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPackageLicense.toObject = function toObject(message, options) { + CMsgPackageLicense.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.package_id = 0; object.time_created = 0; object.owner_id = 0; } - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) object.package_id = message.package_id; - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) object.time_created = message.time_created; - if (message.owner_id != null && message.hasOwnProperty("owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) object.owner_id = message.owner_id; return object; }; @@ -10927,8 +14164,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPackageLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPackageLicense.prototype.toJSON = function() { + return CMsgPackageLicense.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPackageLicense + * @function getTypeUrl + * @memberof CMsgPackageLicense + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPackageLicense.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPackageLicense"; }; return CMsgPackageLicense; @@ -10936,33 +14187,46 @@ $root.CMsgAMGetLicensesResponse = (function() { + /** + * Properties of a CMsgAMGetLicensesResponse. + * @typedef {Object} CMsgAMGetLicensesResponse.$Properties + * @property {Array.|null} [license] CMsgAMGetLicensesResponse license + * @property {number|null} [result] CMsgAMGetLicensesResponse result + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMGetLicensesResponse. * @exports ICMsgAMGetLicensesResponse * @interface ICMsgAMGetLicensesResponse - * @property {Array.|null} [license] CMsgAMGetLicensesResponse license - * @property {number|null} [result] CMsgAMGetLicensesResponse result + * @augments CMsgAMGetLicensesResponse.$Properties + * @deprecated Use CMsgAMGetLicensesResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetLicensesResponse. + * @typedef {CMsgAMGetLicensesResponse.$Properties} CMsgAMGetLicensesResponse.$Shape */ /** * Constructs a new CMsgAMGetLicensesResponse. * @exports CMsgAMGetLicensesResponse * @classdesc Represents a CMsgAMGetLicensesResponse. - * @implements ICMsgAMGetLicensesResponse * @constructor - * @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set + * @param {CMsgAMGetLicensesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetLicensesResponse(properties) { + var CMsgAMGetLicensesResponse = function (properties) { this.license = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetLicensesResponse license. - * @member {Array.} license + * @member {Array.} license * @memberof CMsgAMGetLicensesResponse * @instance */ @@ -10981,10 +14245,14 @@ * @function create * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set + * @param {CMsgAMGetLicensesResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse instance + * @type {{ + * (properties: CMsgAMGetLicensesResponse.$Shape): CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape; + * (properties?: CMsgAMGetLicensesResponse.$Properties): CMsgAMGetLicensesResponse; + * }} */ - CMsgAMGetLicensesResponse.create = function create(properties) { + CMsgAMGetLicensesResponse.create = function(properties) { return new CMsgAMGetLicensesResponse(properties); }; @@ -10993,18 +14261,25 @@ * @function encode * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse} message CMsgAMGetLicensesResponse message or plain object to encode + * @param {CMsgAMGetLicensesResponse.$Properties} message CMsgAMGetLicensesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicensesResponse.encode = function encode(message, writer) { + CMsgAMGetLicensesResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.license != null && message.license.length) for (var i = 0; i < message.license.length; ++i) - $root.CMsgPackageLicense.encode(message.license[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.CMsgPackageLicense.encode(message.license[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.result); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11013,12 +14288,12 @@ * @function encodeDelimited * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse} message CMsgAMGetLicensesResponse message or plain object to encode + * @param {CMsgAMGetLicensesResponse.$Properties} message CMsgAMGetLicensesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicensesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetLicensesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11028,30 +14303,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse + * @returns {CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape} CMsgAMGetLicensesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicensesResponse.decode = function decode(reader, length) { + CMsgAMGetLicensesResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetLicensesResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetLicensesResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.license && message.license.length)) - message.license = []; - message.license.push($root.CMsgPackageLicense.decode(reader, reader.uint32())); - break; - case 2: - message.result = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.license && message.license.length)) + message.license = []; + message.license.push($root.CMsgPackageLicense.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11061,11 +14356,11 @@ * @memberof CMsgAMGetLicensesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse + * @returns {CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape} CMsgAMGetLicensesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicensesResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetLicensesResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11079,19 +14374,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetLicensesResponse.verify = function verify(message) { + CMsgAMGetLicensesResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.license != null && message.hasOwnProperty("license")) { - if (!Array.isArray(message.license)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.license != null && $Object.hasOwnProperty.call(message, "license")) { + if (!$Array.isArray(message.license)) return "license: array expected"; for (var i = 0; i < message.license.length; ++i) { - var error = $root.CMsgPackageLicense.verify(message.license[i]); + var error = $root.CMsgPackageLicense.verify(message.license[i], _depth + 1); if (error) return "license." + error; } } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; return null; @@ -11105,18 +14404,24 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse */ - CMsgAMGetLicensesResponse.fromObject = function fromObject(object) { + CMsgAMGetLicensesResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetLicensesResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetLicensesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetLicensesResponse(); if (object.license) { - if (!Array.isArray(object.license)) - throw TypeError(".CMsgAMGetLicensesResponse.license: array expected"); - message.license = []; + if (!$Array.isArray(object.license)) + throw $TypeError(".CMsgAMGetLicensesResponse.license: array expected"); + message.license = $Array(object.license.length); for (var i = 0; i < object.license.length; ++i) { - if (typeof object.license[i] !== "object") - throw TypeError(".CMsgAMGetLicensesResponse.license: object expected"); - message.license[i] = $root.CMsgPackageLicense.fromObject(object.license[i]); + if (!$util.isObject(object.license[i])) + throw $TypeError(".CMsgAMGetLicensesResponse.license: object expected"); + message.license[i] = $root.CMsgPackageLicense.fromObject(object.license[i], _depth + 1); } } if (object.result != null) @@ -11133,20 +14438,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetLicensesResponse.toObject = function toObject(message, options) { + CMsgAMGetLicensesResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.license = []; if (options.defaults) object.result = 0; if (message.license && message.license.length) { - object.license = []; + object.license = $Array(message.license.length); for (var j = 0; j < message.license.length; ++j) - object.license[j] = $root.CMsgPackageLicense.toObject(message.license[j], options); + object.license[j] = $root.CMsgPackageLicense.toObject(message.license[j], options, _depth + 1); } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; return object; }; @@ -11158,8 +14467,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetLicensesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetLicensesResponse.prototype.toJSON = function() { + return CMsgAMGetLicensesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetLicensesResponse + * @function getTypeUrl + * @memberof CMsgAMGetLicensesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetLicensesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetLicensesResponse"; }; return CMsgAMGetLicensesResponse; @@ -11169,28 +14492,41 @@ /** * Properties of a CMsgAMGetUserGameStats. - * @exports ICMsgAMGetUserGameStats - * @interface ICMsgAMGetUserGameStats + * @typedef {Object} CMsgAMGetUserGameStats.$Properties * @property {number|Long|null} [steam_id] CMsgAMGetUserGameStats steam_id * @property {number|Long|null} [game_id] CMsgAMGetUserGameStats game_id * @property {Array.|null} [stats] CMsgAMGetUserGameStats stats + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGetUserGameStats. + * @exports ICMsgAMGetUserGameStats + * @interface ICMsgAMGetUserGameStats + * @augments CMsgAMGetUserGameStats.$Properties + * @deprecated Use CMsgAMGetUserGameStats.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetUserGameStats. + * @typedef {CMsgAMGetUserGameStats.$Properties} CMsgAMGetUserGameStats.$Shape */ /** * Constructs a new CMsgAMGetUserGameStats. * @exports CMsgAMGetUserGameStats * @classdesc Represents a CMsgAMGetUserGameStats. - * @implements ICMsgAMGetUserGameStats * @constructor - * @param {ICMsgAMGetUserGameStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetUserGameStats(properties) { + var CMsgAMGetUserGameStats = function (properties) { this.stats = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetUserGameStats steam_id. @@ -11198,7 +14534,7 @@ * @memberof CMsgAMGetUserGameStats * @instance */ - CMsgAMGetUserGameStats.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStats.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStats game_id. @@ -11206,7 +14542,7 @@ * @memberof CMsgAMGetUserGameStats * @instance */ - CMsgAMGetUserGameStats.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStats.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStats stats. @@ -11221,10 +14557,14 @@ * @function create * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStats.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats instance + * @type {{ + * (properties: CMsgAMGetUserGameStats.$Shape): CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape; + * (properties?: CMsgAMGetUserGameStats.$Properties): CMsgAMGetUserGameStats; + * }} */ - CMsgAMGetUserGameStats.create = function create(properties) { + CMsgAMGetUserGameStats.create = function(properties) { return new CMsgAMGetUserGameStats(properties); }; @@ -11233,20 +14573,27 @@ * @function encode * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats} message CMsgAMGetUserGameStats message or plain object to encode + * @param {CMsgAMGetUserGameStats.$Properties} message CMsgAMGetUserGameStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStats.encode = function encode(message, writer) { + CMsgAMGetUserGameStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.game_id != null && Object.hasOwnProperty.call(message, "game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.game_id); if (message.stats != null && message.stats.length) for (var i = 0; i < message.stats.length; ++i) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stats[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11255,12 +14602,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats} message CMsgAMGetUserGameStats message or plain object to encode + * @param {CMsgAMGetUserGameStats.$Properties} message CMsgAMGetUserGameStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetUserGameStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11270,38 +14617,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats + * @returns {CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape} CMsgAMGetUserGameStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStats.decode = function decode(reader, length) { + CMsgAMGetUserGameStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.game_id = reader.fixed64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 3: - if (!(message.stats && message.stats.length)) - message.stats = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.stats.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.game_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.stats && message.stats.length)) + message.stats = []; + reader.uint32s(message.stats); + continue; + } + if (wireType !== 0) + break; + if (!(message.stats && message.stats.length)) + message.stats = []; message.stats.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11311,11 +14682,11 @@ * @memberof CMsgAMGetUserGameStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats + * @returns {CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape} CMsgAMGetUserGameStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStats.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetUserGameStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11329,17 +14700,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetUserGameStats.verify = function verify(message) { + CMsgAMGetUserGameStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.game_id != null && message.hasOwnProperty("game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) if (!$util.isInteger(message.game_id) && !(message.game_id && $util.isInteger(message.game_id.low) && $util.isInteger(message.game_id.high))) return "game_id: integer|Long expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - if (!Array.isArray(message.stats)) + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) { + if (!$Array.isArray(message.stats)) return "stats: array expected"; for (var i = 0; i < message.stats.length; ++i) if (!$util.isInteger(message.stats[i])) @@ -11356,32 +14731,38 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats */ - CMsgAMGetUserGameStats.fromObject = function fromObject(object) { + CMsgAMGetUserGameStats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStats(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.game_id != null) if ($util.Long) - (message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false; + message.game_id = $util.Long.fromValue(object.game_id, true); else if (typeof object.game_id === "string") - message.game_id = parseInt(object.game_id, 10); + message.game_id = $parseInt(object.game_id, 10); else if (typeof object.game_id === "number") message.game_id = object.game_id; else if (typeof object.game_id === "object") - message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(); + message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(true); if (object.stats) { - if (!Array.isArray(object.stats)) - throw TypeError(".CMsgAMGetUserGameStats.stats: array expected"); - message.stats = []; + if (!$Array.isArray(object.stats)) + throw $TypeError(".CMsgAMGetUserGameStats.stats: array expected"); + message.stats = $Array(object.stats.length); for (var i = 0; i < object.stats.length; ++i) message.stats[i] = object.stats[i] >>> 0; } @@ -11397,36 +14778,44 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetUserGameStats.toObject = function toObject(message, options) { + CMsgAMGetUserGameStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.stats = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.game_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.game_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.game_id = options.longs === String ? "0" : 0; + object.game_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.game_id != null && message.hasOwnProperty("game_id")) - if (typeof message.game_id === "number") - object.game_id = options.longs === String ? String(message.game_id) : message.game_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.game_id = typeof message.game_id === "number" ? $BigInt(message.game_id) : $util.Long.fromBits(message.game_id.low >>> 0, message.game_id.high >>> 0, true).toBigInt(); + else if (typeof message.game_id === "number") + object.game_id = options.longs === $String ? $String(message.game_id) : message.game_id; else - object.game_id = options.longs === String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber() : message.game_id; + object.game_id = options.longs === $String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === $Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber(true) : message.game_id; if (message.stats && message.stats.length) { - object.stats = []; + object.stats = $Array(message.stats.length); for (var j = 0; j < message.stats.length; ++j) object.stats[j] = message.stats[j]; } @@ -11440,8 +14829,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetUserGameStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetUserGameStats.prototype.toJSON = function() { + return CMsgAMGetUserGameStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetUserGameStats + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetUserGameStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStats"; }; return CMsgAMGetUserGameStats; @@ -11451,31 +14854,44 @@ /** * Properties of a CMsgAMGetUserGameStatsResponse. - * @exports ICMsgAMGetUserGameStatsResponse - * @interface ICMsgAMGetUserGameStatsResponse + * @typedef {Object} CMsgAMGetUserGameStatsResponse.$Properties * @property {number|Long|null} [steam_id] CMsgAMGetUserGameStatsResponse steam_id * @property {number|Long|null} [game_id] CMsgAMGetUserGameStatsResponse game_id * @property {number|null} [eresult] CMsgAMGetUserGameStatsResponse eresult - * @property {Array.|null} [stats] CMsgAMGetUserGameStatsResponse stats - * @property {Array.|null} [achievement_blocks] CMsgAMGetUserGameStatsResponse achievement_blocks + * @property {Array.|null} [stats] CMsgAMGetUserGameStatsResponse stats + * @property {Array.|null} [achievement_blocks] CMsgAMGetUserGameStatsResponse achievement_blocks + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGetUserGameStatsResponse. + * @exports ICMsgAMGetUserGameStatsResponse + * @interface ICMsgAMGetUserGameStatsResponse + * @augments CMsgAMGetUserGameStatsResponse.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetUserGameStatsResponse. + * @typedef {CMsgAMGetUserGameStatsResponse.$Properties} CMsgAMGetUserGameStatsResponse.$Shape */ /** * Constructs a new CMsgAMGetUserGameStatsResponse. * @exports CMsgAMGetUserGameStatsResponse * @classdesc Represents a CMsgAMGetUserGameStatsResponse. - * @implements ICMsgAMGetUserGameStatsResponse * @constructor - * @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetUserGameStatsResponse(properties) { + var CMsgAMGetUserGameStatsResponse = function (properties) { this.stats = []; this.achievement_blocks = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetUserGameStatsResponse steam_id. @@ -11483,7 +14899,7 @@ * @memberof CMsgAMGetUserGameStatsResponse * @instance */ - CMsgAMGetUserGameStatsResponse.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStatsResponse.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStatsResponse game_id. @@ -11491,7 +14907,7 @@ * @memberof CMsgAMGetUserGameStatsResponse * @instance */ - CMsgAMGetUserGameStatsResponse.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStatsResponse.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStatsResponse eresult. @@ -11503,7 +14919,7 @@ /** * CMsgAMGetUserGameStatsResponse stats. - * @member {Array.} stats + * @member {Array.} stats * @memberof CMsgAMGetUserGameStatsResponse * @instance */ @@ -11511,7 +14927,7 @@ /** * CMsgAMGetUserGameStatsResponse achievement_blocks. - * @member {Array.} achievement_blocks + * @member {Array.} achievement_blocks * @memberof CMsgAMGetUserGameStatsResponse * @instance */ @@ -11522,10 +14938,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.$Shape): CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.$Properties): CMsgAMGetUserGameStatsResponse; + * }} */ - CMsgAMGetUserGameStatsResponse.create = function create(properties) { + CMsgAMGetUserGameStatsResponse.create = function(properties) { return new CMsgAMGetUserGameStatsResponse(properties); }; @@ -11534,25 +14954,32 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse} message CMsgAMGetUserGameStatsResponse message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.$Properties} message CMsgAMGetUserGameStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStatsResponse.encode = function encode(message, writer) { + CMsgAMGetUserGameStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.game_id != null && Object.hasOwnProperty.call(message, "game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.game_id); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.eresult); if (message.stats != null && message.stats.length) for (var i = 0; i < message.stats.length; ++i) - $root.CMsgAMGetUserGameStatsResponse.Stats.encode(message.stats[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgAMGetUserGameStatsResponse.Stats.encode(message.stats[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.achievement_blocks != null && message.achievement_blocks.length) for (var i = 0; i < message.achievement_blocks.length; ++i) - $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.encode(message.achievement_blocks[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.encode(message.achievement_blocks[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11561,12 +14988,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse} message CMsgAMGetUserGameStatsResponse message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.$Properties} message CMsgAMGetUserGameStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetUserGameStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11576,41 +15003,70 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse + * @returns {CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape} CMsgAMGetUserGameStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStatsResponse.decode = function decode(reader, length) { + CMsgAMGetUserGameStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.game_id = reader.fixed64(); - break; - case 3: - message.eresult = reader.int32(); - break; - case 4: - if (!(message.stats && message.stats.length)) - message.stats = []; - message.stats.push($root.CMsgAMGetUserGameStatsResponse.Stats.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.achievement_blocks && message.achievement_blocks.length)) - message.achievement_blocks = []; - message.achievement_blocks.push($root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.game_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.stats && message.stats.length)) + message.stats = []; + message.stats.push($root.CMsgAMGetUserGameStatsResponse.Stats.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.achievement_blocks && message.achievement_blocks.length)) + message.achievement_blocks = []; + message.achievement_blocks.push($root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11620,11 +15076,11 @@ * @memberof CMsgAMGetUserGameStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse + * @returns {CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape} CMsgAMGetUserGameStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetUserGameStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11638,32 +15094,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetUserGameStatsResponse.verify = function verify(message) { + CMsgAMGetUserGameStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.game_id != null && message.hasOwnProperty("game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) if (!$util.isInteger(message.game_id) && !(message.game_id && $util.isInteger(message.game_id.low) && $util.isInteger(message.game_id.high))) return "game_id: integer|Long expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - if (!Array.isArray(message.stats)) + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) { + if (!$Array.isArray(message.stats)) return "stats: array expected"; for (var i = 0; i < message.stats.length; ++i) { - var error = $root.CMsgAMGetUserGameStatsResponse.Stats.verify(message.stats[i]); + var error = $root.CMsgAMGetUserGameStatsResponse.Stats.verify(message.stats[i], _depth + 1); if (error) return "stats." + error; } } - if (message.achievement_blocks != null && message.hasOwnProperty("achievement_blocks")) { - if (!Array.isArray(message.achievement_blocks)) + if (message.achievement_blocks != null && $Object.hasOwnProperty.call(message, "achievement_blocks")) { + if (!$Array.isArray(message.achievement_blocks)) return "achievement_blocks: array expected"; for (var i = 0; i < message.achievement_blocks.length; ++i) { - var error = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify(message.achievement_blocks[i]); + var error = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify(message.achievement_blocks[i], _depth + 1); if (error) return "achievement_blocks." + error; } @@ -11679,48 +15139,54 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse */ - CMsgAMGetUserGameStatsResponse.fromObject = function fromObject(object) { + CMsgAMGetUserGameStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.game_id != null) if ($util.Long) - (message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false; + message.game_id = $util.Long.fromValue(object.game_id, true); else if (typeof object.game_id === "string") - message.game_id = parseInt(object.game_id, 10); + message.game_id = $parseInt(object.game_id, 10); else if (typeof object.game_id === "number") message.game_id = object.game_id; else if (typeof object.game_id === "object") - message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(); + message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(true); if (object.eresult != null) message.eresult = object.eresult | 0; if (object.stats) { - if (!Array.isArray(object.stats)) - throw TypeError(".CMsgAMGetUserGameStatsResponse.stats: array expected"); - message.stats = []; + if (!$Array.isArray(object.stats)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.stats: array expected"); + message.stats = $Array(object.stats.length); for (var i = 0; i < object.stats.length; ++i) { - if (typeof object.stats[i] !== "object") - throw TypeError(".CMsgAMGetUserGameStatsResponse.stats: object expected"); - message.stats[i] = $root.CMsgAMGetUserGameStatsResponse.Stats.fromObject(object.stats[i]); + if (!$util.isObject(object.stats[i])) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.stats: object expected"); + message.stats[i] = $root.CMsgAMGetUserGameStatsResponse.Stats.fromObject(object.stats[i], _depth + 1); } } if (object.achievement_blocks) { - if (!Array.isArray(object.achievement_blocks)) - throw TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: array expected"); - message.achievement_blocks = []; + if (!$Array.isArray(object.achievement_blocks)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: array expected"); + message.achievement_blocks = $Array(object.achievement_blocks.length); for (var i = 0; i < object.achievement_blocks.length; ++i) { - if (typeof object.achievement_blocks[i] !== "object") - throw TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: object expected"); - message.achievement_blocks[i] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.fromObject(object.achievement_blocks[i]); + if (!$util.isObject(object.achievement_blocks[i])) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: object expected"); + message.achievement_blocks[i] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.fromObject(object.achievement_blocks[i], _depth + 1); } } return message; @@ -11735,9 +15201,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetUserGameStatsResponse.toObject = function toObject(message, options) { + CMsgAMGetUserGameStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.stats = []; @@ -11745,38 +15215,42 @@ } if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.game_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.game_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.game_id = options.longs === String ? "0" : 0; + object.game_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.eresult = 2; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.game_id != null && message.hasOwnProperty("game_id")) - if (typeof message.game_id === "number") - object.game_id = options.longs === String ? String(message.game_id) : message.game_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.game_id = typeof message.game_id === "number" ? $BigInt(message.game_id) : $util.Long.fromBits(message.game_id.low >>> 0, message.game_id.high >>> 0, true).toBigInt(); + else if (typeof message.game_id === "number") + object.game_id = options.longs === $String ? $String(message.game_id) : message.game_id; else - object.game_id = options.longs === String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber() : message.game_id; - if (message.eresult != null && message.hasOwnProperty("eresult")) + object.game_id = options.longs === $String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === $Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber(true) : message.game_id; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; if (message.stats && message.stats.length) { - object.stats = []; + object.stats = $Array(message.stats.length); for (var j = 0; j < message.stats.length; ++j) - object.stats[j] = $root.CMsgAMGetUserGameStatsResponse.Stats.toObject(message.stats[j], options); + object.stats[j] = $root.CMsgAMGetUserGameStatsResponse.Stats.toObject(message.stats[j], options, _depth + 1); } if (message.achievement_blocks && message.achievement_blocks.length) { - object.achievement_blocks = []; + object.achievement_blocks = $Array(message.achievement_blocks.length); for (var j = 0; j < message.achievement_blocks.length; ++j) - object.achievement_blocks[j] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.toObject(message.achievement_blocks[j], options); + object.achievement_blocks[j] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.toObject(message.achievement_blocks[j], options, _depth + 1); } return object; }; @@ -11788,34 +15262,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetUserGameStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetUserGameStatsResponse.prototype.toJSON = function() { + return CMsgAMGetUserGameStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetUserGameStatsResponse + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetUserGameStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse"; }; CMsgAMGetUserGameStatsResponse.Stats = (function() { /** * Properties of a Stats. - * @memberof CMsgAMGetUserGameStatsResponse - * @interface IStats + * @typedef {Object} CMsgAMGetUserGameStatsResponse.Stats.$Properties * @property {number|null} [stat_id] Stats stat_id * @property {number|null} [stat_value] Stats stat_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Stats. + * @memberof CMsgAMGetUserGameStatsResponse + * @interface IStats + * @augments CMsgAMGetUserGameStatsResponse.Stats.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.Stats.$Properties instead. + */ + + /** + * Shape of a Stats. + * @typedef {CMsgAMGetUserGameStatsResponse.Stats.$Properties} CMsgAMGetUserGameStatsResponse.Stats.$Shape */ /** * Constructs a new Stats. * @memberof CMsgAMGetUserGameStatsResponse * @classdesc Represents a Stats. - * @implements IStats * @constructor - * @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Stats(properties) { + var Stats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Stats stat_id. @@ -11838,10 +15339,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.Stats.$Shape): CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.Stats.$Properties): CMsgAMGetUserGameStatsResponse.Stats; + * }} */ - Stats.create = function create(properties) { + Stats.create = function(properties) { return new Stats(properties); }; @@ -11850,17 +15355,24 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats} message Stats message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stats.encode = function encode(message, writer) { + Stats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.stat_id != null && Object.hasOwnProperty.call(message, "stat_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.stat_id); - if (message.stat_value != null && Object.hasOwnProperty.call(message, "stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.stat_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11869,12 +15381,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats} message Stats message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Stats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11884,28 +15396,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats + * @returns {CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stats.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse.Stats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stat_id = reader.uint32(); - break; - case 2: - message.stat_value = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + Stats.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse.Stats(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.stat_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.stat_value = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11915,11 +15447,11 @@ * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats + * @returns {CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stats.decodeDelimited = function decodeDelimited(reader) { + Stats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11933,13 +15465,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Stats.verify = function verify(message) { + Stats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.stat_id != null && message.hasOwnProperty("stat_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) if (!$util.isInteger(message.stat_id)) return "stat_id: integer expected"; - if (message.stat_value != null && message.hasOwnProperty("stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) if (!$util.isInteger(message.stat_value)) return "stat_value: integer expected"; return null; @@ -11953,9 +15489,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats */ - Stats.fromObject = function fromObject(object) { + Stats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Stats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.Stats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse.Stats(); if (object.stat_id != null) message.stat_id = object.stat_id >>> 0; @@ -11973,17 +15515,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Stats.toObject = function toObject(message, options) { + Stats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.stat_id = 0; object.stat_value = 0; } - if (message.stat_id != null && message.hasOwnProperty("stat_id")) + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) object.stat_id = message.stat_id; - if (message.stat_value != null && message.hasOwnProperty("stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) object.stat_value = message.stat_value; return object; }; @@ -11995,8 +15541,22 @@ * @instance * @returns {Object.} JSON object */ - Stats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Stats.prototype.toJSON = function() { + return Stats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Stats + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse.Stats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Stats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse.Stats"; }; return Stats; @@ -12006,27 +15566,40 @@ /** * Properties of an Achievement_Blocks. - * @memberof CMsgAMGetUserGameStatsResponse - * @interface IAchievement_Blocks + * @typedef {Object} CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties * @property {number|null} [achievement_id] Achievement_Blocks achievement_id * @property {number|null} [achievement_bit_id] Achievement_Blocks achievement_bit_id * @property {number|null} [unlock_time] Achievement_Blocks unlock_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Achievement_Blocks. + * @memberof CMsgAMGetUserGameStatsResponse + * @interface IAchievement_Blocks + * @augments CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties instead. + */ + + /** + * Shape of an Achievement_Blocks. + * @typedef {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape */ /** * Constructs a new Achievement_Blocks. * @memberof CMsgAMGetUserGameStatsResponse * @classdesc Represents an Achievement_Blocks. - * @implements IAchievement_Blocks * @constructor - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Achievement_Blocks(properties) { + var Achievement_Blocks = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Achievement_Blocks achievement_id. @@ -12057,10 +15630,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape): CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties): CMsgAMGetUserGameStatsResponse.Achievement_Blocks; + * }} */ - Achievement_Blocks.create = function create(properties) { + Achievement_Blocks.create = function(properties) { return new Achievement_Blocks(properties); }; @@ -12069,19 +15646,26 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} message Achievement_Blocks message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} message Achievement_Blocks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Achievement_Blocks.encode = function encode(message, writer) { + Achievement_Blocks.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.achievement_id != null && Object.hasOwnProperty.call(message, "achievement_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.achievement_id); - if (message.achievement_bit_id != null && Object.hasOwnProperty.call(message, "achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.achievement_bit_id); - if (message.unlock_time != null && Object.hasOwnProperty.call(message, "unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.unlock_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12090,12 +15674,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} message Achievement_Blocks message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} message Achievement_Blocks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Achievement_Blocks.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Achievement_Blocks.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12105,31 +15689,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks + * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape} Achievement_Blocks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Achievement_Blocks.decode = function decode(reader, length) { + Achievement_Blocks.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.achievement_id = reader.uint32(); - break; - case 2: - message.achievement_bit_id = reader.uint32(); - break; - case 3: - message.unlock_time = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.achievement_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.achievement_bit_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.unlock_time = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12139,11 +15746,11 @@ * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks + * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape} Achievement_Blocks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Achievement_Blocks.decodeDelimited = function decodeDelimited(reader) { + Achievement_Blocks.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12157,16 +15764,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Achievement_Blocks.verify = function verify(message) { + Achievement_Blocks.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.achievement_id != null && message.hasOwnProperty("achievement_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) if (!$util.isInteger(message.achievement_id)) return "achievement_id: integer expected"; - if (message.achievement_bit_id != null && message.hasOwnProperty("achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) if (!$util.isInteger(message.achievement_bit_id)) return "achievement_bit_id: integer expected"; - if (message.unlock_time != null && message.hasOwnProperty("unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) if (!$util.isInteger(message.unlock_time)) return "unlock_time: integer expected"; return null; @@ -12180,9 +15791,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks */ - Achievement_Blocks.fromObject = function fromObject(object) { + Achievement_Blocks.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.Achievement_Blocks: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); if (object.achievement_id != null) message.achievement_id = object.achievement_id >>> 0; @@ -12202,20 +15819,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Achievement_Blocks.toObject = function toObject(message, options) { + Achievement_Blocks.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.achievement_id = 0; object.achievement_bit_id = 0; object.unlock_time = 0; } - if (message.achievement_id != null && message.hasOwnProperty("achievement_id")) + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) object.achievement_id = message.achievement_id; - if (message.achievement_bit_id != null && message.hasOwnProperty("achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) object.achievement_bit_id = message.achievement_bit_id; - if (message.unlock_time != null && message.hasOwnProperty("unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) object.unlock_time = message.unlock_time; return object; }; @@ -12227,8 +15848,22 @@ * @instance * @returns {Object.} JSON object */ - Achievement_Blocks.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Achievement_Blocks.prototype.toJSON = function() { + return Achievement_Blocks.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Achievement_Blocks + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Achievement_Blocks.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse.Achievement_Blocks"; }; return Achievement_Blocks; @@ -12241,26 +15876,39 @@ /** * Properties of a CMsgGCGetCommandList. - * @exports ICMsgGCGetCommandList - * @interface ICMsgGCGetCommandList + * @typedef {Object} CMsgGCGetCommandList.$Properties * @property {number|null} [app_id] CMsgGCGetCommandList app_id * @property {string|null} [command_prefix] CMsgGCGetCommandList command_prefix + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetCommandList. + * @exports ICMsgGCGetCommandList + * @interface ICMsgGCGetCommandList + * @augments CMsgGCGetCommandList.$Properties + * @deprecated Use CMsgGCGetCommandList.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetCommandList. + * @typedef {CMsgGCGetCommandList.$Properties} CMsgGCGetCommandList.$Shape */ /** * Constructs a new CMsgGCGetCommandList. * @exports CMsgGCGetCommandList * @classdesc Represents a CMsgGCGetCommandList. - * @implements ICMsgGCGetCommandList * @constructor - * @param {ICMsgGCGetCommandList=} [properties] Properties to set + * @param {CMsgGCGetCommandList.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetCommandList(properties) { + var CMsgGCGetCommandList = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetCommandList app_id. @@ -12283,10 +15931,14 @@ * @function create * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList=} [properties] Properties to set + * @param {CMsgGCGetCommandList.$Properties=} [properties] Properties to set * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList instance + * @type {{ + * (properties: CMsgGCGetCommandList.$Shape): CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape; + * (properties?: CMsgGCGetCommandList.$Properties): CMsgGCGetCommandList; + * }} */ - CMsgGCGetCommandList.create = function create(properties) { + CMsgGCGetCommandList.create = function(properties) { return new CMsgGCGetCommandList(properties); }; @@ -12295,17 +15947,24 @@ * @function encode * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList} message CMsgGCGetCommandList message or plain object to encode + * @param {CMsgGCGetCommandList.$Properties} message CMsgGCGetCommandList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandList.encode = function encode(message, writer) { + CMsgGCGetCommandList.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_id); - if (message.command_prefix != null && Object.hasOwnProperty.call(message, "command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.command_prefix); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12314,12 +15973,12 @@ * @function encodeDelimited * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList} message CMsgGCGetCommandList message or plain object to encode + * @param {CMsgGCGetCommandList.$Properties} message CMsgGCGetCommandList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetCommandList.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12329,28 +15988,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList + * @returns {CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape} CMsgGCGetCommandList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandList.decode = function decode(reader, length) { + CMsgGCGetCommandList.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetCommandList(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetCommandList(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_id = reader.uint32(); - break; - case 2: - message.command_prefix = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.command_prefix = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12360,11 +16039,11 @@ * @memberof CMsgGCGetCommandList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList + * @returns {CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape} CMsgGCGetCommandList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandList.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetCommandList.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12378,13 +16057,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetCommandList.verify = function verify(message) { + CMsgGCGetCommandList.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.command_prefix != null && message.hasOwnProperty("command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) if (!$util.isString(message.command_prefix)) return "command_prefix: string expected"; return null; @@ -12398,14 +16081,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList */ - CMsgGCGetCommandList.fromObject = function fromObject(object) { + CMsgGCGetCommandList.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetCommandList) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetCommandList: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetCommandList(); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.command_prefix != null) - message.command_prefix = String(object.command_prefix); + message.command_prefix = $String(object.command_prefix); return message; }; @@ -12418,17 +16107,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetCommandList.toObject = function toObject(message, options) { + CMsgGCGetCommandList.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.app_id = 0; object.command_prefix = ""; } - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.command_prefix != null && message.hasOwnProperty("command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) object.command_prefix = message.command_prefix; return object; }; @@ -12440,8 +16133,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetCommandList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetCommandList.prototype.toJSON = function() { + return CMsgGCGetCommandList.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetCommandList + * @function getTypeUrl + * @memberof CMsgGCGetCommandList + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetCommandList.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetCommandList"; }; return CMsgGCGetCommandList; @@ -12449,28 +16156,41 @@ $root.CMsgGCGetCommandListResponse = (function() { + /** + * Properties of a CMsgGCGetCommandListResponse. + * @typedef {Object} CMsgGCGetCommandListResponse.$Properties + * @property {Array.|null} [command_name] CMsgGCGetCommandListResponse command_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetCommandListResponse. * @exports ICMsgGCGetCommandListResponse * @interface ICMsgGCGetCommandListResponse - * @property {Array.|null} [command_name] CMsgGCGetCommandListResponse command_name + * @augments CMsgGCGetCommandListResponse.$Properties + * @deprecated Use CMsgGCGetCommandListResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetCommandListResponse. + * @typedef {CMsgGCGetCommandListResponse.$Properties} CMsgGCGetCommandListResponse.$Shape */ /** * Constructs a new CMsgGCGetCommandListResponse. * @exports CMsgGCGetCommandListResponse * @classdesc Represents a CMsgGCGetCommandListResponse. - * @implements ICMsgGCGetCommandListResponse * @constructor - * @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set + * @param {CMsgGCGetCommandListResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetCommandListResponse(properties) { + var CMsgGCGetCommandListResponse = function (properties) { this.command_name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetCommandListResponse command_name. @@ -12485,10 +16205,14 @@ * @function create * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set + * @param {CMsgGCGetCommandListResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse instance + * @type {{ + * (properties: CMsgGCGetCommandListResponse.$Shape): CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape; + * (properties?: CMsgGCGetCommandListResponse.$Properties): CMsgGCGetCommandListResponse; + * }} */ - CMsgGCGetCommandListResponse.create = function create(properties) { + CMsgGCGetCommandListResponse.create = function(properties) { return new CMsgGCGetCommandListResponse(properties); }; @@ -12497,16 +16221,23 @@ * @function encode * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse} message CMsgGCGetCommandListResponse message or plain object to encode + * @param {CMsgGCGetCommandListResponse.$Properties} message CMsgGCGetCommandListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandListResponse.encode = function encode(message, writer) { + CMsgGCGetCommandListResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.command_name != null && message.command_name.length) for (var i = 0; i < message.command_name.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.command_name[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12515,12 +16246,12 @@ * @function encodeDelimited * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse} message CMsgGCGetCommandListResponse message or plain object to encode + * @param {CMsgGCGetCommandListResponse.$Properties} message CMsgGCGetCommandListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetCommandListResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12530,27 +16261,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse + * @returns {CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape} CMsgGCGetCommandListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandListResponse.decode = function decode(reader, length) { + CMsgGCGetCommandListResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetCommandListResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetCommandListResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.command_name && message.command_name.length)) - message.command_name = []; - message.command_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.command_name && message.command_name.length)) + message.command_name = []; + message.command_name.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12560,11 +16308,11 @@ * @memberof CMsgGCGetCommandListResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse + * @returns {CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape} CMsgGCGetCommandListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandListResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetCommandListResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12578,11 +16326,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetCommandListResponse.verify = function verify(message) { + CMsgGCGetCommandListResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.command_name != null && message.hasOwnProperty("command_name")) { - if (!Array.isArray(message.command_name)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.command_name != null && $Object.hasOwnProperty.call(message, "command_name")) { + if (!$Array.isArray(message.command_name)) return "command_name: array expected"; for (var i = 0; i < message.command_name.length; ++i) if (!$util.isString(message.command_name[i])) @@ -12599,16 +16351,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse */ - CMsgGCGetCommandListResponse.fromObject = function fromObject(object) { + CMsgGCGetCommandListResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetCommandListResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetCommandListResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetCommandListResponse(); if (object.command_name) { - if (!Array.isArray(object.command_name)) - throw TypeError(".CMsgGCGetCommandListResponse.command_name: array expected"); - message.command_name = []; + if (!$Array.isArray(object.command_name)) + throw $TypeError(".CMsgGCGetCommandListResponse.command_name: array expected"); + message.command_name = $Array(object.command_name.length); for (var i = 0; i < object.command_name.length; ++i) - message.command_name[i] = String(object.command_name[i]); + message.command_name[i] = $String(object.command_name[i]); } return message; }; @@ -12622,14 +16380,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetCommandListResponse.toObject = function toObject(message, options) { + CMsgGCGetCommandListResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.command_name = []; if (message.command_name && message.command_name.length) { - object.command_name = []; + object.command_name = $Array(message.command_name.length); for (var j = 0; j < message.command_name.length; ++j) object.command_name[j] = message.command_name[j]; } @@ -12643,8 +16405,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetCommandListResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetCommandListResponse.prototype.toJSON = function() { + return CMsgGCGetCommandListResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetCommandListResponse + * @function getTypeUrl + * @memberof CMsgGCGetCommandListResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetCommandListResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetCommandListResponse"; }; return CMsgGCGetCommandListResponse; @@ -12652,28 +16428,41 @@ $root.CGCMsgMemCachedGet = (function() { + /** + * Properties of a CGCMsgMemCachedGet. + * @typedef {Object} CGCMsgMemCachedGet.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedGet keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedGet. * @exports ICGCMsgMemCachedGet * @interface ICGCMsgMemCachedGet - * @property {Array.|null} [keys] CGCMsgMemCachedGet keys + * @augments CGCMsgMemCachedGet.$Properties + * @deprecated Use CGCMsgMemCachedGet.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedGet. + * @typedef {CGCMsgMemCachedGet.$Properties} CGCMsgMemCachedGet.$Shape */ /** * Constructs a new CGCMsgMemCachedGet. * @exports CGCMsgMemCachedGet * @classdesc Represents a CGCMsgMemCachedGet. - * @implements ICGCMsgMemCachedGet * @constructor - * @param {ICGCMsgMemCachedGet=} [properties] Properties to set + * @param {CGCMsgMemCachedGet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedGet(properties) { + var CGCMsgMemCachedGet = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedGet keys. @@ -12688,10 +16477,14 @@ * @function create * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet=} [properties] Properties to set + * @param {CGCMsgMemCachedGet.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet instance + * @type {{ + * (properties: CGCMsgMemCachedGet.$Shape): CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape; + * (properties?: CGCMsgMemCachedGet.$Properties): CGCMsgMemCachedGet; + * }} */ - CGCMsgMemCachedGet.create = function create(properties) { + CGCMsgMemCachedGet.create = function(properties) { return new CGCMsgMemCachedGet(properties); }; @@ -12700,16 +16493,23 @@ * @function encode * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet} message CGCMsgMemCachedGet message or plain object to encode + * @param {CGCMsgMemCachedGet.$Properties} message CGCMsgMemCachedGet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGet.encode = function encode(message, writer) { + CGCMsgMemCachedGet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keys[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12718,12 +16518,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet} message CGCMsgMemCachedGet message or plain object to encode + * @param {CGCMsgMemCachedGet.$Properties} message CGCMsgMemCachedGet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedGet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12733,27 +16533,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet + * @returns {CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape} CGCMsgMemCachedGet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGet.decode = function decode(reader, length) { + CGCMsgMemCachedGet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12763,11 +16580,11 @@ * @memberof CGCMsgMemCachedGet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet + * @returns {CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape} CGCMsgMemCachedGet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGet.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedGet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12781,11 +16598,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedGet.verify = function verify(message) { + CGCMsgMemCachedGet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) if (!$util.isString(message.keys[i])) @@ -12802,16 +16623,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet */ - CGCMsgMemCachedGet.fromObject = function fromObject(object) { + CGCMsgMemCachedGet.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGet) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGet(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedGet.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedGet.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) - message.keys[i] = String(object.keys[i]); + message.keys[i] = $String(object.keys[i]); } return message; }; @@ -12825,14 +16652,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedGet.toObject = function toObject(message, options) { + CGCMsgMemCachedGet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) object.keys[j] = message.keys[j]; } @@ -12846,8 +16677,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedGet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedGet.prototype.toJSON = function() { + return CGCMsgMemCachedGet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedGet + * @function getTypeUrl + * @memberof CGCMsgMemCachedGet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedGet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGet"; }; return CGCMsgMemCachedGet; @@ -12855,32 +16700,45 @@ $root.CGCMsgMemCachedGetResponse = (function() { + /** + * Properties of a CGCMsgMemCachedGetResponse. + * @typedef {Object} CGCMsgMemCachedGetResponse.$Properties + * @property {Array.|null} [values] CGCMsgMemCachedGetResponse values + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedGetResponse. * @exports ICGCMsgMemCachedGetResponse * @interface ICGCMsgMemCachedGetResponse - * @property {Array.|null} [values] CGCMsgMemCachedGetResponse values + * @augments CGCMsgMemCachedGetResponse.$Properties + * @deprecated Use CGCMsgMemCachedGetResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedGetResponse. + * @typedef {CGCMsgMemCachedGetResponse.$Properties} CGCMsgMemCachedGetResponse.$Shape */ /** * Constructs a new CGCMsgMemCachedGetResponse. * @exports CGCMsgMemCachedGetResponse * @classdesc Represents a CGCMsgMemCachedGetResponse. - * @implements ICGCMsgMemCachedGetResponse * @constructor - * @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedGetResponse(properties) { + var CGCMsgMemCachedGetResponse = function (properties) { this.values = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedGetResponse values. - * @member {Array.} values + * @member {Array.} values * @memberof CGCMsgMemCachedGetResponse * @instance */ @@ -12891,10 +16749,14 @@ * @function create * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse instance + * @type {{ + * (properties: CGCMsgMemCachedGetResponse.$Shape): CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape; + * (properties?: CGCMsgMemCachedGetResponse.$Properties): CGCMsgMemCachedGetResponse; + * }} */ - CGCMsgMemCachedGetResponse.create = function create(properties) { + CGCMsgMemCachedGetResponse.create = function(properties) { return new CGCMsgMemCachedGetResponse(properties); }; @@ -12903,16 +16765,23 @@ * @function encode * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse} message CGCMsgMemCachedGetResponse message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.$Properties} message CGCMsgMemCachedGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGetResponse.encode = function encode(message, writer) { + CGCMsgMemCachedGetResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.values != null && message.values.length) for (var i = 0; i < message.values.length; ++i) - $root.CGCMsgMemCachedGetResponse.ValueTag.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CGCMsgMemCachedGetResponse.ValueTag.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12921,12 +16790,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse} message CGCMsgMemCachedGetResponse message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.$Properties} message CGCMsgMemCachedGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedGetResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12936,27 +16805,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse + * @returns {CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape} CGCMsgMemCachedGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGetResponse.decode = function decode(reader, length) { + CGCMsgMemCachedGetResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGetResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGetResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.CGCMsgMemCachedGetResponse.ValueTag.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.CGCMsgMemCachedGetResponse.ValueTag.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12966,11 +16852,11 @@ * @memberof CGCMsgMemCachedGetResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse + * @returns {CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape} CGCMsgMemCachedGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGetResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedGetResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12984,14 +16870,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedGetResponse.verify = function verify(message) { + CGCMsgMemCachedGetResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.values != null && $Object.hasOwnProperty.call(message, "values")) { + if (!$Array.isArray(message.values)) return "values: array expected"; for (var i = 0; i < message.values.length; ++i) { - var error = $root.CGCMsgMemCachedGetResponse.ValueTag.verify(message.values[i]); + var error = $root.CGCMsgMemCachedGetResponse.ValueTag.verify(message.values[i], _depth + 1); if (error) return "values." + error; } @@ -13007,18 +16897,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse */ - CGCMsgMemCachedGetResponse.fromObject = function fromObject(object) { + CGCMsgMemCachedGetResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGetResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGetResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGetResponse(); if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".CGCMsgMemCachedGetResponse.values: array expected"); - message.values = []; + if (!$Array.isArray(object.values)) + throw $TypeError(".CGCMsgMemCachedGetResponse.values: array expected"); + message.values = $Array(object.values.length); for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".CGCMsgMemCachedGetResponse.values: object expected"); - message.values[i] = $root.CGCMsgMemCachedGetResponse.ValueTag.fromObject(object.values[i]); + if (!$util.isObject(object.values[i])) + throw $TypeError(".CGCMsgMemCachedGetResponse.values: object expected"); + message.values[i] = $root.CGCMsgMemCachedGetResponse.ValueTag.fromObject(object.values[i], _depth + 1); } } return message; @@ -13033,16 +16929,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedGetResponse.toObject = function toObject(message, options) { + CGCMsgMemCachedGetResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.values = []; if (message.values && message.values.length) { - object.values = []; + object.values = $Array(message.values.length); for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.CGCMsgMemCachedGetResponse.ValueTag.toObject(message.values[j], options); + object.values[j] = $root.CGCMsgMemCachedGetResponse.ValueTag.toObject(message.values[j], options, _depth + 1); } return object; }; @@ -13054,34 +16954,61 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedGetResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedGetResponse.prototype.toJSON = function() { + return CGCMsgMemCachedGetResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedGetResponse + * @function getTypeUrl + * @memberof CGCMsgMemCachedGetResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedGetResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGetResponse"; }; CGCMsgMemCachedGetResponse.ValueTag = (function() { /** * Properties of a ValueTag. - * @memberof CGCMsgMemCachedGetResponse - * @interface IValueTag + * @typedef {Object} CGCMsgMemCachedGetResponse.ValueTag.$Properties * @property {boolean|null} [found] ValueTag found * @property {Uint8Array|null} [value] ValueTag value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ValueTag. + * @memberof CGCMsgMemCachedGetResponse + * @interface IValueTag + * @augments CGCMsgMemCachedGetResponse.ValueTag.$Properties + * @deprecated Use CGCMsgMemCachedGetResponse.ValueTag.$Properties instead. + */ + + /** + * Shape of a ValueTag. + * @typedef {CGCMsgMemCachedGetResponse.ValueTag.$Properties} CGCMsgMemCachedGetResponse.ValueTag.$Shape */ /** * Constructs a new ValueTag. * @memberof CGCMsgMemCachedGetResponse * @classdesc Represents a ValueTag. - * @implements IValueTag * @constructor - * @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ValueTag(properties) { + var ValueTag = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ValueTag found. @@ -13104,10 +17031,14 @@ * @function create * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag instance + * @type {{ + * (properties: CGCMsgMemCachedGetResponse.ValueTag.$Shape): CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape; + * (properties?: CGCMsgMemCachedGetResponse.ValueTag.$Properties): CGCMsgMemCachedGetResponse.ValueTag; + * }} */ - ValueTag.create = function create(properties) { + ValueTag.create = function(properties) { return new ValueTag(properties); }; @@ -13116,17 +17047,24 @@ * @function encode * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag} message ValueTag message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties} message ValueTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValueTag.encode = function encode(message, writer) { + ValueTag.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.found != null && Object.hasOwnProperty.call(message, "found")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.found); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13135,12 +17073,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag} message ValueTag message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties} message ValueTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValueTag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValueTag.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13150,28 +17088,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag + * @returns {CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape} ValueTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValueTag.decode = function decode(reader, length) { + ValueTag.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGetResponse.ValueTag(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGetResponse.ValueTag(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.found = reader.bool(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.found = reader.bool(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13181,11 +17139,11 @@ * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag + * @returns {CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape} ValueTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValueTag.decodeDelimited = function decodeDelimited(reader) { + ValueTag.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13199,13 +17157,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValueTag.verify = function verify(message) { + ValueTag.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.found != null && message.hasOwnProperty("found")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) if (typeof message.found !== "boolean") return "found: boolean expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -13219,16 +17181,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag */ - ValueTag.fromObject = function fromObject(object) { + ValueTag.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGetResponse.ValueTag) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGetResponse.ValueTag: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGetResponse.ValueTag(); if (object.found != null) - message.found = Boolean(object.found); + message.found = $Boolean(object.found); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -13242,24 +17210,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValueTag.toObject = function toObject(message, options) { + ValueTag.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.found = false; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.found != null && message.hasOwnProperty("found")) + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) object.found = message.found; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -13270,8 +17242,22 @@ * @instance * @returns {Object.} JSON object */ - ValueTag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ValueTag.prototype.toJSON = function() { + return ValueTag.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ValueTag + * @function getTypeUrl + * @memberof CGCMsgMemCachedGetResponse.ValueTag + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ValueTag.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGetResponse.ValueTag"; }; return ValueTag; @@ -13282,32 +17268,45 @@ $root.CGCMsgMemCachedSet = (function() { + /** + * Properties of a CGCMsgMemCachedSet. + * @typedef {Object} CGCMsgMemCachedSet.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedSet keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedSet. * @exports ICGCMsgMemCachedSet * @interface ICGCMsgMemCachedSet - * @property {Array.|null} [keys] CGCMsgMemCachedSet keys + * @augments CGCMsgMemCachedSet.$Properties + * @deprecated Use CGCMsgMemCachedSet.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedSet. + * @typedef {CGCMsgMemCachedSet.$Properties} CGCMsgMemCachedSet.$Shape */ /** * Constructs a new CGCMsgMemCachedSet. * @exports CGCMsgMemCachedSet * @classdesc Represents a CGCMsgMemCachedSet. - * @implements ICGCMsgMemCachedSet * @constructor - * @param {ICGCMsgMemCachedSet=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedSet(properties) { + var CGCMsgMemCachedSet = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedSet keys. - * @member {Array.} keys + * @member {Array.} keys * @memberof CGCMsgMemCachedSet * @instance */ @@ -13318,10 +17317,14 @@ * @function create * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet instance + * @type {{ + * (properties: CGCMsgMemCachedSet.$Shape): CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape; + * (properties?: CGCMsgMemCachedSet.$Properties): CGCMsgMemCachedSet; + * }} */ - CGCMsgMemCachedSet.create = function create(properties) { + CGCMsgMemCachedSet.create = function(properties) { return new CGCMsgMemCachedSet(properties); }; @@ -13330,16 +17333,23 @@ * @function encode * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet} message CGCMsgMemCachedSet message or plain object to encode + * @param {CGCMsgMemCachedSet.$Properties} message CGCMsgMemCachedSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedSet.encode = function encode(message, writer) { + CGCMsgMemCachedSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) - $root.CGCMsgMemCachedSet.KeyPair.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CGCMsgMemCachedSet.KeyPair.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13348,12 +17358,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet} message CGCMsgMemCachedSet message or plain object to encode + * @param {CGCMsgMemCachedSet.$Properties} message CGCMsgMemCachedSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13363,27 +17373,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet + * @returns {CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape} CGCMsgMemCachedSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedSet.decode = function decode(reader, length) { + CGCMsgMemCachedSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.CGCMsgMemCachedSet.KeyPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push($root.CGCMsgMemCachedSet.KeyPair.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13393,11 +17420,11 @@ * @memberof CGCMsgMemCachedSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet + * @returns {CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape} CGCMsgMemCachedSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedSet.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13411,14 +17438,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedSet.verify = function verify(message) { + CGCMsgMemCachedSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) { - var error = $root.CGCMsgMemCachedSet.KeyPair.verify(message.keys[i]); + var error = $root.CGCMsgMemCachedSet.KeyPair.verify(message.keys[i], _depth + 1); if (error) return "keys." + error; } @@ -13434,18 +17465,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet */ - CGCMsgMemCachedSet.fromObject = function fromObject(object) { + CGCMsgMemCachedSet.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedSet(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedSet.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedSet.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".CGCMsgMemCachedSet.keys: object expected"); - message.keys[i] = $root.CGCMsgMemCachedSet.KeyPair.fromObject(object.keys[i]); + if (!$util.isObject(object.keys[i])) + throw $TypeError(".CGCMsgMemCachedSet.keys: object expected"); + message.keys[i] = $root.CGCMsgMemCachedSet.KeyPair.fromObject(object.keys[i], _depth + 1); } } return message; @@ -13460,16 +17497,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedSet.toObject = function toObject(message, options) { + CGCMsgMemCachedSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.CGCMsgMemCachedSet.KeyPair.toObject(message.keys[j], options); + object.keys[j] = $root.CGCMsgMemCachedSet.KeyPair.toObject(message.keys[j], options, _depth + 1); } return object; }; @@ -13481,34 +17522,61 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedSet.prototype.toJSON = function() { + return CGCMsgMemCachedSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedSet + * @function getTypeUrl + * @memberof CGCMsgMemCachedSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedSet"; }; CGCMsgMemCachedSet.KeyPair = (function() { /** * Properties of a KeyPair. - * @memberof CGCMsgMemCachedSet - * @interface IKeyPair + * @typedef {Object} CGCMsgMemCachedSet.KeyPair.$Properties * @property {string|null} [name] KeyPair name * @property {Uint8Array|null} [value] KeyPair value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a KeyPair. + * @memberof CGCMsgMemCachedSet + * @interface IKeyPair + * @augments CGCMsgMemCachedSet.KeyPair.$Properties + * @deprecated Use CGCMsgMemCachedSet.KeyPair.$Properties instead. + */ + + /** + * Shape of a KeyPair. + * @typedef {CGCMsgMemCachedSet.KeyPair.$Properties} CGCMsgMemCachedSet.KeyPair.$Shape */ /** * Constructs a new KeyPair. * @memberof CGCMsgMemCachedSet * @classdesc Represents a KeyPair. - * @implements IKeyPair * @constructor - * @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.KeyPair.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function KeyPair(properties) { + var KeyPair = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * KeyPair name. @@ -13531,10 +17599,14 @@ * @function create * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.KeyPair.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair instance + * @type {{ + * (properties: CGCMsgMemCachedSet.KeyPair.$Shape): CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape; + * (properties?: CGCMsgMemCachedSet.KeyPair.$Properties): CGCMsgMemCachedSet.KeyPair; + * }} */ - KeyPair.create = function create(properties) { + KeyPair.create = function(properties) { return new KeyPair(properties); }; @@ -13543,17 +17615,24 @@ * @function encode * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair} message KeyPair message or plain object to encode + * @param {CGCMsgMemCachedSet.KeyPair.$Properties} message KeyPair message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyPair.encode = function encode(message, writer) { + KeyPair.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13562,12 +17641,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair} message KeyPair message or plain object to encode + * @param {CGCMsgMemCachedSet.KeyPair.$Properties} message KeyPair message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyPair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + KeyPair.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13577,28 +17656,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair + * @returns {CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape} KeyPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyPair.decode = function decode(reader, length) { + KeyPair.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedSet.KeyPair(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedSet.KeyPair(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13608,11 +17707,11 @@ * @memberof CGCMsgMemCachedSet.KeyPair * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair + * @returns {CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape} KeyPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyPair.decodeDelimited = function decodeDelimited(reader) { + KeyPair.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13626,13 +17725,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KeyPair.verify = function verify(message) { + KeyPair.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -13646,16 +17749,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair */ - KeyPair.fromObject = function fromObject(object) { + KeyPair.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedSet.KeyPair) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedSet.KeyPair: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedSet.KeyPair(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -13669,24 +17778,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KeyPair.toObject = function toObject(message, options) { + KeyPair.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -13697,8 +17810,22 @@ * @instance * @returns {Object.} JSON object */ - KeyPair.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + KeyPair.prototype.toJSON = function() { + return KeyPair.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for KeyPair + * @function getTypeUrl + * @memberof CGCMsgMemCachedSet.KeyPair + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + KeyPair.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedSet.KeyPair"; }; return KeyPair; @@ -13709,28 +17836,41 @@ $root.CGCMsgMemCachedDelete = (function() { + /** + * Properties of a CGCMsgMemCachedDelete. + * @typedef {Object} CGCMsgMemCachedDelete.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedDelete keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedDelete. * @exports ICGCMsgMemCachedDelete * @interface ICGCMsgMemCachedDelete - * @property {Array.|null} [keys] CGCMsgMemCachedDelete keys + * @augments CGCMsgMemCachedDelete.$Properties + * @deprecated Use CGCMsgMemCachedDelete.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedDelete. + * @typedef {CGCMsgMemCachedDelete.$Properties} CGCMsgMemCachedDelete.$Shape */ /** * Constructs a new CGCMsgMemCachedDelete. * @exports CGCMsgMemCachedDelete * @classdesc Represents a CGCMsgMemCachedDelete. - * @implements ICGCMsgMemCachedDelete * @constructor - * @param {ICGCMsgMemCachedDelete=} [properties] Properties to set + * @param {CGCMsgMemCachedDelete.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedDelete(properties) { + var CGCMsgMemCachedDelete = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedDelete keys. @@ -13745,10 +17885,14 @@ * @function create * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete=} [properties] Properties to set + * @param {CGCMsgMemCachedDelete.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete instance + * @type {{ + * (properties: CGCMsgMemCachedDelete.$Shape): CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape; + * (properties?: CGCMsgMemCachedDelete.$Properties): CGCMsgMemCachedDelete; + * }} */ - CGCMsgMemCachedDelete.create = function create(properties) { + CGCMsgMemCachedDelete.create = function(properties) { return new CGCMsgMemCachedDelete(properties); }; @@ -13757,16 +17901,23 @@ * @function encode * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete} message CGCMsgMemCachedDelete message or plain object to encode + * @param {CGCMsgMemCachedDelete.$Properties} message CGCMsgMemCachedDelete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedDelete.encode = function encode(message, writer) { + CGCMsgMemCachedDelete.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keys[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13775,12 +17926,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete} message CGCMsgMemCachedDelete message or plain object to encode + * @param {CGCMsgMemCachedDelete.$Properties} message CGCMsgMemCachedDelete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedDelete.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedDelete.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13790,27 +17941,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete + * @returns {CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape} CGCMsgMemCachedDelete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedDelete.decode = function decode(reader, length) { + CGCMsgMemCachedDelete.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedDelete(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedDelete(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13820,11 +17988,11 @@ * @memberof CGCMsgMemCachedDelete * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete + * @returns {CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape} CGCMsgMemCachedDelete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedDelete.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedDelete.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13838,11 +18006,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedDelete.verify = function verify(message) { + CGCMsgMemCachedDelete.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) if (!$util.isString(message.keys[i])) @@ -13859,16 +18031,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete */ - CGCMsgMemCachedDelete.fromObject = function fromObject(object) { + CGCMsgMemCachedDelete.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedDelete) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedDelete: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedDelete(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedDelete.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedDelete.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) - message.keys[i] = String(object.keys[i]); + message.keys[i] = $String(object.keys[i]); } return message; }; @@ -13882,14 +18060,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedDelete.toObject = function toObject(message, options) { + CGCMsgMemCachedDelete.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) object.keys[j] = message.keys[j]; } @@ -13903,8 +18085,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedDelete.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedDelete.prototype.toJSON = function() { + return CGCMsgMemCachedDelete.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedDelete + * @function getTypeUrl + * @memberof CGCMsgMemCachedDelete + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedDelete.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedDelete"; }; return CGCMsgMemCachedDelete; @@ -13912,36 +18108,53 @@ $root.CGCMsgMemCachedStats = (function() { + /** + * Properties of a CGCMsgMemCachedStats. + * @typedef {Object} CGCMsgMemCachedStats.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedStats. * @exports ICGCMsgMemCachedStats * @interface ICGCMsgMemCachedStats + * @augments CGCMsgMemCachedStats.$Properties + * @deprecated Use CGCMsgMemCachedStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedStats. + * @typedef {CGCMsgMemCachedStats.$Properties} CGCMsgMemCachedStats.$Shape */ /** * Constructs a new CGCMsgMemCachedStats. * @exports CGCMsgMemCachedStats * @classdesc Represents a CGCMsgMemCachedStats. - * @implements ICGCMsgMemCachedStats * @constructor - * @param {ICGCMsgMemCachedStats=} [properties] Properties to set + * @param {CGCMsgMemCachedStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedStats(properties) { + var CGCMsgMemCachedStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CGCMsgMemCachedStats instance using the specified properties. * @function create * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats=} [properties] Properties to set + * @param {CGCMsgMemCachedStats.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats instance + * @type {{ + * (properties: CGCMsgMemCachedStats.$Shape): CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape; + * (properties?: CGCMsgMemCachedStats.$Properties): CGCMsgMemCachedStats; + * }} */ - CGCMsgMemCachedStats.create = function create(properties) { + CGCMsgMemCachedStats.create = function(properties) { return new CGCMsgMemCachedStats(properties); }; @@ -13950,13 +18163,20 @@ * @function encode * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats} message CGCMsgMemCachedStats message or plain object to encode + * @param {CGCMsgMemCachedStats.$Properties} message CGCMsgMemCachedStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStats.encode = function encode(message, writer) { + CGCMsgMemCachedStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13965,12 +18185,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats} message CGCMsgMemCachedStats message or plain object to encode + * @param {CGCMsgMemCachedStats.$Properties} message CGCMsgMemCachedStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13980,22 +18200,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats + * @returns {CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape} CGCMsgMemCachedStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStats.decode = function decode(reader, length) { + CGCMsgMemCachedStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14005,11 +18236,11 @@ * @memberof CGCMsgMemCachedStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats + * @returns {CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape} CGCMsgMemCachedStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14023,9 +18254,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedStats.verify = function verify(message) { + CGCMsgMemCachedStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -14037,9 +18272,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats */ - CGCMsgMemCachedStats.fromObject = function fromObject(object) { + CGCMsgMemCachedStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CGCMsgMemCachedStats(); }; @@ -14052,7 +18293,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedStats.toObject = function toObject() { + CGCMsgMemCachedStats.toObject = function () { return {}; }; @@ -14063,8 +18304,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedStats.prototype.toJSON = function() { + return CGCMsgMemCachedStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedStats + * @function getTypeUrl + * @memberof CGCMsgMemCachedStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedStats"; }; return CGCMsgMemCachedStats; @@ -14074,8 +18329,7 @@ /** * Properties of a CGCMsgMemCachedStatsResponse. - * @exports ICGCMsgMemCachedStatsResponse - * @interface ICGCMsgMemCachedStatsResponse + * @typedef {Object} CGCMsgMemCachedStatsResponse.$Properties * @property {number|Long|null} [curr_connections] CGCMsgMemCachedStatsResponse curr_connections * @property {number|Long|null} [cmd_get] CGCMsgMemCachedStatsResponse cmd_get * @property {number|Long|null} [cmd_set] CGCMsgMemCachedStatsResponse cmd_set @@ -14090,22 +18344,36 @@ * @property {number|Long|null} [curr_items] CGCMsgMemCachedStatsResponse curr_items * @property {number|Long|null} [evictions] CGCMsgMemCachedStatsResponse evictions * @property {number|Long|null} [bytes] CGCMsgMemCachedStatsResponse bytes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgMemCachedStatsResponse. + * @exports ICGCMsgMemCachedStatsResponse + * @interface ICGCMsgMemCachedStatsResponse + * @augments CGCMsgMemCachedStatsResponse.$Properties + * @deprecated Use CGCMsgMemCachedStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedStatsResponse. + * @typedef {CGCMsgMemCachedStatsResponse.$Properties} CGCMsgMemCachedStatsResponse.$Shape */ /** * Constructs a new CGCMsgMemCachedStatsResponse. * @exports CGCMsgMemCachedStatsResponse * @classdesc Represents a CGCMsgMemCachedStatsResponse. - * @implements ICGCMsgMemCachedStatsResponse * @constructor - * @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedStatsResponse(properties) { + var CGCMsgMemCachedStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedStatsResponse curr_connections. @@ -14224,10 +18492,14 @@ * @function create * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse instance + * @type {{ + * (properties: CGCMsgMemCachedStatsResponse.$Shape): CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape; + * (properties?: CGCMsgMemCachedStatsResponse.$Properties): CGCMsgMemCachedStatsResponse; + * }} */ - CGCMsgMemCachedStatsResponse.create = function create(properties) { + CGCMsgMemCachedStatsResponse.create = function(properties) { return new CGCMsgMemCachedStatsResponse(properties); }; @@ -14236,41 +18508,48 @@ * @function encode * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse} message CGCMsgMemCachedStatsResponse message or plain object to encode + * @param {CGCMsgMemCachedStatsResponse.$Properties} message CGCMsgMemCachedStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStatsResponse.encode = function encode(message, writer) { + CGCMsgMemCachedStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.curr_connections != null && Object.hasOwnProperty.call(message, "curr_connections")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.curr_connections); - if (message.cmd_get != null && Object.hasOwnProperty.call(message, "cmd_get")) + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.cmd_get); - if (message.cmd_set != null && Object.hasOwnProperty.call(message, "cmd_set")) + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.cmd_set); - if (message.cmd_flush != null && Object.hasOwnProperty.call(message, "cmd_flush")) + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.cmd_flush); - if (message.get_hits != null && Object.hasOwnProperty.call(message, "get_hits")) + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.get_hits); - if (message.get_misses != null && Object.hasOwnProperty.call(message, "get_misses")) + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.get_misses); - if (message.delete_hits != null && Object.hasOwnProperty.call(message, "delete_hits")) + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.delete_hits); - if (message.delete_misses != null && Object.hasOwnProperty.call(message, "delete_misses")) + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.delete_misses); - if (message.bytes_read != null && Object.hasOwnProperty.call(message, "bytes_read")) + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.bytes_read); - if (message.bytes_written != null && Object.hasOwnProperty.call(message, "bytes_written")) + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.bytes_written); - if (message.limit_maxbytes != null && Object.hasOwnProperty.call(message, "limit_maxbytes")) + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.limit_maxbytes); - if (message.curr_items != null && Object.hasOwnProperty.call(message, "curr_items")) + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.curr_items); - if (message.evictions != null && Object.hasOwnProperty.call(message, "evictions")) + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.evictions); - if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) writer.uint32(/* id 14, wireType 0 =*/112).uint64(message.bytes); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14279,12 +18558,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse} message CGCMsgMemCachedStatsResponse message or plain object to encode + * @param {CGCMsgMemCachedStatsResponse.$Properties} message CGCMsgMemCachedStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14294,64 +18573,120 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse + * @returns {CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape} CGCMsgMemCachedStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStatsResponse.decode = function decode(reader, length) { + CGCMsgMemCachedStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.curr_connections = reader.uint64(); - break; - case 2: - message.cmd_get = reader.uint64(); - break; - case 3: - message.cmd_set = reader.uint64(); - break; - case 4: - message.cmd_flush = reader.uint64(); - break; - case 5: - message.get_hits = reader.uint64(); - break; - case 6: - message.get_misses = reader.uint64(); - break; - case 7: - message.delete_hits = reader.uint64(); - break; - case 8: - message.delete_misses = reader.uint64(); - break; - case 9: - message.bytes_read = reader.uint64(); - break; - case 10: - message.bytes_written = reader.uint64(); - break; - case 11: - message.limit_maxbytes = reader.uint64(); - break; - case 12: - message.curr_items = reader.uint64(); - break; - case 13: - message.evictions = reader.uint64(); - break; - case 14: - message.bytes = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.curr_connections = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.cmd_get = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.cmd_set = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.cmd_flush = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.get_hits = reader.uint64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.get_misses = reader.uint64(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.delete_hits = reader.uint64(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.delete_misses = reader.uint64(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.bytes_read = reader.uint64(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.bytes_written = reader.uint64(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.limit_maxbytes = reader.uint64(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.curr_items = reader.uint64(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.evictions = reader.uint64(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.bytes = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14361,11 +18696,11 @@ * @memberof CGCMsgMemCachedStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse + * @returns {CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape} CGCMsgMemCachedStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14379,49 +18714,53 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedStatsResponse.verify = function verify(message) { + CGCMsgMemCachedStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.curr_connections != null && message.hasOwnProperty("curr_connections")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) if (!$util.isInteger(message.curr_connections) && !(message.curr_connections && $util.isInteger(message.curr_connections.low) && $util.isInteger(message.curr_connections.high))) return "curr_connections: integer|Long expected"; - if (message.cmd_get != null && message.hasOwnProperty("cmd_get")) + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) if (!$util.isInteger(message.cmd_get) && !(message.cmd_get && $util.isInteger(message.cmd_get.low) && $util.isInteger(message.cmd_get.high))) return "cmd_get: integer|Long expected"; - if (message.cmd_set != null && message.hasOwnProperty("cmd_set")) + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) if (!$util.isInteger(message.cmd_set) && !(message.cmd_set && $util.isInteger(message.cmd_set.low) && $util.isInteger(message.cmd_set.high))) return "cmd_set: integer|Long expected"; - if (message.cmd_flush != null && message.hasOwnProperty("cmd_flush")) + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) if (!$util.isInteger(message.cmd_flush) && !(message.cmd_flush && $util.isInteger(message.cmd_flush.low) && $util.isInteger(message.cmd_flush.high))) return "cmd_flush: integer|Long expected"; - if (message.get_hits != null && message.hasOwnProperty("get_hits")) + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) if (!$util.isInteger(message.get_hits) && !(message.get_hits && $util.isInteger(message.get_hits.low) && $util.isInteger(message.get_hits.high))) return "get_hits: integer|Long expected"; - if (message.get_misses != null && message.hasOwnProperty("get_misses")) + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) if (!$util.isInteger(message.get_misses) && !(message.get_misses && $util.isInteger(message.get_misses.low) && $util.isInteger(message.get_misses.high))) return "get_misses: integer|Long expected"; - if (message.delete_hits != null && message.hasOwnProperty("delete_hits")) + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) if (!$util.isInteger(message.delete_hits) && !(message.delete_hits && $util.isInteger(message.delete_hits.low) && $util.isInteger(message.delete_hits.high))) return "delete_hits: integer|Long expected"; - if (message.delete_misses != null && message.hasOwnProperty("delete_misses")) + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) if (!$util.isInteger(message.delete_misses) && !(message.delete_misses && $util.isInteger(message.delete_misses.low) && $util.isInteger(message.delete_misses.high))) return "delete_misses: integer|Long expected"; - if (message.bytes_read != null && message.hasOwnProperty("bytes_read")) + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) if (!$util.isInteger(message.bytes_read) && !(message.bytes_read && $util.isInteger(message.bytes_read.low) && $util.isInteger(message.bytes_read.high))) return "bytes_read: integer|Long expected"; - if (message.bytes_written != null && message.hasOwnProperty("bytes_written")) + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) if (!$util.isInteger(message.bytes_written) && !(message.bytes_written && $util.isInteger(message.bytes_written.low) && $util.isInteger(message.bytes_written.high))) return "bytes_written: integer|Long expected"; - if (message.limit_maxbytes != null && message.hasOwnProperty("limit_maxbytes")) + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) if (!$util.isInteger(message.limit_maxbytes) && !(message.limit_maxbytes && $util.isInteger(message.limit_maxbytes.low) && $util.isInteger(message.limit_maxbytes.high))) return "limit_maxbytes: integer|Long expected"; - if (message.curr_items != null && message.hasOwnProperty("curr_items")) + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) if (!$util.isInteger(message.curr_items) && !(message.curr_items && $util.isInteger(message.curr_items.low) && $util.isInteger(message.curr_items.high))) return "curr_items: integer|Long expected"; - if (message.evictions != null && message.hasOwnProperty("evictions")) + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) if (!$util.isInteger(message.evictions) && !(message.evictions && $util.isInteger(message.evictions.low) && $util.isInteger(message.evictions.high))) return "evictions: integer|Long expected"; - if (message.bytes != null && message.hasOwnProperty("bytes")) + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) if (!$util.isInteger(message.bytes) && !(message.bytes && $util.isInteger(message.bytes.low) && $util.isInteger(message.bytes.high))) return "bytes: integer|Long expected"; return null; @@ -14435,132 +18774,138 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse */ - CGCMsgMemCachedStatsResponse.fromObject = function fromObject(object) { + CGCMsgMemCachedStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedStatsResponse(); if (object.curr_connections != null) if ($util.Long) - (message.curr_connections = $util.Long.fromValue(object.curr_connections)).unsigned = true; + message.curr_connections = $util.Long.fromValue(object.curr_connections, true); else if (typeof object.curr_connections === "string") - message.curr_connections = parseInt(object.curr_connections, 10); + message.curr_connections = $parseInt(object.curr_connections, 10); else if (typeof object.curr_connections === "number") message.curr_connections = object.curr_connections; else if (typeof object.curr_connections === "object") message.curr_connections = new $util.LongBits(object.curr_connections.low >>> 0, object.curr_connections.high >>> 0).toNumber(true); if (object.cmd_get != null) if ($util.Long) - (message.cmd_get = $util.Long.fromValue(object.cmd_get)).unsigned = true; + message.cmd_get = $util.Long.fromValue(object.cmd_get, true); else if (typeof object.cmd_get === "string") - message.cmd_get = parseInt(object.cmd_get, 10); + message.cmd_get = $parseInt(object.cmd_get, 10); else if (typeof object.cmd_get === "number") message.cmd_get = object.cmd_get; else if (typeof object.cmd_get === "object") message.cmd_get = new $util.LongBits(object.cmd_get.low >>> 0, object.cmd_get.high >>> 0).toNumber(true); if (object.cmd_set != null) if ($util.Long) - (message.cmd_set = $util.Long.fromValue(object.cmd_set)).unsigned = true; + message.cmd_set = $util.Long.fromValue(object.cmd_set, true); else if (typeof object.cmd_set === "string") - message.cmd_set = parseInt(object.cmd_set, 10); + message.cmd_set = $parseInt(object.cmd_set, 10); else if (typeof object.cmd_set === "number") message.cmd_set = object.cmd_set; else if (typeof object.cmd_set === "object") message.cmd_set = new $util.LongBits(object.cmd_set.low >>> 0, object.cmd_set.high >>> 0).toNumber(true); if (object.cmd_flush != null) if ($util.Long) - (message.cmd_flush = $util.Long.fromValue(object.cmd_flush)).unsigned = true; + message.cmd_flush = $util.Long.fromValue(object.cmd_flush, true); else if (typeof object.cmd_flush === "string") - message.cmd_flush = parseInt(object.cmd_flush, 10); + message.cmd_flush = $parseInt(object.cmd_flush, 10); else if (typeof object.cmd_flush === "number") message.cmd_flush = object.cmd_flush; else if (typeof object.cmd_flush === "object") message.cmd_flush = new $util.LongBits(object.cmd_flush.low >>> 0, object.cmd_flush.high >>> 0).toNumber(true); if (object.get_hits != null) if ($util.Long) - (message.get_hits = $util.Long.fromValue(object.get_hits)).unsigned = true; + message.get_hits = $util.Long.fromValue(object.get_hits, true); else if (typeof object.get_hits === "string") - message.get_hits = parseInt(object.get_hits, 10); + message.get_hits = $parseInt(object.get_hits, 10); else if (typeof object.get_hits === "number") message.get_hits = object.get_hits; else if (typeof object.get_hits === "object") message.get_hits = new $util.LongBits(object.get_hits.low >>> 0, object.get_hits.high >>> 0).toNumber(true); if (object.get_misses != null) if ($util.Long) - (message.get_misses = $util.Long.fromValue(object.get_misses)).unsigned = true; + message.get_misses = $util.Long.fromValue(object.get_misses, true); else if (typeof object.get_misses === "string") - message.get_misses = parseInt(object.get_misses, 10); + message.get_misses = $parseInt(object.get_misses, 10); else if (typeof object.get_misses === "number") message.get_misses = object.get_misses; else if (typeof object.get_misses === "object") message.get_misses = new $util.LongBits(object.get_misses.low >>> 0, object.get_misses.high >>> 0).toNumber(true); if (object.delete_hits != null) if ($util.Long) - (message.delete_hits = $util.Long.fromValue(object.delete_hits)).unsigned = true; + message.delete_hits = $util.Long.fromValue(object.delete_hits, true); else if (typeof object.delete_hits === "string") - message.delete_hits = parseInt(object.delete_hits, 10); + message.delete_hits = $parseInt(object.delete_hits, 10); else if (typeof object.delete_hits === "number") message.delete_hits = object.delete_hits; else if (typeof object.delete_hits === "object") message.delete_hits = new $util.LongBits(object.delete_hits.low >>> 0, object.delete_hits.high >>> 0).toNumber(true); if (object.delete_misses != null) if ($util.Long) - (message.delete_misses = $util.Long.fromValue(object.delete_misses)).unsigned = true; + message.delete_misses = $util.Long.fromValue(object.delete_misses, true); else if (typeof object.delete_misses === "string") - message.delete_misses = parseInt(object.delete_misses, 10); + message.delete_misses = $parseInt(object.delete_misses, 10); else if (typeof object.delete_misses === "number") message.delete_misses = object.delete_misses; else if (typeof object.delete_misses === "object") message.delete_misses = new $util.LongBits(object.delete_misses.low >>> 0, object.delete_misses.high >>> 0).toNumber(true); if (object.bytes_read != null) if ($util.Long) - (message.bytes_read = $util.Long.fromValue(object.bytes_read)).unsigned = true; + message.bytes_read = $util.Long.fromValue(object.bytes_read, true); else if (typeof object.bytes_read === "string") - message.bytes_read = parseInt(object.bytes_read, 10); + message.bytes_read = $parseInt(object.bytes_read, 10); else if (typeof object.bytes_read === "number") message.bytes_read = object.bytes_read; else if (typeof object.bytes_read === "object") message.bytes_read = new $util.LongBits(object.bytes_read.low >>> 0, object.bytes_read.high >>> 0).toNumber(true); if (object.bytes_written != null) if ($util.Long) - (message.bytes_written = $util.Long.fromValue(object.bytes_written)).unsigned = true; + message.bytes_written = $util.Long.fromValue(object.bytes_written, true); else if (typeof object.bytes_written === "string") - message.bytes_written = parseInt(object.bytes_written, 10); + message.bytes_written = $parseInt(object.bytes_written, 10); else if (typeof object.bytes_written === "number") message.bytes_written = object.bytes_written; else if (typeof object.bytes_written === "object") message.bytes_written = new $util.LongBits(object.bytes_written.low >>> 0, object.bytes_written.high >>> 0).toNumber(true); if (object.limit_maxbytes != null) if ($util.Long) - (message.limit_maxbytes = $util.Long.fromValue(object.limit_maxbytes)).unsigned = true; + message.limit_maxbytes = $util.Long.fromValue(object.limit_maxbytes, true); else if (typeof object.limit_maxbytes === "string") - message.limit_maxbytes = parseInt(object.limit_maxbytes, 10); + message.limit_maxbytes = $parseInt(object.limit_maxbytes, 10); else if (typeof object.limit_maxbytes === "number") message.limit_maxbytes = object.limit_maxbytes; else if (typeof object.limit_maxbytes === "object") message.limit_maxbytes = new $util.LongBits(object.limit_maxbytes.low >>> 0, object.limit_maxbytes.high >>> 0).toNumber(true); if (object.curr_items != null) if ($util.Long) - (message.curr_items = $util.Long.fromValue(object.curr_items)).unsigned = true; + message.curr_items = $util.Long.fromValue(object.curr_items, true); else if (typeof object.curr_items === "string") - message.curr_items = parseInt(object.curr_items, 10); + message.curr_items = $parseInt(object.curr_items, 10); else if (typeof object.curr_items === "number") message.curr_items = object.curr_items; else if (typeof object.curr_items === "object") message.curr_items = new $util.LongBits(object.curr_items.low >>> 0, object.curr_items.high >>> 0).toNumber(true); if (object.evictions != null) if ($util.Long) - (message.evictions = $util.Long.fromValue(object.evictions)).unsigned = true; + message.evictions = $util.Long.fromValue(object.evictions, true); else if (typeof object.evictions === "string") - message.evictions = parseInt(object.evictions, 10); + message.evictions = $parseInt(object.evictions, 10); else if (typeof object.evictions === "number") message.evictions = object.evictions; else if (typeof object.evictions === "object") message.evictions = new $util.LongBits(object.evictions.low >>> 0, object.evictions.high >>> 0).toNumber(true); if (object.bytes != null) if ($util.Long) - (message.bytes = $util.Long.fromValue(object.bytes)).unsigned = true; + message.bytes = $util.Long.fromValue(object.bytes, true); else if (typeof object.bytes === "string") - message.bytes = parseInt(object.bytes, 10); + message.bytes = $parseInt(object.bytes, 10); else if (typeof object.bytes === "number") message.bytes = object.bytes; else if (typeof object.bytes === "object") @@ -14577,152 +18922,184 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedStatsResponse.toObject = function toObject(message, options) { + CGCMsgMemCachedStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.curr_connections = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.curr_connections = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.curr_connections = options.longs === String ? "0" : 0; + object.curr_connections = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_get = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_get = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_get = options.longs === String ? "0" : 0; + object.cmd_get = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_set = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_set = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_set = options.longs === String ? "0" : 0; + object.cmd_set = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_flush = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_flush = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_flush = options.longs === String ? "0" : 0; + object.cmd_flush = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.get_hits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.get_hits = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.get_hits = options.longs === String ? "0" : 0; + object.get_hits = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.get_misses = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.get_misses = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.get_misses = options.longs === String ? "0" : 0; + object.get_misses = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.delete_hits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.delete_hits = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.delete_hits = options.longs === String ? "0" : 0; + object.delete_hits = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.delete_misses = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.delete_misses = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.delete_misses = options.longs === String ? "0" : 0; + object.delete_misses = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes_read = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes_read = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes_read = options.longs === String ? "0" : 0; + object.bytes_read = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes_written = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes_written = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes_written = options.longs === String ? "0" : 0; + object.bytes_written = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.limit_maxbytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.limit_maxbytes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.limit_maxbytes = options.longs === String ? "0" : 0; + object.limit_maxbytes = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.curr_items = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.curr_items = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.curr_items = options.longs === String ? "0" : 0; + object.curr_items = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.evictions = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.evictions = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.evictions = options.longs === String ? "0" : 0; + object.evictions = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes = options.longs === String ? "0" : 0; + object.bytes = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.curr_connections != null && message.hasOwnProperty("curr_connections")) - if (typeof message.curr_connections === "number") - object.curr_connections = options.longs === String ? String(message.curr_connections) : message.curr_connections; + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.curr_connections = typeof message.curr_connections === "number" ? $BigInt(message.curr_connections) : $util.Long.fromBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0, true).toBigInt(); + else if (typeof message.curr_connections === "number") + object.curr_connections = options.longs === $String ? $String(message.curr_connections) : message.curr_connections; else - object.curr_connections = options.longs === String ? $util.Long.prototype.toString.call(message.curr_connections) : options.longs === Number ? new $util.LongBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0).toNumber(true) : message.curr_connections; - if (message.cmd_get != null && message.hasOwnProperty("cmd_get")) - if (typeof message.cmd_get === "number") - object.cmd_get = options.longs === String ? String(message.cmd_get) : message.cmd_get; + object.curr_connections = options.longs === $String ? $util.Long.prototype.toString.call(message.curr_connections) : options.longs === $Number ? new $util.LongBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0).toNumber(true) : message.curr_connections; + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_get = typeof message.cmd_get === "number" ? $BigInt(message.cmd_get) : $util.Long.fromBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_get === "number") + object.cmd_get = options.longs === $String ? $String(message.cmd_get) : message.cmd_get; else - object.cmd_get = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_get) : options.longs === Number ? new $util.LongBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0).toNumber(true) : message.cmd_get; - if (message.cmd_set != null && message.hasOwnProperty("cmd_set")) - if (typeof message.cmd_set === "number") - object.cmd_set = options.longs === String ? String(message.cmd_set) : message.cmd_set; + object.cmd_get = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_get) : options.longs === $Number ? new $util.LongBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0).toNumber(true) : message.cmd_get; + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_set = typeof message.cmd_set === "number" ? $BigInt(message.cmd_set) : $util.Long.fromBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_set === "number") + object.cmd_set = options.longs === $String ? $String(message.cmd_set) : message.cmd_set; else - object.cmd_set = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_set) : options.longs === Number ? new $util.LongBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0).toNumber(true) : message.cmd_set; - if (message.cmd_flush != null && message.hasOwnProperty("cmd_flush")) - if (typeof message.cmd_flush === "number") - object.cmd_flush = options.longs === String ? String(message.cmd_flush) : message.cmd_flush; + object.cmd_set = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_set) : options.longs === $Number ? new $util.LongBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0).toNumber(true) : message.cmd_set; + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_flush = typeof message.cmd_flush === "number" ? $BigInt(message.cmd_flush) : $util.Long.fromBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_flush === "number") + object.cmd_flush = options.longs === $String ? $String(message.cmd_flush) : message.cmd_flush; else - object.cmd_flush = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_flush) : options.longs === Number ? new $util.LongBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0).toNumber(true) : message.cmd_flush; - if (message.get_hits != null && message.hasOwnProperty("get_hits")) - if (typeof message.get_hits === "number") - object.get_hits = options.longs === String ? String(message.get_hits) : message.get_hits; + object.cmd_flush = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_flush) : options.longs === $Number ? new $util.LongBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0).toNumber(true) : message.cmd_flush; + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.get_hits = typeof message.get_hits === "number" ? $BigInt(message.get_hits) : $util.Long.fromBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0, true).toBigInt(); + else if (typeof message.get_hits === "number") + object.get_hits = options.longs === $String ? $String(message.get_hits) : message.get_hits; else - object.get_hits = options.longs === String ? $util.Long.prototype.toString.call(message.get_hits) : options.longs === Number ? new $util.LongBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0).toNumber(true) : message.get_hits; - if (message.get_misses != null && message.hasOwnProperty("get_misses")) - if (typeof message.get_misses === "number") - object.get_misses = options.longs === String ? String(message.get_misses) : message.get_misses; + object.get_hits = options.longs === $String ? $util.Long.prototype.toString.call(message.get_hits) : options.longs === $Number ? new $util.LongBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0).toNumber(true) : message.get_hits; + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.get_misses = typeof message.get_misses === "number" ? $BigInt(message.get_misses) : $util.Long.fromBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0, true).toBigInt(); + else if (typeof message.get_misses === "number") + object.get_misses = options.longs === $String ? $String(message.get_misses) : message.get_misses; else - object.get_misses = options.longs === String ? $util.Long.prototype.toString.call(message.get_misses) : options.longs === Number ? new $util.LongBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0).toNumber(true) : message.get_misses; - if (message.delete_hits != null && message.hasOwnProperty("delete_hits")) - if (typeof message.delete_hits === "number") - object.delete_hits = options.longs === String ? String(message.delete_hits) : message.delete_hits; + object.get_misses = options.longs === $String ? $util.Long.prototype.toString.call(message.get_misses) : options.longs === $Number ? new $util.LongBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0).toNumber(true) : message.get_misses; + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.delete_hits = typeof message.delete_hits === "number" ? $BigInt(message.delete_hits) : $util.Long.fromBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0, true).toBigInt(); + else if (typeof message.delete_hits === "number") + object.delete_hits = options.longs === $String ? $String(message.delete_hits) : message.delete_hits; else - object.delete_hits = options.longs === String ? $util.Long.prototype.toString.call(message.delete_hits) : options.longs === Number ? new $util.LongBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0).toNumber(true) : message.delete_hits; - if (message.delete_misses != null && message.hasOwnProperty("delete_misses")) - if (typeof message.delete_misses === "number") - object.delete_misses = options.longs === String ? String(message.delete_misses) : message.delete_misses; + object.delete_hits = options.longs === $String ? $util.Long.prototype.toString.call(message.delete_hits) : options.longs === $Number ? new $util.LongBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0).toNumber(true) : message.delete_hits; + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.delete_misses = typeof message.delete_misses === "number" ? $BigInt(message.delete_misses) : $util.Long.fromBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0, true).toBigInt(); + else if (typeof message.delete_misses === "number") + object.delete_misses = options.longs === $String ? $String(message.delete_misses) : message.delete_misses; else - object.delete_misses = options.longs === String ? $util.Long.prototype.toString.call(message.delete_misses) : options.longs === Number ? new $util.LongBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0).toNumber(true) : message.delete_misses; - if (message.bytes_read != null && message.hasOwnProperty("bytes_read")) - if (typeof message.bytes_read === "number") - object.bytes_read = options.longs === String ? String(message.bytes_read) : message.bytes_read; + object.delete_misses = options.longs === $String ? $util.Long.prototype.toString.call(message.delete_misses) : options.longs === $Number ? new $util.LongBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0).toNumber(true) : message.delete_misses; + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes_read = typeof message.bytes_read === "number" ? $BigInt(message.bytes_read) : $util.Long.fromBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0, true).toBigInt(); + else if (typeof message.bytes_read === "number") + object.bytes_read = options.longs === $String ? $String(message.bytes_read) : message.bytes_read; else - object.bytes_read = options.longs === String ? $util.Long.prototype.toString.call(message.bytes_read) : options.longs === Number ? new $util.LongBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0).toNumber(true) : message.bytes_read; - if (message.bytes_written != null && message.hasOwnProperty("bytes_written")) - if (typeof message.bytes_written === "number") - object.bytes_written = options.longs === String ? String(message.bytes_written) : message.bytes_written; + object.bytes_read = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes_read) : options.longs === $Number ? new $util.LongBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0).toNumber(true) : message.bytes_read; + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes_written = typeof message.bytes_written === "number" ? $BigInt(message.bytes_written) : $util.Long.fromBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0, true).toBigInt(); + else if (typeof message.bytes_written === "number") + object.bytes_written = options.longs === $String ? $String(message.bytes_written) : message.bytes_written; else - object.bytes_written = options.longs === String ? $util.Long.prototype.toString.call(message.bytes_written) : options.longs === Number ? new $util.LongBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0).toNumber(true) : message.bytes_written; - if (message.limit_maxbytes != null && message.hasOwnProperty("limit_maxbytes")) - if (typeof message.limit_maxbytes === "number") - object.limit_maxbytes = options.longs === String ? String(message.limit_maxbytes) : message.limit_maxbytes; + object.bytes_written = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes_written) : options.longs === $Number ? new $util.LongBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0).toNumber(true) : message.bytes_written; + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.limit_maxbytes = typeof message.limit_maxbytes === "number" ? $BigInt(message.limit_maxbytes) : $util.Long.fromBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0, true).toBigInt(); + else if (typeof message.limit_maxbytes === "number") + object.limit_maxbytes = options.longs === $String ? $String(message.limit_maxbytes) : message.limit_maxbytes; else - object.limit_maxbytes = options.longs === String ? $util.Long.prototype.toString.call(message.limit_maxbytes) : options.longs === Number ? new $util.LongBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0).toNumber(true) : message.limit_maxbytes; - if (message.curr_items != null && message.hasOwnProperty("curr_items")) - if (typeof message.curr_items === "number") - object.curr_items = options.longs === String ? String(message.curr_items) : message.curr_items; + object.limit_maxbytes = options.longs === $String ? $util.Long.prototype.toString.call(message.limit_maxbytes) : options.longs === $Number ? new $util.LongBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0).toNumber(true) : message.limit_maxbytes; + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.curr_items = typeof message.curr_items === "number" ? $BigInt(message.curr_items) : $util.Long.fromBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0, true).toBigInt(); + else if (typeof message.curr_items === "number") + object.curr_items = options.longs === $String ? $String(message.curr_items) : message.curr_items; else - object.curr_items = options.longs === String ? $util.Long.prototype.toString.call(message.curr_items) : options.longs === Number ? new $util.LongBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0).toNumber(true) : message.curr_items; - if (message.evictions != null && message.hasOwnProperty("evictions")) - if (typeof message.evictions === "number") - object.evictions = options.longs === String ? String(message.evictions) : message.evictions; + object.curr_items = options.longs === $String ? $util.Long.prototype.toString.call(message.curr_items) : options.longs === $Number ? new $util.LongBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0).toNumber(true) : message.curr_items; + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.evictions = typeof message.evictions === "number" ? $BigInt(message.evictions) : $util.Long.fromBits(message.evictions.low >>> 0, message.evictions.high >>> 0, true).toBigInt(); + else if (typeof message.evictions === "number") + object.evictions = options.longs === $String ? $String(message.evictions) : message.evictions; else - object.evictions = options.longs === String ? $util.Long.prototype.toString.call(message.evictions) : options.longs === Number ? new $util.LongBits(message.evictions.low >>> 0, message.evictions.high >>> 0).toNumber(true) : message.evictions; - if (message.bytes != null && message.hasOwnProperty("bytes")) - if (typeof message.bytes === "number") - object.bytes = options.longs === String ? String(message.bytes) : message.bytes; + object.evictions = options.longs === $String ? $util.Long.prototype.toString.call(message.evictions) : options.longs === $Number ? new $util.LongBits(message.evictions.low >>> 0, message.evictions.high >>> 0).toNumber(true) : message.evictions; + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes = typeof message.bytes === "number" ? $BigInt(message.bytes) : $util.Long.fromBits(message.bytes.low >>> 0, message.bytes.high >>> 0, true).toBigInt(); + else if (typeof message.bytes === "number") + object.bytes = options.longs === $String ? $String(message.bytes) : message.bytes; else - object.bytes = options.longs === String ? $util.Long.prototype.toString.call(message.bytes) : options.longs === Number ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber(true) : message.bytes; + object.bytes = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes) : options.longs === $Number ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber(true) : message.bytes; return object; }; @@ -14733,8 +19110,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedStatsResponse.prototype.toJSON = function() { + return CGCMsgMemCachedStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedStatsResponse + * @function getTypeUrl + * @memberof CGCMsgMemCachedStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedStatsResponse"; }; return CGCMsgMemCachedStatsResponse; @@ -14742,27 +19133,40 @@ $root.CGCMsgSQLStats = (function() { + /** + * Properties of a CGCMsgSQLStats. + * @typedef {Object} CGCMsgSQLStats.$Properties + * @property {number|null} [schema_catalog] CGCMsgSQLStats schema_catalog + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgSQLStats. * @exports ICGCMsgSQLStats * @interface ICGCMsgSQLStats - * @property {number|null} [schema_catalog] CGCMsgSQLStats schema_catalog + * @augments CGCMsgSQLStats.$Properties + * @deprecated Use CGCMsgSQLStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgSQLStats. + * @typedef {CGCMsgSQLStats.$Properties} CGCMsgSQLStats.$Shape */ /** * Constructs a new CGCMsgSQLStats. * @exports CGCMsgSQLStats * @classdesc Represents a CGCMsgSQLStats. - * @implements ICGCMsgSQLStats * @constructor - * @param {ICGCMsgSQLStats=} [properties] Properties to set + * @param {CGCMsgSQLStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSQLStats(properties) { + var CGCMsgSQLStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSQLStats schema_catalog. @@ -14777,10 +19181,14 @@ * @function create * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats=} [properties] Properties to set + * @param {CGCMsgSQLStats.$Properties=} [properties] Properties to set * @returns {CGCMsgSQLStats} CGCMsgSQLStats instance + * @type {{ + * (properties: CGCMsgSQLStats.$Shape): CGCMsgSQLStats & CGCMsgSQLStats.$Shape; + * (properties?: CGCMsgSQLStats.$Properties): CGCMsgSQLStats; + * }} */ - CGCMsgSQLStats.create = function create(properties) { + CGCMsgSQLStats.create = function(properties) { return new CGCMsgSQLStats(properties); }; @@ -14789,15 +19197,22 @@ * @function encode * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats} message CGCMsgSQLStats message or plain object to encode + * @param {CGCMsgSQLStats.$Properties} message CGCMsgSQLStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStats.encode = function encode(message, writer) { + CGCMsgSQLStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.schema_catalog != null && Object.hasOwnProperty.call(message, "schema_catalog")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.schema_catalog); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14806,12 +19221,12 @@ * @function encodeDelimited * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats} message CGCMsgSQLStats message or plain object to encode + * @param {CGCMsgSQLStats.$Properties} message CGCMsgSQLStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSQLStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14821,25 +19236,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSQLStats} CGCMsgSQLStats + * @returns {CGCMsgSQLStats & CGCMsgSQLStats.$Shape} CGCMsgSQLStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStats.decode = function decode(reader, length) { + CGCMsgSQLStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSQLStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSQLStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.schema_catalog = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.schema_catalog = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14849,11 +19281,11 @@ * @memberof CGCMsgSQLStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSQLStats} CGCMsgSQLStats + * @returns {CGCMsgSQLStats & CGCMsgSQLStats.$Shape} CGCMsgSQLStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSQLStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14867,10 +19299,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSQLStats.verify = function verify(message) { + CGCMsgSQLStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) if (!$util.isInteger(message.schema_catalog)) return "schema_catalog: integer expected"; return null; @@ -14884,9 +19320,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgSQLStats} CGCMsgSQLStats */ - CGCMsgSQLStats.fromObject = function fromObject(object) { + CGCMsgSQLStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSQLStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSQLStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSQLStats(); if (object.schema_catalog != null) message.schema_catalog = object.schema_catalog >>> 0; @@ -14902,13 +19344,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSQLStats.toObject = function toObject(message, options) { + CGCMsgSQLStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.schema_catalog = 0; - if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog")) + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) object.schema_catalog = message.schema_catalog; return object; }; @@ -14920,8 +19366,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSQLStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSQLStats.prototype.toJSON = function() { + return CGCMsgSQLStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSQLStats + * @function getTypeUrl + * @memberof CGCMsgSQLStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSQLStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSQLStats"; }; return CGCMsgSQLStats; @@ -14931,8 +19391,7 @@ /** * Properties of a CGCMsgSQLStatsResponse. - * @exports ICGCMsgSQLStatsResponse - * @interface ICGCMsgSQLStatsResponse + * @typedef {Object} CGCMsgSQLStatsResponse.$Properties * @property {number|null} [threads] CGCMsgSQLStatsResponse threads * @property {number|null} [threads_connected] CGCMsgSQLStatsResponse threads_connected * @property {number|null} [threads_active] CGCMsgSQLStatsResponse threads_active @@ -14942,22 +19401,36 @@ * @property {number|null} [deadlock_retries] CGCMsgSQLStatsResponse deadlock_retries * @property {number|null} [operations_timed_out_in_queue] CGCMsgSQLStatsResponse operations_timed_out_in_queue * @property {number|null} [errors] CGCMsgSQLStatsResponse errors + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgSQLStatsResponse. + * @exports ICGCMsgSQLStatsResponse + * @interface ICGCMsgSQLStatsResponse + * @augments CGCMsgSQLStatsResponse.$Properties + * @deprecated Use CGCMsgSQLStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgSQLStatsResponse. + * @typedef {CGCMsgSQLStatsResponse.$Properties} CGCMsgSQLStatsResponse.$Shape */ /** * Constructs a new CGCMsgSQLStatsResponse. * @exports CGCMsgSQLStatsResponse * @classdesc Represents a CGCMsgSQLStatsResponse. - * @implements ICGCMsgSQLStatsResponse * @constructor - * @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set + * @param {CGCMsgSQLStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSQLStatsResponse(properties) { + var CGCMsgSQLStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSQLStatsResponse threads. @@ -15036,10 +19509,14 @@ * @function create * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set + * @param {CGCMsgSQLStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse instance + * @type {{ + * (properties: CGCMsgSQLStatsResponse.$Shape): CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape; + * (properties?: CGCMsgSQLStatsResponse.$Properties): CGCMsgSQLStatsResponse; + * }} */ - CGCMsgSQLStatsResponse.create = function create(properties) { + CGCMsgSQLStatsResponse.create = function(properties) { return new CGCMsgSQLStatsResponse(properties); }; @@ -15048,31 +19525,38 @@ * @function encode * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse} message CGCMsgSQLStatsResponse message or plain object to encode + * @param {CGCMsgSQLStatsResponse.$Properties} message CGCMsgSQLStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStatsResponse.encode = function encode(message, writer) { + CGCMsgSQLStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.threads != null && Object.hasOwnProperty.call(message, "threads")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.threads); - if (message.threads_connected != null && Object.hasOwnProperty.call(message, "threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.threads_connected); - if (message.threads_active != null && Object.hasOwnProperty.call(message, "threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.threads_active); - if (message.operations_submitted != null && Object.hasOwnProperty.call(message, "operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.operations_submitted); - if (message.prepared_statements_executed != null && Object.hasOwnProperty.call(message, "prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.prepared_statements_executed); - if (message.non_prepared_statements_executed != null && Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.non_prepared_statements_executed); - if (message.deadlock_retries != null && Object.hasOwnProperty.call(message, "deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.deadlock_retries); - if (message.operations_timed_out_in_queue != null && Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.operations_timed_out_in_queue); - if (message.errors != null && Object.hasOwnProperty.call(message, "errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.errors); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15081,12 +19565,12 @@ * @function encodeDelimited * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse} message CGCMsgSQLStatsResponse message or plain object to encode + * @param {CGCMsgSQLStatsResponse.$Properties} message CGCMsgSQLStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSQLStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15096,49 +19580,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse + * @returns {CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape} CGCMsgSQLStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStatsResponse.decode = function decode(reader, length) { + CGCMsgSQLStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSQLStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSQLStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.threads = reader.uint32(); - break; - case 2: - message.threads_connected = reader.uint32(); - break; - case 3: - message.threads_active = reader.uint32(); - break; - case 4: - message.operations_submitted = reader.uint32(); - break; - case 5: - message.prepared_statements_executed = reader.uint32(); - break; - case 6: - message.non_prepared_statements_executed = reader.uint32(); - break; - case 7: - message.deadlock_retries = reader.uint32(); - break; - case 8: - message.operations_timed_out_in_queue = reader.uint32(); - break; - case 9: - message.errors = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.threads = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.threads_connected = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.threads_active = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.operations_submitted = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.prepared_statements_executed = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.non_prepared_statements_executed = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.deadlock_retries = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.operations_timed_out_in_queue = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.errors = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15148,11 +19673,11 @@ * @memberof CGCMsgSQLStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse + * @returns {CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape} CGCMsgSQLStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSQLStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15166,34 +19691,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSQLStatsResponse.verify = function verify(message) { + CGCMsgSQLStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.threads != null && message.hasOwnProperty("threads")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) if (!$util.isInteger(message.threads)) return "threads: integer expected"; - if (message.threads_connected != null && message.hasOwnProperty("threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) if (!$util.isInteger(message.threads_connected)) return "threads_connected: integer expected"; - if (message.threads_active != null && message.hasOwnProperty("threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) if (!$util.isInteger(message.threads_active)) return "threads_active: integer expected"; - if (message.operations_submitted != null && message.hasOwnProperty("operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) if (!$util.isInteger(message.operations_submitted)) return "operations_submitted: integer expected"; - if (message.prepared_statements_executed != null && message.hasOwnProperty("prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) if (!$util.isInteger(message.prepared_statements_executed)) return "prepared_statements_executed: integer expected"; - if (message.non_prepared_statements_executed != null && message.hasOwnProperty("non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) if (!$util.isInteger(message.non_prepared_statements_executed)) return "non_prepared_statements_executed: integer expected"; - if (message.deadlock_retries != null && message.hasOwnProperty("deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) if (!$util.isInteger(message.deadlock_retries)) return "deadlock_retries: integer expected"; - if (message.operations_timed_out_in_queue != null && message.hasOwnProperty("operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) if (!$util.isInteger(message.operations_timed_out_in_queue)) return "operations_timed_out_in_queue: integer expected"; - if (message.errors != null && message.hasOwnProperty("errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) if (!$util.isInteger(message.errors)) return "errors: integer expected"; return null; @@ -15207,9 +19736,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse */ - CGCMsgSQLStatsResponse.fromObject = function fromObject(object) { + CGCMsgSQLStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSQLStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSQLStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSQLStatsResponse(); if (object.threads != null) message.threads = object.threads >>> 0; @@ -15241,9 +19776,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSQLStatsResponse.toObject = function toObject(message, options) { + CGCMsgSQLStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.threads = 0; @@ -15256,23 +19795,23 @@ object.operations_timed_out_in_queue = 0; object.errors = 0; } - if (message.threads != null && message.hasOwnProperty("threads")) + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) object.threads = message.threads; - if (message.threads_connected != null && message.hasOwnProperty("threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) object.threads_connected = message.threads_connected; - if (message.threads_active != null && message.hasOwnProperty("threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) object.threads_active = message.threads_active; - if (message.operations_submitted != null && message.hasOwnProperty("operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) object.operations_submitted = message.operations_submitted; - if (message.prepared_statements_executed != null && message.hasOwnProperty("prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) object.prepared_statements_executed = message.prepared_statements_executed; - if (message.non_prepared_statements_executed != null && message.hasOwnProperty("non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) object.non_prepared_statements_executed = message.non_prepared_statements_executed; - if (message.deadlock_retries != null && message.hasOwnProperty("deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) object.deadlock_retries = message.deadlock_retries; - if (message.operations_timed_out_in_queue != null && message.hasOwnProperty("operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) object.operations_timed_out_in_queue = message.operations_timed_out_in_queue; - if (message.errors != null && message.hasOwnProperty("errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) object.errors = message.errors; return object; }; @@ -15284,8 +19823,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSQLStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSQLStatsResponse.prototype.toJSON = function() { + return CGCMsgSQLStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSQLStatsResponse + * @function getTypeUrl + * @memberof CGCMsgSQLStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSQLStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSQLStatsResponse"; }; return CGCMsgSQLStatsResponse; @@ -15295,28 +19848,41 @@ /** * Properties of a CMsgAMAddFreeLicense. - * @exports ICMsgAMAddFreeLicense - * @interface ICMsgAMAddFreeLicense + * @typedef {Object} CMsgAMAddFreeLicense.$Properties * @property {number|Long|null} [steamid] CMsgAMAddFreeLicense steamid * @property {number|null} [ip_public] CMsgAMAddFreeLicense ip_public * @property {number|null} [packageid] CMsgAMAddFreeLicense packageid * @property {string|null} [store_country_code] CMsgAMAddFreeLicense store_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMAddFreeLicense. + * @exports ICMsgAMAddFreeLicense + * @interface ICMsgAMAddFreeLicense + * @augments CMsgAMAddFreeLicense.$Properties + * @deprecated Use CMsgAMAddFreeLicense.$Properties instead. + */ + + /** + * Shape of a CMsgAMAddFreeLicense. + * @typedef {CMsgAMAddFreeLicense.$Properties} CMsgAMAddFreeLicense.$Shape */ /** * Constructs a new CMsgAMAddFreeLicense. * @exports CMsgAMAddFreeLicense * @classdesc Represents a CMsgAMAddFreeLicense. - * @implements ICMsgAMAddFreeLicense * @constructor - * @param {ICMsgAMAddFreeLicense=} [properties] Properties to set + * @param {CMsgAMAddFreeLicense.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMAddFreeLicense(properties) { + var CMsgAMAddFreeLicense = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMAddFreeLicense steamid. @@ -15324,7 +19890,7 @@ * @memberof CMsgAMAddFreeLicense * @instance */ - CMsgAMAddFreeLicense.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMAddFreeLicense.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMAddFreeLicense ip_public. @@ -15355,10 +19921,14 @@ * @function create * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense=} [properties] Properties to set + * @param {CMsgAMAddFreeLicense.$Properties=} [properties] Properties to set * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense instance + * @type {{ + * (properties: CMsgAMAddFreeLicense.$Shape): CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape; + * (properties?: CMsgAMAddFreeLicense.$Properties): CMsgAMAddFreeLicense; + * }} */ - CMsgAMAddFreeLicense.create = function create(properties) { + CMsgAMAddFreeLicense.create = function(properties) { return new CMsgAMAddFreeLicense(properties); }; @@ -15367,21 +19937,28 @@ * @function encode * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense} message CMsgAMAddFreeLicense message or plain object to encode + * @param {CMsgAMAddFreeLicense.$Properties} message CMsgAMAddFreeLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicense.encode = function encode(message, writer) { + CMsgAMAddFreeLicense.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.ip_public != null && Object.hasOwnProperty.call(message, "ip_public")) + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ip_public); - if (message.packageid != null && Object.hasOwnProperty.call(message, "packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.packageid); - if (message.store_country_code != null && Object.hasOwnProperty.call(message, "store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.store_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15390,12 +19967,12 @@ * @function encodeDelimited * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense} message CMsgAMAddFreeLicense message or plain object to encode + * @param {CMsgAMAddFreeLicense.$Properties} message CMsgAMAddFreeLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMAddFreeLicense.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15405,34 +19982,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense + * @returns {CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape} CMsgAMAddFreeLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicense.decode = function decode(reader, length) { + CMsgAMAddFreeLicense.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMAddFreeLicense(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMAddFreeLicense(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.ip_public = reader.uint32(); - break; - case 3: - message.packageid = reader.uint32(); - break; - case 4: - message.store_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.ip_public = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.packageid = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.store_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15442,11 +20045,11 @@ * @memberof CMsgAMAddFreeLicense * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense + * @returns {CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape} CMsgAMAddFreeLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicense.decodeDelimited = function decodeDelimited(reader) { + CMsgAMAddFreeLicense.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15460,19 +20063,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMAddFreeLicense.verify = function verify(message) { + CMsgAMAddFreeLicense.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.ip_public != null && message.hasOwnProperty("ip_public")) + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) if (!$util.isInteger(message.ip_public)) return "ip_public: integer expected"; - if (message.packageid != null && message.hasOwnProperty("packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) if (!$util.isInteger(message.packageid)) return "packageid: integer expected"; - if (message.store_country_code != null && message.hasOwnProperty("store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) if (!$util.isString(message.store_country_code)) return "store_country_code: string expected"; return null; @@ -15486,25 +20093,31 @@ * @param {Object.} object Plain object * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense */ - CMsgAMAddFreeLicense.fromObject = function fromObject(object) { + CMsgAMAddFreeLicense.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMAddFreeLicense) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMAddFreeLicense: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMAddFreeLicense(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.ip_public != null) message.ip_public = object.ip_public >>> 0; if (object.packageid != null) message.packageid = object.packageid >>> 0; if (object.store_country_code != null) - message.store_country_code = String(object.store_country_code); + message.store_country_code = $String(object.store_country_code); return message; }; @@ -15517,30 +20130,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMAddFreeLicense.toObject = function toObject(message, options) { + CMsgAMAddFreeLicense.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.ip_public = 0; object.packageid = 0; object.store_country_code = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.ip_public != null && message.hasOwnProperty("ip_public")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) object.ip_public = message.ip_public; - if (message.packageid != null && message.hasOwnProperty("packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) object.packageid = message.packageid; - if (message.store_country_code != null && message.hasOwnProperty("store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) object.store_country_code = message.store_country_code; return object; }; @@ -15552,8 +20171,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMAddFreeLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMAddFreeLicense.prototype.toJSON = function() { + return CMsgAMAddFreeLicense.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMAddFreeLicense + * @function getTypeUrl + * @memberof CMsgAMAddFreeLicense + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMAddFreeLicense.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMAddFreeLicense"; }; return CMsgAMAddFreeLicense; @@ -15563,27 +20196,40 @@ /** * Properties of a CMsgAMAddFreeLicenseResponse. - * @exports ICMsgAMAddFreeLicenseResponse - * @interface ICMsgAMAddFreeLicenseResponse + * @typedef {Object} CMsgAMAddFreeLicenseResponse.$Properties * @property {number|null} [eresult] CMsgAMAddFreeLicenseResponse eresult * @property {number|null} [purchase_result_detail] CMsgAMAddFreeLicenseResponse purchase_result_detail * @property {number|Long|null} [transid] CMsgAMAddFreeLicenseResponse transid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMAddFreeLicenseResponse. + * @exports ICMsgAMAddFreeLicenseResponse + * @interface ICMsgAMAddFreeLicenseResponse + * @augments CMsgAMAddFreeLicenseResponse.$Properties + * @deprecated Use CMsgAMAddFreeLicenseResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMAddFreeLicenseResponse. + * @typedef {CMsgAMAddFreeLicenseResponse.$Properties} CMsgAMAddFreeLicenseResponse.$Shape */ /** * Constructs a new CMsgAMAddFreeLicenseResponse. * @exports CMsgAMAddFreeLicenseResponse * @classdesc Represents a CMsgAMAddFreeLicenseResponse. - * @implements ICMsgAMAddFreeLicenseResponse * @constructor - * @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set + * @param {CMsgAMAddFreeLicenseResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMAddFreeLicenseResponse(properties) { + var CMsgAMAddFreeLicenseResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMAddFreeLicenseResponse eresult. @@ -15607,17 +20253,21 @@ * @memberof CMsgAMAddFreeLicenseResponse * @instance */ - CMsgAMAddFreeLicenseResponse.prototype.transid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMAddFreeLicenseResponse.prototype.transid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgAMAddFreeLicenseResponse instance using the specified properties. * @function create * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set + * @param {CMsgAMAddFreeLicenseResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse instance + * @type {{ + * (properties: CMsgAMAddFreeLicenseResponse.$Shape): CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape; + * (properties?: CMsgAMAddFreeLicenseResponse.$Properties): CMsgAMAddFreeLicenseResponse; + * }} */ - CMsgAMAddFreeLicenseResponse.create = function create(properties) { + CMsgAMAddFreeLicenseResponse.create = function(properties) { return new CMsgAMAddFreeLicenseResponse(properties); }; @@ -15626,19 +20276,26 @@ * @function encode * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse} message CMsgAMAddFreeLicenseResponse message or plain object to encode + * @param {CMsgAMAddFreeLicenseResponse.$Properties} message CMsgAMAddFreeLicenseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicenseResponse.encode = function encode(message, writer) { + CMsgAMAddFreeLicenseResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); - if (message.purchase_result_detail != null && Object.hasOwnProperty.call(message, "purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.purchase_result_detail); - if (message.transid != null && Object.hasOwnProperty.call(message, "transid")) + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.transid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15647,12 +20304,12 @@ * @function encodeDelimited * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse} message CMsgAMAddFreeLicenseResponse message or plain object to encode + * @param {CMsgAMAddFreeLicenseResponse.$Properties} message CMsgAMAddFreeLicenseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicenseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMAddFreeLicenseResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15662,31 +20319,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse + * @returns {CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape} CMsgAMAddFreeLicenseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicenseResponse.decode = function decode(reader, length) { + CMsgAMAddFreeLicenseResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMAddFreeLicenseResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMAddFreeLicenseResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - case 2: - message.purchase_result_detail = reader.int32(); - break; - case 3: - message.transid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.purchase_result_detail = reader.int32(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.transid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15696,11 +20376,11 @@ * @memberof CMsgAMAddFreeLicenseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse + * @returns {CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape} CMsgAMAddFreeLicenseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicenseResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMAddFreeLicenseResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15714,16 +20394,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMAddFreeLicenseResponse.verify = function verify(message) { + CMsgAMAddFreeLicenseResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.purchase_result_detail != null && message.hasOwnProperty("purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) if (!$util.isInteger(message.purchase_result_detail)) return "purchase_result_detail: integer expected"; - if (message.transid != null && message.hasOwnProperty("transid")) + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) if (!$util.isInteger(message.transid) && !(message.transid && $util.isInteger(message.transid.low) && $util.isInteger(message.transid.high))) return "transid: integer|Long expected"; return null; @@ -15737,9 +20421,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse */ - CMsgAMAddFreeLicenseResponse.fromObject = function fromObject(object) { + CMsgAMAddFreeLicenseResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMAddFreeLicenseResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMAddFreeLicenseResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMAddFreeLicenseResponse(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -15747,13 +20437,13 @@ message.purchase_result_detail = object.purchase_result_detail | 0; if (object.transid != null) if ($util.Long) - (message.transid = $util.Long.fromValue(object.transid)).unsigned = false; + message.transid = $util.Long.fromValue(object.transid, true); else if (typeof object.transid === "string") - message.transid = parseInt(object.transid, 10); + message.transid = $parseInt(object.transid, 10); else if (typeof object.transid === "number") message.transid = object.transid; else if (typeof object.transid === "object") - message.transid = new $util.LongBits(object.transid.low >>> 0, object.transid.high >>> 0).toNumber(); + message.transid = new $util.LongBits(object.transid.low >>> 0, object.transid.high >>> 0).toNumber(true); return message; }; @@ -15766,28 +20456,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMAddFreeLicenseResponse.toObject = function toObject(message, options) { + CMsgAMAddFreeLicenseResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.purchase_result_detail = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.transid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.transid = options.longs === String ? "0" : 0; + object.transid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.purchase_result_detail != null && message.hasOwnProperty("purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) object.purchase_result_detail = message.purchase_result_detail; - if (message.transid != null && message.hasOwnProperty("transid")) - if (typeof message.transid === "number") - object.transid = options.longs === String ? String(message.transid) : message.transid; + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.transid = typeof message.transid === "number" ? $BigInt(message.transid) : $util.Long.fromBits(message.transid.low >>> 0, message.transid.high >>> 0, true).toBigInt(); + else if (typeof message.transid === "number") + object.transid = options.longs === $String ? $String(message.transid) : message.transid; else - object.transid = options.longs === String ? $util.Long.prototype.toString.call(message.transid) : options.longs === Number ? new $util.LongBits(message.transid.low >>> 0, message.transid.high >>> 0).toNumber() : message.transid; + object.transid = options.longs === $String ? $util.Long.prototype.toString.call(message.transid) : options.longs === $Number ? new $util.LongBits(message.transid.low >>> 0, message.transid.high >>> 0).toNumber(true) : message.transid; return object; }; @@ -15798,8 +20494,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMAddFreeLicenseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMAddFreeLicenseResponse.prototype.toJSON = function() { + return CMsgAMAddFreeLicenseResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMAddFreeLicenseResponse + * @function getTypeUrl + * @memberof CMsgAMAddFreeLicenseResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMAddFreeLicenseResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMAddFreeLicenseResponse"; }; return CMsgAMAddFreeLicenseResponse; @@ -15807,28 +20517,41 @@ $root.CGCMsgGetIPLocation = (function() { + /** + * Properties of a CGCMsgGetIPLocation. + * @typedef {Object} CGCMsgGetIPLocation.$Properties + * @property {Array.|null} [ips] CGCMsgGetIPLocation ips + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetIPLocation. * @exports ICGCMsgGetIPLocation * @interface ICGCMsgGetIPLocation - * @property {Array.|null} [ips] CGCMsgGetIPLocation ips + * @augments CGCMsgGetIPLocation.$Properties + * @deprecated Use CGCMsgGetIPLocation.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetIPLocation. + * @typedef {CGCMsgGetIPLocation.$Properties} CGCMsgGetIPLocation.$Shape */ /** * Constructs a new CGCMsgGetIPLocation. * @exports CGCMsgGetIPLocation * @classdesc Represents a CGCMsgGetIPLocation. - * @implements ICGCMsgGetIPLocation * @constructor - * @param {ICGCMsgGetIPLocation=} [properties] Properties to set + * @param {CGCMsgGetIPLocation.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetIPLocation(properties) { + var CGCMsgGetIPLocation = function (properties) { this.ips = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetIPLocation ips. @@ -15843,10 +20566,14 @@ * @function create * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation=} [properties] Properties to set + * @param {CGCMsgGetIPLocation.$Properties=} [properties] Properties to set * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation instance + * @type {{ + * (properties: CGCMsgGetIPLocation.$Shape): CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape; + * (properties?: CGCMsgGetIPLocation.$Properties): CGCMsgGetIPLocation; + * }} */ - CGCMsgGetIPLocation.create = function create(properties) { + CGCMsgGetIPLocation.create = function(properties) { return new CGCMsgGetIPLocation(properties); }; @@ -15855,16 +20582,23 @@ * @function encode * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation} message CGCMsgGetIPLocation message or plain object to encode + * @param {CGCMsgGetIPLocation.$Properties} message CGCMsgGetIPLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocation.encode = function encode(message, writer) { + CGCMsgGetIPLocation.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.ips != null && message.ips.length) for (var i = 0; i < message.ips.length; ++i) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.ips[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15873,12 +20607,12 @@ * @function encodeDelimited * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation} message CGCMsgGetIPLocation message or plain object to encode + * @param {CGCMsgGetIPLocation.$Properties} message CGCMsgGetIPLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetIPLocation.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15888,32 +20622,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation + * @returns {CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape} CGCMsgGetIPLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocation.decode = function decode(reader, length) { + CGCMsgGetIPLocation.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetIPLocation(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetIPLocation(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.ips && message.ips.length)) - message.ips = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ips.push(reader.fixed32()); - } else - message.ips.push(reader.fixed32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.ips && message.ips.length)) + message.ips = []; + reader.fixed32s(message.ips); + continue; + } + if (wireType !== 5) + break; + if (!(message.ips && message.ips.length)) + message.ips = []; + message.ips.push(reader.fixed32()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15923,11 +20675,11 @@ * @memberof CGCMsgGetIPLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation + * @returns {CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape} CGCMsgGetIPLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocation.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetIPLocation.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15941,11 +20693,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetIPLocation.verify = function verify(message) { + CGCMsgGetIPLocation.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ips != null && message.hasOwnProperty("ips")) { - if (!Array.isArray(message.ips)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ips != null && $Object.hasOwnProperty.call(message, "ips")) { + if (!$Array.isArray(message.ips)) return "ips: array expected"; for (var i = 0; i < message.ips.length; ++i) if (!$util.isInteger(message.ips[i])) @@ -15962,14 +20718,20 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation */ - CGCMsgGetIPLocation.fromObject = function fromObject(object) { + CGCMsgGetIPLocation.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetIPLocation) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetIPLocation: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetIPLocation(); if (object.ips) { - if (!Array.isArray(object.ips)) - throw TypeError(".CGCMsgGetIPLocation.ips: array expected"); - message.ips = []; + if (!$Array.isArray(object.ips)) + throw $TypeError(".CGCMsgGetIPLocation.ips: array expected"); + message.ips = $Array(object.ips.length); for (var i = 0; i < object.ips.length; ++i) message.ips[i] = object.ips[i] >>> 0; } @@ -15985,14 +20747,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetIPLocation.toObject = function toObject(message, options) { + CGCMsgGetIPLocation.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.ips = []; if (message.ips && message.ips.length) { - object.ips = []; + object.ips = $Array(message.ips.length); for (var j = 0; j < message.ips.length; ++j) object.ips[j] = message.ips[j]; } @@ -16006,8 +20772,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetIPLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetIPLocation.prototype.toJSON = function() { + return CGCMsgGetIPLocation.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetIPLocation + * @function getTypeUrl + * @memberof CGCMsgGetIPLocation + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetIPLocation.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetIPLocation"; }; return CGCMsgGetIPLocation; @@ -16017,30 +20797,43 @@ /** * Properties of a CIPLocationInfo. - * @exports ICIPLocationInfo - * @interface ICIPLocationInfo + * @typedef {Object} CIPLocationInfo.$Properties * @property {number|null} [ip] CIPLocationInfo ip * @property {number|null} [latitude] CIPLocationInfo latitude * @property {number|null} [longitude] CIPLocationInfo longitude * @property {string|null} [country] CIPLocationInfo country * @property {string|null} [state] CIPLocationInfo state * @property {string|null} [city] CIPLocationInfo city + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CIPLocationInfo. + * @exports ICIPLocationInfo + * @interface ICIPLocationInfo + * @augments CIPLocationInfo.$Properties + * @deprecated Use CIPLocationInfo.$Properties instead. + */ + + /** + * Shape of a CIPLocationInfo. + * @typedef {CIPLocationInfo.$Properties} CIPLocationInfo.$Shape */ /** * Constructs a new CIPLocationInfo. * @exports CIPLocationInfo * @classdesc Represents a CIPLocationInfo. - * @implements ICIPLocationInfo * @constructor - * @param {ICIPLocationInfo=} [properties] Properties to set + * @param {CIPLocationInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CIPLocationInfo(properties) { + var CIPLocationInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CIPLocationInfo ip. @@ -16095,10 +20888,14 @@ * @function create * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo=} [properties] Properties to set + * @param {CIPLocationInfo.$Properties=} [properties] Properties to set * @returns {CIPLocationInfo} CIPLocationInfo instance + * @type {{ + * (properties: CIPLocationInfo.$Shape): CIPLocationInfo & CIPLocationInfo.$Shape; + * (properties?: CIPLocationInfo.$Properties): CIPLocationInfo; + * }} */ - CIPLocationInfo.create = function create(properties) { + CIPLocationInfo.create = function(properties) { return new CIPLocationInfo(properties); }; @@ -16107,25 +20904,32 @@ * @function encode * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo} message CIPLocationInfo message or plain object to encode + * @param {CIPLocationInfo.$Properties} message CIPLocationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CIPLocationInfo.encode = function encode(message, writer) { + CIPLocationInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.ip); - if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.latitude); - if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.longitude); - if (message.country != null && Object.hasOwnProperty.call(message, "country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.state); - if (message.city != null && Object.hasOwnProperty.call(message, "city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.city); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16134,12 +20938,12 @@ * @function encodeDelimited * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo} message CIPLocationInfo message or plain object to encode + * @param {CIPLocationInfo.$Properties} message CIPLocationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CIPLocationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CIPLocationInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16149,40 +20953,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CIPLocationInfo} CIPLocationInfo + * @returns {CIPLocationInfo & CIPLocationInfo.$Shape} CIPLocationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CIPLocationInfo.decode = function decode(reader, length) { + CIPLocationInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CIPLocationInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CIPLocationInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ip = reader.uint32(); - break; - case 2: - message.latitude = reader.float(); - break; - case 3: - message.longitude = reader.float(); - break; - case 4: - message.country = reader.string(); - break; - case 5: - message.state = reader.string(); - break; - case 6: - message.city = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ip = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.latitude = reader.float(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.longitude = reader.float(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.country = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.state = reader.string(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.city = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16192,11 +21028,11 @@ * @memberof CIPLocationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CIPLocationInfo} CIPLocationInfo + * @returns {CIPLocationInfo & CIPLocationInfo.$Shape} CIPLocationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CIPLocationInfo.decodeDelimited = function decodeDelimited(reader) { + CIPLocationInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16210,25 +21046,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CIPLocationInfo.verify = function verify(message) { + CIPLocationInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ip != null && message.hasOwnProperty("ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) if (!$util.isInteger(message.ip)) return "ip: integer expected"; - if (message.latitude != null && message.hasOwnProperty("latitude")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) if (typeof message.latitude !== "number") return "latitude: number expected"; - if (message.longitude != null && message.hasOwnProperty("longitude")) + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) if (typeof message.longitude !== "number") return "longitude: number expected"; - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) if (!$util.isString(message.country)) return "country: string expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) if (!$util.isString(message.state)) return "state: string expected"; - if (message.city != null && message.hasOwnProperty("city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) if (!$util.isString(message.city)) return "city: string expected"; return null; @@ -16242,22 +21082,28 @@ * @param {Object.} object Plain object * @returns {CIPLocationInfo} CIPLocationInfo */ - CIPLocationInfo.fromObject = function fromObject(object) { + CIPLocationInfo.fromObject = function (object, _depth) { if (object instanceof $root.CIPLocationInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CIPLocationInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CIPLocationInfo(); if (object.ip != null) message.ip = object.ip >>> 0; if (object.latitude != null) - message.latitude = Number(object.latitude); + message.latitude = $Number(object.latitude); if (object.longitude != null) - message.longitude = Number(object.longitude); + message.longitude = $Number(object.longitude); if (object.country != null) - message.country = String(object.country); + message.country = $String(object.country); if (object.state != null) - message.state = String(object.state); + message.state = $String(object.state); if (object.city != null) - message.city = String(object.city); + message.city = $String(object.city); return message; }; @@ -16270,9 +21116,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CIPLocationInfo.toObject = function toObject(message, options) { + CIPLocationInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.ip = 0; @@ -16282,17 +21132,17 @@ object.state = ""; object.city = ""; } - if (message.ip != null && message.hasOwnProperty("ip")) + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) object.ip = message.ip; - if (message.latitude != null && message.hasOwnProperty("latitude")) - object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; - if (message.longitude != null && message.hasOwnProperty("longitude")) - object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; - if (message.country != null && message.hasOwnProperty("country")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) + object.latitude = options.json && !$isFinite(message.latitude) ? $String(message.latitude) : message.latitude; + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) + object.longitude = options.json && !$isFinite(message.longitude) ? $String(message.longitude) : message.longitude; + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) object.country = message.country; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) object.state = message.state; - if (message.city != null && message.hasOwnProperty("city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) object.city = message.city; return object; }; @@ -16304,8 +21154,22 @@ * @instance * @returns {Object.} JSON object */ - CIPLocationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CIPLocationInfo.prototype.toJSON = function() { + return CIPLocationInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CIPLocationInfo + * @function getTypeUrl + * @memberof CIPLocationInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CIPLocationInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CIPLocationInfo"; }; return CIPLocationInfo; @@ -16313,32 +21177,45 @@ $root.CGCMsgGetIPLocationResponse = (function() { + /** + * Properties of a CGCMsgGetIPLocationResponse. + * @typedef {Object} CGCMsgGetIPLocationResponse.$Properties + * @property {Array.|null} [infos] CGCMsgGetIPLocationResponse infos + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetIPLocationResponse. * @exports ICGCMsgGetIPLocationResponse * @interface ICGCMsgGetIPLocationResponse - * @property {Array.|null} [infos] CGCMsgGetIPLocationResponse infos + * @augments CGCMsgGetIPLocationResponse.$Properties + * @deprecated Use CGCMsgGetIPLocationResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetIPLocationResponse. + * @typedef {CGCMsgGetIPLocationResponse.$Properties} CGCMsgGetIPLocationResponse.$Shape */ /** * Constructs a new CGCMsgGetIPLocationResponse. * @exports CGCMsgGetIPLocationResponse * @classdesc Represents a CGCMsgGetIPLocationResponse. - * @implements ICGCMsgGetIPLocationResponse * @constructor - * @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set + * @param {CGCMsgGetIPLocationResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetIPLocationResponse(properties) { + var CGCMsgGetIPLocationResponse = function (properties) { this.infos = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetIPLocationResponse infos. - * @member {Array.} infos + * @member {Array.} infos * @memberof CGCMsgGetIPLocationResponse * @instance */ @@ -16349,10 +21226,14 @@ * @function create * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set + * @param {CGCMsgGetIPLocationResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse instance + * @type {{ + * (properties: CGCMsgGetIPLocationResponse.$Shape): CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape; + * (properties?: CGCMsgGetIPLocationResponse.$Properties): CGCMsgGetIPLocationResponse; + * }} */ - CGCMsgGetIPLocationResponse.create = function create(properties) { + CGCMsgGetIPLocationResponse.create = function(properties) { return new CGCMsgGetIPLocationResponse(properties); }; @@ -16361,16 +21242,23 @@ * @function encode * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse} message CGCMsgGetIPLocationResponse message or plain object to encode + * @param {CGCMsgGetIPLocationResponse.$Properties} message CGCMsgGetIPLocationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocationResponse.encode = function encode(message, writer) { + CGCMsgGetIPLocationResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.infos != null && message.infos.length) for (var i = 0; i < message.infos.length; ++i) - $root.CIPLocationInfo.encode(message.infos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CIPLocationInfo.encode(message.infos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16379,12 +21267,12 @@ * @function encodeDelimited * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse} message CGCMsgGetIPLocationResponse message or plain object to encode + * @param {CGCMsgGetIPLocationResponse.$Properties} message CGCMsgGetIPLocationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetIPLocationResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16394,27 +21282,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse + * @returns {CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape} CGCMsgGetIPLocationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocationResponse.decode = function decode(reader, length) { + CGCMsgGetIPLocationResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetIPLocationResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetIPLocationResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.infos && message.infos.length)) - message.infos = []; - message.infos.push($root.CIPLocationInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.infos && message.infos.length)) + message.infos = []; + message.infos.push($root.CIPLocationInfo.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16424,11 +21329,11 @@ * @memberof CGCMsgGetIPLocationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse + * @returns {CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape} CGCMsgGetIPLocationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocationResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetIPLocationResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16442,14 +21347,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetIPLocationResponse.verify = function verify(message) { + CGCMsgGetIPLocationResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.infos != null && message.hasOwnProperty("infos")) { - if (!Array.isArray(message.infos)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.infos != null && $Object.hasOwnProperty.call(message, "infos")) { + if (!$Array.isArray(message.infos)) return "infos: array expected"; for (var i = 0; i < message.infos.length; ++i) { - var error = $root.CIPLocationInfo.verify(message.infos[i]); + var error = $root.CIPLocationInfo.verify(message.infos[i], _depth + 1); if (error) return "infos." + error; } @@ -16465,18 +21374,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse */ - CGCMsgGetIPLocationResponse.fromObject = function fromObject(object) { + CGCMsgGetIPLocationResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetIPLocationResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetIPLocationResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetIPLocationResponse(); if (object.infos) { - if (!Array.isArray(object.infos)) - throw TypeError(".CGCMsgGetIPLocationResponse.infos: array expected"); - message.infos = []; + if (!$Array.isArray(object.infos)) + throw $TypeError(".CGCMsgGetIPLocationResponse.infos: array expected"); + message.infos = $Array(object.infos.length); for (var i = 0; i < object.infos.length; ++i) { - if (typeof object.infos[i] !== "object") - throw TypeError(".CGCMsgGetIPLocationResponse.infos: object expected"); - message.infos[i] = $root.CIPLocationInfo.fromObject(object.infos[i]); + if (!$util.isObject(object.infos[i])) + throw $TypeError(".CGCMsgGetIPLocationResponse.infos: object expected"); + message.infos[i] = $root.CIPLocationInfo.fromObject(object.infos[i], _depth + 1); } } return message; @@ -16491,16 +21406,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetIPLocationResponse.toObject = function toObject(message, options) { + CGCMsgGetIPLocationResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.infos = []; if (message.infos && message.infos.length) { - object.infos = []; + object.infos = $Array(message.infos.length); for (var j = 0; j < message.infos.length; ++j) - object.infos[j] = $root.CIPLocationInfo.toObject(message.infos[j], options); + object.infos[j] = $root.CIPLocationInfo.toObject(message.infos[j], options, _depth + 1); } return object; }; @@ -16512,8 +21431,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetIPLocationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetIPLocationResponse.prototype.toJSON = function() { + return CGCMsgGetIPLocationResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetIPLocationResponse + * @function getTypeUrl + * @memberof CGCMsgGetIPLocationResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetIPLocationResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetIPLocationResponse"; }; return CGCMsgGetIPLocationResponse; @@ -16523,26 +21456,39 @@ /** * Properties of a CGCMsgSystemStatsSchema. - * @exports ICGCMsgSystemStatsSchema - * @interface ICGCMsgSystemStatsSchema + * @typedef {Object} CGCMsgSystemStatsSchema.$Properties * @property {number|null} [gc_app_id] CGCMsgSystemStatsSchema gc_app_id * @property {Uint8Array|null} [schema_kv] CGCMsgSystemStatsSchema schema_kv + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgSystemStatsSchema. + * @exports ICGCMsgSystemStatsSchema + * @interface ICGCMsgSystemStatsSchema + * @augments CGCMsgSystemStatsSchema.$Properties + * @deprecated Use CGCMsgSystemStatsSchema.$Properties instead. + */ + + /** + * Shape of a CGCMsgSystemStatsSchema. + * @typedef {CGCMsgSystemStatsSchema.$Properties} CGCMsgSystemStatsSchema.$Shape */ /** * Constructs a new CGCMsgSystemStatsSchema. * @exports CGCMsgSystemStatsSchema * @classdesc Represents a CGCMsgSystemStatsSchema. - * @implements ICGCMsgSystemStatsSchema * @constructor - * @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set + * @param {CGCMsgSystemStatsSchema.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSystemStatsSchema(properties) { + var CGCMsgSystemStatsSchema = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSystemStatsSchema gc_app_id. @@ -16565,10 +21511,14 @@ * @function create * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set + * @param {CGCMsgSystemStatsSchema.$Properties=} [properties] Properties to set * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema instance + * @type {{ + * (properties: CGCMsgSystemStatsSchema.$Shape): CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape; + * (properties?: CGCMsgSystemStatsSchema.$Properties): CGCMsgSystemStatsSchema; + * }} */ - CGCMsgSystemStatsSchema.create = function create(properties) { + CGCMsgSystemStatsSchema.create = function(properties) { return new CGCMsgSystemStatsSchema(properties); }; @@ -16577,17 +21527,24 @@ * @function encode * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema} message CGCMsgSystemStatsSchema message or plain object to encode + * @param {CGCMsgSystemStatsSchema.$Properties} message CGCMsgSystemStatsSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSystemStatsSchema.encode = function encode(message, writer) { + CGCMsgSystemStatsSchema.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gc_app_id != null && Object.hasOwnProperty.call(message, "gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gc_app_id); - if (message.schema_kv != null && Object.hasOwnProperty.call(message, "schema_kv")) + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.schema_kv); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16596,12 +21553,12 @@ * @function encodeDelimited * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema} message CGCMsgSystemStatsSchema message or plain object to encode + * @param {CGCMsgSystemStatsSchema.$Properties} message CGCMsgSystemStatsSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSystemStatsSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSystemStatsSchema.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16611,28 +21568,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema + * @returns {CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape} CGCMsgSystemStatsSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSystemStatsSchema.decode = function decode(reader, length) { + CGCMsgSystemStatsSchema.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSystemStatsSchema(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSystemStatsSchema(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gc_app_id = reader.uint32(); - break; - case 2: - message.schema_kv = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gc_app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.schema_kv = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16642,11 +21619,11 @@ * @memberof CGCMsgSystemStatsSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema + * @returns {CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape} CGCMsgSystemStatsSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSystemStatsSchema.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSystemStatsSchema.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16660,13 +21637,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSystemStatsSchema.verify = function verify(message) { + CGCMsgSystemStatsSchema.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) if (!$util.isInteger(message.gc_app_id)) return "gc_app_id: integer expected"; - if (message.schema_kv != null && message.hasOwnProperty("schema_kv")) + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) if (!(message.schema_kv && typeof message.schema_kv.length === "number" || $util.isString(message.schema_kv))) return "schema_kv: buffer expected"; return null; @@ -16680,16 +21661,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema */ - CGCMsgSystemStatsSchema.fromObject = function fromObject(object) { + CGCMsgSystemStatsSchema.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSystemStatsSchema) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSystemStatsSchema: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSystemStatsSchema(); if (object.gc_app_id != null) message.gc_app_id = object.gc_app_id >>> 0; if (object.schema_kv != null) if (typeof object.schema_kv === "string") $util.base64.decode(object.schema_kv, message.schema_kv = $util.newBuffer($util.base64.length(object.schema_kv)), 0); - else if (object.schema_kv.length) + else if (object.schema_kv.length >= 0) message.schema_kv = object.schema_kv; return message; }; @@ -16703,24 +21690,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSystemStatsSchema.toObject = function toObject(message, options) { + CGCMsgSystemStatsSchema.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gc_app_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.schema_kv = ""; else { object.schema_kv = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.schema_kv = $util.newBuffer(object.schema_kv); } } - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) object.gc_app_id = message.gc_app_id; - if (message.schema_kv != null && message.hasOwnProperty("schema_kv")) - object.schema_kv = options.bytes === String ? $util.base64.encode(message.schema_kv, 0, message.schema_kv.length) : options.bytes === Array ? Array.prototype.slice.call(message.schema_kv) : message.schema_kv; + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) + object.schema_kv = options.bytes === $String ? $util.base64.encode(message.schema_kv, 0, message.schema_kv.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.schema_kv) : message.schema_kv; return object; }; @@ -16731,8 +21722,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSystemStatsSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSystemStatsSchema.prototype.toJSON = function() { + return CGCMsgSystemStatsSchema.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSystemStatsSchema + * @function getTypeUrl + * @memberof CGCMsgSystemStatsSchema + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSystemStatsSchema.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSystemStatsSchema"; }; return CGCMsgSystemStatsSchema; @@ -16740,36 +21745,53 @@ $root.CGCMsgGetSystemStats = (function() { + /** + * Properties of a CGCMsgGetSystemStats. + * @typedef {Object} CGCMsgGetSystemStats.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetSystemStats. * @exports ICGCMsgGetSystemStats * @interface ICGCMsgGetSystemStats + * @augments CGCMsgGetSystemStats.$Properties + * @deprecated Use CGCMsgGetSystemStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetSystemStats. + * @typedef {CGCMsgGetSystemStats.$Properties} CGCMsgGetSystemStats.$Shape */ /** * Constructs a new CGCMsgGetSystemStats. * @exports CGCMsgGetSystemStats * @classdesc Represents a CGCMsgGetSystemStats. - * @implements ICGCMsgGetSystemStats * @constructor - * @param {ICGCMsgGetSystemStats=} [properties] Properties to set + * @param {CGCMsgGetSystemStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetSystemStats(properties) { + var CGCMsgGetSystemStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CGCMsgGetSystemStats instance using the specified properties. * @function create * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats=} [properties] Properties to set + * @param {CGCMsgGetSystemStats.$Properties=} [properties] Properties to set * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats instance + * @type {{ + * (properties: CGCMsgGetSystemStats.$Shape): CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape; + * (properties?: CGCMsgGetSystemStats.$Properties): CGCMsgGetSystemStats; + * }} */ - CGCMsgGetSystemStats.create = function create(properties) { + CGCMsgGetSystemStats.create = function(properties) { return new CGCMsgGetSystemStats(properties); }; @@ -16778,13 +21800,20 @@ * @function encode * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats} message CGCMsgGetSystemStats message or plain object to encode + * @param {CGCMsgGetSystemStats.$Properties} message CGCMsgGetSystemStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStats.encode = function encode(message, writer) { + CGCMsgGetSystemStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16793,12 +21822,12 @@ * @function encodeDelimited * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats} message CGCMsgGetSystemStats message or plain object to encode + * @param {CGCMsgGetSystemStats.$Properties} message CGCMsgGetSystemStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetSystemStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16808,22 +21837,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats + * @returns {CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape} CGCMsgGetSystemStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStats.decode = function decode(reader, length) { + CGCMsgGetSystemStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetSystemStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetSystemStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16833,11 +21873,11 @@ * @memberof CGCMsgGetSystemStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats + * @returns {CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape} CGCMsgGetSystemStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetSystemStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16851,9 +21891,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetSystemStats.verify = function verify(message) { + CGCMsgGetSystemStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -16865,9 +21909,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats */ - CGCMsgGetSystemStats.fromObject = function fromObject(object) { + CGCMsgGetSystemStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetSystemStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetSystemStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CGCMsgGetSystemStats(); }; @@ -16880,7 +21930,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetSystemStats.toObject = function toObject() { + CGCMsgGetSystemStats.toObject = function () { return {}; }; @@ -16891,8 +21941,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetSystemStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetSystemStats.prototype.toJSON = function() { + return CGCMsgGetSystemStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetSystemStats + * @function getTypeUrl + * @memberof CGCMsgGetSystemStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetSystemStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetSystemStats"; }; return CGCMsgGetSystemStats; @@ -16902,8 +21966,7 @@ /** * Properties of a CGCMsgGetSystemStatsResponse. - * @exports ICGCMsgGetSystemStatsResponse - * @interface ICGCMsgGetSystemStatsResponse + * @typedef {Object} CGCMsgGetSystemStatsResponse.$Properties * @property {number|null} [gc_app_id] CGCMsgGetSystemStatsResponse gc_app_id * @property {Uint8Array|null} [stats_kv] CGCMsgGetSystemStatsResponse stats_kv * @property {number|null} [active_jobs] CGCMsgGetSystemStatsResponse active_jobs @@ -16917,22 +21980,36 @@ * @property {number|null} [steamid_locks] CGCMsgGetSystemStatsResponse steamid_locks * @property {number|null} [logon_queue] CGCMsgGetSystemStatsResponse logon_queue * @property {number|null} [logon_jobs] CGCMsgGetSystemStatsResponse logon_jobs + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgGetSystemStatsResponse. + * @exports ICGCMsgGetSystemStatsResponse + * @interface ICGCMsgGetSystemStatsResponse + * @augments CGCMsgGetSystemStatsResponse.$Properties + * @deprecated Use CGCMsgGetSystemStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetSystemStatsResponse. + * @typedef {CGCMsgGetSystemStatsResponse.$Properties} CGCMsgGetSystemStatsResponse.$Shape */ /** * Constructs a new CGCMsgGetSystemStatsResponse. * @exports CGCMsgGetSystemStatsResponse * @classdesc Represents a CGCMsgGetSystemStatsResponse. - * @implements ICGCMsgGetSystemStatsResponse * @constructor - * @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set + * @param {CGCMsgGetSystemStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetSystemStatsResponse(properties) { + var CGCMsgGetSystemStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetSystemStatsResponse gc_app_id. @@ -17043,10 +22120,14 @@ * @function create * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set + * @param {CGCMsgGetSystemStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse instance + * @type {{ + * (properties: CGCMsgGetSystemStatsResponse.$Shape): CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape; + * (properties?: CGCMsgGetSystemStatsResponse.$Properties): CGCMsgGetSystemStatsResponse; + * }} */ - CGCMsgGetSystemStatsResponse.create = function create(properties) { + CGCMsgGetSystemStatsResponse.create = function(properties) { return new CGCMsgGetSystemStatsResponse(properties); }; @@ -17055,39 +22136,46 @@ * @function encode * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse} message CGCMsgGetSystemStatsResponse message or plain object to encode + * @param {CGCMsgGetSystemStatsResponse.$Properties} message CGCMsgGetSystemStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStatsResponse.encode = function encode(message, writer) { + CGCMsgGetSystemStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gc_app_id != null && Object.hasOwnProperty.call(message, "gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gc_app_id); - if (message.stats_kv != null && Object.hasOwnProperty.call(message, "stats_kv")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.stats_kv); - if (message.active_jobs != null && Object.hasOwnProperty.call(message, "active_jobs")) + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.active_jobs); - if (message.yielding_jobs != null && Object.hasOwnProperty.call(message, "yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.yielding_jobs); - if (message.user_sessions != null && Object.hasOwnProperty.call(message, "user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.user_sessions); - if (message.game_server_sessions != null && Object.hasOwnProperty.call(message, "game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.game_server_sessions); - if (message.socaches != null && Object.hasOwnProperty.call(message, "socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.socaches); - if (message.socaches_to_unload != null && Object.hasOwnProperty.call(message, "socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.socaches_to_unload); - if (message.socaches_loading != null && Object.hasOwnProperty.call(message, "socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.socaches_loading); - if (message.writeback_queue != null && Object.hasOwnProperty.call(message, "writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.writeback_queue); - if (message.steamid_locks != null && Object.hasOwnProperty.call(message, "steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.steamid_locks); - if (message.logon_queue != null && Object.hasOwnProperty.call(message, "logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.logon_queue); - if (message.logon_jobs != null && Object.hasOwnProperty.call(message, "logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.logon_jobs); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17096,12 +22184,12 @@ * @function encodeDelimited * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse} message CGCMsgGetSystemStatsResponse message or plain object to encode + * @param {CGCMsgGetSystemStatsResponse.$Properties} message CGCMsgGetSystemStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetSystemStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17111,61 +22199,114 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse + * @returns {CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape} CGCMsgGetSystemStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStatsResponse.decode = function decode(reader, length) { + CGCMsgGetSystemStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetSystemStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetSystemStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gc_app_id = reader.uint32(); - break; - case 2: - message.stats_kv = reader.bytes(); - break; - case 3: - message.active_jobs = reader.uint32(); - break; - case 4: - message.yielding_jobs = reader.uint32(); - break; - case 5: - message.user_sessions = reader.uint32(); - break; - case 6: - message.game_server_sessions = reader.uint32(); - break; - case 7: - message.socaches = reader.uint32(); - break; - case 8: - message.socaches_to_unload = reader.uint32(); - break; - case 9: - message.socaches_loading = reader.uint32(); - break; - case 10: - message.writeback_queue = reader.uint32(); - break; - case 11: - message.steamid_locks = reader.uint32(); - break; - case 12: - message.logon_queue = reader.uint32(); - break; - case 13: - message.logon_jobs = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gc_app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.stats_kv = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.active_jobs = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.yielding_jobs = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.user_sessions = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.game_server_sessions = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.socaches = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.socaches_to_unload = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.socaches_loading = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.writeback_queue = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.steamid_locks = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.logon_queue = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.logon_jobs = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17175,11 +22316,11 @@ * @memberof CGCMsgGetSystemStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse + * @returns {CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape} CGCMsgGetSystemStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetSystemStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17193,46 +22334,50 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetSystemStatsResponse.verify = function verify(message) { + CGCMsgGetSystemStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) if (!$util.isInteger(message.gc_app_id)) return "gc_app_id: integer expected"; - if (message.stats_kv != null && message.hasOwnProperty("stats_kv")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) if (!(message.stats_kv && typeof message.stats_kv.length === "number" || $util.isString(message.stats_kv))) return "stats_kv: buffer expected"; - if (message.active_jobs != null && message.hasOwnProperty("active_jobs")) + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) if (!$util.isInteger(message.active_jobs)) return "active_jobs: integer expected"; - if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) if (!$util.isInteger(message.yielding_jobs)) return "yielding_jobs: integer expected"; - if (message.user_sessions != null && message.hasOwnProperty("user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) if (!$util.isInteger(message.user_sessions)) return "user_sessions: integer expected"; - if (message.game_server_sessions != null && message.hasOwnProperty("game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) if (!$util.isInteger(message.game_server_sessions)) return "game_server_sessions: integer expected"; - if (message.socaches != null && message.hasOwnProperty("socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) if (!$util.isInteger(message.socaches)) return "socaches: integer expected"; - if (message.socaches_to_unload != null && message.hasOwnProperty("socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) if (!$util.isInteger(message.socaches_to_unload)) return "socaches_to_unload: integer expected"; - if (message.socaches_loading != null && message.hasOwnProperty("socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) if (!$util.isInteger(message.socaches_loading)) return "socaches_loading: integer expected"; - if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) if (!$util.isInteger(message.writeback_queue)) return "writeback_queue: integer expected"; - if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) if (!$util.isInteger(message.steamid_locks)) return "steamid_locks: integer expected"; - if (message.logon_queue != null && message.hasOwnProperty("logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) if (!$util.isInteger(message.logon_queue)) return "logon_queue: integer expected"; - if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) if (!$util.isInteger(message.logon_jobs)) return "logon_jobs: integer expected"; return null; @@ -17246,16 +22391,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse */ - CGCMsgGetSystemStatsResponse.fromObject = function fromObject(object) { + CGCMsgGetSystemStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetSystemStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetSystemStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetSystemStatsResponse(); if (object.gc_app_id != null) message.gc_app_id = object.gc_app_id >>> 0; if (object.stats_kv != null) if (typeof object.stats_kv === "string") $util.base64.decode(object.stats_kv, message.stats_kv = $util.newBuffer($util.base64.length(object.stats_kv)), 0); - else if (object.stats_kv.length) + else if (object.stats_kv.length >= 0) message.stats_kv = object.stats_kv; if (object.active_jobs != null) message.active_jobs = object.active_jobs >>> 0; @@ -17291,17 +22442,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetSystemStatsResponse.toObject = function toObject(message, options) { + CGCMsgGetSystemStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gc_app_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.stats_kv = ""; else { object.stats_kv = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.stats_kv = $util.newBuffer(object.stats_kv); } object.active_jobs = 0; @@ -17316,31 +22471,31 @@ object.logon_queue = 0; object.logon_jobs = 0; } - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) object.gc_app_id = message.gc_app_id; - if (message.stats_kv != null && message.hasOwnProperty("stats_kv")) - object.stats_kv = options.bytes === String ? $util.base64.encode(message.stats_kv, 0, message.stats_kv.length) : options.bytes === Array ? Array.prototype.slice.call(message.stats_kv) : message.stats_kv; - if (message.active_jobs != null && message.hasOwnProperty("active_jobs")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) + object.stats_kv = options.bytes === $String ? $util.base64.encode(message.stats_kv, 0, message.stats_kv.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.stats_kv) : message.stats_kv; + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) object.active_jobs = message.active_jobs; - if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) object.yielding_jobs = message.yielding_jobs; - if (message.user_sessions != null && message.hasOwnProperty("user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) object.user_sessions = message.user_sessions; - if (message.game_server_sessions != null && message.hasOwnProperty("game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) object.game_server_sessions = message.game_server_sessions; - if (message.socaches != null && message.hasOwnProperty("socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) object.socaches = message.socaches; - if (message.socaches_to_unload != null && message.hasOwnProperty("socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) object.socaches_to_unload = message.socaches_to_unload; - if (message.socaches_loading != null && message.hasOwnProperty("socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) object.socaches_loading = message.socaches_loading; - if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) object.writeback_queue = message.writeback_queue; - if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) object.steamid_locks = message.steamid_locks; - if (message.logon_queue != null && message.hasOwnProperty("logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) object.logon_queue = message.logon_queue; - if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) object.logon_jobs = message.logon_jobs; return object; }; @@ -17352,8 +22507,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetSystemStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetSystemStatsResponse.prototype.toJSON = function() { + return CGCMsgGetSystemStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetSystemStatsResponse + * @function getTypeUrl + * @memberof CGCMsgGetSystemStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetSystemStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetSystemStatsResponse"; }; return CGCMsgGetSystemStatsResponse; @@ -17363,32 +22532,45 @@ /** * Properties of a CMsgAMSendEmail. - * @exports ICMsgAMSendEmail - * @interface ICMsgAMSendEmail + * @typedef {Object} CMsgAMSendEmail.$Properties * @property {number|Long|null} [steamid] CMsgAMSendEmail steamid * @property {number|null} [email_msg_type] CMsgAMSendEmail email_msg_type * @property {number|null} [email_format] CMsgAMSendEmail email_format - * @property {Array.|null} [persona_name_tokens] CMsgAMSendEmail persona_name_tokens + * @property {Array.|null} [persona_name_tokens] CMsgAMSendEmail persona_name_tokens * @property {number|null} [source_gc] CMsgAMSendEmail source_gc - * @property {Array.|null} [tokens] CMsgAMSendEmail tokens + * @property {Array.|null} [tokens] CMsgAMSendEmail tokens + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMSendEmail. + * @exports ICMsgAMSendEmail + * @interface ICMsgAMSendEmail + * @augments CMsgAMSendEmail.$Properties + * @deprecated Use CMsgAMSendEmail.$Properties instead. + */ + + /** + * Shape of a CMsgAMSendEmail. + * @typedef {CMsgAMSendEmail.$Properties} CMsgAMSendEmail.$Shape */ /** * Constructs a new CMsgAMSendEmail. * @exports CMsgAMSendEmail * @classdesc Represents a CMsgAMSendEmail. - * @implements ICMsgAMSendEmail * @constructor - * @param {ICMsgAMSendEmail=} [properties] Properties to set + * @param {CMsgAMSendEmail.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMSendEmail(properties) { + var CMsgAMSendEmail = function (properties) { this.persona_name_tokens = []; this.tokens = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMSendEmail steamid. @@ -17396,7 +22578,7 @@ * @memberof CMsgAMSendEmail * @instance */ - CMsgAMSendEmail.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMSendEmail.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMSendEmail email_msg_type. @@ -17416,7 +22598,7 @@ /** * CMsgAMSendEmail persona_name_tokens. - * @member {Array.} persona_name_tokens + * @member {Array.} persona_name_tokens * @memberof CMsgAMSendEmail * @instance */ @@ -17432,7 +22614,7 @@ /** * CMsgAMSendEmail tokens. - * @member {Array.} tokens + * @member {Array.} tokens * @memberof CMsgAMSendEmail * @instance */ @@ -17443,10 +22625,14 @@ * @function create * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail=} [properties] Properties to set + * @param {CMsgAMSendEmail.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail} CMsgAMSendEmail instance + * @type {{ + * (properties: CMsgAMSendEmail.$Shape): CMsgAMSendEmail & CMsgAMSendEmail.$Shape; + * (properties?: CMsgAMSendEmail.$Properties): CMsgAMSendEmail; + * }} */ - CMsgAMSendEmail.create = function create(properties) { + CMsgAMSendEmail.create = function(properties) { return new CMsgAMSendEmail(properties); }; @@ -17455,27 +22641,34 @@ * @function encode * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail} message CMsgAMSendEmail message or plain object to encode + * @param {CMsgAMSendEmail.$Properties} message CMsgAMSendEmail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmail.encode = function encode(message, writer) { + CMsgAMSendEmail.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.email_msg_type != null && Object.hasOwnProperty.call(message, "email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type); - if (message.email_format != null && Object.hasOwnProperty.call(message, "email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.email_format); if (message.persona_name_tokens != null && message.persona_name_tokens.length) for (var i = 0; i < message.persona_name_tokens.length; ++i) - $root.CMsgAMSendEmail.PersonaNameReplacementToken.encode(message.persona_name_tokens[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.source_gc != null && Object.hasOwnProperty.call(message, "source_gc")) + $root.CMsgAMSendEmail.PersonaNameReplacementToken.encode(message.persona_name_tokens[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.source_gc); if (message.tokens != null && message.tokens.length) for (var i = 0; i < message.tokens.length; ++i) - $root.CMsgAMSendEmail.ReplacementToken.encode(message.tokens[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.CMsgAMSendEmail.ReplacementToken.encode(message.tokens[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17484,12 +22677,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail} message CMsgAMSendEmail message or plain object to encode + * @param {CMsgAMSendEmail.$Properties} message CMsgAMSendEmail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMSendEmail.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17499,44 +22692,76 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail} CMsgAMSendEmail + * @returns {CMsgAMSendEmail & CMsgAMSendEmail.$Shape} CMsgAMSendEmail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmail.decode = function decode(reader, length) { + CMsgAMSendEmail.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.email_msg_type = reader.uint32(); - break; - case 3: - message.email_format = reader.uint32(); - break; - case 5: - if (!(message.persona_name_tokens && message.persona_name_tokens.length)) - message.persona_name_tokens = []; - message.persona_name_tokens.push($root.CMsgAMSendEmail.PersonaNameReplacementToken.decode(reader, reader.uint32())); - break; - case 6: - message.source_gc = reader.uint32(); - break; - case 7: - if (!(message.tokens && message.tokens.length)) - message.tokens = []; - message.tokens.push($root.CMsgAMSendEmail.ReplacementToken.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.email_msg_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.email_format = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.persona_name_tokens && message.persona_name_tokens.length)) + message.persona_name_tokens = []; + message.persona_name_tokens.push($root.CMsgAMSendEmail.PersonaNameReplacementToken.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.source_gc = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.CMsgAMSendEmail.ReplacementToken.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17546,11 +22771,11 @@ * @memberof CMsgAMSendEmail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail} CMsgAMSendEmail + * @returns {CMsgAMSendEmail & CMsgAMSendEmail.$Shape} CMsgAMSendEmail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmail.decodeDelimited = function decodeDelimited(reader) { + CMsgAMSendEmail.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17564,35 +22789,39 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMSendEmail.verify = function verify(message) { + CMsgAMSendEmail.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) if (!$util.isInteger(message.email_msg_type)) return "email_msg_type: integer expected"; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) if (!$util.isInteger(message.email_format)) return "email_format: integer expected"; - if (message.persona_name_tokens != null && message.hasOwnProperty("persona_name_tokens")) { - if (!Array.isArray(message.persona_name_tokens)) + if (message.persona_name_tokens != null && $Object.hasOwnProperty.call(message, "persona_name_tokens")) { + if (!$Array.isArray(message.persona_name_tokens)) return "persona_name_tokens: array expected"; for (var i = 0; i < message.persona_name_tokens.length; ++i) { - var error = $root.CMsgAMSendEmail.PersonaNameReplacementToken.verify(message.persona_name_tokens[i]); + var error = $root.CMsgAMSendEmail.PersonaNameReplacementToken.verify(message.persona_name_tokens[i], _depth + 1); if (error) return "persona_name_tokens." + error; } } - if (message.source_gc != null && message.hasOwnProperty("source_gc")) + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) if (!$util.isInteger(message.source_gc)) return "source_gc: integer expected"; - if (message.tokens != null && message.hasOwnProperty("tokens")) { - if (!Array.isArray(message.tokens)) + if (message.tokens != null && $Object.hasOwnProperty.call(message, "tokens")) { + if (!$Array.isArray(message.tokens)) return "tokens: array expected"; for (var i = 0; i < message.tokens.length; ++i) { - var error = $root.CMsgAMSendEmail.ReplacementToken.verify(message.tokens[i]); + var error = $root.CMsgAMSendEmail.ReplacementToken.verify(message.tokens[i], _depth + 1); if (error) return "tokens." + error; } @@ -17608,43 +22837,49 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail} CMsgAMSendEmail */ - CMsgAMSendEmail.fromObject = function fromObject(object) { + CMsgAMSendEmail.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.email_msg_type != null) message.email_msg_type = object.email_msg_type >>> 0; if (object.email_format != null) message.email_format = object.email_format >>> 0; if (object.persona_name_tokens) { - if (!Array.isArray(object.persona_name_tokens)) - throw TypeError(".CMsgAMSendEmail.persona_name_tokens: array expected"); - message.persona_name_tokens = []; + if (!$Array.isArray(object.persona_name_tokens)) + throw $TypeError(".CMsgAMSendEmail.persona_name_tokens: array expected"); + message.persona_name_tokens = $Array(object.persona_name_tokens.length); for (var i = 0; i < object.persona_name_tokens.length; ++i) { - if (typeof object.persona_name_tokens[i] !== "object") - throw TypeError(".CMsgAMSendEmail.persona_name_tokens: object expected"); - message.persona_name_tokens[i] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.fromObject(object.persona_name_tokens[i]); + if (!$util.isObject(object.persona_name_tokens[i])) + throw $TypeError(".CMsgAMSendEmail.persona_name_tokens: object expected"); + message.persona_name_tokens[i] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.fromObject(object.persona_name_tokens[i], _depth + 1); } } if (object.source_gc != null) message.source_gc = object.source_gc >>> 0; if (object.tokens) { - if (!Array.isArray(object.tokens)) - throw TypeError(".CMsgAMSendEmail.tokens: array expected"); - message.tokens = []; + if (!$Array.isArray(object.tokens)) + throw $TypeError(".CMsgAMSendEmail.tokens: array expected"); + message.tokens = $Array(object.tokens.length); for (var i = 0; i < object.tokens.length; ++i) { - if (typeof object.tokens[i] !== "object") - throw TypeError(".CMsgAMSendEmail.tokens: object expected"); - message.tokens[i] = $root.CMsgAMSendEmail.ReplacementToken.fromObject(object.tokens[i]); + if (!$util.isObject(object.tokens[i])) + throw $TypeError(".CMsgAMSendEmail.tokens: object expected"); + message.tokens[i] = $root.CMsgAMSendEmail.ReplacementToken.fromObject(object.tokens[i], _depth + 1); } } return message; @@ -17659,9 +22894,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMSendEmail.toObject = function toObject(message, options) { + CMsgAMSendEmail.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.persona_name_tokens = []; @@ -17669,34 +22908,36 @@ } if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.email_msg_type = 0; object.email_format = 0; object.source_gc = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) object.email_msg_type = message.email_msg_type; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) object.email_format = message.email_format; if (message.persona_name_tokens && message.persona_name_tokens.length) { - object.persona_name_tokens = []; + object.persona_name_tokens = $Array(message.persona_name_tokens.length); for (var j = 0; j < message.persona_name_tokens.length; ++j) - object.persona_name_tokens[j] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.toObject(message.persona_name_tokens[j], options); + object.persona_name_tokens[j] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.toObject(message.persona_name_tokens[j], options, _depth + 1); } - if (message.source_gc != null && message.hasOwnProperty("source_gc")) + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) object.source_gc = message.source_gc; if (message.tokens && message.tokens.length) { - object.tokens = []; + object.tokens = $Array(message.tokens.length); for (var j = 0; j < message.tokens.length; ++j) - object.tokens[j] = $root.CMsgAMSendEmail.ReplacementToken.toObject(message.tokens[j], options); + object.tokens[j] = $root.CMsgAMSendEmail.ReplacementToken.toObject(message.tokens[j], options, _depth + 1); } return object; }; @@ -17708,34 +22949,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMSendEmail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMSendEmail.prototype.toJSON = function() { + return CMsgAMSendEmail.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMSendEmail + * @function getTypeUrl + * @memberof CMsgAMSendEmail + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMSendEmail.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail"; }; CMsgAMSendEmail.ReplacementToken = (function() { /** * Properties of a ReplacementToken. - * @memberof CMsgAMSendEmail - * @interface IReplacementToken + * @typedef {Object} CMsgAMSendEmail.ReplacementToken.$Properties * @property {string|null} [token_name] ReplacementToken token_name * @property {string|null} [token_value] ReplacementToken token_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ReplacementToken. + * @memberof CMsgAMSendEmail + * @interface IReplacementToken + * @augments CMsgAMSendEmail.ReplacementToken.$Properties + * @deprecated Use CMsgAMSendEmail.ReplacementToken.$Properties instead. + */ + + /** + * Shape of a ReplacementToken. + * @typedef {CMsgAMSendEmail.ReplacementToken.$Properties} CMsgAMSendEmail.ReplacementToken.$Shape */ /** * Constructs a new ReplacementToken. * @memberof CMsgAMSendEmail * @classdesc Represents a ReplacementToken. - * @implements IReplacementToken * @constructor - * @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.ReplacementToken.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ReplacementToken(properties) { + var ReplacementToken = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ReplacementToken token_name. @@ -17758,10 +23026,14 @@ * @function create * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.ReplacementToken.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken instance + * @type {{ + * (properties: CMsgAMSendEmail.ReplacementToken.$Shape): CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape; + * (properties?: CMsgAMSendEmail.ReplacementToken.$Properties): CMsgAMSendEmail.ReplacementToken; + * }} */ - ReplacementToken.create = function create(properties) { + ReplacementToken.create = function(properties) { return new ReplacementToken(properties); }; @@ -17770,17 +23042,24 @@ * @function encode * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken} message ReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.ReplacementToken.$Properties} message ReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplacementToken.encode = function encode(message, writer) { + ReplacementToken.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.token_name != null && Object.hasOwnProperty.call(message, "token_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.token_name); - if (message.token_value != null && Object.hasOwnProperty.call(message, "token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17789,12 +23068,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken} message ReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.ReplacementToken.$Properties} message ReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplacementToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ReplacementToken.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17804,28 +23083,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken + * @returns {CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape} ReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplacementToken.decode = function decode(reader, length) { + ReplacementToken.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail.ReplacementToken(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail.ReplacementToken(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.token_name = reader.string(); - break; - case 2: - message.token_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.token_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.token_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17835,11 +23134,11 @@ * @memberof CMsgAMSendEmail.ReplacementToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken + * @returns {CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape} ReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplacementToken.decodeDelimited = function decodeDelimited(reader) { + ReplacementToken.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17853,13 +23152,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReplacementToken.verify = function verify(message) { + ReplacementToken.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) if (!$util.isString(message.token_name)) return "token_name: string expected"; - if (message.token_value != null && message.hasOwnProperty("token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) if (!$util.isString(message.token_value)) return "token_value: string expected"; return null; @@ -17873,14 +23176,20 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken */ - ReplacementToken.fromObject = function fromObject(object) { + ReplacementToken.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail.ReplacementToken) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail.ReplacementToken: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail.ReplacementToken(); if (object.token_name != null) - message.token_name = String(object.token_name); + message.token_name = $String(object.token_name); if (object.token_value != null) - message.token_value = String(object.token_value); + message.token_value = $String(object.token_value); return message; }; @@ -17893,17 +23202,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReplacementToken.toObject = function toObject(message, options) { + ReplacementToken.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.token_name = ""; object.token_value = ""; } - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) object.token_name = message.token_name; - if (message.token_value != null && message.hasOwnProperty("token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) object.token_value = message.token_value; return object; }; @@ -17915,8 +23228,22 @@ * @instance * @returns {Object.} JSON object */ - ReplacementToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ReplacementToken.prototype.toJSON = function() { + return ReplacementToken.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ReplacementToken + * @function getTypeUrl + * @memberof CMsgAMSendEmail.ReplacementToken + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ReplacementToken.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail.ReplacementToken"; }; return ReplacementToken; @@ -17926,26 +23253,39 @@ /** * Properties of a PersonaNameReplacementToken. - * @memberof CMsgAMSendEmail - * @interface IPersonaNameReplacementToken + * @typedef {Object} CMsgAMSendEmail.PersonaNameReplacementToken.$Properties * @property {number|Long|null} [steamid] PersonaNameReplacementToken steamid * @property {string|null} [token_name] PersonaNameReplacementToken token_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PersonaNameReplacementToken. + * @memberof CMsgAMSendEmail + * @interface IPersonaNameReplacementToken + * @augments CMsgAMSendEmail.PersonaNameReplacementToken.$Properties + * @deprecated Use CMsgAMSendEmail.PersonaNameReplacementToken.$Properties instead. + */ + + /** + * Shape of a PersonaNameReplacementToken. + * @typedef {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} CMsgAMSendEmail.PersonaNameReplacementToken.$Shape */ /** * Constructs a new PersonaNameReplacementToken. * @memberof CMsgAMSendEmail * @classdesc Represents a PersonaNameReplacementToken. - * @implements IPersonaNameReplacementToken * @constructor - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PersonaNameReplacementToken(properties) { + var PersonaNameReplacementToken = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PersonaNameReplacementToken steamid. @@ -17953,7 +23293,7 @@ * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @instance */ - PersonaNameReplacementToken.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PersonaNameReplacementToken.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * PersonaNameReplacementToken token_name. @@ -17968,10 +23308,14 @@ * @function create * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken instance + * @type {{ + * (properties: CMsgAMSendEmail.PersonaNameReplacementToken.$Shape): CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape; + * (properties?: CMsgAMSendEmail.PersonaNameReplacementToken.$Properties): CMsgAMSendEmail.PersonaNameReplacementToken; + * }} */ - PersonaNameReplacementToken.create = function create(properties) { + PersonaNameReplacementToken.create = function(properties) { return new PersonaNameReplacementToken(properties); }; @@ -17980,17 +23324,24 @@ * @function encode * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken} message PersonaNameReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} message PersonaNameReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaNameReplacementToken.encode = function encode(message, writer) { + PersonaNameReplacementToken.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.token_name != null && Object.hasOwnProperty.call(message, "token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17999,12 +23350,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken} message PersonaNameReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} message PersonaNameReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaNameReplacementToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PersonaNameReplacementToken.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18014,28 +23365,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken + * @returns {CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape} PersonaNameReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaNameReplacementToken.decode = function decode(reader, length) { + PersonaNameReplacementToken.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.token_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.token_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18045,11 +23416,11 @@ * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken + * @returns {CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape} PersonaNameReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaNameReplacementToken.decodeDelimited = function decodeDelimited(reader) { + PersonaNameReplacementToken.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18063,13 +23434,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PersonaNameReplacementToken.verify = function verify(message) { + PersonaNameReplacementToken.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) if (!$util.isString(message.token_name)) return "token_name: string expected"; return null; @@ -18083,21 +23458,27 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken */ - PersonaNameReplacementToken.fromObject = function fromObject(object) { + PersonaNameReplacementToken.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail.PersonaNameReplacementToken) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail.PersonaNameReplacementToken: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.token_name != null) - message.token_name = String(object.token_name); + message.token_name = $String(object.token_name); return message; }; @@ -18110,24 +23491,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PersonaNameReplacementToken.toObject = function toObject(message, options) { + PersonaNameReplacementToken.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.token_name = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.token_name != null && message.hasOwnProperty("token_name")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) object.token_name = message.token_name; return object; }; @@ -18139,8 +23526,22 @@ * @instance * @returns {Object.} JSON object */ - PersonaNameReplacementToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PersonaNameReplacementToken.prototype.toJSON = function() { + return PersonaNameReplacementToken.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PersonaNameReplacementToken + * @function getTypeUrl + * @memberof CMsgAMSendEmail.PersonaNameReplacementToken + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PersonaNameReplacementToken.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail.PersonaNameReplacementToken"; }; return PersonaNameReplacementToken; @@ -18151,27 +23552,40 @@ $root.CMsgAMSendEmailResponse = (function() { + /** + * Properties of a CMsgAMSendEmailResponse. + * @typedef {Object} CMsgAMSendEmailResponse.$Properties + * @property {number|null} [eresult] CMsgAMSendEmailResponse eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMSendEmailResponse. * @exports ICMsgAMSendEmailResponse * @interface ICMsgAMSendEmailResponse - * @property {number|null} [eresult] CMsgAMSendEmailResponse eresult + * @augments CMsgAMSendEmailResponse.$Properties + * @deprecated Use CMsgAMSendEmailResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMSendEmailResponse. + * @typedef {CMsgAMSendEmailResponse.$Properties} CMsgAMSendEmailResponse.$Shape */ /** * Constructs a new CMsgAMSendEmailResponse. * @exports CMsgAMSendEmailResponse * @classdesc Represents a CMsgAMSendEmailResponse. - * @implements ICMsgAMSendEmailResponse * @constructor - * @param {ICMsgAMSendEmailResponse=} [properties] Properties to set + * @param {CMsgAMSendEmailResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMSendEmailResponse(properties) { + var CMsgAMSendEmailResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMSendEmailResponse eresult. @@ -18186,10 +23600,14 @@ * @function create * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse=} [properties] Properties to set + * @param {CMsgAMSendEmailResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse instance + * @type {{ + * (properties: CMsgAMSendEmailResponse.$Shape): CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape; + * (properties?: CMsgAMSendEmailResponse.$Properties): CMsgAMSendEmailResponse; + * }} */ - CMsgAMSendEmailResponse.create = function create(properties) { + CMsgAMSendEmailResponse.create = function(properties) { return new CMsgAMSendEmailResponse(properties); }; @@ -18198,15 +23616,22 @@ * @function encode * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse} message CMsgAMSendEmailResponse message or plain object to encode + * @param {CMsgAMSendEmailResponse.$Properties} message CMsgAMSendEmailResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmailResponse.encode = function encode(message, writer) { + CMsgAMSendEmailResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18215,12 +23640,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse} message CMsgAMSendEmailResponse message or plain object to encode + * @param {CMsgAMSendEmailResponse.$Properties} message CMsgAMSendEmailResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmailResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMSendEmailResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18230,25 +23655,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse + * @returns {CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape} CMsgAMSendEmailResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmailResponse.decode = function decode(reader, length) { + CMsgAMSendEmailResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmailResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmailResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18258,11 +23700,11 @@ * @memberof CMsgAMSendEmailResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse + * @returns {CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape} CMsgAMSendEmailResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmailResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMSendEmailResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18276,10 +23718,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMSendEmailResponse.verify = function verify(message) { + CMsgAMSendEmailResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -18293,9 +23739,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse */ - CMsgAMSendEmailResponse.fromObject = function fromObject(object) { + CMsgAMSendEmailResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmailResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmailResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmailResponse(); if (object.eresult != null) message.eresult = object.eresult >>> 0; @@ -18311,13 +23763,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMSendEmailResponse.toObject = function toObject(message, options) { + CMsgAMSendEmailResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -18329,8 +23785,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMSendEmailResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMSendEmailResponse.prototype.toJSON = function() { + return CMsgAMSendEmailResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMSendEmailResponse + * @function getTypeUrl + * @memberof CMsgAMSendEmailResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMSendEmailResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmailResponse"; }; return CMsgAMSendEmailResponse; @@ -18340,28 +23810,41 @@ /** * Properties of a CMsgGCGetEmailTemplate. - * @exports ICMsgGCGetEmailTemplate - * @interface ICMsgGCGetEmailTemplate + * @typedef {Object} CMsgGCGetEmailTemplate.$Properties * @property {number|null} [app_id] CMsgGCGetEmailTemplate app_id * @property {number|null} [email_msg_type] CMsgGCGetEmailTemplate email_msg_type * @property {number|null} [email_lang] CMsgGCGetEmailTemplate email_lang * @property {number|null} [email_format] CMsgGCGetEmailTemplate email_format + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetEmailTemplate. + * @exports ICMsgGCGetEmailTemplate + * @interface ICMsgGCGetEmailTemplate + * @augments CMsgGCGetEmailTemplate.$Properties + * @deprecated Use CMsgGCGetEmailTemplate.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetEmailTemplate. + * @typedef {CMsgGCGetEmailTemplate.$Properties} CMsgGCGetEmailTemplate.$Shape */ /** * Constructs a new CMsgGCGetEmailTemplate. * @exports CMsgGCGetEmailTemplate * @classdesc Represents a CMsgGCGetEmailTemplate. - * @implements ICMsgGCGetEmailTemplate * @constructor - * @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplate.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetEmailTemplate(properties) { + var CMsgGCGetEmailTemplate = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetEmailTemplate app_id. @@ -18400,10 +23883,14 @@ * @function create * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplate.$Properties=} [properties] Properties to set * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate instance + * @type {{ + * (properties: CMsgGCGetEmailTemplate.$Shape): CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape; + * (properties?: CMsgGCGetEmailTemplate.$Properties): CMsgGCGetEmailTemplate; + * }} */ - CMsgGCGetEmailTemplate.create = function create(properties) { + CMsgGCGetEmailTemplate.create = function(properties) { return new CMsgGCGetEmailTemplate(properties); }; @@ -18412,21 +23899,28 @@ * @function encode * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate} message CMsgGCGetEmailTemplate message or plain object to encode + * @param {CMsgGCGetEmailTemplate.$Properties} message CMsgGCGetEmailTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplate.encode = function encode(message, writer) { + CMsgGCGetEmailTemplate.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_id); - if (message.email_msg_type != null && Object.hasOwnProperty.call(message, "email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type); - if (message.email_lang != null && Object.hasOwnProperty.call(message, "email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.email_lang); - if (message.email_format != null && Object.hasOwnProperty.call(message, "email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.email_format); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18435,12 +23929,12 @@ * @function encodeDelimited * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate} message CMsgGCGetEmailTemplate message or plain object to encode + * @param {CMsgGCGetEmailTemplate.$Properties} message CMsgGCGetEmailTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetEmailTemplate.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18450,34 +23944,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate + * @returns {CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape} CMsgGCGetEmailTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplate.decode = function decode(reader, length) { + CMsgGCGetEmailTemplate.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetEmailTemplate(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetEmailTemplate(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_id = reader.uint32(); - break; - case 2: - message.email_msg_type = reader.uint32(); - break; - case 3: - message.email_lang = reader.int32(); - break; - case 4: - message.email_format = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.email_msg_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.email_lang = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.email_format = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18487,11 +24007,11 @@ * @memberof CMsgGCGetEmailTemplate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate + * @returns {CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape} CMsgGCGetEmailTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplate.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetEmailTemplate.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18505,19 +24025,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetEmailTemplate.verify = function verify(message) { + CMsgGCGetEmailTemplate.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) if (!$util.isInteger(message.email_msg_type)) return "email_msg_type: integer expected"; - if (message.email_lang != null && message.hasOwnProperty("email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) if (!$util.isInteger(message.email_lang)) return "email_lang: integer expected"; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) if (!$util.isInteger(message.email_format)) return "email_format: integer expected"; return null; @@ -18531,9 +24055,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate */ - CMsgGCGetEmailTemplate.fromObject = function fromObject(object) { + CMsgGCGetEmailTemplate.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetEmailTemplate) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetEmailTemplate: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetEmailTemplate(); if (object.app_id != null) message.app_id = object.app_id >>> 0; @@ -18555,9 +24085,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetEmailTemplate.toObject = function toObject(message, options) { + CMsgGCGetEmailTemplate.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.app_id = 0; @@ -18565,13 +24099,13 @@ object.email_lang = 0; object.email_format = 0; } - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) object.email_msg_type = message.email_msg_type; - if (message.email_lang != null && message.hasOwnProperty("email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) object.email_lang = message.email_lang; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) object.email_format = message.email_format; return object; }; @@ -18583,8 +24117,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetEmailTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetEmailTemplate.prototype.toJSON = function() { + return CMsgGCGetEmailTemplate.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetEmailTemplate + * @function getTypeUrl + * @memberof CMsgGCGetEmailTemplate + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetEmailTemplate.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetEmailTemplate"; }; return CMsgGCGetEmailTemplate; @@ -18594,27 +24142,40 @@ /** * Properties of a CMsgGCGetEmailTemplateResponse. - * @exports ICMsgGCGetEmailTemplateResponse - * @interface ICMsgGCGetEmailTemplateResponse + * @typedef {Object} CMsgGCGetEmailTemplateResponse.$Properties * @property {number|null} [eresult] CMsgGCGetEmailTemplateResponse eresult * @property {boolean|null} [template_exists] CMsgGCGetEmailTemplateResponse template_exists * @property {string|null} [template] CMsgGCGetEmailTemplateResponse template + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetEmailTemplateResponse. + * @exports ICMsgGCGetEmailTemplateResponse + * @interface ICMsgGCGetEmailTemplateResponse + * @augments CMsgGCGetEmailTemplateResponse.$Properties + * @deprecated Use CMsgGCGetEmailTemplateResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetEmailTemplateResponse. + * @typedef {CMsgGCGetEmailTemplateResponse.$Properties} CMsgGCGetEmailTemplateResponse.$Shape */ /** * Constructs a new CMsgGCGetEmailTemplateResponse. * @exports CMsgGCGetEmailTemplateResponse * @classdesc Represents a CMsgGCGetEmailTemplateResponse. - * @implements ICMsgGCGetEmailTemplateResponse * @constructor - * @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplateResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetEmailTemplateResponse(properties) { + var CMsgGCGetEmailTemplateResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetEmailTemplateResponse eresult. @@ -18645,10 +24206,14 @@ * @function create * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplateResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse instance + * @type {{ + * (properties: CMsgGCGetEmailTemplateResponse.$Shape): CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape; + * (properties?: CMsgGCGetEmailTemplateResponse.$Properties): CMsgGCGetEmailTemplateResponse; + * }} */ - CMsgGCGetEmailTemplateResponse.create = function create(properties) { + CMsgGCGetEmailTemplateResponse.create = function(properties) { return new CMsgGCGetEmailTemplateResponse(properties); }; @@ -18657,19 +24222,26 @@ * @function encode * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse} message CMsgGCGetEmailTemplateResponse message or plain object to encode + * @param {CMsgGCGetEmailTemplateResponse.$Properties} message CMsgGCGetEmailTemplateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplateResponse.encode = function encode(message, writer) { + CMsgGCGetEmailTemplateResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult); - if (message.template_exists != null && Object.hasOwnProperty.call(message, "template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.template_exists); - if (message.template != null && Object.hasOwnProperty.call(message, "template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.template); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18678,12 +24250,12 @@ * @function encodeDelimited * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse} message CMsgGCGetEmailTemplateResponse message or plain object to encode + * @param {CMsgGCGetEmailTemplateResponse.$Properties} message CMsgGCGetEmailTemplateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetEmailTemplateResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18693,31 +24265,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse + * @returns {CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape} CMsgGCGetEmailTemplateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplateResponse.decode = function decode(reader, length) { + CMsgGCGetEmailTemplateResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetEmailTemplateResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetEmailTemplateResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.uint32(); - break; - case 2: - message.template_exists = reader.bool(); - break; - case 3: - message.template = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.template_exists = reader.bool(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.template = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18727,11 +24322,11 @@ * @memberof CMsgGCGetEmailTemplateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse + * @returns {CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape} CMsgGCGetEmailTemplateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplateResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetEmailTemplateResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18745,16 +24340,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetEmailTemplateResponse.verify = function verify(message) { + CMsgGCGetEmailTemplateResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.template_exists != null && message.hasOwnProperty("template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) if (typeof message.template_exists !== "boolean") return "template_exists: boolean expected"; - if (message.template != null && message.hasOwnProperty("template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) if (!$util.isString(message.template)) return "template: string expected"; return null; @@ -18768,16 +24367,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse */ - CMsgGCGetEmailTemplateResponse.fromObject = function fromObject(object) { + CMsgGCGetEmailTemplateResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetEmailTemplateResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetEmailTemplateResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetEmailTemplateResponse(); if (object.eresult != null) message.eresult = object.eresult >>> 0; if (object.template_exists != null) - message.template_exists = Boolean(object.template_exists); + message.template_exists = $Boolean(object.template_exists); if (object.template != null) - message.template = String(object.template); + message.template = $String(object.template); return message; }; @@ -18790,20 +24395,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetEmailTemplateResponse.toObject = function toObject(message, options) { + CMsgGCGetEmailTemplateResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.template_exists = false; object.template = ""; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.template_exists != null && message.hasOwnProperty("template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) object.template_exists = message.template_exists; - if (message.template != null && message.hasOwnProperty("template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) object.template = message.template; return object; }; @@ -18815,8 +24424,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetEmailTemplateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetEmailTemplateResponse.prototype.toJSON = function() { + return CMsgGCGetEmailTemplateResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetEmailTemplateResponse + * @function getTypeUrl + * @memberof CMsgGCGetEmailTemplateResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetEmailTemplateResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetEmailTemplateResponse"; }; return CMsgGCGetEmailTemplateResponse; @@ -18826,29 +24449,42 @@ /** * Properties of a CMsgAMGrantGuestPasses2. - * @exports ICMsgAMGrantGuestPasses2 - * @interface ICMsgAMGrantGuestPasses2 + * @typedef {Object} CMsgAMGrantGuestPasses2.$Properties * @property {number|Long|null} [steam_id] CMsgAMGrantGuestPasses2 steam_id * @property {number|null} [package_id] CMsgAMGrantGuestPasses2 package_id * @property {number|null} [passes_to_grant] CMsgAMGrantGuestPasses2 passes_to_grant * @property {number|null} [days_to_expiration] CMsgAMGrantGuestPasses2 days_to_expiration * @property {number|null} [action] CMsgAMGrantGuestPasses2 action + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGrantGuestPasses2. + * @exports ICMsgAMGrantGuestPasses2 + * @interface ICMsgAMGrantGuestPasses2 + * @augments CMsgAMGrantGuestPasses2.$Properties + * @deprecated Use CMsgAMGrantGuestPasses2.$Properties instead. + */ + + /** + * Shape of a CMsgAMGrantGuestPasses2. + * @typedef {CMsgAMGrantGuestPasses2.$Properties} CMsgAMGrantGuestPasses2.$Shape */ /** * Constructs a new CMsgAMGrantGuestPasses2. * @exports CMsgAMGrantGuestPasses2 * @classdesc Represents a CMsgAMGrantGuestPasses2. - * @implements ICMsgAMGrantGuestPasses2 * @constructor - * @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGrantGuestPasses2(properties) { + var CMsgAMGrantGuestPasses2 = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGrantGuestPasses2 steam_id. @@ -18856,7 +24492,7 @@ * @memberof CMsgAMGrantGuestPasses2 * @instance */ - CMsgAMGrantGuestPasses2.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGrantGuestPasses2.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGrantGuestPasses2 package_id. @@ -18895,10 +24531,14 @@ * @function create * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2.$Properties=} [properties] Properties to set * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 instance + * @type {{ + * (properties: CMsgAMGrantGuestPasses2.$Shape): CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape; + * (properties?: CMsgAMGrantGuestPasses2.$Properties): CMsgAMGrantGuestPasses2; + * }} */ - CMsgAMGrantGuestPasses2.create = function create(properties) { + CMsgAMGrantGuestPasses2.create = function(properties) { return new CMsgAMGrantGuestPasses2(properties); }; @@ -18907,23 +24547,30 @@ * @function encode * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2} message CMsgAMGrantGuestPasses2 message or plain object to encode + * @param {CMsgAMGrantGuestPasses2.$Properties} message CMsgAMGrantGuestPasses2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2.encode = function encode(message, writer) { + CMsgAMGrantGuestPasses2.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.package_id != null && Object.hasOwnProperty.call(message, "package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.package_id); - if (message.passes_to_grant != null && Object.hasOwnProperty.call(message, "passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.passes_to_grant); - if (message.days_to_expiration != null && Object.hasOwnProperty.call(message, "days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.days_to_expiration); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.action); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18932,12 +24579,12 @@ * @function encodeDelimited * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2} message CMsgAMGrantGuestPasses2 message or plain object to encode + * @param {CMsgAMGrantGuestPasses2.$Properties} message CMsgAMGrantGuestPasses2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGrantGuestPasses2.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18947,37 +24594,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 + * @returns {CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape} CMsgAMGrantGuestPasses2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2.decode = function decode(reader, length) { + CMsgAMGrantGuestPasses2.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGrantGuestPasses2(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGrantGuestPasses2(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.package_id = reader.uint32(); - break; - case 3: - message.passes_to_grant = reader.int32(); - break; - case 4: - message.days_to_expiration = reader.int32(); - break; - case 5: - message.action = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.package_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.passes_to_grant = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.days_to_expiration = reader.int32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.action = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18987,11 +24663,11 @@ * @memberof CMsgAMGrantGuestPasses2 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 + * @returns {CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape} CMsgAMGrantGuestPasses2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGrantGuestPasses2.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19005,22 +24681,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGrantGuestPasses2.verify = function verify(message) { + CMsgAMGrantGuestPasses2.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) if (!$util.isInteger(message.package_id)) return "package_id: integer expected"; - if (message.passes_to_grant != null && message.hasOwnProperty("passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) if (!$util.isInteger(message.passes_to_grant)) return "passes_to_grant: integer expected"; - if (message.days_to_expiration != null && message.hasOwnProperty("days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) if (!$util.isInteger(message.days_to_expiration)) return "days_to_expiration: integer expected"; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) if (!$util.isInteger(message.action)) return "action: integer expected"; return null; @@ -19034,19 +24714,25 @@ * @param {Object.} object Plain object * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 */ - CMsgAMGrantGuestPasses2.fromObject = function fromObject(object) { + CMsgAMGrantGuestPasses2.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGrantGuestPasses2) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGrantGuestPasses2: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGrantGuestPasses2(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.package_id != null) message.package_id = object.package_id >>> 0; if (object.passes_to_grant != null) @@ -19067,33 +24753,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGrantGuestPasses2.toObject = function toObject(message, options) { + CMsgAMGrantGuestPasses2.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.package_id = 0; object.passes_to_grant = 0; object.days_to_expiration = 0; object.action = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.package_id != null && message.hasOwnProperty("package_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) object.package_id = message.package_id; - if (message.passes_to_grant != null && message.hasOwnProperty("passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) object.passes_to_grant = message.passes_to_grant; - if (message.days_to_expiration != null && message.hasOwnProperty("days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) object.days_to_expiration = message.days_to_expiration; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) object.action = message.action; return object; }; @@ -19105,8 +24797,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGrantGuestPasses2.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGrantGuestPasses2.prototype.toJSON = function() { + return CMsgAMGrantGuestPasses2.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGrantGuestPasses2 + * @function getTypeUrl + * @memberof CMsgAMGrantGuestPasses2 + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGrantGuestPasses2.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGrantGuestPasses2"; }; return CMsgAMGrantGuestPasses2; @@ -19116,26 +24822,39 @@ /** * Properties of a CMsgAMGrantGuestPasses2Response. - * @exports ICMsgAMGrantGuestPasses2Response - * @interface ICMsgAMGrantGuestPasses2Response + * @typedef {Object} CMsgAMGrantGuestPasses2Response.$Properties * @property {number|null} [eresult] CMsgAMGrantGuestPasses2Response eresult * @property {number|null} [passes_granted] CMsgAMGrantGuestPasses2Response passes_granted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGrantGuestPasses2Response. + * @exports ICMsgAMGrantGuestPasses2Response + * @interface ICMsgAMGrantGuestPasses2Response + * @augments CMsgAMGrantGuestPasses2Response.$Properties + * @deprecated Use CMsgAMGrantGuestPasses2Response.$Properties instead. + */ + + /** + * Shape of a CMsgAMGrantGuestPasses2Response. + * @typedef {CMsgAMGrantGuestPasses2Response.$Properties} CMsgAMGrantGuestPasses2Response.$Shape */ /** * Constructs a new CMsgAMGrantGuestPasses2Response. * @exports CMsgAMGrantGuestPasses2Response * @classdesc Represents a CMsgAMGrantGuestPasses2Response. - * @implements ICMsgAMGrantGuestPasses2Response * @constructor - * @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGrantGuestPasses2Response(properties) { + var CMsgAMGrantGuestPasses2Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGrantGuestPasses2Response eresult. @@ -19158,10 +24877,14 @@ * @function create * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2Response.$Properties=} [properties] Properties to set * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response instance + * @type {{ + * (properties: CMsgAMGrantGuestPasses2Response.$Shape): CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape; + * (properties?: CMsgAMGrantGuestPasses2Response.$Properties): CMsgAMGrantGuestPasses2Response; + * }} */ - CMsgAMGrantGuestPasses2Response.create = function create(properties) { + CMsgAMGrantGuestPasses2Response.create = function(properties) { return new CMsgAMGrantGuestPasses2Response(properties); }; @@ -19170,17 +24893,24 @@ * @function encode * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response} message CMsgAMGrantGuestPasses2Response message or plain object to encode + * @param {CMsgAMGrantGuestPasses2Response.$Properties} message CMsgAMGrantGuestPasses2Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2Response.encode = function encode(message, writer) { + CMsgAMGrantGuestPasses2Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); - if (message.passes_granted != null && Object.hasOwnProperty.call(message, "passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.passes_granted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19189,12 +24919,12 @@ * @function encodeDelimited * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response} message CMsgAMGrantGuestPasses2Response message or plain object to encode + * @param {CMsgAMGrantGuestPasses2Response.$Properties} message CMsgAMGrantGuestPasses2Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGrantGuestPasses2Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19204,28 +24934,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response + * @returns {CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape} CMsgAMGrantGuestPasses2Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2Response.decode = function decode(reader, length) { + CMsgAMGrantGuestPasses2Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGrantGuestPasses2Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGrantGuestPasses2Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - case 2: - message.passes_granted = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.passes_granted = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19235,11 +24985,11 @@ * @memberof CMsgAMGrantGuestPasses2Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response + * @returns {CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape} CMsgAMGrantGuestPasses2Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2Response.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGrantGuestPasses2Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19253,13 +25003,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGrantGuestPasses2Response.verify = function verify(message) { + CMsgAMGrantGuestPasses2Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.passes_granted != null && message.hasOwnProperty("passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) if (!$util.isInteger(message.passes_granted)) return "passes_granted: integer expected"; return null; @@ -19273,9 +25027,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response */ - CMsgAMGrantGuestPasses2Response.fromObject = function fromObject(object) { + CMsgAMGrantGuestPasses2Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGrantGuestPasses2Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGrantGuestPasses2Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGrantGuestPasses2Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -19293,17 +25053,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGrantGuestPasses2Response.toObject = function toObject(message, options) { + CMsgAMGrantGuestPasses2Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.passes_granted = 0; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.passes_granted != null && message.hasOwnProperty("passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) object.passes_granted = message.passes_granted; return object; }; @@ -19312,11 +25076,25 @@ * Converts this CMsgAMGrantGuestPasses2Response to JSON. * @function toJSON * @memberof CMsgAMGrantGuestPasses2Response - * @instance - * @returns {Object.} JSON object + * @instance + * @returns {Object.} JSON object + */ + CMsgAMGrantGuestPasses2Response.prototype.toJSON = function() { + return CMsgAMGrantGuestPasses2Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGrantGuestPasses2Response + * @function getTypeUrl + * @memberof CMsgAMGrantGuestPasses2Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url */ - CMsgAMGrantGuestPasses2Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGrantGuestPasses2Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGrantGuestPasses2Response"; }; return CMsgAMGrantGuestPasses2Response; @@ -19326,26 +25104,39 @@ /** * Properties of a CGCSystemMsg_GetAccountDetails. - * @exports ICGCSystemMsg_GetAccountDetails - * @interface ICGCSystemMsg_GetAccountDetails + * @typedef {Object} CGCSystemMsg_GetAccountDetails.$Properties * @property {number|Long|null} [steamid] CGCSystemMsg_GetAccountDetails steamid * @property {number|null} [appid] CGCSystemMsg_GetAccountDetails appid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetAccountDetails. + * @exports ICGCSystemMsg_GetAccountDetails + * @interface ICGCSystemMsg_GetAccountDetails + * @augments CGCSystemMsg_GetAccountDetails.$Properties + * @deprecated Use CGCSystemMsg_GetAccountDetails.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetAccountDetails. + * @typedef {CGCSystemMsg_GetAccountDetails.$Properties} CGCSystemMsg_GetAccountDetails.$Shape */ /** * Constructs a new CGCSystemMsg_GetAccountDetails. * @exports CGCSystemMsg_GetAccountDetails * @classdesc Represents a CGCSystemMsg_GetAccountDetails. - * @implements ICGCSystemMsg_GetAccountDetails * @constructor - * @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetAccountDetails(properties) { + var CGCSystemMsg_GetAccountDetails = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetAccountDetails steamid. @@ -19353,7 +25144,7 @@ * @memberof CGCSystemMsg_GetAccountDetails * @instance */ - CGCSystemMsg_GetAccountDetails.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCSystemMsg_GetAccountDetails.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CGCSystemMsg_GetAccountDetails appid. @@ -19368,10 +25159,14 @@ * @function create * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails instance + * @type {{ + * (properties: CGCSystemMsg_GetAccountDetails.$Shape): CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape; + * (properties?: CGCSystemMsg_GetAccountDetails.$Properties): CGCSystemMsg_GetAccountDetails; + * }} */ - CGCSystemMsg_GetAccountDetails.create = function create(properties) { + CGCSystemMsg_GetAccountDetails.create = function(properties) { return new CGCSystemMsg_GetAccountDetails(properties); }; @@ -19380,17 +25175,24 @@ * @function encode * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails} message CGCSystemMsg_GetAccountDetails message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails.$Properties} message CGCSystemMsg_GetAccountDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails.encode = function encode(message, writer) { + CGCSystemMsg_GetAccountDetails.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19399,12 +25201,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails} message CGCSystemMsg_GetAccountDetails message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails.$Properties} message CGCSystemMsg_GetAccountDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetAccountDetails.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19414,28 +25216,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails + * @returns {CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape} CGCSystemMsg_GetAccountDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails.decode = function decode(reader, length) { + CGCSystemMsg_GetAccountDetails.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetAccountDetails(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetAccountDetails(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19445,11 +25267,11 @@ * @memberof CGCSystemMsg_GetAccountDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails + * @returns {CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape} CGCSystemMsg_GetAccountDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetAccountDetails.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19463,13 +25285,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetAccountDetails.verify = function verify(message) { + CGCSystemMsg_GetAccountDetails.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; return null; @@ -19483,19 +25309,25 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails */ - CGCSystemMsg_GetAccountDetails.fromObject = function fromObject(object) { + CGCSystemMsg_GetAccountDetails.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetAccountDetails) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetAccountDetails: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetAccountDetails(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; return message; @@ -19510,24 +25342,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetAccountDetails.toObject = function toObject(message, options) { + CGCSystemMsg_GetAccountDetails.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; return object; }; @@ -19539,8 +25377,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetAccountDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetAccountDetails.prototype.toJSON = function() { + return CGCSystemMsg_GetAccountDetails.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetAccountDetails + * @function getTypeUrl + * @memberof CGCSystemMsg_GetAccountDetails + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetAccountDetails.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetAccountDetails"; }; return CGCSystemMsg_GetAccountDetails; @@ -19550,8 +25402,7 @@ /** * Properties of a CGCSystemMsg_GetAccountDetails_Response. - * @exports ICGCSystemMsg_GetAccountDetails_Response - * @interface ICGCSystemMsg_GetAccountDetails_Response + * @typedef {Object} CGCSystemMsg_GetAccountDetails_Response.$Properties * @property {number|null} [eresult_deprecated] CGCSystemMsg_GetAccountDetails_Response eresult_deprecated * @property {string|null} [account_name] CGCSystemMsg_GetAccountDetails_Response account_name * @property {string|null} [persona_name] CGCSystemMsg_GetAccountDetails_Response persona_name @@ -19586,22 +25437,36 @@ * @property {number|null} [rt_identity_linked] CGCSystemMsg_GetAccountDetails_Response rt_identity_linked * @property {number|null} [rt_birth_date] CGCSystemMsg_GetAccountDetails_Response rt_birth_date * @property {string|null} [txn_country_code] CGCSystemMsg_GetAccountDetails_Response txn_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetAccountDetails_Response. + * @exports ICGCSystemMsg_GetAccountDetails_Response + * @interface ICGCSystemMsg_GetAccountDetails_Response + * @augments CGCSystemMsg_GetAccountDetails_Response.$Properties + * @deprecated Use CGCSystemMsg_GetAccountDetails_Response.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetAccountDetails_Response. + * @typedef {CGCSystemMsg_GetAccountDetails_Response.$Properties} CGCSystemMsg_GetAccountDetails_Response.$Shape */ /** * Constructs a new CGCSystemMsg_GetAccountDetails_Response. * @exports CGCSystemMsg_GetAccountDetails_Response * @classdesc Represents a CGCSystemMsg_GetAccountDetails_Response. - * @implements ICGCSystemMsg_GetAccountDetails_Response * @constructor - * @param {ICGCSystemMsg_GetAccountDetails_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetAccountDetails_Response(properties) { + var CGCSystemMsg_GetAccountDetails_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetAccountDetails_Response eresult_deprecated. @@ -19880,10 +25745,14 @@ * @function create * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response instance + * @type {{ + * (properties: CGCSystemMsg_GetAccountDetails_Response.$Shape): CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape; + * (properties?: CGCSystemMsg_GetAccountDetails_Response.$Properties): CGCSystemMsg_GetAccountDetails_Response; + * }} */ - CGCSystemMsg_GetAccountDetails_Response.create = function create(properties) { + CGCSystemMsg_GetAccountDetails_Response.create = function(properties) { return new CGCSystemMsg_GetAccountDetails_Response(properties); }; @@ -19892,81 +25761,88 @@ * @function encode * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails_Response.encode = function encode(message, writer) { + CGCSystemMsg_GetAccountDetails_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult_deprecated != null && Object.hasOwnProperty.call(message, "eresult_deprecated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult_deprecated); - if (message.account_name != null && Object.hasOwnProperty.call(message, "account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.account_name); - if (message.persona_name != null && Object.hasOwnProperty.call(message, "persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.persona_name); - if (message.is_profile_public != null && Object.hasOwnProperty.call(message, "is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_profile_public); - if (message.is_inventory_public != null && Object.hasOwnProperty.call(message, "is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_inventory_public); - if (message.is_vac_banned != null && Object.hasOwnProperty.call(message, "is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.is_vac_banned); - if (message.is_cyber_cafe != null && Object.hasOwnProperty.call(message, "is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.is_cyber_cafe); - if (message.is_school_account != null && Object.hasOwnProperty.call(message, "is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.is_school_account); - if (message.is_limited != null && Object.hasOwnProperty.call(message, "is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.is_limited); - if (message.is_subscribed != null && Object.hasOwnProperty.call(message, "is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.is_subscribed); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message["package"]); - if (message.is_free_trial_account != null && Object.hasOwnProperty.call(message, "is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) writer.uint32(/* id 13, wireType 0 =*/104).bool(message.is_free_trial_account); - if (message.free_trial_expiration != null && Object.hasOwnProperty.call(message, "free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.free_trial_expiration); - if (message.is_low_violence != null && Object.hasOwnProperty.call(message, "is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) writer.uint32(/* id 15, wireType 0 =*/120).bool(message.is_low_violence); - if (message.is_account_locked_down != null && Object.hasOwnProperty.call(message, "is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.is_account_locked_down); - if (message.is_community_banned != null && Object.hasOwnProperty.call(message, "is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.is_community_banned); - if (message.is_trade_banned != null && Object.hasOwnProperty.call(message, "is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.is_trade_banned); - if (message.trade_ban_expiration != null && Object.hasOwnProperty.call(message, "trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.trade_ban_expiration); - if (message.accountid != null && Object.hasOwnProperty.call(message, "accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.accountid); - if (message.suspension_end_time != null && Object.hasOwnProperty.call(message, "suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.suspension_end_time); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) writer.uint32(/* id 22, wireType 2 =*/178).string(message.currency); - if (message.steam_level != null && Object.hasOwnProperty.call(message, "steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.steam_level); - if (message.friend_count != null && Object.hasOwnProperty.call(message, "friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.friend_count); - if (message.account_creation_time != null && Object.hasOwnProperty.call(message, "account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.account_creation_time); - if (message.is_steamguard_enabled != null && Object.hasOwnProperty.call(message, "is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.is_steamguard_enabled); - if (message.is_phone_verified != null && Object.hasOwnProperty.call(message, "is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) writer.uint32(/* id 28, wireType 0 =*/224).bool(message.is_phone_verified); - if (message.is_two_factor_auth_enabled != null && Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) writer.uint32(/* id 29, wireType 0 =*/232).bool(message.is_two_factor_auth_enabled); - if (message.two_factor_enabled_time != null && Object.hasOwnProperty.call(message, "two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.two_factor_enabled_time); - if (message.phone_verification_time != null && Object.hasOwnProperty.call(message, "phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.phone_verification_time); - if (message.phone_id != null && Object.hasOwnProperty.call(message, "phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) writer.uint32(/* id 33, wireType 0 =*/264).uint64(message.phone_id); - if (message.is_phone_identifying != null && Object.hasOwnProperty.call(message, "is_phone_identifying")) + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) writer.uint32(/* id 34, wireType 0 =*/272).bool(message.is_phone_identifying); - if (message.rt_identity_linked != null && Object.hasOwnProperty.call(message, "rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) writer.uint32(/* id 35, wireType 0 =*/280).uint32(message.rt_identity_linked); - if (message.rt_birth_date != null && Object.hasOwnProperty.call(message, "rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) writer.uint32(/* id 36, wireType 0 =*/288).uint32(message.rt_birth_date); - if (message.txn_country_code != null && Object.hasOwnProperty.call(message, "txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.txn_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19975,12 +25851,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetAccountDetails_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19990,124 +25866,240 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response + * @returns {CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape} CGCSystemMsg_GetAccountDetails_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails_Response.decode = function decode(reader, length) { + CGCSystemMsg_GetAccountDetails_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetAccountDetails_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetAccountDetails_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult_deprecated = reader.uint32(); - break; - case 2: - message.account_name = reader.string(); - break; - case 3: - message.persona_name = reader.string(); - break; - case 4: - message.is_profile_public = reader.bool(); - break; - case 5: - message.is_inventory_public = reader.bool(); - break; - case 7: - message.is_vac_banned = reader.bool(); - break; - case 8: - message.is_cyber_cafe = reader.bool(); - break; - case 9: - message.is_school_account = reader.bool(); - break; - case 10: - message.is_limited = reader.bool(); - break; - case 11: - message.is_subscribed = reader.bool(); - break; - case 12: - message["package"] = reader.uint32(); - break; - case 13: - message.is_free_trial_account = reader.bool(); - break; - case 14: - message.free_trial_expiration = reader.uint32(); - break; - case 15: - message.is_low_violence = reader.bool(); - break; - case 16: - message.is_account_locked_down = reader.bool(); - break; - case 17: - message.is_community_banned = reader.bool(); - break; - case 18: - message.is_trade_banned = reader.bool(); - break; - case 19: - message.trade_ban_expiration = reader.uint32(); - break; - case 20: - message.accountid = reader.uint32(); - break; - case 21: - message.suspension_end_time = reader.uint32(); - break; - case 22: - message.currency = reader.string(); - break; - case 23: - message.steam_level = reader.uint32(); - break; - case 24: - message.friend_count = reader.uint32(); - break; - case 25: - message.account_creation_time = reader.uint32(); - break; - case 27: - message.is_steamguard_enabled = reader.bool(); - break; - case 28: - message.is_phone_verified = reader.bool(); - break; - case 29: - message.is_two_factor_auth_enabled = reader.bool(); - break; - case 30: - message.two_factor_enabled_time = reader.uint32(); - break; - case 31: - message.phone_verification_time = reader.uint32(); - break; - case 33: - message.phone_id = reader.uint64(); - break; - case 34: - message.is_phone_identifying = reader.bool(); - break; - case 35: - message.rt_identity_linked = reader.uint32(); - break; - case 36: - message.rt_birth_date = reader.uint32(); - break; - case 37: - message.txn_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult_deprecated = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.account_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.persona_name = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_profile_public = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_inventory_public = reader.bool(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.is_vac_banned = reader.bool(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.is_cyber_cafe = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.is_school_account = reader.bool(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.is_limited = reader.bool(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.is_subscribed = reader.bool(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message["package"] = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.is_free_trial_account = reader.bool(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.free_trial_expiration = reader.uint32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.is_low_violence = reader.bool(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.is_account_locked_down = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.is_community_banned = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.is_trade_banned = reader.bool(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.trade_ban_expiration = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.accountid = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.suspension_end_time = reader.uint32(); + continue; + } + case 22: { + if (wireType !== 2) + break; + message.currency = reader.string(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.steam_level = reader.uint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.friend_count = reader.uint32(); + continue; + } + case 25: { + if (wireType !== 0) + break; + message.account_creation_time = reader.uint32(); + continue; + } + case 27: { + if (wireType !== 0) + break; + message.is_steamguard_enabled = reader.bool(); + continue; + } + case 28: { + if (wireType !== 0) + break; + message.is_phone_verified = reader.bool(); + continue; + } + case 29: { + if (wireType !== 0) + break; + message.is_two_factor_auth_enabled = reader.bool(); + continue; + } + case 30: { + if (wireType !== 0) + break; + message.two_factor_enabled_time = reader.uint32(); + continue; + } + case 31: { + if (wireType !== 0) + break; + message.phone_verification_time = reader.uint32(); + continue; + } + case 33: { + if (wireType !== 0) + break; + message.phone_id = reader.uint64(); + continue; + } + case 34: { + if (wireType !== 0) + break; + message.is_phone_identifying = reader.bool(); + continue; + } + case 35: { + if (wireType !== 0) + break; + message.rt_identity_linked = reader.uint32(); + continue; + } + case 36: { + if (wireType !== 0) + break; + message.rt_birth_date = reader.uint32(); + continue; + } + case 37: { + if (wireType !== 2) + break; + message.txn_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20117,11 +26109,11 @@ * @memberof CGCSystemMsg_GetAccountDetails_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response + * @returns {CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape} CGCSystemMsg_GetAccountDetails_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails_Response.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetAccountDetails_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20135,109 +26127,113 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetAccountDetails_Response.verify = function verify(message) { + CGCSystemMsg_GetAccountDetails_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) if (!$util.isInteger(message.eresult_deprecated)) return "eresult_deprecated: integer expected"; - if (message.account_name != null && message.hasOwnProperty("account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) if (!$util.isString(message.account_name)) return "account_name: string expected"; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) if (!$util.isString(message.persona_name)) return "persona_name: string expected"; - if (message.is_profile_public != null && message.hasOwnProperty("is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) if (typeof message.is_profile_public !== "boolean") return "is_profile_public: boolean expected"; - if (message.is_inventory_public != null && message.hasOwnProperty("is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) if (typeof message.is_inventory_public !== "boolean") return "is_inventory_public: boolean expected"; - if (message.is_vac_banned != null && message.hasOwnProperty("is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) if (typeof message.is_vac_banned !== "boolean") return "is_vac_banned: boolean expected"; - if (message.is_cyber_cafe != null && message.hasOwnProperty("is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) if (typeof message.is_cyber_cafe !== "boolean") return "is_cyber_cafe: boolean expected"; - if (message.is_school_account != null && message.hasOwnProperty("is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) if (typeof message.is_school_account !== "boolean") return "is_school_account: boolean expected"; - if (message.is_limited != null && message.hasOwnProperty("is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) if (typeof message.is_limited !== "boolean") return "is_limited: boolean expected"; - if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) if (typeof message.is_subscribed !== "boolean") return "is_subscribed: boolean expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) if (!$util.isInteger(message["package"])) return "package: integer expected"; - if (message.is_free_trial_account != null && message.hasOwnProperty("is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) if (typeof message.is_free_trial_account !== "boolean") return "is_free_trial_account: boolean expected"; - if (message.free_trial_expiration != null && message.hasOwnProperty("free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) if (!$util.isInteger(message.free_trial_expiration)) return "free_trial_expiration: integer expected"; - if (message.is_low_violence != null && message.hasOwnProperty("is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) if (typeof message.is_low_violence !== "boolean") return "is_low_violence: boolean expected"; - if (message.is_account_locked_down != null && message.hasOwnProperty("is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) if (typeof message.is_account_locked_down !== "boolean") return "is_account_locked_down: boolean expected"; - if (message.is_community_banned != null && message.hasOwnProperty("is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) if (typeof message.is_community_banned !== "boolean") return "is_community_banned: boolean expected"; - if (message.is_trade_banned != null && message.hasOwnProperty("is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) if (typeof message.is_trade_banned !== "boolean") return "is_trade_banned: boolean expected"; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) if (!$util.isInteger(message.trade_ban_expiration)) return "trade_ban_expiration: integer expected"; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) if (!$util.isInteger(message.accountid)) return "accountid: integer expected"; - if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) if (!$util.isInteger(message.suspension_end_time)) return "suspension_end_time: integer expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) if (!$util.isString(message.currency)) return "currency: string expected"; - if (message.steam_level != null && message.hasOwnProperty("steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) if (!$util.isInteger(message.steam_level)) return "steam_level: integer expected"; - if (message.friend_count != null && message.hasOwnProperty("friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) if (!$util.isInteger(message.friend_count)) return "friend_count: integer expected"; - if (message.account_creation_time != null && message.hasOwnProperty("account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) if (!$util.isInteger(message.account_creation_time)) return "account_creation_time: integer expected"; - if (message.is_steamguard_enabled != null && message.hasOwnProperty("is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) if (typeof message.is_steamguard_enabled !== "boolean") return "is_steamguard_enabled: boolean expected"; - if (message.is_phone_verified != null && message.hasOwnProperty("is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) if (typeof message.is_phone_verified !== "boolean") return "is_phone_verified: boolean expected"; - if (message.is_two_factor_auth_enabled != null && message.hasOwnProperty("is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) if (typeof message.is_two_factor_auth_enabled !== "boolean") return "is_two_factor_auth_enabled: boolean expected"; - if (message.two_factor_enabled_time != null && message.hasOwnProperty("two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) if (!$util.isInteger(message.two_factor_enabled_time)) return "two_factor_enabled_time: integer expected"; - if (message.phone_verification_time != null && message.hasOwnProperty("phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) if (!$util.isInteger(message.phone_verification_time)) return "phone_verification_time: integer expected"; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) if (!$util.isInteger(message.phone_id) && !(message.phone_id && $util.isInteger(message.phone_id.low) && $util.isInteger(message.phone_id.high))) return "phone_id: integer|Long expected"; - if (message.is_phone_identifying != null && message.hasOwnProperty("is_phone_identifying")) + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) if (typeof message.is_phone_identifying !== "boolean") return "is_phone_identifying: boolean expected"; - if (message.rt_identity_linked != null && message.hasOwnProperty("rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) if (!$util.isInteger(message.rt_identity_linked)) return "rt_identity_linked: integer expected"; - if (message.rt_birth_date != null && message.hasOwnProperty("rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) if (!$util.isInteger(message.rt_birth_date)) return "rt_birth_date: integer expected"; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) if (!$util.isString(message.txn_country_code)) return "txn_country_code: string expected"; return null; @@ -20251,44 +26247,50 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response */ - CGCSystemMsg_GetAccountDetails_Response.fromObject = function fromObject(object) { + CGCSystemMsg_GetAccountDetails_Response.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetAccountDetails_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetAccountDetails_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetAccountDetails_Response(); if (object.eresult_deprecated != null) message.eresult_deprecated = object.eresult_deprecated >>> 0; if (object.account_name != null) - message.account_name = String(object.account_name); + message.account_name = $String(object.account_name); if (object.persona_name != null) - message.persona_name = String(object.persona_name); + message.persona_name = $String(object.persona_name); if (object.is_profile_public != null) - message.is_profile_public = Boolean(object.is_profile_public); + message.is_profile_public = $Boolean(object.is_profile_public); if (object.is_inventory_public != null) - message.is_inventory_public = Boolean(object.is_inventory_public); + message.is_inventory_public = $Boolean(object.is_inventory_public); if (object.is_vac_banned != null) - message.is_vac_banned = Boolean(object.is_vac_banned); + message.is_vac_banned = $Boolean(object.is_vac_banned); if (object.is_cyber_cafe != null) - message.is_cyber_cafe = Boolean(object.is_cyber_cafe); + message.is_cyber_cafe = $Boolean(object.is_cyber_cafe); if (object.is_school_account != null) - message.is_school_account = Boolean(object.is_school_account); + message.is_school_account = $Boolean(object.is_school_account); if (object.is_limited != null) - message.is_limited = Boolean(object.is_limited); + message.is_limited = $Boolean(object.is_limited); if (object.is_subscribed != null) - message.is_subscribed = Boolean(object.is_subscribed); + message.is_subscribed = $Boolean(object.is_subscribed); if (object["package"] != null) message["package"] = object["package"] >>> 0; if (object.is_free_trial_account != null) - message.is_free_trial_account = Boolean(object.is_free_trial_account); + message.is_free_trial_account = $Boolean(object.is_free_trial_account); if (object.free_trial_expiration != null) message.free_trial_expiration = object.free_trial_expiration >>> 0; if (object.is_low_violence != null) - message.is_low_violence = Boolean(object.is_low_violence); + message.is_low_violence = $Boolean(object.is_low_violence); if (object.is_account_locked_down != null) - message.is_account_locked_down = Boolean(object.is_account_locked_down); + message.is_account_locked_down = $Boolean(object.is_account_locked_down); if (object.is_community_banned != null) - message.is_community_banned = Boolean(object.is_community_banned); + message.is_community_banned = $Boolean(object.is_community_banned); if (object.is_trade_banned != null) - message.is_trade_banned = Boolean(object.is_trade_banned); + message.is_trade_banned = $Boolean(object.is_trade_banned); if (object.trade_ban_expiration != null) message.trade_ban_expiration = object.trade_ban_expiration >>> 0; if (object.accountid != null) @@ -20296,7 +26298,7 @@ if (object.suspension_end_time != null) message.suspension_end_time = object.suspension_end_time >>> 0; if (object.currency != null) - message.currency = String(object.currency); + message.currency = $String(object.currency); if (object.steam_level != null) message.steam_level = object.steam_level >>> 0; if (object.friend_count != null) @@ -20304,32 +26306,32 @@ if (object.account_creation_time != null) message.account_creation_time = object.account_creation_time >>> 0; if (object.is_steamguard_enabled != null) - message.is_steamguard_enabled = Boolean(object.is_steamguard_enabled); + message.is_steamguard_enabled = $Boolean(object.is_steamguard_enabled); if (object.is_phone_verified != null) - message.is_phone_verified = Boolean(object.is_phone_verified); + message.is_phone_verified = $Boolean(object.is_phone_verified); if (object.is_two_factor_auth_enabled != null) - message.is_two_factor_auth_enabled = Boolean(object.is_two_factor_auth_enabled); + message.is_two_factor_auth_enabled = $Boolean(object.is_two_factor_auth_enabled); if (object.two_factor_enabled_time != null) message.two_factor_enabled_time = object.two_factor_enabled_time >>> 0; if (object.phone_verification_time != null) message.phone_verification_time = object.phone_verification_time >>> 0; if (object.phone_id != null) if ($util.Long) - (message.phone_id = $util.Long.fromValue(object.phone_id)).unsigned = true; + message.phone_id = $util.Long.fromValue(object.phone_id, true); else if (typeof object.phone_id === "string") - message.phone_id = parseInt(object.phone_id, 10); + message.phone_id = $parseInt(object.phone_id, 10); else if (typeof object.phone_id === "number") message.phone_id = object.phone_id; else if (typeof object.phone_id === "object") message.phone_id = new $util.LongBits(object.phone_id.low >>> 0, object.phone_id.high >>> 0).toNumber(true); if (object.is_phone_identifying != null) - message.is_phone_identifying = Boolean(object.is_phone_identifying); + message.is_phone_identifying = $Boolean(object.is_phone_identifying); if (object.rt_identity_linked != null) message.rt_identity_linked = object.rt_identity_linked >>> 0; if (object.rt_birth_date != null) message.rt_birth_date = object.rt_birth_date >>> 0; if (object.txn_country_code != null) - message.txn_country_code = String(object.txn_country_code); + message.txn_country_code = $String(object.txn_country_code); return message; }; @@ -20342,9 +26344,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetAccountDetails_Response.toObject = function toObject(message, options) { + CGCSystemMsg_GetAccountDetails_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult_deprecated = 2; @@ -20378,84 +26384,86 @@ object.phone_verification_time = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.phone_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.phone_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.phone_id = options.longs === String ? "0" : 0; + object.phone_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.is_phone_identifying = false; object.rt_identity_linked = 0; object.rt_birth_date = 0; object.txn_country_code = ""; } - if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated")) + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) object.eresult_deprecated = message.eresult_deprecated; - if (message.account_name != null && message.hasOwnProperty("account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) object.account_name = message.account_name; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) object.persona_name = message.persona_name; - if (message.is_profile_public != null && message.hasOwnProperty("is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) object.is_profile_public = message.is_profile_public; - if (message.is_inventory_public != null && message.hasOwnProperty("is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) object.is_inventory_public = message.is_inventory_public; - if (message.is_vac_banned != null && message.hasOwnProperty("is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) object.is_vac_banned = message.is_vac_banned; - if (message.is_cyber_cafe != null && message.hasOwnProperty("is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) object.is_cyber_cafe = message.is_cyber_cafe; - if (message.is_school_account != null && message.hasOwnProperty("is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) object.is_school_account = message.is_school_account; - if (message.is_limited != null && message.hasOwnProperty("is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) object.is_limited = message.is_limited; - if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) object.is_subscribed = message.is_subscribed; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; - if (message.is_free_trial_account != null && message.hasOwnProperty("is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) object.is_free_trial_account = message.is_free_trial_account; - if (message.free_trial_expiration != null && message.hasOwnProperty("free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) object.free_trial_expiration = message.free_trial_expiration; - if (message.is_low_violence != null && message.hasOwnProperty("is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) object.is_low_violence = message.is_low_violence; - if (message.is_account_locked_down != null && message.hasOwnProperty("is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) object.is_account_locked_down = message.is_account_locked_down; - if (message.is_community_banned != null && message.hasOwnProperty("is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) object.is_community_banned = message.is_community_banned; - if (message.is_trade_banned != null && message.hasOwnProperty("is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) object.is_trade_banned = message.is_trade_banned; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) object.trade_ban_expiration = message.trade_ban_expiration; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) object.accountid = message.accountid; - if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) object.suspension_end_time = message.suspension_end_time; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) object.currency = message.currency; - if (message.steam_level != null && message.hasOwnProperty("steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) object.steam_level = message.steam_level; - if (message.friend_count != null && message.hasOwnProperty("friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) object.friend_count = message.friend_count; - if (message.account_creation_time != null && message.hasOwnProperty("account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) object.account_creation_time = message.account_creation_time; - if (message.is_steamguard_enabled != null && message.hasOwnProperty("is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) object.is_steamguard_enabled = message.is_steamguard_enabled; - if (message.is_phone_verified != null && message.hasOwnProperty("is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) object.is_phone_verified = message.is_phone_verified; - if (message.is_two_factor_auth_enabled != null && message.hasOwnProperty("is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) object.is_two_factor_auth_enabled = message.is_two_factor_auth_enabled; - if (message.two_factor_enabled_time != null && message.hasOwnProperty("two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) object.two_factor_enabled_time = message.two_factor_enabled_time; - if (message.phone_verification_time != null && message.hasOwnProperty("phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) object.phone_verification_time = message.phone_verification_time; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) - if (typeof message.phone_id === "number") - object.phone_id = options.longs === String ? String(message.phone_id) : message.phone_id; + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.phone_id = typeof message.phone_id === "number" ? $BigInt(message.phone_id) : $util.Long.fromBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0, true).toBigInt(); + else if (typeof message.phone_id === "number") + object.phone_id = options.longs === $String ? $String(message.phone_id) : message.phone_id; else - object.phone_id = options.longs === String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; - if (message.is_phone_identifying != null && message.hasOwnProperty("is_phone_identifying")) + object.phone_id = options.longs === $String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === $Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) object.is_phone_identifying = message.is_phone_identifying; - if (message.rt_identity_linked != null && message.hasOwnProperty("rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) object.rt_identity_linked = message.rt_identity_linked; - if (message.rt_birth_date != null && message.hasOwnProperty("rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) object.rt_birth_date = message.rt_birth_date; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) object.txn_country_code = message.txn_country_code; return object; }; @@ -20467,8 +26475,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetAccountDetails_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetAccountDetails_Response.prototype.toJSON = function() { + return CGCSystemMsg_GetAccountDetails_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetAccountDetails_Response + * @function getTypeUrl + * @memberof CGCSystemMsg_GetAccountDetails_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetAccountDetails_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetAccountDetails_Response"; }; return CGCSystemMsg_GetAccountDetails_Response; @@ -20478,26 +26500,39 @@ /** * Properties of a CMsgGCCheckClanMembership. - * @exports ICMsgGCCheckClanMembership - * @interface ICMsgGCCheckClanMembership + * @typedef {Object} CMsgGCCheckClanMembership.$Properties * @property {number|Long|null} [steamid] CMsgGCCheckClanMembership steamid * @property {number|null} [clanid] CMsgGCCheckClanMembership clanid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckClanMembership. + * @exports ICMsgGCCheckClanMembership + * @interface ICMsgGCCheckClanMembership + * @augments CMsgGCCheckClanMembership.$Properties + * @deprecated Use CMsgGCCheckClanMembership.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckClanMembership. + * @typedef {CMsgGCCheckClanMembership.$Properties} CMsgGCCheckClanMembership.$Shape */ /** * Constructs a new CMsgGCCheckClanMembership. * @exports CMsgGCCheckClanMembership * @classdesc Represents a CMsgGCCheckClanMembership. - * @implements ICMsgGCCheckClanMembership * @constructor - * @param {ICMsgGCCheckClanMembership=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckClanMembership(properties) { + var CMsgGCCheckClanMembership = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckClanMembership steamid. @@ -20505,7 +26540,7 @@ * @memberof CMsgGCCheckClanMembership * @instance */ - CMsgGCCheckClanMembership.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckClanMembership.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCCheckClanMembership clanid. @@ -20520,10 +26555,14 @@ * @function create * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership instance + * @type {{ + * (properties: CMsgGCCheckClanMembership.$Shape): CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape; + * (properties?: CMsgGCCheckClanMembership.$Properties): CMsgGCCheckClanMembership; + * }} */ - CMsgGCCheckClanMembership.create = function create(properties) { + CMsgGCCheckClanMembership.create = function(properties) { return new CMsgGCCheckClanMembership(properties); }; @@ -20532,17 +26571,24 @@ * @function encode * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership} message CMsgGCCheckClanMembership message or plain object to encode + * @param {CMsgGCCheckClanMembership.$Properties} message CMsgGCCheckClanMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership.encode = function encode(message, writer) { + CMsgGCCheckClanMembership.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.clanid != null && Object.hasOwnProperty.call(message, "clanid")) + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.clanid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20551,12 +26597,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership} message CMsgGCCheckClanMembership message or plain object to encode + * @param {CMsgGCCheckClanMembership.$Properties} message CMsgGCCheckClanMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckClanMembership.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20566,28 +26612,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership + * @returns {CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape} CMsgGCCheckClanMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership.decode = function decode(reader, length) { + CMsgGCCheckClanMembership.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckClanMembership(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckClanMembership(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.clanid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.clanid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20597,11 +26663,11 @@ * @memberof CMsgGCCheckClanMembership * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership + * @returns {CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape} CMsgGCCheckClanMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckClanMembership.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20615,13 +26681,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckClanMembership.verify = function verify(message) { + CMsgGCCheckClanMembership.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.clanid != null && message.hasOwnProperty("clanid")) + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) if (!$util.isInteger(message.clanid)) return "clanid: integer expected"; return null; @@ -20635,19 +26705,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership */ - CMsgGCCheckClanMembership.fromObject = function fromObject(object) { + CMsgGCCheckClanMembership.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckClanMembership) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckClanMembership: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckClanMembership(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.clanid != null) message.clanid = object.clanid >>> 0; return message; @@ -20662,24 +26738,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckClanMembership.toObject = function toObject(message, options) { + CMsgGCCheckClanMembership.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.clanid = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.clanid != null && message.hasOwnProperty("clanid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) object.clanid = message.clanid; return object; }; @@ -20691,8 +26773,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckClanMembership.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckClanMembership.prototype.toJSON = function() { + return CMsgGCCheckClanMembership.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckClanMembership + * @function getTypeUrl + * @memberof CMsgGCCheckClanMembership + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckClanMembership.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckClanMembership"; }; return CMsgGCCheckClanMembership; @@ -20700,27 +26796,40 @@ $root.CMsgGCCheckClanMembership_Response = (function() { + /** + * Properties of a CMsgGCCheckClanMembership_Response. + * @typedef {Object} CMsgGCCheckClanMembership_Response.$Properties + * @property {boolean|null} [ismember] CMsgGCCheckClanMembership_Response ismember + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCCheckClanMembership_Response. * @exports ICMsgGCCheckClanMembership_Response * @interface ICMsgGCCheckClanMembership_Response - * @property {boolean|null} [ismember] CMsgGCCheckClanMembership_Response ismember + * @augments CMsgGCCheckClanMembership_Response.$Properties + * @deprecated Use CMsgGCCheckClanMembership_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckClanMembership_Response. + * @typedef {CMsgGCCheckClanMembership_Response.$Properties} CMsgGCCheckClanMembership_Response.$Shape */ /** * Constructs a new CMsgGCCheckClanMembership_Response. * @exports CMsgGCCheckClanMembership_Response * @classdesc Represents a CMsgGCCheckClanMembership_Response. - * @implements ICMsgGCCheckClanMembership_Response * @constructor - * @param {ICMsgGCCheckClanMembership_Response=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckClanMembership_Response(properties) { + var CMsgGCCheckClanMembership_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckClanMembership_Response ismember. @@ -20735,10 +26844,14 @@ * @function create * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response instance + * @type {{ + * (properties: CMsgGCCheckClanMembership_Response.$Shape): CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape; + * (properties?: CMsgGCCheckClanMembership_Response.$Properties): CMsgGCCheckClanMembership_Response; + * }} */ - CMsgGCCheckClanMembership_Response.create = function create(properties) { + CMsgGCCheckClanMembership_Response.create = function(properties) { return new CMsgGCCheckClanMembership_Response(properties); }; @@ -20747,15 +26860,22 @@ * @function encode * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response} message CMsgGCCheckClanMembership_Response message or plain object to encode + * @param {CMsgGCCheckClanMembership_Response.$Properties} message CMsgGCCheckClanMembership_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership_Response.encode = function encode(message, writer) { + CMsgGCCheckClanMembership_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ismember != null && Object.hasOwnProperty.call(message, "ismember")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.ismember); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20764,12 +26884,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response} message CMsgGCCheckClanMembership_Response message or plain object to encode + * @param {CMsgGCCheckClanMembership_Response.$Properties} message CMsgGCCheckClanMembership_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckClanMembership_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20779,25 +26899,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response + * @returns {CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape} CMsgGCCheckClanMembership_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership_Response.decode = function decode(reader, length) { + CMsgGCCheckClanMembership_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckClanMembership_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckClanMembership_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ismember = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ismember = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20807,11 +26944,11 @@ * @memberof CMsgGCCheckClanMembership_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response + * @returns {CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape} CMsgGCCheckClanMembership_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckClanMembership_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20825,10 +26962,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckClanMembership_Response.verify = function verify(message) { + CMsgGCCheckClanMembership_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ismember != null && message.hasOwnProperty("ismember")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) if (typeof message.ismember !== "boolean") return "ismember: boolean expected"; return null; @@ -20842,12 +26983,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response */ - CMsgGCCheckClanMembership_Response.fromObject = function fromObject(object) { + CMsgGCCheckClanMembership_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckClanMembership_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckClanMembership_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckClanMembership_Response(); if (object.ismember != null) - message.ismember = Boolean(object.ismember); + message.ismember = $Boolean(object.ismember); return message; }; @@ -20860,13 +27007,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckClanMembership_Response.toObject = function toObject(message, options) { + CMsgGCCheckClanMembership_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.ismember = false; - if (message.ismember != null && message.hasOwnProperty("ismember")) + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) object.ismember = message.ismember; return object; }; @@ -20878,8 +27029,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckClanMembership_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckClanMembership_Response.prototype.toJSON = function() { + return CMsgGCCheckClanMembership_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckClanMembership_Response + * @function getTypeUrl + * @memberof CMsgGCCheckClanMembership_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckClanMembership_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckClanMembership_Response"; }; return CMsgGCCheckClanMembership_Response; @@ -20887,28 +27052,41 @@ $root.CMsgGCGetPersonaNames = (function() { + /** + * Properties of a CMsgGCGetPersonaNames. + * @typedef {Object} CMsgGCGetPersonaNames.$Properties + * @property {Array.|null} [steamids] CMsgGCGetPersonaNames steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPersonaNames. * @exports ICMsgGCGetPersonaNames * @interface ICMsgGCGetPersonaNames - * @property {Array.|null} [steamids] CMsgGCGetPersonaNames steamids + * @augments CMsgGCGetPersonaNames.$Properties + * @deprecated Use CMsgGCGetPersonaNames.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPersonaNames. + * @typedef {CMsgGCGetPersonaNames.$Properties} CMsgGCGetPersonaNames.$Shape */ /** * Constructs a new CMsgGCGetPersonaNames. * @exports CMsgGCGetPersonaNames * @classdesc Represents a CMsgGCGetPersonaNames. - * @implements ICMsgGCGetPersonaNames * @constructor - * @param {ICMsgGCGetPersonaNames=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPersonaNames(properties) { + var CMsgGCGetPersonaNames = function (properties) { this.steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPersonaNames steamids. @@ -20923,10 +27101,14 @@ * @function create * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames instance + * @type {{ + * (properties: CMsgGCGetPersonaNames.$Shape): CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape; + * (properties?: CMsgGCGetPersonaNames.$Properties): CMsgGCGetPersonaNames; + * }} */ - CMsgGCGetPersonaNames.create = function create(properties) { + CMsgGCGetPersonaNames.create = function(properties) { return new CMsgGCGetPersonaNames(properties); }; @@ -20935,16 +27117,23 @@ * @function encode * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames} message CMsgGCGetPersonaNames message or plain object to encode + * @param {CMsgGCGetPersonaNames.$Properties} message CMsgGCGetPersonaNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames.encode = function encode(message, writer) { + CMsgGCGetPersonaNames.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.steamids != null && message.steamids.length) for (var i = 0; i < message.steamids.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20953,12 +27142,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames} message CMsgGCGetPersonaNames message or plain object to encode + * @param {CMsgGCGetPersonaNames.$Properties} message CMsgGCGetPersonaNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPersonaNames.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20968,32 +27157,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames + * @returns {CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape} CMsgGCGetPersonaNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames.decode = function decode(reader, length) { + CMsgGCGetPersonaNames.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.steamids && message.steamids.length)) - message.steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.steamids.push(reader.fixed64()); - } else - message.steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.steamids && message.steamids.length)) + message.steamids = []; + reader.fixed64s(message.steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.steamids && message.steamids.length)) + message.steamids = []; + message.steamids.push(reader.fixed64()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21003,11 +27210,11 @@ * @memberof CMsgGCGetPersonaNames * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames + * @returns {CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape} CMsgGCGetPersonaNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPersonaNames.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21021,11 +27228,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPersonaNames.verify = function verify(message) { + CMsgGCGetPersonaNames.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamids != null && message.hasOwnProperty("steamids")) { - if (!Array.isArray(message.steamids)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamids != null && $Object.hasOwnProperty.call(message, "steamids")) { + if (!$Array.isArray(message.steamids)) return "steamids: array expected"; for (var i = 0; i < message.steamids.length; ++i) if (!$util.isInteger(message.steamids[i]) && !(message.steamids[i] && $util.isInteger(message.steamids[i].low) && $util.isInteger(message.steamids[i].high))) @@ -21042,23 +27253,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames */ - CMsgGCGetPersonaNames.fromObject = function fromObject(object) { + CMsgGCGetPersonaNames.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames(); if (object.steamids) { - if (!Array.isArray(object.steamids)) - throw TypeError(".CMsgGCGetPersonaNames.steamids: array expected"); - message.steamids = []; + if (!$Array.isArray(object.steamids)) + throw $TypeError(".CMsgGCGetPersonaNames.steamids: array expected"); + message.steamids = $Array(object.steamids.length); for (var i = 0; i < object.steamids.length; ++i) if ($util.Long) - (message.steamids[i] = $util.Long.fromValue(object.steamids[i])).unsigned = false; + message.steamids[i] = $util.Long.fromValue(object.steamids[i], true); else if (typeof object.steamids[i] === "string") - message.steamids[i] = parseInt(object.steamids[i], 10); + message.steamids[i] = $parseInt(object.steamids[i], 10); else if (typeof object.steamids[i] === "number") message.steamids[i] = object.steamids[i]; else if (typeof object.steamids[i] === "object") - message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(); + message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -21072,19 +27289,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPersonaNames.toObject = function toObject(message, options) { + CMsgGCGetPersonaNames.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.steamids = []; if (message.steamids && message.steamids.length) { - object.steamids = []; + object.steamids = $Array(message.steamids.length); for (var j = 0; j < message.steamids.length; ++j) - if (typeof message.steamids[j] === "number") - object.steamids[j] = options.longs === String ? String(message.steamids[j]) : message.steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamids[j] = typeof message.steamids[j] === "number" ? $BigInt(message.steamids[j]) : $util.Long.fromBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.steamids[j] === "number") + object.steamids[j] = options.longs === $String ? $String(message.steamids[j]) : message.steamids[j]; else - object.steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber() : message.steamids[j]; + object.steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === $Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber(true) : message.steamids[j]; } return object; }; @@ -21093,11 +27316,25 @@ * Converts this CMsgGCGetPersonaNames to JSON. * @function toJSON * @memberof CMsgGCGetPersonaNames - * @instance - * @returns {Object.} JSON object + * @instance + * @returns {Object.} JSON object + */ + CMsgGCGetPersonaNames.prototype.toJSON = function() { + return CMsgGCGetPersonaNames.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPersonaNames + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url */ - CMsgGCGetPersonaNames.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPersonaNames.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames"; }; return CMsgGCGetPersonaNames; @@ -21105,34 +27342,47 @@ $root.CMsgGCGetPersonaNames_Response = (function() { + /** + * Properties of a CMsgGCGetPersonaNames_Response. + * @typedef {Object} CMsgGCGetPersonaNames_Response.$Properties + * @property {Array.|null} [succeeded_lookups] CMsgGCGetPersonaNames_Response succeeded_lookups + * @property {Array.|null} [failed_lookup_steamids] CMsgGCGetPersonaNames_Response failed_lookup_steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPersonaNames_Response. * @exports ICMsgGCGetPersonaNames_Response * @interface ICMsgGCGetPersonaNames_Response - * @property {Array.|null} [succeeded_lookups] CMsgGCGetPersonaNames_Response succeeded_lookups - * @property {Array.|null} [failed_lookup_steamids] CMsgGCGetPersonaNames_Response failed_lookup_steamids + * @augments CMsgGCGetPersonaNames_Response.$Properties + * @deprecated Use CMsgGCGetPersonaNames_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPersonaNames_Response. + * @typedef {CMsgGCGetPersonaNames_Response.$Properties} CMsgGCGetPersonaNames_Response.$Shape */ /** * Constructs a new CMsgGCGetPersonaNames_Response. * @exports CMsgGCGetPersonaNames_Response * @classdesc Represents a CMsgGCGetPersonaNames_Response. - * @implements ICMsgGCGetPersonaNames_Response * @constructor - * @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPersonaNames_Response(properties) { + var CMsgGCGetPersonaNames_Response = function (properties) { this.succeeded_lookups = []; this.failed_lookup_steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPersonaNames_Response succeeded_lookups. - * @member {Array.} succeeded_lookups + * @member {Array.} succeeded_lookups * @memberof CMsgGCGetPersonaNames_Response * @instance */ @@ -21151,10 +27401,14 @@ * @function create * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response instance + * @type {{ + * (properties: CMsgGCGetPersonaNames_Response.$Shape): CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape; + * (properties?: CMsgGCGetPersonaNames_Response.$Properties): CMsgGCGetPersonaNames_Response; + * }} */ - CMsgGCGetPersonaNames_Response.create = function create(properties) { + CMsgGCGetPersonaNames_Response.create = function(properties) { return new CMsgGCGetPersonaNames_Response(properties); }; @@ -21163,19 +27417,26 @@ * @function encode * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response} message CMsgGCGetPersonaNames_Response message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.$Properties} message CMsgGCGetPersonaNames_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames_Response.encode = function encode(message, writer) { + CMsgGCGetPersonaNames_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.succeeded_lookups != null && message.succeeded_lookups.length) for (var i = 0; i < message.succeeded_lookups.length; ++i) - $root.CMsgGCGetPersonaNames_Response.PersonaName.encode(message.succeeded_lookups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCGetPersonaNames_Response.PersonaName.encode(message.succeeded_lookups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); if (message.failed_lookup_steamids != null && message.failed_lookup_steamids.length) for (var i = 0; i < message.failed_lookup_steamids.length; ++i) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.failed_lookup_steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21184,12 +27445,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response} message CMsgGCGetPersonaNames_Response message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.$Properties} message CMsgGCGetPersonaNames_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPersonaNames_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21199,37 +27460,58 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response + * @returns {CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape} CMsgGCGetPersonaNames_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames_Response.decode = function decode(reader, length) { + CMsgGCGetPersonaNames_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.succeeded_lookups && message.succeeded_lookups.length)) - message.succeeded_lookups = []; - message.succeeded_lookups.push($root.CMsgGCGetPersonaNames_Response.PersonaName.decode(reader, reader.uint32())); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) - message.failed_lookup_steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.failed_lookup_steamids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.succeeded_lookups && message.succeeded_lookups.length)) + message.succeeded_lookups = []; + message.succeeded_lookups.push($root.CMsgGCGetPersonaNames_Response.PersonaName.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) + message.failed_lookup_steamids = []; + reader.fixed64s(message.failed_lookup_steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) + message.failed_lookup_steamids = []; message.failed_lookup_steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21239,11 +27521,11 @@ * @memberof CMsgGCGetPersonaNames_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response + * @returns {CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape} CMsgGCGetPersonaNames_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPersonaNames_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21257,20 +27539,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPersonaNames_Response.verify = function verify(message) { + CMsgGCGetPersonaNames_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.succeeded_lookups != null && message.hasOwnProperty("succeeded_lookups")) { - if (!Array.isArray(message.succeeded_lookups)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.succeeded_lookups != null && $Object.hasOwnProperty.call(message, "succeeded_lookups")) { + if (!$Array.isArray(message.succeeded_lookups)) return "succeeded_lookups: array expected"; for (var i = 0; i < message.succeeded_lookups.length; ++i) { - var error = $root.CMsgGCGetPersonaNames_Response.PersonaName.verify(message.succeeded_lookups[i]); + var error = $root.CMsgGCGetPersonaNames_Response.PersonaName.verify(message.succeeded_lookups[i], _depth + 1); if (error) return "succeeded_lookups." + error; } } - if (message.failed_lookup_steamids != null && message.hasOwnProperty("failed_lookup_steamids")) { - if (!Array.isArray(message.failed_lookup_steamids)) + if (message.failed_lookup_steamids != null && $Object.hasOwnProperty.call(message, "failed_lookup_steamids")) { + if (!$Array.isArray(message.failed_lookup_steamids)) return "failed_lookup_steamids: array expected"; for (var i = 0; i < message.failed_lookup_steamids.length; ++i) if (!$util.isInteger(message.failed_lookup_steamids[i]) && !(message.failed_lookup_steamids[i] && $util.isInteger(message.failed_lookup_steamids[i].low) && $util.isInteger(message.failed_lookup_steamids[i].high))) @@ -21287,33 +27573,39 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response */ - CMsgGCGetPersonaNames_Response.fromObject = function fromObject(object) { + CMsgGCGetPersonaNames_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames_Response(); if (object.succeeded_lookups) { - if (!Array.isArray(object.succeeded_lookups)) - throw TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: array expected"); - message.succeeded_lookups = []; + if (!$Array.isArray(object.succeeded_lookups)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: array expected"); + message.succeeded_lookups = $Array(object.succeeded_lookups.length); for (var i = 0; i < object.succeeded_lookups.length; ++i) { - if (typeof object.succeeded_lookups[i] !== "object") - throw TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: object expected"); - message.succeeded_lookups[i] = $root.CMsgGCGetPersonaNames_Response.PersonaName.fromObject(object.succeeded_lookups[i]); + if (!$util.isObject(object.succeeded_lookups[i])) + throw $TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: object expected"); + message.succeeded_lookups[i] = $root.CMsgGCGetPersonaNames_Response.PersonaName.fromObject(object.succeeded_lookups[i], _depth + 1); } } if (object.failed_lookup_steamids) { - if (!Array.isArray(object.failed_lookup_steamids)) - throw TypeError(".CMsgGCGetPersonaNames_Response.failed_lookup_steamids: array expected"); - message.failed_lookup_steamids = []; + if (!$Array.isArray(object.failed_lookup_steamids)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.failed_lookup_steamids: array expected"); + message.failed_lookup_steamids = $Array(object.failed_lookup_steamids.length); for (var i = 0; i < object.failed_lookup_steamids.length; ++i) if ($util.Long) - (message.failed_lookup_steamids[i] = $util.Long.fromValue(object.failed_lookup_steamids[i])).unsigned = false; + message.failed_lookup_steamids[i] = $util.Long.fromValue(object.failed_lookup_steamids[i], true); else if (typeof object.failed_lookup_steamids[i] === "string") - message.failed_lookup_steamids[i] = parseInt(object.failed_lookup_steamids[i], 10); + message.failed_lookup_steamids[i] = $parseInt(object.failed_lookup_steamids[i], 10); else if (typeof object.failed_lookup_steamids[i] === "number") message.failed_lookup_steamids[i] = object.failed_lookup_steamids[i]; else if (typeof object.failed_lookup_steamids[i] === "object") - message.failed_lookup_steamids[i] = new $util.LongBits(object.failed_lookup_steamids[i].low >>> 0, object.failed_lookup_steamids[i].high >>> 0).toNumber(); + message.failed_lookup_steamids[i] = new $util.LongBits(object.failed_lookup_steamids[i].low >>> 0, object.failed_lookup_steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -21327,26 +27619,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPersonaNames_Response.toObject = function toObject(message, options) { + CMsgGCGetPersonaNames_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.succeeded_lookups = []; object.failed_lookup_steamids = []; } if (message.succeeded_lookups && message.succeeded_lookups.length) { - object.succeeded_lookups = []; + object.succeeded_lookups = $Array(message.succeeded_lookups.length); for (var j = 0; j < message.succeeded_lookups.length; ++j) - object.succeeded_lookups[j] = $root.CMsgGCGetPersonaNames_Response.PersonaName.toObject(message.succeeded_lookups[j], options); + object.succeeded_lookups[j] = $root.CMsgGCGetPersonaNames_Response.PersonaName.toObject(message.succeeded_lookups[j], options, _depth + 1); } if (message.failed_lookup_steamids && message.failed_lookup_steamids.length) { - object.failed_lookup_steamids = []; + object.failed_lookup_steamids = $Array(message.failed_lookup_steamids.length); for (var j = 0; j < message.failed_lookup_steamids.length; ++j) - if (typeof message.failed_lookup_steamids[j] === "number") - object.failed_lookup_steamids[j] = options.longs === String ? String(message.failed_lookup_steamids[j]) : message.failed_lookup_steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.failed_lookup_steamids[j] = typeof message.failed_lookup_steamids[j] === "number" ? $BigInt(message.failed_lookup_steamids[j]) : $util.Long.fromBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.failed_lookup_steamids[j] === "number") + object.failed_lookup_steamids[j] = options.longs === $String ? $String(message.failed_lookup_steamids[j]) : message.failed_lookup_steamids[j]; else - object.failed_lookup_steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.failed_lookup_steamids[j]) : options.longs === Number ? new $util.LongBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0).toNumber() : message.failed_lookup_steamids[j]; + object.failed_lookup_steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.failed_lookup_steamids[j]) : options.longs === $Number ? new $util.LongBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0).toNumber(true) : message.failed_lookup_steamids[j]; } return object; }; @@ -21358,34 +27656,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPersonaNames_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPersonaNames_Response.prototype.toJSON = function() { + return CMsgGCGetPersonaNames_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPersonaNames_Response + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPersonaNames_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames_Response"; }; CMsgGCGetPersonaNames_Response.PersonaName = (function() { /** * Properties of a PersonaName. - * @memberof CMsgGCGetPersonaNames_Response - * @interface IPersonaName + * @typedef {Object} CMsgGCGetPersonaNames_Response.PersonaName.$Properties * @property {number|Long|null} [steamid] PersonaName steamid * @property {string|null} [persona_name] PersonaName persona_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PersonaName. + * @memberof CMsgGCGetPersonaNames_Response + * @interface IPersonaName + * @augments CMsgGCGetPersonaNames_Response.PersonaName.$Properties + * @deprecated Use CMsgGCGetPersonaNames_Response.PersonaName.$Properties instead. + */ + + /** + * Shape of a PersonaName. + * @typedef {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} CMsgGCGetPersonaNames_Response.PersonaName.$Shape */ /** * Constructs a new PersonaName. * @memberof CMsgGCGetPersonaNames_Response * @classdesc Represents a PersonaName. - * @implements IPersonaName * @constructor - * @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PersonaName(properties) { + var PersonaName = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PersonaName steamid. @@ -21393,7 +27718,7 @@ * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @instance */ - PersonaName.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PersonaName.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * PersonaName persona_name. @@ -21408,10 +27733,14 @@ * @function create * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName instance + * @type {{ + * (properties: CMsgGCGetPersonaNames_Response.PersonaName.$Shape): CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape; + * (properties?: CMsgGCGetPersonaNames_Response.PersonaName.$Properties): CMsgGCGetPersonaNames_Response.PersonaName; + * }} */ - PersonaName.create = function create(properties) { + PersonaName.create = function(properties) { return new PersonaName(properties); }; @@ -21420,17 +27749,24 @@ * @function encode * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName} message PersonaName message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} message PersonaName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaName.encode = function encode(message, writer) { + PersonaName.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.persona_name != null && Object.hasOwnProperty.call(message, "persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.persona_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21439,12 +27775,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName} message PersonaName message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} message PersonaName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PersonaName.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21454,28 +27790,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName + * @returns {CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape} PersonaName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaName.decode = function decode(reader, length) { + PersonaName.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames_Response.PersonaName(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames_Response.PersonaName(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.persona_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.persona_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21485,11 +27841,11 @@ * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName + * @returns {CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape} PersonaName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaName.decodeDelimited = function decodeDelimited(reader) { + PersonaName.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21503,13 +27859,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PersonaName.verify = function verify(message) { + PersonaName.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) if (!$util.isString(message.persona_name)) return "persona_name: string expected"; return null; @@ -21523,21 +27883,27 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName */ - PersonaName.fromObject = function fromObject(object) { + PersonaName.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames_Response.PersonaName) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.PersonaName: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames_Response.PersonaName(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.persona_name != null) - message.persona_name = String(object.persona_name); + message.persona_name = $String(object.persona_name); return message; }; @@ -21550,24 +27916,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PersonaName.toObject = function toObject(message, options) { + PersonaName.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.persona_name = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) object.persona_name = message.persona_name; return object; }; @@ -21579,8 +27951,22 @@ * @instance * @returns {Object.} JSON object */ - PersonaName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PersonaName.prototype.toJSON = function() { + return PersonaName.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PersonaName + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames_Response.PersonaName + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PersonaName.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames_Response.PersonaName"; }; return PersonaName; @@ -21593,26 +27979,39 @@ /** * Properties of a CMsgGCCheckFriendship. - * @exports ICMsgGCCheckFriendship - * @interface ICMsgGCCheckFriendship + * @typedef {Object} CMsgGCCheckFriendship.$Properties * @property {number|Long|null} [steamid_left] CMsgGCCheckFriendship steamid_left * @property {number|Long|null} [steamid_right] CMsgGCCheckFriendship steamid_right + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckFriendship. + * @exports ICMsgGCCheckFriendship + * @interface ICMsgGCCheckFriendship + * @augments CMsgGCCheckFriendship.$Properties + * @deprecated Use CMsgGCCheckFriendship.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckFriendship. + * @typedef {CMsgGCCheckFriendship.$Properties} CMsgGCCheckFriendship.$Shape */ /** * Constructs a new CMsgGCCheckFriendship. * @exports CMsgGCCheckFriendship * @classdesc Represents a CMsgGCCheckFriendship. - * @implements ICMsgGCCheckFriendship * @constructor - * @param {ICMsgGCCheckFriendship=} [properties] Properties to set + * @param {CMsgGCCheckFriendship.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckFriendship(properties) { + var CMsgGCCheckFriendship = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckFriendship steamid_left. @@ -21620,7 +28019,7 @@ * @memberof CMsgGCCheckFriendship * @instance */ - CMsgGCCheckFriendship.prototype.steamid_left = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckFriendship.prototype.steamid_left = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCCheckFriendship steamid_right. @@ -21628,17 +28027,21 @@ * @memberof CMsgGCCheckFriendship * @instance */ - CMsgGCCheckFriendship.prototype.steamid_right = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckFriendship.prototype.steamid_right = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCCheckFriendship instance using the specified properties. * @function create * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship=} [properties] Properties to set + * @param {CMsgGCCheckFriendship.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship instance + * @type {{ + * (properties: CMsgGCCheckFriendship.$Shape): CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape; + * (properties?: CMsgGCCheckFriendship.$Properties): CMsgGCCheckFriendship; + * }} */ - CMsgGCCheckFriendship.create = function create(properties) { + CMsgGCCheckFriendship.create = function(properties) { return new CMsgGCCheckFriendship(properties); }; @@ -21647,17 +28050,24 @@ * @function encode * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship} message CMsgGCCheckFriendship message or plain object to encode + * @param {CMsgGCCheckFriendship.$Properties} message CMsgGCCheckFriendship message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship.encode = function encode(message, writer) { + CMsgGCCheckFriendship.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid_left != null && Object.hasOwnProperty.call(message, "steamid_left")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid_left); - if (message.steamid_right != null && Object.hasOwnProperty.call(message, "steamid_right")) + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.steamid_right); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21666,12 +28076,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship} message CMsgGCCheckFriendship message or plain object to encode + * @param {CMsgGCCheckFriendship.$Properties} message CMsgGCCheckFriendship message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckFriendship.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21681,28 +28091,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship + * @returns {CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape} CMsgGCCheckFriendship * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship.decode = function decode(reader, length) { + CMsgGCCheckFriendship.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckFriendship(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckFriendship(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid_left = reader.fixed64(); - break; - case 2: - message.steamid_right = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid_left = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.steamid_right = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21712,11 +28142,11 @@ * @memberof CMsgGCCheckFriendship * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship + * @returns {CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape} CMsgGCCheckFriendship * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckFriendship.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21730,13 +28160,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckFriendship.verify = function verify(message) { + CMsgGCCheckFriendship.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid_left != null && message.hasOwnProperty("steamid_left")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) if (!$util.isInteger(message.steamid_left) && !(message.steamid_left && $util.isInteger(message.steamid_left.low) && $util.isInteger(message.steamid_left.high))) return "steamid_left: integer|Long expected"; - if (message.steamid_right != null && message.hasOwnProperty("steamid_right")) + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) if (!$util.isInteger(message.steamid_right) && !(message.steamid_right && $util.isInteger(message.steamid_right.low) && $util.isInteger(message.steamid_right.high))) return "steamid_right: integer|Long expected"; return null; @@ -21750,28 +28184,34 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship */ - CMsgGCCheckFriendship.fromObject = function fromObject(object) { + CMsgGCCheckFriendship.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckFriendship) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckFriendship: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckFriendship(); if (object.steamid_left != null) if ($util.Long) - (message.steamid_left = $util.Long.fromValue(object.steamid_left)).unsigned = false; + message.steamid_left = $util.Long.fromValue(object.steamid_left, true); else if (typeof object.steamid_left === "string") - message.steamid_left = parseInt(object.steamid_left, 10); + message.steamid_left = $parseInt(object.steamid_left, 10); else if (typeof object.steamid_left === "number") message.steamid_left = object.steamid_left; else if (typeof object.steamid_left === "object") - message.steamid_left = new $util.LongBits(object.steamid_left.low >>> 0, object.steamid_left.high >>> 0).toNumber(); + message.steamid_left = new $util.LongBits(object.steamid_left.low >>> 0, object.steamid_left.high >>> 0).toNumber(true); if (object.steamid_right != null) if ($util.Long) - (message.steamid_right = $util.Long.fromValue(object.steamid_right)).unsigned = false; + message.steamid_right = $util.Long.fromValue(object.steamid_right, true); else if (typeof object.steamid_right === "string") - message.steamid_right = parseInt(object.steamid_right, 10); + message.steamid_right = $parseInt(object.steamid_right, 10); else if (typeof object.steamid_right === "number") message.steamid_right = object.steamid_right; else if (typeof object.steamid_right === "object") - message.steamid_right = new $util.LongBits(object.steamid_right.low >>> 0, object.steamid_right.high >>> 0).toNumber(); + message.steamid_right = new $util.LongBits(object.steamid_right.low >>> 0, object.steamid_right.high >>> 0).toNumber(true); return message; }; @@ -21784,32 +28224,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckFriendship.toObject = function toObject(message, options) { + CMsgGCCheckFriendship.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid_left = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid_left = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid_left = options.longs === String ? "0" : 0; + object.steamid_left = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid_right = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid_right = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid_right = options.longs === String ? "0" : 0; + object.steamid_right = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steamid_left != null && message.hasOwnProperty("steamid_left")) - if (typeof message.steamid_left === "number") - object.steamid_left = options.longs === String ? String(message.steamid_left) : message.steamid_left; + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid_left = typeof message.steamid_left === "number" ? $BigInt(message.steamid_left) : $util.Long.fromBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0, true).toBigInt(); + else if (typeof message.steamid_left === "number") + object.steamid_left = options.longs === $String ? $String(message.steamid_left) : message.steamid_left; else - object.steamid_left = options.longs === String ? $util.Long.prototype.toString.call(message.steamid_left) : options.longs === Number ? new $util.LongBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0).toNumber() : message.steamid_left; - if (message.steamid_right != null && message.hasOwnProperty("steamid_right")) - if (typeof message.steamid_right === "number") - object.steamid_right = options.longs === String ? String(message.steamid_right) : message.steamid_right; + object.steamid_left = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid_left) : options.longs === $Number ? new $util.LongBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0).toNumber(true) : message.steamid_left; + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid_right = typeof message.steamid_right === "number" ? $BigInt(message.steamid_right) : $util.Long.fromBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0, true).toBigInt(); + else if (typeof message.steamid_right === "number") + object.steamid_right = options.longs === $String ? $String(message.steamid_right) : message.steamid_right; else - object.steamid_right = options.longs === String ? $util.Long.prototype.toString.call(message.steamid_right) : options.longs === Number ? new $util.LongBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0).toNumber() : message.steamid_right; + object.steamid_right = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid_right) : options.longs === $Number ? new $util.LongBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0).toNumber(true) : message.steamid_right; return object; }; @@ -21820,8 +28268,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckFriendship.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckFriendship.prototype.toJSON = function() { + return CMsgGCCheckFriendship.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckFriendship + * @function getTypeUrl + * @memberof CMsgGCCheckFriendship + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckFriendship.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckFriendship"; }; return CMsgGCCheckFriendship; @@ -21831,26 +28293,39 @@ /** * Properties of a CMsgGCCheckFriendship_Response. - * @exports ICMsgGCCheckFriendship_Response - * @interface ICMsgGCCheckFriendship_Response + * @typedef {Object} CMsgGCCheckFriendship_Response.$Properties * @property {boolean|null} [success] CMsgGCCheckFriendship_Response success * @property {boolean|null} [found_friendship] CMsgGCCheckFriendship_Response found_friendship + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckFriendship_Response. + * @exports ICMsgGCCheckFriendship_Response + * @interface ICMsgGCCheckFriendship_Response + * @augments CMsgGCCheckFriendship_Response.$Properties + * @deprecated Use CMsgGCCheckFriendship_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckFriendship_Response. + * @typedef {CMsgGCCheckFriendship_Response.$Properties} CMsgGCCheckFriendship_Response.$Shape */ /** * Constructs a new CMsgGCCheckFriendship_Response. * @exports CMsgGCCheckFriendship_Response * @classdesc Represents a CMsgGCCheckFriendship_Response. - * @implements ICMsgGCCheckFriendship_Response * @constructor - * @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set + * @param {CMsgGCCheckFriendship_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckFriendship_Response(properties) { + var CMsgGCCheckFriendship_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckFriendship_Response success. @@ -21873,10 +28348,14 @@ * @function create * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set + * @param {CMsgGCCheckFriendship_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response instance + * @type {{ + * (properties: CMsgGCCheckFriendship_Response.$Shape): CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape; + * (properties?: CMsgGCCheckFriendship_Response.$Properties): CMsgGCCheckFriendship_Response; + * }} */ - CMsgGCCheckFriendship_Response.create = function create(properties) { + CMsgGCCheckFriendship_Response.create = function(properties) { return new CMsgGCCheckFriendship_Response(properties); }; @@ -21885,17 +28364,24 @@ * @function encode * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response} message CMsgGCCheckFriendship_Response message or plain object to encode + * @param {CMsgGCCheckFriendship_Response.$Properties} message CMsgGCCheckFriendship_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship_Response.encode = function encode(message, writer) { + CMsgGCCheckFriendship_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.success != null && Object.hasOwnProperty.call(message, "success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); - if (message.found_friendship != null && Object.hasOwnProperty.call(message, "found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.found_friendship); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21904,12 +28390,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response} message CMsgGCCheckFriendship_Response message or plain object to encode + * @param {CMsgGCCheckFriendship_Response.$Properties} message CMsgGCCheckFriendship_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckFriendship_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21919,28 +28405,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response + * @returns {CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape} CMsgGCCheckFriendship_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship_Response.decode = function decode(reader, length) { + CMsgGCCheckFriendship_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckFriendship_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckFriendship_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - case 2: - message.found_friendship = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.success = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.found_friendship = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21950,11 +28456,11 @@ * @memberof CMsgGCCheckFriendship_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response + * @returns {CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape} CMsgGCCheckFriendship_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckFriendship_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21968,13 +28474,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckFriendship_Response.verify = function verify(message) { + CMsgGCCheckFriendship_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.success != null && message.hasOwnProperty("success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.found_friendship != null && message.hasOwnProperty("found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) if (typeof message.found_friendship !== "boolean") return "found_friendship: boolean expected"; return null; @@ -21988,14 +28498,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response */ - CMsgGCCheckFriendship_Response.fromObject = function fromObject(object) { + CMsgGCCheckFriendship_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckFriendship_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckFriendship_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckFriendship_Response(); if (object.success != null) - message.success = Boolean(object.success); + message.success = $Boolean(object.success); if (object.found_friendship != null) - message.found_friendship = Boolean(object.found_friendship); + message.found_friendship = $Boolean(object.found_friendship); return message; }; @@ -22008,17 +28524,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckFriendship_Response.toObject = function toObject(message, options) { + CMsgGCCheckFriendship_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.success = false; object.found_friendship = false; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.found_friendship != null && message.hasOwnProperty("found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) object.found_friendship = message.found_friendship; return object; }; @@ -22030,8 +28550,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckFriendship_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckFriendship_Response.prototype.toJSON = function() { + return CMsgGCCheckFriendship_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckFriendship_Response + * @function getTypeUrl + * @memberof CMsgGCCheckFriendship_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckFriendship_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckFriendship_Response"; }; return CMsgGCCheckFriendship_Response; @@ -22039,29 +28573,42 @@ $root.CMsgGCMsgMasterSetDirectory = (function() { + /** + * Properties of a CMsgGCMsgMasterSetDirectory. + * @typedef {Object} CMsgGCMsgMasterSetDirectory.$Properties + * @property {number|null} [master_dir_index] CMsgGCMsgMasterSetDirectory master_dir_index + * @property {Array.|null} [dir] CMsgGCMsgMasterSetDirectory dir + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetDirectory. * @exports ICMsgGCMsgMasterSetDirectory * @interface ICMsgGCMsgMasterSetDirectory - * @property {number|null} [master_dir_index] CMsgGCMsgMasterSetDirectory master_dir_index - * @property {Array.|null} [dir] CMsgGCMsgMasterSetDirectory dir + * @augments CMsgGCMsgMasterSetDirectory.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetDirectory. + * @typedef {CMsgGCMsgMasterSetDirectory.$Properties} CMsgGCMsgMasterSetDirectory.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetDirectory. * @exports CMsgGCMsgMasterSetDirectory * @classdesc Represents a CMsgGCMsgMasterSetDirectory. - * @implements ICMsgGCMsgMasterSetDirectory * @constructor - * @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetDirectory(properties) { + var CMsgGCMsgMasterSetDirectory = function (properties) { this.dir = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetDirectory master_dir_index. @@ -22073,7 +28620,7 @@ /** * CMsgGCMsgMasterSetDirectory dir. - * @member {Array.} dir + * @member {Array.} dir * @memberof CMsgGCMsgMasterSetDirectory * @instance */ @@ -22084,10 +28631,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory.$Shape): CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory.$Properties): CMsgGCMsgMasterSetDirectory; + * }} */ - CMsgGCMsgMasterSetDirectory.create = function create(properties) { + CMsgGCMsgMasterSetDirectory.create = function(properties) { return new CMsgGCMsgMasterSetDirectory(properties); }; @@ -22096,18 +28647,25 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory} message CMsgGCMsgMasterSetDirectory message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.$Properties} message CMsgGCMsgMasterSetDirectory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory.encode = function encode(message, writer) { + CMsgGCMsgMasterSetDirectory.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.master_dir_index != null && Object.hasOwnProperty.call(message, "master_dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.master_dir_index); if (message.dir != null && message.dir.length) for (var i = 0; i < message.dir.length; ++i) - $root.CMsgGCMsgMasterSetDirectory.SubGC.encode(message.dir[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgGCMsgMasterSetDirectory.SubGC.encode(message.dir[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22116,12 +28674,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory} message CMsgGCMsgMasterSetDirectory message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.$Properties} message CMsgGCMsgMasterSetDirectory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetDirectory.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22131,30 +28689,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory + * @returns {CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape} CMsgGCMsgMasterSetDirectory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory.decode = function decode(reader, length) { + CMsgGCMsgMasterSetDirectory.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.master_dir_index = reader.uint32(); - break; - case 2: - if (!(message.dir && message.dir.length)) - message.dir = []; - message.dir.push($root.CMsgGCMsgMasterSetDirectory.SubGC.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.master_dir_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.dir && message.dir.length)) + message.dir = []; + message.dir.push($root.CMsgGCMsgMasterSetDirectory.SubGC.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22164,11 +28742,11 @@ * @memberof CMsgGCMsgMasterSetDirectory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory + * @returns {CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape} CMsgGCMsgMasterSetDirectory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetDirectory.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22182,17 +28760,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetDirectory.verify = function verify(message) { + CMsgGCMsgMasterSetDirectory.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.master_dir_index != null && message.hasOwnProperty("master_dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) if (!$util.isInteger(message.master_dir_index)) return "master_dir_index: integer expected"; - if (message.dir != null && message.hasOwnProperty("dir")) { - if (!Array.isArray(message.dir)) + if (message.dir != null && $Object.hasOwnProperty.call(message, "dir")) { + if (!$Array.isArray(message.dir)) return "dir: array expected"; for (var i = 0; i < message.dir.length; ++i) { - var error = $root.CMsgGCMsgMasterSetDirectory.SubGC.verify(message.dir[i]); + var error = $root.CMsgGCMsgMasterSetDirectory.SubGC.verify(message.dir[i], _depth + 1); if (error) return "dir." + error; } @@ -22208,20 +28790,26 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory */ - CMsgGCMsgMasterSetDirectory.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetDirectory.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory(); if (object.master_dir_index != null) message.master_dir_index = object.master_dir_index >>> 0; if (object.dir) { - if (!Array.isArray(object.dir)) - throw TypeError(".CMsgGCMsgMasterSetDirectory.dir: array expected"); - message.dir = []; + if (!$Array.isArray(object.dir)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.dir: array expected"); + message.dir = $Array(object.dir.length); for (var i = 0; i < object.dir.length; ++i) { - if (typeof object.dir[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetDirectory.dir: object expected"); - message.dir[i] = $root.CMsgGCMsgMasterSetDirectory.SubGC.fromObject(object.dir[i]); + if (!$util.isObject(object.dir[i])) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.dir: object expected"); + message.dir[i] = $root.CMsgGCMsgMasterSetDirectory.SubGC.fromObject(object.dir[i], _depth + 1); } } return message; @@ -22236,20 +28824,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetDirectory.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetDirectory.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.dir = []; if (options.defaults) object.master_dir_index = 0; - if (message.master_dir_index != null && message.hasOwnProperty("master_dir_index")) + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) object.master_dir_index = message.master_dir_index; if (message.dir && message.dir.length) { - object.dir = []; + object.dir = $Array(message.dir.length); for (var j = 0; j < message.dir.length; ++j) - object.dir[j] = $root.CMsgGCMsgMasterSetDirectory.SubGC.toObject(message.dir[j], options); + object.dir[j] = $root.CMsgGCMsgMasterSetDirectory.SubGC.toObject(message.dir[j], options, _depth + 1); } return object; }; @@ -22261,37 +28853,64 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetDirectory.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetDirectory.prototype.toJSON = function() { + return CMsgGCMsgMasterSetDirectory.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetDirectory + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetDirectory.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory"; }; CMsgGCMsgMasterSetDirectory.SubGC = (function() { /** * Properties of a SubGC. - * @memberof CMsgGCMsgMasterSetDirectory - * @interface ISubGC + * @typedef {Object} CMsgGCMsgMasterSetDirectory.SubGC.$Properties * @property {number|null} [dir_index] SubGC dir_index * @property {string|null} [name] SubGC name * @property {string|null} [box] SubGC box * @property {string|null} [command_line] SubGC command_line * @property {string|null} [gc_binary] SubGC gc_binary + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SubGC. + * @memberof CMsgGCMsgMasterSetDirectory + * @interface ISubGC + * @augments CMsgGCMsgMasterSetDirectory.SubGC.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory.SubGC.$Properties instead. + */ + + /** + * Shape of a SubGC. + * @typedef {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} CMsgGCMsgMasterSetDirectory.SubGC.$Shape */ /** * Constructs a new SubGC. * @memberof CMsgGCMsgMasterSetDirectory * @classdesc Represents a SubGC. - * @implements ISubGC * @constructor - * @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SubGC(properties) { + var SubGC = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SubGC dir_index. @@ -22338,10 +28957,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory.SubGC.$Shape): CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory.SubGC.$Properties): CMsgGCMsgMasterSetDirectory.SubGC; + * }} */ - SubGC.create = function create(properties) { + SubGC.create = function(properties) { return new SubGC(properties); }; @@ -22350,23 +28973,30 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC} message SubGC message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} message SubGC message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubGC.encode = function encode(message, writer) { + SubGC.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.box != null && Object.hasOwnProperty.call(message, "box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.box); - if (message.command_line != null && Object.hasOwnProperty.call(message, "command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.command_line); - if (message.gc_binary != null && Object.hasOwnProperty.call(message, "gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.gc_binary); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22375,12 +29005,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC} message SubGC message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} message SubGC message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubGC.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SubGC.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22390,37 +29020,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC + * @returns {CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape} SubGC * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubGC.decode = function decode(reader, length) { + SubGC.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory.SubGC(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory.SubGC(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.box = reader.string(); - break; - case 4: - message.command_line = reader.string(); - break; - case 5: - message.gc_binary = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.box = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.command_line = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.gc_binary = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22430,11 +29089,11 @@ * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC + * @returns {CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape} SubGC * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubGC.decodeDelimited = function decodeDelimited(reader) { + SubGC.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22448,22 +29107,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SubGC.verify = function verify(message) { + SubGC.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.box != null && message.hasOwnProperty("box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) if (!$util.isString(message.box)) return "box: string expected"; - if (message.command_line != null && message.hasOwnProperty("command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) if (!$util.isString(message.command_line)) return "command_line: string expected"; - if (message.gc_binary != null && message.hasOwnProperty("gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) if (!$util.isString(message.gc_binary)) return "gc_binary: string expected"; return null; @@ -22477,20 +29140,26 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC */ - SubGC.fromObject = function fromObject(object) { + SubGC.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory.SubGC) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.SubGC: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory.SubGC(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.box != null) - message.box = String(object.box); + message.box = $String(object.box); if (object.command_line != null) - message.command_line = String(object.command_line); + message.command_line = $String(object.command_line); if (object.gc_binary != null) - message.gc_binary = String(object.gc_binary); + message.gc_binary = $String(object.gc_binary); return message; }; @@ -22503,9 +29172,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SubGC.toObject = function toObject(message, options) { + SubGC.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.dir_index = 0; @@ -22514,15 +29187,15 @@ object.command_line = ""; object.gc_binary = ""; } - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.box != null && message.hasOwnProperty("box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) object.box = message.box; - if (message.command_line != null && message.hasOwnProperty("command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) object.command_line = message.command_line; - if (message.gc_binary != null && message.hasOwnProperty("gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) object.gc_binary = message.gc_binary; return object; }; @@ -22534,8 +29207,22 @@ * @instance * @returns {Object.} JSON object */ - SubGC.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SubGC.prototype.toJSON = function() { + return SubGC.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SubGC + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory.SubGC + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SubGC.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory.SubGC"; }; return SubGC; @@ -22546,27 +29233,40 @@ $root.CMsgGCMsgMasterSetDirectory_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetDirectory_Response. + * @typedef {Object} CMsgGCMsgMasterSetDirectory_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetDirectory_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetDirectory_Response. * @exports ICMsgGCMsgMasterSetDirectory_Response * @interface ICMsgGCMsgMasterSetDirectory_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetDirectory_Response eresult + * @augments CMsgGCMsgMasterSetDirectory_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetDirectory_Response. + * @typedef {CMsgGCMsgMasterSetDirectory_Response.$Properties} CMsgGCMsgMasterSetDirectory_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetDirectory_Response. * @exports CMsgGCMsgMasterSetDirectory_Response * @classdesc Represents a CMsgGCMsgMasterSetDirectory_Response. - * @implements ICMsgGCMsgMasterSetDirectory_Response * @constructor - * @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetDirectory_Response(properties) { + var CMsgGCMsgMasterSetDirectory_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetDirectory_Response eresult. @@ -22581,10 +29281,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory_Response.$Shape): CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory_Response.$Properties): CMsgGCMsgMasterSetDirectory_Response; + * }} */ - CMsgGCMsgMasterSetDirectory_Response.create = function create(properties) { + CMsgGCMsgMasterSetDirectory_Response.create = function(properties) { return new CMsgGCMsgMasterSetDirectory_Response(properties); }; @@ -22593,15 +29297,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetDirectory_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22610,12 +29321,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetDirectory_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22625,25 +29336,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response + * @returns {CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape} CMsgGCMsgMasterSetDirectory_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetDirectory_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22653,11 +29381,11 @@ * @memberof CMsgGCMsgMasterSetDirectory_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response + * @returns {CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape} CMsgGCMsgMasterSetDirectory_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetDirectory_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22671,10 +29399,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetDirectory_Response.verify = function verify(message) { + CMsgGCMsgMasterSetDirectory_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -22688,9 +29420,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response */ - CMsgGCMsgMasterSetDirectory_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetDirectory_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -22706,13 +29444,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetDirectory_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetDirectory_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -22724,8 +29466,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetDirectory_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetDirectory_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetDirectory_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetDirectory_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetDirectory_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory_Response"; }; return CMsgGCMsgMasterSetDirectory_Response; @@ -22733,27 +29489,40 @@ $root.CMsgGCMsgWebAPIJobRequestForwardResponse = (function() { + /** + * Properties of a CMsgGCMsgWebAPIJobRequestForwardResponse. + * @typedef {Object} CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties + * @property {number|null} [dir_index] CMsgGCMsgWebAPIJobRequestForwardResponse dir_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgWebAPIJobRequestForwardResponse. * @exports ICMsgGCMsgWebAPIJobRequestForwardResponse * @interface ICMsgGCMsgWebAPIJobRequestForwardResponse - * @property {number|null} [dir_index] CMsgGCMsgWebAPIJobRequestForwardResponse dir_index + * @augments CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties + * @deprecated Use CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgWebAPIJobRequestForwardResponse. + * @typedef {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape */ /** * Constructs a new CMsgGCMsgWebAPIJobRequestForwardResponse. * @exports CMsgGCMsgWebAPIJobRequestForwardResponse * @classdesc Represents a CMsgGCMsgWebAPIJobRequestForwardResponse. - * @implements ICMsgGCMsgWebAPIJobRequestForwardResponse * @constructor - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgWebAPIJobRequestForwardResponse(properties) { + var CMsgGCMsgWebAPIJobRequestForwardResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgWebAPIJobRequestForwardResponse dir_index. @@ -22768,10 +29537,14 @@ * @function create * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse instance + * @type {{ + * (properties: CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape): CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape; + * (properties?: CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties): CMsgGCMsgWebAPIJobRequestForwardResponse; + * }} */ - CMsgGCMsgWebAPIJobRequestForwardResponse.create = function create(properties) { + CMsgGCMsgWebAPIJobRequestForwardResponse.create = function(properties) { return new CMsgGCMsgWebAPIJobRequestForwardResponse(properties); }; @@ -22780,15 +29553,22 @@ * @function encode * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgWebAPIJobRequestForwardResponse.encode = function encode(message, writer) { + CMsgGCMsgWebAPIJobRequestForwardResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22797,12 +29577,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgWebAPIJobRequestForwardResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgWebAPIJobRequestForwardResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22812,25 +29592,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse + * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape} CMsgGCMsgWebAPIJobRequestForwardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgWebAPIJobRequestForwardResponse.decode = function decode(reader, length) { + CMsgGCMsgWebAPIJobRequestForwardResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22840,11 +29637,11 @@ * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse + * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape} CMsgGCMsgWebAPIJobRequestForwardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgWebAPIJobRequestForwardResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgWebAPIJobRequestForwardResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22858,10 +29655,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgWebAPIJobRequestForwardResponse.verify = function verify(message) { + CMsgGCMsgWebAPIJobRequestForwardResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; return null; @@ -22875,9 +29676,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse */ - CMsgGCMsgWebAPIJobRequestForwardResponse.fromObject = function fromObject(object) { + CMsgGCMsgWebAPIJobRequestForwardResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgWebAPIJobRequestForwardResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgWebAPIJobRequestForwardResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; @@ -22893,13 +29700,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgWebAPIJobRequestForwardResponse.toObject = function toObject(message, options) { + CMsgGCMsgWebAPIJobRequestForwardResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.dir_index = 0; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; return object; }; @@ -22911,8 +29722,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.toJSON = function() { + return CMsgGCMsgWebAPIJobRequestForwardResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgWebAPIJobRequestForwardResponse + * @function getTypeUrl + * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgWebAPIJobRequestForwardResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgWebAPIJobRequestForwardResponse"; }; return CMsgGCMsgWebAPIJobRequestForwardResponse; @@ -22920,27 +29745,40 @@ $root.CGCSystemMsg_GetPurchaseTrust_Request = (function() { + /** + * Properties of a CGCSystemMsg_GetPurchaseTrust_Request. + * @typedef {Object} CGCSystemMsg_GetPurchaseTrust_Request.$Properties + * @property {number|Long|null} [steamid] CGCSystemMsg_GetPurchaseTrust_Request steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCSystemMsg_GetPurchaseTrust_Request. * @exports ICGCSystemMsg_GetPurchaseTrust_Request * @interface ICGCSystemMsg_GetPurchaseTrust_Request - * @property {number|Long|null} [steamid] CGCSystemMsg_GetPurchaseTrust_Request steamid + * @augments CGCSystemMsg_GetPurchaseTrust_Request.$Properties + * @deprecated Use CGCSystemMsg_GetPurchaseTrust_Request.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetPurchaseTrust_Request. + * @typedef {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} CGCSystemMsg_GetPurchaseTrust_Request.$Shape */ /** * Constructs a new CGCSystemMsg_GetPurchaseTrust_Request. * @exports CGCSystemMsg_GetPurchaseTrust_Request * @classdesc Represents a CGCSystemMsg_GetPurchaseTrust_Request. - * @implements ICGCSystemMsg_GetPurchaseTrust_Request * @constructor - * @param {ICGCSystemMsg_GetPurchaseTrust_Request=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetPurchaseTrust_Request(properties) { + var CGCSystemMsg_GetPurchaseTrust_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetPurchaseTrust_Request steamid. @@ -22948,17 +29786,21 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @instance */ - CGCSystemMsg_GetPurchaseTrust_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCSystemMsg_GetPurchaseTrust_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CGCSystemMsg_GetPurchaseTrust_Request instance using the specified properties. * @function create * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request instance + * @type {{ + * (properties: CGCSystemMsg_GetPurchaseTrust_Request.$Shape): CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape; + * (properties?: CGCSystemMsg_GetPurchaseTrust_Request.$Properties): CGCSystemMsg_GetPurchaseTrust_Request; + * }} */ - CGCSystemMsg_GetPurchaseTrust_Request.create = function create(properties) { + CGCSystemMsg_GetPurchaseTrust_Request.create = function(properties) { return new CGCSystemMsg_GetPurchaseTrust_Request(properties); }; @@ -22967,15 +29809,22 @@ * @function encode * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Request.encode = function encode(message, writer) { + CGCSystemMsg_GetPurchaseTrust_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22984,12 +29833,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetPurchaseTrust_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22999,25 +29848,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request + * @returns {CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape} CGCSystemMsg_GetPurchaseTrust_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Request.decode = function decode(reader, length) { + CGCSystemMsg_GetPurchaseTrust_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetPurchaseTrust_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetPurchaseTrust_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23027,11 +29893,11 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request + * @returns {CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape} CGCSystemMsg_GetPurchaseTrust_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Request.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetPurchaseTrust_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23045,10 +29911,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetPurchaseTrust_Request.verify = function verify(message) { + CGCSystemMsg_GetPurchaseTrust_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -23062,19 +29932,25 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request */ - CGCSystemMsg_GetPurchaseTrust_Request.fromObject = function fromObject(object) { + CGCSystemMsg_GetPurchaseTrust_Request.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetPurchaseTrust_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetPurchaseTrust_Request(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -23087,21 +29963,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetPurchaseTrust_Request.toObject = function toObject(message, options) { + CGCSystemMsg_GetPurchaseTrust_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -23112,8 +29994,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetPurchaseTrust_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetPurchaseTrust_Request.prototype.toJSON = function() { + return CGCSystemMsg_GetPurchaseTrust_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetPurchaseTrust_Request + * @function getTypeUrl + * @memberof CGCSystemMsg_GetPurchaseTrust_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetPurchaseTrust_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetPurchaseTrust_Request"; }; return CGCSystemMsg_GetPurchaseTrust_Request; @@ -23123,28 +30019,41 @@ /** * Properties of a CGCSystemMsg_GetPurchaseTrust_Response. - * @exports ICGCSystemMsg_GetPurchaseTrust_Response - * @interface ICGCSystemMsg_GetPurchaseTrust_Response + * @typedef {Object} CGCSystemMsg_GetPurchaseTrust_Response.$Properties * @property {boolean|null} [has_prior_purchase_history] CGCSystemMsg_GetPurchaseTrust_Response has_prior_purchase_history * @property {boolean|null} [has_no_recent_password_resets] CGCSystemMsg_GetPurchaseTrust_Response has_no_recent_password_resets * @property {boolean|null} [is_wallet_cash_trusted] CGCSystemMsg_GetPurchaseTrust_Response is_wallet_cash_trusted * @property {number|null} [time_all_trusted] CGCSystemMsg_GetPurchaseTrust_Response time_all_trusted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetPurchaseTrust_Response. + * @exports ICGCSystemMsg_GetPurchaseTrust_Response + * @interface ICGCSystemMsg_GetPurchaseTrust_Response + * @augments CGCSystemMsg_GetPurchaseTrust_Response.$Properties + * @deprecated Use CGCSystemMsg_GetPurchaseTrust_Response.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetPurchaseTrust_Response. + * @typedef {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} CGCSystemMsg_GetPurchaseTrust_Response.$Shape */ /** * Constructs a new CGCSystemMsg_GetPurchaseTrust_Response. * @exports CGCSystemMsg_GetPurchaseTrust_Response * @classdesc Represents a CGCSystemMsg_GetPurchaseTrust_Response. - * @implements ICGCSystemMsg_GetPurchaseTrust_Response * @constructor - * @param {ICGCSystemMsg_GetPurchaseTrust_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetPurchaseTrust_Response(properties) { + var CGCSystemMsg_GetPurchaseTrust_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetPurchaseTrust_Response has_prior_purchase_history. @@ -23183,10 +30092,14 @@ * @function create * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response instance + * @type {{ + * (properties: CGCSystemMsg_GetPurchaseTrust_Response.$Shape): CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape; + * (properties?: CGCSystemMsg_GetPurchaseTrust_Response.$Properties): CGCSystemMsg_GetPurchaseTrust_Response; + * }} */ - CGCSystemMsg_GetPurchaseTrust_Response.create = function create(properties) { + CGCSystemMsg_GetPurchaseTrust_Response.create = function(properties) { return new CGCSystemMsg_GetPurchaseTrust_Response(properties); }; @@ -23195,21 +30108,28 @@ * @function encode * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Response.encode = function encode(message, writer) { + CGCSystemMsg_GetPurchaseTrust_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.has_prior_purchase_history != null && Object.hasOwnProperty.call(message, "has_prior_purchase_history")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.has_prior_purchase_history); - if (message.has_no_recent_password_resets != null && Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.has_no_recent_password_resets); - if (message.is_wallet_cash_trusted != null && Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_wallet_cash_trusted); - if (message.time_all_trusted != null && Object.hasOwnProperty.call(message, "time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time_all_trusted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23218,12 +30138,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetPurchaseTrust_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23233,34 +30153,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response + * @returns {CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape} CGCSystemMsg_GetPurchaseTrust_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Response.decode = function decode(reader, length) { + CGCSystemMsg_GetPurchaseTrust_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetPurchaseTrust_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetPurchaseTrust_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.has_prior_purchase_history = reader.bool(); - break; - case 2: - message.has_no_recent_password_resets = reader.bool(); - break; - case 3: - message.is_wallet_cash_trusted = reader.bool(); - break; - case 4: - message.time_all_trusted = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.has_prior_purchase_history = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.has_no_recent_password_resets = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_wallet_cash_trusted = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.time_all_trusted = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23270,11 +30216,11 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response + * @returns {CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape} CGCSystemMsg_GetPurchaseTrust_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Response.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetPurchaseTrust_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23288,19 +30234,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetPurchaseTrust_Response.verify = function verify(message) { + CGCSystemMsg_GetPurchaseTrust_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.has_prior_purchase_history != null && message.hasOwnProperty("has_prior_purchase_history")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) if (typeof message.has_prior_purchase_history !== "boolean") return "has_prior_purchase_history: boolean expected"; - if (message.has_no_recent_password_resets != null && message.hasOwnProperty("has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) if (typeof message.has_no_recent_password_resets !== "boolean") return "has_no_recent_password_resets: boolean expected"; - if (message.is_wallet_cash_trusted != null && message.hasOwnProperty("is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) if (typeof message.is_wallet_cash_trusted !== "boolean") return "is_wallet_cash_trusted: boolean expected"; - if (message.time_all_trusted != null && message.hasOwnProperty("time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) if (!$util.isInteger(message.time_all_trusted)) return "time_all_trusted: integer expected"; return null; @@ -23314,16 +30264,22 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response */ - CGCSystemMsg_GetPurchaseTrust_Response.fromObject = function fromObject(object) { + CGCSystemMsg_GetPurchaseTrust_Response.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetPurchaseTrust_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetPurchaseTrust_Response(); if (object.has_prior_purchase_history != null) - message.has_prior_purchase_history = Boolean(object.has_prior_purchase_history); + message.has_prior_purchase_history = $Boolean(object.has_prior_purchase_history); if (object.has_no_recent_password_resets != null) - message.has_no_recent_password_resets = Boolean(object.has_no_recent_password_resets); + message.has_no_recent_password_resets = $Boolean(object.has_no_recent_password_resets); if (object.is_wallet_cash_trusted != null) - message.is_wallet_cash_trusted = Boolean(object.is_wallet_cash_trusted); + message.is_wallet_cash_trusted = $Boolean(object.is_wallet_cash_trusted); if (object.time_all_trusted != null) message.time_all_trusted = object.time_all_trusted >>> 0; return message; @@ -23338,9 +30294,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetPurchaseTrust_Response.toObject = function toObject(message, options) { + CGCSystemMsg_GetPurchaseTrust_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.has_prior_purchase_history = false; @@ -23348,13 +30308,13 @@ object.is_wallet_cash_trusted = false; object.time_all_trusted = 0; } - if (message.has_prior_purchase_history != null && message.hasOwnProperty("has_prior_purchase_history")) + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) object.has_prior_purchase_history = message.has_prior_purchase_history; - if (message.has_no_recent_password_resets != null && message.hasOwnProperty("has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) object.has_no_recent_password_resets = message.has_no_recent_password_resets; - if (message.is_wallet_cash_trusted != null && message.hasOwnProperty("is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) object.is_wallet_cash_trusted = message.is_wallet_cash_trusted; - if (message.time_all_trusted != null && message.hasOwnProperty("time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) object.time_all_trusted = message.time_all_trusted; return object; }; @@ -23366,8 +30326,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetPurchaseTrust_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetPurchaseTrust_Response.prototype.toJSON = function() { + return CGCSystemMsg_GetPurchaseTrust_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetPurchaseTrust_Response + * @function getTypeUrl + * @memberof CGCSystemMsg_GetPurchaseTrust_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetPurchaseTrust_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetPurchaseTrust_Response"; }; return CGCSystemMsg_GetPurchaseTrust_Response; @@ -23377,29 +30351,42 @@ /** * Properties of a CMsgGCHAccountVacStatusChange. - * @exports ICMsgGCHAccountVacStatusChange - * @interface ICMsgGCHAccountVacStatusChange + * @typedef {Object} CMsgGCHAccountVacStatusChange.$Properties * @property {number|Long|null} [steam_id] CMsgGCHAccountVacStatusChange steam_id * @property {number|null} [app_id] CMsgGCHAccountVacStatusChange app_id * @property {number|null} [rtime_vacban_starts] CMsgGCHAccountVacStatusChange rtime_vacban_starts * @property {boolean|null} [is_banned_now] CMsgGCHAccountVacStatusChange is_banned_now * @property {boolean|null} [is_banned_future] CMsgGCHAccountVacStatusChange is_banned_future + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountVacStatusChange. + * @exports ICMsgGCHAccountVacStatusChange + * @interface ICMsgGCHAccountVacStatusChange + * @augments CMsgGCHAccountVacStatusChange.$Properties + * @deprecated Use CMsgGCHAccountVacStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountVacStatusChange. + * @typedef {CMsgGCHAccountVacStatusChange.$Properties} CMsgGCHAccountVacStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountVacStatusChange. * @exports CMsgGCHAccountVacStatusChange * @classdesc Represents a CMsgGCHAccountVacStatusChange. - * @implements ICMsgGCHAccountVacStatusChange * @constructor - * @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountVacStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountVacStatusChange(properties) { + var CMsgGCHAccountVacStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountVacStatusChange steam_id. @@ -23407,7 +30394,7 @@ * @memberof CMsgGCHAccountVacStatusChange * @instance */ - CMsgGCHAccountVacStatusChange.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountVacStatusChange.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountVacStatusChange app_id. @@ -23446,10 +30433,14 @@ * @function create * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountVacStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountVacStatusChange.$Shape): CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape; + * (properties?: CMsgGCHAccountVacStatusChange.$Properties): CMsgGCHAccountVacStatusChange; + * }} */ - CMsgGCHAccountVacStatusChange.create = function create(properties) { + CMsgGCHAccountVacStatusChange.create = function(properties) { return new CMsgGCHAccountVacStatusChange(properties); }; @@ -23458,23 +30449,30 @@ * @function encode * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange} message CMsgGCHAccountVacStatusChange message or plain object to encode + * @param {CMsgGCHAccountVacStatusChange.$Properties} message CMsgGCHAccountVacStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountVacStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountVacStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id); - if (message.rtime_vacban_starts != null && Object.hasOwnProperty.call(message, "rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rtime_vacban_starts); - if (message.is_banned_now != null && Object.hasOwnProperty.call(message, "is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_banned_now); - if (message.is_banned_future != null && Object.hasOwnProperty.call(message, "is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_banned_future); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23483,12 +30481,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange} message CMsgGCHAccountVacStatusChange message or plain object to encode + * @param {CMsgGCHAccountVacStatusChange.$Properties} message CMsgGCHAccountVacStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountVacStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountVacStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23498,37 +30496,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange + * @returns {CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape} CMsgGCHAccountVacStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountVacStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountVacStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountVacStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountVacStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.app_id = reader.uint32(); - break; - case 3: - message.rtime_vacban_starts = reader.uint32(); - break; - case 4: - message.is_banned_now = reader.bool(); - break; - case 5: - message.is_banned_future = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.rtime_vacban_starts = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_banned_now = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_banned_future = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23538,11 +30565,11 @@ * @memberof CMsgGCHAccountVacStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange + * @returns {CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape} CMsgGCHAccountVacStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountVacStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountVacStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23556,22 +30583,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountVacStatusChange.verify = function verify(message) { + CMsgGCHAccountVacStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.rtime_vacban_starts != null && message.hasOwnProperty("rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) if (!$util.isInteger(message.rtime_vacban_starts)) return "rtime_vacban_starts: integer expected"; - if (message.is_banned_now != null && message.hasOwnProperty("is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) if (typeof message.is_banned_now !== "boolean") return "is_banned_now: boolean expected"; - if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) if (typeof message.is_banned_future !== "boolean") return "is_banned_future: boolean expected"; return null; @@ -23585,27 +30616,33 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange */ - CMsgGCHAccountVacStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountVacStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountVacStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountVacStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountVacStatusChange(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.rtime_vacban_starts != null) message.rtime_vacban_starts = object.rtime_vacban_starts >>> 0; if (object.is_banned_now != null) - message.is_banned_now = Boolean(object.is_banned_now); + message.is_banned_now = $Boolean(object.is_banned_now); if (object.is_banned_future != null) - message.is_banned_future = Boolean(object.is_banned_future); + message.is_banned_future = $Boolean(object.is_banned_future); return message; }; @@ -23618,33 +30655,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountVacStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountVacStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.app_id = 0; object.rtime_vacban_starts = 0; object.is_banned_now = false; object.is_banned_future = false; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.rtime_vacban_starts != null && message.hasOwnProperty("rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) object.rtime_vacban_starts = message.rtime_vacban_starts; - if (message.is_banned_now != null && message.hasOwnProperty("is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) object.is_banned_now = message.is_banned_now; - if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) object.is_banned_future = message.is_banned_future; return object; }; @@ -23656,8 +30699,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountVacStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountVacStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountVacStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountVacStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountVacStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountVacStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountVacStatusChange"; }; return CMsgGCHAccountVacStatusChange; @@ -23667,28 +30724,41 @@ /** * Properties of a CMsgGCHAccountTradeBanStatusChange. - * @exports ICMsgGCHAccountTradeBanStatusChange - * @interface ICMsgGCHAccountTradeBanStatusChange + * @typedef {Object} CMsgGCHAccountTradeBanStatusChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountTradeBanStatusChange steamid * @property {number|null} [appid] CMsgGCHAccountTradeBanStatusChange appid * @property {boolean|null} [is_banned] CMsgGCHAccountTradeBanStatusChange is_banned * @property {number|null} [time_banned_until] CMsgGCHAccountTradeBanStatusChange time_banned_until + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountTradeBanStatusChange. + * @exports ICMsgGCHAccountTradeBanStatusChange + * @interface ICMsgGCHAccountTradeBanStatusChange + * @augments CMsgGCHAccountTradeBanStatusChange.$Properties + * @deprecated Use CMsgGCHAccountTradeBanStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountTradeBanStatusChange. + * @typedef {CMsgGCHAccountTradeBanStatusChange.$Properties} CMsgGCHAccountTradeBanStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountTradeBanStatusChange. * @exports CMsgGCHAccountTradeBanStatusChange * @classdesc Represents a CMsgGCHAccountTradeBanStatusChange. - * @implements ICMsgGCHAccountTradeBanStatusChange * @constructor - * @param {ICMsgGCHAccountTradeBanStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountTradeBanStatusChange(properties) { + var CMsgGCHAccountTradeBanStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountTradeBanStatusChange steamid. @@ -23696,7 +30766,7 @@ * @memberof CMsgGCHAccountTradeBanStatusChange * @instance */ - CMsgGCHAccountTradeBanStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountTradeBanStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountTradeBanStatusChange appid. @@ -23727,10 +30797,14 @@ * @function create * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountTradeBanStatusChange.$Shape): CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape; + * (properties?: CMsgGCHAccountTradeBanStatusChange.$Properties): CMsgGCHAccountTradeBanStatusChange; + * }} */ - CMsgGCHAccountTradeBanStatusChange.create = function create(properties) { + CMsgGCHAccountTradeBanStatusChange.create = function(properties) { return new CMsgGCHAccountTradeBanStatusChange(properties); }; @@ -23739,21 +30813,28 @@ * @function encode * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTradeBanStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountTradeBanStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_banned != null && Object.hasOwnProperty.call(message, "is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_banned); - if (message.time_banned_until != null && Object.hasOwnProperty.call(message, "time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time_banned_until); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23762,12 +30843,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTradeBanStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountTradeBanStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23777,34 +30858,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange + * @returns {CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape} CMsgGCHAccountTradeBanStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTradeBanStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountTradeBanStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountTradeBanStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountTradeBanStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_banned = reader.bool(); - break; - case 4: - message.time_banned_until = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_banned = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.time_banned_until = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23814,11 +30921,11 @@ * @memberof CMsgGCHAccountTradeBanStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange + * @returns {CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape} CMsgGCHAccountTradeBanStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTradeBanStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountTradeBanStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23832,19 +30939,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountTradeBanStatusChange.verify = function verify(message) { + CMsgGCHAccountTradeBanStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_banned != null && message.hasOwnProperty("is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) if (typeof message.is_banned !== "boolean") return "is_banned: boolean expected"; - if (message.time_banned_until != null && message.hasOwnProperty("time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) if (!$util.isInteger(message.time_banned_until)) return "time_banned_until: integer expected"; return null; @@ -23858,23 +30969,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange */ - CMsgGCHAccountTradeBanStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountTradeBanStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountTradeBanStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountTradeBanStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountTradeBanStatusChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_banned != null) - message.is_banned = Boolean(object.is_banned); + message.is_banned = $Boolean(object.is_banned); if (object.time_banned_until != null) message.time_banned_until = object.time_banned_until >>> 0; return message; @@ -23889,30 +31006,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountTradeBanStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountTradeBanStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_banned = false; object.time_banned_until = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_banned != null && message.hasOwnProperty("is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) object.is_banned = message.is_banned; - if (message.time_banned_until != null && message.hasOwnProperty("time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) object.time_banned_until = message.time_banned_until; return object; }; @@ -23924,8 +31047,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountTradeBanStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountTradeBanStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountTradeBanStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountTradeBanStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountTradeBanStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountTradeBanStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountTradeBanStatusChange"; }; return CMsgGCHAccountTradeBanStatusChange; @@ -23935,27 +31072,40 @@ /** * Properties of a CMsgGCHAccountLockStatusChange. - * @exports ICMsgGCHAccountLockStatusChange - * @interface ICMsgGCHAccountLockStatusChange + * @typedef {Object} CMsgGCHAccountLockStatusChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountLockStatusChange steamid * @property {number|null} [appid] CMsgGCHAccountLockStatusChange appid * @property {boolean|null} [is_locked] CMsgGCHAccountLockStatusChange is_locked + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountLockStatusChange. + * @exports ICMsgGCHAccountLockStatusChange + * @interface ICMsgGCHAccountLockStatusChange + * @augments CMsgGCHAccountLockStatusChange.$Properties + * @deprecated Use CMsgGCHAccountLockStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountLockStatusChange. + * @typedef {CMsgGCHAccountLockStatusChange.$Properties} CMsgGCHAccountLockStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountLockStatusChange. * @exports CMsgGCHAccountLockStatusChange * @classdesc Represents a CMsgGCHAccountLockStatusChange. - * @implements ICMsgGCHAccountLockStatusChange * @constructor - * @param {ICMsgGCHAccountLockStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountLockStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountLockStatusChange(properties) { + var CMsgGCHAccountLockStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountLockStatusChange steamid. @@ -23963,7 +31113,7 @@ * @memberof CMsgGCHAccountLockStatusChange * @instance */ - CMsgGCHAccountLockStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountLockStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountLockStatusChange appid. @@ -23986,10 +31136,14 @@ * @function create * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountLockStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountLockStatusChange.$Shape): CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape; + * (properties?: CMsgGCHAccountLockStatusChange.$Properties): CMsgGCHAccountLockStatusChange; + * }} */ - CMsgGCHAccountLockStatusChange.create = function create(properties) { + CMsgGCHAccountLockStatusChange.create = function(properties) { return new CMsgGCHAccountLockStatusChange(properties); }; @@ -23998,19 +31152,26 @@ * @function encode * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange} message CMsgGCHAccountLockStatusChange message or plain object to encode + * @param {CMsgGCHAccountLockStatusChange.$Properties} message CMsgGCHAccountLockStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountLockStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountLockStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_locked != null && Object.hasOwnProperty.call(message, "is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_locked); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24019,12 +31180,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange} message CMsgGCHAccountLockStatusChange message or plain object to encode + * @param {CMsgGCHAccountLockStatusChange.$Properties} message CMsgGCHAccountLockStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountLockStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountLockStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24034,31 +31195,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange + * @returns {CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape} CMsgGCHAccountLockStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountLockStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountLockStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountLockStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountLockStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_locked = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_locked = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24068,11 +31252,11 @@ * @memberof CMsgGCHAccountLockStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange + * @returns {CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape} CMsgGCHAccountLockStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountLockStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountLockStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24086,16 +31270,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountLockStatusChange.verify = function verify(message) { + CMsgGCHAccountLockStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_locked != null && message.hasOwnProperty("is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) if (typeof message.is_locked !== "boolean") return "is_locked: boolean expected"; return null; @@ -24109,23 +31297,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange */ - CMsgGCHAccountLockStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountLockStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountLockStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountLockStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountLockStatusChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_locked != null) - message.is_locked = Boolean(object.is_locked); + message.is_locked = $Boolean(object.is_locked); return message; }; @@ -24138,27 +31332,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountLockStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountLockStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_locked = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_locked != null && message.hasOwnProperty("is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) object.is_locked = message.is_locked; return object; }; @@ -24170,8 +31370,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountLockStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountLockStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountLockStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountLockStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountLockStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountLockStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountLockStatusChange"; }; return CMsgGCHAccountLockStatusChange; @@ -24181,27 +31395,40 @@ /** * Properties of a CMsgGCHVacVerificationChange. - * @exports ICMsgGCHVacVerificationChange - * @interface ICMsgGCHVacVerificationChange + * @typedef {Object} CMsgGCHVacVerificationChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHVacVerificationChange steamid * @property {number|null} [appid] CMsgGCHVacVerificationChange appid * @property {boolean|null} [is_verified] CMsgGCHVacVerificationChange is_verified + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHVacVerificationChange. + * @exports ICMsgGCHVacVerificationChange + * @interface ICMsgGCHVacVerificationChange + * @augments CMsgGCHVacVerificationChange.$Properties + * @deprecated Use CMsgGCHVacVerificationChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHVacVerificationChange. + * @typedef {CMsgGCHVacVerificationChange.$Properties} CMsgGCHVacVerificationChange.$Shape */ /** * Constructs a new CMsgGCHVacVerificationChange. * @exports CMsgGCHVacVerificationChange * @classdesc Represents a CMsgGCHVacVerificationChange. - * @implements ICMsgGCHVacVerificationChange * @constructor - * @param {ICMsgGCHVacVerificationChange=} [properties] Properties to set + * @param {CMsgGCHVacVerificationChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHVacVerificationChange(properties) { + var CMsgGCHVacVerificationChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHVacVerificationChange steamid. @@ -24209,7 +31436,7 @@ * @memberof CMsgGCHVacVerificationChange * @instance */ - CMsgGCHVacVerificationChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHVacVerificationChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHVacVerificationChange appid. @@ -24232,10 +31459,14 @@ * @function create * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange=} [properties] Properties to set + * @param {CMsgGCHVacVerificationChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange instance + * @type {{ + * (properties: CMsgGCHVacVerificationChange.$Shape): CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape; + * (properties?: CMsgGCHVacVerificationChange.$Properties): CMsgGCHVacVerificationChange; + * }} */ - CMsgGCHVacVerificationChange.create = function create(properties) { + CMsgGCHVacVerificationChange.create = function(properties) { return new CMsgGCHVacVerificationChange(properties); }; @@ -24244,19 +31475,26 @@ * @function encode * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange} message CMsgGCHVacVerificationChange message or plain object to encode + * @param {CMsgGCHVacVerificationChange.$Properties} message CMsgGCHVacVerificationChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHVacVerificationChange.encode = function encode(message, writer) { + CMsgGCHVacVerificationChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_verified != null && Object.hasOwnProperty.call(message, "is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_verified); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24265,12 +31503,12 @@ * @function encodeDelimited * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange} message CMsgGCHVacVerificationChange message or plain object to encode + * @param {CMsgGCHVacVerificationChange.$Properties} message CMsgGCHVacVerificationChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHVacVerificationChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHVacVerificationChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24280,31 +31518,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange + * @returns {CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape} CMsgGCHVacVerificationChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHVacVerificationChange.decode = function decode(reader, length) { + CMsgGCHVacVerificationChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHVacVerificationChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHVacVerificationChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_verified = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_verified = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24314,11 +31575,11 @@ * @memberof CMsgGCHVacVerificationChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange + * @returns {CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape} CMsgGCHVacVerificationChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHVacVerificationChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHVacVerificationChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24332,16 +31593,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHVacVerificationChange.verify = function verify(message) { + CMsgGCHVacVerificationChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) if (typeof message.is_verified !== "boolean") return "is_verified: boolean expected"; return null; @@ -24355,23 +31620,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange */ - CMsgGCHVacVerificationChange.fromObject = function fromObject(object) { + CMsgGCHVacVerificationChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHVacVerificationChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHVacVerificationChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHVacVerificationChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_verified != null) - message.is_verified = Boolean(object.is_verified); + message.is_verified = $Boolean(object.is_verified); return message; }; @@ -24384,27 +31655,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHVacVerificationChange.toObject = function toObject(message, options) { + CMsgGCHVacVerificationChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_verified = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) object.is_verified = message.is_verified; return object; }; @@ -24416,8 +31693,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHVacVerificationChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHVacVerificationChange.prototype.toJSON = function() { + return CMsgGCHVacVerificationChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHVacVerificationChange + * @function getTypeUrl + * @memberof CMsgGCHVacVerificationChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHVacVerificationChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHVacVerificationChange"; }; return CMsgGCHVacVerificationChange; @@ -24427,29 +31718,42 @@ /** * Properties of a CMsgGCHAccountPhoneNumberChange. - * @exports ICMsgGCHAccountPhoneNumberChange - * @interface ICMsgGCHAccountPhoneNumberChange + * @typedef {Object} CMsgGCHAccountPhoneNumberChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountPhoneNumberChange steamid * @property {number|null} [appid] CMsgGCHAccountPhoneNumberChange appid * @property {number|Long|null} [phone_id] CMsgGCHAccountPhoneNumberChange phone_id * @property {boolean|null} [is_verified] CMsgGCHAccountPhoneNumberChange is_verified * @property {boolean|null} [is_identifying] CMsgGCHAccountPhoneNumberChange is_identifying + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountPhoneNumberChange. + * @exports ICMsgGCHAccountPhoneNumberChange + * @interface ICMsgGCHAccountPhoneNumberChange + * @augments CMsgGCHAccountPhoneNumberChange.$Properties + * @deprecated Use CMsgGCHAccountPhoneNumberChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountPhoneNumberChange. + * @typedef {CMsgGCHAccountPhoneNumberChange.$Properties} CMsgGCHAccountPhoneNumberChange.$Shape */ /** * Constructs a new CMsgGCHAccountPhoneNumberChange. * @exports CMsgGCHAccountPhoneNumberChange * @classdesc Represents a CMsgGCHAccountPhoneNumberChange. - * @implements ICMsgGCHAccountPhoneNumberChange * @constructor - * @param {ICMsgGCHAccountPhoneNumberChange=} [properties] Properties to set + * @param {CMsgGCHAccountPhoneNumberChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountPhoneNumberChange(properties) { + var CMsgGCHAccountPhoneNumberChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountPhoneNumberChange steamid. @@ -24457,7 +31761,7 @@ * @memberof CMsgGCHAccountPhoneNumberChange * @instance */ - CMsgGCHAccountPhoneNumberChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountPhoneNumberChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountPhoneNumberChange appid. @@ -24496,10 +31800,14 @@ * @function create * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange=} [properties] Properties to set + * @param {CMsgGCHAccountPhoneNumberChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange instance + * @type {{ + * (properties: CMsgGCHAccountPhoneNumberChange.$Shape): CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape; + * (properties?: CMsgGCHAccountPhoneNumberChange.$Properties): CMsgGCHAccountPhoneNumberChange; + * }} */ - CMsgGCHAccountPhoneNumberChange.create = function create(properties) { + CMsgGCHAccountPhoneNumberChange.create = function(properties) { return new CMsgGCHAccountPhoneNumberChange(properties); }; @@ -24508,23 +31816,30 @@ * @function encode * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange} message CMsgGCHAccountPhoneNumberChange message or plain object to encode + * @param {CMsgGCHAccountPhoneNumberChange.$Properties} message CMsgGCHAccountPhoneNumberChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountPhoneNumberChange.encode = function encode(message, writer) { + CMsgGCHAccountPhoneNumberChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.phone_id != null && Object.hasOwnProperty.call(message, "phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.phone_id); - if (message.is_verified != null && Object.hasOwnProperty.call(message, "is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_verified); - if (message.is_identifying != null && Object.hasOwnProperty.call(message, "is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_identifying); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24533,12 +31848,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange} message CMsgGCHAccountPhoneNumberChange message or plain object to encode + * @param {CMsgGCHAccountPhoneNumberChange.$Properties} message CMsgGCHAccountPhoneNumberChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountPhoneNumberChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountPhoneNumberChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24548,37 +31863,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange + * @returns {CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape} CMsgGCHAccountPhoneNumberChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountPhoneNumberChange.decode = function decode(reader, length) { + CMsgGCHAccountPhoneNumberChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountPhoneNumberChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountPhoneNumberChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.phone_id = reader.uint64(); - break; - case 4: - message.is_verified = reader.bool(); - break; - case 5: - message.is_identifying = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.phone_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_verified = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_identifying = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24588,11 +31932,11 @@ * @memberof CMsgGCHAccountPhoneNumberChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange + * @returns {CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape} CMsgGCHAccountPhoneNumberChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountPhoneNumberChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountPhoneNumberChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24606,22 +31950,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountPhoneNumberChange.verify = function verify(message) { + CMsgGCHAccountPhoneNumberChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) if (!$util.isInteger(message.phone_id) && !(message.phone_id && $util.isInteger(message.phone_id.low) && $util.isInteger(message.phone_id.high))) return "phone_id: integer|Long expected"; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) if (typeof message.is_verified !== "boolean") return "is_verified: boolean expected"; - if (message.is_identifying != null && message.hasOwnProperty("is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) if (typeof message.is_identifying !== "boolean") return "is_identifying: boolean expected"; return null; @@ -24635,34 +31983,40 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange */ - CMsgGCHAccountPhoneNumberChange.fromObject = function fromObject(object) { + CMsgGCHAccountPhoneNumberChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountPhoneNumberChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountPhoneNumberChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountPhoneNumberChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.phone_id != null) if ($util.Long) - (message.phone_id = $util.Long.fromValue(object.phone_id)).unsigned = true; + message.phone_id = $util.Long.fromValue(object.phone_id, true); else if (typeof object.phone_id === "string") - message.phone_id = parseInt(object.phone_id, 10); + message.phone_id = $parseInt(object.phone_id, 10); else if (typeof object.phone_id === "number") message.phone_id = object.phone_id; else if (typeof object.phone_id === "object") message.phone_id = new $util.LongBits(object.phone_id.low >>> 0, object.phone_id.high >>> 0).toNumber(true); if (object.is_verified != null) - message.is_verified = Boolean(object.is_verified); + message.is_verified = $Boolean(object.is_verified); if (object.is_identifying != null) - message.is_identifying = Boolean(object.is_identifying); + message.is_identifying = $Boolean(object.is_identifying); return message; }; @@ -24675,40 +32029,48 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountPhoneNumberChange.toObject = function toObject(message, options) { + CMsgGCHAccountPhoneNumberChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.phone_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.phone_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.phone_id = options.longs === String ? "0" : 0; + object.phone_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.is_verified = false; object.is_identifying = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) - if (typeof message.phone_id === "number") - object.phone_id = options.longs === String ? String(message.phone_id) : message.phone_id; + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.phone_id = typeof message.phone_id === "number" ? $BigInt(message.phone_id) : $util.Long.fromBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0, true).toBigInt(); + else if (typeof message.phone_id === "number") + object.phone_id = options.longs === $String ? $String(message.phone_id) : message.phone_id; else - object.phone_id = options.longs === String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + object.phone_id = options.longs === $String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === $Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) object.is_verified = message.is_verified; - if (message.is_identifying != null && message.hasOwnProperty("is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) object.is_identifying = message.is_identifying; return object; }; @@ -24720,8 +32082,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountPhoneNumberChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountPhoneNumberChange.prototype.toJSON = function() { + return CMsgGCHAccountPhoneNumberChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountPhoneNumberChange + * @function getTypeUrl + * @memberof CMsgGCHAccountPhoneNumberChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountPhoneNumberChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountPhoneNumberChange"; }; return CMsgGCHAccountPhoneNumberChange; @@ -24731,27 +32107,40 @@ /** * Properties of a CMsgGCHAccountTwoFactorChange. - * @exports ICMsgGCHAccountTwoFactorChange - * @interface ICMsgGCHAccountTwoFactorChange + * @typedef {Object} CMsgGCHAccountTwoFactorChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountTwoFactorChange steamid * @property {number|null} [appid] CMsgGCHAccountTwoFactorChange appid * @property {boolean|null} [twofactor_enabled] CMsgGCHAccountTwoFactorChange twofactor_enabled + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountTwoFactorChange. + * @exports ICMsgGCHAccountTwoFactorChange + * @interface ICMsgGCHAccountTwoFactorChange + * @augments CMsgGCHAccountTwoFactorChange.$Properties + * @deprecated Use CMsgGCHAccountTwoFactorChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountTwoFactorChange. + * @typedef {CMsgGCHAccountTwoFactorChange.$Properties} CMsgGCHAccountTwoFactorChange.$Shape */ /** * Constructs a new CMsgGCHAccountTwoFactorChange. * @exports CMsgGCHAccountTwoFactorChange * @classdesc Represents a CMsgGCHAccountTwoFactorChange. - * @implements ICMsgGCHAccountTwoFactorChange * @constructor - * @param {ICMsgGCHAccountTwoFactorChange=} [properties] Properties to set + * @param {CMsgGCHAccountTwoFactorChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountTwoFactorChange(properties) { + var CMsgGCHAccountTwoFactorChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountTwoFactorChange steamid. @@ -24759,7 +32148,7 @@ * @memberof CMsgGCHAccountTwoFactorChange * @instance */ - CMsgGCHAccountTwoFactorChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountTwoFactorChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountTwoFactorChange appid. @@ -24782,10 +32171,14 @@ * @function create * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange=} [properties] Properties to set + * @param {CMsgGCHAccountTwoFactorChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange instance + * @type {{ + * (properties: CMsgGCHAccountTwoFactorChange.$Shape): CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape; + * (properties?: CMsgGCHAccountTwoFactorChange.$Properties): CMsgGCHAccountTwoFactorChange; + * }} */ - CMsgGCHAccountTwoFactorChange.create = function create(properties) { + CMsgGCHAccountTwoFactorChange.create = function(properties) { return new CMsgGCHAccountTwoFactorChange(properties); }; @@ -24794,19 +32187,26 @@ * @function encode * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange} message CMsgGCHAccountTwoFactorChange message or plain object to encode + * @param {CMsgGCHAccountTwoFactorChange.$Properties} message CMsgGCHAccountTwoFactorChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTwoFactorChange.encode = function encode(message, writer) { + CMsgGCHAccountTwoFactorChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.twofactor_enabled != null && Object.hasOwnProperty.call(message, "twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.twofactor_enabled); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24815,12 +32215,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange} message CMsgGCHAccountTwoFactorChange message or plain object to encode + * @param {CMsgGCHAccountTwoFactorChange.$Properties} message CMsgGCHAccountTwoFactorChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTwoFactorChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountTwoFactorChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24830,31 +32230,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange + * @returns {CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape} CMsgGCHAccountTwoFactorChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTwoFactorChange.decode = function decode(reader, length) { + CMsgGCHAccountTwoFactorChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountTwoFactorChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountTwoFactorChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.twofactor_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.twofactor_enabled = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24864,11 +32287,11 @@ * @memberof CMsgGCHAccountTwoFactorChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange + * @returns {CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape} CMsgGCHAccountTwoFactorChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTwoFactorChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountTwoFactorChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24882,16 +32305,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountTwoFactorChange.verify = function verify(message) { + CMsgGCHAccountTwoFactorChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.twofactor_enabled != null && message.hasOwnProperty("twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) if (typeof message.twofactor_enabled !== "boolean") return "twofactor_enabled: boolean expected"; return null; @@ -24905,23 +32332,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange */ - CMsgGCHAccountTwoFactorChange.fromObject = function fromObject(object) { + CMsgGCHAccountTwoFactorChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountTwoFactorChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountTwoFactorChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountTwoFactorChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.twofactor_enabled != null) - message.twofactor_enabled = Boolean(object.twofactor_enabled); + message.twofactor_enabled = $Boolean(object.twofactor_enabled); return message; }; @@ -24934,27 +32367,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountTwoFactorChange.toObject = function toObject(message, options) { + CMsgGCHAccountTwoFactorChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.twofactor_enabled = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.twofactor_enabled != null && message.hasOwnProperty("twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) object.twofactor_enabled = message.twofactor_enabled; return object; }; @@ -24966,8 +32405,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountTwoFactorChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountTwoFactorChange.prototype.toJSON = function() { + return CMsgGCHAccountTwoFactorChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountTwoFactorChange + * @function getTypeUrl + * @memberof CMsgGCHAccountTwoFactorChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountTwoFactorChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountTwoFactorChange"; }; return CMsgGCHAccountTwoFactorChange; @@ -24975,27 +32428,40 @@ $root.CMsgGCGetPartnerAccountLink = (function() { + /** + * Properties of a CMsgGCGetPartnerAccountLink. + * @typedef {Object} CMsgGCGetPartnerAccountLink.$Properties + * @property {number|Long|null} [steamid] CMsgGCGetPartnerAccountLink steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPartnerAccountLink. * @exports ICMsgGCGetPartnerAccountLink * @interface ICMsgGCGetPartnerAccountLink - * @property {number|Long|null} [steamid] CMsgGCGetPartnerAccountLink steamid + * @augments CMsgGCGetPartnerAccountLink.$Properties + * @deprecated Use CMsgGCGetPartnerAccountLink.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPartnerAccountLink. + * @typedef {CMsgGCGetPartnerAccountLink.$Properties} CMsgGCGetPartnerAccountLink.$Shape */ /** * Constructs a new CMsgGCGetPartnerAccountLink. * @exports CMsgGCGetPartnerAccountLink * @classdesc Represents a CMsgGCGetPartnerAccountLink. - * @implements ICMsgGCGetPartnerAccountLink * @constructor - * @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPartnerAccountLink(properties) { + var CMsgGCGetPartnerAccountLink = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPartnerAccountLink steamid. @@ -25003,17 +32469,21 @@ * @memberof CMsgGCGetPartnerAccountLink * @instance */ - CMsgGCGetPartnerAccountLink.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCGetPartnerAccountLink.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCGetPartnerAccountLink instance using the specified properties. * @function create * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink instance + * @type {{ + * (properties: CMsgGCGetPartnerAccountLink.$Shape): CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape; + * (properties?: CMsgGCGetPartnerAccountLink.$Properties): CMsgGCGetPartnerAccountLink; + * }} */ - CMsgGCGetPartnerAccountLink.create = function create(properties) { + CMsgGCGetPartnerAccountLink.create = function(properties) { return new CMsgGCGetPartnerAccountLink(properties); }; @@ -25022,15 +32492,22 @@ * @function encode * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink} message CMsgGCGetPartnerAccountLink message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink.$Properties} message CMsgGCGetPartnerAccountLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink.encode = function encode(message, writer) { + CMsgGCGetPartnerAccountLink.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25039,12 +32516,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink} message CMsgGCGetPartnerAccountLink message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink.$Properties} message CMsgGCGetPartnerAccountLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPartnerAccountLink.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25054,25 +32531,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink + * @returns {CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape} CMsgGCGetPartnerAccountLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink.decode = function decode(reader, length) { + CMsgGCGetPartnerAccountLink.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPartnerAccountLink(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPartnerAccountLink(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25082,11 +32576,11 @@ * @memberof CMsgGCGetPartnerAccountLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink + * @returns {CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape} CMsgGCGetPartnerAccountLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPartnerAccountLink.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25100,10 +32594,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPartnerAccountLink.verify = function verify(message) { + CMsgGCGetPartnerAccountLink.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -25117,19 +32615,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink */ - CMsgGCGetPartnerAccountLink.fromObject = function fromObject(object) { + CMsgGCGetPartnerAccountLink.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPartnerAccountLink) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPartnerAccountLink: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPartnerAccountLink(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -25142,21 +32646,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPartnerAccountLink.toObject = function toObject(message, options) { + CMsgGCGetPartnerAccountLink.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -25167,8 +32677,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPartnerAccountLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPartnerAccountLink.prototype.toJSON = function() { + return CMsgGCGetPartnerAccountLink.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPartnerAccountLink + * @function getTypeUrl + * @memberof CMsgGCGetPartnerAccountLink + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPartnerAccountLink.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPartnerAccountLink"; }; return CMsgGCGetPartnerAccountLink; @@ -25178,26 +32702,39 @@ /** * Properties of a CMsgGCGetPartnerAccountLink_Response. - * @exports ICMsgGCGetPartnerAccountLink_Response - * @interface ICMsgGCGetPartnerAccountLink_Response + * @typedef {Object} CMsgGCGetPartnerAccountLink_Response.$Properties * @property {number|null} [pwid] CMsgGCGetPartnerAccountLink_Response pwid * @property {number|null} [nexonid] CMsgGCGetPartnerAccountLink_Response nexonid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetPartnerAccountLink_Response. + * @exports ICMsgGCGetPartnerAccountLink_Response + * @interface ICMsgGCGetPartnerAccountLink_Response + * @augments CMsgGCGetPartnerAccountLink_Response.$Properties + * @deprecated Use CMsgGCGetPartnerAccountLink_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPartnerAccountLink_Response. + * @typedef {CMsgGCGetPartnerAccountLink_Response.$Properties} CMsgGCGetPartnerAccountLink_Response.$Shape */ /** * Constructs a new CMsgGCGetPartnerAccountLink_Response. * @exports CMsgGCGetPartnerAccountLink_Response * @classdesc Represents a CMsgGCGetPartnerAccountLink_Response. - * @implements ICMsgGCGetPartnerAccountLink_Response * @constructor - * @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPartnerAccountLink_Response(properties) { + var CMsgGCGetPartnerAccountLink_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPartnerAccountLink_Response pwid. @@ -25220,10 +32757,14 @@ * @function create * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response instance + * @type {{ + * (properties: CMsgGCGetPartnerAccountLink_Response.$Shape): CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape; + * (properties?: CMsgGCGetPartnerAccountLink_Response.$Properties): CMsgGCGetPartnerAccountLink_Response; + * }} */ - CMsgGCGetPartnerAccountLink_Response.create = function create(properties) { + CMsgGCGetPartnerAccountLink_Response.create = function(properties) { return new CMsgGCGetPartnerAccountLink_Response(properties); }; @@ -25232,17 +32773,24 @@ * @function encode * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink_Response.encode = function encode(message, writer) { + CMsgGCGetPartnerAccountLink_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.pwid != null && Object.hasOwnProperty.call(message, "pwid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.pwid); - if (message.nexonid != null && Object.hasOwnProperty.call(message, "nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.nexonid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25251,12 +32799,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPartnerAccountLink_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25266,28 +32814,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response + * @returns {CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape} CMsgGCGetPartnerAccountLink_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink_Response.decode = function decode(reader, length) { + CMsgGCGetPartnerAccountLink_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPartnerAccountLink_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPartnerAccountLink_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pwid = reader.uint32(); - break; - case 2: - message.nexonid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.pwid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.nexonid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25297,11 +32865,11 @@ * @memberof CMsgGCGetPartnerAccountLink_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response + * @returns {CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape} CMsgGCGetPartnerAccountLink_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPartnerAccountLink_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25315,13 +32883,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPartnerAccountLink_Response.verify = function verify(message) { + CMsgGCGetPartnerAccountLink_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pwid != null && message.hasOwnProperty("pwid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) if (!$util.isInteger(message.pwid)) return "pwid: integer expected"; - if (message.nexonid != null && message.hasOwnProperty("nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) if (!$util.isInteger(message.nexonid)) return "nexonid: integer expected"; return null; @@ -25335,9 +32907,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response */ - CMsgGCGetPartnerAccountLink_Response.fromObject = function fromObject(object) { + CMsgGCGetPartnerAccountLink_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPartnerAccountLink_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPartnerAccountLink_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPartnerAccountLink_Response(); if (object.pwid != null) message.pwid = object.pwid >>> 0; @@ -25355,17 +32933,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPartnerAccountLink_Response.toObject = function toObject(message, options) { + CMsgGCGetPartnerAccountLink_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.pwid = 0; object.nexonid = 0; } - if (message.pwid != null && message.hasOwnProperty("pwid")) + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) object.pwid = message.pwid; - if (message.nexonid != null && message.hasOwnProperty("nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) object.nexonid = message.nexonid; return object; }; @@ -25377,8 +32959,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPartnerAccountLink_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPartnerAccountLink_Response.prototype.toJSON = function() { + return CMsgGCGetPartnerAccountLink_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPartnerAccountLink_Response + * @function getTypeUrl + * @memberof CMsgGCGetPartnerAccountLink_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPartnerAccountLink_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPartnerAccountLink_Response"; }; return CMsgGCGetPartnerAccountLink_Response; @@ -25388,30 +32984,43 @@ /** * Properties of a CMsgGCRoutingInfo. - * @exports ICMsgGCRoutingInfo - * @interface ICMsgGCRoutingInfo + * @typedef {Object} CMsgGCRoutingInfo.$Properties * @property {Array.|null} [dir_index] CMsgGCRoutingInfo dir_index * @property {CMsgGCRoutingInfo.RoutingMethod|null} [method] CMsgGCRoutingInfo method * @property {CMsgGCRoutingInfo.RoutingMethod|null} [fallback] CMsgGCRoutingInfo fallback * @property {number|null} [protobuf_field] CMsgGCRoutingInfo protobuf_field * @property {string|null} [webapi_param] CMsgGCRoutingInfo webapi_param + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRoutingInfo. + * @exports ICMsgGCRoutingInfo + * @interface ICMsgGCRoutingInfo + * @augments CMsgGCRoutingInfo.$Properties + * @deprecated Use CMsgGCRoutingInfo.$Properties instead. + */ + + /** + * Shape of a CMsgGCRoutingInfo. + * @typedef {CMsgGCRoutingInfo.$Properties} CMsgGCRoutingInfo.$Shape */ /** * Constructs a new CMsgGCRoutingInfo. * @exports CMsgGCRoutingInfo * @classdesc Represents a CMsgGCRoutingInfo. - * @implements ICMsgGCRoutingInfo * @constructor - * @param {ICMsgGCRoutingInfo=} [properties] Properties to set + * @param {CMsgGCRoutingInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRoutingInfo(properties) { + var CMsgGCRoutingInfo = function (properties) { this.dir_index = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRoutingInfo dir_index. @@ -25458,10 +33067,14 @@ * @function create * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo=} [properties] Properties to set + * @param {CMsgGCRoutingInfo.$Properties=} [properties] Properties to set * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo instance + * @type {{ + * (properties: CMsgGCRoutingInfo.$Shape): CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape; + * (properties?: CMsgGCRoutingInfo.$Properties): CMsgGCRoutingInfo; + * }} */ - CMsgGCRoutingInfo.create = function create(properties) { + CMsgGCRoutingInfo.create = function(properties) { return new CMsgGCRoutingInfo(properties); }; @@ -25470,24 +33083,31 @@ * @function encode * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo} message CMsgGCRoutingInfo message or plain object to encode + * @param {CMsgGCRoutingInfo.$Properties} message CMsgGCRoutingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRoutingInfo.encode = function encode(message, writer) { + CMsgGCRoutingInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.dir_index != null && message.dir_index.length) for (var i = 0; i < message.dir_index.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index[i]); - if (message.method != null && Object.hasOwnProperty.call(message, "method")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.method); - if (message.fallback != null && Object.hasOwnProperty.call(message, "fallback")) + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.fallback); - if (message.protobuf_field != null && Object.hasOwnProperty.call(message, "protobuf_field")) + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.protobuf_field); - if (message.webapi_param != null && Object.hasOwnProperty.call(message, "webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.webapi_param); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25496,12 +33116,12 @@ * @function encodeDelimited * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo} message CMsgGCRoutingInfo message or plain object to encode + * @param {CMsgGCRoutingInfo.$Properties} message CMsgGCRoutingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRoutingInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRoutingInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25511,44 +33131,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo + * @returns {CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape} CMsgGCRoutingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRoutingInfo.decode = function decode(reader, length) { + CMsgGCRoutingInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRoutingInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRoutingInfo(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.dir_index && message.dir_index.length)) - message.dir_index = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.dir_index.push(reader.uint32()); - } else - message.dir_index.push(reader.uint32()); - break; - case 2: - message.method = reader.int32(); - break; - case 3: - message.fallback = reader.int32(); - break; - case 4: - message.protobuf_field = reader.uint32(); - break; - case 5: - message.webapi_param = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.dir_index && message.dir_index.length)) + message.dir_index = []; + reader.uint32s(message.dir_index); + continue; + } + if (wireType !== 0) + break; + if (!(message.dir_index && message.dir_index.length)) + message.dir_index = []; + message.dir_index.push(reader.uint32()); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCRoutingInfo.RoutingMethod[value] !== $undefined) + message.method = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCRoutingInfo.RoutingMethod[value] !== $undefined) + message.fallback = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 4: { + if (wireType !== 0) + break; + message.protobuf_field = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.webapi_param = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25558,11 +33220,11 @@ * @memberof CMsgGCRoutingInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo + * @returns {CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape} CMsgGCRoutingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRoutingInfo.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRoutingInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25576,17 +33238,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRoutingInfo.verify = function verify(message) { + CMsgGCRoutingInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) { - if (!Array.isArray(message.dir_index)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) { + if (!$Array.isArray(message.dir_index)) return "dir_index: array expected"; for (var i = 0; i < message.dir_index.length; ++i) if (!$util.isInteger(message.dir_index[i])) return "dir_index: integer[] expected"; } - if (message.method != null && message.hasOwnProperty("method")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) switch (message.method) { default: return "method: enum value expected"; @@ -25597,7 +33263,7 @@ case 4: break; } - if (message.fallback != null && message.hasOwnProperty("fallback")) + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) switch (message.fallback) { default: return "fallback: enum value expected"; @@ -25608,10 +33274,10 @@ case 4: break; } - if (message.protobuf_field != null && message.hasOwnProperty("protobuf_field")) + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) if (!$util.isInteger(message.protobuf_field)) return "protobuf_field: integer expected"; - if (message.webapi_param != null && message.hasOwnProperty("webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) if (!$util.isString(message.webapi_param)) return "webapi_param: string expected"; return null; @@ -25625,14 +33291,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo */ - CMsgGCRoutingInfo.fromObject = function fromObject(object) { + CMsgGCRoutingInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRoutingInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRoutingInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRoutingInfo(); if (object.dir_index) { - if (!Array.isArray(object.dir_index)) - throw TypeError(".CMsgGCRoutingInfo.dir_index: array expected"); - message.dir_index = []; + if (!$Array.isArray(object.dir_index)) + throw $TypeError(".CMsgGCRoutingInfo.dir_index: array expected"); + message.dir_index = $Array(object.dir_index.length); for (var i = 0; i < object.dir_index.length; ++i) message.dir_index[i] = object.dir_index[i] >>> 0; } @@ -25657,6 +33329,7 @@ case 4: message.method = 4; break; + default: } switch (object.fallback) { case "RANDOM": @@ -25679,11 +33352,12 @@ case 4: message.fallback = 4; break; + default: } if (object.protobuf_field != null) message.protobuf_field = object.protobuf_field >>> 0; if (object.webapi_param != null) - message.webapi_param = String(object.webapi_param); + message.webapi_param = $String(object.webapi_param); return message; }; @@ -25696,30 +33370,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRoutingInfo.toObject = function toObject(message, options) { + CMsgGCRoutingInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.dir_index = []; if (options.defaults) { - object.method = options.enums === String ? "RANDOM" : 0; - object.fallback = options.enums === String ? "DISCARD" : 1; + object.method = options.enums === $String ? "RANDOM" : 0; + object.fallback = options.enums === $String ? "DISCARD" : 1; object.protobuf_field = 0; object.webapi_param = ""; } if (message.dir_index && message.dir_index.length) { - object.dir_index = []; + object.dir_index = $Array(message.dir_index.length); for (var j = 0; j < message.dir_index.length; ++j) object.dir_index[j] = message.dir_index[j]; } - if (message.method != null && message.hasOwnProperty("method")) - object.method = options.enums === String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.method] : message.method; - if (message.fallback != null && message.hasOwnProperty("fallback")) - object.fallback = options.enums === String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] : message.fallback; - if (message.protobuf_field != null && message.hasOwnProperty("protobuf_field")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) + object.method = options.enums === $String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.method] === $undefined ? message.method : $root.CMsgGCRoutingInfo.RoutingMethod[message.method] : message.method; + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) + object.fallback = options.enums === $String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] === $undefined ? message.fallback : $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] : message.fallback; + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) object.protobuf_field = message.protobuf_field; - if (message.webapi_param != null && message.hasOwnProperty("webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) object.webapi_param = message.webapi_param; return object; }; @@ -25731,8 +33409,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRoutingInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRoutingInfo.prototype.toJSON = function() { + return CMsgGCRoutingInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRoutingInfo + * @function getTypeUrl + * @memberof CMsgGCRoutingInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRoutingInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRoutingInfo"; }; /** @@ -25746,7 +33438,7 @@ * @property {number} WEBAPI_PARAM_UINT64=4 WEBAPI_PARAM_UINT64 value */ CMsgGCRoutingInfo.RoutingMethod = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "RANDOM"] = 0; values[valuesById[1] = "DISCARD"] = 1; values[valuesById[2] = "CLIENT_STEAMID"] = 2; @@ -25760,32 +33452,45 @@ $root.CMsgGCMsgMasterSetWebAPIRouting = (function() { + /** + * Properties of a CMsgGCMsgMasterSetWebAPIRouting. + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting.$Properties + * @property {Array.|null} [entries] CMsgGCMsgMasterSetWebAPIRouting entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetWebAPIRouting. * @exports ICMsgGCMsgMasterSetWebAPIRouting * @interface ICMsgGCMsgMasterSetWebAPIRouting - * @property {Array.|null} [entries] CMsgGCMsgMasterSetWebAPIRouting entries + * @augments CMsgGCMsgMasterSetWebAPIRouting.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetWebAPIRouting. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting.$Properties} CMsgGCMsgMasterSetWebAPIRouting.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetWebAPIRouting. * @exports CMsgGCMsgMasterSetWebAPIRouting * @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting. - * @implements ICMsgGCMsgMasterSetWebAPIRouting * @constructor - * @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetWebAPIRouting(properties) { + var CMsgGCMsgMasterSetWebAPIRouting = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetWebAPIRouting entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCMsgMasterSetWebAPIRouting * @instance */ @@ -25796,10 +33501,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting.$Shape): CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting.$Properties): CMsgGCMsgMasterSetWebAPIRouting; + * }} */ - CMsgGCMsgMasterSetWebAPIRouting.create = function create(properties) { + CMsgGCMsgMasterSetWebAPIRouting.create = function(properties) { return new CMsgGCMsgMasterSetWebAPIRouting(properties); }; @@ -25808,16 +33517,23 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting.encode = function encode(message, writer) { + CMsgGCMsgMasterSetWebAPIRouting.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25826,12 +33542,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetWebAPIRouting.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25841,27 +33557,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting + * @returns {CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape} CMsgGCMsgMasterSetWebAPIRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting.decode = function decode(reader, length) { + CMsgGCMsgMasterSetWebAPIRouting.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCMsgMasterSetWebAPIRouting.Entry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCMsgMasterSetWebAPIRouting.Entry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25871,11 +33604,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting + * @returns {CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape} CMsgGCMsgMasterSetWebAPIRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetWebAPIRouting.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25889,14 +33622,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetWebAPIRouting.verify = function verify(message) { + CMsgGCMsgMasterSetWebAPIRouting.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.verify(message.entries[i]); + var error = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -25912,18 +33649,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting */ - CMsgGCMsgMasterSetWebAPIRouting.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetWebAPIRouting.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: object expected"); - message.entries[i] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: object expected"); + message.entries[i] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -25938,16 +33681,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetWebAPIRouting.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetWebAPIRouting.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -25959,35 +33706,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetWebAPIRouting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetWebAPIRouting.prototype.toJSON = function() { + return CMsgGCMsgMasterSetWebAPIRouting.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetWebAPIRouting + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetWebAPIRouting.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting"; }; CMsgGCMsgMasterSetWebAPIRouting.Entry = (function() { /** * Properties of an Entry. - * @memberof CMsgGCMsgMasterSetWebAPIRouting - * @interface IEntry + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties * @property {string|null} [interface_name] Entry interface_name * @property {string|null} [method_name] Entry method_name - * @property {ICMsgGCRoutingInfo|null} [routing] Entry routing + * @property {CMsgGCRoutingInfo.$Properties|null} [routing] Entry routing + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Entry. + * @memberof CMsgGCMsgMasterSetWebAPIRouting + * @interface IEntry + * @augments CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties instead. + */ + + /** + * Shape of an Entry. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape */ /** * Constructs a new Entry. * @memberof CMsgGCMsgMasterSetWebAPIRouting * @classdesc Represents an Entry. - * @implements IEntry * @constructor - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Entry(properties) { + var Entry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Entry interface_name. @@ -26007,7 +33781,7 @@ /** * Entry routing. - * @member {ICMsgGCRoutingInfo|null|undefined} routing + * @member {CMsgGCRoutingInfo.$Properties|null|undefined} routing * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @instance */ @@ -26018,10 +33792,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape): CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties): CMsgGCMsgMasterSetWebAPIRouting.Entry; + * }} */ - Entry.create = function create(properties) { + Entry.create = function(properties) { return new Entry(properties); }; @@ -26030,19 +33808,26 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.interface_name != null && Object.hasOwnProperty.call(message, "interface_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.interface_name); - if (message.method_name != null && Object.hasOwnProperty.call(message, "method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.method_name); - if (message.routing != null && Object.hasOwnProperty.call(message, "routing")) - $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26051,12 +33836,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Entry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26066,31 +33851,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + Entry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.interface_name = reader.string(); - break; - case 2: - message.method_name = reader.string(); - break; - case 3: - message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.interface_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.method_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routing); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26100,11 +33908,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + Entry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26118,17 +33926,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + Entry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) if (!$util.isString(message.interface_name)) return "interface_name: string expected"; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) if (!$util.isString(message.method_name)) return "method_name: string expected"; - if (message.routing != null && message.hasOwnProperty("routing")) { - var error = $root.CMsgGCRoutingInfo.verify(message.routing); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) { + var error = $root.CMsgGCRoutingInfo.verify(message.routing, _depth + 1); if (error) return "routing." + error; } @@ -26143,18 +33955,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry */ - Entry.fromObject = function fromObject(object) { + Entry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting.Entry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); if (object.interface_name != null) - message.interface_name = String(object.interface_name); + message.interface_name = $String(object.interface_name); if (object.method_name != null) - message.method_name = String(object.method_name); + message.method_name = $String(object.method_name); if (object.routing != null) { - if (typeof object.routing !== "object") - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry.routing: object expected"); - message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing); + if (!$util.isObject(object.routing)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry.routing: object expected"); + message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing, _depth + 1); } return message; }; @@ -26168,21 +33986,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.interface_name = ""; object.method_name = ""; object.routing = null; } - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) object.interface_name = message.interface_name; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) object.method_name = message.method_name; - if (message.routing != null && message.hasOwnProperty("routing")) - object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options, _depth + 1); return object; }; @@ -26193,8 +34015,22 @@ * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Entry.prototype.toJSON = function() { + return Entry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Entry + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Entry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting.Entry"; }; return Entry; @@ -26205,32 +34041,45 @@ $root.CMsgGCMsgMasterSetClientMsgRouting = (function() { + /** + * Properties of a CMsgGCMsgMasterSetClientMsgRouting. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting.$Properties + * @property {Array.|null} [entries] CMsgGCMsgMasterSetClientMsgRouting entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetClientMsgRouting. * @exports ICMsgGCMsgMasterSetClientMsgRouting * @interface ICMsgGCMsgMasterSetClientMsgRouting - * @property {Array.|null} [entries] CMsgGCMsgMasterSetClientMsgRouting entries + * @augments CMsgGCMsgMasterSetClientMsgRouting.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetClientMsgRouting. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting.$Properties} CMsgGCMsgMasterSetClientMsgRouting.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetClientMsgRouting. * @exports CMsgGCMsgMasterSetClientMsgRouting * @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting. - * @implements ICMsgGCMsgMasterSetClientMsgRouting * @constructor - * @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetClientMsgRouting(properties) { + var CMsgGCMsgMasterSetClientMsgRouting = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetClientMsgRouting entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCMsgMasterSetClientMsgRouting * @instance */ @@ -26241,10 +34090,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting.$Shape): CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting.$Properties): CMsgGCMsgMasterSetClientMsgRouting; + * }} */ - CMsgGCMsgMasterSetClientMsgRouting.create = function create(properties) { + CMsgGCMsgMasterSetClientMsgRouting.create = function(properties) { return new CMsgGCMsgMasterSetClientMsgRouting(properties); }; @@ -26253,16 +34106,23 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting.encode = function encode(message, writer) { + CMsgGCMsgMasterSetClientMsgRouting.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26271,12 +34131,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetClientMsgRouting.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26286,27 +34146,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting + * @returns {CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape} CMsgGCMsgMasterSetClientMsgRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting.decode = function decode(reader, length) { + CMsgGCMsgMasterSetClientMsgRouting.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCMsgMasterSetClientMsgRouting.Entry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCMsgMasterSetClientMsgRouting.Entry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26316,11 +34193,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting + * @returns {CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape} CMsgGCMsgMasterSetClientMsgRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetClientMsgRouting.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26334,14 +34211,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetClientMsgRouting.verify = function verify(message) { + CMsgGCMsgMasterSetClientMsgRouting.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.verify(message.entries[i]); + var error = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -26357,18 +34238,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting */ - CMsgGCMsgMasterSetClientMsgRouting.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetClientMsgRouting.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: object expected"); - message.entries[i] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: object expected"); + message.entries[i] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -26383,16 +34270,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetClientMsgRouting.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetClientMsgRouting.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -26404,34 +34295,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetClientMsgRouting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetClientMsgRouting.prototype.toJSON = function() { + return CMsgGCMsgMasterSetClientMsgRouting.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetClientMsgRouting + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetClientMsgRouting.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting"; }; CMsgGCMsgMasterSetClientMsgRouting.Entry = (function() { + /** + * Properties of an Entry. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties + * @property {number|null} [msg_type] Entry msg_type + * @property {CMsgGCRoutingInfo.$Properties|null} [routing] Entry routing + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an Entry. * @memberof CMsgGCMsgMasterSetClientMsgRouting * @interface IEntry - * @property {number|null} [msg_type] Entry msg_type - * @property {ICMsgGCRoutingInfo|null} [routing] Entry routing + * @augments CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties instead. + */ + + /** + * Shape of an Entry. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape */ /** * Constructs a new Entry. * @memberof CMsgGCMsgMasterSetClientMsgRouting * @classdesc Represents an Entry. - * @implements IEntry * @constructor - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Entry(properties) { + var Entry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Entry msg_type. @@ -26443,7 +34361,7 @@ /** * Entry routing. - * @member {ICMsgGCRoutingInfo|null|undefined} routing + * @member {CMsgGCRoutingInfo.$Properties|null|undefined} routing * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @instance */ @@ -26454,10 +34372,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape): CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties): CMsgGCMsgMasterSetClientMsgRouting.Entry; + * }} */ - Entry.create = function create(properties) { + Entry.create = function(properties) { return new Entry(properties); }; @@ -26466,17 +34388,24 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.msg_type != null && Object.hasOwnProperty.call(message, "msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.msg_type); - if (message.routing != null && Object.hasOwnProperty.call(message, "routing")) - $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26485,12 +34414,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Entry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26500,28 +34429,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + Entry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg_type = reader.uint32(); - break; - case 2: - message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.msg_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routing); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26531,11 +34480,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + Entry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26549,14 +34498,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + Entry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) if (!$util.isInteger(message.msg_type)) return "msg_type: integer expected"; - if (message.routing != null && message.hasOwnProperty("routing")) { - var error = $root.CMsgGCRoutingInfo.verify(message.routing); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) { + var error = $root.CMsgGCRoutingInfo.verify(message.routing, _depth + 1); if (error) return "routing." + error; } @@ -26571,16 +34524,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry */ - Entry.fromObject = function fromObject(object) { + Entry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting.Entry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); if (object.msg_type != null) message.msg_type = object.msg_type >>> 0; if (object.routing != null) { - if (typeof object.routing !== "object") - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry.routing: object expected"); - message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing); + if (!$util.isObject(object.routing)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry.routing: object expected"); + message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing, _depth + 1); } return message; }; @@ -26594,18 +34553,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.msg_type = 0; object.routing = null; } - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) object.msg_type = message.msg_type; - if (message.routing != null && message.hasOwnProperty("routing")) - object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options, _depth + 1); return object; }; @@ -26616,8 +34579,22 @@ * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Entry.prototype.toJSON = function() { + return Entry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Entry + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Entry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting.Entry"; }; return Entry; @@ -26628,27 +34605,40 @@ $root.CMsgGCMsgMasterSetWebAPIRouting_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetWebAPIRouting_Response. + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetWebAPIRouting_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetWebAPIRouting_Response. * @exports ICMsgGCMsgMasterSetWebAPIRouting_Response * @interface ICMsgGCMsgMasterSetWebAPIRouting_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetWebAPIRouting_Response eresult + * @augments CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetWebAPIRouting_Response. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetWebAPIRouting_Response. * @exports CMsgGCMsgMasterSetWebAPIRouting_Response * @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting_Response. - * @implements ICMsgGCMsgMasterSetWebAPIRouting_Response * @constructor - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetWebAPIRouting_Response(properties) { + var CMsgGCMsgMasterSetWebAPIRouting_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetWebAPIRouting_Response eresult. @@ -26663,10 +34653,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape): CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties): CMsgGCMsgMasterSetWebAPIRouting_Response; + * }} */ - CMsgGCMsgMasterSetWebAPIRouting_Response.create = function create(properties) { + CMsgGCMsgMasterSetWebAPIRouting_Response.create = function(properties) { return new CMsgGCMsgMasterSetWebAPIRouting_Response(properties); }; @@ -26675,15 +34669,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetWebAPIRouting_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26692,12 +34693,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetWebAPIRouting_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26707,25 +34708,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response + * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape} CMsgGCMsgMasterSetWebAPIRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetWebAPIRouting_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26735,11 +34753,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response + * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape} CMsgGCMsgMasterSetWebAPIRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetWebAPIRouting_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26753,10 +34771,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetWebAPIRouting_Response.verify = function verify(message) { + CMsgGCMsgMasterSetWebAPIRouting_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -26770,9 +34792,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response */ - CMsgGCMsgMasterSetWebAPIRouting_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetWebAPIRouting_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -26788,13 +34816,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetWebAPIRouting_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetWebAPIRouting_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -26806,8 +34838,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetWebAPIRouting_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetWebAPIRouting_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetWebAPIRouting_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting_Response"; }; return CMsgGCMsgMasterSetWebAPIRouting_Response; @@ -26815,27 +34861,40 @@ $root.CMsgGCMsgMasterSetClientMsgRouting_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetClientMsgRouting_Response. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetClientMsgRouting_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetClientMsgRouting_Response. * @exports ICMsgGCMsgMasterSetClientMsgRouting_Response * @interface ICMsgGCMsgMasterSetClientMsgRouting_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetClientMsgRouting_Response eresult + * @augments CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetClientMsgRouting_Response. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetClientMsgRouting_Response. * @exports CMsgGCMsgMasterSetClientMsgRouting_Response * @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting_Response. - * @implements ICMsgGCMsgMasterSetClientMsgRouting_Response * @constructor - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetClientMsgRouting_Response(properties) { + var CMsgGCMsgMasterSetClientMsgRouting_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetClientMsgRouting_Response eresult. @@ -26850,10 +34909,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape): CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties): CMsgGCMsgMasterSetClientMsgRouting_Response; + * }} */ - CMsgGCMsgMasterSetClientMsgRouting_Response.create = function create(properties) { + CMsgGCMsgMasterSetClientMsgRouting_Response.create = function(properties) { return new CMsgGCMsgMasterSetClientMsgRouting_Response(properties); }; @@ -26862,15 +34925,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetClientMsgRouting_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26879,12 +34949,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetClientMsgRouting_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26894,25 +34964,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response + * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape} CMsgGCMsgMasterSetClientMsgRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetClientMsgRouting_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26922,11 +35009,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response + * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape} CMsgGCMsgMasterSetClientMsgRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetClientMsgRouting_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26940,10 +35027,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetClientMsgRouting_Response.verify = function verify(message) { + CMsgGCMsgMasterSetClientMsgRouting_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -26957,9 +35048,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response */ - CMsgGCMsgMasterSetClientMsgRouting_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetClientMsgRouting_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -26975,13 +35072,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetClientMsgRouting_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetClientMsgRouting_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -26993,8 +35094,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetClientMsgRouting_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetClientMsgRouting_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetClientMsgRouting_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting_Response"; }; return CMsgGCMsgMasterSetClientMsgRouting_Response; @@ -27004,29 +35119,42 @@ /** * Properties of a CMsgGCMsgSetOptions. - * @exports ICMsgGCMsgSetOptions - * @interface ICMsgGCMsgSetOptions + * @typedef {Object} CMsgGCMsgSetOptions.$Properties * @property {Array.|null} [options] CMsgGCMsgSetOptions options - * @property {Array.|null} [client_msg_ranges] CMsgGCMsgSetOptions client_msg_ranges + * @property {Array.|null} [client_msg_ranges] CMsgGCMsgSetOptions client_msg_ranges * @property {CMsgGCMsgSetOptions.GCSQLVersion|null} [gcsql_version] CMsgGCMsgSetOptions gcsql_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCMsgSetOptions. + * @exports ICMsgGCMsgSetOptions + * @interface ICMsgGCMsgSetOptions + * @augments CMsgGCMsgSetOptions.$Properties + * @deprecated Use CMsgGCMsgSetOptions.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgSetOptions. + * @typedef {CMsgGCMsgSetOptions.$Properties} CMsgGCMsgSetOptions.$Shape */ /** * Constructs a new CMsgGCMsgSetOptions. * @exports CMsgGCMsgSetOptions * @classdesc Represents a CMsgGCMsgSetOptions. - * @implements ICMsgGCMsgSetOptions * @constructor - * @param {ICMsgGCMsgSetOptions=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgSetOptions(properties) { + var CMsgGCMsgSetOptions = function (properties) { this.options = []; this.client_msg_ranges = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgSetOptions options. @@ -27038,7 +35166,7 @@ /** * CMsgGCMsgSetOptions client_msg_ranges. - * @member {Array.} client_msg_ranges + * @member {Array.} client_msg_ranges * @memberof CMsgGCMsgSetOptions * @instance */ @@ -27057,10 +35185,14 @@ * @function create * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions instance + * @type {{ + * (properties: CMsgGCMsgSetOptions.$Shape): CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape; + * (properties?: CMsgGCMsgSetOptions.$Properties): CMsgGCMsgSetOptions; + * }} */ - CMsgGCMsgSetOptions.create = function create(properties) { + CMsgGCMsgSetOptions.create = function(properties) { return new CMsgGCMsgSetOptions(properties); }; @@ -27069,21 +35201,28 @@ * @function encode * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions} message CMsgGCMsgSetOptions message or plain object to encode + * @param {CMsgGCMsgSetOptions.$Properties} message CMsgGCMsgSetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgSetOptions.encode = function encode(message, writer) { + CMsgGCMsgSetOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.options != null && message.options.length) for (var i = 0; i < message.options.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.options[i]); if (message.client_msg_ranges != null && message.client_msg_ranges.length) for (var i = 0; i < message.client_msg_ranges.length; ++i) - $root.CMsgGCMsgSetOptions.MessageRange.encode(message.client_msg_ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gcsql_version != null && Object.hasOwnProperty.call(message, "gcsql_version")) + $root.CMsgGCMsgSetOptions.MessageRange.encode(message.client_msg_ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.gcsql_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27092,12 +35231,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions} message CMsgGCMsgSetOptions message or plain object to encode + * @param {CMsgGCMsgSetOptions.$Properties} message CMsgGCMsgSetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgSetOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgSetOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27107,40 +35246,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions + * @returns {CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape} CMsgGCMsgSetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgSetOptions.decode = function decode(reader, length) { + CMsgGCMsgSetOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgSetOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgSetOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.options && message.options.length)) - message.options = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.options.push(reader.int32()); - } else - message.options.push(reader.int32()); - break; - case 2: - if (!(message.client_msg_ranges && message.client_msg_ranges.length)) - message.client_msg_ranges = []; - message.client_msg_ranges.push($root.CMsgGCMsgSetOptions.MessageRange.decode(reader, reader.uint32())); - break; - case 3: - message.gcsql_version = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + start = reader.pos; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.Option[value] !== $undefined) { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push($util.rawField(1, 0, reader.raw(start, reader.pos))); + } + } + continue; + } + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.Option[value] !== $undefined) { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.client_msg_ranges && message.client_msg_ranges.length)) + message.client_msg_ranges = []; + message.client_msg_ranges.push($root.CMsgGCMsgSetOptions.MessageRange.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.GCSQLVersion[value] !== $undefined) + message.gcsql_version = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27150,11 +35335,11 @@ * @memberof CMsgGCMsgSetOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions + * @returns {CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape} CMsgGCMsgSetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgSetOptions.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgSetOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27168,11 +35353,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgSetOptions.verify = function verify(message) { + CMsgGCMsgSetOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + if (!$Array.isArray(message.options)) return "options: array expected"; for (var i = 0; i < message.options.length; ++i) switch (message.options[i]) { @@ -27185,16 +35374,16 @@ break; } } - if (message.client_msg_ranges != null && message.hasOwnProperty("client_msg_ranges")) { - if (!Array.isArray(message.client_msg_ranges)) + if (message.client_msg_ranges != null && $Object.hasOwnProperty.call(message, "client_msg_ranges")) { + if (!$Array.isArray(message.client_msg_ranges)) return "client_msg_ranges: array expected"; for (var i = 0; i < message.client_msg_ranges.length; ++i) { - var error = $root.CMsgGCMsgSetOptions.MessageRange.verify(message.client_msg_ranges[i]); + var error = $root.CMsgGCMsgSetOptions.MessageRange.verify(message.client_msg_ranges[i], _depth + 1); if (error) return "client_msg_ranges." + error; } } - if (message.gcsql_version != null && message.hasOwnProperty("gcsql_version")) + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) switch (message.gcsql_version) { default: return "gcsql_version: enum value expected"; @@ -27213,43 +35402,49 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions */ - CMsgGCMsgSetOptions.fromObject = function fromObject(object) { + CMsgGCMsgSetOptions.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgSetOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgSetOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgSetOptions(); if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".CMsgGCMsgSetOptions.options: array expected"); + if (!$Array.isArray(object.options)) + throw $TypeError(".CMsgGCMsgSetOptions.options: array expected"); message.options = []; for (var i = 0; i < object.options.length; ++i) switch (object.options[i]) { - default: case "NOTIFY_USER_SESSIONS": case 0: - message.options[i] = 0; + message.options[message.options.length] = 0; break; case "NOTIFY_SERVER_SESSIONS": case 1: - message.options[i] = 1; + message.options[message.options.length] = 1; break; case "NOTIFY_ACHIEVEMENTS": case 2: - message.options[i] = 2; + message.options[message.options.length] = 2; break; case "NOTIFY_VAC_ACTION": case 3: - message.options[i] = 3; + message.options[message.options.length] = 3; break; + default: } } if (object.client_msg_ranges) { - if (!Array.isArray(object.client_msg_ranges)) - throw TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: array expected"); - message.client_msg_ranges = []; + if (!$Array.isArray(object.client_msg_ranges)) + throw $TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: array expected"); + message.client_msg_ranges = $Array(object.client_msg_ranges.length); for (var i = 0; i < object.client_msg_ranges.length; ++i) { - if (typeof object.client_msg_ranges[i] !== "object") - throw TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: object expected"); - message.client_msg_ranges[i] = $root.CMsgGCMsgSetOptions.MessageRange.fromObject(object.client_msg_ranges[i]); + if (!$util.isObject(object.client_msg_ranges[i])) + throw $TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: object expected"); + message.client_msg_ranges[i] = $root.CMsgGCMsgSetOptions.MessageRange.fromObject(object.client_msg_ranges[i], _depth + 1); } } switch (object.gcsql_version) { @@ -27261,6 +35456,7 @@ case 2: message.gcsql_version = 2; break; + default: } return message; }; @@ -27274,28 +35470,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgSetOptions.toObject = function toObject(message, options) { + CMsgGCMsgSetOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.options = []; object.client_msg_ranges = []; } if (options.defaults) - object.gcsql_version = options.enums === String ? "GCSQL_VERSION_BASELINE" : 1; + object.gcsql_version = options.enums === $String ? "GCSQL_VERSION_BASELINE" : 1; if (message.options && message.options.length) { - object.options = []; + object.options = $Array(message.options.length); for (var j = 0; j < message.options.length; ++j) - object.options[j] = options.enums === String ? $root.CMsgGCMsgSetOptions.Option[message.options[j]] : message.options[j]; + object.options[j] = options.enums === $String ? $root.CMsgGCMsgSetOptions.Option[message.options[j]] === $undefined ? message.options[j] : $root.CMsgGCMsgSetOptions.Option[message.options[j]] : message.options[j]; } if (message.client_msg_ranges && message.client_msg_ranges.length) { - object.client_msg_ranges = []; + object.client_msg_ranges = $Array(message.client_msg_ranges.length); for (var j = 0; j < message.client_msg_ranges.length; ++j) - object.client_msg_ranges[j] = $root.CMsgGCMsgSetOptions.MessageRange.toObject(message.client_msg_ranges[j], options); + object.client_msg_ranges[j] = $root.CMsgGCMsgSetOptions.MessageRange.toObject(message.client_msg_ranges[j], options, _depth + 1); } - if (message.gcsql_version != null && message.hasOwnProperty("gcsql_version")) - object.gcsql_version = options.enums === String ? $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] : message.gcsql_version; + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) + object.gcsql_version = options.enums === $String ? $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] === $undefined ? message.gcsql_version : $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] : message.gcsql_version; return object; }; @@ -27306,34 +35506,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgSetOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgSetOptions.prototype.toJSON = function() { + return CMsgGCMsgSetOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgSetOptions + * @function getTypeUrl + * @memberof CMsgGCMsgSetOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgSetOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgSetOptions"; }; CMsgGCMsgSetOptions.MessageRange = (function() { /** * Properties of a MessageRange. - * @memberof CMsgGCMsgSetOptions - * @interface IMessageRange + * @typedef {Object} CMsgGCMsgSetOptions.MessageRange.$Properties * @property {number} low MessageRange low * @property {number} high MessageRange high + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MessageRange. + * @memberof CMsgGCMsgSetOptions + * @interface IMessageRange + * @augments CMsgGCMsgSetOptions.MessageRange.$Properties + * @deprecated Use CMsgGCMsgSetOptions.MessageRange.$Properties instead. + */ + + /** + * Shape of a MessageRange. + * @typedef {CMsgGCMsgSetOptions.MessageRange.$Properties} CMsgGCMsgSetOptions.MessageRange.$Shape */ /** * Constructs a new MessageRange. * @memberof CMsgGCMsgSetOptions * @classdesc Represents a MessageRange. - * @implements IMessageRange * @constructor - * @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MessageRange(properties) { + var MessageRange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MessageRange low. @@ -27356,10 +35583,14 @@ * @function create * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange instance + * @type {{ + * (properties: CMsgGCMsgSetOptions.MessageRange.$Shape): CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape; + * (properties?: CMsgGCMsgSetOptions.MessageRange.$Properties): CMsgGCMsgSetOptions.MessageRange; + * }} */ - MessageRange.create = function create(properties) { + MessageRange.create = function(properties) { return new MessageRange(properties); }; @@ -27368,15 +35599,22 @@ * @function encode * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange} message MessageRange message or plain object to encode + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties} message MessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageRange.encode = function encode(message, writer) { + MessageRange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.low); writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.high); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27385,12 +35623,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange} message MessageRange message or plain object to encode + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties} message MessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageRange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27400,31 +35638,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange + * @returns {CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape} MessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageRange.decode = function decode(reader, length) { + MessageRange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgSetOptions.MessageRange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgSetOptions.MessageRange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.low = reader.uint32(); - break; - case 2: - message.high = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.low = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.high = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("low")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "low")) throw $util.ProtocolError("missing required 'low'", { instance: message }); - if (!message.hasOwnProperty("high")) + if (!$Object.hasOwnProperty.call(message, "high")) throw $util.ProtocolError("missing required 'high'", { instance: message }); return message; }; @@ -27435,11 +35693,11 @@ * @memberof CMsgGCMsgSetOptions.MessageRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange + * @returns {CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape} MessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageRange.decodeDelimited = function decodeDelimited(reader) { + MessageRange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27453,9 +35711,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageRange.verify = function verify(message) { + MessageRange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isInteger(message.low)) return "low: integer expected"; if (!$util.isInteger(message.high)) @@ -27471,9 +35733,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange */ - MessageRange.fromObject = function fromObject(object) { + MessageRange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgSetOptions.MessageRange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgSetOptions.MessageRange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgSetOptions.MessageRange(); if (object.low != null) message.low = object.low >>> 0; @@ -27491,17 +35759,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageRange.toObject = function toObject(message, options) { + MessageRange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.low = 0; object.high = 0; } - if (message.low != null && message.hasOwnProperty("low")) + if (message.low != null && $Object.hasOwnProperty.call(message, "low")) object.low = message.low; - if (message.high != null && message.hasOwnProperty("high")) + if (message.high != null && $Object.hasOwnProperty.call(message, "high")) object.high = message.high; return object; }; @@ -27513,8 +35785,22 @@ * @instance * @returns {Object.} JSON object */ - MessageRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MessageRange.prototype.toJSON = function() { + return MessageRange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MessageRange + * @function getTypeUrl + * @memberof CMsgGCMsgSetOptions.MessageRange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MessageRange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgSetOptions.MessageRange"; }; return MessageRange; @@ -27530,7 +35816,7 @@ * @property {number} NOTIFY_VAC_ACTION=3 NOTIFY_VAC_ACTION value */ CMsgGCMsgSetOptions.Option = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "NOTIFY_USER_SESSIONS"] = 0; values[valuesById[1] = "NOTIFY_SERVER_SESSIONS"] = 1; values[valuesById[2] = "NOTIFY_ACHIEVEMENTS"] = 2; @@ -27546,7 +35832,7 @@ * @property {number} GCSQL_VERSION_BOOLTYPE=2 GCSQL_VERSION_BOOLTYPE value */ CMsgGCMsgSetOptions.GCSQLVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "GCSQL_VERSION_BASELINE"] = 1; values[valuesById[2] = "GCSQL_VERSION_BOOLTYPE"] = 2; return values; @@ -27559,8 +35845,7 @@ /** * Properties of a CMsgGCHUpdateSession. - * @exports ICMsgGCHUpdateSession - * @interface ICMsgGCHUpdateSession + * @typedef {Object} CMsgGCHUpdateSession.$Properties * @property {number|Long|null} [steam_id] CMsgGCHUpdateSession steam_id * @property {number|null} [app_id] CMsgGCHUpdateSession app_id * @property {boolean|null} [online] CMsgGCHUpdateSession online @@ -27569,24 +35854,38 @@ * @property {number|null} [server_port] CMsgGCHUpdateSession server_port * @property {number|null} [os_type] CMsgGCHUpdateSession os_type * @property {number|null} [client_addr] CMsgGCHUpdateSession client_addr - * @property {Array.|null} [extra_fields] CMsgGCHUpdateSession extra_fields + * @property {Array.|null} [extra_fields] CMsgGCHUpdateSession extra_fields + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHUpdateSession. + * @exports ICMsgGCHUpdateSession + * @interface ICMsgGCHUpdateSession + * @augments CMsgGCHUpdateSession.$Properties + * @deprecated Use CMsgGCHUpdateSession.$Properties instead. + */ + + /** + * Shape of a CMsgGCHUpdateSession. + * @typedef {CMsgGCHUpdateSession.$Properties} CMsgGCHUpdateSession.$Shape */ /** * Constructs a new CMsgGCHUpdateSession. * @exports CMsgGCHUpdateSession * @classdesc Represents a CMsgGCHUpdateSession. - * @implements ICMsgGCHUpdateSession * @constructor - * @param {ICMsgGCHUpdateSession=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHUpdateSession(properties) { + var CMsgGCHUpdateSession = function (properties) { this.extra_fields = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHUpdateSession steam_id. @@ -27594,7 +35893,7 @@ * @memberof CMsgGCHUpdateSession * @instance */ - CMsgGCHUpdateSession.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHUpdateSession.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHUpdateSession app_id. @@ -27618,7 +35917,7 @@ * @memberof CMsgGCHUpdateSession * @instance */ - CMsgGCHUpdateSession.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHUpdateSession.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHUpdateSession server_addr. @@ -27654,7 +35953,7 @@ /** * CMsgGCHUpdateSession extra_fields. - * @member {Array.} extra_fields + * @member {Array.} extra_fields * @memberof CMsgGCHUpdateSession * @instance */ @@ -27665,10 +35964,14 @@ * @function create * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.$Properties=} [properties] Properties to set * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession instance + * @type {{ + * (properties: CMsgGCHUpdateSession.$Shape): CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape; + * (properties?: CMsgGCHUpdateSession.$Properties): CMsgGCHUpdateSession; + * }} */ - CMsgGCHUpdateSession.create = function create(properties) { + CMsgGCHUpdateSession.create = function(properties) { return new CMsgGCHUpdateSession(properties); }; @@ -27677,32 +35980,39 @@ * @function encode * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession} message CMsgGCHUpdateSession message or plain object to encode + * @param {CMsgGCHUpdateSession.$Properties} message CMsgGCHUpdateSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHUpdateSession.encode = function encode(message, writer) { + CMsgGCHUpdateSession.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id); - if (message.online != null && Object.hasOwnProperty.call(message, "online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.online); - if (message.server_steam_id != null && Object.hasOwnProperty.call(message, "server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.server_steam_id); - if (message.server_addr != null && Object.hasOwnProperty.call(message, "server_addr")) + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.server_addr); - if (message.server_port != null && Object.hasOwnProperty.call(message, "server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.server_port); - if (message.os_type != null && Object.hasOwnProperty.call(message, "os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.os_type); - if (message.client_addr != null && Object.hasOwnProperty.call(message, "client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.client_addr); if (message.extra_fields != null && message.extra_fields.length) for (var i = 0; i < message.extra_fields.length; ++i) - $root.CMsgGCHUpdateSession.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.CMsgGCHUpdateSession.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27711,12 +36021,12 @@ * @function encodeDelimited * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession} message CMsgGCHUpdateSession message or plain object to encode + * @param {CMsgGCHUpdateSession.$Properties} message CMsgGCHUpdateSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHUpdateSession.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHUpdateSession.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27726,51 +36036,92 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession + * @returns {CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape} CMsgGCHUpdateSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHUpdateSession.decode = function decode(reader, length) { + CMsgGCHUpdateSession.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHUpdateSession(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHUpdateSession(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.app_id = reader.uint32(); - break; - case 3: - message.online = reader.bool(); - break; - case 4: - message.server_steam_id = reader.fixed64(); - break; - case 5: - message.server_addr = reader.uint32(); - break; - case 6: - message.server_port = reader.uint32(); - break; - case 7: - message.os_type = reader.uint32(); - break; - case 8: - message.client_addr = reader.uint32(); - break; - case 9: - if (!(message.extra_fields && message.extra_fields.length)) - message.extra_fields = []; - message.extra_fields.push($root.CMsgGCHUpdateSession.ExtraField.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.online = reader.bool(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.server_steam_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.server_addr = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.server_port = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.os_type = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.client_addr = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 2) + break; + if (!(message.extra_fields && message.extra_fields.length)) + message.extra_fields = []; + message.extra_fields.push($root.CMsgGCHUpdateSession.ExtraField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27780,11 +36131,11 @@ * @memberof CMsgGCHUpdateSession * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession + * @returns {CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape} CMsgGCHUpdateSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHUpdateSession.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHUpdateSession.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27798,38 +36149,42 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHUpdateSession.verify = function verify(message) { + CMsgGCHUpdateSession.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) if (typeof message.online !== "boolean") return "online: boolean expected"; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) if (!$util.isInteger(message.server_steam_id) && !(message.server_steam_id && $util.isInteger(message.server_steam_id.low) && $util.isInteger(message.server_steam_id.high))) return "server_steam_id: integer|Long expected"; - if (message.server_addr != null && message.hasOwnProperty("server_addr")) + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) if (!$util.isInteger(message.server_addr)) return "server_addr: integer expected"; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) if (!$util.isInteger(message.server_port)) return "server_port: integer expected"; - if (message.os_type != null && message.hasOwnProperty("os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) if (!$util.isInteger(message.os_type)) return "os_type: integer expected"; - if (message.client_addr != null && message.hasOwnProperty("client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) if (!$util.isInteger(message.client_addr)) return "client_addr: integer expected"; - if (message.extra_fields != null && message.hasOwnProperty("extra_fields")) { - if (!Array.isArray(message.extra_fields)) + if (message.extra_fields != null && $Object.hasOwnProperty.call(message, "extra_fields")) { + if (!$Array.isArray(message.extra_fields)) return "extra_fields: array expected"; for (var i = 0; i < message.extra_fields.length; ++i) { - var error = $root.CMsgGCHUpdateSession.ExtraField.verify(message.extra_fields[i]); + var error = $root.CMsgGCHUpdateSession.ExtraField.verify(message.extra_fields[i], _depth + 1); if (error) return "extra_fields." + error; } @@ -27845,32 +36200,38 @@ * @param {Object.} object Plain object * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession */ - CMsgGCHUpdateSession.fromObject = function fromObject(object) { + CMsgGCHUpdateSession.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHUpdateSession) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHUpdateSession: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHUpdateSession(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.online != null) - message.online = Boolean(object.online); + message.online = $Boolean(object.online); if (object.server_steam_id != null) if ($util.Long) - (message.server_steam_id = $util.Long.fromValue(object.server_steam_id)).unsigned = false; + message.server_steam_id = $util.Long.fromValue(object.server_steam_id, true); else if (typeof object.server_steam_id === "string") - message.server_steam_id = parseInt(object.server_steam_id, 10); + message.server_steam_id = $parseInt(object.server_steam_id, 10); else if (typeof object.server_steam_id === "number") message.server_steam_id = object.server_steam_id; else if (typeof object.server_steam_id === "object") - message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(); + message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(true); if (object.server_addr != null) message.server_addr = object.server_addr >>> 0; if (object.server_port != null) @@ -27880,13 +36241,13 @@ if (object.client_addr != null) message.client_addr = object.client_addr >>> 0; if (object.extra_fields) { - if (!Array.isArray(object.extra_fields)) - throw TypeError(".CMsgGCHUpdateSession.extra_fields: array expected"); - message.extra_fields = []; + if (!$Array.isArray(object.extra_fields)) + throw $TypeError(".CMsgGCHUpdateSession.extra_fields: array expected"); + message.extra_fields = $Array(object.extra_fields.length); for (var i = 0; i < object.extra_fields.length; ++i) { - if (typeof object.extra_fields[i] !== "object") - throw TypeError(".CMsgGCHUpdateSession.extra_fields: object expected"); - message.extra_fields[i] = $root.CMsgGCHUpdateSession.ExtraField.fromObject(object.extra_fields[i]); + if (!$util.isObject(object.extra_fields[i])) + throw $TypeError(".CMsgGCHUpdateSession.extra_fields: object expected"); + message.extra_fields[i] = $root.CMsgGCHUpdateSession.ExtraField.fromObject(object.extra_fields[i], _depth + 1); } } return message; @@ -27901,56 +36262,64 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHUpdateSession.toObject = function toObject(message, options) { + CMsgGCHUpdateSession.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.extra_fields = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.app_id = 0; object.online = false; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.server_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.server_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.server_steam_id = options.longs === String ? "0" : 0; + object.server_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.server_addr = 0; object.server_port = 0; object.os_type = 0; object.client_addr = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) object.online = message.online; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) - if (typeof message.server_steam_id === "number") - object.server_steam_id = options.longs === String ? String(message.server_steam_id) : message.server_steam_id; + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.server_steam_id = typeof message.server_steam_id === "number" ? $BigInt(message.server_steam_id) : $util.Long.fromBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.server_steam_id === "number") + object.server_steam_id = options.longs === $String ? $String(message.server_steam_id) : message.server_steam_id; else - object.server_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber() : message.server_steam_id; - if (message.server_addr != null && message.hasOwnProperty("server_addr")) + object.server_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === $Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber(true) : message.server_steam_id; + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) object.server_addr = message.server_addr; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) object.server_port = message.server_port; - if (message.os_type != null && message.hasOwnProperty("os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) object.os_type = message.os_type; - if (message.client_addr != null && message.hasOwnProperty("client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) object.client_addr = message.client_addr; if (message.extra_fields && message.extra_fields.length) { - object.extra_fields = []; + object.extra_fields = $Array(message.extra_fields.length); for (var j = 0; j < message.extra_fields.length; ++j) - object.extra_fields[j] = $root.CMsgGCHUpdateSession.ExtraField.toObject(message.extra_fields[j], options); + object.extra_fields[j] = $root.CMsgGCHUpdateSession.ExtraField.toObject(message.extra_fields[j], options, _depth + 1); } return object; }; @@ -27962,34 +36331,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHUpdateSession.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHUpdateSession.prototype.toJSON = function() { + return CMsgGCHUpdateSession.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHUpdateSession + * @function getTypeUrl + * @memberof CMsgGCHUpdateSession + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHUpdateSession.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHUpdateSession"; }; CMsgGCHUpdateSession.ExtraField = (function() { /** * Properties of an ExtraField. - * @memberof CMsgGCHUpdateSession - * @interface IExtraField + * @typedef {Object} CMsgGCHUpdateSession.ExtraField.$Properties * @property {string|null} [name] ExtraField name * @property {string|null} [value] ExtraField value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtraField. + * @memberof CMsgGCHUpdateSession + * @interface IExtraField + * @augments CMsgGCHUpdateSession.ExtraField.$Properties + * @deprecated Use CMsgGCHUpdateSession.ExtraField.$Properties instead. + */ + + /** + * Shape of an ExtraField. + * @typedef {CMsgGCHUpdateSession.ExtraField.$Properties} CMsgGCHUpdateSession.ExtraField.$Shape */ /** * Constructs a new ExtraField. * @memberof CMsgGCHUpdateSession * @classdesc Represents an ExtraField. - * @implements IExtraField * @constructor - * @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.ExtraField.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtraField(properties) { + var ExtraField = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtraField name. @@ -28012,10 +36408,14 @@ * @function create * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.ExtraField.$Properties=} [properties] Properties to set * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField instance + * @type {{ + * (properties: CMsgGCHUpdateSession.ExtraField.$Shape): CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape; + * (properties?: CMsgGCHUpdateSession.ExtraField.$Properties): CMsgGCHUpdateSession.ExtraField; + * }} */ - ExtraField.create = function create(properties) { + ExtraField.create = function(properties) { return new ExtraField(properties); }; @@ -28024,17 +36424,24 @@ * @function encode * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgGCHUpdateSession.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encode = function encode(message, writer) { + ExtraField.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28043,12 +36450,12 @@ * @function encodeDelimited * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgGCHUpdateSession.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtraField.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28058,28 +36465,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField + * @returns {CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decode = function decode(reader, length) { + ExtraField.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHUpdateSession.ExtraField(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHUpdateSession.ExtraField(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28089,11 +36516,11 @@ * @memberof CMsgGCHUpdateSession.ExtraField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField + * @returns {CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decodeDelimited = function decodeDelimited(reader) { + ExtraField.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28107,13 +36534,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtraField.verify = function verify(message) { + ExtraField.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -28127,14 +36558,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField */ - ExtraField.fromObject = function fromObject(object) { + ExtraField.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHUpdateSession.ExtraField) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHUpdateSession.ExtraField: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHUpdateSession.ExtraField(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -28147,17 +36584,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtraField.toObject = function toObject(message, options) { + ExtraField.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -28169,8 +36610,22 @@ * @instance * @returns {Object.} JSON object */ - ExtraField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtraField.prototype.toJSON = function() { + return ExtraField.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtraField + * @function getTypeUrl + * @memberof CMsgGCHUpdateSession.ExtraField + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtraField.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHUpdateSession.ExtraField"; }; return ExtraField; @@ -28183,27 +36638,40 @@ /** * Properties of a CMsgNotificationOfSuspiciousActivity. - * @exports ICMsgNotificationOfSuspiciousActivity - * @interface ICMsgNotificationOfSuspiciousActivity + * @typedef {Object} CMsgNotificationOfSuspiciousActivity.$Properties * @property {number|Long|null} [steamid] CMsgNotificationOfSuspiciousActivity steamid * @property {number|null} [appid] CMsgNotificationOfSuspiciousActivity appid - * @property {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null} [multiple_instances] CMsgNotificationOfSuspiciousActivity multiple_instances + * @property {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties|null} [multiple_instances] CMsgNotificationOfSuspiciousActivity multiple_instances + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgNotificationOfSuspiciousActivity. + * @exports ICMsgNotificationOfSuspiciousActivity + * @interface ICMsgNotificationOfSuspiciousActivity + * @augments CMsgNotificationOfSuspiciousActivity.$Properties + * @deprecated Use CMsgNotificationOfSuspiciousActivity.$Properties instead. + */ + + /** + * Shape of a CMsgNotificationOfSuspiciousActivity. + * @typedef {CMsgNotificationOfSuspiciousActivity.$Properties} CMsgNotificationOfSuspiciousActivity.$Shape */ /** * Constructs a new CMsgNotificationOfSuspiciousActivity. * @exports CMsgNotificationOfSuspiciousActivity * @classdesc Represents a CMsgNotificationOfSuspiciousActivity. - * @implements ICMsgNotificationOfSuspiciousActivity * @constructor - * @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotificationOfSuspiciousActivity(properties) { + var CMsgNotificationOfSuspiciousActivity = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgNotificationOfSuspiciousActivity steamid. @@ -28211,7 +36679,7 @@ * @memberof CMsgNotificationOfSuspiciousActivity * @instance */ - CMsgNotificationOfSuspiciousActivity.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgNotificationOfSuspiciousActivity.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgNotificationOfSuspiciousActivity appid. @@ -28223,7 +36691,7 @@ /** * CMsgNotificationOfSuspiciousActivity multiple_instances. - * @member {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null|undefined} multiple_instances + * @member {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties|null|undefined} multiple_instances * @memberof CMsgNotificationOfSuspiciousActivity * @instance */ @@ -28234,10 +36702,14 @@ * @function create * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.$Properties=} [properties] Properties to set * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity instance + * @type {{ + * (properties: CMsgNotificationOfSuspiciousActivity.$Shape): CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape; + * (properties?: CMsgNotificationOfSuspiciousActivity.$Properties): CMsgNotificationOfSuspiciousActivity; + * }} */ - CMsgNotificationOfSuspiciousActivity.create = function create(properties) { + CMsgNotificationOfSuspiciousActivity.create = function(properties) { return new CMsgNotificationOfSuspiciousActivity(properties); }; @@ -28246,19 +36718,26 @@ * @function encode * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity} message CMsgNotificationOfSuspiciousActivity message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.$Properties} message CMsgNotificationOfSuspiciousActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationOfSuspiciousActivity.encode = function encode(message, writer) { + CMsgNotificationOfSuspiciousActivity.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.multiple_instances != null && Object.hasOwnProperty.call(message, "multiple_instances")) - $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.encode(message.multiple_instances, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) + $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.encode(message.multiple_instances, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28267,12 +36746,12 @@ * @function encodeDelimited * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity} message CMsgNotificationOfSuspiciousActivity message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.$Properties} message CMsgNotificationOfSuspiciousActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationOfSuspiciousActivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotificationOfSuspiciousActivity.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28282,31 +36761,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity + * @returns {CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape} CMsgNotificationOfSuspiciousActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationOfSuspiciousActivity.decode = function decode(reader, length) { + CMsgNotificationOfSuspiciousActivity.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationOfSuspiciousActivity(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationOfSuspiciousActivity(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.decode(reader, reader.uint32(), $undefined, _depth + 1, message.multiple_instances); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28316,11 +36818,11 @@ * @memberof CMsgNotificationOfSuspiciousActivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity + * @returns {CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape} CMsgNotificationOfSuspiciousActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationOfSuspiciousActivity.decodeDelimited = function decodeDelimited(reader) { + CMsgNotificationOfSuspiciousActivity.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28334,17 +36836,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotificationOfSuspiciousActivity.verify = function verify(message) { + CMsgNotificationOfSuspiciousActivity.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.multiple_instances != null && message.hasOwnProperty("multiple_instances")) { - var error = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify(message.multiple_instances); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) { + var error = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify(message.multiple_instances, _depth + 1); if (error) return "multiple_instances." + error; } @@ -28359,25 +36865,31 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity */ - CMsgNotificationOfSuspiciousActivity.fromObject = function fromObject(object) { + CMsgNotificationOfSuspiciousActivity.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationOfSuspiciousActivity) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotificationOfSuspiciousActivity(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.multiple_instances != null) { - if (typeof object.multiple_instances !== "object") - throw TypeError(".CMsgNotificationOfSuspiciousActivity.multiple_instances: object expected"); - message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.fromObject(object.multiple_instances); + if (!$util.isObject(object.multiple_instances)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.multiple_instances: object expected"); + message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.fromObject(object.multiple_instances, _depth + 1); } return message; }; @@ -28391,28 +36903,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotificationOfSuspiciousActivity.toObject = function toObject(message, options) { + CMsgNotificationOfSuspiciousActivity.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.multiple_instances = null; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.multiple_instances != null && message.hasOwnProperty("multiple_instances")) - object.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.toObject(message.multiple_instances, options); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) + object.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.toObject(message.multiple_instances, options, _depth + 1); return object; }; @@ -28423,35 +36941,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotificationOfSuspiciousActivity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotificationOfSuspiciousActivity.prototype.toJSON = function() { + return CMsgNotificationOfSuspiciousActivity.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotificationOfSuspiciousActivity + * @function getTypeUrl + * @memberof CMsgNotificationOfSuspiciousActivity + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotificationOfSuspiciousActivity.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationOfSuspiciousActivity"; }; CMsgNotificationOfSuspiciousActivity.MultipleGameInstances = (function() { /** * Properties of a MultipleGameInstances. - * @memberof CMsgNotificationOfSuspiciousActivity - * @interface IMultipleGameInstances + * @typedef {Object} CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties * @property {number|null} [app_instance_count] MultipleGameInstances app_instance_count * @property {Array.|null} [other_steamids] MultipleGameInstances other_steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MultipleGameInstances. + * @memberof CMsgNotificationOfSuspiciousActivity + * @interface IMultipleGameInstances + * @augments CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties + * @deprecated Use CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties instead. + */ + + /** + * Shape of a MultipleGameInstances. + * @typedef {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape */ /** * Constructs a new MultipleGameInstances. * @memberof CMsgNotificationOfSuspiciousActivity * @classdesc Represents a MultipleGameInstances. - * @implements IMultipleGameInstances * @constructor - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MultipleGameInstances(properties) { + var MultipleGameInstances = function (properties) { this.other_steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MultipleGameInstances app_instance_count. @@ -28474,10 +37019,14 @@ * @function create * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties=} [properties] Properties to set * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances instance + * @type {{ + * (properties: CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape): CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape; + * (properties?: CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties): CMsgNotificationOfSuspiciousActivity.MultipleGameInstances; + * }} */ - MultipleGameInstances.create = function create(properties) { + MultipleGameInstances.create = function(properties) { return new MultipleGameInstances(properties); }; @@ -28486,18 +37035,25 @@ * @function encode * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} message MultipleGameInstances message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} message MultipleGameInstances message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultipleGameInstances.encode = function encode(message, writer) { + MultipleGameInstances.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_instance_count != null && Object.hasOwnProperty.call(message, "app_instance_count")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_instance_count); if (message.other_steamids != null && message.other_steamids.length) for (var i = 0; i < message.other_steamids.length; ++i) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.other_steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28506,12 +37062,12 @@ * @function encodeDelimited * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} message MultipleGameInstances message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} message MultipleGameInstances message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultipleGameInstances.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MultipleGameInstances.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28521,35 +37077,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances + * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape} MultipleGameInstances * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultipleGameInstances.decode = function decode(reader, length) { + MultipleGameInstances.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_instance_count = reader.uint32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.other_steamids && message.other_steamids.length)) - message.other_steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.other_steamids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_instance_count = reader.uint32(); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.other_steamids && message.other_steamids.length)) + message.other_steamids = []; + reader.fixed64s(message.other_steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.other_steamids && message.other_steamids.length)) + message.other_steamids = []; message.other_steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28559,11 +37136,11 @@ * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances + * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape} MultipleGameInstances * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultipleGameInstances.decodeDelimited = function decodeDelimited(reader) { + MultipleGameInstances.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28577,14 +37154,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MultipleGameInstances.verify = function verify(message) { + MultipleGameInstances.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_instance_count != null && message.hasOwnProperty("app_instance_count")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) if (!$util.isInteger(message.app_instance_count)) return "app_instance_count: integer expected"; - if (message.other_steamids != null && message.hasOwnProperty("other_steamids")) { - if (!Array.isArray(message.other_steamids)) + if (message.other_steamids != null && $Object.hasOwnProperty.call(message, "other_steamids")) { + if (!$Array.isArray(message.other_steamids)) return "other_steamids: array expected"; for (var i = 0; i < message.other_steamids.length; ++i) if (!$util.isInteger(message.other_steamids[i]) && !(message.other_steamids[i] && $util.isInteger(message.other_steamids[i].low) && $util.isInteger(message.other_steamids[i].high))) @@ -28601,25 +37182,31 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances */ - MultipleGameInstances.fromObject = function fromObject(object) { + MultipleGameInstances.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); if (object.app_instance_count != null) message.app_instance_count = object.app_instance_count >>> 0; if (object.other_steamids) { - if (!Array.isArray(object.other_steamids)) - throw TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.other_steamids: array expected"); - message.other_steamids = []; + if (!$Array.isArray(object.other_steamids)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.other_steamids: array expected"); + message.other_steamids = $Array(object.other_steamids.length); for (var i = 0; i < object.other_steamids.length; ++i) if ($util.Long) - (message.other_steamids[i] = $util.Long.fromValue(object.other_steamids[i])).unsigned = false; + message.other_steamids[i] = $util.Long.fromValue(object.other_steamids[i], true); else if (typeof object.other_steamids[i] === "string") - message.other_steamids[i] = parseInt(object.other_steamids[i], 10); + message.other_steamids[i] = $parseInt(object.other_steamids[i], 10); else if (typeof object.other_steamids[i] === "number") message.other_steamids[i] = object.other_steamids[i]; else if (typeof object.other_steamids[i] === "object") - message.other_steamids[i] = new $util.LongBits(object.other_steamids[i].low >>> 0, object.other_steamids[i].high >>> 0).toNumber(); + message.other_steamids[i] = new $util.LongBits(object.other_steamids[i].low >>> 0, object.other_steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -28633,23 +37220,29 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MultipleGameInstances.toObject = function toObject(message, options) { + MultipleGameInstances.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.other_steamids = []; if (options.defaults) object.app_instance_count = 0; - if (message.app_instance_count != null && message.hasOwnProperty("app_instance_count")) + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) object.app_instance_count = message.app_instance_count; if (message.other_steamids && message.other_steamids.length) { - object.other_steamids = []; + object.other_steamids = $Array(message.other_steamids.length); for (var j = 0; j < message.other_steamids.length; ++j) - if (typeof message.other_steamids[j] === "number") - object.other_steamids[j] = options.longs === String ? String(message.other_steamids[j]) : message.other_steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.other_steamids[j] = typeof message.other_steamids[j] === "number" ? $BigInt(message.other_steamids[j]) : $util.Long.fromBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.other_steamids[j] === "number") + object.other_steamids[j] = options.longs === $String ? $String(message.other_steamids[j]) : message.other_steamids[j]; else - object.other_steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.other_steamids[j]) : options.longs === Number ? new $util.LongBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0).toNumber() : message.other_steamids[j]; + object.other_steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.other_steamids[j]) : options.longs === $Number ? new $util.LongBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0).toNumber(true) : message.other_steamids[j]; } return object; }; @@ -28661,8 +37254,22 @@ * @instance * @returns {Object.} JSON object */ - MultipleGameInstances.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MultipleGameInstances.prototype.toJSON = function() { + return MultipleGameInstances.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MultipleGameInstances + * @function getTypeUrl + * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MultipleGameInstances.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationOfSuspiciousActivity.MultipleGameInstances"; }; return MultipleGameInstances; @@ -28691,32 +37298,45 @@ protobuf.FileDescriptorSet = (function() { + /** + * Properties of a FileDescriptorSet. + * @typedef {Object} google.protobuf.FileDescriptorSet.$Properties + * @property {Array.|null} [file] FileDescriptorSet file + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a FileDescriptorSet. * @memberof google.protobuf * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @augments google.protobuf.FileDescriptorSet.$Properties + * @deprecated Use google.protobuf.FileDescriptorSet.$Properties instead. + */ + + /** + * Shape of a FileDescriptorSet. + * @typedef {google.protobuf.FileDescriptorSet.$Properties} google.protobuf.FileDescriptorSet.$Shape */ /** * Constructs a new FileDescriptorSet. * @memberof google.protobuf * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorSet(properties) { + var FileDescriptorSet = function (properties) { this.file = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorSet file. - * @member {Array.} file + * @member {Array.} file * @memberof google.protobuf.FileDescriptorSet * @instance */ @@ -28727,10 +37347,14 @@ * @function create * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @type {{ + * (properties: google.protobuf.FileDescriptorSet.$Shape): google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape; + * (properties?: google.protobuf.FileDescriptorSet.$Properties): google.protobuf.FileDescriptorSet; + * }} */ - FileDescriptorSet.create = function create(properties) { + FileDescriptorSet.create = function(properties) { return new FileDescriptorSet(properties); }; @@ -28739,16 +37363,23 @@ * @function encode * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + FileDescriptorSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.file != null && message.file.length) for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28757,12 +37388,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28772,27 +37403,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decode = function decode(reader, length) { + FileDescriptorSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28802,11 +37450,11 @@ * @memberof google.protobuf.FileDescriptorSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28820,14 +37468,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorSet.verify = function verify(message) { + FileDescriptorSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.file != null && $Object.hasOwnProperty.call(message, "file")) { + if (!$Array.isArray(message.file)) return "file: array expected"; for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i], _depth + 1); if (error) return "file." + error; } @@ -28843,18 +37495,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - FileDescriptorSet.fromObject = function fromObject(object) { + FileDescriptorSet.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorSet(); if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; + if (!$Array.isArray(object.file)) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = $Array(object.file.length); for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + if (!$util.isObject(object.file[i])) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], _depth + 1); } } return message; @@ -28869,16 +37527,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + FileDescriptorSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.file = []; if (message.file && message.file.length) { - object.file = []; + object.file = $Array(message.file.length); for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options, _depth + 1); } return object; }; @@ -28890,8 +37552,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorSet.prototype.toJSON = function() { + return FileDescriptorSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorSet"; }; return FileDescriptorSet; @@ -28901,38 +37577,51 @@ /** * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto + * @typedef {Object} google.protobuf.FileDescriptorProto.$Properties * @property {string|null} [name] FileDescriptorProto name * @property {string|null} ["package"] FileDescriptorProto package * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.|null} [message_type] FileDescriptorProto message_type + * @property {Array.|null} [enum_type] FileDescriptorProto enum_type + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.FileOptions.$Properties|null} [options] FileDescriptorProto options + * @property {google.protobuf.SourceCodeInfo.$Properties|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @augments google.protobuf.FileDescriptorProto.$Properties + * @deprecated Use google.protobuf.FileDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FileDescriptorProto. + * @typedef {google.protobuf.FileDescriptorProto.$Properties} google.protobuf.FileDescriptorProto.$Shape */ /** * Constructs a new FileDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorProto(properties) { + var FileDescriptorProto = function (properties) { this.dependency = []; this.message_type = []; this.enum_type = []; this.service = []; this.extension = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorProto name. @@ -28960,7 +37649,7 @@ /** * FileDescriptorProto message_type. - * @member {Array.} message_type + * @member {Array.} message_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -28968,7 +37657,7 @@ /** * FileDescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -28976,7 +37665,7 @@ /** * FileDescriptorProto service. - * @member {Array.} service + * @member {Array.} service * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -28984,7 +37673,7 @@ /** * FileDescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -28992,7 +37681,7 @@ /** * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options + * @member {google.protobuf.FileOptions.$Properties|null|undefined} options * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -29000,7 +37689,7 @@ /** * FileDescriptorProto source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info + * @member {google.protobuf.SourceCodeInfo.$Properties|null|undefined} source_code_info * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -29011,10 +37700,14 @@ * @function create * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FileDescriptorProto.$Shape): google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape; + * (properties?: google.protobuf.FileDescriptorProto.$Properties): google.protobuf.FileDescriptorProto; + * }} */ - FileDescriptorProto.create = function create(properties) { + FileDescriptorProto.create = function(properties) { return new FileDescriptorProto(properties); }; @@ -29023,36 +37716,43 @@ * @function encode * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + FileDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); if (message.dependency != null && message.dependency.length) for (var i = 0; i < message.dependency.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); if (message.message_type != null && message.message_type.length) for (var i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.service != null && message.service.length) for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29061,12 +37761,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29076,59 +37776,100 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decode = function decode(reader, length) { + FileDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message["package"] = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.message_type && message.message_type.length)) + message.message_type = []; + message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.source_code_info); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29138,11 +37879,11 @@ * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29156,65 +37897,69 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorProto.verify = function verify(message) { + FileDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) if (!$util.isString(message["package"])) return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) + if (message.dependency != null && $Object.hasOwnProperty.call(message, "dependency")) { + if (!$Array.isArray(message.dependency)) return "dependency: array expected"; for (var i = 0; i < message.dependency.length; ++i) if (!$util.isString(message.dependency[i])) return "dependency: string[] expected"; } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) + if (message.message_type != null && $Object.hasOwnProperty.call(message, "message_type")) { + if (!$Array.isArray(message.message_type)) return "message_type: array expected"; for (var i = 0; i < message.message_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i], _depth + 1); if (error) return "message_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) + if (message.service != null && $Object.hasOwnProperty.call(message, "service")) { + if (!$Array.isArray(message.service)) return "service: array expected"; for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i], _depth + 1); if (error) return "service." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info, _depth + 1); if (error) return "source_code_info." + error; } @@ -29229,70 +37974,76 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - FileDescriptorProto.fromObject = function fromObject(object) { + FileDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object["package"] != null) - message["package"] = String(object["package"]); + message["package"] = $String(object["package"]); if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; + if (!$Array.isArray(object.dependency)) + throw $TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = $Array(object.dependency.length); for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); + message.dependency[i] = $String(object.dependency[i]); } if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; + if (!$Array.isArray(object.message_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); + message.message_type = $Array(object.message_type.length); for (var i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); + if (!$util.isObject(object.message_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); + message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; + if (!$Array.isArray(object.service)) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = $Array(object.service.length); for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + if (!$util.isObject(object.service[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options, _depth + 1); } if (object.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); + if (!$util.isObject(object.source_code_info)) + throw $TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); + message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info, _depth + 1); } return message; }; @@ -29306,9 +38057,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.dependency = []; @@ -29323,39 +38078,39 @@ object.options = null; object.source_code_info = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; if (message.dependency && message.dependency.length) { - object.dependency = []; + object.dependency = $Array(message.dependency.length); for (var j = 0; j < message.dependency.length; ++j) object.dependency[j] = message.dependency[j]; } if (message.message_type && message.message_type.length) { - object.message_type = []; + object.message_type = $Array(message.message_type.length); for (var j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); + object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.service && message.service.length) { - object.service = []; + object.service = $Array(message.service.length); for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, _depth + 1); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options, _depth + 1); return object; }; @@ -29366,8 +38121,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorProto.prototype.toJSON = function() { + return FileDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorProto"; }; return FileDescriptorProto; @@ -29375,38 +38144,51 @@ protobuf.DescriptorProto = (function() { + /** + * Properties of a DescriptorProto. + * @typedef {Object} google.protobuf.DescriptorProto.$Properties + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nested_type] DescriptorProto nested_type + * @property {Array.|null} [enum_type] DescriptorProto enum_type + * @property {Array.|null} [extension_range] DescriptorProto extension_range + * @property {google.protobuf.MessageOptions.$Properties|null} [options] DescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a DescriptorProto. * @memberof google.protobuf * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @augments google.protobuf.DescriptorProto.$Properties + * @deprecated Use google.protobuf.DescriptorProto.$Properties instead. + */ + + /** + * Shape of a DescriptorProto. + * @typedef {google.protobuf.DescriptorProto.$Properties} google.protobuf.DescriptorProto.$Shape */ /** * Constructs a new DescriptorProto. * @memberof google.protobuf * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function DescriptorProto(properties) { + var DescriptorProto = function (properties) { this.field = []; this.extension = []; this.nested_type = []; this.enum_type = []; this.extension_range = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * DescriptorProto name. @@ -29418,7 +38200,7 @@ /** * DescriptorProto field. - * @member {Array.} field + * @member {Array.} field * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29426,7 +38208,7 @@ /** * DescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29434,7 +38216,7 @@ /** * DescriptorProto nested_type. - * @member {Array.} nested_type + * @member {Array.} nested_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29442,7 +38224,7 @@ /** * DescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29450,7 +38232,7 @@ /** * DescriptorProto extension_range. - * @member {Array.} extension_range + * @member {Array.} extension_range * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29458,7 +38240,7 @@ /** * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options + * @member {google.protobuf.MessageOptions.$Properties|null|undefined} options * @memberof google.protobuf.DescriptorProto * @instance */ @@ -29469,10 +38251,14 @@ * @function create * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.$Shape): google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape; + * (properties?: google.protobuf.DescriptorProto.$Properties): google.protobuf.DescriptorProto; + * }} */ - DescriptorProto.create = function create(properties) { + DescriptorProto.create = function(properties) { return new DescriptorProto(properties); }; @@ -29481,32 +38267,39 @@ * @function encode * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + DescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); if (message.nested_type != null && message.nested_type.length) for (var i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.extension_range != null && message.extension_range.length) for (var i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29515,12 +38308,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29530,53 +38323,88 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decode = function decode(reader, length) { + DescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.nested_type && message.nested_type.length)) + message.nested_type = []; + message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.extension_range && message.extension_range.length)) + message.extension_range = []; + message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29586,11 +38414,11 @@ * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + DescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29604,59 +38432,63 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DescriptorProto.verify = function verify(message) { + DescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) { + if (!$Array.isArray(message.field)) return "field: array expected"; for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i], _depth + 1); if (error) return "field." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) + if (message.nested_type != null && $Object.hasOwnProperty.call(message, "nested_type")) { + if (!$Array.isArray(message.nested_type)) return "nested_type: array expected"; for (var i = 0; i < message.nested_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i], _depth + 1); if (error) return "nested_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) + if (message.extension_range != null && $Object.hasOwnProperty.call(message, "extension_range")) { + if (!$Array.isArray(message.extension_range)) return "extension_range: array expected"; for (var i = 0; i < message.extension_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i], _depth + 1); if (error) return "extension_range." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -29671,66 +38503,72 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto} DescriptorProto */ - DescriptorProto.fromObject = function fromObject(object) { + DescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; + if (!$Array.isArray(object.field)) + throw $TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = $Array(object.field.length); for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + if (!$util.isObject(object.field[i])) + throw $TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; + if (!$Array.isArray(object.nested_type)) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); + message.nested_type = $Array(object.nested_type.length); for (var i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); + if (!$util.isObject(object.nested_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); + message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; + if (!$Array.isArray(object.extension_range)) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); + message.extension_range = $Array(object.extension_range.length); for (var i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); + if (!$util.isObject(object.extension_range[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); + message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -29744,9 +38582,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + DescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.field = []; @@ -29759,35 +38601,35 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.field && message.field.length) { - object.field = []; + object.field = $Array(message.field.length); for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options, _depth + 1); } if (message.nested_type && message.nested_type.length) { - object.nested_type = []; + object.nested_type = $Array(message.nested_type.length); for (var j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); + object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.extension_range && message.extension_range.length) { - object.extension_range = []; + object.extension_range = $Array(message.extension_range.length); for (var j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options); + object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -29798,34 +38640,61 @@ * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + DescriptorProto.prototype.toJSON = function() { + return DescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + DescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto"; }; DescriptorProto.ExtensionRange = (function() { /** * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange + * @typedef {Object} google.protobuf.DescriptorProto.ExtensionRange.$Properties * @property {number|null} [start] ExtensionRange start * @property {number|null} [end] ExtensionRange end + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @augments google.protobuf.DescriptorProto.ExtensionRange.$Properties + * @deprecated Use google.protobuf.DescriptorProto.ExtensionRange.$Properties instead. + */ + + /** + * Shape of an ExtensionRange. + * @typedef {google.protobuf.DescriptorProto.ExtensionRange.$Properties} google.protobuf.DescriptorProto.ExtensionRange.$Shape */ /** * Constructs a new ExtensionRange. * @memberof google.protobuf.DescriptorProto * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtensionRange(properties) { + var ExtensionRange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtensionRange start. @@ -29848,10 +38717,14 @@ * @function create * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.ExtensionRange.$Shape): google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape; + * (properties?: google.protobuf.DescriptorProto.ExtensionRange.$Properties): google.protobuf.DescriptorProto.ExtensionRange; + * }} */ - ExtensionRange.create = function create(properties) { + ExtensionRange.create = function(properties) { return new ExtensionRange(properties); }; @@ -29860,17 +38733,24 @@ * @function encode * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encode = function encode(message, writer) { + ExtensionRange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29879,12 +38759,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtensionRange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29894,28 +38774,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decode = function decode(reader, length) { + ExtensionRange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto.ExtensionRange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.start = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.end = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29925,11 +38825,11 @@ * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + ExtensionRange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29943,13 +38843,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtensionRange.verify = function verify(message) { + ExtensionRange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -29963,9 +38867,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange */ - ExtensionRange.fromObject = function fromObject(object) { + ExtensionRange.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); if (object.start != null) message.start = object.start | 0; @@ -29983,17 +38893,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRange.toObject = function toObject(message, options) { + ExtensionRange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -30005,8 +38919,22 @@ * @instance * @returns {Object.} JSON object */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtensionRange.prototype.toJSON = function() { + return ExtensionRange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtensionRange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto.ExtensionRange"; }; return ExtensionRange; @@ -30019,8 +38947,7 @@ /** * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto + * @typedef {Object} google.protobuf.FieldDescriptorProto.$Properties * @property {string|null} [name] FieldDescriptorProto name * @property {number|null} [number] FieldDescriptorProto number * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label @@ -30028,23 +38955,37 @@ * @property {string|null} [type_name] FieldDescriptorProto type_name * @property {string|null} [extendee] FieldDescriptorProto extendee * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {google.protobuf.FieldOptions.$Properties|null} [options] FieldDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @augments google.protobuf.FieldDescriptorProto.$Properties + * @deprecated Use google.protobuf.FieldDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FieldDescriptorProto. + * @typedef {google.protobuf.FieldDescriptorProto.$Properties} google.protobuf.FieldDescriptorProto.$Shape */ /** * Constructs a new FieldDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FieldDescriptorProto(properties) { + var FieldDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldDescriptorProto name. @@ -30104,7 +39045,7 @@ /** * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options + * @member {google.protobuf.FieldOptions.$Properties|null|undefined} options * @memberof google.protobuf.FieldDescriptorProto * @instance */ @@ -30115,10 +39056,14 @@ * @function create * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FieldDescriptorProto.$Shape): google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape; + * (properties?: google.protobuf.FieldDescriptorProto.$Properties): google.protobuf.FieldDescriptorProto; + * }} */ - FieldDescriptorProto.create = function create(properties) { + FieldDescriptorProto.create = function(properties) { return new FieldDescriptorProto(properties); }; @@ -30127,29 +39072,36 @@ * @function encode * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + FieldDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.type_name != null && Object.hasOwnProperty.call(message, "type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30158,12 +39110,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30173,46 +39125,96 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decode = function decode(reader, length) { + FieldDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldDescriptorProto(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Label[value] !== $undefined) + message.label = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 5: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Type[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 6: { + if (wireType !== 2) + break; + message.type_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.extendee = reader.string(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.default_value = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30222,11 +39224,11 @@ * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FieldDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30240,16 +39242,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldDescriptorProto.verify = function verify(message) { + FieldDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) switch (message.label) { default: return "label: enum value expected"; @@ -30258,7 +39264,7 @@ case 3: break; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -30282,17 +39288,17 @@ case 18: break; } - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) if (!$util.isString(message.type_name)) return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) if (!$util.isString(message.extendee)) return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) if (!$util.isString(message.default_value)) return "default_value: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -30307,12 +39313,18 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - FieldDescriptorProto.fromObject = function fromObject(object) { + FieldDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; switch (object.label) { @@ -30328,6 +39340,7 @@ case 3: message.label = 3; break; + default: } switch (object.type) { case "TYPE_DOUBLE": @@ -30402,17 +39415,18 @@ case 18: message.type = 18; break; + default: } if (object.type_name != null) - message.type_name = String(object.type_name); + message.type_name = $String(object.type_name); if (object.extendee != null) - message.extendee = String(object.extendee); + message.extendee = $String(object.extendee); if (object.default_value != null) - message.default_value = String(object.default_value); + message.default_value = $String(object.default_value); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -30426,36 +39440,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + FieldDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.extendee = ""; object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.label = options.enums === $String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === $String ? "TYPE_DOUBLE" : 1; object.type_name = ""; object.default_value = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) + object.label = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === $undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === $undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -30466,8 +39484,22 @@ * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldDescriptorProto.prototype.toJSON = function() { + return FieldDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldDescriptorProto"; }; /** @@ -30494,7 +39526,7 @@ * @property {number} TYPE_SINT64=18 TYPE_SINT64 value */ FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "TYPE_DOUBLE"] = 1; values[valuesById[2] = "TYPE_FLOAT"] = 2; values[valuesById[3] = "TYPE_INT64"] = 3; @@ -30525,7 +39557,7 @@ * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value */ FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "LABEL_OPTIONAL"] = 1; values[valuesById[2] = "LABEL_REQUIRED"] = 2; values[valuesById[3] = "LABEL_REPEATED"] = 3; @@ -30537,30 +39569,43 @@ protobuf.EnumDescriptorProto = (function() { + /** + * Properties of an EnumDescriptorProto. + * @typedef {Object} google.protobuf.EnumDescriptorProto.$Properties + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.EnumOptions.$Properties|null} [options] EnumDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumDescriptorProto. * @memberof google.protobuf * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @augments google.protobuf.EnumDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumDescriptorProto. + * @typedef {google.protobuf.EnumDescriptorProto.$Properties} google.protobuf.EnumDescriptorProto.$Shape */ /** * Constructs a new EnumDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumDescriptorProto(properties) { + var EnumDescriptorProto = function (properties) { this.value = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumDescriptorProto name. @@ -30572,7 +39617,7 @@ /** * EnumDescriptorProto value. - * @member {Array.} value + * @member {Array.} value * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -30580,7 +39625,7 @@ /** * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options + * @member {google.protobuf.EnumOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -30591,10 +39636,14 @@ * @function create * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumDescriptorProto.$Shape): google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumDescriptorProto.$Properties): google.protobuf.EnumDescriptorProto; + * }} */ - EnumDescriptorProto.create = function create(properties) { + EnumDescriptorProto.create = function(properties) { return new EnumDescriptorProto(properties); }; @@ -30603,20 +39652,27 @@ * @function encode * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + EnumDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30625,12 +39681,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30640,33 +39696,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decode = function decode(reader, length) { + EnumDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30676,11 +39755,11 @@ * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30694,23 +39773,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumDescriptorProto.verify = function verify(message) { + EnumDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) { + if (!$Array.isArray(message.value)) return "value: array expected"; for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i], _depth + 1); if (error) return "value." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -30725,26 +39808,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - EnumDescriptorProto.fromObject = function fromObject(object) { + EnumDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; + if (!$Array.isArray(object.value)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = $Array(object.value.length); for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + if (!$util.isObject(object.value[i])) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -30758,9 +39847,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.value = []; @@ -30768,15 +39861,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.value && message.value.length) { - object.value = []; + object.value = $Array(message.value.length); for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -30787,8 +39880,22 @@ * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumDescriptorProto.prototype.toJSON = function() { + return EnumDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumDescriptorProto"; }; return EnumDescriptorProto; @@ -30798,27 +39905,40 @@ /** * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto + * @typedef {Object} google.protobuf.EnumValueDescriptorProto.$Properties * @property {string|null} [name] EnumValueDescriptorProto name * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + * @property {google.protobuf.EnumValueOptions.$Properties|null} [options] EnumValueDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @augments google.protobuf.EnumValueDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumValueDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumValueDescriptorProto. + * @typedef {google.protobuf.EnumValueDescriptorProto.$Properties} google.protobuf.EnumValueDescriptorProto.$Shape */ /** * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueDescriptorProto(properties) { + var EnumValueDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueDescriptorProto name. @@ -30838,7 +39958,7 @@ /** * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @member {google.protobuf.EnumValueOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ @@ -30849,10 +39969,14 @@ * @function create * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumValueDescriptorProto.$Shape): google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumValueDescriptorProto.$Properties): google.protobuf.EnumValueDescriptorProto; + * }} */ - EnumValueDescriptorProto.create = function create(properties) { + EnumValueDescriptorProto.create = function(properties) { return new EnumValueDescriptorProto(properties); }; @@ -30861,19 +39985,26 @@ * @function encode * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer) { + EnumValueDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30882,12 +40013,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30897,31 +40028,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decode = function decode(reader, length) { + EnumValueDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30931,11 +40085,11 @@ * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumValueDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30949,17 +40103,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueDescriptorProto.verify = function verify(message) { + EnumValueDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -30974,18 +40132,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { + EnumValueDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -30999,21 +40163,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + EnumValueDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.number = 0; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -31024,8 +40192,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueDescriptorProto.prototype.toJSON = function() { + return EnumValueDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueDescriptorProto"; }; return EnumValueDescriptorProto; @@ -31033,30 +40215,43 @@ protobuf.ServiceDescriptorProto = (function() { + /** + * Properties of a ServiceDescriptorProto. + * @typedef {Object} google.protobuf.ServiceDescriptorProto.$Properties + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.ServiceOptions.$Properties|null} [options] ServiceDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceDescriptorProto. * @memberof google.protobuf * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + * @augments google.protobuf.ServiceDescriptorProto.$Properties + * @deprecated Use google.protobuf.ServiceDescriptorProto.$Properties instead. + */ + + /** + * Shape of a ServiceDescriptorProto. + * @typedef {google.protobuf.ServiceDescriptorProto.$Properties} google.protobuf.ServiceDescriptorProto.$Shape */ /** * Constructs a new ServiceDescriptorProto. * @memberof google.protobuf * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceDescriptorProto(properties) { + var ServiceDescriptorProto = function (properties) { this.method = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceDescriptorProto name. @@ -31068,7 +40263,7 @@ /** * ServiceDescriptorProto method. - * @member {Array.} method + * @member {Array.} method * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -31076,7 +40271,7 @@ /** * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options + * @member {google.protobuf.ServiceOptions.$Properties|null|undefined} options * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -31087,10 +40282,14 @@ * @function create * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @type {{ + * (properties: google.protobuf.ServiceDescriptorProto.$Shape): google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape; + * (properties?: google.protobuf.ServiceDescriptorProto.$Properties): google.protobuf.ServiceDescriptorProto; + * }} */ - ServiceDescriptorProto.create = function create(properties) { + ServiceDescriptorProto.create = function(properties) { return new ServiceDescriptorProto(properties); }; @@ -31099,20 +40298,27 @@ * @function encode * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + ServiceDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31121,12 +40327,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31136,33 +40342,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decode = function decode(reader, length) { + ServiceDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31172,11 +40401,11 @@ * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ServiceDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31190,23 +40419,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceDescriptorProto.verify = function verify(message) { + ServiceDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) { + if (!$Array.isArray(message.method)) return "method: array expected"; for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i], _depth + 1); if (error) return "method." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -31221,26 +40454,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - ServiceDescriptorProto.fromObject = function fromObject(object) { + ServiceDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; + if (!$Array.isArray(object.method)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = $Array(object.method.length); for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + if (!$util.isObject(object.method[i])) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -31254,9 +40493,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.method = []; @@ -31264,15 +40507,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.method && message.method.length) { - object.method = []; + object.method = $Array(message.method.length); for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -31283,8 +40526,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceDescriptorProto.prototype.toJSON = function() { + return ServiceDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceDescriptorProto"; }; return ServiceDescriptorProto; @@ -31294,28 +40551,41 @@ /** * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto + * @typedef {Object} google.protobuf.MethodDescriptorProto.$Properties * @property {string|null} [name] MethodDescriptorProto name * @property {string|null} [input_type] MethodDescriptorProto input_type * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {google.protobuf.MethodOptions.$Properties|null} [options] MethodDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @augments google.protobuf.MethodDescriptorProto.$Properties + * @deprecated Use google.protobuf.MethodDescriptorProto.$Properties instead. + */ + + /** + * Shape of a MethodDescriptorProto. + * @typedef {google.protobuf.MethodDescriptorProto.$Properties} google.protobuf.MethodDescriptorProto.$Shape */ /** * Constructs a new MethodDescriptorProto. * @memberof google.protobuf * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodDescriptorProto(properties) { + var MethodDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodDescriptorProto name. @@ -31343,7 +40613,7 @@ /** * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options + * @member {google.protobuf.MethodOptions.$Properties|null|undefined} options * @memberof google.protobuf.MethodDescriptorProto * @instance */ @@ -31354,10 +40624,14 @@ * @function create * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @type {{ + * (properties: google.protobuf.MethodDescriptorProto.$Shape): google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape; + * (properties?: google.protobuf.MethodDescriptorProto.$Properties): google.protobuf.MethodDescriptorProto; + * }} */ - MethodDescriptorProto.create = function create(properties) { + MethodDescriptorProto.create = function(properties) { return new MethodDescriptorProto(properties); }; @@ -31366,21 +40640,28 @@ * @function encode * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + MethodDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.input_type != null && Object.hasOwnProperty.call(message, "input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31389,12 +40670,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31404,34 +40685,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decode = function decode(reader, length) { + MethodDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.input_type = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.output_type = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31441,11 +40748,11 @@ * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MethodDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31459,20 +40766,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodDescriptorProto.verify = function verify(message) { + MethodDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) if (!$util.isString(message.input_type)) return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) if (!$util.isString(message.output_type)) return "output_type: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -31487,20 +40798,26 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - MethodDescriptorProto.fromObject = function fromObject(object) { + MethodDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.input_type != null) - message.input_type = String(object.input_type); + message.input_type = $String(object.input_type); if (object.output_type != null) - message.output_type = String(object.output_type); + message.output_type = $String(object.output_type); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -31514,9 +40831,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -31524,14 +40845,14 @@ object.output_type = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -31542,8 +40863,22 @@ * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodDescriptorProto.prototype.toJSON = function() { + return MethodDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodDescriptorProto"; }; return MethodDescriptorProto; @@ -31553,8 +40888,7 @@ /** * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions + * @typedef {Object} google.protobuf.FileOptions.$Properties * @property {string|null} [java_package] FileOptions java_package * @property {string|null} [java_outer_classname] FileOptions java_outer_classname * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files @@ -31563,24 +40897,38 @@ * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services * @property {boolean|null} [java_generic_services] FileOptions java_generic_services * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @augments google.protobuf.FileOptions.$Properties + * @deprecated Use google.protobuf.FileOptions.$Properties instead. + */ + + /** + * Shape of a FileOptions. + * @typedef {google.protobuf.FileOptions.$Properties} google.protobuf.FileOptions.$Shape */ /** * Constructs a new FileOptions. * @memberof google.protobuf * @classdesc Represents a FileOptions. - * @implements IFileOptions * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileOptions(properties) { + var FileOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileOptions java_package. @@ -31648,7 +40996,7 @@ /** * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FileOptions * @instance */ @@ -31659,10 +41007,14 @@ * @function create * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileOptions} FileOptions instance + * @type {{ + * (properties: google.protobuf.FileOptions.$Shape): google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape; + * (properties?: google.protobuf.FileOptions.$Properties): google.protobuf.FileOptions; + * }} */ - FileOptions.create = function create(properties) { + FileOptions.create = function(properties) { return new FileOptions(properties); }; @@ -31671,32 +41023,39 @@ * @function encode * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + FileOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.java_package != null && Object.hasOwnProperty.call(message, "java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31705,12 +41064,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31720,51 +41079,98 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decode = function decode(reader, length) { + FileOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.java_package = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.java_outer_classname = reader.string(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.java_multiple_files = reader.bool(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.java_generate_equals_and_hash = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FileOptions.OptimizeMode[value] !== $undefined) + message.optimize_for = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 16: { + if (wireType !== 0) + break; + message.cc_generic_services = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.java_generic_services = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.py_generic_services = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31774,11 +41180,11 @@ * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31792,22 +41198,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileOptions.verify = function verify(message) { + FileOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) if (!$util.isString(message.java_package)) return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) if (!$util.isString(message.java_outer_classname)) return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) if (typeof message.java_multiple_files !== "boolean") return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) if (typeof message.java_generate_equals_and_hash !== "boolean") return "java_generate_equals_and_hash: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) switch (message.optimize_for) { default: return "optimize_for: enum value expected"; @@ -31816,20 +41226,20 @@ case 3: break; } - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) if (typeof message.cc_generic_services !== "boolean") return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) if (typeof message.java_generic_services !== "boolean") return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) if (typeof message.py_generic_services !== "boolean") return "py_generic_services: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -31845,18 +41255,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileOptions} FileOptions */ - FileOptions.fromObject = function fromObject(object) { + FileOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileOptions(); if (object.java_package != null) - message.java_package = String(object.java_package); + message.java_package = $String(object.java_package); if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); + message.java_outer_classname = $String(object.java_outer_classname); if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); + message.java_multiple_files = $Boolean(object.java_multiple_files); if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); + message.java_generate_equals_and_hash = $Boolean(object.java_generate_equals_and_hash); switch (object.optimize_for) { case "SPEED": case 1: @@ -31870,21 +41286,22 @@ case 3: message.optimize_for = 3; break; + default: } if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); + message.cc_generic_services = $Boolean(object.cc_generic_services); if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); + message.java_generic_services = $Boolean(object.java_generic_services); if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); + message.py_generic_services = $Boolean(object.py_generic_services); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -31899,42 +41316,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + FileOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { object.java_package = ""; object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; + object.optimize_for = options.enums === $String ? "SPEED" : 1; object.java_multiple_files = false; object.cc_generic_services = false; object.java_generic_services = false; object.py_generic_services = false; object.java_generate_equals_and_hash = false; } - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) + object.optimize_for = options.enums === $String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] === $undefined ? message.optimize_for : $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) object.java_multiple_files = message.java_multiple_files; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -31946,8 +41367,22 @@ * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileOptions.prototype.toJSON = function() { + return FileOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileOptions"; }; /** @@ -31959,7 +41394,7 @@ * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value */ FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "SPEED"] = 1; values[valuesById[2] = "CODE_SIZE"] = 2; values[valuesById[3] = "LITE_RUNTIME"] = 3; @@ -31973,30 +41408,45 @@ /** * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions + * @typedef {Object} google.protobuf.MessageOptions.$Properties * @property {boolean|null} [message_set_wire_format] MessageOptions message_set_wire_format * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option * @property {number|null} [".msgpool_soft_limit"] MessageOptions .msgpool_soft_limit * @property {number|null} [".msgpool_hard_limit"] MessageOptions .msgpool_hard_limit + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @augments google.protobuf.MessageOptions.$Properties + * @deprecated Use google.protobuf.MessageOptions.$Properties instead. + */ + + /** + * Shape of a MessageOptions. + * @typedef {google.protobuf.MessageOptions.$Properties} google.protobuf.MessageOptions.$Shape */ /** * Constructs a new MessageOptions. * @memberof google.protobuf * @classdesc Represents a MessageOptions. - * @implements IMessageOptions * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set + * @property {number} ".msgpool_soft_limit" MessageOptions .msgpool_soft_limit + * @property {number} ".msgpool_hard_limit" MessageOptions .msgpool_hard_limit + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MessageOptions(properties) { + var MessageOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MessageOptions message_set_wire_format. @@ -32016,26 +41466,13 @@ /** * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MessageOptions * @instance */ MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * MessageOptions .msgpool_soft_limit. - * @member {number} .msgpool_soft_limit - * @memberof google.protobuf.MessageOptions - * @instance - */ MessageOptions.prototype[".msgpool_soft_limit"] = 32; - - /** - * MessageOptions .msgpool_hard_limit. - * @member {number} .msgpool_hard_limit - * @memberof google.protobuf.MessageOptions - * @instance - */ MessageOptions.prototype[".msgpool_hard_limit"] = 384; /** @@ -32043,10 +41480,14 @@ * @function create * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @type {{ + * (properties: google.protobuf.MessageOptions.$Shape): google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape; + * (properties?: google.protobuf.MessageOptions.$Properties): google.protobuf.MessageOptions; + * }} */ - MessageOptions.create = function create(properties) { + MessageOptions.create = function(properties) { return new MessageOptions(properties); }; @@ -32055,24 +41496,31 @@ * @function encode * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + MessageOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".msgpool_soft_limit"] != null && Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) writer.uint32(/* id 60000, wireType 0 =*/480000).int32(message[".msgpool_soft_limit"]); - if (message[".msgpool_hard_limit"] != null && Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) writer.uint32(/* id 60001, wireType 0 =*/480008).int32(message[".msgpool_hard_limit"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32081,12 +41529,12 @@ * @function encodeDelimited * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32096,39 +41544,68 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decode = function decode(reader, length) { + MessageOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MessageOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 60000: - message[".msgpool_soft_limit"] = reader.int32(); - break; - case 60001: - message[".msgpool_hard_limit"] = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.message_set_wire_format = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.no_standard_descriptor_accessor = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 60000: { + if (wireType !== 0) + break; + message[".msgpool_soft_limit"] = reader.int32(); + continue; + } + case 60001: { + if (wireType !== 0) + break; + message[".msgpool_hard_limit"] = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32138,11 +41615,11 @@ * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32156,28 +41633,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageOptions.verify = function verify(message) { + MessageOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) if (typeof message.message_set_wire_format !== "boolean") return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) if (typeof message.no_standard_descriptor_accessor !== "boolean") return "no_standard_descriptor_accessor: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".msgpool_soft_limit")) + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) if (!$util.isInteger(message[".msgpool_soft_limit"])) return ".msgpool_soft_limit: integer expected"; - if (message[".msgpool_hard_limit"] != null && message.hasOwnProperty(".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) if (!$util.isInteger(message[".msgpool_hard_limit"])) return ".msgpool_hard_limit: integer expected"; return null; @@ -32191,22 +41672,28 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MessageOptions} MessageOptions */ - MessageOptions.fromObject = function fromObject(object) { + MessageOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MessageOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MessageOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MessageOptions(); if (object.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); + message.message_set_wire_format = $Boolean(object.message_set_wire_format); if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); + message.no_standard_descriptor_accessor = $Boolean(object.no_standard_descriptor_accessor); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } if (object[".msgpool_soft_limit"] != null) @@ -32225,9 +41712,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + MessageOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; @@ -32237,18 +41728,18 @@ object[".msgpool_soft_limit"] = 32; object[".msgpool_hard_limit"] = 384; } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".msgpool_soft_limit")) + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) object[".msgpool_soft_limit"] = message[".msgpool_soft_limit"]; - if (message[".msgpool_hard_limit"] != null && message.hasOwnProperty(".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) object[".msgpool_hard_limit"] = message[".msgpool_hard_limit"]; return object; }; @@ -32260,8 +41751,22 @@ * @instance * @returns {Object.} JSON object */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MessageOptions.prototype.toJSON = function() { + return MessageOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MessageOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MessageOptions"; }; return MessageOptions; @@ -32271,31 +41776,45 @@ /** * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions + * @typedef {Object} google.protobuf.FieldOptions.$Properties * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype * @property {boolean|null} [packed] FieldOptions packed * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {string|null} [experimental_map_key] FieldOptions experimental_map_key - * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option * @property {boolean|null} [".key_field"] FieldOptions .key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @augments google.protobuf.FieldOptions.$Properties + * @deprecated Use google.protobuf.FieldOptions.$Properties instead. + */ + + /** + * Shape of a FieldOptions. + * @typedef {google.protobuf.FieldOptions.$Properties} google.protobuf.FieldOptions.$Shape */ /** * Constructs a new FieldOptions. * @memberof google.protobuf * @classdesc Represents a FieldOptions. - * @implements IFieldOptions * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set + * @property {boolean} ".key_field" FieldOptions .key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FieldOptions(properties) { + var FieldOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldOptions ctype. @@ -32331,18 +41850,12 @@ /** * FieldOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * FieldOptions .key_field. - * @member {boolean} .key_field - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".key_field"] = false; /** @@ -32350,10 +41863,14 @@ * @function create * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @type {{ + * (properties: google.protobuf.FieldOptions.$Shape): google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape; + * (properties?: google.protobuf.FieldOptions.$Properties): google.protobuf.FieldOptions; + * }} */ - FieldOptions.create = function create(properties) { + FieldOptions.create = function(properties) { return new FieldOptions(properties); }; @@ -32362,26 +41879,33 @@ * @function encode * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + FieldOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.experimental_map_key != null && Object.hasOwnProperty.call(message, "experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.experimental_map_key); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".key_field"] != null && Object.hasOwnProperty.call(message, ".key_field")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) writer.uint32(/* id 60000, wireType 0 =*/480000).bool(message[".key_field"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32390,12 +41914,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32405,42 +41929,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decode = function decode(reader, length) { + FieldOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 9: - message.experimental_map_key = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 60000: - message[".key_field"] = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldOptions.CType[value] !== $undefined) + message.ctype = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + message.packed = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.deprecated = reader.bool(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.experimental_map_key = reader.string(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 60000: { + if (wireType !== 0) + break; + message[".key_field"] = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32450,11 +42012,11 @@ * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32468,10 +42030,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldOptions.verify = function verify(message) { + FieldOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) switch (message.ctype) { default: return "ctype: enum value expected"; @@ -32480,25 +42046,25 @@ case 2: break; } - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) if (typeof message.packed !== "boolean") return "packed: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) if (!$util.isString(message.experimental_map_key)) return "experimental_map_key: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".key_field"] != null && message.hasOwnProperty(".key_field")) + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) if (typeof message[".key_field"] !== "boolean") return ".key_field: boolean expected"; return null; @@ -32512,9 +42078,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldOptions} FieldOptions */ - FieldOptions.fromObject = function fromObject(object) { + FieldOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { case "STRING": @@ -32529,25 +42101,26 @@ case 2: message.ctype = 2; break; + default: } if (object.packed != null) - message.packed = Boolean(object.packed); + message.packed = $Boolean(object.packed); if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); + message.deprecated = $Boolean(object.deprecated); if (object.experimental_map_key != null) - message.experimental_map_key = String(object.experimental_map_key); + message.experimental_map_key = $String(object.experimental_map_key); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } if (object[".key_field"] != null) - message[".key_field"] = Boolean(object[".key_field"]); + message[".key_field"] = $Boolean(object[".key_field"]); return message; }; @@ -32560,33 +42133,37 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + FieldOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; + object.ctype = options.enums === $String ? "STRING" : 0; object.packed = false; object.deprecated = false; object.experimental_map_key = ""; object[".key_field"] = false; } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) + object.ctype = options.enums === $String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === $undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) object.experimental_map_key = message.experimental_map_key; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".key_field"] != null && message.hasOwnProperty(".key_field")) + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) object[".key_field"] = message[".key_field"]; return object; }; @@ -32598,8 +42175,22 @@ * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldOptions.prototype.toJSON = function() { + return FieldOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldOptions"; }; /** @@ -32611,7 +42202,7 @@ * @property {number} STRING_PIECE=2 STRING_PIECE value */ FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "STRING"] = 0; values[valuesById[1] = "CORD"] = 1; values[valuesById[2] = "STRING_PIECE"] = 2; @@ -32623,32 +42214,45 @@ protobuf.EnumOptions = (function() { + /** + * Properties of an EnumOptions. + * @typedef {Object} google.protobuf.EnumOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumOptions. * @memberof google.protobuf * @interface IEnumOptions - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @augments google.protobuf.EnumOptions.$Properties + * @deprecated Use google.protobuf.EnumOptions.$Properties instead. + */ + + /** + * Shape of an EnumOptions. + * @typedef {google.protobuf.EnumOptions.$Properties} google.protobuf.EnumOptions.$Shape */ /** * Constructs a new EnumOptions. * @memberof google.protobuf * @classdesc Represents an EnumOptions. - * @implements IEnumOptions * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumOptions(properties) { + var EnumOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumOptions * @instance */ @@ -32659,10 +42263,14 @@ * @function create * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @type {{ + * (properties: google.protobuf.EnumOptions.$Shape): google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape; + * (properties?: google.protobuf.EnumOptions.$Properties): google.protobuf.EnumOptions; + * }} */ - EnumOptions.create = function create(properties) { + EnumOptions.create = function(properties) { return new EnumOptions(properties); }; @@ -32671,16 +42279,23 @@ * @function encode * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + EnumOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32689,12 +42304,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32704,27 +42319,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length) { + EnumOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32734,11 +42366,11 @@ * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32752,14 +42384,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumOptions.verify = function verify(message) { + EnumOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -32775,18 +42411,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumOptions} EnumOptions */ - EnumOptions.fromObject = function fromObject(object) { + EnumOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -32801,16 +42443,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + EnumOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -32822,8 +42468,22 @@ * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumOptions.prototype.toJSON = function() { + return EnumOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumOptions"; }; return EnumOptions; @@ -32831,32 +42491,45 @@ protobuf.EnumValueOptions = (function() { + /** + * Properties of an EnumValueOptions. + * @typedef {Object} google.protobuf.EnumValueOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumValueOptions. * @memberof google.protobuf * @interface IEnumValueOptions - * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @augments google.protobuf.EnumValueOptions.$Properties + * @deprecated Use google.protobuf.EnumValueOptions.$Properties instead. + */ + + /** + * Shape of an EnumValueOptions. + * @typedef {google.protobuf.EnumValueOptions.$Properties} google.protobuf.EnumValueOptions.$Shape */ /** * Constructs a new EnumValueOptions. * @memberof google.protobuf * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueOptions(properties) { + var EnumValueOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumValueOptions * @instance */ @@ -32867,10 +42540,14 @@ * @function create * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @type {{ + * (properties: google.protobuf.EnumValueOptions.$Shape): google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape; + * (properties?: google.protobuf.EnumValueOptions.$Properties): google.protobuf.EnumValueOptions; + * }} */ - EnumValueOptions.create = function create(properties) { + EnumValueOptions.create = function(properties) { return new EnumValueOptions(properties); }; @@ -32879,16 +42556,23 @@ * @function encode * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + EnumValueOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32897,12 +42581,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32912,27 +42596,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + EnumValueOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32942,11 +42643,11 @@ * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32960,14 +42661,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueOptions.verify = function verify(message) { + EnumValueOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -32983,18 +42688,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - EnumValueOptions.fromObject = function fromObject(object) { + EnumValueOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -33009,16 +42720,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -33030,8 +42745,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueOptions.prototype.toJSON = function() { + return EnumValueOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueOptions"; }; return EnumValueOptions; @@ -33039,32 +42768,45 @@ protobuf.ServiceOptions = (function() { + /** + * Properties of a ServiceOptions. + * @typedef {Object} google.protobuf.ServiceOptions.$Properties + * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceOptions. * @memberof google.protobuf * @interface IServiceOptions - * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @augments google.protobuf.ServiceOptions.$Properties + * @deprecated Use google.protobuf.ServiceOptions.$Properties instead. + */ + + /** + * Shape of a ServiceOptions. + * @typedef {google.protobuf.ServiceOptions.$Properties} google.protobuf.ServiceOptions.$Shape */ /** * Constructs a new ServiceOptions. * @memberof google.protobuf * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceOptions(properties) { + var ServiceOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.ServiceOptions * @instance */ @@ -33075,10 +42817,14 @@ * @function create * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @type {{ + * (properties: google.protobuf.ServiceOptions.$Shape): google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape; + * (properties?: google.protobuf.ServiceOptions.$Properties): google.protobuf.ServiceOptions; + * }} */ - ServiceOptions.create = function create(properties) { + ServiceOptions.create = function(properties) { return new ServiceOptions(properties); }; @@ -33087,16 +42833,23 @@ * @function encode * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + ServiceOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33105,12 +42858,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33120,27 +42873,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + ServiceOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33150,11 +42920,11 @@ * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33168,14 +42938,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + ServiceOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -33191,18 +42965,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - ServiceOptions.fromObject = function fromObject(object) { + ServiceOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -33217,16 +42997,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -33238,8 +43022,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceOptions.prototype.toJSON = function() { + return ServiceOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceOptions"; }; return ServiceOptions; @@ -33247,32 +43045,45 @@ protobuf.MethodOptions = (function() { + /** + * Properties of a MethodOptions. + * @typedef {Object} google.protobuf.MethodOptions.$Properties + * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a MethodOptions. * @memberof google.protobuf * @interface IMethodOptions - * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @augments google.protobuf.MethodOptions.$Properties + * @deprecated Use google.protobuf.MethodOptions.$Properties instead. + */ + + /** + * Shape of a MethodOptions. + * @typedef {google.protobuf.MethodOptions.$Properties} google.protobuf.MethodOptions.$Shape */ /** * Constructs a new MethodOptions. * @memberof google.protobuf * @classdesc Represents a MethodOptions. - * @implements IMethodOptions * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodOptions(properties) { + var MethodOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MethodOptions * @instance */ @@ -33283,10 +43094,14 @@ * @function create * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @type {{ + * (properties: google.protobuf.MethodOptions.$Shape): google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape; + * (properties?: google.protobuf.MethodOptions.$Properties): google.protobuf.MethodOptions; + * }} */ - MethodOptions.create = function create(properties) { + MethodOptions.create = function(properties) { return new MethodOptions(properties); }; @@ -33295,16 +43110,23 @@ * @function encode * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + MethodOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33313,12 +43135,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33328,27 +43150,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + MethodOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33358,11 +43197,11 @@ * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33376,14 +43215,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + MethodOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -33399,18 +43242,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodOptions} MethodOptions */ - MethodOptions.fromObject = function fromObject(object) { + MethodOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -33425,16 +43274,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + MethodOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -33446,8 +43299,22 @@ * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodOptions.prototype.toJSON = function() { + return MethodOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodOptions"; }; return MethodOptions; @@ -33457,36 +43324,49 @@ /** * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name + * @typedef {Object} google.protobuf.UninterpretedOption.$Properties + * @property {Array.|null} [name] UninterpretedOption name * @property {string|null} [identifier_value] UninterpretedOption identifier_value * @property {number|Long|null} [positive_int_value] UninterpretedOption positive_int_value * @property {number|Long|null} [negative_int_value] UninterpretedOption negative_int_value * @property {number|null} [double_value] UninterpretedOption double_value * @property {Uint8Array|null} [string_value] UninterpretedOption string_value * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @augments google.protobuf.UninterpretedOption.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.$Properties instead. + */ + + /** + * Shape of an UninterpretedOption. + * @typedef {google.protobuf.UninterpretedOption.$Properties} google.protobuf.UninterpretedOption.$Shape */ /** * Constructs a new UninterpretedOption. * @memberof google.protobuf * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function UninterpretedOption(properties) { + var UninterpretedOption = function (properties) { this.name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * UninterpretedOption name. - * @member {Array.} name + * @member {Array.} name * @memberof google.protobuf.UninterpretedOption * @instance */ @@ -33545,10 +43425,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.$Shape): google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape; + * (properties?: google.protobuf.UninterpretedOption.$Properties): google.protobuf.UninterpretedOption; + * }} */ - UninterpretedOption.create = function create(properties) { + UninterpretedOption.create = function(properties) { return new UninterpretedOption(properties); }; @@ -33557,28 +43441,35 @@ * @function encode * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + UninterpretedOption.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33587,12 +43478,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + UninterpretedOption.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33602,45 +43493,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + UninterpretedOption.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 2) + break; + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.identifier_value = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.positive_int_value = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.negative_int_value = reader.int64(); + continue; + } + case 6: { + if (wireType !== 1) + break; + message.double_value = reader.double(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.string_value = reader.bytes(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.aggregate_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33650,11 +43576,11 @@ * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33668,34 +43594,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + UninterpretedOption.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) { + if (!$Array.isArray(message.name)) return "name: array expected"; for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i], _depth + 1); if (error) return "name." + error; } } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) if (!$util.isString(message.identifier_value)) return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) if (typeof message.double_value !== "number") return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) if (!$util.isString(message.aggregate_value)) return "aggregate_value: string expected"; return null; @@ -33709,49 +43639,55 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - UninterpretedOption.fromObject = function fromObject(object) { + UninterpretedOption.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption(); if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; + if (!$Array.isArray(object.name)) + throw $TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = $Array(object.name.length); for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + if (!$util.isObject(object.name[i])) + throw $TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], _depth + 1); } } if (object.identifier_value != null) - message.identifier_value = String(object.identifier_value); + message.identifier_value = $String(object.identifier_value); if (object.positive_int_value != null) if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; + message.positive_int_value = $util.Long.fromValue(object.positive_int_value, true); else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); + message.positive_int_value = $parseInt(object.positive_int_value, 10); else if (typeof object.positive_int_value === "number") message.positive_int_value = object.positive_int_value; else if (typeof object.positive_int_value === "object") message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); if (object.negative_int_value != null) if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; + message.negative_int_value = $util.Long.fromValue(object.negative_int_value, false); else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); + message.negative_int_value = $parseInt(object.negative_int_value, 10); else if (typeof object.negative_int_value === "number") message.negative_int_value = object.negative_int_value; else if (typeof object.negative_int_value === "object") message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); if (object.double_value != null) - message.double_value = Number(object.double_value); + message.double_value = $Number(object.double_value); if (object.string_value != null) if (typeof object.string_value === "string") $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) + else if (object.string_value.length >= 0) message.string_value = object.string_value; if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); + message.aggregate_value = $String(object.aggregate_value); return message; }; @@ -33764,9 +43700,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.name = []; @@ -33774,46 +43714,50 @@ object.identifier_value = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.positive_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.positive_int_value = options.longs === String ? "0" : 0; + object.positive_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.negative_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.negative_int_value = options.longs === String ? "0" : 0; + object.negative_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.double_value = 0; - if (options.bytes === String) + if (options.bytes === $String) object.string_value = ""; else { object.string_value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.string_value = $util.newBuffer(object.string_value); } object.aggregate_value = ""; } if (message.name && message.name.length) { - object.name = []; + object.name = $Array(message.name.length); for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options, _depth + 1); } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.positive_int_value = typeof message.positive_int_value === "number" ? $BigInt(message.positive_int_value) : $util.Long.fromBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0, true).toBigInt(); + else if (typeof message.positive_int_value === "number") + object.positive_int_value = options.longs === $String ? $String(message.positive_int_value) : message.positive_int_value; else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; + object.positive_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === $Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.negative_int_value = typeof message.negative_int_value === "number" ? $BigInt(message.negative_int_value) : $util.Long.fromBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0, false).toBigInt(); + else if (typeof message.negative_int_value === "number") + object.negative_int_value = options.longs === $String ? $String(message.negative_int_value) : message.negative_int_value; else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + object.negative_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === $Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) + object.double_value = options.json && !$isFinite(message.double_value) ? $String(message.double_value) : message.double_value; + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) + object.string_value = options.bytes === $String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.string_value) : message.string_value; + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) object.aggregate_value = message.aggregate_value; return object; }; @@ -33825,34 +43769,61 @@ * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + UninterpretedOption.prototype.toJSON = function() { + return UninterpretedOption.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + UninterpretedOption.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption"; }; UninterpretedOption.NamePart = (function() { /** * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart + * @typedef {Object} google.protobuf.UninterpretedOption.NamePart.$Properties * @property {string} name_part NamePart name_part * @property {boolean} is_extension NamePart is_extension + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @augments google.protobuf.UninterpretedOption.NamePart.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.NamePart.$Properties instead. + */ + + /** + * Shape of a NamePart. + * @typedef {google.protobuf.UninterpretedOption.NamePart.$Properties} google.protobuf.UninterpretedOption.NamePart.$Shape */ /** * Constructs a new NamePart. * @memberof google.protobuf.UninterpretedOption * @classdesc Represents a NamePart. - * @implements INamePart * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function NamePart(properties) { + var NamePart = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * NamePart name_part. @@ -33875,10 +43846,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.NamePart.$Shape): google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape; + * (properties?: google.protobuf.UninterpretedOption.NamePart.$Properties): google.protobuf.UninterpretedOption.NamePart; + * }} */ - NamePart.create = function create(properties) { + NamePart.create = function(properties) { return new NamePart(properties); }; @@ -33887,15 +43862,22 @@ * @function encode * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + NamePart.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 2 =*/10).string(message.name_part); writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33904,12 +43886,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + NamePart.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33919,31 +43901,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decode = function decode(reader, length) { + NamePart.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption.NamePart(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name_part = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.is_extension = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("name_part")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "name_part")) throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) + if (!$Object.hasOwnProperty.call(message, "is_extension")) throw $util.ProtocolError("missing required 'is_extension'", { instance: message }); return message; }; @@ -33954,11 +43956,11 @@ * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decodeDelimited = function decodeDelimited(reader) { + NamePart.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33972,9 +43974,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NamePart.verify = function verify(message) { + NamePart.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isString(message.name_part)) return "name_part: string expected"; if (typeof message.is_extension !== "boolean") @@ -33990,14 +43996,20 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart */ - NamePart.fromObject = function fromObject(object) { + NamePart.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption.NamePart(); if (object.name_part != null) - message.name_part = String(object.name_part); + message.name_part = $String(object.name_part); if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); + message.is_extension = $Boolean(object.is_extension); return message; }; @@ -34010,17 +44022,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + NamePart.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name_part = ""; object.is_extension = false; } - if (message.name_part != null && message.hasOwnProperty("name_part")) + if (message.name_part != null && $Object.hasOwnProperty.call(message, "name_part")) object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) + if (message.is_extension != null && $Object.hasOwnProperty.call(message, "is_extension")) object.is_extension = message.is_extension; return object; }; @@ -34032,8 +44048,22 @@ * @instance * @returns {Object.} JSON object */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + NamePart.prototype.toJSON = function() { + return NamePart.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + NamePart.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption.NamePart"; }; return NamePart; @@ -34044,32 +44074,45 @@ protobuf.SourceCodeInfo = (function() { + /** + * Properties of a SourceCodeInfo. + * @typedef {Object} google.protobuf.SourceCodeInfo.$Properties + * @property {Array.|null} [location] SourceCodeInfo location + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a SourceCodeInfo. * @memberof google.protobuf * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @augments google.protobuf.SourceCodeInfo.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.$Properties instead. + */ + + /** + * Shape of a SourceCodeInfo. + * @typedef {google.protobuf.SourceCodeInfo.$Properties} google.protobuf.SourceCodeInfo.$Shape */ /** * Constructs a new SourceCodeInfo. * @memberof google.protobuf * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SourceCodeInfo(properties) { + var SourceCodeInfo = function (properties) { this.location = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SourceCodeInfo location. - * @member {Array.} location + * @member {Array.} location * @memberof google.protobuf.SourceCodeInfo * @instance */ @@ -34080,10 +44123,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.$Shape): google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.$Properties): google.protobuf.SourceCodeInfo; + * }} */ - SourceCodeInfo.create = function create(properties) { + SourceCodeInfo.create = function(properties) { return new SourceCodeInfo(properties); }; @@ -34092,16 +44139,23 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + SourceCodeInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.location != null && message.location.length) for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -34110,12 +44164,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SourceCodeInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -34125,27 +44179,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + SourceCodeInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -34155,11 +44226,11 @@ * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34173,14 +44244,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + SourceCodeInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.location != null && $Object.hasOwnProperty.call(message, "location")) { + if (!$Array.isArray(message.location)) return "location: array expected"; for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i], _depth + 1); if (error) return "location." + error; } @@ -34196,18 +44271,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - SourceCodeInfo.fromObject = function fromObject(object) { + SourceCodeInfo.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo(); if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; + if (!$Array.isArray(object.location)) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = $Array(object.location.length); for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + if (!$util.isObject(object.location[i])) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], _depth + 1); } } return message; @@ -34222,16 +44303,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.location = []; if (message.location && message.location.length) { - object.location = []; + object.location = $Array(message.location.length); for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options, _depth + 1); } return object; }; @@ -34243,36 +44328,63 @@ * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SourceCodeInfo.prototype.toJSON = function() { + return SourceCodeInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SourceCodeInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo"; }; SourceCodeInfo.Location = (function() { /** * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation + * @typedef {Object} google.protobuf.SourceCodeInfo.Location.$Properties * @property {Array.|null} [path] Location path * @property {Array.|null} [span] Location span + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @augments google.protobuf.SourceCodeInfo.Location.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.Location.$Properties instead. + */ + + /** + * Shape of a Location. + * @typedef {google.protobuf.SourceCodeInfo.Location.$Properties} google.protobuf.SourceCodeInfo.Location.$Shape */ /** * Constructs a new Location. * @memberof google.protobuf.SourceCodeInfo * @classdesc Represents a Location. - * @implements ILocation * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Location(properties) { + var Location = function (properties) { this.path = []; this.span = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Location path. @@ -34295,10 +44407,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.Location.$Shape): google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.Location.$Properties): google.protobuf.SourceCodeInfo.Location; + * }} */ - Location.create = function create(properties) { + Location.create = function(properties) { return new Location(properties); }; @@ -34307,25 +44423,24 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer) { + Location.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && message.path.length) + writer.uint32(/* id 1, wireType 2 =*/10).int32s(message.path); + if (message.span != null && message.span.length) + writer.uint32(/* id 2, wireType 2 =*/18).int32s(message.span); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -34334,12 +44449,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Location.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -34349,42 +44464,64 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decode = function decode(reader, length) { + Location.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.path && message.path.length)) + message.path = []; + reader.int32s(message.path); + continue; + } + if (wireType !== 0) + break; + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.int32()); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.span && message.span.length)) + message.span = []; + reader.int32s(message.span); + continue; + } + if (wireType !== 0) + break; + if (!(message.span && message.span.length)) + message.span = []; message.span.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -34394,11 +44531,11 @@ * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34412,18 +44549,22 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Location.verify = function verify(message) { + Location.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) { + if (!$Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) + if (message.span != null && $Object.hasOwnProperty.call(message, "span")) { + if (!$Array.isArray(message.span)) return "span: array expected"; for (var i = 0; i < message.span.length; ++i) if (!$util.isInteger(message.span[i])) @@ -34440,21 +44581,27 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo.Location} Location */ - Location.fromObject = function fromObject(object) { + Location.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo.Location(); if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; + if (!$Array.isArray(object.path)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = $Array(object.path.length); for (var i = 0; i < object.path.length; ++i) message.path[i] = object.path[i] | 0; } if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; + if (!$Array.isArray(object.span)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = $Array(object.span.length); for (var i = 0; i < object.span.length; ++i) message.span[i] = object.span[i] | 0; } @@ -34470,21 +44617,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + Location.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.path = []; object.span = []; } if (message.path && message.path.length) { - object.path = []; + object.path = $Array(message.path.length); for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } if (message.span && message.span.length) { - object.span = []; + object.span = $Array(message.span.length); for (var j = 0; j < message.span.length; ++j) object.span[j] = message.span[j]; } @@ -34498,8 +44649,22 @@ * @instance * @returns {Object.} JSON object */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Location.prototype.toJSON = function() { + return Location.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Location.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo.Location"; }; return Location; diff --git a/protobufs/generated/gcsystemmsgs.js b/protobufs/generated/gcsystemmsgs.js index 39ec810..f1cf6a1 100644 --- a/protobufs/generated/gcsystemmsgs.js +++ b/protobufs/generated/gcsystemmsgs.js @@ -1,4 +1,4 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-mixed-operators, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars, default-case, jsdoc/require-param*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) @@ -12,13 +12,14 @@ // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + var $Object = $util.global.Object, $undefined = $util.global.undefined, $Error = $util.global.Error, $TypeError = $util.global.TypeError, $String = $util.global.String, $Array = $util.global.Array, $parseInt = $util.global.parseInt, $Number = $util.global.Number, $BigInt = $util.global.BigInt; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); /** * EGCSystemMsg enum. - * @exports EGCSystemMsg + * @name EGCSystemMsg * @enum {number} * @property {number} k_EGCMsgInvalid=0 k_EGCMsgInvalid value * @property {number} k_EGCMsgMulti=1 k_EGCMsgMulti value @@ -122,7 +123,7 @@ * @property {number} k_EGCMsgTerminateGamePersonalDataEntriesResponse=529 k_EGCMsgTerminateGamePersonalDataEntriesResponse value */ $root.EGCSystemMsg = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "k_EGCMsgInvalid"] = 0; values[valuesById[1] = "k_EGCMsgMulti"] = 1; values[valuesById[10] = "k_EGCMsgGenericReply"] = 10; @@ -228,7 +229,7 @@ /** * ESOMsg enum. - * @exports ESOMsg + * @name ESOMsg * @enum {number} * @property {number} k_ESOMsg_Create=21 k_ESOMsg_Create value * @property {number} k_ESOMsg_Update=22 k_ESOMsg_Update value @@ -241,7 +242,7 @@ * @property {number} k_ESOMsg_CacheSubscribedUpToDate=29 k_ESOMsg_CacheSubscribedUpToDate value */ $root.ESOMsg = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[21] = "k_ESOMsg_Create"] = 21; values[valuesById[22] = "k_ESOMsg_Update"] = 22; values[valuesById[23] = "k_ESOMsg_Destroy"] = 23; @@ -256,7 +257,7 @@ /** * EGCBaseClientMsg enum. - * @exports EGCBaseClientMsg + * @name EGCBaseClientMsg * @enum {number} * @property {number} k_EMsgGCPingRequest=3001 k_EMsgGCPingRequest value * @property {number} k_EMsgGCPingResponse=3002 k_EMsgGCPingResponse value @@ -268,7 +269,7 @@ * @property {number} k_EMsgGCServerGoodbye=4009 k_EMsgGCServerGoodbye value */ $root.EGCBaseClientMsg = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[3001] = "k_EMsgGCPingRequest"] = 3001; values[valuesById[3002] = "k_EMsgGCPingResponse"] = 3002; values[valuesById[4004] = "k_EMsgGCClientWelcome"] = 4004; @@ -282,7 +283,7 @@ /** * EGCToGCMsg enum. - * @exports EGCToGCMsg + * @name EGCToGCMsg * @enum {number} * @property {number} k_EGCToGCMsgMasterAck=150 k_EGCToGCMsgMasterAck value * @property {number} k_EGCToGCMsgMasterAckResponse=151 k_EGCToGCMsgMasterAckResponse value @@ -296,7 +297,7 @@ * @property {number} k_EMsgGCToGCSOCacheUnsubscribe=159 k_EMsgGCToGCSOCacheUnsubscribe value */ $root.EGCToGCMsg = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[150] = "k_EGCToGCMsgMasterAck"] = 150; values[valuesById[151] = "k_EGCToGCMsgMasterAckResponse"] = 151; values[valuesById[152] = "k_EGCToGCMsgRouted"] = 152; @@ -314,27 +315,40 @@ /** * Properties of a CCommunity_GamePersonalDataCategoryInfo. - * @exports ICCommunity_GamePersonalDataCategoryInfo - * @interface ICCommunity_GamePersonalDataCategoryInfo + * @typedef {Object} CCommunity_GamePersonalDataCategoryInfo.$Properties * @property {string|null} [type] CCommunity_GamePersonalDataCategoryInfo type * @property {string|null} [localization_token] CCommunity_GamePersonalDataCategoryInfo localization_token * @property {string|null} [template_file] CCommunity_GamePersonalDataCategoryInfo template_file + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CCommunity_GamePersonalDataCategoryInfo. + * @exports ICCommunity_GamePersonalDataCategoryInfo + * @interface ICCommunity_GamePersonalDataCategoryInfo + * @augments CCommunity_GamePersonalDataCategoryInfo.$Properties + * @deprecated Use CCommunity_GamePersonalDataCategoryInfo.$Properties instead. + */ + + /** + * Shape of a CCommunity_GamePersonalDataCategoryInfo. + * @typedef {CCommunity_GamePersonalDataCategoryInfo.$Properties} CCommunity_GamePersonalDataCategoryInfo.$Shape */ /** * Constructs a new CCommunity_GamePersonalDataCategoryInfo. * @exports CCommunity_GamePersonalDataCategoryInfo * @classdesc Represents a CCommunity_GamePersonalDataCategoryInfo. - * @implements ICCommunity_GamePersonalDataCategoryInfo * @constructor - * @param {ICCommunity_GamePersonalDataCategoryInfo=} [properties] Properties to set + * @param {CCommunity_GamePersonalDataCategoryInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CCommunity_GamePersonalDataCategoryInfo(properties) { + var CCommunity_GamePersonalDataCategoryInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CCommunity_GamePersonalDataCategoryInfo type. @@ -365,10 +379,14 @@ * @function create * @memberof CCommunity_GamePersonalDataCategoryInfo * @static - * @param {ICCommunity_GamePersonalDataCategoryInfo=} [properties] Properties to set + * @param {CCommunity_GamePersonalDataCategoryInfo.$Properties=} [properties] Properties to set * @returns {CCommunity_GamePersonalDataCategoryInfo} CCommunity_GamePersonalDataCategoryInfo instance + * @type {{ + * (properties: CCommunity_GamePersonalDataCategoryInfo.$Shape): CCommunity_GamePersonalDataCategoryInfo & CCommunity_GamePersonalDataCategoryInfo.$Shape; + * (properties?: CCommunity_GamePersonalDataCategoryInfo.$Properties): CCommunity_GamePersonalDataCategoryInfo; + * }} */ - CCommunity_GamePersonalDataCategoryInfo.create = function create(properties) { + CCommunity_GamePersonalDataCategoryInfo.create = function(properties) { return new CCommunity_GamePersonalDataCategoryInfo(properties); }; @@ -377,19 +395,26 @@ * @function encode * @memberof CCommunity_GamePersonalDataCategoryInfo * @static - * @param {ICCommunity_GamePersonalDataCategoryInfo} message CCommunity_GamePersonalDataCategoryInfo message or plain object to encode + * @param {CCommunity_GamePersonalDataCategoryInfo.$Properties} message CCommunity_GamePersonalDataCategoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_GamePersonalDataCategoryInfo.encode = function encode(message, writer) { + CCommunity_GamePersonalDataCategoryInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.localization_token != null && Object.hasOwnProperty.call(message, "localization_token")) + if (message.localization_token != null && $Object.hasOwnProperty.call(message, "localization_token")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.localization_token); - if (message.template_file != null && Object.hasOwnProperty.call(message, "template_file")) + if (message.template_file != null && $Object.hasOwnProperty.call(message, "template_file")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.template_file); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -398,12 +423,12 @@ * @function encodeDelimited * @memberof CCommunity_GamePersonalDataCategoryInfo * @static - * @param {ICCommunity_GamePersonalDataCategoryInfo} message CCommunity_GamePersonalDataCategoryInfo message or plain object to encode + * @param {CCommunity_GamePersonalDataCategoryInfo.$Properties} message CCommunity_GamePersonalDataCategoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_GamePersonalDataCategoryInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CCommunity_GamePersonalDataCategoryInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -413,31 +438,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CCommunity_GamePersonalDataCategoryInfo} CCommunity_GamePersonalDataCategoryInfo + * @returns {CCommunity_GamePersonalDataCategoryInfo & CCommunity_GamePersonalDataCategoryInfo.$Shape} CCommunity_GamePersonalDataCategoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_GamePersonalDataCategoryInfo.decode = function decode(reader, length) { + CCommunity_GamePersonalDataCategoryInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CCommunity_GamePersonalDataCategoryInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CCommunity_GamePersonalDataCategoryInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.localization_token = reader.string(); - break; - case 3: - message.template_file = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.type = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.localization_token = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.template_file = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -447,11 +495,11 @@ * @memberof CCommunity_GamePersonalDataCategoryInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CCommunity_GamePersonalDataCategoryInfo} CCommunity_GamePersonalDataCategoryInfo + * @returns {CCommunity_GamePersonalDataCategoryInfo & CCommunity_GamePersonalDataCategoryInfo.$Shape} CCommunity_GamePersonalDataCategoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_GamePersonalDataCategoryInfo.decodeDelimited = function decodeDelimited(reader) { + CCommunity_GamePersonalDataCategoryInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -465,16 +513,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CCommunity_GamePersonalDataCategoryInfo.verify = function verify(message) { + CCommunity_GamePersonalDataCategoryInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.localization_token != null && message.hasOwnProperty("localization_token")) + if (message.localization_token != null && $Object.hasOwnProperty.call(message, "localization_token")) if (!$util.isString(message.localization_token)) return "localization_token: string expected"; - if (message.template_file != null && message.hasOwnProperty("template_file")) + if (message.template_file != null && $Object.hasOwnProperty.call(message, "template_file")) if (!$util.isString(message.template_file)) return "template_file: string expected"; return null; @@ -488,16 +540,22 @@ * @param {Object.} object Plain object * @returns {CCommunity_GamePersonalDataCategoryInfo} CCommunity_GamePersonalDataCategoryInfo */ - CCommunity_GamePersonalDataCategoryInfo.fromObject = function fromObject(object) { + CCommunity_GamePersonalDataCategoryInfo.fromObject = function (object, _depth) { if (object instanceof $root.CCommunity_GamePersonalDataCategoryInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CCommunity_GamePersonalDataCategoryInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CCommunity_GamePersonalDataCategoryInfo(); if (object.type != null) - message.type = String(object.type); + message.type = $String(object.type); if (object.localization_token != null) - message.localization_token = String(object.localization_token); + message.localization_token = $String(object.localization_token); if (object.template_file != null) - message.template_file = String(object.template_file); + message.template_file = $String(object.template_file); return message; }; @@ -510,20 +568,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CCommunity_GamePersonalDataCategoryInfo.toObject = function toObject(message, options) { + CCommunity_GamePersonalDataCategoryInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.type = ""; object.localization_token = ""; object.template_file = ""; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.localization_token != null && message.hasOwnProperty("localization_token")) + if (message.localization_token != null && $Object.hasOwnProperty.call(message, "localization_token")) object.localization_token = message.localization_token; - if (message.template_file != null && message.hasOwnProperty("template_file")) + if (message.template_file != null && $Object.hasOwnProperty.call(message, "template_file")) object.template_file = message.template_file; return object; }; @@ -535,8 +597,22 @@ * @instance * @returns {Object.} JSON object */ - CCommunity_GamePersonalDataCategoryInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CCommunity_GamePersonalDataCategoryInfo.prototype.toJSON = function() { + return CCommunity_GamePersonalDataCategoryInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CCommunity_GamePersonalDataCategoryInfo + * @function getTypeUrl + * @memberof CCommunity_GamePersonalDataCategoryInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CCommunity_GamePersonalDataCategoryInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CCommunity_GamePersonalDataCategoryInfo"; }; return CCommunity_GamePersonalDataCategoryInfo; @@ -544,27 +620,40 @@ $root.CCommunity_GetGamePersonalDataCategories_Request = (function() { + /** + * Properties of a CCommunity_GetGamePersonalDataCategories_Request. + * @typedef {Object} CCommunity_GetGamePersonalDataCategories_Request.$Properties + * @property {number|null} [appid] CCommunity_GetGamePersonalDataCategories_Request appid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CCommunity_GetGamePersonalDataCategories_Request. * @exports ICCommunity_GetGamePersonalDataCategories_Request * @interface ICCommunity_GetGamePersonalDataCategories_Request - * @property {number|null} [appid] CCommunity_GetGamePersonalDataCategories_Request appid + * @augments CCommunity_GetGamePersonalDataCategories_Request.$Properties + * @deprecated Use CCommunity_GetGamePersonalDataCategories_Request.$Properties instead. + */ + + /** + * Shape of a CCommunity_GetGamePersonalDataCategories_Request. + * @typedef {CCommunity_GetGamePersonalDataCategories_Request.$Properties} CCommunity_GetGamePersonalDataCategories_Request.$Shape */ /** * Constructs a new CCommunity_GetGamePersonalDataCategories_Request. * @exports CCommunity_GetGamePersonalDataCategories_Request * @classdesc Represents a CCommunity_GetGamePersonalDataCategories_Request. - * @implements ICCommunity_GetGamePersonalDataCategories_Request * @constructor - * @param {ICCommunity_GetGamePersonalDataCategories_Request=} [properties] Properties to set + * @param {CCommunity_GetGamePersonalDataCategories_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CCommunity_GetGamePersonalDataCategories_Request(properties) { + var CCommunity_GetGamePersonalDataCategories_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CCommunity_GetGamePersonalDataCategories_Request appid. @@ -579,10 +668,14 @@ * @function create * @memberof CCommunity_GetGamePersonalDataCategories_Request * @static - * @param {ICCommunity_GetGamePersonalDataCategories_Request=} [properties] Properties to set + * @param {CCommunity_GetGamePersonalDataCategories_Request.$Properties=} [properties] Properties to set * @returns {CCommunity_GetGamePersonalDataCategories_Request} CCommunity_GetGamePersonalDataCategories_Request instance + * @type {{ + * (properties: CCommunity_GetGamePersonalDataCategories_Request.$Shape): CCommunity_GetGamePersonalDataCategories_Request & CCommunity_GetGamePersonalDataCategories_Request.$Shape; + * (properties?: CCommunity_GetGamePersonalDataCategories_Request.$Properties): CCommunity_GetGamePersonalDataCategories_Request; + * }} */ - CCommunity_GetGamePersonalDataCategories_Request.create = function create(properties) { + CCommunity_GetGamePersonalDataCategories_Request.create = function(properties) { return new CCommunity_GetGamePersonalDataCategories_Request(properties); }; @@ -591,15 +684,22 @@ * @function encode * @memberof CCommunity_GetGamePersonalDataCategories_Request * @static - * @param {ICCommunity_GetGamePersonalDataCategories_Request} message CCommunity_GetGamePersonalDataCategories_Request message or plain object to encode + * @param {CCommunity_GetGamePersonalDataCategories_Request.$Properties} message CCommunity_GetGamePersonalDataCategories_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_GetGamePersonalDataCategories_Request.encode = function encode(message, writer) { + CCommunity_GetGamePersonalDataCategories_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.appid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -608,12 +708,12 @@ * @function encodeDelimited * @memberof CCommunity_GetGamePersonalDataCategories_Request * @static - * @param {ICCommunity_GetGamePersonalDataCategories_Request} message CCommunity_GetGamePersonalDataCategories_Request message or plain object to encode + * @param {CCommunity_GetGamePersonalDataCategories_Request.$Properties} message CCommunity_GetGamePersonalDataCategories_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_GetGamePersonalDataCategories_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CCommunity_GetGamePersonalDataCategories_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -623,25 +723,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CCommunity_GetGamePersonalDataCategories_Request} CCommunity_GetGamePersonalDataCategories_Request + * @returns {CCommunity_GetGamePersonalDataCategories_Request & CCommunity_GetGamePersonalDataCategories_Request.$Shape} CCommunity_GetGamePersonalDataCategories_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_GetGamePersonalDataCategories_Request.decode = function decode(reader, length) { + CCommunity_GetGamePersonalDataCategories_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CCommunity_GetGamePersonalDataCategories_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CCommunity_GetGamePersonalDataCategories_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -651,11 +768,11 @@ * @memberof CCommunity_GetGamePersonalDataCategories_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CCommunity_GetGamePersonalDataCategories_Request} CCommunity_GetGamePersonalDataCategories_Request + * @returns {CCommunity_GetGamePersonalDataCategories_Request & CCommunity_GetGamePersonalDataCategories_Request.$Shape} CCommunity_GetGamePersonalDataCategories_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_GetGamePersonalDataCategories_Request.decodeDelimited = function decodeDelimited(reader) { + CCommunity_GetGamePersonalDataCategories_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -669,10 +786,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CCommunity_GetGamePersonalDataCategories_Request.verify = function verify(message) { + CCommunity_GetGamePersonalDataCategories_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; return null; @@ -686,9 +807,15 @@ * @param {Object.} object Plain object * @returns {CCommunity_GetGamePersonalDataCategories_Request} CCommunity_GetGamePersonalDataCategories_Request */ - CCommunity_GetGamePersonalDataCategories_Request.fromObject = function fromObject(object) { + CCommunity_GetGamePersonalDataCategories_Request.fromObject = function (object, _depth) { if (object instanceof $root.CCommunity_GetGamePersonalDataCategories_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CCommunity_GetGamePersonalDataCategories_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CCommunity_GetGamePersonalDataCategories_Request(); if (object.appid != null) message.appid = object.appid >>> 0; @@ -704,13 +831,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CCommunity_GetGamePersonalDataCategories_Request.toObject = function toObject(message, options) { + CCommunity_GetGamePersonalDataCategories_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.appid = 0; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; return object; }; @@ -722,8 +853,22 @@ * @instance * @returns {Object.} JSON object */ - CCommunity_GetGamePersonalDataCategories_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CCommunity_GetGamePersonalDataCategories_Request.prototype.toJSON = function() { + return CCommunity_GetGamePersonalDataCategories_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CCommunity_GetGamePersonalDataCategories_Request + * @function getTypeUrl + * @memberof CCommunity_GetGamePersonalDataCategories_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CCommunity_GetGamePersonalDataCategories_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CCommunity_GetGamePersonalDataCategories_Request"; }; return CCommunity_GetGamePersonalDataCategories_Request; @@ -731,33 +876,46 @@ $root.CCommunity_GetGamePersonalDataCategories_Response = (function() { + /** + * Properties of a CCommunity_GetGamePersonalDataCategories_Response. + * @typedef {Object} CCommunity_GetGamePersonalDataCategories_Response.$Properties + * @property {Array.|null} [categories] CCommunity_GetGamePersonalDataCategories_Response categories + * @property {string|null} [app_assets_basename] CCommunity_GetGamePersonalDataCategories_Response app_assets_basename + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CCommunity_GetGamePersonalDataCategories_Response. * @exports ICCommunity_GetGamePersonalDataCategories_Response * @interface ICCommunity_GetGamePersonalDataCategories_Response - * @property {Array.|null} [categories] CCommunity_GetGamePersonalDataCategories_Response categories - * @property {string|null} [app_assets_basename] CCommunity_GetGamePersonalDataCategories_Response app_assets_basename + * @augments CCommunity_GetGamePersonalDataCategories_Response.$Properties + * @deprecated Use CCommunity_GetGamePersonalDataCategories_Response.$Properties instead. + */ + + /** + * Shape of a CCommunity_GetGamePersonalDataCategories_Response. + * @typedef {CCommunity_GetGamePersonalDataCategories_Response.$Properties} CCommunity_GetGamePersonalDataCategories_Response.$Shape */ /** * Constructs a new CCommunity_GetGamePersonalDataCategories_Response. * @exports CCommunity_GetGamePersonalDataCategories_Response * @classdesc Represents a CCommunity_GetGamePersonalDataCategories_Response. - * @implements ICCommunity_GetGamePersonalDataCategories_Response * @constructor - * @param {ICCommunity_GetGamePersonalDataCategories_Response=} [properties] Properties to set + * @param {CCommunity_GetGamePersonalDataCategories_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CCommunity_GetGamePersonalDataCategories_Response(properties) { + var CCommunity_GetGamePersonalDataCategories_Response = function (properties) { this.categories = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CCommunity_GetGamePersonalDataCategories_Response categories. - * @member {Array.} categories + * @member {Array.} categories * @memberof CCommunity_GetGamePersonalDataCategories_Response * @instance */ @@ -776,10 +934,14 @@ * @function create * @memberof CCommunity_GetGamePersonalDataCategories_Response * @static - * @param {ICCommunity_GetGamePersonalDataCategories_Response=} [properties] Properties to set + * @param {CCommunity_GetGamePersonalDataCategories_Response.$Properties=} [properties] Properties to set * @returns {CCommunity_GetGamePersonalDataCategories_Response} CCommunity_GetGamePersonalDataCategories_Response instance + * @type {{ + * (properties: CCommunity_GetGamePersonalDataCategories_Response.$Shape): CCommunity_GetGamePersonalDataCategories_Response & CCommunity_GetGamePersonalDataCategories_Response.$Shape; + * (properties?: CCommunity_GetGamePersonalDataCategories_Response.$Properties): CCommunity_GetGamePersonalDataCategories_Response; + * }} */ - CCommunity_GetGamePersonalDataCategories_Response.create = function create(properties) { + CCommunity_GetGamePersonalDataCategories_Response.create = function(properties) { return new CCommunity_GetGamePersonalDataCategories_Response(properties); }; @@ -788,18 +950,25 @@ * @function encode * @memberof CCommunity_GetGamePersonalDataCategories_Response * @static - * @param {ICCommunity_GetGamePersonalDataCategories_Response} message CCommunity_GetGamePersonalDataCategories_Response message or plain object to encode + * @param {CCommunity_GetGamePersonalDataCategories_Response.$Properties} message CCommunity_GetGamePersonalDataCategories_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_GetGamePersonalDataCategories_Response.encode = function encode(message, writer) { + CCommunity_GetGamePersonalDataCategories_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.categories != null && message.categories.length) for (var i = 0; i < message.categories.length; ++i) - $root.CCommunity_GamePersonalDataCategoryInfo.encode(message.categories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.app_assets_basename != null && Object.hasOwnProperty.call(message, "app_assets_basename")) + $root.CCommunity_GamePersonalDataCategoryInfo.encode(message.categories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.app_assets_basename != null && $Object.hasOwnProperty.call(message, "app_assets_basename")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.app_assets_basename); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -808,12 +977,12 @@ * @function encodeDelimited * @memberof CCommunity_GetGamePersonalDataCategories_Response * @static - * @param {ICCommunity_GetGamePersonalDataCategories_Response} message CCommunity_GetGamePersonalDataCategories_Response message or plain object to encode + * @param {CCommunity_GetGamePersonalDataCategories_Response.$Properties} message CCommunity_GetGamePersonalDataCategories_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_GetGamePersonalDataCategories_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CCommunity_GetGamePersonalDataCategories_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -823,30 +992,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CCommunity_GetGamePersonalDataCategories_Response} CCommunity_GetGamePersonalDataCategories_Response + * @returns {CCommunity_GetGamePersonalDataCategories_Response & CCommunity_GetGamePersonalDataCategories_Response.$Shape} CCommunity_GetGamePersonalDataCategories_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_GetGamePersonalDataCategories_Response.decode = function decode(reader, length) { + CCommunity_GetGamePersonalDataCategories_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CCommunity_GetGamePersonalDataCategories_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CCommunity_GetGamePersonalDataCategories_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.categories && message.categories.length)) - message.categories = []; - message.categories.push($root.CCommunity_GamePersonalDataCategoryInfo.decode(reader, reader.uint32())); - break; - case 2: - message.app_assets_basename = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.CCommunity_GamePersonalDataCategoryInfo.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.app_assets_basename = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -856,11 +1045,11 @@ * @memberof CCommunity_GetGamePersonalDataCategories_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CCommunity_GetGamePersonalDataCategories_Response} CCommunity_GetGamePersonalDataCategories_Response + * @returns {CCommunity_GetGamePersonalDataCategories_Response & CCommunity_GetGamePersonalDataCategories_Response.$Shape} CCommunity_GetGamePersonalDataCategories_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_GetGamePersonalDataCategories_Response.decodeDelimited = function decodeDelimited(reader) { + CCommunity_GetGamePersonalDataCategories_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -874,19 +1063,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CCommunity_GetGamePersonalDataCategories_Response.verify = function verify(message) { + CCommunity_GetGamePersonalDataCategories_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.categories != null && message.hasOwnProperty("categories")) { - if (!Array.isArray(message.categories)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.categories != null && $Object.hasOwnProperty.call(message, "categories")) { + if (!$Array.isArray(message.categories)) return "categories: array expected"; for (var i = 0; i < message.categories.length; ++i) { - var error = $root.CCommunity_GamePersonalDataCategoryInfo.verify(message.categories[i]); + var error = $root.CCommunity_GamePersonalDataCategoryInfo.verify(message.categories[i], _depth + 1); if (error) return "categories." + error; } } - if (message.app_assets_basename != null && message.hasOwnProperty("app_assets_basename")) + if (message.app_assets_basename != null && $Object.hasOwnProperty.call(message, "app_assets_basename")) if (!$util.isString(message.app_assets_basename)) return "app_assets_basename: string expected"; return null; @@ -900,22 +1093,28 @@ * @param {Object.} object Plain object * @returns {CCommunity_GetGamePersonalDataCategories_Response} CCommunity_GetGamePersonalDataCategories_Response */ - CCommunity_GetGamePersonalDataCategories_Response.fromObject = function fromObject(object) { + CCommunity_GetGamePersonalDataCategories_Response.fromObject = function (object, _depth) { if (object instanceof $root.CCommunity_GetGamePersonalDataCategories_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CCommunity_GetGamePersonalDataCategories_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CCommunity_GetGamePersonalDataCategories_Response(); if (object.categories) { - if (!Array.isArray(object.categories)) - throw TypeError(".CCommunity_GetGamePersonalDataCategories_Response.categories: array expected"); - message.categories = []; + if (!$Array.isArray(object.categories)) + throw $TypeError(".CCommunity_GetGamePersonalDataCategories_Response.categories: array expected"); + message.categories = $Array(object.categories.length); for (var i = 0; i < object.categories.length; ++i) { - if (typeof object.categories[i] !== "object") - throw TypeError(".CCommunity_GetGamePersonalDataCategories_Response.categories: object expected"); - message.categories[i] = $root.CCommunity_GamePersonalDataCategoryInfo.fromObject(object.categories[i]); + if (!$util.isObject(object.categories[i])) + throw $TypeError(".CCommunity_GetGamePersonalDataCategories_Response.categories: object expected"); + message.categories[i] = $root.CCommunity_GamePersonalDataCategoryInfo.fromObject(object.categories[i], _depth + 1); } } if (object.app_assets_basename != null) - message.app_assets_basename = String(object.app_assets_basename); + message.app_assets_basename = $String(object.app_assets_basename); return message; }; @@ -928,20 +1127,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CCommunity_GetGamePersonalDataCategories_Response.toObject = function toObject(message, options) { + CCommunity_GetGamePersonalDataCategories_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.categories = []; if (options.defaults) object.app_assets_basename = ""; if (message.categories && message.categories.length) { - object.categories = []; + object.categories = $Array(message.categories.length); for (var j = 0; j < message.categories.length; ++j) - object.categories[j] = $root.CCommunity_GamePersonalDataCategoryInfo.toObject(message.categories[j], options); + object.categories[j] = $root.CCommunity_GamePersonalDataCategoryInfo.toObject(message.categories[j], options, _depth + 1); } - if (message.app_assets_basename != null && message.hasOwnProperty("app_assets_basename")) + if (message.app_assets_basename != null && $Object.hasOwnProperty.call(message, "app_assets_basename")) object.app_assets_basename = message.app_assets_basename; return object; }; @@ -953,8 +1156,22 @@ * @instance * @returns {Object.} JSON object */ - CCommunity_GetGamePersonalDataCategories_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CCommunity_GetGamePersonalDataCategories_Response.prototype.toJSON = function() { + return CCommunity_GetGamePersonalDataCategories_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CCommunity_GetGamePersonalDataCategories_Response + * @function getTypeUrl + * @memberof CCommunity_GetGamePersonalDataCategories_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CCommunity_GetGamePersonalDataCategories_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CCommunity_GetGamePersonalDataCategories_Response"; }; return CCommunity_GetGamePersonalDataCategories_Response; @@ -964,28 +1181,41 @@ /** * Properties of a CCommunity_GetGamePersonalDataEntries_Request. - * @exports ICCommunity_GetGamePersonalDataEntries_Request - * @interface ICCommunity_GetGamePersonalDataEntries_Request + * @typedef {Object} CCommunity_GetGamePersonalDataEntries_Request.$Properties * @property {number|null} [appid] CCommunity_GetGamePersonalDataEntries_Request appid * @property {number|Long|null} [steamid] CCommunity_GetGamePersonalDataEntries_Request steamid * @property {string|null} [type] CCommunity_GetGamePersonalDataEntries_Request type * @property {string|null} [continue_token] CCommunity_GetGamePersonalDataEntries_Request continue_token + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CCommunity_GetGamePersonalDataEntries_Request. + * @exports ICCommunity_GetGamePersonalDataEntries_Request + * @interface ICCommunity_GetGamePersonalDataEntries_Request + * @augments CCommunity_GetGamePersonalDataEntries_Request.$Properties + * @deprecated Use CCommunity_GetGamePersonalDataEntries_Request.$Properties instead. + */ + + /** + * Shape of a CCommunity_GetGamePersonalDataEntries_Request. + * @typedef {CCommunity_GetGamePersonalDataEntries_Request.$Properties} CCommunity_GetGamePersonalDataEntries_Request.$Shape */ /** * Constructs a new CCommunity_GetGamePersonalDataEntries_Request. * @exports CCommunity_GetGamePersonalDataEntries_Request * @classdesc Represents a CCommunity_GetGamePersonalDataEntries_Request. - * @implements ICCommunity_GetGamePersonalDataEntries_Request * @constructor - * @param {ICCommunity_GetGamePersonalDataEntries_Request=} [properties] Properties to set + * @param {CCommunity_GetGamePersonalDataEntries_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CCommunity_GetGamePersonalDataEntries_Request(properties) { + var CCommunity_GetGamePersonalDataEntries_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CCommunity_GetGamePersonalDataEntries_Request appid. @@ -1024,10 +1254,14 @@ * @function create * @memberof CCommunity_GetGamePersonalDataEntries_Request * @static - * @param {ICCommunity_GetGamePersonalDataEntries_Request=} [properties] Properties to set + * @param {CCommunity_GetGamePersonalDataEntries_Request.$Properties=} [properties] Properties to set * @returns {CCommunity_GetGamePersonalDataEntries_Request} CCommunity_GetGamePersonalDataEntries_Request instance + * @type {{ + * (properties: CCommunity_GetGamePersonalDataEntries_Request.$Shape): CCommunity_GetGamePersonalDataEntries_Request & CCommunity_GetGamePersonalDataEntries_Request.$Shape; + * (properties?: CCommunity_GetGamePersonalDataEntries_Request.$Properties): CCommunity_GetGamePersonalDataEntries_Request; + * }} */ - CCommunity_GetGamePersonalDataEntries_Request.create = function create(properties) { + CCommunity_GetGamePersonalDataEntries_Request.create = function(properties) { return new CCommunity_GetGamePersonalDataEntries_Request(properties); }; @@ -1036,21 +1270,28 @@ * @function encode * @memberof CCommunity_GetGamePersonalDataEntries_Request * @static - * @param {ICCommunity_GetGamePersonalDataEntries_Request} message CCommunity_GetGamePersonalDataEntries_Request message or plain object to encode + * @param {CCommunity_GetGamePersonalDataEntries_Request.$Properties} message CCommunity_GetGamePersonalDataEntries_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_GetGamePersonalDataEntries_Request.encode = function encode(message, writer) { + CCommunity_GetGamePersonalDataEntries_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.appid); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.steamid); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.continue_token != null && Object.hasOwnProperty.call(message, "continue_token")) + if (message.continue_token != null && $Object.hasOwnProperty.call(message, "continue_token")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.continue_token); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1059,12 +1300,12 @@ * @function encodeDelimited * @memberof CCommunity_GetGamePersonalDataEntries_Request * @static - * @param {ICCommunity_GetGamePersonalDataEntries_Request} message CCommunity_GetGamePersonalDataEntries_Request message or plain object to encode + * @param {CCommunity_GetGamePersonalDataEntries_Request.$Properties} message CCommunity_GetGamePersonalDataEntries_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_GetGamePersonalDataEntries_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CCommunity_GetGamePersonalDataEntries_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1074,34 +1315,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CCommunity_GetGamePersonalDataEntries_Request} CCommunity_GetGamePersonalDataEntries_Request + * @returns {CCommunity_GetGamePersonalDataEntries_Request & CCommunity_GetGamePersonalDataEntries_Request.$Shape} CCommunity_GetGamePersonalDataEntries_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_GetGamePersonalDataEntries_Request.decode = function decode(reader, length) { + CCommunity_GetGamePersonalDataEntries_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CCommunity_GetGamePersonalDataEntries_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CCommunity_GetGamePersonalDataEntries_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appid = reader.uint32(); - break; - case 2: - message.steamid = reader.uint64(); - break; - case 3: - message.type = reader.string(); - break; - case 4: - message.continue_token = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.steamid = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.type = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.continue_token = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1111,11 +1378,11 @@ * @memberof CCommunity_GetGamePersonalDataEntries_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CCommunity_GetGamePersonalDataEntries_Request} CCommunity_GetGamePersonalDataEntries_Request + * @returns {CCommunity_GetGamePersonalDataEntries_Request & CCommunity_GetGamePersonalDataEntries_Request.$Shape} CCommunity_GetGamePersonalDataEntries_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_GetGamePersonalDataEntries_Request.decodeDelimited = function decodeDelimited(reader) { + CCommunity_GetGamePersonalDataEntries_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1129,19 +1396,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CCommunity_GetGamePersonalDataEntries_Request.verify = function verify(message) { + CCommunity_GetGamePersonalDataEntries_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.continue_token != null && message.hasOwnProperty("continue_token")) + if (message.continue_token != null && $Object.hasOwnProperty.call(message, "continue_token")) if (!$util.isString(message.continue_token)) return "continue_token: string expected"; return null; @@ -1155,25 +1426,31 @@ * @param {Object.} object Plain object * @returns {CCommunity_GetGamePersonalDataEntries_Request} CCommunity_GetGamePersonalDataEntries_Request */ - CCommunity_GetGamePersonalDataEntries_Request.fromObject = function fromObject(object) { + CCommunity_GetGamePersonalDataEntries_Request.fromObject = function (object, _depth) { if (object instanceof $root.CCommunity_GetGamePersonalDataEntries_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CCommunity_GetGamePersonalDataEntries_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CCommunity_GetGamePersonalDataEntries_Request(); if (object.appid != null) message.appid = object.appid >>> 0; if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = true; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.type != null) - message.type = String(object.type); + message.type = $String(object.type); if (object.continue_token != null) - message.continue_token = String(object.continue_token); + message.continue_token = $String(object.continue_token); return message; }; @@ -1186,30 +1463,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CCommunity_GetGamePersonalDataEntries_Request.toObject = function toObject(message, options) { + CCommunity_GetGamePersonalDataEntries_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.appid = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.type = ""; object.continue_token = ""; } - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; - if (message.type != null && message.hasOwnProperty("type")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.continue_token != null && message.hasOwnProperty("continue_token")) + if (message.continue_token != null && $Object.hasOwnProperty.call(message, "continue_token")) object.continue_token = message.continue_token; return object; }; @@ -1221,8 +1504,22 @@ * @instance * @returns {Object.} JSON object */ - CCommunity_GetGamePersonalDataEntries_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CCommunity_GetGamePersonalDataEntries_Request.prototype.toJSON = function() { + return CCommunity_GetGamePersonalDataEntries_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CCommunity_GetGamePersonalDataEntries_Request + * @function getTypeUrl + * @memberof CCommunity_GetGamePersonalDataEntries_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CCommunity_GetGamePersonalDataEntries_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CCommunity_GetGamePersonalDataEntries_Request"; }; return CCommunity_GetGamePersonalDataEntries_Request; @@ -1232,28 +1529,41 @@ /** * Properties of a CCommunity_GetGamePersonalDataEntries_Response. - * @exports ICCommunity_GetGamePersonalDataEntries_Response - * @interface ICCommunity_GetGamePersonalDataEntries_Response + * @typedef {Object} CCommunity_GetGamePersonalDataEntries_Response.$Properties * @property {number|null} [gceresult] CCommunity_GetGamePersonalDataEntries_Response gceresult * @property {Array.|null} [entries] CCommunity_GetGamePersonalDataEntries_Response entries * @property {string|null} [continue_token] CCommunity_GetGamePersonalDataEntries_Response continue_token + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CCommunity_GetGamePersonalDataEntries_Response. + * @exports ICCommunity_GetGamePersonalDataEntries_Response + * @interface ICCommunity_GetGamePersonalDataEntries_Response + * @augments CCommunity_GetGamePersonalDataEntries_Response.$Properties + * @deprecated Use CCommunity_GetGamePersonalDataEntries_Response.$Properties instead. + */ + + /** + * Shape of a CCommunity_GetGamePersonalDataEntries_Response. + * @typedef {CCommunity_GetGamePersonalDataEntries_Response.$Properties} CCommunity_GetGamePersonalDataEntries_Response.$Shape */ /** * Constructs a new CCommunity_GetGamePersonalDataEntries_Response. * @exports CCommunity_GetGamePersonalDataEntries_Response * @classdesc Represents a CCommunity_GetGamePersonalDataEntries_Response. - * @implements ICCommunity_GetGamePersonalDataEntries_Response * @constructor - * @param {ICCommunity_GetGamePersonalDataEntries_Response=} [properties] Properties to set + * @param {CCommunity_GetGamePersonalDataEntries_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CCommunity_GetGamePersonalDataEntries_Response(properties) { + var CCommunity_GetGamePersonalDataEntries_Response = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CCommunity_GetGamePersonalDataEntries_Response gceresult. @@ -1284,10 +1594,14 @@ * @function create * @memberof CCommunity_GetGamePersonalDataEntries_Response * @static - * @param {ICCommunity_GetGamePersonalDataEntries_Response=} [properties] Properties to set + * @param {CCommunity_GetGamePersonalDataEntries_Response.$Properties=} [properties] Properties to set * @returns {CCommunity_GetGamePersonalDataEntries_Response} CCommunity_GetGamePersonalDataEntries_Response instance + * @type {{ + * (properties: CCommunity_GetGamePersonalDataEntries_Response.$Shape): CCommunity_GetGamePersonalDataEntries_Response & CCommunity_GetGamePersonalDataEntries_Response.$Shape; + * (properties?: CCommunity_GetGamePersonalDataEntries_Response.$Properties): CCommunity_GetGamePersonalDataEntries_Response; + * }} */ - CCommunity_GetGamePersonalDataEntries_Response.create = function create(properties) { + CCommunity_GetGamePersonalDataEntries_Response.create = function(properties) { return new CCommunity_GetGamePersonalDataEntries_Response(properties); }; @@ -1296,20 +1610,27 @@ * @function encode * @memberof CCommunity_GetGamePersonalDataEntries_Response * @static - * @param {ICCommunity_GetGamePersonalDataEntries_Response} message CCommunity_GetGamePersonalDataEntries_Response message or plain object to encode + * @param {CCommunity_GetGamePersonalDataEntries_Response.$Properties} message CCommunity_GetGamePersonalDataEntries_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_GetGamePersonalDataEntries_Response.encode = function encode(message, writer) { + CCommunity_GetGamePersonalDataEntries_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gceresult != null && Object.hasOwnProperty.call(message, "gceresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gceresult != null && $Object.hasOwnProperty.call(message, "gceresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gceresult); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.entries[i]); - if (message.continue_token != null && Object.hasOwnProperty.call(message, "continue_token")) + if (message.continue_token != null && $Object.hasOwnProperty.call(message, "continue_token")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.continue_token); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1318,12 +1639,12 @@ * @function encodeDelimited * @memberof CCommunity_GetGamePersonalDataEntries_Response * @static - * @param {ICCommunity_GetGamePersonalDataEntries_Response} message CCommunity_GetGamePersonalDataEntries_Response message or plain object to encode + * @param {CCommunity_GetGamePersonalDataEntries_Response.$Properties} message CCommunity_GetGamePersonalDataEntries_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_GetGamePersonalDataEntries_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CCommunity_GetGamePersonalDataEntries_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1333,33 +1654,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CCommunity_GetGamePersonalDataEntries_Response} CCommunity_GetGamePersonalDataEntries_Response + * @returns {CCommunity_GetGamePersonalDataEntries_Response & CCommunity_GetGamePersonalDataEntries_Response.$Shape} CCommunity_GetGamePersonalDataEntries_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_GetGamePersonalDataEntries_Response.decode = function decode(reader, length) { + CCommunity_GetGamePersonalDataEntries_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CCommunity_GetGamePersonalDataEntries_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CCommunity_GetGamePersonalDataEntries_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gceresult = reader.uint32(); - break; - case 2: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push(reader.string()); - break; - case 3: - message.continue_token = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gceresult = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push(reader.string()); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.continue_token = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1369,11 +1713,11 @@ * @memberof CCommunity_GetGamePersonalDataEntries_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CCommunity_GetGamePersonalDataEntries_Response} CCommunity_GetGamePersonalDataEntries_Response + * @returns {CCommunity_GetGamePersonalDataEntries_Response & CCommunity_GetGamePersonalDataEntries_Response.$Shape} CCommunity_GetGamePersonalDataEntries_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_GetGamePersonalDataEntries_Response.decodeDelimited = function decodeDelimited(reader) { + CCommunity_GetGamePersonalDataEntries_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1387,20 +1731,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CCommunity_GetGamePersonalDataEntries_Response.verify = function verify(message) { + CCommunity_GetGamePersonalDataEntries_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gceresult != null && message.hasOwnProperty("gceresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gceresult != null && $Object.hasOwnProperty.call(message, "gceresult")) if (!$util.isInteger(message.gceresult)) return "gceresult: integer expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) if (!$util.isString(message.entries[i])) return "entries: string[] expected"; } - if (message.continue_token != null && message.hasOwnProperty("continue_token")) + if (message.continue_token != null && $Object.hasOwnProperty.call(message, "continue_token")) if (!$util.isString(message.continue_token)) return "continue_token: string expected"; return null; @@ -1414,21 +1762,27 @@ * @param {Object.} object Plain object * @returns {CCommunity_GetGamePersonalDataEntries_Response} CCommunity_GetGamePersonalDataEntries_Response */ - CCommunity_GetGamePersonalDataEntries_Response.fromObject = function fromObject(object) { + CCommunity_GetGamePersonalDataEntries_Response.fromObject = function (object, _depth) { if (object instanceof $root.CCommunity_GetGamePersonalDataEntries_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CCommunity_GetGamePersonalDataEntries_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CCommunity_GetGamePersonalDataEntries_Response(); if (object.gceresult != null) message.gceresult = object.gceresult >>> 0; if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CCommunity_GetGamePersonalDataEntries_Response.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CCommunity_GetGamePersonalDataEntries_Response.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) - message.entries[i] = String(object.entries[i]); + message.entries[i] = $String(object.entries[i]); } if (object.continue_token != null) - message.continue_token = String(object.continue_token); + message.continue_token = $String(object.continue_token); return message; }; @@ -1441,9 +1795,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CCommunity_GetGamePersonalDataEntries_Response.toObject = function toObject(message, options) { + CCommunity_GetGamePersonalDataEntries_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; @@ -1451,14 +1809,14 @@ object.gceresult = 0; object.continue_token = ""; } - if (message.gceresult != null && message.hasOwnProperty("gceresult")) + if (message.gceresult != null && $Object.hasOwnProperty.call(message, "gceresult")) object.gceresult = message.gceresult; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) object.entries[j] = message.entries[j]; } - if (message.continue_token != null && message.hasOwnProperty("continue_token")) + if (message.continue_token != null && $Object.hasOwnProperty.call(message, "continue_token")) object.continue_token = message.continue_token; return object; }; @@ -1470,8 +1828,22 @@ * @instance * @returns {Object.} JSON object */ - CCommunity_GetGamePersonalDataEntries_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CCommunity_GetGamePersonalDataEntries_Response.prototype.toJSON = function() { + return CCommunity_GetGamePersonalDataEntries_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CCommunity_GetGamePersonalDataEntries_Response + * @function getTypeUrl + * @memberof CCommunity_GetGamePersonalDataEntries_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CCommunity_GetGamePersonalDataEntries_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CCommunity_GetGamePersonalDataEntries_Response"; }; return CCommunity_GetGamePersonalDataEntries_Response; @@ -1481,26 +1853,39 @@ /** * Properties of a CCommunity_TerminateGamePersonalDataEntries_Request. - * @exports ICCommunity_TerminateGamePersonalDataEntries_Request - * @interface ICCommunity_TerminateGamePersonalDataEntries_Request + * @typedef {Object} CCommunity_TerminateGamePersonalDataEntries_Request.$Properties * @property {number|null} [appid] CCommunity_TerminateGamePersonalDataEntries_Request appid * @property {number|Long|null} [steamid] CCommunity_TerminateGamePersonalDataEntries_Request steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CCommunity_TerminateGamePersonalDataEntries_Request. + * @exports ICCommunity_TerminateGamePersonalDataEntries_Request + * @interface ICCommunity_TerminateGamePersonalDataEntries_Request + * @augments CCommunity_TerminateGamePersonalDataEntries_Request.$Properties + * @deprecated Use CCommunity_TerminateGamePersonalDataEntries_Request.$Properties instead. + */ + + /** + * Shape of a CCommunity_TerminateGamePersonalDataEntries_Request. + * @typedef {CCommunity_TerminateGamePersonalDataEntries_Request.$Properties} CCommunity_TerminateGamePersonalDataEntries_Request.$Shape */ /** * Constructs a new CCommunity_TerminateGamePersonalDataEntries_Request. * @exports CCommunity_TerminateGamePersonalDataEntries_Request * @classdesc Represents a CCommunity_TerminateGamePersonalDataEntries_Request. - * @implements ICCommunity_TerminateGamePersonalDataEntries_Request * @constructor - * @param {ICCommunity_TerminateGamePersonalDataEntries_Request=} [properties] Properties to set + * @param {CCommunity_TerminateGamePersonalDataEntries_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CCommunity_TerminateGamePersonalDataEntries_Request(properties) { + var CCommunity_TerminateGamePersonalDataEntries_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CCommunity_TerminateGamePersonalDataEntries_Request appid. @@ -1523,10 +1908,14 @@ * @function create * @memberof CCommunity_TerminateGamePersonalDataEntries_Request * @static - * @param {ICCommunity_TerminateGamePersonalDataEntries_Request=} [properties] Properties to set + * @param {CCommunity_TerminateGamePersonalDataEntries_Request.$Properties=} [properties] Properties to set * @returns {CCommunity_TerminateGamePersonalDataEntries_Request} CCommunity_TerminateGamePersonalDataEntries_Request instance + * @type {{ + * (properties: CCommunity_TerminateGamePersonalDataEntries_Request.$Shape): CCommunity_TerminateGamePersonalDataEntries_Request & CCommunity_TerminateGamePersonalDataEntries_Request.$Shape; + * (properties?: CCommunity_TerminateGamePersonalDataEntries_Request.$Properties): CCommunity_TerminateGamePersonalDataEntries_Request; + * }} */ - CCommunity_TerminateGamePersonalDataEntries_Request.create = function create(properties) { + CCommunity_TerminateGamePersonalDataEntries_Request.create = function(properties) { return new CCommunity_TerminateGamePersonalDataEntries_Request(properties); }; @@ -1535,17 +1924,24 @@ * @function encode * @memberof CCommunity_TerminateGamePersonalDataEntries_Request * @static - * @param {ICCommunity_TerminateGamePersonalDataEntries_Request} message CCommunity_TerminateGamePersonalDataEntries_Request message or plain object to encode + * @param {CCommunity_TerminateGamePersonalDataEntries_Request.$Properties} message CCommunity_TerminateGamePersonalDataEntries_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_TerminateGamePersonalDataEntries_Request.encode = function encode(message, writer) { + CCommunity_TerminateGamePersonalDataEntries_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.appid); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1554,12 +1950,12 @@ * @function encodeDelimited * @memberof CCommunity_TerminateGamePersonalDataEntries_Request * @static - * @param {ICCommunity_TerminateGamePersonalDataEntries_Request} message CCommunity_TerminateGamePersonalDataEntries_Request message or plain object to encode + * @param {CCommunity_TerminateGamePersonalDataEntries_Request.$Properties} message CCommunity_TerminateGamePersonalDataEntries_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_TerminateGamePersonalDataEntries_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CCommunity_TerminateGamePersonalDataEntries_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1569,28 +1965,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CCommunity_TerminateGamePersonalDataEntries_Request} CCommunity_TerminateGamePersonalDataEntries_Request + * @returns {CCommunity_TerminateGamePersonalDataEntries_Request & CCommunity_TerminateGamePersonalDataEntries_Request.$Shape} CCommunity_TerminateGamePersonalDataEntries_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_TerminateGamePersonalDataEntries_Request.decode = function decode(reader, length) { + CCommunity_TerminateGamePersonalDataEntries_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CCommunity_TerminateGamePersonalDataEntries_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CCommunity_TerminateGamePersonalDataEntries_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appid = reader.uint32(); - break; - case 2: - message.steamid = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.steamid = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1600,11 +2016,11 @@ * @memberof CCommunity_TerminateGamePersonalDataEntries_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CCommunity_TerminateGamePersonalDataEntries_Request} CCommunity_TerminateGamePersonalDataEntries_Request + * @returns {CCommunity_TerminateGamePersonalDataEntries_Request & CCommunity_TerminateGamePersonalDataEntries_Request.$Shape} CCommunity_TerminateGamePersonalDataEntries_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_TerminateGamePersonalDataEntries_Request.decodeDelimited = function decodeDelimited(reader) { + CCommunity_TerminateGamePersonalDataEntries_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1618,13 +2034,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CCommunity_TerminateGamePersonalDataEntries_Request.verify = function verify(message) { + CCommunity_TerminateGamePersonalDataEntries_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -1638,17 +2058,23 @@ * @param {Object.} object Plain object * @returns {CCommunity_TerminateGamePersonalDataEntries_Request} CCommunity_TerminateGamePersonalDataEntries_Request */ - CCommunity_TerminateGamePersonalDataEntries_Request.fromObject = function fromObject(object) { + CCommunity_TerminateGamePersonalDataEntries_Request.fromObject = function (object, _depth) { if (object instanceof $root.CCommunity_TerminateGamePersonalDataEntries_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CCommunity_TerminateGamePersonalDataEntries_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CCommunity_TerminateGamePersonalDataEntries_Request(); if (object.appid != null) message.appid = object.appid >>> 0; if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = true; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") @@ -1665,25 +2091,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CCommunity_TerminateGamePersonalDataEntries_Request.toObject = function toObject(message, options) { + CCommunity_TerminateGamePersonalDataEntries_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.appid = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -1694,8 +2126,22 @@ * @instance * @returns {Object.} JSON object */ - CCommunity_TerminateGamePersonalDataEntries_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CCommunity_TerminateGamePersonalDataEntries_Request.prototype.toJSON = function() { + return CCommunity_TerminateGamePersonalDataEntries_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CCommunity_TerminateGamePersonalDataEntries_Request + * @function getTypeUrl + * @memberof CCommunity_TerminateGamePersonalDataEntries_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CCommunity_TerminateGamePersonalDataEntries_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CCommunity_TerminateGamePersonalDataEntries_Request"; }; return CCommunity_TerminateGamePersonalDataEntries_Request; @@ -1703,27 +2149,40 @@ $root.CCommunity_TerminateGamePersonalDataEntries_Response = (function() { + /** + * Properties of a CCommunity_TerminateGamePersonalDataEntries_Response. + * @typedef {Object} CCommunity_TerminateGamePersonalDataEntries_Response.$Properties + * @property {number|null} [gceresult] CCommunity_TerminateGamePersonalDataEntries_Response gceresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CCommunity_TerminateGamePersonalDataEntries_Response. * @exports ICCommunity_TerminateGamePersonalDataEntries_Response * @interface ICCommunity_TerminateGamePersonalDataEntries_Response - * @property {number|null} [gceresult] CCommunity_TerminateGamePersonalDataEntries_Response gceresult + * @augments CCommunity_TerminateGamePersonalDataEntries_Response.$Properties + * @deprecated Use CCommunity_TerminateGamePersonalDataEntries_Response.$Properties instead. + */ + + /** + * Shape of a CCommunity_TerminateGamePersonalDataEntries_Response. + * @typedef {CCommunity_TerminateGamePersonalDataEntries_Response.$Properties} CCommunity_TerminateGamePersonalDataEntries_Response.$Shape */ /** * Constructs a new CCommunity_TerminateGamePersonalDataEntries_Response. * @exports CCommunity_TerminateGamePersonalDataEntries_Response * @classdesc Represents a CCommunity_TerminateGamePersonalDataEntries_Response. - * @implements ICCommunity_TerminateGamePersonalDataEntries_Response * @constructor - * @param {ICCommunity_TerminateGamePersonalDataEntries_Response=} [properties] Properties to set + * @param {CCommunity_TerminateGamePersonalDataEntries_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CCommunity_TerminateGamePersonalDataEntries_Response(properties) { + var CCommunity_TerminateGamePersonalDataEntries_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CCommunity_TerminateGamePersonalDataEntries_Response gceresult. @@ -1738,10 +2197,14 @@ * @function create * @memberof CCommunity_TerminateGamePersonalDataEntries_Response * @static - * @param {ICCommunity_TerminateGamePersonalDataEntries_Response=} [properties] Properties to set + * @param {CCommunity_TerminateGamePersonalDataEntries_Response.$Properties=} [properties] Properties to set * @returns {CCommunity_TerminateGamePersonalDataEntries_Response} CCommunity_TerminateGamePersonalDataEntries_Response instance + * @type {{ + * (properties: CCommunity_TerminateGamePersonalDataEntries_Response.$Shape): CCommunity_TerminateGamePersonalDataEntries_Response & CCommunity_TerminateGamePersonalDataEntries_Response.$Shape; + * (properties?: CCommunity_TerminateGamePersonalDataEntries_Response.$Properties): CCommunity_TerminateGamePersonalDataEntries_Response; + * }} */ - CCommunity_TerminateGamePersonalDataEntries_Response.create = function create(properties) { + CCommunity_TerminateGamePersonalDataEntries_Response.create = function(properties) { return new CCommunity_TerminateGamePersonalDataEntries_Response(properties); }; @@ -1750,15 +2213,22 @@ * @function encode * @memberof CCommunity_TerminateGamePersonalDataEntries_Response * @static - * @param {ICCommunity_TerminateGamePersonalDataEntries_Response} message CCommunity_TerminateGamePersonalDataEntries_Response message or plain object to encode + * @param {CCommunity_TerminateGamePersonalDataEntries_Response.$Properties} message CCommunity_TerminateGamePersonalDataEntries_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_TerminateGamePersonalDataEntries_Response.encode = function encode(message, writer) { + CCommunity_TerminateGamePersonalDataEntries_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gceresult != null && Object.hasOwnProperty.call(message, "gceresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gceresult != null && $Object.hasOwnProperty.call(message, "gceresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gceresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1767,12 +2237,12 @@ * @function encodeDelimited * @memberof CCommunity_TerminateGamePersonalDataEntries_Response * @static - * @param {ICCommunity_TerminateGamePersonalDataEntries_Response} message CCommunity_TerminateGamePersonalDataEntries_Response message or plain object to encode + * @param {CCommunity_TerminateGamePersonalDataEntries_Response.$Properties} message CCommunity_TerminateGamePersonalDataEntries_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CCommunity_TerminateGamePersonalDataEntries_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CCommunity_TerminateGamePersonalDataEntries_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1782,25 +2252,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CCommunity_TerminateGamePersonalDataEntries_Response} CCommunity_TerminateGamePersonalDataEntries_Response + * @returns {CCommunity_TerminateGamePersonalDataEntries_Response & CCommunity_TerminateGamePersonalDataEntries_Response.$Shape} CCommunity_TerminateGamePersonalDataEntries_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_TerminateGamePersonalDataEntries_Response.decode = function decode(reader, length) { + CCommunity_TerminateGamePersonalDataEntries_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CCommunity_TerminateGamePersonalDataEntries_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CCommunity_TerminateGamePersonalDataEntries_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gceresult = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gceresult = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1810,11 +2297,11 @@ * @memberof CCommunity_TerminateGamePersonalDataEntries_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CCommunity_TerminateGamePersonalDataEntries_Response} CCommunity_TerminateGamePersonalDataEntries_Response + * @returns {CCommunity_TerminateGamePersonalDataEntries_Response & CCommunity_TerminateGamePersonalDataEntries_Response.$Shape} CCommunity_TerminateGamePersonalDataEntries_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CCommunity_TerminateGamePersonalDataEntries_Response.decodeDelimited = function decodeDelimited(reader) { + CCommunity_TerminateGamePersonalDataEntries_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1828,10 +2315,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CCommunity_TerminateGamePersonalDataEntries_Response.verify = function verify(message) { + CCommunity_TerminateGamePersonalDataEntries_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gceresult != null && message.hasOwnProperty("gceresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gceresult != null && $Object.hasOwnProperty.call(message, "gceresult")) if (!$util.isInteger(message.gceresult)) return "gceresult: integer expected"; return null; @@ -1845,9 +2336,15 @@ * @param {Object.} object Plain object * @returns {CCommunity_TerminateGamePersonalDataEntries_Response} CCommunity_TerminateGamePersonalDataEntries_Response */ - CCommunity_TerminateGamePersonalDataEntries_Response.fromObject = function fromObject(object) { + CCommunity_TerminateGamePersonalDataEntries_Response.fromObject = function (object, _depth) { if (object instanceof $root.CCommunity_TerminateGamePersonalDataEntries_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CCommunity_TerminateGamePersonalDataEntries_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CCommunity_TerminateGamePersonalDataEntries_Response(); if (object.gceresult != null) message.gceresult = object.gceresult >>> 0; @@ -1863,13 +2360,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CCommunity_TerminateGamePersonalDataEntries_Response.toObject = function toObject(message, options) { + CCommunity_TerminateGamePersonalDataEntries_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.gceresult = 0; - if (message.gceresult != null && message.hasOwnProperty("gceresult")) + if (message.gceresult != null && $Object.hasOwnProperty.call(message, "gceresult")) object.gceresult = message.gceresult; return object; }; @@ -1881,8 +2382,22 @@ * @instance * @returns {Object.} JSON object */ - CCommunity_TerminateGamePersonalDataEntries_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CCommunity_TerminateGamePersonalDataEntries_Response.prototype.toJSON = function() { + return CCommunity_TerminateGamePersonalDataEntries_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CCommunity_TerminateGamePersonalDataEntries_Response + * @function getTypeUrl + * @memberof CCommunity_TerminateGamePersonalDataEntries_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CCommunity_TerminateGamePersonalDataEntries_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CCommunity_TerminateGamePersonalDataEntries_Response"; }; return CCommunity_TerminateGamePersonalDataEntries_Response; diff --git a/protobufs/generated/steamdatagram_auth_messages.js b/protobufs/generated/steamdatagram_auth_messages.js index 2153bbc..3fb0b6e 100644 --- a/protobufs/generated/steamdatagram_auth_messages.js +++ b/protobufs/generated/steamdatagram_auth_messages.js @@ -1,4 +1,4 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-mixed-operators, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars, default-case, jsdoc/require-param*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) @@ -12,6 +12,7 @@ // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + var $Object = $util.global.Object, $undefined = $util.global.undefined, $Error = $util.global.Error, $Array = $util.global.Array, $TypeError = $util.global.TypeError, $parseInt = $util.global.parseInt, $String = $util.global.String, $Number = $util.global.Number, $BigInt = $util.global.BigInt; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); @@ -20,8 +21,7 @@ /** * Properties of a CMsgSteamDatagramRelayAuthTicket. - * @exports ICMsgSteamDatagramRelayAuthTicket - * @interface ICMsgSteamDatagramRelayAuthTicket + * @typedef {Object} CMsgSteamDatagramRelayAuthTicket.$Properties * @property {number|null} [time_expiry] CMsgSteamDatagramRelayAuthTicket time_expiry * @property {number|Long|null} [authorized_steam_id] CMsgSteamDatagramRelayAuthTicket authorized_steam_id * @property {number|null} [authorized_public_ip] CMsgSteamDatagramRelayAuthTicket authorized_public_ip @@ -31,24 +31,38 @@ * @property {number|null} [app_id] CMsgSteamDatagramRelayAuthTicket app_id * @property {number|null} [gameserver_pop_id] CMsgSteamDatagramRelayAuthTicket gameserver_pop_id * @property {number|null} [virtual_port] CMsgSteamDatagramRelayAuthTicket virtual_port - * @property {Array.|null} [extra_fields] CMsgSteamDatagramRelayAuthTicket extra_fields + * @property {Array.|null} [extra_fields] CMsgSteamDatagramRelayAuthTicket extra_fields + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramRelayAuthTicket. + * @exports ICMsgSteamDatagramRelayAuthTicket + * @interface ICMsgSteamDatagramRelayAuthTicket + * @augments CMsgSteamDatagramRelayAuthTicket.$Properties + * @deprecated Use CMsgSteamDatagramRelayAuthTicket.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramRelayAuthTicket. + * @typedef {CMsgSteamDatagramRelayAuthTicket.$Properties} CMsgSteamDatagramRelayAuthTicket.$Shape */ /** * Constructs a new CMsgSteamDatagramRelayAuthTicket. * @exports CMsgSteamDatagramRelayAuthTicket * @classdesc Represents a CMsgSteamDatagramRelayAuthTicket. - * @implements ICMsgSteamDatagramRelayAuthTicket * @constructor - * @param {ICMsgSteamDatagramRelayAuthTicket=} [properties] Properties to set + * @param {CMsgSteamDatagramRelayAuthTicket.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramRelayAuthTicket(properties) { + var CMsgSteamDatagramRelayAuthTicket = function (properties) { this.extra_fields = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramRelayAuthTicket time_expiry. @@ -64,7 +78,7 @@ * @memberof CMsgSteamDatagramRelayAuthTicket * @instance */ - CMsgSteamDatagramRelayAuthTicket.prototype.authorized_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramRelayAuthTicket.prototype.authorized_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramRelayAuthTicket authorized_public_ip. @@ -80,7 +94,7 @@ * @memberof CMsgSteamDatagramRelayAuthTicket * @instance */ - CMsgSteamDatagramRelayAuthTicket.prototype.gameserver_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramRelayAuthTicket.prototype.gameserver_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramRelayAuthTicket gameserver_net_id. @@ -88,7 +102,7 @@ * @memberof CMsgSteamDatagramRelayAuthTicket * @instance */ - CMsgSteamDatagramRelayAuthTicket.prototype.gameserver_net_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramRelayAuthTicket.prototype.gameserver_net_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramRelayAuthTicket legacy_signature. @@ -124,7 +138,7 @@ /** * CMsgSteamDatagramRelayAuthTicket extra_fields. - * @member {Array.} extra_fields + * @member {Array.} extra_fields * @memberof CMsgSteamDatagramRelayAuthTicket * @instance */ @@ -135,10 +149,14 @@ * @function create * @memberof CMsgSteamDatagramRelayAuthTicket * @static - * @param {ICMsgSteamDatagramRelayAuthTicket=} [properties] Properties to set + * @param {CMsgSteamDatagramRelayAuthTicket.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramRelayAuthTicket} CMsgSteamDatagramRelayAuthTicket instance + * @type {{ + * (properties: CMsgSteamDatagramRelayAuthTicket.$Shape): CMsgSteamDatagramRelayAuthTicket & CMsgSteamDatagramRelayAuthTicket.$Shape; + * (properties?: CMsgSteamDatagramRelayAuthTicket.$Properties): CMsgSteamDatagramRelayAuthTicket; + * }} */ - CMsgSteamDatagramRelayAuthTicket.create = function create(properties) { + CMsgSteamDatagramRelayAuthTicket.create = function(properties) { return new CMsgSteamDatagramRelayAuthTicket(properties); }; @@ -147,34 +165,41 @@ * @function encode * @memberof CMsgSteamDatagramRelayAuthTicket * @static - * @param {ICMsgSteamDatagramRelayAuthTicket} message CMsgSteamDatagramRelayAuthTicket message or plain object to encode + * @param {CMsgSteamDatagramRelayAuthTicket.$Properties} message CMsgSteamDatagramRelayAuthTicket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramRelayAuthTicket.encode = function encode(message, writer) { + CMsgSteamDatagramRelayAuthTicket.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.time_expiry != null && Object.hasOwnProperty.call(message, "time_expiry")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.time_expiry); - if (message.authorized_steam_id != null && Object.hasOwnProperty.call(message, "authorized_steam_id")) + if (message.authorized_steam_id != null && $Object.hasOwnProperty.call(message, "authorized_steam_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.authorized_steam_id); - if (message.authorized_public_ip != null && Object.hasOwnProperty.call(message, "authorized_public_ip")) + if (message.authorized_public_ip != null && $Object.hasOwnProperty.call(message, "authorized_public_ip")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.authorized_public_ip); - if (message.gameserver_steam_id != null && Object.hasOwnProperty.call(message, "gameserver_steam_id")) + if (message.gameserver_steam_id != null && $Object.hasOwnProperty.call(message, "gameserver_steam_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.gameserver_steam_id); - if (message.gameserver_net_id != null && Object.hasOwnProperty.call(message, "gameserver_net_id")) + if (message.gameserver_net_id != null && $Object.hasOwnProperty.call(message, "gameserver_net_id")) writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.gameserver_net_id); - if (message.legacy_signature != null && Object.hasOwnProperty.call(message, "legacy_signature")) + if (message.legacy_signature != null && $Object.hasOwnProperty.call(message, "legacy_signature")) writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.legacy_signature); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.app_id); if (message.extra_fields != null && message.extra_fields.length) for (var i = 0; i < message.extra_fields.length; ++i) - $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.gameserver_pop_id != null && Object.hasOwnProperty.call(message, "gameserver_pop_id")) + $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.gameserver_pop_id != null && $Object.hasOwnProperty.call(message, "gameserver_pop_id")) writer.uint32(/* id 9, wireType 5 =*/77).fixed32(message.gameserver_pop_id); - if (message.virtual_port != null && Object.hasOwnProperty.call(message, "virtual_port")) + if (message.virtual_port != null && $Object.hasOwnProperty.call(message, "virtual_port")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.virtual_port); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -183,12 +208,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramRelayAuthTicket * @static - * @param {ICMsgSteamDatagramRelayAuthTicket} message CMsgSteamDatagramRelayAuthTicket message or plain object to encode + * @param {CMsgSteamDatagramRelayAuthTicket.$Properties} message CMsgSteamDatagramRelayAuthTicket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramRelayAuthTicket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramRelayAuthTicket.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -198,54 +223,98 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramRelayAuthTicket} CMsgSteamDatagramRelayAuthTicket + * @returns {CMsgSteamDatagramRelayAuthTicket & CMsgSteamDatagramRelayAuthTicket.$Shape} CMsgSteamDatagramRelayAuthTicket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramRelayAuthTicket.decode = function decode(reader, length) { + CMsgSteamDatagramRelayAuthTicket.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramRelayAuthTicket(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramRelayAuthTicket(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time_expiry = reader.fixed32(); - break; - case 2: - message.authorized_steam_id = reader.fixed64(); - break; - case 3: - message.authorized_public_ip = reader.fixed32(); - break; - case 4: - message.gameserver_steam_id = reader.fixed64(); - break; - case 5: - message.gameserver_net_id = reader.fixed64(); - break; - case 6: - message.legacy_signature = reader.bytes(); - break; - case 7: - message.app_id = reader.uint32(); - break; - case 9: - message.gameserver_pop_id = reader.fixed32(); - break; - case 10: - message.virtual_port = reader.uint32(); - break; - case 8: - if (!(message.extra_fields && message.extra_fields.length)) - message.extra_fields = []; - message.extra_fields.push($root.CMsgSteamDatagramRelayAuthTicket.ExtraField.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.time_expiry = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.authorized_steam_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.authorized_public_ip = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.gameserver_steam_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 1) + break; + message.gameserver_net_id = reader.fixed64(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.legacy_signature = reader.bytes(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 5) + break; + message.gameserver_pop_id = reader.fixed32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.virtual_port = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 2) + break; + if (!(message.extra_fields && message.extra_fields.length)) + message.extra_fields = []; + message.extra_fields.push($root.CMsgSteamDatagramRelayAuthTicket.ExtraField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -255,11 +324,11 @@ * @memberof CMsgSteamDatagramRelayAuthTicket * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramRelayAuthTicket} CMsgSteamDatagramRelayAuthTicket + * @returns {CMsgSteamDatagramRelayAuthTicket & CMsgSteamDatagramRelayAuthTicket.$Shape} CMsgSteamDatagramRelayAuthTicket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramRelayAuthTicket.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramRelayAuthTicket.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -273,41 +342,45 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramRelayAuthTicket.verify = function verify(message) { + CMsgSteamDatagramRelayAuthTicket.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.time_expiry != null && message.hasOwnProperty("time_expiry")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) if (!$util.isInteger(message.time_expiry)) return "time_expiry: integer expected"; - if (message.authorized_steam_id != null && message.hasOwnProperty("authorized_steam_id")) + if (message.authorized_steam_id != null && $Object.hasOwnProperty.call(message, "authorized_steam_id")) if (!$util.isInteger(message.authorized_steam_id) && !(message.authorized_steam_id && $util.isInteger(message.authorized_steam_id.low) && $util.isInteger(message.authorized_steam_id.high))) return "authorized_steam_id: integer|Long expected"; - if (message.authorized_public_ip != null && message.hasOwnProperty("authorized_public_ip")) + if (message.authorized_public_ip != null && $Object.hasOwnProperty.call(message, "authorized_public_ip")) if (!$util.isInteger(message.authorized_public_ip)) return "authorized_public_ip: integer expected"; - if (message.gameserver_steam_id != null && message.hasOwnProperty("gameserver_steam_id")) + if (message.gameserver_steam_id != null && $Object.hasOwnProperty.call(message, "gameserver_steam_id")) if (!$util.isInteger(message.gameserver_steam_id) && !(message.gameserver_steam_id && $util.isInteger(message.gameserver_steam_id.low) && $util.isInteger(message.gameserver_steam_id.high))) return "gameserver_steam_id: integer|Long expected"; - if (message.gameserver_net_id != null && message.hasOwnProperty("gameserver_net_id")) + if (message.gameserver_net_id != null && $Object.hasOwnProperty.call(message, "gameserver_net_id")) if (!$util.isInteger(message.gameserver_net_id) && !(message.gameserver_net_id && $util.isInteger(message.gameserver_net_id.low) && $util.isInteger(message.gameserver_net_id.high))) return "gameserver_net_id: integer|Long expected"; - if (message.legacy_signature != null && message.hasOwnProperty("legacy_signature")) + if (message.legacy_signature != null && $Object.hasOwnProperty.call(message, "legacy_signature")) if (!(message.legacy_signature && typeof message.legacy_signature.length === "number" || $util.isString(message.legacy_signature))) return "legacy_signature: buffer expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.gameserver_pop_id != null && message.hasOwnProperty("gameserver_pop_id")) + if (message.gameserver_pop_id != null && $Object.hasOwnProperty.call(message, "gameserver_pop_id")) if (!$util.isInteger(message.gameserver_pop_id)) return "gameserver_pop_id: integer expected"; - if (message.virtual_port != null && message.hasOwnProperty("virtual_port")) + if (message.virtual_port != null && $Object.hasOwnProperty.call(message, "virtual_port")) if (!$util.isInteger(message.virtual_port)) return "virtual_port: integer expected"; - if (message.extra_fields != null && message.hasOwnProperty("extra_fields")) { - if (!Array.isArray(message.extra_fields)) + if (message.extra_fields != null && $Object.hasOwnProperty.call(message, "extra_fields")) { + if (!$Array.isArray(message.extra_fields)) return "extra_fields: array expected"; for (var i = 0; i < message.extra_fields.length; ++i) { - var error = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.verify(message.extra_fields[i]); + var error = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.verify(message.extra_fields[i], _depth + 1); if (error) return "extra_fields." + error; } @@ -323,45 +396,51 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramRelayAuthTicket} CMsgSteamDatagramRelayAuthTicket */ - CMsgSteamDatagramRelayAuthTicket.fromObject = function fromObject(object) { + CMsgSteamDatagramRelayAuthTicket.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramRelayAuthTicket) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramRelayAuthTicket: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramRelayAuthTicket(); if (object.time_expiry != null) message.time_expiry = object.time_expiry >>> 0; if (object.authorized_steam_id != null) if ($util.Long) - (message.authorized_steam_id = $util.Long.fromValue(object.authorized_steam_id)).unsigned = false; + message.authorized_steam_id = $util.Long.fromValue(object.authorized_steam_id, true); else if (typeof object.authorized_steam_id === "string") - message.authorized_steam_id = parseInt(object.authorized_steam_id, 10); + message.authorized_steam_id = $parseInt(object.authorized_steam_id, 10); else if (typeof object.authorized_steam_id === "number") message.authorized_steam_id = object.authorized_steam_id; else if (typeof object.authorized_steam_id === "object") - message.authorized_steam_id = new $util.LongBits(object.authorized_steam_id.low >>> 0, object.authorized_steam_id.high >>> 0).toNumber(); + message.authorized_steam_id = new $util.LongBits(object.authorized_steam_id.low >>> 0, object.authorized_steam_id.high >>> 0).toNumber(true); if (object.authorized_public_ip != null) message.authorized_public_ip = object.authorized_public_ip >>> 0; if (object.gameserver_steam_id != null) if ($util.Long) - (message.gameserver_steam_id = $util.Long.fromValue(object.gameserver_steam_id)).unsigned = false; + message.gameserver_steam_id = $util.Long.fromValue(object.gameserver_steam_id, true); else if (typeof object.gameserver_steam_id === "string") - message.gameserver_steam_id = parseInt(object.gameserver_steam_id, 10); + message.gameserver_steam_id = $parseInt(object.gameserver_steam_id, 10); else if (typeof object.gameserver_steam_id === "number") message.gameserver_steam_id = object.gameserver_steam_id; else if (typeof object.gameserver_steam_id === "object") - message.gameserver_steam_id = new $util.LongBits(object.gameserver_steam_id.low >>> 0, object.gameserver_steam_id.high >>> 0).toNumber(); + message.gameserver_steam_id = new $util.LongBits(object.gameserver_steam_id.low >>> 0, object.gameserver_steam_id.high >>> 0).toNumber(true); if (object.gameserver_net_id != null) if ($util.Long) - (message.gameserver_net_id = $util.Long.fromValue(object.gameserver_net_id)).unsigned = false; + message.gameserver_net_id = $util.Long.fromValue(object.gameserver_net_id, true); else if (typeof object.gameserver_net_id === "string") - message.gameserver_net_id = parseInt(object.gameserver_net_id, 10); + message.gameserver_net_id = $parseInt(object.gameserver_net_id, 10); else if (typeof object.gameserver_net_id === "number") message.gameserver_net_id = object.gameserver_net_id; else if (typeof object.gameserver_net_id === "object") - message.gameserver_net_id = new $util.LongBits(object.gameserver_net_id.low >>> 0, object.gameserver_net_id.high >>> 0).toNumber(); + message.gameserver_net_id = new $util.LongBits(object.gameserver_net_id.low >>> 0, object.gameserver_net_id.high >>> 0).toNumber(true); if (object.legacy_signature != null) if (typeof object.legacy_signature === "string") $util.base64.decode(object.legacy_signature, message.legacy_signature = $util.newBuffer($util.base64.length(object.legacy_signature)), 0); - else if (object.legacy_signature.length) + else if (object.legacy_signature.length >= 0) message.legacy_signature = object.legacy_signature; if (object.app_id != null) message.app_id = object.app_id >>> 0; @@ -370,13 +449,13 @@ if (object.virtual_port != null) message.virtual_port = object.virtual_port >>> 0; if (object.extra_fields) { - if (!Array.isArray(object.extra_fields)) - throw TypeError(".CMsgSteamDatagramRelayAuthTicket.extra_fields: array expected"); - message.extra_fields = []; + if (!$Array.isArray(object.extra_fields)) + throw $TypeError(".CMsgSteamDatagramRelayAuthTicket.extra_fields: array expected"); + message.extra_fields = $Array(object.extra_fields.length); for (var i = 0; i < object.extra_fields.length; ++i) { - if (typeof object.extra_fields[i] !== "object") - throw TypeError(".CMsgSteamDatagramRelayAuthTicket.extra_fields: object expected"); - message.extra_fields[i] = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.fromObject(object.extra_fields[i]); + if (!$util.isObject(object.extra_fields[i])) + throw $TypeError(".CMsgSteamDatagramRelayAuthTicket.extra_fields: object expected"); + message.extra_fields[i] = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.fromObject(object.extra_fields[i], _depth + 1); } } return message; @@ -391,72 +470,82 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramRelayAuthTicket.toObject = function toObject(message, options) { + CMsgSteamDatagramRelayAuthTicket.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.extra_fields = []; if (options.defaults) { object.time_expiry = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.authorized_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.authorized_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.authorized_steam_id = options.longs === String ? "0" : 0; + object.authorized_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.authorized_public_ip = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gameserver_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.gameserver_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.gameserver_steam_id = options.longs === String ? "0" : 0; + object.gameserver_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gameserver_net_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.gameserver_net_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.gameserver_net_id = options.longs === String ? "0" : 0; - if (options.bytes === String) + object.gameserver_net_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (options.bytes === $String) object.legacy_signature = ""; else { object.legacy_signature = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.legacy_signature = $util.newBuffer(object.legacy_signature); } object.app_id = 0; object.gameserver_pop_id = 0; object.virtual_port = 0; } - if (message.time_expiry != null && message.hasOwnProperty("time_expiry")) + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) object.time_expiry = message.time_expiry; - if (message.authorized_steam_id != null && message.hasOwnProperty("authorized_steam_id")) - if (typeof message.authorized_steam_id === "number") - object.authorized_steam_id = options.longs === String ? String(message.authorized_steam_id) : message.authorized_steam_id; + if (message.authorized_steam_id != null && $Object.hasOwnProperty.call(message, "authorized_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.authorized_steam_id = typeof message.authorized_steam_id === "number" ? $BigInt(message.authorized_steam_id) : $util.Long.fromBits(message.authorized_steam_id.low >>> 0, message.authorized_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.authorized_steam_id === "number") + object.authorized_steam_id = options.longs === $String ? $String(message.authorized_steam_id) : message.authorized_steam_id; else - object.authorized_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.authorized_steam_id) : options.longs === Number ? new $util.LongBits(message.authorized_steam_id.low >>> 0, message.authorized_steam_id.high >>> 0).toNumber() : message.authorized_steam_id; - if (message.authorized_public_ip != null && message.hasOwnProperty("authorized_public_ip")) + object.authorized_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.authorized_steam_id) : options.longs === $Number ? new $util.LongBits(message.authorized_steam_id.low >>> 0, message.authorized_steam_id.high >>> 0).toNumber(true) : message.authorized_steam_id; + if (message.authorized_public_ip != null && $Object.hasOwnProperty.call(message, "authorized_public_ip")) object.authorized_public_ip = message.authorized_public_ip; - if (message.gameserver_steam_id != null && message.hasOwnProperty("gameserver_steam_id")) - if (typeof message.gameserver_steam_id === "number") - object.gameserver_steam_id = options.longs === String ? String(message.gameserver_steam_id) : message.gameserver_steam_id; + if (message.gameserver_steam_id != null && $Object.hasOwnProperty.call(message, "gameserver_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.gameserver_steam_id = typeof message.gameserver_steam_id === "number" ? $BigInt(message.gameserver_steam_id) : $util.Long.fromBits(message.gameserver_steam_id.low >>> 0, message.gameserver_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.gameserver_steam_id === "number") + object.gameserver_steam_id = options.longs === $String ? $String(message.gameserver_steam_id) : message.gameserver_steam_id; else - object.gameserver_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.gameserver_steam_id) : options.longs === Number ? new $util.LongBits(message.gameserver_steam_id.low >>> 0, message.gameserver_steam_id.high >>> 0).toNumber() : message.gameserver_steam_id; - if (message.gameserver_net_id != null && message.hasOwnProperty("gameserver_net_id")) - if (typeof message.gameserver_net_id === "number") - object.gameserver_net_id = options.longs === String ? String(message.gameserver_net_id) : message.gameserver_net_id; + object.gameserver_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.gameserver_steam_id) : options.longs === $Number ? new $util.LongBits(message.gameserver_steam_id.low >>> 0, message.gameserver_steam_id.high >>> 0).toNumber(true) : message.gameserver_steam_id; + if (message.gameserver_net_id != null && $Object.hasOwnProperty.call(message, "gameserver_net_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.gameserver_net_id = typeof message.gameserver_net_id === "number" ? $BigInt(message.gameserver_net_id) : $util.Long.fromBits(message.gameserver_net_id.low >>> 0, message.gameserver_net_id.high >>> 0, true).toBigInt(); + else if (typeof message.gameserver_net_id === "number") + object.gameserver_net_id = options.longs === $String ? $String(message.gameserver_net_id) : message.gameserver_net_id; else - object.gameserver_net_id = options.longs === String ? $util.Long.prototype.toString.call(message.gameserver_net_id) : options.longs === Number ? new $util.LongBits(message.gameserver_net_id.low >>> 0, message.gameserver_net_id.high >>> 0).toNumber() : message.gameserver_net_id; - if (message.legacy_signature != null && message.hasOwnProperty("legacy_signature")) - object.legacy_signature = options.bytes === String ? $util.base64.encode(message.legacy_signature, 0, message.legacy_signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.legacy_signature) : message.legacy_signature; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.gameserver_net_id = options.longs === $String ? $util.Long.prototype.toString.call(message.gameserver_net_id) : options.longs === $Number ? new $util.LongBits(message.gameserver_net_id.low >>> 0, message.gameserver_net_id.high >>> 0).toNumber(true) : message.gameserver_net_id; + if (message.legacy_signature != null && $Object.hasOwnProperty.call(message, "legacy_signature")) + object.legacy_signature = options.bytes === $String ? $util.base64.encode(message.legacy_signature, 0, message.legacy_signature.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.legacy_signature) : message.legacy_signature; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; if (message.extra_fields && message.extra_fields.length) { - object.extra_fields = []; + object.extra_fields = $Array(message.extra_fields.length); for (var j = 0; j < message.extra_fields.length; ++j) - object.extra_fields[j] = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.toObject(message.extra_fields[j], options); + object.extra_fields[j] = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.toObject(message.extra_fields[j], options, _depth + 1); } - if (message.gameserver_pop_id != null && message.hasOwnProperty("gameserver_pop_id")) + if (message.gameserver_pop_id != null && $Object.hasOwnProperty.call(message, "gameserver_pop_id")) object.gameserver_pop_id = message.gameserver_pop_id; - if (message.virtual_port != null && message.hasOwnProperty("virtual_port")) + if (message.virtual_port != null && $Object.hasOwnProperty.call(message, "virtual_port")) object.virtual_port = message.virtual_port; return object; }; @@ -468,36 +557,63 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramRelayAuthTicket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramRelayAuthTicket.prototype.toJSON = function() { + return CMsgSteamDatagramRelayAuthTicket.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramRelayAuthTicket + * @function getTypeUrl + * @memberof CMsgSteamDatagramRelayAuthTicket + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramRelayAuthTicket.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramRelayAuthTicket"; }; CMsgSteamDatagramRelayAuthTicket.ExtraField = (function() { /** * Properties of an ExtraField. - * @memberof CMsgSteamDatagramRelayAuthTicket - * @interface IExtraField + * @typedef {Object} CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties * @property {string|null} [name] ExtraField name * @property {string|null} [string_value] ExtraField string_value * @property {number|Long|null} [int64_value] ExtraField int64_value * @property {number|Long|null} [fixed64_value] ExtraField fixed64_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtraField. + * @memberof CMsgSteamDatagramRelayAuthTicket + * @interface IExtraField + * @augments CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties + * @deprecated Use CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties instead. + */ + + /** + * Shape of an ExtraField. + * @typedef {CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties} CMsgSteamDatagramRelayAuthTicket.ExtraField.$Shape */ /** * Constructs a new ExtraField. * @memberof CMsgSteamDatagramRelayAuthTicket * @classdesc Represents an ExtraField. - * @implements IExtraField * @constructor - * @param {CMsgSteamDatagramRelayAuthTicket.IExtraField=} [properties] Properties to set + * @param {CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtraField(properties) { + var ExtraField = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtraField name. @@ -529,17 +645,21 @@ * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField * @instance */ - ExtraField.prototype.fixed64_value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ExtraField.prototype.fixed64_value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new ExtraField instance using the specified properties. * @function create * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField * @static - * @param {CMsgSteamDatagramRelayAuthTicket.IExtraField=} [properties] Properties to set + * @param {CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField} ExtraField instance + * @type {{ + * (properties: CMsgSteamDatagramRelayAuthTicket.ExtraField.$Shape): CMsgSteamDatagramRelayAuthTicket.ExtraField & CMsgSteamDatagramRelayAuthTicket.ExtraField.$Shape; + * (properties?: CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties): CMsgSteamDatagramRelayAuthTicket.ExtraField; + * }} */ - ExtraField.create = function create(properties) { + ExtraField.create = function(properties) { return new ExtraField(properties); }; @@ -548,21 +668,28 @@ * @function encode * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField * @static - * @param {CMsgSteamDatagramRelayAuthTicket.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encode = function encode(message, writer) { + ExtraField.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.string_value); - if (message.int64_value != null && Object.hasOwnProperty.call(message, "int64_value")) + if (message.int64_value != null && $Object.hasOwnProperty.call(message, "int64_value")) writer.uint32(/* id 3, wireType 0 =*/24).sint64(message.int64_value); - if (message.fixed64_value != null && Object.hasOwnProperty.call(message, "fixed64_value")) + if (message.fixed64_value != null && $Object.hasOwnProperty.call(message, "fixed64_value")) writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.fixed64_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -571,12 +698,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField * @static - * @param {CMsgSteamDatagramRelayAuthTicket.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtraField.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -586,34 +713,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField} ExtraField + * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField & CMsgSteamDatagramRelayAuthTicket.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decode = function decode(reader, length) { + ExtraField.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramRelayAuthTicket.ExtraField(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramRelayAuthTicket.ExtraField(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.string_value = reader.string(); - break; - case 3: - message.int64_value = reader.sint64(); - break; - case 5: - message.fixed64_value = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.string_value = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.int64_value = reader.sint64(); + continue; + } + case 5: { + if (wireType !== 1) + break; + message.fixed64_value = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -623,11 +776,11 @@ * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField} ExtraField + * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField & CMsgSteamDatagramRelayAuthTicket.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decodeDelimited = function decodeDelimited(reader) { + ExtraField.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -641,19 +794,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtraField.verify = function verify(message) { + ExtraField.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) if (!$util.isString(message.string_value)) return "string_value: string expected"; - if (message.int64_value != null && message.hasOwnProperty("int64_value")) + if (message.int64_value != null && $Object.hasOwnProperty.call(message, "int64_value")) if (!$util.isInteger(message.int64_value) && !(message.int64_value && $util.isInteger(message.int64_value.low) && $util.isInteger(message.int64_value.high))) return "int64_value: integer|Long expected"; - if (message.fixed64_value != null && message.hasOwnProperty("fixed64_value")) + if (message.fixed64_value != null && $Object.hasOwnProperty.call(message, "fixed64_value")) if (!$util.isInteger(message.fixed64_value) && !(message.fixed64_value && $util.isInteger(message.fixed64_value.low) && $util.isInteger(message.fixed64_value.high))) return "fixed64_value: integer|Long expected"; return null; @@ -667,32 +824,38 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField} ExtraField */ - ExtraField.fromObject = function fromObject(object) { + ExtraField.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramRelayAuthTicket.ExtraField) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramRelayAuthTicket.ExtraField: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramRelayAuthTicket.ExtraField(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.string_value != null) - message.string_value = String(object.string_value); + message.string_value = $String(object.string_value); if (object.int64_value != null) if ($util.Long) - (message.int64_value = $util.Long.fromValue(object.int64_value)).unsigned = false; + message.int64_value = $util.Long.fromValue(object.int64_value, false); else if (typeof object.int64_value === "string") - message.int64_value = parseInt(object.int64_value, 10); + message.int64_value = $parseInt(object.int64_value, 10); else if (typeof object.int64_value === "number") message.int64_value = object.int64_value; else if (typeof object.int64_value === "object") message.int64_value = new $util.LongBits(object.int64_value.low >>> 0, object.int64_value.high >>> 0).toNumber(); if (object.fixed64_value != null) if ($util.Long) - (message.fixed64_value = $util.Long.fromValue(object.fixed64_value)).unsigned = false; + message.fixed64_value = $util.Long.fromValue(object.fixed64_value, true); else if (typeof object.fixed64_value === "string") - message.fixed64_value = parseInt(object.fixed64_value, 10); + message.fixed64_value = $parseInt(object.fixed64_value, 10); else if (typeof object.fixed64_value === "number") message.fixed64_value = object.fixed64_value; else if (typeof object.fixed64_value === "object") - message.fixed64_value = new $util.LongBits(object.fixed64_value.low >>> 0, object.fixed64_value.high >>> 0).toNumber(); + message.fixed64_value = new $util.LongBits(object.fixed64_value.low >>> 0, object.fixed64_value.high >>> 0).toNumber(true); return message; }; @@ -705,38 +868,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtraField.toObject = function toObject(message, options) { + ExtraField.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.string_value = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.int64_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.int64_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.int64_value = options.longs === String ? "0" : 0; + object.int64_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.fixed64_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.fixed64_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.fixed64_value = options.longs === String ? "0" : 0; + object.fixed64_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) object.string_value = message.string_value; - if (message.int64_value != null && message.hasOwnProperty("int64_value")) - if (typeof message.int64_value === "number") - object.int64_value = options.longs === String ? String(message.int64_value) : message.int64_value; + if (message.int64_value != null && $Object.hasOwnProperty.call(message, "int64_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.int64_value = typeof message.int64_value === "number" ? $BigInt(message.int64_value) : $util.Long.fromBits(message.int64_value.low >>> 0, message.int64_value.high >>> 0, false).toBigInt(); + else if (typeof message.int64_value === "number") + object.int64_value = options.longs === $String ? $String(message.int64_value) : message.int64_value; else - object.int64_value = options.longs === String ? $util.Long.prototype.toString.call(message.int64_value) : options.longs === Number ? new $util.LongBits(message.int64_value.low >>> 0, message.int64_value.high >>> 0).toNumber() : message.int64_value; - if (message.fixed64_value != null && message.hasOwnProperty("fixed64_value")) - if (typeof message.fixed64_value === "number") - object.fixed64_value = options.longs === String ? String(message.fixed64_value) : message.fixed64_value; + object.int64_value = options.longs === $String ? $util.Long.prototype.toString.call(message.int64_value) : options.longs === $Number ? new $util.LongBits(message.int64_value.low >>> 0, message.int64_value.high >>> 0).toNumber() : message.int64_value; + if (message.fixed64_value != null && $Object.hasOwnProperty.call(message, "fixed64_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.fixed64_value = typeof message.fixed64_value === "number" ? $BigInt(message.fixed64_value) : $util.Long.fromBits(message.fixed64_value.low >>> 0, message.fixed64_value.high >>> 0, true).toBigInt(); + else if (typeof message.fixed64_value === "number") + object.fixed64_value = options.longs === $String ? $String(message.fixed64_value) : message.fixed64_value; else - object.fixed64_value = options.longs === String ? $util.Long.prototype.toString.call(message.fixed64_value) : options.longs === Number ? new $util.LongBits(message.fixed64_value.low >>> 0, message.fixed64_value.high >>> 0).toNumber() : message.fixed64_value; + object.fixed64_value = options.longs === $String ? $util.Long.prototype.toString.call(message.fixed64_value) : options.longs === $Number ? new $util.LongBits(message.fixed64_value.low >>> 0, message.fixed64_value.high >>> 0).toNumber(true) : message.fixed64_value; return object; }; @@ -747,8 +918,22 @@ * @instance * @returns {Object.} JSON object */ - ExtraField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtraField.prototype.toJSON = function() { + return ExtraField.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtraField + * @function getTypeUrl + * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtraField.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramRelayAuthTicket.ExtraField"; }; return ExtraField; @@ -761,28 +946,41 @@ /** * Properties of a CMsgSteamDatagramSignedRelayAuthTicket. - * @exports ICMsgSteamDatagramSignedRelayAuthTicket - * @interface ICMsgSteamDatagramSignedRelayAuthTicket + * @typedef {Object} CMsgSteamDatagramSignedRelayAuthTicket.$Properties * @property {number|Long|null} [reserved_do_not_use] CMsgSteamDatagramSignedRelayAuthTicket reserved_do_not_use * @property {number|Long|null} [key_id] CMsgSteamDatagramSignedRelayAuthTicket key_id * @property {Uint8Array|null} [ticket] CMsgSteamDatagramSignedRelayAuthTicket ticket * @property {Uint8Array|null} [signature] CMsgSteamDatagramSignedRelayAuthTicket signature + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramSignedRelayAuthTicket. + * @exports ICMsgSteamDatagramSignedRelayAuthTicket + * @interface ICMsgSteamDatagramSignedRelayAuthTicket + * @augments CMsgSteamDatagramSignedRelayAuthTicket.$Properties + * @deprecated Use CMsgSteamDatagramSignedRelayAuthTicket.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramSignedRelayAuthTicket. + * @typedef {CMsgSteamDatagramSignedRelayAuthTicket.$Properties} CMsgSteamDatagramSignedRelayAuthTicket.$Shape */ /** * Constructs a new CMsgSteamDatagramSignedRelayAuthTicket. * @exports CMsgSteamDatagramSignedRelayAuthTicket * @classdesc Represents a CMsgSteamDatagramSignedRelayAuthTicket. - * @implements ICMsgSteamDatagramSignedRelayAuthTicket * @constructor - * @param {ICMsgSteamDatagramSignedRelayAuthTicket=} [properties] Properties to set + * @param {CMsgSteamDatagramSignedRelayAuthTicket.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramSignedRelayAuthTicket(properties) { + var CMsgSteamDatagramSignedRelayAuthTicket = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramSignedRelayAuthTicket reserved_do_not_use. @@ -790,7 +988,7 @@ * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @instance */ - CMsgSteamDatagramSignedRelayAuthTicket.prototype.reserved_do_not_use = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramSignedRelayAuthTicket.prototype.reserved_do_not_use = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramSignedRelayAuthTicket key_id. @@ -798,7 +996,7 @@ * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @instance */ - CMsgSteamDatagramSignedRelayAuthTicket.prototype.key_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramSignedRelayAuthTicket.prototype.key_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramSignedRelayAuthTicket ticket. @@ -821,10 +1019,14 @@ * @function create * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @static - * @param {ICMsgSteamDatagramSignedRelayAuthTicket=} [properties] Properties to set + * @param {CMsgSteamDatagramSignedRelayAuthTicket.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramSignedRelayAuthTicket} CMsgSteamDatagramSignedRelayAuthTicket instance + * @type {{ + * (properties: CMsgSteamDatagramSignedRelayAuthTicket.$Shape): CMsgSteamDatagramSignedRelayAuthTicket & CMsgSteamDatagramSignedRelayAuthTicket.$Shape; + * (properties?: CMsgSteamDatagramSignedRelayAuthTicket.$Properties): CMsgSteamDatagramSignedRelayAuthTicket; + * }} */ - CMsgSteamDatagramSignedRelayAuthTicket.create = function create(properties) { + CMsgSteamDatagramSignedRelayAuthTicket.create = function(properties) { return new CMsgSteamDatagramSignedRelayAuthTicket(properties); }; @@ -833,21 +1035,28 @@ * @function encode * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @static - * @param {ICMsgSteamDatagramSignedRelayAuthTicket} message CMsgSteamDatagramSignedRelayAuthTicket message or plain object to encode + * @param {CMsgSteamDatagramSignedRelayAuthTicket.$Properties} message CMsgSteamDatagramSignedRelayAuthTicket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramSignedRelayAuthTicket.encode = function encode(message, writer) { + CMsgSteamDatagramSignedRelayAuthTicket.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.reserved_do_not_use != null && Object.hasOwnProperty.call(message, "reserved_do_not_use")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.reserved_do_not_use != null && $Object.hasOwnProperty.call(message, "reserved_do_not_use")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.reserved_do_not_use); - if (message.key_id != null && Object.hasOwnProperty.call(message, "key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.key_id); - if (message.ticket != null && Object.hasOwnProperty.call(message, "ticket")) + if (message.ticket != null && $Object.hasOwnProperty.call(message, "ticket")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.ticket); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signature); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -856,12 +1065,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @static - * @param {ICMsgSteamDatagramSignedRelayAuthTicket} message CMsgSteamDatagramSignedRelayAuthTicket message or plain object to encode + * @param {CMsgSteamDatagramSignedRelayAuthTicket.$Properties} message CMsgSteamDatagramSignedRelayAuthTicket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramSignedRelayAuthTicket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramSignedRelayAuthTicket.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -871,34 +1080,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramSignedRelayAuthTicket} CMsgSteamDatagramSignedRelayAuthTicket + * @returns {CMsgSteamDatagramSignedRelayAuthTicket & CMsgSteamDatagramSignedRelayAuthTicket.$Shape} CMsgSteamDatagramSignedRelayAuthTicket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramSignedRelayAuthTicket.decode = function decode(reader, length) { + CMsgSteamDatagramSignedRelayAuthTicket.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramSignedRelayAuthTicket(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramSignedRelayAuthTicket(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reserved_do_not_use = reader.fixed64(); - break; - case 2: - message.key_id = reader.fixed64(); - break; - case 3: - message.ticket = reader.bytes(); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.reserved_do_not_use = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.key_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.ticket = reader.bytes(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.signature = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -908,11 +1143,11 @@ * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramSignedRelayAuthTicket} CMsgSteamDatagramSignedRelayAuthTicket + * @returns {CMsgSteamDatagramSignedRelayAuthTicket & CMsgSteamDatagramSignedRelayAuthTicket.$Shape} CMsgSteamDatagramSignedRelayAuthTicket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramSignedRelayAuthTicket.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramSignedRelayAuthTicket.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -926,19 +1161,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramSignedRelayAuthTicket.verify = function verify(message) { + CMsgSteamDatagramSignedRelayAuthTicket.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reserved_do_not_use != null && message.hasOwnProperty("reserved_do_not_use")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.reserved_do_not_use != null && $Object.hasOwnProperty.call(message, "reserved_do_not_use")) if (!$util.isInteger(message.reserved_do_not_use) && !(message.reserved_do_not_use && $util.isInteger(message.reserved_do_not_use.low) && $util.isInteger(message.reserved_do_not_use.high))) return "reserved_do_not_use: integer|Long expected"; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) if (!$util.isInteger(message.key_id) && !(message.key_id && $util.isInteger(message.key_id.low) && $util.isInteger(message.key_id.high))) return "key_id: integer|Long expected"; - if (message.ticket != null && message.hasOwnProperty("ticket")) + if (message.ticket != null && $Object.hasOwnProperty.call(message, "ticket")) if (!(message.ticket && typeof message.ticket.length === "number" || $util.isString(message.ticket))) return "ticket: buffer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; return null; @@ -952,37 +1191,43 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramSignedRelayAuthTicket} CMsgSteamDatagramSignedRelayAuthTicket */ - CMsgSteamDatagramSignedRelayAuthTicket.fromObject = function fromObject(object) { + CMsgSteamDatagramSignedRelayAuthTicket.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramSignedRelayAuthTicket) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramSignedRelayAuthTicket: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramSignedRelayAuthTicket(); if (object.reserved_do_not_use != null) if ($util.Long) - (message.reserved_do_not_use = $util.Long.fromValue(object.reserved_do_not_use)).unsigned = false; + message.reserved_do_not_use = $util.Long.fromValue(object.reserved_do_not_use, true); else if (typeof object.reserved_do_not_use === "string") - message.reserved_do_not_use = parseInt(object.reserved_do_not_use, 10); + message.reserved_do_not_use = $parseInt(object.reserved_do_not_use, 10); else if (typeof object.reserved_do_not_use === "number") message.reserved_do_not_use = object.reserved_do_not_use; else if (typeof object.reserved_do_not_use === "object") - message.reserved_do_not_use = new $util.LongBits(object.reserved_do_not_use.low >>> 0, object.reserved_do_not_use.high >>> 0).toNumber(); + message.reserved_do_not_use = new $util.LongBits(object.reserved_do_not_use.low >>> 0, object.reserved_do_not_use.high >>> 0).toNumber(true); if (object.key_id != null) if ($util.Long) - (message.key_id = $util.Long.fromValue(object.key_id)).unsigned = false; + message.key_id = $util.Long.fromValue(object.key_id, true); else if (typeof object.key_id === "string") - message.key_id = parseInt(object.key_id, 10); + message.key_id = $parseInt(object.key_id, 10); else if (typeof object.key_id === "number") message.key_id = object.key_id; else if (typeof object.key_id === "object") - message.key_id = new $util.LongBits(object.key_id.low >>> 0, object.key_id.high >>> 0).toNumber(); + message.key_id = new $util.LongBits(object.key_id.low >>> 0, object.key_id.high >>> 0).toNumber(true); if (object.ticket != null) if (typeof object.ticket === "string") $util.base64.decode(object.ticket, message.ticket = $util.newBuffer($util.base64.length(object.ticket)), 0); - else if (object.ticket.length) + else if (object.ticket.length >= 0) message.ticket = object.ticket; if (object.signature != null) if (typeof object.signature === "string") $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) + else if (object.signature.length >= 0) message.signature = object.signature; return message; }; @@ -996,50 +1241,58 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramSignedRelayAuthTicket.toObject = function toObject(message, options) { + CMsgSteamDatagramSignedRelayAuthTicket.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_do_not_use = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.reserved_do_not_use = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.reserved_do_not_use = options.longs === String ? "0" : 0; + object.reserved_do_not_use = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.key_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.key_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.key_id = options.longs === String ? "0" : 0; - if (options.bytes === String) + object.key_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (options.bytes === $String) object.ticket = ""; else { object.ticket = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.ticket = $util.newBuffer(object.ticket); } - if (options.bytes === String) + if (options.bytes === $String) object.signature = ""; else { object.signature = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.signature = $util.newBuffer(object.signature); } } - if (message.reserved_do_not_use != null && message.hasOwnProperty("reserved_do_not_use")) - if (typeof message.reserved_do_not_use === "number") - object.reserved_do_not_use = options.longs === String ? String(message.reserved_do_not_use) : message.reserved_do_not_use; + if (message.reserved_do_not_use != null && $Object.hasOwnProperty.call(message, "reserved_do_not_use")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.reserved_do_not_use = typeof message.reserved_do_not_use === "number" ? $BigInt(message.reserved_do_not_use) : $util.Long.fromBits(message.reserved_do_not_use.low >>> 0, message.reserved_do_not_use.high >>> 0, true).toBigInt(); + else if (typeof message.reserved_do_not_use === "number") + object.reserved_do_not_use = options.longs === $String ? $String(message.reserved_do_not_use) : message.reserved_do_not_use; else - object.reserved_do_not_use = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_do_not_use) : options.longs === Number ? new $util.LongBits(message.reserved_do_not_use.low >>> 0, message.reserved_do_not_use.high >>> 0).toNumber() : message.reserved_do_not_use; - if (message.key_id != null && message.hasOwnProperty("key_id")) - if (typeof message.key_id === "number") - object.key_id = options.longs === String ? String(message.key_id) : message.key_id; + object.reserved_do_not_use = options.longs === $String ? $util.Long.prototype.toString.call(message.reserved_do_not_use) : options.longs === $Number ? new $util.LongBits(message.reserved_do_not_use.low >>> 0, message.reserved_do_not_use.high >>> 0).toNumber(true) : message.reserved_do_not_use; + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.key_id = typeof message.key_id === "number" ? $BigInt(message.key_id) : $util.Long.fromBits(message.key_id.low >>> 0, message.key_id.high >>> 0, true).toBigInt(); + else if (typeof message.key_id === "number") + object.key_id = options.longs === $String ? $String(message.key_id) : message.key_id; else - object.key_id = options.longs === String ? $util.Long.prototype.toString.call(message.key_id) : options.longs === Number ? new $util.LongBits(message.key_id.low >>> 0, message.key_id.high >>> 0).toNumber() : message.key_id; - if (message.ticket != null && message.hasOwnProperty("ticket")) - object.ticket = options.bytes === String ? $util.base64.encode(message.ticket, 0, message.ticket.length) : options.bytes === Array ? Array.prototype.slice.call(message.ticket) : message.ticket; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + object.key_id = options.longs === $String ? $util.Long.prototype.toString.call(message.key_id) : options.longs === $Number ? new $util.LongBits(message.key_id.low >>> 0, message.key_id.high >>> 0).toNumber(true) : message.key_id; + if (message.ticket != null && $Object.hasOwnProperty.call(message, "ticket")) + object.ticket = options.bytes === $String ? $util.base64.encode(message.ticket, 0, message.ticket.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.ticket) : message.ticket; + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) + object.signature = options.bytes === $String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.signature) : message.signature; return object; }; @@ -1050,8 +1303,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramSignedRelayAuthTicket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramSignedRelayAuthTicket.prototype.toJSON = function() { + return CMsgSteamDatagramSignedRelayAuthTicket.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramSignedRelayAuthTicket + * @function getTypeUrl + * @memberof CMsgSteamDatagramSignedRelayAuthTicket + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramSignedRelayAuthTicket.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramSignedRelayAuthTicket"; }; return CMsgSteamDatagramSignedRelayAuthTicket; @@ -1061,8 +1328,7 @@ /** * Properties of a CMsgSteamDatagramCertificate. - * @exports ICMsgSteamDatagramCertificate - * @interface ICMsgSteamDatagramCertificate + * @typedef {Object} CMsgSteamDatagramCertificate.$Properties * @property {CMsgSteamDatagramCertificate.EKeyType|null} [key_type] CMsgSteamDatagramCertificate key_type * @property {Uint8Array|null} [key_data] CMsgSteamDatagramCertificate key_data * @property {number|Long|null} [steam_id] CMsgSteamDatagramCertificate steam_id @@ -1070,23 +1336,37 @@ * @property {number|null} [time_created] CMsgSteamDatagramCertificate time_created * @property {number|null} [time_expiry] CMsgSteamDatagramCertificate time_expiry * @property {number|null} [app_id] CMsgSteamDatagramCertificate app_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramCertificate. + * @exports ICMsgSteamDatagramCertificate + * @interface ICMsgSteamDatagramCertificate + * @augments CMsgSteamDatagramCertificate.$Properties + * @deprecated Use CMsgSteamDatagramCertificate.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramCertificate. + * @typedef {CMsgSteamDatagramCertificate.$Properties} CMsgSteamDatagramCertificate.$Shape */ /** * Constructs a new CMsgSteamDatagramCertificate. * @exports CMsgSteamDatagramCertificate * @classdesc Represents a CMsgSteamDatagramCertificate. - * @implements ICMsgSteamDatagramCertificate * @constructor - * @param {ICMsgSteamDatagramCertificate=} [properties] Properties to set + * @param {CMsgSteamDatagramCertificate.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramCertificate(properties) { + var CMsgSteamDatagramCertificate = function (properties) { this.gameserver_datacenter_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramCertificate key_type. @@ -1110,7 +1390,7 @@ * @memberof CMsgSteamDatagramCertificate * @instance */ - CMsgSteamDatagramCertificate.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramCertificate.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramCertificate gameserver_datacenter_ids. @@ -1149,10 +1429,14 @@ * @function create * @memberof CMsgSteamDatagramCertificate * @static - * @param {ICMsgSteamDatagramCertificate=} [properties] Properties to set + * @param {CMsgSteamDatagramCertificate.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramCertificate} CMsgSteamDatagramCertificate instance + * @type {{ + * (properties: CMsgSteamDatagramCertificate.$Shape): CMsgSteamDatagramCertificate & CMsgSteamDatagramCertificate.$Shape; + * (properties?: CMsgSteamDatagramCertificate.$Properties): CMsgSteamDatagramCertificate; + * }} */ - CMsgSteamDatagramCertificate.create = function create(properties) { + CMsgSteamDatagramCertificate.create = function(properties) { return new CMsgSteamDatagramCertificate(properties); }; @@ -1161,28 +1445,35 @@ * @function encode * @memberof CMsgSteamDatagramCertificate * @static - * @param {ICMsgSteamDatagramCertificate} message CMsgSteamDatagramCertificate message or plain object to encode + * @param {CMsgSteamDatagramCertificate.$Properties} message CMsgSteamDatagramCertificate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramCertificate.encode = function encode(message, writer) { + CMsgSteamDatagramCertificate.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.key_type != null && Object.hasOwnProperty.call(message, "key_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.key_type != null && $Object.hasOwnProperty.call(message, "key_type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.key_type); - if (message.key_data != null && Object.hasOwnProperty.call(message, "key_data")) + if (message.key_data != null && $Object.hasOwnProperty.call(message, "key_data")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key_data); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.steam_id); if (message.gameserver_datacenter_ids != null && message.gameserver_datacenter_ids.length) for (var i = 0; i < message.gameserver_datacenter_ids.length; ++i) writer.uint32(/* id 5, wireType 5 =*/45).fixed32(message.gameserver_datacenter_ids[i]); - if (message.time_created != null && Object.hasOwnProperty.call(message, "time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.time_created); - if (message.time_expiry != null && Object.hasOwnProperty.call(message, "time_expiry")) + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) writer.uint32(/* id 9, wireType 5 =*/77).fixed32(message.time_expiry); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.app_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1191,12 +1482,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramCertificate * @static - * @param {ICMsgSteamDatagramCertificate} message CMsgSteamDatagramCertificate message or plain object to encode + * @param {CMsgSteamDatagramCertificate.$Properties} message CMsgSteamDatagramCertificate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramCertificate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramCertificate.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1206,50 +1497,92 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramCertificate} CMsgSteamDatagramCertificate + * @returns {CMsgSteamDatagramCertificate & CMsgSteamDatagramCertificate.$Shape} CMsgSteamDatagramCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramCertificate.decode = function decode(reader, length) { + CMsgSteamDatagramCertificate.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramCertificate(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramCertificate(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key_type = reader.int32(); - break; - case 2: - message.key_data = reader.bytes(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 4: - message.steam_id = reader.fixed64(); - break; - case 5: - if (!(message.gameserver_datacenter_ids && message.gameserver_datacenter_ids.length)) - message.gameserver_datacenter_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.gameserver_datacenter_ids.push(reader.fixed32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgSteamDatagramCertificate.EKeyType[value] !== $undefined) + message.key_type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 2) + break; + message.key_data = reader.bytes(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType === 2) { + if (!(message.gameserver_datacenter_ids && message.gameserver_datacenter_ids.length)) + message.gameserver_datacenter_ids = []; + reader.fixed32s(message.gameserver_datacenter_ids); + continue; + } + if (wireType !== 5) + break; + if (!(message.gameserver_datacenter_ids && message.gameserver_datacenter_ids.length)) + message.gameserver_datacenter_ids = []; message.gameserver_datacenter_ids.push(reader.fixed32()); - break; - case 8: - message.time_created = reader.fixed32(); - break; - case 9: - message.time_expiry = reader.fixed32(); - break; - case 10: - message.app_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 8: { + if (wireType !== 5) + break; + message.time_created = reader.fixed32(); + continue; + } + case 9: { + if (wireType !== 5) + break; + message.time_expiry = reader.fixed32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1259,11 +1592,11 @@ * @memberof CMsgSteamDatagramCertificate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramCertificate} CMsgSteamDatagramCertificate + * @returns {CMsgSteamDatagramCertificate & CMsgSteamDatagramCertificate.$Shape} CMsgSteamDatagramCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramCertificate.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramCertificate.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1277,10 +1610,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramCertificate.verify = function verify(message) { + CMsgSteamDatagramCertificate.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key_type != null && message.hasOwnProperty("key_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.key_type != null && $Object.hasOwnProperty.call(message, "key_type")) switch (message.key_type) { default: return "key_type: enum value expected"; @@ -1288,26 +1625,26 @@ case 1: break; } - if (message.key_data != null && message.hasOwnProperty("key_data")) + if (message.key_data != null && $Object.hasOwnProperty.call(message, "key_data")) if (!(message.key_data && typeof message.key_data.length === "number" || $util.isString(message.key_data))) return "key_data: buffer expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.gameserver_datacenter_ids != null && message.hasOwnProperty("gameserver_datacenter_ids")) { - if (!Array.isArray(message.gameserver_datacenter_ids)) + if (message.gameserver_datacenter_ids != null && $Object.hasOwnProperty.call(message, "gameserver_datacenter_ids")) { + if (!$Array.isArray(message.gameserver_datacenter_ids)) return "gameserver_datacenter_ids: array expected"; for (var i = 0; i < message.gameserver_datacenter_ids.length; ++i) if (!$util.isInteger(message.gameserver_datacenter_ids[i])) return "gameserver_datacenter_ids: integer[] expected"; } - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) if (!$util.isInteger(message.time_created)) return "time_created: integer expected"; - if (message.time_expiry != null && message.hasOwnProperty("time_expiry")) + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) if (!$util.isInteger(message.time_expiry)) return "time_expiry: integer expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; return null; @@ -1321,9 +1658,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramCertificate} CMsgSteamDatagramCertificate */ - CMsgSteamDatagramCertificate.fromObject = function fromObject(object) { + CMsgSteamDatagramCertificate.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramCertificate) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramCertificate: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramCertificate(); switch (object.key_type) { case "INVALID": @@ -1334,25 +1677,26 @@ case 1: message.key_type = 1; break; + default: } if (object.key_data != null) if (typeof object.key_data === "string") $util.base64.decode(object.key_data, message.key_data = $util.newBuffer($util.base64.length(object.key_data)), 0); - else if (object.key_data.length) + else if (object.key_data.length >= 0) message.key_data = object.key_data; if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.gameserver_datacenter_ids) { - if (!Array.isArray(object.gameserver_datacenter_ids)) - throw TypeError(".CMsgSteamDatagramCertificate.gameserver_datacenter_ids: array expected"); - message.gameserver_datacenter_ids = []; + if (!$Array.isArray(object.gameserver_datacenter_ids)) + throw $TypeError(".CMsgSteamDatagramCertificate.gameserver_datacenter_ids: array expected"); + message.gameserver_datacenter_ids = $Array(object.gameserver_datacenter_ids.length); for (var i = 0; i < object.gameserver_datacenter_ids.length; ++i) message.gameserver_datacenter_ids[i] = object.gameserver_datacenter_ids[i] >>> 0; } @@ -1374,49 +1718,55 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramCertificate.toObject = function toObject(message, options) { + CMsgSteamDatagramCertificate.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.gameserver_datacenter_ids = []; if (options.defaults) { - object.key_type = options.enums === String ? "INVALID" : 0; - if (options.bytes === String) + object.key_type = options.enums === $String ? "INVALID" : 0; + if (options.bytes === $String) object.key_data = ""; else { object.key_data = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.key_data = $util.newBuffer(object.key_data); } if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.time_created = 0; object.time_expiry = 0; object.app_id = 0; } - if (message.key_type != null && message.hasOwnProperty("key_type")) - object.key_type = options.enums === String ? $root.CMsgSteamDatagramCertificate.EKeyType[message.key_type] : message.key_type; - if (message.key_data != null && message.hasOwnProperty("key_data")) - object.key_data = options.bytes === String ? $util.base64.encode(message.key_data, 0, message.key_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.key_data) : message.key_data; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.key_type != null && $Object.hasOwnProperty.call(message, "key_type")) + object.key_type = options.enums === $String ? $root.CMsgSteamDatagramCertificate.EKeyType[message.key_type] === $undefined ? message.key_type : $root.CMsgSteamDatagramCertificate.EKeyType[message.key_type] : message.key_type; + if (message.key_data != null && $Object.hasOwnProperty.call(message, "key_data")) + object.key_data = options.bytes === $String ? $util.base64.encode(message.key_data, 0, message.key_data.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.key_data) : message.key_data; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; if (message.gameserver_datacenter_ids && message.gameserver_datacenter_ids.length) { - object.gameserver_datacenter_ids = []; + object.gameserver_datacenter_ids = $Array(message.gameserver_datacenter_ids.length); for (var j = 0; j < message.gameserver_datacenter_ids.length; ++j) object.gameserver_datacenter_ids[j] = message.gameserver_datacenter_ids[j]; } - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) object.time_created = message.time_created; - if (message.time_expiry != null && message.hasOwnProperty("time_expiry")) + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) object.time_expiry = message.time_expiry; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; return object; }; @@ -1428,8 +1778,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramCertificate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramCertificate.prototype.toJSON = function() { + return CMsgSteamDatagramCertificate.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramCertificate + * @function getTypeUrl + * @memberof CMsgSteamDatagramCertificate + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramCertificate.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramCertificate"; }; /** @@ -1440,7 +1804,7 @@ * @property {number} ED25519=1 ED25519 value */ CMsgSteamDatagramCertificate.EKeyType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "INVALID"] = 0; values[valuesById[1] = "ED25519"] = 1; return values; @@ -1453,27 +1817,40 @@ /** * Properties of a CMsgSteamDatagramCertificateSigned. - * @exports ICMsgSteamDatagramCertificateSigned - * @interface ICMsgSteamDatagramCertificateSigned + * @typedef {Object} CMsgSteamDatagramCertificateSigned.$Properties * @property {Uint8Array|null} [cert] CMsgSteamDatagramCertificateSigned cert * @property {number|Long|null} [ca_key_id] CMsgSteamDatagramCertificateSigned ca_key_id * @property {Uint8Array|null} [ca_signature] CMsgSteamDatagramCertificateSigned ca_signature + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramCertificateSigned. + * @exports ICMsgSteamDatagramCertificateSigned + * @interface ICMsgSteamDatagramCertificateSigned + * @augments CMsgSteamDatagramCertificateSigned.$Properties + * @deprecated Use CMsgSteamDatagramCertificateSigned.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramCertificateSigned. + * @typedef {CMsgSteamDatagramCertificateSigned.$Properties} CMsgSteamDatagramCertificateSigned.$Shape */ /** * Constructs a new CMsgSteamDatagramCertificateSigned. * @exports CMsgSteamDatagramCertificateSigned * @classdesc Represents a CMsgSteamDatagramCertificateSigned. - * @implements ICMsgSteamDatagramCertificateSigned * @constructor - * @param {ICMsgSteamDatagramCertificateSigned=} [properties] Properties to set + * @param {CMsgSteamDatagramCertificateSigned.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramCertificateSigned(properties) { + var CMsgSteamDatagramCertificateSigned = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramCertificateSigned cert. @@ -1489,7 +1866,7 @@ * @memberof CMsgSteamDatagramCertificateSigned * @instance */ - CMsgSteamDatagramCertificateSigned.prototype.ca_key_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramCertificateSigned.prototype.ca_key_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramCertificateSigned ca_signature. @@ -1504,10 +1881,14 @@ * @function create * @memberof CMsgSteamDatagramCertificateSigned * @static - * @param {ICMsgSteamDatagramCertificateSigned=} [properties] Properties to set + * @param {CMsgSteamDatagramCertificateSigned.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramCertificateSigned} CMsgSteamDatagramCertificateSigned instance + * @type {{ + * (properties: CMsgSteamDatagramCertificateSigned.$Shape): CMsgSteamDatagramCertificateSigned & CMsgSteamDatagramCertificateSigned.$Shape; + * (properties?: CMsgSteamDatagramCertificateSigned.$Properties): CMsgSteamDatagramCertificateSigned; + * }} */ - CMsgSteamDatagramCertificateSigned.create = function create(properties) { + CMsgSteamDatagramCertificateSigned.create = function(properties) { return new CMsgSteamDatagramCertificateSigned(properties); }; @@ -1516,19 +1897,26 @@ * @function encode * @memberof CMsgSteamDatagramCertificateSigned * @static - * @param {ICMsgSteamDatagramCertificateSigned} message CMsgSteamDatagramCertificateSigned message or plain object to encode + * @param {CMsgSteamDatagramCertificateSigned.$Properties} message CMsgSteamDatagramCertificateSigned message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramCertificateSigned.encode = function encode(message, writer) { + CMsgSteamDatagramCertificateSigned.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.cert != null && Object.hasOwnProperty.call(message, "cert")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.cert); - if (message.ca_key_id != null && Object.hasOwnProperty.call(message, "ca_key_id")) + if (message.ca_key_id != null && $Object.hasOwnProperty.call(message, "ca_key_id")) writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.ca_key_id); - if (message.ca_signature != null && Object.hasOwnProperty.call(message, "ca_signature")) + if (message.ca_signature != null && $Object.hasOwnProperty.call(message, "ca_signature")) writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.ca_signature); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1537,12 +1925,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramCertificateSigned * @static - * @param {ICMsgSteamDatagramCertificateSigned} message CMsgSteamDatagramCertificateSigned message or plain object to encode + * @param {CMsgSteamDatagramCertificateSigned.$Properties} message CMsgSteamDatagramCertificateSigned message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramCertificateSigned.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramCertificateSigned.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1552,31 +1940,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramCertificateSigned} CMsgSteamDatagramCertificateSigned + * @returns {CMsgSteamDatagramCertificateSigned & CMsgSteamDatagramCertificateSigned.$Shape} CMsgSteamDatagramCertificateSigned * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramCertificateSigned.decode = function decode(reader, length) { + CMsgSteamDatagramCertificateSigned.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramCertificateSigned(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramCertificateSigned(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.cert = reader.bytes(); - break; - case 5: - message.ca_key_id = reader.fixed64(); - break; - case 6: - message.ca_signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 4: { + if (wireType !== 2) + break; + message.cert = reader.bytes(); + continue; + } + case 5: { + if (wireType !== 1) + break; + message.ca_key_id = reader.fixed64(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.ca_signature = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1586,11 +1997,11 @@ * @memberof CMsgSteamDatagramCertificateSigned * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramCertificateSigned} CMsgSteamDatagramCertificateSigned + * @returns {CMsgSteamDatagramCertificateSigned & CMsgSteamDatagramCertificateSigned.$Shape} CMsgSteamDatagramCertificateSigned * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramCertificateSigned.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramCertificateSigned.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1604,16 +2015,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramCertificateSigned.verify = function verify(message) { + CMsgSteamDatagramCertificateSigned.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cert != null && message.hasOwnProperty("cert")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) if (!(message.cert && typeof message.cert.length === "number" || $util.isString(message.cert))) return "cert: buffer expected"; - if (message.ca_key_id != null && message.hasOwnProperty("ca_key_id")) + if (message.ca_key_id != null && $Object.hasOwnProperty.call(message, "ca_key_id")) if (!$util.isInteger(message.ca_key_id) && !(message.ca_key_id && $util.isInteger(message.ca_key_id.low) && $util.isInteger(message.ca_key_id.high))) return "ca_key_id: integer|Long expected"; - if (message.ca_signature != null && message.hasOwnProperty("ca_signature")) + if (message.ca_signature != null && $Object.hasOwnProperty.call(message, "ca_signature")) if (!(message.ca_signature && typeof message.ca_signature.length === "number" || $util.isString(message.ca_signature))) return "ca_signature: buffer expected"; return null; @@ -1627,28 +2042,34 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramCertificateSigned} CMsgSteamDatagramCertificateSigned */ - CMsgSteamDatagramCertificateSigned.fromObject = function fromObject(object) { + CMsgSteamDatagramCertificateSigned.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramCertificateSigned) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramCertificateSigned: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramCertificateSigned(); if (object.cert != null) if (typeof object.cert === "string") $util.base64.decode(object.cert, message.cert = $util.newBuffer($util.base64.length(object.cert)), 0); - else if (object.cert.length) + else if (object.cert.length >= 0) message.cert = object.cert; if (object.ca_key_id != null) if ($util.Long) - (message.ca_key_id = $util.Long.fromValue(object.ca_key_id)).unsigned = false; + message.ca_key_id = $util.Long.fromValue(object.ca_key_id, true); else if (typeof object.ca_key_id === "string") - message.ca_key_id = parseInt(object.ca_key_id, 10); + message.ca_key_id = $parseInt(object.ca_key_id, 10); else if (typeof object.ca_key_id === "number") message.ca_key_id = object.ca_key_id; else if (typeof object.ca_key_id === "object") - message.ca_key_id = new $util.LongBits(object.ca_key_id.low >>> 0, object.ca_key_id.high >>> 0).toNumber(); + message.ca_key_id = new $util.LongBits(object.ca_key_id.low >>> 0, object.ca_key_id.high >>> 0).toNumber(true); if (object.ca_signature != null) if (typeof object.ca_signature === "string") $util.base64.decode(object.ca_signature, message.ca_signature = $util.newBuffer($util.base64.length(object.ca_signature)), 0); - else if (object.ca_signature.length) + else if (object.ca_signature.length >= 0) message.ca_signature = object.ca_signature; return message; }; @@ -1662,40 +2083,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramCertificateSigned.toObject = function toObject(message, options) { + CMsgSteamDatagramCertificateSigned.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - if (options.bytes === String) + if (options.bytes === $String) object.cert = ""; else { object.cert = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.cert = $util.newBuffer(object.cert); } if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.ca_key_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.ca_key_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.ca_key_id = options.longs === String ? "0" : 0; - if (options.bytes === String) + object.ca_key_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (options.bytes === $String) object.ca_signature = ""; else { object.ca_signature = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.ca_signature = $util.newBuffer(object.ca_signature); } } - if (message.cert != null && message.hasOwnProperty("cert")) - object.cert = options.bytes === String ? $util.base64.encode(message.cert, 0, message.cert.length) : options.bytes === Array ? Array.prototype.slice.call(message.cert) : message.cert; - if (message.ca_key_id != null && message.hasOwnProperty("ca_key_id")) - if (typeof message.ca_key_id === "number") - object.ca_key_id = options.longs === String ? String(message.ca_key_id) : message.ca_key_id; + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + object.cert = options.bytes === $String ? $util.base64.encode(message.cert, 0, message.cert.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.cert) : message.cert; + if (message.ca_key_id != null && $Object.hasOwnProperty.call(message, "ca_key_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.ca_key_id = typeof message.ca_key_id === "number" ? $BigInt(message.ca_key_id) : $util.Long.fromBits(message.ca_key_id.low >>> 0, message.ca_key_id.high >>> 0, true).toBigInt(); + else if (typeof message.ca_key_id === "number") + object.ca_key_id = options.longs === $String ? $String(message.ca_key_id) : message.ca_key_id; else - object.ca_key_id = options.longs === String ? $util.Long.prototype.toString.call(message.ca_key_id) : options.longs === Number ? new $util.LongBits(message.ca_key_id.low >>> 0, message.ca_key_id.high >>> 0).toNumber() : message.ca_key_id; - if (message.ca_signature != null && message.hasOwnProperty("ca_signature")) - object.ca_signature = options.bytes === String ? $util.base64.encode(message.ca_signature, 0, message.ca_signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.ca_signature) : message.ca_signature; + object.ca_key_id = options.longs === $String ? $util.Long.prototype.toString.call(message.ca_key_id) : options.longs === $Number ? new $util.LongBits(message.ca_key_id.low >>> 0, message.ca_key_id.high >>> 0).toNumber(true) : message.ca_key_id; + if (message.ca_signature != null && $Object.hasOwnProperty.call(message, "ca_signature")) + object.ca_signature = options.bytes === $String ? $util.base64.encode(message.ca_signature, 0, message.ca_signature.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.ca_signature) : message.ca_signature; return object; }; @@ -1706,8 +2133,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramCertificateSigned.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramCertificateSigned.prototype.toJSON = function() { + return CMsgSteamDatagramCertificateSigned.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramCertificateSigned + * @function getTypeUrl + * @memberof CMsgSteamDatagramCertificateSigned + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramCertificateSigned.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramCertificateSigned"; }; return CMsgSteamDatagramCertificateSigned; diff --git a/protobufs/generated/steamdatagram_messages.js b/protobufs/generated/steamdatagram_messages.js index bf102e6..f61df6d 100644 --- a/protobufs/generated/steamdatagram_messages.js +++ b/protobufs/generated/steamdatagram_messages.js @@ -1,4 +1,4 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-mixed-operators, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars, default-case, jsdoc/require-param*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) @@ -12,13 +12,14 @@ // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + var $Object = $util.global.Object, $undefined = $util.global.undefined, $Error = $util.global.Error, $Array = $util.global.Array, $TypeError = $util.global.TypeError, $parseInt = $util.global.parseInt, $String = $util.global.String, $Number = $util.global.Number, $BigInt = $util.global.BigInt, $Boolean = $util.global.Boolean, $isFinite = $util.global.isFinite; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); /** * ESteamDatagramMsgID enum. - * @exports ESteamDatagramMsgID + * @name ESteamDatagramMsgID * @enum {number} * @property {number} k_ESteamDatagramMsg_Invalid=0 k_ESteamDatagramMsg_Invalid value * @property {number} k_ESteamDatagramMsg_RouterPingRequest=1 k_ESteamDatagramMsg_RouterPingRequest value @@ -48,7 +49,7 @@ * @property {number} k_ESteamDatagramMsg_P2PSessionEstablished=25 k_ESteamDatagramMsg_P2PSessionEstablished value */ $root.ESteamDatagramMsgID = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "k_ESteamDatagramMsg_Invalid"] = 0; values[valuesById[1] = "k_ESteamDatagramMsg_RouterPingRequest"] = 1; values[valuesById[2] = "k_ESteamDatagramMsg_RouterPingReply"] = 2; @@ -80,7 +81,7 @@ /** * ESteamNetworkingUDPMsgID enum. - * @exports ESteamNetworkingUDPMsgID + * @name ESteamNetworkingUDPMsgID * @enum {number} * @property {number} k_ESteamNetworkingUDPMsg_ChallengeRequest=32 k_ESteamNetworkingUDPMsg_ChallengeRequest value * @property {number} k_ESteamNetworkingUDPMsg_ChallengeReply=33 k_ESteamNetworkingUDPMsg_ChallengeReply value @@ -91,7 +92,7 @@ * @property {number} k_ESteamNetworkingUDPMsg_Stats=38 k_ESteamNetworkingUDPMsg_Stats value */ $root.ESteamNetworkingUDPMsgID = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[32] = "k_ESteamNetworkingUDPMsg_ChallengeRequest"] = 32; values[valuesById[33] = "k_ESteamNetworkingUDPMsg_ChallengeReply"] = 33; values[valuesById[34] = "k_ESteamNetworkingUDPMsg_ConnectRequest"] = 34; @@ -106,8 +107,7 @@ /** * Properties of a CMsgSteamDatagramRouterPingReply. - * @exports ICMsgSteamDatagramRouterPingReply - * @interface ICMsgSteamDatagramRouterPingReply + * @typedef {Object} CMsgSteamDatagramRouterPingReply.$Properties * @property {number|null} [client_timestamp] CMsgSteamDatagramRouterPingReply client_timestamp * @property {Array.|null} [latency_datacenter_ids] CMsgSteamDatagramRouterPingReply latency_datacenter_ids * @property {Array.|null} [latency_ping_ms] CMsgSteamDatagramRouterPingReply latency_ping_ms @@ -117,26 +117,40 @@ * @property {number|null} [seconds_until_shutdown] CMsgSteamDatagramRouterPingReply seconds_until_shutdown * @property {number|null} [client_cookie] CMsgSteamDatagramRouterPingReply client_cookie * @property {number|null} [scoring_penalty_relay_cluster] CMsgSteamDatagramRouterPingReply scoring_penalty_relay_cluster - * @property {Array.|null} [route_exceptions] CMsgSteamDatagramRouterPingReply route_exceptions + * @property {Array.|null} [route_exceptions] CMsgSteamDatagramRouterPingReply route_exceptions + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramRouterPingReply. + * @exports ICMsgSteamDatagramRouterPingReply + * @interface ICMsgSteamDatagramRouterPingReply + * @augments CMsgSteamDatagramRouterPingReply.$Properties + * @deprecated Use CMsgSteamDatagramRouterPingReply.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramRouterPingReply. + * @typedef {CMsgSteamDatagramRouterPingReply.$Properties} CMsgSteamDatagramRouterPingReply.$Shape */ /** * Constructs a new CMsgSteamDatagramRouterPingReply. * @exports CMsgSteamDatagramRouterPingReply * @classdesc Represents a CMsgSteamDatagramRouterPingReply. - * @implements ICMsgSteamDatagramRouterPingReply * @constructor - * @param {ICMsgSteamDatagramRouterPingReply=} [properties] Properties to set + * @param {CMsgSteamDatagramRouterPingReply.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramRouterPingReply(properties) { + var CMsgSteamDatagramRouterPingReply = function (properties) { this.latency_datacenter_ids = []; this.latency_ping_ms = []; this.route_exceptions = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramRouterPingReply client_timestamp. @@ -184,7 +198,7 @@ * @memberof CMsgSteamDatagramRouterPingReply * @instance */ - CMsgSteamDatagramRouterPingReply.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramRouterPingReply.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramRouterPingReply seconds_until_shutdown. @@ -212,7 +226,7 @@ /** * CMsgSteamDatagramRouterPingReply route_exceptions. - * @member {Array.} route_exceptions + * @member {Array.} route_exceptions * @memberof CMsgSteamDatagramRouterPingReply * @instance */ @@ -223,10 +237,14 @@ * @function create * @memberof CMsgSteamDatagramRouterPingReply * @static - * @param {ICMsgSteamDatagramRouterPingReply=} [properties] Properties to set + * @param {CMsgSteamDatagramRouterPingReply.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramRouterPingReply} CMsgSteamDatagramRouterPingReply instance + * @type {{ + * (properties: CMsgSteamDatagramRouterPingReply.$Shape): CMsgSteamDatagramRouterPingReply & CMsgSteamDatagramRouterPingReply.$Shape; + * (properties?: CMsgSteamDatagramRouterPingReply.$Properties): CMsgSteamDatagramRouterPingReply; + * }} */ - CMsgSteamDatagramRouterPingReply.create = function create(properties) { + CMsgSteamDatagramRouterPingReply.create = function(properties) { return new CMsgSteamDatagramRouterPingReply(properties); }; @@ -235,42 +253,41 @@ * @function encode * @memberof CMsgSteamDatagramRouterPingReply * @static - * @param {ICMsgSteamDatagramRouterPingReply} message CMsgSteamDatagramRouterPingReply message or plain object to encode + * @param {CMsgSteamDatagramRouterPingReply.$Properties} message CMsgSteamDatagramRouterPingReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramRouterPingReply.encode = function encode(message, writer) { + CMsgSteamDatagramRouterPingReply.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.client_timestamp != null && Object.hasOwnProperty.call(message, "client_timestamp")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.client_timestamp != null && $Object.hasOwnProperty.call(message, "client_timestamp")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.client_timestamp); - if (message.latency_datacenter_ids != null && message.latency_datacenter_ids.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.latency_datacenter_ids.length; ++i) - writer.fixed32(message.latency_datacenter_ids[i]); - writer.ldelim(); - } - if (message.latency_ping_ms != null && message.latency_ping_ms.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.latency_ping_ms.length; ++i) - writer.uint32(message.latency_ping_ms[i]); - writer.ldelim(); - } - if (message.your_public_ip != null && Object.hasOwnProperty.call(message, "your_public_ip")) + if (message.latency_datacenter_ids != null && message.latency_datacenter_ids.length) + writer.uint32(/* id 2, wireType 2 =*/18).fixed32s(message.latency_datacenter_ids); + if (message.latency_ping_ms != null && message.latency_ping_ms.length) + writer.uint32(/* id 3, wireType 2 =*/26).uint32s(message.latency_ping_ms); + if (message.your_public_ip != null && $Object.hasOwnProperty.call(message, "your_public_ip")) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.your_public_ip); - if (message.server_time != null && Object.hasOwnProperty.call(message, "server_time")) + if (message.server_time != null && $Object.hasOwnProperty.call(message, "server_time")) writer.uint32(/* id 5, wireType 5 =*/45).fixed32(message.server_time); - if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) writer.uint32(/* id 6, wireType 1 =*/49).fixed64(message.challenge); - if (message.seconds_until_shutdown != null && Object.hasOwnProperty.call(message, "seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.seconds_until_shutdown); - if (message.client_cookie != null && Object.hasOwnProperty.call(message, "client_cookie")) + if (message.client_cookie != null && $Object.hasOwnProperty.call(message, "client_cookie")) writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.client_cookie); - if (message.scoring_penalty_relay_cluster != null && Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) + if (message.scoring_penalty_relay_cluster != null && $Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.scoring_penalty_relay_cluster); if (message.route_exceptions != null && message.route_exceptions.length) for (var i = 0; i < message.route_exceptions.length; ++i) - $root.CMsgSteamDatagramRouterPingReply.RouteException.encode(message.route_exceptions[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + $root.CMsgSteamDatagramRouterPingReply.RouteException.encode(message.route_exceptions[i], writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -279,12 +296,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramRouterPingReply * @static - * @param {ICMsgSteamDatagramRouterPingReply} message CMsgSteamDatagramRouterPingReply message or plain object to encode + * @param {CMsgSteamDatagramRouterPingReply.$Properties} message CMsgSteamDatagramRouterPingReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramRouterPingReply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramRouterPingReply.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -294,68 +311,114 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramRouterPingReply} CMsgSteamDatagramRouterPingReply + * @returns {CMsgSteamDatagramRouterPingReply & CMsgSteamDatagramRouterPingReply.$Shape} CMsgSteamDatagramRouterPingReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramRouterPingReply.decode = function decode(reader, length) { + CMsgSteamDatagramRouterPingReply.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramRouterPingReply(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramRouterPingReply(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_timestamp = reader.fixed32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.latency_datacenter_ids && message.latency_datacenter_ids.length)) - message.latency_datacenter_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.latency_datacenter_ids.push(reader.fixed32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.client_timestamp = reader.fixed32(); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.latency_datacenter_ids && message.latency_datacenter_ids.length)) + message.latency_datacenter_ids = []; + reader.fixed32s(message.latency_datacenter_ids); + continue; + } + if (wireType !== 5) + break; + if (!(message.latency_datacenter_ids && message.latency_datacenter_ids.length)) + message.latency_datacenter_ids = []; message.latency_datacenter_ids.push(reader.fixed32()); - break; - case 3: - if (!(message.latency_ping_ms && message.latency_ping_ms.length)) - message.latency_ping_ms = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.latency_ping_ms.push(reader.uint32()); - } else + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.latency_ping_ms && message.latency_ping_ms.length)) + message.latency_ping_ms = []; + reader.uint32s(message.latency_ping_ms); + continue; + } + if (wireType !== 0) + break; + if (!(message.latency_ping_ms && message.latency_ping_ms.length)) + message.latency_ping_ms = []; message.latency_ping_ms.push(reader.uint32()); - break; - case 4: - message.your_public_ip = reader.fixed32(); - break; - case 5: - message.server_time = reader.fixed32(); - break; - case 6: - message.challenge = reader.fixed64(); - break; - case 7: - message.seconds_until_shutdown = reader.uint32(); - break; - case 8: - message.client_cookie = reader.fixed32(); - break; - case 9: - message.scoring_penalty_relay_cluster = reader.uint32(); - break; - case 10: - if (!(message.route_exceptions && message.route_exceptions.length)) - message.route_exceptions = []; - message.route_exceptions.push($root.CMsgSteamDatagramRouterPingReply.RouteException.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 4: { + if (wireType !== 5) + break; + message.your_public_ip = reader.fixed32(); + continue; + } + case 5: { + if (wireType !== 5) + break; + message.server_time = reader.fixed32(); + continue; + } + case 6: { + if (wireType !== 1) + break; + message.challenge = reader.fixed64(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.seconds_until_shutdown = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 5) + break; + message.client_cookie = reader.fixed32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.scoring_penalty_relay_cluster = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 2) + break; + if (!(message.route_exceptions && message.route_exceptions.length)) + message.route_exceptions = []; + message.route_exceptions.push($root.CMsgSteamDatagramRouterPingReply.RouteException.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -365,11 +428,11 @@ * @memberof CMsgSteamDatagramRouterPingReply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramRouterPingReply} CMsgSteamDatagramRouterPingReply + * @returns {CMsgSteamDatagramRouterPingReply & CMsgSteamDatagramRouterPingReply.$Shape} CMsgSteamDatagramRouterPingReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramRouterPingReply.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramRouterPingReply.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -383,49 +446,53 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramRouterPingReply.verify = function verify(message) { + CMsgSteamDatagramRouterPingReply.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.client_timestamp != null && message.hasOwnProperty("client_timestamp")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.client_timestamp != null && $Object.hasOwnProperty.call(message, "client_timestamp")) if (!$util.isInteger(message.client_timestamp)) return "client_timestamp: integer expected"; - if (message.latency_datacenter_ids != null && message.hasOwnProperty("latency_datacenter_ids")) { - if (!Array.isArray(message.latency_datacenter_ids)) + if (message.latency_datacenter_ids != null && $Object.hasOwnProperty.call(message, "latency_datacenter_ids")) { + if (!$Array.isArray(message.latency_datacenter_ids)) return "latency_datacenter_ids: array expected"; for (var i = 0; i < message.latency_datacenter_ids.length; ++i) if (!$util.isInteger(message.latency_datacenter_ids[i])) return "latency_datacenter_ids: integer[] expected"; } - if (message.latency_ping_ms != null && message.hasOwnProperty("latency_ping_ms")) { - if (!Array.isArray(message.latency_ping_ms)) + if (message.latency_ping_ms != null && $Object.hasOwnProperty.call(message, "latency_ping_ms")) { + if (!$Array.isArray(message.latency_ping_ms)) return "latency_ping_ms: array expected"; for (var i = 0; i < message.latency_ping_ms.length; ++i) if (!$util.isInteger(message.latency_ping_ms[i])) return "latency_ping_ms: integer[] expected"; } - if (message.your_public_ip != null && message.hasOwnProperty("your_public_ip")) + if (message.your_public_ip != null && $Object.hasOwnProperty.call(message, "your_public_ip")) if (!$util.isInteger(message.your_public_ip)) return "your_public_ip: integer expected"; - if (message.server_time != null && message.hasOwnProperty("server_time")) + if (message.server_time != null && $Object.hasOwnProperty.call(message, "server_time")) if (!$util.isInteger(message.server_time)) return "server_time: integer expected"; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) if (!$util.isInteger(message.challenge) && !(message.challenge && $util.isInteger(message.challenge.low) && $util.isInteger(message.challenge.high))) return "challenge: integer|Long expected"; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) if (!$util.isInteger(message.seconds_until_shutdown)) return "seconds_until_shutdown: integer expected"; - if (message.client_cookie != null && message.hasOwnProperty("client_cookie")) + if (message.client_cookie != null && $Object.hasOwnProperty.call(message, "client_cookie")) if (!$util.isInteger(message.client_cookie)) return "client_cookie: integer expected"; - if (message.scoring_penalty_relay_cluster != null && message.hasOwnProperty("scoring_penalty_relay_cluster")) + if (message.scoring_penalty_relay_cluster != null && $Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) if (!$util.isInteger(message.scoring_penalty_relay_cluster)) return "scoring_penalty_relay_cluster: integer expected"; - if (message.route_exceptions != null && message.hasOwnProperty("route_exceptions")) { - if (!Array.isArray(message.route_exceptions)) + if (message.route_exceptions != null && $Object.hasOwnProperty.call(message, "route_exceptions")) { + if (!$Array.isArray(message.route_exceptions)) return "route_exceptions: array expected"; for (var i = 0; i < message.route_exceptions.length; ++i) { - var error = $root.CMsgSteamDatagramRouterPingReply.RouteException.verify(message.route_exceptions[i]); + var error = $root.CMsgSteamDatagramRouterPingReply.RouteException.verify(message.route_exceptions[i], _depth + 1); if (error) return "route_exceptions." + error; } @@ -441,23 +508,29 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramRouterPingReply} CMsgSteamDatagramRouterPingReply */ - CMsgSteamDatagramRouterPingReply.fromObject = function fromObject(object) { + CMsgSteamDatagramRouterPingReply.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramRouterPingReply) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramRouterPingReply: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramRouterPingReply(); if (object.client_timestamp != null) message.client_timestamp = object.client_timestamp >>> 0; if (object.latency_datacenter_ids) { - if (!Array.isArray(object.latency_datacenter_ids)) - throw TypeError(".CMsgSteamDatagramRouterPingReply.latency_datacenter_ids: array expected"); - message.latency_datacenter_ids = []; + if (!$Array.isArray(object.latency_datacenter_ids)) + throw $TypeError(".CMsgSteamDatagramRouterPingReply.latency_datacenter_ids: array expected"); + message.latency_datacenter_ids = $Array(object.latency_datacenter_ids.length); for (var i = 0; i < object.latency_datacenter_ids.length; ++i) message.latency_datacenter_ids[i] = object.latency_datacenter_ids[i] >>> 0; } if (object.latency_ping_ms) { - if (!Array.isArray(object.latency_ping_ms)) - throw TypeError(".CMsgSteamDatagramRouterPingReply.latency_ping_ms: array expected"); - message.latency_ping_ms = []; + if (!$Array.isArray(object.latency_ping_ms)) + throw $TypeError(".CMsgSteamDatagramRouterPingReply.latency_ping_ms: array expected"); + message.latency_ping_ms = $Array(object.latency_ping_ms.length); for (var i = 0; i < object.latency_ping_ms.length; ++i) message.latency_ping_ms[i] = object.latency_ping_ms[i] >>> 0; } @@ -467,13 +540,13 @@ message.server_time = object.server_time >>> 0; if (object.challenge != null) if ($util.Long) - (message.challenge = $util.Long.fromValue(object.challenge)).unsigned = false; + message.challenge = $util.Long.fromValue(object.challenge, true); else if (typeof object.challenge === "string") - message.challenge = parseInt(object.challenge, 10); + message.challenge = $parseInt(object.challenge, 10); else if (typeof object.challenge === "number") message.challenge = object.challenge; else if (typeof object.challenge === "object") - message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(); + message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(true); if (object.seconds_until_shutdown != null) message.seconds_until_shutdown = object.seconds_until_shutdown >>> 0; if (object.client_cookie != null) @@ -481,13 +554,13 @@ if (object.scoring_penalty_relay_cluster != null) message.scoring_penalty_relay_cluster = object.scoring_penalty_relay_cluster >>> 0; if (object.route_exceptions) { - if (!Array.isArray(object.route_exceptions)) - throw TypeError(".CMsgSteamDatagramRouterPingReply.route_exceptions: array expected"); - message.route_exceptions = []; + if (!$Array.isArray(object.route_exceptions)) + throw $TypeError(".CMsgSteamDatagramRouterPingReply.route_exceptions: array expected"); + message.route_exceptions = $Array(object.route_exceptions.length); for (var i = 0; i < object.route_exceptions.length; ++i) { - if (typeof object.route_exceptions[i] !== "object") - throw TypeError(".CMsgSteamDatagramRouterPingReply.route_exceptions: object expected"); - message.route_exceptions[i] = $root.CMsgSteamDatagramRouterPingReply.RouteException.fromObject(object.route_exceptions[i]); + if (!$util.isObject(object.route_exceptions[i])) + throw $TypeError(".CMsgSteamDatagramRouterPingReply.route_exceptions: object expected"); + message.route_exceptions[i] = $root.CMsgSteamDatagramRouterPingReply.RouteException.fromObject(object.route_exceptions[i], _depth + 1); } } return message; @@ -502,9 +575,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramRouterPingReply.toObject = function toObject(message, options) { + CMsgSteamDatagramRouterPingReply.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.latency_datacenter_ids = []; @@ -516,45 +593,47 @@ object.your_public_ip = 0; object.server_time = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.challenge = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.challenge = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.challenge = options.longs === String ? "0" : 0; + object.challenge = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.seconds_until_shutdown = 0; object.client_cookie = 0; object.scoring_penalty_relay_cluster = 0; } - if (message.client_timestamp != null && message.hasOwnProperty("client_timestamp")) + if (message.client_timestamp != null && $Object.hasOwnProperty.call(message, "client_timestamp")) object.client_timestamp = message.client_timestamp; if (message.latency_datacenter_ids && message.latency_datacenter_ids.length) { - object.latency_datacenter_ids = []; + object.latency_datacenter_ids = $Array(message.latency_datacenter_ids.length); for (var j = 0; j < message.latency_datacenter_ids.length; ++j) object.latency_datacenter_ids[j] = message.latency_datacenter_ids[j]; } if (message.latency_ping_ms && message.latency_ping_ms.length) { - object.latency_ping_ms = []; + object.latency_ping_ms = $Array(message.latency_ping_ms.length); for (var j = 0; j < message.latency_ping_ms.length; ++j) object.latency_ping_ms[j] = message.latency_ping_ms[j]; } - if (message.your_public_ip != null && message.hasOwnProperty("your_public_ip")) + if (message.your_public_ip != null && $Object.hasOwnProperty.call(message, "your_public_ip")) object.your_public_ip = message.your_public_ip; - if (message.server_time != null && message.hasOwnProperty("server_time")) + if (message.server_time != null && $Object.hasOwnProperty.call(message, "server_time")) object.server_time = message.server_time; - if (message.challenge != null && message.hasOwnProperty("challenge")) - if (typeof message.challenge === "number") - object.challenge = options.longs === String ? String(message.challenge) : message.challenge; + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.challenge = typeof message.challenge === "number" ? $BigInt(message.challenge) : $util.Long.fromBits(message.challenge.low >>> 0, message.challenge.high >>> 0, true).toBigInt(); + else if (typeof message.challenge === "number") + object.challenge = options.longs === $String ? $String(message.challenge) : message.challenge; else - object.challenge = options.longs === String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber() : message.challenge; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + object.challenge = options.longs === $String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === $Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber(true) : message.challenge; + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) object.seconds_until_shutdown = message.seconds_until_shutdown; - if (message.client_cookie != null && message.hasOwnProperty("client_cookie")) + if (message.client_cookie != null && $Object.hasOwnProperty.call(message, "client_cookie")) object.client_cookie = message.client_cookie; - if (message.scoring_penalty_relay_cluster != null && message.hasOwnProperty("scoring_penalty_relay_cluster")) + if (message.scoring_penalty_relay_cluster != null && $Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) object.scoring_penalty_relay_cluster = message.scoring_penalty_relay_cluster; if (message.route_exceptions && message.route_exceptions.length) { - object.route_exceptions = []; + object.route_exceptions = $Array(message.route_exceptions.length); for (var j = 0; j < message.route_exceptions.length; ++j) - object.route_exceptions[j] = $root.CMsgSteamDatagramRouterPingReply.RouteException.toObject(message.route_exceptions[j], options); + object.route_exceptions[j] = $root.CMsgSteamDatagramRouterPingReply.RouteException.toObject(message.route_exceptions[j], options, _depth + 1); } return object; }; @@ -566,35 +645,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramRouterPingReply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramRouterPingReply.prototype.toJSON = function() { + return CMsgSteamDatagramRouterPingReply.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramRouterPingReply + * @function getTypeUrl + * @memberof CMsgSteamDatagramRouterPingReply + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramRouterPingReply.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramRouterPingReply"; }; CMsgSteamDatagramRouterPingReply.RouteException = (function() { /** * Properties of a RouteException. - * @memberof CMsgSteamDatagramRouterPingReply - * @interface IRouteException + * @typedef {Object} CMsgSteamDatagramRouterPingReply.RouteException.$Properties * @property {number|null} [data_center_id] RouteException data_center_id * @property {number|null} [flags] RouteException flags * @property {number|null} [penalty] RouteException penalty + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RouteException. + * @memberof CMsgSteamDatagramRouterPingReply + * @interface IRouteException + * @augments CMsgSteamDatagramRouterPingReply.RouteException.$Properties + * @deprecated Use CMsgSteamDatagramRouterPingReply.RouteException.$Properties instead. + */ + + /** + * Shape of a RouteException. + * @typedef {CMsgSteamDatagramRouterPingReply.RouteException.$Properties} CMsgSteamDatagramRouterPingReply.RouteException.$Shape */ /** * Constructs a new RouteException. * @memberof CMsgSteamDatagramRouterPingReply * @classdesc Represents a RouteException. - * @implements IRouteException * @constructor - * @param {CMsgSteamDatagramRouterPingReply.IRouteException=} [properties] Properties to set + * @param {CMsgSteamDatagramRouterPingReply.RouteException.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function RouteException(properties) { + var RouteException = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * RouteException data_center_id. @@ -625,10 +731,14 @@ * @function create * @memberof CMsgSteamDatagramRouterPingReply.RouteException * @static - * @param {CMsgSteamDatagramRouterPingReply.IRouteException=} [properties] Properties to set + * @param {CMsgSteamDatagramRouterPingReply.RouteException.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramRouterPingReply.RouteException} RouteException instance + * @type {{ + * (properties: CMsgSteamDatagramRouterPingReply.RouteException.$Shape): CMsgSteamDatagramRouterPingReply.RouteException & CMsgSteamDatagramRouterPingReply.RouteException.$Shape; + * (properties?: CMsgSteamDatagramRouterPingReply.RouteException.$Properties): CMsgSteamDatagramRouterPingReply.RouteException; + * }} */ - RouteException.create = function create(properties) { + RouteException.create = function(properties) { return new RouteException(properties); }; @@ -637,19 +747,26 @@ * @function encode * @memberof CMsgSteamDatagramRouterPingReply.RouteException * @static - * @param {CMsgSteamDatagramRouterPingReply.IRouteException} message RouteException message or plain object to encode + * @param {CMsgSteamDatagramRouterPingReply.RouteException.$Properties} message RouteException message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RouteException.encode = function encode(message, writer) { + RouteException.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.data_center_id != null && Object.hasOwnProperty.call(message, "data_center_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.data_center_id != null && $Object.hasOwnProperty.call(message, "data_center_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.data_center_id); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.flags); - if (message.penalty != null && Object.hasOwnProperty.call(message, "penalty")) + if (message.penalty != null && $Object.hasOwnProperty.call(message, "penalty")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.penalty); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -658,12 +775,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramRouterPingReply.RouteException * @static - * @param {CMsgSteamDatagramRouterPingReply.IRouteException} message RouteException message or plain object to encode + * @param {CMsgSteamDatagramRouterPingReply.RouteException.$Properties} message RouteException message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RouteException.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RouteException.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -673,31 +790,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramRouterPingReply.RouteException} RouteException + * @returns {CMsgSteamDatagramRouterPingReply.RouteException & CMsgSteamDatagramRouterPingReply.RouteException.$Shape} RouteException * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RouteException.decode = function decode(reader, length) { + RouteException.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramRouterPingReply.RouteException(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramRouterPingReply.RouteException(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data_center_id = reader.fixed32(); - break; - case 2: - message.flags = reader.uint32(); - break; - case 3: - message.penalty = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.data_center_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.penalty = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -707,11 +847,11 @@ * @memberof CMsgSteamDatagramRouterPingReply.RouteException * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramRouterPingReply.RouteException} RouteException + * @returns {CMsgSteamDatagramRouterPingReply.RouteException & CMsgSteamDatagramRouterPingReply.RouteException.$Shape} RouteException * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RouteException.decodeDelimited = function decodeDelimited(reader) { + RouteException.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -725,16 +865,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RouteException.verify = function verify(message) { + RouteException.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.data_center_id != null && message.hasOwnProperty("data_center_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.data_center_id != null && $Object.hasOwnProperty.call(message, "data_center_id")) if (!$util.isInteger(message.data_center_id)) return "data_center_id: integer expected"; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.penalty != null && message.hasOwnProperty("penalty")) + if (message.penalty != null && $Object.hasOwnProperty.call(message, "penalty")) if (!$util.isInteger(message.penalty)) return "penalty: integer expected"; return null; @@ -748,9 +892,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramRouterPingReply.RouteException} RouteException */ - RouteException.fromObject = function fromObject(object) { + RouteException.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramRouterPingReply.RouteException) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramRouterPingReply.RouteException: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramRouterPingReply.RouteException(); if (object.data_center_id != null) message.data_center_id = object.data_center_id >>> 0; @@ -770,20 +920,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RouteException.toObject = function toObject(message, options) { + RouteException.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.data_center_id = 0; object.flags = 0; object.penalty = 0; } - if (message.data_center_id != null && message.hasOwnProperty("data_center_id")) + if (message.data_center_id != null && $Object.hasOwnProperty.call(message, "data_center_id")) object.data_center_id = message.data_center_id; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.penalty != null && message.hasOwnProperty("penalty")) + if (message.penalty != null && $Object.hasOwnProperty.call(message, "penalty")) object.penalty = message.penalty; return object; }; @@ -795,8 +949,22 @@ * @instance * @returns {Object.} JSON object */ - RouteException.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + RouteException.prototype.toJSON = function() { + return RouteException.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RouteException + * @function getTypeUrl + * @memberof CMsgSteamDatagramRouterPingReply.RouteException + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RouteException.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramRouterPingReply.RouteException"; }; return RouteException; @@ -809,8 +977,7 @@ /** * Properties of a CMsgSteamDatagramGameserverPing. - * @exports ICMsgSteamDatagramGameserverPing - * @interface ICMsgSteamDatagramGameserverPing + * @typedef {Object} CMsgSteamDatagramGameserverPing.$Properties * @property {number|null} [legacy_client_session] CMsgSteamDatagramGameserverPing legacy_client_session * @property {number|Long|null} [client_steam_id] CMsgSteamDatagramGameserverPing client_steam_id * @property {number|null} [client_timestamp] CMsgSteamDatagramGameserverPing client_timestamp @@ -820,22 +987,36 @@ * @property {number|null} [seq_number_e2e] CMsgSteamDatagramGameserverPing seq_number_e2e * @property {number|null} [relay_session_id] CMsgSteamDatagramGameserverPing relay_session_id * @property {number|null} [connection_id] CMsgSteamDatagramGameserverPing connection_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramGameserverPing. + * @exports ICMsgSteamDatagramGameserverPing + * @interface ICMsgSteamDatagramGameserverPing + * @augments CMsgSteamDatagramGameserverPing.$Properties + * @deprecated Use CMsgSteamDatagramGameserverPing.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramGameserverPing. + * @typedef {CMsgSteamDatagramGameserverPing.$Properties} CMsgSteamDatagramGameserverPing.$Shape */ /** * Constructs a new CMsgSteamDatagramGameserverPing. * @exports CMsgSteamDatagramGameserverPing * @classdesc Represents a CMsgSteamDatagramGameserverPing. - * @implements ICMsgSteamDatagramGameserverPing * @constructor - * @param {ICMsgSteamDatagramGameserverPing=} [properties] Properties to set + * @param {CMsgSteamDatagramGameserverPing.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramGameserverPing(properties) { + var CMsgSteamDatagramGameserverPing = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramGameserverPing legacy_client_session. @@ -851,7 +1032,7 @@ * @memberof CMsgSteamDatagramGameserverPing * @instance */ - CMsgSteamDatagramGameserverPing.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramGameserverPing.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramGameserverPing client_timestamp. @@ -914,10 +1095,14 @@ * @function create * @memberof CMsgSteamDatagramGameserverPing * @static - * @param {ICMsgSteamDatagramGameserverPing=} [properties] Properties to set + * @param {CMsgSteamDatagramGameserverPing.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramGameserverPing} CMsgSteamDatagramGameserverPing instance + * @type {{ + * (properties: CMsgSteamDatagramGameserverPing.$Shape): CMsgSteamDatagramGameserverPing & CMsgSteamDatagramGameserverPing.$Shape; + * (properties?: CMsgSteamDatagramGameserverPing.$Properties): CMsgSteamDatagramGameserverPing; + * }} */ - CMsgSteamDatagramGameserverPing.create = function create(properties) { + CMsgSteamDatagramGameserverPing.create = function(properties) { return new CMsgSteamDatagramGameserverPing(properties); }; @@ -926,31 +1111,38 @@ * @function encode * @memberof CMsgSteamDatagramGameserverPing * @static - * @param {ICMsgSteamDatagramGameserverPing} message CMsgSteamDatagramGameserverPing message or plain object to encode + * @param {CMsgSteamDatagramGameserverPing.$Properties} message CMsgSteamDatagramGameserverPing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramGameserverPing.encode = function encode(message, writer) { + CMsgSteamDatagramGameserverPing.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.legacy_client_session != null && Object.hasOwnProperty.call(message, "legacy_client_session")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.legacy_client_session != null && $Object.hasOwnProperty.call(message, "legacy_client_session")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.legacy_client_session); - if (message.client_steam_id != null && Object.hasOwnProperty.call(message, "client_steam_id")) + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.client_steam_id); - if (message.client_timestamp != null && Object.hasOwnProperty.call(message, "client_timestamp")) + if (message.client_timestamp != null && $Object.hasOwnProperty.call(message, "client_timestamp")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.client_timestamp); - if (message.router_timestamp != null && Object.hasOwnProperty.call(message, "router_timestamp")) + if (message.router_timestamp != null && $Object.hasOwnProperty.call(message, "router_timestamp")) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.router_timestamp); - if (message.router_gameserver_latency != null && Object.hasOwnProperty.call(message, "router_gameserver_latency")) + if (message.router_gameserver_latency != null && $Object.hasOwnProperty.call(message, "router_gameserver_latency")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.router_gameserver_latency); - if (message.seq_number_router != null && Object.hasOwnProperty.call(message, "seq_number_router")) + if (message.seq_number_router != null && $Object.hasOwnProperty.call(message, "seq_number_router")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.seq_number_router); - if (message.seq_number_e2e != null && Object.hasOwnProperty.call(message, "seq_number_e2e")) + if (message.seq_number_e2e != null && $Object.hasOwnProperty.call(message, "seq_number_e2e")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.seq_number_e2e); - if (message.relay_session_id != null && Object.hasOwnProperty.call(message, "relay_session_id")) + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.relay_session_id); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 9, wireType 5 =*/77).fixed32(message.connection_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -959,12 +1151,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramGameserverPing * @static - * @param {ICMsgSteamDatagramGameserverPing} message CMsgSteamDatagramGameserverPing message or plain object to encode + * @param {CMsgSteamDatagramGameserverPing.$Properties} message CMsgSteamDatagramGameserverPing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramGameserverPing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramGameserverPing.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -974,49 +1166,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramGameserverPing} CMsgSteamDatagramGameserverPing + * @returns {CMsgSteamDatagramGameserverPing & CMsgSteamDatagramGameserverPing.$Shape} CMsgSteamDatagramGameserverPing * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramGameserverPing.decode = function decode(reader, length) { + CMsgSteamDatagramGameserverPing.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramGameserverPing(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramGameserverPing(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.legacy_client_session = reader.uint32(); - break; - case 2: - message.client_steam_id = reader.fixed64(); - break; - case 3: - message.client_timestamp = reader.fixed32(); - break; - case 4: - message.router_timestamp = reader.fixed32(); - break; - case 5: - message.router_gameserver_latency = reader.uint32(); - break; - case 6: - message.seq_number_router = reader.uint32(); - break; - case 7: - message.seq_number_e2e = reader.uint32(); - break; - case 8: - message.relay_session_id = reader.uint32(); - break; - case 9: - message.connection_id = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.legacy_client_session = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.client_steam_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.client_timestamp = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.router_timestamp = reader.fixed32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.router_gameserver_latency = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.seq_number_router = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.seq_number_e2e = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.relay_session_id = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1026,11 +1259,11 @@ * @memberof CMsgSteamDatagramGameserverPing * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramGameserverPing} CMsgSteamDatagramGameserverPing + * @returns {CMsgSteamDatagramGameserverPing & CMsgSteamDatagramGameserverPing.$Shape} CMsgSteamDatagramGameserverPing * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramGameserverPing.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramGameserverPing.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1044,34 +1277,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramGameserverPing.verify = function verify(message) { + CMsgSteamDatagramGameserverPing.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.legacy_client_session != null && message.hasOwnProperty("legacy_client_session")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.legacy_client_session != null && $Object.hasOwnProperty.call(message, "legacy_client_session")) if (!$util.isInteger(message.legacy_client_session)) return "legacy_client_session: integer expected"; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) if (!$util.isInteger(message.client_steam_id) && !(message.client_steam_id && $util.isInteger(message.client_steam_id.low) && $util.isInteger(message.client_steam_id.high))) return "client_steam_id: integer|Long expected"; - if (message.client_timestamp != null && message.hasOwnProperty("client_timestamp")) + if (message.client_timestamp != null && $Object.hasOwnProperty.call(message, "client_timestamp")) if (!$util.isInteger(message.client_timestamp)) return "client_timestamp: integer expected"; - if (message.router_timestamp != null && message.hasOwnProperty("router_timestamp")) + if (message.router_timestamp != null && $Object.hasOwnProperty.call(message, "router_timestamp")) if (!$util.isInteger(message.router_timestamp)) return "router_timestamp: integer expected"; - if (message.router_gameserver_latency != null && message.hasOwnProperty("router_gameserver_latency")) + if (message.router_gameserver_latency != null && $Object.hasOwnProperty.call(message, "router_gameserver_latency")) if (!$util.isInteger(message.router_gameserver_latency)) return "router_gameserver_latency: integer expected"; - if (message.seq_number_router != null && message.hasOwnProperty("seq_number_router")) + if (message.seq_number_router != null && $Object.hasOwnProperty.call(message, "seq_number_router")) if (!$util.isInteger(message.seq_number_router)) return "seq_number_router: integer expected"; - if (message.seq_number_e2e != null && message.hasOwnProperty("seq_number_e2e")) + if (message.seq_number_e2e != null && $Object.hasOwnProperty.call(message, "seq_number_e2e")) if (!$util.isInteger(message.seq_number_e2e)) return "seq_number_e2e: integer expected"; - if (message.relay_session_id != null && message.hasOwnProperty("relay_session_id")) + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) if (!$util.isInteger(message.relay_session_id)) return "relay_session_id: integer expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; return null; @@ -1085,21 +1322,27 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramGameserverPing} CMsgSteamDatagramGameserverPing */ - CMsgSteamDatagramGameserverPing.fromObject = function fromObject(object) { + CMsgSteamDatagramGameserverPing.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramGameserverPing) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramGameserverPing: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramGameserverPing(); if (object.legacy_client_session != null) message.legacy_client_session = object.legacy_client_session >>> 0; if (object.client_steam_id != null) if ($util.Long) - (message.client_steam_id = $util.Long.fromValue(object.client_steam_id)).unsigned = false; + message.client_steam_id = $util.Long.fromValue(object.client_steam_id, true); else if (typeof object.client_steam_id === "string") - message.client_steam_id = parseInt(object.client_steam_id, 10); + message.client_steam_id = $parseInt(object.client_steam_id, 10); else if (typeof object.client_steam_id === "number") message.client_steam_id = object.client_steam_id; else if (typeof object.client_steam_id === "object") - message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(); + message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(true); if (object.client_timestamp != null) message.client_timestamp = object.client_timestamp >>> 0; if (object.router_timestamp != null) @@ -1126,17 +1369,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramGameserverPing.toObject = function toObject(message, options) { + CMsgSteamDatagramGameserverPing.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.legacy_client_session = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.client_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.client_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.client_steam_id = options.longs === String ? "0" : 0; + object.client_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.client_timestamp = 0; object.router_timestamp = 0; object.router_gameserver_latency = 0; @@ -1145,26 +1392,28 @@ object.relay_session_id = 0; object.connection_id = 0; } - if (message.legacy_client_session != null && message.hasOwnProperty("legacy_client_session")) + if (message.legacy_client_session != null && $Object.hasOwnProperty.call(message, "legacy_client_session")) object.legacy_client_session = message.legacy_client_session; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) - if (typeof message.client_steam_id === "number") - object.client_steam_id = options.longs === String ? String(message.client_steam_id) : message.client_steam_id; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.client_steam_id = typeof message.client_steam_id === "number" ? $BigInt(message.client_steam_id) : $util.Long.fromBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.client_steam_id === "number") + object.client_steam_id = options.longs === $String ? $String(message.client_steam_id) : message.client_steam_id; else - object.client_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber() : message.client_steam_id; - if (message.client_timestamp != null && message.hasOwnProperty("client_timestamp")) + object.client_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === $Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber(true) : message.client_steam_id; + if (message.client_timestamp != null && $Object.hasOwnProperty.call(message, "client_timestamp")) object.client_timestamp = message.client_timestamp; - if (message.router_timestamp != null && message.hasOwnProperty("router_timestamp")) + if (message.router_timestamp != null && $Object.hasOwnProperty.call(message, "router_timestamp")) object.router_timestamp = message.router_timestamp; - if (message.router_gameserver_latency != null && message.hasOwnProperty("router_gameserver_latency")) + if (message.router_gameserver_latency != null && $Object.hasOwnProperty.call(message, "router_gameserver_latency")) object.router_gameserver_latency = message.router_gameserver_latency; - if (message.seq_number_router != null && message.hasOwnProperty("seq_number_router")) + if (message.seq_number_router != null && $Object.hasOwnProperty.call(message, "seq_number_router")) object.seq_number_router = message.seq_number_router; - if (message.seq_number_e2e != null && message.hasOwnProperty("seq_number_e2e")) + if (message.seq_number_e2e != null && $Object.hasOwnProperty.call(message, "seq_number_e2e")) object.seq_number_e2e = message.seq_number_e2e; - if (message.relay_session_id != null && message.hasOwnProperty("relay_session_id")) + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) object.relay_session_id = message.relay_session_id; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; return object; }; @@ -1176,8 +1425,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramGameserverPing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramGameserverPing.prototype.toJSON = function() { + return CMsgSteamDatagramGameserverPing.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramGameserverPing + * @function getTypeUrl + * @memberof CMsgSteamDatagramGameserverPing + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramGameserverPing.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramGameserverPing"; }; return CMsgSteamDatagramGameserverPing; @@ -1187,29 +1450,42 @@ /** * Properties of a CMsgSteamDatagramRelayToRelayPing. - * @exports ICMsgSteamDatagramRelayToRelayPing - * @interface ICMsgSteamDatagramRelayToRelayPing + * @typedef {Object} CMsgSteamDatagramRelayToRelayPing.$Properties * @property {number|null} [request_timestamp] CMsgSteamDatagramRelayToRelayPing request_timestamp * @property {number|null} [request_date] CMsgSteamDatagramRelayToRelayPing request_date * @property {number|null} [my_pop_id] CMsgSteamDatagramRelayToRelayPing my_pop_id * @property {number|null} [your_pop_id] CMsgSteamDatagramRelayToRelayPing your_pop_id * @property {number|null} [checksum] CMsgSteamDatagramRelayToRelayPing checksum + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramRelayToRelayPing. + * @exports ICMsgSteamDatagramRelayToRelayPing + * @interface ICMsgSteamDatagramRelayToRelayPing + * @augments CMsgSteamDatagramRelayToRelayPing.$Properties + * @deprecated Use CMsgSteamDatagramRelayToRelayPing.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramRelayToRelayPing. + * @typedef {CMsgSteamDatagramRelayToRelayPing.$Properties} CMsgSteamDatagramRelayToRelayPing.$Shape */ /** * Constructs a new CMsgSteamDatagramRelayToRelayPing. * @exports CMsgSteamDatagramRelayToRelayPing * @classdesc Represents a CMsgSteamDatagramRelayToRelayPing. - * @implements ICMsgSteamDatagramRelayToRelayPing * @constructor - * @param {ICMsgSteamDatagramRelayToRelayPing=} [properties] Properties to set + * @param {CMsgSteamDatagramRelayToRelayPing.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramRelayToRelayPing(properties) { + var CMsgSteamDatagramRelayToRelayPing = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramRelayToRelayPing request_timestamp. @@ -1256,10 +1532,14 @@ * @function create * @memberof CMsgSteamDatagramRelayToRelayPing * @static - * @param {ICMsgSteamDatagramRelayToRelayPing=} [properties] Properties to set + * @param {CMsgSteamDatagramRelayToRelayPing.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramRelayToRelayPing} CMsgSteamDatagramRelayToRelayPing instance + * @type {{ + * (properties: CMsgSteamDatagramRelayToRelayPing.$Shape): CMsgSteamDatagramRelayToRelayPing & CMsgSteamDatagramRelayToRelayPing.$Shape; + * (properties?: CMsgSteamDatagramRelayToRelayPing.$Properties): CMsgSteamDatagramRelayToRelayPing; + * }} */ - CMsgSteamDatagramRelayToRelayPing.create = function create(properties) { + CMsgSteamDatagramRelayToRelayPing.create = function(properties) { return new CMsgSteamDatagramRelayToRelayPing(properties); }; @@ -1268,23 +1548,30 @@ * @function encode * @memberof CMsgSteamDatagramRelayToRelayPing * @static - * @param {ICMsgSteamDatagramRelayToRelayPing} message CMsgSteamDatagramRelayToRelayPing message or plain object to encode + * @param {CMsgSteamDatagramRelayToRelayPing.$Properties} message CMsgSteamDatagramRelayToRelayPing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramRelayToRelayPing.encode = function encode(message, writer) { + CMsgSteamDatagramRelayToRelayPing.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.request_timestamp != null && Object.hasOwnProperty.call(message, "request_timestamp")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.request_timestamp != null && $Object.hasOwnProperty.call(message, "request_timestamp")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.request_timestamp); - if (message.request_date != null && Object.hasOwnProperty.call(message, "request_date")) + if (message.request_date != null && $Object.hasOwnProperty.call(message, "request_date")) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.request_date); - if (message.my_pop_id != null && Object.hasOwnProperty.call(message, "my_pop_id")) + if (message.my_pop_id != null && $Object.hasOwnProperty.call(message, "my_pop_id")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.my_pop_id); - if (message.your_pop_id != null && Object.hasOwnProperty.call(message, "your_pop_id")) + if (message.your_pop_id != null && $Object.hasOwnProperty.call(message, "your_pop_id")) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.your_pop_id); - if (message.checksum != null && Object.hasOwnProperty.call(message, "checksum")) + if (message.checksum != null && $Object.hasOwnProperty.call(message, "checksum")) writer.uint32(/* id 5, wireType 5 =*/45).fixed32(message.checksum); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1293,12 +1580,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramRelayToRelayPing * @static - * @param {ICMsgSteamDatagramRelayToRelayPing} message CMsgSteamDatagramRelayToRelayPing message or plain object to encode + * @param {CMsgSteamDatagramRelayToRelayPing.$Properties} message CMsgSteamDatagramRelayToRelayPing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramRelayToRelayPing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramRelayToRelayPing.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1308,37 +1595,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramRelayToRelayPing} CMsgSteamDatagramRelayToRelayPing + * @returns {CMsgSteamDatagramRelayToRelayPing & CMsgSteamDatagramRelayToRelayPing.$Shape} CMsgSteamDatagramRelayToRelayPing * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramRelayToRelayPing.decode = function decode(reader, length) { + CMsgSteamDatagramRelayToRelayPing.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramRelayToRelayPing(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramRelayToRelayPing(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.request_timestamp = reader.fixed32(); - break; - case 2: - message.request_date = reader.fixed32(); - break; - case 3: - message.my_pop_id = reader.fixed32(); - break; - case 4: - message.your_pop_id = reader.fixed32(); - break; - case 5: - message.checksum = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.request_timestamp = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.request_date = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.my_pop_id = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.your_pop_id = reader.fixed32(); + continue; + } + case 5: { + if (wireType !== 5) + break; + message.checksum = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1348,11 +1664,11 @@ * @memberof CMsgSteamDatagramRelayToRelayPing * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramRelayToRelayPing} CMsgSteamDatagramRelayToRelayPing + * @returns {CMsgSteamDatagramRelayToRelayPing & CMsgSteamDatagramRelayToRelayPing.$Shape} CMsgSteamDatagramRelayToRelayPing * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramRelayToRelayPing.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramRelayToRelayPing.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1366,22 +1682,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramRelayToRelayPing.verify = function verify(message) { + CMsgSteamDatagramRelayToRelayPing.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.request_timestamp != null && message.hasOwnProperty("request_timestamp")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.request_timestamp != null && $Object.hasOwnProperty.call(message, "request_timestamp")) if (!$util.isInteger(message.request_timestamp)) return "request_timestamp: integer expected"; - if (message.request_date != null && message.hasOwnProperty("request_date")) + if (message.request_date != null && $Object.hasOwnProperty.call(message, "request_date")) if (!$util.isInteger(message.request_date)) return "request_date: integer expected"; - if (message.my_pop_id != null && message.hasOwnProperty("my_pop_id")) + if (message.my_pop_id != null && $Object.hasOwnProperty.call(message, "my_pop_id")) if (!$util.isInteger(message.my_pop_id)) return "my_pop_id: integer expected"; - if (message.your_pop_id != null && message.hasOwnProperty("your_pop_id")) + if (message.your_pop_id != null && $Object.hasOwnProperty.call(message, "your_pop_id")) if (!$util.isInteger(message.your_pop_id)) return "your_pop_id: integer expected"; - if (message.checksum != null && message.hasOwnProperty("checksum")) + if (message.checksum != null && $Object.hasOwnProperty.call(message, "checksum")) if (!$util.isInteger(message.checksum)) return "checksum: integer expected"; return null; @@ -1395,9 +1715,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramRelayToRelayPing} CMsgSteamDatagramRelayToRelayPing */ - CMsgSteamDatagramRelayToRelayPing.fromObject = function fromObject(object) { + CMsgSteamDatagramRelayToRelayPing.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramRelayToRelayPing) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramRelayToRelayPing: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramRelayToRelayPing(); if (object.request_timestamp != null) message.request_timestamp = object.request_timestamp >>> 0; @@ -1421,9 +1747,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramRelayToRelayPing.toObject = function toObject(message, options) { + CMsgSteamDatagramRelayToRelayPing.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.request_timestamp = 0; @@ -1432,15 +1762,15 @@ object.your_pop_id = 0; object.checksum = 0; } - if (message.request_timestamp != null && message.hasOwnProperty("request_timestamp")) + if (message.request_timestamp != null && $Object.hasOwnProperty.call(message, "request_timestamp")) object.request_timestamp = message.request_timestamp; - if (message.request_date != null && message.hasOwnProperty("request_date")) + if (message.request_date != null && $Object.hasOwnProperty.call(message, "request_date")) object.request_date = message.request_date; - if (message.my_pop_id != null && message.hasOwnProperty("my_pop_id")) + if (message.my_pop_id != null && $Object.hasOwnProperty.call(message, "my_pop_id")) object.my_pop_id = message.my_pop_id; - if (message.your_pop_id != null && message.hasOwnProperty("your_pop_id")) + if (message.your_pop_id != null && $Object.hasOwnProperty.call(message, "your_pop_id")) object.your_pop_id = message.your_pop_id; - if (message.checksum != null && message.hasOwnProperty("checksum")) + if (message.checksum != null && $Object.hasOwnProperty.call(message, "checksum")) object.checksum = message.checksum; return object; }; @@ -1452,8 +1782,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramRelayToRelayPing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramRelayToRelayPing.prototype.toJSON = function() { + return CMsgSteamDatagramRelayToRelayPing.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramRelayToRelayPing + * @function getTypeUrl + * @memberof CMsgSteamDatagramRelayToRelayPing + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramRelayToRelayPing.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramRelayToRelayPing"; }; return CMsgSteamDatagramRelayToRelayPing; @@ -1463,28 +1807,41 @@ /** * Properties of a CMsgSteamDatagramSessionCryptInfo. - * @exports ICMsgSteamDatagramSessionCryptInfo - * @interface ICMsgSteamDatagramSessionCryptInfo + * @typedef {Object} CMsgSteamDatagramSessionCryptInfo.$Properties * @property {CMsgSteamDatagramSessionCryptInfo.EKeyType|null} [key_type] CMsgSteamDatagramSessionCryptInfo key_type * @property {Uint8Array|null} [key_data] CMsgSteamDatagramSessionCryptInfo key_data * @property {number|Long|null} [nonce] CMsgSteamDatagramSessionCryptInfo nonce * @property {boolean|null} [is_snp] CMsgSteamDatagramSessionCryptInfo is_snp + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramSessionCryptInfo. + * @exports ICMsgSteamDatagramSessionCryptInfo + * @interface ICMsgSteamDatagramSessionCryptInfo + * @augments CMsgSteamDatagramSessionCryptInfo.$Properties + * @deprecated Use CMsgSteamDatagramSessionCryptInfo.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramSessionCryptInfo. + * @typedef {CMsgSteamDatagramSessionCryptInfo.$Properties} CMsgSteamDatagramSessionCryptInfo.$Shape */ /** * Constructs a new CMsgSteamDatagramSessionCryptInfo. * @exports CMsgSteamDatagramSessionCryptInfo * @classdesc Represents a CMsgSteamDatagramSessionCryptInfo. - * @implements ICMsgSteamDatagramSessionCryptInfo * @constructor - * @param {ICMsgSteamDatagramSessionCryptInfo=} [properties] Properties to set + * @param {CMsgSteamDatagramSessionCryptInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramSessionCryptInfo(properties) { + var CMsgSteamDatagramSessionCryptInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramSessionCryptInfo key_type. @@ -1508,7 +1865,7 @@ * @memberof CMsgSteamDatagramSessionCryptInfo * @instance */ - CMsgSteamDatagramSessionCryptInfo.prototype.nonce = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramSessionCryptInfo.prototype.nonce = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramSessionCryptInfo is_snp. @@ -1523,10 +1880,14 @@ * @function create * @memberof CMsgSteamDatagramSessionCryptInfo * @static - * @param {ICMsgSteamDatagramSessionCryptInfo=} [properties] Properties to set + * @param {CMsgSteamDatagramSessionCryptInfo.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramSessionCryptInfo} CMsgSteamDatagramSessionCryptInfo instance + * @type {{ + * (properties: CMsgSteamDatagramSessionCryptInfo.$Shape): CMsgSteamDatagramSessionCryptInfo & CMsgSteamDatagramSessionCryptInfo.$Shape; + * (properties?: CMsgSteamDatagramSessionCryptInfo.$Properties): CMsgSteamDatagramSessionCryptInfo; + * }} */ - CMsgSteamDatagramSessionCryptInfo.create = function create(properties) { + CMsgSteamDatagramSessionCryptInfo.create = function(properties) { return new CMsgSteamDatagramSessionCryptInfo(properties); }; @@ -1535,21 +1896,28 @@ * @function encode * @memberof CMsgSteamDatagramSessionCryptInfo * @static - * @param {ICMsgSteamDatagramSessionCryptInfo} message CMsgSteamDatagramSessionCryptInfo message or plain object to encode + * @param {CMsgSteamDatagramSessionCryptInfo.$Properties} message CMsgSteamDatagramSessionCryptInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramSessionCryptInfo.encode = function encode(message, writer) { + CMsgSteamDatagramSessionCryptInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.key_type != null && Object.hasOwnProperty.call(message, "key_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.key_type != null && $Object.hasOwnProperty.call(message, "key_type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.key_type); - if (message.key_data != null && Object.hasOwnProperty.call(message, "key_data")) + if (message.key_data != null && $Object.hasOwnProperty.call(message, "key_data")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key_data); - if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce")) + if (message.nonce != null && $Object.hasOwnProperty.call(message, "nonce")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.nonce); - if (message.is_snp != null && Object.hasOwnProperty.call(message, "is_snp")) + if (message.is_snp != null && $Object.hasOwnProperty.call(message, "is_snp")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_snp); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1558,12 +1926,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramSessionCryptInfo * @static - * @param {ICMsgSteamDatagramSessionCryptInfo} message CMsgSteamDatagramSessionCryptInfo message or plain object to encode + * @param {CMsgSteamDatagramSessionCryptInfo.$Properties} message CMsgSteamDatagramSessionCryptInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramSessionCryptInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramSessionCryptInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1573,34 +1941,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramSessionCryptInfo} CMsgSteamDatagramSessionCryptInfo + * @returns {CMsgSteamDatagramSessionCryptInfo & CMsgSteamDatagramSessionCryptInfo.$Shape} CMsgSteamDatagramSessionCryptInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramSessionCryptInfo.decode = function decode(reader, length) { + CMsgSteamDatagramSessionCryptInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramSessionCryptInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramSessionCryptInfo(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key_type = reader.int32(); - break; - case 2: - message.key_data = reader.bytes(); - break; - case 3: - message.nonce = reader.fixed64(); - break; - case 4: - message.is_snp = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgSteamDatagramSessionCryptInfo.EKeyType[value] !== $undefined) + message.key_type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 2) + break; + message.key_data = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.nonce = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_snp = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1610,11 +2010,11 @@ * @memberof CMsgSteamDatagramSessionCryptInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramSessionCryptInfo} CMsgSteamDatagramSessionCryptInfo + * @returns {CMsgSteamDatagramSessionCryptInfo & CMsgSteamDatagramSessionCryptInfo.$Shape} CMsgSteamDatagramSessionCryptInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramSessionCryptInfo.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramSessionCryptInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1628,10 +2028,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramSessionCryptInfo.verify = function verify(message) { + CMsgSteamDatagramSessionCryptInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key_type != null && message.hasOwnProperty("key_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.key_type != null && $Object.hasOwnProperty.call(message, "key_type")) switch (message.key_type) { default: return "key_type: enum value expected"; @@ -1639,13 +2043,13 @@ case 1: break; } - if (message.key_data != null && message.hasOwnProperty("key_data")) + if (message.key_data != null && $Object.hasOwnProperty.call(message, "key_data")) if (!(message.key_data && typeof message.key_data.length === "number" || $util.isString(message.key_data))) return "key_data: buffer expected"; - if (message.nonce != null && message.hasOwnProperty("nonce")) + if (message.nonce != null && $Object.hasOwnProperty.call(message, "nonce")) if (!$util.isInteger(message.nonce) && !(message.nonce && $util.isInteger(message.nonce.low) && $util.isInteger(message.nonce.high))) return "nonce: integer|Long expected"; - if (message.is_snp != null && message.hasOwnProperty("is_snp")) + if (message.is_snp != null && $Object.hasOwnProperty.call(message, "is_snp")) if (typeof message.is_snp !== "boolean") return "is_snp: boolean expected"; return null; @@ -1659,9 +2063,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramSessionCryptInfo} CMsgSteamDatagramSessionCryptInfo */ - CMsgSteamDatagramSessionCryptInfo.fromObject = function fromObject(object) { + CMsgSteamDatagramSessionCryptInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramSessionCryptInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramSessionCryptInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramSessionCryptInfo(); switch (object.key_type) { case "INVALID": @@ -1672,23 +2082,24 @@ case 1: message.key_type = 1; break; + default: } if (object.key_data != null) if (typeof object.key_data === "string") $util.base64.decode(object.key_data, message.key_data = $util.newBuffer($util.base64.length(object.key_data)), 0); - else if (object.key_data.length) + else if (object.key_data.length >= 0) message.key_data = object.key_data; if (object.nonce != null) if ($util.Long) - (message.nonce = $util.Long.fromValue(object.nonce)).unsigned = false; + message.nonce = $util.Long.fromValue(object.nonce, true); else if (typeof object.nonce === "string") - message.nonce = parseInt(object.nonce, 10); + message.nonce = $parseInt(object.nonce, 10); else if (typeof object.nonce === "number") message.nonce = object.nonce; else if (typeof object.nonce === "object") - message.nonce = new $util.LongBits(object.nonce.low >>> 0, object.nonce.high >>> 0).toNumber(); + message.nonce = new $util.LongBits(object.nonce.low >>> 0, object.nonce.high >>> 0).toNumber(true); if (object.is_snp != null) - message.is_snp = Boolean(object.is_snp); + message.is_snp = $Boolean(object.is_snp); return message; }; @@ -1701,36 +2112,42 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramSessionCryptInfo.toObject = function toObject(message, options) { + CMsgSteamDatagramSessionCryptInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.key_type = options.enums === String ? "INVALID" : 0; - if (options.bytes === String) + object.key_type = options.enums === $String ? "INVALID" : 0; + if (options.bytes === $String) object.key_data = ""; else { object.key_data = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.key_data = $util.newBuffer(object.key_data); } if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.nonce = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.nonce = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.nonce = options.longs === String ? "0" : 0; + object.nonce = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.is_snp = false; } - if (message.key_type != null && message.hasOwnProperty("key_type")) - object.key_type = options.enums === String ? $root.CMsgSteamDatagramSessionCryptInfo.EKeyType[message.key_type] : message.key_type; - if (message.key_data != null && message.hasOwnProperty("key_data")) - object.key_data = options.bytes === String ? $util.base64.encode(message.key_data, 0, message.key_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.key_data) : message.key_data; - if (message.nonce != null && message.hasOwnProperty("nonce")) - if (typeof message.nonce === "number") - object.nonce = options.longs === String ? String(message.nonce) : message.nonce; + if (message.key_type != null && $Object.hasOwnProperty.call(message, "key_type")) + object.key_type = options.enums === $String ? $root.CMsgSteamDatagramSessionCryptInfo.EKeyType[message.key_type] === $undefined ? message.key_type : $root.CMsgSteamDatagramSessionCryptInfo.EKeyType[message.key_type] : message.key_type; + if (message.key_data != null && $Object.hasOwnProperty.call(message, "key_data")) + object.key_data = options.bytes === $String ? $util.base64.encode(message.key_data, 0, message.key_data.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.key_data) : message.key_data; + if (message.nonce != null && $Object.hasOwnProperty.call(message, "nonce")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.nonce = typeof message.nonce === "number" ? $BigInt(message.nonce) : $util.Long.fromBits(message.nonce.low >>> 0, message.nonce.high >>> 0, true).toBigInt(); + else if (typeof message.nonce === "number") + object.nonce = options.longs === $String ? $String(message.nonce) : message.nonce; else - object.nonce = options.longs === String ? $util.Long.prototype.toString.call(message.nonce) : options.longs === Number ? new $util.LongBits(message.nonce.low >>> 0, message.nonce.high >>> 0).toNumber() : message.nonce; - if (message.is_snp != null && message.hasOwnProperty("is_snp")) + object.nonce = options.longs === $String ? $util.Long.prototype.toString.call(message.nonce) : options.longs === $Number ? new $util.LongBits(message.nonce.low >>> 0, message.nonce.high >>> 0).toNumber(true) : message.nonce; + if (message.is_snp != null && $Object.hasOwnProperty.call(message, "is_snp")) object.is_snp = message.is_snp; return object; }; @@ -1742,8 +2159,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramSessionCryptInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramSessionCryptInfo.prototype.toJSON = function() { + return CMsgSteamDatagramSessionCryptInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramSessionCryptInfo + * @function getTypeUrl + * @memberof CMsgSteamDatagramSessionCryptInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramSessionCryptInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramSessionCryptInfo"; }; /** @@ -1754,7 +2185,7 @@ * @property {number} CURVE25519=1 CURVE25519 value */ CMsgSteamDatagramSessionCryptInfo.EKeyType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "INVALID"] = 0; values[valuesById[1] = "CURVE25519"] = 1; return values; @@ -1767,26 +2198,39 @@ /** * Properties of a CMsgSteamDatagramSessionCryptInfoSigned. - * @exports ICMsgSteamDatagramSessionCryptInfoSigned - * @interface ICMsgSteamDatagramSessionCryptInfoSigned + * @typedef {Object} CMsgSteamDatagramSessionCryptInfoSigned.$Properties * @property {Uint8Array|null} [info] CMsgSteamDatagramSessionCryptInfoSigned info * @property {Uint8Array|null} [signature] CMsgSteamDatagramSessionCryptInfoSigned signature + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramSessionCryptInfoSigned. + * @exports ICMsgSteamDatagramSessionCryptInfoSigned + * @interface ICMsgSteamDatagramSessionCryptInfoSigned + * @augments CMsgSteamDatagramSessionCryptInfoSigned.$Properties + * @deprecated Use CMsgSteamDatagramSessionCryptInfoSigned.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramSessionCryptInfoSigned. + * @typedef {CMsgSteamDatagramSessionCryptInfoSigned.$Properties} CMsgSteamDatagramSessionCryptInfoSigned.$Shape */ /** * Constructs a new CMsgSteamDatagramSessionCryptInfoSigned. * @exports CMsgSteamDatagramSessionCryptInfoSigned * @classdesc Represents a CMsgSteamDatagramSessionCryptInfoSigned. - * @implements ICMsgSteamDatagramSessionCryptInfoSigned * @constructor - * @param {ICMsgSteamDatagramSessionCryptInfoSigned=} [properties] Properties to set + * @param {CMsgSteamDatagramSessionCryptInfoSigned.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramSessionCryptInfoSigned(properties) { + var CMsgSteamDatagramSessionCryptInfoSigned = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramSessionCryptInfoSigned info. @@ -1809,10 +2253,14 @@ * @function create * @memberof CMsgSteamDatagramSessionCryptInfoSigned * @static - * @param {ICMsgSteamDatagramSessionCryptInfoSigned=} [properties] Properties to set + * @param {CMsgSteamDatagramSessionCryptInfoSigned.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramSessionCryptInfoSigned} CMsgSteamDatagramSessionCryptInfoSigned instance + * @type {{ + * (properties: CMsgSteamDatagramSessionCryptInfoSigned.$Shape): CMsgSteamDatagramSessionCryptInfoSigned & CMsgSteamDatagramSessionCryptInfoSigned.$Shape; + * (properties?: CMsgSteamDatagramSessionCryptInfoSigned.$Properties): CMsgSteamDatagramSessionCryptInfoSigned; + * }} */ - CMsgSteamDatagramSessionCryptInfoSigned.create = function create(properties) { + CMsgSteamDatagramSessionCryptInfoSigned.create = function(properties) { return new CMsgSteamDatagramSessionCryptInfoSigned(properties); }; @@ -1821,17 +2269,24 @@ * @function encode * @memberof CMsgSteamDatagramSessionCryptInfoSigned * @static - * @param {ICMsgSteamDatagramSessionCryptInfoSigned} message CMsgSteamDatagramSessionCryptInfoSigned message or plain object to encode + * @param {CMsgSteamDatagramSessionCryptInfoSigned.$Properties} message CMsgSteamDatagramSessionCryptInfoSigned message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramSessionCryptInfoSigned.encode = function encode(message, writer) { + CMsgSteamDatagramSessionCryptInfoSigned.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.info != null && $Object.hasOwnProperty.call(message, "info")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.info); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1840,12 +2295,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramSessionCryptInfoSigned * @static - * @param {ICMsgSteamDatagramSessionCryptInfoSigned} message CMsgSteamDatagramSessionCryptInfoSigned message or plain object to encode + * @param {CMsgSteamDatagramSessionCryptInfoSigned.$Properties} message CMsgSteamDatagramSessionCryptInfoSigned message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramSessionCryptInfoSigned.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramSessionCryptInfoSigned.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1855,28 +2310,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramSessionCryptInfoSigned} CMsgSteamDatagramSessionCryptInfoSigned + * @returns {CMsgSteamDatagramSessionCryptInfoSigned & CMsgSteamDatagramSessionCryptInfoSigned.$Shape} CMsgSteamDatagramSessionCryptInfoSigned * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramSessionCryptInfoSigned.decode = function decode(reader, length) { + CMsgSteamDatagramSessionCryptInfoSigned.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramSessionCryptInfoSigned(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramSessionCryptInfoSigned(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.info = reader.bytes(); - break; - case 2: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.info = reader.bytes(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.signature = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1886,11 +2361,11 @@ * @memberof CMsgSteamDatagramSessionCryptInfoSigned * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramSessionCryptInfoSigned} CMsgSteamDatagramSessionCryptInfoSigned + * @returns {CMsgSteamDatagramSessionCryptInfoSigned & CMsgSteamDatagramSessionCryptInfoSigned.$Shape} CMsgSteamDatagramSessionCryptInfoSigned * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramSessionCryptInfoSigned.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramSessionCryptInfoSigned.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1904,13 +2379,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramSessionCryptInfoSigned.verify = function verify(message) { + CMsgSteamDatagramSessionCryptInfoSigned.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.info != null && message.hasOwnProperty("info")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.info != null && $Object.hasOwnProperty.call(message, "info")) if (!(message.info && typeof message.info.length === "number" || $util.isString(message.info))) return "info: buffer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; return null; @@ -1924,19 +2403,25 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramSessionCryptInfoSigned} CMsgSteamDatagramSessionCryptInfoSigned */ - CMsgSteamDatagramSessionCryptInfoSigned.fromObject = function fromObject(object) { + CMsgSteamDatagramSessionCryptInfoSigned.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramSessionCryptInfoSigned) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramSessionCryptInfoSigned: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramSessionCryptInfoSigned(); if (object.info != null) if (typeof object.info === "string") $util.base64.decode(object.info, message.info = $util.newBuffer($util.base64.length(object.info)), 0); - else if (object.info.length) + else if (object.info.length >= 0) message.info = object.info; if (object.signature != null) if (typeof object.signature === "string") $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) + else if (object.signature.length >= 0) message.signature = object.signature; return message; }; @@ -1950,30 +2435,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramSessionCryptInfoSigned.toObject = function toObject(message, options) { + CMsgSteamDatagramSessionCryptInfoSigned.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - if (options.bytes === String) + if (options.bytes === $String) object.info = ""; else { object.info = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.info = $util.newBuffer(object.info); } - if (options.bytes === String) + if (options.bytes === $String) object.signature = ""; else { object.signature = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.signature = $util.newBuffer(object.signature); } } - if (message.info != null && message.hasOwnProperty("info")) - object.info = options.bytes === String ? $util.base64.encode(message.info, 0, message.info.length) : options.bytes === Array ? Array.prototype.slice.call(message.info) : message.info; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (message.info != null && $Object.hasOwnProperty.call(message, "info")) + object.info = options.bytes === $String ? $util.base64.encode(message.info, 0, message.info.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.info) : message.info; + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) + object.signature = options.bytes === $String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.signature) : message.signature; return object; }; @@ -1984,8 +2473,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramSessionCryptInfoSigned.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramSessionCryptInfoSigned.prototype.toJSON = function() { + return CMsgSteamDatagramSessionCryptInfoSigned.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramSessionCryptInfoSigned + * @function getTypeUrl + * @memberof CMsgSteamDatagramSessionCryptInfoSigned + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramSessionCryptInfoSigned.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramSessionCryptInfoSigned"; }; return CMsgSteamDatagramSessionCryptInfoSigned; @@ -1995,8 +2498,7 @@ /** * Properties of a CMsgSteamDatagramGameserverSessionRequest. - * @exports ICMsgSteamDatagramGameserverSessionRequest - * @interface ICMsgSteamDatagramGameserverSessionRequest + * @typedef {Object} CMsgSteamDatagramGameserverSessionRequest.$Properties * @property {Uint8Array|null} [ticket] CMsgSteamDatagramGameserverSessionRequest ticket * @property {number|null} [challenge_time] CMsgSteamDatagramGameserverSessionRequest challenge_time * @property {number|Long|null} [challenge] CMsgSteamDatagramGameserverSessionRequest challenge @@ -2004,22 +2506,36 @@ * @property {number|null} [server_connection_id] CMsgSteamDatagramGameserverSessionRequest server_connection_id * @property {number|null} [network_config_version] CMsgSteamDatagramGameserverSessionRequest network_config_version * @property {number|null} [protocol_version] CMsgSteamDatagramGameserverSessionRequest protocol_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramGameserverSessionRequest. + * @exports ICMsgSteamDatagramGameserverSessionRequest + * @interface ICMsgSteamDatagramGameserverSessionRequest + * @augments CMsgSteamDatagramGameserverSessionRequest.$Properties + * @deprecated Use CMsgSteamDatagramGameserverSessionRequest.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramGameserverSessionRequest. + * @typedef {CMsgSteamDatagramGameserverSessionRequest.$Properties} CMsgSteamDatagramGameserverSessionRequest.$Shape */ /** * Constructs a new CMsgSteamDatagramGameserverSessionRequest. * @exports CMsgSteamDatagramGameserverSessionRequest * @classdesc Represents a CMsgSteamDatagramGameserverSessionRequest. - * @implements ICMsgSteamDatagramGameserverSessionRequest * @constructor - * @param {ICMsgSteamDatagramGameserverSessionRequest=} [properties] Properties to set + * @param {CMsgSteamDatagramGameserverSessionRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramGameserverSessionRequest(properties) { + var CMsgSteamDatagramGameserverSessionRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramGameserverSessionRequest ticket. @@ -2043,7 +2559,7 @@ * @memberof CMsgSteamDatagramGameserverSessionRequest * @instance */ - CMsgSteamDatagramGameserverSessionRequest.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramGameserverSessionRequest.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramGameserverSessionRequest client_connection_id. @@ -2082,10 +2598,14 @@ * @function create * @memberof CMsgSteamDatagramGameserverSessionRequest * @static - * @param {ICMsgSteamDatagramGameserverSessionRequest=} [properties] Properties to set + * @param {CMsgSteamDatagramGameserverSessionRequest.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramGameserverSessionRequest} CMsgSteamDatagramGameserverSessionRequest instance + * @type {{ + * (properties: CMsgSteamDatagramGameserverSessionRequest.$Shape): CMsgSteamDatagramGameserverSessionRequest & CMsgSteamDatagramGameserverSessionRequest.$Shape; + * (properties?: CMsgSteamDatagramGameserverSessionRequest.$Properties): CMsgSteamDatagramGameserverSessionRequest; + * }} */ - CMsgSteamDatagramGameserverSessionRequest.create = function create(properties) { + CMsgSteamDatagramGameserverSessionRequest.create = function(properties) { return new CMsgSteamDatagramGameserverSessionRequest(properties); }; @@ -2094,27 +2614,34 @@ * @function encode * @memberof CMsgSteamDatagramGameserverSessionRequest * @static - * @param {ICMsgSteamDatagramGameserverSessionRequest} message CMsgSteamDatagramGameserverSessionRequest message or plain object to encode + * @param {CMsgSteamDatagramGameserverSessionRequest.$Properties} message CMsgSteamDatagramGameserverSessionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramGameserverSessionRequest.encode = function encode(message, writer) { + CMsgSteamDatagramGameserverSessionRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ticket != null && Object.hasOwnProperty.call(message, "ticket")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ticket != null && $Object.hasOwnProperty.call(message, "ticket")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ticket); - if (message.challenge_time != null && Object.hasOwnProperty.call(message, "challenge_time")) + if (message.challenge_time != null && $Object.hasOwnProperty.call(message, "challenge_time")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.challenge_time); - if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.challenge); - if (message.client_connection_id != null && Object.hasOwnProperty.call(message, "client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) writer.uint32(/* id 5, wireType 5 =*/45).fixed32(message.client_connection_id); - if (message.network_config_version != null && Object.hasOwnProperty.call(message, "network_config_version")) + if (message.network_config_version != null && $Object.hasOwnProperty.call(message, "network_config_version")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.network_config_version); - if (message.protocol_version != null && Object.hasOwnProperty.call(message, "protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.protocol_version); - if (message.server_connection_id != null && Object.hasOwnProperty.call(message, "server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.server_connection_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2123,12 +2650,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramGameserverSessionRequest * @static - * @param {ICMsgSteamDatagramGameserverSessionRequest} message CMsgSteamDatagramGameserverSessionRequest message or plain object to encode + * @param {CMsgSteamDatagramGameserverSessionRequest.$Properties} message CMsgSteamDatagramGameserverSessionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramGameserverSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramGameserverSessionRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2138,57 +2665,92 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramGameserverSessionRequest} CMsgSteamDatagramGameserverSessionRequest + * @returns {CMsgSteamDatagramGameserverSessionRequest & CMsgSteamDatagramGameserverSessionRequest.$Shape} CMsgSteamDatagramGameserverSessionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramGameserverSessionRequest.decode = function decode(reader, length) { + CMsgSteamDatagramGameserverSessionRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramGameserverSessionRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramGameserverSessionRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ticket = reader.bytes(); - break; - case 3: - message.challenge_time = reader.fixed32(); - break; - case 4: - message.challenge = reader.fixed64(); - break; - case 5: - message.client_connection_id = reader.fixed32(); - break; - case 8: - message.server_connection_id = reader.fixed32(); - break; - case 6: - message.network_config_version = reader.uint32(); - break; - case 7: - message.protocol_version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } - } - return message; - }; - - /** - * Decodes a CMsgSteamDatagramGameserverSessionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof CMsgSteamDatagramGameserverSessionRequest + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.ticket = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.challenge_time = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.challenge = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 5) + break; + message.client_connection_id = reader.fixed32(); + continue; + } + case 8: { + if (wireType !== 5) + break; + message.server_connection_id = reader.fixed32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.network_config_version = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.protocol_version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a CMsgSteamDatagramGameserverSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof CMsgSteamDatagramGameserverSessionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramGameserverSessionRequest} CMsgSteamDatagramGameserverSessionRequest + * @returns {CMsgSteamDatagramGameserverSessionRequest & CMsgSteamDatagramGameserverSessionRequest.$Shape} CMsgSteamDatagramGameserverSessionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramGameserverSessionRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramGameserverSessionRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2202,28 +2764,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramGameserverSessionRequest.verify = function verify(message) { + CMsgSteamDatagramGameserverSessionRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ticket != null && message.hasOwnProperty("ticket")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ticket != null && $Object.hasOwnProperty.call(message, "ticket")) if (!(message.ticket && typeof message.ticket.length === "number" || $util.isString(message.ticket))) return "ticket: buffer expected"; - if (message.challenge_time != null && message.hasOwnProperty("challenge_time")) + if (message.challenge_time != null && $Object.hasOwnProperty.call(message, "challenge_time")) if (!$util.isInteger(message.challenge_time)) return "challenge_time: integer expected"; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) if (!$util.isInteger(message.challenge) && !(message.challenge && $util.isInteger(message.challenge.low) && $util.isInteger(message.challenge.high))) return "challenge: integer|Long expected"; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) if (!$util.isInteger(message.client_connection_id)) return "client_connection_id: integer expected"; - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) if (!$util.isInteger(message.server_connection_id)) return "server_connection_id: integer expected"; - if (message.network_config_version != null && message.hasOwnProperty("network_config_version")) + if (message.network_config_version != null && $Object.hasOwnProperty.call(message, "network_config_version")) if (!$util.isInteger(message.network_config_version)) return "network_config_version: integer expected"; - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) if (!$util.isInteger(message.protocol_version)) return "protocol_version: integer expected"; return null; @@ -2237,26 +2803,32 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramGameserverSessionRequest} CMsgSteamDatagramGameserverSessionRequest */ - CMsgSteamDatagramGameserverSessionRequest.fromObject = function fromObject(object) { + CMsgSteamDatagramGameserverSessionRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramGameserverSessionRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramGameserverSessionRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramGameserverSessionRequest(); if (object.ticket != null) if (typeof object.ticket === "string") $util.base64.decode(object.ticket, message.ticket = $util.newBuffer($util.base64.length(object.ticket)), 0); - else if (object.ticket.length) + else if (object.ticket.length >= 0) message.ticket = object.ticket; if (object.challenge_time != null) message.challenge_time = object.challenge_time >>> 0; if (object.challenge != null) if ($util.Long) - (message.challenge = $util.Long.fromValue(object.challenge)).unsigned = false; + message.challenge = $util.Long.fromValue(object.challenge, true); else if (typeof object.challenge === "string") - message.challenge = parseInt(object.challenge, 10); + message.challenge = $parseInt(object.challenge, 10); else if (typeof object.challenge === "number") message.challenge = object.challenge; else if (typeof object.challenge === "object") - message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(); + message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(true); if (object.client_connection_id != null) message.client_connection_id = object.client_connection_id >>> 0; if (object.server_connection_id != null) @@ -2277,45 +2849,51 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramGameserverSessionRequest.toObject = function toObject(message, options) { + CMsgSteamDatagramGameserverSessionRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - if (options.bytes === String) + if (options.bytes === $String) object.ticket = ""; else { object.ticket = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.ticket = $util.newBuffer(object.ticket); } object.challenge_time = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.challenge = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.challenge = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.challenge = options.longs === String ? "0" : 0; + object.challenge = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.client_connection_id = 0; object.network_config_version = 0; object.protocol_version = 0; object.server_connection_id = 0; } - if (message.ticket != null && message.hasOwnProperty("ticket")) - object.ticket = options.bytes === String ? $util.base64.encode(message.ticket, 0, message.ticket.length) : options.bytes === Array ? Array.prototype.slice.call(message.ticket) : message.ticket; - if (message.challenge_time != null && message.hasOwnProperty("challenge_time")) + if (message.ticket != null && $Object.hasOwnProperty.call(message, "ticket")) + object.ticket = options.bytes === $String ? $util.base64.encode(message.ticket, 0, message.ticket.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.ticket) : message.ticket; + if (message.challenge_time != null && $Object.hasOwnProperty.call(message, "challenge_time")) object.challenge_time = message.challenge_time; - if (message.challenge != null && message.hasOwnProperty("challenge")) - if (typeof message.challenge === "number") - object.challenge = options.longs === String ? String(message.challenge) : message.challenge; + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.challenge = typeof message.challenge === "number" ? $BigInt(message.challenge) : $util.Long.fromBits(message.challenge.low >>> 0, message.challenge.high >>> 0, true).toBigInt(); + else if (typeof message.challenge === "number") + object.challenge = options.longs === $String ? $String(message.challenge) : message.challenge; else - object.challenge = options.longs === String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber() : message.challenge; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + object.challenge = options.longs === $String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === $Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber(true) : message.challenge; + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) object.client_connection_id = message.client_connection_id; - if (message.network_config_version != null && message.hasOwnProperty("network_config_version")) + if (message.network_config_version != null && $Object.hasOwnProperty.call(message, "network_config_version")) object.network_config_version = message.network_config_version; - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) object.protocol_version = message.protocol_version; - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) object.server_connection_id = message.server_connection_id; return object; }; @@ -2327,8 +2905,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramGameserverSessionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramGameserverSessionRequest.prototype.toJSON = function() { + return CMsgSteamDatagramGameserverSessionRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramGameserverSessionRequest + * @function getTypeUrl + * @memberof CMsgSteamDatagramGameserverSessionRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramGameserverSessionRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramGameserverSessionRequest"; }; return CMsgSteamDatagramGameserverSessionRequest; @@ -2338,29 +2930,42 @@ /** * Properties of a CMsgSteamDatagramGameserverSessionEstablished. - * @exports ICMsgSteamDatagramGameserverSessionEstablished - * @interface ICMsgSteamDatagramGameserverSessionEstablished + * @typedef {Object} CMsgSteamDatagramGameserverSessionEstablished.$Properties * @property {number|null} [connection_id] CMsgSteamDatagramGameserverSessionEstablished connection_id * @property {number|Long|null} [gameserver_steam_id] CMsgSteamDatagramGameserverSessionEstablished gameserver_steam_id * @property {number|null} [seconds_until_shutdown] CMsgSteamDatagramGameserverSessionEstablished seconds_until_shutdown * @property {number|null} [legacy_relay_session_id] CMsgSteamDatagramGameserverSessionEstablished legacy_relay_session_id * @property {number|null} [seq_num_r2c] CMsgSteamDatagramGameserverSessionEstablished seq_num_r2c + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramGameserverSessionEstablished. + * @exports ICMsgSteamDatagramGameserverSessionEstablished + * @interface ICMsgSteamDatagramGameserverSessionEstablished + * @augments CMsgSteamDatagramGameserverSessionEstablished.$Properties + * @deprecated Use CMsgSteamDatagramGameserverSessionEstablished.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramGameserverSessionEstablished. + * @typedef {CMsgSteamDatagramGameserverSessionEstablished.$Properties} CMsgSteamDatagramGameserverSessionEstablished.$Shape */ /** * Constructs a new CMsgSteamDatagramGameserverSessionEstablished. * @exports CMsgSteamDatagramGameserverSessionEstablished * @classdesc Represents a CMsgSteamDatagramGameserverSessionEstablished. - * @implements ICMsgSteamDatagramGameserverSessionEstablished * @constructor - * @param {ICMsgSteamDatagramGameserverSessionEstablished=} [properties] Properties to set + * @param {CMsgSteamDatagramGameserverSessionEstablished.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramGameserverSessionEstablished(properties) { + var CMsgSteamDatagramGameserverSessionEstablished = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramGameserverSessionEstablished connection_id. @@ -2376,7 +2981,7 @@ * @memberof CMsgSteamDatagramGameserverSessionEstablished * @instance */ - CMsgSteamDatagramGameserverSessionEstablished.prototype.gameserver_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramGameserverSessionEstablished.prototype.gameserver_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramGameserverSessionEstablished seconds_until_shutdown. @@ -2407,10 +3012,14 @@ * @function create * @memberof CMsgSteamDatagramGameserverSessionEstablished * @static - * @param {ICMsgSteamDatagramGameserverSessionEstablished=} [properties] Properties to set + * @param {CMsgSteamDatagramGameserverSessionEstablished.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramGameserverSessionEstablished} CMsgSteamDatagramGameserverSessionEstablished instance + * @type {{ + * (properties: CMsgSteamDatagramGameserverSessionEstablished.$Shape): CMsgSteamDatagramGameserverSessionEstablished & CMsgSteamDatagramGameserverSessionEstablished.$Shape; + * (properties?: CMsgSteamDatagramGameserverSessionEstablished.$Properties): CMsgSteamDatagramGameserverSessionEstablished; + * }} */ - CMsgSteamDatagramGameserverSessionEstablished.create = function create(properties) { + CMsgSteamDatagramGameserverSessionEstablished.create = function(properties) { return new CMsgSteamDatagramGameserverSessionEstablished(properties); }; @@ -2419,23 +3028,30 @@ * @function encode * @memberof CMsgSteamDatagramGameserverSessionEstablished * @static - * @param {ICMsgSteamDatagramGameserverSessionEstablished} message CMsgSteamDatagramGameserverSessionEstablished message or plain object to encode + * @param {CMsgSteamDatagramGameserverSessionEstablished.$Properties} message CMsgSteamDatagramGameserverSessionEstablished message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramGameserverSessionEstablished.encode = function encode(message, writer) { + CMsgSteamDatagramGameserverSessionEstablished.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.connection_id); - if (message.gameserver_steam_id != null && Object.hasOwnProperty.call(message, "gameserver_steam_id")) + if (message.gameserver_steam_id != null && $Object.hasOwnProperty.call(message, "gameserver_steam_id")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.gameserver_steam_id); - if (message.seconds_until_shutdown != null && Object.hasOwnProperty.call(message, "seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.seconds_until_shutdown); - if (message.legacy_relay_session_id != null && Object.hasOwnProperty.call(message, "legacy_relay_session_id")) + if (message.legacy_relay_session_id != null && $Object.hasOwnProperty.call(message, "legacy_relay_session_id")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.legacy_relay_session_id); - if (message.seq_num_r2c != null && Object.hasOwnProperty.call(message, "seq_num_r2c")) + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.seq_num_r2c); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2444,12 +3060,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramGameserverSessionEstablished * @static - * @param {ICMsgSteamDatagramGameserverSessionEstablished} message CMsgSteamDatagramGameserverSessionEstablished message or plain object to encode + * @param {CMsgSteamDatagramGameserverSessionEstablished.$Properties} message CMsgSteamDatagramGameserverSessionEstablished message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramGameserverSessionEstablished.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramGameserverSessionEstablished.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2459,37 +3075,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramGameserverSessionEstablished} CMsgSteamDatagramGameserverSessionEstablished + * @returns {CMsgSteamDatagramGameserverSessionEstablished & CMsgSteamDatagramGameserverSessionEstablished.$Shape} CMsgSteamDatagramGameserverSessionEstablished * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramGameserverSessionEstablished.decode = function decode(reader, length) { + CMsgSteamDatagramGameserverSessionEstablished.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramGameserverSessionEstablished(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramGameserverSessionEstablished(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.fixed32(); - break; - case 3: - message.gameserver_steam_id = reader.fixed64(); - break; - case 4: - message.seconds_until_shutdown = reader.uint32(); - break; - case 5: - message.legacy_relay_session_id = reader.uint32(); - break; - case 6: - message.seq_num_r2c = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.gameserver_steam_id = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.seconds_until_shutdown = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.legacy_relay_session_id = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.seq_num_r2c = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2499,11 +3144,11 @@ * @memberof CMsgSteamDatagramGameserverSessionEstablished * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramGameserverSessionEstablished} CMsgSteamDatagramGameserverSessionEstablished + * @returns {CMsgSteamDatagramGameserverSessionEstablished & CMsgSteamDatagramGameserverSessionEstablished.$Shape} CMsgSteamDatagramGameserverSessionEstablished * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramGameserverSessionEstablished.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramGameserverSessionEstablished.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2517,22 +3162,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramGameserverSessionEstablished.verify = function verify(message) { + CMsgSteamDatagramGameserverSessionEstablished.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; - if (message.gameserver_steam_id != null && message.hasOwnProperty("gameserver_steam_id")) + if (message.gameserver_steam_id != null && $Object.hasOwnProperty.call(message, "gameserver_steam_id")) if (!$util.isInteger(message.gameserver_steam_id) && !(message.gameserver_steam_id && $util.isInteger(message.gameserver_steam_id.low) && $util.isInteger(message.gameserver_steam_id.high))) return "gameserver_steam_id: integer|Long expected"; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) if (!$util.isInteger(message.seconds_until_shutdown)) return "seconds_until_shutdown: integer expected"; - if (message.legacy_relay_session_id != null && message.hasOwnProperty("legacy_relay_session_id")) + if (message.legacy_relay_session_id != null && $Object.hasOwnProperty.call(message, "legacy_relay_session_id")) if (!$util.isInteger(message.legacy_relay_session_id)) return "legacy_relay_session_id: integer expected"; - if (message.seq_num_r2c != null && message.hasOwnProperty("seq_num_r2c")) + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) if (!$util.isInteger(message.seq_num_r2c)) return "seq_num_r2c: integer expected"; return null; @@ -2546,21 +3195,27 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramGameserverSessionEstablished} CMsgSteamDatagramGameserverSessionEstablished */ - CMsgSteamDatagramGameserverSessionEstablished.fromObject = function fromObject(object) { + CMsgSteamDatagramGameserverSessionEstablished.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramGameserverSessionEstablished) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramGameserverSessionEstablished: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramGameserverSessionEstablished(); if (object.connection_id != null) message.connection_id = object.connection_id >>> 0; if (object.gameserver_steam_id != null) if ($util.Long) - (message.gameserver_steam_id = $util.Long.fromValue(object.gameserver_steam_id)).unsigned = false; + message.gameserver_steam_id = $util.Long.fromValue(object.gameserver_steam_id, true); else if (typeof object.gameserver_steam_id === "string") - message.gameserver_steam_id = parseInt(object.gameserver_steam_id, 10); + message.gameserver_steam_id = $parseInt(object.gameserver_steam_id, 10); else if (typeof object.gameserver_steam_id === "number") message.gameserver_steam_id = object.gameserver_steam_id; else if (typeof object.gameserver_steam_id === "object") - message.gameserver_steam_id = new $util.LongBits(object.gameserver_steam_id.low >>> 0, object.gameserver_steam_id.high >>> 0).toNumber(); + message.gameserver_steam_id = new $util.LongBits(object.gameserver_steam_id.low >>> 0, object.gameserver_steam_id.high >>> 0).toNumber(true); if (object.seconds_until_shutdown != null) message.seconds_until_shutdown = object.seconds_until_shutdown >>> 0; if (object.legacy_relay_session_id != null) @@ -2579,33 +3234,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramGameserverSessionEstablished.toObject = function toObject(message, options) { + CMsgSteamDatagramGameserverSessionEstablished.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.connection_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gameserver_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.gameserver_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.gameserver_steam_id = options.longs === String ? "0" : 0; + object.gameserver_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.seconds_until_shutdown = 0; object.legacy_relay_session_id = 0; object.seq_num_r2c = 0; } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; - if (message.gameserver_steam_id != null && message.hasOwnProperty("gameserver_steam_id")) - if (typeof message.gameserver_steam_id === "number") - object.gameserver_steam_id = options.longs === String ? String(message.gameserver_steam_id) : message.gameserver_steam_id; + if (message.gameserver_steam_id != null && $Object.hasOwnProperty.call(message, "gameserver_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.gameserver_steam_id = typeof message.gameserver_steam_id === "number" ? $BigInt(message.gameserver_steam_id) : $util.Long.fromBits(message.gameserver_steam_id.low >>> 0, message.gameserver_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.gameserver_steam_id === "number") + object.gameserver_steam_id = options.longs === $String ? $String(message.gameserver_steam_id) : message.gameserver_steam_id; else - object.gameserver_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.gameserver_steam_id) : options.longs === Number ? new $util.LongBits(message.gameserver_steam_id.low >>> 0, message.gameserver_steam_id.high >>> 0).toNumber() : message.gameserver_steam_id; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + object.gameserver_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.gameserver_steam_id) : options.longs === $Number ? new $util.LongBits(message.gameserver_steam_id.low >>> 0, message.gameserver_steam_id.high >>> 0).toNumber(true) : message.gameserver_steam_id; + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) object.seconds_until_shutdown = message.seconds_until_shutdown; - if (message.legacy_relay_session_id != null && message.hasOwnProperty("legacy_relay_session_id")) + if (message.legacy_relay_session_id != null && $Object.hasOwnProperty.call(message, "legacy_relay_session_id")) object.legacy_relay_session_id = message.legacy_relay_session_id; - if (message.seq_num_r2c != null && message.hasOwnProperty("seq_num_r2c")) + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) object.seq_num_r2c = message.seq_num_r2c; return object; }; @@ -2617,8 +3278,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramGameserverSessionEstablished.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramGameserverSessionEstablished.prototype.toJSON = function() { + return CMsgSteamDatagramGameserverSessionEstablished.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramGameserverSessionEstablished + * @function getTypeUrl + * @memberof CMsgSteamDatagramGameserverSessionEstablished + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramGameserverSessionEstablished.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramGameserverSessionEstablished"; }; return CMsgSteamDatagramGameserverSessionEstablished; @@ -2628,30 +3303,43 @@ /** * Properties of a CMsgSteamDatagramNoSessionRelayToClient. - * @exports ICMsgSteamDatagramNoSessionRelayToClient - * @interface ICMsgSteamDatagramNoSessionRelayToClient + * @typedef {Object} CMsgSteamDatagramNoSessionRelayToClient.$Properties * @property {number|null} [legacy_relay_session_id] CMsgSteamDatagramNoSessionRelayToClient legacy_relay_session_id * @property {number|null} [connection_id] CMsgSteamDatagramNoSessionRelayToClient connection_id * @property {number|null} [your_public_ip] CMsgSteamDatagramNoSessionRelayToClient your_public_ip * @property {number|null} [server_time] CMsgSteamDatagramNoSessionRelayToClient server_time * @property {number|Long|null} [challenge] CMsgSteamDatagramNoSessionRelayToClient challenge * @property {number|null} [seconds_until_shutdown] CMsgSteamDatagramNoSessionRelayToClient seconds_until_shutdown + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramNoSessionRelayToClient. + * @exports ICMsgSteamDatagramNoSessionRelayToClient + * @interface ICMsgSteamDatagramNoSessionRelayToClient + * @augments CMsgSteamDatagramNoSessionRelayToClient.$Properties + * @deprecated Use CMsgSteamDatagramNoSessionRelayToClient.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramNoSessionRelayToClient. + * @typedef {CMsgSteamDatagramNoSessionRelayToClient.$Properties} CMsgSteamDatagramNoSessionRelayToClient.$Shape */ /** * Constructs a new CMsgSteamDatagramNoSessionRelayToClient. * @exports CMsgSteamDatagramNoSessionRelayToClient * @classdesc Represents a CMsgSteamDatagramNoSessionRelayToClient. - * @implements ICMsgSteamDatagramNoSessionRelayToClient * @constructor - * @param {ICMsgSteamDatagramNoSessionRelayToClient=} [properties] Properties to set + * @param {CMsgSteamDatagramNoSessionRelayToClient.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramNoSessionRelayToClient(properties) { + var CMsgSteamDatagramNoSessionRelayToClient = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramNoSessionRelayToClient legacy_relay_session_id. @@ -2691,7 +3379,7 @@ * @memberof CMsgSteamDatagramNoSessionRelayToClient * @instance */ - CMsgSteamDatagramNoSessionRelayToClient.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramNoSessionRelayToClient.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramNoSessionRelayToClient seconds_until_shutdown. @@ -2706,10 +3394,14 @@ * @function create * @memberof CMsgSteamDatagramNoSessionRelayToClient * @static - * @param {ICMsgSteamDatagramNoSessionRelayToClient=} [properties] Properties to set + * @param {CMsgSteamDatagramNoSessionRelayToClient.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramNoSessionRelayToClient} CMsgSteamDatagramNoSessionRelayToClient instance + * @type {{ + * (properties: CMsgSteamDatagramNoSessionRelayToClient.$Shape): CMsgSteamDatagramNoSessionRelayToClient & CMsgSteamDatagramNoSessionRelayToClient.$Shape; + * (properties?: CMsgSteamDatagramNoSessionRelayToClient.$Properties): CMsgSteamDatagramNoSessionRelayToClient; + * }} */ - CMsgSteamDatagramNoSessionRelayToClient.create = function create(properties) { + CMsgSteamDatagramNoSessionRelayToClient.create = function(properties) { return new CMsgSteamDatagramNoSessionRelayToClient(properties); }; @@ -2718,25 +3410,32 @@ * @function encode * @memberof CMsgSteamDatagramNoSessionRelayToClient * @static - * @param {ICMsgSteamDatagramNoSessionRelayToClient} message CMsgSteamDatagramNoSessionRelayToClient message or plain object to encode + * @param {CMsgSteamDatagramNoSessionRelayToClient.$Properties} message CMsgSteamDatagramNoSessionRelayToClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramNoSessionRelayToClient.encode = function encode(message, writer) { + CMsgSteamDatagramNoSessionRelayToClient.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.legacy_relay_session_id != null && Object.hasOwnProperty.call(message, "legacy_relay_session_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.legacy_relay_session_id != null && $Object.hasOwnProperty.call(message, "legacy_relay_session_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.legacy_relay_session_id); - if (message.your_public_ip != null && Object.hasOwnProperty.call(message, "your_public_ip")) + if (message.your_public_ip != null && $Object.hasOwnProperty.call(message, "your_public_ip")) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.your_public_ip); - if (message.server_time != null && Object.hasOwnProperty.call(message, "server_time")) + if (message.server_time != null && $Object.hasOwnProperty.call(message, "server_time")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.server_time); - if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.challenge); - if (message.seconds_until_shutdown != null && Object.hasOwnProperty.call(message, "seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.seconds_until_shutdown); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.connection_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2745,12 +3444,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramNoSessionRelayToClient * @static - * @param {ICMsgSteamDatagramNoSessionRelayToClient} message CMsgSteamDatagramNoSessionRelayToClient message or plain object to encode + * @param {CMsgSteamDatagramNoSessionRelayToClient.$Properties} message CMsgSteamDatagramNoSessionRelayToClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramNoSessionRelayToClient.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramNoSessionRelayToClient.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2760,40 +3459,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramNoSessionRelayToClient} CMsgSteamDatagramNoSessionRelayToClient + * @returns {CMsgSteamDatagramNoSessionRelayToClient & CMsgSteamDatagramNoSessionRelayToClient.$Shape} CMsgSteamDatagramNoSessionRelayToClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramNoSessionRelayToClient.decode = function decode(reader, length) { + CMsgSteamDatagramNoSessionRelayToClient.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramNoSessionRelayToClient(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramNoSessionRelayToClient(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.legacy_relay_session_id = reader.uint32(); - break; - case 7: - message.connection_id = reader.fixed32(); - break; - case 2: - message.your_public_ip = reader.fixed32(); - break; - case 3: - message.server_time = reader.fixed32(); - break; - case 4: - message.challenge = reader.fixed64(); - break; - case 5: - message.seconds_until_shutdown = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.legacy_relay_session_id = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.your_public_ip = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.server_time = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.challenge = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.seconds_until_shutdown = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2803,11 +3534,11 @@ * @memberof CMsgSteamDatagramNoSessionRelayToClient * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramNoSessionRelayToClient} CMsgSteamDatagramNoSessionRelayToClient + * @returns {CMsgSteamDatagramNoSessionRelayToClient & CMsgSteamDatagramNoSessionRelayToClient.$Shape} CMsgSteamDatagramNoSessionRelayToClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramNoSessionRelayToClient.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramNoSessionRelayToClient.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2821,25 +3552,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramNoSessionRelayToClient.verify = function verify(message) { + CMsgSteamDatagramNoSessionRelayToClient.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.legacy_relay_session_id != null && message.hasOwnProperty("legacy_relay_session_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.legacy_relay_session_id != null && $Object.hasOwnProperty.call(message, "legacy_relay_session_id")) if (!$util.isInteger(message.legacy_relay_session_id)) return "legacy_relay_session_id: integer expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; - if (message.your_public_ip != null && message.hasOwnProperty("your_public_ip")) + if (message.your_public_ip != null && $Object.hasOwnProperty.call(message, "your_public_ip")) if (!$util.isInteger(message.your_public_ip)) return "your_public_ip: integer expected"; - if (message.server_time != null && message.hasOwnProperty("server_time")) + if (message.server_time != null && $Object.hasOwnProperty.call(message, "server_time")) if (!$util.isInteger(message.server_time)) return "server_time: integer expected"; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) if (!$util.isInteger(message.challenge) && !(message.challenge && $util.isInteger(message.challenge.low) && $util.isInteger(message.challenge.high))) return "challenge: integer|Long expected"; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) if (!$util.isInteger(message.seconds_until_shutdown)) return "seconds_until_shutdown: integer expected"; return null; @@ -2853,9 +3588,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramNoSessionRelayToClient} CMsgSteamDatagramNoSessionRelayToClient */ - CMsgSteamDatagramNoSessionRelayToClient.fromObject = function fromObject(object) { + CMsgSteamDatagramNoSessionRelayToClient.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramNoSessionRelayToClient) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramNoSessionRelayToClient: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramNoSessionRelayToClient(); if (object.legacy_relay_session_id != null) message.legacy_relay_session_id = object.legacy_relay_session_id >>> 0; @@ -2867,13 +3608,13 @@ message.server_time = object.server_time >>> 0; if (object.challenge != null) if ($util.Long) - (message.challenge = $util.Long.fromValue(object.challenge)).unsigned = false; + message.challenge = $util.Long.fromValue(object.challenge, true); else if (typeof object.challenge === "string") - message.challenge = parseInt(object.challenge, 10); + message.challenge = $parseInt(object.challenge, 10); else if (typeof object.challenge === "number") message.challenge = object.challenge; else if (typeof object.challenge === "object") - message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(); + message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(true); if (object.seconds_until_shutdown != null) message.seconds_until_shutdown = object.seconds_until_shutdown >>> 0; return message; @@ -2888,36 +3629,42 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramNoSessionRelayToClient.toObject = function toObject(message, options) { + CMsgSteamDatagramNoSessionRelayToClient.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.legacy_relay_session_id = 0; object.your_public_ip = 0; object.server_time = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.challenge = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.challenge = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.challenge = options.longs === String ? "0" : 0; + object.challenge = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.seconds_until_shutdown = 0; object.connection_id = 0; } - if (message.legacy_relay_session_id != null && message.hasOwnProperty("legacy_relay_session_id")) + if (message.legacy_relay_session_id != null && $Object.hasOwnProperty.call(message, "legacy_relay_session_id")) object.legacy_relay_session_id = message.legacy_relay_session_id; - if (message.your_public_ip != null && message.hasOwnProperty("your_public_ip")) + if (message.your_public_ip != null && $Object.hasOwnProperty.call(message, "your_public_ip")) object.your_public_ip = message.your_public_ip; - if (message.server_time != null && message.hasOwnProperty("server_time")) + if (message.server_time != null && $Object.hasOwnProperty.call(message, "server_time")) object.server_time = message.server_time; - if (message.challenge != null && message.hasOwnProperty("challenge")) - if (typeof message.challenge === "number") - object.challenge = options.longs === String ? String(message.challenge) : message.challenge; + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.challenge = typeof message.challenge === "number" ? $BigInt(message.challenge) : $util.Long.fromBits(message.challenge.low >>> 0, message.challenge.high >>> 0, true).toBigInt(); + else if (typeof message.challenge === "number") + object.challenge = options.longs === $String ? $String(message.challenge) : message.challenge; else - object.challenge = options.longs === String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber() : message.challenge; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + object.challenge = options.longs === $String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === $Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber(true) : message.challenge; + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) object.seconds_until_shutdown = message.seconds_until_shutdown; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; return object; }; @@ -2929,8 +3676,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramNoSessionRelayToClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramNoSessionRelayToClient.prototype.toJSON = function() { + return CMsgSteamDatagramNoSessionRelayToClient.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramNoSessionRelayToClient + * @function getTypeUrl + * @memberof CMsgSteamDatagramNoSessionRelayToClient + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramNoSessionRelayToClient.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramNoSessionRelayToClient"; }; return CMsgSteamDatagramNoSessionRelayToClient; @@ -2940,28 +3701,41 @@ /** * Properties of a CMsgSteamDatagramNoSessionRelayToServer. - * @exports ICMsgSteamDatagramNoSessionRelayToServer - * @interface ICMsgSteamDatagramNoSessionRelayToServer + * @typedef {Object} CMsgSteamDatagramNoSessionRelayToServer.$Properties * @property {number|null} [relay_session_id] CMsgSteamDatagramNoSessionRelayToServer relay_session_id * @property {number|null} [client_connection_id] CMsgSteamDatagramNoSessionRelayToServer client_connection_id * @property {number|null} [server_connection_id] CMsgSteamDatagramNoSessionRelayToServer server_connection_id * @property {number|Long|null} [kludge_pad] CMsgSteamDatagramNoSessionRelayToServer kludge_pad + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramNoSessionRelayToServer. + * @exports ICMsgSteamDatagramNoSessionRelayToServer + * @interface ICMsgSteamDatagramNoSessionRelayToServer + * @augments CMsgSteamDatagramNoSessionRelayToServer.$Properties + * @deprecated Use CMsgSteamDatagramNoSessionRelayToServer.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramNoSessionRelayToServer. + * @typedef {CMsgSteamDatagramNoSessionRelayToServer.$Properties} CMsgSteamDatagramNoSessionRelayToServer.$Shape */ /** * Constructs a new CMsgSteamDatagramNoSessionRelayToServer. * @exports CMsgSteamDatagramNoSessionRelayToServer * @classdesc Represents a CMsgSteamDatagramNoSessionRelayToServer. - * @implements ICMsgSteamDatagramNoSessionRelayToServer * @constructor - * @param {ICMsgSteamDatagramNoSessionRelayToServer=} [properties] Properties to set + * @param {CMsgSteamDatagramNoSessionRelayToServer.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramNoSessionRelayToServer(properties) { + var CMsgSteamDatagramNoSessionRelayToServer = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramNoSessionRelayToServer relay_session_id. @@ -2993,17 +3767,21 @@ * @memberof CMsgSteamDatagramNoSessionRelayToServer * @instance */ - CMsgSteamDatagramNoSessionRelayToServer.prototype.kludge_pad = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramNoSessionRelayToServer.prototype.kludge_pad = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgSteamDatagramNoSessionRelayToServer instance using the specified properties. * @function create * @memberof CMsgSteamDatagramNoSessionRelayToServer * @static - * @param {ICMsgSteamDatagramNoSessionRelayToServer=} [properties] Properties to set + * @param {CMsgSteamDatagramNoSessionRelayToServer.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramNoSessionRelayToServer} CMsgSteamDatagramNoSessionRelayToServer instance + * @type {{ + * (properties: CMsgSteamDatagramNoSessionRelayToServer.$Shape): CMsgSteamDatagramNoSessionRelayToServer & CMsgSteamDatagramNoSessionRelayToServer.$Shape; + * (properties?: CMsgSteamDatagramNoSessionRelayToServer.$Properties): CMsgSteamDatagramNoSessionRelayToServer; + * }} */ - CMsgSteamDatagramNoSessionRelayToServer.create = function create(properties) { + CMsgSteamDatagramNoSessionRelayToServer.create = function(properties) { return new CMsgSteamDatagramNoSessionRelayToServer(properties); }; @@ -3012,21 +3790,28 @@ * @function encode * @memberof CMsgSteamDatagramNoSessionRelayToServer * @static - * @param {ICMsgSteamDatagramNoSessionRelayToServer} message CMsgSteamDatagramNoSessionRelayToServer message or plain object to encode + * @param {CMsgSteamDatagramNoSessionRelayToServer.$Properties} message CMsgSteamDatagramNoSessionRelayToServer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramNoSessionRelayToServer.encode = function encode(message, writer) { + CMsgSteamDatagramNoSessionRelayToServer.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.relay_session_id != null && Object.hasOwnProperty.call(message, "relay_session_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.relay_session_id); - if (message.client_connection_id != null && Object.hasOwnProperty.call(message, "client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.client_connection_id); - if (message.server_connection_id != null && Object.hasOwnProperty.call(message, "server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.server_connection_id); - if (message.kludge_pad != null && Object.hasOwnProperty.call(message, "kludge_pad")) + if (message.kludge_pad != null && $Object.hasOwnProperty.call(message, "kludge_pad")) writer.uint32(/* id 99, wireType 1 =*/793).fixed64(message.kludge_pad); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3035,12 +3820,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramNoSessionRelayToServer * @static - * @param {ICMsgSteamDatagramNoSessionRelayToServer} message CMsgSteamDatagramNoSessionRelayToServer message or plain object to encode + * @param {CMsgSteamDatagramNoSessionRelayToServer.$Properties} message CMsgSteamDatagramNoSessionRelayToServer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramNoSessionRelayToServer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramNoSessionRelayToServer.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3050,34 +3835,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramNoSessionRelayToServer} CMsgSteamDatagramNoSessionRelayToServer + * @returns {CMsgSteamDatagramNoSessionRelayToServer & CMsgSteamDatagramNoSessionRelayToServer.$Shape} CMsgSteamDatagramNoSessionRelayToServer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramNoSessionRelayToServer.decode = function decode(reader, length) { + CMsgSteamDatagramNoSessionRelayToServer.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramNoSessionRelayToServer(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramNoSessionRelayToServer(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.relay_session_id = reader.uint32(); - break; - case 7: - message.client_connection_id = reader.fixed32(); - break; - case 8: - message.server_connection_id = reader.fixed32(); - break; - case 99: - message.kludge_pad = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.relay_session_id = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.client_connection_id = reader.fixed32(); + continue; + } + case 8: { + if (wireType !== 5) + break; + message.server_connection_id = reader.fixed32(); + continue; + } + case 99: { + if (wireType !== 1) + break; + message.kludge_pad = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3087,11 +3898,11 @@ * @memberof CMsgSteamDatagramNoSessionRelayToServer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramNoSessionRelayToServer} CMsgSteamDatagramNoSessionRelayToServer + * @returns {CMsgSteamDatagramNoSessionRelayToServer & CMsgSteamDatagramNoSessionRelayToServer.$Shape} CMsgSteamDatagramNoSessionRelayToServer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramNoSessionRelayToServer.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramNoSessionRelayToServer.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3105,19 +3916,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramNoSessionRelayToServer.verify = function verify(message) { + CMsgSteamDatagramNoSessionRelayToServer.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.relay_session_id != null && message.hasOwnProperty("relay_session_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) if (!$util.isInteger(message.relay_session_id)) return "relay_session_id: integer expected"; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) if (!$util.isInteger(message.client_connection_id)) return "client_connection_id: integer expected"; - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) if (!$util.isInteger(message.server_connection_id)) return "server_connection_id: integer expected"; - if (message.kludge_pad != null && message.hasOwnProperty("kludge_pad")) + if (message.kludge_pad != null && $Object.hasOwnProperty.call(message, "kludge_pad")) if (!$util.isInteger(message.kludge_pad) && !(message.kludge_pad && $util.isInteger(message.kludge_pad.low) && $util.isInteger(message.kludge_pad.high))) return "kludge_pad: integer|Long expected"; return null; @@ -3131,9 +3946,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramNoSessionRelayToServer} CMsgSteamDatagramNoSessionRelayToServer */ - CMsgSteamDatagramNoSessionRelayToServer.fromObject = function fromObject(object) { + CMsgSteamDatagramNoSessionRelayToServer.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramNoSessionRelayToServer) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramNoSessionRelayToServer: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramNoSessionRelayToServer(); if (object.relay_session_id != null) message.relay_session_id = object.relay_session_id >>> 0; @@ -3143,13 +3964,13 @@ message.server_connection_id = object.server_connection_id >>> 0; if (object.kludge_pad != null) if ($util.Long) - (message.kludge_pad = $util.Long.fromValue(object.kludge_pad)).unsigned = false; + message.kludge_pad = $util.Long.fromValue(object.kludge_pad, true); else if (typeof object.kludge_pad === "string") - message.kludge_pad = parseInt(object.kludge_pad, 10); + message.kludge_pad = $parseInt(object.kludge_pad, 10); else if (typeof object.kludge_pad === "number") message.kludge_pad = object.kludge_pad; else if (typeof object.kludge_pad === "object") - message.kludge_pad = new $util.LongBits(object.kludge_pad.low >>> 0, object.kludge_pad.high >>> 0).toNumber(); + message.kludge_pad = new $util.LongBits(object.kludge_pad.low >>> 0, object.kludge_pad.high >>> 0).toNumber(true); return message; }; @@ -3162,31 +3983,37 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramNoSessionRelayToServer.toObject = function toObject(message, options) { + CMsgSteamDatagramNoSessionRelayToServer.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.relay_session_id = 0; object.client_connection_id = 0; object.server_connection_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.kludge_pad = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.kludge_pad = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.kludge_pad = options.longs === String ? "0" : 0; + object.kludge_pad = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.relay_session_id != null && message.hasOwnProperty("relay_session_id")) + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) object.relay_session_id = message.relay_session_id; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) object.client_connection_id = message.client_connection_id; - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) object.server_connection_id = message.server_connection_id; - if (message.kludge_pad != null && message.hasOwnProperty("kludge_pad")) - if (typeof message.kludge_pad === "number") - object.kludge_pad = options.longs === String ? String(message.kludge_pad) : message.kludge_pad; + if (message.kludge_pad != null && $Object.hasOwnProperty.call(message, "kludge_pad")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.kludge_pad = typeof message.kludge_pad === "number" ? $BigInt(message.kludge_pad) : $util.Long.fromBits(message.kludge_pad.low >>> 0, message.kludge_pad.high >>> 0, true).toBigInt(); + else if (typeof message.kludge_pad === "number") + object.kludge_pad = options.longs === $String ? $String(message.kludge_pad) : message.kludge_pad; else - object.kludge_pad = options.longs === String ? $util.Long.prototype.toString.call(message.kludge_pad) : options.longs === Number ? new $util.LongBits(message.kludge_pad.low >>> 0, message.kludge_pad.high >>> 0).toNumber() : message.kludge_pad; + object.kludge_pad = options.longs === $String ? $util.Long.prototype.toString.call(message.kludge_pad) : options.longs === $Number ? new $util.LongBits(message.kludge_pad.low >>> 0, message.kludge_pad.high >>> 0).toNumber(true) : message.kludge_pad; return object; }; @@ -3197,8 +4024,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramNoSessionRelayToServer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramNoSessionRelayToServer.prototype.toJSON = function() { + return CMsgSteamDatagramNoSessionRelayToServer.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramNoSessionRelayToServer + * @function getTypeUrl + * @memberof CMsgSteamDatagramNoSessionRelayToServer + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramNoSessionRelayToServer.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramNoSessionRelayToServer"; }; return CMsgSteamDatagramNoSessionRelayToServer; @@ -3208,26 +4049,39 @@ /** * Properties of a CMsgSteamDatagramDiagnostic. - * @exports ICMsgSteamDatagramDiagnostic - * @interface ICMsgSteamDatagramDiagnostic + * @typedef {Object} CMsgSteamDatagramDiagnostic.$Properties * @property {number|null} [severity] CMsgSteamDatagramDiagnostic severity * @property {string|null} [text] CMsgSteamDatagramDiagnostic text + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramDiagnostic. + * @exports ICMsgSteamDatagramDiagnostic + * @interface ICMsgSteamDatagramDiagnostic + * @augments CMsgSteamDatagramDiagnostic.$Properties + * @deprecated Use CMsgSteamDatagramDiagnostic.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramDiagnostic. + * @typedef {CMsgSteamDatagramDiagnostic.$Properties} CMsgSteamDatagramDiagnostic.$Shape */ /** * Constructs a new CMsgSteamDatagramDiagnostic. * @exports CMsgSteamDatagramDiagnostic * @classdesc Represents a CMsgSteamDatagramDiagnostic. - * @implements ICMsgSteamDatagramDiagnostic * @constructor - * @param {ICMsgSteamDatagramDiagnostic=} [properties] Properties to set + * @param {CMsgSteamDatagramDiagnostic.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramDiagnostic(properties) { + var CMsgSteamDatagramDiagnostic = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramDiagnostic severity. @@ -3250,10 +4104,14 @@ * @function create * @memberof CMsgSteamDatagramDiagnostic * @static - * @param {ICMsgSteamDatagramDiagnostic=} [properties] Properties to set + * @param {CMsgSteamDatagramDiagnostic.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramDiagnostic} CMsgSteamDatagramDiagnostic instance + * @type {{ + * (properties: CMsgSteamDatagramDiagnostic.$Shape): CMsgSteamDatagramDiagnostic & CMsgSteamDatagramDiagnostic.$Shape; + * (properties?: CMsgSteamDatagramDiagnostic.$Properties): CMsgSteamDatagramDiagnostic; + * }} */ - CMsgSteamDatagramDiagnostic.create = function create(properties) { + CMsgSteamDatagramDiagnostic.create = function(properties) { return new CMsgSteamDatagramDiagnostic(properties); }; @@ -3262,17 +4120,24 @@ * @function encode * @memberof CMsgSteamDatagramDiagnostic * @static - * @param {ICMsgSteamDatagramDiagnostic} message CMsgSteamDatagramDiagnostic message or plain object to encode + * @param {CMsgSteamDatagramDiagnostic.$Properties} message CMsgSteamDatagramDiagnostic message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramDiagnostic.encode = function encode(message, writer) { + CMsgSteamDatagramDiagnostic.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.severity != null && $Object.hasOwnProperty.call(message, "severity")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.severity); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.text); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3281,12 +4146,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramDiagnostic * @static - * @param {ICMsgSteamDatagramDiagnostic} message CMsgSteamDatagramDiagnostic message or plain object to encode + * @param {CMsgSteamDatagramDiagnostic.$Properties} message CMsgSteamDatagramDiagnostic message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramDiagnostic.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramDiagnostic.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3296,28 +4161,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramDiagnostic} CMsgSteamDatagramDiagnostic + * @returns {CMsgSteamDatagramDiagnostic & CMsgSteamDatagramDiagnostic.$Shape} CMsgSteamDatagramDiagnostic * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramDiagnostic.decode = function decode(reader, length) { + CMsgSteamDatagramDiagnostic.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramDiagnostic(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramDiagnostic(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.severity = reader.uint32(); - break; - case 2: - message.text = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.severity = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.text = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3327,11 +4212,11 @@ * @memberof CMsgSteamDatagramDiagnostic * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramDiagnostic} CMsgSteamDatagramDiagnostic + * @returns {CMsgSteamDatagramDiagnostic & CMsgSteamDatagramDiagnostic.$Shape} CMsgSteamDatagramDiagnostic * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramDiagnostic.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramDiagnostic.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3345,13 +4230,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramDiagnostic.verify = function verify(message) { + CMsgSteamDatagramDiagnostic.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.severity != null && message.hasOwnProperty("severity")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.severity != null && $Object.hasOwnProperty.call(message, "severity")) if (!$util.isInteger(message.severity)) return "severity: integer expected"; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) if (!$util.isString(message.text)) return "text: string expected"; return null; @@ -3365,14 +4254,20 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramDiagnostic} CMsgSteamDatagramDiagnostic */ - CMsgSteamDatagramDiagnostic.fromObject = function fromObject(object) { + CMsgSteamDatagramDiagnostic.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramDiagnostic) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramDiagnostic: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramDiagnostic(); if (object.severity != null) message.severity = object.severity >>> 0; if (object.text != null) - message.text = String(object.text); + message.text = $String(object.text); return message; }; @@ -3385,17 +4280,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramDiagnostic.toObject = function toObject(message, options) { + CMsgSteamDatagramDiagnostic.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.severity = 0; object.text = ""; } - if (message.severity != null && message.hasOwnProperty("severity")) + if (message.severity != null && $Object.hasOwnProperty.call(message, "severity")) object.severity = message.severity; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) object.text = message.text; return object; }; @@ -3407,8 +4306,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramDiagnostic.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramDiagnostic.prototype.toJSON = function() { + return CMsgSteamDatagramDiagnostic.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramDiagnostic + * @function getTypeUrl + * @memberof CMsgSteamDatagramDiagnostic + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramDiagnostic.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramDiagnostic"; }; return CMsgSteamDatagramDiagnostic; @@ -3416,32 +4329,45 @@ $root.CMsgSteamDatagramDataCenterState = (function() { + /** + * Properties of a CMsgSteamDatagramDataCenterState. + * @typedef {Object} CMsgSteamDatagramDataCenterState.$Properties + * @property {Array.|null} [data_centers] CMsgSteamDatagramDataCenterState data_centers + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSteamDatagramDataCenterState. * @exports ICMsgSteamDatagramDataCenterState * @interface ICMsgSteamDatagramDataCenterState - * @property {Array.|null} [data_centers] CMsgSteamDatagramDataCenterState data_centers + * @augments CMsgSteamDatagramDataCenterState.$Properties + * @deprecated Use CMsgSteamDatagramDataCenterState.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramDataCenterState. + * @typedef {CMsgSteamDatagramDataCenterState.$Properties} CMsgSteamDatagramDataCenterState.$Shape */ /** * Constructs a new CMsgSteamDatagramDataCenterState. * @exports CMsgSteamDatagramDataCenterState * @classdesc Represents a CMsgSteamDatagramDataCenterState. - * @implements ICMsgSteamDatagramDataCenterState * @constructor - * @param {ICMsgSteamDatagramDataCenterState=} [properties] Properties to set + * @param {CMsgSteamDatagramDataCenterState.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramDataCenterState(properties) { + var CMsgSteamDatagramDataCenterState = function (properties) { this.data_centers = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramDataCenterState data_centers. - * @member {Array.} data_centers + * @member {Array.} data_centers * @memberof CMsgSteamDatagramDataCenterState * @instance */ @@ -3452,10 +4378,14 @@ * @function create * @memberof CMsgSteamDatagramDataCenterState * @static - * @param {ICMsgSteamDatagramDataCenterState=} [properties] Properties to set + * @param {CMsgSteamDatagramDataCenterState.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramDataCenterState} CMsgSteamDatagramDataCenterState instance + * @type {{ + * (properties: CMsgSteamDatagramDataCenterState.$Shape): CMsgSteamDatagramDataCenterState & CMsgSteamDatagramDataCenterState.$Shape; + * (properties?: CMsgSteamDatagramDataCenterState.$Properties): CMsgSteamDatagramDataCenterState; + * }} */ - CMsgSteamDatagramDataCenterState.create = function create(properties) { + CMsgSteamDatagramDataCenterState.create = function(properties) { return new CMsgSteamDatagramDataCenterState(properties); }; @@ -3464,16 +4394,23 @@ * @function encode * @memberof CMsgSteamDatagramDataCenterState * @static - * @param {ICMsgSteamDatagramDataCenterState} message CMsgSteamDatagramDataCenterState message or plain object to encode + * @param {CMsgSteamDatagramDataCenterState.$Properties} message CMsgSteamDatagramDataCenterState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramDataCenterState.encode = function encode(message, writer) { + CMsgSteamDatagramDataCenterState.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.data_centers != null && message.data_centers.length) for (var i = 0; i < message.data_centers.length; ++i) - $root.CMsgSteamDatagramDataCenterState.DataCenter.encode(message.data_centers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgSteamDatagramDataCenterState.DataCenter.encode(message.data_centers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3482,12 +4419,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramDataCenterState * @static - * @param {ICMsgSteamDatagramDataCenterState} message CMsgSteamDatagramDataCenterState message or plain object to encode + * @param {CMsgSteamDatagramDataCenterState.$Properties} message CMsgSteamDatagramDataCenterState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramDataCenterState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramDataCenterState.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3497,27 +4434,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramDataCenterState} CMsgSteamDatagramDataCenterState + * @returns {CMsgSteamDatagramDataCenterState & CMsgSteamDatagramDataCenterState.$Shape} CMsgSteamDatagramDataCenterState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramDataCenterState.decode = function decode(reader, length) { + CMsgSteamDatagramDataCenterState.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramDataCenterState(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramDataCenterState(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.data_centers && message.data_centers.length)) - message.data_centers = []; - message.data_centers.push($root.CMsgSteamDatagramDataCenterState.DataCenter.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.data_centers && message.data_centers.length)) + message.data_centers = []; + message.data_centers.push($root.CMsgSteamDatagramDataCenterState.DataCenter.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3527,11 +4481,11 @@ * @memberof CMsgSteamDatagramDataCenterState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramDataCenterState} CMsgSteamDatagramDataCenterState + * @returns {CMsgSteamDatagramDataCenterState & CMsgSteamDatagramDataCenterState.$Shape} CMsgSteamDatagramDataCenterState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramDataCenterState.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramDataCenterState.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3545,14 +4499,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramDataCenterState.verify = function verify(message) { + CMsgSteamDatagramDataCenterState.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.data_centers != null && message.hasOwnProperty("data_centers")) { - if (!Array.isArray(message.data_centers)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.data_centers != null && $Object.hasOwnProperty.call(message, "data_centers")) { + if (!$Array.isArray(message.data_centers)) return "data_centers: array expected"; for (var i = 0; i < message.data_centers.length; ++i) { - var error = $root.CMsgSteamDatagramDataCenterState.DataCenter.verify(message.data_centers[i]); + var error = $root.CMsgSteamDatagramDataCenterState.DataCenter.verify(message.data_centers[i], _depth + 1); if (error) return "data_centers." + error; } @@ -3568,18 +4526,24 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramDataCenterState} CMsgSteamDatagramDataCenterState */ - CMsgSteamDatagramDataCenterState.fromObject = function fromObject(object) { + CMsgSteamDatagramDataCenterState.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramDataCenterState) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramDataCenterState: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramDataCenterState(); if (object.data_centers) { - if (!Array.isArray(object.data_centers)) - throw TypeError(".CMsgSteamDatagramDataCenterState.data_centers: array expected"); - message.data_centers = []; + if (!$Array.isArray(object.data_centers)) + throw $TypeError(".CMsgSteamDatagramDataCenterState.data_centers: array expected"); + message.data_centers = $Array(object.data_centers.length); for (var i = 0; i < object.data_centers.length; ++i) { - if (typeof object.data_centers[i] !== "object") - throw TypeError(".CMsgSteamDatagramDataCenterState.data_centers: object expected"); - message.data_centers[i] = $root.CMsgSteamDatagramDataCenterState.DataCenter.fromObject(object.data_centers[i]); + if (!$util.isObject(object.data_centers[i])) + throw $TypeError(".CMsgSteamDatagramDataCenterState.data_centers: object expected"); + message.data_centers[i] = $root.CMsgSteamDatagramDataCenterState.DataCenter.fromObject(object.data_centers[i], _depth + 1); } } return message; @@ -3594,16 +4558,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramDataCenterState.toObject = function toObject(message, options) { + CMsgSteamDatagramDataCenterState.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.data_centers = []; if (message.data_centers && message.data_centers.length) { - object.data_centers = []; + object.data_centers = $Array(message.data_centers.length); for (var j = 0; j < message.data_centers.length; ++j) - object.data_centers[j] = $root.CMsgSteamDatagramDataCenterState.DataCenter.toObject(message.data_centers[j], options); + object.data_centers[j] = $root.CMsgSteamDatagramDataCenterState.DataCenter.toObject(message.data_centers[j], options, _depth + 1); } return object; }; @@ -3615,34 +4583,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramDataCenterState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramDataCenterState.prototype.toJSON = function() { + return CMsgSteamDatagramDataCenterState.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramDataCenterState + * @function getTypeUrl + * @memberof CMsgSteamDatagramDataCenterState + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramDataCenterState.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramDataCenterState"; }; CMsgSteamDatagramDataCenterState.Server = (function() { /** * Properties of a Server. - * @memberof CMsgSteamDatagramDataCenterState - * @interface IServer + * @typedef {Object} CMsgSteamDatagramDataCenterState.Server.$Properties * @property {string|null} [address] Server address * @property {number|null} [ping_ms] Server ping_ms + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Server. + * @memberof CMsgSteamDatagramDataCenterState + * @interface IServer + * @augments CMsgSteamDatagramDataCenterState.Server.$Properties + * @deprecated Use CMsgSteamDatagramDataCenterState.Server.$Properties instead. + */ + + /** + * Shape of a Server. + * @typedef {CMsgSteamDatagramDataCenterState.Server.$Properties} CMsgSteamDatagramDataCenterState.Server.$Shape */ /** * Constructs a new Server. * @memberof CMsgSteamDatagramDataCenterState * @classdesc Represents a Server. - * @implements IServer * @constructor - * @param {CMsgSteamDatagramDataCenterState.IServer=} [properties] Properties to set + * @param {CMsgSteamDatagramDataCenterState.Server.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Server(properties) { + var Server = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Server address. @@ -3665,10 +4660,14 @@ * @function create * @memberof CMsgSteamDatagramDataCenterState.Server * @static - * @param {CMsgSteamDatagramDataCenterState.IServer=} [properties] Properties to set + * @param {CMsgSteamDatagramDataCenterState.Server.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramDataCenterState.Server} Server instance + * @type {{ + * (properties: CMsgSteamDatagramDataCenterState.Server.$Shape): CMsgSteamDatagramDataCenterState.Server & CMsgSteamDatagramDataCenterState.Server.$Shape; + * (properties?: CMsgSteamDatagramDataCenterState.Server.$Properties): CMsgSteamDatagramDataCenterState.Server; + * }} */ - Server.create = function create(properties) { + Server.create = function(properties) { return new Server(properties); }; @@ -3677,17 +4676,24 @@ * @function encode * @memberof CMsgSteamDatagramDataCenterState.Server * @static - * @param {CMsgSteamDatagramDataCenterState.IServer} message Server message or plain object to encode + * @param {CMsgSteamDatagramDataCenterState.Server.$Properties} message Server message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Server.encode = function encode(message, writer) { + Server.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.address != null && $Object.hasOwnProperty.call(message, "address")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.ping_ms != null && Object.hasOwnProperty.call(message, "ping_ms")) + if (message.ping_ms != null && $Object.hasOwnProperty.call(message, "ping_ms")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ping_ms); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3696,12 +4702,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramDataCenterState.Server * @static - * @param {CMsgSteamDatagramDataCenterState.IServer} message Server message or plain object to encode + * @param {CMsgSteamDatagramDataCenterState.Server.$Properties} message Server message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Server.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Server.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3711,28 +4717,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramDataCenterState.Server} Server + * @returns {CMsgSteamDatagramDataCenterState.Server & CMsgSteamDatagramDataCenterState.Server.$Shape} Server * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Server.decode = function decode(reader, length) { + Server.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramDataCenterState.Server(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramDataCenterState.Server(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.ping_ms = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.address = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.ping_ms = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3742,11 +4768,11 @@ * @memberof CMsgSteamDatagramDataCenterState.Server * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramDataCenterState.Server} Server + * @returns {CMsgSteamDatagramDataCenterState.Server & CMsgSteamDatagramDataCenterState.Server.$Shape} Server * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Server.decodeDelimited = function decodeDelimited(reader) { + Server.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3760,13 +4786,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Server.verify = function verify(message) { + Server.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.address != null && $Object.hasOwnProperty.call(message, "address")) if (!$util.isString(message.address)) return "address: string expected"; - if (message.ping_ms != null && message.hasOwnProperty("ping_ms")) + if (message.ping_ms != null && $Object.hasOwnProperty.call(message, "ping_ms")) if (!$util.isInteger(message.ping_ms)) return "ping_ms: integer expected"; return null; @@ -3780,12 +4810,18 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramDataCenterState.Server} Server */ - Server.fromObject = function fromObject(object) { + Server.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramDataCenterState.Server) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramDataCenterState.Server: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramDataCenterState.Server(); if (object.address != null) - message.address = String(object.address); + message.address = $String(object.address); if (object.ping_ms != null) message.ping_ms = object.ping_ms >>> 0; return message; @@ -3800,17 +4836,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Server.toObject = function toObject(message, options) { + Server.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.address = ""; object.ping_ms = 0; } - if (message.address != null && message.hasOwnProperty("address")) + if (message.address != null && $Object.hasOwnProperty.call(message, "address")) object.address = message.address; - if (message.ping_ms != null && message.hasOwnProperty("ping_ms")) + if (message.ping_ms != null && $Object.hasOwnProperty.call(message, "ping_ms")) object.ping_ms = message.ping_ms; return object; }; @@ -3822,8 +4862,22 @@ * @instance * @returns {Object.} JSON object */ - Server.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Server.prototype.toJSON = function() { + return Server.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Server + * @function getTypeUrl + * @memberof CMsgSteamDatagramDataCenterState.Server + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Server.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramDataCenterState.Server"; }; return Server; @@ -3831,31 +4885,44 @@ CMsgSteamDatagramDataCenterState.DataCenter = (function() { + /** + * Properties of a DataCenter. + * @typedef {Object} CMsgSteamDatagramDataCenterState.DataCenter.$Properties + * @property {string|null} [code] DataCenter code + * @property {Array.|null} [server_sample] DataCenter server_sample + * @property {Array.|null} [relay_sample] DataCenter relay_sample + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a DataCenter. * @memberof CMsgSteamDatagramDataCenterState * @interface IDataCenter - * @property {string|null} [code] DataCenter code - * @property {Array.|null} [server_sample] DataCenter server_sample - * @property {Array.|null} [relay_sample] DataCenter relay_sample + * @augments CMsgSteamDatagramDataCenterState.DataCenter.$Properties + * @deprecated Use CMsgSteamDatagramDataCenterState.DataCenter.$Properties instead. + */ + + /** + * Shape of a DataCenter. + * @typedef {CMsgSteamDatagramDataCenterState.DataCenter.$Properties} CMsgSteamDatagramDataCenterState.DataCenter.$Shape */ /** * Constructs a new DataCenter. * @memberof CMsgSteamDatagramDataCenterState * @classdesc Represents a DataCenter. - * @implements IDataCenter * @constructor - * @param {CMsgSteamDatagramDataCenterState.IDataCenter=} [properties] Properties to set + * @param {CMsgSteamDatagramDataCenterState.DataCenter.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function DataCenter(properties) { + var DataCenter = function (properties) { this.server_sample = []; this.relay_sample = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * DataCenter code. @@ -3867,7 +4934,7 @@ /** * DataCenter server_sample. - * @member {Array.} server_sample + * @member {Array.} server_sample * @memberof CMsgSteamDatagramDataCenterState.DataCenter * @instance */ @@ -3875,7 +4942,7 @@ /** * DataCenter relay_sample. - * @member {Array.} relay_sample + * @member {Array.} relay_sample * @memberof CMsgSteamDatagramDataCenterState.DataCenter * @instance */ @@ -3886,10 +4953,14 @@ * @function create * @memberof CMsgSteamDatagramDataCenterState.DataCenter * @static - * @param {CMsgSteamDatagramDataCenterState.IDataCenter=} [properties] Properties to set + * @param {CMsgSteamDatagramDataCenterState.DataCenter.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramDataCenterState.DataCenter} DataCenter instance + * @type {{ + * (properties: CMsgSteamDatagramDataCenterState.DataCenter.$Shape): CMsgSteamDatagramDataCenterState.DataCenter & CMsgSteamDatagramDataCenterState.DataCenter.$Shape; + * (properties?: CMsgSteamDatagramDataCenterState.DataCenter.$Properties): CMsgSteamDatagramDataCenterState.DataCenter; + * }} */ - DataCenter.create = function create(properties) { + DataCenter.create = function(properties) { return new DataCenter(properties); }; @@ -3898,21 +4969,28 @@ * @function encode * @memberof CMsgSteamDatagramDataCenterState.DataCenter * @static - * @param {CMsgSteamDatagramDataCenterState.IDataCenter} message DataCenter message or plain object to encode + * @param {CMsgSteamDatagramDataCenterState.DataCenter.$Properties} message DataCenter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataCenter.encode = function encode(message, writer) { + DataCenter.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.code != null && $Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.code); if (message.server_sample != null && message.server_sample.length) for (var i = 0; i < message.server_sample.length; ++i) - $root.CMsgSteamDatagramDataCenterState.Server.encode(message.server_sample[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgSteamDatagramDataCenterState.Server.encode(message.server_sample[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); if (message.relay_sample != null && message.relay_sample.length) for (var i = 0; i < message.relay_sample.length; ++i) - $root.CMsgSteamDatagramDataCenterState.Server.encode(message.relay_sample[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.CMsgSteamDatagramDataCenterState.Server.encode(message.relay_sample[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3921,12 +4999,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramDataCenterState.DataCenter * @static - * @param {CMsgSteamDatagramDataCenterState.IDataCenter} message DataCenter message or plain object to encode + * @param {CMsgSteamDatagramDataCenterState.DataCenter.$Properties} message DataCenter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataCenter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DataCenter.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3936,35 +5014,58 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramDataCenterState.DataCenter} DataCenter + * @returns {CMsgSteamDatagramDataCenterState.DataCenter & CMsgSteamDatagramDataCenterState.DataCenter.$Shape} DataCenter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataCenter.decode = function decode(reader, length) { + DataCenter.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramDataCenterState.DataCenter(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramDataCenterState.DataCenter(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.string(); - break; - case 2: - if (!(message.server_sample && message.server_sample.length)) - message.server_sample = []; - message.server_sample.push($root.CMsgSteamDatagramDataCenterState.Server.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.relay_sample && message.relay_sample.length)) - message.relay_sample = []; - message.relay_sample.push($root.CMsgSteamDatagramDataCenterState.Server.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.code = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.server_sample && message.server_sample.length)) + message.server_sample = []; + message.server_sample.push($root.CMsgSteamDatagramDataCenterState.Server.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.relay_sample && message.relay_sample.length)) + message.relay_sample = []; + message.relay_sample.push($root.CMsgSteamDatagramDataCenterState.Server.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3974,11 +5075,11 @@ * @memberof CMsgSteamDatagramDataCenterState.DataCenter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramDataCenterState.DataCenter} DataCenter + * @returns {CMsgSteamDatagramDataCenterState.DataCenter & CMsgSteamDatagramDataCenterState.DataCenter.$Shape} DataCenter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataCenter.decodeDelimited = function decodeDelimited(reader) { + DataCenter.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3992,26 +5093,30 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataCenter.verify = function verify(message) { + DataCenter.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.code != null && $Object.hasOwnProperty.call(message, "code")) if (!$util.isString(message.code)) return "code: string expected"; - if (message.server_sample != null && message.hasOwnProperty("server_sample")) { - if (!Array.isArray(message.server_sample)) + if (message.server_sample != null && $Object.hasOwnProperty.call(message, "server_sample")) { + if (!$Array.isArray(message.server_sample)) return "server_sample: array expected"; for (var i = 0; i < message.server_sample.length; ++i) { - var error = $root.CMsgSteamDatagramDataCenterState.Server.verify(message.server_sample[i]); + var error = $root.CMsgSteamDatagramDataCenterState.Server.verify(message.server_sample[i], _depth + 1); if (error) return "server_sample." + error; } } - if (message.relay_sample != null && message.hasOwnProperty("relay_sample")) { - if (!Array.isArray(message.relay_sample)) + if (message.relay_sample != null && $Object.hasOwnProperty.call(message, "relay_sample")) { + if (!$Array.isArray(message.relay_sample)) return "relay_sample: array expected"; for (var i = 0; i < message.relay_sample.length; ++i) { - var error = $root.CMsgSteamDatagramDataCenterState.Server.verify(message.relay_sample[i]); + var error = $root.CMsgSteamDatagramDataCenterState.Server.verify(message.relay_sample[i], _depth + 1); if (error) return "relay_sample." + error; } @@ -4027,30 +5132,36 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramDataCenterState.DataCenter} DataCenter */ - DataCenter.fromObject = function fromObject(object) { + DataCenter.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramDataCenterState.DataCenter) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramDataCenterState.DataCenter: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramDataCenterState.DataCenter(); if (object.code != null) - message.code = String(object.code); + message.code = $String(object.code); if (object.server_sample) { - if (!Array.isArray(object.server_sample)) - throw TypeError(".CMsgSteamDatagramDataCenterState.DataCenter.server_sample: array expected"); - message.server_sample = []; + if (!$Array.isArray(object.server_sample)) + throw $TypeError(".CMsgSteamDatagramDataCenterState.DataCenter.server_sample: array expected"); + message.server_sample = $Array(object.server_sample.length); for (var i = 0; i < object.server_sample.length; ++i) { - if (typeof object.server_sample[i] !== "object") - throw TypeError(".CMsgSteamDatagramDataCenterState.DataCenter.server_sample: object expected"); - message.server_sample[i] = $root.CMsgSteamDatagramDataCenterState.Server.fromObject(object.server_sample[i]); + if (!$util.isObject(object.server_sample[i])) + throw $TypeError(".CMsgSteamDatagramDataCenterState.DataCenter.server_sample: object expected"); + message.server_sample[i] = $root.CMsgSteamDatagramDataCenterState.Server.fromObject(object.server_sample[i], _depth + 1); } } if (object.relay_sample) { - if (!Array.isArray(object.relay_sample)) - throw TypeError(".CMsgSteamDatagramDataCenterState.DataCenter.relay_sample: array expected"); - message.relay_sample = []; + if (!$Array.isArray(object.relay_sample)) + throw $TypeError(".CMsgSteamDatagramDataCenterState.DataCenter.relay_sample: array expected"); + message.relay_sample = $Array(object.relay_sample.length); for (var i = 0; i < object.relay_sample.length; ++i) { - if (typeof object.relay_sample[i] !== "object") - throw TypeError(".CMsgSteamDatagramDataCenterState.DataCenter.relay_sample: object expected"); - message.relay_sample[i] = $root.CMsgSteamDatagramDataCenterState.Server.fromObject(object.relay_sample[i]); + if (!$util.isObject(object.relay_sample[i])) + throw $TypeError(".CMsgSteamDatagramDataCenterState.DataCenter.relay_sample: object expected"); + message.relay_sample[i] = $root.CMsgSteamDatagramDataCenterState.Server.fromObject(object.relay_sample[i], _depth + 1); } } return message; @@ -4065,9 +5176,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataCenter.toObject = function toObject(message, options) { + DataCenter.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.server_sample = []; @@ -4075,17 +5190,17 @@ } if (options.defaults) object.code = ""; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && $Object.hasOwnProperty.call(message, "code")) object.code = message.code; if (message.server_sample && message.server_sample.length) { - object.server_sample = []; + object.server_sample = $Array(message.server_sample.length); for (var j = 0; j < message.server_sample.length; ++j) - object.server_sample[j] = $root.CMsgSteamDatagramDataCenterState.Server.toObject(message.server_sample[j], options); + object.server_sample[j] = $root.CMsgSteamDatagramDataCenterState.Server.toObject(message.server_sample[j], options, _depth + 1); } if (message.relay_sample && message.relay_sample.length) { - object.relay_sample = []; + object.relay_sample = $Array(message.relay_sample.length); for (var j = 0; j < message.relay_sample.length; ++j) - object.relay_sample[j] = $root.CMsgSteamDatagramDataCenterState.Server.toObject(message.relay_sample[j], options); + object.relay_sample[j] = $root.CMsgSteamDatagramDataCenterState.Server.toObject(message.relay_sample[j], options, _depth + 1); } return object; }; @@ -4097,8 +5212,22 @@ * @instance * @returns {Object.} JSON object */ - DataCenter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + DataCenter.prototype.toJSON = function() { + return DataCenter.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for DataCenter + * @function getTypeUrl + * @memberof CMsgSteamDatagramDataCenterState.DataCenter + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + DataCenter.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramDataCenterState.DataCenter"; }; return DataCenter; @@ -4111,8 +5240,7 @@ /** * Properties of a CMsgSteamDatagramLinkInstantaneousStats. - * @exports ICMsgSteamDatagramLinkInstantaneousStats - * @interface ICMsgSteamDatagramLinkInstantaneousStats + * @typedef {Object} CMsgSteamDatagramLinkInstantaneousStats.$Properties * @property {number|null} [out_packets_per_sec_x10] CMsgSteamDatagramLinkInstantaneousStats out_packets_per_sec_x10 * @property {number|null} [out_bytes_per_sec] CMsgSteamDatagramLinkInstantaneousStats out_bytes_per_sec * @property {number|null} [in_packets_per_sec_x10] CMsgSteamDatagramLinkInstantaneousStats in_packets_per_sec_x10 @@ -4121,22 +5249,36 @@ * @property {number|null} [packets_dropped_pct] CMsgSteamDatagramLinkInstantaneousStats packets_dropped_pct * @property {number|null} [packets_weird_sequence_pct] CMsgSteamDatagramLinkInstantaneousStats packets_weird_sequence_pct * @property {number|null} [peak_jitter_usec] CMsgSteamDatagramLinkInstantaneousStats peak_jitter_usec + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramLinkInstantaneousStats. + * @exports ICMsgSteamDatagramLinkInstantaneousStats + * @interface ICMsgSteamDatagramLinkInstantaneousStats + * @augments CMsgSteamDatagramLinkInstantaneousStats.$Properties + * @deprecated Use CMsgSteamDatagramLinkInstantaneousStats.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramLinkInstantaneousStats. + * @typedef {CMsgSteamDatagramLinkInstantaneousStats.$Properties} CMsgSteamDatagramLinkInstantaneousStats.$Shape */ /** * Constructs a new CMsgSteamDatagramLinkInstantaneousStats. * @exports CMsgSteamDatagramLinkInstantaneousStats * @classdesc Represents a CMsgSteamDatagramLinkInstantaneousStats. - * @implements ICMsgSteamDatagramLinkInstantaneousStats * @constructor - * @param {ICMsgSteamDatagramLinkInstantaneousStats=} [properties] Properties to set + * @param {CMsgSteamDatagramLinkInstantaneousStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramLinkInstantaneousStats(properties) { + var CMsgSteamDatagramLinkInstantaneousStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramLinkInstantaneousStats out_packets_per_sec_x10. @@ -4207,10 +5349,14 @@ * @function create * @memberof CMsgSteamDatagramLinkInstantaneousStats * @static - * @param {ICMsgSteamDatagramLinkInstantaneousStats=} [properties] Properties to set + * @param {CMsgSteamDatagramLinkInstantaneousStats.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramLinkInstantaneousStats} CMsgSteamDatagramLinkInstantaneousStats instance + * @type {{ + * (properties: CMsgSteamDatagramLinkInstantaneousStats.$Shape): CMsgSteamDatagramLinkInstantaneousStats & CMsgSteamDatagramLinkInstantaneousStats.$Shape; + * (properties?: CMsgSteamDatagramLinkInstantaneousStats.$Properties): CMsgSteamDatagramLinkInstantaneousStats; + * }} */ - CMsgSteamDatagramLinkInstantaneousStats.create = function create(properties) { + CMsgSteamDatagramLinkInstantaneousStats.create = function(properties) { return new CMsgSteamDatagramLinkInstantaneousStats(properties); }; @@ -4219,29 +5365,36 @@ * @function encode * @memberof CMsgSteamDatagramLinkInstantaneousStats * @static - * @param {ICMsgSteamDatagramLinkInstantaneousStats} message CMsgSteamDatagramLinkInstantaneousStats message or plain object to encode + * @param {CMsgSteamDatagramLinkInstantaneousStats.$Properties} message CMsgSteamDatagramLinkInstantaneousStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramLinkInstantaneousStats.encode = function encode(message, writer) { + CMsgSteamDatagramLinkInstantaneousStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.out_packets_per_sec_x10 != null && Object.hasOwnProperty.call(message, "out_packets_per_sec_x10")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.out_packets_per_sec_x10 != null && $Object.hasOwnProperty.call(message, "out_packets_per_sec_x10")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.out_packets_per_sec_x10); - if (message.out_bytes_per_sec != null && Object.hasOwnProperty.call(message, "out_bytes_per_sec")) + if (message.out_bytes_per_sec != null && $Object.hasOwnProperty.call(message, "out_bytes_per_sec")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.out_bytes_per_sec); - if (message.in_packets_per_sec_x10 != null && Object.hasOwnProperty.call(message, "in_packets_per_sec_x10")) + if (message.in_packets_per_sec_x10 != null && $Object.hasOwnProperty.call(message, "in_packets_per_sec_x10")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.in_packets_per_sec_x10); - if (message.in_bytes_per_sec != null && Object.hasOwnProperty.call(message, "in_bytes_per_sec")) + if (message.in_bytes_per_sec != null && $Object.hasOwnProperty.call(message, "in_bytes_per_sec")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.in_bytes_per_sec); - if (message.ping_ms != null && Object.hasOwnProperty.call(message, "ping_ms")) + if (message.ping_ms != null && $Object.hasOwnProperty.call(message, "ping_ms")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.ping_ms); - if (message.packets_dropped_pct != null && Object.hasOwnProperty.call(message, "packets_dropped_pct")) + if (message.packets_dropped_pct != null && $Object.hasOwnProperty.call(message, "packets_dropped_pct")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.packets_dropped_pct); - if (message.packets_weird_sequence_pct != null && Object.hasOwnProperty.call(message, "packets_weird_sequence_pct")) + if (message.packets_weird_sequence_pct != null && $Object.hasOwnProperty.call(message, "packets_weird_sequence_pct")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.packets_weird_sequence_pct); - if (message.peak_jitter_usec != null && Object.hasOwnProperty.call(message, "peak_jitter_usec")) + if (message.peak_jitter_usec != null && $Object.hasOwnProperty.call(message, "peak_jitter_usec")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.peak_jitter_usec); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4250,12 +5403,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramLinkInstantaneousStats * @static - * @param {ICMsgSteamDatagramLinkInstantaneousStats} message CMsgSteamDatagramLinkInstantaneousStats message or plain object to encode + * @param {CMsgSteamDatagramLinkInstantaneousStats.$Properties} message CMsgSteamDatagramLinkInstantaneousStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramLinkInstantaneousStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramLinkInstantaneousStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4265,46 +5418,84 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramLinkInstantaneousStats} CMsgSteamDatagramLinkInstantaneousStats + * @returns {CMsgSteamDatagramLinkInstantaneousStats & CMsgSteamDatagramLinkInstantaneousStats.$Shape} CMsgSteamDatagramLinkInstantaneousStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramLinkInstantaneousStats.decode = function decode(reader, length) { + CMsgSteamDatagramLinkInstantaneousStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramLinkInstantaneousStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramLinkInstantaneousStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.out_packets_per_sec_x10 = reader.uint32(); - break; - case 2: - message.out_bytes_per_sec = reader.uint32(); - break; - case 3: - message.in_packets_per_sec_x10 = reader.uint32(); - break; - case 4: - message.in_bytes_per_sec = reader.uint32(); - break; - case 5: - message.ping_ms = reader.uint32(); - break; - case 6: - message.packets_dropped_pct = reader.uint32(); - break; - case 7: - message.packets_weird_sequence_pct = reader.uint32(); - break; - case 8: - message.peak_jitter_usec = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.out_packets_per_sec_x10 = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.out_bytes_per_sec = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.in_packets_per_sec_x10 = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.in_bytes_per_sec = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.ping_ms = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.packets_dropped_pct = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.packets_weird_sequence_pct = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.peak_jitter_usec = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4314,11 +5505,11 @@ * @memberof CMsgSteamDatagramLinkInstantaneousStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramLinkInstantaneousStats} CMsgSteamDatagramLinkInstantaneousStats + * @returns {CMsgSteamDatagramLinkInstantaneousStats & CMsgSteamDatagramLinkInstantaneousStats.$Shape} CMsgSteamDatagramLinkInstantaneousStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramLinkInstantaneousStats.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramLinkInstantaneousStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4332,31 +5523,35 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramLinkInstantaneousStats.verify = function verify(message) { + CMsgSteamDatagramLinkInstantaneousStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.out_packets_per_sec_x10 != null && message.hasOwnProperty("out_packets_per_sec_x10")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.out_packets_per_sec_x10 != null && $Object.hasOwnProperty.call(message, "out_packets_per_sec_x10")) if (!$util.isInteger(message.out_packets_per_sec_x10)) return "out_packets_per_sec_x10: integer expected"; - if (message.out_bytes_per_sec != null && message.hasOwnProperty("out_bytes_per_sec")) + if (message.out_bytes_per_sec != null && $Object.hasOwnProperty.call(message, "out_bytes_per_sec")) if (!$util.isInteger(message.out_bytes_per_sec)) return "out_bytes_per_sec: integer expected"; - if (message.in_packets_per_sec_x10 != null && message.hasOwnProperty("in_packets_per_sec_x10")) + if (message.in_packets_per_sec_x10 != null && $Object.hasOwnProperty.call(message, "in_packets_per_sec_x10")) if (!$util.isInteger(message.in_packets_per_sec_x10)) return "in_packets_per_sec_x10: integer expected"; - if (message.in_bytes_per_sec != null && message.hasOwnProperty("in_bytes_per_sec")) + if (message.in_bytes_per_sec != null && $Object.hasOwnProperty.call(message, "in_bytes_per_sec")) if (!$util.isInteger(message.in_bytes_per_sec)) return "in_bytes_per_sec: integer expected"; - if (message.ping_ms != null && message.hasOwnProperty("ping_ms")) + if (message.ping_ms != null && $Object.hasOwnProperty.call(message, "ping_ms")) if (!$util.isInteger(message.ping_ms)) return "ping_ms: integer expected"; - if (message.packets_dropped_pct != null && message.hasOwnProperty("packets_dropped_pct")) + if (message.packets_dropped_pct != null && $Object.hasOwnProperty.call(message, "packets_dropped_pct")) if (!$util.isInteger(message.packets_dropped_pct)) return "packets_dropped_pct: integer expected"; - if (message.packets_weird_sequence_pct != null && message.hasOwnProperty("packets_weird_sequence_pct")) + if (message.packets_weird_sequence_pct != null && $Object.hasOwnProperty.call(message, "packets_weird_sequence_pct")) if (!$util.isInteger(message.packets_weird_sequence_pct)) return "packets_weird_sequence_pct: integer expected"; - if (message.peak_jitter_usec != null && message.hasOwnProperty("peak_jitter_usec")) + if (message.peak_jitter_usec != null && $Object.hasOwnProperty.call(message, "peak_jitter_usec")) if (!$util.isInteger(message.peak_jitter_usec)) return "peak_jitter_usec: integer expected"; return null; @@ -4370,9 +5565,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramLinkInstantaneousStats} CMsgSteamDatagramLinkInstantaneousStats */ - CMsgSteamDatagramLinkInstantaneousStats.fromObject = function fromObject(object) { + CMsgSteamDatagramLinkInstantaneousStats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramLinkInstantaneousStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramLinkInstantaneousStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramLinkInstantaneousStats(); if (object.out_packets_per_sec_x10 != null) message.out_packets_per_sec_x10 = object.out_packets_per_sec_x10 >>> 0; @@ -4402,9 +5603,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramLinkInstantaneousStats.toObject = function toObject(message, options) { + CMsgSteamDatagramLinkInstantaneousStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.out_packets_per_sec_x10 = 0; @@ -4416,21 +5621,21 @@ object.packets_weird_sequence_pct = 0; object.peak_jitter_usec = 0; } - if (message.out_packets_per_sec_x10 != null && message.hasOwnProperty("out_packets_per_sec_x10")) + if (message.out_packets_per_sec_x10 != null && $Object.hasOwnProperty.call(message, "out_packets_per_sec_x10")) object.out_packets_per_sec_x10 = message.out_packets_per_sec_x10; - if (message.out_bytes_per_sec != null && message.hasOwnProperty("out_bytes_per_sec")) + if (message.out_bytes_per_sec != null && $Object.hasOwnProperty.call(message, "out_bytes_per_sec")) object.out_bytes_per_sec = message.out_bytes_per_sec; - if (message.in_packets_per_sec_x10 != null && message.hasOwnProperty("in_packets_per_sec_x10")) + if (message.in_packets_per_sec_x10 != null && $Object.hasOwnProperty.call(message, "in_packets_per_sec_x10")) object.in_packets_per_sec_x10 = message.in_packets_per_sec_x10; - if (message.in_bytes_per_sec != null && message.hasOwnProperty("in_bytes_per_sec")) + if (message.in_bytes_per_sec != null && $Object.hasOwnProperty.call(message, "in_bytes_per_sec")) object.in_bytes_per_sec = message.in_bytes_per_sec; - if (message.ping_ms != null && message.hasOwnProperty("ping_ms")) + if (message.ping_ms != null && $Object.hasOwnProperty.call(message, "ping_ms")) object.ping_ms = message.ping_ms; - if (message.packets_dropped_pct != null && message.hasOwnProperty("packets_dropped_pct")) + if (message.packets_dropped_pct != null && $Object.hasOwnProperty.call(message, "packets_dropped_pct")) object.packets_dropped_pct = message.packets_dropped_pct; - if (message.packets_weird_sequence_pct != null && message.hasOwnProperty("packets_weird_sequence_pct")) + if (message.packets_weird_sequence_pct != null && $Object.hasOwnProperty.call(message, "packets_weird_sequence_pct")) object.packets_weird_sequence_pct = message.packets_weird_sequence_pct; - if (message.peak_jitter_usec != null && message.hasOwnProperty("peak_jitter_usec")) + if (message.peak_jitter_usec != null && $Object.hasOwnProperty.call(message, "peak_jitter_usec")) object.peak_jitter_usec = message.peak_jitter_usec; return object; }; @@ -4442,8 +5647,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramLinkInstantaneousStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramLinkInstantaneousStats.prototype.toJSON = function() { + return CMsgSteamDatagramLinkInstantaneousStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramLinkInstantaneousStats + * @function getTypeUrl + * @memberof CMsgSteamDatagramLinkInstantaneousStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramLinkInstantaneousStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramLinkInstantaneousStats"; }; return CMsgSteamDatagramLinkInstantaneousStats; @@ -4453,8 +5672,7 @@ /** * Properties of a CMsgSteamDatagramLinkLifetimeStats. - * @exports ICMsgSteamDatagramLinkLifetimeStats - * @interface ICMsgSteamDatagramLinkLifetimeStats + * @typedef {Object} CMsgSteamDatagramLinkLifetimeStats.$Properties * @property {number|Long|null} [packets_sent] CMsgSteamDatagramLinkLifetimeStats packets_sent * @property {number|Long|null} [kb_sent] CMsgSteamDatagramLinkLifetimeStats kb_sent * @property {number|Long|null} [packets_recv] CMsgSteamDatagramLinkLifetimeStats packets_recv @@ -4525,22 +5743,36 @@ * @property {number|null} [rxspeed_ntile_75th] CMsgSteamDatagramLinkLifetimeStats rxspeed_ntile_75th * @property {number|null} [rxspeed_ntile_95th] CMsgSteamDatagramLinkLifetimeStats rxspeed_ntile_95th * @property {number|null} [rxspeed_ntile_98th] CMsgSteamDatagramLinkLifetimeStats rxspeed_ntile_98th + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramLinkLifetimeStats. + * @exports ICMsgSteamDatagramLinkLifetimeStats + * @interface ICMsgSteamDatagramLinkLifetimeStats + * @augments CMsgSteamDatagramLinkLifetimeStats.$Properties + * @deprecated Use CMsgSteamDatagramLinkLifetimeStats.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramLinkLifetimeStats. + * @typedef {CMsgSteamDatagramLinkLifetimeStats.$Properties} CMsgSteamDatagramLinkLifetimeStats.$Shape */ /** * Constructs a new CMsgSteamDatagramLinkLifetimeStats. * @exports CMsgSteamDatagramLinkLifetimeStats * @classdesc Represents a CMsgSteamDatagramLinkLifetimeStats. - * @implements ICMsgSteamDatagramLinkLifetimeStats * @constructor - * @param {ICMsgSteamDatagramLinkLifetimeStats=} [properties] Properties to set + * @param {CMsgSteamDatagramLinkLifetimeStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramLinkLifetimeStats(properties) { + var CMsgSteamDatagramLinkLifetimeStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramLinkLifetimeStats packets_sent. @@ -5107,10 +6339,14 @@ * @function create * @memberof CMsgSteamDatagramLinkLifetimeStats * @static - * @param {ICMsgSteamDatagramLinkLifetimeStats=} [properties] Properties to set + * @param {CMsgSteamDatagramLinkLifetimeStats.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramLinkLifetimeStats} CMsgSteamDatagramLinkLifetimeStats instance + * @type {{ + * (properties: CMsgSteamDatagramLinkLifetimeStats.$Shape): CMsgSteamDatagramLinkLifetimeStats & CMsgSteamDatagramLinkLifetimeStats.$Shape; + * (properties?: CMsgSteamDatagramLinkLifetimeStats.$Properties): CMsgSteamDatagramLinkLifetimeStats; + * }} */ - CMsgSteamDatagramLinkLifetimeStats.create = function create(properties) { + CMsgSteamDatagramLinkLifetimeStats.create = function(properties) { return new CMsgSteamDatagramLinkLifetimeStats(properties); }; @@ -5119,153 +6355,160 @@ * @function encode * @memberof CMsgSteamDatagramLinkLifetimeStats * @static - * @param {ICMsgSteamDatagramLinkLifetimeStats} message CMsgSteamDatagramLinkLifetimeStats message or plain object to encode + * @param {CMsgSteamDatagramLinkLifetimeStats.$Properties} message CMsgSteamDatagramLinkLifetimeStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramLinkLifetimeStats.encode = function encode(message, writer) { + CMsgSteamDatagramLinkLifetimeStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.packets_sent != null && Object.hasOwnProperty.call(message, "packets_sent")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.packets_sent != null && $Object.hasOwnProperty.call(message, "packets_sent")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.packets_sent); - if (message.kb_sent != null && Object.hasOwnProperty.call(message, "kb_sent")) + if (message.kb_sent != null && $Object.hasOwnProperty.call(message, "kb_sent")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.kb_sent); - if (message.packets_recv != null && Object.hasOwnProperty.call(message, "packets_recv")) + if (message.packets_recv != null && $Object.hasOwnProperty.call(message, "packets_recv")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.packets_recv); - if (message.kb_recv != null && Object.hasOwnProperty.call(message, "kb_recv")) + if (message.kb_recv != null && $Object.hasOwnProperty.call(message, "kb_recv")) writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.kb_recv); - if (message.packets_recv_sequenced != null && Object.hasOwnProperty.call(message, "packets_recv_sequenced")) + if (message.packets_recv_sequenced != null && $Object.hasOwnProperty.call(message, "packets_recv_sequenced")) writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.packets_recv_sequenced); - if (message.packets_recv_dropped != null && Object.hasOwnProperty.call(message, "packets_recv_dropped")) + if (message.packets_recv_dropped != null && $Object.hasOwnProperty.call(message, "packets_recv_dropped")) writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.packets_recv_dropped); - if (message.packets_recv_out_of_order != null && Object.hasOwnProperty.call(message, "packets_recv_out_of_order")) + if (message.packets_recv_out_of_order != null && $Object.hasOwnProperty.call(message, "packets_recv_out_of_order")) writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.packets_recv_out_of_order); - if (message.packets_recv_duplicate != null && Object.hasOwnProperty.call(message, "packets_recv_duplicate")) + if (message.packets_recv_duplicate != null && $Object.hasOwnProperty.call(message, "packets_recv_duplicate")) writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.packets_recv_duplicate); - if (message.packets_recv_lurch != null && Object.hasOwnProperty.call(message, "packets_recv_lurch")) + if (message.packets_recv_lurch != null && $Object.hasOwnProperty.call(message, "packets_recv_lurch")) writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.packets_recv_lurch); - if (message.quality_histogram_100 != null && Object.hasOwnProperty.call(message, "quality_histogram_100")) + if (message.quality_histogram_100 != null && $Object.hasOwnProperty.call(message, "quality_histogram_100")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.quality_histogram_100); - if (message.quality_histogram_99 != null && Object.hasOwnProperty.call(message, "quality_histogram_99")) + if (message.quality_histogram_99 != null && $Object.hasOwnProperty.call(message, "quality_histogram_99")) writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.quality_histogram_99); - if (message.quality_histogram_97 != null && Object.hasOwnProperty.call(message, "quality_histogram_97")) + if (message.quality_histogram_97 != null && $Object.hasOwnProperty.call(message, "quality_histogram_97")) writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.quality_histogram_97); - if (message.quality_histogram_95 != null && Object.hasOwnProperty.call(message, "quality_histogram_95")) + if (message.quality_histogram_95 != null && $Object.hasOwnProperty.call(message, "quality_histogram_95")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.quality_histogram_95); - if (message.quality_histogram_90 != null && Object.hasOwnProperty.call(message, "quality_histogram_90")) + if (message.quality_histogram_90 != null && $Object.hasOwnProperty.call(message, "quality_histogram_90")) writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.quality_histogram_90); - if (message.quality_histogram_75 != null && Object.hasOwnProperty.call(message, "quality_histogram_75")) + if (message.quality_histogram_75 != null && $Object.hasOwnProperty.call(message, "quality_histogram_75")) writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.quality_histogram_75); - if (message.quality_histogram_50 != null && Object.hasOwnProperty.call(message, "quality_histogram_50")) + if (message.quality_histogram_50 != null && $Object.hasOwnProperty.call(message, "quality_histogram_50")) writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.quality_histogram_50); - if (message.quality_histogram_1 != null && Object.hasOwnProperty.call(message, "quality_histogram_1")) + if (message.quality_histogram_1 != null && $Object.hasOwnProperty.call(message, "quality_histogram_1")) writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.quality_histogram_1); - if (message.quality_histogram_dead != null && Object.hasOwnProperty.call(message, "quality_histogram_dead")) + if (message.quality_histogram_dead != null && $Object.hasOwnProperty.call(message, "quality_histogram_dead")) writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.quality_histogram_dead); - if (message.quality_ntile_2nd != null && Object.hasOwnProperty.call(message, "quality_ntile_2nd")) + if (message.quality_ntile_2nd != null && $Object.hasOwnProperty.call(message, "quality_ntile_2nd")) writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.quality_ntile_2nd); - if (message.quality_ntile_5th != null && Object.hasOwnProperty.call(message, "quality_ntile_5th")) + if (message.quality_ntile_5th != null && $Object.hasOwnProperty.call(message, "quality_ntile_5th")) writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.quality_ntile_5th); - if (message.quality_ntile_25th != null && Object.hasOwnProperty.call(message, "quality_ntile_25th")) + if (message.quality_ntile_25th != null && $Object.hasOwnProperty.call(message, "quality_ntile_25th")) writer.uint32(/* id 32, wireType 0 =*/256).uint32(message.quality_ntile_25th); - if (message.quality_ntile_50th != null && Object.hasOwnProperty.call(message, "quality_ntile_50th")) + if (message.quality_ntile_50th != null && $Object.hasOwnProperty.call(message, "quality_ntile_50th")) writer.uint32(/* id 33, wireType 0 =*/264).uint32(message.quality_ntile_50th); - if (message.ping_histogram_25 != null && Object.hasOwnProperty.call(message, "ping_histogram_25")) + if (message.ping_histogram_25 != null && $Object.hasOwnProperty.call(message, "ping_histogram_25")) writer.uint32(/* id 41, wireType 0 =*/328).uint32(message.ping_histogram_25); - if (message.ping_histogram_50 != null && Object.hasOwnProperty.call(message, "ping_histogram_50")) + if (message.ping_histogram_50 != null && $Object.hasOwnProperty.call(message, "ping_histogram_50")) writer.uint32(/* id 42, wireType 0 =*/336).uint32(message.ping_histogram_50); - if (message.ping_histogram_75 != null && Object.hasOwnProperty.call(message, "ping_histogram_75")) + if (message.ping_histogram_75 != null && $Object.hasOwnProperty.call(message, "ping_histogram_75")) writer.uint32(/* id 43, wireType 0 =*/344).uint32(message.ping_histogram_75); - if (message.ping_histogram_100 != null && Object.hasOwnProperty.call(message, "ping_histogram_100")) + if (message.ping_histogram_100 != null && $Object.hasOwnProperty.call(message, "ping_histogram_100")) writer.uint32(/* id 44, wireType 0 =*/352).uint32(message.ping_histogram_100); - if (message.ping_histogram_125 != null && Object.hasOwnProperty.call(message, "ping_histogram_125")) + if (message.ping_histogram_125 != null && $Object.hasOwnProperty.call(message, "ping_histogram_125")) writer.uint32(/* id 45, wireType 0 =*/360).uint32(message.ping_histogram_125); - if (message.ping_histogram_150 != null && Object.hasOwnProperty.call(message, "ping_histogram_150")) + if (message.ping_histogram_150 != null && $Object.hasOwnProperty.call(message, "ping_histogram_150")) writer.uint32(/* id 46, wireType 0 =*/368).uint32(message.ping_histogram_150); - if (message.ping_histogram_200 != null && Object.hasOwnProperty.call(message, "ping_histogram_200")) + if (message.ping_histogram_200 != null && $Object.hasOwnProperty.call(message, "ping_histogram_200")) writer.uint32(/* id 47, wireType 0 =*/376).uint32(message.ping_histogram_200); - if (message.ping_histogram_300 != null && Object.hasOwnProperty.call(message, "ping_histogram_300")) + if (message.ping_histogram_300 != null && $Object.hasOwnProperty.call(message, "ping_histogram_300")) writer.uint32(/* id 48, wireType 0 =*/384).uint32(message.ping_histogram_300); - if (message.ping_histogram_max != null && Object.hasOwnProperty.call(message, "ping_histogram_max")) + if (message.ping_histogram_max != null && $Object.hasOwnProperty.call(message, "ping_histogram_max")) writer.uint32(/* id 49, wireType 0 =*/392).uint32(message.ping_histogram_max); - if (message.ping_ntile_5th != null && Object.hasOwnProperty.call(message, "ping_ntile_5th")) + if (message.ping_ntile_5th != null && $Object.hasOwnProperty.call(message, "ping_ntile_5th")) writer.uint32(/* id 50, wireType 0 =*/400).uint32(message.ping_ntile_5th); - if (message.ping_ntile_50th != null && Object.hasOwnProperty.call(message, "ping_ntile_50th")) + if (message.ping_ntile_50th != null && $Object.hasOwnProperty.call(message, "ping_ntile_50th")) writer.uint32(/* id 51, wireType 0 =*/408).uint32(message.ping_ntile_50th); - if (message.ping_ntile_75th != null && Object.hasOwnProperty.call(message, "ping_ntile_75th")) + if (message.ping_ntile_75th != null && $Object.hasOwnProperty.call(message, "ping_ntile_75th")) writer.uint32(/* id 52, wireType 0 =*/416).uint32(message.ping_ntile_75th); - if (message.ping_ntile_95th != null && Object.hasOwnProperty.call(message, "ping_ntile_95th")) + if (message.ping_ntile_95th != null && $Object.hasOwnProperty.call(message, "ping_ntile_95th")) writer.uint32(/* id 53, wireType 0 =*/424).uint32(message.ping_ntile_95th); - if (message.ping_ntile_98th != null && Object.hasOwnProperty.call(message, "ping_ntile_98th")) + if (message.ping_ntile_98th != null && $Object.hasOwnProperty.call(message, "ping_ntile_98th")) writer.uint32(/* id 54, wireType 0 =*/432).uint32(message.ping_ntile_98th); - if (message.jitter_histogram_negligible != null && Object.hasOwnProperty.call(message, "jitter_histogram_negligible")) + if (message.jitter_histogram_negligible != null && $Object.hasOwnProperty.call(message, "jitter_histogram_negligible")) writer.uint32(/* id 61, wireType 0 =*/488).uint32(message.jitter_histogram_negligible); - if (message.jitter_histogram_1 != null && Object.hasOwnProperty.call(message, "jitter_histogram_1")) + if (message.jitter_histogram_1 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_1")) writer.uint32(/* id 62, wireType 0 =*/496).uint32(message.jitter_histogram_1); - if (message.jitter_histogram_2 != null && Object.hasOwnProperty.call(message, "jitter_histogram_2")) + if (message.jitter_histogram_2 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_2")) writer.uint32(/* id 63, wireType 0 =*/504).uint32(message.jitter_histogram_2); - if (message.jitter_histogram_5 != null && Object.hasOwnProperty.call(message, "jitter_histogram_5")) + if (message.jitter_histogram_5 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_5")) writer.uint32(/* id 64, wireType 0 =*/512).uint32(message.jitter_histogram_5); - if (message.jitter_histogram_10 != null && Object.hasOwnProperty.call(message, "jitter_histogram_10")) + if (message.jitter_histogram_10 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_10")) writer.uint32(/* id 65, wireType 0 =*/520).uint32(message.jitter_histogram_10); - if (message.jitter_histogram_20 != null && Object.hasOwnProperty.call(message, "jitter_histogram_20")) + if (message.jitter_histogram_20 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_20")) writer.uint32(/* id 66, wireType 0 =*/528).uint32(message.jitter_histogram_20); - if (message.txspeed_max != null && Object.hasOwnProperty.call(message, "txspeed_max")) + if (message.txspeed_max != null && $Object.hasOwnProperty.call(message, "txspeed_max")) writer.uint32(/* id 67, wireType 0 =*/536).uint32(message.txspeed_max); - if (message.txspeed_histogram_16 != null && Object.hasOwnProperty.call(message, "txspeed_histogram_16")) + if (message.txspeed_histogram_16 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_16")) writer.uint32(/* id 68, wireType 0 =*/544).uint32(message.txspeed_histogram_16); - if (message.txspeed_histogram_32 != null && Object.hasOwnProperty.call(message, "txspeed_histogram_32")) + if (message.txspeed_histogram_32 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_32")) writer.uint32(/* id 69, wireType 0 =*/552).uint32(message.txspeed_histogram_32); - if (message.txspeed_histogram_64 != null && Object.hasOwnProperty.call(message, "txspeed_histogram_64")) + if (message.txspeed_histogram_64 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_64")) writer.uint32(/* id 70, wireType 0 =*/560).uint32(message.txspeed_histogram_64); - if (message.txspeed_histogram_128 != null && Object.hasOwnProperty.call(message, "txspeed_histogram_128")) + if (message.txspeed_histogram_128 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_128")) writer.uint32(/* id 71, wireType 0 =*/568).uint32(message.txspeed_histogram_128); - if (message.txspeed_histogram_256 != null && Object.hasOwnProperty.call(message, "txspeed_histogram_256")) + if (message.txspeed_histogram_256 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_256")) writer.uint32(/* id 72, wireType 0 =*/576).uint32(message.txspeed_histogram_256); - if (message.txspeed_histogram_512 != null && Object.hasOwnProperty.call(message, "txspeed_histogram_512")) + if (message.txspeed_histogram_512 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_512")) writer.uint32(/* id 73, wireType 0 =*/584).uint32(message.txspeed_histogram_512); - if (message.txspeed_histogram_1024 != null && Object.hasOwnProperty.call(message, "txspeed_histogram_1024")) + if (message.txspeed_histogram_1024 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_1024")) writer.uint32(/* id 74, wireType 0 =*/592).uint32(message.txspeed_histogram_1024); - if (message.txspeed_histogram_max != null && Object.hasOwnProperty.call(message, "txspeed_histogram_max")) + if (message.txspeed_histogram_max != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_max")) writer.uint32(/* id 75, wireType 0 =*/600).uint32(message.txspeed_histogram_max); - if (message.txspeed_ntile_5th != null && Object.hasOwnProperty.call(message, "txspeed_ntile_5th")) + if (message.txspeed_ntile_5th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_5th")) writer.uint32(/* id 76, wireType 0 =*/608).uint32(message.txspeed_ntile_5th); - if (message.txspeed_ntile_50th != null && Object.hasOwnProperty.call(message, "txspeed_ntile_50th")) + if (message.txspeed_ntile_50th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_50th")) writer.uint32(/* id 77, wireType 0 =*/616).uint32(message.txspeed_ntile_50th); - if (message.txspeed_ntile_75th != null && Object.hasOwnProperty.call(message, "txspeed_ntile_75th")) + if (message.txspeed_ntile_75th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_75th")) writer.uint32(/* id 78, wireType 0 =*/624).uint32(message.txspeed_ntile_75th); - if (message.txspeed_ntile_95th != null && Object.hasOwnProperty.call(message, "txspeed_ntile_95th")) + if (message.txspeed_ntile_95th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_95th")) writer.uint32(/* id 79, wireType 0 =*/632).uint32(message.txspeed_ntile_95th); - if (message.txspeed_ntile_98th != null && Object.hasOwnProperty.call(message, "txspeed_ntile_98th")) + if (message.txspeed_ntile_98th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_98th")) writer.uint32(/* id 80, wireType 0 =*/640).uint32(message.txspeed_ntile_98th); - if (message.rxspeed_max != null && Object.hasOwnProperty.call(message, "rxspeed_max")) + if (message.rxspeed_max != null && $Object.hasOwnProperty.call(message, "rxspeed_max")) writer.uint32(/* id 81, wireType 0 =*/648).uint32(message.rxspeed_max); - if (message.rxspeed_histogram_16 != null && Object.hasOwnProperty.call(message, "rxspeed_histogram_16")) + if (message.rxspeed_histogram_16 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_16")) writer.uint32(/* id 82, wireType 0 =*/656).uint32(message.rxspeed_histogram_16); - if (message.rxspeed_histogram_32 != null && Object.hasOwnProperty.call(message, "rxspeed_histogram_32")) + if (message.rxspeed_histogram_32 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_32")) writer.uint32(/* id 83, wireType 0 =*/664).uint32(message.rxspeed_histogram_32); - if (message.rxspeed_histogram_64 != null && Object.hasOwnProperty.call(message, "rxspeed_histogram_64")) + if (message.rxspeed_histogram_64 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_64")) writer.uint32(/* id 84, wireType 0 =*/672).uint32(message.rxspeed_histogram_64); - if (message.rxspeed_histogram_128 != null && Object.hasOwnProperty.call(message, "rxspeed_histogram_128")) + if (message.rxspeed_histogram_128 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_128")) writer.uint32(/* id 85, wireType 0 =*/680).uint32(message.rxspeed_histogram_128); - if (message.rxspeed_histogram_256 != null && Object.hasOwnProperty.call(message, "rxspeed_histogram_256")) + if (message.rxspeed_histogram_256 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_256")) writer.uint32(/* id 86, wireType 0 =*/688).uint32(message.rxspeed_histogram_256); - if (message.rxspeed_histogram_512 != null && Object.hasOwnProperty.call(message, "rxspeed_histogram_512")) + if (message.rxspeed_histogram_512 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_512")) writer.uint32(/* id 87, wireType 0 =*/696).uint32(message.rxspeed_histogram_512); - if (message.rxspeed_histogram_1024 != null && Object.hasOwnProperty.call(message, "rxspeed_histogram_1024")) + if (message.rxspeed_histogram_1024 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_1024")) writer.uint32(/* id 88, wireType 0 =*/704).uint32(message.rxspeed_histogram_1024); - if (message.rxspeed_histogram_max != null && Object.hasOwnProperty.call(message, "rxspeed_histogram_max")) + if (message.rxspeed_histogram_max != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_max")) writer.uint32(/* id 89, wireType 0 =*/712).uint32(message.rxspeed_histogram_max); - if (message.rxspeed_ntile_5th != null && Object.hasOwnProperty.call(message, "rxspeed_ntile_5th")) + if (message.rxspeed_ntile_5th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_5th")) writer.uint32(/* id 90, wireType 0 =*/720).uint32(message.rxspeed_ntile_5th); - if (message.rxspeed_ntile_50th != null && Object.hasOwnProperty.call(message, "rxspeed_ntile_50th")) + if (message.rxspeed_ntile_50th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_50th")) writer.uint32(/* id 91, wireType 0 =*/728).uint32(message.rxspeed_ntile_50th); - if (message.rxspeed_ntile_75th != null && Object.hasOwnProperty.call(message, "rxspeed_ntile_75th")) + if (message.rxspeed_ntile_75th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_75th")) writer.uint32(/* id 92, wireType 0 =*/736).uint32(message.rxspeed_ntile_75th); - if (message.rxspeed_ntile_95th != null && Object.hasOwnProperty.call(message, "rxspeed_ntile_95th")) + if (message.rxspeed_ntile_95th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_95th")) writer.uint32(/* id 93, wireType 0 =*/744).uint32(message.rxspeed_ntile_95th); - if (message.rxspeed_ntile_98th != null && Object.hasOwnProperty.call(message, "rxspeed_ntile_98th")) + if (message.rxspeed_ntile_98th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_98th")) writer.uint32(/* id 94, wireType 0 =*/752).uint32(message.rxspeed_ntile_98th); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5274,12 +6517,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramLinkLifetimeStats * @static - * @param {ICMsgSteamDatagramLinkLifetimeStats} message CMsgSteamDatagramLinkLifetimeStats message or plain object to encode + * @param {CMsgSteamDatagramLinkLifetimeStats.$Properties} message CMsgSteamDatagramLinkLifetimeStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramLinkLifetimeStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramLinkLifetimeStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5289,232 +6532,456 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramLinkLifetimeStats} CMsgSteamDatagramLinkLifetimeStats + * @returns {CMsgSteamDatagramLinkLifetimeStats & CMsgSteamDatagramLinkLifetimeStats.$Shape} CMsgSteamDatagramLinkLifetimeStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramLinkLifetimeStats.decode = function decode(reader, length) { + CMsgSteamDatagramLinkLifetimeStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramLinkLifetimeStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramLinkLifetimeStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.packets_sent = reader.uint64(); - break; - case 4: - message.kb_sent = reader.uint64(); - break; - case 5: - message.packets_recv = reader.uint64(); - break; - case 6: - message.kb_recv = reader.uint64(); - break; - case 7: - message.packets_recv_sequenced = reader.uint64(); - break; - case 8: - message.packets_recv_dropped = reader.uint64(); - break; - case 9: - message.packets_recv_out_of_order = reader.uint64(); - break; - case 10: - message.packets_recv_duplicate = reader.uint64(); - break; - case 11: - message.packets_recv_lurch = reader.uint64(); - break; - case 21: - message.quality_histogram_100 = reader.uint32(); - break; - case 22: - message.quality_histogram_99 = reader.uint32(); - break; - case 23: - message.quality_histogram_97 = reader.uint32(); - break; - case 24: - message.quality_histogram_95 = reader.uint32(); - break; - case 25: - message.quality_histogram_90 = reader.uint32(); - break; - case 26: - message.quality_histogram_75 = reader.uint32(); - break; - case 27: - message.quality_histogram_50 = reader.uint32(); - break; - case 28: - message.quality_histogram_1 = reader.uint32(); - break; - case 29: - message.quality_histogram_dead = reader.uint32(); - break; - case 30: - message.quality_ntile_2nd = reader.uint32(); - break; - case 31: - message.quality_ntile_5th = reader.uint32(); - break; - case 32: - message.quality_ntile_25th = reader.uint32(); - break; - case 33: - message.quality_ntile_50th = reader.uint32(); - break; - case 41: - message.ping_histogram_25 = reader.uint32(); - break; - case 42: - message.ping_histogram_50 = reader.uint32(); - break; - case 43: - message.ping_histogram_75 = reader.uint32(); - break; - case 44: - message.ping_histogram_100 = reader.uint32(); - break; - case 45: - message.ping_histogram_125 = reader.uint32(); - break; - case 46: - message.ping_histogram_150 = reader.uint32(); - break; - case 47: - message.ping_histogram_200 = reader.uint32(); - break; - case 48: - message.ping_histogram_300 = reader.uint32(); - break; - case 49: - message.ping_histogram_max = reader.uint32(); - break; - case 50: - message.ping_ntile_5th = reader.uint32(); - break; - case 51: - message.ping_ntile_50th = reader.uint32(); - break; - case 52: - message.ping_ntile_75th = reader.uint32(); - break; - case 53: - message.ping_ntile_95th = reader.uint32(); - break; - case 54: - message.ping_ntile_98th = reader.uint32(); - break; - case 61: - message.jitter_histogram_negligible = reader.uint32(); - break; - case 62: - message.jitter_histogram_1 = reader.uint32(); - break; - case 63: - message.jitter_histogram_2 = reader.uint32(); - break; - case 64: - message.jitter_histogram_5 = reader.uint32(); - break; - case 65: - message.jitter_histogram_10 = reader.uint32(); - break; - case 66: - message.jitter_histogram_20 = reader.uint32(); - break; - case 67: - message.txspeed_max = reader.uint32(); - break; - case 68: - message.txspeed_histogram_16 = reader.uint32(); - break; - case 69: - message.txspeed_histogram_32 = reader.uint32(); - break; - case 70: - message.txspeed_histogram_64 = reader.uint32(); - break; - case 71: - message.txspeed_histogram_128 = reader.uint32(); - break; - case 72: - message.txspeed_histogram_256 = reader.uint32(); - break; - case 73: - message.txspeed_histogram_512 = reader.uint32(); - break; - case 74: - message.txspeed_histogram_1024 = reader.uint32(); - break; - case 75: - message.txspeed_histogram_max = reader.uint32(); - break; - case 76: - message.txspeed_ntile_5th = reader.uint32(); - break; - case 77: - message.txspeed_ntile_50th = reader.uint32(); - break; - case 78: - message.txspeed_ntile_75th = reader.uint32(); - break; - case 79: - message.txspeed_ntile_95th = reader.uint32(); - break; - case 80: - message.txspeed_ntile_98th = reader.uint32(); - break; - case 81: - message.rxspeed_max = reader.uint32(); - break; - case 82: - message.rxspeed_histogram_16 = reader.uint32(); - break; - case 83: - message.rxspeed_histogram_32 = reader.uint32(); - break; - case 84: - message.rxspeed_histogram_64 = reader.uint32(); - break; - case 85: - message.rxspeed_histogram_128 = reader.uint32(); - break; - case 86: - message.rxspeed_histogram_256 = reader.uint32(); - break; - case 87: - message.rxspeed_histogram_512 = reader.uint32(); - break; - case 88: - message.rxspeed_histogram_1024 = reader.uint32(); - break; - case 89: - message.rxspeed_histogram_max = reader.uint32(); - break; - case 90: - message.rxspeed_ntile_5th = reader.uint32(); - break; - case 91: - message.rxspeed_ntile_50th = reader.uint32(); - break; - case 92: - message.rxspeed_ntile_75th = reader.uint32(); - break; - case 93: - message.rxspeed_ntile_95th = reader.uint32(); - break; - case 94: - message.rxspeed_ntile_98th = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 3: { + if (wireType !== 0) + break; + message.packets_sent = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.kb_sent = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.packets_recv = reader.uint64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.kb_recv = reader.uint64(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.packets_recv_sequenced = reader.uint64(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.packets_recv_dropped = reader.uint64(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.packets_recv_out_of_order = reader.uint64(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.packets_recv_duplicate = reader.uint64(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.packets_recv_lurch = reader.uint64(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.quality_histogram_100 = reader.uint32(); + continue; + } + case 22: { + if (wireType !== 0) + break; + message.quality_histogram_99 = reader.uint32(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.quality_histogram_97 = reader.uint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.quality_histogram_95 = reader.uint32(); + continue; + } + case 25: { + if (wireType !== 0) + break; + message.quality_histogram_90 = reader.uint32(); + continue; + } + case 26: { + if (wireType !== 0) + break; + message.quality_histogram_75 = reader.uint32(); + continue; + } + case 27: { + if (wireType !== 0) + break; + message.quality_histogram_50 = reader.uint32(); + continue; + } + case 28: { + if (wireType !== 0) + break; + message.quality_histogram_1 = reader.uint32(); + continue; + } + case 29: { + if (wireType !== 0) + break; + message.quality_histogram_dead = reader.uint32(); + continue; + } + case 30: { + if (wireType !== 0) + break; + message.quality_ntile_2nd = reader.uint32(); + continue; + } + case 31: { + if (wireType !== 0) + break; + message.quality_ntile_5th = reader.uint32(); + continue; + } + case 32: { + if (wireType !== 0) + break; + message.quality_ntile_25th = reader.uint32(); + continue; + } + case 33: { + if (wireType !== 0) + break; + message.quality_ntile_50th = reader.uint32(); + continue; + } + case 41: { + if (wireType !== 0) + break; + message.ping_histogram_25 = reader.uint32(); + continue; + } + case 42: { + if (wireType !== 0) + break; + message.ping_histogram_50 = reader.uint32(); + continue; + } + case 43: { + if (wireType !== 0) + break; + message.ping_histogram_75 = reader.uint32(); + continue; + } + case 44: { + if (wireType !== 0) + break; + message.ping_histogram_100 = reader.uint32(); + continue; + } + case 45: { + if (wireType !== 0) + break; + message.ping_histogram_125 = reader.uint32(); + continue; + } + case 46: { + if (wireType !== 0) + break; + message.ping_histogram_150 = reader.uint32(); + continue; + } + case 47: { + if (wireType !== 0) + break; + message.ping_histogram_200 = reader.uint32(); + continue; + } + case 48: { + if (wireType !== 0) + break; + message.ping_histogram_300 = reader.uint32(); + continue; + } + case 49: { + if (wireType !== 0) + break; + message.ping_histogram_max = reader.uint32(); + continue; + } + case 50: { + if (wireType !== 0) + break; + message.ping_ntile_5th = reader.uint32(); + continue; + } + case 51: { + if (wireType !== 0) + break; + message.ping_ntile_50th = reader.uint32(); + continue; + } + case 52: { + if (wireType !== 0) + break; + message.ping_ntile_75th = reader.uint32(); + continue; + } + case 53: { + if (wireType !== 0) + break; + message.ping_ntile_95th = reader.uint32(); + continue; + } + case 54: { + if (wireType !== 0) + break; + message.ping_ntile_98th = reader.uint32(); + continue; + } + case 61: { + if (wireType !== 0) + break; + message.jitter_histogram_negligible = reader.uint32(); + continue; + } + case 62: { + if (wireType !== 0) + break; + message.jitter_histogram_1 = reader.uint32(); + continue; + } + case 63: { + if (wireType !== 0) + break; + message.jitter_histogram_2 = reader.uint32(); + continue; + } + case 64: { + if (wireType !== 0) + break; + message.jitter_histogram_5 = reader.uint32(); + continue; + } + case 65: { + if (wireType !== 0) + break; + message.jitter_histogram_10 = reader.uint32(); + continue; + } + case 66: { + if (wireType !== 0) + break; + message.jitter_histogram_20 = reader.uint32(); + continue; + } + case 67: { + if (wireType !== 0) + break; + message.txspeed_max = reader.uint32(); + continue; + } + case 68: { + if (wireType !== 0) + break; + message.txspeed_histogram_16 = reader.uint32(); + continue; + } + case 69: { + if (wireType !== 0) + break; + message.txspeed_histogram_32 = reader.uint32(); + continue; + } + case 70: { + if (wireType !== 0) + break; + message.txspeed_histogram_64 = reader.uint32(); + continue; + } + case 71: { + if (wireType !== 0) + break; + message.txspeed_histogram_128 = reader.uint32(); + continue; + } + case 72: { + if (wireType !== 0) + break; + message.txspeed_histogram_256 = reader.uint32(); + continue; + } + case 73: { + if (wireType !== 0) + break; + message.txspeed_histogram_512 = reader.uint32(); + continue; + } + case 74: { + if (wireType !== 0) + break; + message.txspeed_histogram_1024 = reader.uint32(); + continue; + } + case 75: { + if (wireType !== 0) + break; + message.txspeed_histogram_max = reader.uint32(); + continue; + } + case 76: { + if (wireType !== 0) + break; + message.txspeed_ntile_5th = reader.uint32(); + continue; + } + case 77: { + if (wireType !== 0) + break; + message.txspeed_ntile_50th = reader.uint32(); + continue; + } + case 78: { + if (wireType !== 0) + break; + message.txspeed_ntile_75th = reader.uint32(); + continue; + } + case 79: { + if (wireType !== 0) + break; + message.txspeed_ntile_95th = reader.uint32(); + continue; + } + case 80: { + if (wireType !== 0) + break; + message.txspeed_ntile_98th = reader.uint32(); + continue; + } + case 81: { + if (wireType !== 0) + break; + message.rxspeed_max = reader.uint32(); + continue; + } + case 82: { + if (wireType !== 0) + break; + message.rxspeed_histogram_16 = reader.uint32(); + continue; + } + case 83: { + if (wireType !== 0) + break; + message.rxspeed_histogram_32 = reader.uint32(); + continue; + } + case 84: { + if (wireType !== 0) + break; + message.rxspeed_histogram_64 = reader.uint32(); + continue; + } + case 85: { + if (wireType !== 0) + break; + message.rxspeed_histogram_128 = reader.uint32(); + continue; + } + case 86: { + if (wireType !== 0) + break; + message.rxspeed_histogram_256 = reader.uint32(); + continue; + } + case 87: { + if (wireType !== 0) + break; + message.rxspeed_histogram_512 = reader.uint32(); + continue; + } + case 88: { + if (wireType !== 0) + break; + message.rxspeed_histogram_1024 = reader.uint32(); + continue; + } + case 89: { + if (wireType !== 0) + break; + message.rxspeed_histogram_max = reader.uint32(); + continue; + } + case 90: { + if (wireType !== 0) + break; + message.rxspeed_ntile_5th = reader.uint32(); + continue; + } + case 91: { + if (wireType !== 0) + break; + message.rxspeed_ntile_50th = reader.uint32(); + continue; + } + case 92: { + if (wireType !== 0) + break; + message.rxspeed_ntile_75th = reader.uint32(); + continue; + } + case 93: { + if (wireType !== 0) + break; + message.rxspeed_ntile_95th = reader.uint32(); + continue; + } + case 94: { + if (wireType !== 0) + break; + message.rxspeed_ntile_98th = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5524,11 +6991,11 @@ * @memberof CMsgSteamDatagramLinkLifetimeStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramLinkLifetimeStats} CMsgSteamDatagramLinkLifetimeStats + * @returns {CMsgSteamDatagramLinkLifetimeStats & CMsgSteamDatagramLinkLifetimeStats.$Shape} CMsgSteamDatagramLinkLifetimeStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramLinkLifetimeStats.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramLinkLifetimeStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5542,217 +7009,221 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramLinkLifetimeStats.verify = function verify(message) { + CMsgSteamDatagramLinkLifetimeStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.packets_sent != null && message.hasOwnProperty("packets_sent")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.packets_sent != null && $Object.hasOwnProperty.call(message, "packets_sent")) if (!$util.isInteger(message.packets_sent) && !(message.packets_sent && $util.isInteger(message.packets_sent.low) && $util.isInteger(message.packets_sent.high))) return "packets_sent: integer|Long expected"; - if (message.kb_sent != null && message.hasOwnProperty("kb_sent")) + if (message.kb_sent != null && $Object.hasOwnProperty.call(message, "kb_sent")) if (!$util.isInteger(message.kb_sent) && !(message.kb_sent && $util.isInteger(message.kb_sent.low) && $util.isInteger(message.kb_sent.high))) return "kb_sent: integer|Long expected"; - if (message.packets_recv != null && message.hasOwnProperty("packets_recv")) + if (message.packets_recv != null && $Object.hasOwnProperty.call(message, "packets_recv")) if (!$util.isInteger(message.packets_recv) && !(message.packets_recv && $util.isInteger(message.packets_recv.low) && $util.isInteger(message.packets_recv.high))) return "packets_recv: integer|Long expected"; - if (message.kb_recv != null && message.hasOwnProperty("kb_recv")) + if (message.kb_recv != null && $Object.hasOwnProperty.call(message, "kb_recv")) if (!$util.isInteger(message.kb_recv) && !(message.kb_recv && $util.isInteger(message.kb_recv.low) && $util.isInteger(message.kb_recv.high))) return "kb_recv: integer|Long expected"; - if (message.packets_recv_sequenced != null && message.hasOwnProperty("packets_recv_sequenced")) + if (message.packets_recv_sequenced != null && $Object.hasOwnProperty.call(message, "packets_recv_sequenced")) if (!$util.isInteger(message.packets_recv_sequenced) && !(message.packets_recv_sequenced && $util.isInteger(message.packets_recv_sequenced.low) && $util.isInteger(message.packets_recv_sequenced.high))) return "packets_recv_sequenced: integer|Long expected"; - if (message.packets_recv_dropped != null && message.hasOwnProperty("packets_recv_dropped")) + if (message.packets_recv_dropped != null && $Object.hasOwnProperty.call(message, "packets_recv_dropped")) if (!$util.isInteger(message.packets_recv_dropped) && !(message.packets_recv_dropped && $util.isInteger(message.packets_recv_dropped.low) && $util.isInteger(message.packets_recv_dropped.high))) return "packets_recv_dropped: integer|Long expected"; - if (message.packets_recv_out_of_order != null && message.hasOwnProperty("packets_recv_out_of_order")) + if (message.packets_recv_out_of_order != null && $Object.hasOwnProperty.call(message, "packets_recv_out_of_order")) if (!$util.isInteger(message.packets_recv_out_of_order) && !(message.packets_recv_out_of_order && $util.isInteger(message.packets_recv_out_of_order.low) && $util.isInteger(message.packets_recv_out_of_order.high))) return "packets_recv_out_of_order: integer|Long expected"; - if (message.packets_recv_duplicate != null && message.hasOwnProperty("packets_recv_duplicate")) + if (message.packets_recv_duplicate != null && $Object.hasOwnProperty.call(message, "packets_recv_duplicate")) if (!$util.isInteger(message.packets_recv_duplicate) && !(message.packets_recv_duplicate && $util.isInteger(message.packets_recv_duplicate.low) && $util.isInteger(message.packets_recv_duplicate.high))) return "packets_recv_duplicate: integer|Long expected"; - if (message.packets_recv_lurch != null && message.hasOwnProperty("packets_recv_lurch")) + if (message.packets_recv_lurch != null && $Object.hasOwnProperty.call(message, "packets_recv_lurch")) if (!$util.isInteger(message.packets_recv_lurch) && !(message.packets_recv_lurch && $util.isInteger(message.packets_recv_lurch.low) && $util.isInteger(message.packets_recv_lurch.high))) return "packets_recv_lurch: integer|Long expected"; - if (message.quality_histogram_100 != null && message.hasOwnProperty("quality_histogram_100")) + if (message.quality_histogram_100 != null && $Object.hasOwnProperty.call(message, "quality_histogram_100")) if (!$util.isInteger(message.quality_histogram_100)) return "quality_histogram_100: integer expected"; - if (message.quality_histogram_99 != null && message.hasOwnProperty("quality_histogram_99")) + if (message.quality_histogram_99 != null && $Object.hasOwnProperty.call(message, "quality_histogram_99")) if (!$util.isInteger(message.quality_histogram_99)) return "quality_histogram_99: integer expected"; - if (message.quality_histogram_97 != null && message.hasOwnProperty("quality_histogram_97")) + if (message.quality_histogram_97 != null && $Object.hasOwnProperty.call(message, "quality_histogram_97")) if (!$util.isInteger(message.quality_histogram_97)) return "quality_histogram_97: integer expected"; - if (message.quality_histogram_95 != null && message.hasOwnProperty("quality_histogram_95")) + if (message.quality_histogram_95 != null && $Object.hasOwnProperty.call(message, "quality_histogram_95")) if (!$util.isInteger(message.quality_histogram_95)) return "quality_histogram_95: integer expected"; - if (message.quality_histogram_90 != null && message.hasOwnProperty("quality_histogram_90")) + if (message.quality_histogram_90 != null && $Object.hasOwnProperty.call(message, "quality_histogram_90")) if (!$util.isInteger(message.quality_histogram_90)) return "quality_histogram_90: integer expected"; - if (message.quality_histogram_75 != null && message.hasOwnProperty("quality_histogram_75")) + if (message.quality_histogram_75 != null && $Object.hasOwnProperty.call(message, "quality_histogram_75")) if (!$util.isInteger(message.quality_histogram_75)) return "quality_histogram_75: integer expected"; - if (message.quality_histogram_50 != null && message.hasOwnProperty("quality_histogram_50")) + if (message.quality_histogram_50 != null && $Object.hasOwnProperty.call(message, "quality_histogram_50")) if (!$util.isInteger(message.quality_histogram_50)) return "quality_histogram_50: integer expected"; - if (message.quality_histogram_1 != null && message.hasOwnProperty("quality_histogram_1")) + if (message.quality_histogram_1 != null && $Object.hasOwnProperty.call(message, "quality_histogram_1")) if (!$util.isInteger(message.quality_histogram_1)) return "quality_histogram_1: integer expected"; - if (message.quality_histogram_dead != null && message.hasOwnProperty("quality_histogram_dead")) + if (message.quality_histogram_dead != null && $Object.hasOwnProperty.call(message, "quality_histogram_dead")) if (!$util.isInteger(message.quality_histogram_dead)) return "quality_histogram_dead: integer expected"; - if (message.quality_ntile_2nd != null && message.hasOwnProperty("quality_ntile_2nd")) + if (message.quality_ntile_2nd != null && $Object.hasOwnProperty.call(message, "quality_ntile_2nd")) if (!$util.isInteger(message.quality_ntile_2nd)) return "quality_ntile_2nd: integer expected"; - if (message.quality_ntile_5th != null && message.hasOwnProperty("quality_ntile_5th")) + if (message.quality_ntile_5th != null && $Object.hasOwnProperty.call(message, "quality_ntile_5th")) if (!$util.isInteger(message.quality_ntile_5th)) return "quality_ntile_5th: integer expected"; - if (message.quality_ntile_25th != null && message.hasOwnProperty("quality_ntile_25th")) + if (message.quality_ntile_25th != null && $Object.hasOwnProperty.call(message, "quality_ntile_25th")) if (!$util.isInteger(message.quality_ntile_25th)) return "quality_ntile_25th: integer expected"; - if (message.quality_ntile_50th != null && message.hasOwnProperty("quality_ntile_50th")) + if (message.quality_ntile_50th != null && $Object.hasOwnProperty.call(message, "quality_ntile_50th")) if (!$util.isInteger(message.quality_ntile_50th)) return "quality_ntile_50th: integer expected"; - if (message.ping_histogram_25 != null && message.hasOwnProperty("ping_histogram_25")) + if (message.ping_histogram_25 != null && $Object.hasOwnProperty.call(message, "ping_histogram_25")) if (!$util.isInteger(message.ping_histogram_25)) return "ping_histogram_25: integer expected"; - if (message.ping_histogram_50 != null && message.hasOwnProperty("ping_histogram_50")) + if (message.ping_histogram_50 != null && $Object.hasOwnProperty.call(message, "ping_histogram_50")) if (!$util.isInteger(message.ping_histogram_50)) return "ping_histogram_50: integer expected"; - if (message.ping_histogram_75 != null && message.hasOwnProperty("ping_histogram_75")) + if (message.ping_histogram_75 != null && $Object.hasOwnProperty.call(message, "ping_histogram_75")) if (!$util.isInteger(message.ping_histogram_75)) return "ping_histogram_75: integer expected"; - if (message.ping_histogram_100 != null && message.hasOwnProperty("ping_histogram_100")) + if (message.ping_histogram_100 != null && $Object.hasOwnProperty.call(message, "ping_histogram_100")) if (!$util.isInteger(message.ping_histogram_100)) return "ping_histogram_100: integer expected"; - if (message.ping_histogram_125 != null && message.hasOwnProperty("ping_histogram_125")) + if (message.ping_histogram_125 != null && $Object.hasOwnProperty.call(message, "ping_histogram_125")) if (!$util.isInteger(message.ping_histogram_125)) return "ping_histogram_125: integer expected"; - if (message.ping_histogram_150 != null && message.hasOwnProperty("ping_histogram_150")) + if (message.ping_histogram_150 != null && $Object.hasOwnProperty.call(message, "ping_histogram_150")) if (!$util.isInteger(message.ping_histogram_150)) return "ping_histogram_150: integer expected"; - if (message.ping_histogram_200 != null && message.hasOwnProperty("ping_histogram_200")) + if (message.ping_histogram_200 != null && $Object.hasOwnProperty.call(message, "ping_histogram_200")) if (!$util.isInteger(message.ping_histogram_200)) return "ping_histogram_200: integer expected"; - if (message.ping_histogram_300 != null && message.hasOwnProperty("ping_histogram_300")) + if (message.ping_histogram_300 != null && $Object.hasOwnProperty.call(message, "ping_histogram_300")) if (!$util.isInteger(message.ping_histogram_300)) return "ping_histogram_300: integer expected"; - if (message.ping_histogram_max != null && message.hasOwnProperty("ping_histogram_max")) + if (message.ping_histogram_max != null && $Object.hasOwnProperty.call(message, "ping_histogram_max")) if (!$util.isInteger(message.ping_histogram_max)) return "ping_histogram_max: integer expected"; - if (message.ping_ntile_5th != null && message.hasOwnProperty("ping_ntile_5th")) + if (message.ping_ntile_5th != null && $Object.hasOwnProperty.call(message, "ping_ntile_5th")) if (!$util.isInteger(message.ping_ntile_5th)) return "ping_ntile_5th: integer expected"; - if (message.ping_ntile_50th != null && message.hasOwnProperty("ping_ntile_50th")) + if (message.ping_ntile_50th != null && $Object.hasOwnProperty.call(message, "ping_ntile_50th")) if (!$util.isInteger(message.ping_ntile_50th)) return "ping_ntile_50th: integer expected"; - if (message.ping_ntile_75th != null && message.hasOwnProperty("ping_ntile_75th")) + if (message.ping_ntile_75th != null && $Object.hasOwnProperty.call(message, "ping_ntile_75th")) if (!$util.isInteger(message.ping_ntile_75th)) return "ping_ntile_75th: integer expected"; - if (message.ping_ntile_95th != null && message.hasOwnProperty("ping_ntile_95th")) + if (message.ping_ntile_95th != null && $Object.hasOwnProperty.call(message, "ping_ntile_95th")) if (!$util.isInteger(message.ping_ntile_95th)) return "ping_ntile_95th: integer expected"; - if (message.ping_ntile_98th != null && message.hasOwnProperty("ping_ntile_98th")) + if (message.ping_ntile_98th != null && $Object.hasOwnProperty.call(message, "ping_ntile_98th")) if (!$util.isInteger(message.ping_ntile_98th)) return "ping_ntile_98th: integer expected"; - if (message.jitter_histogram_negligible != null && message.hasOwnProperty("jitter_histogram_negligible")) + if (message.jitter_histogram_negligible != null && $Object.hasOwnProperty.call(message, "jitter_histogram_negligible")) if (!$util.isInteger(message.jitter_histogram_negligible)) return "jitter_histogram_negligible: integer expected"; - if (message.jitter_histogram_1 != null && message.hasOwnProperty("jitter_histogram_1")) + if (message.jitter_histogram_1 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_1")) if (!$util.isInteger(message.jitter_histogram_1)) return "jitter_histogram_1: integer expected"; - if (message.jitter_histogram_2 != null && message.hasOwnProperty("jitter_histogram_2")) + if (message.jitter_histogram_2 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_2")) if (!$util.isInteger(message.jitter_histogram_2)) return "jitter_histogram_2: integer expected"; - if (message.jitter_histogram_5 != null && message.hasOwnProperty("jitter_histogram_5")) + if (message.jitter_histogram_5 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_5")) if (!$util.isInteger(message.jitter_histogram_5)) return "jitter_histogram_5: integer expected"; - if (message.jitter_histogram_10 != null && message.hasOwnProperty("jitter_histogram_10")) + if (message.jitter_histogram_10 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_10")) if (!$util.isInteger(message.jitter_histogram_10)) return "jitter_histogram_10: integer expected"; - if (message.jitter_histogram_20 != null && message.hasOwnProperty("jitter_histogram_20")) + if (message.jitter_histogram_20 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_20")) if (!$util.isInteger(message.jitter_histogram_20)) return "jitter_histogram_20: integer expected"; - if (message.txspeed_max != null && message.hasOwnProperty("txspeed_max")) + if (message.txspeed_max != null && $Object.hasOwnProperty.call(message, "txspeed_max")) if (!$util.isInteger(message.txspeed_max)) return "txspeed_max: integer expected"; - if (message.txspeed_histogram_16 != null && message.hasOwnProperty("txspeed_histogram_16")) + if (message.txspeed_histogram_16 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_16")) if (!$util.isInteger(message.txspeed_histogram_16)) return "txspeed_histogram_16: integer expected"; - if (message.txspeed_histogram_32 != null && message.hasOwnProperty("txspeed_histogram_32")) + if (message.txspeed_histogram_32 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_32")) if (!$util.isInteger(message.txspeed_histogram_32)) return "txspeed_histogram_32: integer expected"; - if (message.txspeed_histogram_64 != null && message.hasOwnProperty("txspeed_histogram_64")) + if (message.txspeed_histogram_64 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_64")) if (!$util.isInteger(message.txspeed_histogram_64)) return "txspeed_histogram_64: integer expected"; - if (message.txspeed_histogram_128 != null && message.hasOwnProperty("txspeed_histogram_128")) + if (message.txspeed_histogram_128 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_128")) if (!$util.isInteger(message.txspeed_histogram_128)) return "txspeed_histogram_128: integer expected"; - if (message.txspeed_histogram_256 != null && message.hasOwnProperty("txspeed_histogram_256")) + if (message.txspeed_histogram_256 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_256")) if (!$util.isInteger(message.txspeed_histogram_256)) return "txspeed_histogram_256: integer expected"; - if (message.txspeed_histogram_512 != null && message.hasOwnProperty("txspeed_histogram_512")) + if (message.txspeed_histogram_512 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_512")) if (!$util.isInteger(message.txspeed_histogram_512)) return "txspeed_histogram_512: integer expected"; - if (message.txspeed_histogram_1024 != null && message.hasOwnProperty("txspeed_histogram_1024")) + if (message.txspeed_histogram_1024 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_1024")) if (!$util.isInteger(message.txspeed_histogram_1024)) return "txspeed_histogram_1024: integer expected"; - if (message.txspeed_histogram_max != null && message.hasOwnProperty("txspeed_histogram_max")) + if (message.txspeed_histogram_max != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_max")) if (!$util.isInteger(message.txspeed_histogram_max)) return "txspeed_histogram_max: integer expected"; - if (message.txspeed_ntile_5th != null && message.hasOwnProperty("txspeed_ntile_5th")) + if (message.txspeed_ntile_5th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_5th")) if (!$util.isInteger(message.txspeed_ntile_5th)) return "txspeed_ntile_5th: integer expected"; - if (message.txspeed_ntile_50th != null && message.hasOwnProperty("txspeed_ntile_50th")) + if (message.txspeed_ntile_50th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_50th")) if (!$util.isInteger(message.txspeed_ntile_50th)) return "txspeed_ntile_50th: integer expected"; - if (message.txspeed_ntile_75th != null && message.hasOwnProperty("txspeed_ntile_75th")) + if (message.txspeed_ntile_75th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_75th")) if (!$util.isInteger(message.txspeed_ntile_75th)) return "txspeed_ntile_75th: integer expected"; - if (message.txspeed_ntile_95th != null && message.hasOwnProperty("txspeed_ntile_95th")) + if (message.txspeed_ntile_95th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_95th")) if (!$util.isInteger(message.txspeed_ntile_95th)) return "txspeed_ntile_95th: integer expected"; - if (message.txspeed_ntile_98th != null && message.hasOwnProperty("txspeed_ntile_98th")) + if (message.txspeed_ntile_98th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_98th")) if (!$util.isInteger(message.txspeed_ntile_98th)) return "txspeed_ntile_98th: integer expected"; - if (message.rxspeed_max != null && message.hasOwnProperty("rxspeed_max")) + if (message.rxspeed_max != null && $Object.hasOwnProperty.call(message, "rxspeed_max")) if (!$util.isInteger(message.rxspeed_max)) return "rxspeed_max: integer expected"; - if (message.rxspeed_histogram_16 != null && message.hasOwnProperty("rxspeed_histogram_16")) + if (message.rxspeed_histogram_16 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_16")) if (!$util.isInteger(message.rxspeed_histogram_16)) return "rxspeed_histogram_16: integer expected"; - if (message.rxspeed_histogram_32 != null && message.hasOwnProperty("rxspeed_histogram_32")) + if (message.rxspeed_histogram_32 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_32")) if (!$util.isInteger(message.rxspeed_histogram_32)) return "rxspeed_histogram_32: integer expected"; - if (message.rxspeed_histogram_64 != null && message.hasOwnProperty("rxspeed_histogram_64")) + if (message.rxspeed_histogram_64 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_64")) if (!$util.isInteger(message.rxspeed_histogram_64)) return "rxspeed_histogram_64: integer expected"; - if (message.rxspeed_histogram_128 != null && message.hasOwnProperty("rxspeed_histogram_128")) + if (message.rxspeed_histogram_128 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_128")) if (!$util.isInteger(message.rxspeed_histogram_128)) return "rxspeed_histogram_128: integer expected"; - if (message.rxspeed_histogram_256 != null && message.hasOwnProperty("rxspeed_histogram_256")) + if (message.rxspeed_histogram_256 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_256")) if (!$util.isInteger(message.rxspeed_histogram_256)) return "rxspeed_histogram_256: integer expected"; - if (message.rxspeed_histogram_512 != null && message.hasOwnProperty("rxspeed_histogram_512")) + if (message.rxspeed_histogram_512 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_512")) if (!$util.isInteger(message.rxspeed_histogram_512)) return "rxspeed_histogram_512: integer expected"; - if (message.rxspeed_histogram_1024 != null && message.hasOwnProperty("rxspeed_histogram_1024")) + if (message.rxspeed_histogram_1024 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_1024")) if (!$util.isInteger(message.rxspeed_histogram_1024)) return "rxspeed_histogram_1024: integer expected"; - if (message.rxspeed_histogram_max != null && message.hasOwnProperty("rxspeed_histogram_max")) + if (message.rxspeed_histogram_max != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_max")) if (!$util.isInteger(message.rxspeed_histogram_max)) return "rxspeed_histogram_max: integer expected"; - if (message.rxspeed_ntile_5th != null && message.hasOwnProperty("rxspeed_ntile_5th")) + if (message.rxspeed_ntile_5th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_5th")) if (!$util.isInteger(message.rxspeed_ntile_5th)) return "rxspeed_ntile_5th: integer expected"; - if (message.rxspeed_ntile_50th != null && message.hasOwnProperty("rxspeed_ntile_50th")) + if (message.rxspeed_ntile_50th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_50th")) if (!$util.isInteger(message.rxspeed_ntile_50th)) return "rxspeed_ntile_50th: integer expected"; - if (message.rxspeed_ntile_75th != null && message.hasOwnProperty("rxspeed_ntile_75th")) + if (message.rxspeed_ntile_75th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_75th")) if (!$util.isInteger(message.rxspeed_ntile_75th)) return "rxspeed_ntile_75th: integer expected"; - if (message.rxspeed_ntile_95th != null && message.hasOwnProperty("rxspeed_ntile_95th")) + if (message.rxspeed_ntile_95th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_95th")) if (!$util.isInteger(message.rxspeed_ntile_95th)) return "rxspeed_ntile_95th: integer expected"; - if (message.rxspeed_ntile_98th != null && message.hasOwnProperty("rxspeed_ntile_98th")) + if (message.rxspeed_ntile_98th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_98th")) if (!$util.isInteger(message.rxspeed_ntile_98th)) return "rxspeed_ntile_98th: integer expected"; return null; @@ -5766,87 +7237,93 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramLinkLifetimeStats} CMsgSteamDatagramLinkLifetimeStats */ - CMsgSteamDatagramLinkLifetimeStats.fromObject = function fromObject(object) { + CMsgSteamDatagramLinkLifetimeStats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramLinkLifetimeStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramLinkLifetimeStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramLinkLifetimeStats(); if (object.packets_sent != null) if ($util.Long) - (message.packets_sent = $util.Long.fromValue(object.packets_sent)).unsigned = true; + message.packets_sent = $util.Long.fromValue(object.packets_sent, true); else if (typeof object.packets_sent === "string") - message.packets_sent = parseInt(object.packets_sent, 10); + message.packets_sent = $parseInt(object.packets_sent, 10); else if (typeof object.packets_sent === "number") message.packets_sent = object.packets_sent; else if (typeof object.packets_sent === "object") message.packets_sent = new $util.LongBits(object.packets_sent.low >>> 0, object.packets_sent.high >>> 0).toNumber(true); if (object.kb_sent != null) if ($util.Long) - (message.kb_sent = $util.Long.fromValue(object.kb_sent)).unsigned = true; + message.kb_sent = $util.Long.fromValue(object.kb_sent, true); else if (typeof object.kb_sent === "string") - message.kb_sent = parseInt(object.kb_sent, 10); + message.kb_sent = $parseInt(object.kb_sent, 10); else if (typeof object.kb_sent === "number") message.kb_sent = object.kb_sent; else if (typeof object.kb_sent === "object") message.kb_sent = new $util.LongBits(object.kb_sent.low >>> 0, object.kb_sent.high >>> 0).toNumber(true); if (object.packets_recv != null) if ($util.Long) - (message.packets_recv = $util.Long.fromValue(object.packets_recv)).unsigned = true; + message.packets_recv = $util.Long.fromValue(object.packets_recv, true); else if (typeof object.packets_recv === "string") - message.packets_recv = parseInt(object.packets_recv, 10); + message.packets_recv = $parseInt(object.packets_recv, 10); else if (typeof object.packets_recv === "number") message.packets_recv = object.packets_recv; else if (typeof object.packets_recv === "object") message.packets_recv = new $util.LongBits(object.packets_recv.low >>> 0, object.packets_recv.high >>> 0).toNumber(true); if (object.kb_recv != null) if ($util.Long) - (message.kb_recv = $util.Long.fromValue(object.kb_recv)).unsigned = true; + message.kb_recv = $util.Long.fromValue(object.kb_recv, true); else if (typeof object.kb_recv === "string") - message.kb_recv = parseInt(object.kb_recv, 10); + message.kb_recv = $parseInt(object.kb_recv, 10); else if (typeof object.kb_recv === "number") message.kb_recv = object.kb_recv; else if (typeof object.kb_recv === "object") message.kb_recv = new $util.LongBits(object.kb_recv.low >>> 0, object.kb_recv.high >>> 0).toNumber(true); if (object.packets_recv_sequenced != null) if ($util.Long) - (message.packets_recv_sequenced = $util.Long.fromValue(object.packets_recv_sequenced)).unsigned = true; + message.packets_recv_sequenced = $util.Long.fromValue(object.packets_recv_sequenced, true); else if (typeof object.packets_recv_sequenced === "string") - message.packets_recv_sequenced = parseInt(object.packets_recv_sequenced, 10); + message.packets_recv_sequenced = $parseInt(object.packets_recv_sequenced, 10); else if (typeof object.packets_recv_sequenced === "number") message.packets_recv_sequenced = object.packets_recv_sequenced; else if (typeof object.packets_recv_sequenced === "object") message.packets_recv_sequenced = new $util.LongBits(object.packets_recv_sequenced.low >>> 0, object.packets_recv_sequenced.high >>> 0).toNumber(true); if (object.packets_recv_dropped != null) if ($util.Long) - (message.packets_recv_dropped = $util.Long.fromValue(object.packets_recv_dropped)).unsigned = true; + message.packets_recv_dropped = $util.Long.fromValue(object.packets_recv_dropped, true); else if (typeof object.packets_recv_dropped === "string") - message.packets_recv_dropped = parseInt(object.packets_recv_dropped, 10); + message.packets_recv_dropped = $parseInt(object.packets_recv_dropped, 10); else if (typeof object.packets_recv_dropped === "number") message.packets_recv_dropped = object.packets_recv_dropped; else if (typeof object.packets_recv_dropped === "object") message.packets_recv_dropped = new $util.LongBits(object.packets_recv_dropped.low >>> 0, object.packets_recv_dropped.high >>> 0).toNumber(true); if (object.packets_recv_out_of_order != null) if ($util.Long) - (message.packets_recv_out_of_order = $util.Long.fromValue(object.packets_recv_out_of_order)).unsigned = true; + message.packets_recv_out_of_order = $util.Long.fromValue(object.packets_recv_out_of_order, true); else if (typeof object.packets_recv_out_of_order === "string") - message.packets_recv_out_of_order = parseInt(object.packets_recv_out_of_order, 10); + message.packets_recv_out_of_order = $parseInt(object.packets_recv_out_of_order, 10); else if (typeof object.packets_recv_out_of_order === "number") message.packets_recv_out_of_order = object.packets_recv_out_of_order; else if (typeof object.packets_recv_out_of_order === "object") message.packets_recv_out_of_order = new $util.LongBits(object.packets_recv_out_of_order.low >>> 0, object.packets_recv_out_of_order.high >>> 0).toNumber(true); if (object.packets_recv_duplicate != null) if ($util.Long) - (message.packets_recv_duplicate = $util.Long.fromValue(object.packets_recv_duplicate)).unsigned = true; + message.packets_recv_duplicate = $util.Long.fromValue(object.packets_recv_duplicate, true); else if (typeof object.packets_recv_duplicate === "string") - message.packets_recv_duplicate = parseInt(object.packets_recv_duplicate, 10); + message.packets_recv_duplicate = $parseInt(object.packets_recv_duplicate, 10); else if (typeof object.packets_recv_duplicate === "number") message.packets_recv_duplicate = object.packets_recv_duplicate; else if (typeof object.packets_recv_duplicate === "object") message.packets_recv_duplicate = new $util.LongBits(object.packets_recv_duplicate.low >>> 0, object.packets_recv_duplicate.high >>> 0).toNumber(true); if (object.packets_recv_lurch != null) if ($util.Long) - (message.packets_recv_lurch = $util.Long.fromValue(object.packets_recv_lurch)).unsigned = true; + message.packets_recv_lurch = $util.Long.fromValue(object.packets_recv_lurch, true); else if (typeof object.packets_recv_lurch === "string") - message.packets_recv_lurch = parseInt(object.packets_recv_lurch, 10); + message.packets_recv_lurch = $parseInt(object.packets_recv_lurch, 10); else if (typeof object.packets_recv_lurch === "number") message.packets_recv_lurch = object.packets_recv_lurch; else if (typeof object.packets_recv_lurch === "object") @@ -5985,56 +7462,60 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramLinkLifetimeStats.toObject = function toObject(message, options) { + CMsgSteamDatagramLinkLifetimeStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.packets_sent = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.packets_sent = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.packets_sent = options.longs === String ? "0" : 0; + object.packets_sent = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.kb_sent = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.kb_sent = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.kb_sent = options.longs === String ? "0" : 0; + object.kb_sent = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.packets_recv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.packets_recv = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.packets_recv = options.longs === String ? "0" : 0; + object.packets_recv = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.kb_recv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.kb_recv = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.kb_recv = options.longs === String ? "0" : 0; + object.kb_recv = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.packets_recv_sequenced = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.packets_recv_sequenced = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.packets_recv_sequenced = options.longs === String ? "0" : 0; + object.packets_recv_sequenced = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.packets_recv_dropped = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.packets_recv_dropped = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.packets_recv_dropped = options.longs === String ? "0" : 0; + object.packets_recv_dropped = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.packets_recv_out_of_order = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.packets_recv_out_of_order = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.packets_recv_out_of_order = options.longs === String ? "0" : 0; + object.packets_recv_out_of_order = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.packets_recv_duplicate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.packets_recv_duplicate = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.packets_recv_duplicate = options.longs === String ? "0" : 0; + object.packets_recv_duplicate = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.packets_recv_lurch = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.packets_recv_lurch = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.packets_recv_lurch = options.longs === String ? "0" : 0; + object.packets_recv_lurch = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.quality_histogram_100 = 0; object.quality_histogram_99 = 0; object.quality_histogram_97 = 0; @@ -6097,172 +7578,190 @@ object.rxspeed_ntile_95th = 0; object.rxspeed_ntile_98th = 0; } - if (message.packets_sent != null && message.hasOwnProperty("packets_sent")) - if (typeof message.packets_sent === "number") - object.packets_sent = options.longs === String ? String(message.packets_sent) : message.packets_sent; + if (message.packets_sent != null && $Object.hasOwnProperty.call(message, "packets_sent")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.packets_sent = typeof message.packets_sent === "number" ? $BigInt(message.packets_sent) : $util.Long.fromBits(message.packets_sent.low >>> 0, message.packets_sent.high >>> 0, true).toBigInt(); + else if (typeof message.packets_sent === "number") + object.packets_sent = options.longs === $String ? $String(message.packets_sent) : message.packets_sent; else - object.packets_sent = options.longs === String ? $util.Long.prototype.toString.call(message.packets_sent) : options.longs === Number ? new $util.LongBits(message.packets_sent.low >>> 0, message.packets_sent.high >>> 0).toNumber(true) : message.packets_sent; - if (message.kb_sent != null && message.hasOwnProperty("kb_sent")) - if (typeof message.kb_sent === "number") - object.kb_sent = options.longs === String ? String(message.kb_sent) : message.kb_sent; + object.packets_sent = options.longs === $String ? $util.Long.prototype.toString.call(message.packets_sent) : options.longs === $Number ? new $util.LongBits(message.packets_sent.low >>> 0, message.packets_sent.high >>> 0).toNumber(true) : message.packets_sent; + if (message.kb_sent != null && $Object.hasOwnProperty.call(message, "kb_sent")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.kb_sent = typeof message.kb_sent === "number" ? $BigInt(message.kb_sent) : $util.Long.fromBits(message.kb_sent.low >>> 0, message.kb_sent.high >>> 0, true).toBigInt(); + else if (typeof message.kb_sent === "number") + object.kb_sent = options.longs === $String ? $String(message.kb_sent) : message.kb_sent; else - object.kb_sent = options.longs === String ? $util.Long.prototype.toString.call(message.kb_sent) : options.longs === Number ? new $util.LongBits(message.kb_sent.low >>> 0, message.kb_sent.high >>> 0).toNumber(true) : message.kb_sent; - if (message.packets_recv != null && message.hasOwnProperty("packets_recv")) - if (typeof message.packets_recv === "number") - object.packets_recv = options.longs === String ? String(message.packets_recv) : message.packets_recv; + object.kb_sent = options.longs === $String ? $util.Long.prototype.toString.call(message.kb_sent) : options.longs === $Number ? new $util.LongBits(message.kb_sent.low >>> 0, message.kb_sent.high >>> 0).toNumber(true) : message.kb_sent; + if (message.packets_recv != null && $Object.hasOwnProperty.call(message, "packets_recv")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.packets_recv = typeof message.packets_recv === "number" ? $BigInt(message.packets_recv) : $util.Long.fromBits(message.packets_recv.low >>> 0, message.packets_recv.high >>> 0, true).toBigInt(); + else if (typeof message.packets_recv === "number") + object.packets_recv = options.longs === $String ? $String(message.packets_recv) : message.packets_recv; else - object.packets_recv = options.longs === String ? $util.Long.prototype.toString.call(message.packets_recv) : options.longs === Number ? new $util.LongBits(message.packets_recv.low >>> 0, message.packets_recv.high >>> 0).toNumber(true) : message.packets_recv; - if (message.kb_recv != null && message.hasOwnProperty("kb_recv")) - if (typeof message.kb_recv === "number") - object.kb_recv = options.longs === String ? String(message.kb_recv) : message.kb_recv; + object.packets_recv = options.longs === $String ? $util.Long.prototype.toString.call(message.packets_recv) : options.longs === $Number ? new $util.LongBits(message.packets_recv.low >>> 0, message.packets_recv.high >>> 0).toNumber(true) : message.packets_recv; + if (message.kb_recv != null && $Object.hasOwnProperty.call(message, "kb_recv")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.kb_recv = typeof message.kb_recv === "number" ? $BigInt(message.kb_recv) : $util.Long.fromBits(message.kb_recv.low >>> 0, message.kb_recv.high >>> 0, true).toBigInt(); + else if (typeof message.kb_recv === "number") + object.kb_recv = options.longs === $String ? $String(message.kb_recv) : message.kb_recv; else - object.kb_recv = options.longs === String ? $util.Long.prototype.toString.call(message.kb_recv) : options.longs === Number ? new $util.LongBits(message.kb_recv.low >>> 0, message.kb_recv.high >>> 0).toNumber(true) : message.kb_recv; - if (message.packets_recv_sequenced != null && message.hasOwnProperty("packets_recv_sequenced")) - if (typeof message.packets_recv_sequenced === "number") - object.packets_recv_sequenced = options.longs === String ? String(message.packets_recv_sequenced) : message.packets_recv_sequenced; + object.kb_recv = options.longs === $String ? $util.Long.prototype.toString.call(message.kb_recv) : options.longs === $Number ? new $util.LongBits(message.kb_recv.low >>> 0, message.kb_recv.high >>> 0).toNumber(true) : message.kb_recv; + if (message.packets_recv_sequenced != null && $Object.hasOwnProperty.call(message, "packets_recv_sequenced")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.packets_recv_sequenced = typeof message.packets_recv_sequenced === "number" ? $BigInt(message.packets_recv_sequenced) : $util.Long.fromBits(message.packets_recv_sequenced.low >>> 0, message.packets_recv_sequenced.high >>> 0, true).toBigInt(); + else if (typeof message.packets_recv_sequenced === "number") + object.packets_recv_sequenced = options.longs === $String ? $String(message.packets_recv_sequenced) : message.packets_recv_sequenced; else - object.packets_recv_sequenced = options.longs === String ? $util.Long.prototype.toString.call(message.packets_recv_sequenced) : options.longs === Number ? new $util.LongBits(message.packets_recv_sequenced.low >>> 0, message.packets_recv_sequenced.high >>> 0).toNumber(true) : message.packets_recv_sequenced; - if (message.packets_recv_dropped != null && message.hasOwnProperty("packets_recv_dropped")) - if (typeof message.packets_recv_dropped === "number") - object.packets_recv_dropped = options.longs === String ? String(message.packets_recv_dropped) : message.packets_recv_dropped; + object.packets_recv_sequenced = options.longs === $String ? $util.Long.prototype.toString.call(message.packets_recv_sequenced) : options.longs === $Number ? new $util.LongBits(message.packets_recv_sequenced.low >>> 0, message.packets_recv_sequenced.high >>> 0).toNumber(true) : message.packets_recv_sequenced; + if (message.packets_recv_dropped != null && $Object.hasOwnProperty.call(message, "packets_recv_dropped")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.packets_recv_dropped = typeof message.packets_recv_dropped === "number" ? $BigInt(message.packets_recv_dropped) : $util.Long.fromBits(message.packets_recv_dropped.low >>> 0, message.packets_recv_dropped.high >>> 0, true).toBigInt(); + else if (typeof message.packets_recv_dropped === "number") + object.packets_recv_dropped = options.longs === $String ? $String(message.packets_recv_dropped) : message.packets_recv_dropped; else - object.packets_recv_dropped = options.longs === String ? $util.Long.prototype.toString.call(message.packets_recv_dropped) : options.longs === Number ? new $util.LongBits(message.packets_recv_dropped.low >>> 0, message.packets_recv_dropped.high >>> 0).toNumber(true) : message.packets_recv_dropped; - if (message.packets_recv_out_of_order != null && message.hasOwnProperty("packets_recv_out_of_order")) - if (typeof message.packets_recv_out_of_order === "number") - object.packets_recv_out_of_order = options.longs === String ? String(message.packets_recv_out_of_order) : message.packets_recv_out_of_order; + object.packets_recv_dropped = options.longs === $String ? $util.Long.prototype.toString.call(message.packets_recv_dropped) : options.longs === $Number ? new $util.LongBits(message.packets_recv_dropped.low >>> 0, message.packets_recv_dropped.high >>> 0).toNumber(true) : message.packets_recv_dropped; + if (message.packets_recv_out_of_order != null && $Object.hasOwnProperty.call(message, "packets_recv_out_of_order")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.packets_recv_out_of_order = typeof message.packets_recv_out_of_order === "number" ? $BigInt(message.packets_recv_out_of_order) : $util.Long.fromBits(message.packets_recv_out_of_order.low >>> 0, message.packets_recv_out_of_order.high >>> 0, true).toBigInt(); + else if (typeof message.packets_recv_out_of_order === "number") + object.packets_recv_out_of_order = options.longs === $String ? $String(message.packets_recv_out_of_order) : message.packets_recv_out_of_order; else - object.packets_recv_out_of_order = options.longs === String ? $util.Long.prototype.toString.call(message.packets_recv_out_of_order) : options.longs === Number ? new $util.LongBits(message.packets_recv_out_of_order.low >>> 0, message.packets_recv_out_of_order.high >>> 0).toNumber(true) : message.packets_recv_out_of_order; - if (message.packets_recv_duplicate != null && message.hasOwnProperty("packets_recv_duplicate")) - if (typeof message.packets_recv_duplicate === "number") - object.packets_recv_duplicate = options.longs === String ? String(message.packets_recv_duplicate) : message.packets_recv_duplicate; + object.packets_recv_out_of_order = options.longs === $String ? $util.Long.prototype.toString.call(message.packets_recv_out_of_order) : options.longs === $Number ? new $util.LongBits(message.packets_recv_out_of_order.low >>> 0, message.packets_recv_out_of_order.high >>> 0).toNumber(true) : message.packets_recv_out_of_order; + if (message.packets_recv_duplicate != null && $Object.hasOwnProperty.call(message, "packets_recv_duplicate")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.packets_recv_duplicate = typeof message.packets_recv_duplicate === "number" ? $BigInt(message.packets_recv_duplicate) : $util.Long.fromBits(message.packets_recv_duplicate.low >>> 0, message.packets_recv_duplicate.high >>> 0, true).toBigInt(); + else if (typeof message.packets_recv_duplicate === "number") + object.packets_recv_duplicate = options.longs === $String ? $String(message.packets_recv_duplicate) : message.packets_recv_duplicate; else - object.packets_recv_duplicate = options.longs === String ? $util.Long.prototype.toString.call(message.packets_recv_duplicate) : options.longs === Number ? new $util.LongBits(message.packets_recv_duplicate.low >>> 0, message.packets_recv_duplicate.high >>> 0).toNumber(true) : message.packets_recv_duplicate; - if (message.packets_recv_lurch != null && message.hasOwnProperty("packets_recv_lurch")) - if (typeof message.packets_recv_lurch === "number") - object.packets_recv_lurch = options.longs === String ? String(message.packets_recv_lurch) : message.packets_recv_lurch; + object.packets_recv_duplicate = options.longs === $String ? $util.Long.prototype.toString.call(message.packets_recv_duplicate) : options.longs === $Number ? new $util.LongBits(message.packets_recv_duplicate.low >>> 0, message.packets_recv_duplicate.high >>> 0).toNumber(true) : message.packets_recv_duplicate; + if (message.packets_recv_lurch != null && $Object.hasOwnProperty.call(message, "packets_recv_lurch")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.packets_recv_lurch = typeof message.packets_recv_lurch === "number" ? $BigInt(message.packets_recv_lurch) : $util.Long.fromBits(message.packets_recv_lurch.low >>> 0, message.packets_recv_lurch.high >>> 0, true).toBigInt(); + else if (typeof message.packets_recv_lurch === "number") + object.packets_recv_lurch = options.longs === $String ? $String(message.packets_recv_lurch) : message.packets_recv_lurch; else - object.packets_recv_lurch = options.longs === String ? $util.Long.prototype.toString.call(message.packets_recv_lurch) : options.longs === Number ? new $util.LongBits(message.packets_recv_lurch.low >>> 0, message.packets_recv_lurch.high >>> 0).toNumber(true) : message.packets_recv_lurch; - if (message.quality_histogram_100 != null && message.hasOwnProperty("quality_histogram_100")) + object.packets_recv_lurch = options.longs === $String ? $util.Long.prototype.toString.call(message.packets_recv_lurch) : options.longs === $Number ? new $util.LongBits(message.packets_recv_lurch.low >>> 0, message.packets_recv_lurch.high >>> 0).toNumber(true) : message.packets_recv_lurch; + if (message.quality_histogram_100 != null && $Object.hasOwnProperty.call(message, "quality_histogram_100")) object.quality_histogram_100 = message.quality_histogram_100; - if (message.quality_histogram_99 != null && message.hasOwnProperty("quality_histogram_99")) + if (message.quality_histogram_99 != null && $Object.hasOwnProperty.call(message, "quality_histogram_99")) object.quality_histogram_99 = message.quality_histogram_99; - if (message.quality_histogram_97 != null && message.hasOwnProperty("quality_histogram_97")) + if (message.quality_histogram_97 != null && $Object.hasOwnProperty.call(message, "quality_histogram_97")) object.quality_histogram_97 = message.quality_histogram_97; - if (message.quality_histogram_95 != null && message.hasOwnProperty("quality_histogram_95")) + if (message.quality_histogram_95 != null && $Object.hasOwnProperty.call(message, "quality_histogram_95")) object.quality_histogram_95 = message.quality_histogram_95; - if (message.quality_histogram_90 != null && message.hasOwnProperty("quality_histogram_90")) + if (message.quality_histogram_90 != null && $Object.hasOwnProperty.call(message, "quality_histogram_90")) object.quality_histogram_90 = message.quality_histogram_90; - if (message.quality_histogram_75 != null && message.hasOwnProperty("quality_histogram_75")) + if (message.quality_histogram_75 != null && $Object.hasOwnProperty.call(message, "quality_histogram_75")) object.quality_histogram_75 = message.quality_histogram_75; - if (message.quality_histogram_50 != null && message.hasOwnProperty("quality_histogram_50")) + if (message.quality_histogram_50 != null && $Object.hasOwnProperty.call(message, "quality_histogram_50")) object.quality_histogram_50 = message.quality_histogram_50; - if (message.quality_histogram_1 != null && message.hasOwnProperty("quality_histogram_1")) + if (message.quality_histogram_1 != null && $Object.hasOwnProperty.call(message, "quality_histogram_1")) object.quality_histogram_1 = message.quality_histogram_1; - if (message.quality_histogram_dead != null && message.hasOwnProperty("quality_histogram_dead")) + if (message.quality_histogram_dead != null && $Object.hasOwnProperty.call(message, "quality_histogram_dead")) object.quality_histogram_dead = message.quality_histogram_dead; - if (message.quality_ntile_2nd != null && message.hasOwnProperty("quality_ntile_2nd")) + if (message.quality_ntile_2nd != null && $Object.hasOwnProperty.call(message, "quality_ntile_2nd")) object.quality_ntile_2nd = message.quality_ntile_2nd; - if (message.quality_ntile_5th != null && message.hasOwnProperty("quality_ntile_5th")) + if (message.quality_ntile_5th != null && $Object.hasOwnProperty.call(message, "quality_ntile_5th")) object.quality_ntile_5th = message.quality_ntile_5th; - if (message.quality_ntile_25th != null && message.hasOwnProperty("quality_ntile_25th")) + if (message.quality_ntile_25th != null && $Object.hasOwnProperty.call(message, "quality_ntile_25th")) object.quality_ntile_25th = message.quality_ntile_25th; - if (message.quality_ntile_50th != null && message.hasOwnProperty("quality_ntile_50th")) + if (message.quality_ntile_50th != null && $Object.hasOwnProperty.call(message, "quality_ntile_50th")) object.quality_ntile_50th = message.quality_ntile_50th; - if (message.ping_histogram_25 != null && message.hasOwnProperty("ping_histogram_25")) + if (message.ping_histogram_25 != null && $Object.hasOwnProperty.call(message, "ping_histogram_25")) object.ping_histogram_25 = message.ping_histogram_25; - if (message.ping_histogram_50 != null && message.hasOwnProperty("ping_histogram_50")) + if (message.ping_histogram_50 != null && $Object.hasOwnProperty.call(message, "ping_histogram_50")) object.ping_histogram_50 = message.ping_histogram_50; - if (message.ping_histogram_75 != null && message.hasOwnProperty("ping_histogram_75")) + if (message.ping_histogram_75 != null && $Object.hasOwnProperty.call(message, "ping_histogram_75")) object.ping_histogram_75 = message.ping_histogram_75; - if (message.ping_histogram_100 != null && message.hasOwnProperty("ping_histogram_100")) + if (message.ping_histogram_100 != null && $Object.hasOwnProperty.call(message, "ping_histogram_100")) object.ping_histogram_100 = message.ping_histogram_100; - if (message.ping_histogram_125 != null && message.hasOwnProperty("ping_histogram_125")) + if (message.ping_histogram_125 != null && $Object.hasOwnProperty.call(message, "ping_histogram_125")) object.ping_histogram_125 = message.ping_histogram_125; - if (message.ping_histogram_150 != null && message.hasOwnProperty("ping_histogram_150")) + if (message.ping_histogram_150 != null && $Object.hasOwnProperty.call(message, "ping_histogram_150")) object.ping_histogram_150 = message.ping_histogram_150; - if (message.ping_histogram_200 != null && message.hasOwnProperty("ping_histogram_200")) + if (message.ping_histogram_200 != null && $Object.hasOwnProperty.call(message, "ping_histogram_200")) object.ping_histogram_200 = message.ping_histogram_200; - if (message.ping_histogram_300 != null && message.hasOwnProperty("ping_histogram_300")) + if (message.ping_histogram_300 != null && $Object.hasOwnProperty.call(message, "ping_histogram_300")) object.ping_histogram_300 = message.ping_histogram_300; - if (message.ping_histogram_max != null && message.hasOwnProperty("ping_histogram_max")) + if (message.ping_histogram_max != null && $Object.hasOwnProperty.call(message, "ping_histogram_max")) object.ping_histogram_max = message.ping_histogram_max; - if (message.ping_ntile_5th != null && message.hasOwnProperty("ping_ntile_5th")) + if (message.ping_ntile_5th != null && $Object.hasOwnProperty.call(message, "ping_ntile_5th")) object.ping_ntile_5th = message.ping_ntile_5th; - if (message.ping_ntile_50th != null && message.hasOwnProperty("ping_ntile_50th")) + if (message.ping_ntile_50th != null && $Object.hasOwnProperty.call(message, "ping_ntile_50th")) object.ping_ntile_50th = message.ping_ntile_50th; - if (message.ping_ntile_75th != null && message.hasOwnProperty("ping_ntile_75th")) + if (message.ping_ntile_75th != null && $Object.hasOwnProperty.call(message, "ping_ntile_75th")) object.ping_ntile_75th = message.ping_ntile_75th; - if (message.ping_ntile_95th != null && message.hasOwnProperty("ping_ntile_95th")) + if (message.ping_ntile_95th != null && $Object.hasOwnProperty.call(message, "ping_ntile_95th")) object.ping_ntile_95th = message.ping_ntile_95th; - if (message.ping_ntile_98th != null && message.hasOwnProperty("ping_ntile_98th")) + if (message.ping_ntile_98th != null && $Object.hasOwnProperty.call(message, "ping_ntile_98th")) object.ping_ntile_98th = message.ping_ntile_98th; - if (message.jitter_histogram_negligible != null && message.hasOwnProperty("jitter_histogram_negligible")) + if (message.jitter_histogram_negligible != null && $Object.hasOwnProperty.call(message, "jitter_histogram_negligible")) object.jitter_histogram_negligible = message.jitter_histogram_negligible; - if (message.jitter_histogram_1 != null && message.hasOwnProperty("jitter_histogram_1")) + if (message.jitter_histogram_1 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_1")) object.jitter_histogram_1 = message.jitter_histogram_1; - if (message.jitter_histogram_2 != null && message.hasOwnProperty("jitter_histogram_2")) + if (message.jitter_histogram_2 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_2")) object.jitter_histogram_2 = message.jitter_histogram_2; - if (message.jitter_histogram_5 != null && message.hasOwnProperty("jitter_histogram_5")) + if (message.jitter_histogram_5 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_5")) object.jitter_histogram_5 = message.jitter_histogram_5; - if (message.jitter_histogram_10 != null && message.hasOwnProperty("jitter_histogram_10")) + if (message.jitter_histogram_10 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_10")) object.jitter_histogram_10 = message.jitter_histogram_10; - if (message.jitter_histogram_20 != null && message.hasOwnProperty("jitter_histogram_20")) + if (message.jitter_histogram_20 != null && $Object.hasOwnProperty.call(message, "jitter_histogram_20")) object.jitter_histogram_20 = message.jitter_histogram_20; - if (message.txspeed_max != null && message.hasOwnProperty("txspeed_max")) + if (message.txspeed_max != null && $Object.hasOwnProperty.call(message, "txspeed_max")) object.txspeed_max = message.txspeed_max; - if (message.txspeed_histogram_16 != null && message.hasOwnProperty("txspeed_histogram_16")) + if (message.txspeed_histogram_16 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_16")) object.txspeed_histogram_16 = message.txspeed_histogram_16; - if (message.txspeed_histogram_32 != null && message.hasOwnProperty("txspeed_histogram_32")) + if (message.txspeed_histogram_32 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_32")) object.txspeed_histogram_32 = message.txspeed_histogram_32; - if (message.txspeed_histogram_64 != null && message.hasOwnProperty("txspeed_histogram_64")) + if (message.txspeed_histogram_64 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_64")) object.txspeed_histogram_64 = message.txspeed_histogram_64; - if (message.txspeed_histogram_128 != null && message.hasOwnProperty("txspeed_histogram_128")) + if (message.txspeed_histogram_128 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_128")) object.txspeed_histogram_128 = message.txspeed_histogram_128; - if (message.txspeed_histogram_256 != null && message.hasOwnProperty("txspeed_histogram_256")) + if (message.txspeed_histogram_256 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_256")) object.txspeed_histogram_256 = message.txspeed_histogram_256; - if (message.txspeed_histogram_512 != null && message.hasOwnProperty("txspeed_histogram_512")) + if (message.txspeed_histogram_512 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_512")) object.txspeed_histogram_512 = message.txspeed_histogram_512; - if (message.txspeed_histogram_1024 != null && message.hasOwnProperty("txspeed_histogram_1024")) + if (message.txspeed_histogram_1024 != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_1024")) object.txspeed_histogram_1024 = message.txspeed_histogram_1024; - if (message.txspeed_histogram_max != null && message.hasOwnProperty("txspeed_histogram_max")) + if (message.txspeed_histogram_max != null && $Object.hasOwnProperty.call(message, "txspeed_histogram_max")) object.txspeed_histogram_max = message.txspeed_histogram_max; - if (message.txspeed_ntile_5th != null && message.hasOwnProperty("txspeed_ntile_5th")) + if (message.txspeed_ntile_5th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_5th")) object.txspeed_ntile_5th = message.txspeed_ntile_5th; - if (message.txspeed_ntile_50th != null && message.hasOwnProperty("txspeed_ntile_50th")) + if (message.txspeed_ntile_50th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_50th")) object.txspeed_ntile_50th = message.txspeed_ntile_50th; - if (message.txspeed_ntile_75th != null && message.hasOwnProperty("txspeed_ntile_75th")) + if (message.txspeed_ntile_75th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_75th")) object.txspeed_ntile_75th = message.txspeed_ntile_75th; - if (message.txspeed_ntile_95th != null && message.hasOwnProperty("txspeed_ntile_95th")) + if (message.txspeed_ntile_95th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_95th")) object.txspeed_ntile_95th = message.txspeed_ntile_95th; - if (message.txspeed_ntile_98th != null && message.hasOwnProperty("txspeed_ntile_98th")) + if (message.txspeed_ntile_98th != null && $Object.hasOwnProperty.call(message, "txspeed_ntile_98th")) object.txspeed_ntile_98th = message.txspeed_ntile_98th; - if (message.rxspeed_max != null && message.hasOwnProperty("rxspeed_max")) + if (message.rxspeed_max != null && $Object.hasOwnProperty.call(message, "rxspeed_max")) object.rxspeed_max = message.rxspeed_max; - if (message.rxspeed_histogram_16 != null && message.hasOwnProperty("rxspeed_histogram_16")) + if (message.rxspeed_histogram_16 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_16")) object.rxspeed_histogram_16 = message.rxspeed_histogram_16; - if (message.rxspeed_histogram_32 != null && message.hasOwnProperty("rxspeed_histogram_32")) + if (message.rxspeed_histogram_32 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_32")) object.rxspeed_histogram_32 = message.rxspeed_histogram_32; - if (message.rxspeed_histogram_64 != null && message.hasOwnProperty("rxspeed_histogram_64")) + if (message.rxspeed_histogram_64 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_64")) object.rxspeed_histogram_64 = message.rxspeed_histogram_64; - if (message.rxspeed_histogram_128 != null && message.hasOwnProperty("rxspeed_histogram_128")) + if (message.rxspeed_histogram_128 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_128")) object.rxspeed_histogram_128 = message.rxspeed_histogram_128; - if (message.rxspeed_histogram_256 != null && message.hasOwnProperty("rxspeed_histogram_256")) + if (message.rxspeed_histogram_256 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_256")) object.rxspeed_histogram_256 = message.rxspeed_histogram_256; - if (message.rxspeed_histogram_512 != null && message.hasOwnProperty("rxspeed_histogram_512")) + if (message.rxspeed_histogram_512 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_512")) object.rxspeed_histogram_512 = message.rxspeed_histogram_512; - if (message.rxspeed_histogram_1024 != null && message.hasOwnProperty("rxspeed_histogram_1024")) + if (message.rxspeed_histogram_1024 != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_1024")) object.rxspeed_histogram_1024 = message.rxspeed_histogram_1024; - if (message.rxspeed_histogram_max != null && message.hasOwnProperty("rxspeed_histogram_max")) + if (message.rxspeed_histogram_max != null && $Object.hasOwnProperty.call(message, "rxspeed_histogram_max")) object.rxspeed_histogram_max = message.rxspeed_histogram_max; - if (message.rxspeed_ntile_5th != null && message.hasOwnProperty("rxspeed_ntile_5th")) + if (message.rxspeed_ntile_5th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_5th")) object.rxspeed_ntile_5th = message.rxspeed_ntile_5th; - if (message.rxspeed_ntile_50th != null && message.hasOwnProperty("rxspeed_ntile_50th")) + if (message.rxspeed_ntile_50th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_50th")) object.rxspeed_ntile_50th = message.rxspeed_ntile_50th; - if (message.rxspeed_ntile_75th != null && message.hasOwnProperty("rxspeed_ntile_75th")) + if (message.rxspeed_ntile_75th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_75th")) object.rxspeed_ntile_75th = message.rxspeed_ntile_75th; - if (message.rxspeed_ntile_95th != null && message.hasOwnProperty("rxspeed_ntile_95th")) + if (message.rxspeed_ntile_95th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_95th")) object.rxspeed_ntile_95th = message.rxspeed_ntile_95th; - if (message.rxspeed_ntile_98th != null && message.hasOwnProperty("rxspeed_ntile_98th")) + if (message.rxspeed_ntile_98th != null && $Object.hasOwnProperty.call(message, "rxspeed_ntile_98th")) object.rxspeed_ntile_98th = message.rxspeed_ntile_98th; return object; }; @@ -6274,8 +7773,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramLinkLifetimeStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramLinkLifetimeStats.prototype.toJSON = function() { + return CMsgSteamDatagramLinkLifetimeStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramLinkLifetimeStats + * @function getTypeUrl + * @memberof CMsgSteamDatagramLinkLifetimeStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramLinkLifetimeStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramLinkLifetimeStats"; }; return CMsgSteamDatagramLinkLifetimeStats; @@ -6283,32 +7796,45 @@ $root.CMsgSteamDatagramConnectionQuality = (function() { + /** + * Properties of a CMsgSteamDatagramConnectionQuality. + * @typedef {Object} CMsgSteamDatagramConnectionQuality.$Properties + * @property {CMsgSteamDatagramLinkInstantaneousStats.$Properties|null} [instantaneous] CMsgSteamDatagramConnectionQuality instantaneous + * @property {CMsgSteamDatagramLinkLifetimeStats.$Properties|null} [lifetime] CMsgSteamDatagramConnectionQuality lifetime + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSteamDatagramConnectionQuality. * @exports ICMsgSteamDatagramConnectionQuality * @interface ICMsgSteamDatagramConnectionQuality - * @property {ICMsgSteamDatagramLinkInstantaneousStats|null} [instantaneous] CMsgSteamDatagramConnectionQuality instantaneous - * @property {ICMsgSteamDatagramLinkLifetimeStats|null} [lifetime] CMsgSteamDatagramConnectionQuality lifetime + * @augments CMsgSteamDatagramConnectionQuality.$Properties + * @deprecated Use CMsgSteamDatagramConnectionQuality.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramConnectionQuality. + * @typedef {CMsgSteamDatagramConnectionQuality.$Properties} CMsgSteamDatagramConnectionQuality.$Shape */ /** * Constructs a new CMsgSteamDatagramConnectionQuality. * @exports CMsgSteamDatagramConnectionQuality * @classdesc Represents a CMsgSteamDatagramConnectionQuality. - * @implements ICMsgSteamDatagramConnectionQuality * @constructor - * @param {ICMsgSteamDatagramConnectionQuality=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionQuality.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramConnectionQuality(properties) { + var CMsgSteamDatagramConnectionQuality = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramConnectionQuality instantaneous. - * @member {ICMsgSteamDatagramLinkInstantaneousStats|null|undefined} instantaneous + * @member {CMsgSteamDatagramLinkInstantaneousStats.$Properties|null|undefined} instantaneous * @memberof CMsgSteamDatagramConnectionQuality * @instance */ @@ -6316,7 +7842,7 @@ /** * CMsgSteamDatagramConnectionQuality lifetime. - * @member {ICMsgSteamDatagramLinkLifetimeStats|null|undefined} lifetime + * @member {CMsgSteamDatagramLinkLifetimeStats.$Properties|null|undefined} lifetime * @memberof CMsgSteamDatagramConnectionQuality * @instance */ @@ -6327,10 +7853,14 @@ * @function create * @memberof CMsgSteamDatagramConnectionQuality * @static - * @param {ICMsgSteamDatagramConnectionQuality=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionQuality.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramConnectionQuality} CMsgSteamDatagramConnectionQuality instance + * @type {{ + * (properties: CMsgSteamDatagramConnectionQuality.$Shape): CMsgSteamDatagramConnectionQuality & CMsgSteamDatagramConnectionQuality.$Shape; + * (properties?: CMsgSteamDatagramConnectionQuality.$Properties): CMsgSteamDatagramConnectionQuality; + * }} */ - CMsgSteamDatagramConnectionQuality.create = function create(properties) { + CMsgSteamDatagramConnectionQuality.create = function(properties) { return new CMsgSteamDatagramConnectionQuality(properties); }; @@ -6339,17 +7869,24 @@ * @function encode * @memberof CMsgSteamDatagramConnectionQuality * @static - * @param {ICMsgSteamDatagramConnectionQuality} message CMsgSteamDatagramConnectionQuality message or plain object to encode + * @param {CMsgSteamDatagramConnectionQuality.$Properties} message CMsgSteamDatagramConnectionQuality message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionQuality.encode = function encode(message, writer) { + CMsgSteamDatagramConnectionQuality.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.instantaneous != null && Object.hasOwnProperty.call(message, "instantaneous")) - $root.CMsgSteamDatagramLinkInstantaneousStats.encode(message.instantaneous, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.lifetime != null && Object.hasOwnProperty.call(message, "lifetime")) - $root.CMsgSteamDatagramLinkLifetimeStats.encode(message.lifetime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.instantaneous != null && $Object.hasOwnProperty.call(message, "instantaneous")) + $root.CMsgSteamDatagramLinkInstantaneousStats.encode(message.instantaneous, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.lifetime != null && $Object.hasOwnProperty.call(message, "lifetime")) + $root.CMsgSteamDatagramLinkLifetimeStats.encode(message.lifetime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6358,12 +7895,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramConnectionQuality * @static - * @param {ICMsgSteamDatagramConnectionQuality} message CMsgSteamDatagramConnectionQuality message or plain object to encode + * @param {CMsgSteamDatagramConnectionQuality.$Properties} message CMsgSteamDatagramConnectionQuality message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionQuality.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramConnectionQuality.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6373,28 +7910,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramConnectionQuality} CMsgSteamDatagramConnectionQuality + * @returns {CMsgSteamDatagramConnectionQuality & CMsgSteamDatagramConnectionQuality.$Shape} CMsgSteamDatagramConnectionQuality * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionQuality.decode = function decode(reader, length) { + CMsgSteamDatagramConnectionQuality.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramConnectionQuality(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramConnectionQuality(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.instantaneous = $root.CMsgSteamDatagramLinkInstantaneousStats.decode(reader, reader.uint32()); - break; - case 2: - message.lifetime = $root.CMsgSteamDatagramLinkLifetimeStats.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.instantaneous = $root.CMsgSteamDatagramLinkInstantaneousStats.decode(reader, reader.uint32(), $undefined, _depth + 1, message.instantaneous); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.lifetime = $root.CMsgSteamDatagramLinkLifetimeStats.decode(reader, reader.uint32(), $undefined, _depth + 1, message.lifetime); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6404,11 +7961,11 @@ * @memberof CMsgSteamDatagramConnectionQuality * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramConnectionQuality} CMsgSteamDatagramConnectionQuality + * @returns {CMsgSteamDatagramConnectionQuality & CMsgSteamDatagramConnectionQuality.$Shape} CMsgSteamDatagramConnectionQuality * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionQuality.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramConnectionQuality.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6422,16 +7979,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramConnectionQuality.verify = function verify(message) { + CMsgSteamDatagramConnectionQuality.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.instantaneous != null && message.hasOwnProperty("instantaneous")) { - var error = $root.CMsgSteamDatagramLinkInstantaneousStats.verify(message.instantaneous); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.instantaneous != null && $Object.hasOwnProperty.call(message, "instantaneous")) { + var error = $root.CMsgSteamDatagramLinkInstantaneousStats.verify(message.instantaneous, _depth + 1); if (error) return "instantaneous." + error; } - if (message.lifetime != null && message.hasOwnProperty("lifetime")) { - var error = $root.CMsgSteamDatagramLinkLifetimeStats.verify(message.lifetime); + if (message.lifetime != null && $Object.hasOwnProperty.call(message, "lifetime")) { + var error = $root.CMsgSteamDatagramLinkLifetimeStats.verify(message.lifetime, _depth + 1); if (error) return "lifetime." + error; } @@ -6446,19 +8007,25 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramConnectionQuality} CMsgSteamDatagramConnectionQuality */ - CMsgSteamDatagramConnectionQuality.fromObject = function fromObject(object) { + CMsgSteamDatagramConnectionQuality.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramConnectionQuality) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramConnectionQuality: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramConnectionQuality(); if (object.instantaneous != null) { - if (typeof object.instantaneous !== "object") - throw TypeError(".CMsgSteamDatagramConnectionQuality.instantaneous: object expected"); - message.instantaneous = $root.CMsgSteamDatagramLinkInstantaneousStats.fromObject(object.instantaneous); + if (!$util.isObject(object.instantaneous)) + throw $TypeError(".CMsgSteamDatagramConnectionQuality.instantaneous: object expected"); + message.instantaneous = $root.CMsgSteamDatagramLinkInstantaneousStats.fromObject(object.instantaneous, _depth + 1); } if (object.lifetime != null) { - if (typeof object.lifetime !== "object") - throw TypeError(".CMsgSteamDatagramConnectionQuality.lifetime: object expected"); - message.lifetime = $root.CMsgSteamDatagramLinkLifetimeStats.fromObject(object.lifetime); + if (!$util.isObject(object.lifetime)) + throw $TypeError(".CMsgSteamDatagramConnectionQuality.lifetime: object expected"); + message.lifetime = $root.CMsgSteamDatagramLinkLifetimeStats.fromObject(object.lifetime, _depth + 1); } return message; }; @@ -6472,18 +8039,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramConnectionQuality.toObject = function toObject(message, options) { + CMsgSteamDatagramConnectionQuality.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.instantaneous = null; object.lifetime = null; } - if (message.instantaneous != null && message.hasOwnProperty("instantaneous")) - object.instantaneous = $root.CMsgSteamDatagramLinkInstantaneousStats.toObject(message.instantaneous, options); - if (message.lifetime != null && message.hasOwnProperty("lifetime")) - object.lifetime = $root.CMsgSteamDatagramLinkLifetimeStats.toObject(message.lifetime, options); + if (message.instantaneous != null && $Object.hasOwnProperty.call(message, "instantaneous")) + object.instantaneous = $root.CMsgSteamDatagramLinkInstantaneousStats.toObject(message.instantaneous, options, _depth + 1); + if (message.lifetime != null && $Object.hasOwnProperty.call(message, "lifetime")) + object.lifetime = $root.CMsgSteamDatagramLinkLifetimeStats.toObject(message.lifetime, options, _depth + 1); return object; }; @@ -6494,8 +8065,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramConnectionQuality.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramConnectionQuality.prototype.toJSON = function() { + return CMsgSteamDatagramConnectionQuality.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramConnectionQuality + * @function getTypeUrl + * @memberof CMsgSteamDatagramConnectionQuality + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramConnectionQuality.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramConnectionQuality"; }; return CMsgSteamDatagramConnectionQuality; @@ -6505,10 +8090,9 @@ /** * Properties of a CMsgSteamDatagramConnectionStatsClientToRouter. - * @exports ICMsgSteamDatagramConnectionStatsClientToRouter - * @interface ICMsgSteamDatagramConnectionStatsClientToRouter - * @property {ICMsgSteamDatagramConnectionQuality|null} [c2r] CMsgSteamDatagramConnectionStatsClientToRouter c2r - * @property {ICMsgSteamDatagramConnectionQuality|null} [c2s] CMsgSteamDatagramConnectionStatsClientToRouter c2s + * @typedef {Object} CMsgSteamDatagramConnectionStatsClientToRouter.$Properties + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [c2r] CMsgSteamDatagramConnectionStatsClientToRouter c2r + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [c2s] CMsgSteamDatagramConnectionStatsClientToRouter c2s * @property {number|null} [legacy_client_timestamp] CMsgSteamDatagramConnectionStatsClientToRouter legacy_client_timestamp * @property {Array.|null} [ack_relay] CMsgSteamDatagramConnectionStatsClientToRouter ack_relay * @property {Array.|null} [ack_e2e] CMsgSteamDatagramConnectionStatsClientToRouter ack_e2e @@ -6516,28 +8100,42 @@ * @property {number|null} [client_connection_id] CMsgSteamDatagramConnectionStatsClientToRouter client_connection_id * @property {number|null} [seq_num_c2r] CMsgSteamDatagramConnectionStatsClientToRouter seq_num_c2r * @property {number|null} [seq_num_c2s] CMsgSteamDatagramConnectionStatsClientToRouter seq_num_c2s + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramConnectionStatsClientToRouter. + * @exports ICMsgSteamDatagramConnectionStatsClientToRouter + * @interface ICMsgSteamDatagramConnectionStatsClientToRouter + * @augments CMsgSteamDatagramConnectionStatsClientToRouter.$Properties + * @deprecated Use CMsgSteamDatagramConnectionStatsClientToRouter.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramConnectionStatsClientToRouter. + * @typedef {CMsgSteamDatagramConnectionStatsClientToRouter.$Properties} CMsgSteamDatagramConnectionStatsClientToRouter.$Shape */ /** * Constructs a new CMsgSteamDatagramConnectionStatsClientToRouter. * @exports CMsgSteamDatagramConnectionStatsClientToRouter * @classdesc Represents a CMsgSteamDatagramConnectionStatsClientToRouter. - * @implements ICMsgSteamDatagramConnectionStatsClientToRouter * @constructor - * @param {ICMsgSteamDatagramConnectionStatsClientToRouter=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsClientToRouter.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramConnectionStatsClientToRouter(properties) { + var CMsgSteamDatagramConnectionStatsClientToRouter = function (properties) { this.ack_relay = []; this.ack_e2e = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramConnectionStatsClientToRouter c2r. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} c2r + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} c2r * @memberof CMsgSteamDatagramConnectionStatsClientToRouter * @instance */ @@ -6545,7 +8143,7 @@ /** * CMsgSteamDatagramConnectionStatsClientToRouter c2s. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} c2s + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} c2s * @memberof CMsgSteamDatagramConnectionStatsClientToRouter * @instance */ @@ -6612,10 +8210,14 @@ * @function create * @memberof CMsgSteamDatagramConnectionStatsClientToRouter * @static - * @param {ICMsgSteamDatagramConnectionStatsClientToRouter=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsClientToRouter.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramConnectionStatsClientToRouter} CMsgSteamDatagramConnectionStatsClientToRouter instance + * @type {{ + * (properties: CMsgSteamDatagramConnectionStatsClientToRouter.$Shape): CMsgSteamDatagramConnectionStatsClientToRouter & CMsgSteamDatagramConnectionStatsClientToRouter.$Shape; + * (properties?: CMsgSteamDatagramConnectionStatsClientToRouter.$Properties): CMsgSteamDatagramConnectionStatsClientToRouter; + * }} */ - CMsgSteamDatagramConnectionStatsClientToRouter.create = function create(properties) { + CMsgSteamDatagramConnectionStatsClientToRouter.create = function(properties) { return new CMsgSteamDatagramConnectionStatsClientToRouter(properties); }; @@ -6624,18 +8226,22 @@ * @function encode * @memberof CMsgSteamDatagramConnectionStatsClientToRouter * @static - * @param {ICMsgSteamDatagramConnectionStatsClientToRouter} message CMsgSteamDatagramConnectionStatsClientToRouter message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsClientToRouter.$Properties} message CMsgSteamDatagramConnectionStatsClientToRouter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsClientToRouter.encode = function encode(message, writer) { + CMsgSteamDatagramConnectionStatsClientToRouter.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.c2r != null && Object.hasOwnProperty.call(message, "c2r")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.c2r, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.c2s != null && Object.hasOwnProperty.call(message, "c2s")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.c2s, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.legacy_client_timestamp != null && Object.hasOwnProperty.call(message, "legacy_client_timestamp")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.c2r != null && $Object.hasOwnProperty.call(message, "c2r")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.c2r, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.c2s != null && $Object.hasOwnProperty.call(message, "c2s")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.c2s, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.legacy_client_timestamp != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.legacy_client_timestamp); if (message.ack_relay != null && message.ack_relay.length) for (var i = 0; i < message.ack_relay.length; ++i) @@ -6643,14 +8249,17 @@ if (message.ack_e2e != null && message.ack_e2e.length) for (var i = 0; i < message.ack_e2e.length; ++i) writer.uint32(/* id 5, wireType 5 =*/45).fixed32(message.ack_e2e[i]); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.flags); - if (message.client_connection_id != null && Object.hasOwnProperty.call(message, "client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.client_connection_id); - if (message.seq_num_c2r != null && Object.hasOwnProperty.call(message, "seq_num_c2r")) + if (message.seq_num_c2r != null && $Object.hasOwnProperty.call(message, "seq_num_c2r")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.seq_num_c2r); - if (message.seq_num_c2s != null && Object.hasOwnProperty.call(message, "seq_num_c2s")) + if (message.seq_num_c2s != null && $Object.hasOwnProperty.call(message, "seq_num_c2s")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.seq_num_c2s); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6659,12 +8268,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramConnectionStatsClientToRouter * @static - * @param {ICMsgSteamDatagramConnectionStatsClientToRouter} message CMsgSteamDatagramConnectionStatsClientToRouter message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsClientToRouter.$Properties} message CMsgSteamDatagramConnectionStatsClientToRouter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsClientToRouter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramConnectionStatsClientToRouter.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6674,63 +8283,106 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramConnectionStatsClientToRouter} CMsgSteamDatagramConnectionStatsClientToRouter + * @returns {CMsgSteamDatagramConnectionStatsClientToRouter & CMsgSteamDatagramConnectionStatsClientToRouter.$Shape} CMsgSteamDatagramConnectionStatsClientToRouter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsClientToRouter.decode = function decode(reader, length) { + CMsgSteamDatagramConnectionStatsClientToRouter.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramConnectionStatsClientToRouter(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramConnectionStatsClientToRouter(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.c2r = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); - break; - case 2: - message.c2s = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); - break; - case 3: - message.legacy_client_timestamp = reader.fixed32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 4: - if (!(message.ack_relay && message.ack_relay.length)) - message.ack_relay = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_relay.push(reader.fixed32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.c2r = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.c2r); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.c2s = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.c2s); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.legacy_client_timestamp = reader.fixed32(); + continue; + } + case 4: { + if (wireType === 2) { + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; + reader.fixed32s(message.ack_relay); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; message.ack_relay.push(reader.fixed32()); - break; - case 5: - if (!(message.ack_e2e && message.ack_e2e.length)) - message.ack_e2e = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_e2e.push(reader.fixed32()); - } else + continue; + } + case 5: { + if (wireType === 2) { + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; + reader.fixed32s(message.ack_e2e); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; message.ack_e2e.push(reader.fixed32()); - break; - case 6: - message.flags = reader.uint32(); - break; - case 8: - message.client_connection_id = reader.fixed32(); - break; - case 9: - message.seq_num_c2r = reader.uint32(); - break; - case 10: - message.seq_num_c2s = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 6: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 5) + break; + message.client_connection_id = reader.fixed32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.seq_num_c2r = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.seq_num_c2s = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6740,11 +8392,11 @@ * @memberof CMsgSteamDatagramConnectionStatsClientToRouter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramConnectionStatsClientToRouter} CMsgSteamDatagramConnectionStatsClientToRouter + * @returns {CMsgSteamDatagramConnectionStatsClientToRouter & CMsgSteamDatagramConnectionStatsClientToRouter.$Shape} CMsgSteamDatagramConnectionStatsClientToRouter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsClientToRouter.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramConnectionStatsClientToRouter.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6758,46 +8410,50 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramConnectionStatsClientToRouter.verify = function verify(message) { + CMsgSteamDatagramConnectionStatsClientToRouter.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.c2r != null && message.hasOwnProperty("c2r")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.c2r); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.c2r != null && $Object.hasOwnProperty.call(message, "c2r")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.c2r, _depth + 1); if (error) return "c2r." + error; } - if (message.c2s != null && message.hasOwnProperty("c2s")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.c2s); + if (message.c2s != null && $Object.hasOwnProperty.call(message, "c2s")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.c2s, _depth + 1); if (error) return "c2s." + error; } - if (message.legacy_client_timestamp != null && message.hasOwnProperty("legacy_client_timestamp")) + if (message.legacy_client_timestamp != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp")) if (!$util.isInteger(message.legacy_client_timestamp)) return "legacy_client_timestamp: integer expected"; - if (message.ack_relay != null && message.hasOwnProperty("ack_relay")) { - if (!Array.isArray(message.ack_relay)) + if (message.ack_relay != null && $Object.hasOwnProperty.call(message, "ack_relay")) { + if (!$Array.isArray(message.ack_relay)) return "ack_relay: array expected"; for (var i = 0; i < message.ack_relay.length; ++i) if (!$util.isInteger(message.ack_relay[i])) return "ack_relay: integer[] expected"; } - if (message.ack_e2e != null && message.hasOwnProperty("ack_e2e")) { - if (!Array.isArray(message.ack_e2e)) + if (message.ack_e2e != null && $Object.hasOwnProperty.call(message, "ack_e2e")) { + if (!$Array.isArray(message.ack_e2e)) return "ack_e2e: array expected"; for (var i = 0; i < message.ack_e2e.length; ++i) if (!$util.isInteger(message.ack_e2e[i])) return "ack_e2e: integer[] expected"; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) if (!$util.isInteger(message.client_connection_id)) return "client_connection_id: integer expected"; - if (message.seq_num_c2r != null && message.hasOwnProperty("seq_num_c2r")) + if (message.seq_num_c2r != null && $Object.hasOwnProperty.call(message, "seq_num_c2r")) if (!$util.isInteger(message.seq_num_c2r)) return "seq_num_c2r: integer expected"; - if (message.seq_num_c2s != null && message.hasOwnProperty("seq_num_c2s")) + if (message.seq_num_c2s != null && $Object.hasOwnProperty.call(message, "seq_num_c2s")) if (!$util.isInteger(message.seq_num_c2s)) return "seq_num_c2s: integer expected"; return null; @@ -6811,33 +8467,39 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramConnectionStatsClientToRouter} CMsgSteamDatagramConnectionStatsClientToRouter */ - CMsgSteamDatagramConnectionStatsClientToRouter.fromObject = function fromObject(object) { + CMsgSteamDatagramConnectionStatsClientToRouter.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramConnectionStatsClientToRouter) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsClientToRouter: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramConnectionStatsClientToRouter(); if (object.c2r != null) { - if (typeof object.c2r !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsClientToRouter.c2r: object expected"); - message.c2r = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.c2r); + if (!$util.isObject(object.c2r)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsClientToRouter.c2r: object expected"); + message.c2r = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.c2r, _depth + 1); } if (object.c2s != null) { - if (typeof object.c2s !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsClientToRouter.c2s: object expected"); - message.c2s = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.c2s); + if (!$util.isObject(object.c2s)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsClientToRouter.c2s: object expected"); + message.c2s = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.c2s, _depth + 1); } if (object.legacy_client_timestamp != null) message.legacy_client_timestamp = object.legacy_client_timestamp >>> 0; if (object.ack_relay) { - if (!Array.isArray(object.ack_relay)) - throw TypeError(".CMsgSteamDatagramConnectionStatsClientToRouter.ack_relay: array expected"); - message.ack_relay = []; + if (!$Array.isArray(object.ack_relay)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsClientToRouter.ack_relay: array expected"); + message.ack_relay = $Array(object.ack_relay.length); for (var i = 0; i < object.ack_relay.length; ++i) message.ack_relay[i] = object.ack_relay[i] >>> 0; } if (object.ack_e2e) { - if (!Array.isArray(object.ack_e2e)) - throw TypeError(".CMsgSteamDatagramConnectionStatsClientToRouter.ack_e2e: array expected"); - message.ack_e2e = []; + if (!$Array.isArray(object.ack_e2e)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsClientToRouter.ack_e2e: array expected"); + message.ack_e2e = $Array(object.ack_e2e.length); for (var i = 0; i < object.ack_e2e.length; ++i) message.ack_e2e[i] = object.ack_e2e[i] >>> 0; } @@ -6861,9 +8523,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramConnectionStatsClientToRouter.toObject = function toObject(message, options) { + CMsgSteamDatagramConnectionStatsClientToRouter.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.ack_relay = []; @@ -6878,29 +8544,29 @@ object.seq_num_c2r = 0; object.seq_num_c2s = 0; } - if (message.c2r != null && message.hasOwnProperty("c2r")) - object.c2r = $root.CMsgSteamDatagramConnectionQuality.toObject(message.c2r, options); - if (message.c2s != null && message.hasOwnProperty("c2s")) - object.c2s = $root.CMsgSteamDatagramConnectionQuality.toObject(message.c2s, options); - if (message.legacy_client_timestamp != null && message.hasOwnProperty("legacy_client_timestamp")) + if (message.c2r != null && $Object.hasOwnProperty.call(message, "c2r")) + object.c2r = $root.CMsgSteamDatagramConnectionQuality.toObject(message.c2r, options, _depth + 1); + if (message.c2s != null && $Object.hasOwnProperty.call(message, "c2s")) + object.c2s = $root.CMsgSteamDatagramConnectionQuality.toObject(message.c2s, options, _depth + 1); + if (message.legacy_client_timestamp != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp")) object.legacy_client_timestamp = message.legacy_client_timestamp; if (message.ack_relay && message.ack_relay.length) { - object.ack_relay = []; + object.ack_relay = $Array(message.ack_relay.length); for (var j = 0; j < message.ack_relay.length; ++j) object.ack_relay[j] = message.ack_relay[j]; } if (message.ack_e2e && message.ack_e2e.length) { - object.ack_e2e = []; + object.ack_e2e = $Array(message.ack_e2e.length); for (var j = 0; j < message.ack_e2e.length; ++j) object.ack_e2e[j] = message.ack_e2e[j]; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) object.client_connection_id = message.client_connection_id; - if (message.seq_num_c2r != null && message.hasOwnProperty("seq_num_c2r")) + if (message.seq_num_c2r != null && $Object.hasOwnProperty.call(message, "seq_num_c2r")) object.seq_num_c2r = message.seq_num_c2r; - if (message.seq_num_c2s != null && message.hasOwnProperty("seq_num_c2s")) + if (message.seq_num_c2s != null && $Object.hasOwnProperty.call(message, "seq_num_c2s")) object.seq_num_c2s = message.seq_num_c2s; return object; }; @@ -6912,20 +8578,34 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramConnectionStatsClientToRouter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramConnectionStatsClientToRouter.prototype.toJSON = function() { + return CMsgSteamDatagramConnectionStatsClientToRouter.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Flags enum. - * @name CMsgSteamDatagramConnectionStatsClientToRouter.Flags - * @enum {number} - * @property {number} ACK_REQUEST_RELAY=1 ACK_REQUEST_RELAY value - * @property {number} ACK_REQUEST_E2E=2 ACK_REQUEST_E2E value + * Gets the type url for CMsgSteamDatagramConnectionStatsClientToRouter + * @function getTypeUrl + * @memberof CMsgSteamDatagramConnectionStatsClientToRouter + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramConnectionStatsClientToRouter.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramConnectionStatsClientToRouter"; + }; + + /** + * Flags enum. + * @name CMsgSteamDatagramConnectionStatsClientToRouter.Flags + * @enum {number} + * @property {number} ACK_REQUEST_RELAY=1 ACK_REQUEST_RELAY value + * @property {number} ACK_REQUEST_E2E=2 ACK_REQUEST_E2E value * @property {number} ACK_REQUEST_IMMEDIATE=4 ACK_REQUEST_IMMEDIATE value */ CMsgSteamDatagramConnectionStatsClientToRouter.Flags = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "ACK_REQUEST_RELAY"] = 1; values[valuesById[2] = "ACK_REQUEST_E2E"] = 2; values[valuesById[4] = "ACK_REQUEST_IMMEDIATE"] = 4; @@ -6939,10 +8619,9 @@ /** * Properties of a CMsgSteamDatagramConnectionStatsRouterToClient. - * @exports ICMsgSteamDatagramConnectionStatsRouterToClient - * @interface ICMsgSteamDatagramConnectionStatsRouterToClient - * @property {ICMsgSteamDatagramConnectionQuality|null} [r2c] CMsgSteamDatagramConnectionStatsRouterToClient r2c - * @property {ICMsgSteamDatagramConnectionQuality|null} [s2c] CMsgSteamDatagramConnectionStatsRouterToClient s2c + * @typedef {Object} CMsgSteamDatagramConnectionStatsRouterToClient.$Properties + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [r2c] CMsgSteamDatagramConnectionStatsRouterToClient r2c + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [s2c] CMsgSteamDatagramConnectionStatsRouterToClient s2c * @property {number|null} [legacy_client_timestamp_from_router] CMsgSteamDatagramConnectionStatsRouterToClient legacy_client_timestamp_from_router * @property {number|null} [legacy_client_timestamp_from_server] CMsgSteamDatagramConnectionStatsRouterToClient legacy_client_timestamp_from_server * @property {number|null} [router_gameserver_latency] CMsgSteamDatagramConnectionStatsRouterToClient router_gameserver_latency @@ -6956,28 +8635,42 @@ * @property {number|null} [client_connection_id] CMsgSteamDatagramConnectionStatsRouterToClient client_connection_id * @property {number|null} [seq_num_r2c] CMsgSteamDatagramConnectionStatsRouterToClient seq_num_r2c * @property {number|null} [seq_num_s2c] CMsgSteamDatagramConnectionStatsRouterToClient seq_num_s2c + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramConnectionStatsRouterToClient. + * @exports ICMsgSteamDatagramConnectionStatsRouterToClient + * @interface ICMsgSteamDatagramConnectionStatsRouterToClient + * @augments CMsgSteamDatagramConnectionStatsRouterToClient.$Properties + * @deprecated Use CMsgSteamDatagramConnectionStatsRouterToClient.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramConnectionStatsRouterToClient. + * @typedef {CMsgSteamDatagramConnectionStatsRouterToClient.$Properties} CMsgSteamDatagramConnectionStatsRouterToClient.$Shape */ /** * Constructs a new CMsgSteamDatagramConnectionStatsRouterToClient. * @exports CMsgSteamDatagramConnectionStatsRouterToClient * @classdesc Represents a CMsgSteamDatagramConnectionStatsRouterToClient. - * @implements ICMsgSteamDatagramConnectionStatsRouterToClient * @constructor - * @param {ICMsgSteamDatagramConnectionStatsRouterToClient=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsRouterToClient.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramConnectionStatsRouterToClient(properties) { + var CMsgSteamDatagramConnectionStatsRouterToClient = function (properties) { this.ack_relay = []; this.ack_e2e = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramConnectionStatsRouterToClient r2c. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} r2c + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} r2c * @memberof CMsgSteamDatagramConnectionStatsRouterToClient * @instance */ @@ -6985,7 +8678,7 @@ /** * CMsgSteamDatagramConnectionStatsRouterToClient s2c. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} s2c + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} s2c * @memberof CMsgSteamDatagramConnectionStatsRouterToClient * @instance */ @@ -7100,10 +8793,14 @@ * @function create * @memberof CMsgSteamDatagramConnectionStatsRouterToClient * @static - * @param {ICMsgSteamDatagramConnectionStatsRouterToClient=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsRouterToClient.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramConnectionStatsRouterToClient} CMsgSteamDatagramConnectionStatsRouterToClient instance + * @type {{ + * (properties: CMsgSteamDatagramConnectionStatsRouterToClient.$Shape): CMsgSteamDatagramConnectionStatsRouterToClient & CMsgSteamDatagramConnectionStatsRouterToClient.$Shape; + * (properties?: CMsgSteamDatagramConnectionStatsRouterToClient.$Properties): CMsgSteamDatagramConnectionStatsRouterToClient; + * }} */ - CMsgSteamDatagramConnectionStatsRouterToClient.create = function create(properties) { + CMsgSteamDatagramConnectionStatsRouterToClient.create = function(properties) { return new CMsgSteamDatagramConnectionStatsRouterToClient(properties); }; @@ -7112,36 +8809,40 @@ * @function encode * @memberof CMsgSteamDatagramConnectionStatsRouterToClient * @static - * @param {ICMsgSteamDatagramConnectionStatsRouterToClient} message CMsgSteamDatagramConnectionStatsRouterToClient message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsRouterToClient.$Properties} message CMsgSteamDatagramConnectionStatsRouterToClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsRouterToClient.encode = function encode(message, writer) { + CMsgSteamDatagramConnectionStatsRouterToClient.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.r2c != null && Object.hasOwnProperty.call(message, "r2c")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.r2c, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.s2c != null && Object.hasOwnProperty.call(message, "s2c")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.s2c, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.legacy_client_timestamp_from_router != null && Object.hasOwnProperty.call(message, "legacy_client_timestamp_from_router")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.r2c != null && $Object.hasOwnProperty.call(message, "r2c")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.r2c, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.s2c != null && $Object.hasOwnProperty.call(message, "s2c")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.s2c, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.legacy_client_timestamp_from_router != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp_from_router")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.legacy_client_timestamp_from_router); - if (message.legacy_client_timestamp_from_server != null && Object.hasOwnProperty.call(message, "legacy_client_timestamp_from_server")) + if (message.legacy_client_timestamp_from_server != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp_from_server")) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.legacy_client_timestamp_from_server); - if (message.router_gameserver_latency != null && Object.hasOwnProperty.call(message, "router_gameserver_latency")) + if (message.router_gameserver_latency != null && $Object.hasOwnProperty.call(message, "router_gameserver_latency")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.router_gameserver_latency); - if (message.seconds_until_shutdown != null && Object.hasOwnProperty.call(message, "seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.seconds_until_shutdown); - if (message.client_connection_id != null && Object.hasOwnProperty.call(message, "client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.client_connection_id); - if (message.seq_num_r2c != null && Object.hasOwnProperty.call(message, "seq_num_r2c")) + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.seq_num_r2c); - if (message.seq_num_s2c != null && Object.hasOwnProperty.call(message, "seq_num_s2c")) + if (message.seq_num_s2c != null && $Object.hasOwnProperty.call(message, "seq_num_s2c")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.seq_num_s2c); - if (message.migrate_request_ip != null && Object.hasOwnProperty.call(message, "migrate_request_ip")) + if (message.migrate_request_ip != null && $Object.hasOwnProperty.call(message, "migrate_request_ip")) writer.uint32(/* id 10, wireType 5 =*/85).fixed32(message.migrate_request_ip); - if (message.migrate_request_port != null && Object.hasOwnProperty.call(message, "migrate_request_port")) + if (message.migrate_request_port != null && $Object.hasOwnProperty.call(message, "migrate_request_port")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.migrate_request_port); - if (message.scoring_penalty_relay_cluster != null && Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) + if (message.scoring_penalty_relay_cluster != null && $Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.scoring_penalty_relay_cluster); if (message.ack_relay != null && message.ack_relay.length) for (var i = 0; i < message.ack_relay.length; ++i) @@ -7149,8 +8850,11 @@ if (message.ack_e2e != null && message.ack_e2e.length) for (var i = 0; i < message.ack_e2e.length; ++i) writer.uint32(/* id 14, wireType 5 =*/117).fixed32(message.ack_e2e[i]); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.flags); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7159,12 +8863,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramConnectionStatsRouterToClient * @static - * @param {ICMsgSteamDatagramConnectionStatsRouterToClient} message CMsgSteamDatagramConnectionStatsRouterToClient message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsRouterToClient.$Properties} message CMsgSteamDatagramConnectionStatsRouterToClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsRouterToClient.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramConnectionStatsRouterToClient.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7174,81 +8878,142 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramConnectionStatsRouterToClient} CMsgSteamDatagramConnectionStatsRouterToClient + * @returns {CMsgSteamDatagramConnectionStatsRouterToClient & CMsgSteamDatagramConnectionStatsRouterToClient.$Shape} CMsgSteamDatagramConnectionStatsRouterToClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsRouterToClient.decode = function decode(reader, length) { + CMsgSteamDatagramConnectionStatsRouterToClient.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramConnectionStatsRouterToClient(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramConnectionStatsRouterToClient(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.r2c = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); - break; - case 2: - message.s2c = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); - break; - case 3: - message.legacy_client_timestamp_from_router = reader.fixed32(); - break; - case 4: - message.legacy_client_timestamp_from_server = reader.fixed32(); - break; - case 5: - message.router_gameserver_latency = reader.uint32(); - break; - case 6: - message.seconds_until_shutdown = reader.uint32(); - break; - case 10: - message.migrate_request_ip = reader.fixed32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 11: - message.migrate_request_port = reader.uint32(); - break; - case 12: - message.scoring_penalty_relay_cluster = reader.uint32(); - break; - case 13: - if (!(message.ack_relay && message.ack_relay.length)) - message.ack_relay = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_relay.push(reader.fixed32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.r2c = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.r2c); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.s2c = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.s2c); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.legacy_client_timestamp_from_router = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.legacy_client_timestamp_from_server = reader.fixed32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.router_gameserver_latency = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.seconds_until_shutdown = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 5) + break; + message.migrate_request_ip = reader.fixed32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.migrate_request_port = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.scoring_penalty_relay_cluster = reader.uint32(); + continue; + } + case 13: { + if (wireType === 2) { + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; + reader.fixed32s(message.ack_relay); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; message.ack_relay.push(reader.fixed32()); - break; - case 14: - if (!(message.ack_e2e && message.ack_e2e.length)) - message.ack_e2e = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_e2e.push(reader.fixed32()); - } else + continue; + } + case 14: { + if (wireType === 2) { + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; + reader.fixed32s(message.ack_e2e); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; message.ack_e2e.push(reader.fixed32()); - break; - case 15: - message.flags = reader.uint32(); - break; - case 7: - message.client_connection_id = reader.fixed32(); - break; - case 8: - message.seq_num_r2c = reader.uint32(); - break; - case 9: - message.seq_num_s2c = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 15: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.client_connection_id = reader.fixed32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.seq_num_r2c = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.seq_num_s2c = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7258,11 +9023,11 @@ * @memberof CMsgSteamDatagramConnectionStatsRouterToClient * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramConnectionStatsRouterToClient} CMsgSteamDatagramConnectionStatsRouterToClient + * @returns {CMsgSteamDatagramConnectionStatsRouterToClient & CMsgSteamDatagramConnectionStatsRouterToClient.$Shape} CMsgSteamDatagramConnectionStatsRouterToClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsRouterToClient.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramConnectionStatsRouterToClient.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7276,64 +9041,68 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramConnectionStatsRouterToClient.verify = function verify(message) { + CMsgSteamDatagramConnectionStatsRouterToClient.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.r2c != null && message.hasOwnProperty("r2c")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.r2c); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.r2c != null && $Object.hasOwnProperty.call(message, "r2c")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.r2c, _depth + 1); if (error) return "r2c." + error; } - if (message.s2c != null && message.hasOwnProperty("s2c")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.s2c); + if (message.s2c != null && $Object.hasOwnProperty.call(message, "s2c")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.s2c, _depth + 1); if (error) return "s2c." + error; } - if (message.legacy_client_timestamp_from_router != null && message.hasOwnProperty("legacy_client_timestamp_from_router")) + if (message.legacy_client_timestamp_from_router != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp_from_router")) if (!$util.isInteger(message.legacy_client_timestamp_from_router)) return "legacy_client_timestamp_from_router: integer expected"; - if (message.legacy_client_timestamp_from_server != null && message.hasOwnProperty("legacy_client_timestamp_from_server")) + if (message.legacy_client_timestamp_from_server != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp_from_server")) if (!$util.isInteger(message.legacy_client_timestamp_from_server)) return "legacy_client_timestamp_from_server: integer expected"; - if (message.router_gameserver_latency != null && message.hasOwnProperty("router_gameserver_latency")) + if (message.router_gameserver_latency != null && $Object.hasOwnProperty.call(message, "router_gameserver_latency")) if (!$util.isInteger(message.router_gameserver_latency)) return "router_gameserver_latency: integer expected"; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) if (!$util.isInteger(message.seconds_until_shutdown)) return "seconds_until_shutdown: integer expected"; - if (message.migrate_request_ip != null && message.hasOwnProperty("migrate_request_ip")) + if (message.migrate_request_ip != null && $Object.hasOwnProperty.call(message, "migrate_request_ip")) if (!$util.isInteger(message.migrate_request_ip)) return "migrate_request_ip: integer expected"; - if (message.migrate_request_port != null && message.hasOwnProperty("migrate_request_port")) + if (message.migrate_request_port != null && $Object.hasOwnProperty.call(message, "migrate_request_port")) if (!$util.isInteger(message.migrate_request_port)) return "migrate_request_port: integer expected"; - if (message.scoring_penalty_relay_cluster != null && message.hasOwnProperty("scoring_penalty_relay_cluster")) + if (message.scoring_penalty_relay_cluster != null && $Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) if (!$util.isInteger(message.scoring_penalty_relay_cluster)) return "scoring_penalty_relay_cluster: integer expected"; - if (message.ack_relay != null && message.hasOwnProperty("ack_relay")) { - if (!Array.isArray(message.ack_relay)) + if (message.ack_relay != null && $Object.hasOwnProperty.call(message, "ack_relay")) { + if (!$Array.isArray(message.ack_relay)) return "ack_relay: array expected"; for (var i = 0; i < message.ack_relay.length; ++i) if (!$util.isInteger(message.ack_relay[i])) return "ack_relay: integer[] expected"; } - if (message.ack_e2e != null && message.hasOwnProperty("ack_e2e")) { - if (!Array.isArray(message.ack_e2e)) + if (message.ack_e2e != null && $Object.hasOwnProperty.call(message, "ack_e2e")) { + if (!$Array.isArray(message.ack_e2e)) return "ack_e2e: array expected"; for (var i = 0; i < message.ack_e2e.length; ++i) if (!$util.isInteger(message.ack_e2e[i])) return "ack_e2e: integer[] expected"; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) if (!$util.isInteger(message.client_connection_id)) return "client_connection_id: integer expected"; - if (message.seq_num_r2c != null && message.hasOwnProperty("seq_num_r2c")) + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) if (!$util.isInteger(message.seq_num_r2c)) return "seq_num_r2c: integer expected"; - if (message.seq_num_s2c != null && message.hasOwnProperty("seq_num_s2c")) + if (message.seq_num_s2c != null && $Object.hasOwnProperty.call(message, "seq_num_s2c")) if (!$util.isInteger(message.seq_num_s2c)) return "seq_num_s2c: integer expected"; return null; @@ -7347,19 +9116,25 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramConnectionStatsRouterToClient} CMsgSteamDatagramConnectionStatsRouterToClient */ - CMsgSteamDatagramConnectionStatsRouterToClient.fromObject = function fromObject(object) { + CMsgSteamDatagramConnectionStatsRouterToClient.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramConnectionStatsRouterToClient) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsRouterToClient: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramConnectionStatsRouterToClient(); if (object.r2c != null) { - if (typeof object.r2c !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsRouterToClient.r2c: object expected"); - message.r2c = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.r2c); + if (!$util.isObject(object.r2c)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsRouterToClient.r2c: object expected"); + message.r2c = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.r2c, _depth + 1); } if (object.s2c != null) { - if (typeof object.s2c !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsRouterToClient.s2c: object expected"); - message.s2c = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.s2c); + if (!$util.isObject(object.s2c)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsRouterToClient.s2c: object expected"); + message.s2c = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.s2c, _depth + 1); } if (object.legacy_client_timestamp_from_router != null) message.legacy_client_timestamp_from_router = object.legacy_client_timestamp_from_router >>> 0; @@ -7376,16 +9151,16 @@ if (object.scoring_penalty_relay_cluster != null) message.scoring_penalty_relay_cluster = object.scoring_penalty_relay_cluster >>> 0; if (object.ack_relay) { - if (!Array.isArray(object.ack_relay)) - throw TypeError(".CMsgSteamDatagramConnectionStatsRouterToClient.ack_relay: array expected"); - message.ack_relay = []; + if (!$Array.isArray(object.ack_relay)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsRouterToClient.ack_relay: array expected"); + message.ack_relay = $Array(object.ack_relay.length); for (var i = 0; i < object.ack_relay.length; ++i) message.ack_relay[i] = object.ack_relay[i] >>> 0; } if (object.ack_e2e) { - if (!Array.isArray(object.ack_e2e)) - throw TypeError(".CMsgSteamDatagramConnectionStatsRouterToClient.ack_e2e: array expected"); - message.ack_e2e = []; + if (!$Array.isArray(object.ack_e2e)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsRouterToClient.ack_e2e: array expected"); + message.ack_e2e = $Array(object.ack_e2e.length); for (var i = 0; i < object.ack_e2e.length; ++i) message.ack_e2e[i] = object.ack_e2e[i] >>> 0; } @@ -7409,9 +9184,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramConnectionStatsRouterToClient.toObject = function toObject(message, options) { + CMsgSteamDatagramConnectionStatsRouterToClient.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.ack_relay = []; @@ -7432,41 +9211,41 @@ object.scoring_penalty_relay_cluster = 0; object.flags = 0; } - if (message.r2c != null && message.hasOwnProperty("r2c")) - object.r2c = $root.CMsgSteamDatagramConnectionQuality.toObject(message.r2c, options); - if (message.s2c != null && message.hasOwnProperty("s2c")) - object.s2c = $root.CMsgSteamDatagramConnectionQuality.toObject(message.s2c, options); - if (message.legacy_client_timestamp_from_router != null && message.hasOwnProperty("legacy_client_timestamp_from_router")) + if (message.r2c != null && $Object.hasOwnProperty.call(message, "r2c")) + object.r2c = $root.CMsgSteamDatagramConnectionQuality.toObject(message.r2c, options, _depth + 1); + if (message.s2c != null && $Object.hasOwnProperty.call(message, "s2c")) + object.s2c = $root.CMsgSteamDatagramConnectionQuality.toObject(message.s2c, options, _depth + 1); + if (message.legacy_client_timestamp_from_router != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp_from_router")) object.legacy_client_timestamp_from_router = message.legacy_client_timestamp_from_router; - if (message.legacy_client_timestamp_from_server != null && message.hasOwnProperty("legacy_client_timestamp_from_server")) + if (message.legacy_client_timestamp_from_server != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp_from_server")) object.legacy_client_timestamp_from_server = message.legacy_client_timestamp_from_server; - if (message.router_gameserver_latency != null && message.hasOwnProperty("router_gameserver_latency")) + if (message.router_gameserver_latency != null && $Object.hasOwnProperty.call(message, "router_gameserver_latency")) object.router_gameserver_latency = message.router_gameserver_latency; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) object.seconds_until_shutdown = message.seconds_until_shutdown; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) object.client_connection_id = message.client_connection_id; - if (message.seq_num_r2c != null && message.hasOwnProperty("seq_num_r2c")) + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) object.seq_num_r2c = message.seq_num_r2c; - if (message.seq_num_s2c != null && message.hasOwnProperty("seq_num_s2c")) + if (message.seq_num_s2c != null && $Object.hasOwnProperty.call(message, "seq_num_s2c")) object.seq_num_s2c = message.seq_num_s2c; - if (message.migrate_request_ip != null && message.hasOwnProperty("migrate_request_ip")) + if (message.migrate_request_ip != null && $Object.hasOwnProperty.call(message, "migrate_request_ip")) object.migrate_request_ip = message.migrate_request_ip; - if (message.migrate_request_port != null && message.hasOwnProperty("migrate_request_port")) + if (message.migrate_request_port != null && $Object.hasOwnProperty.call(message, "migrate_request_port")) object.migrate_request_port = message.migrate_request_port; - if (message.scoring_penalty_relay_cluster != null && message.hasOwnProperty("scoring_penalty_relay_cluster")) + if (message.scoring_penalty_relay_cluster != null && $Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) object.scoring_penalty_relay_cluster = message.scoring_penalty_relay_cluster; if (message.ack_relay && message.ack_relay.length) { - object.ack_relay = []; + object.ack_relay = $Array(message.ack_relay.length); for (var j = 0; j < message.ack_relay.length; ++j) object.ack_relay[j] = message.ack_relay[j]; } if (message.ack_e2e && message.ack_e2e.length) { - object.ack_e2e = []; + object.ack_e2e = $Array(message.ack_e2e.length); for (var j = 0; j < message.ack_e2e.length; ++j) object.ack_e2e[j] = message.ack_e2e[j]; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; return object; }; @@ -7478,8 +9257,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramConnectionStatsRouterToClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramConnectionStatsRouterToClient.prototype.toJSON = function() { + return CMsgSteamDatagramConnectionStatsRouterToClient.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramConnectionStatsRouterToClient + * @function getTypeUrl + * @memberof CMsgSteamDatagramConnectionStatsRouterToClient + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramConnectionStatsRouterToClient.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramConnectionStatsRouterToClient"; }; /** @@ -7491,7 +9284,7 @@ * @property {number} ACK_REQUEST_IMMEDIATE=4 ACK_REQUEST_IMMEDIATE value */ CMsgSteamDatagramConnectionStatsRouterToClient.Flags = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "ACK_REQUEST_RELAY"] = 1; values[valuesById[2] = "ACK_REQUEST_E2E"] = 2; values[valuesById[4] = "ACK_REQUEST_IMMEDIATE"] = 4; @@ -7505,10 +9298,9 @@ /** * Properties of a CMsgSteamDatagramConnectionStatsRouterToServer. - * @exports ICMsgSteamDatagramConnectionStatsRouterToServer - * @interface ICMsgSteamDatagramConnectionStatsRouterToServer - * @property {ICMsgSteamDatagramConnectionQuality|null} [r2s] CMsgSteamDatagramConnectionStatsRouterToServer r2s - * @property {ICMsgSteamDatagramConnectionQuality|null} [c2s] CMsgSteamDatagramConnectionStatsRouterToServer c2s + * @typedef {Object} CMsgSteamDatagramConnectionStatsRouterToServer.$Properties + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [r2s] CMsgSteamDatagramConnectionStatsRouterToServer r2s + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [c2s] CMsgSteamDatagramConnectionStatsRouterToServer c2s * @property {number|null} [legacy_client_timestamp] CMsgSteamDatagramConnectionStatsRouterToServer legacy_client_timestamp * @property {number|null} [legacy_router_timestamp] CMsgSteamDatagramConnectionStatsRouterToServer legacy_router_timestamp * @property {Array.|null} [ack_relay] CMsgSteamDatagramConnectionStatsRouterToServer ack_relay @@ -7520,28 +9312,42 @@ * @property {number|null} [relay_session_id] CMsgSteamDatagramConnectionStatsRouterToServer relay_session_id * @property {number|null} [client_connection_id] CMsgSteamDatagramConnectionStatsRouterToServer client_connection_id * @property {number|null} [server_connection_id] CMsgSteamDatagramConnectionStatsRouterToServer server_connection_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramConnectionStatsRouterToServer. + * @exports ICMsgSteamDatagramConnectionStatsRouterToServer + * @interface ICMsgSteamDatagramConnectionStatsRouterToServer + * @augments CMsgSteamDatagramConnectionStatsRouterToServer.$Properties + * @deprecated Use CMsgSteamDatagramConnectionStatsRouterToServer.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramConnectionStatsRouterToServer. + * @typedef {CMsgSteamDatagramConnectionStatsRouterToServer.$Properties} CMsgSteamDatagramConnectionStatsRouterToServer.$Shape */ /** * Constructs a new CMsgSteamDatagramConnectionStatsRouterToServer. * @exports CMsgSteamDatagramConnectionStatsRouterToServer * @classdesc Represents a CMsgSteamDatagramConnectionStatsRouterToServer. - * @implements ICMsgSteamDatagramConnectionStatsRouterToServer * @constructor - * @param {ICMsgSteamDatagramConnectionStatsRouterToServer=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsRouterToServer.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramConnectionStatsRouterToServer(properties) { + var CMsgSteamDatagramConnectionStatsRouterToServer = function (properties) { this.ack_relay = []; this.ack_e2e = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramConnectionStatsRouterToServer r2s. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} r2s + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} r2s * @memberof CMsgSteamDatagramConnectionStatsRouterToServer * @instance */ @@ -7549,7 +9355,7 @@ /** * CMsgSteamDatagramConnectionStatsRouterToServer c2s. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} c2s + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} c2s * @memberof CMsgSteamDatagramConnectionStatsRouterToServer * @instance */ @@ -7617,7 +9423,7 @@ * @memberof CMsgSteamDatagramConnectionStatsRouterToServer * @instance */ - CMsgSteamDatagramConnectionStatsRouterToServer.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramConnectionStatsRouterToServer.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramConnectionStatsRouterToServer relay_session_id. @@ -7648,10 +9454,14 @@ * @function create * @memberof CMsgSteamDatagramConnectionStatsRouterToServer * @static - * @param {ICMsgSteamDatagramConnectionStatsRouterToServer=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsRouterToServer.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramConnectionStatsRouterToServer} CMsgSteamDatagramConnectionStatsRouterToServer instance + * @type {{ + * (properties: CMsgSteamDatagramConnectionStatsRouterToServer.$Shape): CMsgSteamDatagramConnectionStatsRouterToServer & CMsgSteamDatagramConnectionStatsRouterToServer.$Shape; + * (properties?: CMsgSteamDatagramConnectionStatsRouterToServer.$Properties): CMsgSteamDatagramConnectionStatsRouterToServer; + * }} */ - CMsgSteamDatagramConnectionStatsRouterToServer.create = function create(properties) { + CMsgSteamDatagramConnectionStatsRouterToServer.create = function(properties) { return new CMsgSteamDatagramConnectionStatsRouterToServer(properties); }; @@ -7660,30 +9470,34 @@ * @function encode * @memberof CMsgSteamDatagramConnectionStatsRouterToServer * @static - * @param {ICMsgSteamDatagramConnectionStatsRouterToServer} message CMsgSteamDatagramConnectionStatsRouterToServer message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsRouterToServer.$Properties} message CMsgSteamDatagramConnectionStatsRouterToServer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsRouterToServer.encode = function encode(message, writer) { + CMsgSteamDatagramConnectionStatsRouterToServer.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.r2s != null && Object.hasOwnProperty.call(message, "r2s")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.r2s, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.c2s != null && Object.hasOwnProperty.call(message, "c2s")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.c2s, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.legacy_client_timestamp != null && Object.hasOwnProperty.call(message, "legacy_client_timestamp")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.r2s != null && $Object.hasOwnProperty.call(message, "r2s")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.r2s, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.c2s != null && $Object.hasOwnProperty.call(message, "c2s")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.c2s, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.legacy_client_timestamp != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.legacy_client_timestamp); - if (message.legacy_router_timestamp != null && Object.hasOwnProperty.call(message, "legacy_router_timestamp")) + if (message.legacy_router_timestamp != null && $Object.hasOwnProperty.call(message, "legacy_router_timestamp")) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.legacy_router_timestamp); - if (message.seq_num_r2s != null && Object.hasOwnProperty.call(message, "seq_num_r2s")) + if (message.seq_num_r2s != null && $Object.hasOwnProperty.call(message, "seq_num_r2s")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.seq_num_r2s); - if (message.seq_num_c2s != null && Object.hasOwnProperty.call(message, "seq_num_c2s")) + if (message.seq_num_c2s != null && $Object.hasOwnProperty.call(message, "seq_num_c2s")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.seq_num_c2s); - if (message.client_steam_id != null && Object.hasOwnProperty.call(message, "client_steam_id")) + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) writer.uint32(/* id 7, wireType 1 =*/57).fixed64(message.client_steam_id); - if (message.relay_session_id != null && Object.hasOwnProperty.call(message, "relay_session_id")) + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.relay_session_id); - if (message.client_connection_id != null && Object.hasOwnProperty.call(message, "client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) writer.uint32(/* id 9, wireType 5 =*/77).fixed32(message.client_connection_id); if (message.ack_relay != null && message.ack_relay.length) for (var i = 0; i < message.ack_relay.length; ++i) @@ -7691,10 +9505,13 @@ if (message.ack_e2e != null && message.ack_e2e.length) for (var i = 0; i < message.ack_e2e.length; ++i) writer.uint32(/* id 11, wireType 5 =*/93).fixed32(message.ack_e2e[i]); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.flags); - if (message.server_connection_id != null && Object.hasOwnProperty.call(message, "server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) writer.uint32(/* id 13, wireType 5 =*/109).fixed32(message.server_connection_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7703,12 +9520,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramConnectionStatsRouterToServer * @static - * @param {ICMsgSteamDatagramConnectionStatsRouterToServer} message CMsgSteamDatagramConnectionStatsRouterToServer message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsRouterToServer.$Properties} message CMsgSteamDatagramConnectionStatsRouterToServer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsRouterToServer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramConnectionStatsRouterToServer.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7718,75 +9535,130 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramConnectionStatsRouterToServer} CMsgSteamDatagramConnectionStatsRouterToServer + * @returns {CMsgSteamDatagramConnectionStatsRouterToServer & CMsgSteamDatagramConnectionStatsRouterToServer.$Shape} CMsgSteamDatagramConnectionStatsRouterToServer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsRouterToServer.decode = function decode(reader, length) { + CMsgSteamDatagramConnectionStatsRouterToServer.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramConnectionStatsRouterToServer(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramConnectionStatsRouterToServer(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.r2s = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); - break; - case 2: - message.c2s = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); - break; - case 3: - message.legacy_client_timestamp = reader.fixed32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 4: - message.legacy_router_timestamp = reader.fixed32(); - break; - case 10: - if (!(message.ack_relay && message.ack_relay.length)) - message.ack_relay = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_relay.push(reader.fixed32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.r2s = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.r2s); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.c2s = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.c2s); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.legacy_client_timestamp = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.legacy_router_timestamp = reader.fixed32(); + continue; + } + case 10: { + if (wireType === 2) { + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; + reader.fixed32s(message.ack_relay); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; message.ack_relay.push(reader.fixed32()); - break; - case 11: - if (!(message.ack_e2e && message.ack_e2e.length)) - message.ack_e2e = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_e2e.push(reader.fixed32()); - } else + continue; + } + case 11: { + if (wireType === 2) { + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; + reader.fixed32s(message.ack_e2e); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; message.ack_e2e.push(reader.fixed32()); - break; - case 12: - message.flags = reader.uint32(); - break; - case 5: - message.seq_num_r2s = reader.uint32(); - break; - case 6: - message.seq_num_c2s = reader.uint32(); - break; - case 7: - message.client_steam_id = reader.fixed64(); - break; - case 8: - message.relay_session_id = reader.uint32(); - break; - case 9: - message.client_connection_id = reader.fixed32(); - break; - case 13: - message.server_connection_id = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 12: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.seq_num_r2s = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.seq_num_c2s = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 1) + break; + message.client_steam_id = reader.fixed64(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.relay_session_id = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 5) + break; + message.client_connection_id = reader.fixed32(); + continue; + } + case 13: { + if (wireType !== 5) + break; + message.server_connection_id = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7796,11 +9668,11 @@ * @memberof CMsgSteamDatagramConnectionStatsRouterToServer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramConnectionStatsRouterToServer} CMsgSteamDatagramConnectionStatsRouterToServer + * @returns {CMsgSteamDatagramConnectionStatsRouterToServer & CMsgSteamDatagramConnectionStatsRouterToServer.$Shape} CMsgSteamDatagramConnectionStatsRouterToServer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsRouterToServer.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramConnectionStatsRouterToServer.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7814,58 +9686,62 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramConnectionStatsRouterToServer.verify = function verify(message) { + CMsgSteamDatagramConnectionStatsRouterToServer.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.r2s != null && message.hasOwnProperty("r2s")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.r2s); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.r2s != null && $Object.hasOwnProperty.call(message, "r2s")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.r2s, _depth + 1); if (error) return "r2s." + error; } - if (message.c2s != null && message.hasOwnProperty("c2s")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.c2s); + if (message.c2s != null && $Object.hasOwnProperty.call(message, "c2s")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.c2s, _depth + 1); if (error) return "c2s." + error; } - if (message.legacy_client_timestamp != null && message.hasOwnProperty("legacy_client_timestamp")) + if (message.legacy_client_timestamp != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp")) if (!$util.isInteger(message.legacy_client_timestamp)) return "legacy_client_timestamp: integer expected"; - if (message.legacy_router_timestamp != null && message.hasOwnProperty("legacy_router_timestamp")) + if (message.legacy_router_timestamp != null && $Object.hasOwnProperty.call(message, "legacy_router_timestamp")) if (!$util.isInteger(message.legacy_router_timestamp)) return "legacy_router_timestamp: integer expected"; - if (message.ack_relay != null && message.hasOwnProperty("ack_relay")) { - if (!Array.isArray(message.ack_relay)) + if (message.ack_relay != null && $Object.hasOwnProperty.call(message, "ack_relay")) { + if (!$Array.isArray(message.ack_relay)) return "ack_relay: array expected"; for (var i = 0; i < message.ack_relay.length; ++i) if (!$util.isInteger(message.ack_relay[i])) return "ack_relay: integer[] expected"; } - if (message.ack_e2e != null && message.hasOwnProperty("ack_e2e")) { - if (!Array.isArray(message.ack_e2e)) + if (message.ack_e2e != null && $Object.hasOwnProperty.call(message, "ack_e2e")) { + if (!$Array.isArray(message.ack_e2e)) return "ack_e2e: array expected"; for (var i = 0; i < message.ack_e2e.length; ++i) if (!$util.isInteger(message.ack_e2e[i])) return "ack_e2e: integer[] expected"; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.seq_num_r2s != null && message.hasOwnProperty("seq_num_r2s")) + if (message.seq_num_r2s != null && $Object.hasOwnProperty.call(message, "seq_num_r2s")) if (!$util.isInteger(message.seq_num_r2s)) return "seq_num_r2s: integer expected"; - if (message.seq_num_c2s != null && message.hasOwnProperty("seq_num_c2s")) + if (message.seq_num_c2s != null && $Object.hasOwnProperty.call(message, "seq_num_c2s")) if (!$util.isInteger(message.seq_num_c2s)) return "seq_num_c2s: integer expected"; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) if (!$util.isInteger(message.client_steam_id) && !(message.client_steam_id && $util.isInteger(message.client_steam_id.low) && $util.isInteger(message.client_steam_id.high))) return "client_steam_id: integer|Long expected"; - if (message.relay_session_id != null && message.hasOwnProperty("relay_session_id")) + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) if (!$util.isInteger(message.relay_session_id)) return "relay_session_id: integer expected"; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) if (!$util.isInteger(message.client_connection_id)) return "client_connection_id: integer expected"; - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) if (!$util.isInteger(message.server_connection_id)) return "server_connection_id: integer expected"; return null; @@ -7879,35 +9755,41 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramConnectionStatsRouterToServer} CMsgSteamDatagramConnectionStatsRouterToServer */ - CMsgSteamDatagramConnectionStatsRouterToServer.fromObject = function fromObject(object) { + CMsgSteamDatagramConnectionStatsRouterToServer.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramConnectionStatsRouterToServer) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsRouterToServer: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramConnectionStatsRouterToServer(); if (object.r2s != null) { - if (typeof object.r2s !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsRouterToServer.r2s: object expected"); - message.r2s = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.r2s); + if (!$util.isObject(object.r2s)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsRouterToServer.r2s: object expected"); + message.r2s = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.r2s, _depth + 1); } if (object.c2s != null) { - if (typeof object.c2s !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsRouterToServer.c2s: object expected"); - message.c2s = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.c2s); + if (!$util.isObject(object.c2s)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsRouterToServer.c2s: object expected"); + message.c2s = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.c2s, _depth + 1); } if (object.legacy_client_timestamp != null) message.legacy_client_timestamp = object.legacy_client_timestamp >>> 0; if (object.legacy_router_timestamp != null) message.legacy_router_timestamp = object.legacy_router_timestamp >>> 0; if (object.ack_relay) { - if (!Array.isArray(object.ack_relay)) - throw TypeError(".CMsgSteamDatagramConnectionStatsRouterToServer.ack_relay: array expected"); - message.ack_relay = []; + if (!$Array.isArray(object.ack_relay)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsRouterToServer.ack_relay: array expected"); + message.ack_relay = $Array(object.ack_relay.length); for (var i = 0; i < object.ack_relay.length; ++i) message.ack_relay[i] = object.ack_relay[i] >>> 0; } if (object.ack_e2e) { - if (!Array.isArray(object.ack_e2e)) - throw TypeError(".CMsgSteamDatagramConnectionStatsRouterToServer.ack_e2e: array expected"); - message.ack_e2e = []; + if (!$Array.isArray(object.ack_e2e)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsRouterToServer.ack_e2e: array expected"); + message.ack_e2e = $Array(object.ack_e2e.length); for (var i = 0; i < object.ack_e2e.length; ++i) message.ack_e2e[i] = object.ack_e2e[i] >>> 0; } @@ -7919,13 +9801,13 @@ message.seq_num_c2s = object.seq_num_c2s >>> 0; if (object.client_steam_id != null) if ($util.Long) - (message.client_steam_id = $util.Long.fromValue(object.client_steam_id)).unsigned = false; + message.client_steam_id = $util.Long.fromValue(object.client_steam_id, true); else if (typeof object.client_steam_id === "string") - message.client_steam_id = parseInt(object.client_steam_id, 10); + message.client_steam_id = $parseInt(object.client_steam_id, 10); else if (typeof object.client_steam_id === "number") message.client_steam_id = object.client_steam_id; else if (typeof object.client_steam_id === "object") - message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(); + message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(true); if (object.relay_session_id != null) message.relay_session_id = object.relay_session_id >>> 0; if (object.client_connection_id != null) @@ -7944,9 +9826,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramConnectionStatsRouterToServer.toObject = function toObject(message, options) { + CMsgSteamDatagramConnectionStatsRouterToServer.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.ack_relay = []; @@ -7960,49 +9846,51 @@ object.seq_num_r2s = 0; object.seq_num_c2s = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.client_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.client_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.client_steam_id = options.longs === String ? "0" : 0; + object.client_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.relay_session_id = 0; object.client_connection_id = 0; object.flags = 0; object.server_connection_id = 0; } - if (message.r2s != null && message.hasOwnProperty("r2s")) - object.r2s = $root.CMsgSteamDatagramConnectionQuality.toObject(message.r2s, options); - if (message.c2s != null && message.hasOwnProperty("c2s")) - object.c2s = $root.CMsgSteamDatagramConnectionQuality.toObject(message.c2s, options); - if (message.legacy_client_timestamp != null && message.hasOwnProperty("legacy_client_timestamp")) + if (message.r2s != null && $Object.hasOwnProperty.call(message, "r2s")) + object.r2s = $root.CMsgSteamDatagramConnectionQuality.toObject(message.r2s, options, _depth + 1); + if (message.c2s != null && $Object.hasOwnProperty.call(message, "c2s")) + object.c2s = $root.CMsgSteamDatagramConnectionQuality.toObject(message.c2s, options, _depth + 1); + if (message.legacy_client_timestamp != null && $Object.hasOwnProperty.call(message, "legacy_client_timestamp")) object.legacy_client_timestamp = message.legacy_client_timestamp; - if (message.legacy_router_timestamp != null && message.hasOwnProperty("legacy_router_timestamp")) + if (message.legacy_router_timestamp != null && $Object.hasOwnProperty.call(message, "legacy_router_timestamp")) object.legacy_router_timestamp = message.legacy_router_timestamp; - if (message.seq_num_r2s != null && message.hasOwnProperty("seq_num_r2s")) + if (message.seq_num_r2s != null && $Object.hasOwnProperty.call(message, "seq_num_r2s")) object.seq_num_r2s = message.seq_num_r2s; - if (message.seq_num_c2s != null && message.hasOwnProperty("seq_num_c2s")) + if (message.seq_num_c2s != null && $Object.hasOwnProperty.call(message, "seq_num_c2s")) object.seq_num_c2s = message.seq_num_c2s; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) - if (typeof message.client_steam_id === "number") - object.client_steam_id = options.longs === String ? String(message.client_steam_id) : message.client_steam_id; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.client_steam_id = typeof message.client_steam_id === "number" ? $BigInt(message.client_steam_id) : $util.Long.fromBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.client_steam_id === "number") + object.client_steam_id = options.longs === $String ? $String(message.client_steam_id) : message.client_steam_id; else - object.client_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber() : message.client_steam_id; - if (message.relay_session_id != null && message.hasOwnProperty("relay_session_id")) + object.client_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === $Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber(true) : message.client_steam_id; + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) object.relay_session_id = message.relay_session_id; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) object.client_connection_id = message.client_connection_id; if (message.ack_relay && message.ack_relay.length) { - object.ack_relay = []; + object.ack_relay = $Array(message.ack_relay.length); for (var j = 0; j < message.ack_relay.length; ++j) object.ack_relay[j] = message.ack_relay[j]; } if (message.ack_e2e && message.ack_e2e.length) { - object.ack_e2e = []; + object.ack_e2e = $Array(message.ack_e2e.length); for (var j = 0; j < message.ack_e2e.length; ++j) object.ack_e2e[j] = message.ack_e2e[j]; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) object.server_connection_id = message.server_connection_id; return object; }; @@ -8014,8 +9902,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramConnectionStatsRouterToServer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramConnectionStatsRouterToServer.prototype.toJSON = function() { + return CMsgSteamDatagramConnectionStatsRouterToServer.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramConnectionStatsRouterToServer + * @function getTypeUrl + * @memberof CMsgSteamDatagramConnectionStatsRouterToServer + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramConnectionStatsRouterToServer.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramConnectionStatsRouterToServer"; }; /** @@ -8027,7 +9929,7 @@ * @property {number} ACK_REQUEST_IMMEDIATE=4 ACK_REQUEST_IMMEDIATE value */ CMsgSteamDatagramConnectionStatsRouterToServer.Flags = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "ACK_REQUEST_RELAY"] = 1; values[valuesById[2] = "ACK_REQUEST_E2E"] = 2; values[valuesById[4] = "ACK_REQUEST_IMMEDIATE"] = 4; @@ -8041,10 +9943,9 @@ /** * Properties of a CMsgSteamDatagramConnectionStatsServerToRouter. - * @exports ICMsgSteamDatagramConnectionStatsServerToRouter - * @interface ICMsgSteamDatagramConnectionStatsServerToRouter - * @property {ICMsgSteamDatagramConnectionQuality|null} [s2r] CMsgSteamDatagramConnectionStatsServerToRouter s2r - * @property {ICMsgSteamDatagramConnectionQuality|null} [s2c] CMsgSteamDatagramConnectionStatsServerToRouter s2c + * @typedef {Object} CMsgSteamDatagramConnectionStatsServerToRouter.$Properties + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [s2r] CMsgSteamDatagramConnectionStatsServerToRouter s2r + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [s2c] CMsgSteamDatagramConnectionStatsServerToRouter s2c * @property {Array.|null} [ack_relay] CMsgSteamDatagramConnectionStatsServerToRouter ack_relay * @property {Array.|null} [ack_e2e] CMsgSteamDatagramConnectionStatsServerToRouter ack_e2e * @property {number|null} [flags] CMsgSteamDatagramConnectionStatsServerToRouter flags @@ -8054,28 +9955,42 @@ * @property {number|null} [relay_session_id] CMsgSteamDatagramConnectionStatsServerToRouter relay_session_id * @property {number|null} [client_connection_id] CMsgSteamDatagramConnectionStatsServerToRouter client_connection_id * @property {number|null} [server_connection_id] CMsgSteamDatagramConnectionStatsServerToRouter server_connection_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramConnectionStatsServerToRouter. + * @exports ICMsgSteamDatagramConnectionStatsServerToRouter + * @interface ICMsgSteamDatagramConnectionStatsServerToRouter + * @augments CMsgSteamDatagramConnectionStatsServerToRouter.$Properties + * @deprecated Use CMsgSteamDatagramConnectionStatsServerToRouter.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramConnectionStatsServerToRouter. + * @typedef {CMsgSteamDatagramConnectionStatsServerToRouter.$Properties} CMsgSteamDatagramConnectionStatsServerToRouter.$Shape */ /** * Constructs a new CMsgSteamDatagramConnectionStatsServerToRouter. * @exports CMsgSteamDatagramConnectionStatsServerToRouter * @classdesc Represents a CMsgSteamDatagramConnectionStatsServerToRouter. - * @implements ICMsgSteamDatagramConnectionStatsServerToRouter * @constructor - * @param {ICMsgSteamDatagramConnectionStatsServerToRouter=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsServerToRouter.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramConnectionStatsServerToRouter(properties) { + var CMsgSteamDatagramConnectionStatsServerToRouter = function (properties) { this.ack_relay = []; this.ack_e2e = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramConnectionStatsServerToRouter s2r. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} s2r + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} s2r * @memberof CMsgSteamDatagramConnectionStatsServerToRouter * @instance */ @@ -8083,7 +9998,7 @@ /** * CMsgSteamDatagramConnectionStatsServerToRouter s2c. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} s2c + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} s2c * @memberof CMsgSteamDatagramConnectionStatsServerToRouter * @instance */ @@ -8135,7 +10050,7 @@ * @memberof CMsgSteamDatagramConnectionStatsServerToRouter * @instance */ - CMsgSteamDatagramConnectionStatsServerToRouter.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramConnectionStatsServerToRouter.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramConnectionStatsServerToRouter relay_session_id. @@ -8166,10 +10081,14 @@ * @function create * @memberof CMsgSteamDatagramConnectionStatsServerToRouter * @static - * @param {ICMsgSteamDatagramConnectionStatsServerToRouter=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsServerToRouter.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramConnectionStatsServerToRouter} CMsgSteamDatagramConnectionStatsServerToRouter instance + * @type {{ + * (properties: CMsgSteamDatagramConnectionStatsServerToRouter.$Shape): CMsgSteamDatagramConnectionStatsServerToRouter & CMsgSteamDatagramConnectionStatsServerToRouter.$Shape; + * (properties?: CMsgSteamDatagramConnectionStatsServerToRouter.$Properties): CMsgSteamDatagramConnectionStatsServerToRouter; + * }} */ - CMsgSteamDatagramConnectionStatsServerToRouter.create = function create(properties) { + CMsgSteamDatagramConnectionStatsServerToRouter.create = function(properties) { return new CMsgSteamDatagramConnectionStatsServerToRouter(properties); }; @@ -8178,26 +10097,30 @@ * @function encode * @memberof CMsgSteamDatagramConnectionStatsServerToRouter * @static - * @param {ICMsgSteamDatagramConnectionStatsServerToRouter} message CMsgSteamDatagramConnectionStatsServerToRouter message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsServerToRouter.$Properties} message CMsgSteamDatagramConnectionStatsServerToRouter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsServerToRouter.encode = function encode(message, writer) { + CMsgSteamDatagramConnectionStatsServerToRouter.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.s2r != null && Object.hasOwnProperty.call(message, "s2r")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.s2r, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.s2c != null && Object.hasOwnProperty.call(message, "s2c")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.s2c, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.seq_num_s2r != null && Object.hasOwnProperty.call(message, "seq_num_s2r")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.s2r != null && $Object.hasOwnProperty.call(message, "s2r")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.s2r, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.s2c != null && $Object.hasOwnProperty.call(message, "s2c")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.s2c, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.seq_num_s2r != null && $Object.hasOwnProperty.call(message, "seq_num_s2r")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.seq_num_s2r); - if (message.seq_num_s2c != null && Object.hasOwnProperty.call(message, "seq_num_s2c")) + if (message.seq_num_s2c != null && $Object.hasOwnProperty.call(message, "seq_num_s2c")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.seq_num_s2c); - if (message.client_steam_id != null && Object.hasOwnProperty.call(message, "client_steam_id")) + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.client_steam_id); - if (message.relay_session_id != null && Object.hasOwnProperty.call(message, "relay_session_id")) + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.relay_session_id); - if (message.client_connection_id != null && Object.hasOwnProperty.call(message, "client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.client_connection_id); if (message.ack_relay != null && message.ack_relay.length) for (var i = 0; i < message.ack_relay.length; ++i) @@ -8205,10 +10128,13 @@ if (message.ack_e2e != null && message.ack_e2e.length) for (var i = 0; i < message.ack_e2e.length; ++i) writer.uint32(/* id 9, wireType 5 =*/77).fixed32(message.ack_e2e[i]); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.flags); - if (message.server_connection_id != null && Object.hasOwnProperty.call(message, "server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) writer.uint32(/* id 11, wireType 5 =*/93).fixed32(message.server_connection_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8217,12 +10143,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramConnectionStatsServerToRouter * @static - * @param {ICMsgSteamDatagramConnectionStatsServerToRouter} message CMsgSteamDatagramConnectionStatsServerToRouter message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsServerToRouter.$Properties} message CMsgSteamDatagramConnectionStatsServerToRouter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsServerToRouter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramConnectionStatsServerToRouter.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8232,69 +10158,118 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramConnectionStatsServerToRouter} CMsgSteamDatagramConnectionStatsServerToRouter + * @returns {CMsgSteamDatagramConnectionStatsServerToRouter & CMsgSteamDatagramConnectionStatsServerToRouter.$Shape} CMsgSteamDatagramConnectionStatsServerToRouter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsServerToRouter.decode = function decode(reader, length) { + CMsgSteamDatagramConnectionStatsServerToRouter.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramConnectionStatsServerToRouter(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramConnectionStatsServerToRouter(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.s2r = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); - break; - case 2: - message.s2c = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 8: - if (!(message.ack_relay && message.ack_relay.length)) - message.ack_relay = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_relay.push(reader.fixed32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.s2r = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.s2r); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.s2c = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.s2c); + continue; + } + case 8: { + if (wireType === 2) { + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; + reader.fixed32s(message.ack_relay); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; message.ack_relay.push(reader.fixed32()); - break; - case 9: - if (!(message.ack_e2e && message.ack_e2e.length)) - message.ack_e2e = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_e2e.push(reader.fixed32()); - } else + continue; + } + case 9: { + if (wireType === 2) { + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; + reader.fixed32s(message.ack_e2e); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; message.ack_e2e.push(reader.fixed32()); - break; - case 10: - message.flags = reader.uint32(); - break; - case 3: - message.seq_num_s2r = reader.uint32(); - break; - case 4: - message.seq_num_s2c = reader.uint32(); - break; - case 5: - message.client_steam_id = reader.fixed64(); - break; - case 6: - message.relay_session_id = reader.uint32(); - break; - case 7: - message.client_connection_id = reader.fixed32(); - break; - case 11: - message.server_connection_id = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 10: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.seq_num_s2r = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.seq_num_s2c = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 1) + break; + message.client_steam_id = reader.fixed64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.relay_session_id = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.client_connection_id = reader.fixed32(); + continue; + } + case 11: { + if (wireType !== 5) + break; + message.server_connection_id = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8304,11 +10279,11 @@ * @memberof CMsgSteamDatagramConnectionStatsServerToRouter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramConnectionStatsServerToRouter} CMsgSteamDatagramConnectionStatsServerToRouter + * @returns {CMsgSteamDatagramConnectionStatsServerToRouter & CMsgSteamDatagramConnectionStatsServerToRouter.$Shape} CMsgSteamDatagramConnectionStatsServerToRouter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsServerToRouter.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramConnectionStatsServerToRouter.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8322,52 +10297,56 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramConnectionStatsServerToRouter.verify = function verify(message) { + CMsgSteamDatagramConnectionStatsServerToRouter.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.s2r != null && message.hasOwnProperty("s2r")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.s2r); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.s2r != null && $Object.hasOwnProperty.call(message, "s2r")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.s2r, _depth + 1); if (error) return "s2r." + error; } - if (message.s2c != null && message.hasOwnProperty("s2c")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.s2c); + if (message.s2c != null && $Object.hasOwnProperty.call(message, "s2c")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.s2c, _depth + 1); if (error) return "s2c." + error; } - if (message.ack_relay != null && message.hasOwnProperty("ack_relay")) { - if (!Array.isArray(message.ack_relay)) + if (message.ack_relay != null && $Object.hasOwnProperty.call(message, "ack_relay")) { + if (!$Array.isArray(message.ack_relay)) return "ack_relay: array expected"; for (var i = 0; i < message.ack_relay.length; ++i) if (!$util.isInteger(message.ack_relay[i])) return "ack_relay: integer[] expected"; } - if (message.ack_e2e != null && message.hasOwnProperty("ack_e2e")) { - if (!Array.isArray(message.ack_e2e)) + if (message.ack_e2e != null && $Object.hasOwnProperty.call(message, "ack_e2e")) { + if (!$Array.isArray(message.ack_e2e)) return "ack_e2e: array expected"; for (var i = 0; i < message.ack_e2e.length; ++i) if (!$util.isInteger(message.ack_e2e[i])) return "ack_e2e: integer[] expected"; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.seq_num_s2r != null && message.hasOwnProperty("seq_num_s2r")) + if (message.seq_num_s2r != null && $Object.hasOwnProperty.call(message, "seq_num_s2r")) if (!$util.isInteger(message.seq_num_s2r)) return "seq_num_s2r: integer expected"; - if (message.seq_num_s2c != null && message.hasOwnProperty("seq_num_s2c")) + if (message.seq_num_s2c != null && $Object.hasOwnProperty.call(message, "seq_num_s2c")) if (!$util.isInteger(message.seq_num_s2c)) return "seq_num_s2c: integer expected"; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) if (!$util.isInteger(message.client_steam_id) && !(message.client_steam_id && $util.isInteger(message.client_steam_id.low) && $util.isInteger(message.client_steam_id.high))) return "client_steam_id: integer|Long expected"; - if (message.relay_session_id != null && message.hasOwnProperty("relay_session_id")) + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) if (!$util.isInteger(message.relay_session_id)) return "relay_session_id: integer expected"; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) if (!$util.isInteger(message.client_connection_id)) return "client_connection_id: integer expected"; - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) if (!$util.isInteger(message.server_connection_id)) return "server_connection_id: integer expected"; return null; @@ -8381,31 +10360,37 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramConnectionStatsServerToRouter} CMsgSteamDatagramConnectionStatsServerToRouter */ - CMsgSteamDatagramConnectionStatsServerToRouter.fromObject = function fromObject(object) { + CMsgSteamDatagramConnectionStatsServerToRouter.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramConnectionStatsServerToRouter) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsServerToRouter: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramConnectionStatsServerToRouter(); if (object.s2r != null) { - if (typeof object.s2r !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsServerToRouter.s2r: object expected"); - message.s2r = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.s2r); + if (!$util.isObject(object.s2r)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsServerToRouter.s2r: object expected"); + message.s2r = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.s2r, _depth + 1); } if (object.s2c != null) { - if (typeof object.s2c !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsServerToRouter.s2c: object expected"); - message.s2c = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.s2c); + if (!$util.isObject(object.s2c)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsServerToRouter.s2c: object expected"); + message.s2c = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.s2c, _depth + 1); } if (object.ack_relay) { - if (!Array.isArray(object.ack_relay)) - throw TypeError(".CMsgSteamDatagramConnectionStatsServerToRouter.ack_relay: array expected"); - message.ack_relay = []; + if (!$Array.isArray(object.ack_relay)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsServerToRouter.ack_relay: array expected"); + message.ack_relay = $Array(object.ack_relay.length); for (var i = 0; i < object.ack_relay.length; ++i) message.ack_relay[i] = object.ack_relay[i] >>> 0; } if (object.ack_e2e) { - if (!Array.isArray(object.ack_e2e)) - throw TypeError(".CMsgSteamDatagramConnectionStatsServerToRouter.ack_e2e: array expected"); - message.ack_e2e = []; + if (!$Array.isArray(object.ack_e2e)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsServerToRouter.ack_e2e: array expected"); + message.ack_e2e = $Array(object.ack_e2e.length); for (var i = 0; i < object.ack_e2e.length; ++i) message.ack_e2e[i] = object.ack_e2e[i] >>> 0; } @@ -8417,13 +10402,13 @@ message.seq_num_s2c = object.seq_num_s2c >>> 0; if (object.client_steam_id != null) if ($util.Long) - (message.client_steam_id = $util.Long.fromValue(object.client_steam_id)).unsigned = false; + message.client_steam_id = $util.Long.fromValue(object.client_steam_id, true); else if (typeof object.client_steam_id === "string") - message.client_steam_id = parseInt(object.client_steam_id, 10); + message.client_steam_id = $parseInt(object.client_steam_id, 10); else if (typeof object.client_steam_id === "number") message.client_steam_id = object.client_steam_id; else if (typeof object.client_steam_id === "object") - message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(); + message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(true); if (object.relay_session_id != null) message.relay_session_id = object.relay_session_id >>> 0; if (object.client_connection_id != null) @@ -8442,9 +10427,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramConnectionStatsServerToRouter.toObject = function toObject(message, options) { + CMsgSteamDatagramConnectionStatsServerToRouter.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.ack_relay = []; @@ -8456,45 +10445,47 @@ object.seq_num_s2r = 0; object.seq_num_s2c = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.client_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.client_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.client_steam_id = options.longs === String ? "0" : 0; + object.client_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.relay_session_id = 0; object.client_connection_id = 0; object.flags = 0; object.server_connection_id = 0; } - if (message.s2r != null && message.hasOwnProperty("s2r")) - object.s2r = $root.CMsgSteamDatagramConnectionQuality.toObject(message.s2r, options); - if (message.s2c != null && message.hasOwnProperty("s2c")) - object.s2c = $root.CMsgSteamDatagramConnectionQuality.toObject(message.s2c, options); - if (message.seq_num_s2r != null && message.hasOwnProperty("seq_num_s2r")) + if (message.s2r != null && $Object.hasOwnProperty.call(message, "s2r")) + object.s2r = $root.CMsgSteamDatagramConnectionQuality.toObject(message.s2r, options, _depth + 1); + if (message.s2c != null && $Object.hasOwnProperty.call(message, "s2c")) + object.s2c = $root.CMsgSteamDatagramConnectionQuality.toObject(message.s2c, options, _depth + 1); + if (message.seq_num_s2r != null && $Object.hasOwnProperty.call(message, "seq_num_s2r")) object.seq_num_s2r = message.seq_num_s2r; - if (message.seq_num_s2c != null && message.hasOwnProperty("seq_num_s2c")) + if (message.seq_num_s2c != null && $Object.hasOwnProperty.call(message, "seq_num_s2c")) object.seq_num_s2c = message.seq_num_s2c; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) - if (typeof message.client_steam_id === "number") - object.client_steam_id = options.longs === String ? String(message.client_steam_id) : message.client_steam_id; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.client_steam_id = typeof message.client_steam_id === "number" ? $BigInt(message.client_steam_id) : $util.Long.fromBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.client_steam_id === "number") + object.client_steam_id = options.longs === $String ? $String(message.client_steam_id) : message.client_steam_id; else - object.client_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber() : message.client_steam_id; - if (message.relay_session_id != null && message.hasOwnProperty("relay_session_id")) + object.client_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === $Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber(true) : message.client_steam_id; + if (message.relay_session_id != null && $Object.hasOwnProperty.call(message, "relay_session_id")) object.relay_session_id = message.relay_session_id; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) object.client_connection_id = message.client_connection_id; if (message.ack_relay && message.ack_relay.length) { - object.ack_relay = []; + object.ack_relay = $Array(message.ack_relay.length); for (var j = 0; j < message.ack_relay.length; ++j) object.ack_relay[j] = message.ack_relay[j]; } if (message.ack_e2e && message.ack_e2e.length) { - object.ack_e2e = []; + object.ack_e2e = $Array(message.ack_e2e.length); for (var j = 0; j < message.ack_e2e.length; ++j) object.ack_e2e[j] = message.ack_e2e[j]; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) object.server_connection_id = message.server_connection_id; return object; }; @@ -8506,8 +10497,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramConnectionStatsServerToRouter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramConnectionStatsServerToRouter.prototype.toJSON = function() { + return CMsgSteamDatagramConnectionStatsServerToRouter.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramConnectionStatsServerToRouter + * @function getTypeUrl + * @memberof CMsgSteamDatagramConnectionStatsServerToRouter + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramConnectionStatsServerToRouter.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramConnectionStatsServerToRouter"; }; /** @@ -8519,7 +10524,7 @@ * @property {number} ACK_REQUEST_IMMEDIATE=4 ACK_REQUEST_IMMEDIATE value */ CMsgSteamDatagramConnectionStatsServerToRouter.Flags = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "ACK_REQUEST_RELAY"] = 1; values[valuesById[2] = "ACK_REQUEST_E2E"] = 2; values[valuesById[4] = "ACK_REQUEST_IMMEDIATE"] = 4; @@ -8531,27 +10536,40 @@ $root.CMsgSteamDatagramClientPingSampleRequest = (function() { + /** + * Properties of a CMsgSteamDatagramClientPingSampleRequest. + * @typedef {Object} CMsgSteamDatagramClientPingSampleRequest.$Properties + * @property {number|null} [connection_id] CMsgSteamDatagramClientPingSampleRequest connection_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSteamDatagramClientPingSampleRequest. * @exports ICMsgSteamDatagramClientPingSampleRequest * @interface ICMsgSteamDatagramClientPingSampleRequest - * @property {number|null} [connection_id] CMsgSteamDatagramClientPingSampleRequest connection_id + * @augments CMsgSteamDatagramClientPingSampleRequest.$Properties + * @deprecated Use CMsgSteamDatagramClientPingSampleRequest.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramClientPingSampleRequest. + * @typedef {CMsgSteamDatagramClientPingSampleRequest.$Properties} CMsgSteamDatagramClientPingSampleRequest.$Shape */ /** * Constructs a new CMsgSteamDatagramClientPingSampleRequest. * @exports CMsgSteamDatagramClientPingSampleRequest * @classdesc Represents a CMsgSteamDatagramClientPingSampleRequest. - * @implements ICMsgSteamDatagramClientPingSampleRequest * @constructor - * @param {ICMsgSteamDatagramClientPingSampleRequest=} [properties] Properties to set + * @param {CMsgSteamDatagramClientPingSampleRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramClientPingSampleRequest(properties) { + var CMsgSteamDatagramClientPingSampleRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramClientPingSampleRequest connection_id. @@ -8566,10 +10584,14 @@ * @function create * @memberof CMsgSteamDatagramClientPingSampleRequest * @static - * @param {ICMsgSteamDatagramClientPingSampleRequest=} [properties] Properties to set + * @param {CMsgSteamDatagramClientPingSampleRequest.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramClientPingSampleRequest} CMsgSteamDatagramClientPingSampleRequest instance + * @type {{ + * (properties: CMsgSteamDatagramClientPingSampleRequest.$Shape): CMsgSteamDatagramClientPingSampleRequest & CMsgSteamDatagramClientPingSampleRequest.$Shape; + * (properties?: CMsgSteamDatagramClientPingSampleRequest.$Properties): CMsgSteamDatagramClientPingSampleRequest; + * }} */ - CMsgSteamDatagramClientPingSampleRequest.create = function create(properties) { + CMsgSteamDatagramClientPingSampleRequest.create = function(properties) { return new CMsgSteamDatagramClientPingSampleRequest(properties); }; @@ -8578,15 +10600,22 @@ * @function encode * @memberof CMsgSteamDatagramClientPingSampleRequest * @static - * @param {ICMsgSteamDatagramClientPingSampleRequest} message CMsgSteamDatagramClientPingSampleRequest message or plain object to encode + * @param {CMsgSteamDatagramClientPingSampleRequest.$Properties} message CMsgSteamDatagramClientPingSampleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramClientPingSampleRequest.encode = function encode(message, writer) { + CMsgSteamDatagramClientPingSampleRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.connection_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8595,12 +10624,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramClientPingSampleRequest * @static - * @param {ICMsgSteamDatagramClientPingSampleRequest} message CMsgSteamDatagramClientPingSampleRequest message or plain object to encode + * @param {CMsgSteamDatagramClientPingSampleRequest.$Properties} message CMsgSteamDatagramClientPingSampleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramClientPingSampleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramClientPingSampleRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8610,25 +10639,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramClientPingSampleRequest} CMsgSteamDatagramClientPingSampleRequest + * @returns {CMsgSteamDatagramClientPingSampleRequest & CMsgSteamDatagramClientPingSampleRequest.$Shape} CMsgSteamDatagramClientPingSampleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramClientPingSampleRequest.decode = function decode(reader, length) { + CMsgSteamDatagramClientPingSampleRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramClientPingSampleRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramClientPingSampleRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8638,11 +10684,11 @@ * @memberof CMsgSteamDatagramClientPingSampleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramClientPingSampleRequest} CMsgSteamDatagramClientPingSampleRequest + * @returns {CMsgSteamDatagramClientPingSampleRequest & CMsgSteamDatagramClientPingSampleRequest.$Shape} CMsgSteamDatagramClientPingSampleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramClientPingSampleRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramClientPingSampleRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8656,10 +10702,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramClientPingSampleRequest.verify = function verify(message) { + CMsgSteamDatagramClientPingSampleRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; return null; @@ -8673,9 +10723,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramClientPingSampleRequest} CMsgSteamDatagramClientPingSampleRequest */ - CMsgSteamDatagramClientPingSampleRequest.fromObject = function fromObject(object) { + CMsgSteamDatagramClientPingSampleRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramClientPingSampleRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramClientPingSampleRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramClientPingSampleRequest(); if (object.connection_id != null) message.connection_id = object.connection_id >>> 0; @@ -8691,13 +10747,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramClientPingSampleRequest.toObject = function toObject(message, options) { + CMsgSteamDatagramClientPingSampleRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.connection_id = 0; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; return object; }; @@ -8709,8 +10769,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramClientPingSampleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramClientPingSampleRequest.prototype.toJSON = function() { + return CMsgSteamDatagramClientPingSampleRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramClientPingSampleRequest + * @function getTypeUrl + * @memberof CMsgSteamDatagramClientPingSampleRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramClientPingSampleRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramClientPingSampleRequest"; }; return CMsgSteamDatagramClientPingSampleRequest; @@ -8718,31 +10792,44 @@ $root.CMsgSteamDatagramClientPingSampleReply = (function() { + /** + * Properties of a CMsgSteamDatagramClientPingSampleReply. + * @typedef {Object} CMsgSteamDatagramClientPingSampleReply.$Properties + * @property {number|null} [connection_id] CMsgSteamDatagramClientPingSampleReply connection_id + * @property {Array.|null} [routing_clusters] CMsgSteamDatagramClientPingSampleReply routing_clusters + * @property {Array.|null} [data_centers] CMsgSteamDatagramClientPingSampleReply data_centers + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSteamDatagramClientPingSampleReply. * @exports ICMsgSteamDatagramClientPingSampleReply * @interface ICMsgSteamDatagramClientPingSampleReply - * @property {number|null} [connection_id] CMsgSteamDatagramClientPingSampleReply connection_id - * @property {Array.|null} [routing_clusters] CMsgSteamDatagramClientPingSampleReply routing_clusters - * @property {Array.|null} [data_centers] CMsgSteamDatagramClientPingSampleReply data_centers + * @augments CMsgSteamDatagramClientPingSampleReply.$Properties + * @deprecated Use CMsgSteamDatagramClientPingSampleReply.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramClientPingSampleReply. + * @typedef {CMsgSteamDatagramClientPingSampleReply.$Properties} CMsgSteamDatagramClientPingSampleReply.$Shape */ /** * Constructs a new CMsgSteamDatagramClientPingSampleReply. * @exports CMsgSteamDatagramClientPingSampleReply * @classdesc Represents a CMsgSteamDatagramClientPingSampleReply. - * @implements ICMsgSteamDatagramClientPingSampleReply * @constructor - * @param {ICMsgSteamDatagramClientPingSampleReply=} [properties] Properties to set + * @param {CMsgSteamDatagramClientPingSampleReply.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramClientPingSampleReply(properties) { + var CMsgSteamDatagramClientPingSampleReply = function (properties) { this.routing_clusters = []; this.data_centers = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramClientPingSampleReply connection_id. @@ -8754,7 +10841,7 @@ /** * CMsgSteamDatagramClientPingSampleReply routing_clusters. - * @member {Array.} routing_clusters + * @member {Array.} routing_clusters * @memberof CMsgSteamDatagramClientPingSampleReply * @instance */ @@ -8762,7 +10849,7 @@ /** * CMsgSteamDatagramClientPingSampleReply data_centers. - * @member {Array.} data_centers + * @member {Array.} data_centers * @memberof CMsgSteamDatagramClientPingSampleReply * @instance */ @@ -8773,10 +10860,14 @@ * @function create * @memberof CMsgSteamDatagramClientPingSampleReply * @static - * @param {ICMsgSteamDatagramClientPingSampleReply=} [properties] Properties to set + * @param {CMsgSteamDatagramClientPingSampleReply.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramClientPingSampleReply} CMsgSteamDatagramClientPingSampleReply instance + * @type {{ + * (properties: CMsgSteamDatagramClientPingSampleReply.$Shape): CMsgSteamDatagramClientPingSampleReply & CMsgSteamDatagramClientPingSampleReply.$Shape; + * (properties?: CMsgSteamDatagramClientPingSampleReply.$Properties): CMsgSteamDatagramClientPingSampleReply; + * }} */ - CMsgSteamDatagramClientPingSampleReply.create = function create(properties) { + CMsgSteamDatagramClientPingSampleReply.create = function(properties) { return new CMsgSteamDatagramClientPingSampleReply(properties); }; @@ -8785,21 +10876,28 @@ * @function encode * @memberof CMsgSteamDatagramClientPingSampleReply * @static - * @param {ICMsgSteamDatagramClientPingSampleReply} message CMsgSteamDatagramClientPingSampleReply message or plain object to encode + * @param {CMsgSteamDatagramClientPingSampleReply.$Properties} message CMsgSteamDatagramClientPingSampleReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramClientPingSampleReply.encode = function encode(message, writer) { + CMsgSteamDatagramClientPingSampleReply.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.connection_id); if (message.routing_clusters != null && message.routing_clusters.length) for (var i = 0; i < message.routing_clusters.length; ++i) - $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster.encode(message.routing_clusters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster.encode(message.routing_clusters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); if (message.data_centers != null && message.data_centers.length) for (var i = 0; i < message.data_centers.length; ++i) - $root.CMsgSteamDatagramClientPingSampleReply.DataCenter.encode(message.data_centers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.CMsgSteamDatagramClientPingSampleReply.DataCenter.encode(message.data_centers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8808,12 +10906,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramClientPingSampleReply * @static - * @param {ICMsgSteamDatagramClientPingSampleReply} message CMsgSteamDatagramClientPingSampleReply message or plain object to encode + * @param {CMsgSteamDatagramClientPingSampleReply.$Properties} message CMsgSteamDatagramClientPingSampleReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramClientPingSampleReply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramClientPingSampleReply.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8823,35 +10921,58 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramClientPingSampleReply} CMsgSteamDatagramClientPingSampleReply + * @returns {CMsgSteamDatagramClientPingSampleReply & CMsgSteamDatagramClientPingSampleReply.$Shape} CMsgSteamDatagramClientPingSampleReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramClientPingSampleReply.decode = function decode(reader, length) { + CMsgSteamDatagramClientPingSampleReply.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramClientPingSampleReply(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramClientPingSampleReply(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.fixed32(); - break; - case 2: - if (!(message.routing_clusters && message.routing_clusters.length)) - message.routing_clusters = []; - message.routing_clusters.push($root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.data_centers && message.data_centers.length)) - message.data_centers = []; - message.data_centers.push($root.CMsgSteamDatagramClientPingSampleReply.DataCenter.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.routing_clusters && message.routing_clusters.length)) + message.routing_clusters = []; + message.routing_clusters.push($root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.data_centers && message.data_centers.length)) + message.data_centers = []; + message.data_centers.push($root.CMsgSteamDatagramClientPingSampleReply.DataCenter.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8861,11 +10982,11 @@ * @memberof CMsgSteamDatagramClientPingSampleReply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramClientPingSampleReply} CMsgSteamDatagramClientPingSampleReply + * @returns {CMsgSteamDatagramClientPingSampleReply & CMsgSteamDatagramClientPingSampleReply.$Shape} CMsgSteamDatagramClientPingSampleReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramClientPingSampleReply.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramClientPingSampleReply.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8879,26 +11000,30 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramClientPingSampleReply.verify = function verify(message) { + CMsgSteamDatagramClientPingSampleReply.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; - if (message.routing_clusters != null && message.hasOwnProperty("routing_clusters")) { - if (!Array.isArray(message.routing_clusters)) + if (message.routing_clusters != null && $Object.hasOwnProperty.call(message, "routing_clusters")) { + if (!$Array.isArray(message.routing_clusters)) return "routing_clusters: array expected"; for (var i = 0; i < message.routing_clusters.length; ++i) { - var error = $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster.verify(message.routing_clusters[i]); + var error = $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster.verify(message.routing_clusters[i], _depth + 1); if (error) return "routing_clusters." + error; } } - if (message.data_centers != null && message.hasOwnProperty("data_centers")) { - if (!Array.isArray(message.data_centers)) + if (message.data_centers != null && $Object.hasOwnProperty.call(message, "data_centers")) { + if (!$Array.isArray(message.data_centers)) return "data_centers: array expected"; for (var i = 0; i < message.data_centers.length; ++i) { - var error = $root.CMsgSteamDatagramClientPingSampleReply.DataCenter.verify(message.data_centers[i]); + var error = $root.CMsgSteamDatagramClientPingSampleReply.DataCenter.verify(message.data_centers[i], _depth + 1); if (error) return "data_centers." + error; } @@ -8914,30 +11039,36 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramClientPingSampleReply} CMsgSteamDatagramClientPingSampleReply */ - CMsgSteamDatagramClientPingSampleReply.fromObject = function fromObject(object) { + CMsgSteamDatagramClientPingSampleReply.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramClientPingSampleReply) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramClientPingSampleReply: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramClientPingSampleReply(); if (object.connection_id != null) message.connection_id = object.connection_id >>> 0; if (object.routing_clusters) { - if (!Array.isArray(object.routing_clusters)) - throw TypeError(".CMsgSteamDatagramClientPingSampleReply.routing_clusters: array expected"); - message.routing_clusters = []; + if (!$Array.isArray(object.routing_clusters)) + throw $TypeError(".CMsgSteamDatagramClientPingSampleReply.routing_clusters: array expected"); + message.routing_clusters = $Array(object.routing_clusters.length); for (var i = 0; i < object.routing_clusters.length; ++i) { - if (typeof object.routing_clusters[i] !== "object") - throw TypeError(".CMsgSteamDatagramClientPingSampleReply.routing_clusters: object expected"); - message.routing_clusters[i] = $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster.fromObject(object.routing_clusters[i]); + if (!$util.isObject(object.routing_clusters[i])) + throw $TypeError(".CMsgSteamDatagramClientPingSampleReply.routing_clusters: object expected"); + message.routing_clusters[i] = $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster.fromObject(object.routing_clusters[i], _depth + 1); } } if (object.data_centers) { - if (!Array.isArray(object.data_centers)) - throw TypeError(".CMsgSteamDatagramClientPingSampleReply.data_centers: array expected"); - message.data_centers = []; + if (!$Array.isArray(object.data_centers)) + throw $TypeError(".CMsgSteamDatagramClientPingSampleReply.data_centers: array expected"); + message.data_centers = $Array(object.data_centers.length); for (var i = 0; i < object.data_centers.length; ++i) { - if (typeof object.data_centers[i] !== "object") - throw TypeError(".CMsgSteamDatagramClientPingSampleReply.data_centers: object expected"); - message.data_centers[i] = $root.CMsgSteamDatagramClientPingSampleReply.DataCenter.fromObject(object.data_centers[i]); + if (!$util.isObject(object.data_centers[i])) + throw $TypeError(".CMsgSteamDatagramClientPingSampleReply.data_centers: object expected"); + message.data_centers[i] = $root.CMsgSteamDatagramClientPingSampleReply.DataCenter.fromObject(object.data_centers[i], _depth + 1); } } return message; @@ -8952,9 +11083,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramClientPingSampleReply.toObject = function toObject(message, options) { + CMsgSteamDatagramClientPingSampleReply.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.routing_clusters = []; @@ -8962,17 +11097,17 @@ } if (options.defaults) object.connection_id = 0; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; if (message.routing_clusters && message.routing_clusters.length) { - object.routing_clusters = []; + object.routing_clusters = $Array(message.routing_clusters.length); for (var j = 0; j < message.routing_clusters.length; ++j) - object.routing_clusters[j] = $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster.toObject(message.routing_clusters[j], options); + object.routing_clusters[j] = $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster.toObject(message.routing_clusters[j], options, _depth + 1); } if (message.data_centers && message.data_centers.length) { - object.data_centers = []; + object.data_centers = $Array(message.data_centers.length); for (var j = 0; j < message.data_centers.length; ++j) - object.data_centers[j] = $root.CMsgSteamDatagramClientPingSampleReply.DataCenter.toObject(message.data_centers[j], options); + object.data_centers[j] = $root.CMsgSteamDatagramClientPingSampleReply.DataCenter.toObject(message.data_centers[j], options, _depth + 1); } return object; }; @@ -8984,35 +11119,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramClientPingSampleReply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramClientPingSampleReply.prototype.toJSON = function() { + return CMsgSteamDatagramClientPingSampleReply.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramClientPingSampleReply + * @function getTypeUrl + * @memberof CMsgSteamDatagramClientPingSampleReply + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramClientPingSampleReply.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramClientPingSampleReply"; }; CMsgSteamDatagramClientPingSampleReply.RoutingCluster = (function() { /** * Properties of a RoutingCluster. - * @memberof CMsgSteamDatagramClientPingSampleReply - * @interface IRoutingCluster + * @typedef {Object} CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Properties * @property {number|null} [id] RoutingCluster id * @property {number|null} [front_ping_ms] RoutingCluster front_ping_ms * @property {number|null} [e2e_ping_ms] RoutingCluster e2e_ping_ms + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RoutingCluster. + * @memberof CMsgSteamDatagramClientPingSampleReply + * @interface IRoutingCluster + * @augments CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Properties + * @deprecated Use CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Properties instead. + */ + + /** + * Shape of a RoutingCluster. + * @typedef {CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Properties} CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Shape */ /** * Constructs a new RoutingCluster. * @memberof CMsgSteamDatagramClientPingSampleReply * @classdesc Represents a RoutingCluster. - * @implements IRoutingCluster * @constructor - * @param {CMsgSteamDatagramClientPingSampleReply.IRoutingCluster=} [properties] Properties to set + * @param {CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function RoutingCluster(properties) { + var RoutingCluster = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * RoutingCluster id. @@ -9043,10 +11205,14 @@ * @function create * @memberof CMsgSteamDatagramClientPingSampleReply.RoutingCluster * @static - * @param {CMsgSteamDatagramClientPingSampleReply.IRoutingCluster=} [properties] Properties to set + * @param {CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramClientPingSampleReply.RoutingCluster} RoutingCluster instance + * @type {{ + * (properties: CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Shape): CMsgSteamDatagramClientPingSampleReply.RoutingCluster & CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Shape; + * (properties?: CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Properties): CMsgSteamDatagramClientPingSampleReply.RoutingCluster; + * }} */ - RoutingCluster.create = function create(properties) { + RoutingCluster.create = function(properties) { return new RoutingCluster(properties); }; @@ -9055,19 +11221,26 @@ * @function encode * @memberof CMsgSteamDatagramClientPingSampleReply.RoutingCluster * @static - * @param {CMsgSteamDatagramClientPingSampleReply.IRoutingCluster} message RoutingCluster message or plain object to encode + * @param {CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Properties} message RoutingCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RoutingCluster.encode = function encode(message, writer) { + RoutingCluster.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.id); - if (message.front_ping_ms != null && Object.hasOwnProperty.call(message, "front_ping_ms")) + if (message.front_ping_ms != null && $Object.hasOwnProperty.call(message, "front_ping_ms")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.front_ping_ms); - if (message.e2e_ping_ms != null && Object.hasOwnProperty.call(message, "e2e_ping_ms")) + if (message.e2e_ping_ms != null && $Object.hasOwnProperty.call(message, "e2e_ping_ms")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.e2e_ping_ms); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9076,12 +11249,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramClientPingSampleReply.RoutingCluster * @static - * @param {CMsgSteamDatagramClientPingSampleReply.IRoutingCluster} message RoutingCluster message or plain object to encode + * @param {CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Properties} message RoutingCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RoutingCluster.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RoutingCluster.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9091,31 +11264,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramClientPingSampleReply.RoutingCluster} RoutingCluster + * @returns {CMsgSteamDatagramClientPingSampleReply.RoutingCluster & CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Shape} RoutingCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RoutingCluster.decode = function decode(reader, length) { + RoutingCluster.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.fixed32(); - break; - case 2: - message.front_ping_ms = reader.uint32(); - break; - case 3: - message.e2e_ping_ms = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.front_ping_ms = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.e2e_ping_ms = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9125,11 +11321,11 @@ * @memberof CMsgSteamDatagramClientPingSampleReply.RoutingCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramClientPingSampleReply.RoutingCluster} RoutingCluster + * @returns {CMsgSteamDatagramClientPingSampleReply.RoutingCluster & CMsgSteamDatagramClientPingSampleReply.RoutingCluster.$Shape} RoutingCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RoutingCluster.decodeDelimited = function decodeDelimited(reader) { + RoutingCluster.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9143,16 +11339,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RoutingCluster.verify = function verify(message) { + RoutingCluster.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.front_ping_ms != null && message.hasOwnProperty("front_ping_ms")) + if (message.front_ping_ms != null && $Object.hasOwnProperty.call(message, "front_ping_ms")) if (!$util.isInteger(message.front_ping_ms)) return "front_ping_ms: integer expected"; - if (message.e2e_ping_ms != null && message.hasOwnProperty("e2e_ping_ms")) + if (message.e2e_ping_ms != null && $Object.hasOwnProperty.call(message, "e2e_ping_ms")) if (!$util.isInteger(message.e2e_ping_ms)) return "e2e_ping_ms: integer expected"; return null; @@ -9166,9 +11366,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramClientPingSampleReply.RoutingCluster} RoutingCluster */ - RoutingCluster.fromObject = function fromObject(object) { + RoutingCluster.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramClientPingSampleReply.RoutingCluster: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramClientPingSampleReply.RoutingCluster(); if (object.id != null) message.id = object.id >>> 0; @@ -9188,20 +11394,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RoutingCluster.toObject = function toObject(message, options) { + RoutingCluster.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.id = 0; object.front_ping_ms = 0; object.e2e_ping_ms = 0; } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) object.id = message.id; - if (message.front_ping_ms != null && message.hasOwnProperty("front_ping_ms")) + if (message.front_ping_ms != null && $Object.hasOwnProperty.call(message, "front_ping_ms")) object.front_ping_ms = message.front_ping_ms; - if (message.e2e_ping_ms != null && message.hasOwnProperty("e2e_ping_ms")) + if (message.e2e_ping_ms != null && $Object.hasOwnProperty.call(message, "e2e_ping_ms")) object.e2e_ping_ms = message.e2e_ping_ms; return object; }; @@ -9213,8 +11423,22 @@ * @instance * @returns {Object.} JSON object */ - RoutingCluster.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + RoutingCluster.prototype.toJSON = function() { + return RoutingCluster.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RoutingCluster + * @function getTypeUrl + * @memberof CMsgSteamDatagramClientPingSampleReply.RoutingCluster + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RoutingCluster.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramClientPingSampleReply.RoutingCluster"; }; return RoutingCluster; @@ -9224,27 +11448,40 @@ /** * Properties of a DataCenter. - * @memberof CMsgSteamDatagramClientPingSampleReply - * @interface IDataCenter + * @typedef {Object} CMsgSteamDatagramClientPingSampleReply.DataCenter.$Properties * @property {number|null} [data_center_id] DataCenter data_center_id * @property {number|null} [via_relay_id] DataCenter via_relay_id * @property {number|null} [e2e_ping_ms] DataCenter e2e_ping_ms + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a DataCenter. + * @memberof CMsgSteamDatagramClientPingSampleReply + * @interface IDataCenter + * @augments CMsgSteamDatagramClientPingSampleReply.DataCenter.$Properties + * @deprecated Use CMsgSteamDatagramClientPingSampleReply.DataCenter.$Properties instead. + */ + + /** + * Shape of a DataCenter. + * @typedef {CMsgSteamDatagramClientPingSampleReply.DataCenter.$Properties} CMsgSteamDatagramClientPingSampleReply.DataCenter.$Shape */ /** * Constructs a new DataCenter. * @memberof CMsgSteamDatagramClientPingSampleReply * @classdesc Represents a DataCenter. - * @implements IDataCenter * @constructor - * @param {CMsgSteamDatagramClientPingSampleReply.IDataCenter=} [properties] Properties to set + * @param {CMsgSteamDatagramClientPingSampleReply.DataCenter.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function DataCenter(properties) { + var DataCenter = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * DataCenter data_center_id. @@ -9275,10 +11512,14 @@ * @function create * @memberof CMsgSteamDatagramClientPingSampleReply.DataCenter * @static - * @param {CMsgSteamDatagramClientPingSampleReply.IDataCenter=} [properties] Properties to set + * @param {CMsgSteamDatagramClientPingSampleReply.DataCenter.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramClientPingSampleReply.DataCenter} DataCenter instance + * @type {{ + * (properties: CMsgSteamDatagramClientPingSampleReply.DataCenter.$Shape): CMsgSteamDatagramClientPingSampleReply.DataCenter & CMsgSteamDatagramClientPingSampleReply.DataCenter.$Shape; + * (properties?: CMsgSteamDatagramClientPingSampleReply.DataCenter.$Properties): CMsgSteamDatagramClientPingSampleReply.DataCenter; + * }} */ - DataCenter.create = function create(properties) { + DataCenter.create = function(properties) { return new DataCenter(properties); }; @@ -9287,19 +11528,26 @@ * @function encode * @memberof CMsgSteamDatagramClientPingSampleReply.DataCenter * @static - * @param {CMsgSteamDatagramClientPingSampleReply.IDataCenter} message DataCenter message or plain object to encode + * @param {CMsgSteamDatagramClientPingSampleReply.DataCenter.$Properties} message DataCenter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataCenter.encode = function encode(message, writer) { + DataCenter.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.data_center_id != null && Object.hasOwnProperty.call(message, "data_center_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.data_center_id != null && $Object.hasOwnProperty.call(message, "data_center_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.data_center_id); - if (message.via_relay_id != null && Object.hasOwnProperty.call(message, "via_relay_id")) + if (message.via_relay_id != null && $Object.hasOwnProperty.call(message, "via_relay_id")) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.via_relay_id); - if (message.e2e_ping_ms != null && Object.hasOwnProperty.call(message, "e2e_ping_ms")) + if (message.e2e_ping_ms != null && $Object.hasOwnProperty.call(message, "e2e_ping_ms")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.e2e_ping_ms); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9308,12 +11556,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramClientPingSampleReply.DataCenter * @static - * @param {CMsgSteamDatagramClientPingSampleReply.IDataCenter} message DataCenter message or plain object to encode + * @param {CMsgSteamDatagramClientPingSampleReply.DataCenter.$Properties} message DataCenter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataCenter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DataCenter.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9323,31 +11571,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramClientPingSampleReply.DataCenter} DataCenter + * @returns {CMsgSteamDatagramClientPingSampleReply.DataCenter & CMsgSteamDatagramClientPingSampleReply.DataCenter.$Shape} DataCenter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataCenter.decode = function decode(reader, length) { + DataCenter.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramClientPingSampleReply.DataCenter(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramClientPingSampleReply.DataCenter(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data_center_id = reader.fixed32(); - break; - case 2: - message.via_relay_id = reader.fixed32(); - break; - case 3: - message.e2e_ping_ms = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.data_center_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.via_relay_id = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.e2e_ping_ms = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9357,11 +11628,11 @@ * @memberof CMsgSteamDatagramClientPingSampleReply.DataCenter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramClientPingSampleReply.DataCenter} DataCenter + * @returns {CMsgSteamDatagramClientPingSampleReply.DataCenter & CMsgSteamDatagramClientPingSampleReply.DataCenter.$Shape} DataCenter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataCenter.decodeDelimited = function decodeDelimited(reader) { + DataCenter.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9375,16 +11646,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataCenter.verify = function verify(message) { + DataCenter.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.data_center_id != null && message.hasOwnProperty("data_center_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.data_center_id != null && $Object.hasOwnProperty.call(message, "data_center_id")) if (!$util.isInteger(message.data_center_id)) return "data_center_id: integer expected"; - if (message.via_relay_id != null && message.hasOwnProperty("via_relay_id")) + if (message.via_relay_id != null && $Object.hasOwnProperty.call(message, "via_relay_id")) if (!$util.isInteger(message.via_relay_id)) return "via_relay_id: integer expected"; - if (message.e2e_ping_ms != null && message.hasOwnProperty("e2e_ping_ms")) + if (message.e2e_ping_ms != null && $Object.hasOwnProperty.call(message, "e2e_ping_ms")) if (!$util.isInteger(message.e2e_ping_ms)) return "e2e_ping_ms: integer expected"; return null; @@ -9398,9 +11673,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramClientPingSampleReply.DataCenter} DataCenter */ - DataCenter.fromObject = function fromObject(object) { + DataCenter.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramClientPingSampleReply.DataCenter) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramClientPingSampleReply.DataCenter: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramClientPingSampleReply.DataCenter(); if (object.data_center_id != null) message.data_center_id = object.data_center_id >>> 0; @@ -9420,20 +11701,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataCenter.toObject = function toObject(message, options) { + DataCenter.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.data_center_id = 0; object.via_relay_id = 0; object.e2e_ping_ms = 0; } - if (message.data_center_id != null && message.hasOwnProperty("data_center_id")) + if (message.data_center_id != null && $Object.hasOwnProperty.call(message, "data_center_id")) object.data_center_id = message.data_center_id; - if (message.via_relay_id != null && message.hasOwnProperty("via_relay_id")) + if (message.via_relay_id != null && $Object.hasOwnProperty.call(message, "via_relay_id")) object.via_relay_id = message.via_relay_id; - if (message.e2e_ping_ms != null && message.hasOwnProperty("e2e_ping_ms")) + if (message.e2e_ping_ms != null && $Object.hasOwnProperty.call(message, "e2e_ping_ms")) object.e2e_ping_ms = message.e2e_ping_ms; return object; }; @@ -9445,8 +11730,22 @@ * @instance * @returns {Object.} JSON object */ - DataCenter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + DataCenter.prototype.toJSON = function() { + return DataCenter.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for DataCenter + * @function getTypeUrl + * @memberof CMsgSteamDatagramClientPingSampleReply.DataCenter + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + DataCenter.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramClientPingSampleReply.DataCenter"; }; return DataCenter; @@ -9459,8 +11758,7 @@ /** * Properties of a CMsgSteamDatagramClientSwitchedPrimary. - * @exports ICMsgSteamDatagramClientSwitchedPrimary - * @interface ICMsgSteamDatagramClientSwitchedPrimary + * @typedef {Object} CMsgSteamDatagramClientSwitchedPrimary.$Properties * @property {number|null} [connection_id] CMsgSteamDatagramClientSwitchedPrimary connection_id * @property {number|null} [from_ip] CMsgSteamDatagramClientSwitchedPrimary from_ip * @property {number|null} [from_port] CMsgSteamDatagramClientSwitchedPrimary from_port @@ -9469,26 +11767,40 @@ * @property {number|null} [from_active_packets_recv] CMsgSteamDatagramClientSwitchedPrimary from_active_packets_recv * @property {string|null} [from_dropped_reason] CMsgSteamDatagramClientSwitchedPrimary from_dropped_reason * @property {number|null} [gap_ms] CMsgSteamDatagramClientSwitchedPrimary gap_ms - * @property {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality|null} [from_quality_now] CMsgSteamDatagramClientSwitchedPrimary from_quality_now - * @property {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality|null} [to_quality_now] CMsgSteamDatagramClientSwitchedPrimary to_quality_now - * @property {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality|null} [from_quality_then] CMsgSteamDatagramClientSwitchedPrimary from_quality_then - * @property {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality|null} [to_quality_then] CMsgSteamDatagramClientSwitchedPrimary to_quality_then + * @property {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties|null} [from_quality_now] CMsgSteamDatagramClientSwitchedPrimary from_quality_now + * @property {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties|null} [to_quality_now] CMsgSteamDatagramClientSwitchedPrimary to_quality_now + * @property {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties|null} [from_quality_then] CMsgSteamDatagramClientSwitchedPrimary from_quality_then + * @property {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties|null} [to_quality_then] CMsgSteamDatagramClientSwitchedPrimary to_quality_then + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramClientSwitchedPrimary. + * @exports ICMsgSteamDatagramClientSwitchedPrimary + * @interface ICMsgSteamDatagramClientSwitchedPrimary + * @augments CMsgSteamDatagramClientSwitchedPrimary.$Properties + * @deprecated Use CMsgSteamDatagramClientSwitchedPrimary.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramClientSwitchedPrimary. + * @typedef {CMsgSteamDatagramClientSwitchedPrimary.$Properties} CMsgSteamDatagramClientSwitchedPrimary.$Shape */ /** * Constructs a new CMsgSteamDatagramClientSwitchedPrimary. * @exports CMsgSteamDatagramClientSwitchedPrimary * @classdesc Represents a CMsgSteamDatagramClientSwitchedPrimary. - * @implements ICMsgSteamDatagramClientSwitchedPrimary * @constructor - * @param {ICMsgSteamDatagramClientSwitchedPrimary=} [properties] Properties to set + * @param {CMsgSteamDatagramClientSwitchedPrimary.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramClientSwitchedPrimary(properties) { + var CMsgSteamDatagramClientSwitchedPrimary = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramClientSwitchedPrimary connection_id. @@ -9556,7 +11868,7 @@ /** * CMsgSteamDatagramClientSwitchedPrimary from_quality_now. - * @member {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality|null|undefined} from_quality_now + * @member {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties|null|undefined} from_quality_now * @memberof CMsgSteamDatagramClientSwitchedPrimary * @instance */ @@ -9564,7 +11876,7 @@ /** * CMsgSteamDatagramClientSwitchedPrimary to_quality_now. - * @member {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality|null|undefined} to_quality_now + * @member {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties|null|undefined} to_quality_now * @memberof CMsgSteamDatagramClientSwitchedPrimary * @instance */ @@ -9572,7 +11884,7 @@ /** * CMsgSteamDatagramClientSwitchedPrimary from_quality_then. - * @member {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality|null|undefined} from_quality_then + * @member {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties|null|undefined} from_quality_then * @memberof CMsgSteamDatagramClientSwitchedPrimary * @instance */ @@ -9580,7 +11892,7 @@ /** * CMsgSteamDatagramClientSwitchedPrimary to_quality_then. - * @member {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality|null|undefined} to_quality_then + * @member {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties|null|undefined} to_quality_then * @memberof CMsgSteamDatagramClientSwitchedPrimary * @instance */ @@ -9591,10 +11903,14 @@ * @function create * @memberof CMsgSteamDatagramClientSwitchedPrimary * @static - * @param {ICMsgSteamDatagramClientSwitchedPrimary=} [properties] Properties to set + * @param {CMsgSteamDatagramClientSwitchedPrimary.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramClientSwitchedPrimary} CMsgSteamDatagramClientSwitchedPrimary instance + * @type {{ + * (properties: CMsgSteamDatagramClientSwitchedPrimary.$Shape): CMsgSteamDatagramClientSwitchedPrimary & CMsgSteamDatagramClientSwitchedPrimary.$Shape; + * (properties?: CMsgSteamDatagramClientSwitchedPrimary.$Properties): CMsgSteamDatagramClientSwitchedPrimary; + * }} */ - CMsgSteamDatagramClientSwitchedPrimary.create = function create(properties) { + CMsgSteamDatagramClientSwitchedPrimary.create = function(properties) { return new CMsgSteamDatagramClientSwitchedPrimary(properties); }; @@ -9603,37 +11919,44 @@ * @function encode * @memberof CMsgSteamDatagramClientSwitchedPrimary * @static - * @param {ICMsgSteamDatagramClientSwitchedPrimary} message CMsgSteamDatagramClientSwitchedPrimary message or plain object to encode + * @param {CMsgSteamDatagramClientSwitchedPrimary.$Properties} message CMsgSteamDatagramClientSwitchedPrimary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramClientSwitchedPrimary.encode = function encode(message, writer) { + CMsgSteamDatagramClientSwitchedPrimary.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.connection_id); - if (message.from_ip != null && Object.hasOwnProperty.call(message, "from_ip")) + if (message.from_ip != null && $Object.hasOwnProperty.call(message, "from_ip")) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.from_ip); - if (message.from_port != null && Object.hasOwnProperty.call(message, "from_port")) + if (message.from_port != null && $Object.hasOwnProperty.call(message, "from_port")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.from_port); - if (message.from_router_cluster != null && Object.hasOwnProperty.call(message, "from_router_cluster")) + if (message.from_router_cluster != null && $Object.hasOwnProperty.call(message, "from_router_cluster")) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.from_router_cluster); - if (message.from_active_time != null && Object.hasOwnProperty.call(message, "from_active_time")) + if (message.from_active_time != null && $Object.hasOwnProperty.call(message, "from_active_time")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.from_active_time); - if (message.from_active_packets_recv != null && Object.hasOwnProperty.call(message, "from_active_packets_recv")) + if (message.from_active_packets_recv != null && $Object.hasOwnProperty.call(message, "from_active_packets_recv")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.from_active_packets_recv); - if (message.from_dropped_reason != null && Object.hasOwnProperty.call(message, "from_dropped_reason")) + if (message.from_dropped_reason != null && $Object.hasOwnProperty.call(message, "from_dropped_reason")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.from_dropped_reason); - if (message.gap_ms != null && Object.hasOwnProperty.call(message, "gap_ms")) + if (message.gap_ms != null && $Object.hasOwnProperty.call(message, "gap_ms")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.gap_ms); - if (message.from_quality_now != null && Object.hasOwnProperty.call(message, "from_quality_now")) - $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.encode(message.from_quality_now, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.to_quality_now != null && Object.hasOwnProperty.call(message, "to_quality_now")) - $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.encode(message.to_quality_now, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.from_quality_then != null && Object.hasOwnProperty.call(message, "from_quality_then")) - $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.encode(message.from_quality_then, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.to_quality_then != null && Object.hasOwnProperty.call(message, "to_quality_then")) - $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.encode(message.to_quality_then, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.from_quality_now != null && $Object.hasOwnProperty.call(message, "from_quality_now")) + $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.encode(message.from_quality_now, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.to_quality_now != null && $Object.hasOwnProperty.call(message, "to_quality_now")) + $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.encode(message.to_quality_now, writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); + if (message.from_quality_then != null && $Object.hasOwnProperty.call(message, "from_quality_then")) + $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.encode(message.from_quality_then, writer.uint32(/* id 11, wireType 2 =*/90).fork(), _depth + 1).ldelim(); + if (message.to_quality_then != null && $Object.hasOwnProperty.call(message, "to_quality_then")) + $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.encode(message.to_quality_then, writer.uint32(/* id 12, wireType 2 =*/98).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9642,12 +11965,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramClientSwitchedPrimary * @static - * @param {ICMsgSteamDatagramClientSwitchedPrimary} message CMsgSteamDatagramClientSwitchedPrimary message or plain object to encode + * @param {CMsgSteamDatagramClientSwitchedPrimary.$Properties} message CMsgSteamDatagramClientSwitchedPrimary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramClientSwitchedPrimary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramClientSwitchedPrimary.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9657,58 +11980,108 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramClientSwitchedPrimary} CMsgSteamDatagramClientSwitchedPrimary + * @returns {CMsgSteamDatagramClientSwitchedPrimary & CMsgSteamDatagramClientSwitchedPrimary.$Shape} CMsgSteamDatagramClientSwitchedPrimary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramClientSwitchedPrimary.decode = function decode(reader, length) { + CMsgSteamDatagramClientSwitchedPrimary.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramClientSwitchedPrimary(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramClientSwitchedPrimary(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.fixed32(); - break; - case 2: - message.from_ip = reader.fixed32(); - break; - case 3: - message.from_port = reader.uint32(); - break; - case 4: - message.from_router_cluster = reader.fixed32(); - break; - case 5: - message.from_active_time = reader.uint32(); - break; - case 6: - message.from_active_packets_recv = reader.uint32(); - break; - case 7: - message.from_dropped_reason = reader.string(); - break; - case 8: - message.gap_ms = reader.uint32(); - break; - case 9: - message.from_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.decode(reader, reader.uint32()); - break; - case 10: - message.to_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.decode(reader, reader.uint32()); - break; - case 11: - message.from_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.decode(reader, reader.uint32()); - break; - case 12: - message.to_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.from_ip = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.from_port = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.from_router_cluster = reader.fixed32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.from_active_time = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.from_active_packets_recv = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.from_dropped_reason = reader.string(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.gap_ms = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.from_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.from_quality_now); + continue; + } + case 10: { + if (wireType !== 2) + break; + message.to_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.to_quality_now); + continue; + } + case 11: { + if (wireType !== 2) + break; + message.from_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.from_quality_then); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.to_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.to_quality_then); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9718,11 +12091,11 @@ * @memberof CMsgSteamDatagramClientSwitchedPrimary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramClientSwitchedPrimary} CMsgSteamDatagramClientSwitchedPrimary + * @returns {CMsgSteamDatagramClientSwitchedPrimary & CMsgSteamDatagramClientSwitchedPrimary.$Shape} CMsgSteamDatagramClientSwitchedPrimary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramClientSwitchedPrimary.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramClientSwitchedPrimary.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9736,50 +12109,54 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramClientSwitchedPrimary.verify = function verify(message) { + CMsgSteamDatagramClientSwitchedPrimary.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; - if (message.from_ip != null && message.hasOwnProperty("from_ip")) + if (message.from_ip != null && $Object.hasOwnProperty.call(message, "from_ip")) if (!$util.isInteger(message.from_ip)) return "from_ip: integer expected"; - if (message.from_port != null && message.hasOwnProperty("from_port")) + if (message.from_port != null && $Object.hasOwnProperty.call(message, "from_port")) if (!$util.isInteger(message.from_port)) return "from_port: integer expected"; - if (message.from_router_cluster != null && message.hasOwnProperty("from_router_cluster")) + if (message.from_router_cluster != null && $Object.hasOwnProperty.call(message, "from_router_cluster")) if (!$util.isInteger(message.from_router_cluster)) return "from_router_cluster: integer expected"; - if (message.from_active_time != null && message.hasOwnProperty("from_active_time")) + if (message.from_active_time != null && $Object.hasOwnProperty.call(message, "from_active_time")) if (!$util.isInteger(message.from_active_time)) return "from_active_time: integer expected"; - if (message.from_active_packets_recv != null && message.hasOwnProperty("from_active_packets_recv")) + if (message.from_active_packets_recv != null && $Object.hasOwnProperty.call(message, "from_active_packets_recv")) if (!$util.isInteger(message.from_active_packets_recv)) return "from_active_packets_recv: integer expected"; - if (message.from_dropped_reason != null && message.hasOwnProperty("from_dropped_reason")) + if (message.from_dropped_reason != null && $Object.hasOwnProperty.call(message, "from_dropped_reason")) if (!$util.isString(message.from_dropped_reason)) return "from_dropped_reason: string expected"; - if (message.gap_ms != null && message.hasOwnProperty("gap_ms")) + if (message.gap_ms != null && $Object.hasOwnProperty.call(message, "gap_ms")) if (!$util.isInteger(message.gap_ms)) return "gap_ms: integer expected"; - if (message.from_quality_now != null && message.hasOwnProperty("from_quality_now")) { - var error = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.verify(message.from_quality_now); + if (message.from_quality_now != null && $Object.hasOwnProperty.call(message, "from_quality_now")) { + var error = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.verify(message.from_quality_now, _depth + 1); if (error) return "from_quality_now." + error; } - if (message.to_quality_now != null && message.hasOwnProperty("to_quality_now")) { - var error = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.verify(message.to_quality_now); + if (message.to_quality_now != null && $Object.hasOwnProperty.call(message, "to_quality_now")) { + var error = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.verify(message.to_quality_now, _depth + 1); if (error) return "to_quality_now." + error; } - if (message.from_quality_then != null && message.hasOwnProperty("from_quality_then")) { - var error = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.verify(message.from_quality_then); + if (message.from_quality_then != null && $Object.hasOwnProperty.call(message, "from_quality_then")) { + var error = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.verify(message.from_quality_then, _depth + 1); if (error) return "from_quality_then." + error; } - if (message.to_quality_then != null && message.hasOwnProperty("to_quality_then")) { - var error = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.verify(message.to_quality_then); + if (message.to_quality_then != null && $Object.hasOwnProperty.call(message, "to_quality_then")) { + var error = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.verify(message.to_quality_then, _depth + 1); if (error) return "to_quality_then." + error; } @@ -9794,9 +12171,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramClientSwitchedPrimary} CMsgSteamDatagramClientSwitchedPrimary */ - CMsgSteamDatagramClientSwitchedPrimary.fromObject = function fromObject(object) { + CMsgSteamDatagramClientSwitchedPrimary.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramClientSwitchedPrimary) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramClientSwitchedPrimary: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramClientSwitchedPrimary(); if (object.connection_id != null) message.connection_id = object.connection_id >>> 0; @@ -9811,28 +12194,28 @@ if (object.from_active_packets_recv != null) message.from_active_packets_recv = object.from_active_packets_recv >>> 0; if (object.from_dropped_reason != null) - message.from_dropped_reason = String(object.from_dropped_reason); + message.from_dropped_reason = $String(object.from_dropped_reason); if (object.gap_ms != null) message.gap_ms = object.gap_ms >>> 0; if (object.from_quality_now != null) { - if (typeof object.from_quality_now !== "object") - throw TypeError(".CMsgSteamDatagramClientSwitchedPrimary.from_quality_now: object expected"); - message.from_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.fromObject(object.from_quality_now); + if (!$util.isObject(object.from_quality_now)) + throw $TypeError(".CMsgSteamDatagramClientSwitchedPrimary.from_quality_now: object expected"); + message.from_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.fromObject(object.from_quality_now, _depth + 1); } if (object.to_quality_now != null) { - if (typeof object.to_quality_now !== "object") - throw TypeError(".CMsgSteamDatagramClientSwitchedPrimary.to_quality_now: object expected"); - message.to_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.fromObject(object.to_quality_now); + if (!$util.isObject(object.to_quality_now)) + throw $TypeError(".CMsgSteamDatagramClientSwitchedPrimary.to_quality_now: object expected"); + message.to_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.fromObject(object.to_quality_now, _depth + 1); } if (object.from_quality_then != null) { - if (typeof object.from_quality_then !== "object") - throw TypeError(".CMsgSteamDatagramClientSwitchedPrimary.from_quality_then: object expected"); - message.from_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.fromObject(object.from_quality_then); + if (!$util.isObject(object.from_quality_then)) + throw $TypeError(".CMsgSteamDatagramClientSwitchedPrimary.from_quality_then: object expected"); + message.from_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.fromObject(object.from_quality_then, _depth + 1); } if (object.to_quality_then != null) { - if (typeof object.to_quality_then !== "object") - throw TypeError(".CMsgSteamDatagramClientSwitchedPrimary.to_quality_then: object expected"); - message.to_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.fromObject(object.to_quality_then); + if (!$util.isObject(object.to_quality_then)) + throw $TypeError(".CMsgSteamDatagramClientSwitchedPrimary.to_quality_then: object expected"); + message.to_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.fromObject(object.to_quality_then, _depth + 1); } return message; }; @@ -9846,9 +12229,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramClientSwitchedPrimary.toObject = function toObject(message, options) { + CMsgSteamDatagramClientSwitchedPrimary.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.connection_id = 0; @@ -9864,30 +12251,30 @@ object.from_quality_then = null; object.to_quality_then = null; } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; - if (message.from_ip != null && message.hasOwnProperty("from_ip")) + if (message.from_ip != null && $Object.hasOwnProperty.call(message, "from_ip")) object.from_ip = message.from_ip; - if (message.from_port != null && message.hasOwnProperty("from_port")) + if (message.from_port != null && $Object.hasOwnProperty.call(message, "from_port")) object.from_port = message.from_port; - if (message.from_router_cluster != null && message.hasOwnProperty("from_router_cluster")) + if (message.from_router_cluster != null && $Object.hasOwnProperty.call(message, "from_router_cluster")) object.from_router_cluster = message.from_router_cluster; - if (message.from_active_time != null && message.hasOwnProperty("from_active_time")) + if (message.from_active_time != null && $Object.hasOwnProperty.call(message, "from_active_time")) object.from_active_time = message.from_active_time; - if (message.from_active_packets_recv != null && message.hasOwnProperty("from_active_packets_recv")) + if (message.from_active_packets_recv != null && $Object.hasOwnProperty.call(message, "from_active_packets_recv")) object.from_active_packets_recv = message.from_active_packets_recv; - if (message.from_dropped_reason != null && message.hasOwnProperty("from_dropped_reason")) + if (message.from_dropped_reason != null && $Object.hasOwnProperty.call(message, "from_dropped_reason")) object.from_dropped_reason = message.from_dropped_reason; - if (message.gap_ms != null && message.hasOwnProperty("gap_ms")) + if (message.gap_ms != null && $Object.hasOwnProperty.call(message, "gap_ms")) object.gap_ms = message.gap_ms; - if (message.from_quality_now != null && message.hasOwnProperty("from_quality_now")) - object.from_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.toObject(message.from_quality_now, options); - if (message.to_quality_now != null && message.hasOwnProperty("to_quality_now")) - object.to_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.toObject(message.to_quality_now, options); - if (message.from_quality_then != null && message.hasOwnProperty("from_quality_then")) - object.from_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.toObject(message.from_quality_then, options); - if (message.to_quality_then != null && message.hasOwnProperty("to_quality_then")) - object.to_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.toObject(message.to_quality_then, options); + if (message.from_quality_now != null && $Object.hasOwnProperty.call(message, "from_quality_now")) + object.from_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.toObject(message.from_quality_now, options, _depth + 1); + if (message.to_quality_now != null && $Object.hasOwnProperty.call(message, "to_quality_now")) + object.to_quality_now = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.toObject(message.to_quality_now, options, _depth + 1); + if (message.from_quality_then != null && $Object.hasOwnProperty.call(message, "from_quality_then")) + object.from_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.toObject(message.from_quality_then, options, _depth + 1); + if (message.to_quality_then != null && $Object.hasOwnProperty.call(message, "to_quality_then")) + object.to_quality_then = $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.toObject(message.to_quality_then, options, _depth + 1); return object; }; @@ -9898,36 +12285,63 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramClientSwitchedPrimary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramClientSwitchedPrimary.prototype.toJSON = function() { + return CMsgSteamDatagramClientSwitchedPrimary.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramClientSwitchedPrimary + * @function getTypeUrl + * @memberof CMsgSteamDatagramClientSwitchedPrimary + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramClientSwitchedPrimary.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramClientSwitchedPrimary"; }; CMsgSteamDatagramClientSwitchedPrimary.RouterQuality = (function() { /** * Properties of a RouterQuality. - * @memberof CMsgSteamDatagramClientSwitchedPrimary - * @interface IRouterQuality + * @typedef {Object} CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties * @property {number|null} [score] RouterQuality score * @property {number|null} [front_ping] RouterQuality front_ping * @property {number|null} [back_ping] RouterQuality back_ping * @property {number|null} [seconds_until_down] RouterQuality seconds_until_down + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RouterQuality. + * @memberof CMsgSteamDatagramClientSwitchedPrimary + * @interface IRouterQuality + * @augments CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties + * @deprecated Use CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties instead. + */ + + /** + * Shape of a RouterQuality. + * @typedef {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties} CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Shape */ /** * Constructs a new RouterQuality. * @memberof CMsgSteamDatagramClientSwitchedPrimary * @classdesc Represents a RouterQuality. - * @implements IRouterQuality * @constructor - * @param {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality=} [properties] Properties to set + * @param {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function RouterQuality(properties) { + var RouterQuality = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * RouterQuality score. @@ -9966,10 +12380,14 @@ * @function create * @memberof CMsgSteamDatagramClientSwitchedPrimary.RouterQuality * @static - * @param {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality=} [properties] Properties to set + * @param {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality} RouterQuality instance + * @type {{ + * (properties: CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Shape): CMsgSteamDatagramClientSwitchedPrimary.RouterQuality & CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Shape; + * (properties?: CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties): CMsgSteamDatagramClientSwitchedPrimary.RouterQuality; + * }} */ - RouterQuality.create = function create(properties) { + RouterQuality.create = function(properties) { return new RouterQuality(properties); }; @@ -9978,21 +12396,28 @@ * @function encode * @memberof CMsgSteamDatagramClientSwitchedPrimary.RouterQuality * @static - * @param {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality} message RouterQuality message or plain object to encode + * @param {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties} message RouterQuality message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RouterQuality.encode = function encode(message, writer) { + RouterQuality.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.score); - if (message.front_ping != null && Object.hasOwnProperty.call(message, "front_ping")) + if (message.front_ping != null && $Object.hasOwnProperty.call(message, "front_ping")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.front_ping); - if (message.back_ping != null && Object.hasOwnProperty.call(message, "back_ping")) + if (message.back_ping != null && $Object.hasOwnProperty.call(message, "back_ping")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.back_ping); - if (message.seconds_until_down != null && Object.hasOwnProperty.call(message, "seconds_until_down")) + if (message.seconds_until_down != null && $Object.hasOwnProperty.call(message, "seconds_until_down")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.seconds_until_down); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10001,12 +12426,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramClientSwitchedPrimary.RouterQuality * @static - * @param {CMsgSteamDatagramClientSwitchedPrimary.IRouterQuality} message RouterQuality message or plain object to encode + * @param {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Properties} message RouterQuality message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RouterQuality.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RouterQuality.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10016,34 +12441,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality} RouterQuality + * @returns {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality & CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Shape} RouterQuality * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RouterQuality.decode = function decode(reader, length) { + RouterQuality.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.score = reader.uint32(); - break; - case 2: - message.front_ping = reader.uint32(); - break; - case 3: - message.back_ping = reader.uint32(); - break; - case 4: - message.seconds_until_down = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.score = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.front_ping = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.back_ping = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.seconds_until_down = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10053,11 +12504,11 @@ * @memberof CMsgSteamDatagramClientSwitchedPrimary.RouterQuality * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality} RouterQuality + * @returns {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality & CMsgSteamDatagramClientSwitchedPrimary.RouterQuality.$Shape} RouterQuality * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RouterQuality.decodeDelimited = function decodeDelimited(reader) { + RouterQuality.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10071,19 +12522,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RouterQuality.verify = function verify(message) { + RouterQuality.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.score != null && message.hasOwnProperty("score")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) if (!$util.isInteger(message.score)) return "score: integer expected"; - if (message.front_ping != null && message.hasOwnProperty("front_ping")) + if (message.front_ping != null && $Object.hasOwnProperty.call(message, "front_ping")) if (!$util.isInteger(message.front_ping)) return "front_ping: integer expected"; - if (message.back_ping != null && message.hasOwnProperty("back_ping")) + if (message.back_ping != null && $Object.hasOwnProperty.call(message, "back_ping")) if (!$util.isInteger(message.back_ping)) return "back_ping: integer expected"; - if (message.seconds_until_down != null && message.hasOwnProperty("seconds_until_down")) + if (message.seconds_until_down != null && $Object.hasOwnProperty.call(message, "seconds_until_down")) if (!$util.isInteger(message.seconds_until_down)) return "seconds_until_down: integer expected"; return null; @@ -10097,9 +12552,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramClientSwitchedPrimary.RouterQuality} RouterQuality */ - RouterQuality.fromObject = function fromObject(object) { + RouterQuality.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramClientSwitchedPrimary.RouterQuality: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramClientSwitchedPrimary.RouterQuality(); if (object.score != null) message.score = object.score >>> 0; @@ -10121,9 +12582,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RouterQuality.toObject = function toObject(message, options) { + RouterQuality.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.score = 0; @@ -10131,13 +12596,13 @@ object.back_ping = 0; object.seconds_until_down = 0; } - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) object.score = message.score; - if (message.front_ping != null && message.hasOwnProperty("front_ping")) + if (message.front_ping != null && $Object.hasOwnProperty.call(message, "front_ping")) object.front_ping = message.front_ping; - if (message.back_ping != null && message.hasOwnProperty("back_ping")) + if (message.back_ping != null && $Object.hasOwnProperty.call(message, "back_ping")) object.back_ping = message.back_ping; - if (message.seconds_until_down != null && message.hasOwnProperty("seconds_until_down")) + if (message.seconds_until_down != null && $Object.hasOwnProperty.call(message, "seconds_until_down")) object.seconds_until_down = message.seconds_until_down; return object; }; @@ -10149,8 +12614,22 @@ * @instance * @returns {Object.} JSON object */ - RouterQuality.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + RouterQuality.prototype.toJSON = function() { + return RouterQuality.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RouterQuality + * @function getTypeUrl + * @memberof CMsgSteamDatagramClientSwitchedPrimary.RouterQuality + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RouterQuality.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramClientSwitchedPrimary.RouterQuality"; }; return RouterQuality; @@ -10163,8 +12642,7 @@ /** * Properties of a CMsgSteamDatagramRouterHealth. - * @exports ICMsgSteamDatagramRouterHealth - * @interface ICMsgSteamDatagramRouterHealth + * @typedef {Object} CMsgSteamDatagramRouterHealth.$Properties * @property {number|null} [cpu_load] CMsgSteamDatagramRouterHealth cpu_load * @property {number|null} [active_sessions] CMsgSteamDatagramRouterHealth active_sessions * @property {number|null} [data_pkts_sec] CMsgSteamDatagramRouterHealth data_pkts_sec @@ -10172,25 +12650,39 @@ * @property {number|null} [seconds_until_shutdown] CMsgSteamDatagramRouterHealth seconds_until_shutdown * @property {number|null} [cpu_cost_per_user] CMsgSteamDatagramRouterHealth cpu_cost_per_user * @property {number|null} [cpu_cost_per_packet] CMsgSteamDatagramRouterHealth cpu_cost_per_packet - * @property {Array.|null} [data_centers] CMsgSteamDatagramRouterHealth data_centers + * @property {Array.|null} [data_centers] CMsgSteamDatagramRouterHealth data_centers * @property {number|Long|null} [magic] CMsgSteamDatagramRouterHealth magic + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramRouterHealth. + * @exports ICMsgSteamDatagramRouterHealth + * @interface ICMsgSteamDatagramRouterHealth + * @augments CMsgSteamDatagramRouterHealth.$Properties + * @deprecated Use CMsgSteamDatagramRouterHealth.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramRouterHealth. + * @typedef {CMsgSteamDatagramRouterHealth.$Properties} CMsgSteamDatagramRouterHealth.$Shape */ /** * Constructs a new CMsgSteamDatagramRouterHealth. * @exports CMsgSteamDatagramRouterHealth * @classdesc Represents a CMsgSteamDatagramRouterHealth. - * @implements ICMsgSteamDatagramRouterHealth * @constructor - * @param {ICMsgSteamDatagramRouterHealth=} [properties] Properties to set + * @param {CMsgSteamDatagramRouterHealth.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramRouterHealth(properties) { + var CMsgSteamDatagramRouterHealth = function (properties) { this.data_centers = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramRouterHealth cpu_load. @@ -10250,7 +12742,7 @@ /** * CMsgSteamDatagramRouterHealth data_centers. - * @member {Array.} data_centers + * @member {Array.} data_centers * @memberof CMsgSteamDatagramRouterHealth * @instance */ @@ -10262,17 +12754,21 @@ * @memberof CMsgSteamDatagramRouterHealth * @instance */ - CMsgSteamDatagramRouterHealth.prototype.magic = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramRouterHealth.prototype.magic = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgSteamDatagramRouterHealth instance using the specified properties. * @function create * @memberof CMsgSteamDatagramRouterHealth * @static - * @param {ICMsgSteamDatagramRouterHealth=} [properties] Properties to set + * @param {CMsgSteamDatagramRouterHealth.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramRouterHealth} CMsgSteamDatagramRouterHealth instance + * @type {{ + * (properties: CMsgSteamDatagramRouterHealth.$Shape): CMsgSteamDatagramRouterHealth & CMsgSteamDatagramRouterHealth.$Shape; + * (properties?: CMsgSteamDatagramRouterHealth.$Properties): CMsgSteamDatagramRouterHealth; + * }} */ - CMsgSteamDatagramRouterHealth.create = function create(properties) { + CMsgSteamDatagramRouterHealth.create = function(properties) { return new CMsgSteamDatagramRouterHealth(properties); }; @@ -10281,32 +12777,39 @@ * @function encode * @memberof CMsgSteamDatagramRouterHealth * @static - * @param {ICMsgSteamDatagramRouterHealth} message CMsgSteamDatagramRouterHealth message or plain object to encode + * @param {CMsgSteamDatagramRouterHealth.$Properties} message CMsgSteamDatagramRouterHealth message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramRouterHealth.encode = function encode(message, writer) { + CMsgSteamDatagramRouterHealth.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.cpu_load != null && Object.hasOwnProperty.call(message, "cpu_load")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.cpu_load != null && $Object.hasOwnProperty.call(message, "cpu_load")) writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu_load); - if (message.active_sessions != null && Object.hasOwnProperty.call(message, "active_sessions")) + if (message.active_sessions != null && $Object.hasOwnProperty.call(message, "active_sessions")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.active_sessions); - if (message.data_pkts_sec != null && Object.hasOwnProperty.call(message, "data_pkts_sec")) + if (message.data_pkts_sec != null && $Object.hasOwnProperty.call(message, "data_pkts_sec")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.data_pkts_sec); - if (message.other_pkts_sec != null && Object.hasOwnProperty.call(message, "other_pkts_sec")) + if (message.other_pkts_sec != null && $Object.hasOwnProperty.call(message, "other_pkts_sec")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.other_pkts_sec); - if (message.seconds_until_shutdown != null && Object.hasOwnProperty.call(message, "seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.seconds_until_shutdown); if (message.data_centers != null && message.data_centers.length) for (var i = 0; i < message.data_centers.length; ++i) - $root.CMsgSteamDatagramRouterHealth.DataCenter.encode(message.data_centers[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.magic != null && Object.hasOwnProperty.call(message, "magic")) + $root.CMsgSteamDatagramRouterHealth.DataCenter.encode(message.data_centers[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.magic != null && $Object.hasOwnProperty.call(message, "magic")) writer.uint32(/* id 7, wireType 1 =*/57).fixed64(message.magic); - if (message.cpu_cost_per_user != null && Object.hasOwnProperty.call(message, "cpu_cost_per_user")) + if (message.cpu_cost_per_user != null && $Object.hasOwnProperty.call(message, "cpu_cost_per_user")) writer.uint32(/* id 8, wireType 5 =*/69).float(message.cpu_cost_per_user); - if (message.cpu_cost_per_packet != null && Object.hasOwnProperty.call(message, "cpu_cost_per_packet")) + if (message.cpu_cost_per_packet != null && $Object.hasOwnProperty.call(message, "cpu_cost_per_packet")) writer.uint32(/* id 9, wireType 5 =*/77).float(message.cpu_cost_per_packet); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10315,12 +12818,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramRouterHealth * @static - * @param {ICMsgSteamDatagramRouterHealth} message CMsgSteamDatagramRouterHealth message or plain object to encode + * @param {CMsgSteamDatagramRouterHealth.$Properties} message CMsgSteamDatagramRouterHealth message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramRouterHealth.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramRouterHealth.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10330,51 +12833,92 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramRouterHealth} CMsgSteamDatagramRouterHealth + * @returns {CMsgSteamDatagramRouterHealth & CMsgSteamDatagramRouterHealth.$Shape} CMsgSteamDatagramRouterHealth * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramRouterHealth.decode = function decode(reader, length) { + CMsgSteamDatagramRouterHealth.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramRouterHealth(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramRouterHealth(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cpu_load = reader.float(); - break; - case 2: - message.active_sessions = reader.uint32(); - break; - case 3: - message.data_pkts_sec = reader.uint32(); - break; - case 4: - message.other_pkts_sec = reader.uint32(); - break; - case 5: - message.seconds_until_shutdown = reader.uint32(); - break; - case 8: - message.cpu_cost_per_user = reader.float(); - break; - case 9: - message.cpu_cost_per_packet = reader.float(); - break; - case 6: - if (!(message.data_centers && message.data_centers.length)) - message.data_centers = []; - message.data_centers.push($root.CMsgSteamDatagramRouterHealth.DataCenter.decode(reader, reader.uint32())); - break; - case 7: - message.magic = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.cpu_load = reader.float(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.active_sessions = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.data_pkts_sec = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.other_pkts_sec = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.seconds_until_shutdown = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 5) + break; + message.cpu_cost_per_user = reader.float(); + continue; + } + case 9: { + if (wireType !== 5) + break; + message.cpu_cost_per_packet = reader.float(); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.data_centers && message.data_centers.length)) + message.data_centers = []; + message.data_centers.push($root.CMsgSteamDatagramRouterHealth.DataCenter.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 1) + break; + message.magic = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10384,11 +12928,11 @@ * @memberof CMsgSteamDatagramRouterHealth * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramRouterHealth} CMsgSteamDatagramRouterHealth + * @returns {CMsgSteamDatagramRouterHealth & CMsgSteamDatagramRouterHealth.$Shape} CMsgSteamDatagramRouterHealth * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramRouterHealth.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramRouterHealth.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10402,40 +12946,44 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramRouterHealth.verify = function verify(message) { + CMsgSteamDatagramRouterHealth.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cpu_load != null && message.hasOwnProperty("cpu_load")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.cpu_load != null && $Object.hasOwnProperty.call(message, "cpu_load")) if (typeof message.cpu_load !== "number") return "cpu_load: number expected"; - if (message.active_sessions != null && message.hasOwnProperty("active_sessions")) + if (message.active_sessions != null && $Object.hasOwnProperty.call(message, "active_sessions")) if (!$util.isInteger(message.active_sessions)) return "active_sessions: integer expected"; - if (message.data_pkts_sec != null && message.hasOwnProperty("data_pkts_sec")) + if (message.data_pkts_sec != null && $Object.hasOwnProperty.call(message, "data_pkts_sec")) if (!$util.isInteger(message.data_pkts_sec)) return "data_pkts_sec: integer expected"; - if (message.other_pkts_sec != null && message.hasOwnProperty("other_pkts_sec")) + if (message.other_pkts_sec != null && $Object.hasOwnProperty.call(message, "other_pkts_sec")) if (!$util.isInteger(message.other_pkts_sec)) return "other_pkts_sec: integer expected"; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) if (!$util.isInteger(message.seconds_until_shutdown)) return "seconds_until_shutdown: integer expected"; - if (message.cpu_cost_per_user != null && message.hasOwnProperty("cpu_cost_per_user")) + if (message.cpu_cost_per_user != null && $Object.hasOwnProperty.call(message, "cpu_cost_per_user")) if (typeof message.cpu_cost_per_user !== "number") return "cpu_cost_per_user: number expected"; - if (message.cpu_cost_per_packet != null && message.hasOwnProperty("cpu_cost_per_packet")) + if (message.cpu_cost_per_packet != null && $Object.hasOwnProperty.call(message, "cpu_cost_per_packet")) if (typeof message.cpu_cost_per_packet !== "number") return "cpu_cost_per_packet: number expected"; - if (message.data_centers != null && message.hasOwnProperty("data_centers")) { - if (!Array.isArray(message.data_centers)) + if (message.data_centers != null && $Object.hasOwnProperty.call(message, "data_centers")) { + if (!$Array.isArray(message.data_centers)) return "data_centers: array expected"; for (var i = 0; i < message.data_centers.length; ++i) { - var error = $root.CMsgSteamDatagramRouterHealth.DataCenter.verify(message.data_centers[i]); + var error = $root.CMsgSteamDatagramRouterHealth.DataCenter.verify(message.data_centers[i], _depth + 1); if (error) return "data_centers." + error; } } - if (message.magic != null && message.hasOwnProperty("magic")) + if (message.magic != null && $Object.hasOwnProperty.call(message, "magic")) if (!$util.isInteger(message.magic) && !(message.magic && $util.isInteger(message.magic.low) && $util.isInteger(message.magic.high))) return "magic: integer|Long expected"; return null; @@ -10449,12 +12997,18 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramRouterHealth} CMsgSteamDatagramRouterHealth */ - CMsgSteamDatagramRouterHealth.fromObject = function fromObject(object) { + CMsgSteamDatagramRouterHealth.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramRouterHealth) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramRouterHealth: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramRouterHealth(); if (object.cpu_load != null) - message.cpu_load = Number(object.cpu_load); + message.cpu_load = $Number(object.cpu_load); if (object.active_sessions != null) message.active_sessions = object.active_sessions >>> 0; if (object.data_pkts_sec != null) @@ -10464,28 +13018,28 @@ if (object.seconds_until_shutdown != null) message.seconds_until_shutdown = object.seconds_until_shutdown >>> 0; if (object.cpu_cost_per_user != null) - message.cpu_cost_per_user = Number(object.cpu_cost_per_user); + message.cpu_cost_per_user = $Number(object.cpu_cost_per_user); if (object.cpu_cost_per_packet != null) - message.cpu_cost_per_packet = Number(object.cpu_cost_per_packet); + message.cpu_cost_per_packet = $Number(object.cpu_cost_per_packet); if (object.data_centers) { - if (!Array.isArray(object.data_centers)) - throw TypeError(".CMsgSteamDatagramRouterHealth.data_centers: array expected"); - message.data_centers = []; + if (!$Array.isArray(object.data_centers)) + throw $TypeError(".CMsgSteamDatagramRouterHealth.data_centers: array expected"); + message.data_centers = $Array(object.data_centers.length); for (var i = 0; i < object.data_centers.length; ++i) { - if (typeof object.data_centers[i] !== "object") - throw TypeError(".CMsgSteamDatagramRouterHealth.data_centers: object expected"); - message.data_centers[i] = $root.CMsgSteamDatagramRouterHealth.DataCenter.fromObject(object.data_centers[i]); + if (!$util.isObject(object.data_centers[i])) + throw $TypeError(".CMsgSteamDatagramRouterHealth.data_centers: object expected"); + message.data_centers[i] = $root.CMsgSteamDatagramRouterHealth.DataCenter.fromObject(object.data_centers[i], _depth + 1); } } if (object.magic != null) if ($util.Long) - (message.magic = $util.Long.fromValue(object.magic)).unsigned = false; + message.magic = $util.Long.fromValue(object.magic, true); else if (typeof object.magic === "string") - message.magic = parseInt(object.magic, 10); + message.magic = $parseInt(object.magic, 10); else if (typeof object.magic === "number") message.magic = object.magic; else if (typeof object.magic === "object") - message.magic = new $util.LongBits(object.magic.low >>> 0, object.magic.high >>> 0).toNumber(); + message.magic = new $util.LongBits(object.magic.low >>> 0, object.magic.high >>> 0).toNumber(true); return message; }; @@ -10498,9 +13052,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramRouterHealth.toObject = function toObject(message, options) { + CMsgSteamDatagramRouterHealth.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.data_centers = []; @@ -10511,37 +13069,39 @@ object.other_pkts_sec = 0; object.seconds_until_shutdown = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.magic = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.magic = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.magic = options.longs === String ? "0" : 0; + object.magic = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.cpu_cost_per_user = 0; object.cpu_cost_per_packet = 0; } - if (message.cpu_load != null && message.hasOwnProperty("cpu_load")) - object.cpu_load = options.json && !isFinite(message.cpu_load) ? String(message.cpu_load) : message.cpu_load; - if (message.active_sessions != null && message.hasOwnProperty("active_sessions")) + if (message.cpu_load != null && $Object.hasOwnProperty.call(message, "cpu_load")) + object.cpu_load = options.json && !$isFinite(message.cpu_load) ? $String(message.cpu_load) : message.cpu_load; + if (message.active_sessions != null && $Object.hasOwnProperty.call(message, "active_sessions")) object.active_sessions = message.active_sessions; - if (message.data_pkts_sec != null && message.hasOwnProperty("data_pkts_sec")) + if (message.data_pkts_sec != null && $Object.hasOwnProperty.call(message, "data_pkts_sec")) object.data_pkts_sec = message.data_pkts_sec; - if (message.other_pkts_sec != null && message.hasOwnProperty("other_pkts_sec")) + if (message.other_pkts_sec != null && $Object.hasOwnProperty.call(message, "other_pkts_sec")) object.other_pkts_sec = message.other_pkts_sec; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) object.seconds_until_shutdown = message.seconds_until_shutdown; if (message.data_centers && message.data_centers.length) { - object.data_centers = []; + object.data_centers = $Array(message.data_centers.length); for (var j = 0; j < message.data_centers.length; ++j) - object.data_centers[j] = $root.CMsgSteamDatagramRouterHealth.DataCenter.toObject(message.data_centers[j], options); + object.data_centers[j] = $root.CMsgSteamDatagramRouterHealth.DataCenter.toObject(message.data_centers[j], options, _depth + 1); } - if (message.magic != null && message.hasOwnProperty("magic")) - if (typeof message.magic === "number") - object.magic = options.longs === String ? String(message.magic) : message.magic; + if (message.magic != null && $Object.hasOwnProperty.call(message, "magic")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.magic = typeof message.magic === "number" ? $BigInt(message.magic) : $util.Long.fromBits(message.magic.low >>> 0, message.magic.high >>> 0, true).toBigInt(); + else if (typeof message.magic === "number") + object.magic = options.longs === $String ? $String(message.magic) : message.magic; else - object.magic = options.longs === String ? $util.Long.prototype.toString.call(message.magic) : options.longs === Number ? new $util.LongBits(message.magic.low >>> 0, message.magic.high >>> 0).toNumber() : message.magic; - if (message.cpu_cost_per_user != null && message.hasOwnProperty("cpu_cost_per_user")) - object.cpu_cost_per_user = options.json && !isFinite(message.cpu_cost_per_user) ? String(message.cpu_cost_per_user) : message.cpu_cost_per_user; - if (message.cpu_cost_per_packet != null && message.hasOwnProperty("cpu_cost_per_packet")) - object.cpu_cost_per_packet = options.json && !isFinite(message.cpu_cost_per_packet) ? String(message.cpu_cost_per_packet) : message.cpu_cost_per_packet; + object.magic = options.longs === $String ? $util.Long.prototype.toString.call(message.magic) : options.longs === $Number ? new $util.LongBits(message.magic.low >>> 0, message.magic.high >>> 0).toNumber(true) : message.magic; + if (message.cpu_cost_per_user != null && $Object.hasOwnProperty.call(message, "cpu_cost_per_user")) + object.cpu_cost_per_user = options.json && !$isFinite(message.cpu_cost_per_user) ? $String(message.cpu_cost_per_user) : message.cpu_cost_per_user; + if (message.cpu_cost_per_packet != null && $Object.hasOwnProperty.call(message, "cpu_cost_per_packet")) + object.cpu_cost_per_packet = options.json && !$isFinite(message.cpu_cost_per_packet) ? $String(message.cpu_cost_per_packet) : message.cpu_cost_per_packet; return object; }; @@ -10552,34 +13112,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramRouterHealth.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramRouterHealth.prototype.toJSON = function() { + return CMsgSteamDatagramRouterHealth.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramRouterHealth + * @function getTypeUrl + * @memberof CMsgSteamDatagramRouterHealth + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramRouterHealth.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramRouterHealth"; }; CMsgSteamDatagramRouterHealth.DataCenter = (function() { /** * Properties of a DataCenter. - * @memberof CMsgSteamDatagramRouterHealth - * @interface IDataCenter + * @typedef {Object} CMsgSteamDatagramRouterHealth.DataCenter.$Properties * @property {number|null} [datacenter_id] DataCenter datacenter_id * @property {number|null} [state] DataCenter state + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a DataCenter. + * @memberof CMsgSteamDatagramRouterHealth + * @interface IDataCenter + * @augments CMsgSteamDatagramRouterHealth.DataCenter.$Properties + * @deprecated Use CMsgSteamDatagramRouterHealth.DataCenter.$Properties instead. + */ + + /** + * Shape of a DataCenter. + * @typedef {CMsgSteamDatagramRouterHealth.DataCenter.$Properties} CMsgSteamDatagramRouterHealth.DataCenter.$Shape */ /** * Constructs a new DataCenter. * @memberof CMsgSteamDatagramRouterHealth * @classdesc Represents a DataCenter. - * @implements IDataCenter * @constructor - * @param {CMsgSteamDatagramRouterHealth.IDataCenter=} [properties] Properties to set + * @param {CMsgSteamDatagramRouterHealth.DataCenter.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function DataCenter(properties) { + var DataCenter = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * DataCenter datacenter_id. @@ -10602,10 +13189,14 @@ * @function create * @memberof CMsgSteamDatagramRouterHealth.DataCenter * @static - * @param {CMsgSteamDatagramRouterHealth.IDataCenter=} [properties] Properties to set + * @param {CMsgSteamDatagramRouterHealth.DataCenter.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramRouterHealth.DataCenter} DataCenter instance + * @type {{ + * (properties: CMsgSteamDatagramRouterHealth.DataCenter.$Shape): CMsgSteamDatagramRouterHealth.DataCenter & CMsgSteamDatagramRouterHealth.DataCenter.$Shape; + * (properties?: CMsgSteamDatagramRouterHealth.DataCenter.$Properties): CMsgSteamDatagramRouterHealth.DataCenter; + * }} */ - DataCenter.create = function create(properties) { + DataCenter.create = function(properties) { return new DataCenter(properties); }; @@ -10614,17 +13205,24 @@ * @function encode * @memberof CMsgSteamDatagramRouterHealth.DataCenter * @static - * @param {CMsgSteamDatagramRouterHealth.IDataCenter} message DataCenter message or plain object to encode + * @param {CMsgSteamDatagramRouterHealth.DataCenter.$Properties} message DataCenter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataCenter.encode = function encode(message, writer) { + DataCenter.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.datacenter_id != null && Object.hasOwnProperty.call(message, "datacenter_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.datacenter_id != null && $Object.hasOwnProperty.call(message, "datacenter_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.datacenter_id); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.state); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10633,12 +13231,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramRouterHealth.DataCenter * @static - * @param {CMsgSteamDatagramRouterHealth.IDataCenter} message DataCenter message or plain object to encode + * @param {CMsgSteamDatagramRouterHealth.DataCenter.$Properties} message DataCenter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataCenter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DataCenter.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10648,28 +13246,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramRouterHealth.DataCenter} DataCenter + * @returns {CMsgSteamDatagramRouterHealth.DataCenter & CMsgSteamDatagramRouterHealth.DataCenter.$Shape} DataCenter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataCenter.decode = function decode(reader, length) { + DataCenter.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramRouterHealth.DataCenter(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramRouterHealth.DataCenter(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.datacenter_id = reader.fixed32(); - break; - case 2: - message.state = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.datacenter_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.state = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10679,11 +13297,11 @@ * @memberof CMsgSteamDatagramRouterHealth.DataCenter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramRouterHealth.DataCenter} DataCenter + * @returns {CMsgSteamDatagramRouterHealth.DataCenter & CMsgSteamDatagramRouterHealth.DataCenter.$Shape} DataCenter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataCenter.decodeDelimited = function decodeDelimited(reader) { + DataCenter.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10697,13 +13315,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataCenter.verify = function verify(message) { + DataCenter.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.datacenter_id != null && message.hasOwnProperty("datacenter_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.datacenter_id != null && $Object.hasOwnProperty.call(message, "datacenter_id")) if (!$util.isInteger(message.datacenter_id)) return "datacenter_id: integer expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) if (!$util.isInteger(message.state)) return "state: integer expected"; return null; @@ -10717,9 +13339,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramRouterHealth.DataCenter} DataCenter */ - DataCenter.fromObject = function fromObject(object) { + DataCenter.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramRouterHealth.DataCenter) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramRouterHealth.DataCenter: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramRouterHealth.DataCenter(); if (object.datacenter_id != null) message.datacenter_id = object.datacenter_id >>> 0; @@ -10737,17 +13365,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataCenter.toObject = function toObject(message, options) { + DataCenter.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.datacenter_id = 0; object.state = 0; } - if (message.datacenter_id != null && message.hasOwnProperty("datacenter_id")) + if (message.datacenter_id != null && $Object.hasOwnProperty.call(message, "datacenter_id")) object.datacenter_id = message.datacenter_id; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) object.state = message.state; return object; }; @@ -10759,8 +13391,22 @@ * @instance * @returns {Object.} JSON object */ - DataCenter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + DataCenter.prototype.toJSON = function() { + return DataCenter.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for DataCenter + * @function getTypeUrl + * @memberof CMsgSteamDatagramRouterHealth.DataCenter + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + DataCenter.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramRouterHealth.DataCenter"; }; return DataCenter; @@ -10773,33 +13419,46 @@ /** * Properties of a CMsgSteamDatagramConnectRequest. - * @exports ICMsgSteamDatagramConnectRequest - * @interface ICMsgSteamDatagramConnectRequest + * @typedef {Object} CMsgSteamDatagramConnectRequest.$Properties * @property {number|null} [connection_id] CMsgSteamDatagramConnectRequest connection_id * @property {number|Long|null} [client_steam_id] CMsgSteamDatagramConnectRequest client_steam_id * @property {number|Long|null} [my_timestamp] CMsgSteamDatagramConnectRequest my_timestamp * @property {number|null} [ping_est_ms] CMsgSteamDatagramConnectRequest ping_est_ms * @property {number|null} [virtual_port] CMsgSteamDatagramConnectRequest virtual_port * @property {number|null} [gameserver_relay_session_id] CMsgSteamDatagramConnectRequest gameserver_relay_session_id - * @property {ICMsgSteamDatagramSessionCryptInfoSigned|null} [crypt] CMsgSteamDatagramConnectRequest crypt - * @property {ICMsgSteamDatagramCertificateSigned|null} [cert] CMsgSteamDatagramConnectRequest cert + * @property {CMsgSteamDatagramSessionCryptInfoSigned.$Properties|null} [crypt] CMsgSteamDatagramConnectRequest crypt + * @property {CMsgSteamDatagramCertificateSigned.$Properties|null} [cert] CMsgSteamDatagramConnectRequest cert * @property {number|null} [protocol_version] CMsgSteamDatagramConnectRequest protocol_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramConnectRequest. + * @exports ICMsgSteamDatagramConnectRequest + * @interface ICMsgSteamDatagramConnectRequest + * @augments CMsgSteamDatagramConnectRequest.$Properties + * @deprecated Use CMsgSteamDatagramConnectRequest.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramConnectRequest. + * @typedef {CMsgSteamDatagramConnectRequest.$Properties} CMsgSteamDatagramConnectRequest.$Shape */ /** * Constructs a new CMsgSteamDatagramConnectRequest. * @exports CMsgSteamDatagramConnectRequest * @classdesc Represents a CMsgSteamDatagramConnectRequest. - * @implements ICMsgSteamDatagramConnectRequest * @constructor - * @param {ICMsgSteamDatagramConnectRequest=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramConnectRequest(properties) { + var CMsgSteamDatagramConnectRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramConnectRequest connection_id. @@ -10815,7 +13474,7 @@ * @memberof CMsgSteamDatagramConnectRequest * @instance */ - CMsgSteamDatagramConnectRequest.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramConnectRequest.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramConnectRequest my_timestamp. @@ -10823,7 +13482,7 @@ * @memberof CMsgSteamDatagramConnectRequest * @instance */ - CMsgSteamDatagramConnectRequest.prototype.my_timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramConnectRequest.prototype.my_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramConnectRequest ping_est_ms. @@ -10851,7 +13510,7 @@ /** * CMsgSteamDatagramConnectRequest crypt. - * @member {ICMsgSteamDatagramSessionCryptInfoSigned|null|undefined} crypt + * @member {CMsgSteamDatagramSessionCryptInfoSigned.$Properties|null|undefined} crypt * @memberof CMsgSteamDatagramConnectRequest * @instance */ @@ -10859,7 +13518,7 @@ /** * CMsgSteamDatagramConnectRequest cert. - * @member {ICMsgSteamDatagramCertificateSigned|null|undefined} cert + * @member {CMsgSteamDatagramCertificateSigned.$Properties|null|undefined} cert * @memberof CMsgSteamDatagramConnectRequest * @instance */ @@ -10878,10 +13537,14 @@ * @function create * @memberof CMsgSteamDatagramConnectRequest * @static - * @param {ICMsgSteamDatagramConnectRequest=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectRequest.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramConnectRequest} CMsgSteamDatagramConnectRequest instance + * @type {{ + * (properties: CMsgSteamDatagramConnectRequest.$Shape): CMsgSteamDatagramConnectRequest & CMsgSteamDatagramConnectRequest.$Shape; + * (properties?: CMsgSteamDatagramConnectRequest.$Properties): CMsgSteamDatagramConnectRequest; + * }} */ - CMsgSteamDatagramConnectRequest.create = function create(properties) { + CMsgSteamDatagramConnectRequest.create = function(properties) { return new CMsgSteamDatagramConnectRequest(properties); }; @@ -10890,31 +13553,38 @@ * @function encode * @memberof CMsgSteamDatagramConnectRequest * @static - * @param {ICMsgSteamDatagramConnectRequest} message CMsgSteamDatagramConnectRequest message or plain object to encode + * @param {CMsgSteamDatagramConnectRequest.$Properties} message CMsgSteamDatagramConnectRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectRequest.encode = function encode(message, writer) { + CMsgSteamDatagramConnectRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.connection_id); - if (message.gameserver_relay_session_id != null && Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.gameserver_relay_session_id); - if (message.client_steam_id != null && Object.hasOwnProperty.call(message, "client_steam_id")) + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.client_steam_id); - if (message.my_timestamp != null && Object.hasOwnProperty.call(message, "my_timestamp")) + if (message.my_timestamp != null && $Object.hasOwnProperty.call(message, "my_timestamp")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.my_timestamp); - if (message.ping_est_ms != null && Object.hasOwnProperty.call(message, "ping_est_ms")) + if (message.ping_est_ms != null && $Object.hasOwnProperty.call(message, "ping_est_ms")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.ping_est_ms); - if (message.crypt != null && Object.hasOwnProperty.call(message, "crypt")) - $root.CMsgSteamDatagramSessionCryptInfoSigned.encode(message.crypt, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.cert != null && Object.hasOwnProperty.call(message, "cert")) - $root.CMsgSteamDatagramCertificateSigned.encode(message.cert, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.protocol_version != null && Object.hasOwnProperty.call(message, "protocol_version")) + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) + $root.CMsgSteamDatagramSessionCryptInfoSigned.encode(message.crypt, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + $root.CMsgSteamDatagramCertificateSigned.encode(message.cert, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.protocol_version); - if (message.virtual_port != null && Object.hasOwnProperty.call(message, "virtual_port")) + if (message.virtual_port != null && $Object.hasOwnProperty.call(message, "virtual_port")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.virtual_port); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10923,12 +13593,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramConnectRequest * @static - * @param {ICMsgSteamDatagramConnectRequest} message CMsgSteamDatagramConnectRequest message or plain object to encode + * @param {CMsgSteamDatagramConnectRequest.$Properties} message CMsgSteamDatagramConnectRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramConnectRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10938,49 +13608,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramConnectRequest} CMsgSteamDatagramConnectRequest + * @returns {CMsgSteamDatagramConnectRequest & CMsgSteamDatagramConnectRequest.$Shape} CMsgSteamDatagramConnectRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectRequest.decode = function decode(reader, length) { + CMsgSteamDatagramConnectRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramConnectRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramConnectRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.fixed32(); - break; - case 3: - message.client_steam_id = reader.fixed64(); - break; - case 4: - message.my_timestamp = reader.fixed64(); - break; - case 5: - message.ping_est_ms = reader.uint32(); - break; - case 9: - message.virtual_port = reader.uint32(); - break; - case 2: - message.gameserver_relay_session_id = reader.uint32(); - break; - case 6: - message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.decode(reader, reader.uint32()); - break; - case 7: - message.cert = $root.CMsgSteamDatagramCertificateSigned.decode(reader, reader.uint32()); - break; - case 8: - message.protocol_version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.client_steam_id = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.my_timestamp = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.ping_est_ms = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.virtual_port = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.gameserver_relay_session_id = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.decode(reader, reader.uint32(), $undefined, _depth + 1, message.crypt); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.cert = $root.CMsgSteamDatagramCertificateSigned.decode(reader, reader.uint32(), $undefined, _depth + 1, message.cert); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.protocol_version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10990,11 +13701,11 @@ * @memberof CMsgSteamDatagramConnectRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramConnectRequest} CMsgSteamDatagramConnectRequest + * @returns {CMsgSteamDatagramConnectRequest & CMsgSteamDatagramConnectRequest.$Shape} CMsgSteamDatagramConnectRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramConnectRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11008,38 +13719,42 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramConnectRequest.verify = function verify(message) { + CMsgSteamDatagramConnectRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) if (!$util.isInteger(message.client_steam_id) && !(message.client_steam_id && $util.isInteger(message.client_steam_id.low) && $util.isInteger(message.client_steam_id.high))) return "client_steam_id: integer|Long expected"; - if (message.my_timestamp != null && message.hasOwnProperty("my_timestamp")) + if (message.my_timestamp != null && $Object.hasOwnProperty.call(message, "my_timestamp")) if (!$util.isInteger(message.my_timestamp) && !(message.my_timestamp && $util.isInteger(message.my_timestamp.low) && $util.isInteger(message.my_timestamp.high))) return "my_timestamp: integer|Long expected"; - if (message.ping_est_ms != null && message.hasOwnProperty("ping_est_ms")) + if (message.ping_est_ms != null && $Object.hasOwnProperty.call(message, "ping_est_ms")) if (!$util.isInteger(message.ping_est_ms)) return "ping_est_ms: integer expected"; - if (message.virtual_port != null && message.hasOwnProperty("virtual_port")) + if (message.virtual_port != null && $Object.hasOwnProperty.call(message, "virtual_port")) if (!$util.isInteger(message.virtual_port)) return "virtual_port: integer expected"; - if (message.gameserver_relay_session_id != null && message.hasOwnProperty("gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) if (!$util.isInteger(message.gameserver_relay_session_id)) return "gameserver_relay_session_id: integer expected"; - if (message.crypt != null && message.hasOwnProperty("crypt")) { - var error = $root.CMsgSteamDatagramSessionCryptInfoSigned.verify(message.crypt); + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) { + var error = $root.CMsgSteamDatagramSessionCryptInfoSigned.verify(message.crypt, _depth + 1); if (error) return "crypt." + error; } - if (message.cert != null && message.hasOwnProperty("cert")) { - var error = $root.CMsgSteamDatagramCertificateSigned.verify(message.cert); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) { + var error = $root.CMsgSteamDatagramCertificateSigned.verify(message.cert, _depth + 1); if (error) return "cert." + error; } - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) if (!$util.isInteger(message.protocol_version)) return "protocol_version: integer expected"; return null; @@ -11053,30 +13768,36 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramConnectRequest} CMsgSteamDatagramConnectRequest */ - CMsgSteamDatagramConnectRequest.fromObject = function fromObject(object) { + CMsgSteamDatagramConnectRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramConnectRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramConnectRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramConnectRequest(); if (object.connection_id != null) message.connection_id = object.connection_id >>> 0; if (object.client_steam_id != null) if ($util.Long) - (message.client_steam_id = $util.Long.fromValue(object.client_steam_id)).unsigned = false; + message.client_steam_id = $util.Long.fromValue(object.client_steam_id, true); else if (typeof object.client_steam_id === "string") - message.client_steam_id = parseInt(object.client_steam_id, 10); + message.client_steam_id = $parseInt(object.client_steam_id, 10); else if (typeof object.client_steam_id === "number") message.client_steam_id = object.client_steam_id; else if (typeof object.client_steam_id === "object") - message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(); + message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(true); if (object.my_timestamp != null) if ($util.Long) - (message.my_timestamp = $util.Long.fromValue(object.my_timestamp)).unsigned = false; + message.my_timestamp = $util.Long.fromValue(object.my_timestamp, true); else if (typeof object.my_timestamp === "string") - message.my_timestamp = parseInt(object.my_timestamp, 10); + message.my_timestamp = $parseInt(object.my_timestamp, 10); else if (typeof object.my_timestamp === "number") message.my_timestamp = object.my_timestamp; else if (typeof object.my_timestamp === "object") - message.my_timestamp = new $util.LongBits(object.my_timestamp.low >>> 0, object.my_timestamp.high >>> 0).toNumber(); + message.my_timestamp = new $util.LongBits(object.my_timestamp.low >>> 0, object.my_timestamp.high >>> 0).toNumber(true); if (object.ping_est_ms != null) message.ping_est_ms = object.ping_est_ms >>> 0; if (object.virtual_port != null) @@ -11084,14 +13805,14 @@ if (object.gameserver_relay_session_id != null) message.gameserver_relay_session_id = object.gameserver_relay_session_id >>> 0; if (object.crypt != null) { - if (typeof object.crypt !== "object") - throw TypeError(".CMsgSteamDatagramConnectRequest.crypt: object expected"); - message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.fromObject(object.crypt); + if (!$util.isObject(object.crypt)) + throw $TypeError(".CMsgSteamDatagramConnectRequest.crypt: object expected"); + message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.fromObject(object.crypt, _depth + 1); } if (object.cert != null) { - if (typeof object.cert !== "object") - throw TypeError(".CMsgSteamDatagramConnectRequest.cert: object expected"); - message.cert = $root.CMsgSteamDatagramCertificateSigned.fromObject(object.cert); + if (!$util.isObject(object.cert)) + throw $TypeError(".CMsgSteamDatagramConnectRequest.cert: object expected"); + message.cert = $root.CMsgSteamDatagramCertificateSigned.fromObject(object.cert, _depth + 1); } if (object.protocol_version != null) message.protocol_version = object.protocol_version >>> 0; @@ -11107,52 +13828,60 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramConnectRequest.toObject = function toObject(message, options) { + CMsgSteamDatagramConnectRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.connection_id = 0; object.gameserver_relay_session_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.client_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.client_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.client_steam_id = options.longs === String ? "0" : 0; + object.client_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.my_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.my_timestamp = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.my_timestamp = options.longs === String ? "0" : 0; + object.my_timestamp = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.ping_est_ms = 0; object.crypt = null; object.cert = null; object.protocol_version = 0; object.virtual_port = 0; } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; - if (message.gameserver_relay_session_id != null && message.hasOwnProperty("gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) object.gameserver_relay_session_id = message.gameserver_relay_session_id; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) - if (typeof message.client_steam_id === "number") - object.client_steam_id = options.longs === String ? String(message.client_steam_id) : message.client_steam_id; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.client_steam_id = typeof message.client_steam_id === "number" ? $BigInt(message.client_steam_id) : $util.Long.fromBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.client_steam_id === "number") + object.client_steam_id = options.longs === $String ? $String(message.client_steam_id) : message.client_steam_id; else - object.client_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber() : message.client_steam_id; - if (message.my_timestamp != null && message.hasOwnProperty("my_timestamp")) - if (typeof message.my_timestamp === "number") - object.my_timestamp = options.longs === String ? String(message.my_timestamp) : message.my_timestamp; + object.client_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === $Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber(true) : message.client_steam_id; + if (message.my_timestamp != null && $Object.hasOwnProperty.call(message, "my_timestamp")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.my_timestamp = typeof message.my_timestamp === "number" ? $BigInt(message.my_timestamp) : $util.Long.fromBits(message.my_timestamp.low >>> 0, message.my_timestamp.high >>> 0, true).toBigInt(); + else if (typeof message.my_timestamp === "number") + object.my_timestamp = options.longs === $String ? $String(message.my_timestamp) : message.my_timestamp; else - object.my_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.my_timestamp) : options.longs === Number ? new $util.LongBits(message.my_timestamp.low >>> 0, message.my_timestamp.high >>> 0).toNumber() : message.my_timestamp; - if (message.ping_est_ms != null && message.hasOwnProperty("ping_est_ms")) + object.my_timestamp = options.longs === $String ? $util.Long.prototype.toString.call(message.my_timestamp) : options.longs === $Number ? new $util.LongBits(message.my_timestamp.low >>> 0, message.my_timestamp.high >>> 0).toNumber(true) : message.my_timestamp; + if (message.ping_est_ms != null && $Object.hasOwnProperty.call(message, "ping_est_ms")) object.ping_est_ms = message.ping_est_ms; - if (message.crypt != null && message.hasOwnProperty("crypt")) - object.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.toObject(message.crypt, options); - if (message.cert != null && message.hasOwnProperty("cert")) - object.cert = $root.CMsgSteamDatagramCertificateSigned.toObject(message.cert, options); - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) + object.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.toObject(message.crypt, options, _depth + 1); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + object.cert = $root.CMsgSteamDatagramCertificateSigned.toObject(message.cert, options, _depth + 1); + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) object.protocol_version = message.protocol_version; - if (message.virtual_port != null && message.hasOwnProperty("virtual_port")) + if (message.virtual_port != null && $Object.hasOwnProperty.call(message, "virtual_port")) object.virtual_port = message.virtual_port; return object; }; @@ -11164,8 +13893,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramConnectRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramConnectRequest.prototype.toJSON = function() { + return CMsgSteamDatagramConnectRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramConnectRequest + * @function getTypeUrl + * @memberof CMsgSteamDatagramConnectRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramConnectRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramConnectRequest"; }; return CMsgSteamDatagramConnectRequest; @@ -11175,32 +13918,45 @@ /** * Properties of a CMsgSteamDatagramConnectOK. - * @exports ICMsgSteamDatagramConnectOK - * @interface ICMsgSteamDatagramConnectOK + * @typedef {Object} CMsgSteamDatagramConnectOK.$Properties * @property {number|null} [client_connection_id] CMsgSteamDatagramConnectOK client_connection_id * @property {number|null} [server_connection_id] CMsgSteamDatagramConnectOK server_connection_id * @property {number|Long|null} [your_timestamp] CMsgSteamDatagramConnectOK your_timestamp * @property {number|null} [delay_time_usec] CMsgSteamDatagramConnectOK delay_time_usec * @property {number|null} [gameserver_relay_session_id] CMsgSteamDatagramConnectOK gameserver_relay_session_id - * @property {ICMsgSteamDatagramSessionCryptInfoSigned|null} [crypt] CMsgSteamDatagramConnectOK crypt - * @property {ICMsgSteamDatagramCertificateSigned|null} [cert] CMsgSteamDatagramConnectOK cert + * @property {CMsgSteamDatagramSessionCryptInfoSigned.$Properties|null} [crypt] CMsgSteamDatagramConnectOK crypt + * @property {CMsgSteamDatagramCertificateSigned.$Properties|null} [cert] CMsgSteamDatagramConnectOK cert * @property {number|null} [protocol_version] CMsgSteamDatagramConnectOK protocol_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramConnectOK. + * @exports ICMsgSteamDatagramConnectOK + * @interface ICMsgSteamDatagramConnectOK + * @augments CMsgSteamDatagramConnectOK.$Properties + * @deprecated Use CMsgSteamDatagramConnectOK.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramConnectOK. + * @typedef {CMsgSteamDatagramConnectOK.$Properties} CMsgSteamDatagramConnectOK.$Shape */ /** * Constructs a new CMsgSteamDatagramConnectOK. * @exports CMsgSteamDatagramConnectOK * @classdesc Represents a CMsgSteamDatagramConnectOK. - * @implements ICMsgSteamDatagramConnectOK * @constructor - * @param {ICMsgSteamDatagramConnectOK=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectOK.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramConnectOK(properties) { + var CMsgSteamDatagramConnectOK = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramConnectOK client_connection_id. @@ -11224,7 +13980,7 @@ * @memberof CMsgSteamDatagramConnectOK * @instance */ - CMsgSteamDatagramConnectOK.prototype.your_timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramConnectOK.prototype.your_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramConnectOK delay_time_usec. @@ -11244,7 +14000,7 @@ /** * CMsgSteamDatagramConnectOK crypt. - * @member {ICMsgSteamDatagramSessionCryptInfoSigned|null|undefined} crypt + * @member {CMsgSteamDatagramSessionCryptInfoSigned.$Properties|null|undefined} crypt * @memberof CMsgSteamDatagramConnectOK * @instance */ @@ -11252,7 +14008,7 @@ /** * CMsgSteamDatagramConnectOK cert. - * @member {ICMsgSteamDatagramCertificateSigned|null|undefined} cert + * @member {CMsgSteamDatagramCertificateSigned.$Properties|null|undefined} cert * @memberof CMsgSteamDatagramConnectOK * @instance */ @@ -11271,10 +14027,14 @@ * @function create * @memberof CMsgSteamDatagramConnectOK * @static - * @param {ICMsgSteamDatagramConnectOK=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectOK.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramConnectOK} CMsgSteamDatagramConnectOK instance + * @type {{ + * (properties: CMsgSteamDatagramConnectOK.$Shape): CMsgSteamDatagramConnectOK & CMsgSteamDatagramConnectOK.$Shape; + * (properties?: CMsgSteamDatagramConnectOK.$Properties): CMsgSteamDatagramConnectOK; + * }} */ - CMsgSteamDatagramConnectOK.create = function create(properties) { + CMsgSteamDatagramConnectOK.create = function(properties) { return new CMsgSteamDatagramConnectOK(properties); }; @@ -11283,29 +14043,36 @@ * @function encode * @memberof CMsgSteamDatagramConnectOK * @static - * @param {ICMsgSteamDatagramConnectOK} message CMsgSteamDatagramConnectOK message or plain object to encode + * @param {CMsgSteamDatagramConnectOK.$Properties} message CMsgSteamDatagramConnectOK message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectOK.encode = function encode(message, writer) { + CMsgSteamDatagramConnectOK.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.client_connection_id != null && Object.hasOwnProperty.call(message, "client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.client_connection_id); - if (message.gameserver_relay_session_id != null && Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.gameserver_relay_session_id); - if (message.your_timestamp != null && Object.hasOwnProperty.call(message, "your_timestamp")) + if (message.your_timestamp != null && $Object.hasOwnProperty.call(message, "your_timestamp")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.your_timestamp); - if (message.delay_time_usec != null && Object.hasOwnProperty.call(message, "delay_time_usec")) + if (message.delay_time_usec != null && $Object.hasOwnProperty.call(message, "delay_time_usec")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.delay_time_usec); - if (message.crypt != null && Object.hasOwnProperty.call(message, "crypt")) - $root.CMsgSteamDatagramSessionCryptInfoSigned.encode(message.crypt, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.cert != null && Object.hasOwnProperty.call(message, "cert")) - $root.CMsgSteamDatagramCertificateSigned.encode(message.cert, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.server_connection_id != null && Object.hasOwnProperty.call(message, "server_connection_id")) + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) + $root.CMsgSteamDatagramSessionCryptInfoSigned.encode(message.crypt, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + $root.CMsgSteamDatagramCertificateSigned.encode(message.cert, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.server_connection_id); - if (message.protocol_version != null && Object.hasOwnProperty.call(message, "protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.protocol_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11314,12 +14081,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramConnectOK * @static - * @param {ICMsgSteamDatagramConnectOK} message CMsgSteamDatagramConnectOK message or plain object to encode + * @param {CMsgSteamDatagramConnectOK.$Properties} message CMsgSteamDatagramConnectOK message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectOK.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramConnectOK.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11329,46 +14096,84 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramConnectOK} CMsgSteamDatagramConnectOK + * @returns {CMsgSteamDatagramConnectOK & CMsgSteamDatagramConnectOK.$Shape} CMsgSteamDatagramConnectOK * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectOK.decode = function decode(reader, length) { + CMsgSteamDatagramConnectOK.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramConnectOK(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramConnectOK(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_connection_id = reader.fixed32(); - break; - case 7: - message.server_connection_id = reader.fixed32(); - break; - case 3: - message.your_timestamp = reader.fixed64(); - break; - case 4: - message.delay_time_usec = reader.uint32(); - break; - case 2: - message.gameserver_relay_session_id = reader.uint32(); - break; - case 5: - message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.decode(reader, reader.uint32()); - break; - case 6: - message.cert = $root.CMsgSteamDatagramCertificateSigned.decode(reader, reader.uint32()); - break; - case 8: - message.protocol_version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.client_connection_id = reader.fixed32(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.server_connection_id = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.your_timestamp = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.delay_time_usec = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.gameserver_relay_session_id = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.decode(reader, reader.uint32(), $undefined, _depth + 1, message.crypt); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.cert = $root.CMsgSteamDatagramCertificateSigned.decode(reader, reader.uint32(), $undefined, _depth + 1, message.cert); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.protocol_version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11378,11 +14183,11 @@ * @memberof CMsgSteamDatagramConnectOK * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramConnectOK} CMsgSteamDatagramConnectOK + * @returns {CMsgSteamDatagramConnectOK & CMsgSteamDatagramConnectOK.$Shape} CMsgSteamDatagramConnectOK * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectOK.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramConnectOK.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11396,35 +14201,39 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramConnectOK.verify = function verify(message) { + CMsgSteamDatagramConnectOK.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) if (!$util.isInteger(message.client_connection_id)) return "client_connection_id: integer expected"; - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) if (!$util.isInteger(message.server_connection_id)) return "server_connection_id: integer expected"; - if (message.your_timestamp != null && message.hasOwnProperty("your_timestamp")) + if (message.your_timestamp != null && $Object.hasOwnProperty.call(message, "your_timestamp")) if (!$util.isInteger(message.your_timestamp) && !(message.your_timestamp && $util.isInteger(message.your_timestamp.low) && $util.isInteger(message.your_timestamp.high))) return "your_timestamp: integer|Long expected"; - if (message.delay_time_usec != null && message.hasOwnProperty("delay_time_usec")) + if (message.delay_time_usec != null && $Object.hasOwnProperty.call(message, "delay_time_usec")) if (!$util.isInteger(message.delay_time_usec)) return "delay_time_usec: integer expected"; - if (message.gameserver_relay_session_id != null && message.hasOwnProperty("gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) if (!$util.isInteger(message.gameserver_relay_session_id)) return "gameserver_relay_session_id: integer expected"; - if (message.crypt != null && message.hasOwnProperty("crypt")) { - var error = $root.CMsgSteamDatagramSessionCryptInfoSigned.verify(message.crypt); + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) { + var error = $root.CMsgSteamDatagramSessionCryptInfoSigned.verify(message.crypt, _depth + 1); if (error) return "crypt." + error; } - if (message.cert != null && message.hasOwnProperty("cert")) { - var error = $root.CMsgSteamDatagramCertificateSigned.verify(message.cert); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) { + var error = $root.CMsgSteamDatagramCertificateSigned.verify(message.cert, _depth + 1); if (error) return "cert." + error; } - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) if (!$util.isInteger(message.protocol_version)) return "protocol_version: integer expected"; return null; @@ -11438,9 +14247,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramConnectOK} CMsgSteamDatagramConnectOK */ - CMsgSteamDatagramConnectOK.fromObject = function fromObject(object) { + CMsgSteamDatagramConnectOK.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramConnectOK) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramConnectOK: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramConnectOK(); if (object.client_connection_id != null) message.client_connection_id = object.client_connection_id >>> 0; @@ -11448,26 +14263,26 @@ message.server_connection_id = object.server_connection_id >>> 0; if (object.your_timestamp != null) if ($util.Long) - (message.your_timestamp = $util.Long.fromValue(object.your_timestamp)).unsigned = false; + message.your_timestamp = $util.Long.fromValue(object.your_timestamp, true); else if (typeof object.your_timestamp === "string") - message.your_timestamp = parseInt(object.your_timestamp, 10); + message.your_timestamp = $parseInt(object.your_timestamp, 10); else if (typeof object.your_timestamp === "number") message.your_timestamp = object.your_timestamp; else if (typeof object.your_timestamp === "object") - message.your_timestamp = new $util.LongBits(object.your_timestamp.low >>> 0, object.your_timestamp.high >>> 0).toNumber(); + message.your_timestamp = new $util.LongBits(object.your_timestamp.low >>> 0, object.your_timestamp.high >>> 0).toNumber(true); if (object.delay_time_usec != null) message.delay_time_usec = object.delay_time_usec >>> 0; if (object.gameserver_relay_session_id != null) message.gameserver_relay_session_id = object.gameserver_relay_session_id >>> 0; if (object.crypt != null) { - if (typeof object.crypt !== "object") - throw TypeError(".CMsgSteamDatagramConnectOK.crypt: object expected"); - message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.fromObject(object.crypt); + if (!$util.isObject(object.crypt)) + throw $TypeError(".CMsgSteamDatagramConnectOK.crypt: object expected"); + message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.fromObject(object.crypt, _depth + 1); } if (object.cert != null) { - if (typeof object.cert !== "object") - throw TypeError(".CMsgSteamDatagramConnectOK.cert: object expected"); - message.cert = $root.CMsgSteamDatagramCertificateSigned.fromObject(object.cert); + if (!$util.isObject(object.cert)) + throw $TypeError(".CMsgSteamDatagramConnectOK.cert: object expected"); + message.cert = $root.CMsgSteamDatagramCertificateSigned.fromObject(object.cert, _depth + 1); } if (object.protocol_version != null) message.protocol_version = object.protocol_version >>> 0; @@ -11483,42 +14298,48 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramConnectOK.toObject = function toObject(message, options) { + CMsgSteamDatagramConnectOK.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.client_connection_id = 0; object.gameserver_relay_session_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.your_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.your_timestamp = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.your_timestamp = options.longs === String ? "0" : 0; + object.your_timestamp = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.delay_time_usec = 0; object.crypt = null; object.cert = null; object.server_connection_id = 0; object.protocol_version = 0; } - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) object.client_connection_id = message.client_connection_id; - if (message.gameserver_relay_session_id != null && message.hasOwnProperty("gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) object.gameserver_relay_session_id = message.gameserver_relay_session_id; - if (message.your_timestamp != null && message.hasOwnProperty("your_timestamp")) - if (typeof message.your_timestamp === "number") - object.your_timestamp = options.longs === String ? String(message.your_timestamp) : message.your_timestamp; + if (message.your_timestamp != null && $Object.hasOwnProperty.call(message, "your_timestamp")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.your_timestamp = typeof message.your_timestamp === "number" ? $BigInt(message.your_timestamp) : $util.Long.fromBits(message.your_timestamp.low >>> 0, message.your_timestamp.high >>> 0, true).toBigInt(); + else if (typeof message.your_timestamp === "number") + object.your_timestamp = options.longs === $String ? $String(message.your_timestamp) : message.your_timestamp; else - object.your_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.your_timestamp) : options.longs === Number ? new $util.LongBits(message.your_timestamp.low >>> 0, message.your_timestamp.high >>> 0).toNumber() : message.your_timestamp; - if (message.delay_time_usec != null && message.hasOwnProperty("delay_time_usec")) + object.your_timestamp = options.longs === $String ? $util.Long.prototype.toString.call(message.your_timestamp) : options.longs === $Number ? new $util.LongBits(message.your_timestamp.low >>> 0, message.your_timestamp.high >>> 0).toNumber(true) : message.your_timestamp; + if (message.delay_time_usec != null && $Object.hasOwnProperty.call(message, "delay_time_usec")) object.delay_time_usec = message.delay_time_usec; - if (message.crypt != null && message.hasOwnProperty("crypt")) - object.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.toObject(message.crypt, options); - if (message.cert != null && message.hasOwnProperty("cert")) - object.cert = $root.CMsgSteamDatagramCertificateSigned.toObject(message.cert, options); - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) + object.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.toObject(message.crypt, options, _depth + 1); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + object.cert = $root.CMsgSteamDatagramCertificateSigned.toObject(message.cert, options, _depth + 1); + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) object.server_connection_id = message.server_connection_id; - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) object.protocol_version = message.protocol_version; return object; }; @@ -11530,8 +14351,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramConnectOK.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramConnectOK.prototype.toJSON = function() { + return CMsgSteamDatagramConnectOK.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramConnectOK + * @function getTypeUrl + * @memberof CMsgSteamDatagramConnectOK + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramConnectOK.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramConnectOK"; }; return CMsgSteamDatagramConnectOK; @@ -11541,8 +14376,7 @@ /** * Properties of a CMsgSteamDatagramConnectionClosed. - * @exports ICMsgSteamDatagramConnectionClosed - * @interface ICMsgSteamDatagramConnectionClosed + * @typedef {Object} CMsgSteamDatagramConnectionClosed.$Properties * @property {number|null} [legacy_client_connection_id] CMsgSteamDatagramConnectionClosed legacy_client_connection_id * @property {number|null} [to_connection_id] CMsgSteamDatagramConnectionClosed to_connection_id * @property {number|null} [from_connection_id] CMsgSteamDatagramConnectionClosed from_connection_id @@ -11551,22 +14385,36 @@ * @property {CMsgSteamDatagramConnectionClosed.ERelayMode|null} [relay_mode] CMsgSteamDatagramConnectionClosed relay_mode * @property {string|null} [debug] CMsgSteamDatagramConnectionClosed debug * @property {number|null} [reason_code] CMsgSteamDatagramConnectionClosed reason_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramConnectionClosed. + * @exports ICMsgSteamDatagramConnectionClosed + * @interface ICMsgSteamDatagramConnectionClosed + * @augments CMsgSteamDatagramConnectionClosed.$Properties + * @deprecated Use CMsgSteamDatagramConnectionClosed.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramConnectionClosed. + * @typedef {CMsgSteamDatagramConnectionClosed.$Properties} CMsgSteamDatagramConnectionClosed.$Shape */ /** * Constructs a new CMsgSteamDatagramConnectionClosed. * @exports CMsgSteamDatagramConnectionClosed * @classdesc Represents a CMsgSteamDatagramConnectionClosed. - * @implements ICMsgSteamDatagramConnectionClosed * @constructor - * @param {ICMsgSteamDatagramConnectionClosed=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionClosed.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramConnectionClosed(properties) { + var CMsgSteamDatagramConnectionClosed = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramConnectionClosed legacy_client_connection_id. @@ -11598,7 +14446,7 @@ * @memberof CMsgSteamDatagramConnectionClosed * @instance */ - CMsgSteamDatagramConnectionClosed.prototype.peer_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramConnectionClosed.prototype.peer_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramConnectionClosed gameserver_relay_session_id. @@ -11637,10 +14485,14 @@ * @function create * @memberof CMsgSteamDatagramConnectionClosed * @static - * @param {ICMsgSteamDatagramConnectionClosed=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionClosed.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramConnectionClosed} CMsgSteamDatagramConnectionClosed instance + * @type {{ + * (properties: CMsgSteamDatagramConnectionClosed.$Shape): CMsgSteamDatagramConnectionClosed & CMsgSteamDatagramConnectionClosed.$Shape; + * (properties?: CMsgSteamDatagramConnectionClosed.$Properties): CMsgSteamDatagramConnectionClosed; + * }} */ - CMsgSteamDatagramConnectionClosed.create = function create(properties) { + CMsgSteamDatagramConnectionClosed.create = function(properties) { return new CMsgSteamDatagramConnectionClosed(properties); }; @@ -11649,29 +14501,36 @@ * @function encode * @memberof CMsgSteamDatagramConnectionClosed * @static - * @param {ICMsgSteamDatagramConnectionClosed} message CMsgSteamDatagramConnectionClosed message or plain object to encode + * @param {CMsgSteamDatagramConnectionClosed.$Properties} message CMsgSteamDatagramConnectionClosed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionClosed.encode = function encode(message, writer) { + CMsgSteamDatagramConnectionClosed.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.legacy_client_connection_id != null && Object.hasOwnProperty.call(message, "legacy_client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.legacy_client_connection_id); - if (message.gameserver_relay_session_id != null && Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.gameserver_relay_session_id); - if (message.peer_steam_id != null && Object.hasOwnProperty.call(message, "peer_steam_id")) + if (message.peer_steam_id != null && $Object.hasOwnProperty.call(message, "peer_steam_id")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.peer_steam_id); - if (message.relay_mode != null && Object.hasOwnProperty.call(message, "relay_mode")) + if (message.relay_mode != null && $Object.hasOwnProperty.call(message, "relay_mode")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.relay_mode); - if (message.debug != null && Object.hasOwnProperty.call(message, "debug")) + if (message.debug != null && $Object.hasOwnProperty.call(message, "debug")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.debug); - if (message.reason_code != null && Object.hasOwnProperty.call(message, "reason_code")) + if (message.reason_code != null && $Object.hasOwnProperty.call(message, "reason_code")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.reason_code); - if (message.to_connection_id != null && Object.hasOwnProperty.call(message, "to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.to_connection_id); - if (message.from_connection_id != null && Object.hasOwnProperty.call(message, "from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.from_connection_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11680,12 +14539,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramConnectionClosed * @static - * @param {ICMsgSteamDatagramConnectionClosed} message CMsgSteamDatagramConnectionClosed message or plain object to encode + * @param {CMsgSteamDatagramConnectionClosed.$Properties} message CMsgSteamDatagramConnectionClosed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionClosed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramConnectionClosed.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11695,46 +14554,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramConnectionClosed} CMsgSteamDatagramConnectionClosed + * @returns {CMsgSteamDatagramConnectionClosed & CMsgSteamDatagramConnectionClosed.$Shape} CMsgSteamDatagramConnectionClosed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionClosed.decode = function decode(reader, length) { + CMsgSteamDatagramConnectionClosed.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramConnectionClosed(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramConnectionClosed(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.legacy_client_connection_id = reader.fixed32(); - break; - case 7: - message.to_connection_id = reader.fixed32(); - break; - case 8: - message.from_connection_id = reader.fixed32(); - break; - case 3: - message.peer_steam_id = reader.fixed64(); - break; - case 2: - message.gameserver_relay_session_id = reader.uint32(); - break; - case 4: - message.relay_mode = reader.int32(); - break; - case 5: - message.debug = reader.string(); - break; - case 6: - message.reason_code = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.legacy_client_connection_id = reader.fixed32(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.to_connection_id = reader.fixed32(); + continue; + } + case 8: { + if (wireType !== 5) + break; + message.from_connection_id = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.peer_steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.gameserver_relay_session_id = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgSteamDatagramConnectionClosed.ERelayMode[value] !== $undefined) + message.relay_mode = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 5: { + if (wireType !== 2) + break; + message.debug = reader.string(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.reason_code = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11744,11 +14647,11 @@ * @memberof CMsgSteamDatagramConnectionClosed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramConnectionClosed} CMsgSteamDatagramConnectionClosed + * @returns {CMsgSteamDatagramConnectionClosed & CMsgSteamDatagramConnectionClosed.$Shape} CMsgSteamDatagramConnectionClosed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionClosed.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramConnectionClosed.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11762,25 +14665,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramConnectionClosed.verify = function verify(message) { + CMsgSteamDatagramConnectionClosed.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.legacy_client_connection_id != null && message.hasOwnProperty("legacy_client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) if (!$util.isInteger(message.legacy_client_connection_id)) return "legacy_client_connection_id: integer expected"; - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) if (!$util.isInteger(message.to_connection_id)) return "to_connection_id: integer expected"; - if (message.from_connection_id != null && message.hasOwnProperty("from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) if (!$util.isInteger(message.from_connection_id)) return "from_connection_id: integer expected"; - if (message.peer_steam_id != null && message.hasOwnProperty("peer_steam_id")) + if (message.peer_steam_id != null && $Object.hasOwnProperty.call(message, "peer_steam_id")) if (!$util.isInteger(message.peer_steam_id) && !(message.peer_steam_id && $util.isInteger(message.peer_steam_id.low) && $util.isInteger(message.peer_steam_id.high))) return "peer_steam_id: integer|Long expected"; - if (message.gameserver_relay_session_id != null && message.hasOwnProperty("gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) if (!$util.isInteger(message.gameserver_relay_session_id)) return "gameserver_relay_session_id: integer expected"; - if (message.relay_mode != null && message.hasOwnProperty("relay_mode")) + if (message.relay_mode != null && $Object.hasOwnProperty.call(message, "relay_mode")) switch (message.relay_mode) { default: return "relay_mode: enum value expected"; @@ -11789,10 +14696,10 @@ case 2: break; } - if (message.debug != null && message.hasOwnProperty("debug")) + if (message.debug != null && $Object.hasOwnProperty.call(message, "debug")) if (!$util.isString(message.debug)) return "debug: string expected"; - if (message.reason_code != null && message.hasOwnProperty("reason_code")) + if (message.reason_code != null && $Object.hasOwnProperty.call(message, "reason_code")) if (!$util.isInteger(message.reason_code)) return "reason_code: integer expected"; return null; @@ -11806,9 +14713,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramConnectionClosed} CMsgSteamDatagramConnectionClosed */ - CMsgSteamDatagramConnectionClosed.fromObject = function fromObject(object) { + CMsgSteamDatagramConnectionClosed.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramConnectionClosed) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramConnectionClosed: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramConnectionClosed(); if (object.legacy_client_connection_id != null) message.legacy_client_connection_id = object.legacy_client_connection_id >>> 0; @@ -11818,13 +14731,13 @@ message.from_connection_id = object.from_connection_id >>> 0; if (object.peer_steam_id != null) if ($util.Long) - (message.peer_steam_id = $util.Long.fromValue(object.peer_steam_id)).unsigned = false; + message.peer_steam_id = $util.Long.fromValue(object.peer_steam_id, true); else if (typeof object.peer_steam_id === "string") - message.peer_steam_id = parseInt(object.peer_steam_id, 10); + message.peer_steam_id = $parseInt(object.peer_steam_id, 10); else if (typeof object.peer_steam_id === "number") message.peer_steam_id = object.peer_steam_id; else if (typeof object.peer_steam_id === "object") - message.peer_steam_id = new $util.LongBits(object.peer_steam_id.low >>> 0, object.peer_steam_id.high >>> 0).toNumber(); + message.peer_steam_id = new $util.LongBits(object.peer_steam_id.low >>> 0, object.peer_steam_id.high >>> 0).toNumber(true); if (object.gameserver_relay_session_id != null) message.gameserver_relay_session_id = object.gameserver_relay_session_id >>> 0; switch (object.relay_mode) { @@ -11840,9 +14753,10 @@ case 2: message.relay_mode = 2; break; + default: } if (object.debug != null) - message.debug = String(object.debug); + message.debug = $String(object.debug); if (object.reason_code != null) message.reason_code = object.reason_code >>> 0; return message; @@ -11857,42 +14771,48 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramConnectionClosed.toObject = function toObject(message, options) { + CMsgSteamDatagramConnectionClosed.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.legacy_client_connection_id = 0; object.gameserver_relay_session_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.peer_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.peer_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.peer_steam_id = options.longs === String ? "0" : 0; - object.relay_mode = options.enums === String ? "None" : 0; + object.peer_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.relay_mode = options.enums === $String ? "None" : 0; object.debug = ""; object.reason_code = 0; object.to_connection_id = 0; object.from_connection_id = 0; } - if (message.legacy_client_connection_id != null && message.hasOwnProperty("legacy_client_connection_id")) + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) object.legacy_client_connection_id = message.legacy_client_connection_id; - if (message.gameserver_relay_session_id != null && message.hasOwnProperty("gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) object.gameserver_relay_session_id = message.gameserver_relay_session_id; - if (message.peer_steam_id != null && message.hasOwnProperty("peer_steam_id")) - if (typeof message.peer_steam_id === "number") - object.peer_steam_id = options.longs === String ? String(message.peer_steam_id) : message.peer_steam_id; + if (message.peer_steam_id != null && $Object.hasOwnProperty.call(message, "peer_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.peer_steam_id = typeof message.peer_steam_id === "number" ? $BigInt(message.peer_steam_id) : $util.Long.fromBits(message.peer_steam_id.low >>> 0, message.peer_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.peer_steam_id === "number") + object.peer_steam_id = options.longs === $String ? $String(message.peer_steam_id) : message.peer_steam_id; else - object.peer_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.peer_steam_id) : options.longs === Number ? new $util.LongBits(message.peer_steam_id.low >>> 0, message.peer_steam_id.high >>> 0).toNumber() : message.peer_steam_id; - if (message.relay_mode != null && message.hasOwnProperty("relay_mode")) - object.relay_mode = options.enums === String ? $root.CMsgSteamDatagramConnectionClosed.ERelayMode[message.relay_mode] : message.relay_mode; - if (message.debug != null && message.hasOwnProperty("debug")) + object.peer_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.peer_steam_id) : options.longs === $Number ? new $util.LongBits(message.peer_steam_id.low >>> 0, message.peer_steam_id.high >>> 0).toNumber(true) : message.peer_steam_id; + if (message.relay_mode != null && $Object.hasOwnProperty.call(message, "relay_mode")) + object.relay_mode = options.enums === $String ? $root.CMsgSteamDatagramConnectionClosed.ERelayMode[message.relay_mode] === $undefined ? message.relay_mode : $root.CMsgSteamDatagramConnectionClosed.ERelayMode[message.relay_mode] : message.relay_mode; + if (message.debug != null && $Object.hasOwnProperty.call(message, "debug")) object.debug = message.debug; - if (message.reason_code != null && message.hasOwnProperty("reason_code")) + if (message.reason_code != null && $Object.hasOwnProperty.call(message, "reason_code")) object.reason_code = message.reason_code; - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) object.to_connection_id = message.to_connection_id; - if (message.from_connection_id != null && message.hasOwnProperty("from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) object.from_connection_id = message.from_connection_id; return object; }; @@ -11904,8 +14824,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramConnectionClosed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramConnectionClosed.prototype.toJSON = function() { + return CMsgSteamDatagramConnectionClosed.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramConnectionClosed + * @function getTypeUrl + * @memberof CMsgSteamDatagramConnectionClosed + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramConnectionClosed.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramConnectionClosed"; }; /** @@ -11917,7 +14851,7 @@ * @property {number} ClosedByPeer=2 ClosedByPeer value */ CMsgSteamDatagramConnectionClosed.ERelayMode = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "None"] = 0; values[valuesById[1] = "EndToEnd"] = 1; values[valuesById[2] = "ClosedByPeer"] = 2; @@ -11931,8 +14865,7 @@ /** * Properties of a CMsgSteamDatagramNoConnection. - * @exports ICMsgSteamDatagramNoConnection - * @interface ICMsgSteamDatagramNoConnection + * @typedef {Object} CMsgSteamDatagramNoConnection.$Properties * @property {number|null} [legacy_client_connection_id] CMsgSteamDatagramNoConnection legacy_client_connection_id * @property {number|null} [to_connection_id] CMsgSteamDatagramNoConnection to_connection_id * @property {number|null} [from_connection_id] CMsgSteamDatagramNoConnection from_connection_id @@ -11940,22 +14873,36 @@ * @property {number|Long|null} [peer_steam_id] CMsgSteamDatagramNoConnection peer_steam_id * @property {boolean|null} [end_to_end] CMsgSteamDatagramNoConnection end_to_end * @property {number|null} [dummy_pad] CMsgSteamDatagramNoConnection dummy_pad + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramNoConnection. + * @exports ICMsgSteamDatagramNoConnection + * @interface ICMsgSteamDatagramNoConnection + * @augments CMsgSteamDatagramNoConnection.$Properties + * @deprecated Use CMsgSteamDatagramNoConnection.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramNoConnection. + * @typedef {CMsgSteamDatagramNoConnection.$Properties} CMsgSteamDatagramNoConnection.$Shape */ /** * Constructs a new CMsgSteamDatagramNoConnection. * @exports CMsgSteamDatagramNoConnection * @classdesc Represents a CMsgSteamDatagramNoConnection. - * @implements ICMsgSteamDatagramNoConnection * @constructor - * @param {ICMsgSteamDatagramNoConnection=} [properties] Properties to set + * @param {CMsgSteamDatagramNoConnection.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramNoConnection(properties) { + var CMsgSteamDatagramNoConnection = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramNoConnection legacy_client_connection_id. @@ -11995,7 +14942,7 @@ * @memberof CMsgSteamDatagramNoConnection * @instance */ - CMsgSteamDatagramNoConnection.prototype.peer_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramNoConnection.prototype.peer_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramNoConnection end_to_end. @@ -12018,10 +14965,14 @@ * @function create * @memberof CMsgSteamDatagramNoConnection * @static - * @param {ICMsgSteamDatagramNoConnection=} [properties] Properties to set + * @param {CMsgSteamDatagramNoConnection.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramNoConnection} CMsgSteamDatagramNoConnection instance + * @type {{ + * (properties: CMsgSteamDatagramNoConnection.$Shape): CMsgSteamDatagramNoConnection & CMsgSteamDatagramNoConnection.$Shape; + * (properties?: CMsgSteamDatagramNoConnection.$Properties): CMsgSteamDatagramNoConnection; + * }} */ - CMsgSteamDatagramNoConnection.create = function create(properties) { + CMsgSteamDatagramNoConnection.create = function(properties) { return new CMsgSteamDatagramNoConnection(properties); }; @@ -12030,27 +14981,34 @@ * @function encode * @memberof CMsgSteamDatagramNoConnection * @static - * @param {ICMsgSteamDatagramNoConnection} message CMsgSteamDatagramNoConnection message or plain object to encode + * @param {CMsgSteamDatagramNoConnection.$Properties} message CMsgSteamDatagramNoConnection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramNoConnection.encode = function encode(message, writer) { + CMsgSteamDatagramNoConnection.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.legacy_client_connection_id != null && Object.hasOwnProperty.call(message, "legacy_client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.legacy_client_connection_id); - if (message.gameserver_relay_session_id != null && Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.gameserver_relay_session_id); - if (message.peer_steam_id != null && Object.hasOwnProperty.call(message, "peer_steam_id")) + if (message.peer_steam_id != null && $Object.hasOwnProperty.call(message, "peer_steam_id")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.peer_steam_id); - if (message.end_to_end != null && Object.hasOwnProperty.call(message, "end_to_end")) + if (message.end_to_end != null && $Object.hasOwnProperty.call(message, "end_to_end")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.end_to_end); - if (message.to_connection_id != null && Object.hasOwnProperty.call(message, "to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) writer.uint32(/* id 5, wireType 5 =*/45).fixed32(message.to_connection_id); - if (message.from_connection_id != null && Object.hasOwnProperty.call(message, "from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) writer.uint32(/* id 6, wireType 5 =*/53).fixed32(message.from_connection_id); - if (message.dummy_pad != null && Object.hasOwnProperty.call(message, "dummy_pad")) + if (message.dummy_pad != null && $Object.hasOwnProperty.call(message, "dummy_pad")) writer.uint32(/* id 1023, wireType 5 =*/8189).fixed32(message.dummy_pad); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12059,12 +15017,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramNoConnection * @static - * @param {ICMsgSteamDatagramNoConnection} message CMsgSteamDatagramNoConnection message or plain object to encode + * @param {CMsgSteamDatagramNoConnection.$Properties} message CMsgSteamDatagramNoConnection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramNoConnection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramNoConnection.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12074,43 +15032,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramNoConnection} CMsgSteamDatagramNoConnection + * @returns {CMsgSteamDatagramNoConnection & CMsgSteamDatagramNoConnection.$Shape} CMsgSteamDatagramNoConnection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramNoConnection.decode = function decode(reader, length) { + CMsgSteamDatagramNoConnection.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramNoConnection(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramNoConnection(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.legacy_client_connection_id = reader.fixed32(); - break; - case 5: - message.to_connection_id = reader.fixed32(); - break; - case 6: - message.from_connection_id = reader.fixed32(); - break; - case 2: - message.gameserver_relay_session_id = reader.uint32(); - break; - case 3: - message.peer_steam_id = reader.fixed64(); - break; - case 4: - message.end_to_end = reader.bool(); - break; - case 1023: - message.dummy_pad = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.legacy_client_connection_id = reader.fixed32(); + continue; + } + case 5: { + if (wireType !== 5) + break; + message.to_connection_id = reader.fixed32(); + continue; + } + case 6: { + if (wireType !== 5) + break; + message.from_connection_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.gameserver_relay_session_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.peer_steam_id = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.end_to_end = reader.bool(); + continue; + } + case 1023: { + if (wireType !== 5) + break; + message.dummy_pad = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12120,11 +15113,11 @@ * @memberof CMsgSteamDatagramNoConnection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramNoConnection} CMsgSteamDatagramNoConnection + * @returns {CMsgSteamDatagramNoConnection & CMsgSteamDatagramNoConnection.$Shape} CMsgSteamDatagramNoConnection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramNoConnection.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramNoConnection.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12138,28 +15131,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramNoConnection.verify = function verify(message) { + CMsgSteamDatagramNoConnection.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.legacy_client_connection_id != null && message.hasOwnProperty("legacy_client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) if (!$util.isInteger(message.legacy_client_connection_id)) return "legacy_client_connection_id: integer expected"; - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) if (!$util.isInteger(message.to_connection_id)) return "to_connection_id: integer expected"; - if (message.from_connection_id != null && message.hasOwnProperty("from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) if (!$util.isInteger(message.from_connection_id)) return "from_connection_id: integer expected"; - if (message.gameserver_relay_session_id != null && message.hasOwnProperty("gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) if (!$util.isInteger(message.gameserver_relay_session_id)) return "gameserver_relay_session_id: integer expected"; - if (message.peer_steam_id != null && message.hasOwnProperty("peer_steam_id")) + if (message.peer_steam_id != null && $Object.hasOwnProperty.call(message, "peer_steam_id")) if (!$util.isInteger(message.peer_steam_id) && !(message.peer_steam_id && $util.isInteger(message.peer_steam_id.low) && $util.isInteger(message.peer_steam_id.high))) return "peer_steam_id: integer|Long expected"; - if (message.end_to_end != null && message.hasOwnProperty("end_to_end")) + if (message.end_to_end != null && $Object.hasOwnProperty.call(message, "end_to_end")) if (typeof message.end_to_end !== "boolean") return "end_to_end: boolean expected"; - if (message.dummy_pad != null && message.hasOwnProperty("dummy_pad")) + if (message.dummy_pad != null && $Object.hasOwnProperty.call(message, "dummy_pad")) if (!$util.isInteger(message.dummy_pad)) return "dummy_pad: integer expected"; return null; @@ -12173,9 +15170,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramNoConnection} CMsgSteamDatagramNoConnection */ - CMsgSteamDatagramNoConnection.fromObject = function fromObject(object) { + CMsgSteamDatagramNoConnection.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramNoConnection) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramNoConnection: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramNoConnection(); if (object.legacy_client_connection_id != null) message.legacy_client_connection_id = object.legacy_client_connection_id >>> 0; @@ -12187,15 +15190,15 @@ message.gameserver_relay_session_id = object.gameserver_relay_session_id >>> 0; if (object.peer_steam_id != null) if ($util.Long) - (message.peer_steam_id = $util.Long.fromValue(object.peer_steam_id)).unsigned = false; + message.peer_steam_id = $util.Long.fromValue(object.peer_steam_id, true); else if (typeof object.peer_steam_id === "string") - message.peer_steam_id = parseInt(object.peer_steam_id, 10); + message.peer_steam_id = $parseInt(object.peer_steam_id, 10); else if (typeof object.peer_steam_id === "number") message.peer_steam_id = object.peer_steam_id; else if (typeof object.peer_steam_id === "object") - message.peer_steam_id = new $util.LongBits(object.peer_steam_id.low >>> 0, object.peer_steam_id.high >>> 0).toNumber(); + message.peer_steam_id = new $util.LongBits(object.peer_steam_id.low >>> 0, object.peer_steam_id.high >>> 0).toNumber(true); if (object.end_to_end != null) - message.end_to_end = Boolean(object.end_to_end); + message.end_to_end = $Boolean(object.end_to_end); if (object.dummy_pad != null) message.dummy_pad = object.dummy_pad >>> 0; return message; @@ -12210,39 +15213,45 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramNoConnection.toObject = function toObject(message, options) { + CMsgSteamDatagramNoConnection.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.legacy_client_connection_id = 0; object.gameserver_relay_session_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.peer_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.peer_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.peer_steam_id = options.longs === String ? "0" : 0; + object.peer_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.end_to_end = false; object.to_connection_id = 0; object.from_connection_id = 0; object.dummy_pad = 0; } - if (message.legacy_client_connection_id != null && message.hasOwnProperty("legacy_client_connection_id")) + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) object.legacy_client_connection_id = message.legacy_client_connection_id; - if (message.gameserver_relay_session_id != null && message.hasOwnProperty("gameserver_relay_session_id")) + if (message.gameserver_relay_session_id != null && $Object.hasOwnProperty.call(message, "gameserver_relay_session_id")) object.gameserver_relay_session_id = message.gameserver_relay_session_id; - if (message.peer_steam_id != null && message.hasOwnProperty("peer_steam_id")) - if (typeof message.peer_steam_id === "number") - object.peer_steam_id = options.longs === String ? String(message.peer_steam_id) : message.peer_steam_id; + if (message.peer_steam_id != null && $Object.hasOwnProperty.call(message, "peer_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.peer_steam_id = typeof message.peer_steam_id === "number" ? $BigInt(message.peer_steam_id) : $util.Long.fromBits(message.peer_steam_id.low >>> 0, message.peer_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.peer_steam_id === "number") + object.peer_steam_id = options.longs === $String ? $String(message.peer_steam_id) : message.peer_steam_id; else - object.peer_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.peer_steam_id) : options.longs === Number ? new $util.LongBits(message.peer_steam_id.low >>> 0, message.peer_steam_id.high >>> 0).toNumber() : message.peer_steam_id; - if (message.end_to_end != null && message.hasOwnProperty("end_to_end")) + object.peer_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.peer_steam_id) : options.longs === $Number ? new $util.LongBits(message.peer_steam_id.low >>> 0, message.peer_steam_id.high >>> 0).toNumber(true) : message.peer_steam_id; + if (message.end_to_end != null && $Object.hasOwnProperty.call(message, "end_to_end")) object.end_to_end = message.end_to_end; - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) object.to_connection_id = message.to_connection_id; - if (message.from_connection_id != null && message.hasOwnProperty("from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) object.from_connection_id = message.from_connection_id; - if (message.dummy_pad != null && message.hasOwnProperty("dummy_pad")) + if (message.dummy_pad != null && $Object.hasOwnProperty.call(message, "dummy_pad")) object.dummy_pad = message.dummy_pad; return object; }; @@ -12254,8 +15263,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramNoConnection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramNoConnection.prototype.toJSON = function() { + return CMsgSteamDatagramNoConnection.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramNoConnection + * @function getTypeUrl + * @memberof CMsgSteamDatagramNoConnection + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramNoConnection.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramNoConnection"; }; return CMsgSteamDatagramNoConnection; @@ -12265,8 +15288,7 @@ /** * Properties of a CMsgSteamDatagramP2PSessionRequestBody. - * @exports ICMsgSteamDatagramP2PSessionRequestBody - * @interface ICMsgSteamDatagramP2PSessionRequestBody + * @typedef {Object} CMsgSteamDatagramP2PSessionRequestBody.$Properties * @property {number|null} [challenge_time] CMsgSteamDatagramP2PSessionRequestBody challenge_time * @property {number|Long|null} [challenge] CMsgSteamDatagramP2PSessionRequestBody challenge * @property {number|null} [my_connection_id] CMsgSteamDatagramP2PSessionRequestBody my_connection_id @@ -12275,22 +15297,36 @@ * @property {number|null} [protocol_version] CMsgSteamDatagramP2PSessionRequestBody protocol_version * @property {number|null} [network_config_version] CMsgSteamDatagramP2PSessionRequestBody network_config_version * @property {number|null} [public_ip] CMsgSteamDatagramP2PSessionRequestBody public_ip + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramP2PSessionRequestBody. + * @exports ICMsgSteamDatagramP2PSessionRequestBody + * @interface ICMsgSteamDatagramP2PSessionRequestBody + * @augments CMsgSteamDatagramP2PSessionRequestBody.$Properties + * @deprecated Use CMsgSteamDatagramP2PSessionRequestBody.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramP2PSessionRequestBody. + * @typedef {CMsgSteamDatagramP2PSessionRequestBody.$Properties} CMsgSteamDatagramP2PSessionRequestBody.$Shape */ /** * Constructs a new CMsgSteamDatagramP2PSessionRequestBody. * @exports CMsgSteamDatagramP2PSessionRequestBody * @classdesc Represents a CMsgSteamDatagramP2PSessionRequestBody. - * @implements ICMsgSteamDatagramP2PSessionRequestBody * @constructor - * @param {ICMsgSteamDatagramP2PSessionRequestBody=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PSessionRequestBody.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramP2PSessionRequestBody(properties) { + var CMsgSteamDatagramP2PSessionRequestBody = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramP2PSessionRequestBody challenge_time. @@ -12306,7 +15342,7 @@ * @memberof CMsgSteamDatagramP2PSessionRequestBody * @instance */ - CMsgSteamDatagramP2PSessionRequestBody.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramP2PSessionRequestBody.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramP2PSessionRequestBody my_connection_id. @@ -12322,7 +15358,7 @@ * @memberof CMsgSteamDatagramP2PSessionRequestBody * @instance */ - CMsgSteamDatagramP2PSessionRequestBody.prototype.peer_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramP2PSessionRequestBody.prototype.peer_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramP2PSessionRequestBody peer_connection_id. @@ -12361,10 +15397,14 @@ * @function create * @memberof CMsgSteamDatagramP2PSessionRequestBody * @static - * @param {ICMsgSteamDatagramP2PSessionRequestBody=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PSessionRequestBody.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramP2PSessionRequestBody} CMsgSteamDatagramP2PSessionRequestBody instance + * @type {{ + * (properties: CMsgSteamDatagramP2PSessionRequestBody.$Shape): CMsgSteamDatagramP2PSessionRequestBody & CMsgSteamDatagramP2PSessionRequestBody.$Shape; + * (properties?: CMsgSteamDatagramP2PSessionRequestBody.$Properties): CMsgSteamDatagramP2PSessionRequestBody; + * }} */ - CMsgSteamDatagramP2PSessionRequestBody.create = function create(properties) { + CMsgSteamDatagramP2PSessionRequestBody.create = function(properties) { return new CMsgSteamDatagramP2PSessionRequestBody(properties); }; @@ -12373,29 +15413,36 @@ * @function encode * @memberof CMsgSteamDatagramP2PSessionRequestBody * @static - * @param {ICMsgSteamDatagramP2PSessionRequestBody} message CMsgSteamDatagramP2PSessionRequestBody message or plain object to encode + * @param {CMsgSteamDatagramP2PSessionRequestBody.$Properties} message CMsgSteamDatagramP2PSessionRequestBody message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramP2PSessionRequestBody.encode = function encode(message, writer) { + CMsgSteamDatagramP2PSessionRequestBody.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.challenge_time != null && Object.hasOwnProperty.call(message, "challenge_time")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.challenge_time != null && $Object.hasOwnProperty.call(message, "challenge_time")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.challenge_time); - if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.challenge); - if (message.my_connection_id != null && Object.hasOwnProperty.call(message, "my_connection_id")) + if (message.my_connection_id != null && $Object.hasOwnProperty.call(message, "my_connection_id")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.my_connection_id); - if (message.peer_steam_id != null && Object.hasOwnProperty.call(message, "peer_steam_id")) + if (message.peer_steam_id != null && $Object.hasOwnProperty.call(message, "peer_steam_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.peer_steam_id); - if (message.peer_connection_id != null && Object.hasOwnProperty.call(message, "peer_connection_id")) + if (message.peer_connection_id != null && $Object.hasOwnProperty.call(message, "peer_connection_id")) writer.uint32(/* id 5, wireType 5 =*/45).fixed32(message.peer_connection_id); - if (message.protocol_version != null && Object.hasOwnProperty.call(message, "protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.protocol_version); - if (message.network_config_version != null && Object.hasOwnProperty.call(message, "network_config_version")) + if (message.network_config_version != null && $Object.hasOwnProperty.call(message, "network_config_version")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.network_config_version); - if (message.public_ip != null && Object.hasOwnProperty.call(message, "public_ip")) + if (message.public_ip != null && $Object.hasOwnProperty.call(message, "public_ip")) writer.uint32(/* id 10, wireType 5 =*/85).fixed32(message.public_ip); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12404,12 +15451,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramP2PSessionRequestBody * @static - * @param {ICMsgSteamDatagramP2PSessionRequestBody} message CMsgSteamDatagramP2PSessionRequestBody message or plain object to encode + * @param {CMsgSteamDatagramP2PSessionRequestBody.$Properties} message CMsgSteamDatagramP2PSessionRequestBody message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramP2PSessionRequestBody.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramP2PSessionRequestBody.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12419,46 +15466,84 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramP2PSessionRequestBody} CMsgSteamDatagramP2PSessionRequestBody + * @returns {CMsgSteamDatagramP2PSessionRequestBody & CMsgSteamDatagramP2PSessionRequestBody.$Shape} CMsgSteamDatagramP2PSessionRequestBody * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramP2PSessionRequestBody.decode = function decode(reader, length) { + CMsgSteamDatagramP2PSessionRequestBody.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramP2PSessionRequestBody(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramP2PSessionRequestBody(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.challenge_time = reader.fixed32(); - break; - case 2: - message.challenge = reader.fixed64(); - break; - case 3: - message.my_connection_id = reader.fixed32(); - break; - case 4: - message.peer_steam_id = reader.fixed64(); - break; - case 5: - message.peer_connection_id = reader.fixed32(); - break; - case 8: - message.protocol_version = reader.uint32(); - break; - case 9: - message.network_config_version = reader.uint32(); - break; - case 10: - message.public_ip = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.challenge_time = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.challenge = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.my_connection_id = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.peer_steam_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 5) + break; + message.peer_connection_id = reader.fixed32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.protocol_version = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.network_config_version = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 5) + break; + message.public_ip = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12468,11 +15553,11 @@ * @memberof CMsgSteamDatagramP2PSessionRequestBody * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramP2PSessionRequestBody} CMsgSteamDatagramP2PSessionRequestBody + * @returns {CMsgSteamDatagramP2PSessionRequestBody & CMsgSteamDatagramP2PSessionRequestBody.$Shape} CMsgSteamDatagramP2PSessionRequestBody * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramP2PSessionRequestBody.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramP2PSessionRequestBody.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12486,31 +15571,35 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramP2PSessionRequestBody.verify = function verify(message) { + CMsgSteamDatagramP2PSessionRequestBody.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.challenge_time != null && message.hasOwnProperty("challenge_time")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.challenge_time != null && $Object.hasOwnProperty.call(message, "challenge_time")) if (!$util.isInteger(message.challenge_time)) return "challenge_time: integer expected"; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) if (!$util.isInteger(message.challenge) && !(message.challenge && $util.isInteger(message.challenge.low) && $util.isInteger(message.challenge.high))) return "challenge: integer|Long expected"; - if (message.my_connection_id != null && message.hasOwnProperty("my_connection_id")) + if (message.my_connection_id != null && $Object.hasOwnProperty.call(message, "my_connection_id")) if (!$util.isInteger(message.my_connection_id)) return "my_connection_id: integer expected"; - if (message.peer_steam_id != null && message.hasOwnProperty("peer_steam_id")) + if (message.peer_steam_id != null && $Object.hasOwnProperty.call(message, "peer_steam_id")) if (!$util.isInteger(message.peer_steam_id) && !(message.peer_steam_id && $util.isInteger(message.peer_steam_id.low) && $util.isInteger(message.peer_steam_id.high))) return "peer_steam_id: integer|Long expected"; - if (message.peer_connection_id != null && message.hasOwnProperty("peer_connection_id")) + if (message.peer_connection_id != null && $Object.hasOwnProperty.call(message, "peer_connection_id")) if (!$util.isInteger(message.peer_connection_id)) return "peer_connection_id: integer expected"; - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) if (!$util.isInteger(message.protocol_version)) return "protocol_version: integer expected"; - if (message.network_config_version != null && message.hasOwnProperty("network_config_version")) + if (message.network_config_version != null && $Object.hasOwnProperty.call(message, "network_config_version")) if (!$util.isInteger(message.network_config_version)) return "network_config_version: integer expected"; - if (message.public_ip != null && message.hasOwnProperty("public_ip")) + if (message.public_ip != null && $Object.hasOwnProperty.call(message, "public_ip")) if (!$util.isInteger(message.public_ip)) return "public_ip: integer expected"; return null; @@ -12524,32 +15613,38 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramP2PSessionRequestBody} CMsgSteamDatagramP2PSessionRequestBody */ - CMsgSteamDatagramP2PSessionRequestBody.fromObject = function fromObject(object) { + CMsgSteamDatagramP2PSessionRequestBody.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramP2PSessionRequestBody) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramP2PSessionRequestBody: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramP2PSessionRequestBody(); if (object.challenge_time != null) message.challenge_time = object.challenge_time >>> 0; if (object.challenge != null) if ($util.Long) - (message.challenge = $util.Long.fromValue(object.challenge)).unsigned = false; + message.challenge = $util.Long.fromValue(object.challenge, true); else if (typeof object.challenge === "string") - message.challenge = parseInt(object.challenge, 10); + message.challenge = $parseInt(object.challenge, 10); else if (typeof object.challenge === "number") message.challenge = object.challenge; else if (typeof object.challenge === "object") - message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(); + message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(true); if (object.my_connection_id != null) message.my_connection_id = object.my_connection_id >>> 0; if (object.peer_steam_id != null) if ($util.Long) - (message.peer_steam_id = $util.Long.fromValue(object.peer_steam_id)).unsigned = false; + message.peer_steam_id = $util.Long.fromValue(object.peer_steam_id, true); else if (typeof object.peer_steam_id === "string") - message.peer_steam_id = parseInt(object.peer_steam_id, 10); + message.peer_steam_id = $parseInt(object.peer_steam_id, 10); else if (typeof object.peer_steam_id === "number") message.peer_steam_id = object.peer_steam_id; else if (typeof object.peer_steam_id === "object") - message.peer_steam_id = new $util.LongBits(object.peer_steam_id.low >>> 0, object.peer_steam_id.high >>> 0).toNumber(); + message.peer_steam_id = new $util.LongBits(object.peer_steam_id.low >>> 0, object.peer_steam_id.high >>> 0).toNumber(true); if (object.peer_connection_id != null) message.peer_connection_id = object.peer_connection_id >>> 0; if (object.protocol_version != null) @@ -12570,49 +15665,57 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramP2PSessionRequestBody.toObject = function toObject(message, options) { + CMsgSteamDatagramP2PSessionRequestBody.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.challenge_time = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.challenge = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.challenge = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.challenge = options.longs === String ? "0" : 0; + object.challenge = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.my_connection_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.peer_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.peer_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.peer_steam_id = options.longs === String ? "0" : 0; + object.peer_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.peer_connection_id = 0; object.protocol_version = 0; object.network_config_version = 0; object.public_ip = 0; } - if (message.challenge_time != null && message.hasOwnProperty("challenge_time")) + if (message.challenge_time != null && $Object.hasOwnProperty.call(message, "challenge_time")) object.challenge_time = message.challenge_time; - if (message.challenge != null && message.hasOwnProperty("challenge")) - if (typeof message.challenge === "number") - object.challenge = options.longs === String ? String(message.challenge) : message.challenge; + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.challenge = typeof message.challenge === "number" ? $BigInt(message.challenge) : $util.Long.fromBits(message.challenge.low >>> 0, message.challenge.high >>> 0, true).toBigInt(); + else if (typeof message.challenge === "number") + object.challenge = options.longs === $String ? $String(message.challenge) : message.challenge; else - object.challenge = options.longs === String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber() : message.challenge; - if (message.my_connection_id != null && message.hasOwnProperty("my_connection_id")) + object.challenge = options.longs === $String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === $Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber(true) : message.challenge; + if (message.my_connection_id != null && $Object.hasOwnProperty.call(message, "my_connection_id")) object.my_connection_id = message.my_connection_id; - if (message.peer_steam_id != null && message.hasOwnProperty("peer_steam_id")) - if (typeof message.peer_steam_id === "number") - object.peer_steam_id = options.longs === String ? String(message.peer_steam_id) : message.peer_steam_id; + if (message.peer_steam_id != null && $Object.hasOwnProperty.call(message, "peer_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.peer_steam_id = typeof message.peer_steam_id === "number" ? $BigInt(message.peer_steam_id) : $util.Long.fromBits(message.peer_steam_id.low >>> 0, message.peer_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.peer_steam_id === "number") + object.peer_steam_id = options.longs === $String ? $String(message.peer_steam_id) : message.peer_steam_id; else - object.peer_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.peer_steam_id) : options.longs === Number ? new $util.LongBits(message.peer_steam_id.low >>> 0, message.peer_steam_id.high >>> 0).toNumber() : message.peer_steam_id; - if (message.peer_connection_id != null && message.hasOwnProperty("peer_connection_id")) + object.peer_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.peer_steam_id) : options.longs === $Number ? new $util.LongBits(message.peer_steam_id.low >>> 0, message.peer_steam_id.high >>> 0).toNumber(true) : message.peer_steam_id; + if (message.peer_connection_id != null && $Object.hasOwnProperty.call(message, "peer_connection_id")) object.peer_connection_id = message.peer_connection_id; - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) object.protocol_version = message.protocol_version; - if (message.network_config_version != null && message.hasOwnProperty("network_config_version")) + if (message.network_config_version != null && $Object.hasOwnProperty.call(message, "network_config_version")) object.network_config_version = message.network_config_version; - if (message.public_ip != null && message.hasOwnProperty("public_ip")) + if (message.public_ip != null && $Object.hasOwnProperty.call(message, "public_ip")) object.public_ip = message.public_ip; return object; }; @@ -12624,8 +15727,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramP2PSessionRequestBody.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramP2PSessionRequestBody.prototype.toJSON = function() { + return CMsgSteamDatagramP2PSessionRequestBody.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramP2PSessionRequestBody + * @function getTypeUrl + * @memberof CMsgSteamDatagramP2PSessionRequestBody + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramP2PSessionRequestBody.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramP2PSessionRequestBody"; }; return CMsgSteamDatagramP2PSessionRequestBody; @@ -12635,31 +15752,44 @@ /** * Properties of a CMsgSteamDatagramP2PSessionRequest. - * @exports ICMsgSteamDatagramP2PSessionRequest - * @interface ICMsgSteamDatagramP2PSessionRequest - * @property {ICMsgSteamDatagramCertificateSigned|null} [cert] CMsgSteamDatagramP2PSessionRequest cert + * @typedef {Object} CMsgSteamDatagramP2PSessionRequest.$Properties + * @property {CMsgSteamDatagramCertificateSigned.$Properties|null} [cert] CMsgSteamDatagramP2PSessionRequest cert * @property {Uint8Array|null} [body] CMsgSteamDatagramP2PSessionRequest body * @property {Uint8Array|null} [signature] CMsgSteamDatagramP2PSessionRequest signature + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramP2PSessionRequest. + * @exports ICMsgSteamDatagramP2PSessionRequest + * @interface ICMsgSteamDatagramP2PSessionRequest + * @augments CMsgSteamDatagramP2PSessionRequest.$Properties + * @deprecated Use CMsgSteamDatagramP2PSessionRequest.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramP2PSessionRequest. + * @typedef {CMsgSteamDatagramP2PSessionRequest.$Properties} CMsgSteamDatagramP2PSessionRequest.$Shape */ /** * Constructs a new CMsgSteamDatagramP2PSessionRequest. * @exports CMsgSteamDatagramP2PSessionRequest * @classdesc Represents a CMsgSteamDatagramP2PSessionRequest. - * @implements ICMsgSteamDatagramP2PSessionRequest * @constructor - * @param {ICMsgSteamDatagramP2PSessionRequest=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PSessionRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramP2PSessionRequest(properties) { + var CMsgSteamDatagramP2PSessionRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramP2PSessionRequest cert. - * @member {ICMsgSteamDatagramCertificateSigned|null|undefined} cert + * @member {CMsgSteamDatagramCertificateSigned.$Properties|null|undefined} cert * @memberof CMsgSteamDatagramP2PSessionRequest * @instance */ @@ -12686,10 +15816,14 @@ * @function create * @memberof CMsgSteamDatagramP2PSessionRequest * @static - * @param {ICMsgSteamDatagramP2PSessionRequest=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PSessionRequest.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramP2PSessionRequest} CMsgSteamDatagramP2PSessionRequest instance + * @type {{ + * (properties: CMsgSteamDatagramP2PSessionRequest.$Shape): CMsgSteamDatagramP2PSessionRequest & CMsgSteamDatagramP2PSessionRequest.$Shape; + * (properties?: CMsgSteamDatagramP2PSessionRequest.$Properties): CMsgSteamDatagramP2PSessionRequest; + * }} */ - CMsgSteamDatagramP2PSessionRequest.create = function create(properties) { + CMsgSteamDatagramP2PSessionRequest.create = function(properties) { return new CMsgSteamDatagramP2PSessionRequest(properties); }; @@ -12698,19 +15832,26 @@ * @function encode * @memberof CMsgSteamDatagramP2PSessionRequest * @static - * @param {ICMsgSteamDatagramP2PSessionRequest} message CMsgSteamDatagramP2PSessionRequest message or plain object to encode + * @param {CMsgSteamDatagramP2PSessionRequest.$Properties} message CMsgSteamDatagramP2PSessionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramP2PSessionRequest.encode = function encode(message, writer) { + CMsgSteamDatagramP2PSessionRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.cert != null && Object.hasOwnProperty.call(message, "cert")) - $root.CMsgSteamDatagramCertificateSigned.encode(message.cert, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + $root.CMsgSteamDatagramCertificateSigned.encode(message.cert, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.body); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signature); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12719,12 +15860,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramP2PSessionRequest * @static - * @param {ICMsgSteamDatagramP2PSessionRequest} message CMsgSteamDatagramP2PSessionRequest message or plain object to encode + * @param {CMsgSteamDatagramP2PSessionRequest.$Properties} message CMsgSteamDatagramP2PSessionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramP2PSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramP2PSessionRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12734,31 +15875,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramP2PSessionRequest} CMsgSteamDatagramP2PSessionRequest + * @returns {CMsgSteamDatagramP2PSessionRequest & CMsgSteamDatagramP2PSessionRequest.$Shape} CMsgSteamDatagramP2PSessionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramP2PSessionRequest.decode = function decode(reader, length) { + CMsgSteamDatagramP2PSessionRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramP2PSessionRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramP2PSessionRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cert = $root.CMsgSteamDatagramCertificateSigned.decode(reader, reader.uint32()); - break; - case 2: - message.body = reader.bytes(); - break; - case 3: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.cert = $root.CMsgSteamDatagramCertificateSigned.decode(reader, reader.uint32(), $undefined, _depth + 1, message.cert); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.body = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.signature = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12768,11 +15932,11 @@ * @memberof CMsgSteamDatagramP2PSessionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramP2PSessionRequest} CMsgSteamDatagramP2PSessionRequest + * @returns {CMsgSteamDatagramP2PSessionRequest & CMsgSteamDatagramP2PSessionRequest.$Shape} CMsgSteamDatagramP2PSessionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramP2PSessionRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramP2PSessionRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12786,18 +15950,22 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramP2PSessionRequest.verify = function verify(message) { + CMsgSteamDatagramP2PSessionRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cert != null && message.hasOwnProperty("cert")) { - var error = $root.CMsgSteamDatagramCertificateSigned.verify(message.cert); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) { + var error = $root.CMsgSteamDatagramCertificateSigned.verify(message.cert, _depth + 1); if (error) return "cert." + error; } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) return "body: buffer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; return null; @@ -12811,24 +15979,30 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramP2PSessionRequest} CMsgSteamDatagramP2PSessionRequest */ - CMsgSteamDatagramP2PSessionRequest.fromObject = function fromObject(object) { + CMsgSteamDatagramP2PSessionRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramP2PSessionRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramP2PSessionRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramP2PSessionRequest(); if (object.cert != null) { - if (typeof object.cert !== "object") - throw TypeError(".CMsgSteamDatagramP2PSessionRequest.cert: object expected"); - message.cert = $root.CMsgSteamDatagramCertificateSigned.fromObject(object.cert); + if (!$util.isObject(object.cert)) + throw $TypeError(".CMsgSteamDatagramP2PSessionRequest.cert: object expected"); + message.cert = $root.CMsgSteamDatagramCertificateSigned.fromObject(object.cert, _depth + 1); } if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; if (object.signature != null) if (typeof object.signature === "string") $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) + else if (object.signature.length >= 0) message.signature = object.signature; return message; }; @@ -12842,33 +16016,37 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramP2PSessionRequest.toObject = function toObject(message, options) { + CMsgSteamDatagramP2PSessionRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.cert = null; - if (options.bytes === String) + if (options.bytes === $String) object.body = ""; else { object.body = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.body = $util.newBuffer(object.body); } - if (options.bytes === String) + if (options.bytes === $String) object.signature = ""; else { object.signature = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.signature = $util.newBuffer(object.signature); } } - if (message.cert != null && message.hasOwnProperty("cert")) - object.cert = $root.CMsgSteamDatagramCertificateSigned.toObject(message.cert, options); - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + object.cert = $root.CMsgSteamDatagramCertificateSigned.toObject(message.cert, options, _depth + 1); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = options.bytes === $String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.body) : message.body; + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) + object.signature = options.bytes === $String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.signature) : message.signature; return object; }; @@ -12879,8 +16057,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramP2PSessionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramP2PSessionRequest.prototype.toJSON = function() { + return CMsgSteamDatagramP2PSessionRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramP2PSessionRequest + * @function getTypeUrl + * @memberof CMsgSteamDatagramP2PSessionRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramP2PSessionRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramP2PSessionRequest"; }; return CMsgSteamDatagramP2PSessionRequest; @@ -12890,28 +16082,41 @@ /** * Properties of a CMsgSteamDatagramP2PSessionEstablished. - * @exports ICMsgSteamDatagramP2PSessionEstablished - * @interface ICMsgSteamDatagramP2PSessionEstablished + * @typedef {Object} CMsgSteamDatagramP2PSessionEstablished.$Properties * @property {number|null} [connection_id] CMsgSteamDatagramP2PSessionEstablished connection_id * @property {number|null} [seconds_until_shutdown] CMsgSteamDatagramP2PSessionEstablished seconds_until_shutdown * @property {number|Long|null} [relay_routing_id] CMsgSteamDatagramP2PSessionEstablished relay_routing_id * @property {number|null} [seq_num_r2c] CMsgSteamDatagramP2PSessionEstablished seq_num_r2c + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramP2PSessionEstablished. + * @exports ICMsgSteamDatagramP2PSessionEstablished + * @interface ICMsgSteamDatagramP2PSessionEstablished + * @augments CMsgSteamDatagramP2PSessionEstablished.$Properties + * @deprecated Use CMsgSteamDatagramP2PSessionEstablished.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramP2PSessionEstablished. + * @typedef {CMsgSteamDatagramP2PSessionEstablished.$Properties} CMsgSteamDatagramP2PSessionEstablished.$Shape */ /** * Constructs a new CMsgSteamDatagramP2PSessionEstablished. * @exports CMsgSteamDatagramP2PSessionEstablished * @classdesc Represents a CMsgSteamDatagramP2PSessionEstablished. - * @implements ICMsgSteamDatagramP2PSessionEstablished * @constructor - * @param {ICMsgSteamDatagramP2PSessionEstablished=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PSessionEstablished.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramP2PSessionEstablished(properties) { + var CMsgSteamDatagramP2PSessionEstablished = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramP2PSessionEstablished connection_id. @@ -12935,7 +16140,7 @@ * @memberof CMsgSteamDatagramP2PSessionEstablished * @instance */ - CMsgSteamDatagramP2PSessionEstablished.prototype.relay_routing_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramP2PSessionEstablished.prototype.relay_routing_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramP2PSessionEstablished seq_num_r2c. @@ -12950,10 +16155,14 @@ * @function create * @memberof CMsgSteamDatagramP2PSessionEstablished * @static - * @param {ICMsgSteamDatagramP2PSessionEstablished=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PSessionEstablished.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramP2PSessionEstablished} CMsgSteamDatagramP2PSessionEstablished instance + * @type {{ + * (properties: CMsgSteamDatagramP2PSessionEstablished.$Shape): CMsgSteamDatagramP2PSessionEstablished & CMsgSteamDatagramP2PSessionEstablished.$Shape; + * (properties?: CMsgSteamDatagramP2PSessionEstablished.$Properties): CMsgSteamDatagramP2PSessionEstablished; + * }} */ - CMsgSteamDatagramP2PSessionEstablished.create = function create(properties) { + CMsgSteamDatagramP2PSessionEstablished.create = function(properties) { return new CMsgSteamDatagramP2PSessionEstablished(properties); }; @@ -12962,21 +16171,28 @@ * @function encode * @memberof CMsgSteamDatagramP2PSessionEstablished * @static - * @param {ICMsgSteamDatagramP2PSessionEstablished} message CMsgSteamDatagramP2PSessionEstablished message or plain object to encode + * @param {CMsgSteamDatagramP2PSessionEstablished.$Properties} message CMsgSteamDatagramP2PSessionEstablished message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramP2PSessionEstablished.encode = function encode(message, writer) { + CMsgSteamDatagramP2PSessionEstablished.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.connection_id); - if (message.seconds_until_shutdown != null && Object.hasOwnProperty.call(message, "seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.seconds_until_shutdown); - if (message.relay_routing_id != null && Object.hasOwnProperty.call(message, "relay_routing_id")) + if (message.relay_routing_id != null && $Object.hasOwnProperty.call(message, "relay_routing_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.relay_routing_id); - if (message.seq_num_r2c != null && Object.hasOwnProperty.call(message, "seq_num_r2c")) + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.seq_num_r2c); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12985,12 +16201,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramP2PSessionEstablished * @static - * @param {ICMsgSteamDatagramP2PSessionEstablished} message CMsgSteamDatagramP2PSessionEstablished message or plain object to encode + * @param {CMsgSteamDatagramP2PSessionEstablished.$Properties} message CMsgSteamDatagramP2PSessionEstablished message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramP2PSessionEstablished.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramP2PSessionEstablished.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13000,34 +16216,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramP2PSessionEstablished} CMsgSteamDatagramP2PSessionEstablished + * @returns {CMsgSteamDatagramP2PSessionEstablished & CMsgSteamDatagramP2PSessionEstablished.$Shape} CMsgSteamDatagramP2PSessionEstablished * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramP2PSessionEstablished.decode = function decode(reader, length) { + CMsgSteamDatagramP2PSessionEstablished.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramP2PSessionEstablished(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramP2PSessionEstablished(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.fixed32(); - break; - case 3: - message.seconds_until_shutdown = reader.uint32(); - break; - case 4: - message.relay_routing_id = reader.fixed64(); - break; - case 5: - message.seq_num_r2c = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.seconds_until_shutdown = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.relay_routing_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.seq_num_r2c = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13037,11 +16279,11 @@ * @memberof CMsgSteamDatagramP2PSessionEstablished * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramP2PSessionEstablished} CMsgSteamDatagramP2PSessionEstablished + * @returns {CMsgSteamDatagramP2PSessionEstablished & CMsgSteamDatagramP2PSessionEstablished.$Shape} CMsgSteamDatagramP2PSessionEstablished * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramP2PSessionEstablished.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramP2PSessionEstablished.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13055,19 +16297,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramP2PSessionEstablished.verify = function verify(message) { + CMsgSteamDatagramP2PSessionEstablished.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) if (!$util.isInteger(message.seconds_until_shutdown)) return "seconds_until_shutdown: integer expected"; - if (message.relay_routing_id != null && message.hasOwnProperty("relay_routing_id")) + if (message.relay_routing_id != null && $Object.hasOwnProperty.call(message, "relay_routing_id")) if (!$util.isInteger(message.relay_routing_id) && !(message.relay_routing_id && $util.isInteger(message.relay_routing_id.low) && $util.isInteger(message.relay_routing_id.high))) return "relay_routing_id: integer|Long expected"; - if (message.seq_num_r2c != null && message.hasOwnProperty("seq_num_r2c")) + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) if (!$util.isInteger(message.seq_num_r2c)) return "seq_num_r2c: integer expected"; return null; @@ -13081,9 +16327,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramP2PSessionEstablished} CMsgSteamDatagramP2PSessionEstablished */ - CMsgSteamDatagramP2PSessionEstablished.fromObject = function fromObject(object) { + CMsgSteamDatagramP2PSessionEstablished.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramP2PSessionEstablished) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramP2PSessionEstablished: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramP2PSessionEstablished(); if (object.connection_id != null) message.connection_id = object.connection_id >>> 0; @@ -13091,13 +16343,13 @@ message.seconds_until_shutdown = object.seconds_until_shutdown >>> 0; if (object.relay_routing_id != null) if ($util.Long) - (message.relay_routing_id = $util.Long.fromValue(object.relay_routing_id)).unsigned = false; + message.relay_routing_id = $util.Long.fromValue(object.relay_routing_id, true); else if (typeof object.relay_routing_id === "string") - message.relay_routing_id = parseInt(object.relay_routing_id, 10); + message.relay_routing_id = $parseInt(object.relay_routing_id, 10); else if (typeof object.relay_routing_id === "number") message.relay_routing_id = object.relay_routing_id; else if (typeof object.relay_routing_id === "object") - message.relay_routing_id = new $util.LongBits(object.relay_routing_id.low >>> 0, object.relay_routing_id.high >>> 0).toNumber(); + message.relay_routing_id = new $util.LongBits(object.relay_routing_id.low >>> 0, object.relay_routing_id.high >>> 0).toNumber(true); if (object.seq_num_r2c != null) message.seq_num_r2c = object.seq_num_r2c >>> 0; return message; @@ -13112,30 +16364,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramP2PSessionEstablished.toObject = function toObject(message, options) { + CMsgSteamDatagramP2PSessionEstablished.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.connection_id = 0; object.seconds_until_shutdown = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.relay_routing_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.relay_routing_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.relay_routing_id = options.longs === String ? "0" : 0; + object.relay_routing_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.seq_num_r2c = 0; } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) object.seconds_until_shutdown = message.seconds_until_shutdown; - if (message.relay_routing_id != null && message.hasOwnProperty("relay_routing_id")) - if (typeof message.relay_routing_id === "number") - object.relay_routing_id = options.longs === String ? String(message.relay_routing_id) : message.relay_routing_id; + if (message.relay_routing_id != null && $Object.hasOwnProperty.call(message, "relay_routing_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.relay_routing_id = typeof message.relay_routing_id === "number" ? $BigInt(message.relay_routing_id) : $util.Long.fromBits(message.relay_routing_id.low >>> 0, message.relay_routing_id.high >>> 0, true).toBigInt(); + else if (typeof message.relay_routing_id === "number") + object.relay_routing_id = options.longs === $String ? $String(message.relay_routing_id) : message.relay_routing_id; else - object.relay_routing_id = options.longs === String ? $util.Long.prototype.toString.call(message.relay_routing_id) : options.longs === Number ? new $util.LongBits(message.relay_routing_id.low >>> 0, message.relay_routing_id.high >>> 0).toNumber() : message.relay_routing_id; - if (message.seq_num_r2c != null && message.hasOwnProperty("seq_num_r2c")) + object.relay_routing_id = options.longs === $String ? $util.Long.prototype.toString.call(message.relay_routing_id) : options.longs === $Number ? new $util.LongBits(message.relay_routing_id.low >>> 0, message.relay_routing_id.high >>> 0).toNumber(true) : message.relay_routing_id; + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) object.seq_num_r2c = message.seq_num_r2c; return object; }; @@ -13147,8 +16405,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramP2PSessionEstablished.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramP2PSessionEstablished.prototype.toJSON = function() { + return CMsgSteamDatagramP2PSessionEstablished.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramP2PSessionEstablished + * @function getTypeUrl + * @memberof CMsgSteamDatagramP2PSessionEstablished + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramP2PSessionEstablished.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramP2PSessionEstablished"; }; return CMsgSteamDatagramP2PSessionEstablished; @@ -13156,35 +16428,48 @@ $root.CMsgSteamDatagramP2PRoutes = (function() { + /** + * Properties of a CMsgSteamDatagramP2PRoutes. + * @typedef {Object} CMsgSteamDatagramP2PRoutes.$Properties + * @property {Array.|null} [relay_clusters] CMsgSteamDatagramP2PRoutes relay_clusters + * @property {Array.|null} [routes] CMsgSteamDatagramP2PRoutes routes + * @property {number|null} [revision] CMsgSteamDatagramP2PRoutes revision + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSteamDatagramP2PRoutes. * @exports ICMsgSteamDatagramP2PRoutes * @interface ICMsgSteamDatagramP2PRoutes - * @property {Array.|null} [relay_clusters] CMsgSteamDatagramP2PRoutes relay_clusters - * @property {Array.|null} [routes] CMsgSteamDatagramP2PRoutes routes - * @property {number|null} [revision] CMsgSteamDatagramP2PRoutes revision + * @augments CMsgSteamDatagramP2PRoutes.$Properties + * @deprecated Use CMsgSteamDatagramP2PRoutes.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramP2PRoutes. + * @typedef {CMsgSteamDatagramP2PRoutes.$Properties} CMsgSteamDatagramP2PRoutes.$Shape */ /** * Constructs a new CMsgSteamDatagramP2PRoutes. * @exports CMsgSteamDatagramP2PRoutes * @classdesc Represents a CMsgSteamDatagramP2PRoutes. - * @implements ICMsgSteamDatagramP2PRoutes * @constructor - * @param {ICMsgSteamDatagramP2PRoutes=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PRoutes.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramP2PRoutes(properties) { + var CMsgSteamDatagramP2PRoutes = function (properties) { this.relay_clusters = []; this.routes = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramP2PRoutes relay_clusters. - * @member {Array.} relay_clusters + * @member {Array.} relay_clusters * @memberof CMsgSteamDatagramP2PRoutes * @instance */ @@ -13192,7 +16477,7 @@ /** * CMsgSteamDatagramP2PRoutes routes. - * @member {Array.} routes + * @member {Array.} routes * @memberof CMsgSteamDatagramP2PRoutes * @instance */ @@ -13211,10 +16496,14 @@ * @function create * @memberof CMsgSteamDatagramP2PRoutes * @static - * @param {ICMsgSteamDatagramP2PRoutes=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PRoutes.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramP2PRoutes} CMsgSteamDatagramP2PRoutes instance + * @type {{ + * (properties: CMsgSteamDatagramP2PRoutes.$Shape): CMsgSteamDatagramP2PRoutes & CMsgSteamDatagramP2PRoutes.$Shape; + * (properties?: CMsgSteamDatagramP2PRoutes.$Properties): CMsgSteamDatagramP2PRoutes; + * }} */ - CMsgSteamDatagramP2PRoutes.create = function create(properties) { + CMsgSteamDatagramP2PRoutes.create = function(properties) { return new CMsgSteamDatagramP2PRoutes(properties); }; @@ -13223,21 +16512,28 @@ * @function encode * @memberof CMsgSteamDatagramP2PRoutes * @static - * @param {ICMsgSteamDatagramP2PRoutes} message CMsgSteamDatagramP2PRoutes message or plain object to encode + * @param {CMsgSteamDatagramP2PRoutes.$Properties} message CMsgSteamDatagramP2PRoutes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramP2PRoutes.encode = function encode(message, writer) { + CMsgSteamDatagramP2PRoutes.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.relay_clusters != null && message.relay_clusters.length) for (var i = 0; i < message.relay_clusters.length; ++i) - $root.CMsgSteamDatagramP2PRoutes.RelayCluster.encode(message.relay_clusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgSteamDatagramP2PRoutes.RelayCluster.encode(message.relay_clusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); if (message.routes != null && message.routes.length) for (var i = 0; i < message.routes.length; ++i) - $root.CMsgSteamDatagramP2PRoutes.Route.encode(message.routes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) + $root.CMsgSteamDatagramP2PRoutes.Route.encode(message.routes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.revision != null && $Object.hasOwnProperty.call(message, "revision")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.revision); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13246,12 +16542,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramP2PRoutes * @static - * @param {ICMsgSteamDatagramP2PRoutes} message CMsgSteamDatagramP2PRoutes message or plain object to encode + * @param {CMsgSteamDatagramP2PRoutes.$Properties} message CMsgSteamDatagramP2PRoutes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramP2PRoutes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramP2PRoutes.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13261,35 +16557,58 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramP2PRoutes} CMsgSteamDatagramP2PRoutes + * @returns {CMsgSteamDatagramP2PRoutes & CMsgSteamDatagramP2PRoutes.$Shape} CMsgSteamDatagramP2PRoutes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramP2PRoutes.decode = function decode(reader, length) { + CMsgSteamDatagramP2PRoutes.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramP2PRoutes(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramP2PRoutes(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.relay_clusters && message.relay_clusters.length)) - message.relay_clusters = []; - message.relay_clusters.push($root.CMsgSteamDatagramP2PRoutes.RelayCluster.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.routes && message.routes.length)) - message.routes = []; - message.routes.push($root.CMsgSteamDatagramP2PRoutes.Route.decode(reader, reader.uint32())); - break; - case 3: - message.revision = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.relay_clusters && message.relay_clusters.length)) + message.relay_clusters = []; + message.relay_clusters.push($root.CMsgSteamDatagramP2PRoutes.RelayCluster.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.routes && message.routes.length)) + message.routes = []; + message.routes.push($root.CMsgSteamDatagramP2PRoutes.Route.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.revision = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13299,11 +16618,11 @@ * @memberof CMsgSteamDatagramP2PRoutes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramP2PRoutes} CMsgSteamDatagramP2PRoutes + * @returns {CMsgSteamDatagramP2PRoutes & CMsgSteamDatagramP2PRoutes.$Shape} CMsgSteamDatagramP2PRoutes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramP2PRoutes.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramP2PRoutes.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13317,28 +16636,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramP2PRoutes.verify = function verify(message) { + CMsgSteamDatagramP2PRoutes.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.relay_clusters != null && message.hasOwnProperty("relay_clusters")) { - if (!Array.isArray(message.relay_clusters)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.relay_clusters != null && $Object.hasOwnProperty.call(message, "relay_clusters")) { + if (!$Array.isArray(message.relay_clusters)) return "relay_clusters: array expected"; for (var i = 0; i < message.relay_clusters.length; ++i) { - var error = $root.CMsgSteamDatagramP2PRoutes.RelayCluster.verify(message.relay_clusters[i]); + var error = $root.CMsgSteamDatagramP2PRoutes.RelayCluster.verify(message.relay_clusters[i], _depth + 1); if (error) return "relay_clusters." + error; } } - if (message.routes != null && message.hasOwnProperty("routes")) { - if (!Array.isArray(message.routes)) + if (message.routes != null && $Object.hasOwnProperty.call(message, "routes")) { + if (!$Array.isArray(message.routes)) return "routes: array expected"; for (var i = 0; i < message.routes.length; ++i) { - var error = $root.CMsgSteamDatagramP2PRoutes.Route.verify(message.routes[i]); + var error = $root.CMsgSteamDatagramP2PRoutes.Route.verify(message.routes[i], _depth + 1); if (error) return "routes." + error; } } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && $Object.hasOwnProperty.call(message, "revision")) if (!$util.isInteger(message.revision)) return "revision: integer expected"; return null; @@ -13352,28 +16675,34 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramP2PRoutes} CMsgSteamDatagramP2PRoutes */ - CMsgSteamDatagramP2PRoutes.fromObject = function fromObject(object) { + CMsgSteamDatagramP2PRoutes.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramP2PRoutes) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramP2PRoutes: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramP2PRoutes(); if (object.relay_clusters) { - if (!Array.isArray(object.relay_clusters)) - throw TypeError(".CMsgSteamDatagramP2PRoutes.relay_clusters: array expected"); - message.relay_clusters = []; + if (!$Array.isArray(object.relay_clusters)) + throw $TypeError(".CMsgSteamDatagramP2PRoutes.relay_clusters: array expected"); + message.relay_clusters = $Array(object.relay_clusters.length); for (var i = 0; i < object.relay_clusters.length; ++i) { - if (typeof object.relay_clusters[i] !== "object") - throw TypeError(".CMsgSteamDatagramP2PRoutes.relay_clusters: object expected"); - message.relay_clusters[i] = $root.CMsgSteamDatagramP2PRoutes.RelayCluster.fromObject(object.relay_clusters[i]); + if (!$util.isObject(object.relay_clusters[i])) + throw $TypeError(".CMsgSteamDatagramP2PRoutes.relay_clusters: object expected"); + message.relay_clusters[i] = $root.CMsgSteamDatagramP2PRoutes.RelayCluster.fromObject(object.relay_clusters[i], _depth + 1); } } if (object.routes) { - if (!Array.isArray(object.routes)) - throw TypeError(".CMsgSteamDatagramP2PRoutes.routes: array expected"); - message.routes = []; + if (!$Array.isArray(object.routes)) + throw $TypeError(".CMsgSteamDatagramP2PRoutes.routes: array expected"); + message.routes = $Array(object.routes.length); for (var i = 0; i < object.routes.length; ++i) { - if (typeof object.routes[i] !== "object") - throw TypeError(".CMsgSteamDatagramP2PRoutes.routes: object expected"); - message.routes[i] = $root.CMsgSteamDatagramP2PRoutes.Route.fromObject(object.routes[i]); + if (!$util.isObject(object.routes[i])) + throw $TypeError(".CMsgSteamDatagramP2PRoutes.routes: object expected"); + message.routes[i] = $root.CMsgSteamDatagramP2PRoutes.Route.fromObject(object.routes[i], _depth + 1); } } if (object.revision != null) @@ -13390,9 +16719,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramP2PRoutes.toObject = function toObject(message, options) { + CMsgSteamDatagramP2PRoutes.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.relay_clusters = []; @@ -13401,16 +16734,16 @@ if (options.defaults) object.revision = 0; if (message.relay_clusters && message.relay_clusters.length) { - object.relay_clusters = []; + object.relay_clusters = $Array(message.relay_clusters.length); for (var j = 0; j < message.relay_clusters.length; ++j) - object.relay_clusters[j] = $root.CMsgSteamDatagramP2PRoutes.RelayCluster.toObject(message.relay_clusters[j], options); + object.relay_clusters[j] = $root.CMsgSteamDatagramP2PRoutes.RelayCluster.toObject(message.relay_clusters[j], options, _depth + 1); } if (message.routes && message.routes.length) { - object.routes = []; + object.routes = $Array(message.routes.length); for (var j = 0; j < message.routes.length; ++j) - object.routes[j] = $root.CMsgSteamDatagramP2PRoutes.Route.toObject(message.routes[j], options); + object.routes[j] = $root.CMsgSteamDatagramP2PRoutes.Route.toObject(message.routes[j], options, _depth + 1); } - if (message.revision != null && message.hasOwnProperty("revision")) + if (message.revision != null && $Object.hasOwnProperty.call(message, "revision")) object.revision = message.revision; return object; }; @@ -13422,36 +16755,63 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramP2PRoutes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramP2PRoutes.prototype.toJSON = function() { + return CMsgSteamDatagramP2PRoutes.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramP2PRoutes + * @function getTypeUrl + * @memberof CMsgSteamDatagramP2PRoutes + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramP2PRoutes.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramP2PRoutes"; }; CMsgSteamDatagramP2PRoutes.RelayCluster = (function() { /** * Properties of a RelayCluster. - * @memberof CMsgSteamDatagramP2PRoutes - * @interface IRelayCluster + * @typedef {Object} CMsgSteamDatagramP2PRoutes.RelayCluster.$Properties * @property {number|null} [pop_id] RelayCluster pop_id * @property {number|null} [ping_ms] RelayCluster ping_ms * @property {number|null} [score_penalty] RelayCluster score_penalty * @property {number|Long|null} [session_relay_routing_id] RelayCluster session_relay_routing_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RelayCluster. + * @memberof CMsgSteamDatagramP2PRoutes + * @interface IRelayCluster + * @augments CMsgSteamDatagramP2PRoutes.RelayCluster.$Properties + * @deprecated Use CMsgSteamDatagramP2PRoutes.RelayCluster.$Properties instead. + */ + + /** + * Shape of a RelayCluster. + * @typedef {CMsgSteamDatagramP2PRoutes.RelayCluster.$Properties} CMsgSteamDatagramP2PRoutes.RelayCluster.$Shape */ /** * Constructs a new RelayCluster. * @memberof CMsgSteamDatagramP2PRoutes * @classdesc Represents a RelayCluster. - * @implements IRelayCluster * @constructor - * @param {CMsgSteamDatagramP2PRoutes.IRelayCluster=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PRoutes.RelayCluster.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function RelayCluster(properties) { + var RelayCluster = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * RelayCluster pop_id. @@ -13483,17 +16843,21 @@ * @memberof CMsgSteamDatagramP2PRoutes.RelayCluster * @instance */ - RelayCluster.prototype.session_relay_routing_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + RelayCluster.prototype.session_relay_routing_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new RelayCluster instance using the specified properties. * @function create * @memberof CMsgSteamDatagramP2PRoutes.RelayCluster * @static - * @param {CMsgSteamDatagramP2PRoutes.IRelayCluster=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PRoutes.RelayCluster.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramP2PRoutes.RelayCluster} RelayCluster instance + * @type {{ + * (properties: CMsgSteamDatagramP2PRoutes.RelayCluster.$Shape): CMsgSteamDatagramP2PRoutes.RelayCluster & CMsgSteamDatagramP2PRoutes.RelayCluster.$Shape; + * (properties?: CMsgSteamDatagramP2PRoutes.RelayCluster.$Properties): CMsgSteamDatagramP2PRoutes.RelayCluster; + * }} */ - RelayCluster.create = function create(properties) { + RelayCluster.create = function(properties) { return new RelayCluster(properties); }; @@ -13502,21 +16866,28 @@ * @function encode * @memberof CMsgSteamDatagramP2PRoutes.RelayCluster * @static - * @param {CMsgSteamDatagramP2PRoutes.IRelayCluster} message RelayCluster message or plain object to encode + * @param {CMsgSteamDatagramP2PRoutes.RelayCluster.$Properties} message RelayCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RelayCluster.encode = function encode(message, writer) { + RelayCluster.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.pop_id != null && Object.hasOwnProperty.call(message, "pop_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.pop_id != null && $Object.hasOwnProperty.call(message, "pop_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.pop_id); - if (message.ping_ms != null && Object.hasOwnProperty.call(message, "ping_ms")) + if (message.ping_ms != null && $Object.hasOwnProperty.call(message, "ping_ms")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ping_ms); - if (message.score_penalty != null && Object.hasOwnProperty.call(message, "score_penalty")) + if (message.score_penalty != null && $Object.hasOwnProperty.call(message, "score_penalty")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.score_penalty); - if (message.session_relay_routing_id != null && Object.hasOwnProperty.call(message, "session_relay_routing_id")) + if (message.session_relay_routing_id != null && $Object.hasOwnProperty.call(message, "session_relay_routing_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.session_relay_routing_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13525,12 +16896,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramP2PRoutes.RelayCluster * @static - * @param {CMsgSteamDatagramP2PRoutes.IRelayCluster} message RelayCluster message or plain object to encode + * @param {CMsgSteamDatagramP2PRoutes.RelayCluster.$Properties} message RelayCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RelayCluster.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RelayCluster.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13540,34 +16911,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramP2PRoutes.RelayCluster} RelayCluster + * @returns {CMsgSteamDatagramP2PRoutes.RelayCluster & CMsgSteamDatagramP2PRoutes.RelayCluster.$Shape} RelayCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RelayCluster.decode = function decode(reader, length) { + RelayCluster.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramP2PRoutes.RelayCluster(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramP2PRoutes.RelayCluster(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pop_id = reader.fixed32(); - break; - case 2: - message.ping_ms = reader.uint32(); - break; - case 3: - message.score_penalty = reader.uint32(); - break; - case 4: - message.session_relay_routing_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.pop_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.ping_ms = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.score_penalty = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.session_relay_routing_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13577,11 +16974,11 @@ * @memberof CMsgSteamDatagramP2PRoutes.RelayCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramP2PRoutes.RelayCluster} RelayCluster + * @returns {CMsgSteamDatagramP2PRoutes.RelayCluster & CMsgSteamDatagramP2PRoutes.RelayCluster.$Shape} RelayCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RelayCluster.decodeDelimited = function decodeDelimited(reader) { + RelayCluster.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13595,19 +16992,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RelayCluster.verify = function verify(message) { + RelayCluster.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pop_id != null && message.hasOwnProperty("pop_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.pop_id != null && $Object.hasOwnProperty.call(message, "pop_id")) if (!$util.isInteger(message.pop_id)) return "pop_id: integer expected"; - if (message.ping_ms != null && message.hasOwnProperty("ping_ms")) + if (message.ping_ms != null && $Object.hasOwnProperty.call(message, "ping_ms")) if (!$util.isInteger(message.ping_ms)) return "ping_ms: integer expected"; - if (message.score_penalty != null && message.hasOwnProperty("score_penalty")) + if (message.score_penalty != null && $Object.hasOwnProperty.call(message, "score_penalty")) if (!$util.isInteger(message.score_penalty)) return "score_penalty: integer expected"; - if (message.session_relay_routing_id != null && message.hasOwnProperty("session_relay_routing_id")) + if (message.session_relay_routing_id != null && $Object.hasOwnProperty.call(message, "session_relay_routing_id")) if (!$util.isInteger(message.session_relay_routing_id) && !(message.session_relay_routing_id && $util.isInteger(message.session_relay_routing_id.low) && $util.isInteger(message.session_relay_routing_id.high))) return "session_relay_routing_id: integer|Long expected"; return null; @@ -13621,9 +17022,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramP2PRoutes.RelayCluster} RelayCluster */ - RelayCluster.fromObject = function fromObject(object) { + RelayCluster.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramP2PRoutes.RelayCluster) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramP2PRoutes.RelayCluster: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramP2PRoutes.RelayCluster(); if (object.pop_id != null) message.pop_id = object.pop_id >>> 0; @@ -13633,13 +17040,13 @@ message.score_penalty = object.score_penalty >>> 0; if (object.session_relay_routing_id != null) if ($util.Long) - (message.session_relay_routing_id = $util.Long.fromValue(object.session_relay_routing_id)).unsigned = false; + message.session_relay_routing_id = $util.Long.fromValue(object.session_relay_routing_id, true); else if (typeof object.session_relay_routing_id === "string") - message.session_relay_routing_id = parseInt(object.session_relay_routing_id, 10); + message.session_relay_routing_id = $parseInt(object.session_relay_routing_id, 10); else if (typeof object.session_relay_routing_id === "number") message.session_relay_routing_id = object.session_relay_routing_id; else if (typeof object.session_relay_routing_id === "object") - message.session_relay_routing_id = new $util.LongBits(object.session_relay_routing_id.low >>> 0, object.session_relay_routing_id.high >>> 0).toNumber(); + message.session_relay_routing_id = new $util.LongBits(object.session_relay_routing_id.low >>> 0, object.session_relay_routing_id.high >>> 0).toNumber(true); return message; }; @@ -13652,31 +17059,37 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RelayCluster.toObject = function toObject(message, options) { + RelayCluster.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.pop_id = 0; object.ping_ms = 0; object.score_penalty = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.session_relay_routing_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.session_relay_routing_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.session_relay_routing_id = options.longs === String ? "0" : 0; + object.session_relay_routing_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.pop_id != null && message.hasOwnProperty("pop_id")) + if (message.pop_id != null && $Object.hasOwnProperty.call(message, "pop_id")) object.pop_id = message.pop_id; - if (message.ping_ms != null && message.hasOwnProperty("ping_ms")) + if (message.ping_ms != null && $Object.hasOwnProperty.call(message, "ping_ms")) object.ping_ms = message.ping_ms; - if (message.score_penalty != null && message.hasOwnProperty("score_penalty")) + if (message.score_penalty != null && $Object.hasOwnProperty.call(message, "score_penalty")) object.score_penalty = message.score_penalty; - if (message.session_relay_routing_id != null && message.hasOwnProperty("session_relay_routing_id")) - if (typeof message.session_relay_routing_id === "number") - object.session_relay_routing_id = options.longs === String ? String(message.session_relay_routing_id) : message.session_relay_routing_id; + if (message.session_relay_routing_id != null && $Object.hasOwnProperty.call(message, "session_relay_routing_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.session_relay_routing_id = typeof message.session_relay_routing_id === "number" ? $BigInt(message.session_relay_routing_id) : $util.Long.fromBits(message.session_relay_routing_id.low >>> 0, message.session_relay_routing_id.high >>> 0, true).toBigInt(); + else if (typeof message.session_relay_routing_id === "number") + object.session_relay_routing_id = options.longs === $String ? $String(message.session_relay_routing_id) : message.session_relay_routing_id; else - object.session_relay_routing_id = options.longs === String ? $util.Long.prototype.toString.call(message.session_relay_routing_id) : options.longs === Number ? new $util.LongBits(message.session_relay_routing_id.low >>> 0, message.session_relay_routing_id.high >>> 0).toNumber() : message.session_relay_routing_id; + object.session_relay_routing_id = options.longs === $String ? $util.Long.prototype.toString.call(message.session_relay_routing_id) : options.longs === $Number ? new $util.LongBits(message.session_relay_routing_id.low >>> 0, message.session_relay_routing_id.high >>> 0).toNumber(true) : message.session_relay_routing_id; return object; }; @@ -13687,8 +17100,22 @@ * @instance * @returns {Object.} JSON object */ - RelayCluster.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + RelayCluster.prototype.toJSON = function() { + return RelayCluster.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RelayCluster + * @function getTypeUrl + * @memberof CMsgSteamDatagramP2PRoutes.RelayCluster + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RelayCluster.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramP2PRoutes.RelayCluster"; }; return RelayCluster; @@ -13698,27 +17125,40 @@ /** * Properties of a Route. - * @memberof CMsgSteamDatagramP2PRoutes - * @interface IRoute + * @typedef {Object} CMsgSteamDatagramP2PRoutes.Route.$Properties * @property {number|null} [my_pop_id] Route my_pop_id * @property {number|null} [your_pop_id] Route your_pop_id * @property {number|null} [score] Route score + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Route. + * @memberof CMsgSteamDatagramP2PRoutes + * @interface IRoute + * @augments CMsgSteamDatagramP2PRoutes.Route.$Properties + * @deprecated Use CMsgSteamDatagramP2PRoutes.Route.$Properties instead. + */ + + /** + * Shape of a Route. + * @typedef {CMsgSteamDatagramP2PRoutes.Route.$Properties} CMsgSteamDatagramP2PRoutes.Route.$Shape */ /** * Constructs a new Route. * @memberof CMsgSteamDatagramP2PRoutes * @classdesc Represents a Route. - * @implements IRoute * @constructor - * @param {CMsgSteamDatagramP2PRoutes.IRoute=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PRoutes.Route.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Route(properties) { + var Route = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Route my_pop_id. @@ -13749,10 +17189,14 @@ * @function create * @memberof CMsgSteamDatagramP2PRoutes.Route * @static - * @param {CMsgSteamDatagramP2PRoutes.IRoute=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PRoutes.Route.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramP2PRoutes.Route} Route instance + * @type {{ + * (properties: CMsgSteamDatagramP2PRoutes.Route.$Shape): CMsgSteamDatagramP2PRoutes.Route & CMsgSteamDatagramP2PRoutes.Route.$Shape; + * (properties?: CMsgSteamDatagramP2PRoutes.Route.$Properties): CMsgSteamDatagramP2PRoutes.Route; + * }} */ - Route.create = function create(properties) { + Route.create = function(properties) { return new Route(properties); }; @@ -13761,19 +17205,26 @@ * @function encode * @memberof CMsgSteamDatagramP2PRoutes.Route * @static - * @param {CMsgSteamDatagramP2PRoutes.IRoute} message Route message or plain object to encode + * @param {CMsgSteamDatagramP2PRoutes.Route.$Properties} message Route message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Route.encode = function encode(message, writer) { + Route.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.my_pop_id != null && Object.hasOwnProperty.call(message, "my_pop_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.my_pop_id != null && $Object.hasOwnProperty.call(message, "my_pop_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.my_pop_id); - if (message.your_pop_id != null && Object.hasOwnProperty.call(message, "your_pop_id")) + if (message.your_pop_id != null && $Object.hasOwnProperty.call(message, "your_pop_id")) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.your_pop_id); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.score); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13782,12 +17233,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramP2PRoutes.Route * @static - * @param {CMsgSteamDatagramP2PRoutes.IRoute} message Route message or plain object to encode + * @param {CMsgSteamDatagramP2PRoutes.Route.$Properties} message Route message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Route.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Route.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13797,31 +17248,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramP2PRoutes.Route} Route + * @returns {CMsgSteamDatagramP2PRoutes.Route & CMsgSteamDatagramP2PRoutes.Route.$Shape} Route * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Route.decode = function decode(reader, length) { + Route.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramP2PRoutes.Route(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramP2PRoutes.Route(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.my_pop_id = reader.fixed32(); - break; - case 2: - message.your_pop_id = reader.fixed32(); - break; - case 3: - message.score = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.my_pop_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.your_pop_id = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.score = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13831,11 +17305,11 @@ * @memberof CMsgSteamDatagramP2PRoutes.Route * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramP2PRoutes.Route} Route + * @returns {CMsgSteamDatagramP2PRoutes.Route & CMsgSteamDatagramP2PRoutes.Route.$Shape} Route * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Route.decodeDelimited = function decodeDelimited(reader) { + Route.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13849,16 +17323,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Route.verify = function verify(message) { + Route.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.my_pop_id != null && message.hasOwnProperty("my_pop_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.my_pop_id != null && $Object.hasOwnProperty.call(message, "my_pop_id")) if (!$util.isInteger(message.my_pop_id)) return "my_pop_id: integer expected"; - if (message.your_pop_id != null && message.hasOwnProperty("your_pop_id")) + if (message.your_pop_id != null && $Object.hasOwnProperty.call(message, "your_pop_id")) if (!$util.isInteger(message.your_pop_id)) return "your_pop_id: integer expected"; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) if (!$util.isInteger(message.score)) return "score: integer expected"; return null; @@ -13872,9 +17350,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramP2PRoutes.Route} Route */ - Route.fromObject = function fromObject(object) { + Route.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramP2PRoutes.Route) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramP2PRoutes.Route: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramP2PRoutes.Route(); if (object.my_pop_id != null) message.my_pop_id = object.my_pop_id >>> 0; @@ -13894,20 +17378,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Route.toObject = function toObject(message, options) { + Route.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.my_pop_id = 0; object.your_pop_id = 0; object.score = 0; } - if (message.my_pop_id != null && message.hasOwnProperty("my_pop_id")) + if (message.my_pop_id != null && $Object.hasOwnProperty.call(message, "my_pop_id")) object.my_pop_id = message.my_pop_id; - if (message.your_pop_id != null && message.hasOwnProperty("your_pop_id")) + if (message.your_pop_id != null && $Object.hasOwnProperty.call(message, "your_pop_id")) object.your_pop_id = message.your_pop_id; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) object.score = message.score; return object; }; @@ -13919,8 +17407,22 @@ * @instance * @returns {Object.} JSON object */ - Route.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Route.prototype.toJSON = function() { + return Route.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Route + * @function getTypeUrl + * @memberof CMsgSteamDatagramP2PRoutes.Route + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Route.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramP2PRoutes.Route"; }; return Route; @@ -13933,30 +17435,43 @@ /** * Properties of a CMsgSteamDatagramP2PRendezvous. - * @exports ICMsgSteamDatagramP2PRendezvous - * @interface ICMsgSteamDatagramP2PRendezvous + * @typedef {Object} CMsgSteamDatagramP2PRendezvous.$Properties * @property {number|null} [to_connection_id] CMsgSteamDatagramP2PRendezvous to_connection_id - * @property {ICMsgSteamDatagramP2PRoutes|null} [routes] CMsgSteamDatagramP2PRendezvous routes + * @property {CMsgSteamDatagramP2PRoutes.$Properties|null} [routes] CMsgSteamDatagramP2PRendezvous routes * @property {number|null} [ack_peer_routes_revision] CMsgSteamDatagramP2PRendezvous ack_peer_routes_revision - * @property {ICMsgSteamDatagramConnectRequest|null} [connect_request] CMsgSteamDatagramP2PRendezvous connect_request - * @property {ICMsgSteamDatagramConnectOK|null} [connect_ok] CMsgSteamDatagramP2PRendezvous connect_ok - * @property {ICMsgSteamDatagramConnectionClosed|null} [connection_closed] CMsgSteamDatagramP2PRendezvous connection_closed + * @property {CMsgSteamDatagramConnectRequest.$Properties|null} [connect_request] CMsgSteamDatagramP2PRendezvous connect_request + * @property {CMsgSteamDatagramConnectOK.$Properties|null} [connect_ok] CMsgSteamDatagramP2PRendezvous connect_ok + * @property {CMsgSteamDatagramConnectionClosed.$Properties|null} [connection_closed] CMsgSteamDatagramP2PRendezvous connection_closed + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramP2PRendezvous. + * @exports ICMsgSteamDatagramP2PRendezvous + * @interface ICMsgSteamDatagramP2PRendezvous + * @augments CMsgSteamDatagramP2PRendezvous.$Properties + * @deprecated Use CMsgSteamDatagramP2PRendezvous.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramP2PRendezvous. + * @typedef {CMsgSteamDatagramP2PRendezvous.$Properties} CMsgSteamDatagramP2PRendezvous.$Shape */ /** * Constructs a new CMsgSteamDatagramP2PRendezvous. * @exports CMsgSteamDatagramP2PRendezvous * @classdesc Represents a CMsgSteamDatagramP2PRendezvous. - * @implements ICMsgSteamDatagramP2PRendezvous * @constructor - * @param {ICMsgSteamDatagramP2PRendezvous=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PRendezvous.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramP2PRendezvous(properties) { + var CMsgSteamDatagramP2PRendezvous = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramP2PRendezvous to_connection_id. @@ -13968,7 +17483,7 @@ /** * CMsgSteamDatagramP2PRendezvous routes. - * @member {ICMsgSteamDatagramP2PRoutes|null|undefined} routes + * @member {CMsgSteamDatagramP2PRoutes.$Properties|null|undefined} routes * @memberof CMsgSteamDatagramP2PRendezvous * @instance */ @@ -13984,7 +17499,7 @@ /** * CMsgSteamDatagramP2PRendezvous connect_request. - * @member {ICMsgSteamDatagramConnectRequest|null|undefined} connect_request + * @member {CMsgSteamDatagramConnectRequest.$Properties|null|undefined} connect_request * @memberof CMsgSteamDatagramP2PRendezvous * @instance */ @@ -13992,7 +17507,7 @@ /** * CMsgSteamDatagramP2PRendezvous connect_ok. - * @member {ICMsgSteamDatagramConnectOK|null|undefined} connect_ok + * @member {CMsgSteamDatagramConnectOK.$Properties|null|undefined} connect_ok * @memberof CMsgSteamDatagramP2PRendezvous * @instance */ @@ -14000,7 +17515,7 @@ /** * CMsgSteamDatagramP2PRendezvous connection_closed. - * @member {ICMsgSteamDatagramConnectionClosed|null|undefined} connection_closed + * @member {CMsgSteamDatagramConnectionClosed.$Properties|null|undefined} connection_closed * @memberof CMsgSteamDatagramP2PRendezvous * @instance */ @@ -14011,10 +17526,14 @@ * @function create * @memberof CMsgSteamDatagramP2PRendezvous * @static - * @param {ICMsgSteamDatagramP2PRendezvous=} [properties] Properties to set + * @param {CMsgSteamDatagramP2PRendezvous.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramP2PRendezvous} CMsgSteamDatagramP2PRendezvous instance + * @type {{ + * (properties: CMsgSteamDatagramP2PRendezvous.$Shape): CMsgSteamDatagramP2PRendezvous & CMsgSteamDatagramP2PRendezvous.$Shape; + * (properties?: CMsgSteamDatagramP2PRendezvous.$Properties): CMsgSteamDatagramP2PRendezvous; + * }} */ - CMsgSteamDatagramP2PRendezvous.create = function create(properties) { + CMsgSteamDatagramP2PRendezvous.create = function(properties) { return new CMsgSteamDatagramP2PRendezvous(properties); }; @@ -14023,25 +17542,32 @@ * @function encode * @memberof CMsgSteamDatagramP2PRendezvous * @static - * @param {ICMsgSteamDatagramP2PRendezvous} message CMsgSteamDatagramP2PRendezvous message or plain object to encode + * @param {CMsgSteamDatagramP2PRendezvous.$Properties} message CMsgSteamDatagramP2PRendezvous message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramP2PRendezvous.encode = function encode(message, writer) { + CMsgSteamDatagramP2PRendezvous.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.to_connection_id != null && Object.hasOwnProperty.call(message, "to_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.to_connection_id); - if (message.routes != null && Object.hasOwnProperty.call(message, "routes")) - $root.CMsgSteamDatagramP2PRoutes.encode(message.routes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ack_peer_routes_revision != null && Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) + if (message.routes != null && $Object.hasOwnProperty.call(message, "routes")) + $root.CMsgSteamDatagramP2PRoutes.encode(message.routes, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.ack_peer_routes_revision != null && $Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.ack_peer_routes_revision); - if (message.connect_request != null && Object.hasOwnProperty.call(message, "connect_request")) - $root.CMsgSteamDatagramConnectRequest.encode(message.connect_request, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.connect_ok != null && Object.hasOwnProperty.call(message, "connect_ok")) - $root.CMsgSteamDatagramConnectOK.encode(message.connect_ok, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.connection_closed != null && Object.hasOwnProperty.call(message, "connection_closed")) - $root.CMsgSteamDatagramConnectionClosed.encode(message.connection_closed, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.connect_request != null && $Object.hasOwnProperty.call(message, "connect_request")) + $root.CMsgSteamDatagramConnectRequest.encode(message.connect_request, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.connect_ok != null && $Object.hasOwnProperty.call(message, "connect_ok")) + $root.CMsgSteamDatagramConnectOK.encode(message.connect_ok, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.connection_closed != null && $Object.hasOwnProperty.call(message, "connection_closed")) + $root.CMsgSteamDatagramConnectionClosed.encode(message.connection_closed, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14050,12 +17576,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramP2PRendezvous * @static - * @param {ICMsgSteamDatagramP2PRendezvous} message CMsgSteamDatagramP2PRendezvous message or plain object to encode + * @param {CMsgSteamDatagramP2PRendezvous.$Properties} message CMsgSteamDatagramP2PRendezvous message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramP2PRendezvous.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramP2PRendezvous.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14065,40 +17591,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramP2PRendezvous} CMsgSteamDatagramP2PRendezvous + * @returns {CMsgSteamDatagramP2PRendezvous & CMsgSteamDatagramP2PRendezvous.$Shape} CMsgSteamDatagramP2PRendezvous * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramP2PRendezvous.decode = function decode(reader, length) { + CMsgSteamDatagramP2PRendezvous.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramP2PRendezvous(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramP2PRendezvous(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.to_connection_id = reader.fixed32(); - break; - case 2: - message.routes = $root.CMsgSteamDatagramP2PRoutes.decode(reader, reader.uint32()); - break; - case 3: - message.ack_peer_routes_revision = reader.uint32(); - break; - case 4: - message.connect_request = $root.CMsgSteamDatagramConnectRequest.decode(reader, reader.uint32()); - break; - case 5: - message.connect_ok = $root.CMsgSteamDatagramConnectOK.decode(reader, reader.uint32()); - break; - case 6: - message.connection_closed = $root.CMsgSteamDatagramConnectionClosed.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.to_connection_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.routes = $root.CMsgSteamDatagramP2PRoutes.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routes); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.ack_peer_routes_revision = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.connect_request = $root.CMsgSteamDatagramConnectRequest.decode(reader, reader.uint32(), $undefined, _depth + 1, message.connect_request); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.connect_ok = $root.CMsgSteamDatagramConnectOK.decode(reader, reader.uint32(), $undefined, _depth + 1, message.connect_ok); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.connection_closed = $root.CMsgSteamDatagramConnectionClosed.decode(reader, reader.uint32(), $undefined, _depth + 1, message.connection_closed); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14108,11 +17666,11 @@ * @memberof CMsgSteamDatagramP2PRendezvous * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramP2PRendezvous} CMsgSteamDatagramP2PRendezvous + * @returns {CMsgSteamDatagramP2PRendezvous & CMsgSteamDatagramP2PRendezvous.$Shape} CMsgSteamDatagramP2PRendezvous * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramP2PRendezvous.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramP2PRendezvous.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14126,32 +17684,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramP2PRendezvous.verify = function verify(message) { + CMsgSteamDatagramP2PRendezvous.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) if (!$util.isInteger(message.to_connection_id)) return "to_connection_id: integer expected"; - if (message.routes != null && message.hasOwnProperty("routes")) { - var error = $root.CMsgSteamDatagramP2PRoutes.verify(message.routes); + if (message.routes != null && $Object.hasOwnProperty.call(message, "routes")) { + var error = $root.CMsgSteamDatagramP2PRoutes.verify(message.routes, _depth + 1); if (error) return "routes." + error; } - if (message.ack_peer_routes_revision != null && message.hasOwnProperty("ack_peer_routes_revision")) + if (message.ack_peer_routes_revision != null && $Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) if (!$util.isInteger(message.ack_peer_routes_revision)) return "ack_peer_routes_revision: integer expected"; - if (message.connect_request != null && message.hasOwnProperty("connect_request")) { - var error = $root.CMsgSteamDatagramConnectRequest.verify(message.connect_request); + if (message.connect_request != null && $Object.hasOwnProperty.call(message, "connect_request")) { + var error = $root.CMsgSteamDatagramConnectRequest.verify(message.connect_request, _depth + 1); if (error) return "connect_request." + error; } - if (message.connect_ok != null && message.hasOwnProperty("connect_ok")) { - var error = $root.CMsgSteamDatagramConnectOK.verify(message.connect_ok); + if (message.connect_ok != null && $Object.hasOwnProperty.call(message, "connect_ok")) { + var error = $root.CMsgSteamDatagramConnectOK.verify(message.connect_ok, _depth + 1); if (error) return "connect_ok." + error; } - if (message.connection_closed != null && message.hasOwnProperty("connection_closed")) { - var error = $root.CMsgSteamDatagramConnectionClosed.verify(message.connection_closed); + if (message.connection_closed != null && $Object.hasOwnProperty.call(message, "connection_closed")) { + var error = $root.CMsgSteamDatagramConnectionClosed.verify(message.connection_closed, _depth + 1); if (error) return "connection_closed." + error; } @@ -14166,33 +17728,39 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramP2PRendezvous} CMsgSteamDatagramP2PRendezvous */ - CMsgSteamDatagramP2PRendezvous.fromObject = function fromObject(object) { + CMsgSteamDatagramP2PRendezvous.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramP2PRendezvous) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramP2PRendezvous: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramP2PRendezvous(); if (object.to_connection_id != null) message.to_connection_id = object.to_connection_id >>> 0; if (object.routes != null) { - if (typeof object.routes !== "object") - throw TypeError(".CMsgSteamDatagramP2PRendezvous.routes: object expected"); - message.routes = $root.CMsgSteamDatagramP2PRoutes.fromObject(object.routes); + if (!$util.isObject(object.routes)) + throw $TypeError(".CMsgSteamDatagramP2PRendezvous.routes: object expected"); + message.routes = $root.CMsgSteamDatagramP2PRoutes.fromObject(object.routes, _depth + 1); } if (object.ack_peer_routes_revision != null) message.ack_peer_routes_revision = object.ack_peer_routes_revision >>> 0; if (object.connect_request != null) { - if (typeof object.connect_request !== "object") - throw TypeError(".CMsgSteamDatagramP2PRendezvous.connect_request: object expected"); - message.connect_request = $root.CMsgSteamDatagramConnectRequest.fromObject(object.connect_request); + if (!$util.isObject(object.connect_request)) + throw $TypeError(".CMsgSteamDatagramP2PRendezvous.connect_request: object expected"); + message.connect_request = $root.CMsgSteamDatagramConnectRequest.fromObject(object.connect_request, _depth + 1); } if (object.connect_ok != null) { - if (typeof object.connect_ok !== "object") - throw TypeError(".CMsgSteamDatagramP2PRendezvous.connect_ok: object expected"); - message.connect_ok = $root.CMsgSteamDatagramConnectOK.fromObject(object.connect_ok); + if (!$util.isObject(object.connect_ok)) + throw $TypeError(".CMsgSteamDatagramP2PRendezvous.connect_ok: object expected"); + message.connect_ok = $root.CMsgSteamDatagramConnectOK.fromObject(object.connect_ok, _depth + 1); } if (object.connection_closed != null) { - if (typeof object.connection_closed !== "object") - throw TypeError(".CMsgSteamDatagramP2PRendezvous.connection_closed: object expected"); - message.connection_closed = $root.CMsgSteamDatagramConnectionClosed.fromObject(object.connection_closed); + if (!$util.isObject(object.connection_closed)) + throw $TypeError(".CMsgSteamDatagramP2PRendezvous.connection_closed: object expected"); + message.connection_closed = $root.CMsgSteamDatagramConnectionClosed.fromObject(object.connection_closed, _depth + 1); } return message; }; @@ -14206,9 +17774,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramP2PRendezvous.toObject = function toObject(message, options) { + CMsgSteamDatagramP2PRendezvous.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.to_connection_id = 0; @@ -14218,18 +17790,18 @@ object.connect_ok = null; object.connection_closed = null; } - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) object.to_connection_id = message.to_connection_id; - if (message.routes != null && message.hasOwnProperty("routes")) - object.routes = $root.CMsgSteamDatagramP2PRoutes.toObject(message.routes, options); - if (message.ack_peer_routes_revision != null && message.hasOwnProperty("ack_peer_routes_revision")) + if (message.routes != null && $Object.hasOwnProperty.call(message, "routes")) + object.routes = $root.CMsgSteamDatagramP2PRoutes.toObject(message.routes, options, _depth + 1); + if (message.ack_peer_routes_revision != null && $Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) object.ack_peer_routes_revision = message.ack_peer_routes_revision; - if (message.connect_request != null && message.hasOwnProperty("connect_request")) - object.connect_request = $root.CMsgSteamDatagramConnectRequest.toObject(message.connect_request, options); - if (message.connect_ok != null && message.hasOwnProperty("connect_ok")) - object.connect_ok = $root.CMsgSteamDatagramConnectOK.toObject(message.connect_ok, options); - if (message.connection_closed != null && message.hasOwnProperty("connection_closed")) - object.connection_closed = $root.CMsgSteamDatagramConnectionClosed.toObject(message.connection_closed, options); + if (message.connect_request != null && $Object.hasOwnProperty.call(message, "connect_request")) + object.connect_request = $root.CMsgSteamDatagramConnectRequest.toObject(message.connect_request, options, _depth + 1); + if (message.connect_ok != null && $Object.hasOwnProperty.call(message, "connect_ok")) + object.connect_ok = $root.CMsgSteamDatagramConnectOK.toObject(message.connect_ok, options, _depth + 1); + if (message.connection_closed != null && $Object.hasOwnProperty.call(message, "connection_closed")) + object.connection_closed = $root.CMsgSteamDatagramConnectionClosed.toObject(message.connection_closed, options, _depth + 1); return object; }; @@ -14240,8 +17812,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramP2PRendezvous.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramP2PRendezvous.prototype.toJSON = function() { + return CMsgSteamDatagramP2PRendezvous.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramP2PRendezvous + * @function getTypeUrl + * @memberof CMsgSteamDatagramP2PRendezvous + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramP2PRendezvous.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramP2PRendezvous"; }; return CMsgSteamDatagramP2PRendezvous; @@ -14251,42 +17837,55 @@ /** * Properties of a CMsgSteamDatagramConnectionStatsP2PClientToRouter. - * @exports ICMsgSteamDatagramConnectionStatsP2PClientToRouter - * @interface ICMsgSteamDatagramConnectionStatsP2PClientToRouter - * @property {ICMsgSteamDatagramConnectionQuality|null} [c2r] CMsgSteamDatagramConnectionStatsP2PClientToRouter c2r - * @property {ICMsgSteamDatagramConnectionQuality|null} [c2s] CMsgSteamDatagramConnectionStatsP2PClientToRouter c2s + * @typedef {Object} CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Properties + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [c2r] CMsgSteamDatagramConnectionStatsP2PClientToRouter c2r + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [c2s] CMsgSteamDatagramConnectionStatsP2PClientToRouter c2s * @property {Array.|null} [ack_relay] CMsgSteamDatagramConnectionStatsP2PClientToRouter ack_relay * @property {Array.|null} [ack_e2e] CMsgSteamDatagramConnectionStatsP2PClientToRouter ack_e2e * @property {number|null} [flags] CMsgSteamDatagramConnectionStatsP2PClientToRouter flags * @property {number|Long|null} [forward_target_relay_routing_id] CMsgSteamDatagramConnectionStatsP2PClientToRouter forward_target_relay_routing_id * @property {number|null} [forward_target_revision] CMsgSteamDatagramConnectionStatsP2PClientToRouter forward_target_revision - * @property {ICMsgSteamDatagramP2PRoutes|null} [routes] CMsgSteamDatagramConnectionStatsP2PClientToRouter routes + * @property {CMsgSteamDatagramP2PRoutes.$Properties|null} [routes] CMsgSteamDatagramConnectionStatsP2PClientToRouter routes * @property {number|null} [ack_peer_routes_revision] CMsgSteamDatagramConnectionStatsP2PClientToRouter ack_peer_routes_revision * @property {number|null} [connection_id] CMsgSteamDatagramConnectionStatsP2PClientToRouter connection_id * @property {number|null} [seq_num_c2r] CMsgSteamDatagramConnectionStatsP2PClientToRouter seq_num_c2r * @property {number|null} [seq_num_c2s] CMsgSteamDatagramConnectionStatsP2PClientToRouter seq_num_c2s + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramConnectionStatsP2PClientToRouter. + * @exports ICMsgSteamDatagramConnectionStatsP2PClientToRouter + * @interface ICMsgSteamDatagramConnectionStatsP2PClientToRouter + * @augments CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Properties + * @deprecated Use CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramConnectionStatsP2PClientToRouter. + * @typedef {CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Properties} CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Shape */ /** * Constructs a new CMsgSteamDatagramConnectionStatsP2PClientToRouter. * @exports CMsgSteamDatagramConnectionStatsP2PClientToRouter * @classdesc Represents a CMsgSteamDatagramConnectionStatsP2PClientToRouter. - * @implements ICMsgSteamDatagramConnectionStatsP2PClientToRouter * @constructor - * @param {ICMsgSteamDatagramConnectionStatsP2PClientToRouter=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramConnectionStatsP2PClientToRouter(properties) { + var CMsgSteamDatagramConnectionStatsP2PClientToRouter = function (properties) { this.ack_relay = []; this.ack_e2e = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramConnectionStatsP2PClientToRouter c2r. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} c2r + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} c2r * @memberof CMsgSteamDatagramConnectionStatsP2PClientToRouter * @instance */ @@ -14294,7 +17893,7 @@ /** * CMsgSteamDatagramConnectionStatsP2PClientToRouter c2s. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} c2s + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} c2s * @memberof CMsgSteamDatagramConnectionStatsP2PClientToRouter * @instance */ @@ -14330,7 +17929,7 @@ * @memberof CMsgSteamDatagramConnectionStatsP2PClientToRouter * @instance */ - CMsgSteamDatagramConnectionStatsP2PClientToRouter.prototype.forward_target_relay_routing_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramConnectionStatsP2PClientToRouter.prototype.forward_target_relay_routing_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramConnectionStatsP2PClientToRouter forward_target_revision. @@ -14342,7 +17941,7 @@ /** * CMsgSteamDatagramConnectionStatsP2PClientToRouter routes. - * @member {ICMsgSteamDatagramP2PRoutes|null|undefined} routes + * @member {CMsgSteamDatagramP2PRoutes.$Properties|null|undefined} routes * @memberof CMsgSteamDatagramConnectionStatsP2PClientToRouter * @instance */ @@ -14385,10 +17984,14 @@ * @function create * @memberof CMsgSteamDatagramConnectionStatsP2PClientToRouter * @static - * @param {ICMsgSteamDatagramConnectionStatsP2PClientToRouter=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramConnectionStatsP2PClientToRouter} CMsgSteamDatagramConnectionStatsP2PClientToRouter instance + * @type {{ + * (properties: CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Shape): CMsgSteamDatagramConnectionStatsP2PClientToRouter & CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Shape; + * (properties?: CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Properties): CMsgSteamDatagramConnectionStatsP2PClientToRouter; + * }} */ - CMsgSteamDatagramConnectionStatsP2PClientToRouter.create = function create(properties) { + CMsgSteamDatagramConnectionStatsP2PClientToRouter.create = function(properties) { return new CMsgSteamDatagramConnectionStatsP2PClientToRouter(properties); }; @@ -14397,39 +18000,46 @@ * @function encode * @memberof CMsgSteamDatagramConnectionStatsP2PClientToRouter * @static - * @param {ICMsgSteamDatagramConnectionStatsP2PClientToRouter} message CMsgSteamDatagramConnectionStatsP2PClientToRouter message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Properties} message CMsgSteamDatagramConnectionStatsP2PClientToRouter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsP2PClientToRouter.encode = function encode(message, writer) { + CMsgSteamDatagramConnectionStatsP2PClientToRouter.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.c2r != null && Object.hasOwnProperty.call(message, "c2r")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.c2r, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.c2s != null && Object.hasOwnProperty.call(message, "c2s")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.c2s, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.c2r != null && $Object.hasOwnProperty.call(message, "c2r")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.c2r, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.c2s != null && $Object.hasOwnProperty.call(message, "c2s")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.c2s, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); if (message.ack_relay != null && message.ack_relay.length) for (var i = 0; i < message.ack_relay.length; ++i) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.ack_relay[i]); if (message.ack_e2e != null && message.ack_e2e.length) for (var i = 0; i < message.ack_e2e.length; ++i) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.ack_e2e[i]); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.flags); - if (message.forward_target_relay_routing_id != null && Object.hasOwnProperty.call(message, "forward_target_relay_routing_id")) + if (message.forward_target_relay_routing_id != null && $Object.hasOwnProperty.call(message, "forward_target_relay_routing_id")) writer.uint32(/* id 6, wireType 1 =*/49).fixed64(message.forward_target_relay_routing_id); - if (message.forward_target_revision != null && Object.hasOwnProperty.call(message, "forward_target_revision")) + if (message.forward_target_revision != null && $Object.hasOwnProperty.call(message, "forward_target_revision")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.forward_target_revision); - if (message.routes != null && Object.hasOwnProperty.call(message, "routes")) - $root.CMsgSteamDatagramP2PRoutes.encode(message.routes, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.ack_peer_routes_revision != null && Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) + if (message.routes != null && $Object.hasOwnProperty.call(message, "routes")) + $root.CMsgSteamDatagramP2PRoutes.encode(message.routes, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.ack_peer_routes_revision != null && $Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.ack_peer_routes_revision); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 10, wireType 5 =*/85).fixed32(message.connection_id); - if (message.seq_num_c2r != null && Object.hasOwnProperty.call(message, "seq_num_c2r")) + if (message.seq_num_c2r != null && $Object.hasOwnProperty.call(message, "seq_num_c2r")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.seq_num_c2r); - if (message.seq_num_c2s != null && Object.hasOwnProperty.call(message, "seq_num_c2s")) + if (message.seq_num_c2s != null && $Object.hasOwnProperty.call(message, "seq_num_c2s")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.seq_num_c2s); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14438,12 +18048,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramConnectionStatsP2PClientToRouter * @static - * @param {ICMsgSteamDatagramConnectionStatsP2PClientToRouter} message CMsgSteamDatagramConnectionStatsP2PClientToRouter message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Properties} message CMsgSteamDatagramConnectionStatsP2PClientToRouter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsP2PClientToRouter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramConnectionStatsP2PClientToRouter.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14453,72 +18063,124 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramConnectionStatsP2PClientToRouter} CMsgSteamDatagramConnectionStatsP2PClientToRouter + * @returns {CMsgSteamDatagramConnectionStatsP2PClientToRouter & CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Shape} CMsgSteamDatagramConnectionStatsP2PClientToRouter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsP2PClientToRouter.decode = function decode(reader, length) { + CMsgSteamDatagramConnectionStatsP2PClientToRouter.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramConnectionStatsP2PClientToRouter(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramConnectionStatsP2PClientToRouter(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.c2r = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - message.c2s = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.ack_relay && message.ack_relay.length)) - message.ack_relay = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_relay.push(reader.fixed32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.c2r = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.c2r); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.c2s = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.c2s); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; + reader.fixed32s(message.ack_relay); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; message.ack_relay.push(reader.fixed32()); - break; - case 4: - if (!(message.ack_e2e && message.ack_e2e.length)) - message.ack_e2e = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_e2e.push(reader.fixed32()); - } else + continue; + } + case 4: { + if (wireType === 2) { + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; + reader.fixed32s(message.ack_e2e); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; message.ack_e2e.push(reader.fixed32()); - break; - case 5: - message.flags = reader.uint32(); - break; - case 6: - message.forward_target_relay_routing_id = reader.fixed64(); - break; - case 7: - message.forward_target_revision = reader.uint32(); - break; - case 8: - message.routes = $root.CMsgSteamDatagramP2PRoutes.decode(reader, reader.uint32()); - break; - case 9: - message.ack_peer_routes_revision = reader.uint32(); - break; - case 10: - message.connection_id = reader.fixed32(); - break; - case 11: - message.seq_num_c2r = reader.uint32(); - break; - case 12: - message.seq_num_c2s = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 5: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 1) + break; + message.forward_target_relay_routing_id = reader.fixed64(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.forward_target_revision = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.routes = $root.CMsgSteamDatagramP2PRoutes.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routes); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.ack_peer_routes_revision = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.seq_num_c2r = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.seq_num_c2s = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14528,11 +18190,11 @@ * @memberof CMsgSteamDatagramConnectionStatsP2PClientToRouter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramConnectionStatsP2PClientToRouter} CMsgSteamDatagramConnectionStatsP2PClientToRouter + * @returns {CMsgSteamDatagramConnectionStatsP2PClientToRouter & CMsgSteamDatagramConnectionStatsP2PClientToRouter.$Shape} CMsgSteamDatagramConnectionStatsP2PClientToRouter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsP2PClientToRouter.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramConnectionStatsP2PClientToRouter.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14546,57 +18208,61 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramConnectionStatsP2PClientToRouter.verify = function verify(message) { + CMsgSteamDatagramConnectionStatsP2PClientToRouter.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.c2r != null && message.hasOwnProperty("c2r")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.c2r); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.c2r != null && $Object.hasOwnProperty.call(message, "c2r")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.c2r, _depth + 1); if (error) return "c2r." + error; } - if (message.c2s != null && message.hasOwnProperty("c2s")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.c2s); + if (message.c2s != null && $Object.hasOwnProperty.call(message, "c2s")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.c2s, _depth + 1); if (error) return "c2s." + error; } - if (message.ack_relay != null && message.hasOwnProperty("ack_relay")) { - if (!Array.isArray(message.ack_relay)) + if (message.ack_relay != null && $Object.hasOwnProperty.call(message, "ack_relay")) { + if (!$Array.isArray(message.ack_relay)) return "ack_relay: array expected"; for (var i = 0; i < message.ack_relay.length; ++i) if (!$util.isInteger(message.ack_relay[i])) return "ack_relay: integer[] expected"; } - if (message.ack_e2e != null && message.hasOwnProperty("ack_e2e")) { - if (!Array.isArray(message.ack_e2e)) + if (message.ack_e2e != null && $Object.hasOwnProperty.call(message, "ack_e2e")) { + if (!$Array.isArray(message.ack_e2e)) return "ack_e2e: array expected"; for (var i = 0; i < message.ack_e2e.length; ++i) if (!$util.isInteger(message.ack_e2e[i])) return "ack_e2e: integer[] expected"; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.forward_target_relay_routing_id != null && message.hasOwnProperty("forward_target_relay_routing_id")) + if (message.forward_target_relay_routing_id != null && $Object.hasOwnProperty.call(message, "forward_target_relay_routing_id")) if (!$util.isInteger(message.forward_target_relay_routing_id) && !(message.forward_target_relay_routing_id && $util.isInteger(message.forward_target_relay_routing_id.low) && $util.isInteger(message.forward_target_relay_routing_id.high))) return "forward_target_relay_routing_id: integer|Long expected"; - if (message.forward_target_revision != null && message.hasOwnProperty("forward_target_revision")) + if (message.forward_target_revision != null && $Object.hasOwnProperty.call(message, "forward_target_revision")) if (!$util.isInteger(message.forward_target_revision)) return "forward_target_revision: integer expected"; - if (message.routes != null && message.hasOwnProperty("routes")) { - var error = $root.CMsgSteamDatagramP2PRoutes.verify(message.routes); + if (message.routes != null && $Object.hasOwnProperty.call(message, "routes")) { + var error = $root.CMsgSteamDatagramP2PRoutes.verify(message.routes, _depth + 1); if (error) return "routes." + error; } - if (message.ack_peer_routes_revision != null && message.hasOwnProperty("ack_peer_routes_revision")) + if (message.ack_peer_routes_revision != null && $Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) if (!$util.isInteger(message.ack_peer_routes_revision)) return "ack_peer_routes_revision: integer expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; - if (message.seq_num_c2r != null && message.hasOwnProperty("seq_num_c2r")) + if (message.seq_num_c2r != null && $Object.hasOwnProperty.call(message, "seq_num_c2r")) if (!$util.isInteger(message.seq_num_c2r)) return "seq_num_c2r: integer expected"; - if (message.seq_num_c2s != null && message.hasOwnProperty("seq_num_c2s")) + if (message.seq_num_c2s != null && $Object.hasOwnProperty.call(message, "seq_num_c2s")) if (!$util.isInteger(message.seq_num_c2s)) return "seq_num_c2s: integer expected"; return null; @@ -14610,31 +18276,37 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramConnectionStatsP2PClientToRouter} CMsgSteamDatagramConnectionStatsP2PClientToRouter */ - CMsgSteamDatagramConnectionStatsP2PClientToRouter.fromObject = function fromObject(object) { + CMsgSteamDatagramConnectionStatsP2PClientToRouter.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramConnectionStatsP2PClientToRouter) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PClientToRouter: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramConnectionStatsP2PClientToRouter(); if (object.c2r != null) { - if (typeof object.c2r !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsP2PClientToRouter.c2r: object expected"); - message.c2r = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.c2r); + if (!$util.isObject(object.c2r)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PClientToRouter.c2r: object expected"); + message.c2r = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.c2r, _depth + 1); } if (object.c2s != null) { - if (typeof object.c2s !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsP2PClientToRouter.c2s: object expected"); - message.c2s = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.c2s); + if (!$util.isObject(object.c2s)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PClientToRouter.c2s: object expected"); + message.c2s = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.c2s, _depth + 1); } if (object.ack_relay) { - if (!Array.isArray(object.ack_relay)) - throw TypeError(".CMsgSteamDatagramConnectionStatsP2PClientToRouter.ack_relay: array expected"); - message.ack_relay = []; + if (!$Array.isArray(object.ack_relay)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PClientToRouter.ack_relay: array expected"); + message.ack_relay = $Array(object.ack_relay.length); for (var i = 0; i < object.ack_relay.length; ++i) message.ack_relay[i] = object.ack_relay[i] >>> 0; } if (object.ack_e2e) { - if (!Array.isArray(object.ack_e2e)) - throw TypeError(".CMsgSteamDatagramConnectionStatsP2PClientToRouter.ack_e2e: array expected"); - message.ack_e2e = []; + if (!$Array.isArray(object.ack_e2e)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PClientToRouter.ack_e2e: array expected"); + message.ack_e2e = $Array(object.ack_e2e.length); for (var i = 0; i < object.ack_e2e.length; ++i) message.ack_e2e[i] = object.ack_e2e[i] >>> 0; } @@ -14642,19 +18314,19 @@ message.flags = object.flags >>> 0; if (object.forward_target_relay_routing_id != null) if ($util.Long) - (message.forward_target_relay_routing_id = $util.Long.fromValue(object.forward_target_relay_routing_id)).unsigned = false; + message.forward_target_relay_routing_id = $util.Long.fromValue(object.forward_target_relay_routing_id, true); else if (typeof object.forward_target_relay_routing_id === "string") - message.forward_target_relay_routing_id = parseInt(object.forward_target_relay_routing_id, 10); + message.forward_target_relay_routing_id = $parseInt(object.forward_target_relay_routing_id, 10); else if (typeof object.forward_target_relay_routing_id === "number") message.forward_target_relay_routing_id = object.forward_target_relay_routing_id; else if (typeof object.forward_target_relay_routing_id === "object") - message.forward_target_relay_routing_id = new $util.LongBits(object.forward_target_relay_routing_id.low >>> 0, object.forward_target_relay_routing_id.high >>> 0).toNumber(); + message.forward_target_relay_routing_id = new $util.LongBits(object.forward_target_relay_routing_id.low >>> 0, object.forward_target_relay_routing_id.high >>> 0).toNumber(true); if (object.forward_target_revision != null) message.forward_target_revision = object.forward_target_revision >>> 0; if (object.routes != null) { - if (typeof object.routes !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsP2PClientToRouter.routes: object expected"); - message.routes = $root.CMsgSteamDatagramP2PRoutes.fromObject(object.routes); + if (!$util.isObject(object.routes)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PClientToRouter.routes: object expected"); + message.routes = $root.CMsgSteamDatagramP2PRoutes.fromObject(object.routes, _depth + 1); } if (object.ack_peer_routes_revision != null) message.ack_peer_routes_revision = object.ack_peer_routes_revision >>> 0; @@ -14676,9 +18348,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramConnectionStatsP2PClientToRouter.toObject = function toObject(message, options) { + CMsgSteamDatagramConnectionStatsP2PClientToRouter.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.ack_relay = []; @@ -14689,10 +18365,10 @@ object.c2s = null; object.flags = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.forward_target_relay_routing_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.forward_target_relay_routing_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.forward_target_relay_routing_id = options.longs === String ? "0" : 0; + object.forward_target_relay_routing_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.forward_target_revision = 0; object.routes = null; object.ack_peer_routes_revision = 0; @@ -14700,51 +18376,67 @@ object.seq_num_c2r = 0; object.seq_num_c2s = 0; } - if (message.c2r != null && message.hasOwnProperty("c2r")) - object.c2r = $root.CMsgSteamDatagramConnectionQuality.toObject(message.c2r, options); - if (message.c2s != null && message.hasOwnProperty("c2s")) - object.c2s = $root.CMsgSteamDatagramConnectionQuality.toObject(message.c2s, options); + if (message.c2r != null && $Object.hasOwnProperty.call(message, "c2r")) + object.c2r = $root.CMsgSteamDatagramConnectionQuality.toObject(message.c2r, options, _depth + 1); + if (message.c2s != null && $Object.hasOwnProperty.call(message, "c2s")) + object.c2s = $root.CMsgSteamDatagramConnectionQuality.toObject(message.c2s, options, _depth + 1); if (message.ack_relay && message.ack_relay.length) { - object.ack_relay = []; + object.ack_relay = $Array(message.ack_relay.length); for (var j = 0; j < message.ack_relay.length; ++j) object.ack_relay[j] = message.ack_relay[j]; } if (message.ack_e2e && message.ack_e2e.length) { - object.ack_e2e = []; + object.ack_e2e = $Array(message.ack_e2e.length); for (var j = 0; j < message.ack_e2e.length; ++j) object.ack_e2e[j] = message.ack_e2e[j]; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.forward_target_relay_routing_id != null && message.hasOwnProperty("forward_target_relay_routing_id")) - if (typeof message.forward_target_relay_routing_id === "number") - object.forward_target_relay_routing_id = options.longs === String ? String(message.forward_target_relay_routing_id) : message.forward_target_relay_routing_id; + if (message.forward_target_relay_routing_id != null && $Object.hasOwnProperty.call(message, "forward_target_relay_routing_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.forward_target_relay_routing_id = typeof message.forward_target_relay_routing_id === "number" ? $BigInt(message.forward_target_relay_routing_id) : $util.Long.fromBits(message.forward_target_relay_routing_id.low >>> 0, message.forward_target_relay_routing_id.high >>> 0, true).toBigInt(); + else if (typeof message.forward_target_relay_routing_id === "number") + object.forward_target_relay_routing_id = options.longs === $String ? $String(message.forward_target_relay_routing_id) : message.forward_target_relay_routing_id; else - object.forward_target_relay_routing_id = options.longs === String ? $util.Long.prototype.toString.call(message.forward_target_relay_routing_id) : options.longs === Number ? new $util.LongBits(message.forward_target_relay_routing_id.low >>> 0, message.forward_target_relay_routing_id.high >>> 0).toNumber() : message.forward_target_relay_routing_id; - if (message.forward_target_revision != null && message.hasOwnProperty("forward_target_revision")) + object.forward_target_relay_routing_id = options.longs === $String ? $util.Long.prototype.toString.call(message.forward_target_relay_routing_id) : options.longs === $Number ? new $util.LongBits(message.forward_target_relay_routing_id.low >>> 0, message.forward_target_relay_routing_id.high >>> 0).toNumber(true) : message.forward_target_relay_routing_id; + if (message.forward_target_revision != null && $Object.hasOwnProperty.call(message, "forward_target_revision")) object.forward_target_revision = message.forward_target_revision; - if (message.routes != null && message.hasOwnProperty("routes")) - object.routes = $root.CMsgSteamDatagramP2PRoutes.toObject(message.routes, options); - if (message.ack_peer_routes_revision != null && message.hasOwnProperty("ack_peer_routes_revision")) + if (message.routes != null && $Object.hasOwnProperty.call(message, "routes")) + object.routes = $root.CMsgSteamDatagramP2PRoutes.toObject(message.routes, options, _depth + 1); + if (message.ack_peer_routes_revision != null && $Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) object.ack_peer_routes_revision = message.ack_peer_routes_revision; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; - if (message.seq_num_c2r != null && message.hasOwnProperty("seq_num_c2r")) + if (message.seq_num_c2r != null && $Object.hasOwnProperty.call(message, "seq_num_c2r")) object.seq_num_c2r = message.seq_num_c2r; - if (message.seq_num_c2s != null && message.hasOwnProperty("seq_num_c2s")) + if (message.seq_num_c2s != null && $Object.hasOwnProperty.call(message, "seq_num_c2s")) object.seq_num_c2s = message.seq_num_c2s; return object; }; /** - * Converts this CMsgSteamDatagramConnectionStatsP2PClientToRouter to JSON. - * @function toJSON + * Converts this CMsgSteamDatagramConnectionStatsP2PClientToRouter to JSON. + * @function toJSON + * @memberof CMsgSteamDatagramConnectionStatsP2PClientToRouter + * @instance + * @returns {Object.} JSON object + */ + CMsgSteamDatagramConnectionStatsP2PClientToRouter.prototype.toJSON = function() { + return CMsgSteamDatagramConnectionStatsP2PClientToRouter.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramConnectionStatsP2PClientToRouter + * @function getTypeUrl * @memberof CMsgSteamDatagramConnectionStatsP2PClientToRouter - * @instance - * @returns {Object.} JSON object + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url */ - CMsgSteamDatagramConnectionStatsP2PClientToRouter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramConnectionStatsP2PClientToRouter.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramConnectionStatsP2PClientToRouter"; }; /** @@ -14756,7 +18448,7 @@ * @property {number} ACK_REQUEST_IMMEDIATE=4 ACK_REQUEST_IMMEDIATE value */ CMsgSteamDatagramConnectionStatsP2PClientToRouter.Flags = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "ACK_REQUEST_RELAY"] = 1; values[valuesById[2] = "ACK_REQUEST_E2E"] = 2; values[valuesById[4] = "ACK_REQUEST_IMMEDIATE"] = 4; @@ -14770,10 +18462,9 @@ /** * Properties of a CMsgSteamDatagramConnectionStatsP2PRouterToClient. - * @exports ICMsgSteamDatagramConnectionStatsP2PRouterToClient - * @interface ICMsgSteamDatagramConnectionStatsP2PRouterToClient - * @property {ICMsgSteamDatagramConnectionQuality|null} [r2c] CMsgSteamDatagramConnectionStatsP2PRouterToClient r2c - * @property {ICMsgSteamDatagramConnectionQuality|null} [p2c] CMsgSteamDatagramConnectionStatsP2PRouterToClient p2c + * @typedef {Object} CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Properties + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [r2c] CMsgSteamDatagramConnectionStatsP2PRouterToClient r2c + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [p2c] CMsgSteamDatagramConnectionStatsP2PRouterToClient p2c * @property {number|null} [seconds_until_shutdown] CMsgSteamDatagramConnectionStatsP2PRouterToClient seconds_until_shutdown * @property {number|null} [migrate_request_ip] CMsgSteamDatagramConnectionStatsP2PRouterToClient migrate_request_ip * @property {number|null} [migrate_request_port] CMsgSteamDatagramConnectionStatsP2PRouterToClient migrate_request_port @@ -14782,33 +18473,47 @@ * @property {Array.|null} [ack_e2e] CMsgSteamDatagramConnectionStatsP2PRouterToClient ack_e2e * @property {number|null} [flags] CMsgSteamDatagramConnectionStatsP2PRouterToClient flags * @property {number|null} [ack_forward_target_revision] CMsgSteamDatagramConnectionStatsP2PRouterToClient ack_forward_target_revision - * @property {ICMsgSteamDatagramP2PRoutes|null} [routes] CMsgSteamDatagramConnectionStatsP2PRouterToClient routes + * @property {CMsgSteamDatagramP2PRoutes.$Properties|null} [routes] CMsgSteamDatagramConnectionStatsP2PRouterToClient routes * @property {number|null} [ack_peer_routes_revision] CMsgSteamDatagramConnectionStatsP2PRouterToClient ack_peer_routes_revision * @property {number|null} [connection_id] CMsgSteamDatagramConnectionStatsP2PRouterToClient connection_id * @property {number|null} [seq_num_r2c] CMsgSteamDatagramConnectionStatsP2PRouterToClient seq_num_r2c * @property {number|null} [seq_num_p2c] CMsgSteamDatagramConnectionStatsP2PRouterToClient seq_num_p2c + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramConnectionStatsP2PRouterToClient. + * @exports ICMsgSteamDatagramConnectionStatsP2PRouterToClient + * @interface ICMsgSteamDatagramConnectionStatsP2PRouterToClient + * @augments CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Properties + * @deprecated Use CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramConnectionStatsP2PRouterToClient. + * @typedef {CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Properties} CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Shape */ /** * Constructs a new CMsgSteamDatagramConnectionStatsP2PRouterToClient. * @exports CMsgSteamDatagramConnectionStatsP2PRouterToClient * @classdesc Represents a CMsgSteamDatagramConnectionStatsP2PRouterToClient. - * @implements ICMsgSteamDatagramConnectionStatsP2PRouterToClient * @constructor - * @param {ICMsgSteamDatagramConnectionStatsP2PRouterToClient=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramConnectionStatsP2PRouterToClient(properties) { + var CMsgSteamDatagramConnectionStatsP2PRouterToClient = function (properties) { this.ack_relay = []; this.ack_e2e = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramConnectionStatsP2PRouterToClient r2c. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} r2c + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} r2c * @memberof CMsgSteamDatagramConnectionStatsP2PRouterToClient * @instance */ @@ -14816,7 +18521,7 @@ /** * CMsgSteamDatagramConnectionStatsP2PRouterToClient p2c. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} p2c + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} p2c * @memberof CMsgSteamDatagramConnectionStatsP2PRouterToClient * @instance */ @@ -14888,7 +18593,7 @@ /** * CMsgSteamDatagramConnectionStatsP2PRouterToClient routes. - * @member {ICMsgSteamDatagramP2PRoutes|null|undefined} routes + * @member {CMsgSteamDatagramP2PRoutes.$Properties|null|undefined} routes * @memberof CMsgSteamDatagramConnectionStatsP2PRouterToClient * @instance */ @@ -14931,10 +18636,14 @@ * @function create * @memberof CMsgSteamDatagramConnectionStatsP2PRouterToClient * @static - * @param {ICMsgSteamDatagramConnectionStatsP2PRouterToClient=} [properties] Properties to set + * @param {CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramConnectionStatsP2PRouterToClient} CMsgSteamDatagramConnectionStatsP2PRouterToClient instance + * @type {{ + * (properties: CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Shape): CMsgSteamDatagramConnectionStatsP2PRouterToClient & CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Shape; + * (properties?: CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Properties): CMsgSteamDatagramConnectionStatsP2PRouterToClient; + * }} */ - CMsgSteamDatagramConnectionStatsP2PRouterToClient.create = function create(properties) { + CMsgSteamDatagramConnectionStatsP2PRouterToClient.create = function(properties) { return new CMsgSteamDatagramConnectionStatsP2PRouterToClient(properties); }; @@ -14943,24 +18652,28 @@ * @function encode * @memberof CMsgSteamDatagramConnectionStatsP2PRouterToClient * @static - * @param {ICMsgSteamDatagramConnectionStatsP2PRouterToClient} message CMsgSteamDatagramConnectionStatsP2PRouterToClient message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Properties} message CMsgSteamDatagramConnectionStatsP2PRouterToClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsP2PRouterToClient.encode = function encode(message, writer) { + CMsgSteamDatagramConnectionStatsP2PRouterToClient.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.r2c != null && Object.hasOwnProperty.call(message, "r2c")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.r2c, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.p2c != null && Object.hasOwnProperty.call(message, "p2c")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.p2c, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.seconds_until_shutdown != null && Object.hasOwnProperty.call(message, "seconds_until_shutdown")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.r2c != null && $Object.hasOwnProperty.call(message, "r2c")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.r2c, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.p2c != null && $Object.hasOwnProperty.call(message, "p2c")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.p2c, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.seconds_until_shutdown); - if (message.migrate_request_ip != null && Object.hasOwnProperty.call(message, "migrate_request_ip")) + if (message.migrate_request_ip != null && $Object.hasOwnProperty.call(message, "migrate_request_ip")) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.migrate_request_ip); - if (message.migrate_request_port != null && Object.hasOwnProperty.call(message, "migrate_request_port")) + if (message.migrate_request_port != null && $Object.hasOwnProperty.call(message, "migrate_request_port")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.migrate_request_port); - if (message.scoring_penalty_relay_cluster != null && Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) + if (message.scoring_penalty_relay_cluster != null && $Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.scoring_penalty_relay_cluster); if (message.ack_relay != null && message.ack_relay.length) for (var i = 0; i < message.ack_relay.length; ++i) @@ -14968,20 +18681,23 @@ if (message.ack_e2e != null && message.ack_e2e.length) for (var i = 0; i < message.ack_e2e.length; ++i) writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.ack_e2e[i]); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.flags); - if (message.ack_forward_target_revision != null && Object.hasOwnProperty.call(message, "ack_forward_target_revision")) + if (message.ack_forward_target_revision != null && $Object.hasOwnProperty.call(message, "ack_forward_target_revision")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.ack_forward_target_revision); - if (message.routes != null && Object.hasOwnProperty.call(message, "routes")) - $root.CMsgSteamDatagramP2PRoutes.encode(message.routes, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.ack_peer_routes_revision != null && Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) + if (message.routes != null && $Object.hasOwnProperty.call(message, "routes")) + $root.CMsgSteamDatagramP2PRoutes.encode(message.routes, writer.uint32(/* id 11, wireType 2 =*/90).fork(), _depth + 1).ldelim(); + if (message.ack_peer_routes_revision != null && $Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.ack_peer_routes_revision); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 13, wireType 5 =*/109).fixed32(message.connection_id); - if (message.seq_num_r2c != null && Object.hasOwnProperty.call(message, "seq_num_r2c")) + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.seq_num_r2c); - if (message.seq_num_p2c != null && Object.hasOwnProperty.call(message, "seq_num_p2c")) + if (message.seq_num_p2c != null && $Object.hasOwnProperty.call(message, "seq_num_p2c")) writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.seq_num_p2c); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14990,12 +18706,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramConnectionStatsP2PRouterToClient * @static - * @param {ICMsgSteamDatagramConnectionStatsP2PRouterToClient} message CMsgSteamDatagramConnectionStatsP2PRouterToClient message or plain object to encode + * @param {CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Properties} message CMsgSteamDatagramConnectionStatsP2PRouterToClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramConnectionStatsP2PRouterToClient.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramConnectionStatsP2PRouterToClient.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15005,81 +18721,142 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramConnectionStatsP2PRouterToClient} CMsgSteamDatagramConnectionStatsP2PRouterToClient + * @returns {CMsgSteamDatagramConnectionStatsP2PRouterToClient & CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Shape} CMsgSteamDatagramConnectionStatsP2PRouterToClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsP2PRouterToClient.decode = function decode(reader, length) { + CMsgSteamDatagramConnectionStatsP2PRouterToClient.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramConnectionStatsP2PRouterToClient(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramConnectionStatsP2PRouterToClient(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.r2c = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); - break; - case 2: - message.p2c = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); - break; - case 3: - message.seconds_until_shutdown = reader.uint32(); - break; - case 4: - message.migrate_request_ip = reader.fixed32(); - break; - case 5: - message.migrate_request_port = reader.uint32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 6: - message.scoring_penalty_relay_cluster = reader.uint32(); - break; - case 7: - if (!(message.ack_relay && message.ack_relay.length)) - message.ack_relay = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_relay.push(reader.fixed32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.r2c = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.r2c); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.p2c = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.p2c); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.seconds_until_shutdown = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.migrate_request_ip = reader.fixed32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.migrate_request_port = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.scoring_penalty_relay_cluster = reader.uint32(); + continue; + } + case 7: { + if (wireType === 2) { + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; + reader.fixed32s(message.ack_relay); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_relay && message.ack_relay.length)) + message.ack_relay = []; message.ack_relay.push(reader.fixed32()); - break; - case 8: - if (!(message.ack_e2e && message.ack_e2e.length)) - message.ack_e2e = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_e2e.push(reader.fixed32()); - } else + continue; + } + case 8: { + if (wireType === 2) { + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; + reader.fixed32s(message.ack_e2e); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; message.ack_e2e.push(reader.fixed32()); - break; - case 9: - message.flags = reader.uint32(); - break; - case 10: - message.ack_forward_target_revision = reader.uint32(); - break; - case 11: - message.routes = $root.CMsgSteamDatagramP2PRoutes.decode(reader, reader.uint32()); - break; - case 12: - message.ack_peer_routes_revision = reader.uint32(); - break; - case 13: - message.connection_id = reader.fixed32(); - break; - case 14: - message.seq_num_r2c = reader.uint32(); - break; - case 15: - message.seq_num_p2c = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 9: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.ack_forward_target_revision = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 2) + break; + message.routes = $root.CMsgSteamDatagramP2PRoutes.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routes); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.ack_peer_routes_revision = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.seq_num_r2c = reader.uint32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.seq_num_p2c = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15089,11 +18866,11 @@ * @memberof CMsgSteamDatagramConnectionStatsP2PRouterToClient * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramConnectionStatsP2PRouterToClient} CMsgSteamDatagramConnectionStatsP2PRouterToClient + * @returns {CMsgSteamDatagramConnectionStatsP2PRouterToClient & CMsgSteamDatagramConnectionStatsP2PRouterToClient.$Shape} CMsgSteamDatagramConnectionStatsP2PRouterToClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramConnectionStatsP2PRouterToClient.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramConnectionStatsP2PRouterToClient.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15107,66 +18884,70 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramConnectionStatsP2PRouterToClient.verify = function verify(message) { + CMsgSteamDatagramConnectionStatsP2PRouterToClient.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.r2c != null && message.hasOwnProperty("r2c")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.r2c); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.r2c != null && $Object.hasOwnProperty.call(message, "r2c")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.r2c, _depth + 1); if (error) return "r2c." + error; } - if (message.p2c != null && message.hasOwnProperty("p2c")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.p2c); + if (message.p2c != null && $Object.hasOwnProperty.call(message, "p2c")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.p2c, _depth + 1); if (error) return "p2c." + error; } - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) if (!$util.isInteger(message.seconds_until_shutdown)) return "seconds_until_shutdown: integer expected"; - if (message.migrate_request_ip != null && message.hasOwnProperty("migrate_request_ip")) + if (message.migrate_request_ip != null && $Object.hasOwnProperty.call(message, "migrate_request_ip")) if (!$util.isInteger(message.migrate_request_ip)) return "migrate_request_ip: integer expected"; - if (message.migrate_request_port != null && message.hasOwnProperty("migrate_request_port")) + if (message.migrate_request_port != null && $Object.hasOwnProperty.call(message, "migrate_request_port")) if (!$util.isInteger(message.migrate_request_port)) return "migrate_request_port: integer expected"; - if (message.scoring_penalty_relay_cluster != null && message.hasOwnProperty("scoring_penalty_relay_cluster")) + if (message.scoring_penalty_relay_cluster != null && $Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) if (!$util.isInteger(message.scoring_penalty_relay_cluster)) return "scoring_penalty_relay_cluster: integer expected"; - if (message.ack_relay != null && message.hasOwnProperty("ack_relay")) { - if (!Array.isArray(message.ack_relay)) + if (message.ack_relay != null && $Object.hasOwnProperty.call(message, "ack_relay")) { + if (!$Array.isArray(message.ack_relay)) return "ack_relay: array expected"; for (var i = 0; i < message.ack_relay.length; ++i) if (!$util.isInteger(message.ack_relay[i])) return "ack_relay: integer[] expected"; } - if (message.ack_e2e != null && message.hasOwnProperty("ack_e2e")) { - if (!Array.isArray(message.ack_e2e)) + if (message.ack_e2e != null && $Object.hasOwnProperty.call(message, "ack_e2e")) { + if (!$Array.isArray(message.ack_e2e)) return "ack_e2e: array expected"; for (var i = 0; i < message.ack_e2e.length; ++i) if (!$util.isInteger(message.ack_e2e[i])) return "ack_e2e: integer[] expected"; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.ack_forward_target_revision != null && message.hasOwnProperty("ack_forward_target_revision")) + if (message.ack_forward_target_revision != null && $Object.hasOwnProperty.call(message, "ack_forward_target_revision")) if (!$util.isInteger(message.ack_forward_target_revision)) return "ack_forward_target_revision: integer expected"; - if (message.routes != null && message.hasOwnProperty("routes")) { - var error = $root.CMsgSteamDatagramP2PRoutes.verify(message.routes); + if (message.routes != null && $Object.hasOwnProperty.call(message, "routes")) { + var error = $root.CMsgSteamDatagramP2PRoutes.verify(message.routes, _depth + 1); if (error) return "routes." + error; } - if (message.ack_peer_routes_revision != null && message.hasOwnProperty("ack_peer_routes_revision")) + if (message.ack_peer_routes_revision != null && $Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) if (!$util.isInteger(message.ack_peer_routes_revision)) return "ack_peer_routes_revision: integer expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; - if (message.seq_num_r2c != null && message.hasOwnProperty("seq_num_r2c")) + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) if (!$util.isInteger(message.seq_num_r2c)) return "seq_num_r2c: integer expected"; - if (message.seq_num_p2c != null && message.hasOwnProperty("seq_num_p2c")) + if (message.seq_num_p2c != null && $Object.hasOwnProperty.call(message, "seq_num_p2c")) if (!$util.isInteger(message.seq_num_p2c)) return "seq_num_p2c: integer expected"; return null; @@ -15180,19 +18961,25 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramConnectionStatsP2PRouterToClient} CMsgSteamDatagramConnectionStatsP2PRouterToClient */ - CMsgSteamDatagramConnectionStatsP2PRouterToClient.fromObject = function fromObject(object) { + CMsgSteamDatagramConnectionStatsP2PRouterToClient.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramConnectionStatsP2PRouterToClient) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PRouterToClient: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramConnectionStatsP2PRouterToClient(); if (object.r2c != null) { - if (typeof object.r2c !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsP2PRouterToClient.r2c: object expected"); - message.r2c = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.r2c); + if (!$util.isObject(object.r2c)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PRouterToClient.r2c: object expected"); + message.r2c = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.r2c, _depth + 1); } if (object.p2c != null) { - if (typeof object.p2c !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsP2PRouterToClient.p2c: object expected"); - message.p2c = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.p2c); + if (!$util.isObject(object.p2c)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PRouterToClient.p2c: object expected"); + message.p2c = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.p2c, _depth + 1); } if (object.seconds_until_shutdown != null) message.seconds_until_shutdown = object.seconds_until_shutdown >>> 0; @@ -15203,16 +18990,16 @@ if (object.scoring_penalty_relay_cluster != null) message.scoring_penalty_relay_cluster = object.scoring_penalty_relay_cluster >>> 0; if (object.ack_relay) { - if (!Array.isArray(object.ack_relay)) - throw TypeError(".CMsgSteamDatagramConnectionStatsP2PRouterToClient.ack_relay: array expected"); - message.ack_relay = []; + if (!$Array.isArray(object.ack_relay)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PRouterToClient.ack_relay: array expected"); + message.ack_relay = $Array(object.ack_relay.length); for (var i = 0; i < object.ack_relay.length; ++i) message.ack_relay[i] = object.ack_relay[i] >>> 0; } if (object.ack_e2e) { - if (!Array.isArray(object.ack_e2e)) - throw TypeError(".CMsgSteamDatagramConnectionStatsP2PRouterToClient.ack_e2e: array expected"); - message.ack_e2e = []; + if (!$Array.isArray(object.ack_e2e)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PRouterToClient.ack_e2e: array expected"); + message.ack_e2e = $Array(object.ack_e2e.length); for (var i = 0; i < object.ack_e2e.length; ++i) message.ack_e2e[i] = object.ack_e2e[i] >>> 0; } @@ -15221,9 +19008,9 @@ if (object.ack_forward_target_revision != null) message.ack_forward_target_revision = object.ack_forward_target_revision >>> 0; if (object.routes != null) { - if (typeof object.routes !== "object") - throw TypeError(".CMsgSteamDatagramConnectionStatsP2PRouterToClient.routes: object expected"); - message.routes = $root.CMsgSteamDatagramP2PRoutes.fromObject(object.routes); + if (!$util.isObject(object.routes)) + throw $TypeError(".CMsgSteamDatagramConnectionStatsP2PRouterToClient.routes: object expected"); + message.routes = $root.CMsgSteamDatagramP2PRoutes.fromObject(object.routes, _depth + 1); } if (object.ack_peer_routes_revision != null) message.ack_peer_routes_revision = object.ack_peer_routes_revision >>> 0; @@ -15245,9 +19032,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramConnectionStatsP2PRouterToClient.toObject = function toObject(message, options) { + CMsgSteamDatagramConnectionStatsP2PRouterToClient.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.ack_relay = []; @@ -15268,41 +19059,41 @@ object.seq_num_r2c = 0; object.seq_num_p2c = 0; } - if (message.r2c != null && message.hasOwnProperty("r2c")) - object.r2c = $root.CMsgSteamDatagramConnectionQuality.toObject(message.r2c, options); - if (message.p2c != null && message.hasOwnProperty("p2c")) - object.p2c = $root.CMsgSteamDatagramConnectionQuality.toObject(message.p2c, options); - if (message.seconds_until_shutdown != null && message.hasOwnProperty("seconds_until_shutdown")) + if (message.r2c != null && $Object.hasOwnProperty.call(message, "r2c")) + object.r2c = $root.CMsgSteamDatagramConnectionQuality.toObject(message.r2c, options, _depth + 1); + if (message.p2c != null && $Object.hasOwnProperty.call(message, "p2c")) + object.p2c = $root.CMsgSteamDatagramConnectionQuality.toObject(message.p2c, options, _depth + 1); + if (message.seconds_until_shutdown != null && $Object.hasOwnProperty.call(message, "seconds_until_shutdown")) object.seconds_until_shutdown = message.seconds_until_shutdown; - if (message.migrate_request_ip != null && message.hasOwnProperty("migrate_request_ip")) + if (message.migrate_request_ip != null && $Object.hasOwnProperty.call(message, "migrate_request_ip")) object.migrate_request_ip = message.migrate_request_ip; - if (message.migrate_request_port != null && message.hasOwnProperty("migrate_request_port")) + if (message.migrate_request_port != null && $Object.hasOwnProperty.call(message, "migrate_request_port")) object.migrate_request_port = message.migrate_request_port; - if (message.scoring_penalty_relay_cluster != null && message.hasOwnProperty("scoring_penalty_relay_cluster")) + if (message.scoring_penalty_relay_cluster != null && $Object.hasOwnProperty.call(message, "scoring_penalty_relay_cluster")) object.scoring_penalty_relay_cluster = message.scoring_penalty_relay_cluster; if (message.ack_relay && message.ack_relay.length) { - object.ack_relay = []; + object.ack_relay = $Array(message.ack_relay.length); for (var j = 0; j < message.ack_relay.length; ++j) object.ack_relay[j] = message.ack_relay[j]; } if (message.ack_e2e && message.ack_e2e.length) { - object.ack_e2e = []; + object.ack_e2e = $Array(message.ack_e2e.length); for (var j = 0; j < message.ack_e2e.length; ++j) object.ack_e2e[j] = message.ack_e2e[j]; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.ack_forward_target_revision != null && message.hasOwnProperty("ack_forward_target_revision")) + if (message.ack_forward_target_revision != null && $Object.hasOwnProperty.call(message, "ack_forward_target_revision")) object.ack_forward_target_revision = message.ack_forward_target_revision; - if (message.routes != null && message.hasOwnProperty("routes")) - object.routes = $root.CMsgSteamDatagramP2PRoutes.toObject(message.routes, options); - if (message.ack_peer_routes_revision != null && message.hasOwnProperty("ack_peer_routes_revision")) + if (message.routes != null && $Object.hasOwnProperty.call(message, "routes")) + object.routes = $root.CMsgSteamDatagramP2PRoutes.toObject(message.routes, options, _depth + 1); + if (message.ack_peer_routes_revision != null && $Object.hasOwnProperty.call(message, "ack_peer_routes_revision")) object.ack_peer_routes_revision = message.ack_peer_routes_revision; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; - if (message.seq_num_r2c != null && message.hasOwnProperty("seq_num_r2c")) + if (message.seq_num_r2c != null && $Object.hasOwnProperty.call(message, "seq_num_r2c")) object.seq_num_r2c = message.seq_num_r2c; - if (message.seq_num_p2c != null && message.hasOwnProperty("seq_num_p2c")) + if (message.seq_num_p2c != null && $Object.hasOwnProperty.call(message, "seq_num_p2c")) object.seq_num_p2c = message.seq_num_p2c; return object; }; @@ -15314,8 +19105,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramConnectionStatsP2PRouterToClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramConnectionStatsP2PRouterToClient.prototype.toJSON = function() { + return CMsgSteamDatagramConnectionStatsP2PRouterToClient.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramConnectionStatsP2PRouterToClient + * @function getTypeUrl + * @memberof CMsgSteamDatagramConnectionStatsP2PRouterToClient + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramConnectionStatsP2PRouterToClient.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramConnectionStatsP2PRouterToClient"; }; /** @@ -15327,7 +19132,7 @@ * @property {number} ACK_REQUEST_IMMEDIATE=4 ACK_REQUEST_IMMEDIATE value */ CMsgSteamDatagramConnectionStatsP2PRouterToClient.Flags = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "ACK_REQUEST_RELAY"] = 1; values[valuesById[2] = "ACK_REQUEST_E2E"] = 2; values[valuesById[4] = "ACK_REQUEST_IMMEDIATE"] = 4; @@ -15341,27 +19146,40 @@ /** * Properties of a CMsgSteamSockets_UDP_ChallengeRequest. - * @exports ICMsgSteamSockets_UDP_ChallengeRequest - * @interface ICMsgSteamSockets_UDP_ChallengeRequest + * @typedef {Object} CMsgSteamSockets_UDP_ChallengeRequest.$Properties * @property {number|null} [connection_id] CMsgSteamSockets_UDP_ChallengeRequest connection_id * @property {number|Long|null} [my_timestamp] CMsgSteamSockets_UDP_ChallengeRequest my_timestamp * @property {number|null} [protocol_version] CMsgSteamSockets_UDP_ChallengeRequest protocol_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamSockets_UDP_ChallengeRequest. + * @exports ICMsgSteamSockets_UDP_ChallengeRequest + * @interface ICMsgSteamSockets_UDP_ChallengeRequest + * @augments CMsgSteamSockets_UDP_ChallengeRequest.$Properties + * @deprecated Use CMsgSteamSockets_UDP_ChallengeRequest.$Properties instead. + */ + + /** + * Shape of a CMsgSteamSockets_UDP_ChallengeRequest. + * @typedef {CMsgSteamSockets_UDP_ChallengeRequest.$Properties} CMsgSteamSockets_UDP_ChallengeRequest.$Shape */ /** * Constructs a new CMsgSteamSockets_UDP_ChallengeRequest. * @exports CMsgSteamSockets_UDP_ChallengeRequest * @classdesc Represents a CMsgSteamSockets_UDP_ChallengeRequest. - * @implements ICMsgSteamSockets_UDP_ChallengeRequest * @constructor - * @param {ICMsgSteamSockets_UDP_ChallengeRequest=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_ChallengeRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamSockets_UDP_ChallengeRequest(properties) { + var CMsgSteamSockets_UDP_ChallengeRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamSockets_UDP_ChallengeRequest connection_id. @@ -15377,7 +19195,7 @@ * @memberof CMsgSteamSockets_UDP_ChallengeRequest * @instance */ - CMsgSteamSockets_UDP_ChallengeRequest.prototype.my_timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamSockets_UDP_ChallengeRequest.prototype.my_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamSockets_UDP_ChallengeRequest protocol_version. @@ -15392,10 +19210,14 @@ * @function create * @memberof CMsgSteamSockets_UDP_ChallengeRequest * @static - * @param {ICMsgSteamSockets_UDP_ChallengeRequest=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_ChallengeRequest.$Properties=} [properties] Properties to set * @returns {CMsgSteamSockets_UDP_ChallengeRequest} CMsgSteamSockets_UDP_ChallengeRequest instance + * @type {{ + * (properties: CMsgSteamSockets_UDP_ChallengeRequest.$Shape): CMsgSteamSockets_UDP_ChallengeRequest & CMsgSteamSockets_UDP_ChallengeRequest.$Shape; + * (properties?: CMsgSteamSockets_UDP_ChallengeRequest.$Properties): CMsgSteamSockets_UDP_ChallengeRequest; + * }} */ - CMsgSteamSockets_UDP_ChallengeRequest.create = function create(properties) { + CMsgSteamSockets_UDP_ChallengeRequest.create = function(properties) { return new CMsgSteamSockets_UDP_ChallengeRequest(properties); }; @@ -15404,19 +19226,26 @@ * @function encode * @memberof CMsgSteamSockets_UDP_ChallengeRequest * @static - * @param {ICMsgSteamSockets_UDP_ChallengeRequest} message CMsgSteamSockets_UDP_ChallengeRequest message or plain object to encode + * @param {CMsgSteamSockets_UDP_ChallengeRequest.$Properties} message CMsgSteamSockets_UDP_ChallengeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_ChallengeRequest.encode = function encode(message, writer) { + CMsgSteamSockets_UDP_ChallengeRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.connection_id); - if (message.my_timestamp != null && Object.hasOwnProperty.call(message, "my_timestamp")) + if (message.my_timestamp != null && $Object.hasOwnProperty.call(message, "my_timestamp")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.my_timestamp); - if (message.protocol_version != null && Object.hasOwnProperty.call(message, "protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.protocol_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15425,12 +19254,12 @@ * @function encodeDelimited * @memberof CMsgSteamSockets_UDP_ChallengeRequest * @static - * @param {ICMsgSteamSockets_UDP_ChallengeRequest} message CMsgSteamSockets_UDP_ChallengeRequest message or plain object to encode + * @param {CMsgSteamSockets_UDP_ChallengeRequest.$Properties} message CMsgSteamSockets_UDP_ChallengeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_ChallengeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamSockets_UDP_ChallengeRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15440,31 +19269,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamSockets_UDP_ChallengeRequest} CMsgSteamSockets_UDP_ChallengeRequest + * @returns {CMsgSteamSockets_UDP_ChallengeRequest & CMsgSteamSockets_UDP_ChallengeRequest.$Shape} CMsgSteamSockets_UDP_ChallengeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_ChallengeRequest.decode = function decode(reader, length) { + CMsgSteamSockets_UDP_ChallengeRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamSockets_UDP_ChallengeRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamSockets_UDP_ChallengeRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.fixed32(); - break; - case 3: - message.my_timestamp = reader.fixed64(); - break; - case 4: - message.protocol_version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.my_timestamp = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.protocol_version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15474,11 +19326,11 @@ * @memberof CMsgSteamSockets_UDP_ChallengeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamSockets_UDP_ChallengeRequest} CMsgSteamSockets_UDP_ChallengeRequest + * @returns {CMsgSteamSockets_UDP_ChallengeRequest & CMsgSteamSockets_UDP_ChallengeRequest.$Shape} CMsgSteamSockets_UDP_ChallengeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_ChallengeRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamSockets_UDP_ChallengeRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15492,16 +19344,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamSockets_UDP_ChallengeRequest.verify = function verify(message) { + CMsgSteamSockets_UDP_ChallengeRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; - if (message.my_timestamp != null && message.hasOwnProperty("my_timestamp")) + if (message.my_timestamp != null && $Object.hasOwnProperty.call(message, "my_timestamp")) if (!$util.isInteger(message.my_timestamp) && !(message.my_timestamp && $util.isInteger(message.my_timestamp.low) && $util.isInteger(message.my_timestamp.high))) return "my_timestamp: integer|Long expected"; - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) if (!$util.isInteger(message.protocol_version)) return "protocol_version: integer expected"; return null; @@ -15515,21 +19371,27 @@ * @param {Object.} object Plain object * @returns {CMsgSteamSockets_UDP_ChallengeRequest} CMsgSteamSockets_UDP_ChallengeRequest */ - CMsgSteamSockets_UDP_ChallengeRequest.fromObject = function fromObject(object) { + CMsgSteamSockets_UDP_ChallengeRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamSockets_UDP_ChallengeRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamSockets_UDP_ChallengeRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamSockets_UDP_ChallengeRequest(); if (object.connection_id != null) message.connection_id = object.connection_id >>> 0; if (object.my_timestamp != null) if ($util.Long) - (message.my_timestamp = $util.Long.fromValue(object.my_timestamp)).unsigned = false; + message.my_timestamp = $util.Long.fromValue(object.my_timestamp, true); else if (typeof object.my_timestamp === "string") - message.my_timestamp = parseInt(object.my_timestamp, 10); + message.my_timestamp = $parseInt(object.my_timestamp, 10); else if (typeof object.my_timestamp === "number") message.my_timestamp = object.my_timestamp; else if (typeof object.my_timestamp === "object") - message.my_timestamp = new $util.LongBits(object.my_timestamp.low >>> 0, object.my_timestamp.high >>> 0).toNumber(); + message.my_timestamp = new $util.LongBits(object.my_timestamp.low >>> 0, object.my_timestamp.high >>> 0).toNumber(true); if (object.protocol_version != null) message.protocol_version = object.protocol_version >>> 0; return message; @@ -15544,27 +19406,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamSockets_UDP_ChallengeRequest.toObject = function toObject(message, options) { + CMsgSteamSockets_UDP_ChallengeRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.connection_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.my_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.my_timestamp = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.my_timestamp = options.longs === String ? "0" : 0; + object.my_timestamp = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.protocol_version = 0; } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; - if (message.my_timestamp != null && message.hasOwnProperty("my_timestamp")) - if (typeof message.my_timestamp === "number") - object.my_timestamp = options.longs === String ? String(message.my_timestamp) : message.my_timestamp; + if (message.my_timestamp != null && $Object.hasOwnProperty.call(message, "my_timestamp")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.my_timestamp = typeof message.my_timestamp === "number" ? $BigInt(message.my_timestamp) : $util.Long.fromBits(message.my_timestamp.low >>> 0, message.my_timestamp.high >>> 0, true).toBigInt(); + else if (typeof message.my_timestamp === "number") + object.my_timestamp = options.longs === $String ? $String(message.my_timestamp) : message.my_timestamp; else - object.my_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.my_timestamp) : options.longs === Number ? new $util.LongBits(message.my_timestamp.low >>> 0, message.my_timestamp.high >>> 0).toNumber() : message.my_timestamp; - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + object.my_timestamp = options.longs === $String ? $util.Long.prototype.toString.call(message.my_timestamp) : options.longs === $Number ? new $util.LongBits(message.my_timestamp.low >>> 0, message.my_timestamp.high >>> 0).toNumber(true) : message.my_timestamp; + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) object.protocol_version = message.protocol_version; return object; }; @@ -15576,8 +19444,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamSockets_UDP_ChallengeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamSockets_UDP_ChallengeRequest.prototype.toJSON = function() { + return CMsgSteamSockets_UDP_ChallengeRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamSockets_UDP_ChallengeRequest + * @function getTypeUrl + * @memberof CMsgSteamSockets_UDP_ChallengeRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamSockets_UDP_ChallengeRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamSockets_UDP_ChallengeRequest"; }; return CMsgSteamSockets_UDP_ChallengeRequest; @@ -15587,28 +19469,41 @@ /** * Properties of a CMsgSteamSockets_UDP_ChallengeReply. - * @exports ICMsgSteamSockets_UDP_ChallengeReply - * @interface ICMsgSteamSockets_UDP_ChallengeReply + * @typedef {Object} CMsgSteamSockets_UDP_ChallengeReply.$Properties * @property {number|null} [connection_id] CMsgSteamSockets_UDP_ChallengeReply connection_id * @property {number|Long|null} [challenge] CMsgSteamSockets_UDP_ChallengeReply challenge * @property {number|Long|null} [your_timestamp] CMsgSteamSockets_UDP_ChallengeReply your_timestamp * @property {number|null} [protocol_version] CMsgSteamSockets_UDP_ChallengeReply protocol_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamSockets_UDP_ChallengeReply. + * @exports ICMsgSteamSockets_UDP_ChallengeReply + * @interface ICMsgSteamSockets_UDP_ChallengeReply + * @augments CMsgSteamSockets_UDP_ChallengeReply.$Properties + * @deprecated Use CMsgSteamSockets_UDP_ChallengeReply.$Properties instead. + */ + + /** + * Shape of a CMsgSteamSockets_UDP_ChallengeReply. + * @typedef {CMsgSteamSockets_UDP_ChallengeReply.$Properties} CMsgSteamSockets_UDP_ChallengeReply.$Shape */ /** * Constructs a new CMsgSteamSockets_UDP_ChallengeReply. * @exports CMsgSteamSockets_UDP_ChallengeReply * @classdesc Represents a CMsgSteamSockets_UDP_ChallengeReply. - * @implements ICMsgSteamSockets_UDP_ChallengeReply * @constructor - * @param {ICMsgSteamSockets_UDP_ChallengeReply=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_ChallengeReply.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamSockets_UDP_ChallengeReply(properties) { + var CMsgSteamSockets_UDP_ChallengeReply = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamSockets_UDP_ChallengeReply connection_id. @@ -15624,7 +19519,7 @@ * @memberof CMsgSteamSockets_UDP_ChallengeReply * @instance */ - CMsgSteamSockets_UDP_ChallengeReply.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamSockets_UDP_ChallengeReply.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamSockets_UDP_ChallengeReply your_timestamp. @@ -15632,7 +19527,7 @@ * @memberof CMsgSteamSockets_UDP_ChallengeReply * @instance */ - CMsgSteamSockets_UDP_ChallengeReply.prototype.your_timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamSockets_UDP_ChallengeReply.prototype.your_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamSockets_UDP_ChallengeReply protocol_version. @@ -15647,10 +19542,14 @@ * @function create * @memberof CMsgSteamSockets_UDP_ChallengeReply * @static - * @param {ICMsgSteamSockets_UDP_ChallengeReply=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_ChallengeReply.$Properties=} [properties] Properties to set * @returns {CMsgSteamSockets_UDP_ChallengeReply} CMsgSteamSockets_UDP_ChallengeReply instance + * @type {{ + * (properties: CMsgSteamSockets_UDP_ChallengeReply.$Shape): CMsgSteamSockets_UDP_ChallengeReply & CMsgSteamSockets_UDP_ChallengeReply.$Shape; + * (properties?: CMsgSteamSockets_UDP_ChallengeReply.$Properties): CMsgSteamSockets_UDP_ChallengeReply; + * }} */ - CMsgSteamSockets_UDP_ChallengeReply.create = function create(properties) { + CMsgSteamSockets_UDP_ChallengeReply.create = function(properties) { return new CMsgSteamSockets_UDP_ChallengeReply(properties); }; @@ -15659,21 +19558,28 @@ * @function encode * @memberof CMsgSteamSockets_UDP_ChallengeReply * @static - * @param {ICMsgSteamSockets_UDP_ChallengeReply} message CMsgSteamSockets_UDP_ChallengeReply message or plain object to encode + * @param {CMsgSteamSockets_UDP_ChallengeReply.$Properties} message CMsgSteamSockets_UDP_ChallengeReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_ChallengeReply.encode = function encode(message, writer) { + CMsgSteamSockets_UDP_ChallengeReply.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.connection_id); - if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.challenge); - if (message.your_timestamp != null && Object.hasOwnProperty.call(message, "your_timestamp")) + if (message.your_timestamp != null && $Object.hasOwnProperty.call(message, "your_timestamp")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.your_timestamp); - if (message.protocol_version != null && Object.hasOwnProperty.call(message, "protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.protocol_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15682,12 +19588,12 @@ * @function encodeDelimited * @memberof CMsgSteamSockets_UDP_ChallengeReply * @static - * @param {ICMsgSteamSockets_UDP_ChallengeReply} message CMsgSteamSockets_UDP_ChallengeReply message or plain object to encode + * @param {CMsgSteamSockets_UDP_ChallengeReply.$Properties} message CMsgSteamSockets_UDP_ChallengeReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_ChallengeReply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamSockets_UDP_ChallengeReply.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15697,34 +19603,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamSockets_UDP_ChallengeReply} CMsgSteamSockets_UDP_ChallengeReply + * @returns {CMsgSteamSockets_UDP_ChallengeReply & CMsgSteamSockets_UDP_ChallengeReply.$Shape} CMsgSteamSockets_UDP_ChallengeReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_ChallengeReply.decode = function decode(reader, length) { + CMsgSteamSockets_UDP_ChallengeReply.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamSockets_UDP_ChallengeReply(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamSockets_UDP_ChallengeReply(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.fixed32(); - break; - case 2: - message.challenge = reader.fixed64(); - break; - case 3: - message.your_timestamp = reader.fixed64(); - break; - case 4: - message.protocol_version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.connection_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.challenge = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.your_timestamp = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.protocol_version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15734,11 +19666,11 @@ * @memberof CMsgSteamSockets_UDP_ChallengeReply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamSockets_UDP_ChallengeReply} CMsgSteamSockets_UDP_ChallengeReply + * @returns {CMsgSteamSockets_UDP_ChallengeReply & CMsgSteamSockets_UDP_ChallengeReply.$Shape} CMsgSteamSockets_UDP_ChallengeReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_ChallengeReply.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamSockets_UDP_ChallengeReply.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15752,19 +19684,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamSockets_UDP_ChallengeReply.verify = function verify(message) { + CMsgSteamSockets_UDP_ChallengeReply.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) if (!$util.isInteger(message.connection_id)) return "connection_id: integer expected"; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) if (!$util.isInteger(message.challenge) && !(message.challenge && $util.isInteger(message.challenge.low) && $util.isInteger(message.challenge.high))) return "challenge: integer|Long expected"; - if (message.your_timestamp != null && message.hasOwnProperty("your_timestamp")) + if (message.your_timestamp != null && $Object.hasOwnProperty.call(message, "your_timestamp")) if (!$util.isInteger(message.your_timestamp) && !(message.your_timestamp && $util.isInteger(message.your_timestamp.low) && $util.isInteger(message.your_timestamp.high))) return "your_timestamp: integer|Long expected"; - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) if (!$util.isInteger(message.protocol_version)) return "protocol_version: integer expected"; return null; @@ -15778,30 +19714,36 @@ * @param {Object.} object Plain object * @returns {CMsgSteamSockets_UDP_ChallengeReply} CMsgSteamSockets_UDP_ChallengeReply */ - CMsgSteamSockets_UDP_ChallengeReply.fromObject = function fromObject(object) { + CMsgSteamSockets_UDP_ChallengeReply.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamSockets_UDP_ChallengeReply) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamSockets_UDP_ChallengeReply: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamSockets_UDP_ChallengeReply(); if (object.connection_id != null) message.connection_id = object.connection_id >>> 0; if (object.challenge != null) if ($util.Long) - (message.challenge = $util.Long.fromValue(object.challenge)).unsigned = false; + message.challenge = $util.Long.fromValue(object.challenge, true); else if (typeof object.challenge === "string") - message.challenge = parseInt(object.challenge, 10); + message.challenge = $parseInt(object.challenge, 10); else if (typeof object.challenge === "number") message.challenge = object.challenge; else if (typeof object.challenge === "object") - message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(); + message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(true); if (object.your_timestamp != null) if ($util.Long) - (message.your_timestamp = $util.Long.fromValue(object.your_timestamp)).unsigned = false; + message.your_timestamp = $util.Long.fromValue(object.your_timestamp, true); else if (typeof object.your_timestamp === "string") - message.your_timestamp = parseInt(object.your_timestamp, 10); + message.your_timestamp = $parseInt(object.your_timestamp, 10); else if (typeof object.your_timestamp === "number") message.your_timestamp = object.your_timestamp; else if (typeof object.your_timestamp === "object") - message.your_timestamp = new $util.LongBits(object.your_timestamp.low >>> 0, object.your_timestamp.high >>> 0).toNumber(); + message.your_timestamp = new $util.LongBits(object.your_timestamp.low >>> 0, object.your_timestamp.high >>> 0).toNumber(true); if (object.protocol_version != null) message.protocol_version = object.protocol_version >>> 0; return message; @@ -15816,37 +19758,45 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamSockets_UDP_ChallengeReply.toObject = function toObject(message, options) { + CMsgSteamSockets_UDP_ChallengeReply.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.connection_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.challenge = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.challenge = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.challenge = options.longs === String ? "0" : 0; + object.challenge = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.your_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.your_timestamp = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.your_timestamp = options.longs === String ? "0" : 0; + object.your_timestamp = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.protocol_version = 0; } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) + if (message.connection_id != null && $Object.hasOwnProperty.call(message, "connection_id")) object.connection_id = message.connection_id; - if (message.challenge != null && message.hasOwnProperty("challenge")) - if (typeof message.challenge === "number") - object.challenge = options.longs === String ? String(message.challenge) : message.challenge; + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.challenge = typeof message.challenge === "number" ? $BigInt(message.challenge) : $util.Long.fromBits(message.challenge.low >>> 0, message.challenge.high >>> 0, true).toBigInt(); + else if (typeof message.challenge === "number") + object.challenge = options.longs === $String ? $String(message.challenge) : message.challenge; else - object.challenge = options.longs === String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber() : message.challenge; - if (message.your_timestamp != null && message.hasOwnProperty("your_timestamp")) - if (typeof message.your_timestamp === "number") - object.your_timestamp = options.longs === String ? String(message.your_timestamp) : message.your_timestamp; + object.challenge = options.longs === $String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === $Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber(true) : message.challenge; + if (message.your_timestamp != null && $Object.hasOwnProperty.call(message, "your_timestamp")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.your_timestamp = typeof message.your_timestamp === "number" ? $BigInt(message.your_timestamp) : $util.Long.fromBits(message.your_timestamp.low >>> 0, message.your_timestamp.high >>> 0, true).toBigInt(); + else if (typeof message.your_timestamp === "number") + object.your_timestamp = options.longs === $String ? $String(message.your_timestamp) : message.your_timestamp; else - object.your_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.your_timestamp) : options.longs === Number ? new $util.LongBits(message.your_timestamp.low >>> 0, message.your_timestamp.high >>> 0).toNumber() : message.your_timestamp; - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + object.your_timestamp = options.longs === $String ? $util.Long.prototype.toString.call(message.your_timestamp) : options.longs === $Number ? new $util.LongBits(message.your_timestamp.low >>> 0, message.your_timestamp.high >>> 0).toNumber(true) : message.your_timestamp; + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) object.protocol_version = message.protocol_version; return object; }; @@ -15858,8 +19808,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamSockets_UDP_ChallengeReply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamSockets_UDP_ChallengeReply.prototype.toJSON = function() { + return CMsgSteamSockets_UDP_ChallengeReply.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamSockets_UDP_ChallengeReply + * @function getTypeUrl + * @memberof CMsgSteamSockets_UDP_ChallengeReply + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamSockets_UDP_ChallengeReply.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamSockets_UDP_ChallengeReply"; }; return CMsgSteamSockets_UDP_ChallengeReply; @@ -15869,32 +19833,45 @@ /** * Properties of a CMsgSteamSockets_UDP_ConnectRequest. - * @exports ICMsgSteamSockets_UDP_ConnectRequest - * @interface ICMsgSteamSockets_UDP_ConnectRequest + * @typedef {Object} CMsgSteamSockets_UDP_ConnectRequest.$Properties * @property {number|null} [client_connection_id] CMsgSteamSockets_UDP_ConnectRequest client_connection_id * @property {number|Long|null} [challenge] CMsgSteamSockets_UDP_ConnectRequest challenge * @property {number|Long|null} [client_steam_id] CMsgSteamSockets_UDP_ConnectRequest client_steam_id * @property {number|Long|null} [my_timestamp] CMsgSteamSockets_UDP_ConnectRequest my_timestamp * @property {number|null} [ping_est_ms] CMsgSteamSockets_UDP_ConnectRequest ping_est_ms - * @property {ICMsgSteamDatagramSessionCryptInfoSigned|null} [crypt] CMsgSteamSockets_UDP_ConnectRequest crypt - * @property {ICMsgSteamDatagramCertificateSigned|null} [cert] CMsgSteamSockets_UDP_ConnectRequest cert + * @property {CMsgSteamDatagramSessionCryptInfoSigned.$Properties|null} [crypt] CMsgSteamSockets_UDP_ConnectRequest crypt + * @property {CMsgSteamDatagramCertificateSigned.$Properties|null} [cert] CMsgSteamSockets_UDP_ConnectRequest cert * @property {number|null} [protocol_version] CMsgSteamSockets_UDP_ConnectRequest protocol_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamSockets_UDP_ConnectRequest. + * @exports ICMsgSteamSockets_UDP_ConnectRequest + * @interface ICMsgSteamSockets_UDP_ConnectRequest + * @augments CMsgSteamSockets_UDP_ConnectRequest.$Properties + * @deprecated Use CMsgSteamSockets_UDP_ConnectRequest.$Properties instead. + */ + + /** + * Shape of a CMsgSteamSockets_UDP_ConnectRequest. + * @typedef {CMsgSteamSockets_UDP_ConnectRequest.$Properties} CMsgSteamSockets_UDP_ConnectRequest.$Shape */ /** * Constructs a new CMsgSteamSockets_UDP_ConnectRequest. * @exports CMsgSteamSockets_UDP_ConnectRequest * @classdesc Represents a CMsgSteamSockets_UDP_ConnectRequest. - * @implements ICMsgSteamSockets_UDP_ConnectRequest * @constructor - * @param {ICMsgSteamSockets_UDP_ConnectRequest=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_ConnectRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamSockets_UDP_ConnectRequest(properties) { + var CMsgSteamSockets_UDP_ConnectRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamSockets_UDP_ConnectRequest client_connection_id. @@ -15910,7 +19887,7 @@ * @memberof CMsgSteamSockets_UDP_ConnectRequest * @instance */ - CMsgSteamSockets_UDP_ConnectRequest.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamSockets_UDP_ConnectRequest.prototype.challenge = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamSockets_UDP_ConnectRequest client_steam_id. @@ -15918,7 +19895,7 @@ * @memberof CMsgSteamSockets_UDP_ConnectRequest * @instance */ - CMsgSteamSockets_UDP_ConnectRequest.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamSockets_UDP_ConnectRequest.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamSockets_UDP_ConnectRequest my_timestamp. @@ -15926,7 +19903,7 @@ * @memberof CMsgSteamSockets_UDP_ConnectRequest * @instance */ - CMsgSteamSockets_UDP_ConnectRequest.prototype.my_timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamSockets_UDP_ConnectRequest.prototype.my_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamSockets_UDP_ConnectRequest ping_est_ms. @@ -15938,7 +19915,7 @@ /** * CMsgSteamSockets_UDP_ConnectRequest crypt. - * @member {ICMsgSteamDatagramSessionCryptInfoSigned|null|undefined} crypt + * @member {CMsgSteamDatagramSessionCryptInfoSigned.$Properties|null|undefined} crypt * @memberof CMsgSteamSockets_UDP_ConnectRequest * @instance */ @@ -15946,7 +19923,7 @@ /** * CMsgSteamSockets_UDP_ConnectRequest cert. - * @member {ICMsgSteamDatagramCertificateSigned|null|undefined} cert + * @member {CMsgSteamDatagramCertificateSigned.$Properties|null|undefined} cert * @memberof CMsgSteamSockets_UDP_ConnectRequest * @instance */ @@ -15965,10 +19942,14 @@ * @function create * @memberof CMsgSteamSockets_UDP_ConnectRequest * @static - * @param {ICMsgSteamSockets_UDP_ConnectRequest=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_ConnectRequest.$Properties=} [properties] Properties to set * @returns {CMsgSteamSockets_UDP_ConnectRequest} CMsgSteamSockets_UDP_ConnectRequest instance + * @type {{ + * (properties: CMsgSteamSockets_UDP_ConnectRequest.$Shape): CMsgSteamSockets_UDP_ConnectRequest & CMsgSteamSockets_UDP_ConnectRequest.$Shape; + * (properties?: CMsgSteamSockets_UDP_ConnectRequest.$Properties): CMsgSteamSockets_UDP_ConnectRequest; + * }} */ - CMsgSteamSockets_UDP_ConnectRequest.create = function create(properties) { + CMsgSteamSockets_UDP_ConnectRequest.create = function(properties) { return new CMsgSteamSockets_UDP_ConnectRequest(properties); }; @@ -15977,29 +19958,36 @@ * @function encode * @memberof CMsgSteamSockets_UDP_ConnectRequest * @static - * @param {ICMsgSteamSockets_UDP_ConnectRequest} message CMsgSteamSockets_UDP_ConnectRequest message or plain object to encode + * @param {CMsgSteamSockets_UDP_ConnectRequest.$Properties} message CMsgSteamSockets_UDP_ConnectRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_ConnectRequest.encode = function encode(message, writer) { + CMsgSteamSockets_UDP_ConnectRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.client_connection_id != null && Object.hasOwnProperty.call(message, "client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.client_connection_id); - if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.challenge); - if (message.client_steam_id != null && Object.hasOwnProperty.call(message, "client_steam_id")) + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.client_steam_id); - if (message.cert != null && Object.hasOwnProperty.call(message, "cert")) - $root.CMsgSteamDatagramCertificateSigned.encode(message.cert, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.my_timestamp != null && Object.hasOwnProperty.call(message, "my_timestamp")) + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + $root.CMsgSteamDatagramCertificateSigned.encode(message.cert, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.my_timestamp != null && $Object.hasOwnProperty.call(message, "my_timestamp")) writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.my_timestamp); - if (message.ping_est_ms != null && Object.hasOwnProperty.call(message, "ping_est_ms")) + if (message.ping_est_ms != null && $Object.hasOwnProperty.call(message, "ping_est_ms")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.ping_est_ms); - if (message.crypt != null && Object.hasOwnProperty.call(message, "crypt")) - $root.CMsgSteamDatagramSessionCryptInfoSigned.encode(message.crypt, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.protocol_version != null && Object.hasOwnProperty.call(message, "protocol_version")) + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) + $root.CMsgSteamDatagramSessionCryptInfoSigned.encode(message.crypt, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.protocol_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16008,12 +19996,12 @@ * @function encodeDelimited * @memberof CMsgSteamSockets_UDP_ConnectRequest * @static - * @param {ICMsgSteamSockets_UDP_ConnectRequest} message CMsgSteamSockets_UDP_ConnectRequest message or plain object to encode + * @param {CMsgSteamSockets_UDP_ConnectRequest.$Properties} message CMsgSteamSockets_UDP_ConnectRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_ConnectRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamSockets_UDP_ConnectRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16023,46 +20011,84 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamSockets_UDP_ConnectRequest} CMsgSteamSockets_UDP_ConnectRequest + * @returns {CMsgSteamSockets_UDP_ConnectRequest & CMsgSteamSockets_UDP_ConnectRequest.$Shape} CMsgSteamSockets_UDP_ConnectRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_ConnectRequest.decode = function decode(reader, length) { + CMsgSteamSockets_UDP_ConnectRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamSockets_UDP_ConnectRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamSockets_UDP_ConnectRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_connection_id = reader.fixed32(); - break; - case 2: - message.challenge = reader.fixed64(); - break; - case 3: - message.client_steam_id = reader.fixed64(); - break; - case 5: - message.my_timestamp = reader.fixed64(); - break; - case 6: - message.ping_est_ms = reader.uint32(); - break; - case 7: - message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.decode(reader, reader.uint32()); - break; - case 4: - message.cert = $root.CMsgSteamDatagramCertificateSigned.decode(reader, reader.uint32()); - break; - case 8: - message.protocol_version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.client_connection_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.challenge = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.client_steam_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 1) + break; + message.my_timestamp = reader.fixed64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.ping_est_ms = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.decode(reader, reader.uint32(), $undefined, _depth + 1, message.crypt); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.cert = $root.CMsgSteamDatagramCertificateSigned.decode(reader, reader.uint32(), $undefined, _depth + 1, message.cert); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.protocol_version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16072,11 +20098,11 @@ * @memberof CMsgSteamSockets_UDP_ConnectRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamSockets_UDP_ConnectRequest} CMsgSteamSockets_UDP_ConnectRequest + * @returns {CMsgSteamSockets_UDP_ConnectRequest & CMsgSteamSockets_UDP_ConnectRequest.$Shape} CMsgSteamSockets_UDP_ConnectRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_ConnectRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamSockets_UDP_ConnectRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16090,35 +20116,39 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamSockets_UDP_ConnectRequest.verify = function verify(message) { + CMsgSteamSockets_UDP_ConnectRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) if (!$util.isInteger(message.client_connection_id)) return "client_connection_id: integer expected"; - if (message.challenge != null && message.hasOwnProperty("challenge")) + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) if (!$util.isInteger(message.challenge) && !(message.challenge && $util.isInteger(message.challenge.low) && $util.isInteger(message.challenge.high))) return "challenge: integer|Long expected"; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) if (!$util.isInteger(message.client_steam_id) && !(message.client_steam_id && $util.isInteger(message.client_steam_id.low) && $util.isInteger(message.client_steam_id.high))) return "client_steam_id: integer|Long expected"; - if (message.my_timestamp != null && message.hasOwnProperty("my_timestamp")) + if (message.my_timestamp != null && $Object.hasOwnProperty.call(message, "my_timestamp")) if (!$util.isInteger(message.my_timestamp) && !(message.my_timestamp && $util.isInteger(message.my_timestamp.low) && $util.isInteger(message.my_timestamp.high))) return "my_timestamp: integer|Long expected"; - if (message.ping_est_ms != null && message.hasOwnProperty("ping_est_ms")) + if (message.ping_est_ms != null && $Object.hasOwnProperty.call(message, "ping_est_ms")) if (!$util.isInteger(message.ping_est_ms)) return "ping_est_ms: integer expected"; - if (message.crypt != null && message.hasOwnProperty("crypt")) { - var error = $root.CMsgSteamDatagramSessionCryptInfoSigned.verify(message.crypt); + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) { + var error = $root.CMsgSteamDatagramSessionCryptInfoSigned.verify(message.crypt, _depth + 1); if (error) return "crypt." + error; } - if (message.cert != null && message.hasOwnProperty("cert")) { - var error = $root.CMsgSteamDatagramCertificateSigned.verify(message.cert); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) { + var error = $root.CMsgSteamDatagramCertificateSigned.verify(message.cert, _depth + 1); if (error) return "cert." + error; } - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) if (!$util.isInteger(message.protocol_version)) return "protocol_version: integer expected"; return null; @@ -16132,50 +20162,56 @@ * @param {Object.} object Plain object * @returns {CMsgSteamSockets_UDP_ConnectRequest} CMsgSteamSockets_UDP_ConnectRequest */ - CMsgSteamSockets_UDP_ConnectRequest.fromObject = function fromObject(object) { + CMsgSteamSockets_UDP_ConnectRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamSockets_UDP_ConnectRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamSockets_UDP_ConnectRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamSockets_UDP_ConnectRequest(); if (object.client_connection_id != null) message.client_connection_id = object.client_connection_id >>> 0; if (object.challenge != null) if ($util.Long) - (message.challenge = $util.Long.fromValue(object.challenge)).unsigned = false; + message.challenge = $util.Long.fromValue(object.challenge, true); else if (typeof object.challenge === "string") - message.challenge = parseInt(object.challenge, 10); + message.challenge = $parseInt(object.challenge, 10); else if (typeof object.challenge === "number") message.challenge = object.challenge; else if (typeof object.challenge === "object") - message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(); + message.challenge = new $util.LongBits(object.challenge.low >>> 0, object.challenge.high >>> 0).toNumber(true); if (object.client_steam_id != null) if ($util.Long) - (message.client_steam_id = $util.Long.fromValue(object.client_steam_id)).unsigned = false; + message.client_steam_id = $util.Long.fromValue(object.client_steam_id, true); else if (typeof object.client_steam_id === "string") - message.client_steam_id = parseInt(object.client_steam_id, 10); + message.client_steam_id = $parseInt(object.client_steam_id, 10); else if (typeof object.client_steam_id === "number") message.client_steam_id = object.client_steam_id; else if (typeof object.client_steam_id === "object") - message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(); + message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(true); if (object.my_timestamp != null) if ($util.Long) - (message.my_timestamp = $util.Long.fromValue(object.my_timestamp)).unsigned = false; + message.my_timestamp = $util.Long.fromValue(object.my_timestamp, true); else if (typeof object.my_timestamp === "string") - message.my_timestamp = parseInt(object.my_timestamp, 10); + message.my_timestamp = $parseInt(object.my_timestamp, 10); else if (typeof object.my_timestamp === "number") message.my_timestamp = object.my_timestamp; else if (typeof object.my_timestamp === "object") - message.my_timestamp = new $util.LongBits(object.my_timestamp.low >>> 0, object.my_timestamp.high >>> 0).toNumber(); + message.my_timestamp = new $util.LongBits(object.my_timestamp.low >>> 0, object.my_timestamp.high >>> 0).toNumber(true); if (object.ping_est_ms != null) message.ping_est_ms = object.ping_est_ms >>> 0; if (object.crypt != null) { - if (typeof object.crypt !== "object") - throw TypeError(".CMsgSteamSockets_UDP_ConnectRequest.crypt: object expected"); - message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.fromObject(object.crypt); + if (!$util.isObject(object.crypt)) + throw $TypeError(".CMsgSteamSockets_UDP_ConnectRequest.crypt: object expected"); + message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.fromObject(object.crypt, _depth + 1); } if (object.cert != null) { - if (typeof object.cert !== "object") - throw TypeError(".CMsgSteamSockets_UDP_ConnectRequest.cert: object expected"); - message.cert = $root.CMsgSteamDatagramCertificateSigned.fromObject(object.cert); + if (!$util.isObject(object.cert)) + throw $TypeError(".CMsgSteamSockets_UDP_ConnectRequest.cert: object expected"); + message.cert = $root.CMsgSteamDatagramCertificateSigned.fromObject(object.cert, _depth + 1); } if (object.protocol_version != null) message.protocol_version = object.protocol_version >>> 0; @@ -16191,56 +20227,66 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamSockets_UDP_ConnectRequest.toObject = function toObject(message, options) { + CMsgSteamSockets_UDP_ConnectRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.client_connection_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.challenge = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.challenge = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.challenge = options.longs === String ? "0" : 0; + object.challenge = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.client_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.client_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.client_steam_id = options.longs === String ? "0" : 0; + object.client_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.cert = null; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.my_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.my_timestamp = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.my_timestamp = options.longs === String ? "0" : 0; + object.my_timestamp = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.ping_est_ms = 0; object.crypt = null; object.protocol_version = 0; } - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) object.client_connection_id = message.client_connection_id; - if (message.challenge != null && message.hasOwnProperty("challenge")) - if (typeof message.challenge === "number") - object.challenge = options.longs === String ? String(message.challenge) : message.challenge; + if (message.challenge != null && $Object.hasOwnProperty.call(message, "challenge")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.challenge = typeof message.challenge === "number" ? $BigInt(message.challenge) : $util.Long.fromBits(message.challenge.low >>> 0, message.challenge.high >>> 0, true).toBigInt(); + else if (typeof message.challenge === "number") + object.challenge = options.longs === $String ? $String(message.challenge) : message.challenge; else - object.challenge = options.longs === String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber() : message.challenge; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) - if (typeof message.client_steam_id === "number") - object.client_steam_id = options.longs === String ? String(message.client_steam_id) : message.client_steam_id; + object.challenge = options.longs === $String ? $util.Long.prototype.toString.call(message.challenge) : options.longs === $Number ? new $util.LongBits(message.challenge.low >>> 0, message.challenge.high >>> 0).toNumber(true) : message.challenge; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.client_steam_id = typeof message.client_steam_id === "number" ? $BigInt(message.client_steam_id) : $util.Long.fromBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.client_steam_id === "number") + object.client_steam_id = options.longs === $String ? $String(message.client_steam_id) : message.client_steam_id; else - object.client_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber() : message.client_steam_id; - if (message.cert != null && message.hasOwnProperty("cert")) - object.cert = $root.CMsgSteamDatagramCertificateSigned.toObject(message.cert, options); - if (message.my_timestamp != null && message.hasOwnProperty("my_timestamp")) - if (typeof message.my_timestamp === "number") - object.my_timestamp = options.longs === String ? String(message.my_timestamp) : message.my_timestamp; + object.client_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === $Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber(true) : message.client_steam_id; + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + object.cert = $root.CMsgSteamDatagramCertificateSigned.toObject(message.cert, options, _depth + 1); + if (message.my_timestamp != null && $Object.hasOwnProperty.call(message, "my_timestamp")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.my_timestamp = typeof message.my_timestamp === "number" ? $BigInt(message.my_timestamp) : $util.Long.fromBits(message.my_timestamp.low >>> 0, message.my_timestamp.high >>> 0, true).toBigInt(); + else if (typeof message.my_timestamp === "number") + object.my_timestamp = options.longs === $String ? $String(message.my_timestamp) : message.my_timestamp; else - object.my_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.my_timestamp) : options.longs === Number ? new $util.LongBits(message.my_timestamp.low >>> 0, message.my_timestamp.high >>> 0).toNumber() : message.my_timestamp; - if (message.ping_est_ms != null && message.hasOwnProperty("ping_est_ms")) + object.my_timestamp = options.longs === $String ? $util.Long.prototype.toString.call(message.my_timestamp) : options.longs === $Number ? new $util.LongBits(message.my_timestamp.low >>> 0, message.my_timestamp.high >>> 0).toNumber(true) : message.my_timestamp; + if (message.ping_est_ms != null && $Object.hasOwnProperty.call(message, "ping_est_ms")) object.ping_est_ms = message.ping_est_ms; - if (message.crypt != null && message.hasOwnProperty("crypt")) - object.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.toObject(message.crypt, options); - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) + object.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.toObject(message.crypt, options, _depth + 1); + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) object.protocol_version = message.protocol_version; return object; }; @@ -16252,8 +20298,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamSockets_UDP_ConnectRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamSockets_UDP_ConnectRequest.prototype.toJSON = function() { + return CMsgSteamSockets_UDP_ConnectRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamSockets_UDP_ConnectRequest + * @function getTypeUrl + * @memberof CMsgSteamSockets_UDP_ConnectRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamSockets_UDP_ConnectRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamSockets_UDP_ConnectRequest"; }; return CMsgSteamSockets_UDP_ConnectRequest; @@ -16263,32 +20323,45 @@ /** * Properties of a CMsgSteamSockets_UDP_ConnectOK. - * @exports ICMsgSteamSockets_UDP_ConnectOK - * @interface ICMsgSteamSockets_UDP_ConnectOK + * @typedef {Object} CMsgSteamSockets_UDP_ConnectOK.$Properties * @property {number|null} [client_connection_id] CMsgSteamSockets_UDP_ConnectOK client_connection_id * @property {number|null} [server_connection_id] CMsgSteamSockets_UDP_ConnectOK server_connection_id * @property {number|Long|null} [server_steam_id] CMsgSteamSockets_UDP_ConnectOK server_steam_id * @property {number|Long|null} [your_timestamp] CMsgSteamSockets_UDP_ConnectOK your_timestamp * @property {number|null} [delay_time_usec] CMsgSteamSockets_UDP_ConnectOK delay_time_usec - * @property {ICMsgSteamDatagramSessionCryptInfoSigned|null} [crypt] CMsgSteamSockets_UDP_ConnectOK crypt - * @property {ICMsgSteamDatagramCertificateSigned|null} [cert] CMsgSteamSockets_UDP_ConnectOK cert + * @property {CMsgSteamDatagramSessionCryptInfoSigned.$Properties|null} [crypt] CMsgSteamSockets_UDP_ConnectOK crypt + * @property {CMsgSteamDatagramCertificateSigned.$Properties|null} [cert] CMsgSteamSockets_UDP_ConnectOK cert * @property {number|null} [protocol_version] CMsgSteamSockets_UDP_ConnectOK protocol_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamSockets_UDP_ConnectOK. + * @exports ICMsgSteamSockets_UDP_ConnectOK + * @interface ICMsgSteamSockets_UDP_ConnectOK + * @augments CMsgSteamSockets_UDP_ConnectOK.$Properties + * @deprecated Use CMsgSteamSockets_UDP_ConnectOK.$Properties instead. + */ + + /** + * Shape of a CMsgSteamSockets_UDP_ConnectOK. + * @typedef {CMsgSteamSockets_UDP_ConnectOK.$Properties} CMsgSteamSockets_UDP_ConnectOK.$Shape */ /** * Constructs a new CMsgSteamSockets_UDP_ConnectOK. * @exports CMsgSteamSockets_UDP_ConnectOK * @classdesc Represents a CMsgSteamSockets_UDP_ConnectOK. - * @implements ICMsgSteamSockets_UDP_ConnectOK * @constructor - * @param {ICMsgSteamSockets_UDP_ConnectOK=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_ConnectOK.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamSockets_UDP_ConnectOK(properties) { + var CMsgSteamSockets_UDP_ConnectOK = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamSockets_UDP_ConnectOK client_connection_id. @@ -16312,7 +20385,7 @@ * @memberof CMsgSteamSockets_UDP_ConnectOK * @instance */ - CMsgSteamSockets_UDP_ConnectOK.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamSockets_UDP_ConnectOK.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamSockets_UDP_ConnectOK your_timestamp. @@ -16320,7 +20393,7 @@ * @memberof CMsgSteamSockets_UDP_ConnectOK * @instance */ - CMsgSteamSockets_UDP_ConnectOK.prototype.your_timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamSockets_UDP_ConnectOK.prototype.your_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamSockets_UDP_ConnectOK delay_time_usec. @@ -16332,7 +20405,7 @@ /** * CMsgSteamSockets_UDP_ConnectOK crypt. - * @member {ICMsgSteamDatagramSessionCryptInfoSigned|null|undefined} crypt + * @member {CMsgSteamDatagramSessionCryptInfoSigned.$Properties|null|undefined} crypt * @memberof CMsgSteamSockets_UDP_ConnectOK * @instance */ @@ -16340,7 +20413,7 @@ /** * CMsgSteamSockets_UDP_ConnectOK cert. - * @member {ICMsgSteamDatagramCertificateSigned|null|undefined} cert + * @member {CMsgSteamDatagramCertificateSigned.$Properties|null|undefined} cert * @memberof CMsgSteamSockets_UDP_ConnectOK * @instance */ @@ -16359,10 +20432,14 @@ * @function create * @memberof CMsgSteamSockets_UDP_ConnectOK * @static - * @param {ICMsgSteamSockets_UDP_ConnectOK=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_ConnectOK.$Properties=} [properties] Properties to set * @returns {CMsgSteamSockets_UDP_ConnectOK} CMsgSteamSockets_UDP_ConnectOK instance + * @type {{ + * (properties: CMsgSteamSockets_UDP_ConnectOK.$Shape): CMsgSteamSockets_UDP_ConnectOK & CMsgSteamSockets_UDP_ConnectOK.$Shape; + * (properties?: CMsgSteamSockets_UDP_ConnectOK.$Properties): CMsgSteamSockets_UDP_ConnectOK; + * }} */ - CMsgSteamSockets_UDP_ConnectOK.create = function create(properties) { + CMsgSteamSockets_UDP_ConnectOK.create = function(properties) { return new CMsgSteamSockets_UDP_ConnectOK(properties); }; @@ -16371,29 +20448,36 @@ * @function encode * @memberof CMsgSteamSockets_UDP_ConnectOK * @static - * @param {ICMsgSteamSockets_UDP_ConnectOK} message CMsgSteamSockets_UDP_ConnectOK message or plain object to encode + * @param {CMsgSteamSockets_UDP_ConnectOK.$Properties} message CMsgSteamSockets_UDP_ConnectOK message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_ConnectOK.encode = function encode(message, writer) { + CMsgSteamSockets_UDP_ConnectOK.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.client_connection_id != null && Object.hasOwnProperty.call(message, "client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.client_connection_id); - if (message.server_steam_id != null && Object.hasOwnProperty.call(message, "server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.server_steam_id); - if (message.your_timestamp != null && Object.hasOwnProperty.call(message, "your_timestamp")) + if (message.your_timestamp != null && $Object.hasOwnProperty.call(message, "your_timestamp")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.your_timestamp); - if (message.delay_time_usec != null && Object.hasOwnProperty.call(message, "delay_time_usec")) + if (message.delay_time_usec != null && $Object.hasOwnProperty.call(message, "delay_time_usec")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.delay_time_usec); - if (message.server_connection_id != null && Object.hasOwnProperty.call(message, "server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) writer.uint32(/* id 5, wireType 5 =*/45).fixed32(message.server_connection_id); - if (message.crypt != null && Object.hasOwnProperty.call(message, "crypt")) - $root.CMsgSteamDatagramSessionCryptInfoSigned.encode(message.crypt, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.cert != null && Object.hasOwnProperty.call(message, "cert")) - $root.CMsgSteamDatagramCertificateSigned.encode(message.cert, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.protocol_version != null && Object.hasOwnProperty.call(message, "protocol_version")) + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) + $root.CMsgSteamDatagramSessionCryptInfoSigned.encode(message.crypt, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + $root.CMsgSteamDatagramCertificateSigned.encode(message.cert, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.protocol_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16402,12 +20486,12 @@ * @function encodeDelimited * @memberof CMsgSteamSockets_UDP_ConnectOK * @static - * @param {ICMsgSteamSockets_UDP_ConnectOK} message CMsgSteamSockets_UDP_ConnectOK message or plain object to encode + * @param {CMsgSteamSockets_UDP_ConnectOK.$Properties} message CMsgSteamSockets_UDP_ConnectOK message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_ConnectOK.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamSockets_UDP_ConnectOK.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16417,46 +20501,84 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamSockets_UDP_ConnectOK} CMsgSteamSockets_UDP_ConnectOK + * @returns {CMsgSteamSockets_UDP_ConnectOK & CMsgSteamSockets_UDP_ConnectOK.$Shape} CMsgSteamSockets_UDP_ConnectOK * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_ConnectOK.decode = function decode(reader, length) { + CMsgSteamSockets_UDP_ConnectOK.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamSockets_UDP_ConnectOK(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamSockets_UDP_ConnectOK(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_connection_id = reader.fixed32(); - break; - case 5: - message.server_connection_id = reader.fixed32(); - break; - case 2: - message.server_steam_id = reader.fixed64(); - break; - case 3: - message.your_timestamp = reader.fixed64(); - break; - case 4: - message.delay_time_usec = reader.uint32(); - break; - case 7: - message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.decode(reader, reader.uint32()); - break; - case 8: - message.cert = $root.CMsgSteamDatagramCertificateSigned.decode(reader, reader.uint32()); - break; - case 9: - message.protocol_version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.client_connection_id = reader.fixed32(); + continue; + } + case 5: { + if (wireType !== 5) + break; + message.server_connection_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.server_steam_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.your_timestamp = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.delay_time_usec = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.decode(reader, reader.uint32(), $undefined, _depth + 1, message.crypt); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.cert = $root.CMsgSteamDatagramCertificateSigned.decode(reader, reader.uint32(), $undefined, _depth + 1, message.cert); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.protocol_version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16466,11 +20588,11 @@ * @memberof CMsgSteamSockets_UDP_ConnectOK * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamSockets_UDP_ConnectOK} CMsgSteamSockets_UDP_ConnectOK + * @returns {CMsgSteamSockets_UDP_ConnectOK & CMsgSteamSockets_UDP_ConnectOK.$Shape} CMsgSteamSockets_UDP_ConnectOK * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_ConnectOK.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamSockets_UDP_ConnectOK.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16484,35 +20606,39 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamSockets_UDP_ConnectOK.verify = function verify(message) { + CMsgSteamSockets_UDP_ConnectOK.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) if (!$util.isInteger(message.client_connection_id)) return "client_connection_id: integer expected"; - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) if (!$util.isInteger(message.server_connection_id)) return "server_connection_id: integer expected"; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) if (!$util.isInteger(message.server_steam_id) && !(message.server_steam_id && $util.isInteger(message.server_steam_id.low) && $util.isInteger(message.server_steam_id.high))) return "server_steam_id: integer|Long expected"; - if (message.your_timestamp != null && message.hasOwnProperty("your_timestamp")) + if (message.your_timestamp != null && $Object.hasOwnProperty.call(message, "your_timestamp")) if (!$util.isInteger(message.your_timestamp) && !(message.your_timestamp && $util.isInteger(message.your_timestamp.low) && $util.isInteger(message.your_timestamp.high))) return "your_timestamp: integer|Long expected"; - if (message.delay_time_usec != null && message.hasOwnProperty("delay_time_usec")) + if (message.delay_time_usec != null && $Object.hasOwnProperty.call(message, "delay_time_usec")) if (!$util.isInteger(message.delay_time_usec)) return "delay_time_usec: integer expected"; - if (message.crypt != null && message.hasOwnProperty("crypt")) { - var error = $root.CMsgSteamDatagramSessionCryptInfoSigned.verify(message.crypt); + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) { + var error = $root.CMsgSteamDatagramSessionCryptInfoSigned.verify(message.crypt, _depth + 1); if (error) return "crypt." + error; } - if (message.cert != null && message.hasOwnProperty("cert")) { - var error = $root.CMsgSteamDatagramCertificateSigned.verify(message.cert); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) { + var error = $root.CMsgSteamDatagramCertificateSigned.verify(message.cert, _depth + 1); if (error) return "cert." + error; } - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) if (!$util.isInteger(message.protocol_version)) return "protocol_version: integer expected"; return null; @@ -16526,9 +20652,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamSockets_UDP_ConnectOK} CMsgSteamSockets_UDP_ConnectOK */ - CMsgSteamSockets_UDP_ConnectOK.fromObject = function fromObject(object) { + CMsgSteamSockets_UDP_ConnectOK.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamSockets_UDP_ConnectOK) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamSockets_UDP_ConnectOK: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamSockets_UDP_ConnectOK(); if (object.client_connection_id != null) message.client_connection_id = object.client_connection_id >>> 0; @@ -16536,33 +20668,33 @@ message.server_connection_id = object.server_connection_id >>> 0; if (object.server_steam_id != null) if ($util.Long) - (message.server_steam_id = $util.Long.fromValue(object.server_steam_id)).unsigned = false; + message.server_steam_id = $util.Long.fromValue(object.server_steam_id, true); else if (typeof object.server_steam_id === "string") - message.server_steam_id = parseInt(object.server_steam_id, 10); + message.server_steam_id = $parseInt(object.server_steam_id, 10); else if (typeof object.server_steam_id === "number") message.server_steam_id = object.server_steam_id; else if (typeof object.server_steam_id === "object") - message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(); + message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(true); if (object.your_timestamp != null) if ($util.Long) - (message.your_timestamp = $util.Long.fromValue(object.your_timestamp)).unsigned = false; + message.your_timestamp = $util.Long.fromValue(object.your_timestamp, true); else if (typeof object.your_timestamp === "string") - message.your_timestamp = parseInt(object.your_timestamp, 10); + message.your_timestamp = $parseInt(object.your_timestamp, 10); else if (typeof object.your_timestamp === "number") message.your_timestamp = object.your_timestamp; else if (typeof object.your_timestamp === "object") - message.your_timestamp = new $util.LongBits(object.your_timestamp.low >>> 0, object.your_timestamp.high >>> 0).toNumber(); + message.your_timestamp = new $util.LongBits(object.your_timestamp.low >>> 0, object.your_timestamp.high >>> 0).toNumber(true); if (object.delay_time_usec != null) message.delay_time_usec = object.delay_time_usec >>> 0; if (object.crypt != null) { - if (typeof object.crypt !== "object") - throw TypeError(".CMsgSteamSockets_UDP_ConnectOK.crypt: object expected"); - message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.fromObject(object.crypt); + if (!$util.isObject(object.crypt)) + throw $TypeError(".CMsgSteamSockets_UDP_ConnectOK.crypt: object expected"); + message.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.fromObject(object.crypt, _depth + 1); } if (object.cert != null) { - if (typeof object.cert !== "object") - throw TypeError(".CMsgSteamSockets_UDP_ConnectOK.cert: object expected"); - message.cert = $root.CMsgSteamDatagramCertificateSigned.fromObject(object.cert); + if (!$util.isObject(object.cert)) + throw $TypeError(".CMsgSteamSockets_UDP_ConnectOK.cert: object expected"); + message.cert = $root.CMsgSteamDatagramCertificateSigned.fromObject(object.cert, _depth + 1); } if (object.protocol_version != null) message.protocol_version = object.protocol_version >>> 0; @@ -16578,49 +20710,57 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamSockets_UDP_ConnectOK.toObject = function toObject(message, options) { + CMsgSteamSockets_UDP_ConnectOK.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.client_connection_id = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.server_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.server_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.server_steam_id = options.longs === String ? "0" : 0; + object.server_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.your_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.your_timestamp = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.your_timestamp = options.longs === String ? "0" : 0; + object.your_timestamp = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.delay_time_usec = 0; object.server_connection_id = 0; object.crypt = null; object.cert = null; object.protocol_version = 0; } - if (message.client_connection_id != null && message.hasOwnProperty("client_connection_id")) + if (message.client_connection_id != null && $Object.hasOwnProperty.call(message, "client_connection_id")) object.client_connection_id = message.client_connection_id; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) - if (typeof message.server_steam_id === "number") - object.server_steam_id = options.longs === String ? String(message.server_steam_id) : message.server_steam_id; + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.server_steam_id = typeof message.server_steam_id === "number" ? $BigInt(message.server_steam_id) : $util.Long.fromBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.server_steam_id === "number") + object.server_steam_id = options.longs === $String ? $String(message.server_steam_id) : message.server_steam_id; else - object.server_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber() : message.server_steam_id; - if (message.your_timestamp != null && message.hasOwnProperty("your_timestamp")) - if (typeof message.your_timestamp === "number") - object.your_timestamp = options.longs === String ? String(message.your_timestamp) : message.your_timestamp; + object.server_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === $Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber(true) : message.server_steam_id; + if (message.your_timestamp != null && $Object.hasOwnProperty.call(message, "your_timestamp")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.your_timestamp = typeof message.your_timestamp === "number" ? $BigInt(message.your_timestamp) : $util.Long.fromBits(message.your_timestamp.low >>> 0, message.your_timestamp.high >>> 0, true).toBigInt(); + else if (typeof message.your_timestamp === "number") + object.your_timestamp = options.longs === $String ? $String(message.your_timestamp) : message.your_timestamp; else - object.your_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.your_timestamp) : options.longs === Number ? new $util.LongBits(message.your_timestamp.low >>> 0, message.your_timestamp.high >>> 0).toNumber() : message.your_timestamp; - if (message.delay_time_usec != null && message.hasOwnProperty("delay_time_usec")) + object.your_timestamp = options.longs === $String ? $util.Long.prototype.toString.call(message.your_timestamp) : options.longs === $Number ? new $util.LongBits(message.your_timestamp.low >>> 0, message.your_timestamp.high >>> 0).toNumber(true) : message.your_timestamp; + if (message.delay_time_usec != null && $Object.hasOwnProperty.call(message, "delay_time_usec")) object.delay_time_usec = message.delay_time_usec; - if (message.server_connection_id != null && message.hasOwnProperty("server_connection_id")) + if (message.server_connection_id != null && $Object.hasOwnProperty.call(message, "server_connection_id")) object.server_connection_id = message.server_connection_id; - if (message.crypt != null && message.hasOwnProperty("crypt")) - object.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.toObject(message.crypt, options); - if (message.cert != null && message.hasOwnProperty("cert")) - object.cert = $root.CMsgSteamDatagramCertificateSigned.toObject(message.cert, options); - if (message.protocol_version != null && message.hasOwnProperty("protocol_version")) + if (message.crypt != null && $Object.hasOwnProperty.call(message, "crypt")) + object.crypt = $root.CMsgSteamDatagramSessionCryptInfoSigned.toObject(message.crypt, options, _depth + 1); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + object.cert = $root.CMsgSteamDatagramCertificateSigned.toObject(message.cert, options, _depth + 1); + if (message.protocol_version != null && $Object.hasOwnProperty.call(message, "protocol_version")) object.protocol_version = message.protocol_version; return object; }; @@ -16632,8 +20772,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamSockets_UDP_ConnectOK.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamSockets_UDP_ConnectOK.prototype.toJSON = function() { + return CMsgSteamSockets_UDP_ConnectOK.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamSockets_UDP_ConnectOK + * @function getTypeUrl + * @memberof CMsgSteamSockets_UDP_ConnectOK + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamSockets_UDP_ConnectOK.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamSockets_UDP_ConnectOK"; }; return CMsgSteamSockets_UDP_ConnectOK; @@ -16643,29 +20797,42 @@ /** * Properties of a CMsgSteamSockets_UDP_ConnectionClosed. - * @exports ICMsgSteamSockets_UDP_ConnectionClosed - * @interface ICMsgSteamSockets_UDP_ConnectionClosed + * @typedef {Object} CMsgSteamSockets_UDP_ConnectionClosed.$Properties * @property {number|null} [legacy_client_connection_id] CMsgSteamSockets_UDP_ConnectionClosed legacy_client_connection_id * @property {number|null} [to_connection_id] CMsgSteamSockets_UDP_ConnectionClosed to_connection_id * @property {number|null} [from_connection_id] CMsgSteamSockets_UDP_ConnectionClosed from_connection_id * @property {string|null} [debug] CMsgSteamSockets_UDP_ConnectionClosed debug * @property {number|null} [reason_code] CMsgSteamSockets_UDP_ConnectionClosed reason_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamSockets_UDP_ConnectionClosed. + * @exports ICMsgSteamSockets_UDP_ConnectionClosed + * @interface ICMsgSteamSockets_UDP_ConnectionClosed + * @augments CMsgSteamSockets_UDP_ConnectionClosed.$Properties + * @deprecated Use CMsgSteamSockets_UDP_ConnectionClosed.$Properties instead. + */ + + /** + * Shape of a CMsgSteamSockets_UDP_ConnectionClosed. + * @typedef {CMsgSteamSockets_UDP_ConnectionClosed.$Properties} CMsgSteamSockets_UDP_ConnectionClosed.$Shape */ /** * Constructs a new CMsgSteamSockets_UDP_ConnectionClosed. * @exports CMsgSteamSockets_UDP_ConnectionClosed * @classdesc Represents a CMsgSteamSockets_UDP_ConnectionClosed. - * @implements ICMsgSteamSockets_UDP_ConnectionClosed * @constructor - * @param {ICMsgSteamSockets_UDP_ConnectionClosed=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_ConnectionClosed.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamSockets_UDP_ConnectionClosed(properties) { + var CMsgSteamSockets_UDP_ConnectionClosed = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamSockets_UDP_ConnectionClosed legacy_client_connection_id. @@ -16712,10 +20879,14 @@ * @function create * @memberof CMsgSteamSockets_UDP_ConnectionClosed * @static - * @param {ICMsgSteamSockets_UDP_ConnectionClosed=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_ConnectionClosed.$Properties=} [properties] Properties to set * @returns {CMsgSteamSockets_UDP_ConnectionClosed} CMsgSteamSockets_UDP_ConnectionClosed instance + * @type {{ + * (properties: CMsgSteamSockets_UDP_ConnectionClosed.$Shape): CMsgSteamSockets_UDP_ConnectionClosed & CMsgSteamSockets_UDP_ConnectionClosed.$Shape; + * (properties?: CMsgSteamSockets_UDP_ConnectionClosed.$Properties): CMsgSteamSockets_UDP_ConnectionClosed; + * }} */ - CMsgSteamSockets_UDP_ConnectionClosed.create = function create(properties) { + CMsgSteamSockets_UDP_ConnectionClosed.create = function(properties) { return new CMsgSteamSockets_UDP_ConnectionClosed(properties); }; @@ -16724,23 +20895,30 @@ * @function encode * @memberof CMsgSteamSockets_UDP_ConnectionClosed * @static - * @param {ICMsgSteamSockets_UDP_ConnectionClosed} message CMsgSteamSockets_UDP_ConnectionClosed message or plain object to encode + * @param {CMsgSteamSockets_UDP_ConnectionClosed.$Properties} message CMsgSteamSockets_UDP_ConnectionClosed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_ConnectionClosed.encode = function encode(message, writer) { + CMsgSteamSockets_UDP_ConnectionClosed.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.legacy_client_connection_id != null && Object.hasOwnProperty.call(message, "legacy_client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.legacy_client_connection_id); - if (message.debug != null && Object.hasOwnProperty.call(message, "debug")) + if (message.debug != null && $Object.hasOwnProperty.call(message, "debug")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.debug); - if (message.reason_code != null && Object.hasOwnProperty.call(message, "reason_code")) + if (message.reason_code != null && $Object.hasOwnProperty.call(message, "reason_code")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.reason_code); - if (message.to_connection_id != null && Object.hasOwnProperty.call(message, "to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.to_connection_id); - if (message.from_connection_id != null && Object.hasOwnProperty.call(message, "from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) writer.uint32(/* id 5, wireType 5 =*/45).fixed32(message.from_connection_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16749,12 +20927,12 @@ * @function encodeDelimited * @memberof CMsgSteamSockets_UDP_ConnectionClosed * @static - * @param {ICMsgSteamSockets_UDP_ConnectionClosed} message CMsgSteamSockets_UDP_ConnectionClosed message or plain object to encode + * @param {CMsgSteamSockets_UDP_ConnectionClosed.$Properties} message CMsgSteamSockets_UDP_ConnectionClosed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_ConnectionClosed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamSockets_UDP_ConnectionClosed.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16764,37 +20942,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamSockets_UDP_ConnectionClosed} CMsgSteamSockets_UDP_ConnectionClosed + * @returns {CMsgSteamSockets_UDP_ConnectionClosed & CMsgSteamSockets_UDP_ConnectionClosed.$Shape} CMsgSteamSockets_UDP_ConnectionClosed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_ConnectionClosed.decode = function decode(reader, length) { + CMsgSteamSockets_UDP_ConnectionClosed.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamSockets_UDP_ConnectionClosed(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamSockets_UDP_ConnectionClosed(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.legacy_client_connection_id = reader.fixed32(); - break; - case 4: - message.to_connection_id = reader.fixed32(); - break; - case 5: - message.from_connection_id = reader.fixed32(); - break; - case 2: - message.debug = reader.string(); - break; - case 3: - message.reason_code = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.legacy_client_connection_id = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.to_connection_id = reader.fixed32(); + continue; + } + case 5: { + if (wireType !== 5) + break; + message.from_connection_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.debug = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.reason_code = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16804,11 +21011,11 @@ * @memberof CMsgSteamSockets_UDP_ConnectionClosed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamSockets_UDP_ConnectionClosed} CMsgSteamSockets_UDP_ConnectionClosed + * @returns {CMsgSteamSockets_UDP_ConnectionClosed & CMsgSteamSockets_UDP_ConnectionClosed.$Shape} CMsgSteamSockets_UDP_ConnectionClosed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_ConnectionClosed.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamSockets_UDP_ConnectionClosed.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16822,22 +21029,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamSockets_UDP_ConnectionClosed.verify = function verify(message) { + CMsgSteamSockets_UDP_ConnectionClosed.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.legacy_client_connection_id != null && message.hasOwnProperty("legacy_client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) if (!$util.isInteger(message.legacy_client_connection_id)) return "legacy_client_connection_id: integer expected"; - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) if (!$util.isInteger(message.to_connection_id)) return "to_connection_id: integer expected"; - if (message.from_connection_id != null && message.hasOwnProperty("from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) if (!$util.isInteger(message.from_connection_id)) return "from_connection_id: integer expected"; - if (message.debug != null && message.hasOwnProperty("debug")) + if (message.debug != null && $Object.hasOwnProperty.call(message, "debug")) if (!$util.isString(message.debug)) return "debug: string expected"; - if (message.reason_code != null && message.hasOwnProperty("reason_code")) + if (message.reason_code != null && $Object.hasOwnProperty.call(message, "reason_code")) if (!$util.isInteger(message.reason_code)) return "reason_code: integer expected"; return null; @@ -16851,9 +21062,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamSockets_UDP_ConnectionClosed} CMsgSteamSockets_UDP_ConnectionClosed */ - CMsgSteamSockets_UDP_ConnectionClosed.fromObject = function fromObject(object) { + CMsgSteamSockets_UDP_ConnectionClosed.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamSockets_UDP_ConnectionClosed) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamSockets_UDP_ConnectionClosed: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamSockets_UDP_ConnectionClosed(); if (object.legacy_client_connection_id != null) message.legacy_client_connection_id = object.legacy_client_connection_id >>> 0; @@ -16862,7 +21079,7 @@ if (object.from_connection_id != null) message.from_connection_id = object.from_connection_id >>> 0; if (object.debug != null) - message.debug = String(object.debug); + message.debug = $String(object.debug); if (object.reason_code != null) message.reason_code = object.reason_code >>> 0; return message; @@ -16877,9 +21094,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamSockets_UDP_ConnectionClosed.toObject = function toObject(message, options) { + CMsgSteamSockets_UDP_ConnectionClosed.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.legacy_client_connection_id = 0; @@ -16888,15 +21109,15 @@ object.to_connection_id = 0; object.from_connection_id = 0; } - if (message.legacy_client_connection_id != null && message.hasOwnProperty("legacy_client_connection_id")) + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) object.legacy_client_connection_id = message.legacy_client_connection_id; - if (message.debug != null && message.hasOwnProperty("debug")) + if (message.debug != null && $Object.hasOwnProperty.call(message, "debug")) object.debug = message.debug; - if (message.reason_code != null && message.hasOwnProperty("reason_code")) + if (message.reason_code != null && $Object.hasOwnProperty.call(message, "reason_code")) object.reason_code = message.reason_code; - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) object.to_connection_id = message.to_connection_id; - if (message.from_connection_id != null && message.hasOwnProperty("from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) object.from_connection_id = message.from_connection_id; return object; }; @@ -16908,8 +21129,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamSockets_UDP_ConnectionClosed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamSockets_UDP_ConnectionClosed.prototype.toJSON = function() { + return CMsgSteamSockets_UDP_ConnectionClosed.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamSockets_UDP_ConnectionClosed + * @function getTypeUrl + * @memberof CMsgSteamSockets_UDP_ConnectionClosed + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamSockets_UDP_ConnectionClosed.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamSockets_UDP_ConnectionClosed"; }; return CMsgSteamSockets_UDP_ConnectionClosed; @@ -16917,29 +21152,42 @@ $root.CMsgSteamSockets_UDP_NoConnection = (function() { + /** + * Properties of a CMsgSteamSockets_UDP_NoConnection. + * @typedef {Object} CMsgSteamSockets_UDP_NoConnection.$Properties + * @property {number|null} [legacy_client_connection_id] CMsgSteamSockets_UDP_NoConnection legacy_client_connection_id + * @property {number|null} [from_connection_id] CMsgSteamSockets_UDP_NoConnection from_connection_id + * @property {number|null} [to_connection_id] CMsgSteamSockets_UDP_NoConnection to_connection_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSteamSockets_UDP_NoConnection. * @exports ICMsgSteamSockets_UDP_NoConnection * @interface ICMsgSteamSockets_UDP_NoConnection - * @property {number|null} [legacy_client_connection_id] CMsgSteamSockets_UDP_NoConnection legacy_client_connection_id - * @property {number|null} [from_connection_id] CMsgSteamSockets_UDP_NoConnection from_connection_id - * @property {number|null} [to_connection_id] CMsgSteamSockets_UDP_NoConnection to_connection_id + * @augments CMsgSteamSockets_UDP_NoConnection.$Properties + * @deprecated Use CMsgSteamSockets_UDP_NoConnection.$Properties instead. + */ + + /** + * Shape of a CMsgSteamSockets_UDP_NoConnection. + * @typedef {CMsgSteamSockets_UDP_NoConnection.$Properties} CMsgSteamSockets_UDP_NoConnection.$Shape */ /** * Constructs a new CMsgSteamSockets_UDP_NoConnection. * @exports CMsgSteamSockets_UDP_NoConnection * @classdesc Represents a CMsgSteamSockets_UDP_NoConnection. - * @implements ICMsgSteamSockets_UDP_NoConnection * @constructor - * @param {ICMsgSteamSockets_UDP_NoConnection=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_NoConnection.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamSockets_UDP_NoConnection(properties) { + var CMsgSteamSockets_UDP_NoConnection = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamSockets_UDP_NoConnection legacy_client_connection_id. @@ -16970,10 +21218,14 @@ * @function create * @memberof CMsgSteamSockets_UDP_NoConnection * @static - * @param {ICMsgSteamSockets_UDP_NoConnection=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_NoConnection.$Properties=} [properties] Properties to set * @returns {CMsgSteamSockets_UDP_NoConnection} CMsgSteamSockets_UDP_NoConnection instance + * @type {{ + * (properties: CMsgSteamSockets_UDP_NoConnection.$Shape): CMsgSteamSockets_UDP_NoConnection & CMsgSteamSockets_UDP_NoConnection.$Shape; + * (properties?: CMsgSteamSockets_UDP_NoConnection.$Properties): CMsgSteamSockets_UDP_NoConnection; + * }} */ - CMsgSteamSockets_UDP_NoConnection.create = function create(properties) { + CMsgSteamSockets_UDP_NoConnection.create = function(properties) { return new CMsgSteamSockets_UDP_NoConnection(properties); }; @@ -16982,19 +21234,26 @@ * @function encode * @memberof CMsgSteamSockets_UDP_NoConnection * @static - * @param {ICMsgSteamSockets_UDP_NoConnection} message CMsgSteamSockets_UDP_NoConnection message or plain object to encode + * @param {CMsgSteamSockets_UDP_NoConnection.$Properties} message CMsgSteamSockets_UDP_NoConnection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_NoConnection.encode = function encode(message, writer) { + CMsgSteamSockets_UDP_NoConnection.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.legacy_client_connection_id != null && Object.hasOwnProperty.call(message, "legacy_client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.legacy_client_connection_id); - if (message.from_connection_id != null && Object.hasOwnProperty.call(message, "from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.from_connection_id); - if (message.to_connection_id != null && Object.hasOwnProperty.call(message, "to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.to_connection_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17003,12 +21262,12 @@ * @function encodeDelimited * @memberof CMsgSteamSockets_UDP_NoConnection * @static - * @param {ICMsgSteamSockets_UDP_NoConnection} message CMsgSteamSockets_UDP_NoConnection message or plain object to encode + * @param {CMsgSteamSockets_UDP_NoConnection.$Properties} message CMsgSteamSockets_UDP_NoConnection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_NoConnection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamSockets_UDP_NoConnection.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17018,31 +21277,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamSockets_UDP_NoConnection} CMsgSteamSockets_UDP_NoConnection + * @returns {CMsgSteamSockets_UDP_NoConnection & CMsgSteamSockets_UDP_NoConnection.$Shape} CMsgSteamSockets_UDP_NoConnection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_NoConnection.decode = function decode(reader, length) { + CMsgSteamSockets_UDP_NoConnection.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamSockets_UDP_NoConnection(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamSockets_UDP_NoConnection(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.legacy_client_connection_id = reader.fixed32(); - break; - case 2: - message.from_connection_id = reader.fixed32(); - break; - case 3: - message.to_connection_id = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.legacy_client_connection_id = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.from_connection_id = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.to_connection_id = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17052,11 +21334,11 @@ * @memberof CMsgSteamSockets_UDP_NoConnection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamSockets_UDP_NoConnection} CMsgSteamSockets_UDP_NoConnection + * @returns {CMsgSteamSockets_UDP_NoConnection & CMsgSteamSockets_UDP_NoConnection.$Shape} CMsgSteamSockets_UDP_NoConnection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_NoConnection.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamSockets_UDP_NoConnection.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17070,16 +21352,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamSockets_UDP_NoConnection.verify = function verify(message) { + CMsgSteamSockets_UDP_NoConnection.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.legacy_client_connection_id != null && message.hasOwnProperty("legacy_client_connection_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) if (!$util.isInteger(message.legacy_client_connection_id)) return "legacy_client_connection_id: integer expected"; - if (message.from_connection_id != null && message.hasOwnProperty("from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) if (!$util.isInteger(message.from_connection_id)) return "from_connection_id: integer expected"; - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) if (!$util.isInteger(message.to_connection_id)) return "to_connection_id: integer expected"; return null; @@ -17093,9 +21379,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamSockets_UDP_NoConnection} CMsgSteamSockets_UDP_NoConnection */ - CMsgSteamSockets_UDP_NoConnection.fromObject = function fromObject(object) { + CMsgSteamSockets_UDP_NoConnection.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamSockets_UDP_NoConnection) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamSockets_UDP_NoConnection: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamSockets_UDP_NoConnection(); if (object.legacy_client_connection_id != null) message.legacy_client_connection_id = object.legacy_client_connection_id >>> 0; @@ -17115,20 +21407,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamSockets_UDP_NoConnection.toObject = function toObject(message, options) { + CMsgSteamSockets_UDP_NoConnection.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.legacy_client_connection_id = 0; object.from_connection_id = 0; object.to_connection_id = 0; } - if (message.legacy_client_connection_id != null && message.hasOwnProperty("legacy_client_connection_id")) + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) object.legacy_client_connection_id = message.legacy_client_connection_id; - if (message.from_connection_id != null && message.hasOwnProperty("from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) object.from_connection_id = message.from_connection_id; - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) object.to_connection_id = message.to_connection_id; return object; }; @@ -17140,8 +21436,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamSockets_UDP_NoConnection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamSockets_UDP_NoConnection.prototype.toJSON = function() { + return CMsgSteamSockets_UDP_NoConnection.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamSockets_UDP_NoConnection + * @function getTypeUrl + * @memberof CMsgSteamSockets_UDP_NoConnection + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamSockets_UDP_NoConnection.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamSockets_UDP_NoConnection"; }; return CMsgSteamSockets_UDP_NoConnection; @@ -17151,36 +21461,49 @@ /** * Properties of a CMsgSteamSockets_UDP_Stats. - * @exports ICMsgSteamSockets_UDP_Stats - * @interface ICMsgSteamSockets_UDP_Stats - * @property {ICMsgSteamDatagramConnectionQuality|null} [stats] CMsgSteamSockets_UDP_Stats stats + * @typedef {Object} CMsgSteamSockets_UDP_Stats.$Properties + * @property {CMsgSteamDatagramConnectionQuality.$Properties|null} [stats] CMsgSteamSockets_UDP_Stats stats * @property {Array.|null} [ack_e2e] CMsgSteamSockets_UDP_Stats ack_e2e * @property {number|null} [flags] CMsgSteamSockets_UDP_Stats flags * @property {number|null} [legacy_client_connection_id] CMsgSteamSockets_UDP_Stats legacy_client_connection_id * @property {number|null} [to_connection_id] CMsgSteamSockets_UDP_Stats to_connection_id * @property {number|null} [from_connection_id] CMsgSteamSockets_UDP_Stats from_connection_id * @property {number|null} [seq_num] CMsgSteamSockets_UDP_Stats seq_num + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamSockets_UDP_Stats. + * @exports ICMsgSteamSockets_UDP_Stats + * @interface ICMsgSteamSockets_UDP_Stats + * @augments CMsgSteamSockets_UDP_Stats.$Properties + * @deprecated Use CMsgSteamSockets_UDP_Stats.$Properties instead. + */ + + /** + * Shape of a CMsgSteamSockets_UDP_Stats. + * @typedef {CMsgSteamSockets_UDP_Stats.$Properties} CMsgSteamSockets_UDP_Stats.$Shape */ /** * Constructs a new CMsgSteamSockets_UDP_Stats. * @exports CMsgSteamSockets_UDP_Stats * @classdesc Represents a CMsgSteamSockets_UDP_Stats. - * @implements ICMsgSteamSockets_UDP_Stats * @constructor - * @param {ICMsgSteamSockets_UDP_Stats=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_Stats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamSockets_UDP_Stats(properties) { + var CMsgSteamSockets_UDP_Stats = function (properties) { this.ack_e2e = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamSockets_UDP_Stats stats. - * @member {ICMsgSteamDatagramConnectionQuality|null|undefined} stats + * @member {CMsgSteamDatagramConnectionQuality.$Properties|null|undefined} stats * @memberof CMsgSteamSockets_UDP_Stats * @instance */ @@ -17239,10 +21562,14 @@ * @function create * @memberof CMsgSteamSockets_UDP_Stats * @static - * @param {ICMsgSteamSockets_UDP_Stats=} [properties] Properties to set + * @param {CMsgSteamSockets_UDP_Stats.$Properties=} [properties] Properties to set * @returns {CMsgSteamSockets_UDP_Stats} CMsgSteamSockets_UDP_Stats instance + * @type {{ + * (properties: CMsgSteamSockets_UDP_Stats.$Shape): CMsgSteamSockets_UDP_Stats & CMsgSteamSockets_UDP_Stats.$Shape; + * (properties?: CMsgSteamSockets_UDP_Stats.$Properties): CMsgSteamSockets_UDP_Stats; + * }} */ - CMsgSteamSockets_UDP_Stats.create = function create(properties) { + CMsgSteamSockets_UDP_Stats.create = function(properties) { return new CMsgSteamSockets_UDP_Stats(properties); }; @@ -17251,28 +21578,35 @@ * @function encode * @memberof CMsgSteamSockets_UDP_Stats * @static - * @param {ICMsgSteamSockets_UDP_Stats} message CMsgSteamSockets_UDP_Stats message or plain object to encode + * @param {CMsgSteamSockets_UDP_Stats.$Properties} message CMsgSteamSockets_UDP_Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_Stats.encode = function encode(message, writer) { + CMsgSteamSockets_UDP_Stats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) - $root.CMsgSteamDatagramConnectionQuality.encode(message.stats, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) + $root.CMsgSteamDatagramConnectionQuality.encode(message.stats, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); if (message.ack_e2e != null && message.ack_e2e.length) for (var i = 0; i < message.ack_e2e.length; ++i) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.ack_e2e[i]); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.flags); - if (message.seq_num != null && Object.hasOwnProperty.call(message, "seq_num")) + if (message.seq_num != null && $Object.hasOwnProperty.call(message, "seq_num")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.seq_num); - if (message.legacy_client_connection_id != null && Object.hasOwnProperty.call(message, "legacy_client_connection_id")) + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.legacy_client_connection_id); - if (message.to_connection_id != null && Object.hasOwnProperty.call(message, "to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) writer.uint32(/* id 9, wireType 5 =*/77).fixed32(message.to_connection_id); - if (message.from_connection_id != null && Object.hasOwnProperty.call(message, "from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) writer.uint32(/* id 10, wireType 5 =*/85).fixed32(message.from_connection_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17281,12 +21615,12 @@ * @function encodeDelimited * @memberof CMsgSteamSockets_UDP_Stats * @static - * @param {ICMsgSteamSockets_UDP_Stats} message CMsgSteamSockets_UDP_Stats message or plain object to encode + * @param {CMsgSteamSockets_UDP_Stats.$Properties} message CMsgSteamSockets_UDP_Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamSockets_UDP_Stats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamSockets_UDP_Stats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17296,50 +21630,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamSockets_UDP_Stats} CMsgSteamSockets_UDP_Stats + * @returns {CMsgSteamSockets_UDP_Stats & CMsgSteamSockets_UDP_Stats.$Shape} CMsgSteamSockets_UDP_Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_Stats.decode = function decode(reader, length) { + CMsgSteamSockets_UDP_Stats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamSockets_UDP_Stats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamSockets_UDP_Stats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stats = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32()); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.ack_e2e && message.ack_e2e.length)) - message.ack_e2e = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ack_e2e.push(reader.fixed32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.stats = $root.CMsgSteamDatagramConnectionQuality.decode(reader, reader.uint32(), $undefined, _depth + 1, message.stats); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; + reader.fixed32s(message.ack_e2e); + continue; + } + if (wireType !== 5) + break; + if (!(message.ack_e2e && message.ack_e2e.length)) + message.ack_e2e = []; message.ack_e2e.push(reader.fixed32()); - break; - case 3: - message.flags = reader.uint32(); - break; - case 8: - message.legacy_client_connection_id = reader.fixed32(); - break; - case 9: - message.to_connection_id = reader.fixed32(); - break; - case 10: - message.from_connection_id = reader.fixed32(); - break; - case 4: - message.seq_num = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 5) + break; + message.legacy_client_connection_id = reader.fixed32(); + continue; + } + case 9: { + if (wireType !== 5) + break; + message.to_connection_id = reader.fixed32(); + continue; + } + case 10: { + if (wireType !== 5) + break; + message.from_connection_id = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.seq_num = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17349,11 +21719,11 @@ * @memberof CMsgSteamSockets_UDP_Stats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamSockets_UDP_Stats} CMsgSteamSockets_UDP_Stats + * @returns {CMsgSteamSockets_UDP_Stats & CMsgSteamSockets_UDP_Stats.$Shape} CMsgSteamSockets_UDP_Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamSockets_UDP_Stats.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamSockets_UDP_Stats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17367,34 +21737,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamSockets_UDP_Stats.verify = function verify(message) { + CMsgSteamSockets_UDP_Stats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.stats); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) { + var error = $root.CMsgSteamDatagramConnectionQuality.verify(message.stats, _depth + 1); if (error) return "stats." + error; } - if (message.ack_e2e != null && message.hasOwnProperty("ack_e2e")) { - if (!Array.isArray(message.ack_e2e)) + if (message.ack_e2e != null && $Object.hasOwnProperty.call(message, "ack_e2e")) { + if (!$Array.isArray(message.ack_e2e)) return "ack_e2e: array expected"; for (var i = 0; i < message.ack_e2e.length; ++i) if (!$util.isInteger(message.ack_e2e[i])) return "ack_e2e: integer[] expected"; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.legacy_client_connection_id != null && message.hasOwnProperty("legacy_client_connection_id")) + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) if (!$util.isInteger(message.legacy_client_connection_id)) return "legacy_client_connection_id: integer expected"; - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) if (!$util.isInteger(message.to_connection_id)) return "to_connection_id: integer expected"; - if (message.from_connection_id != null && message.hasOwnProperty("from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) if (!$util.isInteger(message.from_connection_id)) return "from_connection_id: integer expected"; - if (message.seq_num != null && message.hasOwnProperty("seq_num")) + if (message.seq_num != null && $Object.hasOwnProperty.call(message, "seq_num")) if (!$util.isInteger(message.seq_num)) return "seq_num: integer expected"; return null; @@ -17408,19 +21782,25 @@ * @param {Object.} object Plain object * @returns {CMsgSteamSockets_UDP_Stats} CMsgSteamSockets_UDP_Stats */ - CMsgSteamSockets_UDP_Stats.fromObject = function fromObject(object) { + CMsgSteamSockets_UDP_Stats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamSockets_UDP_Stats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamSockets_UDP_Stats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamSockets_UDP_Stats(); if (object.stats != null) { - if (typeof object.stats !== "object") - throw TypeError(".CMsgSteamSockets_UDP_Stats.stats: object expected"); - message.stats = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.stats); + if (!$util.isObject(object.stats)) + throw $TypeError(".CMsgSteamSockets_UDP_Stats.stats: object expected"); + message.stats = $root.CMsgSteamDatagramConnectionQuality.fromObject(object.stats, _depth + 1); } if (object.ack_e2e) { - if (!Array.isArray(object.ack_e2e)) - throw TypeError(".CMsgSteamSockets_UDP_Stats.ack_e2e: array expected"); - message.ack_e2e = []; + if (!$Array.isArray(object.ack_e2e)) + throw $TypeError(".CMsgSteamSockets_UDP_Stats.ack_e2e: array expected"); + message.ack_e2e = $Array(object.ack_e2e.length); for (var i = 0; i < object.ack_e2e.length; ++i) message.ack_e2e[i] = object.ack_e2e[i] >>> 0; } @@ -17446,9 +21826,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamSockets_UDP_Stats.toObject = function toObject(message, options) { + CMsgSteamSockets_UDP_Stats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.ack_e2e = []; @@ -17460,22 +21844,22 @@ object.to_connection_id = 0; object.from_connection_id = 0; } - if (message.stats != null && message.hasOwnProperty("stats")) - object.stats = $root.CMsgSteamDatagramConnectionQuality.toObject(message.stats, options); + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) + object.stats = $root.CMsgSteamDatagramConnectionQuality.toObject(message.stats, options, _depth + 1); if (message.ack_e2e && message.ack_e2e.length) { - object.ack_e2e = []; + object.ack_e2e = $Array(message.ack_e2e.length); for (var j = 0; j < message.ack_e2e.length; ++j) object.ack_e2e[j] = message.ack_e2e[j]; } - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.seq_num != null && message.hasOwnProperty("seq_num")) + if (message.seq_num != null && $Object.hasOwnProperty.call(message, "seq_num")) object.seq_num = message.seq_num; - if (message.legacy_client_connection_id != null && message.hasOwnProperty("legacy_client_connection_id")) + if (message.legacy_client_connection_id != null && $Object.hasOwnProperty.call(message, "legacy_client_connection_id")) object.legacy_client_connection_id = message.legacy_client_connection_id; - if (message.to_connection_id != null && message.hasOwnProperty("to_connection_id")) + if (message.to_connection_id != null && $Object.hasOwnProperty.call(message, "to_connection_id")) object.to_connection_id = message.to_connection_id; - if (message.from_connection_id != null && message.hasOwnProperty("from_connection_id")) + if (message.from_connection_id != null && $Object.hasOwnProperty.call(message, "from_connection_id")) object.from_connection_id = message.from_connection_id; return object; }; @@ -17487,8 +21871,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamSockets_UDP_Stats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamSockets_UDP_Stats.prototype.toJSON = function() { + return CMsgSteamSockets_UDP_Stats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamSockets_UDP_Stats + * @function getTypeUrl + * @memberof CMsgSteamSockets_UDP_Stats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamSockets_UDP_Stats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamSockets_UDP_Stats"; }; /** @@ -17499,7 +21897,7 @@ * @property {number} ACK_REQUEST_IMMEDIATE=4 ACK_REQUEST_IMMEDIATE value */ CMsgSteamSockets_UDP_Stats.Flags = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[2] = "ACK_REQUEST_E2E"] = 2; values[valuesById[4] = "ACK_REQUEST_IMMEDIATE"] = 4; return values; @@ -17512,8 +21910,7 @@ /** * Properties of a CMsgSteamDatagramRelayAuthTicket. - * @exports ICMsgSteamDatagramRelayAuthTicket - * @interface ICMsgSteamDatagramRelayAuthTicket + * @typedef {Object} CMsgSteamDatagramRelayAuthTicket.$Properties * @property {number|null} [time_expiry] CMsgSteamDatagramRelayAuthTicket time_expiry * @property {number|Long|null} [authorized_steam_id] CMsgSteamDatagramRelayAuthTicket authorized_steam_id * @property {number|null} [authorized_public_ip] CMsgSteamDatagramRelayAuthTicket authorized_public_ip @@ -17523,24 +21920,38 @@ * @property {number|null} [app_id] CMsgSteamDatagramRelayAuthTicket app_id * @property {number|null} [gameserver_pop_id] CMsgSteamDatagramRelayAuthTicket gameserver_pop_id * @property {number|null} [virtual_port] CMsgSteamDatagramRelayAuthTicket virtual_port - * @property {Array.|null} [extra_fields] CMsgSteamDatagramRelayAuthTicket extra_fields + * @property {Array.|null} [extra_fields] CMsgSteamDatagramRelayAuthTicket extra_fields + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramRelayAuthTicket. + * @exports ICMsgSteamDatagramRelayAuthTicket + * @interface ICMsgSteamDatagramRelayAuthTicket + * @augments CMsgSteamDatagramRelayAuthTicket.$Properties + * @deprecated Use CMsgSteamDatagramRelayAuthTicket.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramRelayAuthTicket. + * @typedef {CMsgSteamDatagramRelayAuthTicket.$Properties} CMsgSteamDatagramRelayAuthTicket.$Shape */ /** * Constructs a new CMsgSteamDatagramRelayAuthTicket. * @exports CMsgSteamDatagramRelayAuthTicket * @classdesc Represents a CMsgSteamDatagramRelayAuthTicket. - * @implements ICMsgSteamDatagramRelayAuthTicket * @constructor - * @param {ICMsgSteamDatagramRelayAuthTicket=} [properties] Properties to set + * @param {CMsgSteamDatagramRelayAuthTicket.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramRelayAuthTicket(properties) { + var CMsgSteamDatagramRelayAuthTicket = function (properties) { this.extra_fields = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramRelayAuthTicket time_expiry. @@ -17556,7 +21967,7 @@ * @memberof CMsgSteamDatagramRelayAuthTicket * @instance */ - CMsgSteamDatagramRelayAuthTicket.prototype.authorized_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramRelayAuthTicket.prototype.authorized_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramRelayAuthTicket authorized_public_ip. @@ -17572,7 +21983,7 @@ * @memberof CMsgSteamDatagramRelayAuthTicket * @instance */ - CMsgSteamDatagramRelayAuthTicket.prototype.gameserver_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramRelayAuthTicket.prototype.gameserver_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramRelayAuthTicket gameserver_net_id. @@ -17580,7 +21991,7 @@ * @memberof CMsgSteamDatagramRelayAuthTicket * @instance */ - CMsgSteamDatagramRelayAuthTicket.prototype.gameserver_net_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramRelayAuthTicket.prototype.gameserver_net_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramRelayAuthTicket legacy_signature. @@ -17616,7 +22027,7 @@ /** * CMsgSteamDatagramRelayAuthTicket extra_fields. - * @member {Array.} extra_fields + * @member {Array.} extra_fields * @memberof CMsgSteamDatagramRelayAuthTicket * @instance */ @@ -17627,10 +22038,14 @@ * @function create * @memberof CMsgSteamDatagramRelayAuthTicket * @static - * @param {ICMsgSteamDatagramRelayAuthTicket=} [properties] Properties to set + * @param {CMsgSteamDatagramRelayAuthTicket.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramRelayAuthTicket} CMsgSteamDatagramRelayAuthTicket instance + * @type {{ + * (properties: CMsgSteamDatagramRelayAuthTicket.$Shape): CMsgSteamDatagramRelayAuthTicket & CMsgSteamDatagramRelayAuthTicket.$Shape; + * (properties?: CMsgSteamDatagramRelayAuthTicket.$Properties): CMsgSteamDatagramRelayAuthTicket; + * }} */ - CMsgSteamDatagramRelayAuthTicket.create = function create(properties) { + CMsgSteamDatagramRelayAuthTicket.create = function(properties) { return new CMsgSteamDatagramRelayAuthTicket(properties); }; @@ -17639,34 +22054,41 @@ * @function encode * @memberof CMsgSteamDatagramRelayAuthTicket * @static - * @param {ICMsgSteamDatagramRelayAuthTicket} message CMsgSteamDatagramRelayAuthTicket message or plain object to encode + * @param {CMsgSteamDatagramRelayAuthTicket.$Properties} message CMsgSteamDatagramRelayAuthTicket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramRelayAuthTicket.encode = function encode(message, writer) { + CMsgSteamDatagramRelayAuthTicket.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.time_expiry != null && Object.hasOwnProperty.call(message, "time_expiry")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.time_expiry); - if (message.authorized_steam_id != null && Object.hasOwnProperty.call(message, "authorized_steam_id")) + if (message.authorized_steam_id != null && $Object.hasOwnProperty.call(message, "authorized_steam_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.authorized_steam_id); - if (message.authorized_public_ip != null && Object.hasOwnProperty.call(message, "authorized_public_ip")) + if (message.authorized_public_ip != null && $Object.hasOwnProperty.call(message, "authorized_public_ip")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.authorized_public_ip); - if (message.gameserver_steam_id != null && Object.hasOwnProperty.call(message, "gameserver_steam_id")) + if (message.gameserver_steam_id != null && $Object.hasOwnProperty.call(message, "gameserver_steam_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.gameserver_steam_id); - if (message.gameserver_net_id != null && Object.hasOwnProperty.call(message, "gameserver_net_id")) + if (message.gameserver_net_id != null && $Object.hasOwnProperty.call(message, "gameserver_net_id")) writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.gameserver_net_id); - if (message.legacy_signature != null && Object.hasOwnProperty.call(message, "legacy_signature")) + if (message.legacy_signature != null && $Object.hasOwnProperty.call(message, "legacy_signature")) writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.legacy_signature); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.app_id); if (message.extra_fields != null && message.extra_fields.length) for (var i = 0; i < message.extra_fields.length; ++i) - $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.gameserver_pop_id != null && Object.hasOwnProperty.call(message, "gameserver_pop_id")) + $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.gameserver_pop_id != null && $Object.hasOwnProperty.call(message, "gameserver_pop_id")) writer.uint32(/* id 9, wireType 5 =*/77).fixed32(message.gameserver_pop_id); - if (message.virtual_port != null && Object.hasOwnProperty.call(message, "virtual_port")) + if (message.virtual_port != null && $Object.hasOwnProperty.call(message, "virtual_port")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.virtual_port); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17675,12 +22097,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramRelayAuthTicket * @static - * @param {ICMsgSteamDatagramRelayAuthTicket} message CMsgSteamDatagramRelayAuthTicket message or plain object to encode + * @param {CMsgSteamDatagramRelayAuthTicket.$Properties} message CMsgSteamDatagramRelayAuthTicket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramRelayAuthTicket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramRelayAuthTicket.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17690,54 +22112,98 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramRelayAuthTicket} CMsgSteamDatagramRelayAuthTicket + * @returns {CMsgSteamDatagramRelayAuthTicket & CMsgSteamDatagramRelayAuthTicket.$Shape} CMsgSteamDatagramRelayAuthTicket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramRelayAuthTicket.decode = function decode(reader, length) { + CMsgSteamDatagramRelayAuthTicket.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramRelayAuthTicket(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramRelayAuthTicket(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time_expiry = reader.fixed32(); - break; - case 2: - message.authorized_steam_id = reader.fixed64(); - break; - case 3: - message.authorized_public_ip = reader.fixed32(); - break; - case 4: - message.gameserver_steam_id = reader.fixed64(); - break; - case 5: - message.gameserver_net_id = reader.fixed64(); - break; - case 6: - message.legacy_signature = reader.bytes(); - break; - case 7: - message.app_id = reader.uint32(); - break; - case 9: - message.gameserver_pop_id = reader.fixed32(); - break; - case 10: - message.virtual_port = reader.uint32(); - break; - case 8: - if (!(message.extra_fields && message.extra_fields.length)) - message.extra_fields = []; - message.extra_fields.push($root.CMsgSteamDatagramRelayAuthTicket.ExtraField.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.time_expiry = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.authorized_steam_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.authorized_public_ip = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.gameserver_steam_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 1) + break; + message.gameserver_net_id = reader.fixed64(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.legacy_signature = reader.bytes(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 5) + break; + message.gameserver_pop_id = reader.fixed32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.virtual_port = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 2) + break; + if (!(message.extra_fields && message.extra_fields.length)) + message.extra_fields = []; + message.extra_fields.push($root.CMsgSteamDatagramRelayAuthTicket.ExtraField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17747,11 +22213,11 @@ * @memberof CMsgSteamDatagramRelayAuthTicket * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramRelayAuthTicket} CMsgSteamDatagramRelayAuthTicket + * @returns {CMsgSteamDatagramRelayAuthTicket & CMsgSteamDatagramRelayAuthTicket.$Shape} CMsgSteamDatagramRelayAuthTicket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramRelayAuthTicket.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramRelayAuthTicket.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17765,41 +22231,45 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramRelayAuthTicket.verify = function verify(message) { + CMsgSteamDatagramRelayAuthTicket.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.time_expiry != null && message.hasOwnProperty("time_expiry")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) if (!$util.isInteger(message.time_expiry)) return "time_expiry: integer expected"; - if (message.authorized_steam_id != null && message.hasOwnProperty("authorized_steam_id")) + if (message.authorized_steam_id != null && $Object.hasOwnProperty.call(message, "authorized_steam_id")) if (!$util.isInteger(message.authorized_steam_id) && !(message.authorized_steam_id && $util.isInteger(message.authorized_steam_id.low) && $util.isInteger(message.authorized_steam_id.high))) return "authorized_steam_id: integer|Long expected"; - if (message.authorized_public_ip != null && message.hasOwnProperty("authorized_public_ip")) + if (message.authorized_public_ip != null && $Object.hasOwnProperty.call(message, "authorized_public_ip")) if (!$util.isInteger(message.authorized_public_ip)) return "authorized_public_ip: integer expected"; - if (message.gameserver_steam_id != null && message.hasOwnProperty("gameserver_steam_id")) + if (message.gameserver_steam_id != null && $Object.hasOwnProperty.call(message, "gameserver_steam_id")) if (!$util.isInteger(message.gameserver_steam_id) && !(message.gameserver_steam_id && $util.isInteger(message.gameserver_steam_id.low) && $util.isInteger(message.gameserver_steam_id.high))) return "gameserver_steam_id: integer|Long expected"; - if (message.gameserver_net_id != null && message.hasOwnProperty("gameserver_net_id")) + if (message.gameserver_net_id != null && $Object.hasOwnProperty.call(message, "gameserver_net_id")) if (!$util.isInteger(message.gameserver_net_id) && !(message.gameserver_net_id && $util.isInteger(message.gameserver_net_id.low) && $util.isInteger(message.gameserver_net_id.high))) return "gameserver_net_id: integer|Long expected"; - if (message.legacy_signature != null && message.hasOwnProperty("legacy_signature")) + if (message.legacy_signature != null && $Object.hasOwnProperty.call(message, "legacy_signature")) if (!(message.legacy_signature && typeof message.legacy_signature.length === "number" || $util.isString(message.legacy_signature))) return "legacy_signature: buffer expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.gameserver_pop_id != null && message.hasOwnProperty("gameserver_pop_id")) + if (message.gameserver_pop_id != null && $Object.hasOwnProperty.call(message, "gameserver_pop_id")) if (!$util.isInteger(message.gameserver_pop_id)) return "gameserver_pop_id: integer expected"; - if (message.virtual_port != null && message.hasOwnProperty("virtual_port")) + if (message.virtual_port != null && $Object.hasOwnProperty.call(message, "virtual_port")) if (!$util.isInteger(message.virtual_port)) return "virtual_port: integer expected"; - if (message.extra_fields != null && message.hasOwnProperty("extra_fields")) { - if (!Array.isArray(message.extra_fields)) + if (message.extra_fields != null && $Object.hasOwnProperty.call(message, "extra_fields")) { + if (!$Array.isArray(message.extra_fields)) return "extra_fields: array expected"; for (var i = 0; i < message.extra_fields.length; ++i) { - var error = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.verify(message.extra_fields[i]); + var error = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.verify(message.extra_fields[i], _depth + 1); if (error) return "extra_fields." + error; } @@ -17815,45 +22285,51 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramRelayAuthTicket} CMsgSteamDatagramRelayAuthTicket */ - CMsgSteamDatagramRelayAuthTicket.fromObject = function fromObject(object) { + CMsgSteamDatagramRelayAuthTicket.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramRelayAuthTicket) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramRelayAuthTicket: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramRelayAuthTicket(); if (object.time_expiry != null) message.time_expiry = object.time_expiry >>> 0; if (object.authorized_steam_id != null) if ($util.Long) - (message.authorized_steam_id = $util.Long.fromValue(object.authorized_steam_id)).unsigned = false; + message.authorized_steam_id = $util.Long.fromValue(object.authorized_steam_id, true); else if (typeof object.authorized_steam_id === "string") - message.authorized_steam_id = parseInt(object.authorized_steam_id, 10); + message.authorized_steam_id = $parseInt(object.authorized_steam_id, 10); else if (typeof object.authorized_steam_id === "number") message.authorized_steam_id = object.authorized_steam_id; else if (typeof object.authorized_steam_id === "object") - message.authorized_steam_id = new $util.LongBits(object.authorized_steam_id.low >>> 0, object.authorized_steam_id.high >>> 0).toNumber(); + message.authorized_steam_id = new $util.LongBits(object.authorized_steam_id.low >>> 0, object.authorized_steam_id.high >>> 0).toNumber(true); if (object.authorized_public_ip != null) message.authorized_public_ip = object.authorized_public_ip >>> 0; if (object.gameserver_steam_id != null) if ($util.Long) - (message.gameserver_steam_id = $util.Long.fromValue(object.gameserver_steam_id)).unsigned = false; + message.gameserver_steam_id = $util.Long.fromValue(object.gameserver_steam_id, true); else if (typeof object.gameserver_steam_id === "string") - message.gameserver_steam_id = parseInt(object.gameserver_steam_id, 10); + message.gameserver_steam_id = $parseInt(object.gameserver_steam_id, 10); else if (typeof object.gameserver_steam_id === "number") message.gameserver_steam_id = object.gameserver_steam_id; else if (typeof object.gameserver_steam_id === "object") - message.gameserver_steam_id = new $util.LongBits(object.gameserver_steam_id.low >>> 0, object.gameserver_steam_id.high >>> 0).toNumber(); + message.gameserver_steam_id = new $util.LongBits(object.gameserver_steam_id.low >>> 0, object.gameserver_steam_id.high >>> 0).toNumber(true); if (object.gameserver_net_id != null) if ($util.Long) - (message.gameserver_net_id = $util.Long.fromValue(object.gameserver_net_id)).unsigned = false; + message.gameserver_net_id = $util.Long.fromValue(object.gameserver_net_id, true); else if (typeof object.gameserver_net_id === "string") - message.gameserver_net_id = parseInt(object.gameserver_net_id, 10); + message.gameserver_net_id = $parseInt(object.gameserver_net_id, 10); else if (typeof object.gameserver_net_id === "number") message.gameserver_net_id = object.gameserver_net_id; else if (typeof object.gameserver_net_id === "object") - message.gameserver_net_id = new $util.LongBits(object.gameserver_net_id.low >>> 0, object.gameserver_net_id.high >>> 0).toNumber(); + message.gameserver_net_id = new $util.LongBits(object.gameserver_net_id.low >>> 0, object.gameserver_net_id.high >>> 0).toNumber(true); if (object.legacy_signature != null) if (typeof object.legacy_signature === "string") $util.base64.decode(object.legacy_signature, message.legacy_signature = $util.newBuffer($util.base64.length(object.legacy_signature)), 0); - else if (object.legacy_signature.length) + else if (object.legacy_signature.length >= 0) message.legacy_signature = object.legacy_signature; if (object.app_id != null) message.app_id = object.app_id >>> 0; @@ -17862,13 +22338,13 @@ if (object.virtual_port != null) message.virtual_port = object.virtual_port >>> 0; if (object.extra_fields) { - if (!Array.isArray(object.extra_fields)) - throw TypeError(".CMsgSteamDatagramRelayAuthTicket.extra_fields: array expected"); - message.extra_fields = []; + if (!$Array.isArray(object.extra_fields)) + throw $TypeError(".CMsgSteamDatagramRelayAuthTicket.extra_fields: array expected"); + message.extra_fields = $Array(object.extra_fields.length); for (var i = 0; i < object.extra_fields.length; ++i) { - if (typeof object.extra_fields[i] !== "object") - throw TypeError(".CMsgSteamDatagramRelayAuthTicket.extra_fields: object expected"); - message.extra_fields[i] = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.fromObject(object.extra_fields[i]); + if (!$util.isObject(object.extra_fields[i])) + throw $TypeError(".CMsgSteamDatagramRelayAuthTicket.extra_fields: object expected"); + message.extra_fields[i] = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.fromObject(object.extra_fields[i], _depth + 1); } } return message; @@ -17883,72 +22359,82 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramRelayAuthTicket.toObject = function toObject(message, options) { + CMsgSteamDatagramRelayAuthTicket.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.extra_fields = []; if (options.defaults) { object.time_expiry = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.authorized_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.authorized_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.authorized_steam_id = options.longs === String ? "0" : 0; + object.authorized_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.authorized_public_ip = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gameserver_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.gameserver_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.gameserver_steam_id = options.longs === String ? "0" : 0; + object.gameserver_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gameserver_net_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.gameserver_net_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.gameserver_net_id = options.longs === String ? "0" : 0; - if (options.bytes === String) + object.gameserver_net_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (options.bytes === $String) object.legacy_signature = ""; else { object.legacy_signature = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.legacy_signature = $util.newBuffer(object.legacy_signature); } object.app_id = 0; object.gameserver_pop_id = 0; object.virtual_port = 0; } - if (message.time_expiry != null && message.hasOwnProperty("time_expiry")) + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) object.time_expiry = message.time_expiry; - if (message.authorized_steam_id != null && message.hasOwnProperty("authorized_steam_id")) - if (typeof message.authorized_steam_id === "number") - object.authorized_steam_id = options.longs === String ? String(message.authorized_steam_id) : message.authorized_steam_id; + if (message.authorized_steam_id != null && $Object.hasOwnProperty.call(message, "authorized_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.authorized_steam_id = typeof message.authorized_steam_id === "number" ? $BigInt(message.authorized_steam_id) : $util.Long.fromBits(message.authorized_steam_id.low >>> 0, message.authorized_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.authorized_steam_id === "number") + object.authorized_steam_id = options.longs === $String ? $String(message.authorized_steam_id) : message.authorized_steam_id; else - object.authorized_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.authorized_steam_id) : options.longs === Number ? new $util.LongBits(message.authorized_steam_id.low >>> 0, message.authorized_steam_id.high >>> 0).toNumber() : message.authorized_steam_id; - if (message.authorized_public_ip != null && message.hasOwnProperty("authorized_public_ip")) + object.authorized_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.authorized_steam_id) : options.longs === $Number ? new $util.LongBits(message.authorized_steam_id.low >>> 0, message.authorized_steam_id.high >>> 0).toNumber(true) : message.authorized_steam_id; + if (message.authorized_public_ip != null && $Object.hasOwnProperty.call(message, "authorized_public_ip")) object.authorized_public_ip = message.authorized_public_ip; - if (message.gameserver_steam_id != null && message.hasOwnProperty("gameserver_steam_id")) - if (typeof message.gameserver_steam_id === "number") - object.gameserver_steam_id = options.longs === String ? String(message.gameserver_steam_id) : message.gameserver_steam_id; + if (message.gameserver_steam_id != null && $Object.hasOwnProperty.call(message, "gameserver_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.gameserver_steam_id = typeof message.gameserver_steam_id === "number" ? $BigInt(message.gameserver_steam_id) : $util.Long.fromBits(message.gameserver_steam_id.low >>> 0, message.gameserver_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.gameserver_steam_id === "number") + object.gameserver_steam_id = options.longs === $String ? $String(message.gameserver_steam_id) : message.gameserver_steam_id; else - object.gameserver_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.gameserver_steam_id) : options.longs === Number ? new $util.LongBits(message.gameserver_steam_id.low >>> 0, message.gameserver_steam_id.high >>> 0).toNumber() : message.gameserver_steam_id; - if (message.gameserver_net_id != null && message.hasOwnProperty("gameserver_net_id")) - if (typeof message.gameserver_net_id === "number") - object.gameserver_net_id = options.longs === String ? String(message.gameserver_net_id) : message.gameserver_net_id; + object.gameserver_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.gameserver_steam_id) : options.longs === $Number ? new $util.LongBits(message.gameserver_steam_id.low >>> 0, message.gameserver_steam_id.high >>> 0).toNumber(true) : message.gameserver_steam_id; + if (message.gameserver_net_id != null && $Object.hasOwnProperty.call(message, "gameserver_net_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.gameserver_net_id = typeof message.gameserver_net_id === "number" ? $BigInt(message.gameserver_net_id) : $util.Long.fromBits(message.gameserver_net_id.low >>> 0, message.gameserver_net_id.high >>> 0, true).toBigInt(); + else if (typeof message.gameserver_net_id === "number") + object.gameserver_net_id = options.longs === $String ? $String(message.gameserver_net_id) : message.gameserver_net_id; else - object.gameserver_net_id = options.longs === String ? $util.Long.prototype.toString.call(message.gameserver_net_id) : options.longs === Number ? new $util.LongBits(message.gameserver_net_id.low >>> 0, message.gameserver_net_id.high >>> 0).toNumber() : message.gameserver_net_id; - if (message.legacy_signature != null && message.hasOwnProperty("legacy_signature")) - object.legacy_signature = options.bytes === String ? $util.base64.encode(message.legacy_signature, 0, message.legacy_signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.legacy_signature) : message.legacy_signature; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.gameserver_net_id = options.longs === $String ? $util.Long.prototype.toString.call(message.gameserver_net_id) : options.longs === $Number ? new $util.LongBits(message.gameserver_net_id.low >>> 0, message.gameserver_net_id.high >>> 0).toNumber(true) : message.gameserver_net_id; + if (message.legacy_signature != null && $Object.hasOwnProperty.call(message, "legacy_signature")) + object.legacy_signature = options.bytes === $String ? $util.base64.encode(message.legacy_signature, 0, message.legacy_signature.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.legacy_signature) : message.legacy_signature; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; if (message.extra_fields && message.extra_fields.length) { - object.extra_fields = []; + object.extra_fields = $Array(message.extra_fields.length); for (var j = 0; j < message.extra_fields.length; ++j) - object.extra_fields[j] = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.toObject(message.extra_fields[j], options); + object.extra_fields[j] = $root.CMsgSteamDatagramRelayAuthTicket.ExtraField.toObject(message.extra_fields[j], options, _depth + 1); } - if (message.gameserver_pop_id != null && message.hasOwnProperty("gameserver_pop_id")) + if (message.gameserver_pop_id != null && $Object.hasOwnProperty.call(message, "gameserver_pop_id")) object.gameserver_pop_id = message.gameserver_pop_id; - if (message.virtual_port != null && message.hasOwnProperty("virtual_port")) + if (message.virtual_port != null && $Object.hasOwnProperty.call(message, "virtual_port")) object.virtual_port = message.virtual_port; return object; }; @@ -17960,36 +22446,63 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramRelayAuthTicket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramRelayAuthTicket.prototype.toJSON = function() { + return CMsgSteamDatagramRelayAuthTicket.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramRelayAuthTicket + * @function getTypeUrl + * @memberof CMsgSteamDatagramRelayAuthTicket + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramRelayAuthTicket.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramRelayAuthTicket"; }; CMsgSteamDatagramRelayAuthTicket.ExtraField = (function() { /** * Properties of an ExtraField. - * @memberof CMsgSteamDatagramRelayAuthTicket - * @interface IExtraField + * @typedef {Object} CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties * @property {string|null} [name] ExtraField name * @property {string|null} [string_value] ExtraField string_value * @property {number|Long|null} [int64_value] ExtraField int64_value * @property {number|Long|null} [fixed64_value] ExtraField fixed64_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtraField. + * @memberof CMsgSteamDatagramRelayAuthTicket + * @interface IExtraField + * @augments CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties + * @deprecated Use CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties instead. + */ + + /** + * Shape of an ExtraField. + * @typedef {CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties} CMsgSteamDatagramRelayAuthTicket.ExtraField.$Shape */ /** * Constructs a new ExtraField. * @memberof CMsgSteamDatagramRelayAuthTicket * @classdesc Represents an ExtraField. - * @implements IExtraField * @constructor - * @param {CMsgSteamDatagramRelayAuthTicket.IExtraField=} [properties] Properties to set + * @param {CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtraField(properties) { + var ExtraField = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtraField name. @@ -18021,17 +22534,21 @@ * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField * @instance */ - ExtraField.prototype.fixed64_value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ExtraField.prototype.fixed64_value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new ExtraField instance using the specified properties. * @function create * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField * @static - * @param {CMsgSteamDatagramRelayAuthTicket.IExtraField=} [properties] Properties to set + * @param {CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField} ExtraField instance + * @type {{ + * (properties: CMsgSteamDatagramRelayAuthTicket.ExtraField.$Shape): CMsgSteamDatagramRelayAuthTicket.ExtraField & CMsgSteamDatagramRelayAuthTicket.ExtraField.$Shape; + * (properties?: CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties): CMsgSteamDatagramRelayAuthTicket.ExtraField; + * }} */ - ExtraField.create = function create(properties) { + ExtraField.create = function(properties) { return new ExtraField(properties); }; @@ -18040,21 +22557,28 @@ * @function encode * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField * @static - * @param {CMsgSteamDatagramRelayAuthTicket.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encode = function encode(message, writer) { + ExtraField.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.string_value); - if (message.int64_value != null && Object.hasOwnProperty.call(message, "int64_value")) + if (message.int64_value != null && $Object.hasOwnProperty.call(message, "int64_value")) writer.uint32(/* id 3, wireType 0 =*/24).sint64(message.int64_value); - if (message.fixed64_value != null && Object.hasOwnProperty.call(message, "fixed64_value")) + if (message.fixed64_value != null && $Object.hasOwnProperty.call(message, "fixed64_value")) writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.fixed64_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18063,12 +22587,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField * @static - * @param {CMsgSteamDatagramRelayAuthTicket.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgSteamDatagramRelayAuthTicket.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtraField.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18078,34 +22602,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField} ExtraField + * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField & CMsgSteamDatagramRelayAuthTicket.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decode = function decode(reader, length) { + ExtraField.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramRelayAuthTicket.ExtraField(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramRelayAuthTicket.ExtraField(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.string_value = reader.string(); - break; - case 3: - message.int64_value = reader.sint64(); - break; - case 5: - message.fixed64_value = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.string_value = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.int64_value = reader.sint64(); + continue; + } + case 5: { + if (wireType !== 1) + break; + message.fixed64_value = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18115,11 +22665,11 @@ * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField} ExtraField + * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField & CMsgSteamDatagramRelayAuthTicket.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decodeDelimited = function decodeDelimited(reader) { + ExtraField.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18133,19 +22683,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtraField.verify = function verify(message) { + ExtraField.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) if (!$util.isString(message.string_value)) return "string_value: string expected"; - if (message.int64_value != null && message.hasOwnProperty("int64_value")) + if (message.int64_value != null && $Object.hasOwnProperty.call(message, "int64_value")) if (!$util.isInteger(message.int64_value) && !(message.int64_value && $util.isInteger(message.int64_value.low) && $util.isInteger(message.int64_value.high))) return "int64_value: integer|Long expected"; - if (message.fixed64_value != null && message.hasOwnProperty("fixed64_value")) + if (message.fixed64_value != null && $Object.hasOwnProperty.call(message, "fixed64_value")) if (!$util.isInteger(message.fixed64_value) && !(message.fixed64_value && $util.isInteger(message.fixed64_value.low) && $util.isInteger(message.fixed64_value.high))) return "fixed64_value: integer|Long expected"; return null; @@ -18159,32 +22713,38 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramRelayAuthTicket.ExtraField} ExtraField */ - ExtraField.fromObject = function fromObject(object) { + ExtraField.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramRelayAuthTicket.ExtraField) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramRelayAuthTicket.ExtraField: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramRelayAuthTicket.ExtraField(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.string_value != null) - message.string_value = String(object.string_value); + message.string_value = $String(object.string_value); if (object.int64_value != null) if ($util.Long) - (message.int64_value = $util.Long.fromValue(object.int64_value)).unsigned = false; + message.int64_value = $util.Long.fromValue(object.int64_value, false); else if (typeof object.int64_value === "string") - message.int64_value = parseInt(object.int64_value, 10); + message.int64_value = $parseInt(object.int64_value, 10); else if (typeof object.int64_value === "number") message.int64_value = object.int64_value; else if (typeof object.int64_value === "object") message.int64_value = new $util.LongBits(object.int64_value.low >>> 0, object.int64_value.high >>> 0).toNumber(); if (object.fixed64_value != null) if ($util.Long) - (message.fixed64_value = $util.Long.fromValue(object.fixed64_value)).unsigned = false; + message.fixed64_value = $util.Long.fromValue(object.fixed64_value, true); else if (typeof object.fixed64_value === "string") - message.fixed64_value = parseInt(object.fixed64_value, 10); + message.fixed64_value = $parseInt(object.fixed64_value, 10); else if (typeof object.fixed64_value === "number") message.fixed64_value = object.fixed64_value; else if (typeof object.fixed64_value === "object") - message.fixed64_value = new $util.LongBits(object.fixed64_value.low >>> 0, object.fixed64_value.high >>> 0).toNumber(); + message.fixed64_value = new $util.LongBits(object.fixed64_value.low >>> 0, object.fixed64_value.high >>> 0).toNumber(true); return message; }; @@ -18197,38 +22757,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtraField.toObject = function toObject(message, options) { + ExtraField.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.string_value = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.int64_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.int64_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.int64_value = options.longs === String ? "0" : 0; + object.int64_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.fixed64_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.fixed64_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.fixed64_value = options.longs === String ? "0" : 0; + object.fixed64_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) object.string_value = message.string_value; - if (message.int64_value != null && message.hasOwnProperty("int64_value")) - if (typeof message.int64_value === "number") - object.int64_value = options.longs === String ? String(message.int64_value) : message.int64_value; + if (message.int64_value != null && $Object.hasOwnProperty.call(message, "int64_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.int64_value = typeof message.int64_value === "number" ? $BigInt(message.int64_value) : $util.Long.fromBits(message.int64_value.low >>> 0, message.int64_value.high >>> 0, false).toBigInt(); + else if (typeof message.int64_value === "number") + object.int64_value = options.longs === $String ? $String(message.int64_value) : message.int64_value; else - object.int64_value = options.longs === String ? $util.Long.prototype.toString.call(message.int64_value) : options.longs === Number ? new $util.LongBits(message.int64_value.low >>> 0, message.int64_value.high >>> 0).toNumber() : message.int64_value; - if (message.fixed64_value != null && message.hasOwnProperty("fixed64_value")) - if (typeof message.fixed64_value === "number") - object.fixed64_value = options.longs === String ? String(message.fixed64_value) : message.fixed64_value; + object.int64_value = options.longs === $String ? $util.Long.prototype.toString.call(message.int64_value) : options.longs === $Number ? new $util.LongBits(message.int64_value.low >>> 0, message.int64_value.high >>> 0).toNumber() : message.int64_value; + if (message.fixed64_value != null && $Object.hasOwnProperty.call(message, "fixed64_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.fixed64_value = typeof message.fixed64_value === "number" ? $BigInt(message.fixed64_value) : $util.Long.fromBits(message.fixed64_value.low >>> 0, message.fixed64_value.high >>> 0, true).toBigInt(); + else if (typeof message.fixed64_value === "number") + object.fixed64_value = options.longs === $String ? $String(message.fixed64_value) : message.fixed64_value; else - object.fixed64_value = options.longs === String ? $util.Long.prototype.toString.call(message.fixed64_value) : options.longs === Number ? new $util.LongBits(message.fixed64_value.low >>> 0, message.fixed64_value.high >>> 0).toNumber() : message.fixed64_value; + object.fixed64_value = options.longs === $String ? $util.Long.prototype.toString.call(message.fixed64_value) : options.longs === $Number ? new $util.LongBits(message.fixed64_value.low >>> 0, message.fixed64_value.high >>> 0).toNumber(true) : message.fixed64_value; return object; }; @@ -18239,8 +22807,22 @@ * @instance * @returns {Object.} JSON object */ - ExtraField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtraField.prototype.toJSON = function() { + return ExtraField.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtraField + * @function getTypeUrl + * @memberof CMsgSteamDatagramRelayAuthTicket.ExtraField + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtraField.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramRelayAuthTicket.ExtraField"; }; return ExtraField; @@ -18253,28 +22835,41 @@ /** * Properties of a CMsgSteamDatagramSignedRelayAuthTicket. - * @exports ICMsgSteamDatagramSignedRelayAuthTicket - * @interface ICMsgSteamDatagramSignedRelayAuthTicket + * @typedef {Object} CMsgSteamDatagramSignedRelayAuthTicket.$Properties * @property {number|Long|null} [reserved_do_not_use] CMsgSteamDatagramSignedRelayAuthTicket reserved_do_not_use * @property {number|Long|null} [key_id] CMsgSteamDatagramSignedRelayAuthTicket key_id * @property {Uint8Array|null} [ticket] CMsgSteamDatagramSignedRelayAuthTicket ticket * @property {Uint8Array|null} [signature] CMsgSteamDatagramSignedRelayAuthTicket signature + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramSignedRelayAuthTicket. + * @exports ICMsgSteamDatagramSignedRelayAuthTicket + * @interface ICMsgSteamDatagramSignedRelayAuthTicket + * @augments CMsgSteamDatagramSignedRelayAuthTicket.$Properties + * @deprecated Use CMsgSteamDatagramSignedRelayAuthTicket.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramSignedRelayAuthTicket. + * @typedef {CMsgSteamDatagramSignedRelayAuthTicket.$Properties} CMsgSteamDatagramSignedRelayAuthTicket.$Shape */ /** * Constructs a new CMsgSteamDatagramSignedRelayAuthTicket. * @exports CMsgSteamDatagramSignedRelayAuthTicket * @classdesc Represents a CMsgSteamDatagramSignedRelayAuthTicket. - * @implements ICMsgSteamDatagramSignedRelayAuthTicket * @constructor - * @param {ICMsgSteamDatagramSignedRelayAuthTicket=} [properties] Properties to set + * @param {CMsgSteamDatagramSignedRelayAuthTicket.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramSignedRelayAuthTicket(properties) { + var CMsgSteamDatagramSignedRelayAuthTicket = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramSignedRelayAuthTicket reserved_do_not_use. @@ -18282,7 +22877,7 @@ * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @instance */ - CMsgSteamDatagramSignedRelayAuthTicket.prototype.reserved_do_not_use = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramSignedRelayAuthTicket.prototype.reserved_do_not_use = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramSignedRelayAuthTicket key_id. @@ -18290,7 +22885,7 @@ * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @instance */ - CMsgSteamDatagramSignedRelayAuthTicket.prototype.key_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramSignedRelayAuthTicket.prototype.key_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramSignedRelayAuthTicket ticket. @@ -18313,10 +22908,14 @@ * @function create * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @static - * @param {ICMsgSteamDatagramSignedRelayAuthTicket=} [properties] Properties to set + * @param {CMsgSteamDatagramSignedRelayAuthTicket.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramSignedRelayAuthTicket} CMsgSteamDatagramSignedRelayAuthTicket instance + * @type {{ + * (properties: CMsgSteamDatagramSignedRelayAuthTicket.$Shape): CMsgSteamDatagramSignedRelayAuthTicket & CMsgSteamDatagramSignedRelayAuthTicket.$Shape; + * (properties?: CMsgSteamDatagramSignedRelayAuthTicket.$Properties): CMsgSteamDatagramSignedRelayAuthTicket; + * }} */ - CMsgSteamDatagramSignedRelayAuthTicket.create = function create(properties) { + CMsgSteamDatagramSignedRelayAuthTicket.create = function(properties) { return new CMsgSteamDatagramSignedRelayAuthTicket(properties); }; @@ -18325,21 +22924,28 @@ * @function encode * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @static - * @param {ICMsgSteamDatagramSignedRelayAuthTicket} message CMsgSteamDatagramSignedRelayAuthTicket message or plain object to encode + * @param {CMsgSteamDatagramSignedRelayAuthTicket.$Properties} message CMsgSteamDatagramSignedRelayAuthTicket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramSignedRelayAuthTicket.encode = function encode(message, writer) { + CMsgSteamDatagramSignedRelayAuthTicket.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.reserved_do_not_use != null && Object.hasOwnProperty.call(message, "reserved_do_not_use")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.reserved_do_not_use != null && $Object.hasOwnProperty.call(message, "reserved_do_not_use")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.reserved_do_not_use); - if (message.key_id != null && Object.hasOwnProperty.call(message, "key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.key_id); - if (message.ticket != null && Object.hasOwnProperty.call(message, "ticket")) + if (message.ticket != null && $Object.hasOwnProperty.call(message, "ticket")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.ticket); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signature); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18348,12 +22954,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @static - * @param {ICMsgSteamDatagramSignedRelayAuthTicket} message CMsgSteamDatagramSignedRelayAuthTicket message or plain object to encode + * @param {CMsgSteamDatagramSignedRelayAuthTicket.$Properties} message CMsgSteamDatagramSignedRelayAuthTicket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramSignedRelayAuthTicket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramSignedRelayAuthTicket.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18363,34 +22969,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramSignedRelayAuthTicket} CMsgSteamDatagramSignedRelayAuthTicket + * @returns {CMsgSteamDatagramSignedRelayAuthTicket & CMsgSteamDatagramSignedRelayAuthTicket.$Shape} CMsgSteamDatagramSignedRelayAuthTicket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramSignedRelayAuthTicket.decode = function decode(reader, length) { + CMsgSteamDatagramSignedRelayAuthTicket.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramSignedRelayAuthTicket(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramSignedRelayAuthTicket(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reserved_do_not_use = reader.fixed64(); - break; - case 2: - message.key_id = reader.fixed64(); - break; - case 3: - message.ticket = reader.bytes(); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.reserved_do_not_use = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.key_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.ticket = reader.bytes(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.signature = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18400,11 +23032,11 @@ * @memberof CMsgSteamDatagramSignedRelayAuthTicket * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramSignedRelayAuthTicket} CMsgSteamDatagramSignedRelayAuthTicket + * @returns {CMsgSteamDatagramSignedRelayAuthTicket & CMsgSteamDatagramSignedRelayAuthTicket.$Shape} CMsgSteamDatagramSignedRelayAuthTicket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramSignedRelayAuthTicket.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramSignedRelayAuthTicket.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18418,19 +23050,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramSignedRelayAuthTicket.verify = function verify(message) { + CMsgSteamDatagramSignedRelayAuthTicket.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reserved_do_not_use != null && message.hasOwnProperty("reserved_do_not_use")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.reserved_do_not_use != null && $Object.hasOwnProperty.call(message, "reserved_do_not_use")) if (!$util.isInteger(message.reserved_do_not_use) && !(message.reserved_do_not_use && $util.isInteger(message.reserved_do_not_use.low) && $util.isInteger(message.reserved_do_not_use.high))) return "reserved_do_not_use: integer|Long expected"; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) if (!$util.isInteger(message.key_id) && !(message.key_id && $util.isInteger(message.key_id.low) && $util.isInteger(message.key_id.high))) return "key_id: integer|Long expected"; - if (message.ticket != null && message.hasOwnProperty("ticket")) + if (message.ticket != null && $Object.hasOwnProperty.call(message, "ticket")) if (!(message.ticket && typeof message.ticket.length === "number" || $util.isString(message.ticket))) return "ticket: buffer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; return null; @@ -18444,37 +23080,43 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramSignedRelayAuthTicket} CMsgSteamDatagramSignedRelayAuthTicket */ - CMsgSteamDatagramSignedRelayAuthTicket.fromObject = function fromObject(object) { + CMsgSteamDatagramSignedRelayAuthTicket.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramSignedRelayAuthTicket) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramSignedRelayAuthTicket: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramSignedRelayAuthTicket(); if (object.reserved_do_not_use != null) if ($util.Long) - (message.reserved_do_not_use = $util.Long.fromValue(object.reserved_do_not_use)).unsigned = false; + message.reserved_do_not_use = $util.Long.fromValue(object.reserved_do_not_use, true); else if (typeof object.reserved_do_not_use === "string") - message.reserved_do_not_use = parseInt(object.reserved_do_not_use, 10); + message.reserved_do_not_use = $parseInt(object.reserved_do_not_use, 10); else if (typeof object.reserved_do_not_use === "number") message.reserved_do_not_use = object.reserved_do_not_use; else if (typeof object.reserved_do_not_use === "object") - message.reserved_do_not_use = new $util.LongBits(object.reserved_do_not_use.low >>> 0, object.reserved_do_not_use.high >>> 0).toNumber(); + message.reserved_do_not_use = new $util.LongBits(object.reserved_do_not_use.low >>> 0, object.reserved_do_not_use.high >>> 0).toNumber(true); if (object.key_id != null) if ($util.Long) - (message.key_id = $util.Long.fromValue(object.key_id)).unsigned = false; + message.key_id = $util.Long.fromValue(object.key_id, true); else if (typeof object.key_id === "string") - message.key_id = parseInt(object.key_id, 10); + message.key_id = $parseInt(object.key_id, 10); else if (typeof object.key_id === "number") message.key_id = object.key_id; else if (typeof object.key_id === "object") - message.key_id = new $util.LongBits(object.key_id.low >>> 0, object.key_id.high >>> 0).toNumber(); + message.key_id = new $util.LongBits(object.key_id.low >>> 0, object.key_id.high >>> 0).toNumber(true); if (object.ticket != null) if (typeof object.ticket === "string") $util.base64.decode(object.ticket, message.ticket = $util.newBuffer($util.base64.length(object.ticket)), 0); - else if (object.ticket.length) + else if (object.ticket.length >= 0) message.ticket = object.ticket; if (object.signature != null) if (typeof object.signature === "string") $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) + else if (object.signature.length >= 0) message.signature = object.signature; return message; }; @@ -18488,50 +23130,58 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramSignedRelayAuthTicket.toObject = function toObject(message, options) { + CMsgSteamDatagramSignedRelayAuthTicket.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_do_not_use = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.reserved_do_not_use = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.reserved_do_not_use = options.longs === String ? "0" : 0; + object.reserved_do_not_use = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.key_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.key_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.key_id = options.longs === String ? "0" : 0; - if (options.bytes === String) + object.key_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (options.bytes === $String) object.ticket = ""; else { object.ticket = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.ticket = $util.newBuffer(object.ticket); } - if (options.bytes === String) + if (options.bytes === $String) object.signature = ""; else { object.signature = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.signature = $util.newBuffer(object.signature); } } - if (message.reserved_do_not_use != null && message.hasOwnProperty("reserved_do_not_use")) - if (typeof message.reserved_do_not_use === "number") - object.reserved_do_not_use = options.longs === String ? String(message.reserved_do_not_use) : message.reserved_do_not_use; + if (message.reserved_do_not_use != null && $Object.hasOwnProperty.call(message, "reserved_do_not_use")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.reserved_do_not_use = typeof message.reserved_do_not_use === "number" ? $BigInt(message.reserved_do_not_use) : $util.Long.fromBits(message.reserved_do_not_use.low >>> 0, message.reserved_do_not_use.high >>> 0, true).toBigInt(); + else if (typeof message.reserved_do_not_use === "number") + object.reserved_do_not_use = options.longs === $String ? $String(message.reserved_do_not_use) : message.reserved_do_not_use; else - object.reserved_do_not_use = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_do_not_use) : options.longs === Number ? new $util.LongBits(message.reserved_do_not_use.low >>> 0, message.reserved_do_not_use.high >>> 0).toNumber() : message.reserved_do_not_use; - if (message.key_id != null && message.hasOwnProperty("key_id")) - if (typeof message.key_id === "number") - object.key_id = options.longs === String ? String(message.key_id) : message.key_id; + object.reserved_do_not_use = options.longs === $String ? $util.Long.prototype.toString.call(message.reserved_do_not_use) : options.longs === $Number ? new $util.LongBits(message.reserved_do_not_use.low >>> 0, message.reserved_do_not_use.high >>> 0).toNumber(true) : message.reserved_do_not_use; + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.key_id = typeof message.key_id === "number" ? $BigInt(message.key_id) : $util.Long.fromBits(message.key_id.low >>> 0, message.key_id.high >>> 0, true).toBigInt(); + else if (typeof message.key_id === "number") + object.key_id = options.longs === $String ? $String(message.key_id) : message.key_id; else - object.key_id = options.longs === String ? $util.Long.prototype.toString.call(message.key_id) : options.longs === Number ? new $util.LongBits(message.key_id.low >>> 0, message.key_id.high >>> 0).toNumber() : message.key_id; - if (message.ticket != null && message.hasOwnProperty("ticket")) - object.ticket = options.bytes === String ? $util.base64.encode(message.ticket, 0, message.ticket.length) : options.bytes === Array ? Array.prototype.slice.call(message.ticket) : message.ticket; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + object.key_id = options.longs === $String ? $util.Long.prototype.toString.call(message.key_id) : options.longs === $Number ? new $util.LongBits(message.key_id.low >>> 0, message.key_id.high >>> 0).toNumber(true) : message.key_id; + if (message.ticket != null && $Object.hasOwnProperty.call(message, "ticket")) + object.ticket = options.bytes === $String ? $util.base64.encode(message.ticket, 0, message.ticket.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.ticket) : message.ticket; + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) + object.signature = options.bytes === $String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.signature) : message.signature; return object; }; @@ -18542,8 +23192,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramSignedRelayAuthTicket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramSignedRelayAuthTicket.prototype.toJSON = function() { + return CMsgSteamDatagramSignedRelayAuthTicket.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramSignedRelayAuthTicket + * @function getTypeUrl + * @memberof CMsgSteamDatagramSignedRelayAuthTicket + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramSignedRelayAuthTicket.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramSignedRelayAuthTicket"; }; return CMsgSteamDatagramSignedRelayAuthTicket; @@ -18553,8 +23217,7 @@ /** * Properties of a CMsgSteamDatagramCertificate. - * @exports ICMsgSteamDatagramCertificate - * @interface ICMsgSteamDatagramCertificate + * @typedef {Object} CMsgSteamDatagramCertificate.$Properties * @property {CMsgSteamDatagramCertificate.EKeyType|null} [key_type] CMsgSteamDatagramCertificate key_type * @property {Uint8Array|null} [key_data] CMsgSteamDatagramCertificate key_data * @property {number|Long|null} [steam_id] CMsgSteamDatagramCertificate steam_id @@ -18562,23 +23225,37 @@ * @property {number|null} [time_created] CMsgSteamDatagramCertificate time_created * @property {number|null} [time_expiry] CMsgSteamDatagramCertificate time_expiry * @property {number|null} [app_id] CMsgSteamDatagramCertificate app_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramCertificate. + * @exports ICMsgSteamDatagramCertificate + * @interface ICMsgSteamDatagramCertificate + * @augments CMsgSteamDatagramCertificate.$Properties + * @deprecated Use CMsgSteamDatagramCertificate.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramCertificate. + * @typedef {CMsgSteamDatagramCertificate.$Properties} CMsgSteamDatagramCertificate.$Shape */ /** * Constructs a new CMsgSteamDatagramCertificate. * @exports CMsgSteamDatagramCertificate * @classdesc Represents a CMsgSteamDatagramCertificate. - * @implements ICMsgSteamDatagramCertificate * @constructor - * @param {ICMsgSteamDatagramCertificate=} [properties] Properties to set + * @param {CMsgSteamDatagramCertificate.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramCertificate(properties) { + var CMsgSteamDatagramCertificate = function (properties) { this.gameserver_datacenter_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramCertificate key_type. @@ -18602,7 +23279,7 @@ * @memberof CMsgSteamDatagramCertificate * @instance */ - CMsgSteamDatagramCertificate.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramCertificate.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramCertificate gameserver_datacenter_ids. @@ -18641,10 +23318,14 @@ * @function create * @memberof CMsgSteamDatagramCertificate * @static - * @param {ICMsgSteamDatagramCertificate=} [properties] Properties to set + * @param {CMsgSteamDatagramCertificate.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramCertificate} CMsgSteamDatagramCertificate instance + * @type {{ + * (properties: CMsgSteamDatagramCertificate.$Shape): CMsgSteamDatagramCertificate & CMsgSteamDatagramCertificate.$Shape; + * (properties?: CMsgSteamDatagramCertificate.$Properties): CMsgSteamDatagramCertificate; + * }} */ - CMsgSteamDatagramCertificate.create = function create(properties) { + CMsgSteamDatagramCertificate.create = function(properties) { return new CMsgSteamDatagramCertificate(properties); }; @@ -18653,28 +23334,35 @@ * @function encode * @memberof CMsgSteamDatagramCertificate * @static - * @param {ICMsgSteamDatagramCertificate} message CMsgSteamDatagramCertificate message or plain object to encode + * @param {CMsgSteamDatagramCertificate.$Properties} message CMsgSteamDatagramCertificate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramCertificate.encode = function encode(message, writer) { + CMsgSteamDatagramCertificate.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.key_type != null && Object.hasOwnProperty.call(message, "key_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.key_type != null && $Object.hasOwnProperty.call(message, "key_type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.key_type); - if (message.key_data != null && Object.hasOwnProperty.call(message, "key_data")) + if (message.key_data != null && $Object.hasOwnProperty.call(message, "key_data")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key_data); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.steam_id); if (message.gameserver_datacenter_ids != null && message.gameserver_datacenter_ids.length) for (var i = 0; i < message.gameserver_datacenter_ids.length; ++i) writer.uint32(/* id 5, wireType 5 =*/45).fixed32(message.gameserver_datacenter_ids[i]); - if (message.time_created != null && Object.hasOwnProperty.call(message, "time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.time_created); - if (message.time_expiry != null && Object.hasOwnProperty.call(message, "time_expiry")) + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) writer.uint32(/* id 9, wireType 5 =*/77).fixed32(message.time_expiry); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.app_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18683,12 +23371,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramCertificate * @static - * @param {ICMsgSteamDatagramCertificate} message CMsgSteamDatagramCertificate message or plain object to encode + * @param {CMsgSteamDatagramCertificate.$Properties} message CMsgSteamDatagramCertificate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramCertificate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramCertificate.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18698,50 +23386,92 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramCertificate} CMsgSteamDatagramCertificate + * @returns {CMsgSteamDatagramCertificate & CMsgSteamDatagramCertificate.$Shape} CMsgSteamDatagramCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramCertificate.decode = function decode(reader, length) { + CMsgSteamDatagramCertificate.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramCertificate(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramCertificate(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key_type = reader.int32(); - break; - case 2: - message.key_data = reader.bytes(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 4: - message.steam_id = reader.fixed64(); - break; - case 5: - if (!(message.gameserver_datacenter_ids && message.gameserver_datacenter_ids.length)) - message.gameserver_datacenter_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.gameserver_datacenter_ids.push(reader.fixed32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgSteamDatagramCertificate.EKeyType[value] !== $undefined) + message.key_type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 2) + break; + message.key_data = reader.bytes(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType === 2) { + if (!(message.gameserver_datacenter_ids && message.gameserver_datacenter_ids.length)) + message.gameserver_datacenter_ids = []; + reader.fixed32s(message.gameserver_datacenter_ids); + continue; + } + if (wireType !== 5) + break; + if (!(message.gameserver_datacenter_ids && message.gameserver_datacenter_ids.length)) + message.gameserver_datacenter_ids = []; message.gameserver_datacenter_ids.push(reader.fixed32()); - break; - case 8: - message.time_created = reader.fixed32(); - break; - case 9: - message.time_expiry = reader.fixed32(); - break; - case 10: - message.app_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 8: { + if (wireType !== 5) + break; + message.time_created = reader.fixed32(); + continue; + } + case 9: { + if (wireType !== 5) + break; + message.time_expiry = reader.fixed32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18751,11 +23481,11 @@ * @memberof CMsgSteamDatagramCertificate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramCertificate} CMsgSteamDatagramCertificate + * @returns {CMsgSteamDatagramCertificate & CMsgSteamDatagramCertificate.$Shape} CMsgSteamDatagramCertificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramCertificate.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramCertificate.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18769,10 +23499,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramCertificate.verify = function verify(message) { + CMsgSteamDatagramCertificate.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key_type != null && message.hasOwnProperty("key_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.key_type != null && $Object.hasOwnProperty.call(message, "key_type")) switch (message.key_type) { default: return "key_type: enum value expected"; @@ -18780,26 +23514,26 @@ case 1: break; } - if (message.key_data != null && message.hasOwnProperty("key_data")) + if (message.key_data != null && $Object.hasOwnProperty.call(message, "key_data")) if (!(message.key_data && typeof message.key_data.length === "number" || $util.isString(message.key_data))) return "key_data: buffer expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.gameserver_datacenter_ids != null && message.hasOwnProperty("gameserver_datacenter_ids")) { - if (!Array.isArray(message.gameserver_datacenter_ids)) + if (message.gameserver_datacenter_ids != null && $Object.hasOwnProperty.call(message, "gameserver_datacenter_ids")) { + if (!$Array.isArray(message.gameserver_datacenter_ids)) return "gameserver_datacenter_ids: array expected"; for (var i = 0; i < message.gameserver_datacenter_ids.length; ++i) if (!$util.isInteger(message.gameserver_datacenter_ids[i])) return "gameserver_datacenter_ids: integer[] expected"; } - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) if (!$util.isInteger(message.time_created)) return "time_created: integer expected"; - if (message.time_expiry != null && message.hasOwnProperty("time_expiry")) + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) if (!$util.isInteger(message.time_expiry)) return "time_expiry: integer expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; return null; @@ -18813,9 +23547,15 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramCertificate} CMsgSteamDatagramCertificate */ - CMsgSteamDatagramCertificate.fromObject = function fromObject(object) { + CMsgSteamDatagramCertificate.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramCertificate) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramCertificate: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramCertificate(); switch (object.key_type) { case "INVALID": @@ -18826,25 +23566,26 @@ case 1: message.key_type = 1; break; + default: } if (object.key_data != null) if (typeof object.key_data === "string") $util.base64.decode(object.key_data, message.key_data = $util.newBuffer($util.base64.length(object.key_data)), 0); - else if (object.key_data.length) + else if (object.key_data.length >= 0) message.key_data = object.key_data; if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.gameserver_datacenter_ids) { - if (!Array.isArray(object.gameserver_datacenter_ids)) - throw TypeError(".CMsgSteamDatagramCertificate.gameserver_datacenter_ids: array expected"); - message.gameserver_datacenter_ids = []; + if (!$Array.isArray(object.gameserver_datacenter_ids)) + throw $TypeError(".CMsgSteamDatagramCertificate.gameserver_datacenter_ids: array expected"); + message.gameserver_datacenter_ids = $Array(object.gameserver_datacenter_ids.length); for (var i = 0; i < object.gameserver_datacenter_ids.length; ++i) message.gameserver_datacenter_ids[i] = object.gameserver_datacenter_ids[i] >>> 0; } @@ -18866,49 +23607,55 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramCertificate.toObject = function toObject(message, options) { + CMsgSteamDatagramCertificate.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.gameserver_datacenter_ids = []; if (options.defaults) { - object.key_type = options.enums === String ? "INVALID" : 0; - if (options.bytes === String) + object.key_type = options.enums === $String ? "INVALID" : 0; + if (options.bytes === $String) object.key_data = ""; else { object.key_data = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.key_data = $util.newBuffer(object.key_data); } if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.time_created = 0; object.time_expiry = 0; object.app_id = 0; } - if (message.key_type != null && message.hasOwnProperty("key_type")) - object.key_type = options.enums === String ? $root.CMsgSteamDatagramCertificate.EKeyType[message.key_type] : message.key_type; - if (message.key_data != null && message.hasOwnProperty("key_data")) - object.key_data = options.bytes === String ? $util.base64.encode(message.key_data, 0, message.key_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.key_data) : message.key_data; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.key_type != null && $Object.hasOwnProperty.call(message, "key_type")) + object.key_type = options.enums === $String ? $root.CMsgSteamDatagramCertificate.EKeyType[message.key_type] === $undefined ? message.key_type : $root.CMsgSteamDatagramCertificate.EKeyType[message.key_type] : message.key_type; + if (message.key_data != null && $Object.hasOwnProperty.call(message, "key_data")) + object.key_data = options.bytes === $String ? $util.base64.encode(message.key_data, 0, message.key_data.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.key_data) : message.key_data; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; if (message.gameserver_datacenter_ids && message.gameserver_datacenter_ids.length) { - object.gameserver_datacenter_ids = []; + object.gameserver_datacenter_ids = $Array(message.gameserver_datacenter_ids.length); for (var j = 0; j < message.gameserver_datacenter_ids.length; ++j) object.gameserver_datacenter_ids[j] = message.gameserver_datacenter_ids[j]; } - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) object.time_created = message.time_created; - if (message.time_expiry != null && message.hasOwnProperty("time_expiry")) + if (message.time_expiry != null && $Object.hasOwnProperty.call(message, "time_expiry")) object.time_expiry = message.time_expiry; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; return object; }; @@ -18920,8 +23667,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramCertificate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramCertificate.prototype.toJSON = function() { + return CMsgSteamDatagramCertificate.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramCertificate + * @function getTypeUrl + * @memberof CMsgSteamDatagramCertificate + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramCertificate.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramCertificate"; }; /** @@ -18932,7 +23693,7 @@ * @property {number} ED25519=1 ED25519 value */ CMsgSteamDatagramCertificate.EKeyType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "INVALID"] = 0; values[valuesById[1] = "ED25519"] = 1; return values; @@ -18945,27 +23706,40 @@ /** * Properties of a CMsgSteamDatagramCertificateSigned. - * @exports ICMsgSteamDatagramCertificateSigned - * @interface ICMsgSteamDatagramCertificateSigned + * @typedef {Object} CMsgSteamDatagramCertificateSigned.$Properties * @property {Uint8Array|null} [cert] CMsgSteamDatagramCertificateSigned cert * @property {number|Long|null} [ca_key_id] CMsgSteamDatagramCertificateSigned ca_key_id * @property {Uint8Array|null} [ca_signature] CMsgSteamDatagramCertificateSigned ca_signature + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSteamDatagramCertificateSigned. + * @exports ICMsgSteamDatagramCertificateSigned + * @interface ICMsgSteamDatagramCertificateSigned + * @augments CMsgSteamDatagramCertificateSigned.$Properties + * @deprecated Use CMsgSteamDatagramCertificateSigned.$Properties instead. + */ + + /** + * Shape of a CMsgSteamDatagramCertificateSigned. + * @typedef {CMsgSteamDatagramCertificateSigned.$Properties} CMsgSteamDatagramCertificateSigned.$Shape */ /** * Constructs a new CMsgSteamDatagramCertificateSigned. * @exports CMsgSteamDatagramCertificateSigned * @classdesc Represents a CMsgSteamDatagramCertificateSigned. - * @implements ICMsgSteamDatagramCertificateSigned * @constructor - * @param {ICMsgSteamDatagramCertificateSigned=} [properties] Properties to set + * @param {CMsgSteamDatagramCertificateSigned.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSteamDatagramCertificateSigned(properties) { + var CMsgSteamDatagramCertificateSigned = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSteamDatagramCertificateSigned cert. @@ -18981,7 +23755,7 @@ * @memberof CMsgSteamDatagramCertificateSigned * @instance */ - CMsgSteamDatagramCertificateSigned.prototype.ca_key_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgSteamDatagramCertificateSigned.prototype.ca_key_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgSteamDatagramCertificateSigned ca_signature. @@ -18996,10 +23770,14 @@ * @function create * @memberof CMsgSteamDatagramCertificateSigned * @static - * @param {ICMsgSteamDatagramCertificateSigned=} [properties] Properties to set + * @param {CMsgSteamDatagramCertificateSigned.$Properties=} [properties] Properties to set * @returns {CMsgSteamDatagramCertificateSigned} CMsgSteamDatagramCertificateSigned instance + * @type {{ + * (properties: CMsgSteamDatagramCertificateSigned.$Shape): CMsgSteamDatagramCertificateSigned & CMsgSteamDatagramCertificateSigned.$Shape; + * (properties?: CMsgSteamDatagramCertificateSigned.$Properties): CMsgSteamDatagramCertificateSigned; + * }} */ - CMsgSteamDatagramCertificateSigned.create = function create(properties) { + CMsgSteamDatagramCertificateSigned.create = function(properties) { return new CMsgSteamDatagramCertificateSigned(properties); }; @@ -19008,19 +23786,26 @@ * @function encode * @memberof CMsgSteamDatagramCertificateSigned * @static - * @param {ICMsgSteamDatagramCertificateSigned} message CMsgSteamDatagramCertificateSigned message or plain object to encode + * @param {CMsgSteamDatagramCertificateSigned.$Properties} message CMsgSteamDatagramCertificateSigned message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramCertificateSigned.encode = function encode(message, writer) { + CMsgSteamDatagramCertificateSigned.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.cert != null && Object.hasOwnProperty.call(message, "cert")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.cert); - if (message.ca_key_id != null && Object.hasOwnProperty.call(message, "ca_key_id")) + if (message.ca_key_id != null && $Object.hasOwnProperty.call(message, "ca_key_id")) writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.ca_key_id); - if (message.ca_signature != null && Object.hasOwnProperty.call(message, "ca_signature")) + if (message.ca_signature != null && $Object.hasOwnProperty.call(message, "ca_signature")) writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.ca_signature); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19029,12 +23814,12 @@ * @function encodeDelimited * @memberof CMsgSteamDatagramCertificateSigned * @static - * @param {ICMsgSteamDatagramCertificateSigned} message CMsgSteamDatagramCertificateSigned message or plain object to encode + * @param {CMsgSteamDatagramCertificateSigned.$Properties} message CMsgSteamDatagramCertificateSigned message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSteamDatagramCertificateSigned.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSteamDatagramCertificateSigned.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19044,31 +23829,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSteamDatagramCertificateSigned} CMsgSteamDatagramCertificateSigned + * @returns {CMsgSteamDatagramCertificateSigned & CMsgSteamDatagramCertificateSigned.$Shape} CMsgSteamDatagramCertificateSigned * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramCertificateSigned.decode = function decode(reader, length) { + CMsgSteamDatagramCertificateSigned.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSteamDatagramCertificateSigned(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSteamDatagramCertificateSigned(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.cert = reader.bytes(); - break; - case 5: - message.ca_key_id = reader.fixed64(); - break; - case 6: - message.ca_signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 4: { + if (wireType !== 2) + break; + message.cert = reader.bytes(); + continue; + } + case 5: { + if (wireType !== 1) + break; + message.ca_key_id = reader.fixed64(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.ca_signature = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19078,11 +23886,11 @@ * @memberof CMsgSteamDatagramCertificateSigned * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSteamDatagramCertificateSigned} CMsgSteamDatagramCertificateSigned + * @returns {CMsgSteamDatagramCertificateSigned & CMsgSteamDatagramCertificateSigned.$Shape} CMsgSteamDatagramCertificateSigned * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSteamDatagramCertificateSigned.decodeDelimited = function decodeDelimited(reader) { + CMsgSteamDatagramCertificateSigned.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19096,16 +23904,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSteamDatagramCertificateSigned.verify = function verify(message) { + CMsgSteamDatagramCertificateSigned.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cert != null && message.hasOwnProperty("cert")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) if (!(message.cert && typeof message.cert.length === "number" || $util.isString(message.cert))) return "cert: buffer expected"; - if (message.ca_key_id != null && message.hasOwnProperty("ca_key_id")) + if (message.ca_key_id != null && $Object.hasOwnProperty.call(message, "ca_key_id")) if (!$util.isInteger(message.ca_key_id) && !(message.ca_key_id && $util.isInteger(message.ca_key_id.low) && $util.isInteger(message.ca_key_id.high))) return "ca_key_id: integer|Long expected"; - if (message.ca_signature != null && message.hasOwnProperty("ca_signature")) + if (message.ca_signature != null && $Object.hasOwnProperty.call(message, "ca_signature")) if (!(message.ca_signature && typeof message.ca_signature.length === "number" || $util.isString(message.ca_signature))) return "ca_signature: buffer expected"; return null; @@ -19119,28 +23931,34 @@ * @param {Object.} object Plain object * @returns {CMsgSteamDatagramCertificateSigned} CMsgSteamDatagramCertificateSigned */ - CMsgSteamDatagramCertificateSigned.fromObject = function fromObject(object) { + CMsgSteamDatagramCertificateSigned.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSteamDatagramCertificateSigned) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSteamDatagramCertificateSigned: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSteamDatagramCertificateSigned(); if (object.cert != null) if (typeof object.cert === "string") $util.base64.decode(object.cert, message.cert = $util.newBuffer($util.base64.length(object.cert)), 0); - else if (object.cert.length) + else if (object.cert.length >= 0) message.cert = object.cert; if (object.ca_key_id != null) if ($util.Long) - (message.ca_key_id = $util.Long.fromValue(object.ca_key_id)).unsigned = false; + message.ca_key_id = $util.Long.fromValue(object.ca_key_id, true); else if (typeof object.ca_key_id === "string") - message.ca_key_id = parseInt(object.ca_key_id, 10); + message.ca_key_id = $parseInt(object.ca_key_id, 10); else if (typeof object.ca_key_id === "number") message.ca_key_id = object.ca_key_id; else if (typeof object.ca_key_id === "object") - message.ca_key_id = new $util.LongBits(object.ca_key_id.low >>> 0, object.ca_key_id.high >>> 0).toNumber(); + message.ca_key_id = new $util.LongBits(object.ca_key_id.low >>> 0, object.ca_key_id.high >>> 0).toNumber(true); if (object.ca_signature != null) if (typeof object.ca_signature === "string") $util.base64.decode(object.ca_signature, message.ca_signature = $util.newBuffer($util.base64.length(object.ca_signature)), 0); - else if (object.ca_signature.length) + else if (object.ca_signature.length >= 0) message.ca_signature = object.ca_signature; return message; }; @@ -19154,40 +23972,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSteamDatagramCertificateSigned.toObject = function toObject(message, options) { + CMsgSteamDatagramCertificateSigned.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - if (options.bytes === String) + if (options.bytes === $String) object.cert = ""; else { object.cert = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.cert = $util.newBuffer(object.cert); } if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.ca_key_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.ca_key_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.ca_key_id = options.longs === String ? "0" : 0; - if (options.bytes === String) + object.ca_key_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (options.bytes === $String) object.ca_signature = ""; else { object.ca_signature = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.ca_signature = $util.newBuffer(object.ca_signature); } } - if (message.cert != null && message.hasOwnProperty("cert")) - object.cert = options.bytes === String ? $util.base64.encode(message.cert, 0, message.cert.length) : options.bytes === Array ? Array.prototype.slice.call(message.cert) : message.cert; - if (message.ca_key_id != null && message.hasOwnProperty("ca_key_id")) - if (typeof message.ca_key_id === "number") - object.ca_key_id = options.longs === String ? String(message.ca_key_id) : message.ca_key_id; + if (message.cert != null && $Object.hasOwnProperty.call(message, "cert")) + object.cert = options.bytes === $String ? $util.base64.encode(message.cert, 0, message.cert.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.cert) : message.cert; + if (message.ca_key_id != null && $Object.hasOwnProperty.call(message, "ca_key_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.ca_key_id = typeof message.ca_key_id === "number" ? $BigInt(message.ca_key_id) : $util.Long.fromBits(message.ca_key_id.low >>> 0, message.ca_key_id.high >>> 0, true).toBigInt(); + else if (typeof message.ca_key_id === "number") + object.ca_key_id = options.longs === $String ? $String(message.ca_key_id) : message.ca_key_id; else - object.ca_key_id = options.longs === String ? $util.Long.prototype.toString.call(message.ca_key_id) : options.longs === Number ? new $util.LongBits(message.ca_key_id.low >>> 0, message.ca_key_id.high >>> 0).toNumber() : message.ca_key_id; - if (message.ca_signature != null && message.hasOwnProperty("ca_signature")) - object.ca_signature = options.bytes === String ? $util.base64.encode(message.ca_signature, 0, message.ca_signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.ca_signature) : message.ca_signature; + object.ca_key_id = options.longs === $String ? $util.Long.prototype.toString.call(message.ca_key_id) : options.longs === $Number ? new $util.LongBits(message.ca_key_id.low >>> 0, message.ca_key_id.high >>> 0).toNumber(true) : message.ca_key_id; + if (message.ca_signature != null && $Object.hasOwnProperty.call(message, "ca_signature")) + object.ca_signature = options.bytes === $String ? $util.base64.encode(message.ca_signature, 0, message.ca_signature.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.ca_signature) : message.ca_signature; return object; }; @@ -19198,8 +24022,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSteamDatagramCertificateSigned.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSteamDatagramCertificateSigned.prototype.toJSON = function() { + return CMsgSteamDatagramCertificateSigned.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSteamDatagramCertificateSigned + * @function getTypeUrl + * @memberof CMsgSteamDatagramCertificateSigned + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSteamDatagramCertificateSigned.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSteamDatagramCertificateSigned"; }; return CMsgSteamDatagramCertificateSigned; diff --git a/protobufs/generated/steammessages.js b/protobufs/generated/steammessages.js index d651c98..87fe3ee 100644 --- a/protobufs/generated/steammessages.js +++ b/protobufs/generated/steammessages.js @@ -1,4 +1,4 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-mixed-operators, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars, default-case, jsdoc/require-param*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) @@ -12,13 +12,14 @@ // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + var $Object = $util.global.Object, $undefined = $util.global.undefined, $Error = $util.global.Error, $TypeError = $util.global.TypeError, $parseInt = $util.global.parseInt, $String = $util.global.String, $Number = $util.global.Number, $BigInt = $util.global.BigInt, $Array = $util.global.Array, $Boolean = $util.global.Boolean, $isFinite = $util.global.isFinite; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); /** * GCProtoBufMsgSrc enum. - * @exports GCProtoBufMsgSrc + * @name GCProtoBufMsgSrc * @enum {number} * @property {number} GCProtoBufMsgSrc_Unspecified=0 GCProtoBufMsgSrc_Unspecified value * @property {number} GCProtoBufMsgSrc_FromSystem=1 GCProtoBufMsgSrc_FromSystem value @@ -27,7 +28,7 @@ * @property {number} GCProtoBufMsgSrc_ReplySystem=4 GCProtoBufMsgSrc_ReplySystem value */ $root.GCProtoBufMsgSrc = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "GCProtoBufMsgSrc_Unspecified"] = 0; values[valuesById[1] = "GCProtoBufMsgSrc_FromSystem"] = 1; values[valuesById[2] = "GCProtoBufMsgSrc_FromSteamID"] = 2; @@ -40,8 +41,7 @@ /** * Properties of a CMsgProtoBufHeader. - * @exports ICMsgProtoBufHeader - * @interface ICMsgProtoBufHeader + * @typedef {Object} CMsgProtoBufHeader.$Properties * @property {number|Long|null} [client_steam_id] CMsgProtoBufHeader client_steam_id * @property {number|null} [client_session_id] CMsgProtoBufHeader client_session_id * @property {number|null} [source_app_id] CMsgProtoBufHeader source_app_id @@ -52,22 +52,36 @@ * @property {string|null} [error_message] CMsgProtoBufHeader error_message * @property {GCProtoBufMsgSrc|null} [gc_msg_src] CMsgProtoBufHeader gc_msg_src * @property {number|null} [gc_dir_index_source] CMsgProtoBufHeader gc_dir_index_source + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgProtoBufHeader. + * @exports ICMsgProtoBufHeader + * @interface ICMsgProtoBufHeader + * @augments CMsgProtoBufHeader.$Properties + * @deprecated Use CMsgProtoBufHeader.$Properties instead. + */ + + /** + * Shape of a CMsgProtoBufHeader. + * @typedef {CMsgProtoBufHeader.$Properties} CMsgProtoBufHeader.$Shape */ /** * Constructs a new CMsgProtoBufHeader. * @exports CMsgProtoBufHeader * @classdesc Represents a CMsgProtoBufHeader. - * @implements ICMsgProtoBufHeader * @constructor - * @param {ICMsgProtoBufHeader=} [properties] Properties to set + * @param {CMsgProtoBufHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgProtoBufHeader(properties) { + var CMsgProtoBufHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgProtoBufHeader client_steam_id. @@ -75,7 +89,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgProtoBufHeader.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgProtoBufHeader client_session_id. @@ -99,7 +113,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.job_id_source = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000; + CMsgProtoBufHeader.prototype.job_id_source = $util.Long ? $util.Long.fromBits(-1,-1,true) : 18446744073709552000; /** * CMsgProtoBufHeader job_id_target. @@ -107,7 +121,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.job_id_target = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000; + CMsgProtoBufHeader.prototype.job_id_target = $util.Long ? $util.Long.fromBits(-1,-1,true) : 18446744073709552000; /** * CMsgProtoBufHeader target_job_name. @@ -154,10 +168,14 @@ * @function create * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader=} [properties] Properties to set + * @param {CMsgProtoBufHeader.$Properties=} [properties] Properties to set * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader instance + * @type {{ + * (properties: CMsgProtoBufHeader.$Shape): CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape; + * (properties?: CMsgProtoBufHeader.$Properties): CMsgProtoBufHeader; + * }} */ - CMsgProtoBufHeader.create = function create(properties) { + CMsgProtoBufHeader.create = function(properties) { return new CMsgProtoBufHeader(properties); }; @@ -166,33 +184,40 @@ * @function encode * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader} message CMsgProtoBufHeader message or plain object to encode + * @param {CMsgProtoBufHeader.$Properties} message CMsgProtoBufHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoBufHeader.encode = function encode(message, writer) { + CMsgProtoBufHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.client_steam_id != null && Object.hasOwnProperty.call(message, "client_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.client_steam_id); - if (message.client_session_id != null && Object.hasOwnProperty.call(message, "client_session_id")) + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.client_session_id); - if (message.source_app_id != null && Object.hasOwnProperty.call(message, "source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.source_app_id); - if (message.job_id_source != null && Object.hasOwnProperty.call(message, "job_id_source")) + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) writer.uint32(/* id 10, wireType 1 =*/81).fixed64(message.job_id_source); - if (message.job_id_target != null && Object.hasOwnProperty.call(message, "job_id_target")) + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) writer.uint32(/* id 11, wireType 1 =*/89).fixed64(message.job_id_target); - if (message.target_job_name != null && Object.hasOwnProperty.call(message, "target_job_name")) + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.target_job_name); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.eresult); - if (message.error_message != null && Object.hasOwnProperty.call(message, "error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) writer.uint32(/* id 14, wireType 2 =*/114).string(message.error_message); - if (message.gc_msg_src != null && Object.hasOwnProperty.call(message, "gc_msg_src")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) writer.uint32(/* id 200, wireType 0 =*/1600).int32(message.gc_msg_src); - if (message.gc_dir_index_source != null && Object.hasOwnProperty.call(message, "gc_dir_index_source")) + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) writer.uint32(/* id 201, wireType 0 =*/1608).uint32(message.gc_dir_index_source); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -201,12 +226,12 @@ * @function encodeDelimited * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader} message CMsgProtoBufHeader message or plain object to encode + * @param {CMsgProtoBufHeader.$Properties} message CMsgProtoBufHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoBufHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgProtoBufHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -216,52 +241,102 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader + * @returns {CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape} CMsgProtoBufHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoBufHeader.decode = function decode(reader, length) { + CMsgProtoBufHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgProtoBufHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgProtoBufHeader(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_steam_id = reader.fixed64(); - break; - case 2: - message.client_session_id = reader.int32(); - break; - case 3: - message.source_app_id = reader.uint32(); - break; - case 10: - message.job_id_source = reader.fixed64(); - break; - case 11: - message.job_id_target = reader.fixed64(); - break; - case 12: - message.target_job_name = reader.string(); - break; - case 13: - message.eresult = reader.int32(); - break; - case 14: - message.error_message = reader.string(); - break; - case 200: - message.gc_msg_src = reader.int32(); - break; - case 201: - message.gc_dir_index_source = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.client_steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.client_session_id = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.source_app_id = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 1) + break; + message.job_id_source = reader.fixed64(); + continue; + } + case 11: { + if (wireType !== 1) + break; + message.job_id_target = reader.fixed64(); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.target_job_name = reader.string(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 14: { + if (wireType !== 2) + break; + message.error_message = reader.string(); + continue; + } + case 200: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.GCProtoBufMsgSrc[value] !== $undefined) + message.gc_msg_src = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 201: { + if (wireType !== 0) + break; + message.gc_dir_index_source = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -271,11 +346,11 @@ * @memberof CMsgProtoBufHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader + * @returns {CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape} CMsgProtoBufHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoBufHeader.decodeDelimited = function decodeDelimited(reader) { + CMsgProtoBufHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -289,34 +364,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgProtoBufHeader.verify = function verify(message) { + CMsgProtoBufHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) if (!$util.isInteger(message.client_steam_id) && !(message.client_steam_id && $util.isInteger(message.client_steam_id.low) && $util.isInteger(message.client_steam_id.high))) return "client_steam_id: integer|Long expected"; - if (message.client_session_id != null && message.hasOwnProperty("client_session_id")) + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) if (!$util.isInteger(message.client_session_id)) return "client_session_id: integer expected"; - if (message.source_app_id != null && message.hasOwnProperty("source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) if (!$util.isInteger(message.source_app_id)) return "source_app_id: integer expected"; - if (message.job_id_source != null && message.hasOwnProperty("job_id_source")) + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) if (!$util.isInteger(message.job_id_source) && !(message.job_id_source && $util.isInteger(message.job_id_source.low) && $util.isInteger(message.job_id_source.high))) return "job_id_source: integer|Long expected"; - if (message.job_id_target != null && message.hasOwnProperty("job_id_target")) + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) if (!$util.isInteger(message.job_id_target) && !(message.job_id_target && $util.isInteger(message.job_id_target.low) && $util.isInteger(message.job_id_target.high))) return "job_id_target: integer|Long expected"; - if (message.target_job_name != null && message.hasOwnProperty("target_job_name")) + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) if (!$util.isString(message.target_job_name)) return "target_job_name: string expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) if (!$util.isString(message.error_message)) return "error_message: string expected"; - if (message.gc_msg_src != null && message.hasOwnProperty("gc_msg_src")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) switch (message.gc_msg_src) { default: return "gc_msg_src: enum value expected"; @@ -327,7 +406,7 @@ case 4: break; } - if (message.gc_dir_index_source != null && message.hasOwnProperty("gc_dir_index_source")) + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) if (!$util.isInteger(message.gc_dir_index_source)) return "gc_dir_index_source: integer expected"; return null; @@ -341,47 +420,53 @@ * @param {Object.} object Plain object * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader */ - CMsgProtoBufHeader.fromObject = function fromObject(object) { + CMsgProtoBufHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgProtoBufHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgProtoBufHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgProtoBufHeader(); if (object.client_steam_id != null) if ($util.Long) - (message.client_steam_id = $util.Long.fromValue(object.client_steam_id)).unsigned = false; + message.client_steam_id = $util.Long.fromValue(object.client_steam_id, true); else if (typeof object.client_steam_id === "string") - message.client_steam_id = parseInt(object.client_steam_id, 10); + message.client_steam_id = $parseInt(object.client_steam_id, 10); else if (typeof object.client_steam_id === "number") message.client_steam_id = object.client_steam_id; else if (typeof object.client_steam_id === "object") - message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(); + message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(true); if (object.client_session_id != null) message.client_session_id = object.client_session_id | 0; if (object.source_app_id != null) message.source_app_id = object.source_app_id >>> 0; if (object.job_id_source != null) if ($util.Long) - (message.job_id_source = $util.Long.fromValue(object.job_id_source)).unsigned = false; + message.job_id_source = $util.Long.fromValue(object.job_id_source, true); else if (typeof object.job_id_source === "string") - message.job_id_source = parseInt(object.job_id_source, 10); + message.job_id_source = $parseInt(object.job_id_source, 10); else if (typeof object.job_id_source === "number") message.job_id_source = object.job_id_source; else if (typeof object.job_id_source === "object") - message.job_id_source = new $util.LongBits(object.job_id_source.low >>> 0, object.job_id_source.high >>> 0).toNumber(); + message.job_id_source = new $util.LongBits(object.job_id_source.low >>> 0, object.job_id_source.high >>> 0).toNumber(true); if (object.job_id_target != null) if ($util.Long) - (message.job_id_target = $util.Long.fromValue(object.job_id_target)).unsigned = false; + message.job_id_target = $util.Long.fromValue(object.job_id_target, true); else if (typeof object.job_id_target === "string") - message.job_id_target = parseInt(object.job_id_target, 10); + message.job_id_target = $parseInt(object.job_id_target, 10); else if (typeof object.job_id_target === "number") message.job_id_target = object.job_id_target; else if (typeof object.job_id_target === "object") - message.job_id_target = new $util.LongBits(object.job_id_target.low >>> 0, object.job_id_target.high >>> 0).toNumber(); + message.job_id_target = new $util.LongBits(object.job_id_target.low >>> 0, object.job_id_target.high >>> 0).toNumber(true); if (object.target_job_name != null) - message.target_job_name = String(object.target_job_name); + message.target_job_name = $String(object.target_job_name); if (object.eresult != null) message.eresult = object.eresult | 0; if (object.error_message != null) - message.error_message = String(object.error_message); + message.error_message = $String(object.error_message); switch (object.gc_msg_src) { case "GCProtoBufMsgSrc_Unspecified": case 0: @@ -403,6 +488,7 @@ case 4: message.gc_msg_src = 4; break; + default: } if (object.gc_dir_index_source != null) message.gc_dir_index_source = object.gc_dir_index_source >>> 0; @@ -418,62 +504,72 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgProtoBufHeader.toObject = function toObject(message, options) { + CMsgProtoBufHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.client_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.client_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.client_steam_id = options.longs === String ? "0" : 0; + object.client_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.client_session_id = 0; object.source_app_id = 0; if ($util.Long) { - var long = new $util.Long(-1, 2147483647, false); - object.job_id_source = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(-1, -1, true); + object.job_id_source = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.job_id_source = options.longs === String ? "9223372036854775807" : 9223372036854776000; + object.job_id_source = options.longs === $String ? "18446744073709551615" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("18446744073709551615") : 18446744073709552000; if ($util.Long) { - var long = new $util.Long(-1, 2147483647, false); - object.job_id_target = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(-1, -1, true); + object.job_id_target = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.job_id_target = options.longs === String ? "9223372036854775807" : 9223372036854776000; + object.job_id_target = options.longs === $String ? "18446744073709551615" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("18446744073709551615") : 18446744073709552000; object.target_job_name = ""; object.eresult = 2; object.error_message = ""; - object.gc_msg_src = options.enums === String ? "GCProtoBufMsgSrc_Unspecified" : 0; + object.gc_msg_src = options.enums === $String ? "GCProtoBufMsgSrc_Unspecified" : 0; object.gc_dir_index_source = 0; } - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) - if (typeof message.client_steam_id === "number") - object.client_steam_id = options.longs === String ? String(message.client_steam_id) : message.client_steam_id; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.client_steam_id = typeof message.client_steam_id === "number" ? $BigInt(message.client_steam_id) : $util.Long.fromBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.client_steam_id === "number") + object.client_steam_id = options.longs === $String ? $String(message.client_steam_id) : message.client_steam_id; else - object.client_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber() : message.client_steam_id; - if (message.client_session_id != null && message.hasOwnProperty("client_session_id")) + object.client_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === $Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber(true) : message.client_steam_id; + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) object.client_session_id = message.client_session_id; - if (message.source_app_id != null && message.hasOwnProperty("source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) object.source_app_id = message.source_app_id; - if (message.job_id_source != null && message.hasOwnProperty("job_id_source")) - if (typeof message.job_id_source === "number") - object.job_id_source = options.longs === String ? String(message.job_id_source) : message.job_id_source; + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.job_id_source = typeof message.job_id_source === "number" ? $BigInt(message.job_id_source) : $util.Long.fromBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0, true).toBigInt(); + else if (typeof message.job_id_source === "number") + object.job_id_source = options.longs === $String ? $String(message.job_id_source) : message.job_id_source; else - object.job_id_source = options.longs === String ? $util.Long.prototype.toString.call(message.job_id_source) : options.longs === Number ? new $util.LongBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0).toNumber() : message.job_id_source; - if (message.job_id_target != null && message.hasOwnProperty("job_id_target")) - if (typeof message.job_id_target === "number") - object.job_id_target = options.longs === String ? String(message.job_id_target) : message.job_id_target; + object.job_id_source = options.longs === $String ? $util.Long.prototype.toString.call(message.job_id_source) : options.longs === $Number ? new $util.LongBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0).toNumber(true) : message.job_id_source; + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.job_id_target = typeof message.job_id_target === "number" ? $BigInt(message.job_id_target) : $util.Long.fromBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0, true).toBigInt(); + else if (typeof message.job_id_target === "number") + object.job_id_target = options.longs === $String ? $String(message.job_id_target) : message.job_id_target; else - object.job_id_target = options.longs === String ? $util.Long.prototype.toString.call(message.job_id_target) : options.longs === Number ? new $util.LongBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0).toNumber() : message.job_id_target; - if (message.target_job_name != null && message.hasOwnProperty("target_job_name")) + object.job_id_target = options.longs === $String ? $util.Long.prototype.toString.call(message.job_id_target) : options.longs === $Number ? new $util.LongBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0).toNumber(true) : message.job_id_target; + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) object.target_job_name = message.target_job_name; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) object.error_message = message.error_message; - if (message.gc_msg_src != null && message.hasOwnProperty("gc_msg_src")) - object.gc_msg_src = options.enums === String ? $root.GCProtoBufMsgSrc[message.gc_msg_src] : message.gc_msg_src; - if (message.gc_dir_index_source != null && message.hasOwnProperty("gc_dir_index_source")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) + object.gc_msg_src = options.enums === $String ? $root.GCProtoBufMsgSrc[message.gc_msg_src] === $undefined ? message.gc_msg_src : $root.GCProtoBufMsgSrc[message.gc_msg_src] : message.gc_msg_src; + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) object.gc_dir_index_source = message.gc_dir_index_source; return object; }; @@ -485,8 +581,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgProtoBufHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgProtoBufHeader.prototype.toJSON = function() { + return CMsgProtoBufHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgProtoBufHeader + * @function getTypeUrl + * @memberof CMsgProtoBufHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgProtoBufHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgProtoBufHeader"; }; return CMsgProtoBufHeader; @@ -496,29 +606,42 @@ /** * Properties of a CMsgWebAPIKey. - * @exports ICMsgWebAPIKey - * @interface ICMsgWebAPIKey + * @typedef {Object} CMsgWebAPIKey.$Properties * @property {number|null} [status] CMsgWebAPIKey status * @property {number|null} [account_id] CMsgWebAPIKey account_id * @property {number|null} [publisher_group_id] CMsgWebAPIKey publisher_group_id * @property {number|null} [key_id] CMsgWebAPIKey key_id * @property {string|null} [domain] CMsgWebAPIKey domain + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgWebAPIKey. + * @exports ICMsgWebAPIKey + * @interface ICMsgWebAPIKey + * @augments CMsgWebAPIKey.$Properties + * @deprecated Use CMsgWebAPIKey.$Properties instead. + */ + + /** + * Shape of a CMsgWebAPIKey. + * @typedef {CMsgWebAPIKey.$Properties} CMsgWebAPIKey.$Shape */ /** * Constructs a new CMsgWebAPIKey. * @exports CMsgWebAPIKey * @classdesc Represents a CMsgWebAPIKey. - * @implements ICMsgWebAPIKey * @constructor - * @param {ICMsgWebAPIKey=} [properties] Properties to set + * @param {CMsgWebAPIKey.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgWebAPIKey(properties) { + var CMsgWebAPIKey = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgWebAPIKey status. @@ -565,10 +688,14 @@ * @function create * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey=} [properties] Properties to set + * @param {CMsgWebAPIKey.$Properties=} [properties] Properties to set * @returns {CMsgWebAPIKey} CMsgWebAPIKey instance + * @type {{ + * (properties: CMsgWebAPIKey.$Shape): CMsgWebAPIKey & CMsgWebAPIKey.$Shape; + * (properties?: CMsgWebAPIKey.$Properties): CMsgWebAPIKey; + * }} */ - CMsgWebAPIKey.create = function create(properties) { + CMsgWebAPIKey.create = function(properties) { return new CMsgWebAPIKey(properties); }; @@ -577,23 +704,30 @@ * @function encode * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey} message CMsgWebAPIKey message or plain object to encode + * @param {CMsgWebAPIKey.$Properties} message CMsgWebAPIKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIKey.encode = function encode(message, writer) { + CMsgWebAPIKey.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.status); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_id); - if (message.publisher_group_id != null && Object.hasOwnProperty.call(message, "publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.publisher_group_id); - if (message.key_id != null && Object.hasOwnProperty.call(message, "key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.key_id); - if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.domain); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -602,12 +736,12 @@ * @function encodeDelimited * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey} message CMsgWebAPIKey message or plain object to encode + * @param {CMsgWebAPIKey.$Properties} message CMsgWebAPIKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgWebAPIKey.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -617,37 +751,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgWebAPIKey} CMsgWebAPIKey + * @returns {CMsgWebAPIKey & CMsgWebAPIKey.$Shape} CMsgWebAPIKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIKey.decode = function decode(reader, length) { + CMsgWebAPIKey.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgWebAPIKey(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgWebAPIKey(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.uint32(); - break; - case 2: - message.account_id = reader.uint32(); - break; - case 3: - message.publisher_group_id = reader.uint32(); - break; - case 4: - message.key_id = reader.uint32(); - break; - case 5: - message.domain = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.status = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.publisher_group_id = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.key_id = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.domain = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -657,11 +820,11 @@ * @memberof CMsgWebAPIKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgWebAPIKey} CMsgWebAPIKey + * @returns {CMsgWebAPIKey & CMsgWebAPIKey.$Shape} CMsgWebAPIKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIKey.decodeDelimited = function decodeDelimited(reader) { + CMsgWebAPIKey.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -675,22 +838,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgWebAPIKey.verify = function verify(message) { + CMsgWebAPIKey.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) if (!$util.isInteger(message.status)) return "status: integer expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.publisher_group_id != null && message.hasOwnProperty("publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) if (!$util.isInteger(message.publisher_group_id)) return "publisher_group_id: integer expected"; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) if (!$util.isInteger(message.key_id)) return "key_id: integer expected"; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) if (!$util.isString(message.domain)) return "domain: string expected"; return null; @@ -704,9 +871,15 @@ * @param {Object.} object Plain object * @returns {CMsgWebAPIKey} CMsgWebAPIKey */ - CMsgWebAPIKey.fromObject = function fromObject(object) { + CMsgWebAPIKey.fromObject = function (object, _depth) { if (object instanceof $root.CMsgWebAPIKey) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgWebAPIKey: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgWebAPIKey(); if (object.status != null) message.status = object.status >>> 0; @@ -717,7 +890,7 @@ if (object.key_id != null) message.key_id = object.key_id >>> 0; if (object.domain != null) - message.domain = String(object.domain); + message.domain = $String(object.domain); return message; }; @@ -730,9 +903,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgWebAPIKey.toObject = function toObject(message, options) { + CMsgWebAPIKey.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.status = 255; @@ -741,15 +918,15 @@ object.key_id = 0; object.domain = ""; } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.publisher_group_id != null && message.hasOwnProperty("publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) object.publisher_group_id = message.publisher_group_id; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) object.key_id = message.key_id; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) object.domain = message.domain; return object; }; @@ -761,8 +938,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgWebAPIKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgWebAPIKey.prototype.toJSON = function() { + return CMsgWebAPIKey.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgWebAPIKey + * @function getTypeUrl + * @memberof CMsgWebAPIKey + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgWebAPIKey.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgWebAPIKey"; }; return CMsgWebAPIKey; @@ -772,35 +963,48 @@ /** * Properties of a CMsgHttpRequest. - * @exports ICMsgHttpRequest - * @interface ICMsgHttpRequest + * @typedef {Object} CMsgHttpRequest.$Properties * @property {number|null} [request_method] CMsgHttpRequest request_method * @property {string|null} [hostname] CMsgHttpRequest hostname * @property {string|null} [url] CMsgHttpRequest url - * @property {Array.|null} [headers] CMsgHttpRequest headers - * @property {Array.|null} [get_params] CMsgHttpRequest get_params - * @property {Array.|null} [post_params] CMsgHttpRequest post_params + * @property {Array.|null} [headers] CMsgHttpRequest headers + * @property {Array.|null} [get_params] CMsgHttpRequest get_params + * @property {Array.|null} [post_params] CMsgHttpRequest post_params * @property {Uint8Array|null} [body] CMsgHttpRequest body * @property {number|null} [absolute_timeout] CMsgHttpRequest absolute_timeout + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHttpRequest. + * @exports ICMsgHttpRequest + * @interface ICMsgHttpRequest + * @augments CMsgHttpRequest.$Properties + * @deprecated Use CMsgHttpRequest.$Properties instead. + */ + + /** + * Shape of a CMsgHttpRequest. + * @typedef {CMsgHttpRequest.$Properties} CMsgHttpRequest.$Shape */ /** * Constructs a new CMsgHttpRequest. * @exports CMsgHttpRequest * @classdesc Represents a CMsgHttpRequest. - * @implements ICMsgHttpRequest * @constructor - * @param {ICMsgHttpRequest=} [properties] Properties to set + * @param {CMsgHttpRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHttpRequest(properties) { + var CMsgHttpRequest = function (properties) { this.headers = []; this.get_params = []; this.post_params = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHttpRequest request_method. @@ -828,7 +1032,7 @@ /** * CMsgHttpRequest headers. - * @member {Array.} headers + * @member {Array.} headers * @memberof CMsgHttpRequest * @instance */ @@ -836,7 +1040,7 @@ /** * CMsgHttpRequest get_params. - * @member {Array.} get_params + * @member {Array.} get_params * @memberof CMsgHttpRequest * @instance */ @@ -844,7 +1048,7 @@ /** * CMsgHttpRequest post_params. - * @member {Array.} post_params + * @member {Array.} post_params * @memberof CMsgHttpRequest * @instance */ @@ -871,10 +1075,14 @@ * @function create * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest=} [properties] Properties to set + * @param {CMsgHttpRequest.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest} CMsgHttpRequest instance + * @type {{ + * (properties: CMsgHttpRequest.$Shape): CMsgHttpRequest & CMsgHttpRequest.$Shape; + * (properties?: CMsgHttpRequest.$Properties): CMsgHttpRequest; + * }} */ - CMsgHttpRequest.create = function create(properties) { + CMsgHttpRequest.create = function(properties) { return new CMsgHttpRequest(properties); }; @@ -883,32 +1091,39 @@ * @function encode * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest} message CMsgHttpRequest message or plain object to encode + * @param {CMsgHttpRequest.$Properties} message CMsgHttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpRequest.encode = function encode(message, writer) { + CMsgHttpRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.request_method != null && Object.hasOwnProperty.call(message, "request_method")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.request_method); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.hostname); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.url); if (message.headers != null && message.headers.length) for (var i = 0; i < message.headers.length; ++i) - $root.CMsgHttpRequest.RequestHeader.encode(message.headers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgHttpRequest.RequestHeader.encode(message.headers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.get_params != null && message.get_params.length) for (var i = 0; i < message.get_params.length; ++i) - $root.CMsgHttpRequest.QueryParam.encode(message.get_params[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.CMsgHttpRequest.QueryParam.encode(message.get_params[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.post_params != null && message.post_params.length) for (var i = 0; i < message.post_params.length; ++i) - $root.CMsgHttpRequest.QueryParam.encode(message.post_params[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.CMsgHttpRequest.QueryParam.encode(message.post_params[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.body); - if (message.absolute_timeout != null && Object.hasOwnProperty.call(message, "absolute_timeout")) + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.absolute_timeout); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -917,12 +1132,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest} message CMsgHttpRequest message or plain object to encode + * @param {CMsgHttpRequest.$Properties} message CMsgHttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHttpRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -932,52 +1147,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest} CMsgHttpRequest + * @returns {CMsgHttpRequest & CMsgHttpRequest.$Shape} CMsgHttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpRequest.decode = function decode(reader, length) { + CMsgHttpRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.request_method = reader.uint32(); - break; - case 2: - message.hostname = reader.string(); - break; - case 3: - message.url = reader.string(); - break; - case 4: - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.CMsgHttpRequest.RequestHeader.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.get_params && message.get_params.length)) - message.get_params = []; - message.get_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.post_params && message.post_params.length)) - message.post_params = []; - message.post_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32())); - break; - case 7: - message.body = reader.bytes(); - break; - case 8: - message.absolute_timeout = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.request_method = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.hostname = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.url = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push($root.CMsgHttpRequest.RequestHeader.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.get_params && message.get_params.length)) + message.get_params = []; + message.get_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.post_params && message.post_params.length)) + message.post_params = []; + message.post_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.body = reader.bytes(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.absolute_timeout = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -987,11 +1240,11 @@ * @memberof CMsgHttpRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest} CMsgHttpRequest + * @returns {CMsgHttpRequest & CMsgHttpRequest.$Shape} CMsgHttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgHttpRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1005,49 +1258,53 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHttpRequest.verify = function verify(message) { + CMsgHttpRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.request_method != null && message.hasOwnProperty("request_method")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) if (!$util.isInteger(message.request_method)) return "request_method: integer expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) if (!$util.isString(message.hostname)) return "hostname: string expected"; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) + if (message.headers != null && $Object.hasOwnProperty.call(message, "headers")) { + if (!$Array.isArray(message.headers)) return "headers: array expected"; for (var i = 0; i < message.headers.length; ++i) { - var error = $root.CMsgHttpRequest.RequestHeader.verify(message.headers[i]); + var error = $root.CMsgHttpRequest.RequestHeader.verify(message.headers[i], _depth + 1); if (error) return "headers." + error; } } - if (message.get_params != null && message.hasOwnProperty("get_params")) { - if (!Array.isArray(message.get_params)) + if (message.get_params != null && $Object.hasOwnProperty.call(message, "get_params")) { + if (!$Array.isArray(message.get_params)) return "get_params: array expected"; for (var i = 0; i < message.get_params.length; ++i) { - var error = $root.CMsgHttpRequest.QueryParam.verify(message.get_params[i]); + var error = $root.CMsgHttpRequest.QueryParam.verify(message.get_params[i], _depth + 1); if (error) return "get_params." + error; } } - if (message.post_params != null && message.hasOwnProperty("post_params")) { - if (!Array.isArray(message.post_params)) + if (message.post_params != null && $Object.hasOwnProperty.call(message, "post_params")) { + if (!$Array.isArray(message.post_params)) return "post_params: array expected"; for (var i = 0; i < message.post_params.length; ++i) { - var error = $root.CMsgHttpRequest.QueryParam.verify(message.post_params[i]); + var error = $root.CMsgHttpRequest.QueryParam.verify(message.post_params[i], _depth + 1); if (error) return "post_params." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) return "body: buffer expected"; - if (message.absolute_timeout != null && message.hasOwnProperty("absolute_timeout")) + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) if (!$util.isInteger(message.absolute_timeout)) return "absolute_timeout: integer expected"; return null; @@ -1061,50 +1318,56 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest} CMsgHttpRequest */ - CMsgHttpRequest.fromObject = function fromObject(object) { + CMsgHttpRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest(); if (object.request_method != null) message.request_method = object.request_method >>> 0; if (object.hostname != null) - message.hostname = String(object.hostname); + message.hostname = $String(object.hostname); if (object.url != null) - message.url = String(object.url); + message.url = $String(object.url); if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".CMsgHttpRequest.headers: array expected"); - message.headers = []; + if (!$Array.isArray(object.headers)) + throw $TypeError(".CMsgHttpRequest.headers: array expected"); + message.headers = $Array(object.headers.length); for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".CMsgHttpRequest.headers: object expected"); - message.headers[i] = $root.CMsgHttpRequest.RequestHeader.fromObject(object.headers[i]); + if (!$util.isObject(object.headers[i])) + throw $TypeError(".CMsgHttpRequest.headers: object expected"); + message.headers[i] = $root.CMsgHttpRequest.RequestHeader.fromObject(object.headers[i], _depth + 1); } } if (object.get_params) { - if (!Array.isArray(object.get_params)) - throw TypeError(".CMsgHttpRequest.get_params: array expected"); - message.get_params = []; + if (!$Array.isArray(object.get_params)) + throw $TypeError(".CMsgHttpRequest.get_params: array expected"); + message.get_params = $Array(object.get_params.length); for (var i = 0; i < object.get_params.length; ++i) { - if (typeof object.get_params[i] !== "object") - throw TypeError(".CMsgHttpRequest.get_params: object expected"); - message.get_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.get_params[i]); + if (!$util.isObject(object.get_params[i])) + throw $TypeError(".CMsgHttpRequest.get_params: object expected"); + message.get_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.get_params[i], _depth + 1); } } if (object.post_params) { - if (!Array.isArray(object.post_params)) - throw TypeError(".CMsgHttpRequest.post_params: array expected"); - message.post_params = []; + if (!$Array.isArray(object.post_params)) + throw $TypeError(".CMsgHttpRequest.post_params: array expected"); + message.post_params = $Array(object.post_params.length); for (var i = 0; i < object.post_params.length; ++i) { - if (typeof object.post_params[i] !== "object") - throw TypeError(".CMsgHttpRequest.post_params: object expected"); - message.post_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.post_params[i]); + if (!$util.isObject(object.post_params[i])) + throw $TypeError(".CMsgHttpRequest.post_params: object expected"); + message.post_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.post_params[i], _depth + 1); } } if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; if (object.absolute_timeout != null) message.absolute_timeout = object.absolute_timeout >>> 0; @@ -1120,9 +1383,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHttpRequest.toObject = function toObject(message, options) { + CMsgHttpRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.headers = []; @@ -1133,39 +1400,39 @@ object.request_method = 0; object.hostname = ""; object.url = ""; - if (options.bytes === String) + if (options.bytes === $String) object.body = ""; else { object.body = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.body = $util.newBuffer(object.body); } object.absolute_timeout = 0; } - if (message.request_method != null && message.hasOwnProperty("request_method")) + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) object.request_method = message.request_method; - if (message.hostname != null && message.hasOwnProperty("hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) object.hostname = message.hostname; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) object.url = message.url; if (message.headers && message.headers.length) { - object.headers = []; + object.headers = $Array(message.headers.length); for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.CMsgHttpRequest.RequestHeader.toObject(message.headers[j], options); + object.headers[j] = $root.CMsgHttpRequest.RequestHeader.toObject(message.headers[j], options, _depth + 1); } if (message.get_params && message.get_params.length) { - object.get_params = []; + object.get_params = $Array(message.get_params.length); for (var j = 0; j < message.get_params.length; ++j) - object.get_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.get_params[j], options); + object.get_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.get_params[j], options, _depth + 1); } if (message.post_params && message.post_params.length) { - object.post_params = []; + object.post_params = $Array(message.post_params.length); for (var j = 0; j < message.post_params.length; ++j) - object.post_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.post_params[j], options); + object.post_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.post_params[j], options, _depth + 1); } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; - if (message.absolute_timeout != null && message.hasOwnProperty("absolute_timeout")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = options.bytes === $String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.body) : message.body; + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) object.absolute_timeout = message.absolute_timeout; return object; }; @@ -1177,34 +1444,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgHttpRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHttpRequest.prototype.toJSON = function() { + return CMsgHttpRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHttpRequest + * @function getTypeUrl + * @memberof CMsgHttpRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHttpRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest"; }; CMsgHttpRequest.RequestHeader = (function() { /** * Properties of a RequestHeader. - * @memberof CMsgHttpRequest - * @interface IRequestHeader + * @typedef {Object} CMsgHttpRequest.RequestHeader.$Properties * @property {string|null} [name] RequestHeader name * @property {string|null} [value] RequestHeader value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RequestHeader. + * @memberof CMsgHttpRequest + * @interface IRequestHeader + * @augments CMsgHttpRequest.RequestHeader.$Properties + * @deprecated Use CMsgHttpRequest.RequestHeader.$Properties instead. + */ + + /** + * Shape of a RequestHeader. + * @typedef {CMsgHttpRequest.RequestHeader.$Properties} CMsgHttpRequest.RequestHeader.$Shape */ /** * Constructs a new RequestHeader. * @memberof CMsgHttpRequest * @classdesc Represents a RequestHeader. - * @implements IRequestHeader * @constructor - * @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set + * @param {CMsgHttpRequest.RequestHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function RequestHeader(properties) { + var RequestHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * RequestHeader name. @@ -1227,10 +1521,14 @@ * @function create * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set + * @param {CMsgHttpRequest.RequestHeader.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest.RequestHeader} RequestHeader instance + * @type {{ + * (properties: CMsgHttpRequest.RequestHeader.$Shape): CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape; + * (properties?: CMsgHttpRequest.RequestHeader.$Properties): CMsgHttpRequest.RequestHeader; + * }} */ - RequestHeader.create = function create(properties) { + RequestHeader.create = function(properties) { return new RequestHeader(properties); }; @@ -1239,17 +1537,24 @@ * @function encode * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader} message RequestHeader message or plain object to encode + * @param {CMsgHttpRequest.RequestHeader.$Properties} message RequestHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestHeader.encode = function encode(message, writer) { + RequestHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1258,12 +1563,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader} message RequestHeader message or plain object to encode + * @param {CMsgHttpRequest.RequestHeader.$Properties} message RequestHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RequestHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1273,28 +1578,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest.RequestHeader} RequestHeader + * @returns {CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape} RequestHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestHeader.decode = function decode(reader, length) { + RequestHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest.RequestHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest.RequestHeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1304,11 +1629,11 @@ * @memberof CMsgHttpRequest.RequestHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest.RequestHeader} RequestHeader + * @returns {CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape} RequestHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestHeader.decodeDelimited = function decodeDelimited(reader) { + RequestHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1322,13 +1647,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RequestHeader.verify = function verify(message) { + RequestHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -1342,14 +1671,20 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest.RequestHeader} RequestHeader */ - RequestHeader.fromObject = function fromObject(object) { + RequestHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest.RequestHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest.RequestHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest.RequestHeader(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -1362,17 +1697,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RequestHeader.toObject = function toObject(message, options) { + RequestHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -1384,8 +1723,22 @@ * @instance * @returns {Object.} JSON object */ - RequestHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + RequestHeader.prototype.toJSON = function() { + return RequestHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RequestHeader + * @function getTypeUrl + * @memberof CMsgHttpRequest.RequestHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RequestHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest.RequestHeader"; }; return RequestHeader; @@ -1395,26 +1748,39 @@ /** * Properties of a QueryParam. - * @memberof CMsgHttpRequest - * @interface IQueryParam + * @typedef {Object} CMsgHttpRequest.QueryParam.$Properties * @property {string|null} [name] QueryParam name * @property {Uint8Array|null} [value] QueryParam value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a QueryParam. + * @memberof CMsgHttpRequest + * @interface IQueryParam + * @augments CMsgHttpRequest.QueryParam.$Properties + * @deprecated Use CMsgHttpRequest.QueryParam.$Properties instead. + */ + + /** + * Shape of a QueryParam. + * @typedef {CMsgHttpRequest.QueryParam.$Properties} CMsgHttpRequest.QueryParam.$Shape */ /** * Constructs a new QueryParam. * @memberof CMsgHttpRequest * @classdesc Represents a QueryParam. - * @implements IQueryParam * @constructor - * @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set + * @param {CMsgHttpRequest.QueryParam.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function QueryParam(properties) { + var QueryParam = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * QueryParam name. @@ -1437,10 +1803,14 @@ * @function create * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set + * @param {CMsgHttpRequest.QueryParam.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest.QueryParam} QueryParam instance + * @type {{ + * (properties: CMsgHttpRequest.QueryParam.$Shape): CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape; + * (properties?: CMsgHttpRequest.QueryParam.$Properties): CMsgHttpRequest.QueryParam; + * }} */ - QueryParam.create = function create(properties) { + QueryParam.create = function(properties) { return new QueryParam(properties); }; @@ -1449,17 +1819,24 @@ * @function encode * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam} message QueryParam message or plain object to encode + * @param {CMsgHttpRequest.QueryParam.$Properties} message QueryParam message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParam.encode = function encode(message, writer) { + QueryParam.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1468,12 +1845,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam} message QueryParam message or plain object to encode + * @param {CMsgHttpRequest.QueryParam.$Properties} message QueryParam message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueryParam.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1483,28 +1860,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest.QueryParam} QueryParam + * @returns {CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape} QueryParam * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParam.decode = function decode(reader, length) { + QueryParam.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest.QueryParam(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest.QueryParam(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1514,11 +1911,11 @@ * @memberof CMsgHttpRequest.QueryParam * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest.QueryParam} QueryParam + * @returns {CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape} QueryParam * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParam.decodeDelimited = function decodeDelimited(reader) { + QueryParam.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1532,13 +1929,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryParam.verify = function verify(message) { + QueryParam.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -1552,16 +1953,22 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest.QueryParam} QueryParam */ - QueryParam.fromObject = function fromObject(object) { + QueryParam.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest.QueryParam) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest.QueryParam: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest.QueryParam(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -1575,24 +1982,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryParam.toObject = function toObject(message, options) { + QueryParam.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -1603,8 +2014,22 @@ * @instance * @returns {Object.} JSON object */ - QueryParam.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + QueryParam.prototype.toJSON = function() { + return QueryParam.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for QueryParam + * @function getTypeUrl + * @memberof CMsgHttpRequest.QueryParam + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + QueryParam.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest.QueryParam"; }; return QueryParam; @@ -1617,31 +2042,44 @@ /** * Properties of a CMsgWebAPIRequest. - * @exports ICMsgWebAPIRequest - * @interface ICMsgWebAPIRequest + * @typedef {Object} CMsgWebAPIRequest.$Properties * @property {string|null} [UNUSED_job_name] CMsgWebAPIRequest UNUSED_job_name * @property {string|null} [interface_name] CMsgWebAPIRequest interface_name * @property {string|null} [method_name] CMsgWebAPIRequest method_name * @property {number|null} [version] CMsgWebAPIRequest version - * @property {ICMsgWebAPIKey|null} [api_key] CMsgWebAPIRequest api_key - * @property {ICMsgHttpRequest|null} [request] CMsgWebAPIRequest request + * @property {CMsgWebAPIKey.$Properties|null} [api_key] CMsgWebAPIRequest api_key + * @property {CMsgHttpRequest.$Properties|null} [request] CMsgWebAPIRequest request * @property {number|null} [routing_app_id] CMsgWebAPIRequest routing_app_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgWebAPIRequest. + * @exports ICMsgWebAPIRequest + * @interface ICMsgWebAPIRequest + * @augments CMsgWebAPIRequest.$Properties + * @deprecated Use CMsgWebAPIRequest.$Properties instead. + */ + + /** + * Shape of a CMsgWebAPIRequest. + * @typedef {CMsgWebAPIRequest.$Properties} CMsgWebAPIRequest.$Shape */ /** * Constructs a new CMsgWebAPIRequest. * @exports CMsgWebAPIRequest * @classdesc Represents a CMsgWebAPIRequest. - * @implements ICMsgWebAPIRequest * @constructor - * @param {ICMsgWebAPIRequest=} [properties] Properties to set + * @param {CMsgWebAPIRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgWebAPIRequest(properties) { + var CMsgWebAPIRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgWebAPIRequest UNUSED_job_name. @@ -1677,7 +2115,7 @@ /** * CMsgWebAPIRequest api_key. - * @member {ICMsgWebAPIKey|null|undefined} api_key + * @member {CMsgWebAPIKey.$Properties|null|undefined} api_key * @memberof CMsgWebAPIRequest * @instance */ @@ -1685,7 +2123,7 @@ /** * CMsgWebAPIRequest request. - * @member {ICMsgHttpRequest|null|undefined} request + * @member {CMsgHttpRequest.$Properties|null|undefined} request * @memberof CMsgWebAPIRequest * @instance */ @@ -1704,10 +2142,14 @@ * @function create * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest=} [properties] Properties to set + * @param {CMsgWebAPIRequest.$Properties=} [properties] Properties to set * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest instance + * @type {{ + * (properties: CMsgWebAPIRequest.$Shape): CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape; + * (properties?: CMsgWebAPIRequest.$Properties): CMsgWebAPIRequest; + * }} */ - CMsgWebAPIRequest.create = function create(properties) { + CMsgWebAPIRequest.create = function(properties) { return new CMsgWebAPIRequest(properties); }; @@ -1716,27 +2158,34 @@ * @function encode * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest} message CMsgWebAPIRequest message or plain object to encode + * @param {CMsgWebAPIRequest.$Properties} message CMsgWebAPIRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIRequest.encode = function encode(message, writer) { + CMsgWebAPIRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.UNUSED_job_name != null && Object.hasOwnProperty.call(message, "UNUSED_job_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.UNUSED_job_name); - if (message.interface_name != null && Object.hasOwnProperty.call(message, "interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.interface_name); - if (message.method_name != null && Object.hasOwnProperty.call(message, "method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.method_name); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.version); - if (message.api_key != null && Object.hasOwnProperty.call(message, "api_key")) - $root.CMsgWebAPIKey.encode(message.api_key, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.request != null && Object.hasOwnProperty.call(message, "request")) - $root.CMsgHttpRequest.encode(message.request, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.routing_app_id != null && Object.hasOwnProperty.call(message, "routing_app_id")) + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) + $root.CMsgWebAPIKey.encode(message.api_key, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) + $root.CMsgHttpRequest.encode(message.request, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.routing_app_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1745,12 +2194,12 @@ * @function encodeDelimited * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest} message CMsgWebAPIRequest message or plain object to encode + * @param {CMsgWebAPIRequest.$Properties} message CMsgWebAPIRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgWebAPIRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1760,43 +2209,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest + * @returns {CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape} CMsgWebAPIRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIRequest.decode = function decode(reader, length) { + CMsgWebAPIRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgWebAPIRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgWebAPIRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.UNUSED_job_name = reader.string(); - break; - case 2: - message.interface_name = reader.string(); - break; - case 3: - message.method_name = reader.string(); - break; - case 4: - message.version = reader.uint32(); - break; - case 5: - message.api_key = $root.CMsgWebAPIKey.decode(reader, reader.uint32()); - break; - case 6: - message.request = $root.CMsgHttpRequest.decode(reader, reader.uint32()); - break; - case 7: - message.routing_app_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.UNUSED_job_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.interface_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.method_name = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.api_key = $root.CMsgWebAPIKey.decode(reader, reader.uint32(), $undefined, _depth + 1, message.api_key); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.request = $root.CMsgHttpRequest.decode(reader, reader.uint32(), $undefined, _depth + 1, message.request); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.routing_app_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1806,11 +2290,11 @@ * @memberof CMsgWebAPIRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest + * @returns {CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape} CMsgWebAPIRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgWebAPIRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1824,32 +2308,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgWebAPIRequest.verify = function verify(message) { + CMsgWebAPIRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.UNUSED_job_name != null && message.hasOwnProperty("UNUSED_job_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) if (!$util.isString(message.UNUSED_job_name)) return "UNUSED_job_name: string expected"; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) if (!$util.isString(message.interface_name)) return "interface_name: string expected"; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) if (!$util.isString(message.method_name)) return "method_name: string expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.api_key != null && message.hasOwnProperty("api_key")) { - var error = $root.CMsgWebAPIKey.verify(message.api_key); + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) { + var error = $root.CMsgWebAPIKey.verify(message.api_key, _depth + 1); if (error) return "api_key." + error; } - if (message.request != null && message.hasOwnProperty("request")) { - var error = $root.CMsgHttpRequest.verify(message.request); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) { + var error = $root.CMsgHttpRequest.verify(message.request, _depth + 1); if (error) return "request." + error; } - if (message.routing_app_id != null && message.hasOwnProperty("routing_app_id")) + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) if (!$util.isInteger(message.routing_app_id)) return "routing_app_id: integer expected"; return null; @@ -1863,27 +2351,33 @@ * @param {Object.} object Plain object * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest */ - CMsgWebAPIRequest.fromObject = function fromObject(object) { + CMsgWebAPIRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgWebAPIRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgWebAPIRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgWebAPIRequest(); if (object.UNUSED_job_name != null) - message.UNUSED_job_name = String(object.UNUSED_job_name); + message.UNUSED_job_name = $String(object.UNUSED_job_name); if (object.interface_name != null) - message.interface_name = String(object.interface_name); + message.interface_name = $String(object.interface_name); if (object.method_name != null) - message.method_name = String(object.method_name); + message.method_name = $String(object.method_name); if (object.version != null) message.version = object.version >>> 0; if (object.api_key != null) { - if (typeof object.api_key !== "object") - throw TypeError(".CMsgWebAPIRequest.api_key: object expected"); - message.api_key = $root.CMsgWebAPIKey.fromObject(object.api_key); + if (!$util.isObject(object.api_key)) + throw $TypeError(".CMsgWebAPIRequest.api_key: object expected"); + message.api_key = $root.CMsgWebAPIKey.fromObject(object.api_key, _depth + 1); } if (object.request != null) { - if (typeof object.request !== "object") - throw TypeError(".CMsgWebAPIRequest.request: object expected"); - message.request = $root.CMsgHttpRequest.fromObject(object.request); + if (!$util.isObject(object.request)) + throw $TypeError(".CMsgWebAPIRequest.request: object expected"); + message.request = $root.CMsgHttpRequest.fromObject(object.request, _depth + 1); } if (object.routing_app_id != null) message.routing_app_id = object.routing_app_id >>> 0; @@ -1899,9 +2393,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgWebAPIRequest.toObject = function toObject(message, options) { + CMsgWebAPIRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.UNUSED_job_name = ""; @@ -1912,19 +2410,19 @@ object.request = null; object.routing_app_id = 0; } - if (message.UNUSED_job_name != null && message.hasOwnProperty("UNUSED_job_name")) + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) object.UNUSED_job_name = message.UNUSED_job_name; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) object.interface_name = message.interface_name; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) object.method_name = message.method_name; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.api_key != null && message.hasOwnProperty("api_key")) - object.api_key = $root.CMsgWebAPIKey.toObject(message.api_key, options); - if (message.request != null && message.hasOwnProperty("request")) - object.request = $root.CMsgHttpRequest.toObject(message.request, options); - if (message.routing_app_id != null && message.hasOwnProperty("routing_app_id")) + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) + object.api_key = $root.CMsgWebAPIKey.toObject(message.api_key, options, _depth + 1); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) + object.request = $root.CMsgHttpRequest.toObject(message.request, options, _depth + 1); + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) object.routing_app_id = message.routing_app_id; return object; }; @@ -1936,8 +2434,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgWebAPIRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgWebAPIRequest.prototype.toJSON = function() { + return CMsgWebAPIRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgWebAPIRequest + * @function getTypeUrl + * @memberof CMsgWebAPIRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgWebAPIRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgWebAPIRequest"; }; return CMsgWebAPIRequest; @@ -1947,28 +2459,41 @@ /** * Properties of a CMsgHttpResponse. - * @exports ICMsgHttpResponse - * @interface ICMsgHttpResponse + * @typedef {Object} CMsgHttpResponse.$Properties * @property {number|null} [status_code] CMsgHttpResponse status_code - * @property {Array.|null} [headers] CMsgHttpResponse headers + * @property {Array.|null} [headers] CMsgHttpResponse headers * @property {Uint8Array|null} [body] CMsgHttpResponse body + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHttpResponse. + * @exports ICMsgHttpResponse + * @interface ICMsgHttpResponse + * @augments CMsgHttpResponse.$Properties + * @deprecated Use CMsgHttpResponse.$Properties instead. + */ + + /** + * Shape of a CMsgHttpResponse. + * @typedef {CMsgHttpResponse.$Properties} CMsgHttpResponse.$Shape */ /** * Constructs a new CMsgHttpResponse. * @exports CMsgHttpResponse * @classdesc Represents a CMsgHttpResponse. - * @implements ICMsgHttpResponse * @constructor - * @param {ICMsgHttpResponse=} [properties] Properties to set + * @param {CMsgHttpResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHttpResponse(properties) { + var CMsgHttpResponse = function (properties) { this.headers = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHttpResponse status_code. @@ -1980,7 +2505,7 @@ /** * CMsgHttpResponse headers. - * @member {Array.} headers + * @member {Array.} headers * @memberof CMsgHttpResponse * @instance */ @@ -1999,10 +2524,14 @@ * @function create * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse=} [properties] Properties to set + * @param {CMsgHttpResponse.$Properties=} [properties] Properties to set * @returns {CMsgHttpResponse} CMsgHttpResponse instance + * @type {{ + * (properties: CMsgHttpResponse.$Shape): CMsgHttpResponse & CMsgHttpResponse.$Shape; + * (properties?: CMsgHttpResponse.$Properties): CMsgHttpResponse; + * }} */ - CMsgHttpResponse.create = function create(properties) { + CMsgHttpResponse.create = function(properties) { return new CMsgHttpResponse(properties); }; @@ -2011,20 +2540,27 @@ * @function encode * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse} message CMsgHttpResponse message or plain object to encode + * @param {CMsgHttpResponse.$Properties} message CMsgHttpResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpResponse.encode = function encode(message, writer) { + CMsgHttpResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.status_code); if (message.headers != null && message.headers.length) for (var i = 0; i < message.headers.length; ++i) - $root.CMsgHttpResponse.ResponseHeader.encode(message.headers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.CMsgHttpResponse.ResponseHeader.encode(message.headers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.body); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2033,12 +2569,12 @@ * @function encodeDelimited * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse} message CMsgHttpResponse message or plain object to encode + * @param {CMsgHttpResponse.$Properties} message CMsgHttpResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHttpResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2048,33 +2584,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpResponse} CMsgHttpResponse + * @returns {CMsgHttpResponse & CMsgHttpResponse.$Shape} CMsgHttpResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpResponse.decode = function decode(reader, length) { + CMsgHttpResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status_code = reader.uint32(); - break; - case 2: - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.CMsgHttpResponse.ResponseHeader.decode(reader, reader.uint32())); - break; - case 3: - message.body = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.status_code = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push($root.CMsgHttpResponse.ResponseHeader.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.body = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2084,11 +2643,11 @@ * @memberof CMsgHttpResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpResponse} CMsgHttpResponse + * @returns {CMsgHttpResponse & CMsgHttpResponse.$Shape} CMsgHttpResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgHttpResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2102,22 +2661,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHttpResponse.verify = function verify(message) { + CMsgHttpResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status_code != null && message.hasOwnProperty("status_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) if (!$util.isInteger(message.status_code)) return "status_code: integer expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) + if (message.headers != null && $Object.hasOwnProperty.call(message, "headers")) { + if (!$Array.isArray(message.headers)) return "headers: array expected"; for (var i = 0; i < message.headers.length; ++i) { - var error = $root.CMsgHttpResponse.ResponseHeader.verify(message.headers[i]); + var error = $root.CMsgHttpResponse.ResponseHeader.verify(message.headers[i], _depth + 1); if (error) return "headers." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) return "body: buffer expected"; return null; @@ -2131,26 +2694,32 @@ * @param {Object.} object Plain object * @returns {CMsgHttpResponse} CMsgHttpResponse */ - CMsgHttpResponse.fromObject = function fromObject(object) { + CMsgHttpResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpResponse(); if (object.status_code != null) message.status_code = object.status_code >>> 0; if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".CMsgHttpResponse.headers: array expected"); - message.headers = []; + if (!$Array.isArray(object.headers)) + throw $TypeError(".CMsgHttpResponse.headers: array expected"); + message.headers = $Array(object.headers.length); for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".CMsgHttpResponse.headers: object expected"); - message.headers[i] = $root.CMsgHttpResponse.ResponseHeader.fromObject(object.headers[i]); + if (!$util.isObject(object.headers[i])) + throw $TypeError(".CMsgHttpResponse.headers: object expected"); + message.headers[i] = $root.CMsgHttpResponse.ResponseHeader.fromObject(object.headers[i], _depth + 1); } } if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; return message; }; @@ -2164,31 +2733,35 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHttpResponse.toObject = function toObject(message, options) { + CMsgHttpResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.headers = []; if (options.defaults) { object.status_code = 0; - if (options.bytes === String) + if (options.bytes === $String) object.body = ""; else { object.body = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.body = $util.newBuffer(object.body); } } - if (message.status_code != null && message.hasOwnProperty("status_code")) + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) object.status_code = message.status_code; if (message.headers && message.headers.length) { - object.headers = []; + object.headers = $Array(message.headers.length); for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.CMsgHttpResponse.ResponseHeader.toObject(message.headers[j], options); + object.headers[j] = $root.CMsgHttpResponse.ResponseHeader.toObject(message.headers[j], options, _depth + 1); } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = options.bytes === $String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.body) : message.body; return object; }; @@ -2199,34 +2772,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgHttpResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHttpResponse.prototype.toJSON = function() { + return CMsgHttpResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHttpResponse + * @function getTypeUrl + * @memberof CMsgHttpResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHttpResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpResponse"; }; CMsgHttpResponse.ResponseHeader = (function() { /** * Properties of a ResponseHeader. - * @memberof CMsgHttpResponse - * @interface IResponseHeader + * @typedef {Object} CMsgHttpResponse.ResponseHeader.$Properties * @property {string|null} [name] ResponseHeader name * @property {string|null} [value] ResponseHeader value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ResponseHeader. + * @memberof CMsgHttpResponse + * @interface IResponseHeader + * @augments CMsgHttpResponse.ResponseHeader.$Properties + * @deprecated Use CMsgHttpResponse.ResponseHeader.$Properties instead. + */ + + /** + * Shape of a ResponseHeader. + * @typedef {CMsgHttpResponse.ResponseHeader.$Properties} CMsgHttpResponse.ResponseHeader.$Shape */ /** * Constructs a new ResponseHeader. * @memberof CMsgHttpResponse * @classdesc Represents a ResponseHeader. - * @implements IResponseHeader * @constructor - * @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set + * @param {CMsgHttpResponse.ResponseHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ResponseHeader(properties) { + var ResponseHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ResponseHeader name. @@ -2249,10 +2849,14 @@ * @function create * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set + * @param {CMsgHttpResponse.ResponseHeader.$Properties=} [properties] Properties to set * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader instance + * @type {{ + * (properties: CMsgHttpResponse.ResponseHeader.$Shape): CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape; + * (properties?: CMsgHttpResponse.ResponseHeader.$Properties): CMsgHttpResponse.ResponseHeader; + * }} */ - ResponseHeader.create = function create(properties) { + ResponseHeader.create = function(properties) { return new ResponseHeader(properties); }; @@ -2261,17 +2865,24 @@ * @function encode * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader} message ResponseHeader message or plain object to encode + * @param {CMsgHttpResponse.ResponseHeader.$Properties} message ResponseHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseHeader.encode = function encode(message, writer) { + ResponseHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2280,12 +2891,12 @@ * @function encodeDelimited * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader} message ResponseHeader message or plain object to encode + * @param {CMsgHttpResponse.ResponseHeader.$Properties} message ResponseHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ResponseHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2295,28 +2906,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader + * @returns {CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape} ResponseHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseHeader.decode = function decode(reader, length) { + ResponseHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpResponse.ResponseHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpResponse.ResponseHeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2326,11 +2957,11 @@ * @memberof CMsgHttpResponse.ResponseHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader + * @returns {CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape} ResponseHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseHeader.decodeDelimited = function decodeDelimited(reader) { + ResponseHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2344,13 +2975,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseHeader.verify = function verify(message) { + ResponseHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -2364,14 +2999,20 @@ * @param {Object.} object Plain object * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader */ - ResponseHeader.fromObject = function fromObject(object) { + ResponseHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpResponse.ResponseHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpResponse.ResponseHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpResponse.ResponseHeader(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -2384,17 +3025,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseHeader.toObject = function toObject(message, options) { + ResponseHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -2406,8 +3051,22 @@ * @instance * @returns {Object.} JSON object */ - ResponseHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ResponseHeader.prototype.toJSON = function() { + return ResponseHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ResponseHeader + * @function getTypeUrl + * @memberof CMsgHttpResponse.ResponseHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ResponseHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpResponse.ResponseHeader"; }; return ResponseHeader; @@ -2420,26 +3079,39 @@ /** * Properties of a CMsgAMFindAccounts. - * @exports ICMsgAMFindAccounts - * @interface ICMsgAMFindAccounts + * @typedef {Object} CMsgAMFindAccounts.$Properties * @property {number|null} [search_type] CMsgAMFindAccounts search_type * @property {string|null} [search_string] CMsgAMFindAccounts search_string + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMFindAccounts. + * @exports ICMsgAMFindAccounts + * @interface ICMsgAMFindAccounts + * @augments CMsgAMFindAccounts.$Properties + * @deprecated Use CMsgAMFindAccounts.$Properties instead. + */ + + /** + * Shape of a CMsgAMFindAccounts. + * @typedef {CMsgAMFindAccounts.$Properties} CMsgAMFindAccounts.$Shape */ /** * Constructs a new CMsgAMFindAccounts. * @exports CMsgAMFindAccounts * @classdesc Represents a CMsgAMFindAccounts. - * @implements ICMsgAMFindAccounts * @constructor - * @param {ICMsgAMFindAccounts=} [properties] Properties to set + * @param {CMsgAMFindAccounts.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMFindAccounts(properties) { + var CMsgAMFindAccounts = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMFindAccounts search_type. @@ -2462,10 +3134,14 @@ * @function create * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts=} [properties] Properties to set + * @param {CMsgAMFindAccounts.$Properties=} [properties] Properties to set * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts instance + * @type {{ + * (properties: CMsgAMFindAccounts.$Shape): CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape; + * (properties?: CMsgAMFindAccounts.$Properties): CMsgAMFindAccounts; + * }} */ - CMsgAMFindAccounts.create = function create(properties) { + CMsgAMFindAccounts.create = function(properties) { return new CMsgAMFindAccounts(properties); }; @@ -2474,17 +3150,24 @@ * @function encode * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts} message CMsgAMFindAccounts message or plain object to encode + * @param {CMsgAMFindAccounts.$Properties} message CMsgAMFindAccounts message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccounts.encode = function encode(message, writer) { + CMsgAMFindAccounts.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.search_type != null && Object.hasOwnProperty.call(message, "search_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.search_type); - if (message.search_string != null && Object.hasOwnProperty.call(message, "search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.search_string); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2493,12 +3176,12 @@ * @function encodeDelimited * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts} message CMsgAMFindAccounts message or plain object to encode + * @param {CMsgAMFindAccounts.$Properties} message CMsgAMFindAccounts message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccounts.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMFindAccounts.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2508,28 +3191,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts + * @returns {CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape} CMsgAMFindAccounts * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccounts.decode = function decode(reader, length) { + CMsgAMFindAccounts.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMFindAccounts(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMFindAccounts(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.search_type = reader.uint32(); - break; - case 2: - message.search_string = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.search_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.search_string = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2539,11 +3242,11 @@ * @memberof CMsgAMFindAccounts * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts + * @returns {CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape} CMsgAMFindAccounts * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccounts.decodeDelimited = function decodeDelimited(reader) { + CMsgAMFindAccounts.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2557,13 +3260,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMFindAccounts.verify = function verify(message) { + CMsgAMFindAccounts.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.search_type != null && message.hasOwnProperty("search_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) if (!$util.isInteger(message.search_type)) return "search_type: integer expected"; - if (message.search_string != null && message.hasOwnProperty("search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) if (!$util.isString(message.search_string)) return "search_string: string expected"; return null; @@ -2577,14 +3284,20 @@ * @param {Object.} object Plain object * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts */ - CMsgAMFindAccounts.fromObject = function fromObject(object) { + CMsgAMFindAccounts.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMFindAccounts) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMFindAccounts: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMFindAccounts(); if (object.search_type != null) message.search_type = object.search_type >>> 0; if (object.search_string != null) - message.search_string = String(object.search_string); + message.search_string = $String(object.search_string); return message; }; @@ -2597,17 +3310,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMFindAccounts.toObject = function toObject(message, options) { + CMsgAMFindAccounts.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.search_type = 0; object.search_string = ""; } - if (message.search_type != null && message.hasOwnProperty("search_type")) + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) object.search_type = message.search_type; - if (message.search_string != null && message.hasOwnProperty("search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) object.search_string = message.search_string; return object; }; @@ -2619,8 +3336,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMFindAccounts.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMFindAccounts.prototype.toJSON = function() { + return CMsgAMFindAccounts.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMFindAccounts + * @function getTypeUrl + * @memberof CMsgAMFindAccounts + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMFindAccounts.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMFindAccounts"; }; return CMsgAMFindAccounts; @@ -2628,28 +3359,41 @@ $root.CMsgAMFindAccountsResponse = (function() { + /** + * Properties of a CMsgAMFindAccountsResponse. + * @typedef {Object} CMsgAMFindAccountsResponse.$Properties + * @property {Array.|null} [steam_id] CMsgAMFindAccountsResponse steam_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMFindAccountsResponse. * @exports ICMsgAMFindAccountsResponse * @interface ICMsgAMFindAccountsResponse - * @property {Array.|null} [steam_id] CMsgAMFindAccountsResponse steam_id + * @augments CMsgAMFindAccountsResponse.$Properties + * @deprecated Use CMsgAMFindAccountsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMFindAccountsResponse. + * @typedef {CMsgAMFindAccountsResponse.$Properties} CMsgAMFindAccountsResponse.$Shape */ /** * Constructs a new CMsgAMFindAccountsResponse. * @exports CMsgAMFindAccountsResponse * @classdesc Represents a CMsgAMFindAccountsResponse. - * @implements ICMsgAMFindAccountsResponse * @constructor - * @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set + * @param {CMsgAMFindAccountsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMFindAccountsResponse(properties) { + var CMsgAMFindAccountsResponse = function (properties) { this.steam_id = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMFindAccountsResponse steam_id. @@ -2664,10 +3408,14 @@ * @function create * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set + * @param {CMsgAMFindAccountsResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse instance + * @type {{ + * (properties: CMsgAMFindAccountsResponse.$Shape): CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape; + * (properties?: CMsgAMFindAccountsResponse.$Properties): CMsgAMFindAccountsResponse; + * }} */ - CMsgAMFindAccountsResponse.create = function create(properties) { + CMsgAMFindAccountsResponse.create = function(properties) { return new CMsgAMFindAccountsResponse(properties); }; @@ -2676,16 +3424,23 @@ * @function encode * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse} message CMsgAMFindAccountsResponse message or plain object to encode + * @param {CMsgAMFindAccountsResponse.$Properties} message CMsgAMFindAccountsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccountsResponse.encode = function encode(message, writer) { + CMsgAMFindAccountsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.steam_id != null && message.steam_id.length) for (var i = 0; i < message.steam_id.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2694,12 +3449,12 @@ * @function encodeDelimited * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse} message CMsgAMFindAccountsResponse message or plain object to encode + * @param {CMsgAMFindAccountsResponse.$Properties} message CMsgAMFindAccountsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccountsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMFindAccountsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2709,32 +3464,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse + * @returns {CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape} CMsgAMFindAccountsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CMsgAMFindAccountsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMFindAccountsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.steam_id && message.steam_id.length)) - message.steam_id = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.steam_id.push(reader.fixed64()); - } else - message.steam_id.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); + */ + CMsgAMFindAccountsResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMFindAccountsResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.steam_id && message.steam_id.length)) + message.steam_id = []; + reader.fixed64s(message.steam_id); + continue; + } + if (wireType !== 1) + break; + if (!(message.steam_id && message.steam_id.length)) + message.steam_id = []; + message.steam_id.push(reader.fixed64()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2744,11 +3517,11 @@ * @memberof CMsgAMFindAccountsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse + * @returns {CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape} CMsgAMFindAccountsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccountsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMFindAccountsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2762,11 +3535,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMFindAccountsResponse.verify = function verify(message) { + CMsgAMFindAccountsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) { - if (!Array.isArray(message.steam_id)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) { + if (!$Array.isArray(message.steam_id)) return "steam_id: array expected"; for (var i = 0; i < message.steam_id.length; ++i) if (!$util.isInteger(message.steam_id[i]) && !(message.steam_id[i] && $util.isInteger(message.steam_id[i].low) && $util.isInteger(message.steam_id[i].high))) @@ -2783,23 +3560,29 @@ * @param {Object.} object Plain object * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse */ - CMsgAMFindAccountsResponse.fromObject = function fromObject(object) { + CMsgAMFindAccountsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMFindAccountsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMFindAccountsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMFindAccountsResponse(); if (object.steam_id) { - if (!Array.isArray(object.steam_id)) - throw TypeError(".CMsgAMFindAccountsResponse.steam_id: array expected"); - message.steam_id = []; + if (!$Array.isArray(object.steam_id)) + throw $TypeError(".CMsgAMFindAccountsResponse.steam_id: array expected"); + message.steam_id = $Array(object.steam_id.length); for (var i = 0; i < object.steam_id.length; ++i) if ($util.Long) - (message.steam_id[i] = $util.Long.fromValue(object.steam_id[i])).unsigned = false; + message.steam_id[i] = $util.Long.fromValue(object.steam_id[i], true); else if (typeof object.steam_id[i] === "string") - message.steam_id[i] = parseInt(object.steam_id[i], 10); + message.steam_id[i] = $parseInt(object.steam_id[i], 10); else if (typeof object.steam_id[i] === "number") message.steam_id[i] = object.steam_id[i]; else if (typeof object.steam_id[i] === "object") - message.steam_id[i] = new $util.LongBits(object.steam_id[i].low >>> 0, object.steam_id[i].high >>> 0).toNumber(); + message.steam_id[i] = new $util.LongBits(object.steam_id[i].low >>> 0, object.steam_id[i].high >>> 0).toNumber(true); } return message; }; @@ -2813,19 +3596,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMFindAccountsResponse.toObject = function toObject(message, options) { + CMsgAMFindAccountsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.steam_id = []; if (message.steam_id && message.steam_id.length) { - object.steam_id = []; + object.steam_id = $Array(message.steam_id.length); for (var j = 0; j < message.steam_id.length; ++j) - if (typeof message.steam_id[j] === "number") - object.steam_id[j] = options.longs === String ? String(message.steam_id[j]) : message.steam_id[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id[j] = typeof message.steam_id[j] === "number" ? $BigInt(message.steam_id[j]) : $util.Long.fromBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0, true).toBigInt(); + else if (typeof message.steam_id[j] === "number") + object.steam_id[j] = options.longs === $String ? $String(message.steam_id[j]) : message.steam_id[j]; else - object.steam_id[j] = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id[j]) : options.longs === Number ? new $util.LongBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0).toNumber() : message.steam_id[j]; + object.steam_id[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id[j]) : options.longs === $Number ? new $util.LongBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0).toNumber(true) : message.steam_id[j]; } return object; }; @@ -2837,8 +3626,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMFindAccountsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMFindAccountsResponse.prototype.toJSON = function() { + return CMsgAMFindAccountsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMFindAccountsResponse + * @function getTypeUrl + * @memberof CMsgAMFindAccountsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMFindAccountsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMFindAccountsResponse"; }; return CMsgAMFindAccountsResponse; @@ -2848,8 +3651,7 @@ /** * Properties of a CMsgNotifyWatchdog. - * @exports ICMsgNotifyWatchdog - * @interface ICMsgNotifyWatchdog + * @typedef {Object} CMsgNotifyWatchdog.$Properties * @property {number|null} [source] CMsgNotifyWatchdog source * @property {number|null} [alert_type] CMsgNotifyWatchdog alert_type * @property {number|null} [alert_destination] CMsgNotifyWatchdog alert_destination @@ -2857,22 +3659,36 @@ * @property {number|null} [time] CMsgNotifyWatchdog time * @property {number|null} [appid] CMsgNotifyWatchdog appid * @property {string|null} [text] CMsgNotifyWatchdog text + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgNotifyWatchdog. + * @exports ICMsgNotifyWatchdog + * @interface ICMsgNotifyWatchdog + * @augments CMsgNotifyWatchdog.$Properties + * @deprecated Use CMsgNotifyWatchdog.$Properties instead. + */ + + /** + * Shape of a CMsgNotifyWatchdog. + * @typedef {CMsgNotifyWatchdog.$Properties} CMsgNotifyWatchdog.$Shape */ /** * Constructs a new CMsgNotifyWatchdog. * @exports CMsgNotifyWatchdog * @classdesc Represents a CMsgNotifyWatchdog. - * @implements ICMsgNotifyWatchdog * @constructor - * @param {ICMsgNotifyWatchdog=} [properties] Properties to set + * @param {CMsgNotifyWatchdog.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotifyWatchdog(properties) { + var CMsgNotifyWatchdog = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgNotifyWatchdog source. @@ -2935,10 +3751,14 @@ * @function create * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog=} [properties] Properties to set + * @param {CMsgNotifyWatchdog.$Properties=} [properties] Properties to set * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog instance + * @type {{ + * (properties: CMsgNotifyWatchdog.$Shape): CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape; + * (properties?: CMsgNotifyWatchdog.$Properties): CMsgNotifyWatchdog; + * }} */ - CMsgNotifyWatchdog.create = function create(properties) { + CMsgNotifyWatchdog.create = function(properties) { return new CMsgNotifyWatchdog(properties); }; @@ -2947,27 +3767,34 @@ * @function encode * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog} message CMsgNotifyWatchdog message or plain object to encode + * @param {CMsgNotifyWatchdog.$Properties} message CMsgNotifyWatchdog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotifyWatchdog.encode = function encode(message, writer) { + CMsgNotifyWatchdog.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.source); - if (message.alert_type != null && Object.hasOwnProperty.call(message, "alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.alert_type); - if (message.alert_destination != null && Object.hasOwnProperty.call(message, "alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.alert_destination); - if (message.critical != null && Object.hasOwnProperty.call(message, "critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.critical); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.time); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.appid); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.text); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2976,12 +3803,12 @@ * @function encodeDelimited * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog} message CMsgNotifyWatchdog message or plain object to encode + * @param {CMsgNotifyWatchdog.$Properties} message CMsgNotifyWatchdog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotifyWatchdog.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotifyWatchdog.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2991,43 +3818,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog + * @returns {CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape} CMsgNotifyWatchdog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotifyWatchdog.decode = function decode(reader, length) { + CMsgNotifyWatchdog.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotifyWatchdog(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotifyWatchdog(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source = reader.uint32(); - break; - case 2: - message.alert_type = reader.uint32(); - break; - case 3: - message.alert_destination = reader.uint32(); - break; - case 4: - message.critical = reader.bool(); - break; - case 5: - message.time = reader.uint32(); - break; - case 6: - message.appid = reader.uint32(); - break; - case 7: - message.text = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.source = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.alert_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.alert_destination = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.critical = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.time = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.text = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3037,11 +3899,11 @@ * @memberof CMsgNotifyWatchdog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog + * @returns {CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape} CMsgNotifyWatchdog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotifyWatchdog.decodeDelimited = function decodeDelimited(reader) { + CMsgNotifyWatchdog.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3055,28 +3917,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotifyWatchdog.verify = function verify(message) { + CMsgNotifyWatchdog.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) if (!$util.isInteger(message.source)) return "source: integer expected"; - if (message.alert_type != null && message.hasOwnProperty("alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) if (!$util.isInteger(message.alert_type)) return "alert_type: integer expected"; - if (message.alert_destination != null && message.hasOwnProperty("alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) if (!$util.isInteger(message.alert_destination)) return "alert_destination: integer expected"; - if (message.critical != null && message.hasOwnProperty("critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) if (typeof message.critical !== "boolean") return "critical: boolean expected"; - if (message.time != null && message.hasOwnProperty("time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) if (!$util.isInteger(message.time)) return "time: integer expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) if (!$util.isString(message.text)) return "text: string expected"; return null; @@ -3090,9 +3956,15 @@ * @param {Object.} object Plain object * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog */ - CMsgNotifyWatchdog.fromObject = function fromObject(object) { + CMsgNotifyWatchdog.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotifyWatchdog) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotifyWatchdog: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotifyWatchdog(); if (object.source != null) message.source = object.source >>> 0; @@ -3101,13 +3973,13 @@ if (object.alert_destination != null) message.alert_destination = object.alert_destination >>> 0; if (object.critical != null) - message.critical = Boolean(object.critical); + message.critical = $Boolean(object.critical); if (object.time != null) message.time = object.time >>> 0; if (object.appid != null) message.appid = object.appid >>> 0; if (object.text != null) - message.text = String(object.text); + message.text = $String(object.text); return message; }; @@ -3120,9 +3992,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotifyWatchdog.toObject = function toObject(message, options) { + CMsgNotifyWatchdog.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.source = 0; @@ -3133,19 +4009,19 @@ object.appid = 0; object.text = ""; } - if (message.source != null && message.hasOwnProperty("source")) + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) object.source = message.source; - if (message.alert_type != null && message.hasOwnProperty("alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) object.alert_type = message.alert_type; - if (message.alert_destination != null && message.hasOwnProperty("alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) object.alert_destination = message.alert_destination; - if (message.critical != null && message.hasOwnProperty("critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) object.critical = message.critical; - if (message.time != null && message.hasOwnProperty("time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) object.time = message.time; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) object.text = message.text; return object; }; @@ -3157,8 +4033,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotifyWatchdog.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotifyWatchdog.prototype.toJSON = function() { + return CMsgNotifyWatchdog.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotifyWatchdog + * @function getTypeUrl + * @memberof CMsgNotifyWatchdog + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotifyWatchdog.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotifyWatchdog"; }; return CMsgNotifyWatchdog; @@ -3166,27 +4056,40 @@ $root.CMsgAMGetLicenses = (function() { + /** + * Properties of a CMsgAMGetLicenses. + * @typedef {Object} CMsgAMGetLicenses.$Properties + * @property {number|Long|null} [steamid] CMsgAMGetLicenses steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMGetLicenses. * @exports ICMsgAMGetLicenses * @interface ICMsgAMGetLicenses - * @property {number|Long|null} [steamid] CMsgAMGetLicenses steamid + * @augments CMsgAMGetLicenses.$Properties + * @deprecated Use CMsgAMGetLicenses.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetLicenses. + * @typedef {CMsgAMGetLicenses.$Properties} CMsgAMGetLicenses.$Shape */ /** * Constructs a new CMsgAMGetLicenses. * @exports CMsgAMGetLicenses * @classdesc Represents a CMsgAMGetLicenses. - * @implements ICMsgAMGetLicenses * @constructor - * @param {ICMsgAMGetLicenses=} [properties] Properties to set + * @param {CMsgAMGetLicenses.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetLicenses(properties) { + var CMsgAMGetLicenses = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetLicenses steamid. @@ -3194,17 +4097,21 @@ * @memberof CMsgAMGetLicenses * @instance */ - CMsgAMGetLicenses.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetLicenses.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgAMGetLicenses instance using the specified properties. * @function create * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses=} [properties] Properties to set + * @param {CMsgAMGetLicenses.$Properties=} [properties] Properties to set * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses instance + * @type {{ + * (properties: CMsgAMGetLicenses.$Shape): CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape; + * (properties?: CMsgAMGetLicenses.$Properties): CMsgAMGetLicenses; + * }} */ - CMsgAMGetLicenses.create = function create(properties) { + CMsgAMGetLicenses.create = function(properties) { return new CMsgAMGetLicenses(properties); }; @@ -3213,15 +4120,22 @@ * @function encode * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses} message CMsgAMGetLicenses message or plain object to encode + * @param {CMsgAMGetLicenses.$Properties} message CMsgAMGetLicenses message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicenses.encode = function encode(message, writer) { + CMsgAMGetLicenses.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3230,12 +4144,12 @@ * @function encodeDelimited * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses} message CMsgAMGetLicenses message or plain object to encode + * @param {CMsgAMGetLicenses.$Properties} message CMsgAMGetLicenses message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicenses.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetLicenses.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3245,25 +4159,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses + * @returns {CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape} CMsgAMGetLicenses * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicenses.decode = function decode(reader, length) { + CMsgAMGetLicenses.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetLicenses(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetLicenses(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3273,11 +4204,11 @@ * @memberof CMsgAMGetLicenses * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses + * @returns {CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape} CMsgAMGetLicenses * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicenses.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetLicenses.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3291,10 +4222,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetLicenses.verify = function verify(message) { + CMsgAMGetLicenses.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -3308,19 +4243,25 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses */ - CMsgAMGetLicenses.fromObject = function fromObject(object) { + CMsgAMGetLicenses.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetLicenses) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetLicenses: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetLicenses(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -3333,21 +4274,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetLicenses.toObject = function toObject(message, options) { + CMsgAMGetLicenses.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -3358,8 +4305,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetLicenses.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetLicenses.prototype.toJSON = function() { + return CMsgAMGetLicenses.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetLicenses + * @function getTypeUrl + * @memberof CMsgAMGetLicenses + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetLicenses.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetLicenses"; }; return CMsgAMGetLicenses; @@ -3369,27 +4330,40 @@ /** * Properties of a CMsgPackageLicense. - * @exports ICMsgPackageLicense - * @interface ICMsgPackageLicense + * @typedef {Object} CMsgPackageLicense.$Properties * @property {number|null} [package_id] CMsgPackageLicense package_id * @property {number|null} [time_created] CMsgPackageLicense time_created * @property {number|null} [owner_id] CMsgPackageLicense owner_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPackageLicense. + * @exports ICMsgPackageLicense + * @interface ICMsgPackageLicense + * @augments CMsgPackageLicense.$Properties + * @deprecated Use CMsgPackageLicense.$Properties instead. + */ + + /** + * Shape of a CMsgPackageLicense. + * @typedef {CMsgPackageLicense.$Properties} CMsgPackageLicense.$Shape */ /** * Constructs a new CMsgPackageLicense. * @exports CMsgPackageLicense * @classdesc Represents a CMsgPackageLicense. - * @implements ICMsgPackageLicense * @constructor - * @param {ICMsgPackageLicense=} [properties] Properties to set + * @param {CMsgPackageLicense.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPackageLicense(properties) { + var CMsgPackageLicense = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPackageLicense package_id. @@ -3420,10 +4394,14 @@ * @function create * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense=} [properties] Properties to set + * @param {CMsgPackageLicense.$Properties=} [properties] Properties to set * @returns {CMsgPackageLicense} CMsgPackageLicense instance + * @type {{ + * (properties: CMsgPackageLicense.$Shape): CMsgPackageLicense & CMsgPackageLicense.$Shape; + * (properties?: CMsgPackageLicense.$Properties): CMsgPackageLicense; + * }} */ - CMsgPackageLicense.create = function create(properties) { + CMsgPackageLicense.create = function(properties) { return new CMsgPackageLicense(properties); }; @@ -3432,19 +4410,26 @@ * @function encode * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense} message CMsgPackageLicense message or plain object to encode + * @param {CMsgPackageLicense.$Properties} message CMsgPackageLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPackageLicense.encode = function encode(message, writer) { + CMsgPackageLicense.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.package_id != null && Object.hasOwnProperty.call(message, "package_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.package_id); - if (message.time_created != null && Object.hasOwnProperty.call(message, "time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.time_created); - if (message.owner_id != null && Object.hasOwnProperty.call(message, "owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.owner_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3453,12 +4438,12 @@ * @function encodeDelimited * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense} message CMsgPackageLicense message or plain object to encode + * @param {CMsgPackageLicense.$Properties} message CMsgPackageLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPackageLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPackageLicense.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3468,31 +4453,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPackageLicense} CMsgPackageLicense + * @returns {CMsgPackageLicense & CMsgPackageLicense.$Shape} CMsgPackageLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPackageLicense.decode = function decode(reader, length) { + CMsgPackageLicense.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPackageLicense(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPackageLicense(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.package_id = reader.uint32(); - break; - case 2: - message.time_created = reader.uint32(); - break; - case 3: - message.owner_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.package_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.time_created = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.owner_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3502,11 +4510,11 @@ * @memberof CMsgPackageLicense * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPackageLicense} CMsgPackageLicense + * @returns {CMsgPackageLicense & CMsgPackageLicense.$Shape} CMsgPackageLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPackageLicense.decodeDelimited = function decodeDelimited(reader) { + CMsgPackageLicense.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3520,16 +4528,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPackageLicense.verify = function verify(message) { + CMsgPackageLicense.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) if (!$util.isInteger(message.package_id)) return "package_id: integer expected"; - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) if (!$util.isInteger(message.time_created)) return "time_created: integer expected"; - if (message.owner_id != null && message.hasOwnProperty("owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) if (!$util.isInteger(message.owner_id)) return "owner_id: integer expected"; return null; @@ -3543,9 +4555,15 @@ * @param {Object.} object Plain object * @returns {CMsgPackageLicense} CMsgPackageLicense */ - CMsgPackageLicense.fromObject = function fromObject(object) { + CMsgPackageLicense.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPackageLicense) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPackageLicense: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPackageLicense(); if (object.package_id != null) message.package_id = object.package_id >>> 0; @@ -3565,20 +4583,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPackageLicense.toObject = function toObject(message, options) { + CMsgPackageLicense.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.package_id = 0; object.time_created = 0; object.owner_id = 0; } - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) object.package_id = message.package_id; - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) object.time_created = message.time_created; - if (message.owner_id != null && message.hasOwnProperty("owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) object.owner_id = message.owner_id; return object; }; @@ -3590,8 +4612,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPackageLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPackageLicense.prototype.toJSON = function() { + return CMsgPackageLicense.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPackageLicense + * @function getTypeUrl + * @memberof CMsgPackageLicense + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPackageLicense.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPackageLicense"; }; return CMsgPackageLicense; @@ -3599,33 +4635,46 @@ $root.CMsgAMGetLicensesResponse = (function() { + /** + * Properties of a CMsgAMGetLicensesResponse. + * @typedef {Object} CMsgAMGetLicensesResponse.$Properties + * @property {Array.|null} [license] CMsgAMGetLicensesResponse license + * @property {number|null} [result] CMsgAMGetLicensesResponse result + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMGetLicensesResponse. * @exports ICMsgAMGetLicensesResponse * @interface ICMsgAMGetLicensesResponse - * @property {Array.|null} [license] CMsgAMGetLicensesResponse license - * @property {number|null} [result] CMsgAMGetLicensesResponse result + * @augments CMsgAMGetLicensesResponse.$Properties + * @deprecated Use CMsgAMGetLicensesResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetLicensesResponse. + * @typedef {CMsgAMGetLicensesResponse.$Properties} CMsgAMGetLicensesResponse.$Shape */ /** * Constructs a new CMsgAMGetLicensesResponse. * @exports CMsgAMGetLicensesResponse * @classdesc Represents a CMsgAMGetLicensesResponse. - * @implements ICMsgAMGetLicensesResponse * @constructor - * @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set + * @param {CMsgAMGetLicensesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetLicensesResponse(properties) { + var CMsgAMGetLicensesResponse = function (properties) { this.license = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetLicensesResponse license. - * @member {Array.} license + * @member {Array.} license * @memberof CMsgAMGetLicensesResponse * @instance */ @@ -3644,10 +4693,14 @@ * @function create * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set + * @param {CMsgAMGetLicensesResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse instance + * @type {{ + * (properties: CMsgAMGetLicensesResponse.$Shape): CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape; + * (properties?: CMsgAMGetLicensesResponse.$Properties): CMsgAMGetLicensesResponse; + * }} */ - CMsgAMGetLicensesResponse.create = function create(properties) { + CMsgAMGetLicensesResponse.create = function(properties) { return new CMsgAMGetLicensesResponse(properties); }; @@ -3656,18 +4709,25 @@ * @function encode * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse} message CMsgAMGetLicensesResponse message or plain object to encode + * @param {CMsgAMGetLicensesResponse.$Properties} message CMsgAMGetLicensesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicensesResponse.encode = function encode(message, writer) { + CMsgAMGetLicensesResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.license != null && message.license.length) for (var i = 0; i < message.license.length; ++i) - $root.CMsgPackageLicense.encode(message.license[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.CMsgPackageLicense.encode(message.license[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.result); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3676,12 +4736,12 @@ * @function encodeDelimited * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse} message CMsgAMGetLicensesResponse message or plain object to encode + * @param {CMsgAMGetLicensesResponse.$Properties} message CMsgAMGetLicensesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicensesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetLicensesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3691,30 +4751,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse + * @returns {CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape} CMsgAMGetLicensesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicensesResponse.decode = function decode(reader, length) { + CMsgAMGetLicensesResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetLicensesResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetLicensesResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.license && message.license.length)) - message.license = []; - message.license.push($root.CMsgPackageLicense.decode(reader, reader.uint32())); - break; - case 2: - message.result = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.license && message.license.length)) + message.license = []; + message.license.push($root.CMsgPackageLicense.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3724,11 +4804,11 @@ * @memberof CMsgAMGetLicensesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse + * @returns {CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape} CMsgAMGetLicensesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicensesResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetLicensesResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3742,19 +4822,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetLicensesResponse.verify = function verify(message) { + CMsgAMGetLicensesResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.license != null && message.hasOwnProperty("license")) { - if (!Array.isArray(message.license)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.license != null && $Object.hasOwnProperty.call(message, "license")) { + if (!$Array.isArray(message.license)) return "license: array expected"; for (var i = 0; i < message.license.length; ++i) { - var error = $root.CMsgPackageLicense.verify(message.license[i]); + var error = $root.CMsgPackageLicense.verify(message.license[i], _depth + 1); if (error) return "license." + error; } } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; return null; @@ -3768,18 +4852,24 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse */ - CMsgAMGetLicensesResponse.fromObject = function fromObject(object) { + CMsgAMGetLicensesResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetLicensesResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetLicensesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetLicensesResponse(); if (object.license) { - if (!Array.isArray(object.license)) - throw TypeError(".CMsgAMGetLicensesResponse.license: array expected"); - message.license = []; + if (!$Array.isArray(object.license)) + throw $TypeError(".CMsgAMGetLicensesResponse.license: array expected"); + message.license = $Array(object.license.length); for (var i = 0; i < object.license.length; ++i) { - if (typeof object.license[i] !== "object") - throw TypeError(".CMsgAMGetLicensesResponse.license: object expected"); - message.license[i] = $root.CMsgPackageLicense.fromObject(object.license[i]); + if (!$util.isObject(object.license[i])) + throw $TypeError(".CMsgAMGetLicensesResponse.license: object expected"); + message.license[i] = $root.CMsgPackageLicense.fromObject(object.license[i], _depth + 1); } } if (object.result != null) @@ -3796,20 +4886,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetLicensesResponse.toObject = function toObject(message, options) { + CMsgAMGetLicensesResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.license = []; if (options.defaults) object.result = 0; if (message.license && message.license.length) { - object.license = []; + object.license = $Array(message.license.length); for (var j = 0; j < message.license.length; ++j) - object.license[j] = $root.CMsgPackageLicense.toObject(message.license[j], options); + object.license[j] = $root.CMsgPackageLicense.toObject(message.license[j], options, _depth + 1); } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; return object; }; @@ -3821,8 +4915,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetLicensesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetLicensesResponse.prototype.toJSON = function() { + return CMsgAMGetLicensesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetLicensesResponse + * @function getTypeUrl + * @memberof CMsgAMGetLicensesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetLicensesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetLicensesResponse"; }; return CMsgAMGetLicensesResponse; @@ -3832,28 +4940,41 @@ /** * Properties of a CMsgAMGetUserGameStats. - * @exports ICMsgAMGetUserGameStats - * @interface ICMsgAMGetUserGameStats + * @typedef {Object} CMsgAMGetUserGameStats.$Properties * @property {number|Long|null} [steam_id] CMsgAMGetUserGameStats steam_id * @property {number|Long|null} [game_id] CMsgAMGetUserGameStats game_id * @property {Array.|null} [stats] CMsgAMGetUserGameStats stats + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGetUserGameStats. + * @exports ICMsgAMGetUserGameStats + * @interface ICMsgAMGetUserGameStats + * @augments CMsgAMGetUserGameStats.$Properties + * @deprecated Use CMsgAMGetUserGameStats.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetUserGameStats. + * @typedef {CMsgAMGetUserGameStats.$Properties} CMsgAMGetUserGameStats.$Shape */ /** * Constructs a new CMsgAMGetUserGameStats. * @exports CMsgAMGetUserGameStats * @classdesc Represents a CMsgAMGetUserGameStats. - * @implements ICMsgAMGetUserGameStats * @constructor - * @param {ICMsgAMGetUserGameStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetUserGameStats(properties) { + var CMsgAMGetUserGameStats = function (properties) { this.stats = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetUserGameStats steam_id. @@ -3861,7 +4982,7 @@ * @memberof CMsgAMGetUserGameStats * @instance */ - CMsgAMGetUserGameStats.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStats.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStats game_id. @@ -3869,7 +4990,7 @@ * @memberof CMsgAMGetUserGameStats * @instance */ - CMsgAMGetUserGameStats.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStats.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStats stats. @@ -3884,10 +5005,14 @@ * @function create * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStats.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats instance + * @type {{ + * (properties: CMsgAMGetUserGameStats.$Shape): CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape; + * (properties?: CMsgAMGetUserGameStats.$Properties): CMsgAMGetUserGameStats; + * }} */ - CMsgAMGetUserGameStats.create = function create(properties) { + CMsgAMGetUserGameStats.create = function(properties) { return new CMsgAMGetUserGameStats(properties); }; @@ -3896,20 +5021,27 @@ * @function encode * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats} message CMsgAMGetUserGameStats message or plain object to encode + * @param {CMsgAMGetUserGameStats.$Properties} message CMsgAMGetUserGameStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStats.encode = function encode(message, writer) { + CMsgAMGetUserGameStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.game_id != null && Object.hasOwnProperty.call(message, "game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.game_id); if (message.stats != null && message.stats.length) for (var i = 0; i < message.stats.length; ++i) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stats[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3918,12 +5050,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats} message CMsgAMGetUserGameStats message or plain object to encode + * @param {CMsgAMGetUserGameStats.$Properties} message CMsgAMGetUserGameStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetUserGameStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3933,38 +5065,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats + * @returns {CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape} CMsgAMGetUserGameStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStats.decode = function decode(reader, length) { + CMsgAMGetUserGameStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - message.game_id = reader.fixed64(); - break; - case 3: - if (!(message.stats && message.stats.length)) - message.stats = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.stats.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.game_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.stats && message.stats.length)) + message.stats = []; + reader.uint32s(message.stats); + continue; + } + if (wireType !== 0) + break; + if (!(message.stats && message.stats.length)) + message.stats = []; message.stats.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3974,11 +5130,11 @@ * @memberof CMsgAMGetUserGameStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats + * @returns {CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape} CMsgAMGetUserGameStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStats.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetUserGameStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3992,17 +5148,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetUserGameStats.verify = function verify(message) { + CMsgAMGetUserGameStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.game_id != null && message.hasOwnProperty("game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) if (!$util.isInteger(message.game_id) && !(message.game_id && $util.isInteger(message.game_id.low) && $util.isInteger(message.game_id.high))) return "game_id: integer|Long expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - if (!Array.isArray(message.stats)) + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) { + if (!$Array.isArray(message.stats)) return "stats: array expected"; for (var i = 0; i < message.stats.length; ++i) if (!$util.isInteger(message.stats[i])) @@ -4019,32 +5179,38 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats */ - CMsgAMGetUserGameStats.fromObject = function fromObject(object) { + CMsgAMGetUserGameStats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStats(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.game_id != null) if ($util.Long) - (message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false; + message.game_id = $util.Long.fromValue(object.game_id, true); else if (typeof object.game_id === "string") - message.game_id = parseInt(object.game_id, 10); + message.game_id = $parseInt(object.game_id, 10); else if (typeof object.game_id === "number") message.game_id = object.game_id; else if (typeof object.game_id === "object") - message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(); + message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(true); if (object.stats) { - if (!Array.isArray(object.stats)) - throw TypeError(".CMsgAMGetUserGameStats.stats: array expected"); - message.stats = []; + if (!$Array.isArray(object.stats)) + throw $TypeError(".CMsgAMGetUserGameStats.stats: array expected"); + message.stats = $Array(object.stats.length); for (var i = 0; i < object.stats.length; ++i) message.stats[i] = object.stats[i] >>> 0; } @@ -4060,36 +5226,44 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetUserGameStats.toObject = function toObject(message, options) { + CMsgAMGetUserGameStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.stats = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.game_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.game_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.game_id = options.longs === String ? "0" : 0; + object.game_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.game_id != null && message.hasOwnProperty("game_id")) - if (typeof message.game_id === "number") - object.game_id = options.longs === String ? String(message.game_id) : message.game_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.game_id = typeof message.game_id === "number" ? $BigInt(message.game_id) : $util.Long.fromBits(message.game_id.low >>> 0, message.game_id.high >>> 0, true).toBigInt(); + else if (typeof message.game_id === "number") + object.game_id = options.longs === $String ? $String(message.game_id) : message.game_id; else - object.game_id = options.longs === String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber() : message.game_id; + object.game_id = options.longs === $String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === $Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber(true) : message.game_id; if (message.stats && message.stats.length) { - object.stats = []; + object.stats = $Array(message.stats.length); for (var j = 0; j < message.stats.length; ++j) object.stats[j] = message.stats[j]; } @@ -4103,8 +5277,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetUserGameStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetUserGameStats.prototype.toJSON = function() { + return CMsgAMGetUserGameStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetUserGameStats + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetUserGameStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStats"; }; return CMsgAMGetUserGameStats; @@ -4114,31 +5302,44 @@ /** * Properties of a CMsgAMGetUserGameStatsResponse. - * @exports ICMsgAMGetUserGameStatsResponse - * @interface ICMsgAMGetUserGameStatsResponse + * @typedef {Object} CMsgAMGetUserGameStatsResponse.$Properties * @property {number|Long|null} [steam_id] CMsgAMGetUserGameStatsResponse steam_id * @property {number|Long|null} [game_id] CMsgAMGetUserGameStatsResponse game_id * @property {number|null} [eresult] CMsgAMGetUserGameStatsResponse eresult - * @property {Array.|null} [stats] CMsgAMGetUserGameStatsResponse stats - * @property {Array.|null} [achievement_blocks] CMsgAMGetUserGameStatsResponse achievement_blocks + * @property {Array.|null} [stats] CMsgAMGetUserGameStatsResponse stats + * @property {Array.|null} [achievement_blocks] CMsgAMGetUserGameStatsResponse achievement_blocks + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGetUserGameStatsResponse. + * @exports ICMsgAMGetUserGameStatsResponse + * @interface ICMsgAMGetUserGameStatsResponse + * @augments CMsgAMGetUserGameStatsResponse.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetUserGameStatsResponse. + * @typedef {CMsgAMGetUserGameStatsResponse.$Properties} CMsgAMGetUserGameStatsResponse.$Shape */ /** * Constructs a new CMsgAMGetUserGameStatsResponse. * @exports CMsgAMGetUserGameStatsResponse * @classdesc Represents a CMsgAMGetUserGameStatsResponse. - * @implements ICMsgAMGetUserGameStatsResponse * @constructor - * @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetUserGameStatsResponse(properties) { + var CMsgAMGetUserGameStatsResponse = function (properties) { this.stats = []; this.achievement_blocks = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetUserGameStatsResponse steam_id. @@ -4146,7 +5347,7 @@ * @memberof CMsgAMGetUserGameStatsResponse * @instance */ - CMsgAMGetUserGameStatsResponse.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStatsResponse.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStatsResponse game_id. @@ -4154,7 +5355,7 @@ * @memberof CMsgAMGetUserGameStatsResponse * @instance */ - CMsgAMGetUserGameStatsResponse.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStatsResponse.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStatsResponse eresult. @@ -4166,7 +5367,7 @@ /** * CMsgAMGetUserGameStatsResponse stats. - * @member {Array.} stats + * @member {Array.} stats * @memberof CMsgAMGetUserGameStatsResponse * @instance */ @@ -4174,7 +5375,7 @@ /** * CMsgAMGetUserGameStatsResponse achievement_blocks. - * @member {Array.} achievement_blocks + * @member {Array.} achievement_blocks * @memberof CMsgAMGetUserGameStatsResponse * @instance */ @@ -4185,10 +5386,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.$Shape): CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.$Properties): CMsgAMGetUserGameStatsResponse; + * }} */ - CMsgAMGetUserGameStatsResponse.create = function create(properties) { + CMsgAMGetUserGameStatsResponse.create = function(properties) { return new CMsgAMGetUserGameStatsResponse(properties); }; @@ -4197,25 +5402,32 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse} message CMsgAMGetUserGameStatsResponse message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.$Properties} message CMsgAMGetUserGameStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStatsResponse.encode = function encode(message, writer) { + CMsgAMGetUserGameStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.game_id != null && Object.hasOwnProperty.call(message, "game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.game_id); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.eresult); if (message.stats != null && message.stats.length) for (var i = 0; i < message.stats.length; ++i) - $root.CMsgAMGetUserGameStatsResponse.Stats.encode(message.stats[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgAMGetUserGameStatsResponse.Stats.encode(message.stats[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.achievement_blocks != null && message.achievement_blocks.length) for (var i = 0; i < message.achievement_blocks.length; ++i) - $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.encode(message.achievement_blocks[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.encode(message.achievement_blocks[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4224,12 +5436,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse} message CMsgAMGetUserGameStatsResponse message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.$Properties} message CMsgAMGetUserGameStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetUserGameStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4239,41 +5451,70 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse + * @returns {CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape} CMsgAMGetUserGameStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStatsResponse.decode = function decode(reader, length) { + CMsgAMGetUserGameStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.game_id = reader.fixed64(); - break; - case 3: - message.eresult = reader.int32(); - break; - case 4: - if (!(message.stats && message.stats.length)) - message.stats = []; - message.stats.push($root.CMsgAMGetUserGameStatsResponse.Stats.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.achievement_blocks && message.achievement_blocks.length)) - message.achievement_blocks = []; - message.achievement_blocks.push($root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.game_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.stats && message.stats.length)) + message.stats = []; + message.stats.push($root.CMsgAMGetUserGameStatsResponse.Stats.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.achievement_blocks && message.achievement_blocks.length)) + message.achievement_blocks = []; + message.achievement_blocks.push($root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4283,11 +5524,11 @@ * @memberof CMsgAMGetUserGameStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse + * @returns {CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape} CMsgAMGetUserGameStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetUserGameStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4301,32 +5542,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetUserGameStatsResponse.verify = function verify(message) { + CMsgAMGetUserGameStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.game_id != null && message.hasOwnProperty("game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) if (!$util.isInteger(message.game_id) && !(message.game_id && $util.isInteger(message.game_id.low) && $util.isInteger(message.game_id.high))) return "game_id: integer|Long expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - if (!Array.isArray(message.stats)) + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) { + if (!$Array.isArray(message.stats)) return "stats: array expected"; for (var i = 0; i < message.stats.length; ++i) { - var error = $root.CMsgAMGetUserGameStatsResponse.Stats.verify(message.stats[i]); + var error = $root.CMsgAMGetUserGameStatsResponse.Stats.verify(message.stats[i], _depth + 1); if (error) return "stats." + error; } } - if (message.achievement_blocks != null && message.hasOwnProperty("achievement_blocks")) { - if (!Array.isArray(message.achievement_blocks)) + if (message.achievement_blocks != null && $Object.hasOwnProperty.call(message, "achievement_blocks")) { + if (!$Array.isArray(message.achievement_blocks)) return "achievement_blocks: array expected"; for (var i = 0; i < message.achievement_blocks.length; ++i) { - var error = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify(message.achievement_blocks[i]); + var error = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify(message.achievement_blocks[i], _depth + 1); if (error) return "achievement_blocks." + error; } @@ -4342,48 +5587,54 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse */ - CMsgAMGetUserGameStatsResponse.fromObject = function fromObject(object) { + CMsgAMGetUserGameStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.game_id != null) if ($util.Long) - (message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false; + message.game_id = $util.Long.fromValue(object.game_id, true); else if (typeof object.game_id === "string") - message.game_id = parseInt(object.game_id, 10); + message.game_id = $parseInt(object.game_id, 10); else if (typeof object.game_id === "number") message.game_id = object.game_id; else if (typeof object.game_id === "object") - message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(); + message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(true); if (object.eresult != null) message.eresult = object.eresult | 0; if (object.stats) { - if (!Array.isArray(object.stats)) - throw TypeError(".CMsgAMGetUserGameStatsResponse.stats: array expected"); - message.stats = []; + if (!$Array.isArray(object.stats)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.stats: array expected"); + message.stats = $Array(object.stats.length); for (var i = 0; i < object.stats.length; ++i) { - if (typeof object.stats[i] !== "object") - throw TypeError(".CMsgAMGetUserGameStatsResponse.stats: object expected"); - message.stats[i] = $root.CMsgAMGetUserGameStatsResponse.Stats.fromObject(object.stats[i]); + if (!$util.isObject(object.stats[i])) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.stats: object expected"); + message.stats[i] = $root.CMsgAMGetUserGameStatsResponse.Stats.fromObject(object.stats[i], _depth + 1); } } if (object.achievement_blocks) { - if (!Array.isArray(object.achievement_blocks)) - throw TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: array expected"); - message.achievement_blocks = []; + if (!$Array.isArray(object.achievement_blocks)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: array expected"); + message.achievement_blocks = $Array(object.achievement_blocks.length); for (var i = 0; i < object.achievement_blocks.length; ++i) { - if (typeof object.achievement_blocks[i] !== "object") - throw TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: object expected"); - message.achievement_blocks[i] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.fromObject(object.achievement_blocks[i]); + if (!$util.isObject(object.achievement_blocks[i])) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: object expected"); + message.achievement_blocks[i] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.fromObject(object.achievement_blocks[i], _depth + 1); } } return message; @@ -4398,9 +5649,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetUserGameStatsResponse.toObject = function toObject(message, options) { + CMsgAMGetUserGameStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.stats = []; @@ -4408,38 +5663,42 @@ } if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.game_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.game_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.game_id = options.longs === String ? "0" : 0; + object.game_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.eresult = 2; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.game_id != null && message.hasOwnProperty("game_id")) - if (typeof message.game_id === "number") - object.game_id = options.longs === String ? String(message.game_id) : message.game_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.game_id = typeof message.game_id === "number" ? $BigInt(message.game_id) : $util.Long.fromBits(message.game_id.low >>> 0, message.game_id.high >>> 0, true).toBigInt(); + else if (typeof message.game_id === "number") + object.game_id = options.longs === $String ? $String(message.game_id) : message.game_id; else - object.game_id = options.longs === String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber() : message.game_id; - if (message.eresult != null && message.hasOwnProperty("eresult")) + object.game_id = options.longs === $String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === $Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber(true) : message.game_id; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; if (message.stats && message.stats.length) { - object.stats = []; + object.stats = $Array(message.stats.length); for (var j = 0; j < message.stats.length; ++j) - object.stats[j] = $root.CMsgAMGetUserGameStatsResponse.Stats.toObject(message.stats[j], options); + object.stats[j] = $root.CMsgAMGetUserGameStatsResponse.Stats.toObject(message.stats[j], options, _depth + 1); } if (message.achievement_blocks && message.achievement_blocks.length) { - object.achievement_blocks = []; + object.achievement_blocks = $Array(message.achievement_blocks.length); for (var j = 0; j < message.achievement_blocks.length; ++j) - object.achievement_blocks[j] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.toObject(message.achievement_blocks[j], options); + object.achievement_blocks[j] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.toObject(message.achievement_blocks[j], options, _depth + 1); } return object; }; @@ -4451,34 +5710,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetUserGameStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetUserGameStatsResponse.prototype.toJSON = function() { + return CMsgAMGetUserGameStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetUserGameStatsResponse + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetUserGameStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse"; }; CMsgAMGetUserGameStatsResponse.Stats = (function() { /** * Properties of a Stats. - * @memberof CMsgAMGetUserGameStatsResponse - * @interface IStats + * @typedef {Object} CMsgAMGetUserGameStatsResponse.Stats.$Properties * @property {number|null} [stat_id] Stats stat_id * @property {number|null} [stat_value] Stats stat_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Stats. + * @memberof CMsgAMGetUserGameStatsResponse + * @interface IStats + * @augments CMsgAMGetUserGameStatsResponse.Stats.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.Stats.$Properties instead. + */ + + /** + * Shape of a Stats. + * @typedef {CMsgAMGetUserGameStatsResponse.Stats.$Properties} CMsgAMGetUserGameStatsResponse.Stats.$Shape */ /** * Constructs a new Stats. * @memberof CMsgAMGetUserGameStatsResponse * @classdesc Represents a Stats. - * @implements IStats * @constructor - * @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Stats(properties) { + var Stats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Stats stat_id. @@ -4501,10 +5787,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.Stats.$Shape): CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.Stats.$Properties): CMsgAMGetUserGameStatsResponse.Stats; + * }} */ - Stats.create = function create(properties) { + Stats.create = function(properties) { return new Stats(properties); }; @@ -4513,17 +5803,24 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats} message Stats message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stats.encode = function encode(message, writer) { + Stats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.stat_id != null && Object.hasOwnProperty.call(message, "stat_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.stat_id); - if (message.stat_value != null && Object.hasOwnProperty.call(message, "stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.stat_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4532,12 +5829,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats} message Stats message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Stats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4547,28 +5844,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats + * @returns {CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stats.decode = function decode(reader, length) { + Stats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse.Stats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse.Stats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stat_id = reader.uint32(); - break; - case 2: - message.stat_value = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.stat_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.stat_value = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4578,11 +5895,11 @@ * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats + * @returns {CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stats.decodeDelimited = function decodeDelimited(reader) { + Stats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4596,13 +5913,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Stats.verify = function verify(message) { + Stats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.stat_id != null && message.hasOwnProperty("stat_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) if (!$util.isInteger(message.stat_id)) return "stat_id: integer expected"; - if (message.stat_value != null && message.hasOwnProperty("stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) if (!$util.isInteger(message.stat_value)) return "stat_value: integer expected"; return null; @@ -4616,9 +5937,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats */ - Stats.fromObject = function fromObject(object) { + Stats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Stats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.Stats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse.Stats(); if (object.stat_id != null) message.stat_id = object.stat_id >>> 0; @@ -4636,17 +5963,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Stats.toObject = function toObject(message, options) { + Stats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.stat_id = 0; object.stat_value = 0; } - if (message.stat_id != null && message.hasOwnProperty("stat_id")) + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) object.stat_id = message.stat_id; - if (message.stat_value != null && message.hasOwnProperty("stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) object.stat_value = message.stat_value; return object; }; @@ -4658,8 +5989,22 @@ * @instance * @returns {Object.} JSON object */ - Stats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Stats.prototype.toJSON = function() { + return Stats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Stats + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse.Stats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Stats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse.Stats"; }; return Stats; @@ -4669,27 +6014,40 @@ /** * Properties of an Achievement_Blocks. - * @memberof CMsgAMGetUserGameStatsResponse - * @interface IAchievement_Blocks + * @typedef {Object} CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties * @property {number|null} [achievement_id] Achievement_Blocks achievement_id * @property {number|null} [achievement_bit_id] Achievement_Blocks achievement_bit_id * @property {number|null} [unlock_time] Achievement_Blocks unlock_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Achievement_Blocks. + * @memberof CMsgAMGetUserGameStatsResponse + * @interface IAchievement_Blocks + * @augments CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties instead. + */ + + /** + * Shape of an Achievement_Blocks. + * @typedef {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape */ /** * Constructs a new Achievement_Blocks. * @memberof CMsgAMGetUserGameStatsResponse * @classdesc Represents an Achievement_Blocks. - * @implements IAchievement_Blocks * @constructor - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Achievement_Blocks(properties) { + var Achievement_Blocks = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Achievement_Blocks achievement_id. @@ -4720,10 +6078,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape): CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties): CMsgAMGetUserGameStatsResponse.Achievement_Blocks; + * }} */ - Achievement_Blocks.create = function create(properties) { + Achievement_Blocks.create = function(properties) { return new Achievement_Blocks(properties); }; @@ -4732,19 +6094,26 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} message Achievement_Blocks message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} message Achievement_Blocks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Achievement_Blocks.encode = function encode(message, writer) { + Achievement_Blocks.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.achievement_id != null && Object.hasOwnProperty.call(message, "achievement_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.achievement_id); - if (message.achievement_bit_id != null && Object.hasOwnProperty.call(message, "achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.achievement_bit_id); - if (message.unlock_time != null && Object.hasOwnProperty.call(message, "unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.unlock_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4753,12 +6122,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} message Achievement_Blocks message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} message Achievement_Blocks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Achievement_Blocks.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Achievement_Blocks.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4768,31 +6137,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks + * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape} Achievement_Blocks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Achievement_Blocks.decode = function decode(reader, length) { + Achievement_Blocks.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.achievement_id = reader.uint32(); - break; - case 2: - message.achievement_bit_id = reader.uint32(); - break; - case 3: - message.unlock_time = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.achievement_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.achievement_bit_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.unlock_time = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4802,11 +6194,11 @@ * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks + * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape} Achievement_Blocks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Achievement_Blocks.decodeDelimited = function decodeDelimited(reader) { + Achievement_Blocks.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4820,16 +6212,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Achievement_Blocks.verify = function verify(message) { + Achievement_Blocks.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.achievement_id != null && message.hasOwnProperty("achievement_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) if (!$util.isInteger(message.achievement_id)) return "achievement_id: integer expected"; - if (message.achievement_bit_id != null && message.hasOwnProperty("achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) if (!$util.isInteger(message.achievement_bit_id)) return "achievement_bit_id: integer expected"; - if (message.unlock_time != null && message.hasOwnProperty("unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) if (!$util.isInteger(message.unlock_time)) return "unlock_time: integer expected"; return null; @@ -4843,9 +6239,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks */ - Achievement_Blocks.fromObject = function fromObject(object) { + Achievement_Blocks.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.Achievement_Blocks: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); if (object.achievement_id != null) message.achievement_id = object.achievement_id >>> 0; @@ -4865,20 +6267,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Achievement_Blocks.toObject = function toObject(message, options) { + Achievement_Blocks.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.achievement_id = 0; object.achievement_bit_id = 0; object.unlock_time = 0; } - if (message.achievement_id != null && message.hasOwnProperty("achievement_id")) + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) object.achievement_id = message.achievement_id; - if (message.achievement_bit_id != null && message.hasOwnProperty("achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) object.achievement_bit_id = message.achievement_bit_id; - if (message.unlock_time != null && message.hasOwnProperty("unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) object.unlock_time = message.unlock_time; return object; }; @@ -4890,8 +6296,22 @@ * @instance * @returns {Object.} JSON object */ - Achievement_Blocks.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Achievement_Blocks.prototype.toJSON = function() { + return Achievement_Blocks.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Achievement_Blocks + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Achievement_Blocks.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse.Achievement_Blocks"; }; return Achievement_Blocks; @@ -4904,26 +6324,39 @@ /** * Properties of a CMsgGCGetCommandList. - * @exports ICMsgGCGetCommandList - * @interface ICMsgGCGetCommandList + * @typedef {Object} CMsgGCGetCommandList.$Properties * @property {number|null} [app_id] CMsgGCGetCommandList app_id * @property {string|null} [command_prefix] CMsgGCGetCommandList command_prefix + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetCommandList. + * @exports ICMsgGCGetCommandList + * @interface ICMsgGCGetCommandList + * @augments CMsgGCGetCommandList.$Properties + * @deprecated Use CMsgGCGetCommandList.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetCommandList. + * @typedef {CMsgGCGetCommandList.$Properties} CMsgGCGetCommandList.$Shape */ /** * Constructs a new CMsgGCGetCommandList. * @exports CMsgGCGetCommandList * @classdesc Represents a CMsgGCGetCommandList. - * @implements ICMsgGCGetCommandList * @constructor - * @param {ICMsgGCGetCommandList=} [properties] Properties to set + * @param {CMsgGCGetCommandList.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetCommandList(properties) { + var CMsgGCGetCommandList = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetCommandList app_id. @@ -4946,10 +6379,14 @@ * @function create * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList=} [properties] Properties to set + * @param {CMsgGCGetCommandList.$Properties=} [properties] Properties to set * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList instance + * @type {{ + * (properties: CMsgGCGetCommandList.$Shape): CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape; + * (properties?: CMsgGCGetCommandList.$Properties): CMsgGCGetCommandList; + * }} */ - CMsgGCGetCommandList.create = function create(properties) { + CMsgGCGetCommandList.create = function(properties) { return new CMsgGCGetCommandList(properties); }; @@ -4958,17 +6395,24 @@ * @function encode * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList} message CMsgGCGetCommandList message or plain object to encode + * @param {CMsgGCGetCommandList.$Properties} message CMsgGCGetCommandList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandList.encode = function encode(message, writer) { + CMsgGCGetCommandList.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_id); - if (message.command_prefix != null && Object.hasOwnProperty.call(message, "command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.command_prefix); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4977,12 +6421,12 @@ * @function encodeDelimited * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList} message CMsgGCGetCommandList message or plain object to encode + * @param {CMsgGCGetCommandList.$Properties} message CMsgGCGetCommandList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetCommandList.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4992,28 +6436,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList + * @returns {CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape} CMsgGCGetCommandList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandList.decode = function decode(reader, length) { + CMsgGCGetCommandList.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetCommandList(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetCommandList(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_id = reader.uint32(); - break; - case 2: - message.command_prefix = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.command_prefix = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5023,11 +6487,11 @@ * @memberof CMsgGCGetCommandList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList + * @returns {CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape} CMsgGCGetCommandList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandList.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetCommandList.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5041,13 +6505,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetCommandList.verify = function verify(message) { + CMsgGCGetCommandList.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.command_prefix != null && message.hasOwnProperty("command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) if (!$util.isString(message.command_prefix)) return "command_prefix: string expected"; return null; @@ -5061,14 +6529,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList */ - CMsgGCGetCommandList.fromObject = function fromObject(object) { + CMsgGCGetCommandList.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetCommandList) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetCommandList: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetCommandList(); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.command_prefix != null) - message.command_prefix = String(object.command_prefix); + message.command_prefix = $String(object.command_prefix); return message; }; @@ -5081,17 +6555,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetCommandList.toObject = function toObject(message, options) { + CMsgGCGetCommandList.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.app_id = 0; object.command_prefix = ""; } - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.command_prefix != null && message.hasOwnProperty("command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) object.command_prefix = message.command_prefix; return object; }; @@ -5103,8 +6581,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetCommandList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetCommandList.prototype.toJSON = function() { + return CMsgGCGetCommandList.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetCommandList + * @function getTypeUrl + * @memberof CMsgGCGetCommandList + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetCommandList.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetCommandList"; }; return CMsgGCGetCommandList; @@ -5112,28 +6604,41 @@ $root.CMsgGCGetCommandListResponse = (function() { + /** + * Properties of a CMsgGCGetCommandListResponse. + * @typedef {Object} CMsgGCGetCommandListResponse.$Properties + * @property {Array.|null} [command_name] CMsgGCGetCommandListResponse command_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetCommandListResponse. * @exports ICMsgGCGetCommandListResponse * @interface ICMsgGCGetCommandListResponse - * @property {Array.|null} [command_name] CMsgGCGetCommandListResponse command_name + * @augments CMsgGCGetCommandListResponse.$Properties + * @deprecated Use CMsgGCGetCommandListResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetCommandListResponse. + * @typedef {CMsgGCGetCommandListResponse.$Properties} CMsgGCGetCommandListResponse.$Shape */ /** * Constructs a new CMsgGCGetCommandListResponse. * @exports CMsgGCGetCommandListResponse * @classdesc Represents a CMsgGCGetCommandListResponse. - * @implements ICMsgGCGetCommandListResponse * @constructor - * @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set + * @param {CMsgGCGetCommandListResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetCommandListResponse(properties) { + var CMsgGCGetCommandListResponse = function (properties) { this.command_name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetCommandListResponse command_name. @@ -5148,10 +6653,14 @@ * @function create * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set + * @param {CMsgGCGetCommandListResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse instance + * @type {{ + * (properties: CMsgGCGetCommandListResponse.$Shape): CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape; + * (properties?: CMsgGCGetCommandListResponse.$Properties): CMsgGCGetCommandListResponse; + * }} */ - CMsgGCGetCommandListResponse.create = function create(properties) { + CMsgGCGetCommandListResponse.create = function(properties) { return new CMsgGCGetCommandListResponse(properties); }; @@ -5160,16 +6669,23 @@ * @function encode * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse} message CMsgGCGetCommandListResponse message or plain object to encode + * @param {CMsgGCGetCommandListResponse.$Properties} message CMsgGCGetCommandListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandListResponse.encode = function encode(message, writer) { + CMsgGCGetCommandListResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.command_name != null && message.command_name.length) for (var i = 0; i < message.command_name.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.command_name[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5178,12 +6694,12 @@ * @function encodeDelimited * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse} message CMsgGCGetCommandListResponse message or plain object to encode + * @param {CMsgGCGetCommandListResponse.$Properties} message CMsgGCGetCommandListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetCommandListResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5193,27 +6709,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse + * @returns {CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape} CMsgGCGetCommandListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandListResponse.decode = function decode(reader, length) { + CMsgGCGetCommandListResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetCommandListResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetCommandListResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.command_name && message.command_name.length)) - message.command_name = []; - message.command_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.command_name && message.command_name.length)) + message.command_name = []; + message.command_name.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5223,11 +6756,11 @@ * @memberof CMsgGCGetCommandListResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse + * @returns {CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape} CMsgGCGetCommandListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandListResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetCommandListResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5241,11 +6774,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetCommandListResponse.verify = function verify(message) { + CMsgGCGetCommandListResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.command_name != null && message.hasOwnProperty("command_name")) { - if (!Array.isArray(message.command_name)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.command_name != null && $Object.hasOwnProperty.call(message, "command_name")) { + if (!$Array.isArray(message.command_name)) return "command_name: array expected"; for (var i = 0; i < message.command_name.length; ++i) if (!$util.isString(message.command_name[i])) @@ -5262,16 +6799,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse */ - CMsgGCGetCommandListResponse.fromObject = function fromObject(object) { + CMsgGCGetCommandListResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetCommandListResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetCommandListResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetCommandListResponse(); if (object.command_name) { - if (!Array.isArray(object.command_name)) - throw TypeError(".CMsgGCGetCommandListResponse.command_name: array expected"); - message.command_name = []; + if (!$Array.isArray(object.command_name)) + throw $TypeError(".CMsgGCGetCommandListResponse.command_name: array expected"); + message.command_name = $Array(object.command_name.length); for (var i = 0; i < object.command_name.length; ++i) - message.command_name[i] = String(object.command_name[i]); + message.command_name[i] = $String(object.command_name[i]); } return message; }; @@ -5285,14 +6828,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetCommandListResponse.toObject = function toObject(message, options) { + CMsgGCGetCommandListResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.command_name = []; if (message.command_name && message.command_name.length) { - object.command_name = []; + object.command_name = $Array(message.command_name.length); for (var j = 0; j < message.command_name.length; ++j) object.command_name[j] = message.command_name[j]; } @@ -5306,8 +6853,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetCommandListResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetCommandListResponse.prototype.toJSON = function() { + return CMsgGCGetCommandListResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetCommandListResponse + * @function getTypeUrl + * @memberof CMsgGCGetCommandListResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetCommandListResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetCommandListResponse"; }; return CMsgGCGetCommandListResponse; @@ -5315,28 +6876,41 @@ $root.CGCMsgMemCachedGet = (function() { + /** + * Properties of a CGCMsgMemCachedGet. + * @typedef {Object} CGCMsgMemCachedGet.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedGet keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedGet. * @exports ICGCMsgMemCachedGet * @interface ICGCMsgMemCachedGet - * @property {Array.|null} [keys] CGCMsgMemCachedGet keys + * @augments CGCMsgMemCachedGet.$Properties + * @deprecated Use CGCMsgMemCachedGet.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedGet. + * @typedef {CGCMsgMemCachedGet.$Properties} CGCMsgMemCachedGet.$Shape */ /** * Constructs a new CGCMsgMemCachedGet. * @exports CGCMsgMemCachedGet * @classdesc Represents a CGCMsgMemCachedGet. - * @implements ICGCMsgMemCachedGet * @constructor - * @param {ICGCMsgMemCachedGet=} [properties] Properties to set + * @param {CGCMsgMemCachedGet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedGet(properties) { + var CGCMsgMemCachedGet = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedGet keys. @@ -5351,10 +6925,14 @@ * @function create * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet=} [properties] Properties to set + * @param {CGCMsgMemCachedGet.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet instance + * @type {{ + * (properties: CGCMsgMemCachedGet.$Shape): CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape; + * (properties?: CGCMsgMemCachedGet.$Properties): CGCMsgMemCachedGet; + * }} */ - CGCMsgMemCachedGet.create = function create(properties) { + CGCMsgMemCachedGet.create = function(properties) { return new CGCMsgMemCachedGet(properties); }; @@ -5363,16 +6941,23 @@ * @function encode * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet} message CGCMsgMemCachedGet message or plain object to encode + * @param {CGCMsgMemCachedGet.$Properties} message CGCMsgMemCachedGet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGet.encode = function encode(message, writer) { + CGCMsgMemCachedGet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keys[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5381,12 +6966,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet} message CGCMsgMemCachedGet message or plain object to encode + * @param {CGCMsgMemCachedGet.$Properties} message CGCMsgMemCachedGet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedGet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5396,27 +6981,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet + * @returns {CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape} CGCMsgMemCachedGet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGet.decode = function decode(reader, length) { + CGCMsgMemCachedGet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5426,11 +7028,11 @@ * @memberof CGCMsgMemCachedGet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet + * @returns {CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape} CGCMsgMemCachedGet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGet.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedGet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5444,11 +7046,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedGet.verify = function verify(message) { + CGCMsgMemCachedGet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) if (!$util.isString(message.keys[i])) @@ -5465,16 +7071,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet */ - CGCMsgMemCachedGet.fromObject = function fromObject(object) { + CGCMsgMemCachedGet.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGet) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGet(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedGet.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedGet.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) - message.keys[i] = String(object.keys[i]); + message.keys[i] = $String(object.keys[i]); } return message; }; @@ -5488,14 +7100,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedGet.toObject = function toObject(message, options) { + CGCMsgMemCachedGet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) object.keys[j] = message.keys[j]; } @@ -5509,8 +7125,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedGet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedGet.prototype.toJSON = function() { + return CGCMsgMemCachedGet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedGet + * @function getTypeUrl + * @memberof CGCMsgMemCachedGet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedGet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGet"; }; return CGCMsgMemCachedGet; @@ -5518,32 +7148,45 @@ $root.CGCMsgMemCachedGetResponse = (function() { + /** + * Properties of a CGCMsgMemCachedGetResponse. + * @typedef {Object} CGCMsgMemCachedGetResponse.$Properties + * @property {Array.|null} [values] CGCMsgMemCachedGetResponse values + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedGetResponse. * @exports ICGCMsgMemCachedGetResponse * @interface ICGCMsgMemCachedGetResponse - * @property {Array.|null} [values] CGCMsgMemCachedGetResponse values + * @augments CGCMsgMemCachedGetResponse.$Properties + * @deprecated Use CGCMsgMemCachedGetResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedGetResponse. + * @typedef {CGCMsgMemCachedGetResponse.$Properties} CGCMsgMemCachedGetResponse.$Shape */ /** * Constructs a new CGCMsgMemCachedGetResponse. * @exports CGCMsgMemCachedGetResponse * @classdesc Represents a CGCMsgMemCachedGetResponse. - * @implements ICGCMsgMemCachedGetResponse * @constructor - * @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedGetResponse(properties) { + var CGCMsgMemCachedGetResponse = function (properties) { this.values = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedGetResponse values. - * @member {Array.} values + * @member {Array.} values * @memberof CGCMsgMemCachedGetResponse * @instance */ @@ -5554,10 +7197,14 @@ * @function create * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse instance + * @type {{ + * (properties: CGCMsgMemCachedGetResponse.$Shape): CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape; + * (properties?: CGCMsgMemCachedGetResponse.$Properties): CGCMsgMemCachedGetResponse; + * }} */ - CGCMsgMemCachedGetResponse.create = function create(properties) { + CGCMsgMemCachedGetResponse.create = function(properties) { return new CGCMsgMemCachedGetResponse(properties); }; @@ -5566,16 +7213,23 @@ * @function encode * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse} message CGCMsgMemCachedGetResponse message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.$Properties} message CGCMsgMemCachedGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGetResponse.encode = function encode(message, writer) { + CGCMsgMemCachedGetResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.values != null && message.values.length) for (var i = 0; i < message.values.length; ++i) - $root.CGCMsgMemCachedGetResponse.ValueTag.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CGCMsgMemCachedGetResponse.ValueTag.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5584,12 +7238,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse} message CGCMsgMemCachedGetResponse message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.$Properties} message CGCMsgMemCachedGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedGetResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5599,27 +7253,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse + * @returns {CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape} CGCMsgMemCachedGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGetResponse.decode = function decode(reader, length) { + CGCMsgMemCachedGetResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGetResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGetResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.CGCMsgMemCachedGetResponse.ValueTag.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.CGCMsgMemCachedGetResponse.ValueTag.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5629,11 +7300,11 @@ * @memberof CGCMsgMemCachedGetResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse + * @returns {CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape} CGCMsgMemCachedGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGetResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedGetResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5647,14 +7318,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedGetResponse.verify = function verify(message) { + CGCMsgMemCachedGetResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.values != null && $Object.hasOwnProperty.call(message, "values")) { + if (!$Array.isArray(message.values)) return "values: array expected"; for (var i = 0; i < message.values.length; ++i) { - var error = $root.CGCMsgMemCachedGetResponse.ValueTag.verify(message.values[i]); + var error = $root.CGCMsgMemCachedGetResponse.ValueTag.verify(message.values[i], _depth + 1); if (error) return "values." + error; } @@ -5670,18 +7345,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse */ - CGCMsgMemCachedGetResponse.fromObject = function fromObject(object) { + CGCMsgMemCachedGetResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGetResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGetResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGetResponse(); if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".CGCMsgMemCachedGetResponse.values: array expected"); - message.values = []; + if (!$Array.isArray(object.values)) + throw $TypeError(".CGCMsgMemCachedGetResponse.values: array expected"); + message.values = $Array(object.values.length); for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".CGCMsgMemCachedGetResponse.values: object expected"); - message.values[i] = $root.CGCMsgMemCachedGetResponse.ValueTag.fromObject(object.values[i]); + if (!$util.isObject(object.values[i])) + throw $TypeError(".CGCMsgMemCachedGetResponse.values: object expected"); + message.values[i] = $root.CGCMsgMemCachedGetResponse.ValueTag.fromObject(object.values[i], _depth + 1); } } return message; @@ -5696,16 +7377,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedGetResponse.toObject = function toObject(message, options) { + CGCMsgMemCachedGetResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.values = []; if (message.values && message.values.length) { - object.values = []; + object.values = $Array(message.values.length); for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.CGCMsgMemCachedGetResponse.ValueTag.toObject(message.values[j], options); + object.values[j] = $root.CGCMsgMemCachedGetResponse.ValueTag.toObject(message.values[j], options, _depth + 1); } return object; }; @@ -5717,34 +7402,61 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedGetResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedGetResponse.prototype.toJSON = function() { + return CGCMsgMemCachedGetResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedGetResponse + * @function getTypeUrl + * @memberof CGCMsgMemCachedGetResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedGetResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGetResponse"; }; CGCMsgMemCachedGetResponse.ValueTag = (function() { /** * Properties of a ValueTag. - * @memberof CGCMsgMemCachedGetResponse - * @interface IValueTag + * @typedef {Object} CGCMsgMemCachedGetResponse.ValueTag.$Properties * @property {boolean|null} [found] ValueTag found * @property {Uint8Array|null} [value] ValueTag value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ValueTag. + * @memberof CGCMsgMemCachedGetResponse + * @interface IValueTag + * @augments CGCMsgMemCachedGetResponse.ValueTag.$Properties + * @deprecated Use CGCMsgMemCachedGetResponse.ValueTag.$Properties instead. + */ + + /** + * Shape of a ValueTag. + * @typedef {CGCMsgMemCachedGetResponse.ValueTag.$Properties} CGCMsgMemCachedGetResponse.ValueTag.$Shape */ /** * Constructs a new ValueTag. * @memberof CGCMsgMemCachedGetResponse * @classdesc Represents a ValueTag. - * @implements IValueTag * @constructor - * @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ValueTag(properties) { + var ValueTag = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ValueTag found. @@ -5767,10 +7479,14 @@ * @function create * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag instance + * @type {{ + * (properties: CGCMsgMemCachedGetResponse.ValueTag.$Shape): CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape; + * (properties?: CGCMsgMemCachedGetResponse.ValueTag.$Properties): CGCMsgMemCachedGetResponse.ValueTag; + * }} */ - ValueTag.create = function create(properties) { + ValueTag.create = function(properties) { return new ValueTag(properties); }; @@ -5779,17 +7495,24 @@ * @function encode * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag} message ValueTag message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties} message ValueTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValueTag.encode = function encode(message, writer) { + ValueTag.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.found != null && Object.hasOwnProperty.call(message, "found")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.found); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5798,12 +7521,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag} message ValueTag message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties} message ValueTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValueTag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValueTag.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5813,28 +7536,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag + * @returns {CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape} ValueTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValueTag.decode = function decode(reader, length) { + ValueTag.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGetResponse.ValueTag(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGetResponse.ValueTag(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.found = reader.bool(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.found = reader.bool(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5844,11 +7587,11 @@ * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag + * @returns {CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape} ValueTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValueTag.decodeDelimited = function decodeDelimited(reader) { + ValueTag.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5862,13 +7605,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValueTag.verify = function verify(message) { + ValueTag.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.found != null && message.hasOwnProperty("found")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) if (typeof message.found !== "boolean") return "found: boolean expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -5882,16 +7629,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag */ - ValueTag.fromObject = function fromObject(object) { + ValueTag.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGetResponse.ValueTag) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGetResponse.ValueTag: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGetResponse.ValueTag(); if (object.found != null) - message.found = Boolean(object.found); + message.found = $Boolean(object.found); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -5905,24 +7658,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValueTag.toObject = function toObject(message, options) { + ValueTag.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.found = false; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.found != null && message.hasOwnProperty("found")) + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) object.found = message.found; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -5933,8 +7690,22 @@ * @instance * @returns {Object.} JSON object */ - ValueTag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ValueTag.prototype.toJSON = function() { + return ValueTag.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ValueTag + * @function getTypeUrl + * @memberof CGCMsgMemCachedGetResponse.ValueTag + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ValueTag.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGetResponse.ValueTag"; }; return ValueTag; @@ -5945,32 +7716,45 @@ $root.CGCMsgMemCachedSet = (function() { + /** + * Properties of a CGCMsgMemCachedSet. + * @typedef {Object} CGCMsgMemCachedSet.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedSet keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedSet. * @exports ICGCMsgMemCachedSet * @interface ICGCMsgMemCachedSet - * @property {Array.|null} [keys] CGCMsgMemCachedSet keys + * @augments CGCMsgMemCachedSet.$Properties + * @deprecated Use CGCMsgMemCachedSet.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedSet. + * @typedef {CGCMsgMemCachedSet.$Properties} CGCMsgMemCachedSet.$Shape */ /** * Constructs a new CGCMsgMemCachedSet. * @exports CGCMsgMemCachedSet * @classdesc Represents a CGCMsgMemCachedSet. - * @implements ICGCMsgMemCachedSet * @constructor - * @param {ICGCMsgMemCachedSet=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedSet(properties) { + var CGCMsgMemCachedSet = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedSet keys. - * @member {Array.} keys + * @member {Array.} keys * @memberof CGCMsgMemCachedSet * @instance */ @@ -5981,10 +7765,14 @@ * @function create * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet instance + * @type {{ + * (properties: CGCMsgMemCachedSet.$Shape): CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape; + * (properties?: CGCMsgMemCachedSet.$Properties): CGCMsgMemCachedSet; + * }} */ - CGCMsgMemCachedSet.create = function create(properties) { + CGCMsgMemCachedSet.create = function(properties) { return new CGCMsgMemCachedSet(properties); }; @@ -5993,16 +7781,23 @@ * @function encode * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet} message CGCMsgMemCachedSet message or plain object to encode + * @param {CGCMsgMemCachedSet.$Properties} message CGCMsgMemCachedSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedSet.encode = function encode(message, writer) { + CGCMsgMemCachedSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) - $root.CGCMsgMemCachedSet.KeyPair.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CGCMsgMemCachedSet.KeyPair.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6011,12 +7806,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet} message CGCMsgMemCachedSet message or plain object to encode + * @param {CGCMsgMemCachedSet.$Properties} message CGCMsgMemCachedSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6026,27 +7821,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet + * @returns {CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape} CGCMsgMemCachedSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedSet.decode = function decode(reader, length) { + CGCMsgMemCachedSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.CGCMsgMemCachedSet.KeyPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push($root.CGCMsgMemCachedSet.KeyPair.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6056,11 +7868,11 @@ * @memberof CGCMsgMemCachedSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet + * @returns {CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape} CGCMsgMemCachedSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedSet.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6074,14 +7886,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedSet.verify = function verify(message) { + CGCMsgMemCachedSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) { - var error = $root.CGCMsgMemCachedSet.KeyPair.verify(message.keys[i]); + var error = $root.CGCMsgMemCachedSet.KeyPair.verify(message.keys[i], _depth + 1); if (error) return "keys." + error; } @@ -6097,18 +7913,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet */ - CGCMsgMemCachedSet.fromObject = function fromObject(object) { + CGCMsgMemCachedSet.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedSet(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedSet.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedSet.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".CGCMsgMemCachedSet.keys: object expected"); - message.keys[i] = $root.CGCMsgMemCachedSet.KeyPair.fromObject(object.keys[i]); + if (!$util.isObject(object.keys[i])) + throw $TypeError(".CGCMsgMemCachedSet.keys: object expected"); + message.keys[i] = $root.CGCMsgMemCachedSet.KeyPair.fromObject(object.keys[i], _depth + 1); } } return message; @@ -6123,16 +7945,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedSet.toObject = function toObject(message, options) { + CGCMsgMemCachedSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.CGCMsgMemCachedSet.KeyPair.toObject(message.keys[j], options); + object.keys[j] = $root.CGCMsgMemCachedSet.KeyPair.toObject(message.keys[j], options, _depth + 1); } return object; }; @@ -6144,34 +7970,61 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedSet.prototype.toJSON = function() { + return CGCMsgMemCachedSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedSet + * @function getTypeUrl + * @memberof CGCMsgMemCachedSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedSet"; }; CGCMsgMemCachedSet.KeyPair = (function() { /** * Properties of a KeyPair. - * @memberof CGCMsgMemCachedSet - * @interface IKeyPair + * @typedef {Object} CGCMsgMemCachedSet.KeyPair.$Properties * @property {string|null} [name] KeyPair name * @property {Uint8Array|null} [value] KeyPair value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a KeyPair. + * @memberof CGCMsgMemCachedSet + * @interface IKeyPair + * @augments CGCMsgMemCachedSet.KeyPair.$Properties + * @deprecated Use CGCMsgMemCachedSet.KeyPair.$Properties instead. + */ + + /** + * Shape of a KeyPair. + * @typedef {CGCMsgMemCachedSet.KeyPair.$Properties} CGCMsgMemCachedSet.KeyPair.$Shape */ /** * Constructs a new KeyPair. * @memberof CGCMsgMemCachedSet * @classdesc Represents a KeyPair. - * @implements IKeyPair * @constructor - * @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.KeyPair.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function KeyPair(properties) { + var KeyPair = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * KeyPair name. @@ -6194,10 +8047,14 @@ * @function create * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.KeyPair.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair instance + * @type {{ + * (properties: CGCMsgMemCachedSet.KeyPair.$Shape): CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape; + * (properties?: CGCMsgMemCachedSet.KeyPair.$Properties): CGCMsgMemCachedSet.KeyPair; + * }} */ - KeyPair.create = function create(properties) { + KeyPair.create = function(properties) { return new KeyPair(properties); }; @@ -6206,17 +8063,24 @@ * @function encode * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair} message KeyPair message or plain object to encode + * @param {CGCMsgMemCachedSet.KeyPair.$Properties} message KeyPair message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyPair.encode = function encode(message, writer) { + KeyPair.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6225,12 +8089,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair} message KeyPair message or plain object to encode + * @param {CGCMsgMemCachedSet.KeyPair.$Properties} message KeyPair message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyPair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + KeyPair.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6240,28 +8104,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair + * @returns {CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape} KeyPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyPair.decode = function decode(reader, length) { + KeyPair.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedSet.KeyPair(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedSet.KeyPair(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6271,11 +8155,11 @@ * @memberof CGCMsgMemCachedSet.KeyPair * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair + * @returns {CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape} KeyPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyPair.decodeDelimited = function decodeDelimited(reader) { + KeyPair.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6289,13 +8173,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KeyPair.verify = function verify(message) { + KeyPair.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -6309,16 +8197,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair */ - KeyPair.fromObject = function fromObject(object) { + KeyPair.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedSet.KeyPair) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedSet.KeyPair: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedSet.KeyPair(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -6332,24 +8226,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KeyPair.toObject = function toObject(message, options) { + KeyPair.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -6360,8 +8258,22 @@ * @instance * @returns {Object.} JSON object */ - KeyPair.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + KeyPair.prototype.toJSON = function() { + return KeyPair.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for KeyPair + * @function getTypeUrl + * @memberof CGCMsgMemCachedSet.KeyPair + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + KeyPair.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedSet.KeyPair"; }; return KeyPair; @@ -6372,28 +8284,41 @@ $root.CGCMsgMemCachedDelete = (function() { + /** + * Properties of a CGCMsgMemCachedDelete. + * @typedef {Object} CGCMsgMemCachedDelete.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedDelete keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedDelete. * @exports ICGCMsgMemCachedDelete * @interface ICGCMsgMemCachedDelete - * @property {Array.|null} [keys] CGCMsgMemCachedDelete keys + * @augments CGCMsgMemCachedDelete.$Properties + * @deprecated Use CGCMsgMemCachedDelete.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedDelete. + * @typedef {CGCMsgMemCachedDelete.$Properties} CGCMsgMemCachedDelete.$Shape */ /** * Constructs a new CGCMsgMemCachedDelete. * @exports CGCMsgMemCachedDelete * @classdesc Represents a CGCMsgMemCachedDelete. - * @implements ICGCMsgMemCachedDelete * @constructor - * @param {ICGCMsgMemCachedDelete=} [properties] Properties to set + * @param {CGCMsgMemCachedDelete.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedDelete(properties) { + var CGCMsgMemCachedDelete = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedDelete keys. @@ -6408,10 +8333,14 @@ * @function create * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete=} [properties] Properties to set + * @param {CGCMsgMemCachedDelete.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete instance + * @type {{ + * (properties: CGCMsgMemCachedDelete.$Shape): CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape; + * (properties?: CGCMsgMemCachedDelete.$Properties): CGCMsgMemCachedDelete; + * }} */ - CGCMsgMemCachedDelete.create = function create(properties) { + CGCMsgMemCachedDelete.create = function(properties) { return new CGCMsgMemCachedDelete(properties); }; @@ -6420,16 +8349,23 @@ * @function encode * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete} message CGCMsgMemCachedDelete message or plain object to encode + * @param {CGCMsgMemCachedDelete.$Properties} message CGCMsgMemCachedDelete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedDelete.encode = function encode(message, writer) { + CGCMsgMemCachedDelete.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keys[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6438,12 +8374,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete} message CGCMsgMemCachedDelete message or plain object to encode + * @param {CGCMsgMemCachedDelete.$Properties} message CGCMsgMemCachedDelete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedDelete.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedDelete.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6453,27 +8389,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete + * @returns {CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape} CGCMsgMemCachedDelete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedDelete.decode = function decode(reader, length) { + CGCMsgMemCachedDelete.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedDelete(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedDelete(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6483,11 +8436,11 @@ * @memberof CGCMsgMemCachedDelete * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete + * @returns {CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape} CGCMsgMemCachedDelete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedDelete.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedDelete.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6501,11 +8454,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedDelete.verify = function verify(message) { + CGCMsgMemCachedDelete.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) if (!$util.isString(message.keys[i])) @@ -6522,16 +8479,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete */ - CGCMsgMemCachedDelete.fromObject = function fromObject(object) { + CGCMsgMemCachedDelete.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedDelete) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedDelete: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedDelete(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedDelete.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedDelete.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) - message.keys[i] = String(object.keys[i]); + message.keys[i] = $String(object.keys[i]); } return message; }; @@ -6545,14 +8508,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedDelete.toObject = function toObject(message, options) { + CGCMsgMemCachedDelete.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) object.keys[j] = message.keys[j]; } @@ -6566,8 +8533,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedDelete.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedDelete.prototype.toJSON = function() { + return CGCMsgMemCachedDelete.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedDelete + * @function getTypeUrl + * @memberof CGCMsgMemCachedDelete + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedDelete.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedDelete"; }; return CGCMsgMemCachedDelete; @@ -6575,36 +8556,53 @@ $root.CGCMsgMemCachedStats = (function() { + /** + * Properties of a CGCMsgMemCachedStats. + * @typedef {Object} CGCMsgMemCachedStats.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedStats. * @exports ICGCMsgMemCachedStats * @interface ICGCMsgMemCachedStats + * @augments CGCMsgMemCachedStats.$Properties + * @deprecated Use CGCMsgMemCachedStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedStats. + * @typedef {CGCMsgMemCachedStats.$Properties} CGCMsgMemCachedStats.$Shape */ /** * Constructs a new CGCMsgMemCachedStats. * @exports CGCMsgMemCachedStats * @classdesc Represents a CGCMsgMemCachedStats. - * @implements ICGCMsgMemCachedStats * @constructor - * @param {ICGCMsgMemCachedStats=} [properties] Properties to set + * @param {CGCMsgMemCachedStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedStats(properties) { + var CGCMsgMemCachedStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CGCMsgMemCachedStats instance using the specified properties. * @function create * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats=} [properties] Properties to set + * @param {CGCMsgMemCachedStats.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats instance + * @type {{ + * (properties: CGCMsgMemCachedStats.$Shape): CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape; + * (properties?: CGCMsgMemCachedStats.$Properties): CGCMsgMemCachedStats; + * }} */ - CGCMsgMemCachedStats.create = function create(properties) { + CGCMsgMemCachedStats.create = function(properties) { return new CGCMsgMemCachedStats(properties); }; @@ -6613,13 +8611,20 @@ * @function encode * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats} message CGCMsgMemCachedStats message or plain object to encode + * @param {CGCMsgMemCachedStats.$Properties} message CGCMsgMemCachedStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStats.encode = function encode(message, writer) { + CGCMsgMemCachedStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6628,12 +8633,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats} message CGCMsgMemCachedStats message or plain object to encode + * @param {CGCMsgMemCachedStats.$Properties} message CGCMsgMemCachedStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6643,22 +8648,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats + * @returns {CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape} CGCMsgMemCachedStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStats.decode = function decode(reader, length) { + CGCMsgMemCachedStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6668,11 +8684,11 @@ * @memberof CGCMsgMemCachedStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats + * @returns {CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape} CGCMsgMemCachedStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6686,9 +8702,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedStats.verify = function verify(message) { + CGCMsgMemCachedStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -6700,9 +8720,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats */ - CGCMsgMemCachedStats.fromObject = function fromObject(object) { + CGCMsgMemCachedStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CGCMsgMemCachedStats(); }; @@ -6715,7 +8741,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedStats.toObject = function toObject() { + CGCMsgMemCachedStats.toObject = function () { return {}; }; @@ -6726,8 +8752,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedStats.prototype.toJSON = function() { + return CGCMsgMemCachedStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedStats + * @function getTypeUrl + * @memberof CGCMsgMemCachedStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedStats"; }; return CGCMsgMemCachedStats; @@ -6737,8 +8777,7 @@ /** * Properties of a CGCMsgMemCachedStatsResponse. - * @exports ICGCMsgMemCachedStatsResponse - * @interface ICGCMsgMemCachedStatsResponse + * @typedef {Object} CGCMsgMemCachedStatsResponse.$Properties * @property {number|Long|null} [curr_connections] CGCMsgMemCachedStatsResponse curr_connections * @property {number|Long|null} [cmd_get] CGCMsgMemCachedStatsResponse cmd_get * @property {number|Long|null} [cmd_set] CGCMsgMemCachedStatsResponse cmd_set @@ -6753,22 +8792,36 @@ * @property {number|Long|null} [curr_items] CGCMsgMemCachedStatsResponse curr_items * @property {number|Long|null} [evictions] CGCMsgMemCachedStatsResponse evictions * @property {number|Long|null} [bytes] CGCMsgMemCachedStatsResponse bytes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgMemCachedStatsResponse. + * @exports ICGCMsgMemCachedStatsResponse + * @interface ICGCMsgMemCachedStatsResponse + * @augments CGCMsgMemCachedStatsResponse.$Properties + * @deprecated Use CGCMsgMemCachedStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedStatsResponse. + * @typedef {CGCMsgMemCachedStatsResponse.$Properties} CGCMsgMemCachedStatsResponse.$Shape */ /** * Constructs a new CGCMsgMemCachedStatsResponse. * @exports CGCMsgMemCachedStatsResponse * @classdesc Represents a CGCMsgMemCachedStatsResponse. - * @implements ICGCMsgMemCachedStatsResponse * @constructor - * @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedStatsResponse(properties) { + var CGCMsgMemCachedStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedStatsResponse curr_connections. @@ -6887,10 +8940,14 @@ * @function create * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse instance + * @type {{ + * (properties: CGCMsgMemCachedStatsResponse.$Shape): CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape; + * (properties?: CGCMsgMemCachedStatsResponse.$Properties): CGCMsgMemCachedStatsResponse; + * }} */ - CGCMsgMemCachedStatsResponse.create = function create(properties) { + CGCMsgMemCachedStatsResponse.create = function(properties) { return new CGCMsgMemCachedStatsResponse(properties); }; @@ -6899,41 +8956,48 @@ * @function encode * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse} message CGCMsgMemCachedStatsResponse message or plain object to encode + * @param {CGCMsgMemCachedStatsResponse.$Properties} message CGCMsgMemCachedStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStatsResponse.encode = function encode(message, writer) { + CGCMsgMemCachedStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.curr_connections != null && Object.hasOwnProperty.call(message, "curr_connections")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.curr_connections); - if (message.cmd_get != null && Object.hasOwnProperty.call(message, "cmd_get")) + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.cmd_get); - if (message.cmd_set != null && Object.hasOwnProperty.call(message, "cmd_set")) + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.cmd_set); - if (message.cmd_flush != null && Object.hasOwnProperty.call(message, "cmd_flush")) + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.cmd_flush); - if (message.get_hits != null && Object.hasOwnProperty.call(message, "get_hits")) + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.get_hits); - if (message.get_misses != null && Object.hasOwnProperty.call(message, "get_misses")) + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.get_misses); - if (message.delete_hits != null && Object.hasOwnProperty.call(message, "delete_hits")) + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.delete_hits); - if (message.delete_misses != null && Object.hasOwnProperty.call(message, "delete_misses")) + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.delete_misses); - if (message.bytes_read != null && Object.hasOwnProperty.call(message, "bytes_read")) + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.bytes_read); - if (message.bytes_written != null && Object.hasOwnProperty.call(message, "bytes_written")) + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.bytes_written); - if (message.limit_maxbytes != null && Object.hasOwnProperty.call(message, "limit_maxbytes")) + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.limit_maxbytes); - if (message.curr_items != null && Object.hasOwnProperty.call(message, "curr_items")) + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.curr_items); - if (message.evictions != null && Object.hasOwnProperty.call(message, "evictions")) + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.evictions); - if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) writer.uint32(/* id 14, wireType 0 =*/112).uint64(message.bytes); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6942,12 +9006,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse} message CGCMsgMemCachedStatsResponse message or plain object to encode + * @param {CGCMsgMemCachedStatsResponse.$Properties} message CGCMsgMemCachedStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6957,64 +9021,120 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse + * @returns {CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape} CGCMsgMemCachedStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStatsResponse.decode = function decode(reader, length) { + CGCMsgMemCachedStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.curr_connections = reader.uint64(); - break; - case 2: - message.cmd_get = reader.uint64(); - break; - case 3: - message.cmd_set = reader.uint64(); - break; - case 4: - message.cmd_flush = reader.uint64(); - break; - case 5: - message.get_hits = reader.uint64(); - break; - case 6: - message.get_misses = reader.uint64(); - break; - case 7: - message.delete_hits = reader.uint64(); - break; - case 8: - message.delete_misses = reader.uint64(); - break; - case 9: - message.bytes_read = reader.uint64(); - break; - case 10: - message.bytes_written = reader.uint64(); - break; - case 11: - message.limit_maxbytes = reader.uint64(); - break; - case 12: - message.curr_items = reader.uint64(); - break; - case 13: - message.evictions = reader.uint64(); - break; - case 14: - message.bytes = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.curr_connections = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.cmd_get = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.cmd_set = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.cmd_flush = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.get_hits = reader.uint64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.get_misses = reader.uint64(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.delete_hits = reader.uint64(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.delete_misses = reader.uint64(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.bytes_read = reader.uint64(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.bytes_written = reader.uint64(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.limit_maxbytes = reader.uint64(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.curr_items = reader.uint64(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.evictions = reader.uint64(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.bytes = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7024,11 +9144,11 @@ * @memberof CGCMsgMemCachedStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse + * @returns {CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape} CGCMsgMemCachedStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7042,49 +9162,53 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedStatsResponse.verify = function verify(message) { + CGCMsgMemCachedStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.curr_connections != null && message.hasOwnProperty("curr_connections")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) if (!$util.isInteger(message.curr_connections) && !(message.curr_connections && $util.isInteger(message.curr_connections.low) && $util.isInteger(message.curr_connections.high))) return "curr_connections: integer|Long expected"; - if (message.cmd_get != null && message.hasOwnProperty("cmd_get")) + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) if (!$util.isInteger(message.cmd_get) && !(message.cmd_get && $util.isInteger(message.cmd_get.low) && $util.isInteger(message.cmd_get.high))) return "cmd_get: integer|Long expected"; - if (message.cmd_set != null && message.hasOwnProperty("cmd_set")) + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) if (!$util.isInteger(message.cmd_set) && !(message.cmd_set && $util.isInteger(message.cmd_set.low) && $util.isInteger(message.cmd_set.high))) return "cmd_set: integer|Long expected"; - if (message.cmd_flush != null && message.hasOwnProperty("cmd_flush")) + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) if (!$util.isInteger(message.cmd_flush) && !(message.cmd_flush && $util.isInteger(message.cmd_flush.low) && $util.isInteger(message.cmd_flush.high))) return "cmd_flush: integer|Long expected"; - if (message.get_hits != null && message.hasOwnProperty("get_hits")) + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) if (!$util.isInteger(message.get_hits) && !(message.get_hits && $util.isInteger(message.get_hits.low) && $util.isInteger(message.get_hits.high))) return "get_hits: integer|Long expected"; - if (message.get_misses != null && message.hasOwnProperty("get_misses")) + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) if (!$util.isInteger(message.get_misses) && !(message.get_misses && $util.isInteger(message.get_misses.low) && $util.isInteger(message.get_misses.high))) return "get_misses: integer|Long expected"; - if (message.delete_hits != null && message.hasOwnProperty("delete_hits")) + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) if (!$util.isInteger(message.delete_hits) && !(message.delete_hits && $util.isInteger(message.delete_hits.low) && $util.isInteger(message.delete_hits.high))) return "delete_hits: integer|Long expected"; - if (message.delete_misses != null && message.hasOwnProperty("delete_misses")) + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) if (!$util.isInteger(message.delete_misses) && !(message.delete_misses && $util.isInteger(message.delete_misses.low) && $util.isInteger(message.delete_misses.high))) return "delete_misses: integer|Long expected"; - if (message.bytes_read != null && message.hasOwnProperty("bytes_read")) + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) if (!$util.isInteger(message.bytes_read) && !(message.bytes_read && $util.isInteger(message.bytes_read.low) && $util.isInteger(message.bytes_read.high))) return "bytes_read: integer|Long expected"; - if (message.bytes_written != null && message.hasOwnProperty("bytes_written")) + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) if (!$util.isInteger(message.bytes_written) && !(message.bytes_written && $util.isInteger(message.bytes_written.low) && $util.isInteger(message.bytes_written.high))) return "bytes_written: integer|Long expected"; - if (message.limit_maxbytes != null && message.hasOwnProperty("limit_maxbytes")) + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) if (!$util.isInteger(message.limit_maxbytes) && !(message.limit_maxbytes && $util.isInteger(message.limit_maxbytes.low) && $util.isInteger(message.limit_maxbytes.high))) return "limit_maxbytes: integer|Long expected"; - if (message.curr_items != null && message.hasOwnProperty("curr_items")) + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) if (!$util.isInteger(message.curr_items) && !(message.curr_items && $util.isInteger(message.curr_items.low) && $util.isInteger(message.curr_items.high))) return "curr_items: integer|Long expected"; - if (message.evictions != null && message.hasOwnProperty("evictions")) + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) if (!$util.isInteger(message.evictions) && !(message.evictions && $util.isInteger(message.evictions.low) && $util.isInteger(message.evictions.high))) return "evictions: integer|Long expected"; - if (message.bytes != null && message.hasOwnProperty("bytes")) + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) if (!$util.isInteger(message.bytes) && !(message.bytes && $util.isInteger(message.bytes.low) && $util.isInteger(message.bytes.high))) return "bytes: integer|Long expected"; return null; @@ -7098,132 +9222,138 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse */ - CGCMsgMemCachedStatsResponse.fromObject = function fromObject(object) { + CGCMsgMemCachedStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedStatsResponse(); if (object.curr_connections != null) if ($util.Long) - (message.curr_connections = $util.Long.fromValue(object.curr_connections)).unsigned = true; + message.curr_connections = $util.Long.fromValue(object.curr_connections, true); else if (typeof object.curr_connections === "string") - message.curr_connections = parseInt(object.curr_connections, 10); + message.curr_connections = $parseInt(object.curr_connections, 10); else if (typeof object.curr_connections === "number") message.curr_connections = object.curr_connections; else if (typeof object.curr_connections === "object") message.curr_connections = new $util.LongBits(object.curr_connections.low >>> 0, object.curr_connections.high >>> 0).toNumber(true); if (object.cmd_get != null) if ($util.Long) - (message.cmd_get = $util.Long.fromValue(object.cmd_get)).unsigned = true; + message.cmd_get = $util.Long.fromValue(object.cmd_get, true); else if (typeof object.cmd_get === "string") - message.cmd_get = parseInt(object.cmd_get, 10); + message.cmd_get = $parseInt(object.cmd_get, 10); else if (typeof object.cmd_get === "number") message.cmd_get = object.cmd_get; else if (typeof object.cmd_get === "object") message.cmd_get = new $util.LongBits(object.cmd_get.low >>> 0, object.cmd_get.high >>> 0).toNumber(true); if (object.cmd_set != null) if ($util.Long) - (message.cmd_set = $util.Long.fromValue(object.cmd_set)).unsigned = true; + message.cmd_set = $util.Long.fromValue(object.cmd_set, true); else if (typeof object.cmd_set === "string") - message.cmd_set = parseInt(object.cmd_set, 10); + message.cmd_set = $parseInt(object.cmd_set, 10); else if (typeof object.cmd_set === "number") message.cmd_set = object.cmd_set; else if (typeof object.cmd_set === "object") message.cmd_set = new $util.LongBits(object.cmd_set.low >>> 0, object.cmd_set.high >>> 0).toNumber(true); if (object.cmd_flush != null) if ($util.Long) - (message.cmd_flush = $util.Long.fromValue(object.cmd_flush)).unsigned = true; + message.cmd_flush = $util.Long.fromValue(object.cmd_flush, true); else if (typeof object.cmd_flush === "string") - message.cmd_flush = parseInt(object.cmd_flush, 10); + message.cmd_flush = $parseInt(object.cmd_flush, 10); else if (typeof object.cmd_flush === "number") message.cmd_flush = object.cmd_flush; else if (typeof object.cmd_flush === "object") message.cmd_flush = new $util.LongBits(object.cmd_flush.low >>> 0, object.cmd_flush.high >>> 0).toNumber(true); if (object.get_hits != null) if ($util.Long) - (message.get_hits = $util.Long.fromValue(object.get_hits)).unsigned = true; + message.get_hits = $util.Long.fromValue(object.get_hits, true); else if (typeof object.get_hits === "string") - message.get_hits = parseInt(object.get_hits, 10); + message.get_hits = $parseInt(object.get_hits, 10); else if (typeof object.get_hits === "number") message.get_hits = object.get_hits; else if (typeof object.get_hits === "object") message.get_hits = new $util.LongBits(object.get_hits.low >>> 0, object.get_hits.high >>> 0).toNumber(true); if (object.get_misses != null) if ($util.Long) - (message.get_misses = $util.Long.fromValue(object.get_misses)).unsigned = true; + message.get_misses = $util.Long.fromValue(object.get_misses, true); else if (typeof object.get_misses === "string") - message.get_misses = parseInt(object.get_misses, 10); + message.get_misses = $parseInt(object.get_misses, 10); else if (typeof object.get_misses === "number") message.get_misses = object.get_misses; else if (typeof object.get_misses === "object") message.get_misses = new $util.LongBits(object.get_misses.low >>> 0, object.get_misses.high >>> 0).toNumber(true); if (object.delete_hits != null) if ($util.Long) - (message.delete_hits = $util.Long.fromValue(object.delete_hits)).unsigned = true; + message.delete_hits = $util.Long.fromValue(object.delete_hits, true); else if (typeof object.delete_hits === "string") - message.delete_hits = parseInt(object.delete_hits, 10); + message.delete_hits = $parseInt(object.delete_hits, 10); else if (typeof object.delete_hits === "number") message.delete_hits = object.delete_hits; else if (typeof object.delete_hits === "object") message.delete_hits = new $util.LongBits(object.delete_hits.low >>> 0, object.delete_hits.high >>> 0).toNumber(true); if (object.delete_misses != null) if ($util.Long) - (message.delete_misses = $util.Long.fromValue(object.delete_misses)).unsigned = true; + message.delete_misses = $util.Long.fromValue(object.delete_misses, true); else if (typeof object.delete_misses === "string") - message.delete_misses = parseInt(object.delete_misses, 10); + message.delete_misses = $parseInt(object.delete_misses, 10); else if (typeof object.delete_misses === "number") message.delete_misses = object.delete_misses; else if (typeof object.delete_misses === "object") message.delete_misses = new $util.LongBits(object.delete_misses.low >>> 0, object.delete_misses.high >>> 0).toNumber(true); if (object.bytes_read != null) if ($util.Long) - (message.bytes_read = $util.Long.fromValue(object.bytes_read)).unsigned = true; + message.bytes_read = $util.Long.fromValue(object.bytes_read, true); else if (typeof object.bytes_read === "string") - message.bytes_read = parseInt(object.bytes_read, 10); + message.bytes_read = $parseInt(object.bytes_read, 10); else if (typeof object.bytes_read === "number") message.bytes_read = object.bytes_read; else if (typeof object.bytes_read === "object") message.bytes_read = new $util.LongBits(object.bytes_read.low >>> 0, object.bytes_read.high >>> 0).toNumber(true); if (object.bytes_written != null) if ($util.Long) - (message.bytes_written = $util.Long.fromValue(object.bytes_written)).unsigned = true; + message.bytes_written = $util.Long.fromValue(object.bytes_written, true); else if (typeof object.bytes_written === "string") - message.bytes_written = parseInt(object.bytes_written, 10); + message.bytes_written = $parseInt(object.bytes_written, 10); else if (typeof object.bytes_written === "number") message.bytes_written = object.bytes_written; else if (typeof object.bytes_written === "object") message.bytes_written = new $util.LongBits(object.bytes_written.low >>> 0, object.bytes_written.high >>> 0).toNumber(true); if (object.limit_maxbytes != null) if ($util.Long) - (message.limit_maxbytes = $util.Long.fromValue(object.limit_maxbytes)).unsigned = true; + message.limit_maxbytes = $util.Long.fromValue(object.limit_maxbytes, true); else if (typeof object.limit_maxbytes === "string") - message.limit_maxbytes = parseInt(object.limit_maxbytes, 10); + message.limit_maxbytes = $parseInt(object.limit_maxbytes, 10); else if (typeof object.limit_maxbytes === "number") message.limit_maxbytes = object.limit_maxbytes; else if (typeof object.limit_maxbytes === "object") message.limit_maxbytes = new $util.LongBits(object.limit_maxbytes.low >>> 0, object.limit_maxbytes.high >>> 0).toNumber(true); if (object.curr_items != null) if ($util.Long) - (message.curr_items = $util.Long.fromValue(object.curr_items)).unsigned = true; + message.curr_items = $util.Long.fromValue(object.curr_items, true); else if (typeof object.curr_items === "string") - message.curr_items = parseInt(object.curr_items, 10); + message.curr_items = $parseInt(object.curr_items, 10); else if (typeof object.curr_items === "number") message.curr_items = object.curr_items; else if (typeof object.curr_items === "object") message.curr_items = new $util.LongBits(object.curr_items.low >>> 0, object.curr_items.high >>> 0).toNumber(true); if (object.evictions != null) if ($util.Long) - (message.evictions = $util.Long.fromValue(object.evictions)).unsigned = true; + message.evictions = $util.Long.fromValue(object.evictions, true); else if (typeof object.evictions === "string") - message.evictions = parseInt(object.evictions, 10); + message.evictions = $parseInt(object.evictions, 10); else if (typeof object.evictions === "number") message.evictions = object.evictions; else if (typeof object.evictions === "object") message.evictions = new $util.LongBits(object.evictions.low >>> 0, object.evictions.high >>> 0).toNumber(true); if (object.bytes != null) if ($util.Long) - (message.bytes = $util.Long.fromValue(object.bytes)).unsigned = true; + message.bytes = $util.Long.fromValue(object.bytes, true); else if (typeof object.bytes === "string") - message.bytes = parseInt(object.bytes, 10); + message.bytes = $parseInt(object.bytes, 10); else if (typeof object.bytes === "number") message.bytes = object.bytes; else if (typeof object.bytes === "object") @@ -7240,152 +9370,184 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedStatsResponse.toObject = function toObject(message, options) { + CGCMsgMemCachedStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.curr_connections = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.curr_connections = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.curr_connections = options.longs === String ? "0" : 0; + object.curr_connections = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_get = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_get = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_get = options.longs === String ? "0" : 0; + object.cmd_get = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_set = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_set = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_set = options.longs === String ? "0" : 0; + object.cmd_set = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_flush = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_flush = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_flush = options.longs === String ? "0" : 0; + object.cmd_flush = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.get_hits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.get_hits = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.get_hits = options.longs === String ? "0" : 0; + object.get_hits = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.get_misses = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.get_misses = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.get_misses = options.longs === String ? "0" : 0; + object.get_misses = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.delete_hits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.delete_hits = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.delete_hits = options.longs === String ? "0" : 0; + object.delete_hits = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.delete_misses = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.delete_misses = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.delete_misses = options.longs === String ? "0" : 0; + object.delete_misses = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes_read = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes_read = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes_read = options.longs === String ? "0" : 0; + object.bytes_read = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes_written = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes_written = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes_written = options.longs === String ? "0" : 0; + object.bytes_written = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.limit_maxbytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.limit_maxbytes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.limit_maxbytes = options.longs === String ? "0" : 0; + object.limit_maxbytes = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.curr_items = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.curr_items = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.curr_items = options.longs === String ? "0" : 0; + object.curr_items = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.evictions = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.evictions = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.evictions = options.longs === String ? "0" : 0; + object.evictions = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes = options.longs === String ? "0" : 0; + object.bytes = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.curr_connections != null && message.hasOwnProperty("curr_connections")) - if (typeof message.curr_connections === "number") - object.curr_connections = options.longs === String ? String(message.curr_connections) : message.curr_connections; + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.curr_connections = typeof message.curr_connections === "number" ? $BigInt(message.curr_connections) : $util.Long.fromBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0, true).toBigInt(); + else if (typeof message.curr_connections === "number") + object.curr_connections = options.longs === $String ? $String(message.curr_connections) : message.curr_connections; else - object.curr_connections = options.longs === String ? $util.Long.prototype.toString.call(message.curr_connections) : options.longs === Number ? new $util.LongBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0).toNumber(true) : message.curr_connections; - if (message.cmd_get != null && message.hasOwnProperty("cmd_get")) - if (typeof message.cmd_get === "number") - object.cmd_get = options.longs === String ? String(message.cmd_get) : message.cmd_get; + object.curr_connections = options.longs === $String ? $util.Long.prototype.toString.call(message.curr_connections) : options.longs === $Number ? new $util.LongBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0).toNumber(true) : message.curr_connections; + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_get = typeof message.cmd_get === "number" ? $BigInt(message.cmd_get) : $util.Long.fromBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_get === "number") + object.cmd_get = options.longs === $String ? $String(message.cmd_get) : message.cmd_get; else - object.cmd_get = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_get) : options.longs === Number ? new $util.LongBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0).toNumber(true) : message.cmd_get; - if (message.cmd_set != null && message.hasOwnProperty("cmd_set")) - if (typeof message.cmd_set === "number") - object.cmd_set = options.longs === String ? String(message.cmd_set) : message.cmd_set; + object.cmd_get = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_get) : options.longs === $Number ? new $util.LongBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0).toNumber(true) : message.cmd_get; + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_set = typeof message.cmd_set === "number" ? $BigInt(message.cmd_set) : $util.Long.fromBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_set === "number") + object.cmd_set = options.longs === $String ? $String(message.cmd_set) : message.cmd_set; else - object.cmd_set = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_set) : options.longs === Number ? new $util.LongBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0).toNumber(true) : message.cmd_set; - if (message.cmd_flush != null && message.hasOwnProperty("cmd_flush")) - if (typeof message.cmd_flush === "number") - object.cmd_flush = options.longs === String ? String(message.cmd_flush) : message.cmd_flush; + object.cmd_set = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_set) : options.longs === $Number ? new $util.LongBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0).toNumber(true) : message.cmd_set; + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_flush = typeof message.cmd_flush === "number" ? $BigInt(message.cmd_flush) : $util.Long.fromBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_flush === "number") + object.cmd_flush = options.longs === $String ? $String(message.cmd_flush) : message.cmd_flush; else - object.cmd_flush = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_flush) : options.longs === Number ? new $util.LongBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0).toNumber(true) : message.cmd_flush; - if (message.get_hits != null && message.hasOwnProperty("get_hits")) - if (typeof message.get_hits === "number") - object.get_hits = options.longs === String ? String(message.get_hits) : message.get_hits; + object.cmd_flush = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_flush) : options.longs === $Number ? new $util.LongBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0).toNumber(true) : message.cmd_flush; + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.get_hits = typeof message.get_hits === "number" ? $BigInt(message.get_hits) : $util.Long.fromBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0, true).toBigInt(); + else if (typeof message.get_hits === "number") + object.get_hits = options.longs === $String ? $String(message.get_hits) : message.get_hits; else - object.get_hits = options.longs === String ? $util.Long.prototype.toString.call(message.get_hits) : options.longs === Number ? new $util.LongBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0).toNumber(true) : message.get_hits; - if (message.get_misses != null && message.hasOwnProperty("get_misses")) - if (typeof message.get_misses === "number") - object.get_misses = options.longs === String ? String(message.get_misses) : message.get_misses; + object.get_hits = options.longs === $String ? $util.Long.prototype.toString.call(message.get_hits) : options.longs === $Number ? new $util.LongBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0).toNumber(true) : message.get_hits; + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.get_misses = typeof message.get_misses === "number" ? $BigInt(message.get_misses) : $util.Long.fromBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0, true).toBigInt(); + else if (typeof message.get_misses === "number") + object.get_misses = options.longs === $String ? $String(message.get_misses) : message.get_misses; else - object.get_misses = options.longs === String ? $util.Long.prototype.toString.call(message.get_misses) : options.longs === Number ? new $util.LongBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0).toNumber(true) : message.get_misses; - if (message.delete_hits != null && message.hasOwnProperty("delete_hits")) - if (typeof message.delete_hits === "number") - object.delete_hits = options.longs === String ? String(message.delete_hits) : message.delete_hits; + object.get_misses = options.longs === $String ? $util.Long.prototype.toString.call(message.get_misses) : options.longs === $Number ? new $util.LongBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0).toNumber(true) : message.get_misses; + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.delete_hits = typeof message.delete_hits === "number" ? $BigInt(message.delete_hits) : $util.Long.fromBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0, true).toBigInt(); + else if (typeof message.delete_hits === "number") + object.delete_hits = options.longs === $String ? $String(message.delete_hits) : message.delete_hits; else - object.delete_hits = options.longs === String ? $util.Long.prototype.toString.call(message.delete_hits) : options.longs === Number ? new $util.LongBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0).toNumber(true) : message.delete_hits; - if (message.delete_misses != null && message.hasOwnProperty("delete_misses")) - if (typeof message.delete_misses === "number") - object.delete_misses = options.longs === String ? String(message.delete_misses) : message.delete_misses; + object.delete_hits = options.longs === $String ? $util.Long.prototype.toString.call(message.delete_hits) : options.longs === $Number ? new $util.LongBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0).toNumber(true) : message.delete_hits; + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.delete_misses = typeof message.delete_misses === "number" ? $BigInt(message.delete_misses) : $util.Long.fromBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0, true).toBigInt(); + else if (typeof message.delete_misses === "number") + object.delete_misses = options.longs === $String ? $String(message.delete_misses) : message.delete_misses; else - object.delete_misses = options.longs === String ? $util.Long.prototype.toString.call(message.delete_misses) : options.longs === Number ? new $util.LongBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0).toNumber(true) : message.delete_misses; - if (message.bytes_read != null && message.hasOwnProperty("bytes_read")) - if (typeof message.bytes_read === "number") - object.bytes_read = options.longs === String ? String(message.bytes_read) : message.bytes_read; + object.delete_misses = options.longs === $String ? $util.Long.prototype.toString.call(message.delete_misses) : options.longs === $Number ? new $util.LongBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0).toNumber(true) : message.delete_misses; + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes_read = typeof message.bytes_read === "number" ? $BigInt(message.bytes_read) : $util.Long.fromBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0, true).toBigInt(); + else if (typeof message.bytes_read === "number") + object.bytes_read = options.longs === $String ? $String(message.bytes_read) : message.bytes_read; else - object.bytes_read = options.longs === String ? $util.Long.prototype.toString.call(message.bytes_read) : options.longs === Number ? new $util.LongBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0).toNumber(true) : message.bytes_read; - if (message.bytes_written != null && message.hasOwnProperty("bytes_written")) - if (typeof message.bytes_written === "number") - object.bytes_written = options.longs === String ? String(message.bytes_written) : message.bytes_written; + object.bytes_read = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes_read) : options.longs === $Number ? new $util.LongBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0).toNumber(true) : message.bytes_read; + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes_written = typeof message.bytes_written === "number" ? $BigInt(message.bytes_written) : $util.Long.fromBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0, true).toBigInt(); + else if (typeof message.bytes_written === "number") + object.bytes_written = options.longs === $String ? $String(message.bytes_written) : message.bytes_written; else - object.bytes_written = options.longs === String ? $util.Long.prototype.toString.call(message.bytes_written) : options.longs === Number ? new $util.LongBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0).toNumber(true) : message.bytes_written; - if (message.limit_maxbytes != null && message.hasOwnProperty("limit_maxbytes")) - if (typeof message.limit_maxbytes === "number") - object.limit_maxbytes = options.longs === String ? String(message.limit_maxbytes) : message.limit_maxbytes; + object.bytes_written = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes_written) : options.longs === $Number ? new $util.LongBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0).toNumber(true) : message.bytes_written; + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.limit_maxbytes = typeof message.limit_maxbytes === "number" ? $BigInt(message.limit_maxbytes) : $util.Long.fromBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0, true).toBigInt(); + else if (typeof message.limit_maxbytes === "number") + object.limit_maxbytes = options.longs === $String ? $String(message.limit_maxbytes) : message.limit_maxbytes; else - object.limit_maxbytes = options.longs === String ? $util.Long.prototype.toString.call(message.limit_maxbytes) : options.longs === Number ? new $util.LongBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0).toNumber(true) : message.limit_maxbytes; - if (message.curr_items != null && message.hasOwnProperty("curr_items")) - if (typeof message.curr_items === "number") - object.curr_items = options.longs === String ? String(message.curr_items) : message.curr_items; + object.limit_maxbytes = options.longs === $String ? $util.Long.prototype.toString.call(message.limit_maxbytes) : options.longs === $Number ? new $util.LongBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0).toNumber(true) : message.limit_maxbytes; + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.curr_items = typeof message.curr_items === "number" ? $BigInt(message.curr_items) : $util.Long.fromBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0, true).toBigInt(); + else if (typeof message.curr_items === "number") + object.curr_items = options.longs === $String ? $String(message.curr_items) : message.curr_items; else - object.curr_items = options.longs === String ? $util.Long.prototype.toString.call(message.curr_items) : options.longs === Number ? new $util.LongBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0).toNumber(true) : message.curr_items; - if (message.evictions != null && message.hasOwnProperty("evictions")) - if (typeof message.evictions === "number") - object.evictions = options.longs === String ? String(message.evictions) : message.evictions; + object.curr_items = options.longs === $String ? $util.Long.prototype.toString.call(message.curr_items) : options.longs === $Number ? new $util.LongBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0).toNumber(true) : message.curr_items; + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.evictions = typeof message.evictions === "number" ? $BigInt(message.evictions) : $util.Long.fromBits(message.evictions.low >>> 0, message.evictions.high >>> 0, true).toBigInt(); + else if (typeof message.evictions === "number") + object.evictions = options.longs === $String ? $String(message.evictions) : message.evictions; else - object.evictions = options.longs === String ? $util.Long.prototype.toString.call(message.evictions) : options.longs === Number ? new $util.LongBits(message.evictions.low >>> 0, message.evictions.high >>> 0).toNumber(true) : message.evictions; - if (message.bytes != null && message.hasOwnProperty("bytes")) - if (typeof message.bytes === "number") - object.bytes = options.longs === String ? String(message.bytes) : message.bytes; + object.evictions = options.longs === $String ? $util.Long.prototype.toString.call(message.evictions) : options.longs === $Number ? new $util.LongBits(message.evictions.low >>> 0, message.evictions.high >>> 0).toNumber(true) : message.evictions; + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes = typeof message.bytes === "number" ? $BigInt(message.bytes) : $util.Long.fromBits(message.bytes.low >>> 0, message.bytes.high >>> 0, true).toBigInt(); + else if (typeof message.bytes === "number") + object.bytes = options.longs === $String ? $String(message.bytes) : message.bytes; else - object.bytes = options.longs === String ? $util.Long.prototype.toString.call(message.bytes) : options.longs === Number ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber(true) : message.bytes; + object.bytes = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes) : options.longs === $Number ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber(true) : message.bytes; return object; }; @@ -7396,8 +9558,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedStatsResponse.prototype.toJSON = function() { + return CGCMsgMemCachedStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedStatsResponse + * @function getTypeUrl + * @memberof CGCMsgMemCachedStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedStatsResponse"; }; return CGCMsgMemCachedStatsResponse; @@ -7405,27 +9581,40 @@ $root.CGCMsgSQLStats = (function() { + /** + * Properties of a CGCMsgSQLStats. + * @typedef {Object} CGCMsgSQLStats.$Properties + * @property {number|null} [schema_catalog] CGCMsgSQLStats schema_catalog + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgSQLStats. * @exports ICGCMsgSQLStats * @interface ICGCMsgSQLStats - * @property {number|null} [schema_catalog] CGCMsgSQLStats schema_catalog + * @augments CGCMsgSQLStats.$Properties + * @deprecated Use CGCMsgSQLStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgSQLStats. + * @typedef {CGCMsgSQLStats.$Properties} CGCMsgSQLStats.$Shape */ /** * Constructs a new CGCMsgSQLStats. * @exports CGCMsgSQLStats * @classdesc Represents a CGCMsgSQLStats. - * @implements ICGCMsgSQLStats * @constructor - * @param {ICGCMsgSQLStats=} [properties] Properties to set + * @param {CGCMsgSQLStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSQLStats(properties) { + var CGCMsgSQLStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSQLStats schema_catalog. @@ -7440,10 +9629,14 @@ * @function create * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats=} [properties] Properties to set + * @param {CGCMsgSQLStats.$Properties=} [properties] Properties to set * @returns {CGCMsgSQLStats} CGCMsgSQLStats instance + * @type {{ + * (properties: CGCMsgSQLStats.$Shape): CGCMsgSQLStats & CGCMsgSQLStats.$Shape; + * (properties?: CGCMsgSQLStats.$Properties): CGCMsgSQLStats; + * }} */ - CGCMsgSQLStats.create = function create(properties) { + CGCMsgSQLStats.create = function(properties) { return new CGCMsgSQLStats(properties); }; @@ -7452,15 +9645,22 @@ * @function encode * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats} message CGCMsgSQLStats message or plain object to encode + * @param {CGCMsgSQLStats.$Properties} message CGCMsgSQLStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStats.encode = function encode(message, writer) { + CGCMsgSQLStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.schema_catalog != null && Object.hasOwnProperty.call(message, "schema_catalog")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.schema_catalog); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7469,12 +9669,12 @@ * @function encodeDelimited * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats} message CGCMsgSQLStats message or plain object to encode + * @param {CGCMsgSQLStats.$Properties} message CGCMsgSQLStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSQLStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7484,25 +9684,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSQLStats} CGCMsgSQLStats + * @returns {CGCMsgSQLStats & CGCMsgSQLStats.$Shape} CGCMsgSQLStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStats.decode = function decode(reader, length) { + CGCMsgSQLStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSQLStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSQLStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.schema_catalog = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.schema_catalog = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7512,11 +9729,11 @@ * @memberof CGCMsgSQLStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSQLStats} CGCMsgSQLStats + * @returns {CGCMsgSQLStats & CGCMsgSQLStats.$Shape} CGCMsgSQLStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSQLStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7530,10 +9747,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSQLStats.verify = function verify(message) { + CGCMsgSQLStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) if (!$util.isInteger(message.schema_catalog)) return "schema_catalog: integer expected"; return null; @@ -7547,9 +9768,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgSQLStats} CGCMsgSQLStats */ - CGCMsgSQLStats.fromObject = function fromObject(object) { + CGCMsgSQLStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSQLStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSQLStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSQLStats(); if (object.schema_catalog != null) message.schema_catalog = object.schema_catalog >>> 0; @@ -7565,13 +9792,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSQLStats.toObject = function toObject(message, options) { + CGCMsgSQLStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.schema_catalog = 0; - if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog")) + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) object.schema_catalog = message.schema_catalog; return object; }; @@ -7583,8 +9814,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSQLStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSQLStats.prototype.toJSON = function() { + return CGCMsgSQLStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSQLStats + * @function getTypeUrl + * @memberof CGCMsgSQLStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSQLStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSQLStats"; }; return CGCMsgSQLStats; @@ -7594,8 +9839,7 @@ /** * Properties of a CGCMsgSQLStatsResponse. - * @exports ICGCMsgSQLStatsResponse - * @interface ICGCMsgSQLStatsResponse + * @typedef {Object} CGCMsgSQLStatsResponse.$Properties * @property {number|null} [threads] CGCMsgSQLStatsResponse threads * @property {number|null} [threads_connected] CGCMsgSQLStatsResponse threads_connected * @property {number|null} [threads_active] CGCMsgSQLStatsResponse threads_active @@ -7605,22 +9849,36 @@ * @property {number|null} [deadlock_retries] CGCMsgSQLStatsResponse deadlock_retries * @property {number|null} [operations_timed_out_in_queue] CGCMsgSQLStatsResponse operations_timed_out_in_queue * @property {number|null} [errors] CGCMsgSQLStatsResponse errors + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgSQLStatsResponse. + * @exports ICGCMsgSQLStatsResponse + * @interface ICGCMsgSQLStatsResponse + * @augments CGCMsgSQLStatsResponse.$Properties + * @deprecated Use CGCMsgSQLStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgSQLStatsResponse. + * @typedef {CGCMsgSQLStatsResponse.$Properties} CGCMsgSQLStatsResponse.$Shape */ /** * Constructs a new CGCMsgSQLStatsResponse. * @exports CGCMsgSQLStatsResponse * @classdesc Represents a CGCMsgSQLStatsResponse. - * @implements ICGCMsgSQLStatsResponse * @constructor - * @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set + * @param {CGCMsgSQLStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSQLStatsResponse(properties) { + var CGCMsgSQLStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSQLStatsResponse threads. @@ -7699,10 +9957,14 @@ * @function create * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set + * @param {CGCMsgSQLStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse instance + * @type {{ + * (properties: CGCMsgSQLStatsResponse.$Shape): CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape; + * (properties?: CGCMsgSQLStatsResponse.$Properties): CGCMsgSQLStatsResponse; + * }} */ - CGCMsgSQLStatsResponse.create = function create(properties) { + CGCMsgSQLStatsResponse.create = function(properties) { return new CGCMsgSQLStatsResponse(properties); }; @@ -7711,31 +9973,38 @@ * @function encode * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse} message CGCMsgSQLStatsResponse message or plain object to encode + * @param {CGCMsgSQLStatsResponse.$Properties} message CGCMsgSQLStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStatsResponse.encode = function encode(message, writer) { + CGCMsgSQLStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.threads != null && Object.hasOwnProperty.call(message, "threads")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.threads); - if (message.threads_connected != null && Object.hasOwnProperty.call(message, "threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.threads_connected); - if (message.threads_active != null && Object.hasOwnProperty.call(message, "threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.threads_active); - if (message.operations_submitted != null && Object.hasOwnProperty.call(message, "operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.operations_submitted); - if (message.prepared_statements_executed != null && Object.hasOwnProperty.call(message, "prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.prepared_statements_executed); - if (message.non_prepared_statements_executed != null && Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.non_prepared_statements_executed); - if (message.deadlock_retries != null && Object.hasOwnProperty.call(message, "deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.deadlock_retries); - if (message.operations_timed_out_in_queue != null && Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.operations_timed_out_in_queue); - if (message.errors != null && Object.hasOwnProperty.call(message, "errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.errors); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7744,12 +10013,12 @@ * @function encodeDelimited * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse} message CGCMsgSQLStatsResponse message or plain object to encode + * @param {CGCMsgSQLStatsResponse.$Properties} message CGCMsgSQLStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSQLStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7759,49 +10028,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse + * @returns {CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape} CGCMsgSQLStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStatsResponse.decode = function decode(reader, length) { + CGCMsgSQLStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSQLStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSQLStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.threads = reader.uint32(); - break; - case 2: - message.threads_connected = reader.uint32(); - break; - case 3: - message.threads_active = reader.uint32(); - break; - case 4: - message.operations_submitted = reader.uint32(); - break; - case 5: - message.prepared_statements_executed = reader.uint32(); - break; - case 6: - message.non_prepared_statements_executed = reader.uint32(); - break; - case 7: - message.deadlock_retries = reader.uint32(); - break; - case 8: - message.operations_timed_out_in_queue = reader.uint32(); - break; - case 9: - message.errors = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.threads = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.threads_connected = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.threads_active = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.operations_submitted = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.prepared_statements_executed = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.non_prepared_statements_executed = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.deadlock_retries = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.operations_timed_out_in_queue = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.errors = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7811,11 +10121,11 @@ * @memberof CGCMsgSQLStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse + * @returns {CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape} CGCMsgSQLStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSQLStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7829,34 +10139,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSQLStatsResponse.verify = function verify(message) { + CGCMsgSQLStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.threads != null && message.hasOwnProperty("threads")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) if (!$util.isInteger(message.threads)) return "threads: integer expected"; - if (message.threads_connected != null && message.hasOwnProperty("threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) if (!$util.isInteger(message.threads_connected)) return "threads_connected: integer expected"; - if (message.threads_active != null && message.hasOwnProperty("threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) if (!$util.isInteger(message.threads_active)) return "threads_active: integer expected"; - if (message.operations_submitted != null && message.hasOwnProperty("operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) if (!$util.isInteger(message.operations_submitted)) return "operations_submitted: integer expected"; - if (message.prepared_statements_executed != null && message.hasOwnProperty("prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) if (!$util.isInteger(message.prepared_statements_executed)) return "prepared_statements_executed: integer expected"; - if (message.non_prepared_statements_executed != null && message.hasOwnProperty("non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) if (!$util.isInteger(message.non_prepared_statements_executed)) return "non_prepared_statements_executed: integer expected"; - if (message.deadlock_retries != null && message.hasOwnProperty("deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) if (!$util.isInteger(message.deadlock_retries)) return "deadlock_retries: integer expected"; - if (message.operations_timed_out_in_queue != null && message.hasOwnProperty("operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) if (!$util.isInteger(message.operations_timed_out_in_queue)) return "operations_timed_out_in_queue: integer expected"; - if (message.errors != null && message.hasOwnProperty("errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) if (!$util.isInteger(message.errors)) return "errors: integer expected"; return null; @@ -7870,9 +10184,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse */ - CGCMsgSQLStatsResponse.fromObject = function fromObject(object) { + CGCMsgSQLStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSQLStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSQLStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSQLStatsResponse(); if (object.threads != null) message.threads = object.threads >>> 0; @@ -7904,9 +10224,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSQLStatsResponse.toObject = function toObject(message, options) { + CGCMsgSQLStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.threads = 0; @@ -7919,23 +10243,23 @@ object.operations_timed_out_in_queue = 0; object.errors = 0; } - if (message.threads != null && message.hasOwnProperty("threads")) + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) object.threads = message.threads; - if (message.threads_connected != null && message.hasOwnProperty("threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) object.threads_connected = message.threads_connected; - if (message.threads_active != null && message.hasOwnProperty("threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) object.threads_active = message.threads_active; - if (message.operations_submitted != null && message.hasOwnProperty("operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) object.operations_submitted = message.operations_submitted; - if (message.prepared_statements_executed != null && message.hasOwnProperty("prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) object.prepared_statements_executed = message.prepared_statements_executed; - if (message.non_prepared_statements_executed != null && message.hasOwnProperty("non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) object.non_prepared_statements_executed = message.non_prepared_statements_executed; - if (message.deadlock_retries != null && message.hasOwnProperty("deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) object.deadlock_retries = message.deadlock_retries; - if (message.operations_timed_out_in_queue != null && message.hasOwnProperty("operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) object.operations_timed_out_in_queue = message.operations_timed_out_in_queue; - if (message.errors != null && message.hasOwnProperty("errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) object.errors = message.errors; return object; }; @@ -7947,8 +10271,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSQLStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSQLStatsResponse.prototype.toJSON = function() { + return CGCMsgSQLStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSQLStatsResponse + * @function getTypeUrl + * @memberof CGCMsgSQLStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSQLStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSQLStatsResponse"; }; return CGCMsgSQLStatsResponse; @@ -7958,28 +10296,41 @@ /** * Properties of a CMsgAMAddFreeLicense. - * @exports ICMsgAMAddFreeLicense - * @interface ICMsgAMAddFreeLicense + * @typedef {Object} CMsgAMAddFreeLicense.$Properties * @property {number|Long|null} [steamid] CMsgAMAddFreeLicense steamid * @property {number|null} [ip_public] CMsgAMAddFreeLicense ip_public * @property {number|null} [packageid] CMsgAMAddFreeLicense packageid * @property {string|null} [store_country_code] CMsgAMAddFreeLicense store_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMAddFreeLicense. + * @exports ICMsgAMAddFreeLicense + * @interface ICMsgAMAddFreeLicense + * @augments CMsgAMAddFreeLicense.$Properties + * @deprecated Use CMsgAMAddFreeLicense.$Properties instead. + */ + + /** + * Shape of a CMsgAMAddFreeLicense. + * @typedef {CMsgAMAddFreeLicense.$Properties} CMsgAMAddFreeLicense.$Shape */ /** * Constructs a new CMsgAMAddFreeLicense. * @exports CMsgAMAddFreeLicense * @classdesc Represents a CMsgAMAddFreeLicense. - * @implements ICMsgAMAddFreeLicense * @constructor - * @param {ICMsgAMAddFreeLicense=} [properties] Properties to set + * @param {CMsgAMAddFreeLicense.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMAddFreeLicense(properties) { + var CMsgAMAddFreeLicense = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMAddFreeLicense steamid. @@ -7987,7 +10338,7 @@ * @memberof CMsgAMAddFreeLicense * @instance */ - CMsgAMAddFreeLicense.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMAddFreeLicense.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMAddFreeLicense ip_public. @@ -8018,10 +10369,14 @@ * @function create * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense=} [properties] Properties to set + * @param {CMsgAMAddFreeLicense.$Properties=} [properties] Properties to set * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense instance + * @type {{ + * (properties: CMsgAMAddFreeLicense.$Shape): CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape; + * (properties?: CMsgAMAddFreeLicense.$Properties): CMsgAMAddFreeLicense; + * }} */ - CMsgAMAddFreeLicense.create = function create(properties) { + CMsgAMAddFreeLicense.create = function(properties) { return new CMsgAMAddFreeLicense(properties); }; @@ -8030,21 +10385,28 @@ * @function encode * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense} message CMsgAMAddFreeLicense message or plain object to encode + * @param {CMsgAMAddFreeLicense.$Properties} message CMsgAMAddFreeLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicense.encode = function encode(message, writer) { + CMsgAMAddFreeLicense.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.ip_public != null && Object.hasOwnProperty.call(message, "ip_public")) + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ip_public); - if (message.packageid != null && Object.hasOwnProperty.call(message, "packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.packageid); - if (message.store_country_code != null && Object.hasOwnProperty.call(message, "store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.store_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8053,12 +10415,12 @@ * @function encodeDelimited * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense} message CMsgAMAddFreeLicense message or plain object to encode + * @param {CMsgAMAddFreeLicense.$Properties} message CMsgAMAddFreeLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMAddFreeLicense.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8068,34 +10430,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense + * @returns {CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape} CMsgAMAddFreeLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicense.decode = function decode(reader, length) { + CMsgAMAddFreeLicense.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMAddFreeLicense(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMAddFreeLicense(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.ip_public = reader.uint32(); - break; - case 3: - message.packageid = reader.uint32(); - break; - case 4: - message.store_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.ip_public = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.packageid = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.store_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8105,11 +10493,11 @@ * @memberof CMsgAMAddFreeLicense * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense + * @returns {CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape} CMsgAMAddFreeLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicense.decodeDelimited = function decodeDelimited(reader) { + CMsgAMAddFreeLicense.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8123,19 +10511,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMAddFreeLicense.verify = function verify(message) { + CMsgAMAddFreeLicense.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.ip_public != null && message.hasOwnProperty("ip_public")) + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) if (!$util.isInteger(message.ip_public)) return "ip_public: integer expected"; - if (message.packageid != null && message.hasOwnProperty("packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) if (!$util.isInteger(message.packageid)) return "packageid: integer expected"; - if (message.store_country_code != null && message.hasOwnProperty("store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) if (!$util.isString(message.store_country_code)) return "store_country_code: string expected"; return null; @@ -8149,25 +10541,31 @@ * @param {Object.} object Plain object * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense */ - CMsgAMAddFreeLicense.fromObject = function fromObject(object) { + CMsgAMAddFreeLicense.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMAddFreeLicense) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMAddFreeLicense: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMAddFreeLicense(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.ip_public != null) message.ip_public = object.ip_public >>> 0; if (object.packageid != null) message.packageid = object.packageid >>> 0; if (object.store_country_code != null) - message.store_country_code = String(object.store_country_code); + message.store_country_code = $String(object.store_country_code); return message; }; @@ -8180,30 +10578,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMAddFreeLicense.toObject = function toObject(message, options) { + CMsgAMAddFreeLicense.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.ip_public = 0; object.packageid = 0; object.store_country_code = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.ip_public != null && message.hasOwnProperty("ip_public")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) object.ip_public = message.ip_public; - if (message.packageid != null && message.hasOwnProperty("packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) object.packageid = message.packageid; - if (message.store_country_code != null && message.hasOwnProperty("store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) object.store_country_code = message.store_country_code; return object; }; @@ -8215,8 +10619,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMAddFreeLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMAddFreeLicense.prototype.toJSON = function() { + return CMsgAMAddFreeLicense.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMAddFreeLicense + * @function getTypeUrl + * @memberof CMsgAMAddFreeLicense + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMAddFreeLicense.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMAddFreeLicense"; }; return CMsgAMAddFreeLicense; @@ -8226,27 +10644,40 @@ /** * Properties of a CMsgAMAddFreeLicenseResponse. - * @exports ICMsgAMAddFreeLicenseResponse - * @interface ICMsgAMAddFreeLicenseResponse + * @typedef {Object} CMsgAMAddFreeLicenseResponse.$Properties * @property {number|null} [eresult] CMsgAMAddFreeLicenseResponse eresult * @property {number|null} [purchase_result_detail] CMsgAMAddFreeLicenseResponse purchase_result_detail * @property {number|Long|null} [transid] CMsgAMAddFreeLicenseResponse transid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMAddFreeLicenseResponse. + * @exports ICMsgAMAddFreeLicenseResponse + * @interface ICMsgAMAddFreeLicenseResponse + * @augments CMsgAMAddFreeLicenseResponse.$Properties + * @deprecated Use CMsgAMAddFreeLicenseResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMAddFreeLicenseResponse. + * @typedef {CMsgAMAddFreeLicenseResponse.$Properties} CMsgAMAddFreeLicenseResponse.$Shape */ /** * Constructs a new CMsgAMAddFreeLicenseResponse. * @exports CMsgAMAddFreeLicenseResponse * @classdesc Represents a CMsgAMAddFreeLicenseResponse. - * @implements ICMsgAMAddFreeLicenseResponse * @constructor - * @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set + * @param {CMsgAMAddFreeLicenseResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMAddFreeLicenseResponse(properties) { + var CMsgAMAddFreeLicenseResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMAddFreeLicenseResponse eresult. @@ -8270,17 +10701,21 @@ * @memberof CMsgAMAddFreeLicenseResponse * @instance */ - CMsgAMAddFreeLicenseResponse.prototype.transid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMAddFreeLicenseResponse.prototype.transid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgAMAddFreeLicenseResponse instance using the specified properties. * @function create * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set + * @param {CMsgAMAddFreeLicenseResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse instance + * @type {{ + * (properties: CMsgAMAddFreeLicenseResponse.$Shape): CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape; + * (properties?: CMsgAMAddFreeLicenseResponse.$Properties): CMsgAMAddFreeLicenseResponse; + * }} */ - CMsgAMAddFreeLicenseResponse.create = function create(properties) { + CMsgAMAddFreeLicenseResponse.create = function(properties) { return new CMsgAMAddFreeLicenseResponse(properties); }; @@ -8289,19 +10724,26 @@ * @function encode * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse} message CMsgAMAddFreeLicenseResponse message or plain object to encode + * @param {CMsgAMAddFreeLicenseResponse.$Properties} message CMsgAMAddFreeLicenseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicenseResponse.encode = function encode(message, writer) { + CMsgAMAddFreeLicenseResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); - if (message.purchase_result_detail != null && Object.hasOwnProperty.call(message, "purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.purchase_result_detail); - if (message.transid != null && Object.hasOwnProperty.call(message, "transid")) + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.transid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8310,12 +10752,12 @@ * @function encodeDelimited * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse} message CMsgAMAddFreeLicenseResponse message or plain object to encode + * @param {CMsgAMAddFreeLicenseResponse.$Properties} message CMsgAMAddFreeLicenseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicenseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMAddFreeLicenseResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8325,31 +10767,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse + * @returns {CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape} CMsgAMAddFreeLicenseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicenseResponse.decode = function decode(reader, length) { + CMsgAMAddFreeLicenseResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMAddFreeLicenseResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMAddFreeLicenseResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - case 2: - message.purchase_result_detail = reader.int32(); - break; - case 3: - message.transid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.purchase_result_detail = reader.int32(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.transid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8359,11 +10824,11 @@ * @memberof CMsgAMAddFreeLicenseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse + * @returns {CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape} CMsgAMAddFreeLicenseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicenseResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMAddFreeLicenseResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8377,16 +10842,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMAddFreeLicenseResponse.verify = function verify(message) { + CMsgAMAddFreeLicenseResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.purchase_result_detail != null && message.hasOwnProperty("purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) if (!$util.isInteger(message.purchase_result_detail)) return "purchase_result_detail: integer expected"; - if (message.transid != null && message.hasOwnProperty("transid")) + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) if (!$util.isInteger(message.transid) && !(message.transid && $util.isInteger(message.transid.low) && $util.isInteger(message.transid.high))) return "transid: integer|Long expected"; return null; @@ -8400,9 +10869,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse */ - CMsgAMAddFreeLicenseResponse.fromObject = function fromObject(object) { + CMsgAMAddFreeLicenseResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMAddFreeLicenseResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMAddFreeLicenseResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMAddFreeLicenseResponse(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -8410,13 +10885,13 @@ message.purchase_result_detail = object.purchase_result_detail | 0; if (object.transid != null) if ($util.Long) - (message.transid = $util.Long.fromValue(object.transid)).unsigned = false; + message.transid = $util.Long.fromValue(object.transid, true); else if (typeof object.transid === "string") - message.transid = parseInt(object.transid, 10); + message.transid = $parseInt(object.transid, 10); else if (typeof object.transid === "number") message.transid = object.transid; else if (typeof object.transid === "object") - message.transid = new $util.LongBits(object.transid.low >>> 0, object.transid.high >>> 0).toNumber(); + message.transid = new $util.LongBits(object.transid.low >>> 0, object.transid.high >>> 0).toNumber(true); return message; }; @@ -8429,28 +10904,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMAddFreeLicenseResponse.toObject = function toObject(message, options) { + CMsgAMAddFreeLicenseResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.purchase_result_detail = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.transid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.transid = options.longs === String ? "0" : 0; + object.transid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.purchase_result_detail != null && message.hasOwnProperty("purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) object.purchase_result_detail = message.purchase_result_detail; - if (message.transid != null && message.hasOwnProperty("transid")) - if (typeof message.transid === "number") - object.transid = options.longs === String ? String(message.transid) : message.transid; + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.transid = typeof message.transid === "number" ? $BigInt(message.transid) : $util.Long.fromBits(message.transid.low >>> 0, message.transid.high >>> 0, true).toBigInt(); + else if (typeof message.transid === "number") + object.transid = options.longs === $String ? $String(message.transid) : message.transid; else - object.transid = options.longs === String ? $util.Long.prototype.toString.call(message.transid) : options.longs === Number ? new $util.LongBits(message.transid.low >>> 0, message.transid.high >>> 0).toNumber() : message.transid; + object.transid = options.longs === $String ? $util.Long.prototype.toString.call(message.transid) : options.longs === $Number ? new $util.LongBits(message.transid.low >>> 0, message.transid.high >>> 0).toNumber(true) : message.transid; return object; }; @@ -8461,8 +10942,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMAddFreeLicenseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMAddFreeLicenseResponse.prototype.toJSON = function() { + return CMsgAMAddFreeLicenseResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMAddFreeLicenseResponse + * @function getTypeUrl + * @memberof CMsgAMAddFreeLicenseResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMAddFreeLicenseResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMAddFreeLicenseResponse"; }; return CMsgAMAddFreeLicenseResponse; @@ -8470,28 +10965,41 @@ $root.CGCMsgGetIPLocation = (function() { + /** + * Properties of a CGCMsgGetIPLocation. + * @typedef {Object} CGCMsgGetIPLocation.$Properties + * @property {Array.|null} [ips] CGCMsgGetIPLocation ips + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetIPLocation. * @exports ICGCMsgGetIPLocation * @interface ICGCMsgGetIPLocation - * @property {Array.|null} [ips] CGCMsgGetIPLocation ips + * @augments CGCMsgGetIPLocation.$Properties + * @deprecated Use CGCMsgGetIPLocation.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetIPLocation. + * @typedef {CGCMsgGetIPLocation.$Properties} CGCMsgGetIPLocation.$Shape */ /** * Constructs a new CGCMsgGetIPLocation. * @exports CGCMsgGetIPLocation * @classdesc Represents a CGCMsgGetIPLocation. - * @implements ICGCMsgGetIPLocation * @constructor - * @param {ICGCMsgGetIPLocation=} [properties] Properties to set + * @param {CGCMsgGetIPLocation.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetIPLocation(properties) { + var CGCMsgGetIPLocation = function (properties) { this.ips = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetIPLocation ips. @@ -8506,10 +11014,14 @@ * @function create * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation=} [properties] Properties to set + * @param {CGCMsgGetIPLocation.$Properties=} [properties] Properties to set * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation instance + * @type {{ + * (properties: CGCMsgGetIPLocation.$Shape): CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape; + * (properties?: CGCMsgGetIPLocation.$Properties): CGCMsgGetIPLocation; + * }} */ - CGCMsgGetIPLocation.create = function create(properties) { + CGCMsgGetIPLocation.create = function(properties) { return new CGCMsgGetIPLocation(properties); }; @@ -8518,16 +11030,23 @@ * @function encode * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation} message CGCMsgGetIPLocation message or plain object to encode + * @param {CGCMsgGetIPLocation.$Properties} message CGCMsgGetIPLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocation.encode = function encode(message, writer) { + CGCMsgGetIPLocation.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.ips != null && message.ips.length) for (var i = 0; i < message.ips.length; ++i) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.ips[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8536,12 +11055,12 @@ * @function encodeDelimited * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation} message CGCMsgGetIPLocation message or plain object to encode + * @param {CGCMsgGetIPLocation.$Properties} message CGCMsgGetIPLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetIPLocation.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8551,32 +11070,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation + * @returns {CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape} CGCMsgGetIPLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocation.decode = function decode(reader, length) { + CGCMsgGetIPLocation.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetIPLocation(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetIPLocation(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.ips && message.ips.length)) - message.ips = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ips.push(reader.fixed32()); - } else - message.ips.push(reader.fixed32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.ips && message.ips.length)) + message.ips = []; + reader.fixed32s(message.ips); + continue; + } + if (wireType !== 5) + break; + if (!(message.ips && message.ips.length)) + message.ips = []; + message.ips.push(reader.fixed32()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8586,11 +11123,11 @@ * @memberof CGCMsgGetIPLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation + * @returns {CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape} CGCMsgGetIPLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocation.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetIPLocation.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8604,11 +11141,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetIPLocation.verify = function verify(message) { + CGCMsgGetIPLocation.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ips != null && message.hasOwnProperty("ips")) { - if (!Array.isArray(message.ips)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ips != null && $Object.hasOwnProperty.call(message, "ips")) { + if (!$Array.isArray(message.ips)) return "ips: array expected"; for (var i = 0; i < message.ips.length; ++i) if (!$util.isInteger(message.ips[i])) @@ -8625,14 +11166,20 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation */ - CGCMsgGetIPLocation.fromObject = function fromObject(object) { + CGCMsgGetIPLocation.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetIPLocation) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetIPLocation: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetIPLocation(); if (object.ips) { - if (!Array.isArray(object.ips)) - throw TypeError(".CGCMsgGetIPLocation.ips: array expected"); - message.ips = []; + if (!$Array.isArray(object.ips)) + throw $TypeError(".CGCMsgGetIPLocation.ips: array expected"); + message.ips = $Array(object.ips.length); for (var i = 0; i < object.ips.length; ++i) message.ips[i] = object.ips[i] >>> 0; } @@ -8648,14 +11195,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetIPLocation.toObject = function toObject(message, options) { + CGCMsgGetIPLocation.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.ips = []; if (message.ips && message.ips.length) { - object.ips = []; + object.ips = $Array(message.ips.length); for (var j = 0; j < message.ips.length; ++j) object.ips[j] = message.ips[j]; } @@ -8669,8 +11220,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetIPLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetIPLocation.prototype.toJSON = function() { + return CGCMsgGetIPLocation.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetIPLocation + * @function getTypeUrl + * @memberof CGCMsgGetIPLocation + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetIPLocation.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetIPLocation"; }; return CGCMsgGetIPLocation; @@ -8680,30 +11245,43 @@ /** * Properties of a CIPLocationInfo. - * @exports ICIPLocationInfo - * @interface ICIPLocationInfo + * @typedef {Object} CIPLocationInfo.$Properties * @property {number|null} [ip] CIPLocationInfo ip * @property {number|null} [latitude] CIPLocationInfo latitude * @property {number|null} [longitude] CIPLocationInfo longitude * @property {string|null} [country] CIPLocationInfo country * @property {string|null} [state] CIPLocationInfo state * @property {string|null} [city] CIPLocationInfo city + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CIPLocationInfo. + * @exports ICIPLocationInfo + * @interface ICIPLocationInfo + * @augments CIPLocationInfo.$Properties + * @deprecated Use CIPLocationInfo.$Properties instead. + */ + + /** + * Shape of a CIPLocationInfo. + * @typedef {CIPLocationInfo.$Properties} CIPLocationInfo.$Shape */ /** * Constructs a new CIPLocationInfo. * @exports CIPLocationInfo * @classdesc Represents a CIPLocationInfo. - * @implements ICIPLocationInfo * @constructor - * @param {ICIPLocationInfo=} [properties] Properties to set + * @param {CIPLocationInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CIPLocationInfo(properties) { + var CIPLocationInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CIPLocationInfo ip. @@ -8758,10 +11336,14 @@ * @function create * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo=} [properties] Properties to set + * @param {CIPLocationInfo.$Properties=} [properties] Properties to set * @returns {CIPLocationInfo} CIPLocationInfo instance + * @type {{ + * (properties: CIPLocationInfo.$Shape): CIPLocationInfo & CIPLocationInfo.$Shape; + * (properties?: CIPLocationInfo.$Properties): CIPLocationInfo; + * }} */ - CIPLocationInfo.create = function create(properties) { + CIPLocationInfo.create = function(properties) { return new CIPLocationInfo(properties); }; @@ -8770,25 +11352,32 @@ * @function encode * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo} message CIPLocationInfo message or plain object to encode + * @param {CIPLocationInfo.$Properties} message CIPLocationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CIPLocationInfo.encode = function encode(message, writer) { + CIPLocationInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.ip); - if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.latitude); - if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.longitude); - if (message.country != null && Object.hasOwnProperty.call(message, "country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.state); - if (message.city != null && Object.hasOwnProperty.call(message, "city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.city); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8797,12 +11386,12 @@ * @function encodeDelimited * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo} message CIPLocationInfo message or plain object to encode + * @param {CIPLocationInfo.$Properties} message CIPLocationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CIPLocationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CIPLocationInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8812,40 +11401,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CIPLocationInfo} CIPLocationInfo + * @returns {CIPLocationInfo & CIPLocationInfo.$Shape} CIPLocationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CIPLocationInfo.decode = function decode(reader, length) { + CIPLocationInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CIPLocationInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CIPLocationInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ip = reader.uint32(); - break; - case 2: - message.latitude = reader.float(); - break; - case 3: - message.longitude = reader.float(); - break; - case 4: - message.country = reader.string(); - break; - case 5: - message.state = reader.string(); - break; - case 6: - message.city = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ip = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.latitude = reader.float(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.longitude = reader.float(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.country = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.state = reader.string(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.city = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8855,11 +11476,11 @@ * @memberof CIPLocationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CIPLocationInfo} CIPLocationInfo + * @returns {CIPLocationInfo & CIPLocationInfo.$Shape} CIPLocationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CIPLocationInfo.decodeDelimited = function decodeDelimited(reader) { + CIPLocationInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8873,25 +11494,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CIPLocationInfo.verify = function verify(message) { + CIPLocationInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ip != null && message.hasOwnProperty("ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) if (!$util.isInteger(message.ip)) return "ip: integer expected"; - if (message.latitude != null && message.hasOwnProperty("latitude")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) if (typeof message.latitude !== "number") return "latitude: number expected"; - if (message.longitude != null && message.hasOwnProperty("longitude")) + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) if (typeof message.longitude !== "number") return "longitude: number expected"; - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) if (!$util.isString(message.country)) return "country: string expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) if (!$util.isString(message.state)) return "state: string expected"; - if (message.city != null && message.hasOwnProperty("city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) if (!$util.isString(message.city)) return "city: string expected"; return null; @@ -8905,22 +11530,28 @@ * @param {Object.} object Plain object * @returns {CIPLocationInfo} CIPLocationInfo */ - CIPLocationInfo.fromObject = function fromObject(object) { + CIPLocationInfo.fromObject = function (object, _depth) { if (object instanceof $root.CIPLocationInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CIPLocationInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CIPLocationInfo(); if (object.ip != null) message.ip = object.ip >>> 0; if (object.latitude != null) - message.latitude = Number(object.latitude); + message.latitude = $Number(object.latitude); if (object.longitude != null) - message.longitude = Number(object.longitude); + message.longitude = $Number(object.longitude); if (object.country != null) - message.country = String(object.country); + message.country = $String(object.country); if (object.state != null) - message.state = String(object.state); + message.state = $String(object.state); if (object.city != null) - message.city = String(object.city); + message.city = $String(object.city); return message; }; @@ -8933,9 +11564,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CIPLocationInfo.toObject = function toObject(message, options) { + CIPLocationInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.ip = 0; @@ -8945,17 +11580,17 @@ object.state = ""; object.city = ""; } - if (message.ip != null && message.hasOwnProperty("ip")) + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) object.ip = message.ip; - if (message.latitude != null && message.hasOwnProperty("latitude")) - object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; - if (message.longitude != null && message.hasOwnProperty("longitude")) - object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; - if (message.country != null && message.hasOwnProperty("country")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) + object.latitude = options.json && !$isFinite(message.latitude) ? $String(message.latitude) : message.latitude; + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) + object.longitude = options.json && !$isFinite(message.longitude) ? $String(message.longitude) : message.longitude; + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) object.country = message.country; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) object.state = message.state; - if (message.city != null && message.hasOwnProperty("city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) object.city = message.city; return object; }; @@ -8967,8 +11602,22 @@ * @instance * @returns {Object.} JSON object */ - CIPLocationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CIPLocationInfo.prototype.toJSON = function() { + return CIPLocationInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CIPLocationInfo + * @function getTypeUrl + * @memberof CIPLocationInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CIPLocationInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CIPLocationInfo"; }; return CIPLocationInfo; @@ -8976,32 +11625,45 @@ $root.CGCMsgGetIPLocationResponse = (function() { + /** + * Properties of a CGCMsgGetIPLocationResponse. + * @typedef {Object} CGCMsgGetIPLocationResponse.$Properties + * @property {Array.|null} [infos] CGCMsgGetIPLocationResponse infos + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetIPLocationResponse. * @exports ICGCMsgGetIPLocationResponse * @interface ICGCMsgGetIPLocationResponse - * @property {Array.|null} [infos] CGCMsgGetIPLocationResponse infos + * @augments CGCMsgGetIPLocationResponse.$Properties + * @deprecated Use CGCMsgGetIPLocationResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetIPLocationResponse. + * @typedef {CGCMsgGetIPLocationResponse.$Properties} CGCMsgGetIPLocationResponse.$Shape */ /** * Constructs a new CGCMsgGetIPLocationResponse. * @exports CGCMsgGetIPLocationResponse * @classdesc Represents a CGCMsgGetIPLocationResponse. - * @implements ICGCMsgGetIPLocationResponse * @constructor - * @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set + * @param {CGCMsgGetIPLocationResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetIPLocationResponse(properties) { + var CGCMsgGetIPLocationResponse = function (properties) { this.infos = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetIPLocationResponse infos. - * @member {Array.} infos + * @member {Array.} infos * @memberof CGCMsgGetIPLocationResponse * @instance */ @@ -9012,10 +11674,14 @@ * @function create * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set + * @param {CGCMsgGetIPLocationResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse instance + * @type {{ + * (properties: CGCMsgGetIPLocationResponse.$Shape): CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape; + * (properties?: CGCMsgGetIPLocationResponse.$Properties): CGCMsgGetIPLocationResponse; + * }} */ - CGCMsgGetIPLocationResponse.create = function create(properties) { + CGCMsgGetIPLocationResponse.create = function(properties) { return new CGCMsgGetIPLocationResponse(properties); }; @@ -9024,16 +11690,23 @@ * @function encode * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse} message CGCMsgGetIPLocationResponse message or plain object to encode + * @param {CGCMsgGetIPLocationResponse.$Properties} message CGCMsgGetIPLocationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocationResponse.encode = function encode(message, writer) { + CGCMsgGetIPLocationResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.infos != null && message.infos.length) for (var i = 0; i < message.infos.length; ++i) - $root.CIPLocationInfo.encode(message.infos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CIPLocationInfo.encode(message.infos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9042,12 +11715,12 @@ * @function encodeDelimited * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse} message CGCMsgGetIPLocationResponse message or plain object to encode + * @param {CGCMsgGetIPLocationResponse.$Properties} message CGCMsgGetIPLocationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetIPLocationResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9057,27 +11730,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse + * @returns {CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape} CGCMsgGetIPLocationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocationResponse.decode = function decode(reader, length) { + CGCMsgGetIPLocationResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetIPLocationResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetIPLocationResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.infos && message.infos.length)) - message.infos = []; - message.infos.push($root.CIPLocationInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.infos && message.infos.length)) + message.infos = []; + message.infos.push($root.CIPLocationInfo.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9087,11 +11777,11 @@ * @memberof CGCMsgGetIPLocationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse + * @returns {CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape} CGCMsgGetIPLocationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocationResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetIPLocationResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9105,14 +11795,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetIPLocationResponse.verify = function verify(message) { + CGCMsgGetIPLocationResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.infos != null && message.hasOwnProperty("infos")) { - if (!Array.isArray(message.infos)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.infos != null && $Object.hasOwnProperty.call(message, "infos")) { + if (!$Array.isArray(message.infos)) return "infos: array expected"; for (var i = 0; i < message.infos.length; ++i) { - var error = $root.CIPLocationInfo.verify(message.infos[i]); + var error = $root.CIPLocationInfo.verify(message.infos[i], _depth + 1); if (error) return "infos." + error; } @@ -9128,18 +11822,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse */ - CGCMsgGetIPLocationResponse.fromObject = function fromObject(object) { + CGCMsgGetIPLocationResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetIPLocationResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetIPLocationResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetIPLocationResponse(); if (object.infos) { - if (!Array.isArray(object.infos)) - throw TypeError(".CGCMsgGetIPLocationResponse.infos: array expected"); - message.infos = []; + if (!$Array.isArray(object.infos)) + throw $TypeError(".CGCMsgGetIPLocationResponse.infos: array expected"); + message.infos = $Array(object.infos.length); for (var i = 0; i < object.infos.length; ++i) { - if (typeof object.infos[i] !== "object") - throw TypeError(".CGCMsgGetIPLocationResponse.infos: object expected"); - message.infos[i] = $root.CIPLocationInfo.fromObject(object.infos[i]); + if (!$util.isObject(object.infos[i])) + throw $TypeError(".CGCMsgGetIPLocationResponse.infos: object expected"); + message.infos[i] = $root.CIPLocationInfo.fromObject(object.infos[i], _depth + 1); } } return message; @@ -9154,16 +11854,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetIPLocationResponse.toObject = function toObject(message, options) { + CGCMsgGetIPLocationResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.infos = []; if (message.infos && message.infos.length) { - object.infos = []; + object.infos = $Array(message.infos.length); for (var j = 0; j < message.infos.length; ++j) - object.infos[j] = $root.CIPLocationInfo.toObject(message.infos[j], options); + object.infos[j] = $root.CIPLocationInfo.toObject(message.infos[j], options, _depth + 1); } return object; }; @@ -9175,8 +11879,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetIPLocationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetIPLocationResponse.prototype.toJSON = function() { + return CGCMsgGetIPLocationResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetIPLocationResponse + * @function getTypeUrl + * @memberof CGCMsgGetIPLocationResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetIPLocationResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetIPLocationResponse"; }; return CGCMsgGetIPLocationResponse; @@ -9186,26 +11904,39 @@ /** * Properties of a CGCMsgSystemStatsSchema. - * @exports ICGCMsgSystemStatsSchema - * @interface ICGCMsgSystemStatsSchema + * @typedef {Object} CGCMsgSystemStatsSchema.$Properties * @property {number|null} [gc_app_id] CGCMsgSystemStatsSchema gc_app_id * @property {Uint8Array|null} [schema_kv] CGCMsgSystemStatsSchema schema_kv + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgSystemStatsSchema. + * @exports ICGCMsgSystemStatsSchema + * @interface ICGCMsgSystemStatsSchema + * @augments CGCMsgSystemStatsSchema.$Properties + * @deprecated Use CGCMsgSystemStatsSchema.$Properties instead. + */ + + /** + * Shape of a CGCMsgSystemStatsSchema. + * @typedef {CGCMsgSystemStatsSchema.$Properties} CGCMsgSystemStatsSchema.$Shape */ /** * Constructs a new CGCMsgSystemStatsSchema. * @exports CGCMsgSystemStatsSchema * @classdesc Represents a CGCMsgSystemStatsSchema. - * @implements ICGCMsgSystemStatsSchema * @constructor - * @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set + * @param {CGCMsgSystemStatsSchema.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSystemStatsSchema(properties) { + var CGCMsgSystemStatsSchema = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSystemStatsSchema gc_app_id. @@ -9228,10 +11959,14 @@ * @function create * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set + * @param {CGCMsgSystemStatsSchema.$Properties=} [properties] Properties to set * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema instance + * @type {{ + * (properties: CGCMsgSystemStatsSchema.$Shape): CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape; + * (properties?: CGCMsgSystemStatsSchema.$Properties): CGCMsgSystemStatsSchema; + * }} */ - CGCMsgSystemStatsSchema.create = function create(properties) { + CGCMsgSystemStatsSchema.create = function(properties) { return new CGCMsgSystemStatsSchema(properties); }; @@ -9240,17 +11975,24 @@ * @function encode * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema} message CGCMsgSystemStatsSchema message or plain object to encode + * @param {CGCMsgSystemStatsSchema.$Properties} message CGCMsgSystemStatsSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSystemStatsSchema.encode = function encode(message, writer) { + CGCMsgSystemStatsSchema.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gc_app_id != null && Object.hasOwnProperty.call(message, "gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gc_app_id); - if (message.schema_kv != null && Object.hasOwnProperty.call(message, "schema_kv")) + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.schema_kv); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9259,12 +12001,12 @@ * @function encodeDelimited * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema} message CGCMsgSystemStatsSchema message or plain object to encode + * @param {CGCMsgSystemStatsSchema.$Properties} message CGCMsgSystemStatsSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSystemStatsSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSystemStatsSchema.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9274,28 +12016,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema + * @returns {CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape} CGCMsgSystemStatsSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSystemStatsSchema.decode = function decode(reader, length) { + CGCMsgSystemStatsSchema.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSystemStatsSchema(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSystemStatsSchema(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gc_app_id = reader.uint32(); - break; - case 2: - message.schema_kv = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gc_app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.schema_kv = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9305,11 +12067,11 @@ * @memberof CGCMsgSystemStatsSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema + * @returns {CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape} CGCMsgSystemStatsSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSystemStatsSchema.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSystemStatsSchema.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9323,13 +12085,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSystemStatsSchema.verify = function verify(message) { + CGCMsgSystemStatsSchema.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) if (!$util.isInteger(message.gc_app_id)) return "gc_app_id: integer expected"; - if (message.schema_kv != null && message.hasOwnProperty("schema_kv")) + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) if (!(message.schema_kv && typeof message.schema_kv.length === "number" || $util.isString(message.schema_kv))) return "schema_kv: buffer expected"; return null; @@ -9343,16 +12109,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema */ - CGCMsgSystemStatsSchema.fromObject = function fromObject(object) { + CGCMsgSystemStatsSchema.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSystemStatsSchema) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSystemStatsSchema: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSystemStatsSchema(); if (object.gc_app_id != null) message.gc_app_id = object.gc_app_id >>> 0; if (object.schema_kv != null) if (typeof object.schema_kv === "string") $util.base64.decode(object.schema_kv, message.schema_kv = $util.newBuffer($util.base64.length(object.schema_kv)), 0); - else if (object.schema_kv.length) + else if (object.schema_kv.length >= 0) message.schema_kv = object.schema_kv; return message; }; @@ -9366,24 +12138,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSystemStatsSchema.toObject = function toObject(message, options) { + CGCMsgSystemStatsSchema.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gc_app_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.schema_kv = ""; else { object.schema_kv = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.schema_kv = $util.newBuffer(object.schema_kv); } } - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) object.gc_app_id = message.gc_app_id; - if (message.schema_kv != null && message.hasOwnProperty("schema_kv")) - object.schema_kv = options.bytes === String ? $util.base64.encode(message.schema_kv, 0, message.schema_kv.length) : options.bytes === Array ? Array.prototype.slice.call(message.schema_kv) : message.schema_kv; + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) + object.schema_kv = options.bytes === $String ? $util.base64.encode(message.schema_kv, 0, message.schema_kv.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.schema_kv) : message.schema_kv; return object; }; @@ -9394,8 +12170,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSystemStatsSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSystemStatsSchema.prototype.toJSON = function() { + return CGCMsgSystemStatsSchema.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSystemStatsSchema + * @function getTypeUrl + * @memberof CGCMsgSystemStatsSchema + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSystemStatsSchema.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSystemStatsSchema"; }; return CGCMsgSystemStatsSchema; @@ -9403,36 +12193,53 @@ $root.CGCMsgGetSystemStats = (function() { + /** + * Properties of a CGCMsgGetSystemStats. + * @typedef {Object} CGCMsgGetSystemStats.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetSystemStats. * @exports ICGCMsgGetSystemStats * @interface ICGCMsgGetSystemStats + * @augments CGCMsgGetSystemStats.$Properties + * @deprecated Use CGCMsgGetSystemStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetSystemStats. + * @typedef {CGCMsgGetSystemStats.$Properties} CGCMsgGetSystemStats.$Shape */ /** * Constructs a new CGCMsgGetSystemStats. * @exports CGCMsgGetSystemStats * @classdesc Represents a CGCMsgGetSystemStats. - * @implements ICGCMsgGetSystemStats * @constructor - * @param {ICGCMsgGetSystemStats=} [properties] Properties to set + * @param {CGCMsgGetSystemStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetSystemStats(properties) { + var CGCMsgGetSystemStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CGCMsgGetSystemStats instance using the specified properties. * @function create * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats=} [properties] Properties to set + * @param {CGCMsgGetSystemStats.$Properties=} [properties] Properties to set * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats instance + * @type {{ + * (properties: CGCMsgGetSystemStats.$Shape): CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape; + * (properties?: CGCMsgGetSystemStats.$Properties): CGCMsgGetSystemStats; + * }} */ - CGCMsgGetSystemStats.create = function create(properties) { + CGCMsgGetSystemStats.create = function(properties) { return new CGCMsgGetSystemStats(properties); }; @@ -9441,13 +12248,20 @@ * @function encode * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats} message CGCMsgGetSystemStats message or plain object to encode + * @param {CGCMsgGetSystemStats.$Properties} message CGCMsgGetSystemStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStats.encode = function encode(message, writer) { + CGCMsgGetSystemStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9456,12 +12270,12 @@ * @function encodeDelimited * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats} message CGCMsgGetSystemStats message or plain object to encode + * @param {CGCMsgGetSystemStats.$Properties} message CGCMsgGetSystemStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetSystemStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9471,22 +12285,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats + * @returns {CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape} CGCMsgGetSystemStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStats.decode = function decode(reader, length) { + CGCMsgGetSystemStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetSystemStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetSystemStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9496,11 +12321,11 @@ * @memberof CGCMsgGetSystemStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats + * @returns {CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape} CGCMsgGetSystemStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetSystemStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9514,9 +12339,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetSystemStats.verify = function verify(message) { + CGCMsgGetSystemStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -9528,9 +12357,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats */ - CGCMsgGetSystemStats.fromObject = function fromObject(object) { + CGCMsgGetSystemStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetSystemStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetSystemStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CGCMsgGetSystemStats(); }; @@ -9543,7 +12378,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetSystemStats.toObject = function toObject() { + CGCMsgGetSystemStats.toObject = function () { return {}; }; @@ -9554,8 +12389,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetSystemStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetSystemStats.prototype.toJSON = function() { + return CGCMsgGetSystemStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetSystemStats + * @function getTypeUrl + * @memberof CGCMsgGetSystemStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetSystemStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetSystemStats"; }; return CGCMsgGetSystemStats; @@ -9565,8 +12414,7 @@ /** * Properties of a CGCMsgGetSystemStatsResponse. - * @exports ICGCMsgGetSystemStatsResponse - * @interface ICGCMsgGetSystemStatsResponse + * @typedef {Object} CGCMsgGetSystemStatsResponse.$Properties * @property {number|null} [gc_app_id] CGCMsgGetSystemStatsResponse gc_app_id * @property {Uint8Array|null} [stats_kv] CGCMsgGetSystemStatsResponse stats_kv * @property {number|null} [active_jobs] CGCMsgGetSystemStatsResponse active_jobs @@ -9580,22 +12428,36 @@ * @property {number|null} [steamid_locks] CGCMsgGetSystemStatsResponse steamid_locks * @property {number|null} [logon_queue] CGCMsgGetSystemStatsResponse logon_queue * @property {number|null} [logon_jobs] CGCMsgGetSystemStatsResponse logon_jobs + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgGetSystemStatsResponse. + * @exports ICGCMsgGetSystemStatsResponse + * @interface ICGCMsgGetSystemStatsResponse + * @augments CGCMsgGetSystemStatsResponse.$Properties + * @deprecated Use CGCMsgGetSystemStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetSystemStatsResponse. + * @typedef {CGCMsgGetSystemStatsResponse.$Properties} CGCMsgGetSystemStatsResponse.$Shape */ /** * Constructs a new CGCMsgGetSystemStatsResponse. * @exports CGCMsgGetSystemStatsResponse * @classdesc Represents a CGCMsgGetSystemStatsResponse. - * @implements ICGCMsgGetSystemStatsResponse * @constructor - * @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set + * @param {CGCMsgGetSystemStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetSystemStatsResponse(properties) { + var CGCMsgGetSystemStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetSystemStatsResponse gc_app_id. @@ -9706,10 +12568,14 @@ * @function create * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set + * @param {CGCMsgGetSystemStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse instance + * @type {{ + * (properties: CGCMsgGetSystemStatsResponse.$Shape): CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape; + * (properties?: CGCMsgGetSystemStatsResponse.$Properties): CGCMsgGetSystemStatsResponse; + * }} */ - CGCMsgGetSystemStatsResponse.create = function create(properties) { + CGCMsgGetSystemStatsResponse.create = function(properties) { return new CGCMsgGetSystemStatsResponse(properties); }; @@ -9718,39 +12584,46 @@ * @function encode * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse} message CGCMsgGetSystemStatsResponse message or plain object to encode + * @param {CGCMsgGetSystemStatsResponse.$Properties} message CGCMsgGetSystemStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStatsResponse.encode = function encode(message, writer) { + CGCMsgGetSystemStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gc_app_id != null && Object.hasOwnProperty.call(message, "gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gc_app_id); - if (message.stats_kv != null && Object.hasOwnProperty.call(message, "stats_kv")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.stats_kv); - if (message.active_jobs != null && Object.hasOwnProperty.call(message, "active_jobs")) + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.active_jobs); - if (message.yielding_jobs != null && Object.hasOwnProperty.call(message, "yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.yielding_jobs); - if (message.user_sessions != null && Object.hasOwnProperty.call(message, "user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.user_sessions); - if (message.game_server_sessions != null && Object.hasOwnProperty.call(message, "game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.game_server_sessions); - if (message.socaches != null && Object.hasOwnProperty.call(message, "socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.socaches); - if (message.socaches_to_unload != null && Object.hasOwnProperty.call(message, "socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.socaches_to_unload); - if (message.socaches_loading != null && Object.hasOwnProperty.call(message, "socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.socaches_loading); - if (message.writeback_queue != null && Object.hasOwnProperty.call(message, "writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.writeback_queue); - if (message.steamid_locks != null && Object.hasOwnProperty.call(message, "steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.steamid_locks); - if (message.logon_queue != null && Object.hasOwnProperty.call(message, "logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.logon_queue); - if (message.logon_jobs != null && Object.hasOwnProperty.call(message, "logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.logon_jobs); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9759,12 +12632,12 @@ * @function encodeDelimited * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse} message CGCMsgGetSystemStatsResponse message or plain object to encode + * @param {CGCMsgGetSystemStatsResponse.$Properties} message CGCMsgGetSystemStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetSystemStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9774,61 +12647,114 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse + * @returns {CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape} CGCMsgGetSystemStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStatsResponse.decode = function decode(reader, length) { + CGCMsgGetSystemStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetSystemStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetSystemStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gc_app_id = reader.uint32(); - break; - case 2: - message.stats_kv = reader.bytes(); - break; - case 3: - message.active_jobs = reader.uint32(); - break; - case 4: - message.yielding_jobs = reader.uint32(); - break; - case 5: - message.user_sessions = reader.uint32(); - break; - case 6: - message.game_server_sessions = reader.uint32(); - break; - case 7: - message.socaches = reader.uint32(); - break; - case 8: - message.socaches_to_unload = reader.uint32(); - break; - case 9: - message.socaches_loading = reader.uint32(); - break; - case 10: - message.writeback_queue = reader.uint32(); - break; - case 11: - message.steamid_locks = reader.uint32(); - break; - case 12: - message.logon_queue = reader.uint32(); - break; - case 13: - message.logon_jobs = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gc_app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.stats_kv = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.active_jobs = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.yielding_jobs = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.user_sessions = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.game_server_sessions = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.socaches = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.socaches_to_unload = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.socaches_loading = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.writeback_queue = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.steamid_locks = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.logon_queue = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.logon_jobs = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9838,11 +12764,11 @@ * @memberof CGCMsgGetSystemStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse + * @returns {CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape} CGCMsgGetSystemStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetSystemStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9856,46 +12782,50 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetSystemStatsResponse.verify = function verify(message) { + CGCMsgGetSystemStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) if (!$util.isInteger(message.gc_app_id)) return "gc_app_id: integer expected"; - if (message.stats_kv != null && message.hasOwnProperty("stats_kv")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) if (!(message.stats_kv && typeof message.stats_kv.length === "number" || $util.isString(message.stats_kv))) return "stats_kv: buffer expected"; - if (message.active_jobs != null && message.hasOwnProperty("active_jobs")) + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) if (!$util.isInteger(message.active_jobs)) return "active_jobs: integer expected"; - if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) if (!$util.isInteger(message.yielding_jobs)) return "yielding_jobs: integer expected"; - if (message.user_sessions != null && message.hasOwnProperty("user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) if (!$util.isInteger(message.user_sessions)) return "user_sessions: integer expected"; - if (message.game_server_sessions != null && message.hasOwnProperty("game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) if (!$util.isInteger(message.game_server_sessions)) return "game_server_sessions: integer expected"; - if (message.socaches != null && message.hasOwnProperty("socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) if (!$util.isInteger(message.socaches)) return "socaches: integer expected"; - if (message.socaches_to_unload != null && message.hasOwnProperty("socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) if (!$util.isInteger(message.socaches_to_unload)) return "socaches_to_unload: integer expected"; - if (message.socaches_loading != null && message.hasOwnProperty("socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) if (!$util.isInteger(message.socaches_loading)) return "socaches_loading: integer expected"; - if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) if (!$util.isInteger(message.writeback_queue)) return "writeback_queue: integer expected"; - if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) if (!$util.isInteger(message.steamid_locks)) return "steamid_locks: integer expected"; - if (message.logon_queue != null && message.hasOwnProperty("logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) if (!$util.isInteger(message.logon_queue)) return "logon_queue: integer expected"; - if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) if (!$util.isInteger(message.logon_jobs)) return "logon_jobs: integer expected"; return null; @@ -9909,16 +12839,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse */ - CGCMsgGetSystemStatsResponse.fromObject = function fromObject(object) { + CGCMsgGetSystemStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetSystemStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetSystemStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetSystemStatsResponse(); if (object.gc_app_id != null) message.gc_app_id = object.gc_app_id >>> 0; if (object.stats_kv != null) if (typeof object.stats_kv === "string") $util.base64.decode(object.stats_kv, message.stats_kv = $util.newBuffer($util.base64.length(object.stats_kv)), 0); - else if (object.stats_kv.length) + else if (object.stats_kv.length >= 0) message.stats_kv = object.stats_kv; if (object.active_jobs != null) message.active_jobs = object.active_jobs >>> 0; @@ -9954,17 +12890,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetSystemStatsResponse.toObject = function toObject(message, options) { + CGCMsgGetSystemStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gc_app_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.stats_kv = ""; else { object.stats_kv = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.stats_kv = $util.newBuffer(object.stats_kv); } object.active_jobs = 0; @@ -9979,31 +12919,31 @@ object.logon_queue = 0; object.logon_jobs = 0; } - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) object.gc_app_id = message.gc_app_id; - if (message.stats_kv != null && message.hasOwnProperty("stats_kv")) - object.stats_kv = options.bytes === String ? $util.base64.encode(message.stats_kv, 0, message.stats_kv.length) : options.bytes === Array ? Array.prototype.slice.call(message.stats_kv) : message.stats_kv; - if (message.active_jobs != null && message.hasOwnProperty("active_jobs")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) + object.stats_kv = options.bytes === $String ? $util.base64.encode(message.stats_kv, 0, message.stats_kv.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.stats_kv) : message.stats_kv; + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) object.active_jobs = message.active_jobs; - if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) object.yielding_jobs = message.yielding_jobs; - if (message.user_sessions != null && message.hasOwnProperty("user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) object.user_sessions = message.user_sessions; - if (message.game_server_sessions != null && message.hasOwnProperty("game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) object.game_server_sessions = message.game_server_sessions; - if (message.socaches != null && message.hasOwnProperty("socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) object.socaches = message.socaches; - if (message.socaches_to_unload != null && message.hasOwnProperty("socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) object.socaches_to_unload = message.socaches_to_unload; - if (message.socaches_loading != null && message.hasOwnProperty("socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) object.socaches_loading = message.socaches_loading; - if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) object.writeback_queue = message.writeback_queue; - if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) object.steamid_locks = message.steamid_locks; - if (message.logon_queue != null && message.hasOwnProperty("logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) object.logon_queue = message.logon_queue; - if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) object.logon_jobs = message.logon_jobs; return object; }; @@ -10015,8 +12955,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetSystemStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetSystemStatsResponse.prototype.toJSON = function() { + return CGCMsgGetSystemStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetSystemStatsResponse + * @function getTypeUrl + * @memberof CGCMsgGetSystemStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetSystemStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetSystemStatsResponse"; }; return CGCMsgGetSystemStatsResponse; @@ -10026,32 +12980,45 @@ /** * Properties of a CMsgAMSendEmail. - * @exports ICMsgAMSendEmail - * @interface ICMsgAMSendEmail + * @typedef {Object} CMsgAMSendEmail.$Properties * @property {number|Long|null} [steamid] CMsgAMSendEmail steamid * @property {number|null} [email_msg_type] CMsgAMSendEmail email_msg_type * @property {number|null} [email_format] CMsgAMSendEmail email_format - * @property {Array.|null} [persona_name_tokens] CMsgAMSendEmail persona_name_tokens + * @property {Array.|null} [persona_name_tokens] CMsgAMSendEmail persona_name_tokens * @property {number|null} [source_gc] CMsgAMSendEmail source_gc - * @property {Array.|null} [tokens] CMsgAMSendEmail tokens + * @property {Array.|null} [tokens] CMsgAMSendEmail tokens + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMSendEmail. + * @exports ICMsgAMSendEmail + * @interface ICMsgAMSendEmail + * @augments CMsgAMSendEmail.$Properties + * @deprecated Use CMsgAMSendEmail.$Properties instead. + */ + + /** + * Shape of a CMsgAMSendEmail. + * @typedef {CMsgAMSendEmail.$Properties} CMsgAMSendEmail.$Shape */ /** * Constructs a new CMsgAMSendEmail. * @exports CMsgAMSendEmail * @classdesc Represents a CMsgAMSendEmail. - * @implements ICMsgAMSendEmail * @constructor - * @param {ICMsgAMSendEmail=} [properties] Properties to set + * @param {CMsgAMSendEmail.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMSendEmail(properties) { + var CMsgAMSendEmail = function (properties) { this.persona_name_tokens = []; this.tokens = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMSendEmail steamid. @@ -10059,7 +13026,7 @@ * @memberof CMsgAMSendEmail * @instance */ - CMsgAMSendEmail.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMSendEmail.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMSendEmail email_msg_type. @@ -10079,7 +13046,7 @@ /** * CMsgAMSendEmail persona_name_tokens. - * @member {Array.} persona_name_tokens + * @member {Array.} persona_name_tokens * @memberof CMsgAMSendEmail * @instance */ @@ -10095,7 +13062,7 @@ /** * CMsgAMSendEmail tokens. - * @member {Array.} tokens + * @member {Array.} tokens * @memberof CMsgAMSendEmail * @instance */ @@ -10106,10 +13073,14 @@ * @function create * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail=} [properties] Properties to set + * @param {CMsgAMSendEmail.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail} CMsgAMSendEmail instance + * @type {{ + * (properties: CMsgAMSendEmail.$Shape): CMsgAMSendEmail & CMsgAMSendEmail.$Shape; + * (properties?: CMsgAMSendEmail.$Properties): CMsgAMSendEmail; + * }} */ - CMsgAMSendEmail.create = function create(properties) { + CMsgAMSendEmail.create = function(properties) { return new CMsgAMSendEmail(properties); }; @@ -10118,27 +13089,34 @@ * @function encode * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail} message CMsgAMSendEmail message or plain object to encode + * @param {CMsgAMSendEmail.$Properties} message CMsgAMSendEmail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmail.encode = function encode(message, writer) { + CMsgAMSendEmail.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.email_msg_type != null && Object.hasOwnProperty.call(message, "email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type); - if (message.email_format != null && Object.hasOwnProperty.call(message, "email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.email_format); if (message.persona_name_tokens != null && message.persona_name_tokens.length) for (var i = 0; i < message.persona_name_tokens.length; ++i) - $root.CMsgAMSendEmail.PersonaNameReplacementToken.encode(message.persona_name_tokens[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.source_gc != null && Object.hasOwnProperty.call(message, "source_gc")) + $root.CMsgAMSendEmail.PersonaNameReplacementToken.encode(message.persona_name_tokens[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.source_gc); if (message.tokens != null && message.tokens.length) for (var i = 0; i < message.tokens.length; ++i) - $root.CMsgAMSendEmail.ReplacementToken.encode(message.tokens[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.CMsgAMSendEmail.ReplacementToken.encode(message.tokens[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10147,12 +13125,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail} message CMsgAMSendEmail message or plain object to encode + * @param {CMsgAMSendEmail.$Properties} message CMsgAMSendEmail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMSendEmail.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10162,44 +13140,76 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail} CMsgAMSendEmail + * @returns {CMsgAMSendEmail & CMsgAMSendEmail.$Shape} CMsgAMSendEmail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmail.decode = function decode(reader, length) { + CMsgAMSendEmail.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.email_msg_type = reader.uint32(); - break; - case 3: - message.email_format = reader.uint32(); - break; - case 5: - if (!(message.persona_name_tokens && message.persona_name_tokens.length)) - message.persona_name_tokens = []; - message.persona_name_tokens.push($root.CMsgAMSendEmail.PersonaNameReplacementToken.decode(reader, reader.uint32())); - break; - case 6: - message.source_gc = reader.uint32(); - break; - case 7: - if (!(message.tokens && message.tokens.length)) - message.tokens = []; - message.tokens.push($root.CMsgAMSendEmail.ReplacementToken.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.email_msg_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.email_format = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.persona_name_tokens && message.persona_name_tokens.length)) + message.persona_name_tokens = []; + message.persona_name_tokens.push($root.CMsgAMSendEmail.PersonaNameReplacementToken.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.source_gc = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.CMsgAMSendEmail.ReplacementToken.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10209,11 +13219,11 @@ * @memberof CMsgAMSendEmail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail} CMsgAMSendEmail + * @returns {CMsgAMSendEmail & CMsgAMSendEmail.$Shape} CMsgAMSendEmail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmail.decodeDelimited = function decodeDelimited(reader) { + CMsgAMSendEmail.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10227,35 +13237,39 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMSendEmail.verify = function verify(message) { + CMsgAMSendEmail.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) if (!$util.isInteger(message.email_msg_type)) return "email_msg_type: integer expected"; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) if (!$util.isInteger(message.email_format)) return "email_format: integer expected"; - if (message.persona_name_tokens != null && message.hasOwnProperty("persona_name_tokens")) { - if (!Array.isArray(message.persona_name_tokens)) + if (message.persona_name_tokens != null && $Object.hasOwnProperty.call(message, "persona_name_tokens")) { + if (!$Array.isArray(message.persona_name_tokens)) return "persona_name_tokens: array expected"; for (var i = 0; i < message.persona_name_tokens.length; ++i) { - var error = $root.CMsgAMSendEmail.PersonaNameReplacementToken.verify(message.persona_name_tokens[i]); + var error = $root.CMsgAMSendEmail.PersonaNameReplacementToken.verify(message.persona_name_tokens[i], _depth + 1); if (error) return "persona_name_tokens." + error; } } - if (message.source_gc != null && message.hasOwnProperty("source_gc")) + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) if (!$util.isInteger(message.source_gc)) return "source_gc: integer expected"; - if (message.tokens != null && message.hasOwnProperty("tokens")) { - if (!Array.isArray(message.tokens)) + if (message.tokens != null && $Object.hasOwnProperty.call(message, "tokens")) { + if (!$Array.isArray(message.tokens)) return "tokens: array expected"; for (var i = 0; i < message.tokens.length; ++i) { - var error = $root.CMsgAMSendEmail.ReplacementToken.verify(message.tokens[i]); + var error = $root.CMsgAMSendEmail.ReplacementToken.verify(message.tokens[i], _depth + 1); if (error) return "tokens." + error; } @@ -10271,43 +13285,49 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail} CMsgAMSendEmail */ - CMsgAMSendEmail.fromObject = function fromObject(object) { + CMsgAMSendEmail.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.email_msg_type != null) message.email_msg_type = object.email_msg_type >>> 0; if (object.email_format != null) message.email_format = object.email_format >>> 0; if (object.persona_name_tokens) { - if (!Array.isArray(object.persona_name_tokens)) - throw TypeError(".CMsgAMSendEmail.persona_name_tokens: array expected"); - message.persona_name_tokens = []; + if (!$Array.isArray(object.persona_name_tokens)) + throw $TypeError(".CMsgAMSendEmail.persona_name_tokens: array expected"); + message.persona_name_tokens = $Array(object.persona_name_tokens.length); for (var i = 0; i < object.persona_name_tokens.length; ++i) { - if (typeof object.persona_name_tokens[i] !== "object") - throw TypeError(".CMsgAMSendEmail.persona_name_tokens: object expected"); - message.persona_name_tokens[i] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.fromObject(object.persona_name_tokens[i]); + if (!$util.isObject(object.persona_name_tokens[i])) + throw $TypeError(".CMsgAMSendEmail.persona_name_tokens: object expected"); + message.persona_name_tokens[i] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.fromObject(object.persona_name_tokens[i], _depth + 1); } } if (object.source_gc != null) message.source_gc = object.source_gc >>> 0; if (object.tokens) { - if (!Array.isArray(object.tokens)) - throw TypeError(".CMsgAMSendEmail.tokens: array expected"); - message.tokens = []; + if (!$Array.isArray(object.tokens)) + throw $TypeError(".CMsgAMSendEmail.tokens: array expected"); + message.tokens = $Array(object.tokens.length); for (var i = 0; i < object.tokens.length; ++i) { - if (typeof object.tokens[i] !== "object") - throw TypeError(".CMsgAMSendEmail.tokens: object expected"); - message.tokens[i] = $root.CMsgAMSendEmail.ReplacementToken.fromObject(object.tokens[i]); + if (!$util.isObject(object.tokens[i])) + throw $TypeError(".CMsgAMSendEmail.tokens: object expected"); + message.tokens[i] = $root.CMsgAMSendEmail.ReplacementToken.fromObject(object.tokens[i], _depth + 1); } } return message; @@ -10322,9 +13342,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMSendEmail.toObject = function toObject(message, options) { + CMsgAMSendEmail.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.persona_name_tokens = []; @@ -10332,34 +13356,36 @@ } if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.email_msg_type = 0; object.email_format = 0; object.source_gc = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) object.email_msg_type = message.email_msg_type; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) object.email_format = message.email_format; if (message.persona_name_tokens && message.persona_name_tokens.length) { - object.persona_name_tokens = []; + object.persona_name_tokens = $Array(message.persona_name_tokens.length); for (var j = 0; j < message.persona_name_tokens.length; ++j) - object.persona_name_tokens[j] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.toObject(message.persona_name_tokens[j], options); + object.persona_name_tokens[j] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.toObject(message.persona_name_tokens[j], options, _depth + 1); } - if (message.source_gc != null && message.hasOwnProperty("source_gc")) + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) object.source_gc = message.source_gc; if (message.tokens && message.tokens.length) { - object.tokens = []; + object.tokens = $Array(message.tokens.length); for (var j = 0; j < message.tokens.length; ++j) - object.tokens[j] = $root.CMsgAMSendEmail.ReplacementToken.toObject(message.tokens[j], options); + object.tokens[j] = $root.CMsgAMSendEmail.ReplacementToken.toObject(message.tokens[j], options, _depth + 1); } return object; }; @@ -10371,34 +13397,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMSendEmail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMSendEmail.prototype.toJSON = function() { + return CMsgAMSendEmail.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMSendEmail + * @function getTypeUrl + * @memberof CMsgAMSendEmail + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMSendEmail.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail"; }; CMsgAMSendEmail.ReplacementToken = (function() { /** * Properties of a ReplacementToken. - * @memberof CMsgAMSendEmail - * @interface IReplacementToken + * @typedef {Object} CMsgAMSendEmail.ReplacementToken.$Properties * @property {string|null} [token_name] ReplacementToken token_name * @property {string|null} [token_value] ReplacementToken token_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ReplacementToken. + * @memberof CMsgAMSendEmail + * @interface IReplacementToken + * @augments CMsgAMSendEmail.ReplacementToken.$Properties + * @deprecated Use CMsgAMSendEmail.ReplacementToken.$Properties instead. + */ + + /** + * Shape of a ReplacementToken. + * @typedef {CMsgAMSendEmail.ReplacementToken.$Properties} CMsgAMSendEmail.ReplacementToken.$Shape */ /** * Constructs a new ReplacementToken. * @memberof CMsgAMSendEmail * @classdesc Represents a ReplacementToken. - * @implements IReplacementToken * @constructor - * @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.ReplacementToken.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ReplacementToken(properties) { + var ReplacementToken = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ReplacementToken token_name. @@ -10421,10 +13474,14 @@ * @function create * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.ReplacementToken.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken instance + * @type {{ + * (properties: CMsgAMSendEmail.ReplacementToken.$Shape): CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape; + * (properties?: CMsgAMSendEmail.ReplacementToken.$Properties): CMsgAMSendEmail.ReplacementToken; + * }} */ - ReplacementToken.create = function create(properties) { + ReplacementToken.create = function(properties) { return new ReplacementToken(properties); }; @@ -10433,17 +13490,24 @@ * @function encode * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken} message ReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.ReplacementToken.$Properties} message ReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplacementToken.encode = function encode(message, writer) { + ReplacementToken.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.token_name != null && Object.hasOwnProperty.call(message, "token_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.token_name); - if (message.token_value != null && Object.hasOwnProperty.call(message, "token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10452,12 +13516,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken} message ReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.ReplacementToken.$Properties} message ReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplacementToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ReplacementToken.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10467,28 +13531,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken + * @returns {CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape} ReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplacementToken.decode = function decode(reader, length) { + ReplacementToken.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail.ReplacementToken(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail.ReplacementToken(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.token_name = reader.string(); - break; - case 2: - message.token_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.token_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.token_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10498,11 +13582,11 @@ * @memberof CMsgAMSendEmail.ReplacementToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken + * @returns {CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape} ReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplacementToken.decodeDelimited = function decodeDelimited(reader) { + ReplacementToken.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10516,13 +13600,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReplacementToken.verify = function verify(message) { + ReplacementToken.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) if (!$util.isString(message.token_name)) return "token_name: string expected"; - if (message.token_value != null && message.hasOwnProperty("token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) if (!$util.isString(message.token_value)) return "token_value: string expected"; return null; @@ -10536,14 +13624,20 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken */ - ReplacementToken.fromObject = function fromObject(object) { + ReplacementToken.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail.ReplacementToken) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail.ReplacementToken: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail.ReplacementToken(); if (object.token_name != null) - message.token_name = String(object.token_name); + message.token_name = $String(object.token_name); if (object.token_value != null) - message.token_value = String(object.token_value); + message.token_value = $String(object.token_value); return message; }; @@ -10556,17 +13650,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReplacementToken.toObject = function toObject(message, options) { + ReplacementToken.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.token_name = ""; object.token_value = ""; } - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) object.token_name = message.token_name; - if (message.token_value != null && message.hasOwnProperty("token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) object.token_value = message.token_value; return object; }; @@ -10578,8 +13676,22 @@ * @instance * @returns {Object.} JSON object */ - ReplacementToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ReplacementToken.prototype.toJSON = function() { + return ReplacementToken.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ReplacementToken + * @function getTypeUrl + * @memberof CMsgAMSendEmail.ReplacementToken + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ReplacementToken.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail.ReplacementToken"; }; return ReplacementToken; @@ -10589,26 +13701,39 @@ /** * Properties of a PersonaNameReplacementToken. - * @memberof CMsgAMSendEmail - * @interface IPersonaNameReplacementToken + * @typedef {Object} CMsgAMSendEmail.PersonaNameReplacementToken.$Properties * @property {number|Long|null} [steamid] PersonaNameReplacementToken steamid * @property {string|null} [token_name] PersonaNameReplacementToken token_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PersonaNameReplacementToken. + * @memberof CMsgAMSendEmail + * @interface IPersonaNameReplacementToken + * @augments CMsgAMSendEmail.PersonaNameReplacementToken.$Properties + * @deprecated Use CMsgAMSendEmail.PersonaNameReplacementToken.$Properties instead. + */ + + /** + * Shape of a PersonaNameReplacementToken. + * @typedef {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} CMsgAMSendEmail.PersonaNameReplacementToken.$Shape */ /** * Constructs a new PersonaNameReplacementToken. * @memberof CMsgAMSendEmail * @classdesc Represents a PersonaNameReplacementToken. - * @implements IPersonaNameReplacementToken * @constructor - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PersonaNameReplacementToken(properties) { + var PersonaNameReplacementToken = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PersonaNameReplacementToken steamid. @@ -10616,7 +13741,7 @@ * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @instance */ - PersonaNameReplacementToken.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PersonaNameReplacementToken.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * PersonaNameReplacementToken token_name. @@ -10631,10 +13756,14 @@ * @function create * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken instance + * @type {{ + * (properties: CMsgAMSendEmail.PersonaNameReplacementToken.$Shape): CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape; + * (properties?: CMsgAMSendEmail.PersonaNameReplacementToken.$Properties): CMsgAMSendEmail.PersonaNameReplacementToken; + * }} */ - PersonaNameReplacementToken.create = function create(properties) { + PersonaNameReplacementToken.create = function(properties) { return new PersonaNameReplacementToken(properties); }; @@ -10643,17 +13772,24 @@ * @function encode * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken} message PersonaNameReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} message PersonaNameReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaNameReplacementToken.encode = function encode(message, writer) { + PersonaNameReplacementToken.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.token_name != null && Object.hasOwnProperty.call(message, "token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10662,12 +13798,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken} message PersonaNameReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} message PersonaNameReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaNameReplacementToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PersonaNameReplacementToken.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10677,28 +13813,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken + * @returns {CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape} PersonaNameReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaNameReplacementToken.decode = function decode(reader, length) { + PersonaNameReplacementToken.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.token_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.token_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10708,11 +13864,11 @@ * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken + * @returns {CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape} PersonaNameReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaNameReplacementToken.decodeDelimited = function decodeDelimited(reader) { + PersonaNameReplacementToken.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10726,13 +13882,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PersonaNameReplacementToken.verify = function verify(message) { + PersonaNameReplacementToken.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) if (!$util.isString(message.token_name)) return "token_name: string expected"; return null; @@ -10746,21 +13906,27 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken */ - PersonaNameReplacementToken.fromObject = function fromObject(object) { + PersonaNameReplacementToken.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail.PersonaNameReplacementToken) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail.PersonaNameReplacementToken: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.token_name != null) - message.token_name = String(object.token_name); + message.token_name = $String(object.token_name); return message; }; @@ -10773,24 +13939,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PersonaNameReplacementToken.toObject = function toObject(message, options) { + PersonaNameReplacementToken.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.token_name = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.token_name != null && message.hasOwnProperty("token_name")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) object.token_name = message.token_name; return object; }; @@ -10802,8 +13974,22 @@ * @instance * @returns {Object.} JSON object */ - PersonaNameReplacementToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PersonaNameReplacementToken.prototype.toJSON = function() { + return PersonaNameReplacementToken.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PersonaNameReplacementToken + * @function getTypeUrl + * @memberof CMsgAMSendEmail.PersonaNameReplacementToken + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PersonaNameReplacementToken.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail.PersonaNameReplacementToken"; }; return PersonaNameReplacementToken; @@ -10814,27 +14000,40 @@ $root.CMsgAMSendEmailResponse = (function() { + /** + * Properties of a CMsgAMSendEmailResponse. + * @typedef {Object} CMsgAMSendEmailResponse.$Properties + * @property {number|null} [eresult] CMsgAMSendEmailResponse eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMSendEmailResponse. * @exports ICMsgAMSendEmailResponse * @interface ICMsgAMSendEmailResponse - * @property {number|null} [eresult] CMsgAMSendEmailResponse eresult + * @augments CMsgAMSendEmailResponse.$Properties + * @deprecated Use CMsgAMSendEmailResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMSendEmailResponse. + * @typedef {CMsgAMSendEmailResponse.$Properties} CMsgAMSendEmailResponse.$Shape */ /** * Constructs a new CMsgAMSendEmailResponse. * @exports CMsgAMSendEmailResponse * @classdesc Represents a CMsgAMSendEmailResponse. - * @implements ICMsgAMSendEmailResponse * @constructor - * @param {ICMsgAMSendEmailResponse=} [properties] Properties to set + * @param {CMsgAMSendEmailResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMSendEmailResponse(properties) { + var CMsgAMSendEmailResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMSendEmailResponse eresult. @@ -10849,10 +14048,14 @@ * @function create * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse=} [properties] Properties to set + * @param {CMsgAMSendEmailResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse instance + * @type {{ + * (properties: CMsgAMSendEmailResponse.$Shape): CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape; + * (properties?: CMsgAMSendEmailResponse.$Properties): CMsgAMSendEmailResponse; + * }} */ - CMsgAMSendEmailResponse.create = function create(properties) { + CMsgAMSendEmailResponse.create = function(properties) { return new CMsgAMSendEmailResponse(properties); }; @@ -10861,15 +14064,22 @@ * @function encode * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse} message CMsgAMSendEmailResponse message or plain object to encode + * @param {CMsgAMSendEmailResponse.$Properties} message CMsgAMSendEmailResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmailResponse.encode = function encode(message, writer) { + CMsgAMSendEmailResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10878,12 +14088,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse} message CMsgAMSendEmailResponse message or plain object to encode + * @param {CMsgAMSendEmailResponse.$Properties} message CMsgAMSendEmailResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmailResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMSendEmailResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10893,25 +14103,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse + * @returns {CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape} CMsgAMSendEmailResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmailResponse.decode = function decode(reader, length) { + CMsgAMSendEmailResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmailResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmailResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10921,11 +14148,11 @@ * @memberof CMsgAMSendEmailResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse + * @returns {CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape} CMsgAMSendEmailResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmailResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMSendEmailResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10939,10 +14166,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMSendEmailResponse.verify = function verify(message) { + CMsgAMSendEmailResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -10956,9 +14187,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse */ - CMsgAMSendEmailResponse.fromObject = function fromObject(object) { + CMsgAMSendEmailResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmailResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmailResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmailResponse(); if (object.eresult != null) message.eresult = object.eresult >>> 0; @@ -10974,13 +14211,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMSendEmailResponse.toObject = function toObject(message, options) { + CMsgAMSendEmailResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -10992,8 +14233,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMSendEmailResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMSendEmailResponse.prototype.toJSON = function() { + return CMsgAMSendEmailResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMSendEmailResponse + * @function getTypeUrl + * @memberof CMsgAMSendEmailResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMSendEmailResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmailResponse"; }; return CMsgAMSendEmailResponse; @@ -11003,28 +14258,41 @@ /** * Properties of a CMsgGCGetEmailTemplate. - * @exports ICMsgGCGetEmailTemplate - * @interface ICMsgGCGetEmailTemplate + * @typedef {Object} CMsgGCGetEmailTemplate.$Properties * @property {number|null} [app_id] CMsgGCGetEmailTemplate app_id * @property {number|null} [email_msg_type] CMsgGCGetEmailTemplate email_msg_type * @property {number|null} [email_lang] CMsgGCGetEmailTemplate email_lang * @property {number|null} [email_format] CMsgGCGetEmailTemplate email_format + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetEmailTemplate. + * @exports ICMsgGCGetEmailTemplate + * @interface ICMsgGCGetEmailTemplate + * @augments CMsgGCGetEmailTemplate.$Properties + * @deprecated Use CMsgGCGetEmailTemplate.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetEmailTemplate. + * @typedef {CMsgGCGetEmailTemplate.$Properties} CMsgGCGetEmailTemplate.$Shape */ /** * Constructs a new CMsgGCGetEmailTemplate. * @exports CMsgGCGetEmailTemplate * @classdesc Represents a CMsgGCGetEmailTemplate. - * @implements ICMsgGCGetEmailTemplate * @constructor - * @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplate.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetEmailTemplate(properties) { + var CMsgGCGetEmailTemplate = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetEmailTemplate app_id. @@ -11063,10 +14331,14 @@ * @function create * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplate.$Properties=} [properties] Properties to set * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate instance + * @type {{ + * (properties: CMsgGCGetEmailTemplate.$Shape): CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape; + * (properties?: CMsgGCGetEmailTemplate.$Properties): CMsgGCGetEmailTemplate; + * }} */ - CMsgGCGetEmailTemplate.create = function create(properties) { + CMsgGCGetEmailTemplate.create = function(properties) { return new CMsgGCGetEmailTemplate(properties); }; @@ -11075,21 +14347,28 @@ * @function encode * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate} message CMsgGCGetEmailTemplate message or plain object to encode + * @param {CMsgGCGetEmailTemplate.$Properties} message CMsgGCGetEmailTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplate.encode = function encode(message, writer) { + CMsgGCGetEmailTemplate.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_id); - if (message.email_msg_type != null && Object.hasOwnProperty.call(message, "email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type); - if (message.email_lang != null && Object.hasOwnProperty.call(message, "email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.email_lang); - if (message.email_format != null && Object.hasOwnProperty.call(message, "email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.email_format); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11098,12 +14377,12 @@ * @function encodeDelimited * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate} message CMsgGCGetEmailTemplate message or plain object to encode + * @param {CMsgGCGetEmailTemplate.$Properties} message CMsgGCGetEmailTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetEmailTemplate.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11113,34 +14392,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate + * @returns {CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape} CMsgGCGetEmailTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplate.decode = function decode(reader, length) { + CMsgGCGetEmailTemplate.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetEmailTemplate(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetEmailTemplate(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_id = reader.uint32(); - break; - case 2: - message.email_msg_type = reader.uint32(); - break; - case 3: - message.email_lang = reader.int32(); - break; - case 4: - message.email_format = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.email_msg_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.email_lang = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.email_format = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11150,11 +14455,11 @@ * @memberof CMsgGCGetEmailTemplate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate + * @returns {CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape} CMsgGCGetEmailTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplate.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetEmailTemplate.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11168,19 +14473,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetEmailTemplate.verify = function verify(message) { + CMsgGCGetEmailTemplate.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) if (!$util.isInteger(message.email_msg_type)) return "email_msg_type: integer expected"; - if (message.email_lang != null && message.hasOwnProperty("email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) if (!$util.isInteger(message.email_lang)) return "email_lang: integer expected"; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) if (!$util.isInteger(message.email_format)) return "email_format: integer expected"; return null; @@ -11194,9 +14503,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate */ - CMsgGCGetEmailTemplate.fromObject = function fromObject(object) { + CMsgGCGetEmailTemplate.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetEmailTemplate) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetEmailTemplate: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetEmailTemplate(); if (object.app_id != null) message.app_id = object.app_id >>> 0; @@ -11218,9 +14533,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetEmailTemplate.toObject = function toObject(message, options) { + CMsgGCGetEmailTemplate.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.app_id = 0; @@ -11228,13 +14547,13 @@ object.email_lang = 0; object.email_format = 0; } - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) object.email_msg_type = message.email_msg_type; - if (message.email_lang != null && message.hasOwnProperty("email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) object.email_lang = message.email_lang; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) object.email_format = message.email_format; return object; }; @@ -11246,8 +14565,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetEmailTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetEmailTemplate.prototype.toJSON = function() { + return CMsgGCGetEmailTemplate.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetEmailTemplate + * @function getTypeUrl + * @memberof CMsgGCGetEmailTemplate + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetEmailTemplate.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetEmailTemplate"; }; return CMsgGCGetEmailTemplate; @@ -11257,27 +14590,40 @@ /** * Properties of a CMsgGCGetEmailTemplateResponse. - * @exports ICMsgGCGetEmailTemplateResponse - * @interface ICMsgGCGetEmailTemplateResponse + * @typedef {Object} CMsgGCGetEmailTemplateResponse.$Properties * @property {number|null} [eresult] CMsgGCGetEmailTemplateResponse eresult * @property {boolean|null} [template_exists] CMsgGCGetEmailTemplateResponse template_exists * @property {string|null} [template] CMsgGCGetEmailTemplateResponse template + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetEmailTemplateResponse. + * @exports ICMsgGCGetEmailTemplateResponse + * @interface ICMsgGCGetEmailTemplateResponse + * @augments CMsgGCGetEmailTemplateResponse.$Properties + * @deprecated Use CMsgGCGetEmailTemplateResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetEmailTemplateResponse. + * @typedef {CMsgGCGetEmailTemplateResponse.$Properties} CMsgGCGetEmailTemplateResponse.$Shape */ /** * Constructs a new CMsgGCGetEmailTemplateResponse. * @exports CMsgGCGetEmailTemplateResponse * @classdesc Represents a CMsgGCGetEmailTemplateResponse. - * @implements ICMsgGCGetEmailTemplateResponse * @constructor - * @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplateResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetEmailTemplateResponse(properties) { + var CMsgGCGetEmailTemplateResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetEmailTemplateResponse eresult. @@ -11308,10 +14654,14 @@ * @function create * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplateResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse instance + * @type {{ + * (properties: CMsgGCGetEmailTemplateResponse.$Shape): CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape; + * (properties?: CMsgGCGetEmailTemplateResponse.$Properties): CMsgGCGetEmailTemplateResponse; + * }} */ - CMsgGCGetEmailTemplateResponse.create = function create(properties) { + CMsgGCGetEmailTemplateResponse.create = function(properties) { return new CMsgGCGetEmailTemplateResponse(properties); }; @@ -11320,19 +14670,26 @@ * @function encode * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse} message CMsgGCGetEmailTemplateResponse message or plain object to encode + * @param {CMsgGCGetEmailTemplateResponse.$Properties} message CMsgGCGetEmailTemplateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplateResponse.encode = function encode(message, writer) { + CMsgGCGetEmailTemplateResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult); - if (message.template_exists != null && Object.hasOwnProperty.call(message, "template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.template_exists); - if (message.template != null && Object.hasOwnProperty.call(message, "template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.template); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11341,12 +14698,12 @@ * @function encodeDelimited * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse} message CMsgGCGetEmailTemplateResponse message or plain object to encode + * @param {CMsgGCGetEmailTemplateResponse.$Properties} message CMsgGCGetEmailTemplateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetEmailTemplateResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11356,31 +14713,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse + * @returns {CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape} CMsgGCGetEmailTemplateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplateResponse.decode = function decode(reader, length) { + CMsgGCGetEmailTemplateResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetEmailTemplateResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetEmailTemplateResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.uint32(); - break; - case 2: - message.template_exists = reader.bool(); - break; - case 3: - message.template = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.template_exists = reader.bool(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.template = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11390,11 +14770,11 @@ * @memberof CMsgGCGetEmailTemplateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse + * @returns {CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape} CMsgGCGetEmailTemplateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplateResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetEmailTemplateResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11408,16 +14788,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetEmailTemplateResponse.verify = function verify(message) { + CMsgGCGetEmailTemplateResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.template_exists != null && message.hasOwnProperty("template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) if (typeof message.template_exists !== "boolean") return "template_exists: boolean expected"; - if (message.template != null && message.hasOwnProperty("template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) if (!$util.isString(message.template)) return "template: string expected"; return null; @@ -11431,16 +14815,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse */ - CMsgGCGetEmailTemplateResponse.fromObject = function fromObject(object) { + CMsgGCGetEmailTemplateResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetEmailTemplateResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetEmailTemplateResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetEmailTemplateResponse(); if (object.eresult != null) message.eresult = object.eresult >>> 0; if (object.template_exists != null) - message.template_exists = Boolean(object.template_exists); + message.template_exists = $Boolean(object.template_exists); if (object.template != null) - message.template = String(object.template); + message.template = $String(object.template); return message; }; @@ -11453,20 +14843,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetEmailTemplateResponse.toObject = function toObject(message, options) { + CMsgGCGetEmailTemplateResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.template_exists = false; object.template = ""; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.template_exists != null && message.hasOwnProperty("template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) object.template_exists = message.template_exists; - if (message.template != null && message.hasOwnProperty("template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) object.template = message.template; return object; }; @@ -11478,8 +14872,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetEmailTemplateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetEmailTemplateResponse.prototype.toJSON = function() { + return CMsgGCGetEmailTemplateResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetEmailTemplateResponse + * @function getTypeUrl + * @memberof CMsgGCGetEmailTemplateResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetEmailTemplateResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetEmailTemplateResponse"; }; return CMsgGCGetEmailTemplateResponse; @@ -11489,29 +14897,42 @@ /** * Properties of a CMsgAMGrantGuestPasses2. - * @exports ICMsgAMGrantGuestPasses2 - * @interface ICMsgAMGrantGuestPasses2 + * @typedef {Object} CMsgAMGrantGuestPasses2.$Properties * @property {number|Long|null} [steam_id] CMsgAMGrantGuestPasses2 steam_id * @property {number|null} [package_id] CMsgAMGrantGuestPasses2 package_id * @property {number|null} [passes_to_grant] CMsgAMGrantGuestPasses2 passes_to_grant * @property {number|null} [days_to_expiration] CMsgAMGrantGuestPasses2 days_to_expiration * @property {number|null} [action] CMsgAMGrantGuestPasses2 action + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGrantGuestPasses2. + * @exports ICMsgAMGrantGuestPasses2 + * @interface ICMsgAMGrantGuestPasses2 + * @augments CMsgAMGrantGuestPasses2.$Properties + * @deprecated Use CMsgAMGrantGuestPasses2.$Properties instead. + */ + + /** + * Shape of a CMsgAMGrantGuestPasses2. + * @typedef {CMsgAMGrantGuestPasses2.$Properties} CMsgAMGrantGuestPasses2.$Shape */ /** * Constructs a new CMsgAMGrantGuestPasses2. * @exports CMsgAMGrantGuestPasses2 * @classdesc Represents a CMsgAMGrantGuestPasses2. - * @implements ICMsgAMGrantGuestPasses2 * @constructor - * @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGrantGuestPasses2(properties) { + var CMsgAMGrantGuestPasses2 = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGrantGuestPasses2 steam_id. @@ -11519,7 +14940,7 @@ * @memberof CMsgAMGrantGuestPasses2 * @instance */ - CMsgAMGrantGuestPasses2.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGrantGuestPasses2.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGrantGuestPasses2 package_id. @@ -11558,10 +14979,14 @@ * @function create * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2.$Properties=} [properties] Properties to set * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 instance + * @type {{ + * (properties: CMsgAMGrantGuestPasses2.$Shape): CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape; + * (properties?: CMsgAMGrantGuestPasses2.$Properties): CMsgAMGrantGuestPasses2; + * }} */ - CMsgAMGrantGuestPasses2.create = function create(properties) { + CMsgAMGrantGuestPasses2.create = function(properties) { return new CMsgAMGrantGuestPasses2(properties); }; @@ -11570,23 +14995,30 @@ * @function encode * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2} message CMsgAMGrantGuestPasses2 message or plain object to encode + * @param {CMsgAMGrantGuestPasses2.$Properties} message CMsgAMGrantGuestPasses2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2.encode = function encode(message, writer) { + CMsgAMGrantGuestPasses2.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.package_id != null && Object.hasOwnProperty.call(message, "package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.package_id); - if (message.passes_to_grant != null && Object.hasOwnProperty.call(message, "passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.passes_to_grant); - if (message.days_to_expiration != null && Object.hasOwnProperty.call(message, "days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.days_to_expiration); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.action); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11595,12 +15027,12 @@ * @function encodeDelimited * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2} message CMsgAMGrantGuestPasses2 message or plain object to encode + * @param {CMsgAMGrantGuestPasses2.$Properties} message CMsgAMGrantGuestPasses2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGrantGuestPasses2.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11610,37 +15042,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 + * @returns {CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape} CMsgAMGrantGuestPasses2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2.decode = function decode(reader, length) { + CMsgAMGrantGuestPasses2.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGrantGuestPasses2(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGrantGuestPasses2(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.package_id = reader.uint32(); - break; - case 3: - message.passes_to_grant = reader.int32(); - break; - case 4: - message.days_to_expiration = reader.int32(); - break; - case 5: - message.action = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.package_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.passes_to_grant = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.days_to_expiration = reader.int32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.action = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11650,11 +15111,11 @@ * @memberof CMsgAMGrantGuestPasses2 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 + * @returns {CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape} CMsgAMGrantGuestPasses2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGrantGuestPasses2.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11668,22 +15129,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGrantGuestPasses2.verify = function verify(message) { + CMsgAMGrantGuestPasses2.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) if (!$util.isInteger(message.package_id)) return "package_id: integer expected"; - if (message.passes_to_grant != null && message.hasOwnProperty("passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) if (!$util.isInteger(message.passes_to_grant)) return "passes_to_grant: integer expected"; - if (message.days_to_expiration != null && message.hasOwnProperty("days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) if (!$util.isInteger(message.days_to_expiration)) return "days_to_expiration: integer expected"; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) if (!$util.isInteger(message.action)) return "action: integer expected"; return null; @@ -11697,19 +15162,25 @@ * @param {Object.} object Plain object * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 */ - CMsgAMGrantGuestPasses2.fromObject = function fromObject(object) { + CMsgAMGrantGuestPasses2.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGrantGuestPasses2) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGrantGuestPasses2: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGrantGuestPasses2(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.package_id != null) message.package_id = object.package_id >>> 0; if (object.passes_to_grant != null) @@ -11730,33 +15201,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGrantGuestPasses2.toObject = function toObject(message, options) { + CMsgAMGrantGuestPasses2.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.package_id = 0; object.passes_to_grant = 0; object.days_to_expiration = 0; object.action = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.package_id != null && message.hasOwnProperty("package_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) object.package_id = message.package_id; - if (message.passes_to_grant != null && message.hasOwnProperty("passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) object.passes_to_grant = message.passes_to_grant; - if (message.days_to_expiration != null && message.hasOwnProperty("days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) object.days_to_expiration = message.days_to_expiration; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) object.action = message.action; return object; }; @@ -11768,8 +15245,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGrantGuestPasses2.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGrantGuestPasses2.prototype.toJSON = function() { + return CMsgAMGrantGuestPasses2.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGrantGuestPasses2 + * @function getTypeUrl + * @memberof CMsgAMGrantGuestPasses2 + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGrantGuestPasses2.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGrantGuestPasses2"; }; return CMsgAMGrantGuestPasses2; @@ -11779,26 +15270,39 @@ /** * Properties of a CMsgAMGrantGuestPasses2Response. - * @exports ICMsgAMGrantGuestPasses2Response - * @interface ICMsgAMGrantGuestPasses2Response + * @typedef {Object} CMsgAMGrantGuestPasses2Response.$Properties * @property {number|null} [eresult] CMsgAMGrantGuestPasses2Response eresult * @property {number|null} [passes_granted] CMsgAMGrantGuestPasses2Response passes_granted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGrantGuestPasses2Response. + * @exports ICMsgAMGrantGuestPasses2Response + * @interface ICMsgAMGrantGuestPasses2Response + * @augments CMsgAMGrantGuestPasses2Response.$Properties + * @deprecated Use CMsgAMGrantGuestPasses2Response.$Properties instead. + */ + + /** + * Shape of a CMsgAMGrantGuestPasses2Response. + * @typedef {CMsgAMGrantGuestPasses2Response.$Properties} CMsgAMGrantGuestPasses2Response.$Shape */ /** * Constructs a new CMsgAMGrantGuestPasses2Response. * @exports CMsgAMGrantGuestPasses2Response * @classdesc Represents a CMsgAMGrantGuestPasses2Response. - * @implements ICMsgAMGrantGuestPasses2Response * @constructor - * @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGrantGuestPasses2Response(properties) { + var CMsgAMGrantGuestPasses2Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGrantGuestPasses2Response eresult. @@ -11821,10 +15325,14 @@ * @function create * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2Response.$Properties=} [properties] Properties to set * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response instance + * @type {{ + * (properties: CMsgAMGrantGuestPasses2Response.$Shape): CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape; + * (properties?: CMsgAMGrantGuestPasses2Response.$Properties): CMsgAMGrantGuestPasses2Response; + * }} */ - CMsgAMGrantGuestPasses2Response.create = function create(properties) { + CMsgAMGrantGuestPasses2Response.create = function(properties) { return new CMsgAMGrantGuestPasses2Response(properties); }; @@ -11833,17 +15341,24 @@ * @function encode * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response} message CMsgAMGrantGuestPasses2Response message or plain object to encode + * @param {CMsgAMGrantGuestPasses2Response.$Properties} message CMsgAMGrantGuestPasses2Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2Response.encode = function encode(message, writer) { + CMsgAMGrantGuestPasses2Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); - if (message.passes_granted != null && Object.hasOwnProperty.call(message, "passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.passes_granted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11852,12 +15367,12 @@ * @function encodeDelimited * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response} message CMsgAMGrantGuestPasses2Response message or plain object to encode + * @param {CMsgAMGrantGuestPasses2Response.$Properties} message CMsgAMGrantGuestPasses2Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGrantGuestPasses2Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11867,28 +15382,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response + * @returns {CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape} CMsgAMGrantGuestPasses2Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2Response.decode = function decode(reader, length) { + CMsgAMGrantGuestPasses2Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGrantGuestPasses2Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGrantGuestPasses2Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - case 2: - message.passes_granted = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.passes_granted = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11898,11 +15433,11 @@ * @memberof CMsgAMGrantGuestPasses2Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response + * @returns {CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape} CMsgAMGrantGuestPasses2Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2Response.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGrantGuestPasses2Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11916,13 +15451,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGrantGuestPasses2Response.verify = function verify(message) { + CMsgAMGrantGuestPasses2Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.passes_granted != null && message.hasOwnProperty("passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) if (!$util.isInteger(message.passes_granted)) return "passes_granted: integer expected"; return null; @@ -11936,9 +15475,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response */ - CMsgAMGrantGuestPasses2Response.fromObject = function fromObject(object) { + CMsgAMGrantGuestPasses2Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGrantGuestPasses2Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGrantGuestPasses2Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGrantGuestPasses2Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -11956,30 +15501,48 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGrantGuestPasses2Response.toObject = function toObject(message, options) { + CMsgAMGrantGuestPasses2Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.passes_granted = 0; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.passes_granted != null && message.hasOwnProperty("passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) object.passes_granted = message.passes_granted; return object; }; /** - * Converts this CMsgAMGrantGuestPasses2Response to JSON. - * @function toJSON + * Converts this CMsgAMGrantGuestPasses2Response to JSON. + * @function toJSON + * @memberof CMsgAMGrantGuestPasses2Response + * @instance + * @returns {Object.} JSON object + */ + CMsgAMGrantGuestPasses2Response.prototype.toJSON = function() { + return CMsgAMGrantGuestPasses2Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGrantGuestPasses2Response + * @function getTypeUrl * @memberof CMsgAMGrantGuestPasses2Response - * @instance - * @returns {Object.} JSON object + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url */ - CMsgAMGrantGuestPasses2Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGrantGuestPasses2Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGrantGuestPasses2Response"; }; return CMsgAMGrantGuestPasses2Response; @@ -11989,26 +15552,39 @@ /** * Properties of a CGCSystemMsg_GetAccountDetails. - * @exports ICGCSystemMsg_GetAccountDetails - * @interface ICGCSystemMsg_GetAccountDetails + * @typedef {Object} CGCSystemMsg_GetAccountDetails.$Properties * @property {number|Long|null} [steamid] CGCSystemMsg_GetAccountDetails steamid * @property {number|null} [appid] CGCSystemMsg_GetAccountDetails appid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetAccountDetails. + * @exports ICGCSystemMsg_GetAccountDetails + * @interface ICGCSystemMsg_GetAccountDetails + * @augments CGCSystemMsg_GetAccountDetails.$Properties + * @deprecated Use CGCSystemMsg_GetAccountDetails.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetAccountDetails. + * @typedef {CGCSystemMsg_GetAccountDetails.$Properties} CGCSystemMsg_GetAccountDetails.$Shape */ /** * Constructs a new CGCSystemMsg_GetAccountDetails. * @exports CGCSystemMsg_GetAccountDetails * @classdesc Represents a CGCSystemMsg_GetAccountDetails. - * @implements ICGCSystemMsg_GetAccountDetails * @constructor - * @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetAccountDetails(properties) { + var CGCSystemMsg_GetAccountDetails = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetAccountDetails steamid. @@ -12016,7 +15592,7 @@ * @memberof CGCSystemMsg_GetAccountDetails * @instance */ - CGCSystemMsg_GetAccountDetails.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCSystemMsg_GetAccountDetails.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CGCSystemMsg_GetAccountDetails appid. @@ -12031,10 +15607,14 @@ * @function create * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails instance + * @type {{ + * (properties: CGCSystemMsg_GetAccountDetails.$Shape): CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape; + * (properties?: CGCSystemMsg_GetAccountDetails.$Properties): CGCSystemMsg_GetAccountDetails; + * }} */ - CGCSystemMsg_GetAccountDetails.create = function create(properties) { + CGCSystemMsg_GetAccountDetails.create = function(properties) { return new CGCSystemMsg_GetAccountDetails(properties); }; @@ -12043,17 +15623,24 @@ * @function encode * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails} message CGCSystemMsg_GetAccountDetails message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails.$Properties} message CGCSystemMsg_GetAccountDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails.encode = function encode(message, writer) { + CGCSystemMsg_GetAccountDetails.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12062,12 +15649,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails} message CGCSystemMsg_GetAccountDetails message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails.$Properties} message CGCSystemMsg_GetAccountDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetAccountDetails.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12077,28 +15664,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails + * @returns {CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape} CGCSystemMsg_GetAccountDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails.decode = function decode(reader, length) { + CGCSystemMsg_GetAccountDetails.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetAccountDetails(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetAccountDetails(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12108,11 +15715,11 @@ * @memberof CGCSystemMsg_GetAccountDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails + * @returns {CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape} CGCSystemMsg_GetAccountDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetAccountDetails.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12126,13 +15733,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetAccountDetails.verify = function verify(message) { + CGCSystemMsg_GetAccountDetails.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; return null; @@ -12146,19 +15757,25 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails */ - CGCSystemMsg_GetAccountDetails.fromObject = function fromObject(object) { + CGCSystemMsg_GetAccountDetails.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetAccountDetails) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetAccountDetails: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetAccountDetails(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; return message; @@ -12173,24 +15790,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetAccountDetails.toObject = function toObject(message, options) { + CGCSystemMsg_GetAccountDetails.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; return object; }; @@ -12202,8 +15825,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetAccountDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetAccountDetails.prototype.toJSON = function() { + return CGCSystemMsg_GetAccountDetails.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetAccountDetails + * @function getTypeUrl + * @memberof CGCSystemMsg_GetAccountDetails + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetAccountDetails.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetAccountDetails"; }; return CGCSystemMsg_GetAccountDetails; @@ -12213,8 +15850,7 @@ /** * Properties of a CGCSystemMsg_GetAccountDetails_Response. - * @exports ICGCSystemMsg_GetAccountDetails_Response - * @interface ICGCSystemMsg_GetAccountDetails_Response + * @typedef {Object} CGCSystemMsg_GetAccountDetails_Response.$Properties * @property {number|null} [eresult_deprecated] CGCSystemMsg_GetAccountDetails_Response eresult_deprecated * @property {string|null} [account_name] CGCSystemMsg_GetAccountDetails_Response account_name * @property {string|null} [persona_name] CGCSystemMsg_GetAccountDetails_Response persona_name @@ -12249,22 +15885,36 @@ * @property {number|null} [rt_identity_linked] CGCSystemMsg_GetAccountDetails_Response rt_identity_linked * @property {number|null} [rt_birth_date] CGCSystemMsg_GetAccountDetails_Response rt_birth_date * @property {string|null} [txn_country_code] CGCSystemMsg_GetAccountDetails_Response txn_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetAccountDetails_Response. + * @exports ICGCSystemMsg_GetAccountDetails_Response + * @interface ICGCSystemMsg_GetAccountDetails_Response + * @augments CGCSystemMsg_GetAccountDetails_Response.$Properties + * @deprecated Use CGCSystemMsg_GetAccountDetails_Response.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetAccountDetails_Response. + * @typedef {CGCSystemMsg_GetAccountDetails_Response.$Properties} CGCSystemMsg_GetAccountDetails_Response.$Shape */ /** * Constructs a new CGCSystemMsg_GetAccountDetails_Response. * @exports CGCSystemMsg_GetAccountDetails_Response * @classdesc Represents a CGCSystemMsg_GetAccountDetails_Response. - * @implements ICGCSystemMsg_GetAccountDetails_Response * @constructor - * @param {ICGCSystemMsg_GetAccountDetails_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetAccountDetails_Response(properties) { + var CGCSystemMsg_GetAccountDetails_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetAccountDetails_Response eresult_deprecated. @@ -12543,10 +16193,14 @@ * @function create * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response instance + * @type {{ + * (properties: CGCSystemMsg_GetAccountDetails_Response.$Shape): CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape; + * (properties?: CGCSystemMsg_GetAccountDetails_Response.$Properties): CGCSystemMsg_GetAccountDetails_Response; + * }} */ - CGCSystemMsg_GetAccountDetails_Response.create = function create(properties) { + CGCSystemMsg_GetAccountDetails_Response.create = function(properties) { return new CGCSystemMsg_GetAccountDetails_Response(properties); }; @@ -12555,81 +16209,88 @@ * @function encode * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails_Response.encode = function encode(message, writer) { + CGCSystemMsg_GetAccountDetails_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult_deprecated != null && Object.hasOwnProperty.call(message, "eresult_deprecated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult_deprecated); - if (message.account_name != null && Object.hasOwnProperty.call(message, "account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.account_name); - if (message.persona_name != null && Object.hasOwnProperty.call(message, "persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.persona_name); - if (message.is_profile_public != null && Object.hasOwnProperty.call(message, "is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_profile_public); - if (message.is_inventory_public != null && Object.hasOwnProperty.call(message, "is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_inventory_public); - if (message.is_vac_banned != null && Object.hasOwnProperty.call(message, "is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.is_vac_banned); - if (message.is_cyber_cafe != null && Object.hasOwnProperty.call(message, "is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.is_cyber_cafe); - if (message.is_school_account != null && Object.hasOwnProperty.call(message, "is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.is_school_account); - if (message.is_limited != null && Object.hasOwnProperty.call(message, "is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.is_limited); - if (message.is_subscribed != null && Object.hasOwnProperty.call(message, "is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.is_subscribed); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message["package"]); - if (message.is_free_trial_account != null && Object.hasOwnProperty.call(message, "is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) writer.uint32(/* id 13, wireType 0 =*/104).bool(message.is_free_trial_account); - if (message.free_trial_expiration != null && Object.hasOwnProperty.call(message, "free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.free_trial_expiration); - if (message.is_low_violence != null && Object.hasOwnProperty.call(message, "is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) writer.uint32(/* id 15, wireType 0 =*/120).bool(message.is_low_violence); - if (message.is_account_locked_down != null && Object.hasOwnProperty.call(message, "is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.is_account_locked_down); - if (message.is_community_banned != null && Object.hasOwnProperty.call(message, "is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.is_community_banned); - if (message.is_trade_banned != null && Object.hasOwnProperty.call(message, "is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.is_trade_banned); - if (message.trade_ban_expiration != null && Object.hasOwnProperty.call(message, "trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.trade_ban_expiration); - if (message.accountid != null && Object.hasOwnProperty.call(message, "accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.accountid); - if (message.suspension_end_time != null && Object.hasOwnProperty.call(message, "suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.suspension_end_time); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) writer.uint32(/* id 22, wireType 2 =*/178).string(message.currency); - if (message.steam_level != null && Object.hasOwnProperty.call(message, "steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.steam_level); - if (message.friend_count != null && Object.hasOwnProperty.call(message, "friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.friend_count); - if (message.account_creation_time != null && Object.hasOwnProperty.call(message, "account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.account_creation_time); - if (message.is_steamguard_enabled != null && Object.hasOwnProperty.call(message, "is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.is_steamguard_enabled); - if (message.is_phone_verified != null && Object.hasOwnProperty.call(message, "is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) writer.uint32(/* id 28, wireType 0 =*/224).bool(message.is_phone_verified); - if (message.is_two_factor_auth_enabled != null && Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) writer.uint32(/* id 29, wireType 0 =*/232).bool(message.is_two_factor_auth_enabled); - if (message.two_factor_enabled_time != null && Object.hasOwnProperty.call(message, "two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.two_factor_enabled_time); - if (message.phone_verification_time != null && Object.hasOwnProperty.call(message, "phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.phone_verification_time); - if (message.phone_id != null && Object.hasOwnProperty.call(message, "phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) writer.uint32(/* id 33, wireType 0 =*/264).uint64(message.phone_id); - if (message.is_phone_identifying != null && Object.hasOwnProperty.call(message, "is_phone_identifying")) + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) writer.uint32(/* id 34, wireType 0 =*/272).bool(message.is_phone_identifying); - if (message.rt_identity_linked != null && Object.hasOwnProperty.call(message, "rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) writer.uint32(/* id 35, wireType 0 =*/280).uint32(message.rt_identity_linked); - if (message.rt_birth_date != null && Object.hasOwnProperty.call(message, "rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) writer.uint32(/* id 36, wireType 0 =*/288).uint32(message.rt_birth_date); - if (message.txn_country_code != null && Object.hasOwnProperty.call(message, "txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.txn_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12638,12 +16299,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetAccountDetails_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12653,124 +16314,240 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response + * @returns {CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape} CGCSystemMsg_GetAccountDetails_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails_Response.decode = function decode(reader, length) { + CGCSystemMsg_GetAccountDetails_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetAccountDetails_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetAccountDetails_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult_deprecated = reader.uint32(); - break; - case 2: - message.account_name = reader.string(); - break; - case 3: - message.persona_name = reader.string(); - break; - case 4: - message.is_profile_public = reader.bool(); - break; - case 5: - message.is_inventory_public = reader.bool(); - break; - case 7: - message.is_vac_banned = reader.bool(); - break; - case 8: - message.is_cyber_cafe = reader.bool(); - break; - case 9: - message.is_school_account = reader.bool(); - break; - case 10: - message.is_limited = reader.bool(); - break; - case 11: - message.is_subscribed = reader.bool(); - break; - case 12: - message["package"] = reader.uint32(); - break; - case 13: - message.is_free_trial_account = reader.bool(); - break; - case 14: - message.free_trial_expiration = reader.uint32(); - break; - case 15: - message.is_low_violence = reader.bool(); - break; - case 16: - message.is_account_locked_down = reader.bool(); - break; - case 17: - message.is_community_banned = reader.bool(); - break; - case 18: - message.is_trade_banned = reader.bool(); - break; - case 19: - message.trade_ban_expiration = reader.uint32(); - break; - case 20: - message.accountid = reader.uint32(); - break; - case 21: - message.suspension_end_time = reader.uint32(); - break; - case 22: - message.currency = reader.string(); - break; - case 23: - message.steam_level = reader.uint32(); - break; - case 24: - message.friend_count = reader.uint32(); - break; - case 25: - message.account_creation_time = reader.uint32(); - break; - case 27: - message.is_steamguard_enabled = reader.bool(); - break; - case 28: - message.is_phone_verified = reader.bool(); - break; - case 29: - message.is_two_factor_auth_enabled = reader.bool(); - break; - case 30: - message.two_factor_enabled_time = reader.uint32(); - break; - case 31: - message.phone_verification_time = reader.uint32(); - break; - case 33: - message.phone_id = reader.uint64(); - break; - case 34: - message.is_phone_identifying = reader.bool(); - break; - case 35: - message.rt_identity_linked = reader.uint32(); - break; - case 36: - message.rt_birth_date = reader.uint32(); - break; - case 37: - message.txn_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult_deprecated = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.account_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.persona_name = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_profile_public = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_inventory_public = reader.bool(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.is_vac_banned = reader.bool(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.is_cyber_cafe = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.is_school_account = reader.bool(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.is_limited = reader.bool(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.is_subscribed = reader.bool(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message["package"] = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.is_free_trial_account = reader.bool(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.free_trial_expiration = reader.uint32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.is_low_violence = reader.bool(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.is_account_locked_down = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.is_community_banned = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.is_trade_banned = reader.bool(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.trade_ban_expiration = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.accountid = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.suspension_end_time = reader.uint32(); + continue; + } + case 22: { + if (wireType !== 2) + break; + message.currency = reader.string(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.steam_level = reader.uint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.friend_count = reader.uint32(); + continue; + } + case 25: { + if (wireType !== 0) + break; + message.account_creation_time = reader.uint32(); + continue; + } + case 27: { + if (wireType !== 0) + break; + message.is_steamguard_enabled = reader.bool(); + continue; + } + case 28: { + if (wireType !== 0) + break; + message.is_phone_verified = reader.bool(); + continue; + } + case 29: { + if (wireType !== 0) + break; + message.is_two_factor_auth_enabled = reader.bool(); + continue; + } + case 30: { + if (wireType !== 0) + break; + message.two_factor_enabled_time = reader.uint32(); + continue; + } + case 31: { + if (wireType !== 0) + break; + message.phone_verification_time = reader.uint32(); + continue; + } + case 33: { + if (wireType !== 0) + break; + message.phone_id = reader.uint64(); + continue; + } + case 34: { + if (wireType !== 0) + break; + message.is_phone_identifying = reader.bool(); + continue; + } + case 35: { + if (wireType !== 0) + break; + message.rt_identity_linked = reader.uint32(); + continue; + } + case 36: { + if (wireType !== 0) + break; + message.rt_birth_date = reader.uint32(); + continue; + } + case 37: { + if (wireType !== 2) + break; + message.txn_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12780,11 +16557,11 @@ * @memberof CGCSystemMsg_GetAccountDetails_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response + * @returns {CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape} CGCSystemMsg_GetAccountDetails_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails_Response.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetAccountDetails_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12798,109 +16575,113 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetAccountDetails_Response.verify = function verify(message) { + CGCSystemMsg_GetAccountDetails_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) if (!$util.isInteger(message.eresult_deprecated)) return "eresult_deprecated: integer expected"; - if (message.account_name != null && message.hasOwnProperty("account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) if (!$util.isString(message.account_name)) return "account_name: string expected"; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) if (!$util.isString(message.persona_name)) return "persona_name: string expected"; - if (message.is_profile_public != null && message.hasOwnProperty("is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) if (typeof message.is_profile_public !== "boolean") return "is_profile_public: boolean expected"; - if (message.is_inventory_public != null && message.hasOwnProperty("is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) if (typeof message.is_inventory_public !== "boolean") return "is_inventory_public: boolean expected"; - if (message.is_vac_banned != null && message.hasOwnProperty("is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) if (typeof message.is_vac_banned !== "boolean") return "is_vac_banned: boolean expected"; - if (message.is_cyber_cafe != null && message.hasOwnProperty("is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) if (typeof message.is_cyber_cafe !== "boolean") return "is_cyber_cafe: boolean expected"; - if (message.is_school_account != null && message.hasOwnProperty("is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) if (typeof message.is_school_account !== "boolean") return "is_school_account: boolean expected"; - if (message.is_limited != null && message.hasOwnProperty("is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) if (typeof message.is_limited !== "boolean") return "is_limited: boolean expected"; - if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) if (typeof message.is_subscribed !== "boolean") return "is_subscribed: boolean expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) if (!$util.isInteger(message["package"])) return "package: integer expected"; - if (message.is_free_trial_account != null && message.hasOwnProperty("is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) if (typeof message.is_free_trial_account !== "boolean") return "is_free_trial_account: boolean expected"; - if (message.free_trial_expiration != null && message.hasOwnProperty("free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) if (!$util.isInteger(message.free_trial_expiration)) return "free_trial_expiration: integer expected"; - if (message.is_low_violence != null && message.hasOwnProperty("is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) if (typeof message.is_low_violence !== "boolean") return "is_low_violence: boolean expected"; - if (message.is_account_locked_down != null && message.hasOwnProperty("is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) if (typeof message.is_account_locked_down !== "boolean") return "is_account_locked_down: boolean expected"; - if (message.is_community_banned != null && message.hasOwnProperty("is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) if (typeof message.is_community_banned !== "boolean") return "is_community_banned: boolean expected"; - if (message.is_trade_banned != null && message.hasOwnProperty("is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) if (typeof message.is_trade_banned !== "boolean") return "is_trade_banned: boolean expected"; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) if (!$util.isInteger(message.trade_ban_expiration)) return "trade_ban_expiration: integer expected"; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) if (!$util.isInteger(message.accountid)) return "accountid: integer expected"; - if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) if (!$util.isInteger(message.suspension_end_time)) return "suspension_end_time: integer expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) if (!$util.isString(message.currency)) return "currency: string expected"; - if (message.steam_level != null && message.hasOwnProperty("steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) if (!$util.isInteger(message.steam_level)) return "steam_level: integer expected"; - if (message.friend_count != null && message.hasOwnProperty("friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) if (!$util.isInteger(message.friend_count)) return "friend_count: integer expected"; - if (message.account_creation_time != null && message.hasOwnProperty("account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) if (!$util.isInteger(message.account_creation_time)) return "account_creation_time: integer expected"; - if (message.is_steamguard_enabled != null && message.hasOwnProperty("is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) if (typeof message.is_steamguard_enabled !== "boolean") return "is_steamguard_enabled: boolean expected"; - if (message.is_phone_verified != null && message.hasOwnProperty("is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) if (typeof message.is_phone_verified !== "boolean") return "is_phone_verified: boolean expected"; - if (message.is_two_factor_auth_enabled != null && message.hasOwnProperty("is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) if (typeof message.is_two_factor_auth_enabled !== "boolean") return "is_two_factor_auth_enabled: boolean expected"; - if (message.two_factor_enabled_time != null && message.hasOwnProperty("two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) if (!$util.isInteger(message.two_factor_enabled_time)) return "two_factor_enabled_time: integer expected"; - if (message.phone_verification_time != null && message.hasOwnProperty("phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) if (!$util.isInteger(message.phone_verification_time)) return "phone_verification_time: integer expected"; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) if (!$util.isInteger(message.phone_id) && !(message.phone_id && $util.isInteger(message.phone_id.low) && $util.isInteger(message.phone_id.high))) return "phone_id: integer|Long expected"; - if (message.is_phone_identifying != null && message.hasOwnProperty("is_phone_identifying")) + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) if (typeof message.is_phone_identifying !== "boolean") return "is_phone_identifying: boolean expected"; - if (message.rt_identity_linked != null && message.hasOwnProperty("rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) if (!$util.isInteger(message.rt_identity_linked)) return "rt_identity_linked: integer expected"; - if (message.rt_birth_date != null && message.hasOwnProperty("rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) if (!$util.isInteger(message.rt_birth_date)) return "rt_birth_date: integer expected"; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) if (!$util.isString(message.txn_country_code)) return "txn_country_code: string expected"; return null; @@ -12914,44 +16695,50 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response */ - CGCSystemMsg_GetAccountDetails_Response.fromObject = function fromObject(object) { + CGCSystemMsg_GetAccountDetails_Response.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetAccountDetails_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetAccountDetails_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetAccountDetails_Response(); if (object.eresult_deprecated != null) message.eresult_deprecated = object.eresult_deprecated >>> 0; if (object.account_name != null) - message.account_name = String(object.account_name); + message.account_name = $String(object.account_name); if (object.persona_name != null) - message.persona_name = String(object.persona_name); + message.persona_name = $String(object.persona_name); if (object.is_profile_public != null) - message.is_profile_public = Boolean(object.is_profile_public); + message.is_profile_public = $Boolean(object.is_profile_public); if (object.is_inventory_public != null) - message.is_inventory_public = Boolean(object.is_inventory_public); + message.is_inventory_public = $Boolean(object.is_inventory_public); if (object.is_vac_banned != null) - message.is_vac_banned = Boolean(object.is_vac_banned); + message.is_vac_banned = $Boolean(object.is_vac_banned); if (object.is_cyber_cafe != null) - message.is_cyber_cafe = Boolean(object.is_cyber_cafe); + message.is_cyber_cafe = $Boolean(object.is_cyber_cafe); if (object.is_school_account != null) - message.is_school_account = Boolean(object.is_school_account); + message.is_school_account = $Boolean(object.is_school_account); if (object.is_limited != null) - message.is_limited = Boolean(object.is_limited); + message.is_limited = $Boolean(object.is_limited); if (object.is_subscribed != null) - message.is_subscribed = Boolean(object.is_subscribed); + message.is_subscribed = $Boolean(object.is_subscribed); if (object["package"] != null) message["package"] = object["package"] >>> 0; if (object.is_free_trial_account != null) - message.is_free_trial_account = Boolean(object.is_free_trial_account); + message.is_free_trial_account = $Boolean(object.is_free_trial_account); if (object.free_trial_expiration != null) message.free_trial_expiration = object.free_trial_expiration >>> 0; if (object.is_low_violence != null) - message.is_low_violence = Boolean(object.is_low_violence); + message.is_low_violence = $Boolean(object.is_low_violence); if (object.is_account_locked_down != null) - message.is_account_locked_down = Boolean(object.is_account_locked_down); + message.is_account_locked_down = $Boolean(object.is_account_locked_down); if (object.is_community_banned != null) - message.is_community_banned = Boolean(object.is_community_banned); + message.is_community_banned = $Boolean(object.is_community_banned); if (object.is_trade_banned != null) - message.is_trade_banned = Boolean(object.is_trade_banned); + message.is_trade_banned = $Boolean(object.is_trade_banned); if (object.trade_ban_expiration != null) message.trade_ban_expiration = object.trade_ban_expiration >>> 0; if (object.accountid != null) @@ -12959,7 +16746,7 @@ if (object.suspension_end_time != null) message.suspension_end_time = object.suspension_end_time >>> 0; if (object.currency != null) - message.currency = String(object.currency); + message.currency = $String(object.currency); if (object.steam_level != null) message.steam_level = object.steam_level >>> 0; if (object.friend_count != null) @@ -12967,32 +16754,32 @@ if (object.account_creation_time != null) message.account_creation_time = object.account_creation_time >>> 0; if (object.is_steamguard_enabled != null) - message.is_steamguard_enabled = Boolean(object.is_steamguard_enabled); + message.is_steamguard_enabled = $Boolean(object.is_steamguard_enabled); if (object.is_phone_verified != null) - message.is_phone_verified = Boolean(object.is_phone_verified); + message.is_phone_verified = $Boolean(object.is_phone_verified); if (object.is_two_factor_auth_enabled != null) - message.is_two_factor_auth_enabled = Boolean(object.is_two_factor_auth_enabled); + message.is_two_factor_auth_enabled = $Boolean(object.is_two_factor_auth_enabled); if (object.two_factor_enabled_time != null) message.two_factor_enabled_time = object.two_factor_enabled_time >>> 0; if (object.phone_verification_time != null) message.phone_verification_time = object.phone_verification_time >>> 0; if (object.phone_id != null) if ($util.Long) - (message.phone_id = $util.Long.fromValue(object.phone_id)).unsigned = true; + message.phone_id = $util.Long.fromValue(object.phone_id, true); else if (typeof object.phone_id === "string") - message.phone_id = parseInt(object.phone_id, 10); + message.phone_id = $parseInt(object.phone_id, 10); else if (typeof object.phone_id === "number") message.phone_id = object.phone_id; else if (typeof object.phone_id === "object") message.phone_id = new $util.LongBits(object.phone_id.low >>> 0, object.phone_id.high >>> 0).toNumber(true); if (object.is_phone_identifying != null) - message.is_phone_identifying = Boolean(object.is_phone_identifying); + message.is_phone_identifying = $Boolean(object.is_phone_identifying); if (object.rt_identity_linked != null) message.rt_identity_linked = object.rt_identity_linked >>> 0; if (object.rt_birth_date != null) message.rt_birth_date = object.rt_birth_date >>> 0; if (object.txn_country_code != null) - message.txn_country_code = String(object.txn_country_code); + message.txn_country_code = $String(object.txn_country_code); return message; }; @@ -13005,9 +16792,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetAccountDetails_Response.toObject = function toObject(message, options) { + CGCSystemMsg_GetAccountDetails_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult_deprecated = 2; @@ -13041,84 +16832,86 @@ object.phone_verification_time = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.phone_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.phone_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.phone_id = options.longs === String ? "0" : 0; + object.phone_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.is_phone_identifying = false; object.rt_identity_linked = 0; object.rt_birth_date = 0; object.txn_country_code = ""; } - if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated")) + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) object.eresult_deprecated = message.eresult_deprecated; - if (message.account_name != null && message.hasOwnProperty("account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) object.account_name = message.account_name; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) object.persona_name = message.persona_name; - if (message.is_profile_public != null && message.hasOwnProperty("is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) object.is_profile_public = message.is_profile_public; - if (message.is_inventory_public != null && message.hasOwnProperty("is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) object.is_inventory_public = message.is_inventory_public; - if (message.is_vac_banned != null && message.hasOwnProperty("is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) object.is_vac_banned = message.is_vac_banned; - if (message.is_cyber_cafe != null && message.hasOwnProperty("is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) object.is_cyber_cafe = message.is_cyber_cafe; - if (message.is_school_account != null && message.hasOwnProperty("is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) object.is_school_account = message.is_school_account; - if (message.is_limited != null && message.hasOwnProperty("is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) object.is_limited = message.is_limited; - if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) object.is_subscribed = message.is_subscribed; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; - if (message.is_free_trial_account != null && message.hasOwnProperty("is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) object.is_free_trial_account = message.is_free_trial_account; - if (message.free_trial_expiration != null && message.hasOwnProperty("free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) object.free_trial_expiration = message.free_trial_expiration; - if (message.is_low_violence != null && message.hasOwnProperty("is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) object.is_low_violence = message.is_low_violence; - if (message.is_account_locked_down != null && message.hasOwnProperty("is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) object.is_account_locked_down = message.is_account_locked_down; - if (message.is_community_banned != null && message.hasOwnProperty("is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) object.is_community_banned = message.is_community_banned; - if (message.is_trade_banned != null && message.hasOwnProperty("is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) object.is_trade_banned = message.is_trade_banned; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) object.trade_ban_expiration = message.trade_ban_expiration; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) object.accountid = message.accountid; - if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) object.suspension_end_time = message.suspension_end_time; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) object.currency = message.currency; - if (message.steam_level != null && message.hasOwnProperty("steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) object.steam_level = message.steam_level; - if (message.friend_count != null && message.hasOwnProperty("friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) object.friend_count = message.friend_count; - if (message.account_creation_time != null && message.hasOwnProperty("account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) object.account_creation_time = message.account_creation_time; - if (message.is_steamguard_enabled != null && message.hasOwnProperty("is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) object.is_steamguard_enabled = message.is_steamguard_enabled; - if (message.is_phone_verified != null && message.hasOwnProperty("is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) object.is_phone_verified = message.is_phone_verified; - if (message.is_two_factor_auth_enabled != null && message.hasOwnProperty("is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) object.is_two_factor_auth_enabled = message.is_two_factor_auth_enabled; - if (message.two_factor_enabled_time != null && message.hasOwnProperty("two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) object.two_factor_enabled_time = message.two_factor_enabled_time; - if (message.phone_verification_time != null && message.hasOwnProperty("phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) object.phone_verification_time = message.phone_verification_time; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) - if (typeof message.phone_id === "number") - object.phone_id = options.longs === String ? String(message.phone_id) : message.phone_id; + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.phone_id = typeof message.phone_id === "number" ? $BigInt(message.phone_id) : $util.Long.fromBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0, true).toBigInt(); + else if (typeof message.phone_id === "number") + object.phone_id = options.longs === $String ? $String(message.phone_id) : message.phone_id; else - object.phone_id = options.longs === String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; - if (message.is_phone_identifying != null && message.hasOwnProperty("is_phone_identifying")) + object.phone_id = options.longs === $String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === $Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) object.is_phone_identifying = message.is_phone_identifying; - if (message.rt_identity_linked != null && message.hasOwnProperty("rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) object.rt_identity_linked = message.rt_identity_linked; - if (message.rt_birth_date != null && message.hasOwnProperty("rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) object.rt_birth_date = message.rt_birth_date; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) object.txn_country_code = message.txn_country_code; return object; }; @@ -13130,8 +16923,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetAccountDetails_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetAccountDetails_Response.prototype.toJSON = function() { + return CGCSystemMsg_GetAccountDetails_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetAccountDetails_Response + * @function getTypeUrl + * @memberof CGCSystemMsg_GetAccountDetails_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetAccountDetails_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetAccountDetails_Response"; }; return CGCSystemMsg_GetAccountDetails_Response; @@ -13141,26 +16948,39 @@ /** * Properties of a CMsgGCCheckClanMembership. - * @exports ICMsgGCCheckClanMembership - * @interface ICMsgGCCheckClanMembership + * @typedef {Object} CMsgGCCheckClanMembership.$Properties * @property {number|Long|null} [steamid] CMsgGCCheckClanMembership steamid * @property {number|null} [clanid] CMsgGCCheckClanMembership clanid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckClanMembership. + * @exports ICMsgGCCheckClanMembership + * @interface ICMsgGCCheckClanMembership + * @augments CMsgGCCheckClanMembership.$Properties + * @deprecated Use CMsgGCCheckClanMembership.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckClanMembership. + * @typedef {CMsgGCCheckClanMembership.$Properties} CMsgGCCheckClanMembership.$Shape */ /** * Constructs a new CMsgGCCheckClanMembership. * @exports CMsgGCCheckClanMembership * @classdesc Represents a CMsgGCCheckClanMembership. - * @implements ICMsgGCCheckClanMembership * @constructor - * @param {ICMsgGCCheckClanMembership=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckClanMembership(properties) { + var CMsgGCCheckClanMembership = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckClanMembership steamid. @@ -13168,7 +16988,7 @@ * @memberof CMsgGCCheckClanMembership * @instance */ - CMsgGCCheckClanMembership.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckClanMembership.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCCheckClanMembership clanid. @@ -13183,10 +17003,14 @@ * @function create * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership instance + * @type {{ + * (properties: CMsgGCCheckClanMembership.$Shape): CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape; + * (properties?: CMsgGCCheckClanMembership.$Properties): CMsgGCCheckClanMembership; + * }} */ - CMsgGCCheckClanMembership.create = function create(properties) { + CMsgGCCheckClanMembership.create = function(properties) { return new CMsgGCCheckClanMembership(properties); }; @@ -13195,17 +17019,24 @@ * @function encode * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership} message CMsgGCCheckClanMembership message or plain object to encode + * @param {CMsgGCCheckClanMembership.$Properties} message CMsgGCCheckClanMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership.encode = function encode(message, writer) { + CMsgGCCheckClanMembership.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.clanid != null && Object.hasOwnProperty.call(message, "clanid")) + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.clanid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13214,12 +17045,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership} message CMsgGCCheckClanMembership message or plain object to encode + * @param {CMsgGCCheckClanMembership.$Properties} message CMsgGCCheckClanMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckClanMembership.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13229,28 +17060,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership + * @returns {CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape} CMsgGCCheckClanMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership.decode = function decode(reader, length) { + CMsgGCCheckClanMembership.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckClanMembership(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckClanMembership(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.clanid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.clanid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13260,11 +17111,11 @@ * @memberof CMsgGCCheckClanMembership * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership + * @returns {CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape} CMsgGCCheckClanMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckClanMembership.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13278,13 +17129,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckClanMembership.verify = function verify(message) { + CMsgGCCheckClanMembership.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.clanid != null && message.hasOwnProperty("clanid")) + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) if (!$util.isInteger(message.clanid)) return "clanid: integer expected"; return null; @@ -13298,19 +17153,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership */ - CMsgGCCheckClanMembership.fromObject = function fromObject(object) { + CMsgGCCheckClanMembership.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckClanMembership) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckClanMembership: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckClanMembership(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.clanid != null) message.clanid = object.clanid >>> 0; return message; @@ -13325,24 +17186,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckClanMembership.toObject = function toObject(message, options) { + CMsgGCCheckClanMembership.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.clanid = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.clanid != null && message.hasOwnProperty("clanid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) object.clanid = message.clanid; return object; }; @@ -13354,8 +17221,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckClanMembership.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckClanMembership.prototype.toJSON = function() { + return CMsgGCCheckClanMembership.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckClanMembership + * @function getTypeUrl + * @memberof CMsgGCCheckClanMembership + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckClanMembership.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckClanMembership"; }; return CMsgGCCheckClanMembership; @@ -13363,27 +17244,40 @@ $root.CMsgGCCheckClanMembership_Response = (function() { + /** + * Properties of a CMsgGCCheckClanMembership_Response. + * @typedef {Object} CMsgGCCheckClanMembership_Response.$Properties + * @property {boolean|null} [ismember] CMsgGCCheckClanMembership_Response ismember + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCCheckClanMembership_Response. * @exports ICMsgGCCheckClanMembership_Response * @interface ICMsgGCCheckClanMembership_Response - * @property {boolean|null} [ismember] CMsgGCCheckClanMembership_Response ismember + * @augments CMsgGCCheckClanMembership_Response.$Properties + * @deprecated Use CMsgGCCheckClanMembership_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckClanMembership_Response. + * @typedef {CMsgGCCheckClanMembership_Response.$Properties} CMsgGCCheckClanMembership_Response.$Shape */ /** * Constructs a new CMsgGCCheckClanMembership_Response. * @exports CMsgGCCheckClanMembership_Response * @classdesc Represents a CMsgGCCheckClanMembership_Response. - * @implements ICMsgGCCheckClanMembership_Response * @constructor - * @param {ICMsgGCCheckClanMembership_Response=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckClanMembership_Response(properties) { + var CMsgGCCheckClanMembership_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckClanMembership_Response ismember. @@ -13398,10 +17292,14 @@ * @function create * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response instance + * @type {{ + * (properties: CMsgGCCheckClanMembership_Response.$Shape): CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape; + * (properties?: CMsgGCCheckClanMembership_Response.$Properties): CMsgGCCheckClanMembership_Response; + * }} */ - CMsgGCCheckClanMembership_Response.create = function create(properties) { + CMsgGCCheckClanMembership_Response.create = function(properties) { return new CMsgGCCheckClanMembership_Response(properties); }; @@ -13410,15 +17308,22 @@ * @function encode * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response} message CMsgGCCheckClanMembership_Response message or plain object to encode + * @param {CMsgGCCheckClanMembership_Response.$Properties} message CMsgGCCheckClanMembership_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership_Response.encode = function encode(message, writer) { + CMsgGCCheckClanMembership_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ismember != null && Object.hasOwnProperty.call(message, "ismember")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.ismember); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13427,12 +17332,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response} message CMsgGCCheckClanMembership_Response message or plain object to encode + * @param {CMsgGCCheckClanMembership_Response.$Properties} message CMsgGCCheckClanMembership_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckClanMembership_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13442,25 +17347,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response + * @returns {CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape} CMsgGCCheckClanMembership_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership_Response.decode = function decode(reader, length) { + CMsgGCCheckClanMembership_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckClanMembership_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckClanMembership_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ismember = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ismember = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13470,11 +17392,11 @@ * @memberof CMsgGCCheckClanMembership_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response + * @returns {CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape} CMsgGCCheckClanMembership_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckClanMembership_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13488,10 +17410,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckClanMembership_Response.verify = function verify(message) { + CMsgGCCheckClanMembership_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ismember != null && message.hasOwnProperty("ismember")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) if (typeof message.ismember !== "boolean") return "ismember: boolean expected"; return null; @@ -13505,12 +17431,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response */ - CMsgGCCheckClanMembership_Response.fromObject = function fromObject(object) { + CMsgGCCheckClanMembership_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckClanMembership_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckClanMembership_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckClanMembership_Response(); if (object.ismember != null) - message.ismember = Boolean(object.ismember); + message.ismember = $Boolean(object.ismember); return message; }; @@ -13523,13 +17455,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckClanMembership_Response.toObject = function toObject(message, options) { + CMsgGCCheckClanMembership_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.ismember = false; - if (message.ismember != null && message.hasOwnProperty("ismember")) + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) object.ismember = message.ismember; return object; }; @@ -13541,8 +17477,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckClanMembership_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckClanMembership_Response.prototype.toJSON = function() { + return CMsgGCCheckClanMembership_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckClanMembership_Response + * @function getTypeUrl + * @memberof CMsgGCCheckClanMembership_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckClanMembership_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckClanMembership_Response"; }; return CMsgGCCheckClanMembership_Response; @@ -13550,28 +17500,41 @@ $root.CMsgGCGetPersonaNames = (function() { + /** + * Properties of a CMsgGCGetPersonaNames. + * @typedef {Object} CMsgGCGetPersonaNames.$Properties + * @property {Array.|null} [steamids] CMsgGCGetPersonaNames steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPersonaNames. * @exports ICMsgGCGetPersonaNames * @interface ICMsgGCGetPersonaNames - * @property {Array.|null} [steamids] CMsgGCGetPersonaNames steamids + * @augments CMsgGCGetPersonaNames.$Properties + * @deprecated Use CMsgGCGetPersonaNames.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPersonaNames. + * @typedef {CMsgGCGetPersonaNames.$Properties} CMsgGCGetPersonaNames.$Shape */ /** * Constructs a new CMsgGCGetPersonaNames. * @exports CMsgGCGetPersonaNames * @classdesc Represents a CMsgGCGetPersonaNames. - * @implements ICMsgGCGetPersonaNames * @constructor - * @param {ICMsgGCGetPersonaNames=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPersonaNames(properties) { + var CMsgGCGetPersonaNames = function (properties) { this.steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPersonaNames steamids. @@ -13586,10 +17549,14 @@ * @function create * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames instance + * @type {{ + * (properties: CMsgGCGetPersonaNames.$Shape): CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape; + * (properties?: CMsgGCGetPersonaNames.$Properties): CMsgGCGetPersonaNames; + * }} */ - CMsgGCGetPersonaNames.create = function create(properties) { + CMsgGCGetPersonaNames.create = function(properties) { return new CMsgGCGetPersonaNames(properties); }; @@ -13598,16 +17565,23 @@ * @function encode * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames} message CMsgGCGetPersonaNames message or plain object to encode + * @param {CMsgGCGetPersonaNames.$Properties} message CMsgGCGetPersonaNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames.encode = function encode(message, writer) { + CMsgGCGetPersonaNames.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.steamids != null && message.steamids.length) for (var i = 0; i < message.steamids.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13616,12 +17590,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames} message CMsgGCGetPersonaNames message or plain object to encode + * @param {CMsgGCGetPersonaNames.$Properties} message CMsgGCGetPersonaNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPersonaNames.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13631,32 +17605,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames + * @returns {CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape} CMsgGCGetPersonaNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames.decode = function decode(reader, length) { + CMsgGCGetPersonaNames.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.steamids && message.steamids.length)) - message.steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.steamids.push(reader.fixed64()); - } else - message.steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.steamids && message.steamids.length)) + message.steamids = []; + reader.fixed64s(message.steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.steamids && message.steamids.length)) + message.steamids = []; + message.steamids.push(reader.fixed64()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13666,11 +17658,11 @@ * @memberof CMsgGCGetPersonaNames * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames + * @returns {CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape} CMsgGCGetPersonaNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPersonaNames.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13684,11 +17676,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPersonaNames.verify = function verify(message) { + CMsgGCGetPersonaNames.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamids != null && message.hasOwnProperty("steamids")) { - if (!Array.isArray(message.steamids)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamids != null && $Object.hasOwnProperty.call(message, "steamids")) { + if (!$Array.isArray(message.steamids)) return "steamids: array expected"; for (var i = 0; i < message.steamids.length; ++i) if (!$util.isInteger(message.steamids[i]) && !(message.steamids[i] && $util.isInteger(message.steamids[i].low) && $util.isInteger(message.steamids[i].high))) @@ -13705,23 +17701,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames */ - CMsgGCGetPersonaNames.fromObject = function fromObject(object) { + CMsgGCGetPersonaNames.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames(); if (object.steamids) { - if (!Array.isArray(object.steamids)) - throw TypeError(".CMsgGCGetPersonaNames.steamids: array expected"); - message.steamids = []; + if (!$Array.isArray(object.steamids)) + throw $TypeError(".CMsgGCGetPersonaNames.steamids: array expected"); + message.steamids = $Array(object.steamids.length); for (var i = 0; i < object.steamids.length; ++i) if ($util.Long) - (message.steamids[i] = $util.Long.fromValue(object.steamids[i])).unsigned = false; + message.steamids[i] = $util.Long.fromValue(object.steamids[i], true); else if (typeof object.steamids[i] === "string") - message.steamids[i] = parseInt(object.steamids[i], 10); + message.steamids[i] = $parseInt(object.steamids[i], 10); else if (typeof object.steamids[i] === "number") message.steamids[i] = object.steamids[i]; else if (typeof object.steamids[i] === "object") - message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(); + message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -13735,19 +17737,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPersonaNames.toObject = function toObject(message, options) { + CMsgGCGetPersonaNames.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.steamids = []; if (message.steamids && message.steamids.length) { - object.steamids = []; + object.steamids = $Array(message.steamids.length); for (var j = 0; j < message.steamids.length; ++j) - if (typeof message.steamids[j] === "number") - object.steamids[j] = options.longs === String ? String(message.steamids[j]) : message.steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamids[j] = typeof message.steamids[j] === "number" ? $BigInt(message.steamids[j]) : $util.Long.fromBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.steamids[j] === "number") + object.steamids[j] = options.longs === $String ? $String(message.steamids[j]) : message.steamids[j]; else - object.steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber() : message.steamids[j]; + object.steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === $Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber(true) : message.steamids[j]; } return object; }; @@ -13756,11 +17764,25 @@ * Converts this CMsgGCGetPersonaNames to JSON. * @function toJSON * @memberof CMsgGCGetPersonaNames - * @instance - * @returns {Object.} JSON object + * @instance + * @returns {Object.} JSON object + */ + CMsgGCGetPersonaNames.prototype.toJSON = function() { + return CMsgGCGetPersonaNames.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPersonaNames + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url */ - CMsgGCGetPersonaNames.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPersonaNames.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames"; }; return CMsgGCGetPersonaNames; @@ -13768,34 +17790,47 @@ $root.CMsgGCGetPersonaNames_Response = (function() { + /** + * Properties of a CMsgGCGetPersonaNames_Response. + * @typedef {Object} CMsgGCGetPersonaNames_Response.$Properties + * @property {Array.|null} [succeeded_lookups] CMsgGCGetPersonaNames_Response succeeded_lookups + * @property {Array.|null} [failed_lookup_steamids] CMsgGCGetPersonaNames_Response failed_lookup_steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPersonaNames_Response. * @exports ICMsgGCGetPersonaNames_Response * @interface ICMsgGCGetPersonaNames_Response - * @property {Array.|null} [succeeded_lookups] CMsgGCGetPersonaNames_Response succeeded_lookups - * @property {Array.|null} [failed_lookup_steamids] CMsgGCGetPersonaNames_Response failed_lookup_steamids + * @augments CMsgGCGetPersonaNames_Response.$Properties + * @deprecated Use CMsgGCGetPersonaNames_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPersonaNames_Response. + * @typedef {CMsgGCGetPersonaNames_Response.$Properties} CMsgGCGetPersonaNames_Response.$Shape */ /** * Constructs a new CMsgGCGetPersonaNames_Response. * @exports CMsgGCGetPersonaNames_Response * @classdesc Represents a CMsgGCGetPersonaNames_Response. - * @implements ICMsgGCGetPersonaNames_Response * @constructor - * @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPersonaNames_Response(properties) { + var CMsgGCGetPersonaNames_Response = function (properties) { this.succeeded_lookups = []; this.failed_lookup_steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPersonaNames_Response succeeded_lookups. - * @member {Array.} succeeded_lookups + * @member {Array.} succeeded_lookups * @memberof CMsgGCGetPersonaNames_Response * @instance */ @@ -13814,10 +17849,14 @@ * @function create * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response instance + * @type {{ + * (properties: CMsgGCGetPersonaNames_Response.$Shape): CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape; + * (properties?: CMsgGCGetPersonaNames_Response.$Properties): CMsgGCGetPersonaNames_Response; + * }} */ - CMsgGCGetPersonaNames_Response.create = function create(properties) { + CMsgGCGetPersonaNames_Response.create = function(properties) { return new CMsgGCGetPersonaNames_Response(properties); }; @@ -13826,19 +17865,26 @@ * @function encode * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response} message CMsgGCGetPersonaNames_Response message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.$Properties} message CMsgGCGetPersonaNames_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames_Response.encode = function encode(message, writer) { + CMsgGCGetPersonaNames_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.succeeded_lookups != null && message.succeeded_lookups.length) for (var i = 0; i < message.succeeded_lookups.length; ++i) - $root.CMsgGCGetPersonaNames_Response.PersonaName.encode(message.succeeded_lookups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCGetPersonaNames_Response.PersonaName.encode(message.succeeded_lookups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); if (message.failed_lookup_steamids != null && message.failed_lookup_steamids.length) for (var i = 0; i < message.failed_lookup_steamids.length; ++i) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.failed_lookup_steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13847,12 +17893,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response} message CMsgGCGetPersonaNames_Response message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.$Properties} message CMsgGCGetPersonaNames_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPersonaNames_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13862,37 +17908,58 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response + * @returns {CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape} CMsgGCGetPersonaNames_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames_Response.decode = function decode(reader, length) { + CMsgGCGetPersonaNames_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.succeeded_lookups && message.succeeded_lookups.length)) - message.succeeded_lookups = []; - message.succeeded_lookups.push($root.CMsgGCGetPersonaNames_Response.PersonaName.decode(reader, reader.uint32())); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) - message.failed_lookup_steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.failed_lookup_steamids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.succeeded_lookups && message.succeeded_lookups.length)) + message.succeeded_lookups = []; + message.succeeded_lookups.push($root.CMsgGCGetPersonaNames_Response.PersonaName.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) + message.failed_lookup_steamids = []; + reader.fixed64s(message.failed_lookup_steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) + message.failed_lookup_steamids = []; message.failed_lookup_steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13902,11 +17969,11 @@ * @memberof CMsgGCGetPersonaNames_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response + * @returns {CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape} CMsgGCGetPersonaNames_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPersonaNames_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13920,20 +17987,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPersonaNames_Response.verify = function verify(message) { + CMsgGCGetPersonaNames_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.succeeded_lookups != null && message.hasOwnProperty("succeeded_lookups")) { - if (!Array.isArray(message.succeeded_lookups)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.succeeded_lookups != null && $Object.hasOwnProperty.call(message, "succeeded_lookups")) { + if (!$Array.isArray(message.succeeded_lookups)) return "succeeded_lookups: array expected"; for (var i = 0; i < message.succeeded_lookups.length; ++i) { - var error = $root.CMsgGCGetPersonaNames_Response.PersonaName.verify(message.succeeded_lookups[i]); + var error = $root.CMsgGCGetPersonaNames_Response.PersonaName.verify(message.succeeded_lookups[i], _depth + 1); if (error) return "succeeded_lookups." + error; } } - if (message.failed_lookup_steamids != null && message.hasOwnProperty("failed_lookup_steamids")) { - if (!Array.isArray(message.failed_lookup_steamids)) + if (message.failed_lookup_steamids != null && $Object.hasOwnProperty.call(message, "failed_lookup_steamids")) { + if (!$Array.isArray(message.failed_lookup_steamids)) return "failed_lookup_steamids: array expected"; for (var i = 0; i < message.failed_lookup_steamids.length; ++i) if (!$util.isInteger(message.failed_lookup_steamids[i]) && !(message.failed_lookup_steamids[i] && $util.isInteger(message.failed_lookup_steamids[i].low) && $util.isInteger(message.failed_lookup_steamids[i].high))) @@ -13950,33 +18021,39 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response */ - CMsgGCGetPersonaNames_Response.fromObject = function fromObject(object) { + CMsgGCGetPersonaNames_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames_Response(); if (object.succeeded_lookups) { - if (!Array.isArray(object.succeeded_lookups)) - throw TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: array expected"); - message.succeeded_lookups = []; + if (!$Array.isArray(object.succeeded_lookups)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: array expected"); + message.succeeded_lookups = $Array(object.succeeded_lookups.length); for (var i = 0; i < object.succeeded_lookups.length; ++i) { - if (typeof object.succeeded_lookups[i] !== "object") - throw TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: object expected"); - message.succeeded_lookups[i] = $root.CMsgGCGetPersonaNames_Response.PersonaName.fromObject(object.succeeded_lookups[i]); + if (!$util.isObject(object.succeeded_lookups[i])) + throw $TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: object expected"); + message.succeeded_lookups[i] = $root.CMsgGCGetPersonaNames_Response.PersonaName.fromObject(object.succeeded_lookups[i], _depth + 1); } } if (object.failed_lookup_steamids) { - if (!Array.isArray(object.failed_lookup_steamids)) - throw TypeError(".CMsgGCGetPersonaNames_Response.failed_lookup_steamids: array expected"); - message.failed_lookup_steamids = []; + if (!$Array.isArray(object.failed_lookup_steamids)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.failed_lookup_steamids: array expected"); + message.failed_lookup_steamids = $Array(object.failed_lookup_steamids.length); for (var i = 0; i < object.failed_lookup_steamids.length; ++i) if ($util.Long) - (message.failed_lookup_steamids[i] = $util.Long.fromValue(object.failed_lookup_steamids[i])).unsigned = false; + message.failed_lookup_steamids[i] = $util.Long.fromValue(object.failed_lookup_steamids[i], true); else if (typeof object.failed_lookup_steamids[i] === "string") - message.failed_lookup_steamids[i] = parseInt(object.failed_lookup_steamids[i], 10); + message.failed_lookup_steamids[i] = $parseInt(object.failed_lookup_steamids[i], 10); else if (typeof object.failed_lookup_steamids[i] === "number") message.failed_lookup_steamids[i] = object.failed_lookup_steamids[i]; else if (typeof object.failed_lookup_steamids[i] === "object") - message.failed_lookup_steamids[i] = new $util.LongBits(object.failed_lookup_steamids[i].low >>> 0, object.failed_lookup_steamids[i].high >>> 0).toNumber(); + message.failed_lookup_steamids[i] = new $util.LongBits(object.failed_lookup_steamids[i].low >>> 0, object.failed_lookup_steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -13990,26 +18067,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPersonaNames_Response.toObject = function toObject(message, options) { + CMsgGCGetPersonaNames_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.succeeded_lookups = []; object.failed_lookup_steamids = []; } if (message.succeeded_lookups && message.succeeded_lookups.length) { - object.succeeded_lookups = []; + object.succeeded_lookups = $Array(message.succeeded_lookups.length); for (var j = 0; j < message.succeeded_lookups.length; ++j) - object.succeeded_lookups[j] = $root.CMsgGCGetPersonaNames_Response.PersonaName.toObject(message.succeeded_lookups[j], options); + object.succeeded_lookups[j] = $root.CMsgGCGetPersonaNames_Response.PersonaName.toObject(message.succeeded_lookups[j], options, _depth + 1); } if (message.failed_lookup_steamids && message.failed_lookup_steamids.length) { - object.failed_lookup_steamids = []; + object.failed_lookup_steamids = $Array(message.failed_lookup_steamids.length); for (var j = 0; j < message.failed_lookup_steamids.length; ++j) - if (typeof message.failed_lookup_steamids[j] === "number") - object.failed_lookup_steamids[j] = options.longs === String ? String(message.failed_lookup_steamids[j]) : message.failed_lookup_steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.failed_lookup_steamids[j] = typeof message.failed_lookup_steamids[j] === "number" ? $BigInt(message.failed_lookup_steamids[j]) : $util.Long.fromBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.failed_lookup_steamids[j] === "number") + object.failed_lookup_steamids[j] = options.longs === $String ? $String(message.failed_lookup_steamids[j]) : message.failed_lookup_steamids[j]; else - object.failed_lookup_steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.failed_lookup_steamids[j]) : options.longs === Number ? new $util.LongBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0).toNumber() : message.failed_lookup_steamids[j]; + object.failed_lookup_steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.failed_lookup_steamids[j]) : options.longs === $Number ? new $util.LongBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0).toNumber(true) : message.failed_lookup_steamids[j]; } return object; }; @@ -14021,34 +18104,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPersonaNames_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPersonaNames_Response.prototype.toJSON = function() { + return CMsgGCGetPersonaNames_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPersonaNames_Response + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPersonaNames_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames_Response"; }; CMsgGCGetPersonaNames_Response.PersonaName = (function() { /** * Properties of a PersonaName. - * @memberof CMsgGCGetPersonaNames_Response - * @interface IPersonaName + * @typedef {Object} CMsgGCGetPersonaNames_Response.PersonaName.$Properties * @property {number|Long|null} [steamid] PersonaName steamid * @property {string|null} [persona_name] PersonaName persona_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PersonaName. + * @memberof CMsgGCGetPersonaNames_Response + * @interface IPersonaName + * @augments CMsgGCGetPersonaNames_Response.PersonaName.$Properties + * @deprecated Use CMsgGCGetPersonaNames_Response.PersonaName.$Properties instead. + */ + + /** + * Shape of a PersonaName. + * @typedef {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} CMsgGCGetPersonaNames_Response.PersonaName.$Shape */ /** * Constructs a new PersonaName. * @memberof CMsgGCGetPersonaNames_Response * @classdesc Represents a PersonaName. - * @implements IPersonaName * @constructor - * @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PersonaName(properties) { + var PersonaName = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PersonaName steamid. @@ -14056,7 +18166,7 @@ * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @instance */ - PersonaName.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PersonaName.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * PersonaName persona_name. @@ -14071,10 +18181,14 @@ * @function create * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName instance + * @type {{ + * (properties: CMsgGCGetPersonaNames_Response.PersonaName.$Shape): CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape; + * (properties?: CMsgGCGetPersonaNames_Response.PersonaName.$Properties): CMsgGCGetPersonaNames_Response.PersonaName; + * }} */ - PersonaName.create = function create(properties) { + PersonaName.create = function(properties) { return new PersonaName(properties); }; @@ -14083,17 +18197,24 @@ * @function encode * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName} message PersonaName message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} message PersonaName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaName.encode = function encode(message, writer) { + PersonaName.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.persona_name != null && Object.hasOwnProperty.call(message, "persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.persona_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14102,12 +18223,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName} message PersonaName message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} message PersonaName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PersonaName.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14117,28 +18238,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName + * @returns {CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape} PersonaName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaName.decode = function decode(reader, length) { + PersonaName.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames_Response.PersonaName(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames_Response.PersonaName(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.persona_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.persona_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14148,11 +18289,11 @@ * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName + * @returns {CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape} PersonaName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaName.decodeDelimited = function decodeDelimited(reader) { + PersonaName.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14166,13 +18307,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PersonaName.verify = function verify(message) { + PersonaName.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) if (!$util.isString(message.persona_name)) return "persona_name: string expected"; return null; @@ -14186,21 +18331,27 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName */ - PersonaName.fromObject = function fromObject(object) { + PersonaName.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames_Response.PersonaName) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.PersonaName: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames_Response.PersonaName(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.persona_name != null) - message.persona_name = String(object.persona_name); + message.persona_name = $String(object.persona_name); return message; }; @@ -14213,24 +18364,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PersonaName.toObject = function toObject(message, options) { + PersonaName.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.persona_name = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) object.persona_name = message.persona_name; return object; }; @@ -14242,8 +18399,22 @@ * @instance * @returns {Object.} JSON object */ - PersonaName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PersonaName.prototype.toJSON = function() { + return PersonaName.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PersonaName + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames_Response.PersonaName + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PersonaName.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames_Response.PersonaName"; }; return PersonaName; @@ -14256,26 +18427,39 @@ /** * Properties of a CMsgGCCheckFriendship. - * @exports ICMsgGCCheckFriendship - * @interface ICMsgGCCheckFriendship + * @typedef {Object} CMsgGCCheckFriendship.$Properties * @property {number|Long|null} [steamid_left] CMsgGCCheckFriendship steamid_left * @property {number|Long|null} [steamid_right] CMsgGCCheckFriendship steamid_right + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckFriendship. + * @exports ICMsgGCCheckFriendship + * @interface ICMsgGCCheckFriendship + * @augments CMsgGCCheckFriendship.$Properties + * @deprecated Use CMsgGCCheckFriendship.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckFriendship. + * @typedef {CMsgGCCheckFriendship.$Properties} CMsgGCCheckFriendship.$Shape */ /** * Constructs a new CMsgGCCheckFriendship. * @exports CMsgGCCheckFriendship * @classdesc Represents a CMsgGCCheckFriendship. - * @implements ICMsgGCCheckFriendship * @constructor - * @param {ICMsgGCCheckFriendship=} [properties] Properties to set + * @param {CMsgGCCheckFriendship.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckFriendship(properties) { + var CMsgGCCheckFriendship = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckFriendship steamid_left. @@ -14283,7 +18467,7 @@ * @memberof CMsgGCCheckFriendship * @instance */ - CMsgGCCheckFriendship.prototype.steamid_left = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckFriendship.prototype.steamid_left = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCCheckFriendship steamid_right. @@ -14291,17 +18475,21 @@ * @memberof CMsgGCCheckFriendship * @instance */ - CMsgGCCheckFriendship.prototype.steamid_right = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckFriendship.prototype.steamid_right = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCCheckFriendship instance using the specified properties. * @function create * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship=} [properties] Properties to set + * @param {CMsgGCCheckFriendship.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship instance + * @type {{ + * (properties: CMsgGCCheckFriendship.$Shape): CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape; + * (properties?: CMsgGCCheckFriendship.$Properties): CMsgGCCheckFriendship; + * }} */ - CMsgGCCheckFriendship.create = function create(properties) { + CMsgGCCheckFriendship.create = function(properties) { return new CMsgGCCheckFriendship(properties); }; @@ -14310,17 +18498,24 @@ * @function encode * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship} message CMsgGCCheckFriendship message or plain object to encode + * @param {CMsgGCCheckFriendship.$Properties} message CMsgGCCheckFriendship message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship.encode = function encode(message, writer) { + CMsgGCCheckFriendship.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid_left != null && Object.hasOwnProperty.call(message, "steamid_left")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid_left); - if (message.steamid_right != null && Object.hasOwnProperty.call(message, "steamid_right")) + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.steamid_right); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14329,12 +18524,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship} message CMsgGCCheckFriendship message or plain object to encode + * @param {CMsgGCCheckFriendship.$Properties} message CMsgGCCheckFriendship message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckFriendship.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14344,28 +18539,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship + * @returns {CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape} CMsgGCCheckFriendship * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship.decode = function decode(reader, length) { + CMsgGCCheckFriendship.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckFriendship(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckFriendship(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid_left = reader.fixed64(); - break; - case 2: - message.steamid_right = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid_left = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.steamid_right = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14375,11 +18590,11 @@ * @memberof CMsgGCCheckFriendship * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship + * @returns {CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape} CMsgGCCheckFriendship * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckFriendship.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14393,13 +18608,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckFriendship.verify = function verify(message) { + CMsgGCCheckFriendship.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid_left != null && message.hasOwnProperty("steamid_left")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) if (!$util.isInteger(message.steamid_left) && !(message.steamid_left && $util.isInteger(message.steamid_left.low) && $util.isInteger(message.steamid_left.high))) return "steamid_left: integer|Long expected"; - if (message.steamid_right != null && message.hasOwnProperty("steamid_right")) + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) if (!$util.isInteger(message.steamid_right) && !(message.steamid_right && $util.isInteger(message.steamid_right.low) && $util.isInteger(message.steamid_right.high))) return "steamid_right: integer|Long expected"; return null; @@ -14413,28 +18632,34 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship */ - CMsgGCCheckFriendship.fromObject = function fromObject(object) { + CMsgGCCheckFriendship.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckFriendship) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckFriendship: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckFriendship(); if (object.steamid_left != null) if ($util.Long) - (message.steamid_left = $util.Long.fromValue(object.steamid_left)).unsigned = false; + message.steamid_left = $util.Long.fromValue(object.steamid_left, true); else if (typeof object.steamid_left === "string") - message.steamid_left = parseInt(object.steamid_left, 10); + message.steamid_left = $parseInt(object.steamid_left, 10); else if (typeof object.steamid_left === "number") message.steamid_left = object.steamid_left; else if (typeof object.steamid_left === "object") - message.steamid_left = new $util.LongBits(object.steamid_left.low >>> 0, object.steamid_left.high >>> 0).toNumber(); + message.steamid_left = new $util.LongBits(object.steamid_left.low >>> 0, object.steamid_left.high >>> 0).toNumber(true); if (object.steamid_right != null) if ($util.Long) - (message.steamid_right = $util.Long.fromValue(object.steamid_right)).unsigned = false; + message.steamid_right = $util.Long.fromValue(object.steamid_right, true); else if (typeof object.steamid_right === "string") - message.steamid_right = parseInt(object.steamid_right, 10); + message.steamid_right = $parseInt(object.steamid_right, 10); else if (typeof object.steamid_right === "number") message.steamid_right = object.steamid_right; else if (typeof object.steamid_right === "object") - message.steamid_right = new $util.LongBits(object.steamid_right.low >>> 0, object.steamid_right.high >>> 0).toNumber(); + message.steamid_right = new $util.LongBits(object.steamid_right.low >>> 0, object.steamid_right.high >>> 0).toNumber(true); return message; }; @@ -14447,32 +18672,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckFriendship.toObject = function toObject(message, options) { + CMsgGCCheckFriendship.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid_left = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid_left = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid_left = options.longs === String ? "0" : 0; + object.steamid_left = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid_right = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid_right = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid_right = options.longs === String ? "0" : 0; + object.steamid_right = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steamid_left != null && message.hasOwnProperty("steamid_left")) - if (typeof message.steamid_left === "number") - object.steamid_left = options.longs === String ? String(message.steamid_left) : message.steamid_left; + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid_left = typeof message.steamid_left === "number" ? $BigInt(message.steamid_left) : $util.Long.fromBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0, true).toBigInt(); + else if (typeof message.steamid_left === "number") + object.steamid_left = options.longs === $String ? $String(message.steamid_left) : message.steamid_left; else - object.steamid_left = options.longs === String ? $util.Long.prototype.toString.call(message.steamid_left) : options.longs === Number ? new $util.LongBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0).toNumber() : message.steamid_left; - if (message.steamid_right != null && message.hasOwnProperty("steamid_right")) - if (typeof message.steamid_right === "number") - object.steamid_right = options.longs === String ? String(message.steamid_right) : message.steamid_right; + object.steamid_left = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid_left) : options.longs === $Number ? new $util.LongBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0).toNumber(true) : message.steamid_left; + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid_right = typeof message.steamid_right === "number" ? $BigInt(message.steamid_right) : $util.Long.fromBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0, true).toBigInt(); + else if (typeof message.steamid_right === "number") + object.steamid_right = options.longs === $String ? $String(message.steamid_right) : message.steamid_right; else - object.steamid_right = options.longs === String ? $util.Long.prototype.toString.call(message.steamid_right) : options.longs === Number ? new $util.LongBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0).toNumber() : message.steamid_right; + object.steamid_right = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid_right) : options.longs === $Number ? new $util.LongBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0).toNumber(true) : message.steamid_right; return object; }; @@ -14483,8 +18716,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckFriendship.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckFriendship.prototype.toJSON = function() { + return CMsgGCCheckFriendship.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckFriendship + * @function getTypeUrl + * @memberof CMsgGCCheckFriendship + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckFriendship.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckFriendship"; }; return CMsgGCCheckFriendship; @@ -14494,26 +18741,39 @@ /** * Properties of a CMsgGCCheckFriendship_Response. - * @exports ICMsgGCCheckFriendship_Response - * @interface ICMsgGCCheckFriendship_Response + * @typedef {Object} CMsgGCCheckFriendship_Response.$Properties * @property {boolean|null} [success] CMsgGCCheckFriendship_Response success * @property {boolean|null} [found_friendship] CMsgGCCheckFriendship_Response found_friendship + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckFriendship_Response. + * @exports ICMsgGCCheckFriendship_Response + * @interface ICMsgGCCheckFriendship_Response + * @augments CMsgGCCheckFriendship_Response.$Properties + * @deprecated Use CMsgGCCheckFriendship_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckFriendship_Response. + * @typedef {CMsgGCCheckFriendship_Response.$Properties} CMsgGCCheckFriendship_Response.$Shape */ /** * Constructs a new CMsgGCCheckFriendship_Response. * @exports CMsgGCCheckFriendship_Response * @classdesc Represents a CMsgGCCheckFriendship_Response. - * @implements ICMsgGCCheckFriendship_Response * @constructor - * @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set + * @param {CMsgGCCheckFriendship_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckFriendship_Response(properties) { + var CMsgGCCheckFriendship_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckFriendship_Response success. @@ -14536,10 +18796,14 @@ * @function create * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set + * @param {CMsgGCCheckFriendship_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response instance + * @type {{ + * (properties: CMsgGCCheckFriendship_Response.$Shape): CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape; + * (properties?: CMsgGCCheckFriendship_Response.$Properties): CMsgGCCheckFriendship_Response; + * }} */ - CMsgGCCheckFriendship_Response.create = function create(properties) { + CMsgGCCheckFriendship_Response.create = function(properties) { return new CMsgGCCheckFriendship_Response(properties); }; @@ -14548,17 +18812,24 @@ * @function encode * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response} message CMsgGCCheckFriendship_Response message or plain object to encode + * @param {CMsgGCCheckFriendship_Response.$Properties} message CMsgGCCheckFriendship_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship_Response.encode = function encode(message, writer) { + CMsgGCCheckFriendship_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.success != null && Object.hasOwnProperty.call(message, "success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); - if (message.found_friendship != null && Object.hasOwnProperty.call(message, "found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.found_friendship); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14567,12 +18838,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response} message CMsgGCCheckFriendship_Response message or plain object to encode + * @param {CMsgGCCheckFriendship_Response.$Properties} message CMsgGCCheckFriendship_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckFriendship_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14582,28 +18853,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response + * @returns {CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape} CMsgGCCheckFriendship_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship_Response.decode = function decode(reader, length) { + CMsgGCCheckFriendship_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckFriendship_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckFriendship_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - case 2: - message.found_friendship = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.success = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.found_friendship = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14613,11 +18904,11 @@ * @memberof CMsgGCCheckFriendship_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response + * @returns {CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape} CMsgGCCheckFriendship_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckFriendship_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14631,13 +18922,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckFriendship_Response.verify = function verify(message) { + CMsgGCCheckFriendship_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.success != null && message.hasOwnProperty("success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.found_friendship != null && message.hasOwnProperty("found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) if (typeof message.found_friendship !== "boolean") return "found_friendship: boolean expected"; return null; @@ -14651,14 +18946,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response */ - CMsgGCCheckFriendship_Response.fromObject = function fromObject(object) { + CMsgGCCheckFriendship_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckFriendship_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckFriendship_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckFriendship_Response(); if (object.success != null) - message.success = Boolean(object.success); + message.success = $Boolean(object.success); if (object.found_friendship != null) - message.found_friendship = Boolean(object.found_friendship); + message.found_friendship = $Boolean(object.found_friendship); return message; }; @@ -14671,17 +18972,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckFriendship_Response.toObject = function toObject(message, options) { + CMsgGCCheckFriendship_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.success = false; object.found_friendship = false; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.found_friendship != null && message.hasOwnProperty("found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) object.found_friendship = message.found_friendship; return object; }; @@ -14693,8 +18998,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckFriendship_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckFriendship_Response.prototype.toJSON = function() { + return CMsgGCCheckFriendship_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckFriendship_Response + * @function getTypeUrl + * @memberof CMsgGCCheckFriendship_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckFriendship_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckFriendship_Response"; }; return CMsgGCCheckFriendship_Response; @@ -14702,29 +19021,42 @@ $root.CMsgGCMsgMasterSetDirectory = (function() { + /** + * Properties of a CMsgGCMsgMasterSetDirectory. + * @typedef {Object} CMsgGCMsgMasterSetDirectory.$Properties + * @property {number|null} [master_dir_index] CMsgGCMsgMasterSetDirectory master_dir_index + * @property {Array.|null} [dir] CMsgGCMsgMasterSetDirectory dir + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetDirectory. * @exports ICMsgGCMsgMasterSetDirectory * @interface ICMsgGCMsgMasterSetDirectory - * @property {number|null} [master_dir_index] CMsgGCMsgMasterSetDirectory master_dir_index - * @property {Array.|null} [dir] CMsgGCMsgMasterSetDirectory dir + * @augments CMsgGCMsgMasterSetDirectory.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetDirectory. + * @typedef {CMsgGCMsgMasterSetDirectory.$Properties} CMsgGCMsgMasterSetDirectory.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetDirectory. * @exports CMsgGCMsgMasterSetDirectory * @classdesc Represents a CMsgGCMsgMasterSetDirectory. - * @implements ICMsgGCMsgMasterSetDirectory * @constructor - * @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetDirectory(properties) { + var CMsgGCMsgMasterSetDirectory = function (properties) { this.dir = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetDirectory master_dir_index. @@ -14736,7 +19068,7 @@ /** * CMsgGCMsgMasterSetDirectory dir. - * @member {Array.} dir + * @member {Array.} dir * @memberof CMsgGCMsgMasterSetDirectory * @instance */ @@ -14747,10 +19079,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory.$Shape): CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory.$Properties): CMsgGCMsgMasterSetDirectory; + * }} */ - CMsgGCMsgMasterSetDirectory.create = function create(properties) { + CMsgGCMsgMasterSetDirectory.create = function(properties) { return new CMsgGCMsgMasterSetDirectory(properties); }; @@ -14759,18 +19095,25 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory} message CMsgGCMsgMasterSetDirectory message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.$Properties} message CMsgGCMsgMasterSetDirectory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory.encode = function encode(message, writer) { + CMsgGCMsgMasterSetDirectory.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.master_dir_index != null && Object.hasOwnProperty.call(message, "master_dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.master_dir_index); if (message.dir != null && message.dir.length) for (var i = 0; i < message.dir.length; ++i) - $root.CMsgGCMsgMasterSetDirectory.SubGC.encode(message.dir[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgGCMsgMasterSetDirectory.SubGC.encode(message.dir[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14779,12 +19122,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory} message CMsgGCMsgMasterSetDirectory message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.$Properties} message CMsgGCMsgMasterSetDirectory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetDirectory.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14794,30 +19137,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory + * @returns {CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape} CMsgGCMsgMasterSetDirectory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory.decode = function decode(reader, length) { + CMsgGCMsgMasterSetDirectory.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.master_dir_index = reader.uint32(); - break; - case 2: - if (!(message.dir && message.dir.length)) - message.dir = []; - message.dir.push($root.CMsgGCMsgMasterSetDirectory.SubGC.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.master_dir_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.dir && message.dir.length)) + message.dir = []; + message.dir.push($root.CMsgGCMsgMasterSetDirectory.SubGC.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14827,11 +19190,11 @@ * @memberof CMsgGCMsgMasterSetDirectory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory + * @returns {CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape} CMsgGCMsgMasterSetDirectory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetDirectory.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14845,17 +19208,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetDirectory.verify = function verify(message) { + CMsgGCMsgMasterSetDirectory.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.master_dir_index != null && message.hasOwnProperty("master_dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) if (!$util.isInteger(message.master_dir_index)) return "master_dir_index: integer expected"; - if (message.dir != null && message.hasOwnProperty("dir")) { - if (!Array.isArray(message.dir)) + if (message.dir != null && $Object.hasOwnProperty.call(message, "dir")) { + if (!$Array.isArray(message.dir)) return "dir: array expected"; for (var i = 0; i < message.dir.length; ++i) { - var error = $root.CMsgGCMsgMasterSetDirectory.SubGC.verify(message.dir[i]); + var error = $root.CMsgGCMsgMasterSetDirectory.SubGC.verify(message.dir[i], _depth + 1); if (error) return "dir." + error; } @@ -14871,20 +19238,26 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory */ - CMsgGCMsgMasterSetDirectory.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetDirectory.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory(); if (object.master_dir_index != null) message.master_dir_index = object.master_dir_index >>> 0; if (object.dir) { - if (!Array.isArray(object.dir)) - throw TypeError(".CMsgGCMsgMasterSetDirectory.dir: array expected"); - message.dir = []; + if (!$Array.isArray(object.dir)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.dir: array expected"); + message.dir = $Array(object.dir.length); for (var i = 0; i < object.dir.length; ++i) { - if (typeof object.dir[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetDirectory.dir: object expected"); - message.dir[i] = $root.CMsgGCMsgMasterSetDirectory.SubGC.fromObject(object.dir[i]); + if (!$util.isObject(object.dir[i])) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.dir: object expected"); + message.dir[i] = $root.CMsgGCMsgMasterSetDirectory.SubGC.fromObject(object.dir[i], _depth + 1); } } return message; @@ -14899,20 +19272,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetDirectory.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetDirectory.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.dir = []; if (options.defaults) object.master_dir_index = 0; - if (message.master_dir_index != null && message.hasOwnProperty("master_dir_index")) + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) object.master_dir_index = message.master_dir_index; if (message.dir && message.dir.length) { - object.dir = []; + object.dir = $Array(message.dir.length); for (var j = 0; j < message.dir.length; ++j) - object.dir[j] = $root.CMsgGCMsgMasterSetDirectory.SubGC.toObject(message.dir[j], options); + object.dir[j] = $root.CMsgGCMsgMasterSetDirectory.SubGC.toObject(message.dir[j], options, _depth + 1); } return object; }; @@ -14924,37 +19301,64 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetDirectory.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetDirectory.prototype.toJSON = function() { + return CMsgGCMsgMasterSetDirectory.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetDirectory + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetDirectory.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory"; }; CMsgGCMsgMasterSetDirectory.SubGC = (function() { /** * Properties of a SubGC. - * @memberof CMsgGCMsgMasterSetDirectory - * @interface ISubGC + * @typedef {Object} CMsgGCMsgMasterSetDirectory.SubGC.$Properties * @property {number|null} [dir_index] SubGC dir_index * @property {string|null} [name] SubGC name * @property {string|null} [box] SubGC box * @property {string|null} [command_line] SubGC command_line * @property {string|null} [gc_binary] SubGC gc_binary + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SubGC. + * @memberof CMsgGCMsgMasterSetDirectory + * @interface ISubGC + * @augments CMsgGCMsgMasterSetDirectory.SubGC.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory.SubGC.$Properties instead. + */ + + /** + * Shape of a SubGC. + * @typedef {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} CMsgGCMsgMasterSetDirectory.SubGC.$Shape */ /** * Constructs a new SubGC. * @memberof CMsgGCMsgMasterSetDirectory * @classdesc Represents a SubGC. - * @implements ISubGC * @constructor - * @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SubGC(properties) { + var SubGC = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SubGC dir_index. @@ -15001,10 +19405,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory.SubGC.$Shape): CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory.SubGC.$Properties): CMsgGCMsgMasterSetDirectory.SubGC; + * }} */ - SubGC.create = function create(properties) { + SubGC.create = function(properties) { return new SubGC(properties); }; @@ -15013,23 +19421,30 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC} message SubGC message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} message SubGC message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubGC.encode = function encode(message, writer) { + SubGC.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.box != null && Object.hasOwnProperty.call(message, "box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.box); - if (message.command_line != null && Object.hasOwnProperty.call(message, "command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.command_line); - if (message.gc_binary != null && Object.hasOwnProperty.call(message, "gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.gc_binary); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15038,12 +19453,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC} message SubGC message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} message SubGC message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubGC.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SubGC.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15053,37 +19468,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC + * @returns {CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape} SubGC * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubGC.decode = function decode(reader, length) { + SubGC.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory.SubGC(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory.SubGC(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.box = reader.string(); - break; - case 4: - message.command_line = reader.string(); - break; - case 5: - message.gc_binary = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.box = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.command_line = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.gc_binary = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15093,11 +19537,11 @@ * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC + * @returns {CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape} SubGC * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubGC.decodeDelimited = function decodeDelimited(reader) { + SubGC.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15111,22 +19555,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SubGC.verify = function verify(message) { + SubGC.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.box != null && message.hasOwnProperty("box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) if (!$util.isString(message.box)) return "box: string expected"; - if (message.command_line != null && message.hasOwnProperty("command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) if (!$util.isString(message.command_line)) return "command_line: string expected"; - if (message.gc_binary != null && message.hasOwnProperty("gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) if (!$util.isString(message.gc_binary)) return "gc_binary: string expected"; return null; @@ -15140,20 +19588,26 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC */ - SubGC.fromObject = function fromObject(object) { + SubGC.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory.SubGC) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.SubGC: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory.SubGC(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.box != null) - message.box = String(object.box); + message.box = $String(object.box); if (object.command_line != null) - message.command_line = String(object.command_line); + message.command_line = $String(object.command_line); if (object.gc_binary != null) - message.gc_binary = String(object.gc_binary); + message.gc_binary = $String(object.gc_binary); return message; }; @@ -15166,9 +19620,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SubGC.toObject = function toObject(message, options) { + SubGC.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.dir_index = 0; @@ -15177,15 +19635,15 @@ object.command_line = ""; object.gc_binary = ""; } - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.box != null && message.hasOwnProperty("box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) object.box = message.box; - if (message.command_line != null && message.hasOwnProperty("command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) object.command_line = message.command_line; - if (message.gc_binary != null && message.hasOwnProperty("gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) object.gc_binary = message.gc_binary; return object; }; @@ -15197,8 +19655,22 @@ * @instance * @returns {Object.} JSON object */ - SubGC.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SubGC.prototype.toJSON = function() { + return SubGC.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SubGC + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory.SubGC + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SubGC.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory.SubGC"; }; return SubGC; @@ -15209,27 +19681,40 @@ $root.CMsgGCMsgMasterSetDirectory_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetDirectory_Response. + * @typedef {Object} CMsgGCMsgMasterSetDirectory_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetDirectory_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetDirectory_Response. * @exports ICMsgGCMsgMasterSetDirectory_Response * @interface ICMsgGCMsgMasterSetDirectory_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetDirectory_Response eresult + * @augments CMsgGCMsgMasterSetDirectory_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetDirectory_Response. + * @typedef {CMsgGCMsgMasterSetDirectory_Response.$Properties} CMsgGCMsgMasterSetDirectory_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetDirectory_Response. * @exports CMsgGCMsgMasterSetDirectory_Response * @classdesc Represents a CMsgGCMsgMasterSetDirectory_Response. - * @implements ICMsgGCMsgMasterSetDirectory_Response * @constructor - * @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetDirectory_Response(properties) { + var CMsgGCMsgMasterSetDirectory_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetDirectory_Response eresult. @@ -15244,10 +19729,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory_Response.$Shape): CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory_Response.$Properties): CMsgGCMsgMasterSetDirectory_Response; + * }} */ - CMsgGCMsgMasterSetDirectory_Response.create = function create(properties) { + CMsgGCMsgMasterSetDirectory_Response.create = function(properties) { return new CMsgGCMsgMasterSetDirectory_Response(properties); }; @@ -15256,15 +19745,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetDirectory_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15273,12 +19769,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetDirectory_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15288,25 +19784,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response + * @returns {CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape} CMsgGCMsgMasterSetDirectory_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetDirectory_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15316,11 +19829,11 @@ * @memberof CMsgGCMsgMasterSetDirectory_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response + * @returns {CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape} CMsgGCMsgMasterSetDirectory_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetDirectory_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15334,10 +19847,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetDirectory_Response.verify = function verify(message) { + CMsgGCMsgMasterSetDirectory_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -15351,9 +19868,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response */ - CMsgGCMsgMasterSetDirectory_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetDirectory_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -15369,13 +19892,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetDirectory_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetDirectory_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -15387,8 +19914,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetDirectory_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetDirectory_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetDirectory_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetDirectory_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetDirectory_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory_Response"; }; return CMsgGCMsgMasterSetDirectory_Response; @@ -15396,27 +19937,40 @@ $root.CMsgGCMsgWebAPIJobRequestForwardResponse = (function() { + /** + * Properties of a CMsgGCMsgWebAPIJobRequestForwardResponse. + * @typedef {Object} CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties + * @property {number|null} [dir_index] CMsgGCMsgWebAPIJobRequestForwardResponse dir_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgWebAPIJobRequestForwardResponse. * @exports ICMsgGCMsgWebAPIJobRequestForwardResponse * @interface ICMsgGCMsgWebAPIJobRequestForwardResponse - * @property {number|null} [dir_index] CMsgGCMsgWebAPIJobRequestForwardResponse dir_index + * @augments CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties + * @deprecated Use CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgWebAPIJobRequestForwardResponse. + * @typedef {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape */ /** * Constructs a new CMsgGCMsgWebAPIJobRequestForwardResponse. * @exports CMsgGCMsgWebAPIJobRequestForwardResponse * @classdesc Represents a CMsgGCMsgWebAPIJobRequestForwardResponse. - * @implements ICMsgGCMsgWebAPIJobRequestForwardResponse * @constructor - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgWebAPIJobRequestForwardResponse(properties) { + var CMsgGCMsgWebAPIJobRequestForwardResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgWebAPIJobRequestForwardResponse dir_index. @@ -15431,10 +19985,14 @@ * @function create * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse instance + * @type {{ + * (properties: CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape): CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape; + * (properties?: CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties): CMsgGCMsgWebAPIJobRequestForwardResponse; + * }} */ - CMsgGCMsgWebAPIJobRequestForwardResponse.create = function create(properties) { + CMsgGCMsgWebAPIJobRequestForwardResponse.create = function(properties) { return new CMsgGCMsgWebAPIJobRequestForwardResponse(properties); }; @@ -15443,15 +20001,22 @@ * @function encode * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgWebAPIJobRequestForwardResponse.encode = function encode(message, writer) { + CMsgGCMsgWebAPIJobRequestForwardResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15460,12 +20025,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgWebAPIJobRequestForwardResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgWebAPIJobRequestForwardResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15475,25 +20040,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse + * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape} CMsgGCMsgWebAPIJobRequestForwardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgWebAPIJobRequestForwardResponse.decode = function decode(reader, length) { + CMsgGCMsgWebAPIJobRequestForwardResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15503,11 +20085,11 @@ * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse + * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape} CMsgGCMsgWebAPIJobRequestForwardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgWebAPIJobRequestForwardResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgWebAPIJobRequestForwardResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15521,10 +20103,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgWebAPIJobRequestForwardResponse.verify = function verify(message) { + CMsgGCMsgWebAPIJobRequestForwardResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; return null; @@ -15538,9 +20124,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse */ - CMsgGCMsgWebAPIJobRequestForwardResponse.fromObject = function fromObject(object) { + CMsgGCMsgWebAPIJobRequestForwardResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgWebAPIJobRequestForwardResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgWebAPIJobRequestForwardResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; @@ -15556,13 +20148,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgWebAPIJobRequestForwardResponse.toObject = function toObject(message, options) { + CMsgGCMsgWebAPIJobRequestForwardResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.dir_index = 0; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; return object; }; @@ -15574,8 +20170,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.toJSON = function() { + return CMsgGCMsgWebAPIJobRequestForwardResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgWebAPIJobRequestForwardResponse + * @function getTypeUrl + * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgWebAPIJobRequestForwardResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgWebAPIJobRequestForwardResponse"; }; return CMsgGCMsgWebAPIJobRequestForwardResponse; @@ -15583,27 +20193,40 @@ $root.CGCSystemMsg_GetPurchaseTrust_Request = (function() { + /** + * Properties of a CGCSystemMsg_GetPurchaseTrust_Request. + * @typedef {Object} CGCSystemMsg_GetPurchaseTrust_Request.$Properties + * @property {number|Long|null} [steamid] CGCSystemMsg_GetPurchaseTrust_Request steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCSystemMsg_GetPurchaseTrust_Request. * @exports ICGCSystemMsg_GetPurchaseTrust_Request * @interface ICGCSystemMsg_GetPurchaseTrust_Request - * @property {number|Long|null} [steamid] CGCSystemMsg_GetPurchaseTrust_Request steamid + * @augments CGCSystemMsg_GetPurchaseTrust_Request.$Properties + * @deprecated Use CGCSystemMsg_GetPurchaseTrust_Request.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetPurchaseTrust_Request. + * @typedef {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} CGCSystemMsg_GetPurchaseTrust_Request.$Shape */ /** * Constructs a new CGCSystemMsg_GetPurchaseTrust_Request. * @exports CGCSystemMsg_GetPurchaseTrust_Request * @classdesc Represents a CGCSystemMsg_GetPurchaseTrust_Request. - * @implements ICGCSystemMsg_GetPurchaseTrust_Request * @constructor - * @param {ICGCSystemMsg_GetPurchaseTrust_Request=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetPurchaseTrust_Request(properties) { + var CGCSystemMsg_GetPurchaseTrust_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetPurchaseTrust_Request steamid. @@ -15611,17 +20234,21 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @instance */ - CGCSystemMsg_GetPurchaseTrust_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCSystemMsg_GetPurchaseTrust_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CGCSystemMsg_GetPurchaseTrust_Request instance using the specified properties. * @function create * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request instance + * @type {{ + * (properties: CGCSystemMsg_GetPurchaseTrust_Request.$Shape): CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape; + * (properties?: CGCSystemMsg_GetPurchaseTrust_Request.$Properties): CGCSystemMsg_GetPurchaseTrust_Request; + * }} */ - CGCSystemMsg_GetPurchaseTrust_Request.create = function create(properties) { + CGCSystemMsg_GetPurchaseTrust_Request.create = function(properties) { return new CGCSystemMsg_GetPurchaseTrust_Request(properties); }; @@ -15630,15 +20257,22 @@ * @function encode * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Request.encode = function encode(message, writer) { + CGCSystemMsg_GetPurchaseTrust_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15647,12 +20281,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetPurchaseTrust_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15662,25 +20296,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request + * @returns {CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape} CGCSystemMsg_GetPurchaseTrust_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Request.decode = function decode(reader, length) { + CGCSystemMsg_GetPurchaseTrust_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetPurchaseTrust_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetPurchaseTrust_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15690,11 +20341,11 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request + * @returns {CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape} CGCSystemMsg_GetPurchaseTrust_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Request.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetPurchaseTrust_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15708,10 +20359,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetPurchaseTrust_Request.verify = function verify(message) { + CGCSystemMsg_GetPurchaseTrust_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -15725,19 +20380,25 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request */ - CGCSystemMsg_GetPurchaseTrust_Request.fromObject = function fromObject(object) { + CGCSystemMsg_GetPurchaseTrust_Request.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetPurchaseTrust_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetPurchaseTrust_Request(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -15750,21 +20411,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetPurchaseTrust_Request.toObject = function toObject(message, options) { + CGCSystemMsg_GetPurchaseTrust_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -15775,8 +20442,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetPurchaseTrust_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetPurchaseTrust_Request.prototype.toJSON = function() { + return CGCSystemMsg_GetPurchaseTrust_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetPurchaseTrust_Request + * @function getTypeUrl + * @memberof CGCSystemMsg_GetPurchaseTrust_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetPurchaseTrust_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetPurchaseTrust_Request"; }; return CGCSystemMsg_GetPurchaseTrust_Request; @@ -15786,28 +20467,41 @@ /** * Properties of a CGCSystemMsg_GetPurchaseTrust_Response. - * @exports ICGCSystemMsg_GetPurchaseTrust_Response - * @interface ICGCSystemMsg_GetPurchaseTrust_Response + * @typedef {Object} CGCSystemMsg_GetPurchaseTrust_Response.$Properties * @property {boolean|null} [has_prior_purchase_history] CGCSystemMsg_GetPurchaseTrust_Response has_prior_purchase_history * @property {boolean|null} [has_no_recent_password_resets] CGCSystemMsg_GetPurchaseTrust_Response has_no_recent_password_resets * @property {boolean|null} [is_wallet_cash_trusted] CGCSystemMsg_GetPurchaseTrust_Response is_wallet_cash_trusted * @property {number|null} [time_all_trusted] CGCSystemMsg_GetPurchaseTrust_Response time_all_trusted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetPurchaseTrust_Response. + * @exports ICGCSystemMsg_GetPurchaseTrust_Response + * @interface ICGCSystemMsg_GetPurchaseTrust_Response + * @augments CGCSystemMsg_GetPurchaseTrust_Response.$Properties + * @deprecated Use CGCSystemMsg_GetPurchaseTrust_Response.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetPurchaseTrust_Response. + * @typedef {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} CGCSystemMsg_GetPurchaseTrust_Response.$Shape */ /** * Constructs a new CGCSystemMsg_GetPurchaseTrust_Response. * @exports CGCSystemMsg_GetPurchaseTrust_Response * @classdesc Represents a CGCSystemMsg_GetPurchaseTrust_Response. - * @implements ICGCSystemMsg_GetPurchaseTrust_Response * @constructor - * @param {ICGCSystemMsg_GetPurchaseTrust_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetPurchaseTrust_Response(properties) { + var CGCSystemMsg_GetPurchaseTrust_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetPurchaseTrust_Response has_prior_purchase_history. @@ -15846,10 +20540,14 @@ * @function create * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response instance + * @type {{ + * (properties: CGCSystemMsg_GetPurchaseTrust_Response.$Shape): CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape; + * (properties?: CGCSystemMsg_GetPurchaseTrust_Response.$Properties): CGCSystemMsg_GetPurchaseTrust_Response; + * }} */ - CGCSystemMsg_GetPurchaseTrust_Response.create = function create(properties) { + CGCSystemMsg_GetPurchaseTrust_Response.create = function(properties) { return new CGCSystemMsg_GetPurchaseTrust_Response(properties); }; @@ -15858,21 +20556,28 @@ * @function encode * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Response.encode = function encode(message, writer) { + CGCSystemMsg_GetPurchaseTrust_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.has_prior_purchase_history != null && Object.hasOwnProperty.call(message, "has_prior_purchase_history")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.has_prior_purchase_history); - if (message.has_no_recent_password_resets != null && Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.has_no_recent_password_resets); - if (message.is_wallet_cash_trusted != null && Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_wallet_cash_trusted); - if (message.time_all_trusted != null && Object.hasOwnProperty.call(message, "time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time_all_trusted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15881,12 +20586,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetPurchaseTrust_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15896,34 +20601,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response + * @returns {CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape} CGCSystemMsg_GetPurchaseTrust_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Response.decode = function decode(reader, length) { + CGCSystemMsg_GetPurchaseTrust_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetPurchaseTrust_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetPurchaseTrust_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.has_prior_purchase_history = reader.bool(); - break; - case 2: - message.has_no_recent_password_resets = reader.bool(); - break; - case 3: - message.is_wallet_cash_trusted = reader.bool(); - break; - case 4: - message.time_all_trusted = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.has_prior_purchase_history = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.has_no_recent_password_resets = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_wallet_cash_trusted = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.time_all_trusted = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15933,11 +20664,11 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response + * @returns {CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape} CGCSystemMsg_GetPurchaseTrust_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Response.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetPurchaseTrust_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15951,19 +20682,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetPurchaseTrust_Response.verify = function verify(message) { + CGCSystemMsg_GetPurchaseTrust_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.has_prior_purchase_history != null && message.hasOwnProperty("has_prior_purchase_history")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) if (typeof message.has_prior_purchase_history !== "boolean") return "has_prior_purchase_history: boolean expected"; - if (message.has_no_recent_password_resets != null && message.hasOwnProperty("has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) if (typeof message.has_no_recent_password_resets !== "boolean") return "has_no_recent_password_resets: boolean expected"; - if (message.is_wallet_cash_trusted != null && message.hasOwnProperty("is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) if (typeof message.is_wallet_cash_trusted !== "boolean") return "is_wallet_cash_trusted: boolean expected"; - if (message.time_all_trusted != null && message.hasOwnProperty("time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) if (!$util.isInteger(message.time_all_trusted)) return "time_all_trusted: integer expected"; return null; @@ -15977,16 +20712,22 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response */ - CGCSystemMsg_GetPurchaseTrust_Response.fromObject = function fromObject(object) { + CGCSystemMsg_GetPurchaseTrust_Response.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetPurchaseTrust_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetPurchaseTrust_Response(); if (object.has_prior_purchase_history != null) - message.has_prior_purchase_history = Boolean(object.has_prior_purchase_history); + message.has_prior_purchase_history = $Boolean(object.has_prior_purchase_history); if (object.has_no_recent_password_resets != null) - message.has_no_recent_password_resets = Boolean(object.has_no_recent_password_resets); + message.has_no_recent_password_resets = $Boolean(object.has_no_recent_password_resets); if (object.is_wallet_cash_trusted != null) - message.is_wallet_cash_trusted = Boolean(object.is_wallet_cash_trusted); + message.is_wallet_cash_trusted = $Boolean(object.is_wallet_cash_trusted); if (object.time_all_trusted != null) message.time_all_trusted = object.time_all_trusted >>> 0; return message; @@ -16001,9 +20742,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetPurchaseTrust_Response.toObject = function toObject(message, options) { + CGCSystemMsg_GetPurchaseTrust_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.has_prior_purchase_history = false; @@ -16011,13 +20756,13 @@ object.is_wallet_cash_trusted = false; object.time_all_trusted = 0; } - if (message.has_prior_purchase_history != null && message.hasOwnProperty("has_prior_purchase_history")) + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) object.has_prior_purchase_history = message.has_prior_purchase_history; - if (message.has_no_recent_password_resets != null && message.hasOwnProperty("has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) object.has_no_recent_password_resets = message.has_no_recent_password_resets; - if (message.is_wallet_cash_trusted != null && message.hasOwnProperty("is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) object.is_wallet_cash_trusted = message.is_wallet_cash_trusted; - if (message.time_all_trusted != null && message.hasOwnProperty("time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) object.time_all_trusted = message.time_all_trusted; return object; }; @@ -16029,8 +20774,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetPurchaseTrust_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetPurchaseTrust_Response.prototype.toJSON = function() { + return CGCSystemMsg_GetPurchaseTrust_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetPurchaseTrust_Response + * @function getTypeUrl + * @memberof CGCSystemMsg_GetPurchaseTrust_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetPurchaseTrust_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetPurchaseTrust_Response"; }; return CGCSystemMsg_GetPurchaseTrust_Response; @@ -16040,29 +20799,42 @@ /** * Properties of a CMsgGCHAccountVacStatusChange. - * @exports ICMsgGCHAccountVacStatusChange - * @interface ICMsgGCHAccountVacStatusChange + * @typedef {Object} CMsgGCHAccountVacStatusChange.$Properties * @property {number|Long|null} [steam_id] CMsgGCHAccountVacStatusChange steam_id * @property {number|null} [app_id] CMsgGCHAccountVacStatusChange app_id * @property {number|null} [rtime_vacban_starts] CMsgGCHAccountVacStatusChange rtime_vacban_starts * @property {boolean|null} [is_banned_now] CMsgGCHAccountVacStatusChange is_banned_now * @property {boolean|null} [is_banned_future] CMsgGCHAccountVacStatusChange is_banned_future + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountVacStatusChange. + * @exports ICMsgGCHAccountVacStatusChange + * @interface ICMsgGCHAccountVacStatusChange + * @augments CMsgGCHAccountVacStatusChange.$Properties + * @deprecated Use CMsgGCHAccountVacStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountVacStatusChange. + * @typedef {CMsgGCHAccountVacStatusChange.$Properties} CMsgGCHAccountVacStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountVacStatusChange. * @exports CMsgGCHAccountVacStatusChange * @classdesc Represents a CMsgGCHAccountVacStatusChange. - * @implements ICMsgGCHAccountVacStatusChange * @constructor - * @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountVacStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountVacStatusChange(properties) { + var CMsgGCHAccountVacStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountVacStatusChange steam_id. @@ -16070,7 +20842,7 @@ * @memberof CMsgGCHAccountVacStatusChange * @instance */ - CMsgGCHAccountVacStatusChange.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountVacStatusChange.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountVacStatusChange app_id. @@ -16109,10 +20881,14 @@ * @function create * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountVacStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountVacStatusChange.$Shape): CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape; + * (properties?: CMsgGCHAccountVacStatusChange.$Properties): CMsgGCHAccountVacStatusChange; + * }} */ - CMsgGCHAccountVacStatusChange.create = function create(properties) { + CMsgGCHAccountVacStatusChange.create = function(properties) { return new CMsgGCHAccountVacStatusChange(properties); }; @@ -16121,23 +20897,30 @@ * @function encode * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange} message CMsgGCHAccountVacStatusChange message or plain object to encode + * @param {CMsgGCHAccountVacStatusChange.$Properties} message CMsgGCHAccountVacStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountVacStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountVacStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id); - if (message.rtime_vacban_starts != null && Object.hasOwnProperty.call(message, "rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rtime_vacban_starts); - if (message.is_banned_now != null && Object.hasOwnProperty.call(message, "is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_banned_now); - if (message.is_banned_future != null && Object.hasOwnProperty.call(message, "is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_banned_future); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16146,12 +20929,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange} message CMsgGCHAccountVacStatusChange message or plain object to encode + * @param {CMsgGCHAccountVacStatusChange.$Properties} message CMsgGCHAccountVacStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountVacStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountVacStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16161,37 +20944,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange + * @returns {CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape} CMsgGCHAccountVacStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountVacStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountVacStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountVacStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountVacStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.app_id = reader.uint32(); - break; - case 3: - message.rtime_vacban_starts = reader.uint32(); - break; - case 4: - message.is_banned_now = reader.bool(); - break; - case 5: - message.is_banned_future = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.rtime_vacban_starts = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_banned_now = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_banned_future = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16201,11 +21013,11 @@ * @memberof CMsgGCHAccountVacStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange + * @returns {CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape} CMsgGCHAccountVacStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountVacStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountVacStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16219,22 +21031,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountVacStatusChange.verify = function verify(message) { + CMsgGCHAccountVacStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.rtime_vacban_starts != null && message.hasOwnProperty("rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) if (!$util.isInteger(message.rtime_vacban_starts)) return "rtime_vacban_starts: integer expected"; - if (message.is_banned_now != null && message.hasOwnProperty("is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) if (typeof message.is_banned_now !== "boolean") return "is_banned_now: boolean expected"; - if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) if (typeof message.is_banned_future !== "boolean") return "is_banned_future: boolean expected"; return null; @@ -16248,27 +21064,33 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange */ - CMsgGCHAccountVacStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountVacStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountVacStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountVacStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountVacStatusChange(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.rtime_vacban_starts != null) message.rtime_vacban_starts = object.rtime_vacban_starts >>> 0; if (object.is_banned_now != null) - message.is_banned_now = Boolean(object.is_banned_now); + message.is_banned_now = $Boolean(object.is_banned_now); if (object.is_banned_future != null) - message.is_banned_future = Boolean(object.is_banned_future); + message.is_banned_future = $Boolean(object.is_banned_future); return message; }; @@ -16281,33 +21103,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountVacStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountVacStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.app_id = 0; object.rtime_vacban_starts = 0; object.is_banned_now = false; object.is_banned_future = false; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.rtime_vacban_starts != null && message.hasOwnProperty("rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) object.rtime_vacban_starts = message.rtime_vacban_starts; - if (message.is_banned_now != null && message.hasOwnProperty("is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) object.is_banned_now = message.is_banned_now; - if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) object.is_banned_future = message.is_banned_future; return object; }; @@ -16319,8 +21147,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountVacStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountVacStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountVacStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountVacStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountVacStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountVacStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountVacStatusChange"; }; return CMsgGCHAccountVacStatusChange; @@ -16330,28 +21172,41 @@ /** * Properties of a CMsgGCHAccountTradeBanStatusChange. - * @exports ICMsgGCHAccountTradeBanStatusChange - * @interface ICMsgGCHAccountTradeBanStatusChange + * @typedef {Object} CMsgGCHAccountTradeBanStatusChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountTradeBanStatusChange steamid * @property {number|null} [appid] CMsgGCHAccountTradeBanStatusChange appid * @property {boolean|null} [is_banned] CMsgGCHAccountTradeBanStatusChange is_banned * @property {number|null} [time_banned_until] CMsgGCHAccountTradeBanStatusChange time_banned_until + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountTradeBanStatusChange. + * @exports ICMsgGCHAccountTradeBanStatusChange + * @interface ICMsgGCHAccountTradeBanStatusChange + * @augments CMsgGCHAccountTradeBanStatusChange.$Properties + * @deprecated Use CMsgGCHAccountTradeBanStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountTradeBanStatusChange. + * @typedef {CMsgGCHAccountTradeBanStatusChange.$Properties} CMsgGCHAccountTradeBanStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountTradeBanStatusChange. * @exports CMsgGCHAccountTradeBanStatusChange * @classdesc Represents a CMsgGCHAccountTradeBanStatusChange. - * @implements ICMsgGCHAccountTradeBanStatusChange * @constructor - * @param {ICMsgGCHAccountTradeBanStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountTradeBanStatusChange(properties) { + var CMsgGCHAccountTradeBanStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountTradeBanStatusChange steamid. @@ -16359,7 +21214,7 @@ * @memberof CMsgGCHAccountTradeBanStatusChange * @instance */ - CMsgGCHAccountTradeBanStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountTradeBanStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountTradeBanStatusChange appid. @@ -16390,10 +21245,14 @@ * @function create * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountTradeBanStatusChange.$Shape): CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape; + * (properties?: CMsgGCHAccountTradeBanStatusChange.$Properties): CMsgGCHAccountTradeBanStatusChange; + * }} */ - CMsgGCHAccountTradeBanStatusChange.create = function create(properties) { + CMsgGCHAccountTradeBanStatusChange.create = function(properties) { return new CMsgGCHAccountTradeBanStatusChange(properties); }; @@ -16402,21 +21261,28 @@ * @function encode * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTradeBanStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountTradeBanStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_banned != null && Object.hasOwnProperty.call(message, "is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_banned); - if (message.time_banned_until != null && Object.hasOwnProperty.call(message, "time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time_banned_until); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16425,12 +21291,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTradeBanStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountTradeBanStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16440,34 +21306,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange + * @returns {CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape} CMsgGCHAccountTradeBanStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTradeBanStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountTradeBanStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountTradeBanStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountTradeBanStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_banned = reader.bool(); - break; - case 4: - message.time_banned_until = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_banned = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.time_banned_until = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16477,11 +21369,11 @@ * @memberof CMsgGCHAccountTradeBanStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange + * @returns {CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape} CMsgGCHAccountTradeBanStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTradeBanStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountTradeBanStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16495,19 +21387,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountTradeBanStatusChange.verify = function verify(message) { + CMsgGCHAccountTradeBanStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_banned != null && message.hasOwnProperty("is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) if (typeof message.is_banned !== "boolean") return "is_banned: boolean expected"; - if (message.time_banned_until != null && message.hasOwnProperty("time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) if (!$util.isInteger(message.time_banned_until)) return "time_banned_until: integer expected"; return null; @@ -16521,23 +21417,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange */ - CMsgGCHAccountTradeBanStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountTradeBanStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountTradeBanStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountTradeBanStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountTradeBanStatusChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_banned != null) - message.is_banned = Boolean(object.is_banned); + message.is_banned = $Boolean(object.is_banned); if (object.time_banned_until != null) message.time_banned_until = object.time_banned_until >>> 0; return message; @@ -16552,30 +21454,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountTradeBanStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountTradeBanStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_banned = false; object.time_banned_until = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_banned != null && message.hasOwnProperty("is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) object.is_banned = message.is_banned; - if (message.time_banned_until != null && message.hasOwnProperty("time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) object.time_banned_until = message.time_banned_until; return object; }; @@ -16587,8 +21495,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountTradeBanStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountTradeBanStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountTradeBanStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountTradeBanStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountTradeBanStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountTradeBanStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountTradeBanStatusChange"; }; return CMsgGCHAccountTradeBanStatusChange; @@ -16598,27 +21520,40 @@ /** * Properties of a CMsgGCHAccountLockStatusChange. - * @exports ICMsgGCHAccountLockStatusChange - * @interface ICMsgGCHAccountLockStatusChange + * @typedef {Object} CMsgGCHAccountLockStatusChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountLockStatusChange steamid * @property {number|null} [appid] CMsgGCHAccountLockStatusChange appid * @property {boolean|null} [is_locked] CMsgGCHAccountLockStatusChange is_locked + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountLockStatusChange. + * @exports ICMsgGCHAccountLockStatusChange + * @interface ICMsgGCHAccountLockStatusChange + * @augments CMsgGCHAccountLockStatusChange.$Properties + * @deprecated Use CMsgGCHAccountLockStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountLockStatusChange. + * @typedef {CMsgGCHAccountLockStatusChange.$Properties} CMsgGCHAccountLockStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountLockStatusChange. * @exports CMsgGCHAccountLockStatusChange * @classdesc Represents a CMsgGCHAccountLockStatusChange. - * @implements ICMsgGCHAccountLockStatusChange * @constructor - * @param {ICMsgGCHAccountLockStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountLockStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountLockStatusChange(properties) { + var CMsgGCHAccountLockStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountLockStatusChange steamid. @@ -16626,7 +21561,7 @@ * @memberof CMsgGCHAccountLockStatusChange * @instance */ - CMsgGCHAccountLockStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountLockStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountLockStatusChange appid. @@ -16649,10 +21584,14 @@ * @function create * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountLockStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountLockStatusChange.$Shape): CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape; + * (properties?: CMsgGCHAccountLockStatusChange.$Properties): CMsgGCHAccountLockStatusChange; + * }} */ - CMsgGCHAccountLockStatusChange.create = function create(properties) { + CMsgGCHAccountLockStatusChange.create = function(properties) { return new CMsgGCHAccountLockStatusChange(properties); }; @@ -16661,19 +21600,26 @@ * @function encode * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange} message CMsgGCHAccountLockStatusChange message or plain object to encode + * @param {CMsgGCHAccountLockStatusChange.$Properties} message CMsgGCHAccountLockStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountLockStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountLockStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_locked != null && Object.hasOwnProperty.call(message, "is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_locked); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16682,12 +21628,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange} message CMsgGCHAccountLockStatusChange message or plain object to encode + * @param {CMsgGCHAccountLockStatusChange.$Properties} message CMsgGCHAccountLockStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountLockStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountLockStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16697,31 +21643,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange + * @returns {CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape} CMsgGCHAccountLockStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountLockStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountLockStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountLockStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountLockStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_locked = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_locked = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16731,11 +21700,11 @@ * @memberof CMsgGCHAccountLockStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange + * @returns {CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape} CMsgGCHAccountLockStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountLockStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountLockStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16749,16 +21718,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountLockStatusChange.verify = function verify(message) { + CMsgGCHAccountLockStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_locked != null && message.hasOwnProperty("is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) if (typeof message.is_locked !== "boolean") return "is_locked: boolean expected"; return null; @@ -16772,23 +21745,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange */ - CMsgGCHAccountLockStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountLockStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountLockStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountLockStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountLockStatusChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_locked != null) - message.is_locked = Boolean(object.is_locked); + message.is_locked = $Boolean(object.is_locked); return message; }; @@ -16801,27 +21780,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountLockStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountLockStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_locked = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_locked != null && message.hasOwnProperty("is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) object.is_locked = message.is_locked; return object; }; @@ -16833,8 +21818,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountLockStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountLockStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountLockStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountLockStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountLockStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountLockStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountLockStatusChange"; }; return CMsgGCHAccountLockStatusChange; @@ -16844,27 +21843,40 @@ /** * Properties of a CMsgGCHVacVerificationChange. - * @exports ICMsgGCHVacVerificationChange - * @interface ICMsgGCHVacVerificationChange + * @typedef {Object} CMsgGCHVacVerificationChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHVacVerificationChange steamid * @property {number|null} [appid] CMsgGCHVacVerificationChange appid * @property {boolean|null} [is_verified] CMsgGCHVacVerificationChange is_verified + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHVacVerificationChange. + * @exports ICMsgGCHVacVerificationChange + * @interface ICMsgGCHVacVerificationChange + * @augments CMsgGCHVacVerificationChange.$Properties + * @deprecated Use CMsgGCHVacVerificationChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHVacVerificationChange. + * @typedef {CMsgGCHVacVerificationChange.$Properties} CMsgGCHVacVerificationChange.$Shape */ /** * Constructs a new CMsgGCHVacVerificationChange. * @exports CMsgGCHVacVerificationChange * @classdesc Represents a CMsgGCHVacVerificationChange. - * @implements ICMsgGCHVacVerificationChange * @constructor - * @param {ICMsgGCHVacVerificationChange=} [properties] Properties to set + * @param {CMsgGCHVacVerificationChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHVacVerificationChange(properties) { + var CMsgGCHVacVerificationChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHVacVerificationChange steamid. @@ -16872,7 +21884,7 @@ * @memberof CMsgGCHVacVerificationChange * @instance */ - CMsgGCHVacVerificationChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHVacVerificationChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHVacVerificationChange appid. @@ -16895,10 +21907,14 @@ * @function create * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange=} [properties] Properties to set + * @param {CMsgGCHVacVerificationChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange instance + * @type {{ + * (properties: CMsgGCHVacVerificationChange.$Shape): CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape; + * (properties?: CMsgGCHVacVerificationChange.$Properties): CMsgGCHVacVerificationChange; + * }} */ - CMsgGCHVacVerificationChange.create = function create(properties) { + CMsgGCHVacVerificationChange.create = function(properties) { return new CMsgGCHVacVerificationChange(properties); }; @@ -16907,19 +21923,26 @@ * @function encode * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange} message CMsgGCHVacVerificationChange message or plain object to encode + * @param {CMsgGCHVacVerificationChange.$Properties} message CMsgGCHVacVerificationChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHVacVerificationChange.encode = function encode(message, writer) { + CMsgGCHVacVerificationChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_verified != null && Object.hasOwnProperty.call(message, "is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_verified); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16928,12 +21951,12 @@ * @function encodeDelimited * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange} message CMsgGCHVacVerificationChange message or plain object to encode + * @param {CMsgGCHVacVerificationChange.$Properties} message CMsgGCHVacVerificationChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHVacVerificationChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHVacVerificationChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16943,31 +21966,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange + * @returns {CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape} CMsgGCHVacVerificationChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHVacVerificationChange.decode = function decode(reader, length) { + CMsgGCHVacVerificationChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHVacVerificationChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHVacVerificationChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_verified = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_verified = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16977,11 +22023,11 @@ * @memberof CMsgGCHVacVerificationChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange + * @returns {CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape} CMsgGCHVacVerificationChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHVacVerificationChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHVacVerificationChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16995,16 +22041,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHVacVerificationChange.verify = function verify(message) { + CMsgGCHVacVerificationChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) if (typeof message.is_verified !== "boolean") return "is_verified: boolean expected"; return null; @@ -17018,23 +22068,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange */ - CMsgGCHVacVerificationChange.fromObject = function fromObject(object) { + CMsgGCHVacVerificationChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHVacVerificationChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHVacVerificationChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHVacVerificationChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_verified != null) - message.is_verified = Boolean(object.is_verified); + message.is_verified = $Boolean(object.is_verified); return message; }; @@ -17047,27 +22103,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHVacVerificationChange.toObject = function toObject(message, options) { + CMsgGCHVacVerificationChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_verified = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) object.is_verified = message.is_verified; return object; }; @@ -17079,8 +22141,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHVacVerificationChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHVacVerificationChange.prototype.toJSON = function() { + return CMsgGCHVacVerificationChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHVacVerificationChange + * @function getTypeUrl + * @memberof CMsgGCHVacVerificationChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHVacVerificationChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHVacVerificationChange"; }; return CMsgGCHVacVerificationChange; @@ -17090,29 +22166,42 @@ /** * Properties of a CMsgGCHAccountPhoneNumberChange. - * @exports ICMsgGCHAccountPhoneNumberChange - * @interface ICMsgGCHAccountPhoneNumberChange + * @typedef {Object} CMsgGCHAccountPhoneNumberChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountPhoneNumberChange steamid * @property {number|null} [appid] CMsgGCHAccountPhoneNumberChange appid * @property {number|Long|null} [phone_id] CMsgGCHAccountPhoneNumberChange phone_id * @property {boolean|null} [is_verified] CMsgGCHAccountPhoneNumberChange is_verified * @property {boolean|null} [is_identifying] CMsgGCHAccountPhoneNumberChange is_identifying + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountPhoneNumberChange. + * @exports ICMsgGCHAccountPhoneNumberChange + * @interface ICMsgGCHAccountPhoneNumberChange + * @augments CMsgGCHAccountPhoneNumberChange.$Properties + * @deprecated Use CMsgGCHAccountPhoneNumberChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountPhoneNumberChange. + * @typedef {CMsgGCHAccountPhoneNumberChange.$Properties} CMsgGCHAccountPhoneNumberChange.$Shape */ /** * Constructs a new CMsgGCHAccountPhoneNumberChange. * @exports CMsgGCHAccountPhoneNumberChange * @classdesc Represents a CMsgGCHAccountPhoneNumberChange. - * @implements ICMsgGCHAccountPhoneNumberChange * @constructor - * @param {ICMsgGCHAccountPhoneNumberChange=} [properties] Properties to set + * @param {CMsgGCHAccountPhoneNumberChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountPhoneNumberChange(properties) { + var CMsgGCHAccountPhoneNumberChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountPhoneNumberChange steamid. @@ -17120,7 +22209,7 @@ * @memberof CMsgGCHAccountPhoneNumberChange * @instance */ - CMsgGCHAccountPhoneNumberChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountPhoneNumberChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountPhoneNumberChange appid. @@ -17159,10 +22248,14 @@ * @function create * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange=} [properties] Properties to set + * @param {CMsgGCHAccountPhoneNumberChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange instance + * @type {{ + * (properties: CMsgGCHAccountPhoneNumberChange.$Shape): CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape; + * (properties?: CMsgGCHAccountPhoneNumberChange.$Properties): CMsgGCHAccountPhoneNumberChange; + * }} */ - CMsgGCHAccountPhoneNumberChange.create = function create(properties) { + CMsgGCHAccountPhoneNumberChange.create = function(properties) { return new CMsgGCHAccountPhoneNumberChange(properties); }; @@ -17171,23 +22264,30 @@ * @function encode * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange} message CMsgGCHAccountPhoneNumberChange message or plain object to encode + * @param {CMsgGCHAccountPhoneNumberChange.$Properties} message CMsgGCHAccountPhoneNumberChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountPhoneNumberChange.encode = function encode(message, writer) { + CMsgGCHAccountPhoneNumberChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.phone_id != null && Object.hasOwnProperty.call(message, "phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.phone_id); - if (message.is_verified != null && Object.hasOwnProperty.call(message, "is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_verified); - if (message.is_identifying != null && Object.hasOwnProperty.call(message, "is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_identifying); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17196,12 +22296,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange} message CMsgGCHAccountPhoneNumberChange message or plain object to encode + * @param {CMsgGCHAccountPhoneNumberChange.$Properties} message CMsgGCHAccountPhoneNumberChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountPhoneNumberChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountPhoneNumberChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17211,37 +22311,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange + * @returns {CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape} CMsgGCHAccountPhoneNumberChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountPhoneNumberChange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountPhoneNumberChange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.phone_id = reader.uint64(); - break; - case 4: - message.is_verified = reader.bool(); - break; - case 5: - message.is_identifying = reader.bool(); - break; - default: - reader.skipType(tag & 7); + CMsgGCHAccountPhoneNumberChange.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountPhoneNumberChange(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.phone_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_verified = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_identifying = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17251,11 +22380,11 @@ * @memberof CMsgGCHAccountPhoneNumberChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange + * @returns {CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape} CMsgGCHAccountPhoneNumberChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountPhoneNumberChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountPhoneNumberChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17269,22 +22398,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountPhoneNumberChange.verify = function verify(message) { + CMsgGCHAccountPhoneNumberChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) if (!$util.isInteger(message.phone_id) && !(message.phone_id && $util.isInteger(message.phone_id.low) && $util.isInteger(message.phone_id.high))) return "phone_id: integer|Long expected"; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) if (typeof message.is_verified !== "boolean") return "is_verified: boolean expected"; - if (message.is_identifying != null && message.hasOwnProperty("is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) if (typeof message.is_identifying !== "boolean") return "is_identifying: boolean expected"; return null; @@ -17298,34 +22431,40 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange */ - CMsgGCHAccountPhoneNumberChange.fromObject = function fromObject(object) { + CMsgGCHAccountPhoneNumberChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountPhoneNumberChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountPhoneNumberChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountPhoneNumberChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.phone_id != null) if ($util.Long) - (message.phone_id = $util.Long.fromValue(object.phone_id)).unsigned = true; + message.phone_id = $util.Long.fromValue(object.phone_id, true); else if (typeof object.phone_id === "string") - message.phone_id = parseInt(object.phone_id, 10); + message.phone_id = $parseInt(object.phone_id, 10); else if (typeof object.phone_id === "number") message.phone_id = object.phone_id; else if (typeof object.phone_id === "object") message.phone_id = new $util.LongBits(object.phone_id.low >>> 0, object.phone_id.high >>> 0).toNumber(true); if (object.is_verified != null) - message.is_verified = Boolean(object.is_verified); + message.is_verified = $Boolean(object.is_verified); if (object.is_identifying != null) - message.is_identifying = Boolean(object.is_identifying); + message.is_identifying = $Boolean(object.is_identifying); return message; }; @@ -17338,40 +22477,48 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountPhoneNumberChange.toObject = function toObject(message, options) { + CMsgGCHAccountPhoneNumberChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.phone_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.phone_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.phone_id = options.longs === String ? "0" : 0; + object.phone_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.is_verified = false; object.is_identifying = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) - if (typeof message.phone_id === "number") - object.phone_id = options.longs === String ? String(message.phone_id) : message.phone_id; + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.phone_id = typeof message.phone_id === "number" ? $BigInt(message.phone_id) : $util.Long.fromBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0, true).toBigInt(); + else if (typeof message.phone_id === "number") + object.phone_id = options.longs === $String ? $String(message.phone_id) : message.phone_id; else - object.phone_id = options.longs === String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + object.phone_id = options.longs === $String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === $Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) object.is_verified = message.is_verified; - if (message.is_identifying != null && message.hasOwnProperty("is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) object.is_identifying = message.is_identifying; return object; }; @@ -17383,8 +22530,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountPhoneNumberChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountPhoneNumberChange.prototype.toJSON = function() { + return CMsgGCHAccountPhoneNumberChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountPhoneNumberChange + * @function getTypeUrl + * @memberof CMsgGCHAccountPhoneNumberChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountPhoneNumberChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountPhoneNumberChange"; }; return CMsgGCHAccountPhoneNumberChange; @@ -17394,27 +22555,40 @@ /** * Properties of a CMsgGCHAccountTwoFactorChange. - * @exports ICMsgGCHAccountTwoFactorChange - * @interface ICMsgGCHAccountTwoFactorChange + * @typedef {Object} CMsgGCHAccountTwoFactorChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountTwoFactorChange steamid * @property {number|null} [appid] CMsgGCHAccountTwoFactorChange appid * @property {boolean|null} [twofactor_enabled] CMsgGCHAccountTwoFactorChange twofactor_enabled + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountTwoFactorChange. + * @exports ICMsgGCHAccountTwoFactorChange + * @interface ICMsgGCHAccountTwoFactorChange + * @augments CMsgGCHAccountTwoFactorChange.$Properties + * @deprecated Use CMsgGCHAccountTwoFactorChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountTwoFactorChange. + * @typedef {CMsgGCHAccountTwoFactorChange.$Properties} CMsgGCHAccountTwoFactorChange.$Shape */ /** * Constructs a new CMsgGCHAccountTwoFactorChange. * @exports CMsgGCHAccountTwoFactorChange * @classdesc Represents a CMsgGCHAccountTwoFactorChange. - * @implements ICMsgGCHAccountTwoFactorChange * @constructor - * @param {ICMsgGCHAccountTwoFactorChange=} [properties] Properties to set + * @param {CMsgGCHAccountTwoFactorChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountTwoFactorChange(properties) { + var CMsgGCHAccountTwoFactorChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountTwoFactorChange steamid. @@ -17422,7 +22596,7 @@ * @memberof CMsgGCHAccountTwoFactorChange * @instance */ - CMsgGCHAccountTwoFactorChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountTwoFactorChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountTwoFactorChange appid. @@ -17445,10 +22619,14 @@ * @function create * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange=} [properties] Properties to set + * @param {CMsgGCHAccountTwoFactorChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange instance + * @type {{ + * (properties: CMsgGCHAccountTwoFactorChange.$Shape): CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape; + * (properties?: CMsgGCHAccountTwoFactorChange.$Properties): CMsgGCHAccountTwoFactorChange; + * }} */ - CMsgGCHAccountTwoFactorChange.create = function create(properties) { + CMsgGCHAccountTwoFactorChange.create = function(properties) { return new CMsgGCHAccountTwoFactorChange(properties); }; @@ -17457,19 +22635,26 @@ * @function encode * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange} message CMsgGCHAccountTwoFactorChange message or plain object to encode + * @param {CMsgGCHAccountTwoFactorChange.$Properties} message CMsgGCHAccountTwoFactorChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTwoFactorChange.encode = function encode(message, writer) { + CMsgGCHAccountTwoFactorChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.twofactor_enabled != null && Object.hasOwnProperty.call(message, "twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.twofactor_enabled); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17478,12 +22663,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange} message CMsgGCHAccountTwoFactorChange message or plain object to encode + * @param {CMsgGCHAccountTwoFactorChange.$Properties} message CMsgGCHAccountTwoFactorChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTwoFactorChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountTwoFactorChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17493,31 +22678,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange + * @returns {CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape} CMsgGCHAccountTwoFactorChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTwoFactorChange.decode = function decode(reader, length) { + CMsgGCHAccountTwoFactorChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountTwoFactorChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountTwoFactorChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.twofactor_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.twofactor_enabled = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17527,11 +22735,11 @@ * @memberof CMsgGCHAccountTwoFactorChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange + * @returns {CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape} CMsgGCHAccountTwoFactorChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTwoFactorChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountTwoFactorChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17545,16 +22753,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountTwoFactorChange.verify = function verify(message) { + CMsgGCHAccountTwoFactorChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.twofactor_enabled != null && message.hasOwnProperty("twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) if (typeof message.twofactor_enabled !== "boolean") return "twofactor_enabled: boolean expected"; return null; @@ -17568,23 +22780,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange */ - CMsgGCHAccountTwoFactorChange.fromObject = function fromObject(object) { + CMsgGCHAccountTwoFactorChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountTwoFactorChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountTwoFactorChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountTwoFactorChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.twofactor_enabled != null) - message.twofactor_enabled = Boolean(object.twofactor_enabled); + message.twofactor_enabled = $Boolean(object.twofactor_enabled); return message; }; @@ -17597,27 +22815,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountTwoFactorChange.toObject = function toObject(message, options) { + CMsgGCHAccountTwoFactorChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.twofactor_enabled = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.twofactor_enabled != null && message.hasOwnProperty("twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) object.twofactor_enabled = message.twofactor_enabled; return object; }; @@ -17629,8 +22853,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountTwoFactorChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountTwoFactorChange.prototype.toJSON = function() { + return CMsgGCHAccountTwoFactorChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountTwoFactorChange + * @function getTypeUrl + * @memberof CMsgGCHAccountTwoFactorChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountTwoFactorChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountTwoFactorChange"; }; return CMsgGCHAccountTwoFactorChange; @@ -17638,27 +22876,40 @@ $root.CMsgGCGetPartnerAccountLink = (function() { + /** + * Properties of a CMsgGCGetPartnerAccountLink. + * @typedef {Object} CMsgGCGetPartnerAccountLink.$Properties + * @property {number|Long|null} [steamid] CMsgGCGetPartnerAccountLink steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPartnerAccountLink. * @exports ICMsgGCGetPartnerAccountLink * @interface ICMsgGCGetPartnerAccountLink - * @property {number|Long|null} [steamid] CMsgGCGetPartnerAccountLink steamid + * @augments CMsgGCGetPartnerAccountLink.$Properties + * @deprecated Use CMsgGCGetPartnerAccountLink.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPartnerAccountLink. + * @typedef {CMsgGCGetPartnerAccountLink.$Properties} CMsgGCGetPartnerAccountLink.$Shape */ /** * Constructs a new CMsgGCGetPartnerAccountLink. * @exports CMsgGCGetPartnerAccountLink * @classdesc Represents a CMsgGCGetPartnerAccountLink. - * @implements ICMsgGCGetPartnerAccountLink * @constructor - * @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPartnerAccountLink(properties) { + var CMsgGCGetPartnerAccountLink = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPartnerAccountLink steamid. @@ -17666,17 +22917,21 @@ * @memberof CMsgGCGetPartnerAccountLink * @instance */ - CMsgGCGetPartnerAccountLink.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCGetPartnerAccountLink.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCGetPartnerAccountLink instance using the specified properties. * @function create * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink instance + * @type {{ + * (properties: CMsgGCGetPartnerAccountLink.$Shape): CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape; + * (properties?: CMsgGCGetPartnerAccountLink.$Properties): CMsgGCGetPartnerAccountLink; + * }} */ - CMsgGCGetPartnerAccountLink.create = function create(properties) { + CMsgGCGetPartnerAccountLink.create = function(properties) { return new CMsgGCGetPartnerAccountLink(properties); }; @@ -17685,15 +22940,22 @@ * @function encode * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink} message CMsgGCGetPartnerAccountLink message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink.$Properties} message CMsgGCGetPartnerAccountLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink.encode = function encode(message, writer) { + CMsgGCGetPartnerAccountLink.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17702,12 +22964,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink} message CMsgGCGetPartnerAccountLink message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink.$Properties} message CMsgGCGetPartnerAccountLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPartnerAccountLink.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17717,25 +22979,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink + * @returns {CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape} CMsgGCGetPartnerAccountLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink.decode = function decode(reader, length) { + CMsgGCGetPartnerAccountLink.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPartnerAccountLink(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPartnerAccountLink(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17745,11 +23024,11 @@ * @memberof CMsgGCGetPartnerAccountLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink + * @returns {CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape} CMsgGCGetPartnerAccountLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPartnerAccountLink.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17763,10 +23042,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPartnerAccountLink.verify = function verify(message) { + CMsgGCGetPartnerAccountLink.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -17780,19 +23063,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink */ - CMsgGCGetPartnerAccountLink.fromObject = function fromObject(object) { + CMsgGCGetPartnerAccountLink.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPartnerAccountLink) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPartnerAccountLink: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPartnerAccountLink(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -17805,21 +23094,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPartnerAccountLink.toObject = function toObject(message, options) { + CMsgGCGetPartnerAccountLink.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -17830,8 +23125,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPartnerAccountLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPartnerAccountLink.prototype.toJSON = function() { + return CMsgGCGetPartnerAccountLink.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPartnerAccountLink + * @function getTypeUrl + * @memberof CMsgGCGetPartnerAccountLink + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPartnerAccountLink.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPartnerAccountLink"; }; return CMsgGCGetPartnerAccountLink; @@ -17841,26 +23150,39 @@ /** * Properties of a CMsgGCGetPartnerAccountLink_Response. - * @exports ICMsgGCGetPartnerAccountLink_Response - * @interface ICMsgGCGetPartnerAccountLink_Response + * @typedef {Object} CMsgGCGetPartnerAccountLink_Response.$Properties * @property {number|null} [pwid] CMsgGCGetPartnerAccountLink_Response pwid * @property {number|null} [nexonid] CMsgGCGetPartnerAccountLink_Response nexonid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetPartnerAccountLink_Response. + * @exports ICMsgGCGetPartnerAccountLink_Response + * @interface ICMsgGCGetPartnerAccountLink_Response + * @augments CMsgGCGetPartnerAccountLink_Response.$Properties + * @deprecated Use CMsgGCGetPartnerAccountLink_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPartnerAccountLink_Response. + * @typedef {CMsgGCGetPartnerAccountLink_Response.$Properties} CMsgGCGetPartnerAccountLink_Response.$Shape */ /** * Constructs a new CMsgGCGetPartnerAccountLink_Response. * @exports CMsgGCGetPartnerAccountLink_Response * @classdesc Represents a CMsgGCGetPartnerAccountLink_Response. - * @implements ICMsgGCGetPartnerAccountLink_Response * @constructor - * @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPartnerAccountLink_Response(properties) { + var CMsgGCGetPartnerAccountLink_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPartnerAccountLink_Response pwid. @@ -17883,10 +23205,14 @@ * @function create * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response instance + * @type {{ + * (properties: CMsgGCGetPartnerAccountLink_Response.$Shape): CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape; + * (properties?: CMsgGCGetPartnerAccountLink_Response.$Properties): CMsgGCGetPartnerAccountLink_Response; + * }} */ - CMsgGCGetPartnerAccountLink_Response.create = function create(properties) { + CMsgGCGetPartnerAccountLink_Response.create = function(properties) { return new CMsgGCGetPartnerAccountLink_Response(properties); }; @@ -17895,17 +23221,24 @@ * @function encode * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink_Response.encode = function encode(message, writer) { + CMsgGCGetPartnerAccountLink_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.pwid != null && Object.hasOwnProperty.call(message, "pwid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.pwid); - if (message.nexonid != null && Object.hasOwnProperty.call(message, "nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.nexonid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17914,12 +23247,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPartnerAccountLink_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17929,28 +23262,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response + * @returns {CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape} CMsgGCGetPartnerAccountLink_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink_Response.decode = function decode(reader, length) { + CMsgGCGetPartnerAccountLink_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPartnerAccountLink_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPartnerAccountLink_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pwid = reader.uint32(); - break; - case 2: - message.nexonid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.pwid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.nexonid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17960,11 +23313,11 @@ * @memberof CMsgGCGetPartnerAccountLink_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response + * @returns {CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape} CMsgGCGetPartnerAccountLink_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPartnerAccountLink_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17978,13 +23331,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPartnerAccountLink_Response.verify = function verify(message) { + CMsgGCGetPartnerAccountLink_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pwid != null && message.hasOwnProperty("pwid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) if (!$util.isInteger(message.pwid)) return "pwid: integer expected"; - if (message.nexonid != null && message.hasOwnProperty("nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) if (!$util.isInteger(message.nexonid)) return "nexonid: integer expected"; return null; @@ -17998,9 +23355,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response */ - CMsgGCGetPartnerAccountLink_Response.fromObject = function fromObject(object) { + CMsgGCGetPartnerAccountLink_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPartnerAccountLink_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPartnerAccountLink_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPartnerAccountLink_Response(); if (object.pwid != null) message.pwid = object.pwid >>> 0; @@ -18018,17 +23381,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPartnerAccountLink_Response.toObject = function toObject(message, options) { + CMsgGCGetPartnerAccountLink_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.pwid = 0; object.nexonid = 0; } - if (message.pwid != null && message.hasOwnProperty("pwid")) + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) object.pwid = message.pwid; - if (message.nexonid != null && message.hasOwnProperty("nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) object.nexonid = message.nexonid; return object; }; @@ -18040,8 +23407,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPartnerAccountLink_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPartnerAccountLink_Response.prototype.toJSON = function() { + return CMsgGCGetPartnerAccountLink_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPartnerAccountLink_Response + * @function getTypeUrl + * @memberof CMsgGCGetPartnerAccountLink_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPartnerAccountLink_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPartnerAccountLink_Response"; }; return CMsgGCGetPartnerAccountLink_Response; @@ -18051,30 +23432,43 @@ /** * Properties of a CMsgGCRoutingInfo. - * @exports ICMsgGCRoutingInfo - * @interface ICMsgGCRoutingInfo + * @typedef {Object} CMsgGCRoutingInfo.$Properties * @property {Array.|null} [dir_index] CMsgGCRoutingInfo dir_index * @property {CMsgGCRoutingInfo.RoutingMethod|null} [method] CMsgGCRoutingInfo method * @property {CMsgGCRoutingInfo.RoutingMethod|null} [fallback] CMsgGCRoutingInfo fallback * @property {number|null} [protobuf_field] CMsgGCRoutingInfo protobuf_field * @property {string|null} [webapi_param] CMsgGCRoutingInfo webapi_param + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRoutingInfo. + * @exports ICMsgGCRoutingInfo + * @interface ICMsgGCRoutingInfo + * @augments CMsgGCRoutingInfo.$Properties + * @deprecated Use CMsgGCRoutingInfo.$Properties instead. + */ + + /** + * Shape of a CMsgGCRoutingInfo. + * @typedef {CMsgGCRoutingInfo.$Properties} CMsgGCRoutingInfo.$Shape */ /** * Constructs a new CMsgGCRoutingInfo. * @exports CMsgGCRoutingInfo * @classdesc Represents a CMsgGCRoutingInfo. - * @implements ICMsgGCRoutingInfo * @constructor - * @param {ICMsgGCRoutingInfo=} [properties] Properties to set + * @param {CMsgGCRoutingInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRoutingInfo(properties) { + var CMsgGCRoutingInfo = function (properties) { this.dir_index = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRoutingInfo dir_index. @@ -18121,10 +23515,14 @@ * @function create * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo=} [properties] Properties to set + * @param {CMsgGCRoutingInfo.$Properties=} [properties] Properties to set * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo instance + * @type {{ + * (properties: CMsgGCRoutingInfo.$Shape): CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape; + * (properties?: CMsgGCRoutingInfo.$Properties): CMsgGCRoutingInfo; + * }} */ - CMsgGCRoutingInfo.create = function create(properties) { + CMsgGCRoutingInfo.create = function(properties) { return new CMsgGCRoutingInfo(properties); }; @@ -18133,24 +23531,31 @@ * @function encode * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo} message CMsgGCRoutingInfo message or plain object to encode + * @param {CMsgGCRoutingInfo.$Properties} message CMsgGCRoutingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRoutingInfo.encode = function encode(message, writer) { + CMsgGCRoutingInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.dir_index != null && message.dir_index.length) for (var i = 0; i < message.dir_index.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index[i]); - if (message.method != null && Object.hasOwnProperty.call(message, "method")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.method); - if (message.fallback != null && Object.hasOwnProperty.call(message, "fallback")) + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.fallback); - if (message.protobuf_field != null && Object.hasOwnProperty.call(message, "protobuf_field")) + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.protobuf_field); - if (message.webapi_param != null && Object.hasOwnProperty.call(message, "webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.webapi_param); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18159,12 +23564,12 @@ * @function encodeDelimited * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo} message CMsgGCRoutingInfo message or plain object to encode + * @param {CMsgGCRoutingInfo.$Properties} message CMsgGCRoutingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRoutingInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRoutingInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18174,44 +23579,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo + * @returns {CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape} CMsgGCRoutingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRoutingInfo.decode = function decode(reader, length) { + CMsgGCRoutingInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRoutingInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRoutingInfo(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.dir_index && message.dir_index.length)) - message.dir_index = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.dir_index.push(reader.uint32()); - } else - message.dir_index.push(reader.uint32()); - break; - case 2: - message.method = reader.int32(); - break; - case 3: - message.fallback = reader.int32(); - break; - case 4: - message.protobuf_field = reader.uint32(); - break; - case 5: - message.webapi_param = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.dir_index && message.dir_index.length)) + message.dir_index = []; + reader.uint32s(message.dir_index); + continue; + } + if (wireType !== 0) + break; + if (!(message.dir_index && message.dir_index.length)) + message.dir_index = []; + message.dir_index.push(reader.uint32()); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCRoutingInfo.RoutingMethod[value] !== $undefined) + message.method = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCRoutingInfo.RoutingMethod[value] !== $undefined) + message.fallback = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 4: { + if (wireType !== 0) + break; + message.protobuf_field = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.webapi_param = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18221,11 +23668,11 @@ * @memberof CMsgGCRoutingInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo + * @returns {CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape} CMsgGCRoutingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRoutingInfo.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRoutingInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18239,17 +23686,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRoutingInfo.verify = function verify(message) { + CMsgGCRoutingInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) { - if (!Array.isArray(message.dir_index)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) { + if (!$Array.isArray(message.dir_index)) return "dir_index: array expected"; for (var i = 0; i < message.dir_index.length; ++i) if (!$util.isInteger(message.dir_index[i])) return "dir_index: integer[] expected"; } - if (message.method != null && message.hasOwnProperty("method")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) switch (message.method) { default: return "method: enum value expected"; @@ -18260,7 +23711,7 @@ case 4: break; } - if (message.fallback != null && message.hasOwnProperty("fallback")) + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) switch (message.fallback) { default: return "fallback: enum value expected"; @@ -18271,10 +23722,10 @@ case 4: break; } - if (message.protobuf_field != null && message.hasOwnProperty("protobuf_field")) + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) if (!$util.isInteger(message.protobuf_field)) return "protobuf_field: integer expected"; - if (message.webapi_param != null && message.hasOwnProperty("webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) if (!$util.isString(message.webapi_param)) return "webapi_param: string expected"; return null; @@ -18288,14 +23739,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo */ - CMsgGCRoutingInfo.fromObject = function fromObject(object) { + CMsgGCRoutingInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRoutingInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRoutingInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRoutingInfo(); if (object.dir_index) { - if (!Array.isArray(object.dir_index)) - throw TypeError(".CMsgGCRoutingInfo.dir_index: array expected"); - message.dir_index = []; + if (!$Array.isArray(object.dir_index)) + throw $TypeError(".CMsgGCRoutingInfo.dir_index: array expected"); + message.dir_index = $Array(object.dir_index.length); for (var i = 0; i < object.dir_index.length; ++i) message.dir_index[i] = object.dir_index[i] >>> 0; } @@ -18320,6 +23777,7 @@ case 4: message.method = 4; break; + default: } switch (object.fallback) { case "RANDOM": @@ -18342,11 +23800,12 @@ case 4: message.fallback = 4; break; + default: } if (object.protobuf_field != null) message.protobuf_field = object.protobuf_field >>> 0; if (object.webapi_param != null) - message.webapi_param = String(object.webapi_param); + message.webapi_param = $String(object.webapi_param); return message; }; @@ -18359,30 +23818,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRoutingInfo.toObject = function toObject(message, options) { + CMsgGCRoutingInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.dir_index = []; if (options.defaults) { - object.method = options.enums === String ? "RANDOM" : 0; - object.fallback = options.enums === String ? "DISCARD" : 1; + object.method = options.enums === $String ? "RANDOM" : 0; + object.fallback = options.enums === $String ? "DISCARD" : 1; object.protobuf_field = 0; object.webapi_param = ""; } if (message.dir_index && message.dir_index.length) { - object.dir_index = []; + object.dir_index = $Array(message.dir_index.length); for (var j = 0; j < message.dir_index.length; ++j) object.dir_index[j] = message.dir_index[j]; } - if (message.method != null && message.hasOwnProperty("method")) - object.method = options.enums === String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.method] : message.method; - if (message.fallback != null && message.hasOwnProperty("fallback")) - object.fallback = options.enums === String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] : message.fallback; - if (message.protobuf_field != null && message.hasOwnProperty("protobuf_field")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) + object.method = options.enums === $String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.method] === $undefined ? message.method : $root.CMsgGCRoutingInfo.RoutingMethod[message.method] : message.method; + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) + object.fallback = options.enums === $String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] === $undefined ? message.fallback : $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] : message.fallback; + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) object.protobuf_field = message.protobuf_field; - if (message.webapi_param != null && message.hasOwnProperty("webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) object.webapi_param = message.webapi_param; return object; }; @@ -18394,8 +23857,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRoutingInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRoutingInfo.prototype.toJSON = function() { + return CMsgGCRoutingInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRoutingInfo + * @function getTypeUrl + * @memberof CMsgGCRoutingInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRoutingInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRoutingInfo"; }; /** @@ -18409,7 +23886,7 @@ * @property {number} WEBAPI_PARAM_UINT64=4 WEBAPI_PARAM_UINT64 value */ CMsgGCRoutingInfo.RoutingMethod = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "RANDOM"] = 0; values[valuesById[1] = "DISCARD"] = 1; values[valuesById[2] = "CLIENT_STEAMID"] = 2; @@ -18423,32 +23900,45 @@ $root.CMsgGCMsgMasterSetWebAPIRouting = (function() { + /** + * Properties of a CMsgGCMsgMasterSetWebAPIRouting. + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting.$Properties + * @property {Array.|null} [entries] CMsgGCMsgMasterSetWebAPIRouting entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetWebAPIRouting. * @exports ICMsgGCMsgMasterSetWebAPIRouting * @interface ICMsgGCMsgMasterSetWebAPIRouting - * @property {Array.|null} [entries] CMsgGCMsgMasterSetWebAPIRouting entries + * @augments CMsgGCMsgMasterSetWebAPIRouting.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetWebAPIRouting. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting.$Properties} CMsgGCMsgMasterSetWebAPIRouting.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetWebAPIRouting. * @exports CMsgGCMsgMasterSetWebAPIRouting * @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting. - * @implements ICMsgGCMsgMasterSetWebAPIRouting * @constructor - * @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetWebAPIRouting(properties) { + var CMsgGCMsgMasterSetWebAPIRouting = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetWebAPIRouting entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCMsgMasterSetWebAPIRouting * @instance */ @@ -18459,10 +23949,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting.$Shape): CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting.$Properties): CMsgGCMsgMasterSetWebAPIRouting; + * }} */ - CMsgGCMsgMasterSetWebAPIRouting.create = function create(properties) { + CMsgGCMsgMasterSetWebAPIRouting.create = function(properties) { return new CMsgGCMsgMasterSetWebAPIRouting(properties); }; @@ -18471,16 +23965,23 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting.encode = function encode(message, writer) { + CMsgGCMsgMasterSetWebAPIRouting.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18489,12 +23990,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetWebAPIRouting.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18504,27 +24005,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting + * @returns {CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape} CMsgGCMsgMasterSetWebAPIRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting.decode = function decode(reader, length) { + CMsgGCMsgMasterSetWebAPIRouting.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCMsgMasterSetWebAPIRouting.Entry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCMsgMasterSetWebAPIRouting.Entry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18534,11 +24052,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting + * @returns {CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape} CMsgGCMsgMasterSetWebAPIRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetWebAPIRouting.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18552,14 +24070,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetWebAPIRouting.verify = function verify(message) { + CMsgGCMsgMasterSetWebAPIRouting.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.verify(message.entries[i]); + var error = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -18575,18 +24097,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting */ - CMsgGCMsgMasterSetWebAPIRouting.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetWebAPIRouting.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: object expected"); - message.entries[i] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: object expected"); + message.entries[i] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -18601,16 +24129,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetWebAPIRouting.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetWebAPIRouting.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -18622,35 +24154,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetWebAPIRouting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetWebAPIRouting.prototype.toJSON = function() { + return CMsgGCMsgMasterSetWebAPIRouting.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetWebAPIRouting + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetWebAPIRouting.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting"; }; CMsgGCMsgMasterSetWebAPIRouting.Entry = (function() { /** * Properties of an Entry. - * @memberof CMsgGCMsgMasterSetWebAPIRouting - * @interface IEntry + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties * @property {string|null} [interface_name] Entry interface_name * @property {string|null} [method_name] Entry method_name - * @property {ICMsgGCRoutingInfo|null} [routing] Entry routing + * @property {CMsgGCRoutingInfo.$Properties|null} [routing] Entry routing + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Entry. + * @memberof CMsgGCMsgMasterSetWebAPIRouting + * @interface IEntry + * @augments CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties instead. + */ + + /** + * Shape of an Entry. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape */ /** * Constructs a new Entry. * @memberof CMsgGCMsgMasterSetWebAPIRouting * @classdesc Represents an Entry. - * @implements IEntry * @constructor - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Entry(properties) { + var Entry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Entry interface_name. @@ -18670,7 +24229,7 @@ /** * Entry routing. - * @member {ICMsgGCRoutingInfo|null|undefined} routing + * @member {CMsgGCRoutingInfo.$Properties|null|undefined} routing * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @instance */ @@ -18681,10 +24240,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape): CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties): CMsgGCMsgMasterSetWebAPIRouting.Entry; + * }} */ - Entry.create = function create(properties) { + Entry.create = function(properties) { return new Entry(properties); }; @@ -18693,19 +24256,26 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.interface_name != null && Object.hasOwnProperty.call(message, "interface_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.interface_name); - if (message.method_name != null && Object.hasOwnProperty.call(message, "method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.method_name); - if (message.routing != null && Object.hasOwnProperty.call(message, "routing")) - $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18714,12 +24284,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Entry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18729,31 +24299,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + Entry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.interface_name = reader.string(); - break; - case 2: - message.method_name = reader.string(); - break; - case 3: - message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.interface_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.method_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routing); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18763,11 +24356,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + Entry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18781,17 +24374,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + Entry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) if (!$util.isString(message.interface_name)) return "interface_name: string expected"; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) if (!$util.isString(message.method_name)) return "method_name: string expected"; - if (message.routing != null && message.hasOwnProperty("routing")) { - var error = $root.CMsgGCRoutingInfo.verify(message.routing); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) { + var error = $root.CMsgGCRoutingInfo.verify(message.routing, _depth + 1); if (error) return "routing." + error; } @@ -18806,18 +24403,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry */ - Entry.fromObject = function fromObject(object) { + Entry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting.Entry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); if (object.interface_name != null) - message.interface_name = String(object.interface_name); + message.interface_name = $String(object.interface_name); if (object.method_name != null) - message.method_name = String(object.method_name); + message.method_name = $String(object.method_name); if (object.routing != null) { - if (typeof object.routing !== "object") - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry.routing: object expected"); - message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing); + if (!$util.isObject(object.routing)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry.routing: object expected"); + message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing, _depth + 1); } return message; }; @@ -18831,21 +24434,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.interface_name = ""; object.method_name = ""; object.routing = null; } - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) object.interface_name = message.interface_name; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) object.method_name = message.method_name; - if (message.routing != null && message.hasOwnProperty("routing")) - object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options, _depth + 1); return object; }; @@ -18856,8 +24463,22 @@ * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Entry.prototype.toJSON = function() { + return Entry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Entry + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Entry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting.Entry"; }; return Entry; @@ -18868,32 +24489,45 @@ $root.CMsgGCMsgMasterSetClientMsgRouting = (function() { + /** + * Properties of a CMsgGCMsgMasterSetClientMsgRouting. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting.$Properties + * @property {Array.|null} [entries] CMsgGCMsgMasterSetClientMsgRouting entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetClientMsgRouting. * @exports ICMsgGCMsgMasterSetClientMsgRouting * @interface ICMsgGCMsgMasterSetClientMsgRouting - * @property {Array.|null} [entries] CMsgGCMsgMasterSetClientMsgRouting entries + * @augments CMsgGCMsgMasterSetClientMsgRouting.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetClientMsgRouting. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting.$Properties} CMsgGCMsgMasterSetClientMsgRouting.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetClientMsgRouting. * @exports CMsgGCMsgMasterSetClientMsgRouting * @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting. - * @implements ICMsgGCMsgMasterSetClientMsgRouting * @constructor - * @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetClientMsgRouting(properties) { + var CMsgGCMsgMasterSetClientMsgRouting = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetClientMsgRouting entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCMsgMasterSetClientMsgRouting * @instance */ @@ -18904,10 +24538,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting.$Shape): CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting.$Properties): CMsgGCMsgMasterSetClientMsgRouting; + * }} */ - CMsgGCMsgMasterSetClientMsgRouting.create = function create(properties) { + CMsgGCMsgMasterSetClientMsgRouting.create = function(properties) { return new CMsgGCMsgMasterSetClientMsgRouting(properties); }; @@ -18916,16 +24554,23 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting.encode = function encode(message, writer) { + CMsgGCMsgMasterSetClientMsgRouting.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18934,12 +24579,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetClientMsgRouting.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18949,27 +24594,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting + * @returns {CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape} CMsgGCMsgMasterSetClientMsgRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting.decode = function decode(reader, length) { + CMsgGCMsgMasterSetClientMsgRouting.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCMsgMasterSetClientMsgRouting.Entry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCMsgMasterSetClientMsgRouting.Entry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18979,11 +24641,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting + * @returns {CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape} CMsgGCMsgMasterSetClientMsgRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetClientMsgRouting.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18997,14 +24659,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetClientMsgRouting.verify = function verify(message) { + CMsgGCMsgMasterSetClientMsgRouting.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.verify(message.entries[i]); + var error = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -19020,18 +24686,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting */ - CMsgGCMsgMasterSetClientMsgRouting.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetClientMsgRouting.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: object expected"); - message.entries[i] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: object expected"); + message.entries[i] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -19046,16 +24718,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetClientMsgRouting.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetClientMsgRouting.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -19067,34 +24743,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetClientMsgRouting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetClientMsgRouting.prototype.toJSON = function() { + return CMsgGCMsgMasterSetClientMsgRouting.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetClientMsgRouting + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetClientMsgRouting.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting"; }; CMsgGCMsgMasterSetClientMsgRouting.Entry = (function() { + /** + * Properties of an Entry. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties + * @property {number|null} [msg_type] Entry msg_type + * @property {CMsgGCRoutingInfo.$Properties|null} [routing] Entry routing + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an Entry. * @memberof CMsgGCMsgMasterSetClientMsgRouting * @interface IEntry - * @property {number|null} [msg_type] Entry msg_type - * @property {ICMsgGCRoutingInfo|null} [routing] Entry routing + * @augments CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties instead. + */ + + /** + * Shape of an Entry. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape */ /** * Constructs a new Entry. * @memberof CMsgGCMsgMasterSetClientMsgRouting * @classdesc Represents an Entry. - * @implements IEntry * @constructor - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Entry(properties) { + var Entry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Entry msg_type. @@ -19106,7 +24809,7 @@ /** * Entry routing. - * @member {ICMsgGCRoutingInfo|null|undefined} routing + * @member {CMsgGCRoutingInfo.$Properties|null|undefined} routing * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @instance */ @@ -19117,10 +24820,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape): CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties): CMsgGCMsgMasterSetClientMsgRouting.Entry; + * }} */ - Entry.create = function create(properties) { + Entry.create = function(properties) { return new Entry(properties); }; @@ -19129,17 +24836,24 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.msg_type != null && Object.hasOwnProperty.call(message, "msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.msg_type); - if (message.routing != null && Object.hasOwnProperty.call(message, "routing")) - $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19148,12 +24862,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Entry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19163,28 +24877,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + Entry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg_type = reader.uint32(); - break; - case 2: - message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.msg_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routing); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19194,11 +24928,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + Entry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19212,14 +24946,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + Entry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) if (!$util.isInteger(message.msg_type)) return "msg_type: integer expected"; - if (message.routing != null && message.hasOwnProperty("routing")) { - var error = $root.CMsgGCRoutingInfo.verify(message.routing); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) { + var error = $root.CMsgGCRoutingInfo.verify(message.routing, _depth + 1); if (error) return "routing." + error; } @@ -19234,16 +24972,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry */ - Entry.fromObject = function fromObject(object) { + Entry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting.Entry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); if (object.msg_type != null) message.msg_type = object.msg_type >>> 0; if (object.routing != null) { - if (typeof object.routing !== "object") - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry.routing: object expected"); - message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing); + if (!$util.isObject(object.routing)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry.routing: object expected"); + message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing, _depth + 1); } return message; }; @@ -19257,18 +25001,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.msg_type = 0; object.routing = null; } - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) object.msg_type = message.msg_type; - if (message.routing != null && message.hasOwnProperty("routing")) - object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options, _depth + 1); return object; }; @@ -19279,8 +25027,22 @@ * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Entry.prototype.toJSON = function() { + return Entry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Entry + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Entry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting.Entry"; }; return Entry; @@ -19291,27 +25053,40 @@ $root.CMsgGCMsgMasterSetWebAPIRouting_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetWebAPIRouting_Response. + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetWebAPIRouting_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetWebAPIRouting_Response. * @exports ICMsgGCMsgMasterSetWebAPIRouting_Response * @interface ICMsgGCMsgMasterSetWebAPIRouting_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetWebAPIRouting_Response eresult + * @augments CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetWebAPIRouting_Response. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetWebAPIRouting_Response. * @exports CMsgGCMsgMasterSetWebAPIRouting_Response * @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting_Response. - * @implements ICMsgGCMsgMasterSetWebAPIRouting_Response * @constructor - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetWebAPIRouting_Response(properties) { + var CMsgGCMsgMasterSetWebAPIRouting_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetWebAPIRouting_Response eresult. @@ -19326,10 +25101,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape): CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties): CMsgGCMsgMasterSetWebAPIRouting_Response; + * }} */ - CMsgGCMsgMasterSetWebAPIRouting_Response.create = function create(properties) { + CMsgGCMsgMasterSetWebAPIRouting_Response.create = function(properties) { return new CMsgGCMsgMasterSetWebAPIRouting_Response(properties); }; @@ -19338,15 +25117,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetWebAPIRouting_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19355,12 +25141,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetWebAPIRouting_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19370,25 +25156,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response + * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape} CMsgGCMsgMasterSetWebAPIRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetWebAPIRouting_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19398,11 +25201,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response + * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape} CMsgGCMsgMasterSetWebAPIRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetWebAPIRouting_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19416,10 +25219,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetWebAPIRouting_Response.verify = function verify(message) { + CMsgGCMsgMasterSetWebAPIRouting_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -19433,9 +25240,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response */ - CMsgGCMsgMasterSetWebAPIRouting_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetWebAPIRouting_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -19451,13 +25264,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetWebAPIRouting_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetWebAPIRouting_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -19469,8 +25286,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetWebAPIRouting_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetWebAPIRouting_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetWebAPIRouting_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting_Response"; }; return CMsgGCMsgMasterSetWebAPIRouting_Response; @@ -19478,27 +25309,40 @@ $root.CMsgGCMsgMasterSetClientMsgRouting_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetClientMsgRouting_Response. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetClientMsgRouting_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetClientMsgRouting_Response. * @exports ICMsgGCMsgMasterSetClientMsgRouting_Response * @interface ICMsgGCMsgMasterSetClientMsgRouting_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetClientMsgRouting_Response eresult + * @augments CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetClientMsgRouting_Response. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetClientMsgRouting_Response. * @exports CMsgGCMsgMasterSetClientMsgRouting_Response * @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting_Response. - * @implements ICMsgGCMsgMasterSetClientMsgRouting_Response * @constructor - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetClientMsgRouting_Response(properties) { + var CMsgGCMsgMasterSetClientMsgRouting_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetClientMsgRouting_Response eresult. @@ -19513,10 +25357,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape): CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties): CMsgGCMsgMasterSetClientMsgRouting_Response; + * }} */ - CMsgGCMsgMasterSetClientMsgRouting_Response.create = function create(properties) { + CMsgGCMsgMasterSetClientMsgRouting_Response.create = function(properties) { return new CMsgGCMsgMasterSetClientMsgRouting_Response(properties); }; @@ -19525,15 +25373,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetClientMsgRouting_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19542,12 +25397,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetClientMsgRouting_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19557,25 +25412,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response + * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape} CMsgGCMsgMasterSetClientMsgRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetClientMsgRouting_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19585,11 +25457,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response + * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape} CMsgGCMsgMasterSetClientMsgRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetClientMsgRouting_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19603,10 +25475,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetClientMsgRouting_Response.verify = function verify(message) { + CMsgGCMsgMasterSetClientMsgRouting_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -19620,9 +25496,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response */ - CMsgGCMsgMasterSetClientMsgRouting_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetClientMsgRouting_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -19638,13 +25520,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetClientMsgRouting_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetClientMsgRouting_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -19656,8 +25542,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetClientMsgRouting_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetClientMsgRouting_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetClientMsgRouting_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting_Response"; }; return CMsgGCMsgMasterSetClientMsgRouting_Response; @@ -19667,29 +25567,42 @@ /** * Properties of a CMsgGCMsgSetOptions. - * @exports ICMsgGCMsgSetOptions - * @interface ICMsgGCMsgSetOptions + * @typedef {Object} CMsgGCMsgSetOptions.$Properties * @property {Array.|null} [options] CMsgGCMsgSetOptions options - * @property {Array.|null} [client_msg_ranges] CMsgGCMsgSetOptions client_msg_ranges + * @property {Array.|null} [client_msg_ranges] CMsgGCMsgSetOptions client_msg_ranges * @property {CMsgGCMsgSetOptions.GCSQLVersion|null} [gcsql_version] CMsgGCMsgSetOptions gcsql_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCMsgSetOptions. + * @exports ICMsgGCMsgSetOptions + * @interface ICMsgGCMsgSetOptions + * @augments CMsgGCMsgSetOptions.$Properties + * @deprecated Use CMsgGCMsgSetOptions.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgSetOptions. + * @typedef {CMsgGCMsgSetOptions.$Properties} CMsgGCMsgSetOptions.$Shape */ /** * Constructs a new CMsgGCMsgSetOptions. * @exports CMsgGCMsgSetOptions * @classdesc Represents a CMsgGCMsgSetOptions. - * @implements ICMsgGCMsgSetOptions * @constructor - * @param {ICMsgGCMsgSetOptions=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgSetOptions(properties) { + var CMsgGCMsgSetOptions = function (properties) { this.options = []; this.client_msg_ranges = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgSetOptions options. @@ -19701,7 +25614,7 @@ /** * CMsgGCMsgSetOptions client_msg_ranges. - * @member {Array.} client_msg_ranges + * @member {Array.} client_msg_ranges * @memberof CMsgGCMsgSetOptions * @instance */ @@ -19720,10 +25633,14 @@ * @function create * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions instance + * @type {{ + * (properties: CMsgGCMsgSetOptions.$Shape): CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape; + * (properties?: CMsgGCMsgSetOptions.$Properties): CMsgGCMsgSetOptions; + * }} */ - CMsgGCMsgSetOptions.create = function create(properties) { + CMsgGCMsgSetOptions.create = function(properties) { return new CMsgGCMsgSetOptions(properties); }; @@ -19732,21 +25649,28 @@ * @function encode * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions} message CMsgGCMsgSetOptions message or plain object to encode + * @param {CMsgGCMsgSetOptions.$Properties} message CMsgGCMsgSetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgSetOptions.encode = function encode(message, writer) { + CMsgGCMsgSetOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.options != null && message.options.length) for (var i = 0; i < message.options.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.options[i]); if (message.client_msg_ranges != null && message.client_msg_ranges.length) for (var i = 0; i < message.client_msg_ranges.length; ++i) - $root.CMsgGCMsgSetOptions.MessageRange.encode(message.client_msg_ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gcsql_version != null && Object.hasOwnProperty.call(message, "gcsql_version")) + $root.CMsgGCMsgSetOptions.MessageRange.encode(message.client_msg_ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.gcsql_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19755,12 +25679,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions} message CMsgGCMsgSetOptions message or plain object to encode + * @param {CMsgGCMsgSetOptions.$Properties} message CMsgGCMsgSetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgSetOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgSetOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19770,40 +25694,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions + * @returns {CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape} CMsgGCMsgSetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgSetOptions.decode = function decode(reader, length) { + CMsgGCMsgSetOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgSetOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgSetOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.options && message.options.length)) - message.options = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.options.push(reader.int32()); - } else - message.options.push(reader.int32()); - break; - case 2: - if (!(message.client_msg_ranges && message.client_msg_ranges.length)) - message.client_msg_ranges = []; - message.client_msg_ranges.push($root.CMsgGCMsgSetOptions.MessageRange.decode(reader, reader.uint32())); - break; - case 3: - message.gcsql_version = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + start = reader.pos; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.Option[value] !== $undefined) { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push($util.rawField(1, 0, reader.raw(start, reader.pos))); + } + } + continue; + } + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.Option[value] !== $undefined) { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.client_msg_ranges && message.client_msg_ranges.length)) + message.client_msg_ranges = []; + message.client_msg_ranges.push($root.CMsgGCMsgSetOptions.MessageRange.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.GCSQLVersion[value] !== $undefined) + message.gcsql_version = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19813,11 +25783,11 @@ * @memberof CMsgGCMsgSetOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions + * @returns {CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape} CMsgGCMsgSetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgSetOptions.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgSetOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19831,11 +25801,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgSetOptions.verify = function verify(message) { + CMsgGCMsgSetOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + if (!$Array.isArray(message.options)) return "options: array expected"; for (var i = 0; i < message.options.length; ++i) switch (message.options[i]) { @@ -19848,16 +25822,16 @@ break; } } - if (message.client_msg_ranges != null && message.hasOwnProperty("client_msg_ranges")) { - if (!Array.isArray(message.client_msg_ranges)) + if (message.client_msg_ranges != null && $Object.hasOwnProperty.call(message, "client_msg_ranges")) { + if (!$Array.isArray(message.client_msg_ranges)) return "client_msg_ranges: array expected"; for (var i = 0; i < message.client_msg_ranges.length; ++i) { - var error = $root.CMsgGCMsgSetOptions.MessageRange.verify(message.client_msg_ranges[i]); + var error = $root.CMsgGCMsgSetOptions.MessageRange.verify(message.client_msg_ranges[i], _depth + 1); if (error) return "client_msg_ranges." + error; } } - if (message.gcsql_version != null && message.hasOwnProperty("gcsql_version")) + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) switch (message.gcsql_version) { default: return "gcsql_version: enum value expected"; @@ -19876,43 +25850,49 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions */ - CMsgGCMsgSetOptions.fromObject = function fromObject(object) { + CMsgGCMsgSetOptions.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgSetOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgSetOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgSetOptions(); if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".CMsgGCMsgSetOptions.options: array expected"); + if (!$Array.isArray(object.options)) + throw $TypeError(".CMsgGCMsgSetOptions.options: array expected"); message.options = []; for (var i = 0; i < object.options.length; ++i) switch (object.options[i]) { - default: case "NOTIFY_USER_SESSIONS": case 0: - message.options[i] = 0; + message.options[message.options.length] = 0; break; case "NOTIFY_SERVER_SESSIONS": case 1: - message.options[i] = 1; + message.options[message.options.length] = 1; break; case "NOTIFY_ACHIEVEMENTS": case 2: - message.options[i] = 2; + message.options[message.options.length] = 2; break; case "NOTIFY_VAC_ACTION": case 3: - message.options[i] = 3; + message.options[message.options.length] = 3; break; + default: } } if (object.client_msg_ranges) { - if (!Array.isArray(object.client_msg_ranges)) - throw TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: array expected"); - message.client_msg_ranges = []; + if (!$Array.isArray(object.client_msg_ranges)) + throw $TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: array expected"); + message.client_msg_ranges = $Array(object.client_msg_ranges.length); for (var i = 0; i < object.client_msg_ranges.length; ++i) { - if (typeof object.client_msg_ranges[i] !== "object") - throw TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: object expected"); - message.client_msg_ranges[i] = $root.CMsgGCMsgSetOptions.MessageRange.fromObject(object.client_msg_ranges[i]); + if (!$util.isObject(object.client_msg_ranges[i])) + throw $TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: object expected"); + message.client_msg_ranges[i] = $root.CMsgGCMsgSetOptions.MessageRange.fromObject(object.client_msg_ranges[i], _depth + 1); } } switch (object.gcsql_version) { @@ -19924,6 +25904,7 @@ case 2: message.gcsql_version = 2; break; + default: } return message; }; @@ -19937,28 +25918,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgSetOptions.toObject = function toObject(message, options) { + CMsgGCMsgSetOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.options = []; object.client_msg_ranges = []; } if (options.defaults) - object.gcsql_version = options.enums === String ? "GCSQL_VERSION_BASELINE" : 1; + object.gcsql_version = options.enums === $String ? "GCSQL_VERSION_BASELINE" : 1; if (message.options && message.options.length) { - object.options = []; + object.options = $Array(message.options.length); for (var j = 0; j < message.options.length; ++j) - object.options[j] = options.enums === String ? $root.CMsgGCMsgSetOptions.Option[message.options[j]] : message.options[j]; + object.options[j] = options.enums === $String ? $root.CMsgGCMsgSetOptions.Option[message.options[j]] === $undefined ? message.options[j] : $root.CMsgGCMsgSetOptions.Option[message.options[j]] : message.options[j]; } if (message.client_msg_ranges && message.client_msg_ranges.length) { - object.client_msg_ranges = []; + object.client_msg_ranges = $Array(message.client_msg_ranges.length); for (var j = 0; j < message.client_msg_ranges.length; ++j) - object.client_msg_ranges[j] = $root.CMsgGCMsgSetOptions.MessageRange.toObject(message.client_msg_ranges[j], options); + object.client_msg_ranges[j] = $root.CMsgGCMsgSetOptions.MessageRange.toObject(message.client_msg_ranges[j], options, _depth + 1); } - if (message.gcsql_version != null && message.hasOwnProperty("gcsql_version")) - object.gcsql_version = options.enums === String ? $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] : message.gcsql_version; + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) + object.gcsql_version = options.enums === $String ? $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] === $undefined ? message.gcsql_version : $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] : message.gcsql_version; return object; }; @@ -19969,34 +25954,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgSetOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgSetOptions.prototype.toJSON = function() { + return CMsgGCMsgSetOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgSetOptions + * @function getTypeUrl + * @memberof CMsgGCMsgSetOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgSetOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgSetOptions"; }; CMsgGCMsgSetOptions.MessageRange = (function() { /** * Properties of a MessageRange. - * @memberof CMsgGCMsgSetOptions - * @interface IMessageRange + * @typedef {Object} CMsgGCMsgSetOptions.MessageRange.$Properties * @property {number} low MessageRange low * @property {number} high MessageRange high + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MessageRange. + * @memberof CMsgGCMsgSetOptions + * @interface IMessageRange + * @augments CMsgGCMsgSetOptions.MessageRange.$Properties + * @deprecated Use CMsgGCMsgSetOptions.MessageRange.$Properties instead. + */ + + /** + * Shape of a MessageRange. + * @typedef {CMsgGCMsgSetOptions.MessageRange.$Properties} CMsgGCMsgSetOptions.MessageRange.$Shape */ /** * Constructs a new MessageRange. * @memberof CMsgGCMsgSetOptions * @classdesc Represents a MessageRange. - * @implements IMessageRange * @constructor - * @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MessageRange(properties) { + var MessageRange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MessageRange low. @@ -20019,10 +26031,14 @@ * @function create * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange instance + * @type {{ + * (properties: CMsgGCMsgSetOptions.MessageRange.$Shape): CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape; + * (properties?: CMsgGCMsgSetOptions.MessageRange.$Properties): CMsgGCMsgSetOptions.MessageRange; + * }} */ - MessageRange.create = function create(properties) { + MessageRange.create = function(properties) { return new MessageRange(properties); }; @@ -20031,15 +26047,22 @@ * @function encode * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange} message MessageRange message or plain object to encode + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties} message MessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageRange.encode = function encode(message, writer) { + MessageRange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.low); writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.high); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20048,12 +26071,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange} message MessageRange message or plain object to encode + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties} message MessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageRange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20063,31 +26086,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange + * @returns {CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape} MessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageRange.decode = function decode(reader, length) { + MessageRange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgSetOptions.MessageRange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgSetOptions.MessageRange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.low = reader.uint32(); - break; - case 2: - message.high = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.low = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.high = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("low")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "low")) throw $util.ProtocolError("missing required 'low'", { instance: message }); - if (!message.hasOwnProperty("high")) + if (!$Object.hasOwnProperty.call(message, "high")) throw $util.ProtocolError("missing required 'high'", { instance: message }); return message; }; @@ -20098,11 +26141,11 @@ * @memberof CMsgGCMsgSetOptions.MessageRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange + * @returns {CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape} MessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageRange.decodeDelimited = function decodeDelimited(reader) { + MessageRange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20116,9 +26159,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageRange.verify = function verify(message) { + MessageRange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isInteger(message.low)) return "low: integer expected"; if (!$util.isInteger(message.high)) @@ -20134,9 +26181,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange */ - MessageRange.fromObject = function fromObject(object) { + MessageRange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgSetOptions.MessageRange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgSetOptions.MessageRange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgSetOptions.MessageRange(); if (object.low != null) message.low = object.low >>> 0; @@ -20154,17 +26207,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageRange.toObject = function toObject(message, options) { + MessageRange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.low = 0; object.high = 0; } - if (message.low != null && message.hasOwnProperty("low")) + if (message.low != null && $Object.hasOwnProperty.call(message, "low")) object.low = message.low; - if (message.high != null && message.hasOwnProperty("high")) + if (message.high != null && $Object.hasOwnProperty.call(message, "high")) object.high = message.high; return object; }; @@ -20176,8 +26233,22 @@ * @instance * @returns {Object.} JSON object */ - MessageRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MessageRange.prototype.toJSON = function() { + return MessageRange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MessageRange + * @function getTypeUrl + * @memberof CMsgGCMsgSetOptions.MessageRange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MessageRange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgSetOptions.MessageRange"; }; return MessageRange; @@ -20193,7 +26264,7 @@ * @property {number} NOTIFY_VAC_ACTION=3 NOTIFY_VAC_ACTION value */ CMsgGCMsgSetOptions.Option = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "NOTIFY_USER_SESSIONS"] = 0; values[valuesById[1] = "NOTIFY_SERVER_SESSIONS"] = 1; values[valuesById[2] = "NOTIFY_ACHIEVEMENTS"] = 2; @@ -20209,7 +26280,7 @@ * @property {number} GCSQL_VERSION_BOOLTYPE=2 GCSQL_VERSION_BOOLTYPE value */ CMsgGCMsgSetOptions.GCSQLVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "GCSQL_VERSION_BASELINE"] = 1; values[valuesById[2] = "GCSQL_VERSION_BOOLTYPE"] = 2; return values; @@ -20222,8 +26293,7 @@ /** * Properties of a CMsgGCHUpdateSession. - * @exports ICMsgGCHUpdateSession - * @interface ICMsgGCHUpdateSession + * @typedef {Object} CMsgGCHUpdateSession.$Properties * @property {number|Long|null} [steam_id] CMsgGCHUpdateSession steam_id * @property {number|null} [app_id] CMsgGCHUpdateSession app_id * @property {boolean|null} [online] CMsgGCHUpdateSession online @@ -20232,24 +26302,38 @@ * @property {number|null} [server_port] CMsgGCHUpdateSession server_port * @property {number|null} [os_type] CMsgGCHUpdateSession os_type * @property {number|null} [client_addr] CMsgGCHUpdateSession client_addr - * @property {Array.|null} [extra_fields] CMsgGCHUpdateSession extra_fields + * @property {Array.|null} [extra_fields] CMsgGCHUpdateSession extra_fields + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHUpdateSession. + * @exports ICMsgGCHUpdateSession + * @interface ICMsgGCHUpdateSession + * @augments CMsgGCHUpdateSession.$Properties + * @deprecated Use CMsgGCHUpdateSession.$Properties instead. + */ + + /** + * Shape of a CMsgGCHUpdateSession. + * @typedef {CMsgGCHUpdateSession.$Properties} CMsgGCHUpdateSession.$Shape */ /** * Constructs a new CMsgGCHUpdateSession. * @exports CMsgGCHUpdateSession * @classdesc Represents a CMsgGCHUpdateSession. - * @implements ICMsgGCHUpdateSession * @constructor - * @param {ICMsgGCHUpdateSession=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHUpdateSession(properties) { + var CMsgGCHUpdateSession = function (properties) { this.extra_fields = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHUpdateSession steam_id. @@ -20257,7 +26341,7 @@ * @memberof CMsgGCHUpdateSession * @instance */ - CMsgGCHUpdateSession.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHUpdateSession.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHUpdateSession app_id. @@ -20281,7 +26365,7 @@ * @memberof CMsgGCHUpdateSession * @instance */ - CMsgGCHUpdateSession.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHUpdateSession.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHUpdateSession server_addr. @@ -20317,7 +26401,7 @@ /** * CMsgGCHUpdateSession extra_fields. - * @member {Array.} extra_fields + * @member {Array.} extra_fields * @memberof CMsgGCHUpdateSession * @instance */ @@ -20328,10 +26412,14 @@ * @function create * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.$Properties=} [properties] Properties to set * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession instance + * @type {{ + * (properties: CMsgGCHUpdateSession.$Shape): CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape; + * (properties?: CMsgGCHUpdateSession.$Properties): CMsgGCHUpdateSession; + * }} */ - CMsgGCHUpdateSession.create = function create(properties) { + CMsgGCHUpdateSession.create = function(properties) { return new CMsgGCHUpdateSession(properties); }; @@ -20340,32 +26428,39 @@ * @function encode * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession} message CMsgGCHUpdateSession message or plain object to encode + * @param {CMsgGCHUpdateSession.$Properties} message CMsgGCHUpdateSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHUpdateSession.encode = function encode(message, writer) { + CMsgGCHUpdateSession.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id); - if (message.online != null && Object.hasOwnProperty.call(message, "online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.online); - if (message.server_steam_id != null && Object.hasOwnProperty.call(message, "server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.server_steam_id); - if (message.server_addr != null && Object.hasOwnProperty.call(message, "server_addr")) + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.server_addr); - if (message.server_port != null && Object.hasOwnProperty.call(message, "server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.server_port); - if (message.os_type != null && Object.hasOwnProperty.call(message, "os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.os_type); - if (message.client_addr != null && Object.hasOwnProperty.call(message, "client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.client_addr); if (message.extra_fields != null && message.extra_fields.length) for (var i = 0; i < message.extra_fields.length; ++i) - $root.CMsgGCHUpdateSession.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.CMsgGCHUpdateSession.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20374,12 +26469,12 @@ * @function encodeDelimited * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession} message CMsgGCHUpdateSession message or plain object to encode + * @param {CMsgGCHUpdateSession.$Properties} message CMsgGCHUpdateSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHUpdateSession.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHUpdateSession.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20389,51 +26484,92 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession + * @returns {CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape} CMsgGCHUpdateSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHUpdateSession.decode = function decode(reader, length) { + CMsgGCHUpdateSession.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHUpdateSession(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHUpdateSession(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.app_id = reader.uint32(); - break; - case 3: - message.online = reader.bool(); - break; - case 4: - message.server_steam_id = reader.fixed64(); - break; - case 5: - message.server_addr = reader.uint32(); - break; - case 6: - message.server_port = reader.uint32(); - break; - case 7: - message.os_type = reader.uint32(); - break; - case 8: - message.client_addr = reader.uint32(); - break; - case 9: - if (!(message.extra_fields && message.extra_fields.length)) - message.extra_fields = []; - message.extra_fields.push($root.CMsgGCHUpdateSession.ExtraField.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.online = reader.bool(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.server_steam_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.server_addr = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.server_port = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.os_type = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.client_addr = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 2) + break; + if (!(message.extra_fields && message.extra_fields.length)) + message.extra_fields = []; + message.extra_fields.push($root.CMsgGCHUpdateSession.ExtraField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20443,11 +26579,11 @@ * @memberof CMsgGCHUpdateSession * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession + * @returns {CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape} CMsgGCHUpdateSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHUpdateSession.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHUpdateSession.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20461,38 +26597,42 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHUpdateSession.verify = function verify(message) { + CMsgGCHUpdateSession.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) if (typeof message.online !== "boolean") return "online: boolean expected"; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) if (!$util.isInteger(message.server_steam_id) && !(message.server_steam_id && $util.isInteger(message.server_steam_id.low) && $util.isInteger(message.server_steam_id.high))) return "server_steam_id: integer|Long expected"; - if (message.server_addr != null && message.hasOwnProperty("server_addr")) + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) if (!$util.isInteger(message.server_addr)) return "server_addr: integer expected"; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) if (!$util.isInteger(message.server_port)) return "server_port: integer expected"; - if (message.os_type != null && message.hasOwnProperty("os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) if (!$util.isInteger(message.os_type)) return "os_type: integer expected"; - if (message.client_addr != null && message.hasOwnProperty("client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) if (!$util.isInteger(message.client_addr)) return "client_addr: integer expected"; - if (message.extra_fields != null && message.hasOwnProperty("extra_fields")) { - if (!Array.isArray(message.extra_fields)) + if (message.extra_fields != null && $Object.hasOwnProperty.call(message, "extra_fields")) { + if (!$Array.isArray(message.extra_fields)) return "extra_fields: array expected"; for (var i = 0; i < message.extra_fields.length; ++i) { - var error = $root.CMsgGCHUpdateSession.ExtraField.verify(message.extra_fields[i]); + var error = $root.CMsgGCHUpdateSession.ExtraField.verify(message.extra_fields[i], _depth + 1); if (error) return "extra_fields." + error; } @@ -20508,32 +26648,38 @@ * @param {Object.} object Plain object * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession */ - CMsgGCHUpdateSession.fromObject = function fromObject(object) { + CMsgGCHUpdateSession.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHUpdateSession) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHUpdateSession: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHUpdateSession(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.online != null) - message.online = Boolean(object.online); + message.online = $Boolean(object.online); if (object.server_steam_id != null) if ($util.Long) - (message.server_steam_id = $util.Long.fromValue(object.server_steam_id)).unsigned = false; + message.server_steam_id = $util.Long.fromValue(object.server_steam_id, true); else if (typeof object.server_steam_id === "string") - message.server_steam_id = parseInt(object.server_steam_id, 10); + message.server_steam_id = $parseInt(object.server_steam_id, 10); else if (typeof object.server_steam_id === "number") message.server_steam_id = object.server_steam_id; else if (typeof object.server_steam_id === "object") - message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(); + message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(true); if (object.server_addr != null) message.server_addr = object.server_addr >>> 0; if (object.server_port != null) @@ -20543,13 +26689,13 @@ if (object.client_addr != null) message.client_addr = object.client_addr >>> 0; if (object.extra_fields) { - if (!Array.isArray(object.extra_fields)) - throw TypeError(".CMsgGCHUpdateSession.extra_fields: array expected"); - message.extra_fields = []; + if (!$Array.isArray(object.extra_fields)) + throw $TypeError(".CMsgGCHUpdateSession.extra_fields: array expected"); + message.extra_fields = $Array(object.extra_fields.length); for (var i = 0; i < object.extra_fields.length; ++i) { - if (typeof object.extra_fields[i] !== "object") - throw TypeError(".CMsgGCHUpdateSession.extra_fields: object expected"); - message.extra_fields[i] = $root.CMsgGCHUpdateSession.ExtraField.fromObject(object.extra_fields[i]); + if (!$util.isObject(object.extra_fields[i])) + throw $TypeError(".CMsgGCHUpdateSession.extra_fields: object expected"); + message.extra_fields[i] = $root.CMsgGCHUpdateSession.ExtraField.fromObject(object.extra_fields[i], _depth + 1); } } return message; @@ -20564,56 +26710,64 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHUpdateSession.toObject = function toObject(message, options) { + CMsgGCHUpdateSession.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.extra_fields = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.app_id = 0; object.online = false; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.server_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.server_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.server_steam_id = options.longs === String ? "0" : 0; + object.server_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.server_addr = 0; object.server_port = 0; object.os_type = 0; object.client_addr = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) object.online = message.online; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) - if (typeof message.server_steam_id === "number") - object.server_steam_id = options.longs === String ? String(message.server_steam_id) : message.server_steam_id; + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.server_steam_id = typeof message.server_steam_id === "number" ? $BigInt(message.server_steam_id) : $util.Long.fromBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.server_steam_id === "number") + object.server_steam_id = options.longs === $String ? $String(message.server_steam_id) : message.server_steam_id; else - object.server_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber() : message.server_steam_id; - if (message.server_addr != null && message.hasOwnProperty("server_addr")) + object.server_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === $Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber(true) : message.server_steam_id; + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) object.server_addr = message.server_addr; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) object.server_port = message.server_port; - if (message.os_type != null && message.hasOwnProperty("os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) object.os_type = message.os_type; - if (message.client_addr != null && message.hasOwnProperty("client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) object.client_addr = message.client_addr; if (message.extra_fields && message.extra_fields.length) { - object.extra_fields = []; + object.extra_fields = $Array(message.extra_fields.length); for (var j = 0; j < message.extra_fields.length; ++j) - object.extra_fields[j] = $root.CMsgGCHUpdateSession.ExtraField.toObject(message.extra_fields[j], options); + object.extra_fields[j] = $root.CMsgGCHUpdateSession.ExtraField.toObject(message.extra_fields[j], options, _depth + 1); } return object; }; @@ -20625,34 +26779,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHUpdateSession.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHUpdateSession.prototype.toJSON = function() { + return CMsgGCHUpdateSession.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHUpdateSession + * @function getTypeUrl + * @memberof CMsgGCHUpdateSession + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHUpdateSession.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHUpdateSession"; }; CMsgGCHUpdateSession.ExtraField = (function() { /** * Properties of an ExtraField. - * @memberof CMsgGCHUpdateSession - * @interface IExtraField + * @typedef {Object} CMsgGCHUpdateSession.ExtraField.$Properties * @property {string|null} [name] ExtraField name * @property {string|null} [value] ExtraField value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtraField. + * @memberof CMsgGCHUpdateSession + * @interface IExtraField + * @augments CMsgGCHUpdateSession.ExtraField.$Properties + * @deprecated Use CMsgGCHUpdateSession.ExtraField.$Properties instead. + */ + + /** + * Shape of an ExtraField. + * @typedef {CMsgGCHUpdateSession.ExtraField.$Properties} CMsgGCHUpdateSession.ExtraField.$Shape */ /** * Constructs a new ExtraField. * @memberof CMsgGCHUpdateSession * @classdesc Represents an ExtraField. - * @implements IExtraField * @constructor - * @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.ExtraField.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtraField(properties) { + var ExtraField = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtraField name. @@ -20675,10 +26856,14 @@ * @function create * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.ExtraField.$Properties=} [properties] Properties to set * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField instance + * @type {{ + * (properties: CMsgGCHUpdateSession.ExtraField.$Shape): CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape; + * (properties?: CMsgGCHUpdateSession.ExtraField.$Properties): CMsgGCHUpdateSession.ExtraField; + * }} */ - ExtraField.create = function create(properties) { + ExtraField.create = function(properties) { return new ExtraField(properties); }; @@ -20687,17 +26872,24 @@ * @function encode * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgGCHUpdateSession.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encode = function encode(message, writer) { + ExtraField.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20706,12 +26898,12 @@ * @function encodeDelimited * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgGCHUpdateSession.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtraField.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20721,28 +26913,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField + * @returns {CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decode = function decode(reader, length) { + ExtraField.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHUpdateSession.ExtraField(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHUpdateSession.ExtraField(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20752,11 +26964,11 @@ * @memberof CMsgGCHUpdateSession.ExtraField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField + * @returns {CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decodeDelimited = function decodeDelimited(reader) { + ExtraField.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20770,13 +26982,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtraField.verify = function verify(message) { + ExtraField.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -20790,14 +27006,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField */ - ExtraField.fromObject = function fromObject(object) { + ExtraField.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHUpdateSession.ExtraField) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHUpdateSession.ExtraField: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHUpdateSession.ExtraField(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -20810,17 +27032,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtraField.toObject = function toObject(message, options) { + ExtraField.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -20832,8 +27058,22 @@ * @instance * @returns {Object.} JSON object */ - ExtraField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtraField.prototype.toJSON = function() { + return ExtraField.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtraField + * @function getTypeUrl + * @memberof CMsgGCHUpdateSession.ExtraField + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtraField.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHUpdateSession.ExtraField"; }; return ExtraField; @@ -20846,27 +27086,40 @@ /** * Properties of a CMsgNotificationOfSuspiciousActivity. - * @exports ICMsgNotificationOfSuspiciousActivity - * @interface ICMsgNotificationOfSuspiciousActivity + * @typedef {Object} CMsgNotificationOfSuspiciousActivity.$Properties * @property {number|Long|null} [steamid] CMsgNotificationOfSuspiciousActivity steamid * @property {number|null} [appid] CMsgNotificationOfSuspiciousActivity appid - * @property {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null} [multiple_instances] CMsgNotificationOfSuspiciousActivity multiple_instances + * @property {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties|null} [multiple_instances] CMsgNotificationOfSuspiciousActivity multiple_instances + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgNotificationOfSuspiciousActivity. + * @exports ICMsgNotificationOfSuspiciousActivity + * @interface ICMsgNotificationOfSuspiciousActivity + * @augments CMsgNotificationOfSuspiciousActivity.$Properties + * @deprecated Use CMsgNotificationOfSuspiciousActivity.$Properties instead. + */ + + /** + * Shape of a CMsgNotificationOfSuspiciousActivity. + * @typedef {CMsgNotificationOfSuspiciousActivity.$Properties} CMsgNotificationOfSuspiciousActivity.$Shape */ /** * Constructs a new CMsgNotificationOfSuspiciousActivity. * @exports CMsgNotificationOfSuspiciousActivity * @classdesc Represents a CMsgNotificationOfSuspiciousActivity. - * @implements ICMsgNotificationOfSuspiciousActivity * @constructor - * @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotificationOfSuspiciousActivity(properties) { + var CMsgNotificationOfSuspiciousActivity = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgNotificationOfSuspiciousActivity steamid. @@ -20874,7 +27127,7 @@ * @memberof CMsgNotificationOfSuspiciousActivity * @instance */ - CMsgNotificationOfSuspiciousActivity.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgNotificationOfSuspiciousActivity.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgNotificationOfSuspiciousActivity appid. @@ -20886,7 +27139,7 @@ /** * CMsgNotificationOfSuspiciousActivity multiple_instances. - * @member {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null|undefined} multiple_instances + * @member {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties|null|undefined} multiple_instances * @memberof CMsgNotificationOfSuspiciousActivity * @instance */ @@ -20897,10 +27150,14 @@ * @function create * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.$Properties=} [properties] Properties to set * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity instance + * @type {{ + * (properties: CMsgNotificationOfSuspiciousActivity.$Shape): CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape; + * (properties?: CMsgNotificationOfSuspiciousActivity.$Properties): CMsgNotificationOfSuspiciousActivity; + * }} */ - CMsgNotificationOfSuspiciousActivity.create = function create(properties) { + CMsgNotificationOfSuspiciousActivity.create = function(properties) { return new CMsgNotificationOfSuspiciousActivity(properties); }; @@ -20909,19 +27166,26 @@ * @function encode * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity} message CMsgNotificationOfSuspiciousActivity message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.$Properties} message CMsgNotificationOfSuspiciousActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationOfSuspiciousActivity.encode = function encode(message, writer) { + CMsgNotificationOfSuspiciousActivity.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.multiple_instances != null && Object.hasOwnProperty.call(message, "multiple_instances")) - $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.encode(message.multiple_instances, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) + $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.encode(message.multiple_instances, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20930,12 +27194,12 @@ * @function encodeDelimited * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity} message CMsgNotificationOfSuspiciousActivity message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.$Properties} message CMsgNotificationOfSuspiciousActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationOfSuspiciousActivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotificationOfSuspiciousActivity.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20945,31 +27209,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity + * @returns {CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape} CMsgNotificationOfSuspiciousActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationOfSuspiciousActivity.decode = function decode(reader, length) { + CMsgNotificationOfSuspiciousActivity.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationOfSuspiciousActivity(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationOfSuspiciousActivity(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.decode(reader, reader.uint32(), $undefined, _depth + 1, message.multiple_instances); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20979,11 +27266,11 @@ * @memberof CMsgNotificationOfSuspiciousActivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity + * @returns {CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape} CMsgNotificationOfSuspiciousActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationOfSuspiciousActivity.decodeDelimited = function decodeDelimited(reader) { + CMsgNotificationOfSuspiciousActivity.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20997,17 +27284,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotificationOfSuspiciousActivity.verify = function verify(message) { + CMsgNotificationOfSuspiciousActivity.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.multiple_instances != null && message.hasOwnProperty("multiple_instances")) { - var error = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify(message.multiple_instances); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) { + var error = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify(message.multiple_instances, _depth + 1); if (error) return "multiple_instances." + error; } @@ -21022,25 +27313,31 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity */ - CMsgNotificationOfSuspiciousActivity.fromObject = function fromObject(object) { + CMsgNotificationOfSuspiciousActivity.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationOfSuspiciousActivity) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotificationOfSuspiciousActivity(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.multiple_instances != null) { - if (typeof object.multiple_instances !== "object") - throw TypeError(".CMsgNotificationOfSuspiciousActivity.multiple_instances: object expected"); - message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.fromObject(object.multiple_instances); + if (!$util.isObject(object.multiple_instances)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.multiple_instances: object expected"); + message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.fromObject(object.multiple_instances, _depth + 1); } return message; }; @@ -21054,28 +27351,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotificationOfSuspiciousActivity.toObject = function toObject(message, options) { + CMsgNotificationOfSuspiciousActivity.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.multiple_instances = null; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.multiple_instances != null && message.hasOwnProperty("multiple_instances")) - object.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.toObject(message.multiple_instances, options); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) + object.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.toObject(message.multiple_instances, options, _depth + 1); return object; }; @@ -21086,35 +27389,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotificationOfSuspiciousActivity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotificationOfSuspiciousActivity.prototype.toJSON = function() { + return CMsgNotificationOfSuspiciousActivity.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotificationOfSuspiciousActivity + * @function getTypeUrl + * @memberof CMsgNotificationOfSuspiciousActivity + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotificationOfSuspiciousActivity.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationOfSuspiciousActivity"; }; CMsgNotificationOfSuspiciousActivity.MultipleGameInstances = (function() { /** * Properties of a MultipleGameInstances. - * @memberof CMsgNotificationOfSuspiciousActivity - * @interface IMultipleGameInstances + * @typedef {Object} CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties * @property {number|null} [app_instance_count] MultipleGameInstances app_instance_count * @property {Array.|null} [other_steamids] MultipleGameInstances other_steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MultipleGameInstances. + * @memberof CMsgNotificationOfSuspiciousActivity + * @interface IMultipleGameInstances + * @augments CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties + * @deprecated Use CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties instead. + */ + + /** + * Shape of a MultipleGameInstances. + * @typedef {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape */ /** * Constructs a new MultipleGameInstances. * @memberof CMsgNotificationOfSuspiciousActivity * @classdesc Represents a MultipleGameInstances. - * @implements IMultipleGameInstances * @constructor - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MultipleGameInstances(properties) { + var MultipleGameInstances = function (properties) { this.other_steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MultipleGameInstances app_instance_count. @@ -21137,10 +27467,14 @@ * @function create * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties=} [properties] Properties to set * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances instance + * @type {{ + * (properties: CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape): CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape; + * (properties?: CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties): CMsgNotificationOfSuspiciousActivity.MultipleGameInstances; + * }} */ - MultipleGameInstances.create = function create(properties) { + MultipleGameInstances.create = function(properties) { return new MultipleGameInstances(properties); }; @@ -21149,18 +27483,25 @@ * @function encode * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} message MultipleGameInstances message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} message MultipleGameInstances message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultipleGameInstances.encode = function encode(message, writer) { + MultipleGameInstances.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_instance_count != null && Object.hasOwnProperty.call(message, "app_instance_count")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_instance_count); if (message.other_steamids != null && message.other_steamids.length) for (var i = 0; i < message.other_steamids.length; ++i) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.other_steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21169,12 +27510,12 @@ * @function encodeDelimited * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} message MultipleGameInstances message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} message MultipleGameInstances message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultipleGameInstances.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MultipleGameInstances.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21184,35 +27525,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances + * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape} MultipleGameInstances * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultipleGameInstances.decode = function decode(reader, length) { + MultipleGameInstances.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_instance_count = reader.uint32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.other_steamids && message.other_steamids.length)) - message.other_steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.other_steamids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_instance_count = reader.uint32(); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.other_steamids && message.other_steamids.length)) + message.other_steamids = []; + reader.fixed64s(message.other_steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.other_steamids && message.other_steamids.length)) + message.other_steamids = []; message.other_steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21222,11 +27584,11 @@ * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances + * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape} MultipleGameInstances * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultipleGameInstances.decodeDelimited = function decodeDelimited(reader) { + MultipleGameInstances.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21240,14 +27602,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MultipleGameInstances.verify = function verify(message) { + MultipleGameInstances.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_instance_count != null && message.hasOwnProperty("app_instance_count")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) if (!$util.isInteger(message.app_instance_count)) return "app_instance_count: integer expected"; - if (message.other_steamids != null && message.hasOwnProperty("other_steamids")) { - if (!Array.isArray(message.other_steamids)) + if (message.other_steamids != null && $Object.hasOwnProperty.call(message, "other_steamids")) { + if (!$Array.isArray(message.other_steamids)) return "other_steamids: array expected"; for (var i = 0; i < message.other_steamids.length; ++i) if (!$util.isInteger(message.other_steamids[i]) && !(message.other_steamids[i] && $util.isInteger(message.other_steamids[i].low) && $util.isInteger(message.other_steamids[i].high))) @@ -21264,25 +27630,31 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances */ - MultipleGameInstances.fromObject = function fromObject(object) { + MultipleGameInstances.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); if (object.app_instance_count != null) message.app_instance_count = object.app_instance_count >>> 0; if (object.other_steamids) { - if (!Array.isArray(object.other_steamids)) - throw TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.other_steamids: array expected"); - message.other_steamids = []; + if (!$Array.isArray(object.other_steamids)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.other_steamids: array expected"); + message.other_steamids = $Array(object.other_steamids.length); for (var i = 0; i < object.other_steamids.length; ++i) if ($util.Long) - (message.other_steamids[i] = $util.Long.fromValue(object.other_steamids[i])).unsigned = false; + message.other_steamids[i] = $util.Long.fromValue(object.other_steamids[i], true); else if (typeof object.other_steamids[i] === "string") - message.other_steamids[i] = parseInt(object.other_steamids[i], 10); + message.other_steamids[i] = $parseInt(object.other_steamids[i], 10); else if (typeof object.other_steamids[i] === "number") message.other_steamids[i] = object.other_steamids[i]; else if (typeof object.other_steamids[i] === "object") - message.other_steamids[i] = new $util.LongBits(object.other_steamids[i].low >>> 0, object.other_steamids[i].high >>> 0).toNumber(); + message.other_steamids[i] = new $util.LongBits(object.other_steamids[i].low >>> 0, object.other_steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -21296,23 +27668,29 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MultipleGameInstances.toObject = function toObject(message, options) { + MultipleGameInstances.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.other_steamids = []; if (options.defaults) object.app_instance_count = 0; - if (message.app_instance_count != null && message.hasOwnProperty("app_instance_count")) + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) object.app_instance_count = message.app_instance_count; if (message.other_steamids && message.other_steamids.length) { - object.other_steamids = []; + object.other_steamids = $Array(message.other_steamids.length); for (var j = 0; j < message.other_steamids.length; ++j) - if (typeof message.other_steamids[j] === "number") - object.other_steamids[j] = options.longs === String ? String(message.other_steamids[j]) : message.other_steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.other_steamids[j] = typeof message.other_steamids[j] === "number" ? $BigInt(message.other_steamids[j]) : $util.Long.fromBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.other_steamids[j] === "number") + object.other_steamids[j] = options.longs === $String ? $String(message.other_steamids[j]) : message.other_steamids[j]; else - object.other_steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.other_steamids[j]) : options.longs === Number ? new $util.LongBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0).toNumber() : message.other_steamids[j]; + object.other_steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.other_steamids[j]) : options.longs === $Number ? new $util.LongBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0).toNumber(true) : message.other_steamids[j]; } return object; }; @@ -21324,8 +27702,22 @@ * @instance * @returns {Object.} JSON object */ - MultipleGameInstances.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MultipleGameInstances.prototype.toJSON = function() { + return MultipleGameInstances.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MultipleGameInstances + * @function getTypeUrl + * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MultipleGameInstances.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationOfSuspiciousActivity.MultipleGameInstances"; }; return MultipleGameInstances; @@ -21354,32 +27746,45 @@ protobuf.FileDescriptorSet = (function() { + /** + * Properties of a FileDescriptorSet. + * @typedef {Object} google.protobuf.FileDescriptorSet.$Properties + * @property {Array.|null} [file] FileDescriptorSet file + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a FileDescriptorSet. * @memberof google.protobuf * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @augments google.protobuf.FileDescriptorSet.$Properties + * @deprecated Use google.protobuf.FileDescriptorSet.$Properties instead. + */ + + /** + * Shape of a FileDescriptorSet. + * @typedef {google.protobuf.FileDescriptorSet.$Properties} google.protobuf.FileDescriptorSet.$Shape */ /** * Constructs a new FileDescriptorSet. * @memberof google.protobuf * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorSet(properties) { + var FileDescriptorSet = function (properties) { this.file = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorSet file. - * @member {Array.} file + * @member {Array.} file * @memberof google.protobuf.FileDescriptorSet * @instance */ @@ -21390,10 +27795,14 @@ * @function create * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @type {{ + * (properties: google.protobuf.FileDescriptorSet.$Shape): google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape; + * (properties?: google.protobuf.FileDescriptorSet.$Properties): google.protobuf.FileDescriptorSet; + * }} */ - FileDescriptorSet.create = function create(properties) { + FileDescriptorSet.create = function(properties) { return new FileDescriptorSet(properties); }; @@ -21402,16 +27811,23 @@ * @function encode * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + FileDescriptorSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.file != null && message.file.length) for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21420,12 +27836,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21435,27 +27851,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decode = function decode(reader, length) { + FileDescriptorSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21465,11 +27898,11 @@ * @memberof google.protobuf.FileDescriptorSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21483,14 +27916,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorSet.verify = function verify(message) { + FileDescriptorSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.file != null && $Object.hasOwnProperty.call(message, "file")) { + if (!$Array.isArray(message.file)) return "file: array expected"; for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i], _depth + 1); if (error) return "file." + error; } @@ -21506,18 +27943,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - FileDescriptorSet.fromObject = function fromObject(object) { + FileDescriptorSet.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorSet(); if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; + if (!$Array.isArray(object.file)) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = $Array(object.file.length); for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + if (!$util.isObject(object.file[i])) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], _depth + 1); } } return message; @@ -21532,16 +27975,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + FileDescriptorSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.file = []; if (message.file && message.file.length) { - object.file = []; + object.file = $Array(message.file.length); for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options, _depth + 1); } return object; }; @@ -21553,8 +28000,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorSet.prototype.toJSON = function() { + return FileDescriptorSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorSet"; }; return FileDescriptorSet; @@ -21564,38 +28025,51 @@ /** * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto + * @typedef {Object} google.protobuf.FileDescriptorProto.$Properties * @property {string|null} [name] FileDescriptorProto name * @property {string|null} ["package"] FileDescriptorProto package * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.|null} [message_type] FileDescriptorProto message_type + * @property {Array.|null} [enum_type] FileDescriptorProto enum_type + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.FileOptions.$Properties|null} [options] FileDescriptorProto options + * @property {google.protobuf.SourceCodeInfo.$Properties|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @augments google.protobuf.FileDescriptorProto.$Properties + * @deprecated Use google.protobuf.FileDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FileDescriptorProto. + * @typedef {google.protobuf.FileDescriptorProto.$Properties} google.protobuf.FileDescriptorProto.$Shape */ /** * Constructs a new FileDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorProto(properties) { + var FileDescriptorProto = function (properties) { this.dependency = []; this.message_type = []; this.enum_type = []; this.service = []; this.extension = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorProto name. @@ -21623,7 +28097,7 @@ /** * FileDescriptorProto message_type. - * @member {Array.} message_type + * @member {Array.} message_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -21631,7 +28105,7 @@ /** * FileDescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -21639,7 +28113,7 @@ /** * FileDescriptorProto service. - * @member {Array.} service + * @member {Array.} service * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -21647,7 +28121,7 @@ /** * FileDescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -21655,7 +28129,7 @@ /** * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options + * @member {google.protobuf.FileOptions.$Properties|null|undefined} options * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -21663,7 +28137,7 @@ /** * FileDescriptorProto source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info + * @member {google.protobuf.SourceCodeInfo.$Properties|null|undefined} source_code_info * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -21674,10 +28148,14 @@ * @function create * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FileDescriptorProto.$Shape): google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape; + * (properties?: google.protobuf.FileDescriptorProto.$Properties): google.protobuf.FileDescriptorProto; + * }} */ - FileDescriptorProto.create = function create(properties) { + FileDescriptorProto.create = function(properties) { return new FileDescriptorProto(properties); }; @@ -21686,36 +28164,43 @@ * @function encode * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + FileDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); if (message.dependency != null && message.dependency.length) for (var i = 0; i < message.dependency.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); if (message.message_type != null && message.message_type.length) for (var i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.service != null && message.service.length) for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21724,12 +28209,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21739,59 +28224,100 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decode = function decode(reader, length) { + FileDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message["package"] = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.message_type && message.message_type.length)) + message.message_type = []; + message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.source_code_info); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21801,11 +28327,11 @@ * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21819,65 +28345,69 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorProto.verify = function verify(message) { + FileDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) if (!$util.isString(message["package"])) return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) + if (message.dependency != null && $Object.hasOwnProperty.call(message, "dependency")) { + if (!$Array.isArray(message.dependency)) return "dependency: array expected"; for (var i = 0; i < message.dependency.length; ++i) if (!$util.isString(message.dependency[i])) return "dependency: string[] expected"; } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) + if (message.message_type != null && $Object.hasOwnProperty.call(message, "message_type")) { + if (!$Array.isArray(message.message_type)) return "message_type: array expected"; for (var i = 0; i < message.message_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i], _depth + 1); if (error) return "message_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) + if (message.service != null && $Object.hasOwnProperty.call(message, "service")) { + if (!$Array.isArray(message.service)) return "service: array expected"; for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i], _depth + 1); if (error) return "service." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info, _depth + 1); if (error) return "source_code_info." + error; } @@ -21892,70 +28422,76 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - FileDescriptorProto.fromObject = function fromObject(object) { + FileDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object["package"] != null) - message["package"] = String(object["package"]); + message["package"] = $String(object["package"]); if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; + if (!$Array.isArray(object.dependency)) + throw $TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = $Array(object.dependency.length); for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); + message.dependency[i] = $String(object.dependency[i]); } if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; + if (!$Array.isArray(object.message_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); + message.message_type = $Array(object.message_type.length); for (var i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); + if (!$util.isObject(object.message_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); + message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; + if (!$Array.isArray(object.service)) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = $Array(object.service.length); for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + if (!$util.isObject(object.service[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options, _depth + 1); } if (object.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); + if (!$util.isObject(object.source_code_info)) + throw $TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); + message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info, _depth + 1); } return message; }; @@ -21969,9 +28505,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.dependency = []; @@ -21986,39 +28526,39 @@ object.options = null; object.source_code_info = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; if (message.dependency && message.dependency.length) { - object.dependency = []; + object.dependency = $Array(message.dependency.length); for (var j = 0; j < message.dependency.length; ++j) object.dependency[j] = message.dependency[j]; } if (message.message_type && message.message_type.length) { - object.message_type = []; + object.message_type = $Array(message.message_type.length); for (var j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); + object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.service && message.service.length) { - object.service = []; + object.service = $Array(message.service.length); for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, _depth + 1); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options, _depth + 1); return object; }; @@ -22029,8 +28569,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorProto.prototype.toJSON = function() { + return FileDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorProto"; }; return FileDescriptorProto; @@ -22038,38 +28592,51 @@ protobuf.DescriptorProto = (function() { + /** + * Properties of a DescriptorProto. + * @typedef {Object} google.protobuf.DescriptorProto.$Properties + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nested_type] DescriptorProto nested_type + * @property {Array.|null} [enum_type] DescriptorProto enum_type + * @property {Array.|null} [extension_range] DescriptorProto extension_range + * @property {google.protobuf.MessageOptions.$Properties|null} [options] DescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a DescriptorProto. * @memberof google.protobuf * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @augments google.protobuf.DescriptorProto.$Properties + * @deprecated Use google.protobuf.DescriptorProto.$Properties instead. + */ + + /** + * Shape of a DescriptorProto. + * @typedef {google.protobuf.DescriptorProto.$Properties} google.protobuf.DescriptorProto.$Shape */ /** * Constructs a new DescriptorProto. * @memberof google.protobuf * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function DescriptorProto(properties) { + var DescriptorProto = function (properties) { this.field = []; this.extension = []; this.nested_type = []; this.enum_type = []; this.extension_range = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * DescriptorProto name. @@ -22081,7 +28648,7 @@ /** * DescriptorProto field. - * @member {Array.} field + * @member {Array.} field * @memberof google.protobuf.DescriptorProto * @instance */ @@ -22089,7 +28656,7 @@ /** * DescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.DescriptorProto * @instance */ @@ -22097,7 +28664,7 @@ /** * DescriptorProto nested_type. - * @member {Array.} nested_type + * @member {Array.} nested_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -22105,7 +28672,7 @@ /** * DescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -22113,7 +28680,7 @@ /** * DescriptorProto extension_range. - * @member {Array.} extension_range + * @member {Array.} extension_range * @memberof google.protobuf.DescriptorProto * @instance */ @@ -22121,7 +28688,7 @@ /** * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options + * @member {google.protobuf.MessageOptions.$Properties|null|undefined} options * @memberof google.protobuf.DescriptorProto * @instance */ @@ -22132,10 +28699,14 @@ * @function create * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.$Shape): google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape; + * (properties?: google.protobuf.DescriptorProto.$Properties): google.protobuf.DescriptorProto; + * }} */ - DescriptorProto.create = function create(properties) { + DescriptorProto.create = function(properties) { return new DescriptorProto(properties); }; @@ -22144,32 +28715,39 @@ * @function encode * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + DescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); if (message.nested_type != null && message.nested_type.length) for (var i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.extension_range != null && message.extension_range.length) for (var i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22178,12 +28756,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22193,53 +28771,88 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decode = function decode(reader, length) { + DescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.nested_type && message.nested_type.length)) + message.nested_type = []; + message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.extension_range && message.extension_range.length)) + message.extension_range = []; + message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22249,11 +28862,11 @@ * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + DescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22267,59 +28880,63 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DescriptorProto.verify = function verify(message) { + DescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) { + if (!$Array.isArray(message.field)) return "field: array expected"; for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i], _depth + 1); if (error) return "field." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) + if (message.nested_type != null && $Object.hasOwnProperty.call(message, "nested_type")) { + if (!$Array.isArray(message.nested_type)) return "nested_type: array expected"; for (var i = 0; i < message.nested_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i], _depth + 1); if (error) return "nested_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) + if (message.extension_range != null && $Object.hasOwnProperty.call(message, "extension_range")) { + if (!$Array.isArray(message.extension_range)) return "extension_range: array expected"; for (var i = 0; i < message.extension_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i], _depth + 1); if (error) return "extension_range." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -22334,66 +28951,72 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto} DescriptorProto */ - DescriptorProto.fromObject = function fromObject(object) { + DescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; + if (!$Array.isArray(object.field)) + throw $TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = $Array(object.field.length); for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + if (!$util.isObject(object.field[i])) + throw $TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; + if (!$Array.isArray(object.nested_type)) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); + message.nested_type = $Array(object.nested_type.length); for (var i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); + if (!$util.isObject(object.nested_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); + message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; + if (!$Array.isArray(object.extension_range)) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); + message.extension_range = $Array(object.extension_range.length); for (var i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); + if (!$util.isObject(object.extension_range[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); + message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -22407,9 +29030,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + DescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.field = []; @@ -22422,35 +29049,35 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.field && message.field.length) { - object.field = []; + object.field = $Array(message.field.length); for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options, _depth + 1); } if (message.nested_type && message.nested_type.length) { - object.nested_type = []; + object.nested_type = $Array(message.nested_type.length); for (var j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); + object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.extension_range && message.extension_range.length) { - object.extension_range = []; + object.extension_range = $Array(message.extension_range.length); for (var j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options); + object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -22461,34 +29088,61 @@ * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + DescriptorProto.prototype.toJSON = function() { + return DescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + DescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto"; }; DescriptorProto.ExtensionRange = (function() { /** * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange + * @typedef {Object} google.protobuf.DescriptorProto.ExtensionRange.$Properties * @property {number|null} [start] ExtensionRange start * @property {number|null} [end] ExtensionRange end + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @augments google.protobuf.DescriptorProto.ExtensionRange.$Properties + * @deprecated Use google.protobuf.DescriptorProto.ExtensionRange.$Properties instead. + */ + + /** + * Shape of an ExtensionRange. + * @typedef {google.protobuf.DescriptorProto.ExtensionRange.$Properties} google.protobuf.DescriptorProto.ExtensionRange.$Shape */ /** * Constructs a new ExtensionRange. * @memberof google.protobuf.DescriptorProto * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtensionRange(properties) { + var ExtensionRange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtensionRange start. @@ -22511,10 +29165,14 @@ * @function create * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.ExtensionRange.$Shape): google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape; + * (properties?: google.protobuf.DescriptorProto.ExtensionRange.$Properties): google.protobuf.DescriptorProto.ExtensionRange; + * }} */ - ExtensionRange.create = function create(properties) { + ExtensionRange.create = function(properties) { return new ExtensionRange(properties); }; @@ -22523,17 +29181,24 @@ * @function encode * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encode = function encode(message, writer) { + ExtensionRange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22542,12 +29207,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtensionRange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22557,28 +29222,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decode = function decode(reader, length) { + ExtensionRange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto.ExtensionRange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.start = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.end = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22588,11 +29273,11 @@ * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + ExtensionRange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22606,13 +29291,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtensionRange.verify = function verify(message) { + ExtensionRange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -22626,9 +29315,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange */ - ExtensionRange.fromObject = function fromObject(object) { + ExtensionRange.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); if (object.start != null) message.start = object.start | 0; @@ -22646,17 +29341,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRange.toObject = function toObject(message, options) { + ExtensionRange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -22668,8 +29367,22 @@ * @instance * @returns {Object.} JSON object */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtensionRange.prototype.toJSON = function() { + return ExtensionRange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtensionRange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto.ExtensionRange"; }; return ExtensionRange; @@ -22682,8 +29395,7 @@ /** * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto + * @typedef {Object} google.protobuf.FieldDescriptorProto.$Properties * @property {string|null} [name] FieldDescriptorProto name * @property {number|null} [number] FieldDescriptorProto number * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label @@ -22691,23 +29403,37 @@ * @property {string|null} [type_name] FieldDescriptorProto type_name * @property {string|null} [extendee] FieldDescriptorProto extendee * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {google.protobuf.FieldOptions.$Properties|null} [options] FieldDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @augments google.protobuf.FieldDescriptorProto.$Properties + * @deprecated Use google.protobuf.FieldDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FieldDescriptorProto. + * @typedef {google.protobuf.FieldDescriptorProto.$Properties} google.protobuf.FieldDescriptorProto.$Shape */ /** * Constructs a new FieldDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FieldDescriptorProto(properties) { + var FieldDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldDescriptorProto name. @@ -22767,7 +29493,7 @@ /** * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options + * @member {google.protobuf.FieldOptions.$Properties|null|undefined} options * @memberof google.protobuf.FieldDescriptorProto * @instance */ @@ -22778,10 +29504,14 @@ * @function create * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FieldDescriptorProto.$Shape): google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape; + * (properties?: google.protobuf.FieldDescriptorProto.$Properties): google.protobuf.FieldDescriptorProto; + * }} */ - FieldDescriptorProto.create = function create(properties) { + FieldDescriptorProto.create = function(properties) { return new FieldDescriptorProto(properties); }; @@ -22790,29 +29520,36 @@ * @function encode * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + FieldDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.type_name != null && Object.hasOwnProperty.call(message, "type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22821,12 +29558,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22836,46 +29573,96 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decode = function decode(reader, length) { + FieldDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldDescriptorProto(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Label[value] !== $undefined) + message.label = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 5: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Type[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 6: { + if (wireType !== 2) + break; + message.type_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.extendee = reader.string(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.default_value = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22885,11 +29672,11 @@ * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FieldDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22903,16 +29690,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldDescriptorProto.verify = function verify(message) { + FieldDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) switch (message.label) { default: return "label: enum value expected"; @@ -22921,7 +29712,7 @@ case 3: break; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -22945,17 +29736,17 @@ case 18: break; } - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) if (!$util.isString(message.type_name)) return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) if (!$util.isString(message.extendee)) return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) if (!$util.isString(message.default_value)) return "default_value: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -22970,12 +29761,18 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - FieldDescriptorProto.fromObject = function fromObject(object) { + FieldDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; switch (object.label) { @@ -22991,6 +29788,7 @@ case 3: message.label = 3; break; + default: } switch (object.type) { case "TYPE_DOUBLE": @@ -23065,17 +29863,18 @@ case 18: message.type = 18; break; + default: } if (object.type_name != null) - message.type_name = String(object.type_name); + message.type_name = $String(object.type_name); if (object.extendee != null) - message.extendee = String(object.extendee); + message.extendee = $String(object.extendee); if (object.default_value != null) - message.default_value = String(object.default_value); + message.default_value = $String(object.default_value); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -23089,36 +29888,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + FieldDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.extendee = ""; object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.label = options.enums === $String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === $String ? "TYPE_DOUBLE" : 1; object.type_name = ""; object.default_value = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) + object.label = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === $undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === $undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -23129,8 +29932,22 @@ * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldDescriptorProto.prototype.toJSON = function() { + return FieldDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldDescriptorProto"; }; /** @@ -23157,7 +29974,7 @@ * @property {number} TYPE_SINT64=18 TYPE_SINT64 value */ FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "TYPE_DOUBLE"] = 1; values[valuesById[2] = "TYPE_FLOAT"] = 2; values[valuesById[3] = "TYPE_INT64"] = 3; @@ -23188,7 +30005,7 @@ * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value */ FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "LABEL_OPTIONAL"] = 1; values[valuesById[2] = "LABEL_REQUIRED"] = 2; values[valuesById[3] = "LABEL_REPEATED"] = 3; @@ -23200,30 +30017,43 @@ protobuf.EnumDescriptorProto = (function() { + /** + * Properties of an EnumDescriptorProto. + * @typedef {Object} google.protobuf.EnumDescriptorProto.$Properties + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.EnumOptions.$Properties|null} [options] EnumDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumDescriptorProto. * @memberof google.protobuf * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @augments google.protobuf.EnumDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumDescriptorProto. + * @typedef {google.protobuf.EnumDescriptorProto.$Properties} google.protobuf.EnumDescriptorProto.$Shape */ /** * Constructs a new EnumDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumDescriptorProto(properties) { + var EnumDescriptorProto = function (properties) { this.value = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumDescriptorProto name. @@ -23235,7 +30065,7 @@ /** * EnumDescriptorProto value. - * @member {Array.} value + * @member {Array.} value * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -23243,7 +30073,7 @@ /** * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options + * @member {google.protobuf.EnumOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -23254,10 +30084,14 @@ * @function create * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumDescriptorProto.$Shape): google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumDescriptorProto.$Properties): google.protobuf.EnumDescriptorProto; + * }} */ - EnumDescriptorProto.create = function create(properties) { + EnumDescriptorProto.create = function(properties) { return new EnumDescriptorProto(properties); }; @@ -23266,20 +30100,27 @@ * @function encode * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + EnumDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23288,12 +30129,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23303,33 +30144,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decode = function decode(reader, length) { + EnumDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23339,11 +30203,11 @@ * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23357,23 +30221,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumDescriptorProto.verify = function verify(message) { + EnumDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) { + if (!$Array.isArray(message.value)) return "value: array expected"; for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i], _depth + 1); if (error) return "value." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -23388,26 +30256,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - EnumDescriptorProto.fromObject = function fromObject(object) { + EnumDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; + if (!$Array.isArray(object.value)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = $Array(object.value.length); for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + if (!$util.isObject(object.value[i])) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -23421,9 +30295,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.value = []; @@ -23431,15 +30309,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.value && message.value.length) { - object.value = []; + object.value = $Array(message.value.length); for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -23450,8 +30328,22 @@ * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumDescriptorProto.prototype.toJSON = function() { + return EnumDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumDescriptorProto"; }; return EnumDescriptorProto; @@ -23461,27 +30353,40 @@ /** * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto + * @typedef {Object} google.protobuf.EnumValueDescriptorProto.$Properties * @property {string|null} [name] EnumValueDescriptorProto name * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + * @property {google.protobuf.EnumValueOptions.$Properties|null} [options] EnumValueDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @augments google.protobuf.EnumValueDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumValueDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumValueDescriptorProto. + * @typedef {google.protobuf.EnumValueDescriptorProto.$Properties} google.protobuf.EnumValueDescriptorProto.$Shape */ /** * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueDescriptorProto(properties) { + var EnumValueDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueDescriptorProto name. @@ -23501,7 +30406,7 @@ /** * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @member {google.protobuf.EnumValueOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ @@ -23512,10 +30417,14 @@ * @function create * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumValueDescriptorProto.$Shape): google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumValueDescriptorProto.$Properties): google.protobuf.EnumValueDescriptorProto; + * }} */ - EnumValueDescriptorProto.create = function create(properties) { + EnumValueDescriptorProto.create = function(properties) { return new EnumValueDescriptorProto(properties); }; @@ -23524,19 +30433,26 @@ * @function encode * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer) { + EnumValueDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23545,12 +30461,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23560,31 +30476,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decode = function decode(reader, length) { + EnumValueDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23594,11 +30533,11 @@ * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumValueDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23612,17 +30551,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueDescriptorProto.verify = function verify(message) { + EnumValueDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -23637,18 +30580,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { + EnumValueDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -23662,21 +30611,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + EnumValueDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.number = 0; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -23687,8 +30640,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueDescriptorProto.prototype.toJSON = function() { + return EnumValueDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueDescriptorProto"; }; return EnumValueDescriptorProto; @@ -23696,30 +30663,43 @@ protobuf.ServiceDescriptorProto = (function() { + /** + * Properties of a ServiceDescriptorProto. + * @typedef {Object} google.protobuf.ServiceDescriptorProto.$Properties + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.ServiceOptions.$Properties|null} [options] ServiceDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceDescriptorProto. * @memberof google.protobuf * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + * @augments google.protobuf.ServiceDescriptorProto.$Properties + * @deprecated Use google.protobuf.ServiceDescriptorProto.$Properties instead. + */ + + /** + * Shape of a ServiceDescriptorProto. + * @typedef {google.protobuf.ServiceDescriptorProto.$Properties} google.protobuf.ServiceDescriptorProto.$Shape */ /** * Constructs a new ServiceDescriptorProto. * @memberof google.protobuf * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceDescriptorProto(properties) { + var ServiceDescriptorProto = function (properties) { this.method = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceDescriptorProto name. @@ -23731,7 +30711,7 @@ /** * ServiceDescriptorProto method. - * @member {Array.} method + * @member {Array.} method * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -23739,7 +30719,7 @@ /** * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options + * @member {google.protobuf.ServiceOptions.$Properties|null|undefined} options * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -23750,10 +30730,14 @@ * @function create * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @type {{ + * (properties: google.protobuf.ServiceDescriptorProto.$Shape): google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape; + * (properties?: google.protobuf.ServiceDescriptorProto.$Properties): google.protobuf.ServiceDescriptorProto; + * }} */ - ServiceDescriptorProto.create = function create(properties) { + ServiceDescriptorProto.create = function(properties) { return new ServiceDescriptorProto(properties); }; @@ -23762,20 +30746,27 @@ * @function encode * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + ServiceDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23784,12 +30775,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23799,33 +30790,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decode = function decode(reader, length) { + ServiceDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23835,11 +30849,11 @@ * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ServiceDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23853,23 +30867,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceDescriptorProto.verify = function verify(message) { + ServiceDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) { + if (!$Array.isArray(message.method)) return "method: array expected"; for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i], _depth + 1); if (error) return "method." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -23884,26 +30902,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - ServiceDescriptorProto.fromObject = function fromObject(object) { + ServiceDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; + if (!$Array.isArray(object.method)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = $Array(object.method.length); for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + if (!$util.isObject(object.method[i])) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -23917,9 +30941,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.method = []; @@ -23927,15 +30955,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.method && message.method.length) { - object.method = []; + object.method = $Array(message.method.length); for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -23946,8 +30974,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceDescriptorProto.prototype.toJSON = function() { + return ServiceDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceDescriptorProto"; }; return ServiceDescriptorProto; @@ -23957,28 +30999,41 @@ /** * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto + * @typedef {Object} google.protobuf.MethodDescriptorProto.$Properties * @property {string|null} [name] MethodDescriptorProto name * @property {string|null} [input_type] MethodDescriptorProto input_type * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {google.protobuf.MethodOptions.$Properties|null} [options] MethodDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @augments google.protobuf.MethodDescriptorProto.$Properties + * @deprecated Use google.protobuf.MethodDescriptorProto.$Properties instead. + */ + + /** + * Shape of a MethodDescriptorProto. + * @typedef {google.protobuf.MethodDescriptorProto.$Properties} google.protobuf.MethodDescriptorProto.$Shape */ /** * Constructs a new MethodDescriptorProto. * @memberof google.protobuf * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodDescriptorProto(properties) { + var MethodDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodDescriptorProto name. @@ -24006,7 +31061,7 @@ /** * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options + * @member {google.protobuf.MethodOptions.$Properties|null|undefined} options * @memberof google.protobuf.MethodDescriptorProto * @instance */ @@ -24017,10 +31072,14 @@ * @function create * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @type {{ + * (properties: google.protobuf.MethodDescriptorProto.$Shape): google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape; + * (properties?: google.protobuf.MethodDescriptorProto.$Properties): google.protobuf.MethodDescriptorProto; + * }} */ - MethodDescriptorProto.create = function create(properties) { + MethodDescriptorProto.create = function(properties) { return new MethodDescriptorProto(properties); }; @@ -24029,21 +31088,28 @@ * @function encode * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + MethodDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.input_type != null && Object.hasOwnProperty.call(message, "input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24052,12 +31118,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24067,34 +31133,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decode = function decode(reader, length) { + MethodDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.input_type = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.output_type = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24104,11 +31196,11 @@ * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MethodDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24122,20 +31214,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodDescriptorProto.verify = function verify(message) { + MethodDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) if (!$util.isString(message.input_type)) return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) if (!$util.isString(message.output_type)) return "output_type: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -24150,20 +31246,26 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - MethodDescriptorProto.fromObject = function fromObject(object) { + MethodDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.input_type != null) - message.input_type = String(object.input_type); + message.input_type = $String(object.input_type); if (object.output_type != null) - message.output_type = String(object.output_type); + message.output_type = $String(object.output_type); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -24177,9 +31279,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -24187,14 +31293,14 @@ object.output_type = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -24205,8 +31311,22 @@ * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodDescriptorProto.prototype.toJSON = function() { + return MethodDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodDescriptorProto"; }; return MethodDescriptorProto; @@ -24216,8 +31336,7 @@ /** * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions + * @typedef {Object} google.protobuf.FileOptions.$Properties * @property {string|null} [java_package] FileOptions java_package * @property {string|null} [java_outer_classname] FileOptions java_outer_classname * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files @@ -24226,24 +31345,38 @@ * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services * @property {boolean|null} [java_generic_services] FileOptions java_generic_services * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @augments google.protobuf.FileOptions.$Properties + * @deprecated Use google.protobuf.FileOptions.$Properties instead. + */ + + /** + * Shape of a FileOptions. + * @typedef {google.protobuf.FileOptions.$Properties} google.protobuf.FileOptions.$Shape */ /** * Constructs a new FileOptions. * @memberof google.protobuf * @classdesc Represents a FileOptions. - * @implements IFileOptions * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileOptions(properties) { + var FileOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileOptions java_package. @@ -24311,7 +31444,7 @@ /** * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FileOptions * @instance */ @@ -24322,10 +31455,14 @@ * @function create * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileOptions} FileOptions instance + * @type {{ + * (properties: google.protobuf.FileOptions.$Shape): google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape; + * (properties?: google.protobuf.FileOptions.$Properties): google.protobuf.FileOptions; + * }} */ - FileOptions.create = function create(properties) { + FileOptions.create = function(properties) { return new FileOptions(properties); }; @@ -24334,32 +31471,39 @@ * @function encode * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + FileOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.java_package != null && Object.hasOwnProperty.call(message, "java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24368,12 +31512,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24383,51 +31527,98 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decode = function decode(reader, length) { + FileOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.java_package = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.java_outer_classname = reader.string(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.java_multiple_files = reader.bool(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.java_generate_equals_and_hash = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FileOptions.OptimizeMode[value] !== $undefined) + message.optimize_for = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 16: { + if (wireType !== 0) + break; + message.cc_generic_services = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.java_generic_services = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.py_generic_services = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24437,11 +31628,11 @@ * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24455,22 +31646,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileOptions.verify = function verify(message) { + FileOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) if (!$util.isString(message.java_package)) return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) if (!$util.isString(message.java_outer_classname)) return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) if (typeof message.java_multiple_files !== "boolean") return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) if (typeof message.java_generate_equals_and_hash !== "boolean") return "java_generate_equals_and_hash: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) switch (message.optimize_for) { default: return "optimize_for: enum value expected"; @@ -24479,20 +31674,20 @@ case 3: break; } - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) if (typeof message.cc_generic_services !== "boolean") return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) if (typeof message.java_generic_services !== "boolean") return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) if (typeof message.py_generic_services !== "boolean") return "py_generic_services: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -24508,18 +31703,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileOptions} FileOptions */ - FileOptions.fromObject = function fromObject(object) { + FileOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileOptions(); if (object.java_package != null) - message.java_package = String(object.java_package); + message.java_package = $String(object.java_package); if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); + message.java_outer_classname = $String(object.java_outer_classname); if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); + message.java_multiple_files = $Boolean(object.java_multiple_files); if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); + message.java_generate_equals_and_hash = $Boolean(object.java_generate_equals_and_hash); switch (object.optimize_for) { case "SPEED": case 1: @@ -24533,21 +31734,22 @@ case 3: message.optimize_for = 3; break; + default: } if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); + message.cc_generic_services = $Boolean(object.cc_generic_services); if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); + message.java_generic_services = $Boolean(object.java_generic_services); if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); + message.py_generic_services = $Boolean(object.py_generic_services); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -24562,42 +31764,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + FileOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { object.java_package = ""; object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; + object.optimize_for = options.enums === $String ? "SPEED" : 1; object.java_multiple_files = false; object.cc_generic_services = false; object.java_generic_services = false; object.py_generic_services = false; object.java_generate_equals_and_hash = false; } - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) + object.optimize_for = options.enums === $String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] === $undefined ? message.optimize_for : $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) object.java_multiple_files = message.java_multiple_files; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -24609,8 +31815,22 @@ * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileOptions.prototype.toJSON = function() { + return FileOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileOptions"; }; /** @@ -24622,7 +31842,7 @@ * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value */ FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "SPEED"] = 1; values[valuesById[2] = "CODE_SIZE"] = 2; values[valuesById[3] = "LITE_RUNTIME"] = 3; @@ -24636,30 +31856,45 @@ /** * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions + * @typedef {Object} google.protobuf.MessageOptions.$Properties * @property {boolean|null} [message_set_wire_format] MessageOptions message_set_wire_format * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option * @property {number|null} [".msgpool_soft_limit"] MessageOptions .msgpool_soft_limit * @property {number|null} [".msgpool_hard_limit"] MessageOptions .msgpool_hard_limit + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @augments google.protobuf.MessageOptions.$Properties + * @deprecated Use google.protobuf.MessageOptions.$Properties instead. + */ + + /** + * Shape of a MessageOptions. + * @typedef {google.protobuf.MessageOptions.$Properties} google.protobuf.MessageOptions.$Shape */ /** * Constructs a new MessageOptions. * @memberof google.protobuf * @classdesc Represents a MessageOptions. - * @implements IMessageOptions * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set + * @property {number} ".msgpool_soft_limit" MessageOptions .msgpool_soft_limit + * @property {number} ".msgpool_hard_limit" MessageOptions .msgpool_hard_limit + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MessageOptions(properties) { + var MessageOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MessageOptions message_set_wire_format. @@ -24679,26 +31914,13 @@ /** * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MessageOptions * @instance */ MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * MessageOptions .msgpool_soft_limit. - * @member {number} .msgpool_soft_limit - * @memberof google.protobuf.MessageOptions - * @instance - */ MessageOptions.prototype[".msgpool_soft_limit"] = 32; - - /** - * MessageOptions .msgpool_hard_limit. - * @member {number} .msgpool_hard_limit - * @memberof google.protobuf.MessageOptions - * @instance - */ MessageOptions.prototype[".msgpool_hard_limit"] = 384; /** @@ -24706,10 +31928,14 @@ * @function create * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @type {{ + * (properties: google.protobuf.MessageOptions.$Shape): google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape; + * (properties?: google.protobuf.MessageOptions.$Properties): google.protobuf.MessageOptions; + * }} */ - MessageOptions.create = function create(properties) { + MessageOptions.create = function(properties) { return new MessageOptions(properties); }; @@ -24718,24 +31944,31 @@ * @function encode * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + MessageOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".msgpool_soft_limit"] != null && Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) writer.uint32(/* id 60000, wireType 0 =*/480000).int32(message[".msgpool_soft_limit"]); - if (message[".msgpool_hard_limit"] != null && Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) writer.uint32(/* id 60001, wireType 0 =*/480008).int32(message[".msgpool_hard_limit"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24744,12 +31977,12 @@ * @function encodeDelimited * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24759,39 +31992,68 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decode = function decode(reader, length) { + MessageOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MessageOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 60000: - message[".msgpool_soft_limit"] = reader.int32(); - break; - case 60001: - message[".msgpool_hard_limit"] = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.message_set_wire_format = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.no_standard_descriptor_accessor = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 60000: { + if (wireType !== 0) + break; + message[".msgpool_soft_limit"] = reader.int32(); + continue; + } + case 60001: { + if (wireType !== 0) + break; + message[".msgpool_hard_limit"] = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24801,11 +32063,11 @@ * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24819,28 +32081,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageOptions.verify = function verify(message) { + MessageOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) if (typeof message.message_set_wire_format !== "boolean") return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) if (typeof message.no_standard_descriptor_accessor !== "boolean") return "no_standard_descriptor_accessor: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".msgpool_soft_limit")) + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) if (!$util.isInteger(message[".msgpool_soft_limit"])) return ".msgpool_soft_limit: integer expected"; - if (message[".msgpool_hard_limit"] != null && message.hasOwnProperty(".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) if (!$util.isInteger(message[".msgpool_hard_limit"])) return ".msgpool_hard_limit: integer expected"; return null; @@ -24854,22 +32120,28 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MessageOptions} MessageOptions */ - MessageOptions.fromObject = function fromObject(object) { + MessageOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MessageOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MessageOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MessageOptions(); if (object.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); + message.message_set_wire_format = $Boolean(object.message_set_wire_format); if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); + message.no_standard_descriptor_accessor = $Boolean(object.no_standard_descriptor_accessor); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } if (object[".msgpool_soft_limit"] != null) @@ -24888,9 +32160,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + MessageOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; @@ -24900,18 +32176,18 @@ object[".msgpool_soft_limit"] = 32; object[".msgpool_hard_limit"] = 384; } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".msgpool_soft_limit")) + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) object[".msgpool_soft_limit"] = message[".msgpool_soft_limit"]; - if (message[".msgpool_hard_limit"] != null && message.hasOwnProperty(".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) object[".msgpool_hard_limit"] = message[".msgpool_hard_limit"]; return object; }; @@ -24923,8 +32199,22 @@ * @instance * @returns {Object.} JSON object */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MessageOptions.prototype.toJSON = function() { + return MessageOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MessageOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MessageOptions"; }; return MessageOptions; @@ -24934,31 +32224,45 @@ /** * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions + * @typedef {Object} google.protobuf.FieldOptions.$Properties * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype * @property {boolean|null} [packed] FieldOptions packed * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {string|null} [experimental_map_key] FieldOptions experimental_map_key - * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option * @property {boolean|null} [".key_field"] FieldOptions .key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @augments google.protobuf.FieldOptions.$Properties + * @deprecated Use google.protobuf.FieldOptions.$Properties instead. + */ + + /** + * Shape of a FieldOptions. + * @typedef {google.protobuf.FieldOptions.$Properties} google.protobuf.FieldOptions.$Shape */ /** * Constructs a new FieldOptions. * @memberof google.protobuf * @classdesc Represents a FieldOptions. - * @implements IFieldOptions * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set + * @property {boolean} ".key_field" FieldOptions .key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FieldOptions(properties) { + var FieldOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldOptions ctype. @@ -24994,18 +32298,12 @@ /** * FieldOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * FieldOptions .key_field. - * @member {boolean} .key_field - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".key_field"] = false; /** @@ -25013,10 +32311,14 @@ * @function create * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @type {{ + * (properties: google.protobuf.FieldOptions.$Shape): google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape; + * (properties?: google.protobuf.FieldOptions.$Properties): google.protobuf.FieldOptions; + * }} */ - FieldOptions.create = function create(properties) { + FieldOptions.create = function(properties) { return new FieldOptions(properties); }; @@ -25025,26 +32327,33 @@ * @function encode * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + FieldOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.experimental_map_key != null && Object.hasOwnProperty.call(message, "experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.experimental_map_key); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".key_field"] != null && Object.hasOwnProperty.call(message, ".key_field")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) writer.uint32(/* id 60000, wireType 0 =*/480000).bool(message[".key_field"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25053,12 +32362,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25068,42 +32377,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decode = function decode(reader, length) { + FieldOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 9: - message.experimental_map_key = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 60000: - message[".key_field"] = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldOptions.CType[value] !== $undefined) + message.ctype = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + message.packed = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.deprecated = reader.bool(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.experimental_map_key = reader.string(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 60000: { + if (wireType !== 0) + break; + message[".key_field"] = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25113,11 +32460,11 @@ * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25131,10 +32478,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldOptions.verify = function verify(message) { + FieldOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) switch (message.ctype) { default: return "ctype: enum value expected"; @@ -25143,25 +32494,25 @@ case 2: break; } - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) if (typeof message.packed !== "boolean") return "packed: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) if (!$util.isString(message.experimental_map_key)) return "experimental_map_key: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".key_field"] != null && message.hasOwnProperty(".key_field")) + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) if (typeof message[".key_field"] !== "boolean") return ".key_field: boolean expected"; return null; @@ -25175,9 +32526,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldOptions} FieldOptions */ - FieldOptions.fromObject = function fromObject(object) { + FieldOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { case "STRING": @@ -25192,25 +32549,26 @@ case 2: message.ctype = 2; break; + default: } if (object.packed != null) - message.packed = Boolean(object.packed); + message.packed = $Boolean(object.packed); if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); + message.deprecated = $Boolean(object.deprecated); if (object.experimental_map_key != null) - message.experimental_map_key = String(object.experimental_map_key); + message.experimental_map_key = $String(object.experimental_map_key); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } if (object[".key_field"] != null) - message[".key_field"] = Boolean(object[".key_field"]); + message[".key_field"] = $Boolean(object[".key_field"]); return message; }; @@ -25223,33 +32581,37 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + FieldOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; + object.ctype = options.enums === $String ? "STRING" : 0; object.packed = false; object.deprecated = false; object.experimental_map_key = ""; object[".key_field"] = false; } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) + object.ctype = options.enums === $String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === $undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) object.experimental_map_key = message.experimental_map_key; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".key_field"] != null && message.hasOwnProperty(".key_field")) + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) object[".key_field"] = message[".key_field"]; return object; }; @@ -25261,8 +32623,22 @@ * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldOptions.prototype.toJSON = function() { + return FieldOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldOptions"; }; /** @@ -25274,7 +32650,7 @@ * @property {number} STRING_PIECE=2 STRING_PIECE value */ FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "STRING"] = 0; values[valuesById[1] = "CORD"] = 1; values[valuesById[2] = "STRING_PIECE"] = 2; @@ -25286,32 +32662,45 @@ protobuf.EnumOptions = (function() { + /** + * Properties of an EnumOptions. + * @typedef {Object} google.protobuf.EnumOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumOptions. * @memberof google.protobuf * @interface IEnumOptions - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @augments google.protobuf.EnumOptions.$Properties + * @deprecated Use google.protobuf.EnumOptions.$Properties instead. + */ + + /** + * Shape of an EnumOptions. + * @typedef {google.protobuf.EnumOptions.$Properties} google.protobuf.EnumOptions.$Shape */ /** * Constructs a new EnumOptions. * @memberof google.protobuf * @classdesc Represents an EnumOptions. - * @implements IEnumOptions * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumOptions(properties) { + var EnumOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumOptions * @instance */ @@ -25322,10 +32711,14 @@ * @function create * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @type {{ + * (properties: google.protobuf.EnumOptions.$Shape): google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape; + * (properties?: google.protobuf.EnumOptions.$Properties): google.protobuf.EnumOptions; + * }} */ - EnumOptions.create = function create(properties) { + EnumOptions.create = function(properties) { return new EnumOptions(properties); }; @@ -25334,16 +32727,23 @@ * @function encode * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + EnumOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25352,12 +32752,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25367,27 +32767,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length) { + EnumOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25397,11 +32814,11 @@ * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25415,14 +32832,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumOptions.verify = function verify(message) { + EnumOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -25438,18 +32859,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumOptions} EnumOptions */ - EnumOptions.fromObject = function fromObject(object) { + EnumOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -25464,16 +32891,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + EnumOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -25485,8 +32916,22 @@ * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumOptions.prototype.toJSON = function() { + return EnumOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumOptions"; }; return EnumOptions; @@ -25494,32 +32939,45 @@ protobuf.EnumValueOptions = (function() { + /** + * Properties of an EnumValueOptions. + * @typedef {Object} google.protobuf.EnumValueOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumValueOptions. * @memberof google.protobuf * @interface IEnumValueOptions - * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @augments google.protobuf.EnumValueOptions.$Properties + * @deprecated Use google.protobuf.EnumValueOptions.$Properties instead. + */ + + /** + * Shape of an EnumValueOptions. + * @typedef {google.protobuf.EnumValueOptions.$Properties} google.protobuf.EnumValueOptions.$Shape */ /** * Constructs a new EnumValueOptions. * @memberof google.protobuf * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueOptions(properties) { + var EnumValueOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumValueOptions * @instance */ @@ -25530,10 +32988,14 @@ * @function create * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @type {{ + * (properties: google.protobuf.EnumValueOptions.$Shape): google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape; + * (properties?: google.protobuf.EnumValueOptions.$Properties): google.protobuf.EnumValueOptions; + * }} */ - EnumValueOptions.create = function create(properties) { + EnumValueOptions.create = function(properties) { return new EnumValueOptions(properties); }; @@ -25542,16 +33004,23 @@ * @function encode * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + EnumValueOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25560,12 +33029,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25575,27 +33044,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + EnumValueOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25605,11 +33091,11 @@ * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25623,14 +33109,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueOptions.verify = function verify(message) { + EnumValueOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -25646,18 +33136,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - EnumValueOptions.fromObject = function fromObject(object) { + EnumValueOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -25672,16 +33168,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -25693,8 +33193,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueOptions.prototype.toJSON = function() { + return EnumValueOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueOptions"; }; return EnumValueOptions; @@ -25702,32 +33216,45 @@ protobuf.ServiceOptions = (function() { + /** + * Properties of a ServiceOptions. + * @typedef {Object} google.protobuf.ServiceOptions.$Properties + * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceOptions. * @memberof google.protobuf * @interface IServiceOptions - * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @augments google.protobuf.ServiceOptions.$Properties + * @deprecated Use google.protobuf.ServiceOptions.$Properties instead. + */ + + /** + * Shape of a ServiceOptions. + * @typedef {google.protobuf.ServiceOptions.$Properties} google.protobuf.ServiceOptions.$Shape */ /** * Constructs a new ServiceOptions. * @memberof google.protobuf * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceOptions(properties) { + var ServiceOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.ServiceOptions * @instance */ @@ -25738,10 +33265,14 @@ * @function create * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @type {{ + * (properties: google.protobuf.ServiceOptions.$Shape): google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape; + * (properties?: google.protobuf.ServiceOptions.$Properties): google.protobuf.ServiceOptions; + * }} */ - ServiceOptions.create = function create(properties) { + ServiceOptions.create = function(properties) { return new ServiceOptions(properties); }; @@ -25750,16 +33281,23 @@ * @function encode * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + ServiceOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25768,12 +33306,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25783,27 +33321,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + ServiceOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25813,11 +33368,11 @@ * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25831,14 +33386,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + ServiceOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -25854,18 +33413,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - ServiceOptions.fromObject = function fromObject(object) { + ServiceOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -25880,16 +33445,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -25901,8 +33470,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceOptions.prototype.toJSON = function() { + return ServiceOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceOptions"; }; return ServiceOptions; @@ -25910,32 +33493,45 @@ protobuf.MethodOptions = (function() { + /** + * Properties of a MethodOptions. + * @typedef {Object} google.protobuf.MethodOptions.$Properties + * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a MethodOptions. * @memberof google.protobuf * @interface IMethodOptions - * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @augments google.protobuf.MethodOptions.$Properties + * @deprecated Use google.protobuf.MethodOptions.$Properties instead. + */ + + /** + * Shape of a MethodOptions. + * @typedef {google.protobuf.MethodOptions.$Properties} google.protobuf.MethodOptions.$Shape */ /** * Constructs a new MethodOptions. * @memberof google.protobuf * @classdesc Represents a MethodOptions. - * @implements IMethodOptions * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodOptions(properties) { + var MethodOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MethodOptions * @instance */ @@ -25946,10 +33542,14 @@ * @function create * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @type {{ + * (properties: google.protobuf.MethodOptions.$Shape): google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape; + * (properties?: google.protobuf.MethodOptions.$Properties): google.protobuf.MethodOptions; + * }} */ - MethodOptions.create = function create(properties) { + MethodOptions.create = function(properties) { return new MethodOptions(properties); }; @@ -25958,16 +33558,23 @@ * @function encode * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + MethodOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25976,12 +33583,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25991,27 +33598,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + MethodOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26021,11 +33645,11 @@ * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26039,14 +33663,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + MethodOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -26062,18 +33690,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodOptions} MethodOptions */ - MethodOptions.fromObject = function fromObject(object) { + MethodOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -26088,16 +33722,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + MethodOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -26109,8 +33747,22 @@ * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodOptions.prototype.toJSON = function() { + return MethodOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodOptions"; }; return MethodOptions; @@ -26120,36 +33772,49 @@ /** * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name + * @typedef {Object} google.protobuf.UninterpretedOption.$Properties + * @property {Array.|null} [name] UninterpretedOption name * @property {string|null} [identifier_value] UninterpretedOption identifier_value * @property {number|Long|null} [positive_int_value] UninterpretedOption positive_int_value * @property {number|Long|null} [negative_int_value] UninterpretedOption negative_int_value * @property {number|null} [double_value] UninterpretedOption double_value * @property {Uint8Array|null} [string_value] UninterpretedOption string_value * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @augments google.protobuf.UninterpretedOption.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.$Properties instead. + */ + + /** + * Shape of an UninterpretedOption. + * @typedef {google.protobuf.UninterpretedOption.$Properties} google.protobuf.UninterpretedOption.$Shape */ /** * Constructs a new UninterpretedOption. * @memberof google.protobuf * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function UninterpretedOption(properties) { + var UninterpretedOption = function (properties) { this.name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * UninterpretedOption name. - * @member {Array.} name + * @member {Array.} name * @memberof google.protobuf.UninterpretedOption * @instance */ @@ -26208,10 +33873,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.$Shape): google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape; + * (properties?: google.protobuf.UninterpretedOption.$Properties): google.protobuf.UninterpretedOption; + * }} */ - UninterpretedOption.create = function create(properties) { + UninterpretedOption.create = function(properties) { return new UninterpretedOption(properties); }; @@ -26220,28 +33889,35 @@ * @function encode * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + UninterpretedOption.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26250,12 +33926,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + UninterpretedOption.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26265,45 +33941,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + UninterpretedOption.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 2) + break; + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.identifier_value = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.positive_int_value = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.negative_int_value = reader.int64(); + continue; + } + case 6: { + if (wireType !== 1) + break; + message.double_value = reader.double(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.string_value = reader.bytes(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.aggregate_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26313,11 +34024,11 @@ * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26331,34 +34042,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + UninterpretedOption.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) { + if (!$Array.isArray(message.name)) return "name: array expected"; for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i], _depth + 1); if (error) return "name." + error; } } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) if (!$util.isString(message.identifier_value)) return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) if (typeof message.double_value !== "number") return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) if (!$util.isString(message.aggregate_value)) return "aggregate_value: string expected"; return null; @@ -26372,49 +34087,55 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - UninterpretedOption.fromObject = function fromObject(object) { + UninterpretedOption.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption(); if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; + if (!$Array.isArray(object.name)) + throw $TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = $Array(object.name.length); for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + if (!$util.isObject(object.name[i])) + throw $TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], _depth + 1); } } if (object.identifier_value != null) - message.identifier_value = String(object.identifier_value); + message.identifier_value = $String(object.identifier_value); if (object.positive_int_value != null) if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; + message.positive_int_value = $util.Long.fromValue(object.positive_int_value, true); else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); + message.positive_int_value = $parseInt(object.positive_int_value, 10); else if (typeof object.positive_int_value === "number") message.positive_int_value = object.positive_int_value; else if (typeof object.positive_int_value === "object") message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); if (object.negative_int_value != null) if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; + message.negative_int_value = $util.Long.fromValue(object.negative_int_value, false); else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); + message.negative_int_value = $parseInt(object.negative_int_value, 10); else if (typeof object.negative_int_value === "number") message.negative_int_value = object.negative_int_value; else if (typeof object.negative_int_value === "object") message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); if (object.double_value != null) - message.double_value = Number(object.double_value); + message.double_value = $Number(object.double_value); if (object.string_value != null) if (typeof object.string_value === "string") $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) + else if (object.string_value.length >= 0) message.string_value = object.string_value; if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); + message.aggregate_value = $String(object.aggregate_value); return message; }; @@ -26427,9 +34148,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.name = []; @@ -26437,46 +34162,50 @@ object.identifier_value = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.positive_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.positive_int_value = options.longs === String ? "0" : 0; + object.positive_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.negative_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.negative_int_value = options.longs === String ? "0" : 0; + object.negative_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.double_value = 0; - if (options.bytes === String) + if (options.bytes === $String) object.string_value = ""; else { object.string_value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.string_value = $util.newBuffer(object.string_value); } object.aggregate_value = ""; } if (message.name && message.name.length) { - object.name = []; + object.name = $Array(message.name.length); for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options, _depth + 1); } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.positive_int_value = typeof message.positive_int_value === "number" ? $BigInt(message.positive_int_value) : $util.Long.fromBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0, true).toBigInt(); + else if (typeof message.positive_int_value === "number") + object.positive_int_value = options.longs === $String ? $String(message.positive_int_value) : message.positive_int_value; else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; + object.positive_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === $Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.negative_int_value = typeof message.negative_int_value === "number" ? $BigInt(message.negative_int_value) : $util.Long.fromBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0, false).toBigInt(); + else if (typeof message.negative_int_value === "number") + object.negative_int_value = options.longs === $String ? $String(message.negative_int_value) : message.negative_int_value; else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + object.negative_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === $Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) + object.double_value = options.json && !$isFinite(message.double_value) ? $String(message.double_value) : message.double_value; + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) + object.string_value = options.bytes === $String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.string_value) : message.string_value; + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) object.aggregate_value = message.aggregate_value; return object; }; @@ -26488,34 +34217,61 @@ * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + UninterpretedOption.prototype.toJSON = function() { + return UninterpretedOption.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + UninterpretedOption.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption"; }; UninterpretedOption.NamePart = (function() { /** * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart + * @typedef {Object} google.protobuf.UninterpretedOption.NamePart.$Properties * @property {string} name_part NamePart name_part * @property {boolean} is_extension NamePart is_extension + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @augments google.protobuf.UninterpretedOption.NamePart.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.NamePart.$Properties instead. + */ + + /** + * Shape of a NamePart. + * @typedef {google.protobuf.UninterpretedOption.NamePart.$Properties} google.protobuf.UninterpretedOption.NamePart.$Shape */ /** * Constructs a new NamePart. * @memberof google.protobuf.UninterpretedOption * @classdesc Represents a NamePart. - * @implements INamePart * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function NamePart(properties) { + var NamePart = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * NamePart name_part. @@ -26538,10 +34294,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.NamePart.$Shape): google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape; + * (properties?: google.protobuf.UninterpretedOption.NamePart.$Properties): google.protobuf.UninterpretedOption.NamePart; + * }} */ - NamePart.create = function create(properties) { + NamePart.create = function(properties) { return new NamePart(properties); }; @@ -26550,15 +34310,22 @@ * @function encode * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + NamePart.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 2 =*/10).string(message.name_part); writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26567,12 +34334,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + NamePart.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26582,31 +34349,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decode = function decode(reader, length) { + NamePart.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption.NamePart(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name_part = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.is_extension = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("name_part")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "name_part")) throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) + if (!$Object.hasOwnProperty.call(message, "is_extension")) throw $util.ProtocolError("missing required 'is_extension'", { instance: message }); return message; }; @@ -26617,11 +34404,11 @@ * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decodeDelimited = function decodeDelimited(reader) { + NamePart.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26635,9 +34422,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NamePart.verify = function verify(message) { + NamePart.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isString(message.name_part)) return "name_part: string expected"; if (typeof message.is_extension !== "boolean") @@ -26653,14 +34444,20 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart */ - NamePart.fromObject = function fromObject(object) { + NamePart.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption.NamePart(); if (object.name_part != null) - message.name_part = String(object.name_part); + message.name_part = $String(object.name_part); if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); + message.is_extension = $Boolean(object.is_extension); return message; }; @@ -26673,17 +34470,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + NamePart.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name_part = ""; object.is_extension = false; } - if (message.name_part != null && message.hasOwnProperty("name_part")) + if (message.name_part != null && $Object.hasOwnProperty.call(message, "name_part")) object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) + if (message.is_extension != null && $Object.hasOwnProperty.call(message, "is_extension")) object.is_extension = message.is_extension; return object; }; @@ -26695,8 +34496,22 @@ * @instance * @returns {Object.} JSON object */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + NamePart.prototype.toJSON = function() { + return NamePart.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + NamePart.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption.NamePart"; }; return NamePart; @@ -26707,32 +34522,45 @@ protobuf.SourceCodeInfo = (function() { + /** + * Properties of a SourceCodeInfo. + * @typedef {Object} google.protobuf.SourceCodeInfo.$Properties + * @property {Array.|null} [location] SourceCodeInfo location + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a SourceCodeInfo. * @memberof google.protobuf * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @augments google.protobuf.SourceCodeInfo.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.$Properties instead. + */ + + /** + * Shape of a SourceCodeInfo. + * @typedef {google.protobuf.SourceCodeInfo.$Properties} google.protobuf.SourceCodeInfo.$Shape */ /** * Constructs a new SourceCodeInfo. * @memberof google.protobuf * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SourceCodeInfo(properties) { + var SourceCodeInfo = function (properties) { this.location = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SourceCodeInfo location. - * @member {Array.} location + * @member {Array.} location * @memberof google.protobuf.SourceCodeInfo * @instance */ @@ -26743,10 +34571,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.$Shape): google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.$Properties): google.protobuf.SourceCodeInfo; + * }} */ - SourceCodeInfo.create = function create(properties) { + SourceCodeInfo.create = function(properties) { return new SourceCodeInfo(properties); }; @@ -26755,16 +34587,23 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + SourceCodeInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.location != null && message.location.length) for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26773,12 +34612,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SourceCodeInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26788,27 +34627,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + SourceCodeInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26818,11 +34674,11 @@ * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26836,14 +34692,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + SourceCodeInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.location != null && $Object.hasOwnProperty.call(message, "location")) { + if (!$Array.isArray(message.location)) return "location: array expected"; for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i], _depth + 1); if (error) return "location." + error; } @@ -26859,18 +34719,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - SourceCodeInfo.fromObject = function fromObject(object) { + SourceCodeInfo.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo(); if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; + if (!$Array.isArray(object.location)) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = $Array(object.location.length); for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + if (!$util.isObject(object.location[i])) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], _depth + 1); } } return message; @@ -26885,16 +34751,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.location = []; if (message.location && message.location.length) { - object.location = []; + object.location = $Array(message.location.length); for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options, _depth + 1); } return object; }; @@ -26906,36 +34776,63 @@ * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SourceCodeInfo.prototype.toJSON = function() { + return SourceCodeInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SourceCodeInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo"; }; SourceCodeInfo.Location = (function() { /** * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation + * @typedef {Object} google.protobuf.SourceCodeInfo.Location.$Properties * @property {Array.|null} [path] Location path * @property {Array.|null} [span] Location span + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @augments google.protobuf.SourceCodeInfo.Location.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.Location.$Properties instead. + */ + + /** + * Shape of a Location. + * @typedef {google.protobuf.SourceCodeInfo.Location.$Properties} google.protobuf.SourceCodeInfo.Location.$Shape */ /** * Constructs a new Location. * @memberof google.protobuf.SourceCodeInfo * @classdesc Represents a Location. - * @implements ILocation * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Location(properties) { + var Location = function (properties) { this.path = []; this.span = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Location path. @@ -26958,10 +34855,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.Location.$Shape): google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.Location.$Properties): google.protobuf.SourceCodeInfo.Location; + * }} */ - Location.create = function create(properties) { + Location.create = function(properties) { return new Location(properties); }; @@ -26970,25 +34871,24 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer) { + Location.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && message.path.length) + writer.uint32(/* id 1, wireType 2 =*/10).int32s(message.path); + if (message.span != null && message.span.length) + writer.uint32(/* id 2, wireType 2 =*/18).int32s(message.span); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26997,12 +34897,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Location.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27012,42 +34912,64 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decode = function decode(reader, length) { + Location.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.path && message.path.length)) + message.path = []; + reader.int32s(message.path); + continue; + } + if (wireType !== 0) + break; + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.int32()); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.span && message.span.length)) + message.span = []; + reader.int32s(message.span); + continue; + } + if (wireType !== 0) + break; + if (!(message.span && message.span.length)) + message.span = []; message.span.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27057,11 +34979,11 @@ * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27075,18 +34997,22 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Location.verify = function verify(message) { + Location.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) { + if (!$Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) + if (message.span != null && $Object.hasOwnProperty.call(message, "span")) { + if (!$Array.isArray(message.span)) return "span: array expected"; for (var i = 0; i < message.span.length; ++i) if (!$util.isInteger(message.span[i])) @@ -27103,21 +35029,27 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo.Location} Location */ - Location.fromObject = function fromObject(object) { + Location.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo.Location(); if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; + if (!$Array.isArray(object.path)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = $Array(object.path.length); for (var i = 0; i < object.path.length; ++i) message.path[i] = object.path[i] | 0; } if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; + if (!$Array.isArray(object.span)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = $Array(object.span.length); for (var i = 0; i < object.span.length; ++i) message.span[i] = object.span[i] | 0; } @@ -27133,21 +35065,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + Location.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.path = []; object.span = []; } if (message.path && message.path.length) { - object.path = []; + object.path = $Array(message.path.length); for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } if (message.span && message.span.length) { - object.span = []; + object.span = $Array(message.span.length); for (var j = 0; j < message.span.length; ++j) object.span[j] = message.span[j]; } @@ -27161,8 +35097,22 @@ * @instance * @returns {Object.} JSON object */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Location.prototype.toJSON = function() { + return Location.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Location.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo.Location"; }; return Location; diff --git a/protobufs/generated/tf_gcmessages.js b/protobufs/generated/tf_gcmessages.js index f228387..cbbc20f 100644 --- a/protobufs/generated/tf_gcmessages.js +++ b/protobufs/generated/tf_gcmessages.js @@ -1,4 +1,4 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-mixed-operators, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars, default-case, jsdoc/require-param*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) @@ -12,13 +12,14 @@ // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + var $Object = $util.global.Object, $undefined = $util.global.undefined, $Error = $util.global.Error, $TypeError = $util.global.TypeError, $Boolean = $util.global.Boolean, $String = $util.global.String, $Array = $util.global.Array, $parseInt = $util.global.parseInt, $Number = $util.global.Number, $BigInt = $util.global.BigInt, $isFinite = $util.global.isFinite; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); /** * ETFGCMsg enum. - * @exports ETFGCMsg + * @name ETFGCMsg * @enum {number} * @property {number} k_EMsgGCReportWarKill=5001 k_EMsgGCReportWarKill value * @property {number} k_EMsgGCVoteKickBanPlayer=5018 k_EMsgGCVoteKickBanPlayer value @@ -188,7 +189,7 @@ * @property {number} k_EMsgGCDev_GrantWarKill=10001 k_EMsgGCDev_GrantWarKill value */ $root.ETFGCMsg = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[5001] = "k_EMsgGCReportWarKill"] = 5001; values[valuesById[5018] = "k_EMsgGCVoteKickBanPlayer"] = 5018; values[valuesById[5019] = "k_EMsgGCVoteKickBanPlayerResult"] = 5019; @@ -360,19 +361,19 @@ /** * EServerModificationItemType enum. - * @exports EServerModificationItemType + * @name EServerModificationItemType * @enum {number} * @property {number} kGameServerModificationItem_Halloween=1 kGameServerModificationItem_Halloween value */ $root.EServerModificationItemType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "kGameServerModificationItem_Halloween"] = 1; return values; })(); /** * ETFSyncedMMMenuStep enum. - * @exports ETFSyncedMMMenuStep + * @name ETFSyncedMMMenuStep * @enum {number} * @property {number} k_eTFSyncedMMMenuStep_Invalid=-1 k_eTFSyncedMMMenuStep_Invalid value * @property {number} k_eTFSyncedMMMenuStep_None=0 k_eTFSyncedMMMenuStep_None value @@ -382,7 +383,7 @@ * @property {number} k_eTFSyncedMMMenuStep_MvM_Selecting_Missions=4 k_eTFSyncedMMMenuStep_MvM_Selecting_Missions value */ $root.ETFSyncedMMMenuStep = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[-1] = "k_eTFSyncedMMMenuStep_Invalid"] = -1; values[valuesById[0] = "k_eTFSyncedMMMenuStep_None"] = 0; values[valuesById[1] = "k_eTFSyncedMMMenuStep_Configuring_Mode"] = 1; @@ -394,7 +395,7 @@ /** * ETFMatchGroup enum. - * @exports ETFMatchGroup + * @name ETFMatchGroup * @enum {number} * @property {number} k_eTFMatchGroup_Invalid=-1 k_eTFMatchGroup_Invalid value * @property {number} k_eTFMatchGroup_MvM_Practice=0 k_eTFMatchGroup_MvM_Practice value @@ -421,7 +422,7 @@ * @property {number} k_eTFMatchGroup_Event_Last=8 k_eTFMatchGroup_Event_Last value */ $root.ETFMatchGroup = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[-1] = "k_eTFMatchGroup_Invalid"] = -1; values[valuesById[0] = "k_eTFMatchGroup_MvM_Practice"] = 0; values[valuesById[1] = "k_eTFMatchGroup_MvM_MannUp"] = 1; @@ -450,7 +451,7 @@ /** * ETFPartyChatType enum. - * @exports ETFPartyChatType + * @name ETFPartyChatType * @enum {number} * @property {number} k_eTFPartyChatType_Invalid=0 k_eTFPartyChatType_Invalid value * @property {number} k_eTFPartyChatType_MemberChat=1 k_eTFPartyChatType_MemberChat value @@ -461,7 +462,7 @@ * @property {number} k_eTFPartyChatType_Synthetic_MemberOffline=1004 k_eTFPartyChatType_Synthetic_MemberOffline value */ $root.ETFPartyChatType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "k_eTFPartyChatType_Invalid"] = 0; values[valuesById[1] = "k_eTFPartyChatType_MemberChat"] = 1; values[valuesById[1000] = "k_eTFPartyChatType_Synthetic_MemberJoin"] = 1000; @@ -474,7 +475,7 @@ /** * TF_GC_GameState enum. - * @exports TF_GC_GameState + * @name TF_GC_GameState * @enum {number} * @property {number} TF_GC_GAMESTATE_STATE_INIT=0 TF_GC_GAMESTATE_STATE_INIT value * @property {number} TF_GC_GAMESTATE_WAIT_FOR_PLAYERS_TO_LOAD=1 TF_GC_GAMESTATE_WAIT_FOR_PLAYERS_TO_LOAD value @@ -485,7 +486,7 @@ * @property {number} TF_GC_GAMESTATE_LAST=8 TF_GC_GAMESTATE_LAST value */ $root.TF_GC_GameState = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "TF_GC_GAMESTATE_STATE_INIT"] = 0; values[valuesById[1] = "TF_GC_GAMESTATE_WAIT_FOR_PLAYERS_TO_LOAD"] = 1; values[valuesById[3] = "TF_GC_GAMESTATE_STRATEGY_TIME"] = 3; @@ -498,7 +499,7 @@ /** * TF_GC_TEAM enum. - * @exports TF_GC_TEAM + * @name TF_GC_TEAM * @enum {number} * @property {number} TF_GC_TEAM_DEFENDERS=0 TF_GC_TEAM_DEFENDERS value * @property {number} TF_GC_TEAM_INVADERS=1 TF_GC_TEAM_INVADERS value @@ -508,7 +509,7 @@ * @property {number} TF_GC_TEAM_NOTEAM=5 TF_GC_TEAM_NOTEAM value */ $root.TF_GC_TEAM = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "TF_GC_TEAM_DEFENDERS"] = 0; values[valuesById[1] = "TF_GC_TEAM_INVADERS"] = 1; values[valuesById[2] = "TF_GC_TEAM_BROADCASTER"] = 2; @@ -520,7 +521,7 @@ /** * TFMatchLeaveReason enum. - * @exports TFMatchLeaveReason + * @name TFMatchLeaveReason * @enum {number} * @property {number} TFMatchLeaveReason_UNSPECIFIED=0 TFMatchLeaveReason_UNSPECIFIED value * @property {number} TFMatchLeaveReason_VOTE_KICK=1 TFMatchLeaveReason_VOTE_KICK value @@ -531,7 +532,7 @@ * @property {number} TFMatchLeaveReason_GC_REMOVED=6 TFMatchLeaveReason_GC_REMOVED value */ $root.TFMatchLeaveReason = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "TFMatchLeaveReason_UNSPECIFIED"] = 0; values[valuesById[1] = "TFMatchLeaveReason_VOTE_KICK"] = 1; values[valuesById[2] = "TFMatchLeaveReason_IDLE"] = 2; @@ -544,7 +545,7 @@ /** * ServerMatchmakingState enum. - * @exports ServerMatchmakingState + * @name ServerMatchmakingState * @enum {number} * @property {number} ServerMatchmakingState_INVALID=0 ServerMatchmakingState_INVALID value * @property {number} ServerMatchmakingState_NOT_PARTICIPATING=1 ServerMatchmakingState_NOT_PARTICIPATING value @@ -553,7 +554,7 @@ * @property {number} ServerMatchmakingState_ACTIVE_MATCH=4 ServerMatchmakingState_ACTIVE_MATCH value */ $root.ServerMatchmakingState = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "ServerMatchmakingState_INVALID"] = 0; values[valuesById[1] = "ServerMatchmakingState_NOT_PARTICIPATING"] = 1; values[valuesById[2] = "ServerMatchmakingState_EMPTY"] = 2; @@ -564,7 +565,7 @@ /** * SurveyQuestionType enum. - * @exports SurveyQuestionType + * @name SurveyQuestionType * @enum {number} * @property {number} QUESTION_MATCH_QUALITY=0 QUESTION_MATCH_QUALITY value * @property {number} QUESTION_MAP_QUALITY=1 QUESTION_MAP_QUALITY value @@ -573,7 +574,7 @@ * @property {number} QUESTION_RANDOM_CRIT=4 QUESTION_RANDOM_CRIT value */ $root.SurveyQuestionType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "QUESTION_MATCH_QUALITY"] = 0; values[valuesById[1] = "QUESTION_MAP_QUALITY"] = 1; values[valuesById[2] = "QUESTION_COMP_INQUIRY"] = 2; @@ -586,27 +587,40 @@ /** * Properties of a CMsgTFGoldenWrenchBroadcast. - * @exports ICMsgTFGoldenWrenchBroadcast - * @interface ICMsgTFGoldenWrenchBroadcast + * @typedef {Object} CMsgTFGoldenWrenchBroadcast.$Properties * @property {number|null} [wrench_number] CMsgTFGoldenWrenchBroadcast wrench_number * @property {boolean|null} [deleted] CMsgTFGoldenWrenchBroadcast deleted * @property {string|null} [user_name] CMsgTFGoldenWrenchBroadcast user_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTFGoldenWrenchBroadcast. + * @exports ICMsgTFGoldenWrenchBroadcast + * @interface ICMsgTFGoldenWrenchBroadcast + * @augments CMsgTFGoldenWrenchBroadcast.$Properties + * @deprecated Use CMsgTFGoldenWrenchBroadcast.$Properties instead. + */ + + /** + * Shape of a CMsgTFGoldenWrenchBroadcast. + * @typedef {CMsgTFGoldenWrenchBroadcast.$Properties} CMsgTFGoldenWrenchBroadcast.$Shape */ /** * Constructs a new CMsgTFGoldenWrenchBroadcast. * @exports CMsgTFGoldenWrenchBroadcast * @classdesc Represents a CMsgTFGoldenWrenchBroadcast. - * @implements ICMsgTFGoldenWrenchBroadcast * @constructor - * @param {ICMsgTFGoldenWrenchBroadcast=} [properties] Properties to set + * @param {CMsgTFGoldenWrenchBroadcast.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFGoldenWrenchBroadcast(properties) { + var CMsgTFGoldenWrenchBroadcast = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFGoldenWrenchBroadcast wrench_number. @@ -637,10 +651,14 @@ * @function create * @memberof CMsgTFGoldenWrenchBroadcast * @static - * @param {ICMsgTFGoldenWrenchBroadcast=} [properties] Properties to set + * @param {CMsgTFGoldenWrenchBroadcast.$Properties=} [properties] Properties to set * @returns {CMsgTFGoldenWrenchBroadcast} CMsgTFGoldenWrenchBroadcast instance + * @type {{ + * (properties: CMsgTFGoldenWrenchBroadcast.$Shape): CMsgTFGoldenWrenchBroadcast & CMsgTFGoldenWrenchBroadcast.$Shape; + * (properties?: CMsgTFGoldenWrenchBroadcast.$Properties): CMsgTFGoldenWrenchBroadcast; + * }} */ - CMsgTFGoldenWrenchBroadcast.create = function create(properties) { + CMsgTFGoldenWrenchBroadcast.create = function(properties) { return new CMsgTFGoldenWrenchBroadcast(properties); }; @@ -649,19 +667,26 @@ * @function encode * @memberof CMsgTFGoldenWrenchBroadcast * @static - * @param {ICMsgTFGoldenWrenchBroadcast} message CMsgTFGoldenWrenchBroadcast message or plain object to encode + * @param {CMsgTFGoldenWrenchBroadcast.$Properties} message CMsgTFGoldenWrenchBroadcast message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFGoldenWrenchBroadcast.encode = function encode(message, writer) { + CMsgTFGoldenWrenchBroadcast.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.wrench_number != null && Object.hasOwnProperty.call(message, "wrench_number")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.wrench_number != null && $Object.hasOwnProperty.call(message, "wrench_number")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.wrench_number); - if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + if (message.deleted != null && $Object.hasOwnProperty.call(message, "deleted")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.deleted); - if (message.user_name != null && Object.hasOwnProperty.call(message, "user_name")) + if (message.user_name != null && $Object.hasOwnProperty.call(message, "user_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.user_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -670,12 +695,12 @@ * @function encodeDelimited * @memberof CMsgTFGoldenWrenchBroadcast * @static - * @param {ICMsgTFGoldenWrenchBroadcast} message CMsgTFGoldenWrenchBroadcast message or plain object to encode + * @param {CMsgTFGoldenWrenchBroadcast.$Properties} message CMsgTFGoldenWrenchBroadcast message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFGoldenWrenchBroadcast.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFGoldenWrenchBroadcast.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -685,31 +710,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFGoldenWrenchBroadcast} CMsgTFGoldenWrenchBroadcast + * @returns {CMsgTFGoldenWrenchBroadcast & CMsgTFGoldenWrenchBroadcast.$Shape} CMsgTFGoldenWrenchBroadcast * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFGoldenWrenchBroadcast.decode = function decode(reader, length) { + CMsgTFGoldenWrenchBroadcast.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFGoldenWrenchBroadcast(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFGoldenWrenchBroadcast(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.wrench_number = reader.int32(); - break; - case 2: - message.deleted = reader.bool(); - break; - case 3: - message.user_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.wrench_number = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.deleted = reader.bool(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.user_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -719,11 +767,11 @@ * @memberof CMsgTFGoldenWrenchBroadcast * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFGoldenWrenchBroadcast} CMsgTFGoldenWrenchBroadcast + * @returns {CMsgTFGoldenWrenchBroadcast & CMsgTFGoldenWrenchBroadcast.$Shape} CMsgTFGoldenWrenchBroadcast * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFGoldenWrenchBroadcast.decodeDelimited = function decodeDelimited(reader) { + CMsgTFGoldenWrenchBroadcast.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -737,16 +785,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFGoldenWrenchBroadcast.verify = function verify(message) { + CMsgTFGoldenWrenchBroadcast.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.wrench_number != null && message.hasOwnProperty("wrench_number")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.wrench_number != null && $Object.hasOwnProperty.call(message, "wrench_number")) if (!$util.isInteger(message.wrench_number)) return "wrench_number: integer expected"; - if (message.deleted != null && message.hasOwnProperty("deleted")) + if (message.deleted != null && $Object.hasOwnProperty.call(message, "deleted")) if (typeof message.deleted !== "boolean") return "deleted: boolean expected"; - if (message.user_name != null && message.hasOwnProperty("user_name")) + if (message.user_name != null && $Object.hasOwnProperty.call(message, "user_name")) if (!$util.isString(message.user_name)) return "user_name: string expected"; return null; @@ -760,16 +812,22 @@ * @param {Object.} object Plain object * @returns {CMsgTFGoldenWrenchBroadcast} CMsgTFGoldenWrenchBroadcast */ - CMsgTFGoldenWrenchBroadcast.fromObject = function fromObject(object) { + CMsgTFGoldenWrenchBroadcast.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFGoldenWrenchBroadcast) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFGoldenWrenchBroadcast: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFGoldenWrenchBroadcast(); if (object.wrench_number != null) message.wrench_number = object.wrench_number | 0; if (object.deleted != null) - message.deleted = Boolean(object.deleted); + message.deleted = $Boolean(object.deleted); if (object.user_name != null) - message.user_name = String(object.user_name); + message.user_name = $String(object.user_name); return message; }; @@ -782,20 +840,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFGoldenWrenchBroadcast.toObject = function toObject(message, options) { + CMsgTFGoldenWrenchBroadcast.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.wrench_number = 0; object.deleted = false; object.user_name = ""; } - if (message.wrench_number != null && message.hasOwnProperty("wrench_number")) + if (message.wrench_number != null && $Object.hasOwnProperty.call(message, "wrench_number")) object.wrench_number = message.wrench_number; - if (message.deleted != null && message.hasOwnProperty("deleted")) + if (message.deleted != null && $Object.hasOwnProperty.call(message, "deleted")) object.deleted = message.deleted; - if (message.user_name != null && message.hasOwnProperty("user_name")) + if (message.user_name != null && $Object.hasOwnProperty.call(message, "user_name")) object.user_name = message.user_name; return object; }; @@ -807,8 +869,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFGoldenWrenchBroadcast.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFGoldenWrenchBroadcast.prototype.toJSON = function() { + return CMsgTFGoldenWrenchBroadcast.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFGoldenWrenchBroadcast + * @function getTypeUrl + * @memberof CMsgTFGoldenWrenchBroadcast + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFGoldenWrenchBroadcast.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFGoldenWrenchBroadcast"; }; return CMsgTFGoldenWrenchBroadcast; @@ -818,26 +894,39 @@ /** * Properties of a CMsgTFSaxxyBroadcast. - * @exports ICMsgTFSaxxyBroadcast - * @interface ICMsgTFSaxxyBroadcast + * @typedef {Object} CMsgTFSaxxyBroadcast.$Properties * @property {number|null} [category_number] CMsgTFSaxxyBroadcast category_number * @property {string|null} [user_name] CMsgTFSaxxyBroadcast user_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTFSaxxyBroadcast. + * @exports ICMsgTFSaxxyBroadcast + * @interface ICMsgTFSaxxyBroadcast + * @augments CMsgTFSaxxyBroadcast.$Properties + * @deprecated Use CMsgTFSaxxyBroadcast.$Properties instead. + */ + + /** + * Shape of a CMsgTFSaxxyBroadcast. + * @typedef {CMsgTFSaxxyBroadcast.$Properties} CMsgTFSaxxyBroadcast.$Shape */ /** * Constructs a new CMsgTFSaxxyBroadcast. * @exports CMsgTFSaxxyBroadcast * @classdesc Represents a CMsgTFSaxxyBroadcast. - * @implements ICMsgTFSaxxyBroadcast * @constructor - * @param {ICMsgTFSaxxyBroadcast=} [properties] Properties to set + * @param {CMsgTFSaxxyBroadcast.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFSaxxyBroadcast(properties) { + var CMsgTFSaxxyBroadcast = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFSaxxyBroadcast category_number. @@ -860,10 +949,14 @@ * @function create * @memberof CMsgTFSaxxyBroadcast * @static - * @param {ICMsgTFSaxxyBroadcast=} [properties] Properties to set + * @param {CMsgTFSaxxyBroadcast.$Properties=} [properties] Properties to set * @returns {CMsgTFSaxxyBroadcast} CMsgTFSaxxyBroadcast instance + * @type {{ + * (properties: CMsgTFSaxxyBroadcast.$Shape): CMsgTFSaxxyBroadcast & CMsgTFSaxxyBroadcast.$Shape; + * (properties?: CMsgTFSaxxyBroadcast.$Properties): CMsgTFSaxxyBroadcast; + * }} */ - CMsgTFSaxxyBroadcast.create = function create(properties) { + CMsgTFSaxxyBroadcast.create = function(properties) { return new CMsgTFSaxxyBroadcast(properties); }; @@ -872,17 +965,24 @@ * @function encode * @memberof CMsgTFSaxxyBroadcast * @static - * @param {ICMsgTFSaxxyBroadcast} message CMsgTFSaxxyBroadcast message or plain object to encode + * @param {CMsgTFSaxxyBroadcast.$Properties} message CMsgTFSaxxyBroadcast message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFSaxxyBroadcast.encode = function encode(message, writer) { + CMsgTFSaxxyBroadcast.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.category_number != null && Object.hasOwnProperty.call(message, "category_number")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.category_number != null && $Object.hasOwnProperty.call(message, "category_number")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category_number); - if (message.user_name != null && Object.hasOwnProperty.call(message, "user_name")) + if (message.user_name != null && $Object.hasOwnProperty.call(message, "user_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.user_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -891,12 +991,12 @@ * @function encodeDelimited * @memberof CMsgTFSaxxyBroadcast * @static - * @param {ICMsgTFSaxxyBroadcast} message CMsgTFSaxxyBroadcast message or plain object to encode + * @param {CMsgTFSaxxyBroadcast.$Properties} message CMsgTFSaxxyBroadcast message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFSaxxyBroadcast.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFSaxxyBroadcast.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -906,28 +1006,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFSaxxyBroadcast} CMsgTFSaxxyBroadcast + * @returns {CMsgTFSaxxyBroadcast & CMsgTFSaxxyBroadcast.$Shape} CMsgTFSaxxyBroadcast * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFSaxxyBroadcast.decode = function decode(reader, length) { + CMsgTFSaxxyBroadcast.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFSaxxyBroadcast(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFSaxxyBroadcast(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.category_number = reader.int32(); - break; - case 2: - message.user_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.category_number = reader.int32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.user_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -937,11 +1057,11 @@ * @memberof CMsgTFSaxxyBroadcast * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFSaxxyBroadcast} CMsgTFSaxxyBroadcast + * @returns {CMsgTFSaxxyBroadcast & CMsgTFSaxxyBroadcast.$Shape} CMsgTFSaxxyBroadcast * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFSaxxyBroadcast.decodeDelimited = function decodeDelimited(reader) { + CMsgTFSaxxyBroadcast.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -955,13 +1075,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFSaxxyBroadcast.verify = function verify(message) { + CMsgTFSaxxyBroadcast.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.category_number != null && message.hasOwnProperty("category_number")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.category_number != null && $Object.hasOwnProperty.call(message, "category_number")) if (!$util.isInteger(message.category_number)) return "category_number: integer expected"; - if (message.user_name != null && message.hasOwnProperty("user_name")) + if (message.user_name != null && $Object.hasOwnProperty.call(message, "user_name")) if (!$util.isString(message.user_name)) return "user_name: string expected"; return null; @@ -975,14 +1099,20 @@ * @param {Object.} object Plain object * @returns {CMsgTFSaxxyBroadcast} CMsgTFSaxxyBroadcast */ - CMsgTFSaxxyBroadcast.fromObject = function fromObject(object) { + CMsgTFSaxxyBroadcast.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFSaxxyBroadcast) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFSaxxyBroadcast: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFSaxxyBroadcast(); if (object.category_number != null) message.category_number = object.category_number | 0; if (object.user_name != null) - message.user_name = String(object.user_name); + message.user_name = $String(object.user_name); return message; }; @@ -995,17 +1125,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFSaxxyBroadcast.toObject = function toObject(message, options) { + CMsgTFSaxxyBroadcast.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.category_number = 0; object.user_name = ""; } - if (message.category_number != null && message.hasOwnProperty("category_number")) + if (message.category_number != null && $Object.hasOwnProperty.call(message, "category_number")) object.category_number = message.category_number; - if (message.user_name != null && message.hasOwnProperty("user_name")) + if (message.user_name != null && $Object.hasOwnProperty.call(message, "user_name")) object.user_name = message.user_name; return object; }; @@ -1017,8 +1151,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFSaxxyBroadcast.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFSaxxyBroadcast.prototype.toJSON = function() { + return CMsgTFSaxxyBroadcast.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFSaxxyBroadcast + * @function getTypeUrl + * @memberof CMsgTFSaxxyBroadcast + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFSaxxyBroadcast.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFSaxxyBroadcast"; }; return CMsgTFSaxxyBroadcast; @@ -1028,27 +1176,40 @@ /** * Properties of a CMsgGCTFSpecificItemBroadcast. - * @exports ICMsgGCTFSpecificItemBroadcast - * @interface ICMsgGCTFSpecificItemBroadcast + * @typedef {Object} CMsgGCTFSpecificItemBroadcast.$Properties * @property {number|null} [item_def_index] CMsgGCTFSpecificItemBroadcast item_def_index * @property {boolean|null} [was_destruction] CMsgGCTFSpecificItemBroadcast was_destruction * @property {string|null} [user_name] CMsgGCTFSpecificItemBroadcast user_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCTFSpecificItemBroadcast. + * @exports ICMsgGCTFSpecificItemBroadcast + * @interface ICMsgGCTFSpecificItemBroadcast + * @augments CMsgGCTFSpecificItemBroadcast.$Properties + * @deprecated Use CMsgGCTFSpecificItemBroadcast.$Properties instead. + */ + + /** + * Shape of a CMsgGCTFSpecificItemBroadcast. + * @typedef {CMsgGCTFSpecificItemBroadcast.$Properties} CMsgGCTFSpecificItemBroadcast.$Shape */ /** * Constructs a new CMsgGCTFSpecificItemBroadcast. * @exports CMsgGCTFSpecificItemBroadcast * @classdesc Represents a CMsgGCTFSpecificItemBroadcast. - * @implements ICMsgGCTFSpecificItemBroadcast * @constructor - * @param {ICMsgGCTFSpecificItemBroadcast=} [properties] Properties to set + * @param {CMsgGCTFSpecificItemBroadcast.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCTFSpecificItemBroadcast(properties) { + var CMsgGCTFSpecificItemBroadcast = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCTFSpecificItemBroadcast item_def_index. @@ -1079,10 +1240,14 @@ * @function create * @memberof CMsgGCTFSpecificItemBroadcast * @static - * @param {ICMsgGCTFSpecificItemBroadcast=} [properties] Properties to set + * @param {CMsgGCTFSpecificItemBroadcast.$Properties=} [properties] Properties to set * @returns {CMsgGCTFSpecificItemBroadcast} CMsgGCTFSpecificItemBroadcast instance + * @type {{ + * (properties: CMsgGCTFSpecificItemBroadcast.$Shape): CMsgGCTFSpecificItemBroadcast & CMsgGCTFSpecificItemBroadcast.$Shape; + * (properties?: CMsgGCTFSpecificItemBroadcast.$Properties): CMsgGCTFSpecificItemBroadcast; + * }} */ - CMsgGCTFSpecificItemBroadcast.create = function create(properties) { + CMsgGCTFSpecificItemBroadcast.create = function(properties) { return new CMsgGCTFSpecificItemBroadcast(properties); }; @@ -1091,19 +1256,26 @@ * @function encode * @memberof CMsgGCTFSpecificItemBroadcast * @static - * @param {ICMsgGCTFSpecificItemBroadcast} message CMsgGCTFSpecificItemBroadcast message or plain object to encode + * @param {CMsgGCTFSpecificItemBroadcast.$Properties} message CMsgGCTFSpecificItemBroadcast message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCTFSpecificItemBroadcast.encode = function encode(message, writer) { + CMsgGCTFSpecificItemBroadcast.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_def_index != null && Object.hasOwnProperty.call(message, "item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.item_def_index); - if (message.was_destruction != null && Object.hasOwnProperty.call(message, "was_destruction")) + if (message.was_destruction != null && $Object.hasOwnProperty.call(message, "was_destruction")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.was_destruction); - if (message.user_name != null && Object.hasOwnProperty.call(message, "user_name")) + if (message.user_name != null && $Object.hasOwnProperty.call(message, "user_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.user_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1112,12 +1284,12 @@ * @function encodeDelimited * @memberof CMsgGCTFSpecificItemBroadcast * @static - * @param {ICMsgGCTFSpecificItemBroadcast} message CMsgGCTFSpecificItemBroadcast message or plain object to encode + * @param {CMsgGCTFSpecificItemBroadcast.$Properties} message CMsgGCTFSpecificItemBroadcast message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCTFSpecificItemBroadcast.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCTFSpecificItemBroadcast.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1127,31 +1299,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCTFSpecificItemBroadcast} CMsgGCTFSpecificItemBroadcast + * @returns {CMsgGCTFSpecificItemBroadcast & CMsgGCTFSpecificItemBroadcast.$Shape} CMsgGCTFSpecificItemBroadcast * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCTFSpecificItemBroadcast.decode = function decode(reader, length) { + CMsgGCTFSpecificItemBroadcast.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCTFSpecificItemBroadcast(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCTFSpecificItemBroadcast(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_def_index = reader.uint32(); - break; - case 2: - message.was_destruction = reader.bool(); - break; - case 3: - message.user_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_def_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.was_destruction = reader.bool(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.user_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1161,11 +1356,11 @@ * @memberof CMsgGCTFSpecificItemBroadcast * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCTFSpecificItemBroadcast} CMsgGCTFSpecificItemBroadcast + * @returns {CMsgGCTFSpecificItemBroadcast & CMsgGCTFSpecificItemBroadcast.$Shape} CMsgGCTFSpecificItemBroadcast * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCTFSpecificItemBroadcast.decodeDelimited = function decodeDelimited(reader) { + CMsgGCTFSpecificItemBroadcast.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1179,16 +1374,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCTFSpecificItemBroadcast.verify = function verify(message) { + CMsgGCTFSpecificItemBroadcast.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) if (!$util.isInteger(message.item_def_index)) return "item_def_index: integer expected"; - if (message.was_destruction != null && message.hasOwnProperty("was_destruction")) + if (message.was_destruction != null && $Object.hasOwnProperty.call(message, "was_destruction")) if (typeof message.was_destruction !== "boolean") return "was_destruction: boolean expected"; - if (message.user_name != null && message.hasOwnProperty("user_name")) + if (message.user_name != null && $Object.hasOwnProperty.call(message, "user_name")) if (!$util.isString(message.user_name)) return "user_name: string expected"; return null; @@ -1202,16 +1401,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCTFSpecificItemBroadcast} CMsgGCTFSpecificItemBroadcast */ - CMsgGCTFSpecificItemBroadcast.fromObject = function fromObject(object) { + CMsgGCTFSpecificItemBroadcast.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCTFSpecificItemBroadcast) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCTFSpecificItemBroadcast: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCTFSpecificItemBroadcast(); if (object.item_def_index != null) message.item_def_index = object.item_def_index >>> 0; if (object.was_destruction != null) - message.was_destruction = Boolean(object.was_destruction); + message.was_destruction = $Boolean(object.was_destruction); if (object.user_name != null) - message.user_name = String(object.user_name); + message.user_name = $String(object.user_name); return message; }; @@ -1224,20 +1429,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCTFSpecificItemBroadcast.toObject = function toObject(message, options) { + CMsgGCTFSpecificItemBroadcast.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.item_def_index = 0; object.was_destruction = false; object.user_name = ""; } - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) object.item_def_index = message.item_def_index; - if (message.was_destruction != null && message.hasOwnProperty("was_destruction")) + if (message.was_destruction != null && $Object.hasOwnProperty.call(message, "was_destruction")) object.was_destruction = message.was_destruction; - if (message.user_name != null && message.hasOwnProperty("user_name")) + if (message.user_name != null && $Object.hasOwnProperty.call(message, "user_name")) object.user_name = message.user_name; return object; }; @@ -1249,8 +1458,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCTFSpecificItemBroadcast.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCTFSpecificItemBroadcast.prototype.toJSON = function() { + return CMsgGCTFSpecificItemBroadcast.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCTFSpecificItemBroadcast + * @function getTypeUrl + * @memberof CMsgGCTFSpecificItemBroadcast + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCTFSpecificItemBroadcast.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCTFSpecificItemBroadcast"; }; return CMsgGCTFSpecificItemBroadcast; @@ -1260,30 +1483,43 @@ /** * Properties of a CMsgTFWorldStatus. - * @exports ICMsgTFWorldStatus - * @interface ICMsgTFWorldStatus + * @typedef {Object} CMsgTFWorldStatus.$Properties * @property {boolean|null} [beta_stress_test_event_active] CMsgTFWorldStatus beta_stress_test_event_active * @property {ETFMatchGroup|null} [event_match_group] CMsgTFWorldStatus event_match_group * @property {number|null} [event_expire_time] CMsgTFWorldStatus event_expire_time * @property {number|null} [active_client_version] CMsgTFWorldStatus active_client_version * @property {Array.|null} [disabled_match_groups] CMsgTFWorldStatus disabled_match_groups + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTFWorldStatus. + * @exports ICMsgTFWorldStatus + * @interface ICMsgTFWorldStatus + * @augments CMsgTFWorldStatus.$Properties + * @deprecated Use CMsgTFWorldStatus.$Properties instead. + */ + + /** + * Shape of a CMsgTFWorldStatus. + * @typedef {CMsgTFWorldStatus.$Properties} CMsgTFWorldStatus.$Shape */ /** * Constructs a new CMsgTFWorldStatus. * @exports CMsgTFWorldStatus * @classdesc Represents a CMsgTFWorldStatus. - * @implements ICMsgTFWorldStatus * @constructor - * @param {ICMsgTFWorldStatus=} [properties] Properties to set + * @param {CMsgTFWorldStatus.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFWorldStatus(properties) { + var CMsgTFWorldStatus = function (properties) { this.disabled_match_groups = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFWorldStatus beta_stress_test_event_active. @@ -1330,10 +1566,14 @@ * @function create * @memberof CMsgTFWorldStatus * @static - * @param {ICMsgTFWorldStatus=} [properties] Properties to set + * @param {CMsgTFWorldStatus.$Properties=} [properties] Properties to set * @returns {CMsgTFWorldStatus} CMsgTFWorldStatus instance + * @type {{ + * (properties: CMsgTFWorldStatus.$Shape): CMsgTFWorldStatus & CMsgTFWorldStatus.$Shape; + * (properties?: CMsgTFWorldStatus.$Properties): CMsgTFWorldStatus; + * }} */ - CMsgTFWorldStatus.create = function create(properties) { + CMsgTFWorldStatus.create = function(properties) { return new CMsgTFWorldStatus(properties); }; @@ -1342,24 +1582,31 @@ * @function encode * @memberof CMsgTFWorldStatus * @static - * @param {ICMsgTFWorldStatus} message CMsgTFWorldStatus message or plain object to encode + * @param {CMsgTFWorldStatus.$Properties} message CMsgTFWorldStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFWorldStatus.encode = function encode(message, writer) { + CMsgTFWorldStatus.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.beta_stress_test_event_active != null && Object.hasOwnProperty.call(message, "beta_stress_test_event_active")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.beta_stress_test_event_active != null && $Object.hasOwnProperty.call(message, "beta_stress_test_event_active")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.beta_stress_test_event_active); - if (message.event_match_group != null && Object.hasOwnProperty.call(message, "event_match_group")) + if (message.event_match_group != null && $Object.hasOwnProperty.call(message, "event_match_group")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.event_match_group); - if (message.event_expire_time != null && Object.hasOwnProperty.call(message, "event_expire_time")) + if (message.event_expire_time != null && $Object.hasOwnProperty.call(message, "event_expire_time")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.event_expire_time); - if (message.active_client_version != null && Object.hasOwnProperty.call(message, "active_client_version")) + if (message.active_client_version != null && $Object.hasOwnProperty.call(message, "active_client_version")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.active_client_version); if (message.disabled_match_groups != null && message.disabled_match_groups.length) for (var i = 0; i < message.disabled_match_groups.length; ++i) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.disabled_match_groups[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1368,12 +1615,12 @@ * @function encodeDelimited * @memberof CMsgTFWorldStatus * @static - * @param {ICMsgTFWorldStatus} message CMsgTFWorldStatus message or plain object to encode + * @param {CMsgTFWorldStatus.$Properties} message CMsgTFWorldStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFWorldStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFWorldStatus.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1383,44 +1630,96 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFWorldStatus} CMsgTFWorldStatus + * @returns {CMsgTFWorldStatus & CMsgTFWorldStatus.$Shape} CMsgTFWorldStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFWorldStatus.decode = function decode(reader, length) { + CMsgTFWorldStatus.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFWorldStatus(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFWorldStatus(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.beta_stress_test_event_active = reader.bool(); - break; - case 2: - message.event_match_group = reader.int32(); - break; - case 3: - message.event_expire_time = reader.fixed32(); - break; - case 4: - message.active_client_version = reader.uint32(); - break; - case 5: - if (!(message.disabled_match_groups && message.disabled_match_groups.length)) - message.disabled_match_groups = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.disabled_match_groups.push(reader.int32()); - } else - message.disabled_match_groups.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.beta_stress_test_event_active = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFMatchGroup[value] !== $undefined) + message.event_match_group = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 5) + break; + message.event_expire_time = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.active_client_version = reader.uint32(); + continue; + } + case 5: { + if (wireType === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + start = reader.pos; + value = reader.int32(); + if ($root.ETFMatchGroup[value] !== $undefined) { + if (!(message.disabled_match_groups && message.disabled_match_groups.length)) + message.disabled_match_groups = []; + message.disabled_match_groups.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push($util.rawField(5, 0, reader.raw(start, reader.pos))); + } + } + continue; + } + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFMatchGroup[value] !== $undefined) { + if (!(message.disabled_match_groups && message.disabled_match_groups.length)) + message.disabled_match_groups = []; + message.disabled_match_groups.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1430,11 +1729,11 @@ * @memberof CMsgTFWorldStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFWorldStatus} CMsgTFWorldStatus + * @returns {CMsgTFWorldStatus & CMsgTFWorldStatus.$Shape} CMsgTFWorldStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFWorldStatus.decodeDelimited = function decodeDelimited(reader) { + CMsgTFWorldStatus.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1448,13 +1747,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFWorldStatus.verify = function verify(message) { + CMsgTFWorldStatus.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.beta_stress_test_event_active != null && message.hasOwnProperty("beta_stress_test_event_active")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.beta_stress_test_event_active != null && $Object.hasOwnProperty.call(message, "beta_stress_test_event_active")) if (typeof message.beta_stress_test_event_active !== "boolean") return "beta_stress_test_event_active: boolean expected"; - if (message.event_match_group != null && message.hasOwnProperty("event_match_group")) + if (message.event_match_group != null && $Object.hasOwnProperty.call(message, "event_match_group")) switch (message.event_match_group) { default: return "event_match_group: enum value expected"; @@ -1483,14 +1786,14 @@ case 8: break; } - if (message.event_expire_time != null && message.hasOwnProperty("event_expire_time")) + if (message.event_expire_time != null && $Object.hasOwnProperty.call(message, "event_expire_time")) if (!$util.isInteger(message.event_expire_time)) return "event_expire_time: integer expected"; - if (message.active_client_version != null && message.hasOwnProperty("active_client_version")) + if (message.active_client_version != null && $Object.hasOwnProperty.call(message, "active_client_version")) if (!$util.isInteger(message.active_client_version)) return "active_client_version: integer expected"; - if (message.disabled_match_groups != null && message.hasOwnProperty("disabled_match_groups")) { - if (!Array.isArray(message.disabled_match_groups)) + if (message.disabled_match_groups != null && $Object.hasOwnProperty.call(message, "disabled_match_groups")) { + if (!$Array.isArray(message.disabled_match_groups)) return "disabled_match_groups: array expected"; for (var i = 0; i < message.disabled_match_groups.length; ++i) switch (message.disabled_match_groups[i]) { @@ -1533,12 +1836,18 @@ * @param {Object.} object Plain object * @returns {CMsgTFWorldStatus} CMsgTFWorldStatus */ - CMsgTFWorldStatus.fromObject = function fromObject(object) { + CMsgTFWorldStatus.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFWorldStatus) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFWorldStatus: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFWorldStatus(); if (object.beta_stress_test_event_active != null) - message.beta_stress_test_event_active = Boolean(object.beta_stress_test_event_active); + message.beta_stress_test_event_active = $Boolean(object.beta_stress_test_event_active); switch (object.event_match_group) { case "k_eTFMatchGroup_Invalid": case -1: @@ -1632,110 +1941,111 @@ case 8: message.event_match_group = 8; break; + default: } if (object.event_expire_time != null) message.event_expire_time = object.event_expire_time >>> 0; if (object.active_client_version != null) message.active_client_version = object.active_client_version >>> 0; if (object.disabled_match_groups) { - if (!Array.isArray(object.disabled_match_groups)) - throw TypeError(".CMsgTFWorldStatus.disabled_match_groups: array expected"); + if (!$Array.isArray(object.disabled_match_groups)) + throw $TypeError(".CMsgTFWorldStatus.disabled_match_groups: array expected"); message.disabled_match_groups = []; for (var i = 0; i < object.disabled_match_groups.length; ++i) switch (object.disabled_match_groups[i]) { - default: case "k_eTFMatchGroup_Invalid": case -1: - message.disabled_match_groups[i] = -1; + message.disabled_match_groups[message.disabled_match_groups.length] = -1; break; case "k_eTFMatchGroup_MvM_Practice": case 0: - message.disabled_match_groups[i] = 0; + message.disabled_match_groups[message.disabled_match_groups.length] = 0; break; case "k_eTFMatchGroup_MvM_MannUp": case 1: - message.disabled_match_groups[i] = 1; + message.disabled_match_groups[message.disabled_match_groups.length] = 1; break; case "k_eTFMatchGroup_First": case 0: - message.disabled_match_groups[i] = 0; + message.disabled_match_groups[message.disabled_match_groups.length] = 0; break; case "k_eTFMatchGroup_MvM_Default": case 0: - message.disabled_match_groups[i] = 0; + message.disabled_match_groups[message.disabled_match_groups.length] = 0; break; case "k_eTFMatchGroup_MvM_First": case 0: - message.disabled_match_groups[i] = 0; + message.disabled_match_groups[message.disabled_match_groups.length] = 0; break; case "k_eTFMatchGroup_MvM_Last": case 1: - message.disabled_match_groups[i] = 1; + message.disabled_match_groups[message.disabled_match_groups.length] = 1; break; case "k_eTFMatchGroup_Ladder_6v6": case 2: - message.disabled_match_groups[i] = 2; + message.disabled_match_groups[message.disabled_match_groups.length] = 2; break; case "k_eTFMatchGroup_Ladder_9v9": case 3: - message.disabled_match_groups[i] = 3; + message.disabled_match_groups[message.disabled_match_groups.length] = 3; break; case "k_eTFMatchGroup_Ladder_12v12": case 4: - message.disabled_match_groups[i] = 4; + message.disabled_match_groups[message.disabled_match_groups.length] = 4; break; case "k_eTFMatchGroup_Ladder_Default": case 2: - message.disabled_match_groups[i] = 2; + message.disabled_match_groups[message.disabled_match_groups.length] = 2; break; case "k_eTFMatchGroup_Ladder_First": case 2: - message.disabled_match_groups[i] = 2; + message.disabled_match_groups[message.disabled_match_groups.length] = 2; break; case "k_eTFMatchGroup_Ladder_Last": case 4: - message.disabled_match_groups[i] = 4; + message.disabled_match_groups[message.disabled_match_groups.length] = 4; break; case "k_eTFMatchGroup_Casual_6v6": case 5: - message.disabled_match_groups[i] = 5; + message.disabled_match_groups[message.disabled_match_groups.length] = 5; break; case "k_eTFMatchGroup_Casual_9v9": case 6: - message.disabled_match_groups[i] = 6; + message.disabled_match_groups[message.disabled_match_groups.length] = 6; break; case "k_eTFMatchGroup_Casual_12v12": case 7: - message.disabled_match_groups[i] = 7; + message.disabled_match_groups[message.disabled_match_groups.length] = 7; break; case "k_eTFMatchGroup_Casual_Default": case 7: - message.disabled_match_groups[i] = 7; + message.disabled_match_groups[message.disabled_match_groups.length] = 7; break; case "k_eTFMatchGroup_Casual_First": case 5: - message.disabled_match_groups[i] = 5; + message.disabled_match_groups[message.disabled_match_groups.length] = 5; break; case "k_eTFMatchGroup_Casual_Last": case 7: - message.disabled_match_groups[i] = 7; + message.disabled_match_groups[message.disabled_match_groups.length] = 7; break; case "k_eTFMatchGroup_Event_Placeholder": case 8: - message.disabled_match_groups[i] = 8; + message.disabled_match_groups[message.disabled_match_groups.length] = 8; break; case "k_eTFMatchGroup_Event_Default": case 8: - message.disabled_match_groups[i] = 8; + message.disabled_match_groups[message.disabled_match_groups.length] = 8; break; case "k_eTFMatchGroup_Event_First": case 8: - message.disabled_match_groups[i] = 8; + message.disabled_match_groups[message.disabled_match_groups.length] = 8; break; case "k_eTFMatchGroup_Event_Last": case 8: - message.disabled_match_groups[i] = 8; + message.disabled_match_groups[message.disabled_match_groups.length] = 8; break; + default: } } return message; @@ -1750,30 +2060,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFWorldStatus.toObject = function toObject(message, options) { + CMsgTFWorldStatus.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.disabled_match_groups = []; if (options.defaults) { object.beta_stress_test_event_active = false; - object.event_match_group = options.enums === String ? "k_eTFMatchGroup_Invalid" : -1; + object.event_match_group = options.enums === $String ? "k_eTFMatchGroup_Invalid" : -1; object.event_expire_time = 0; object.active_client_version = 0; } - if (message.beta_stress_test_event_active != null && message.hasOwnProperty("beta_stress_test_event_active")) + if (message.beta_stress_test_event_active != null && $Object.hasOwnProperty.call(message, "beta_stress_test_event_active")) object.beta_stress_test_event_active = message.beta_stress_test_event_active; - if (message.event_match_group != null && message.hasOwnProperty("event_match_group")) - object.event_match_group = options.enums === String ? $root.ETFMatchGroup[message.event_match_group] : message.event_match_group; - if (message.event_expire_time != null && message.hasOwnProperty("event_expire_time")) + if (message.event_match_group != null && $Object.hasOwnProperty.call(message, "event_match_group")) + object.event_match_group = options.enums === $String ? $root.ETFMatchGroup[message.event_match_group] === $undefined ? message.event_match_group : $root.ETFMatchGroup[message.event_match_group] : message.event_match_group; + if (message.event_expire_time != null && $Object.hasOwnProperty.call(message, "event_expire_time")) object.event_expire_time = message.event_expire_time; - if (message.active_client_version != null && message.hasOwnProperty("active_client_version")) + if (message.active_client_version != null && $Object.hasOwnProperty.call(message, "active_client_version")) object.active_client_version = message.active_client_version; if (message.disabled_match_groups && message.disabled_match_groups.length) { - object.disabled_match_groups = []; + object.disabled_match_groups = $Array(message.disabled_match_groups.length); for (var j = 0; j < message.disabled_match_groups.length; ++j) - object.disabled_match_groups[j] = options.enums === String ? $root.ETFMatchGroup[message.disabled_match_groups[j]] : message.disabled_match_groups[j]; + object.disabled_match_groups[j] = options.enums === $String ? $root.ETFMatchGroup[message.disabled_match_groups[j]] === $undefined ? message.disabled_match_groups[j] : $root.ETFMatchGroup[message.disabled_match_groups[j]] : message.disabled_match_groups[j]; } return object; }; @@ -1785,8 +2099,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFWorldStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFWorldStatus.prototype.toJSON = function() { + return CMsgTFWorldStatus.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFWorldStatus + * @function getTypeUrl + * @memberof CMsgTFWorldStatus + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFWorldStatus.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFWorldStatus"; }; return CMsgTFWorldStatus; @@ -1796,30 +2124,43 @@ /** * Properties of a CSOTFDuelSummary. - * @exports ICSOTFDuelSummary - * @interface ICSOTFDuelSummary + * @typedef {Object} CSOTFDuelSummary.$Properties * @property {number|null} [account_id] CSOTFDuelSummary account_id * @property {number|null} [duel_wins] CSOTFDuelSummary duel_wins * @property {number|null} [duel_losses] CSOTFDuelSummary duel_losses * @property {number|null} [last_duel_account_id] CSOTFDuelSummary last_duel_account_id * @property {number|null} [last_duel_timestamp] CSOTFDuelSummary last_duel_timestamp * @property {number|null} [last_duel_status] CSOTFDuelSummary last_duel_status + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOTFDuelSummary. + * @exports ICSOTFDuelSummary + * @interface ICSOTFDuelSummary + * @augments CSOTFDuelSummary.$Properties + * @deprecated Use CSOTFDuelSummary.$Properties instead. + */ + + /** + * Shape of a CSOTFDuelSummary. + * @typedef {CSOTFDuelSummary.$Properties} CSOTFDuelSummary.$Shape */ /** * Constructs a new CSOTFDuelSummary. * @exports CSOTFDuelSummary * @classdesc Represents a CSOTFDuelSummary. - * @implements ICSOTFDuelSummary * @constructor - * @param {ICSOTFDuelSummary=} [properties] Properties to set + * @param {CSOTFDuelSummary.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOTFDuelSummary(properties) { + var CSOTFDuelSummary = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOTFDuelSummary account_id. @@ -1874,10 +2215,14 @@ * @function create * @memberof CSOTFDuelSummary * @static - * @param {ICSOTFDuelSummary=} [properties] Properties to set + * @param {CSOTFDuelSummary.$Properties=} [properties] Properties to set * @returns {CSOTFDuelSummary} CSOTFDuelSummary instance + * @type {{ + * (properties: CSOTFDuelSummary.$Shape): CSOTFDuelSummary & CSOTFDuelSummary.$Shape; + * (properties?: CSOTFDuelSummary.$Properties): CSOTFDuelSummary; + * }} */ - CSOTFDuelSummary.create = function create(properties) { + CSOTFDuelSummary.create = function(properties) { return new CSOTFDuelSummary(properties); }; @@ -1886,25 +2231,32 @@ * @function encode * @memberof CSOTFDuelSummary * @static - * @param {ICSOTFDuelSummary} message CSOTFDuelSummary message or plain object to encode + * @param {CSOTFDuelSummary.$Properties} message CSOTFDuelSummary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFDuelSummary.encode = function encode(message, writer) { + CSOTFDuelSummary.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.duel_wins != null && Object.hasOwnProperty.call(message, "duel_wins")) + if (message.duel_wins != null && $Object.hasOwnProperty.call(message, "duel_wins")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.duel_wins); - if (message.duel_losses != null && Object.hasOwnProperty.call(message, "duel_losses")) + if (message.duel_losses != null && $Object.hasOwnProperty.call(message, "duel_losses")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.duel_losses); - if (message.last_duel_account_id != null && Object.hasOwnProperty.call(message, "last_duel_account_id")) + if (message.last_duel_account_id != null && $Object.hasOwnProperty.call(message, "last_duel_account_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.last_duel_account_id); - if (message.last_duel_timestamp != null && Object.hasOwnProperty.call(message, "last_duel_timestamp")) + if (message.last_duel_timestamp != null && $Object.hasOwnProperty.call(message, "last_duel_timestamp")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.last_duel_timestamp); - if (message.last_duel_status != null && Object.hasOwnProperty.call(message, "last_duel_status")) + if (message.last_duel_status != null && $Object.hasOwnProperty.call(message, "last_duel_status")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.last_duel_status); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1913,12 +2265,12 @@ * @function encodeDelimited * @memberof CSOTFDuelSummary * @static - * @param {ICSOTFDuelSummary} message CSOTFDuelSummary message or plain object to encode + * @param {CSOTFDuelSummary.$Properties} message CSOTFDuelSummary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFDuelSummary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOTFDuelSummary.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1928,40 +2280,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFDuelSummary} CSOTFDuelSummary + * @returns {CSOTFDuelSummary & CSOTFDuelSummary.$Shape} CSOTFDuelSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFDuelSummary.decode = function decode(reader, length) { + CSOTFDuelSummary.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFDuelSummary(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFDuelSummary(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.duel_wins = reader.uint32(); - break; - case 3: - message.duel_losses = reader.uint32(); - break; - case 4: - message.last_duel_account_id = reader.uint32(); - break; - case 5: - message.last_duel_timestamp = reader.uint32(); - break; - case 6: - message.last_duel_status = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.duel_wins = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.duel_losses = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.last_duel_account_id = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.last_duel_timestamp = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.last_duel_status = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1971,11 +2355,11 @@ * @memberof CSOTFDuelSummary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFDuelSummary} CSOTFDuelSummary + * @returns {CSOTFDuelSummary & CSOTFDuelSummary.$Shape} CSOTFDuelSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFDuelSummary.decodeDelimited = function decodeDelimited(reader) { + CSOTFDuelSummary.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1989,25 +2373,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOTFDuelSummary.verify = function verify(message) { + CSOTFDuelSummary.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.duel_wins != null && message.hasOwnProperty("duel_wins")) + if (message.duel_wins != null && $Object.hasOwnProperty.call(message, "duel_wins")) if (!$util.isInteger(message.duel_wins)) return "duel_wins: integer expected"; - if (message.duel_losses != null && message.hasOwnProperty("duel_losses")) + if (message.duel_losses != null && $Object.hasOwnProperty.call(message, "duel_losses")) if (!$util.isInteger(message.duel_losses)) return "duel_losses: integer expected"; - if (message.last_duel_account_id != null && message.hasOwnProperty("last_duel_account_id")) + if (message.last_duel_account_id != null && $Object.hasOwnProperty.call(message, "last_duel_account_id")) if (!$util.isInteger(message.last_duel_account_id)) return "last_duel_account_id: integer expected"; - if (message.last_duel_timestamp != null && message.hasOwnProperty("last_duel_timestamp")) + if (message.last_duel_timestamp != null && $Object.hasOwnProperty.call(message, "last_duel_timestamp")) if (!$util.isInteger(message.last_duel_timestamp)) return "last_duel_timestamp: integer expected"; - if (message.last_duel_status != null && message.hasOwnProperty("last_duel_status")) + if (message.last_duel_status != null && $Object.hasOwnProperty.call(message, "last_duel_status")) if (!$util.isInteger(message.last_duel_status)) return "last_duel_status: integer expected"; return null; @@ -2021,9 +2409,15 @@ * @param {Object.} object Plain object * @returns {CSOTFDuelSummary} CSOTFDuelSummary */ - CSOTFDuelSummary.fromObject = function fromObject(object) { + CSOTFDuelSummary.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFDuelSummary) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFDuelSummary: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFDuelSummary(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -2049,9 +2443,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOTFDuelSummary.toObject = function toObject(message, options) { + CSOTFDuelSummary.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; @@ -2061,17 +2459,17 @@ object.last_duel_timestamp = 0; object.last_duel_status = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.duel_wins != null && message.hasOwnProperty("duel_wins")) + if (message.duel_wins != null && $Object.hasOwnProperty.call(message, "duel_wins")) object.duel_wins = message.duel_wins; - if (message.duel_losses != null && message.hasOwnProperty("duel_losses")) + if (message.duel_losses != null && $Object.hasOwnProperty.call(message, "duel_losses")) object.duel_losses = message.duel_losses; - if (message.last_duel_account_id != null && message.hasOwnProperty("last_duel_account_id")) + if (message.last_duel_account_id != null && $Object.hasOwnProperty.call(message, "last_duel_account_id")) object.last_duel_account_id = message.last_duel_account_id; - if (message.last_duel_timestamp != null && message.hasOwnProperty("last_duel_timestamp")) + if (message.last_duel_timestamp != null && $Object.hasOwnProperty.call(message, "last_duel_timestamp")) object.last_duel_timestamp = message.last_duel_timestamp; - if (message.last_duel_status != null && message.hasOwnProperty("last_duel_status")) + if (message.last_duel_status != null && $Object.hasOwnProperty.call(message, "last_duel_status")) object.last_duel_status = message.last_duel_status; return object; }; @@ -2083,8 +2481,22 @@ * @instance * @returns {Object.} JSON object */ - CSOTFDuelSummary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOTFDuelSummary.prototype.toJSON = function() { + return CSOTFDuelSummary.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOTFDuelSummary + * @function getTypeUrl + * @memberof CSOTFDuelSummary + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOTFDuelSummary.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFDuelSummary"; }; return CSOTFDuelSummary; @@ -2094,27 +2506,40 @@ /** * Properties of a CSOTFMapContribution. - * @exports ICSOTFMapContribution - * @interface ICSOTFMapContribution + * @typedef {Object} CSOTFMapContribution.$Properties * @property {number|null} [account_id] CSOTFMapContribution account_id * @property {number|null} [def_index] CSOTFMapContribution def_index * @property {number|null} [contribution_level] CSOTFMapContribution contribution_level + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOTFMapContribution. + * @exports ICSOTFMapContribution + * @interface ICSOTFMapContribution + * @augments CSOTFMapContribution.$Properties + * @deprecated Use CSOTFMapContribution.$Properties instead. + */ + + /** + * Shape of a CSOTFMapContribution. + * @typedef {CSOTFMapContribution.$Properties} CSOTFMapContribution.$Shape */ /** * Constructs a new CSOTFMapContribution. * @exports CSOTFMapContribution * @classdesc Represents a CSOTFMapContribution. - * @implements ICSOTFMapContribution * @constructor - * @param {ICSOTFMapContribution=} [properties] Properties to set + * @param {CSOTFMapContribution.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOTFMapContribution(properties) { + var CSOTFMapContribution = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOTFMapContribution account_id. @@ -2145,10 +2570,14 @@ * @function create * @memberof CSOTFMapContribution * @static - * @param {ICSOTFMapContribution=} [properties] Properties to set + * @param {CSOTFMapContribution.$Properties=} [properties] Properties to set * @returns {CSOTFMapContribution} CSOTFMapContribution instance + * @type {{ + * (properties: CSOTFMapContribution.$Shape): CSOTFMapContribution & CSOTFMapContribution.$Shape; + * (properties?: CSOTFMapContribution.$Properties): CSOTFMapContribution; + * }} */ - CSOTFMapContribution.create = function create(properties) { + CSOTFMapContribution.create = function(properties) { return new CSOTFMapContribution(properties); }; @@ -2157,19 +2586,26 @@ * @function encode * @memberof CSOTFMapContribution * @static - * @param {ICSOTFMapContribution} message CSOTFMapContribution message or plain object to encode + * @param {CSOTFMapContribution.$Properties} message CSOTFMapContribution message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFMapContribution.encode = function encode(message, writer) { + CSOTFMapContribution.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.def_index); - if (message.contribution_level != null && Object.hasOwnProperty.call(message, "contribution_level")) + if (message.contribution_level != null && $Object.hasOwnProperty.call(message, "contribution_level")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.contribution_level); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2178,12 +2614,12 @@ * @function encodeDelimited * @memberof CSOTFMapContribution * @static - * @param {ICSOTFMapContribution} message CSOTFMapContribution message or plain object to encode + * @param {CSOTFMapContribution.$Properties} message CSOTFMapContribution message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFMapContribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOTFMapContribution.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2193,31 +2629,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFMapContribution} CSOTFMapContribution + * @returns {CSOTFMapContribution & CSOTFMapContribution.$Shape} CSOTFMapContribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFMapContribution.decode = function decode(reader, length) { + CSOTFMapContribution.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFMapContribution(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFMapContribution(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.def_index = reader.uint32(); - break; - case 3: - message.contribution_level = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.def_index = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.contribution_level = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2227,11 +2686,11 @@ * @memberof CSOTFMapContribution * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFMapContribution} CSOTFMapContribution + * @returns {CSOTFMapContribution & CSOTFMapContribution.$Shape} CSOTFMapContribution * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFMapContribution.decodeDelimited = function decodeDelimited(reader) { + CSOTFMapContribution.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2245,16 +2704,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOTFMapContribution.verify = function verify(message) { + CSOTFMapContribution.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) if (!$util.isInteger(message.def_index)) return "def_index: integer expected"; - if (message.contribution_level != null && message.hasOwnProperty("contribution_level")) + if (message.contribution_level != null && $Object.hasOwnProperty.call(message, "contribution_level")) if (!$util.isInteger(message.contribution_level)) return "contribution_level: integer expected"; return null; @@ -2268,9 +2731,15 @@ * @param {Object.} object Plain object * @returns {CSOTFMapContribution} CSOTFMapContribution */ - CSOTFMapContribution.fromObject = function fromObject(object) { + CSOTFMapContribution.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFMapContribution) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFMapContribution: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFMapContribution(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -2290,20 +2759,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOTFMapContribution.toObject = function toObject(message, options) { + CSOTFMapContribution.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; object.def_index = 0; object.contribution_level = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) object.def_index = message.def_index; - if (message.contribution_level != null && message.hasOwnProperty("contribution_level")) + if (message.contribution_level != null && $Object.hasOwnProperty.call(message, "contribution_level")) object.contribution_level = message.contribution_level; return object; }; @@ -2315,8 +2788,22 @@ * @instance * @returns {Object.} JSON object */ - CSOTFMapContribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOTFMapContribution.prototype.toJSON = function() { + return CSOTFMapContribution.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOTFMapContribution + * @function getTypeUrl + * @memberof CSOTFMapContribution + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOTFMapContribution.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFMapContribution"; }; return CSOTFMapContribution; @@ -2326,26 +2813,39 @@ /** * Properties of a CMsgTFVoteKickBanPlayer. - * @exports ICMsgTFVoteKickBanPlayer - * @interface ICMsgTFVoteKickBanPlayer + * @typedef {Object} CMsgTFVoteKickBanPlayer.$Properties * @property {number|null} [account_id_subject] CMsgTFVoteKickBanPlayer account_id_subject * @property {number|null} [kick_reason] CMsgTFVoteKickBanPlayer kick_reason + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTFVoteKickBanPlayer. + * @exports ICMsgTFVoteKickBanPlayer + * @interface ICMsgTFVoteKickBanPlayer + * @augments CMsgTFVoteKickBanPlayer.$Properties + * @deprecated Use CMsgTFVoteKickBanPlayer.$Properties instead. + */ + + /** + * Shape of a CMsgTFVoteKickBanPlayer. + * @typedef {CMsgTFVoteKickBanPlayer.$Properties} CMsgTFVoteKickBanPlayer.$Shape */ /** * Constructs a new CMsgTFVoteKickBanPlayer. * @exports CMsgTFVoteKickBanPlayer * @classdesc Represents a CMsgTFVoteKickBanPlayer. - * @implements ICMsgTFVoteKickBanPlayer * @constructor - * @param {ICMsgTFVoteKickBanPlayer=} [properties] Properties to set + * @param {CMsgTFVoteKickBanPlayer.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFVoteKickBanPlayer(properties) { + var CMsgTFVoteKickBanPlayer = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFVoteKickBanPlayer account_id_subject. @@ -2368,10 +2868,14 @@ * @function create * @memberof CMsgTFVoteKickBanPlayer * @static - * @param {ICMsgTFVoteKickBanPlayer=} [properties] Properties to set + * @param {CMsgTFVoteKickBanPlayer.$Properties=} [properties] Properties to set * @returns {CMsgTFVoteKickBanPlayer} CMsgTFVoteKickBanPlayer instance + * @type {{ + * (properties: CMsgTFVoteKickBanPlayer.$Shape): CMsgTFVoteKickBanPlayer & CMsgTFVoteKickBanPlayer.$Shape; + * (properties?: CMsgTFVoteKickBanPlayer.$Properties): CMsgTFVoteKickBanPlayer; + * }} */ - CMsgTFVoteKickBanPlayer.create = function create(properties) { + CMsgTFVoteKickBanPlayer.create = function(properties) { return new CMsgTFVoteKickBanPlayer(properties); }; @@ -2380,17 +2884,24 @@ * @function encode * @memberof CMsgTFVoteKickBanPlayer * @static - * @param {ICMsgTFVoteKickBanPlayer} message CMsgTFVoteKickBanPlayer message or plain object to encode + * @param {CMsgTFVoteKickBanPlayer.$Properties} message CMsgTFVoteKickBanPlayer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFVoteKickBanPlayer.encode = function encode(message, writer) { + CMsgTFVoteKickBanPlayer.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id_subject != null && Object.hasOwnProperty.call(message, "account_id_subject")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id_subject != null && $Object.hasOwnProperty.call(message, "account_id_subject")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id_subject); - if (message.kick_reason != null && Object.hasOwnProperty.call(message, "kick_reason")) + if (message.kick_reason != null && $Object.hasOwnProperty.call(message, "kick_reason")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.kick_reason); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2399,12 +2910,12 @@ * @function encodeDelimited * @memberof CMsgTFVoteKickBanPlayer * @static - * @param {ICMsgTFVoteKickBanPlayer} message CMsgTFVoteKickBanPlayer message or plain object to encode + * @param {CMsgTFVoteKickBanPlayer.$Properties} message CMsgTFVoteKickBanPlayer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFVoteKickBanPlayer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFVoteKickBanPlayer.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2414,28 +2925,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFVoteKickBanPlayer} CMsgTFVoteKickBanPlayer + * @returns {CMsgTFVoteKickBanPlayer & CMsgTFVoteKickBanPlayer.$Shape} CMsgTFVoteKickBanPlayer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFVoteKickBanPlayer.decode = function decode(reader, length) { + CMsgTFVoteKickBanPlayer.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFVoteKickBanPlayer(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFVoteKickBanPlayer(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id_subject = reader.uint32(); - break; - case 2: - message.kick_reason = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id_subject = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.kick_reason = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2445,11 +2976,11 @@ * @memberof CMsgTFVoteKickBanPlayer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFVoteKickBanPlayer} CMsgTFVoteKickBanPlayer + * @returns {CMsgTFVoteKickBanPlayer & CMsgTFVoteKickBanPlayer.$Shape} CMsgTFVoteKickBanPlayer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFVoteKickBanPlayer.decodeDelimited = function decodeDelimited(reader) { + CMsgTFVoteKickBanPlayer.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2463,13 +2994,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFVoteKickBanPlayer.verify = function verify(message) { + CMsgTFVoteKickBanPlayer.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id_subject != null && message.hasOwnProperty("account_id_subject")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id_subject != null && $Object.hasOwnProperty.call(message, "account_id_subject")) if (!$util.isInteger(message.account_id_subject)) return "account_id_subject: integer expected"; - if (message.kick_reason != null && message.hasOwnProperty("kick_reason")) + if (message.kick_reason != null && $Object.hasOwnProperty.call(message, "kick_reason")) if (!$util.isInteger(message.kick_reason)) return "kick_reason: integer expected"; return null; @@ -2483,9 +3018,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFVoteKickBanPlayer} CMsgTFVoteKickBanPlayer */ - CMsgTFVoteKickBanPlayer.fromObject = function fromObject(object) { + CMsgTFVoteKickBanPlayer.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFVoteKickBanPlayer) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFVoteKickBanPlayer: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFVoteKickBanPlayer(); if (object.account_id_subject != null) message.account_id_subject = object.account_id_subject >>> 0; @@ -2503,17 +3044,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFVoteKickBanPlayer.toObject = function toObject(message, options) { + CMsgTFVoteKickBanPlayer.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id_subject = 0; object.kick_reason = 0; } - if (message.account_id_subject != null && message.hasOwnProperty("account_id_subject")) + if (message.account_id_subject != null && $Object.hasOwnProperty.call(message, "account_id_subject")) object.account_id_subject = message.account_id_subject; - if (message.kick_reason != null && message.hasOwnProperty("kick_reason")) + if (message.kick_reason != null && $Object.hasOwnProperty.call(message, "kick_reason")) object.kick_reason = message.kick_reason; return object; }; @@ -2525,8 +3070,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFVoteKickBanPlayer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFVoteKickBanPlayer.prototype.toJSON = function() { + return CMsgTFVoteKickBanPlayer.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFVoteKickBanPlayer + * @function getTypeUrl + * @memberof CMsgTFVoteKickBanPlayer + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFVoteKickBanPlayer.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFVoteKickBanPlayer"; }; return CMsgTFVoteKickBanPlayer; @@ -2536,8 +3095,7 @@ /** * Properties of a CMsgTFVoteKickBanPlayerResult. - * @exports ICMsgTFVoteKickBanPlayerResult - * @interface ICMsgTFVoteKickBanPlayerResult + * @typedef {Object} CMsgTFVoteKickBanPlayerResult.$Properties * @property {number|null} [account_id_initiator] CMsgTFVoteKickBanPlayerResult account_id_initiator * @property {number|null} [account_id_subject] CMsgTFVoteKickBanPlayerResult account_id_subject * @property {number|null} [kick_reason] CMsgTFVoteKickBanPlayerResult kick_reason @@ -2545,22 +3103,36 @@ * @property {number|null} [num_yes_votes] CMsgTFVoteKickBanPlayerResult num_yes_votes * @property {number|null} [num_no_votes] CMsgTFVoteKickBanPlayerResult num_no_votes * @property {number|null} [num_possible_votes] CMsgTFVoteKickBanPlayerResult num_possible_votes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTFVoteKickBanPlayerResult. + * @exports ICMsgTFVoteKickBanPlayerResult + * @interface ICMsgTFVoteKickBanPlayerResult + * @augments CMsgTFVoteKickBanPlayerResult.$Properties + * @deprecated Use CMsgTFVoteKickBanPlayerResult.$Properties instead. + */ + + /** + * Shape of a CMsgTFVoteKickBanPlayerResult. + * @typedef {CMsgTFVoteKickBanPlayerResult.$Properties} CMsgTFVoteKickBanPlayerResult.$Shape */ /** * Constructs a new CMsgTFVoteKickBanPlayerResult. * @exports CMsgTFVoteKickBanPlayerResult * @classdesc Represents a CMsgTFVoteKickBanPlayerResult. - * @implements ICMsgTFVoteKickBanPlayerResult * @constructor - * @param {ICMsgTFVoteKickBanPlayerResult=} [properties] Properties to set + * @param {CMsgTFVoteKickBanPlayerResult.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFVoteKickBanPlayerResult(properties) { + var CMsgTFVoteKickBanPlayerResult = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFVoteKickBanPlayerResult account_id_initiator. @@ -2623,10 +3195,14 @@ * @function create * @memberof CMsgTFVoteKickBanPlayerResult * @static - * @param {ICMsgTFVoteKickBanPlayerResult=} [properties] Properties to set + * @param {CMsgTFVoteKickBanPlayerResult.$Properties=} [properties] Properties to set * @returns {CMsgTFVoteKickBanPlayerResult} CMsgTFVoteKickBanPlayerResult instance + * @type {{ + * (properties: CMsgTFVoteKickBanPlayerResult.$Shape): CMsgTFVoteKickBanPlayerResult & CMsgTFVoteKickBanPlayerResult.$Shape; + * (properties?: CMsgTFVoteKickBanPlayerResult.$Properties): CMsgTFVoteKickBanPlayerResult; + * }} */ - CMsgTFVoteKickBanPlayerResult.create = function create(properties) { + CMsgTFVoteKickBanPlayerResult.create = function(properties) { return new CMsgTFVoteKickBanPlayerResult(properties); }; @@ -2635,27 +3211,34 @@ * @function encode * @memberof CMsgTFVoteKickBanPlayerResult * @static - * @param {ICMsgTFVoteKickBanPlayerResult} message CMsgTFVoteKickBanPlayerResult message or plain object to encode + * @param {CMsgTFVoteKickBanPlayerResult.$Properties} message CMsgTFVoteKickBanPlayerResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFVoteKickBanPlayerResult.encode = function encode(message, writer) { + CMsgTFVoteKickBanPlayerResult.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id_initiator != null && Object.hasOwnProperty.call(message, "account_id_initiator")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id_initiator != null && $Object.hasOwnProperty.call(message, "account_id_initiator")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id_initiator); - if (message.account_id_subject != null && Object.hasOwnProperty.call(message, "account_id_subject")) + if (message.account_id_subject != null && $Object.hasOwnProperty.call(message, "account_id_subject")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_id_subject); - if (message.kick_reason != null && Object.hasOwnProperty.call(message, "kick_reason")) + if (message.kick_reason != null && $Object.hasOwnProperty.call(message, "kick_reason")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.kick_reason); - if (message.kick_successful != null && Object.hasOwnProperty.call(message, "kick_successful")) + if (message.kick_successful != null && $Object.hasOwnProperty.call(message, "kick_successful")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.kick_successful); - if (message.num_yes_votes != null && Object.hasOwnProperty.call(message, "num_yes_votes")) + if (message.num_yes_votes != null && $Object.hasOwnProperty.call(message, "num_yes_votes")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.num_yes_votes); - if (message.num_no_votes != null && Object.hasOwnProperty.call(message, "num_no_votes")) + if (message.num_no_votes != null && $Object.hasOwnProperty.call(message, "num_no_votes")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.num_no_votes); - if (message.num_possible_votes != null && Object.hasOwnProperty.call(message, "num_possible_votes")) + if (message.num_possible_votes != null && $Object.hasOwnProperty.call(message, "num_possible_votes")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.num_possible_votes); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2664,12 +3247,12 @@ * @function encodeDelimited * @memberof CMsgTFVoteKickBanPlayerResult * @static - * @param {ICMsgTFVoteKickBanPlayerResult} message CMsgTFVoteKickBanPlayerResult message or plain object to encode + * @param {CMsgTFVoteKickBanPlayerResult.$Properties} message CMsgTFVoteKickBanPlayerResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFVoteKickBanPlayerResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFVoteKickBanPlayerResult.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2679,43 +3262,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFVoteKickBanPlayerResult} CMsgTFVoteKickBanPlayerResult + * @returns {CMsgTFVoteKickBanPlayerResult & CMsgTFVoteKickBanPlayerResult.$Shape} CMsgTFVoteKickBanPlayerResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFVoteKickBanPlayerResult.decode = function decode(reader, length) { + CMsgTFVoteKickBanPlayerResult.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFVoteKickBanPlayerResult(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFVoteKickBanPlayerResult(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id_initiator = reader.uint32(); - break; - case 2: - message.account_id_subject = reader.uint32(); - break; - case 3: - message.kick_reason = reader.uint32(); - break; - case 4: - message.kick_successful = reader.bool(); - break; - case 5: - message.num_yes_votes = reader.uint32(); - break; - case 6: - message.num_no_votes = reader.uint32(); - break; - case 7: - message.num_possible_votes = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id_initiator = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.account_id_subject = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.kick_reason = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.kick_successful = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.num_yes_votes = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.num_no_votes = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.num_possible_votes = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2725,11 +3343,11 @@ * @memberof CMsgTFVoteKickBanPlayerResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFVoteKickBanPlayerResult} CMsgTFVoteKickBanPlayerResult + * @returns {CMsgTFVoteKickBanPlayerResult & CMsgTFVoteKickBanPlayerResult.$Shape} CMsgTFVoteKickBanPlayerResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFVoteKickBanPlayerResult.decodeDelimited = function decodeDelimited(reader) { + CMsgTFVoteKickBanPlayerResult.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2743,28 +3361,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFVoteKickBanPlayerResult.verify = function verify(message) { + CMsgTFVoteKickBanPlayerResult.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id_initiator != null && message.hasOwnProperty("account_id_initiator")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id_initiator != null && $Object.hasOwnProperty.call(message, "account_id_initiator")) if (!$util.isInteger(message.account_id_initiator)) return "account_id_initiator: integer expected"; - if (message.account_id_subject != null && message.hasOwnProperty("account_id_subject")) + if (message.account_id_subject != null && $Object.hasOwnProperty.call(message, "account_id_subject")) if (!$util.isInteger(message.account_id_subject)) return "account_id_subject: integer expected"; - if (message.kick_reason != null && message.hasOwnProperty("kick_reason")) + if (message.kick_reason != null && $Object.hasOwnProperty.call(message, "kick_reason")) if (!$util.isInteger(message.kick_reason)) return "kick_reason: integer expected"; - if (message.kick_successful != null && message.hasOwnProperty("kick_successful")) + if (message.kick_successful != null && $Object.hasOwnProperty.call(message, "kick_successful")) if (typeof message.kick_successful !== "boolean") return "kick_successful: boolean expected"; - if (message.num_yes_votes != null && message.hasOwnProperty("num_yes_votes")) + if (message.num_yes_votes != null && $Object.hasOwnProperty.call(message, "num_yes_votes")) if (!$util.isInteger(message.num_yes_votes)) return "num_yes_votes: integer expected"; - if (message.num_no_votes != null && message.hasOwnProperty("num_no_votes")) + if (message.num_no_votes != null && $Object.hasOwnProperty.call(message, "num_no_votes")) if (!$util.isInteger(message.num_no_votes)) return "num_no_votes: integer expected"; - if (message.num_possible_votes != null && message.hasOwnProperty("num_possible_votes")) + if (message.num_possible_votes != null && $Object.hasOwnProperty.call(message, "num_possible_votes")) if (!$util.isInteger(message.num_possible_votes)) return "num_possible_votes: integer expected"; return null; @@ -2778,9 +3400,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFVoteKickBanPlayerResult} CMsgTFVoteKickBanPlayerResult */ - CMsgTFVoteKickBanPlayerResult.fromObject = function fromObject(object) { + CMsgTFVoteKickBanPlayerResult.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFVoteKickBanPlayerResult) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFVoteKickBanPlayerResult: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFVoteKickBanPlayerResult(); if (object.account_id_initiator != null) message.account_id_initiator = object.account_id_initiator >>> 0; @@ -2789,7 +3417,7 @@ if (object.kick_reason != null) message.kick_reason = object.kick_reason >>> 0; if (object.kick_successful != null) - message.kick_successful = Boolean(object.kick_successful); + message.kick_successful = $Boolean(object.kick_successful); if (object.num_yes_votes != null) message.num_yes_votes = object.num_yes_votes >>> 0; if (object.num_no_votes != null) @@ -2808,9 +3436,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFVoteKickBanPlayerResult.toObject = function toObject(message, options) { + CMsgTFVoteKickBanPlayerResult.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id_initiator = 0; @@ -2821,19 +3453,19 @@ object.num_no_votes = 0; object.num_possible_votes = 0; } - if (message.account_id_initiator != null && message.hasOwnProperty("account_id_initiator")) + if (message.account_id_initiator != null && $Object.hasOwnProperty.call(message, "account_id_initiator")) object.account_id_initiator = message.account_id_initiator; - if (message.account_id_subject != null && message.hasOwnProperty("account_id_subject")) + if (message.account_id_subject != null && $Object.hasOwnProperty.call(message, "account_id_subject")) object.account_id_subject = message.account_id_subject; - if (message.kick_reason != null && message.hasOwnProperty("kick_reason")) + if (message.kick_reason != null && $Object.hasOwnProperty.call(message, "kick_reason")) object.kick_reason = message.kick_reason; - if (message.kick_successful != null && message.hasOwnProperty("kick_successful")) + if (message.kick_successful != null && $Object.hasOwnProperty.call(message, "kick_successful")) object.kick_successful = message.kick_successful; - if (message.num_yes_votes != null && message.hasOwnProperty("num_yes_votes")) + if (message.num_yes_votes != null && $Object.hasOwnProperty.call(message, "num_yes_votes")) object.num_yes_votes = message.num_yes_votes; - if (message.num_no_votes != null && message.hasOwnProperty("num_no_votes")) + if (message.num_no_votes != null && $Object.hasOwnProperty.call(message, "num_no_votes")) object.num_no_votes = message.num_no_votes; - if (message.num_possible_votes != null && message.hasOwnProperty("num_possible_votes")) + if (message.num_possible_votes != null && $Object.hasOwnProperty.call(message, "num_possible_votes")) object.num_possible_votes = message.num_possible_votes; return object; }; @@ -2845,8 +3477,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFVoteKickBanPlayerResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFVoteKickBanPlayerResult.prototype.toJSON = function() { + return CMsgTFVoteKickBanPlayerResult.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFVoteKickBanPlayerResult + * @function getTypeUrl + * @memberof CMsgTFVoteKickBanPlayerResult + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFVoteKickBanPlayerResult.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFVoteKickBanPlayerResult"; }; return CMsgTFVoteKickBanPlayerResult; @@ -2854,27 +3500,40 @@ $root.CMsgTFFreeTrialChooseMostHelpfulFriend = (function() { + /** + * Properties of a CMsgTFFreeTrialChooseMostHelpfulFriend. + * @typedef {Object} CMsgTFFreeTrialChooseMostHelpfulFriend.$Properties + * @property {number|null} [account_id_friend] CMsgTFFreeTrialChooseMostHelpfulFriend account_id_friend + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFFreeTrialChooseMostHelpfulFriend. * @exports ICMsgTFFreeTrialChooseMostHelpfulFriend * @interface ICMsgTFFreeTrialChooseMostHelpfulFriend - * @property {number|null} [account_id_friend] CMsgTFFreeTrialChooseMostHelpfulFriend account_id_friend + * @augments CMsgTFFreeTrialChooseMostHelpfulFriend.$Properties + * @deprecated Use CMsgTFFreeTrialChooseMostHelpfulFriend.$Properties instead. + */ + + /** + * Shape of a CMsgTFFreeTrialChooseMostHelpfulFriend. + * @typedef {CMsgTFFreeTrialChooseMostHelpfulFriend.$Properties} CMsgTFFreeTrialChooseMostHelpfulFriend.$Shape */ /** * Constructs a new CMsgTFFreeTrialChooseMostHelpfulFriend. * @exports CMsgTFFreeTrialChooseMostHelpfulFriend * @classdesc Represents a CMsgTFFreeTrialChooseMostHelpfulFriend. - * @implements ICMsgTFFreeTrialChooseMostHelpfulFriend * @constructor - * @param {ICMsgTFFreeTrialChooseMostHelpfulFriend=} [properties] Properties to set + * @param {CMsgTFFreeTrialChooseMostHelpfulFriend.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFFreeTrialChooseMostHelpfulFriend(properties) { + var CMsgTFFreeTrialChooseMostHelpfulFriend = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFFreeTrialChooseMostHelpfulFriend account_id_friend. @@ -2889,10 +3548,14 @@ * @function create * @memberof CMsgTFFreeTrialChooseMostHelpfulFriend * @static - * @param {ICMsgTFFreeTrialChooseMostHelpfulFriend=} [properties] Properties to set + * @param {CMsgTFFreeTrialChooseMostHelpfulFriend.$Properties=} [properties] Properties to set * @returns {CMsgTFFreeTrialChooseMostHelpfulFriend} CMsgTFFreeTrialChooseMostHelpfulFriend instance + * @type {{ + * (properties: CMsgTFFreeTrialChooseMostHelpfulFriend.$Shape): CMsgTFFreeTrialChooseMostHelpfulFriend & CMsgTFFreeTrialChooseMostHelpfulFriend.$Shape; + * (properties?: CMsgTFFreeTrialChooseMostHelpfulFriend.$Properties): CMsgTFFreeTrialChooseMostHelpfulFriend; + * }} */ - CMsgTFFreeTrialChooseMostHelpfulFriend.create = function create(properties) { + CMsgTFFreeTrialChooseMostHelpfulFriend.create = function(properties) { return new CMsgTFFreeTrialChooseMostHelpfulFriend(properties); }; @@ -2901,15 +3564,22 @@ * @function encode * @memberof CMsgTFFreeTrialChooseMostHelpfulFriend * @static - * @param {ICMsgTFFreeTrialChooseMostHelpfulFriend} message CMsgTFFreeTrialChooseMostHelpfulFriend message or plain object to encode + * @param {CMsgTFFreeTrialChooseMostHelpfulFriend.$Properties} message CMsgTFFreeTrialChooseMostHelpfulFriend message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFFreeTrialChooseMostHelpfulFriend.encode = function encode(message, writer) { + CMsgTFFreeTrialChooseMostHelpfulFriend.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id_friend != null && Object.hasOwnProperty.call(message, "account_id_friend")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id_friend != null && $Object.hasOwnProperty.call(message, "account_id_friend")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id_friend); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2918,12 +3588,12 @@ * @function encodeDelimited * @memberof CMsgTFFreeTrialChooseMostHelpfulFriend * @static - * @param {ICMsgTFFreeTrialChooseMostHelpfulFriend} message CMsgTFFreeTrialChooseMostHelpfulFriend message or plain object to encode + * @param {CMsgTFFreeTrialChooseMostHelpfulFriend.$Properties} message CMsgTFFreeTrialChooseMostHelpfulFriend message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFFreeTrialChooseMostHelpfulFriend.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFFreeTrialChooseMostHelpfulFriend.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2933,25 +3603,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFFreeTrialChooseMostHelpfulFriend} CMsgTFFreeTrialChooseMostHelpfulFriend + * @returns {CMsgTFFreeTrialChooseMostHelpfulFriend & CMsgTFFreeTrialChooseMostHelpfulFriend.$Shape} CMsgTFFreeTrialChooseMostHelpfulFriend * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFFreeTrialChooseMostHelpfulFriend.decode = function decode(reader, length) { + CMsgTFFreeTrialChooseMostHelpfulFriend.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFFreeTrialChooseMostHelpfulFriend(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFFreeTrialChooseMostHelpfulFriend(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id_friend = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id_friend = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -2961,11 +3648,11 @@ * @memberof CMsgTFFreeTrialChooseMostHelpfulFriend * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFFreeTrialChooseMostHelpfulFriend} CMsgTFFreeTrialChooseMostHelpfulFriend + * @returns {CMsgTFFreeTrialChooseMostHelpfulFriend & CMsgTFFreeTrialChooseMostHelpfulFriend.$Shape} CMsgTFFreeTrialChooseMostHelpfulFriend * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFFreeTrialChooseMostHelpfulFriend.decodeDelimited = function decodeDelimited(reader) { + CMsgTFFreeTrialChooseMostHelpfulFriend.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2979,10 +3666,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFFreeTrialChooseMostHelpfulFriend.verify = function verify(message) { + CMsgTFFreeTrialChooseMostHelpfulFriend.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id_friend != null && message.hasOwnProperty("account_id_friend")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id_friend != null && $Object.hasOwnProperty.call(message, "account_id_friend")) if (!$util.isInteger(message.account_id_friend)) return "account_id_friend: integer expected"; return null; @@ -2996,9 +3687,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFFreeTrialChooseMostHelpfulFriend} CMsgTFFreeTrialChooseMostHelpfulFriend */ - CMsgTFFreeTrialChooseMostHelpfulFriend.fromObject = function fromObject(object) { + CMsgTFFreeTrialChooseMostHelpfulFriend.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFFreeTrialChooseMostHelpfulFriend) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFFreeTrialChooseMostHelpfulFriend: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFFreeTrialChooseMostHelpfulFriend(); if (object.account_id_friend != null) message.account_id_friend = object.account_id_friend >>> 0; @@ -3014,13 +3711,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFFreeTrialChooseMostHelpfulFriend.toObject = function toObject(message, options) { + CMsgTFFreeTrialChooseMostHelpfulFriend.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.account_id_friend = 0; - if (message.account_id_friend != null && message.hasOwnProperty("account_id_friend")) + if (message.account_id_friend != null && $Object.hasOwnProperty.call(message, "account_id_friend")) object.account_id_friend = message.account_id_friend; return object; }; @@ -3032,8 +3733,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFFreeTrialChooseMostHelpfulFriend.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFFreeTrialChooseMostHelpfulFriend.prototype.toJSON = function() { + return CMsgTFFreeTrialChooseMostHelpfulFriend.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFFreeTrialChooseMostHelpfulFriend + * @function getTypeUrl + * @memberof CMsgTFFreeTrialChooseMostHelpfulFriend + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFFreeTrialChooseMostHelpfulFriend.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFFreeTrialChooseMostHelpfulFriend"; }; return CMsgTFFreeTrialChooseMostHelpfulFriend; @@ -3041,28 +3756,41 @@ $root.CMsgTFRequestTF2Friends = (function() { + /** + * Properties of a CMsgTFRequestTF2Friends. + * @typedef {Object} CMsgTFRequestTF2Friends.$Properties + * @property {Array.|null} [account_ids] CMsgTFRequestTF2Friends account_ids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFRequestTF2Friends. * @exports ICMsgTFRequestTF2Friends * @interface ICMsgTFRequestTF2Friends - * @property {Array.|null} [account_ids] CMsgTFRequestTF2Friends account_ids + * @augments CMsgTFRequestTF2Friends.$Properties + * @deprecated Use CMsgTFRequestTF2Friends.$Properties instead. + */ + + /** + * Shape of a CMsgTFRequestTF2Friends. + * @typedef {CMsgTFRequestTF2Friends.$Properties} CMsgTFRequestTF2Friends.$Shape */ /** * Constructs a new CMsgTFRequestTF2Friends. * @exports CMsgTFRequestTF2Friends * @classdesc Represents a CMsgTFRequestTF2Friends. - * @implements ICMsgTFRequestTF2Friends * @constructor - * @param {ICMsgTFRequestTF2Friends=} [properties] Properties to set + * @param {CMsgTFRequestTF2Friends.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFRequestTF2Friends(properties) { + var CMsgTFRequestTF2Friends = function (properties) { this.account_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFRequestTF2Friends account_ids. @@ -3077,10 +3805,14 @@ * @function create * @memberof CMsgTFRequestTF2Friends * @static - * @param {ICMsgTFRequestTF2Friends=} [properties] Properties to set + * @param {CMsgTFRequestTF2Friends.$Properties=} [properties] Properties to set * @returns {CMsgTFRequestTF2Friends} CMsgTFRequestTF2Friends instance + * @type {{ + * (properties: CMsgTFRequestTF2Friends.$Shape): CMsgTFRequestTF2Friends & CMsgTFRequestTF2Friends.$Shape; + * (properties?: CMsgTFRequestTF2Friends.$Properties): CMsgTFRequestTF2Friends; + * }} */ - CMsgTFRequestTF2Friends.create = function create(properties) { + CMsgTFRequestTF2Friends.create = function(properties) { return new CMsgTFRequestTF2Friends(properties); }; @@ -3089,16 +3821,23 @@ * @function encode * @memberof CMsgTFRequestTF2Friends * @static - * @param {ICMsgTFRequestTF2Friends} message CMsgTFRequestTF2Friends message or plain object to encode + * @param {CMsgTFRequestTF2Friends.$Properties} message CMsgTFRequestTF2Friends message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFRequestTF2Friends.encode = function encode(message, writer) { + CMsgTFRequestTF2Friends.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.account_ids != null && message.account_ids.length) for (var i = 0; i < message.account_ids.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_ids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3107,12 +3846,12 @@ * @function encodeDelimited * @memberof CMsgTFRequestTF2Friends * @static - * @param {ICMsgTFRequestTF2Friends} message CMsgTFRequestTF2Friends message or plain object to encode + * @param {CMsgTFRequestTF2Friends.$Properties} message CMsgTFRequestTF2Friends message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFRequestTF2Friends.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFRequestTF2Friends.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3122,32 +3861,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFRequestTF2Friends} CMsgTFRequestTF2Friends + * @returns {CMsgTFRequestTF2Friends & CMsgTFRequestTF2Friends.$Shape} CMsgTFRequestTF2Friends * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFRequestTF2Friends.decode = function decode(reader, length) { + CMsgTFRequestTF2Friends.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFRequestTF2Friends(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFRequestTF2Friends(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.account_ids && message.account_ids.length)) - message.account_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.account_ids.push(reader.uint32()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.account_ids && message.account_ids.length)) + message.account_ids = []; + reader.uint32s(message.account_ids); + continue; + } + if (wireType !== 0) + break; + if (!(message.account_ids && message.account_ids.length)) + message.account_ids = []; message.account_ids.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3157,11 +3914,11 @@ * @memberof CMsgTFRequestTF2Friends * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFRequestTF2Friends} CMsgTFRequestTF2Friends + * @returns {CMsgTFRequestTF2Friends & CMsgTFRequestTF2Friends.$Shape} CMsgTFRequestTF2Friends * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFRequestTF2Friends.decodeDelimited = function decodeDelimited(reader) { + CMsgTFRequestTF2Friends.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3175,11 +3932,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFRequestTF2Friends.verify = function verify(message) { + CMsgTFRequestTF2Friends.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_ids != null && message.hasOwnProperty("account_ids")) { - if (!Array.isArray(message.account_ids)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_ids != null && $Object.hasOwnProperty.call(message, "account_ids")) { + if (!$Array.isArray(message.account_ids)) return "account_ids: array expected"; for (var i = 0; i < message.account_ids.length; ++i) if (!$util.isInteger(message.account_ids[i])) @@ -3196,14 +3957,20 @@ * @param {Object.} object Plain object * @returns {CMsgTFRequestTF2Friends} CMsgTFRequestTF2Friends */ - CMsgTFRequestTF2Friends.fromObject = function fromObject(object) { + CMsgTFRequestTF2Friends.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFRequestTF2Friends) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFRequestTF2Friends: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFRequestTF2Friends(); if (object.account_ids) { - if (!Array.isArray(object.account_ids)) - throw TypeError(".CMsgTFRequestTF2Friends.account_ids: array expected"); - message.account_ids = []; + if (!$Array.isArray(object.account_ids)) + throw $TypeError(".CMsgTFRequestTF2Friends.account_ids: array expected"); + message.account_ids = $Array(object.account_ids.length); for (var i = 0; i < object.account_ids.length; ++i) message.account_ids[i] = object.account_ids[i] >>> 0; } @@ -3219,14 +3986,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFRequestTF2Friends.toObject = function toObject(message, options) { + CMsgTFRequestTF2Friends.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.account_ids = []; if (message.account_ids && message.account_ids.length) { - object.account_ids = []; + object.account_ids = $Array(message.account_ids.length); for (var j = 0; j < message.account_ids.length; ++j) object.account_ids[j] = message.account_ids[j]; } @@ -3240,8 +4011,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFRequestTF2Friends.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFRequestTF2Friends.prototype.toJSON = function() { + return CMsgTFRequestTF2Friends.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFRequestTF2Friends + * @function getTypeUrl + * @memberof CMsgTFRequestTF2Friends + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFRequestTF2Friends.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFRequestTF2Friends"; }; return CMsgTFRequestTF2Friends; @@ -3249,28 +4034,41 @@ $root.CMsgTFRequestTF2FriendsResponse = (function() { + /** + * Properties of a CMsgTFRequestTF2FriendsResponse. + * @typedef {Object} CMsgTFRequestTF2FriendsResponse.$Properties + * @property {Array.|null} [account_ids] CMsgTFRequestTF2FriendsResponse account_ids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFRequestTF2FriendsResponse. * @exports ICMsgTFRequestTF2FriendsResponse * @interface ICMsgTFRequestTF2FriendsResponse - * @property {Array.|null} [account_ids] CMsgTFRequestTF2FriendsResponse account_ids + * @augments CMsgTFRequestTF2FriendsResponse.$Properties + * @deprecated Use CMsgTFRequestTF2FriendsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgTFRequestTF2FriendsResponse. + * @typedef {CMsgTFRequestTF2FriendsResponse.$Properties} CMsgTFRequestTF2FriendsResponse.$Shape */ /** * Constructs a new CMsgTFRequestTF2FriendsResponse. * @exports CMsgTFRequestTF2FriendsResponse * @classdesc Represents a CMsgTFRequestTF2FriendsResponse. - * @implements ICMsgTFRequestTF2FriendsResponse * @constructor - * @param {ICMsgTFRequestTF2FriendsResponse=} [properties] Properties to set + * @param {CMsgTFRequestTF2FriendsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFRequestTF2FriendsResponse(properties) { + var CMsgTFRequestTF2FriendsResponse = function (properties) { this.account_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFRequestTF2FriendsResponse account_ids. @@ -3285,10 +4083,14 @@ * @function create * @memberof CMsgTFRequestTF2FriendsResponse * @static - * @param {ICMsgTFRequestTF2FriendsResponse=} [properties] Properties to set + * @param {CMsgTFRequestTF2FriendsResponse.$Properties=} [properties] Properties to set * @returns {CMsgTFRequestTF2FriendsResponse} CMsgTFRequestTF2FriendsResponse instance + * @type {{ + * (properties: CMsgTFRequestTF2FriendsResponse.$Shape): CMsgTFRequestTF2FriendsResponse & CMsgTFRequestTF2FriendsResponse.$Shape; + * (properties?: CMsgTFRequestTF2FriendsResponse.$Properties): CMsgTFRequestTF2FriendsResponse; + * }} */ - CMsgTFRequestTF2FriendsResponse.create = function create(properties) { + CMsgTFRequestTF2FriendsResponse.create = function(properties) { return new CMsgTFRequestTF2FriendsResponse(properties); }; @@ -3297,16 +4099,23 @@ * @function encode * @memberof CMsgTFRequestTF2FriendsResponse * @static - * @param {ICMsgTFRequestTF2FriendsResponse} message CMsgTFRequestTF2FriendsResponse message or plain object to encode + * @param {CMsgTFRequestTF2FriendsResponse.$Properties} message CMsgTFRequestTF2FriendsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFRequestTF2FriendsResponse.encode = function encode(message, writer) { + CMsgTFRequestTF2FriendsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.account_ids != null && message.account_ids.length) for (var i = 0; i < message.account_ids.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_ids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3315,12 +4124,12 @@ * @function encodeDelimited * @memberof CMsgTFRequestTF2FriendsResponse * @static - * @param {ICMsgTFRequestTF2FriendsResponse} message CMsgTFRequestTF2FriendsResponse message or plain object to encode + * @param {CMsgTFRequestTF2FriendsResponse.$Properties} message CMsgTFRequestTF2FriendsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFRequestTF2FriendsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFRequestTF2FriendsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3330,32 +4139,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFRequestTF2FriendsResponse} CMsgTFRequestTF2FriendsResponse + * @returns {CMsgTFRequestTF2FriendsResponse & CMsgTFRequestTF2FriendsResponse.$Shape} CMsgTFRequestTF2FriendsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFRequestTF2FriendsResponse.decode = function decode(reader, length) { + CMsgTFRequestTF2FriendsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFRequestTF2FriendsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFRequestTF2FriendsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.account_ids && message.account_ids.length)) - message.account_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.account_ids.push(reader.uint32()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.account_ids && message.account_ids.length)) + message.account_ids = []; + reader.uint32s(message.account_ids); + continue; + } + if (wireType !== 0) + break; + if (!(message.account_ids && message.account_ids.length)) + message.account_ids = []; message.account_ids.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3365,11 +4192,11 @@ * @memberof CMsgTFRequestTF2FriendsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFRequestTF2FriendsResponse} CMsgTFRequestTF2FriendsResponse + * @returns {CMsgTFRequestTF2FriendsResponse & CMsgTFRequestTF2FriendsResponse.$Shape} CMsgTFRequestTF2FriendsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFRequestTF2FriendsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgTFRequestTF2FriendsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3383,11 +4210,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFRequestTF2FriendsResponse.verify = function verify(message) { + CMsgTFRequestTF2FriendsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_ids != null && message.hasOwnProperty("account_ids")) { - if (!Array.isArray(message.account_ids)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_ids != null && $Object.hasOwnProperty.call(message, "account_ids")) { + if (!$Array.isArray(message.account_ids)) return "account_ids: array expected"; for (var i = 0; i < message.account_ids.length; ++i) if (!$util.isInteger(message.account_ids[i])) @@ -3404,14 +4235,20 @@ * @param {Object.} object Plain object * @returns {CMsgTFRequestTF2FriendsResponse} CMsgTFRequestTF2FriendsResponse */ - CMsgTFRequestTF2FriendsResponse.fromObject = function fromObject(object) { + CMsgTFRequestTF2FriendsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFRequestTF2FriendsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFRequestTF2FriendsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFRequestTF2FriendsResponse(); if (object.account_ids) { - if (!Array.isArray(object.account_ids)) - throw TypeError(".CMsgTFRequestTF2FriendsResponse.account_ids: array expected"); - message.account_ids = []; + if (!$Array.isArray(object.account_ids)) + throw $TypeError(".CMsgTFRequestTF2FriendsResponse.account_ids: array expected"); + message.account_ids = $Array(object.account_ids.length); for (var i = 0; i < object.account_ids.length; ++i) message.account_ids[i] = object.account_ids[i] >>> 0; } @@ -3427,14 +4264,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFRequestTF2FriendsResponse.toObject = function toObject(message, options) { + CMsgTFRequestTF2FriendsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.account_ids = []; if (message.account_ids && message.account_ids.length) { - object.account_ids = []; + object.account_ids = $Array(message.account_ids.length); for (var j = 0; j < message.account_ids.length; ++j) object.account_ids[j] = message.account_ids[j]; } @@ -3448,8 +4289,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFRequestTF2FriendsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFRequestTF2FriendsResponse.prototype.toJSON = function() { + return CMsgTFRequestTF2FriendsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFRequestTF2FriendsResponse + * @function getTypeUrl + * @memberof CMsgTFRequestTF2FriendsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFRequestTF2FriendsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFRequestTF2FriendsResponse"; }; return CMsgTFRequestTF2FriendsResponse; @@ -3457,27 +4312,40 @@ $root.CSOTFPlayerInfo = (function() { + /** + * Properties of a CSOTFPlayerInfo. + * @typedef {Object} CSOTFPlayerInfo.$Properties + * @property {number|null} [num_new_users_helped] CSOTFPlayerInfo num_new_users_helped + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CSOTFPlayerInfo. * @exports ICSOTFPlayerInfo * @interface ICSOTFPlayerInfo - * @property {number|null} [num_new_users_helped] CSOTFPlayerInfo num_new_users_helped + * @augments CSOTFPlayerInfo.$Properties + * @deprecated Use CSOTFPlayerInfo.$Properties instead. + */ + + /** + * Shape of a CSOTFPlayerInfo. + * @typedef {CSOTFPlayerInfo.$Properties} CSOTFPlayerInfo.$Shape */ /** * Constructs a new CSOTFPlayerInfo. * @exports CSOTFPlayerInfo * @classdesc Represents a CSOTFPlayerInfo. - * @implements ICSOTFPlayerInfo * @constructor - * @param {ICSOTFPlayerInfo=} [properties] Properties to set + * @param {CSOTFPlayerInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOTFPlayerInfo(properties) { + var CSOTFPlayerInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOTFPlayerInfo num_new_users_helped. @@ -3492,10 +4360,14 @@ * @function create * @memberof CSOTFPlayerInfo * @static - * @param {ICSOTFPlayerInfo=} [properties] Properties to set + * @param {CSOTFPlayerInfo.$Properties=} [properties] Properties to set * @returns {CSOTFPlayerInfo} CSOTFPlayerInfo instance + * @type {{ + * (properties: CSOTFPlayerInfo.$Shape): CSOTFPlayerInfo & CSOTFPlayerInfo.$Shape; + * (properties?: CSOTFPlayerInfo.$Properties): CSOTFPlayerInfo; + * }} */ - CSOTFPlayerInfo.create = function create(properties) { + CSOTFPlayerInfo.create = function(properties) { return new CSOTFPlayerInfo(properties); }; @@ -3504,15 +4376,22 @@ * @function encode * @memberof CSOTFPlayerInfo * @static - * @param {ICSOTFPlayerInfo} message CSOTFPlayerInfo message or plain object to encode + * @param {CSOTFPlayerInfo.$Properties} message CSOTFPlayerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFPlayerInfo.encode = function encode(message, writer) { + CSOTFPlayerInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.num_new_users_helped != null && Object.hasOwnProperty.call(message, "num_new_users_helped")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.num_new_users_helped != null && $Object.hasOwnProperty.call(message, "num_new_users_helped")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.num_new_users_helped); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3521,12 +4400,12 @@ * @function encodeDelimited * @memberof CSOTFPlayerInfo * @static - * @param {ICSOTFPlayerInfo} message CSOTFPlayerInfo message or plain object to encode + * @param {CSOTFPlayerInfo.$Properties} message CSOTFPlayerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFPlayerInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOTFPlayerInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3536,25 +4415,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFPlayerInfo} CSOTFPlayerInfo + * @returns {CSOTFPlayerInfo & CSOTFPlayerInfo.$Shape} CSOTFPlayerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFPlayerInfo.decode = function decode(reader, length) { + CSOTFPlayerInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFPlayerInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFPlayerInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.num_new_users_helped = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.num_new_users_helped = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3564,11 +4460,11 @@ * @memberof CSOTFPlayerInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFPlayerInfo} CSOTFPlayerInfo + * @returns {CSOTFPlayerInfo & CSOTFPlayerInfo.$Shape} CSOTFPlayerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFPlayerInfo.decodeDelimited = function decodeDelimited(reader) { + CSOTFPlayerInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3582,10 +4478,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOTFPlayerInfo.verify = function verify(message) { + CSOTFPlayerInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.num_new_users_helped != null && message.hasOwnProperty("num_new_users_helped")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.num_new_users_helped != null && $Object.hasOwnProperty.call(message, "num_new_users_helped")) if (!$util.isInteger(message.num_new_users_helped)) return "num_new_users_helped: integer expected"; return null; @@ -3599,9 +4499,15 @@ * @param {Object.} object Plain object * @returns {CSOTFPlayerInfo} CSOTFPlayerInfo */ - CSOTFPlayerInfo.fromObject = function fromObject(object) { + CSOTFPlayerInfo.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFPlayerInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFPlayerInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFPlayerInfo(); if (object.num_new_users_helped != null) message.num_new_users_helped = object.num_new_users_helped >>> 0; @@ -3617,13 +4523,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOTFPlayerInfo.toObject = function toObject(message, options) { + CSOTFPlayerInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.num_new_users_helped = 0; - if (message.num_new_users_helped != null && message.hasOwnProperty("num_new_users_helped")) + if (message.num_new_users_helped != null && $Object.hasOwnProperty.call(message, "num_new_users_helped")) object.num_new_users_helped = message.num_new_users_helped; return object; }; @@ -3635,8 +4545,22 @@ * @instance * @returns {Object.} JSON object */ - CSOTFPlayerInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOTFPlayerInfo.prototype.toJSON = function() { + return CSOTFPlayerInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOTFPlayerInfo + * @function getTypeUrl + * @memberof CSOTFPlayerInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOTFPlayerInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFPlayerInfo"; }; return CSOTFPlayerInfo; @@ -3644,27 +4568,40 @@ $root.CMsgTFThankedBySomeone = (function() { + /** + * Properties of a CMsgTFThankedBySomeone. + * @typedef {Object} CMsgTFThankedBySomeone.$Properties + * @property {number|Long|null} [thanker_steam_id] CMsgTFThankedBySomeone thanker_steam_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFThankedBySomeone. * @exports ICMsgTFThankedBySomeone * @interface ICMsgTFThankedBySomeone - * @property {number|Long|null} [thanker_steam_id] CMsgTFThankedBySomeone thanker_steam_id + * @augments CMsgTFThankedBySomeone.$Properties + * @deprecated Use CMsgTFThankedBySomeone.$Properties instead. + */ + + /** + * Shape of a CMsgTFThankedBySomeone. + * @typedef {CMsgTFThankedBySomeone.$Properties} CMsgTFThankedBySomeone.$Shape */ /** * Constructs a new CMsgTFThankedBySomeone. * @exports CMsgTFThankedBySomeone * @classdesc Represents a CMsgTFThankedBySomeone. - * @implements ICMsgTFThankedBySomeone * @constructor - * @param {ICMsgTFThankedBySomeone=} [properties] Properties to set + * @param {CMsgTFThankedBySomeone.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFThankedBySomeone(properties) { + var CMsgTFThankedBySomeone = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFThankedBySomeone thanker_steam_id. @@ -3679,10 +4616,14 @@ * @function create * @memberof CMsgTFThankedBySomeone * @static - * @param {ICMsgTFThankedBySomeone=} [properties] Properties to set + * @param {CMsgTFThankedBySomeone.$Properties=} [properties] Properties to set * @returns {CMsgTFThankedBySomeone} CMsgTFThankedBySomeone instance + * @type {{ + * (properties: CMsgTFThankedBySomeone.$Shape): CMsgTFThankedBySomeone & CMsgTFThankedBySomeone.$Shape; + * (properties?: CMsgTFThankedBySomeone.$Properties): CMsgTFThankedBySomeone; + * }} */ - CMsgTFThankedBySomeone.create = function create(properties) { + CMsgTFThankedBySomeone.create = function(properties) { return new CMsgTFThankedBySomeone(properties); }; @@ -3691,15 +4632,22 @@ * @function encode * @memberof CMsgTFThankedBySomeone * @static - * @param {ICMsgTFThankedBySomeone} message CMsgTFThankedBySomeone message or plain object to encode + * @param {CMsgTFThankedBySomeone.$Properties} message CMsgTFThankedBySomeone message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFThankedBySomeone.encode = function encode(message, writer) { + CMsgTFThankedBySomeone.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.thanker_steam_id != null && Object.hasOwnProperty.call(message, "thanker_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.thanker_steam_id != null && $Object.hasOwnProperty.call(message, "thanker_steam_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.thanker_steam_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3708,12 +4656,12 @@ * @function encodeDelimited * @memberof CMsgTFThankedBySomeone * @static - * @param {ICMsgTFThankedBySomeone} message CMsgTFThankedBySomeone message or plain object to encode + * @param {CMsgTFThankedBySomeone.$Properties} message CMsgTFThankedBySomeone message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFThankedBySomeone.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFThankedBySomeone.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3723,25 +4671,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFThankedBySomeone} CMsgTFThankedBySomeone + * @returns {CMsgTFThankedBySomeone & CMsgTFThankedBySomeone.$Shape} CMsgTFThankedBySomeone * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFThankedBySomeone.decode = function decode(reader, length) { + CMsgTFThankedBySomeone.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFThankedBySomeone(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFThankedBySomeone(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.thanker_steam_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.thanker_steam_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3751,11 +4716,11 @@ * @memberof CMsgTFThankedBySomeone * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFThankedBySomeone} CMsgTFThankedBySomeone + * @returns {CMsgTFThankedBySomeone & CMsgTFThankedBySomeone.$Shape} CMsgTFThankedBySomeone * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFThankedBySomeone.decodeDelimited = function decodeDelimited(reader) { + CMsgTFThankedBySomeone.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3769,10 +4734,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFThankedBySomeone.verify = function verify(message) { + CMsgTFThankedBySomeone.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.thanker_steam_id != null && message.hasOwnProperty("thanker_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.thanker_steam_id != null && $Object.hasOwnProperty.call(message, "thanker_steam_id")) if (!$util.isInteger(message.thanker_steam_id) && !(message.thanker_steam_id && $util.isInteger(message.thanker_steam_id.low) && $util.isInteger(message.thanker_steam_id.high))) return "thanker_steam_id: integer|Long expected"; return null; @@ -3786,15 +4755,21 @@ * @param {Object.} object Plain object * @returns {CMsgTFThankedBySomeone} CMsgTFThankedBySomeone */ - CMsgTFThankedBySomeone.fromObject = function fromObject(object) { + CMsgTFThankedBySomeone.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFThankedBySomeone) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFThankedBySomeone: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFThankedBySomeone(); if (object.thanker_steam_id != null) if ($util.Long) - (message.thanker_steam_id = $util.Long.fromValue(object.thanker_steam_id)).unsigned = true; + message.thanker_steam_id = $util.Long.fromValue(object.thanker_steam_id, true); else if (typeof object.thanker_steam_id === "string") - message.thanker_steam_id = parseInt(object.thanker_steam_id, 10); + message.thanker_steam_id = $parseInt(object.thanker_steam_id, 10); else if (typeof object.thanker_steam_id === "number") message.thanker_steam_id = object.thanker_steam_id; else if (typeof object.thanker_steam_id === "object") @@ -3811,21 +4786,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFThankedBySomeone.toObject = function toObject(message, options) { + CMsgTFThankedBySomeone.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.thanker_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.thanker_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.thanker_steam_id = options.longs === String ? "0" : 0; - if (message.thanker_steam_id != null && message.hasOwnProperty("thanker_steam_id")) - if (typeof message.thanker_steam_id === "number") - object.thanker_steam_id = options.longs === String ? String(message.thanker_steam_id) : message.thanker_steam_id; + object.thanker_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.thanker_steam_id != null && $Object.hasOwnProperty.call(message, "thanker_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.thanker_steam_id = typeof message.thanker_steam_id === "number" ? $BigInt(message.thanker_steam_id) : $util.Long.fromBits(message.thanker_steam_id.low >>> 0, message.thanker_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.thanker_steam_id === "number") + object.thanker_steam_id = options.longs === $String ? $String(message.thanker_steam_id) : message.thanker_steam_id; else - object.thanker_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.thanker_steam_id) : options.longs === Number ? new $util.LongBits(message.thanker_steam_id.low >>> 0, message.thanker_steam_id.high >>> 0).toNumber(true) : message.thanker_steam_id; + object.thanker_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.thanker_steam_id) : options.longs === $Number ? new $util.LongBits(message.thanker_steam_id.low >>> 0, message.thanker_steam_id.high >>> 0).toNumber(true) : message.thanker_steam_id; return object; }; @@ -3836,8 +4817,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFThankedBySomeone.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFThankedBySomeone.prototype.toJSON = function() { + return CMsgTFThankedBySomeone.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFThankedBySomeone + * @function getTypeUrl + * @memberof CMsgTFThankedBySomeone + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFThankedBySomeone.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFThankedBySomeone"; }; return CMsgTFThankedBySomeone; @@ -3845,36 +4840,53 @@ $root.CMsgTFThankedSomeone = (function() { + /** + * Properties of a CMsgTFThankedSomeone. + * @typedef {Object} CMsgTFThankedSomeone.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFThankedSomeone. * @exports ICMsgTFThankedSomeone * @interface ICMsgTFThankedSomeone + * @augments CMsgTFThankedSomeone.$Properties + * @deprecated Use CMsgTFThankedSomeone.$Properties instead. + */ + + /** + * Shape of a CMsgTFThankedSomeone. + * @typedef {CMsgTFThankedSomeone.$Properties} CMsgTFThankedSomeone.$Shape */ /** * Constructs a new CMsgTFThankedSomeone. * @exports CMsgTFThankedSomeone * @classdesc Represents a CMsgTFThankedSomeone. - * @implements ICMsgTFThankedSomeone * @constructor - * @param {ICMsgTFThankedSomeone=} [properties] Properties to set + * @param {CMsgTFThankedSomeone.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFThankedSomeone(properties) { + var CMsgTFThankedSomeone = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgTFThankedSomeone instance using the specified properties. * @function create * @memberof CMsgTFThankedSomeone * @static - * @param {ICMsgTFThankedSomeone=} [properties] Properties to set + * @param {CMsgTFThankedSomeone.$Properties=} [properties] Properties to set * @returns {CMsgTFThankedSomeone} CMsgTFThankedSomeone instance + * @type {{ + * (properties: CMsgTFThankedSomeone.$Shape): CMsgTFThankedSomeone & CMsgTFThankedSomeone.$Shape; + * (properties?: CMsgTFThankedSomeone.$Properties): CMsgTFThankedSomeone; + * }} */ - CMsgTFThankedSomeone.create = function create(properties) { + CMsgTFThankedSomeone.create = function(properties) { return new CMsgTFThankedSomeone(properties); }; @@ -3883,13 +4895,20 @@ * @function encode * @memberof CMsgTFThankedSomeone * @static - * @param {ICMsgTFThankedSomeone} message CMsgTFThankedSomeone message or plain object to encode + * @param {CMsgTFThankedSomeone.$Properties} message CMsgTFThankedSomeone message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFThankedSomeone.encode = function encode(message, writer) { + CMsgTFThankedSomeone.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -3898,12 +4917,12 @@ * @function encodeDelimited * @memberof CMsgTFThankedSomeone * @static - * @param {ICMsgTFThankedSomeone} message CMsgTFThankedSomeone message or plain object to encode + * @param {CMsgTFThankedSomeone.$Properties} message CMsgTFThankedSomeone message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFThankedSomeone.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFThankedSomeone.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -3913,22 +4932,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFThankedSomeone} CMsgTFThankedSomeone + * @returns {CMsgTFThankedSomeone & CMsgTFThankedSomeone.$Shape} CMsgTFThankedSomeone * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFThankedSomeone.decode = function decode(reader, length) { + CMsgTFThankedSomeone.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFThankedSomeone(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFThankedSomeone(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -3938,11 +4968,11 @@ * @memberof CMsgTFThankedSomeone * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFThankedSomeone} CMsgTFThankedSomeone + * @returns {CMsgTFThankedSomeone & CMsgTFThankedSomeone.$Shape} CMsgTFThankedSomeone * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFThankedSomeone.decodeDelimited = function decodeDelimited(reader) { + CMsgTFThankedSomeone.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -3956,9 +4986,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFThankedSomeone.verify = function verify(message) { + CMsgTFThankedSomeone.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -3970,9 +5004,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFThankedSomeone} CMsgTFThankedSomeone */ - CMsgTFThankedSomeone.fromObject = function fromObject(object) { + CMsgTFThankedSomeone.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFThankedSomeone) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFThankedSomeone: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgTFThankedSomeone(); }; @@ -3985,7 +5025,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFThankedSomeone.toObject = function toObject() { + CMsgTFThankedSomeone.toObject = function () { return {}; }; @@ -3996,8 +5036,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFThankedSomeone.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFThankedSomeone.prototype.toJSON = function() { + return CMsgTFThankedSomeone.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFThankedSomeone + * @function getTypeUrl + * @memberof CMsgTFThankedSomeone + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFThankedSomeone.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFThankedSomeone"; }; return CMsgTFThankedSomeone; @@ -4005,36 +5059,53 @@ $root.CMsgTFFreeTrialConvertedToPremium = (function() { + /** + * Properties of a CMsgTFFreeTrialConvertedToPremium. + * @typedef {Object} CMsgTFFreeTrialConvertedToPremium.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFFreeTrialConvertedToPremium. * @exports ICMsgTFFreeTrialConvertedToPremium * @interface ICMsgTFFreeTrialConvertedToPremium + * @augments CMsgTFFreeTrialConvertedToPremium.$Properties + * @deprecated Use CMsgTFFreeTrialConvertedToPremium.$Properties instead. + */ + + /** + * Shape of a CMsgTFFreeTrialConvertedToPremium. + * @typedef {CMsgTFFreeTrialConvertedToPremium.$Properties} CMsgTFFreeTrialConvertedToPremium.$Shape */ /** * Constructs a new CMsgTFFreeTrialConvertedToPremium. * @exports CMsgTFFreeTrialConvertedToPremium * @classdesc Represents a CMsgTFFreeTrialConvertedToPremium. - * @implements ICMsgTFFreeTrialConvertedToPremium * @constructor - * @param {ICMsgTFFreeTrialConvertedToPremium=} [properties] Properties to set + * @param {CMsgTFFreeTrialConvertedToPremium.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFFreeTrialConvertedToPremium(properties) { + var CMsgTFFreeTrialConvertedToPremium = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgTFFreeTrialConvertedToPremium instance using the specified properties. * @function create * @memberof CMsgTFFreeTrialConvertedToPremium * @static - * @param {ICMsgTFFreeTrialConvertedToPremium=} [properties] Properties to set + * @param {CMsgTFFreeTrialConvertedToPremium.$Properties=} [properties] Properties to set * @returns {CMsgTFFreeTrialConvertedToPremium} CMsgTFFreeTrialConvertedToPremium instance + * @type {{ + * (properties: CMsgTFFreeTrialConvertedToPremium.$Shape): CMsgTFFreeTrialConvertedToPremium & CMsgTFFreeTrialConvertedToPremium.$Shape; + * (properties?: CMsgTFFreeTrialConvertedToPremium.$Properties): CMsgTFFreeTrialConvertedToPremium; + * }} */ - CMsgTFFreeTrialConvertedToPremium.create = function create(properties) { + CMsgTFFreeTrialConvertedToPremium.create = function(properties) { return new CMsgTFFreeTrialConvertedToPremium(properties); }; @@ -4043,13 +5114,20 @@ * @function encode * @memberof CMsgTFFreeTrialConvertedToPremium * @static - * @param {ICMsgTFFreeTrialConvertedToPremium} message CMsgTFFreeTrialConvertedToPremium message or plain object to encode + * @param {CMsgTFFreeTrialConvertedToPremium.$Properties} message CMsgTFFreeTrialConvertedToPremium message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFFreeTrialConvertedToPremium.encode = function encode(message, writer) { + CMsgTFFreeTrialConvertedToPremium.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4058,12 +5136,12 @@ * @function encodeDelimited * @memberof CMsgTFFreeTrialConvertedToPremium * @static - * @param {ICMsgTFFreeTrialConvertedToPremium} message CMsgTFFreeTrialConvertedToPremium message or plain object to encode + * @param {CMsgTFFreeTrialConvertedToPremium.$Properties} message CMsgTFFreeTrialConvertedToPremium message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFFreeTrialConvertedToPremium.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFFreeTrialConvertedToPremium.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4073,22 +5151,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFFreeTrialConvertedToPremium} CMsgTFFreeTrialConvertedToPremium + * @returns {CMsgTFFreeTrialConvertedToPremium & CMsgTFFreeTrialConvertedToPremium.$Shape} CMsgTFFreeTrialConvertedToPremium * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFFreeTrialConvertedToPremium.decode = function decode(reader, length) { + CMsgTFFreeTrialConvertedToPremium.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFFreeTrialConvertedToPremium(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFFreeTrialConvertedToPremium(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4098,11 +5187,11 @@ * @memberof CMsgTFFreeTrialConvertedToPremium * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFFreeTrialConvertedToPremium} CMsgTFFreeTrialConvertedToPremium + * @returns {CMsgTFFreeTrialConvertedToPremium & CMsgTFFreeTrialConvertedToPremium.$Shape} CMsgTFFreeTrialConvertedToPremium * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFFreeTrialConvertedToPremium.decodeDelimited = function decodeDelimited(reader) { + CMsgTFFreeTrialConvertedToPremium.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4116,9 +5205,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFFreeTrialConvertedToPremium.verify = function verify(message) { + CMsgTFFreeTrialConvertedToPremium.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -4130,9 +5223,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFFreeTrialConvertedToPremium} CMsgTFFreeTrialConvertedToPremium */ - CMsgTFFreeTrialConvertedToPremium.fromObject = function fromObject(object) { + CMsgTFFreeTrialConvertedToPremium.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFFreeTrialConvertedToPremium) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFFreeTrialConvertedToPremium: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgTFFreeTrialConvertedToPremium(); }; @@ -4145,7 +5244,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFFreeTrialConvertedToPremium.toObject = function toObject() { + CMsgTFFreeTrialConvertedToPremium.toObject = function () { return {}; }; @@ -4156,8 +5255,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFFreeTrialConvertedToPremium.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFFreeTrialConvertedToPremium.prototype.toJSON = function() { + return CMsgTFFreeTrialConvertedToPremium.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFFreeTrialConvertedToPremium + * @function getTypeUrl + * @memberof CMsgTFFreeTrialConvertedToPremium + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFFreeTrialConvertedToPremium.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFFreeTrialConvertedToPremium"; }; return CMsgTFFreeTrialConvertedToPremium; @@ -4167,27 +5280,40 @@ /** * Properties of a CMsgSaxxyAwarded. - * @exports ICMsgSaxxyAwarded - * @interface ICMsgSaxxyAwarded + * @typedef {Object} CMsgSaxxyAwarded.$Properties * @property {number|null} [category] CMsgSaxxyAwarded category * @property {Array.|null} [winner_names] CMsgSaxxyAwarded winner_names + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSaxxyAwarded. + * @exports ICMsgSaxxyAwarded + * @interface ICMsgSaxxyAwarded + * @augments CMsgSaxxyAwarded.$Properties + * @deprecated Use CMsgSaxxyAwarded.$Properties instead. + */ + + /** + * Shape of a CMsgSaxxyAwarded. + * @typedef {CMsgSaxxyAwarded.$Properties} CMsgSaxxyAwarded.$Shape */ /** * Constructs a new CMsgSaxxyAwarded. * @exports CMsgSaxxyAwarded * @classdesc Represents a CMsgSaxxyAwarded. - * @implements ICMsgSaxxyAwarded * @constructor - * @param {ICMsgSaxxyAwarded=} [properties] Properties to set + * @param {CMsgSaxxyAwarded.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSaxxyAwarded(properties) { + var CMsgSaxxyAwarded = function (properties) { this.winner_names = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSaxxyAwarded category. @@ -4210,10 +5336,14 @@ * @function create * @memberof CMsgSaxxyAwarded * @static - * @param {ICMsgSaxxyAwarded=} [properties] Properties to set + * @param {CMsgSaxxyAwarded.$Properties=} [properties] Properties to set * @returns {CMsgSaxxyAwarded} CMsgSaxxyAwarded instance + * @type {{ + * (properties: CMsgSaxxyAwarded.$Shape): CMsgSaxxyAwarded & CMsgSaxxyAwarded.$Shape; + * (properties?: CMsgSaxxyAwarded.$Properties): CMsgSaxxyAwarded; + * }} */ - CMsgSaxxyAwarded.create = function create(properties) { + CMsgSaxxyAwarded.create = function(properties) { return new CMsgSaxxyAwarded(properties); }; @@ -4222,18 +5352,25 @@ * @function encode * @memberof CMsgSaxxyAwarded * @static - * @param {ICMsgSaxxyAwarded} message CMsgSaxxyAwarded message or plain object to encode + * @param {CMsgSaxxyAwarded.$Properties} message CMsgSaxxyAwarded message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSaxxyAwarded.encode = function encode(message, writer) { + CMsgSaxxyAwarded.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.category != null && $Object.hasOwnProperty.call(message, "category")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.category); if (message.winner_names != null && message.winner_names.length) for (var i = 0; i < message.winner_names.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.winner_names[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4242,12 +5379,12 @@ * @function encodeDelimited * @memberof CMsgSaxxyAwarded * @static - * @param {ICMsgSaxxyAwarded} message CMsgSaxxyAwarded message or plain object to encode + * @param {CMsgSaxxyAwarded.$Properties} message CMsgSaxxyAwarded message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSaxxyAwarded.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSaxxyAwarded.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4257,30 +5394,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSaxxyAwarded} CMsgSaxxyAwarded + * @returns {CMsgSaxxyAwarded & CMsgSaxxyAwarded.$Shape} CMsgSaxxyAwarded * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSaxxyAwarded.decode = function decode(reader, length) { + CMsgSaxxyAwarded.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSaxxyAwarded(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSaxxyAwarded(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.category = reader.uint32(); - break; - case 2: - if (!(message.winner_names && message.winner_names.length)) - message.winner_names = []; - message.winner_names.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.category = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.winner_names && message.winner_names.length)) + message.winner_names = []; + message.winner_names.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4290,11 +5447,11 @@ * @memberof CMsgSaxxyAwarded * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSaxxyAwarded} CMsgSaxxyAwarded + * @returns {CMsgSaxxyAwarded & CMsgSaxxyAwarded.$Shape} CMsgSaxxyAwarded * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSaxxyAwarded.decodeDelimited = function decodeDelimited(reader) { + CMsgSaxxyAwarded.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4308,14 +5465,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSaxxyAwarded.verify = function verify(message) { + CMsgSaxxyAwarded.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.category != null && message.hasOwnProperty("category")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.category != null && $Object.hasOwnProperty.call(message, "category")) if (!$util.isInteger(message.category)) return "category: integer expected"; - if (message.winner_names != null && message.hasOwnProperty("winner_names")) { - if (!Array.isArray(message.winner_names)) + if (message.winner_names != null && $Object.hasOwnProperty.call(message, "winner_names")) { + if (!$Array.isArray(message.winner_names)) return "winner_names: array expected"; for (var i = 0; i < message.winner_names.length; ++i) if (!$util.isString(message.winner_names[i])) @@ -4332,18 +5493,24 @@ * @param {Object.} object Plain object * @returns {CMsgSaxxyAwarded} CMsgSaxxyAwarded */ - CMsgSaxxyAwarded.fromObject = function fromObject(object) { + CMsgSaxxyAwarded.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSaxxyAwarded) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSaxxyAwarded: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSaxxyAwarded(); if (object.category != null) message.category = object.category >>> 0; if (object.winner_names) { - if (!Array.isArray(object.winner_names)) - throw TypeError(".CMsgSaxxyAwarded.winner_names: array expected"); - message.winner_names = []; + if (!$Array.isArray(object.winner_names)) + throw $TypeError(".CMsgSaxxyAwarded.winner_names: array expected"); + message.winner_names = $Array(object.winner_names.length); for (var i = 0; i < object.winner_names.length; ++i) - message.winner_names[i] = String(object.winner_names[i]); + message.winner_names[i] = $String(object.winner_names[i]); } return message; }; @@ -4357,18 +5524,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSaxxyAwarded.toObject = function toObject(message, options) { + CMsgSaxxyAwarded.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.winner_names = []; if (options.defaults) object.category = 0; - if (message.category != null && message.hasOwnProperty("category")) + if (message.category != null && $Object.hasOwnProperty.call(message, "category")) object.category = message.category; if (message.winner_names && message.winner_names.length) { - object.winner_names = []; + object.winner_names = $Array(message.winner_names.length); for (var j = 0; j < message.winner_names.length; ++j) object.winner_names[j] = message.winner_names[j]; } @@ -4382,8 +5553,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSaxxyAwarded.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSaxxyAwarded.prototype.toJSON = function() { + return CMsgSaxxyAwarded.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSaxxyAwarded + * @function getTypeUrl + * @memberof CMsgSaxxyAwarded + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSaxxyAwarded.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSaxxyAwarded"; }; return CMsgSaxxyAwarded; @@ -4393,26 +5578,39 @@ /** * Properties of a CMsgReplaySubmitContestEntry. - * @exports ICMsgReplaySubmitContestEntry - * @interface ICMsgReplaySubmitContestEntry + * @typedef {Object} CMsgReplaySubmitContestEntry.$Properties * @property {string|null} [youtube_url] CMsgReplaySubmitContestEntry youtube_url * @property {number|null} [category] CMsgReplaySubmitContestEntry category + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgReplaySubmitContestEntry. + * @exports ICMsgReplaySubmitContestEntry + * @interface ICMsgReplaySubmitContestEntry + * @augments CMsgReplaySubmitContestEntry.$Properties + * @deprecated Use CMsgReplaySubmitContestEntry.$Properties instead. + */ + + /** + * Shape of a CMsgReplaySubmitContestEntry. + * @typedef {CMsgReplaySubmitContestEntry.$Properties} CMsgReplaySubmitContestEntry.$Shape */ /** * Constructs a new CMsgReplaySubmitContestEntry. * @exports CMsgReplaySubmitContestEntry * @classdesc Represents a CMsgReplaySubmitContestEntry. - * @implements ICMsgReplaySubmitContestEntry * @constructor - * @param {ICMsgReplaySubmitContestEntry=} [properties] Properties to set + * @param {CMsgReplaySubmitContestEntry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgReplaySubmitContestEntry(properties) { + var CMsgReplaySubmitContestEntry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgReplaySubmitContestEntry youtube_url. @@ -4435,10 +5633,14 @@ * @function create * @memberof CMsgReplaySubmitContestEntry * @static - * @param {ICMsgReplaySubmitContestEntry=} [properties] Properties to set + * @param {CMsgReplaySubmitContestEntry.$Properties=} [properties] Properties to set * @returns {CMsgReplaySubmitContestEntry} CMsgReplaySubmitContestEntry instance + * @type {{ + * (properties: CMsgReplaySubmitContestEntry.$Shape): CMsgReplaySubmitContestEntry & CMsgReplaySubmitContestEntry.$Shape; + * (properties?: CMsgReplaySubmitContestEntry.$Properties): CMsgReplaySubmitContestEntry; + * }} */ - CMsgReplaySubmitContestEntry.create = function create(properties) { + CMsgReplaySubmitContestEntry.create = function(properties) { return new CMsgReplaySubmitContestEntry(properties); }; @@ -4447,17 +5649,24 @@ * @function encode * @memberof CMsgReplaySubmitContestEntry * @static - * @param {ICMsgReplaySubmitContestEntry} message CMsgReplaySubmitContestEntry message or plain object to encode + * @param {CMsgReplaySubmitContestEntry.$Properties} message CMsgReplaySubmitContestEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplaySubmitContestEntry.encode = function encode(message, writer) { + CMsgReplaySubmitContestEntry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.youtube_url != null && Object.hasOwnProperty.call(message, "youtube_url")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.youtube_url != null && $Object.hasOwnProperty.call(message, "youtube_url")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.youtube_url); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) + if (message.category != null && $Object.hasOwnProperty.call(message, "category")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.category); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4466,12 +5675,12 @@ * @function encodeDelimited * @memberof CMsgReplaySubmitContestEntry * @static - * @param {ICMsgReplaySubmitContestEntry} message CMsgReplaySubmitContestEntry message or plain object to encode + * @param {CMsgReplaySubmitContestEntry.$Properties} message CMsgReplaySubmitContestEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplaySubmitContestEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgReplaySubmitContestEntry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4481,28 +5690,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgReplaySubmitContestEntry} CMsgReplaySubmitContestEntry + * @returns {CMsgReplaySubmitContestEntry & CMsgReplaySubmitContestEntry.$Shape} CMsgReplaySubmitContestEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplaySubmitContestEntry.decode = function decode(reader, length) { + CMsgReplaySubmitContestEntry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgReplaySubmitContestEntry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgReplaySubmitContestEntry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.youtube_url = reader.string(); - break; - case 2: - message.category = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.youtube_url = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.category = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4512,11 +5741,11 @@ * @memberof CMsgReplaySubmitContestEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgReplaySubmitContestEntry} CMsgReplaySubmitContestEntry + * @returns {CMsgReplaySubmitContestEntry & CMsgReplaySubmitContestEntry.$Shape} CMsgReplaySubmitContestEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplaySubmitContestEntry.decodeDelimited = function decodeDelimited(reader) { + CMsgReplaySubmitContestEntry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4530,13 +5759,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgReplaySubmitContestEntry.verify = function verify(message) { + CMsgReplaySubmitContestEntry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.youtube_url != null && message.hasOwnProperty("youtube_url")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.youtube_url != null && $Object.hasOwnProperty.call(message, "youtube_url")) if (!$util.isString(message.youtube_url)) return "youtube_url: string expected"; - if (message.category != null && message.hasOwnProperty("category")) + if (message.category != null && $Object.hasOwnProperty.call(message, "category")) if (!$util.isInteger(message.category)) return "category: integer expected"; return null; @@ -4550,12 +5783,18 @@ * @param {Object.} object Plain object * @returns {CMsgReplaySubmitContestEntry} CMsgReplaySubmitContestEntry */ - CMsgReplaySubmitContestEntry.fromObject = function fromObject(object) { + CMsgReplaySubmitContestEntry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgReplaySubmitContestEntry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgReplaySubmitContestEntry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgReplaySubmitContestEntry(); if (object.youtube_url != null) - message.youtube_url = String(object.youtube_url); + message.youtube_url = $String(object.youtube_url); if (object.category != null) message.category = object.category >>> 0; return message; @@ -4570,17 +5809,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgReplaySubmitContestEntry.toObject = function toObject(message, options) { + CMsgReplaySubmitContestEntry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.youtube_url = ""; object.category = 0; } - if (message.youtube_url != null && message.hasOwnProperty("youtube_url")) + if (message.youtube_url != null && $Object.hasOwnProperty.call(message, "youtube_url")) object.youtube_url = message.youtube_url; - if (message.category != null && message.hasOwnProperty("category")) + if (message.category != null && $Object.hasOwnProperty.call(message, "category")) object.category = message.category; return object; }; @@ -4592,8 +5835,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgReplaySubmitContestEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgReplaySubmitContestEntry.prototype.toJSON = function() { + return CMsgReplaySubmitContestEntry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgReplaySubmitContestEntry + * @function getTypeUrl + * @memberof CMsgReplaySubmitContestEntry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgReplaySubmitContestEntry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgReplaySubmitContestEntry"; }; return CMsgReplaySubmitContestEntry; @@ -4601,27 +5858,40 @@ $root.CMsgReplaySubmitContestEntryResponse = (function() { + /** + * Properties of a CMsgReplaySubmitContestEntryResponse. + * @typedef {Object} CMsgReplaySubmitContestEntryResponse.$Properties + * @property {boolean|null} [success] CMsgReplaySubmitContestEntryResponse success + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgReplaySubmitContestEntryResponse. * @exports ICMsgReplaySubmitContestEntryResponse * @interface ICMsgReplaySubmitContestEntryResponse - * @property {boolean|null} [success] CMsgReplaySubmitContestEntryResponse success + * @augments CMsgReplaySubmitContestEntryResponse.$Properties + * @deprecated Use CMsgReplaySubmitContestEntryResponse.$Properties instead. + */ + + /** + * Shape of a CMsgReplaySubmitContestEntryResponse. + * @typedef {CMsgReplaySubmitContestEntryResponse.$Properties} CMsgReplaySubmitContestEntryResponse.$Shape */ /** * Constructs a new CMsgReplaySubmitContestEntryResponse. * @exports CMsgReplaySubmitContestEntryResponse * @classdesc Represents a CMsgReplaySubmitContestEntryResponse. - * @implements ICMsgReplaySubmitContestEntryResponse * @constructor - * @param {ICMsgReplaySubmitContestEntryResponse=} [properties] Properties to set + * @param {CMsgReplaySubmitContestEntryResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgReplaySubmitContestEntryResponse(properties) { + var CMsgReplaySubmitContestEntryResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgReplaySubmitContestEntryResponse success. @@ -4636,10 +5906,14 @@ * @function create * @memberof CMsgReplaySubmitContestEntryResponse * @static - * @param {ICMsgReplaySubmitContestEntryResponse=} [properties] Properties to set + * @param {CMsgReplaySubmitContestEntryResponse.$Properties=} [properties] Properties to set * @returns {CMsgReplaySubmitContestEntryResponse} CMsgReplaySubmitContestEntryResponse instance + * @type {{ + * (properties: CMsgReplaySubmitContestEntryResponse.$Shape): CMsgReplaySubmitContestEntryResponse & CMsgReplaySubmitContestEntryResponse.$Shape; + * (properties?: CMsgReplaySubmitContestEntryResponse.$Properties): CMsgReplaySubmitContestEntryResponse; + * }} */ - CMsgReplaySubmitContestEntryResponse.create = function create(properties) { + CMsgReplaySubmitContestEntryResponse.create = function(properties) { return new CMsgReplaySubmitContestEntryResponse(properties); }; @@ -4648,15 +5922,22 @@ * @function encode * @memberof CMsgReplaySubmitContestEntryResponse * @static - * @param {ICMsgReplaySubmitContestEntryResponse} message CMsgReplaySubmitContestEntryResponse message or plain object to encode + * @param {CMsgReplaySubmitContestEntryResponse.$Properties} message CMsgReplaySubmitContestEntryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplaySubmitContestEntryResponse.encode = function encode(message, writer) { + CMsgReplaySubmitContestEntryResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.success != null && Object.hasOwnProperty.call(message, "success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4665,12 +5946,12 @@ * @function encodeDelimited * @memberof CMsgReplaySubmitContestEntryResponse * @static - * @param {ICMsgReplaySubmitContestEntryResponse} message CMsgReplaySubmitContestEntryResponse message or plain object to encode + * @param {CMsgReplaySubmitContestEntryResponse.$Properties} message CMsgReplaySubmitContestEntryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplaySubmitContestEntryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgReplaySubmitContestEntryResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4680,25 +5961,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgReplaySubmitContestEntryResponse} CMsgReplaySubmitContestEntryResponse + * @returns {CMsgReplaySubmitContestEntryResponse & CMsgReplaySubmitContestEntryResponse.$Shape} CMsgReplaySubmitContestEntryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplaySubmitContestEntryResponse.decode = function decode(reader, length) { + CMsgReplaySubmitContestEntryResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgReplaySubmitContestEntryResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgReplaySubmitContestEntryResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.success = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4708,11 +6006,11 @@ * @memberof CMsgReplaySubmitContestEntryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgReplaySubmitContestEntryResponse} CMsgReplaySubmitContestEntryResponse + * @returns {CMsgReplaySubmitContestEntryResponse & CMsgReplaySubmitContestEntryResponse.$Shape} CMsgReplaySubmitContestEntryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplaySubmitContestEntryResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgReplaySubmitContestEntryResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4726,10 +6024,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgReplaySubmitContestEntryResponse.verify = function verify(message) { + CMsgReplaySubmitContestEntryResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.success != null && message.hasOwnProperty("success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; return null; @@ -4743,12 +6045,18 @@ * @param {Object.} object Plain object * @returns {CMsgReplaySubmitContestEntryResponse} CMsgReplaySubmitContestEntryResponse */ - CMsgReplaySubmitContestEntryResponse.fromObject = function fromObject(object) { + CMsgReplaySubmitContestEntryResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgReplaySubmitContestEntryResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgReplaySubmitContestEntryResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgReplaySubmitContestEntryResponse(); if (object.success != null) - message.success = Boolean(object.success); + message.success = $Boolean(object.success); return message; }; @@ -4761,13 +6069,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgReplaySubmitContestEntryResponse.toObject = function toObject(message, options) { + CMsgReplaySubmitContestEntryResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.success = false; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) object.success = message.success; return object; }; @@ -4779,8 +6091,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgReplaySubmitContestEntryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgReplaySubmitContestEntryResponse.prototype.toJSON = function() { + return CMsgReplaySubmitContestEntryResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgReplaySubmitContestEntryResponse + * @function getTypeUrl + * @memberof CMsgReplaySubmitContestEntryResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgReplaySubmitContestEntryResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgReplaySubmitContestEntryResponse"; }; return CMsgReplaySubmitContestEntryResponse; @@ -4790,29 +6116,42 @@ /** * Properties of a CReplayCachedContestData. - * @exports ICReplayCachedContestData - * @interface ICReplayCachedContestData + * @typedef {Object} CReplayCachedContestData.$Properties * @property {number|null} [timestamp] CReplayCachedContestData timestamp * @property {number|null} [num_votes_last_day] CReplayCachedContestData num_votes_last_day * @property {Array.|null} [video_entry_ids] CReplayCachedContestData video_entry_ids * @property {number|null} [num_flags_last_day] CReplayCachedContestData num_flags_last_day + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CReplayCachedContestData. + * @exports ICReplayCachedContestData + * @interface ICReplayCachedContestData + * @augments CReplayCachedContestData.$Properties + * @deprecated Use CReplayCachedContestData.$Properties instead. + */ + + /** + * Shape of a CReplayCachedContestData. + * @typedef {CReplayCachedContestData.$Properties} CReplayCachedContestData.$Shape */ /** * Constructs a new CReplayCachedContestData. * @exports CReplayCachedContestData * @classdesc Represents a CReplayCachedContestData. - * @implements ICReplayCachedContestData * @constructor - * @param {ICReplayCachedContestData=} [properties] Properties to set + * @param {CReplayCachedContestData.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CReplayCachedContestData(properties) { + var CReplayCachedContestData = function (properties) { this.video_entry_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CReplayCachedContestData timestamp. @@ -4851,10 +6190,14 @@ * @function create * @memberof CReplayCachedContestData * @static - * @param {ICReplayCachedContestData=} [properties] Properties to set + * @param {CReplayCachedContestData.$Properties=} [properties] Properties to set * @returns {CReplayCachedContestData} CReplayCachedContestData instance + * @type {{ + * (properties: CReplayCachedContestData.$Shape): CReplayCachedContestData & CReplayCachedContestData.$Shape; + * (properties?: CReplayCachedContestData.$Properties): CReplayCachedContestData; + * }} */ - CReplayCachedContestData.create = function create(properties) { + CReplayCachedContestData.create = function(properties) { return new CReplayCachedContestData(properties); }; @@ -4863,22 +6206,29 @@ * @function encode * @memberof CReplayCachedContestData * @static - * @param {ICReplayCachedContestData} message CReplayCachedContestData message or plain object to encode + * @param {CReplayCachedContestData.$Properties} message CReplayCachedContestData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CReplayCachedContestData.encode = function encode(message, writer) { + CReplayCachedContestData.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.timestamp != null && $Object.hasOwnProperty.call(message, "timestamp")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.timestamp); - if (message.num_votes_last_day != null && Object.hasOwnProperty.call(message, "num_votes_last_day")) + if (message.num_votes_last_day != null && $Object.hasOwnProperty.call(message, "num_votes_last_day")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.num_votes_last_day); if (message.video_entry_ids != null && message.video_entry_ids.length) for (var i = 0; i < message.video_entry_ids.length; ++i) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.video_entry_ids[i]); - if (message.num_flags_last_day != null && Object.hasOwnProperty.call(message, "num_flags_last_day")) + if (message.num_flags_last_day != null && $Object.hasOwnProperty.call(message, "num_flags_last_day")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.num_flags_last_day); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4887,12 +6237,12 @@ * @function encodeDelimited * @memberof CReplayCachedContestData * @static - * @param {ICReplayCachedContestData} message CReplayCachedContestData message or plain object to encode + * @param {CReplayCachedContestData.$Properties} message CReplayCachedContestData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CReplayCachedContestData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CReplayCachedContestData.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4902,41 +6252,68 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CReplayCachedContestData} CReplayCachedContestData + * @returns {CReplayCachedContestData & CReplayCachedContestData.$Shape} CReplayCachedContestData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CReplayCachedContestData.decode = function decode(reader, length) { + CReplayCachedContestData.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CReplayCachedContestData(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CReplayCachedContestData(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timestamp = reader.fixed32(); - break; - case 2: - message.num_votes_last_day = reader.uint32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 3: - if (!(message.video_entry_ids && message.video_entry_ids.length)) - message.video_entry_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.video_entry_ids.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.timestamp = reader.fixed32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.num_votes_last_day = reader.uint32(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.video_entry_ids && message.video_entry_ids.length)) + message.video_entry_ids = []; + reader.uint32s(message.video_entry_ids); + continue; + } + if (wireType !== 0) + break; + if (!(message.video_entry_ids && message.video_entry_ids.length)) + message.video_entry_ids = []; message.video_entry_ids.push(reader.uint32()); - break; - case 4: - message.num_flags_last_day = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 4: { + if (wireType !== 0) + break; + message.num_flags_last_day = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4946,11 +6323,11 @@ * @memberof CReplayCachedContestData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CReplayCachedContestData} CReplayCachedContestData + * @returns {CReplayCachedContestData & CReplayCachedContestData.$Shape} CReplayCachedContestData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CReplayCachedContestData.decodeDelimited = function decodeDelimited(reader) { + CReplayCachedContestData.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4964,23 +6341,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CReplayCachedContestData.verify = function verify(message) { + CReplayCachedContestData.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.timestamp != null && $Object.hasOwnProperty.call(message, "timestamp")) if (!$util.isInteger(message.timestamp)) return "timestamp: integer expected"; - if (message.num_votes_last_day != null && message.hasOwnProperty("num_votes_last_day")) + if (message.num_votes_last_day != null && $Object.hasOwnProperty.call(message, "num_votes_last_day")) if (!$util.isInteger(message.num_votes_last_day)) return "num_votes_last_day: integer expected"; - if (message.video_entry_ids != null && message.hasOwnProperty("video_entry_ids")) { - if (!Array.isArray(message.video_entry_ids)) + if (message.video_entry_ids != null && $Object.hasOwnProperty.call(message, "video_entry_ids")) { + if (!$Array.isArray(message.video_entry_ids)) return "video_entry_ids: array expected"; for (var i = 0; i < message.video_entry_ids.length; ++i) if (!$util.isInteger(message.video_entry_ids[i])) return "video_entry_ids: integer[] expected"; } - if (message.num_flags_last_day != null && message.hasOwnProperty("num_flags_last_day")) + if (message.num_flags_last_day != null && $Object.hasOwnProperty.call(message, "num_flags_last_day")) if (!$util.isInteger(message.num_flags_last_day)) return "num_flags_last_day: integer expected"; return null; @@ -4994,18 +6375,24 @@ * @param {Object.} object Plain object * @returns {CReplayCachedContestData} CReplayCachedContestData */ - CReplayCachedContestData.fromObject = function fromObject(object) { + CReplayCachedContestData.fromObject = function (object, _depth) { if (object instanceof $root.CReplayCachedContestData) return object; + if (!$util.isObject(object)) + throw $TypeError(".CReplayCachedContestData: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CReplayCachedContestData(); if (object.timestamp != null) message.timestamp = object.timestamp >>> 0; if (object.num_votes_last_day != null) message.num_votes_last_day = object.num_votes_last_day >>> 0; if (object.video_entry_ids) { - if (!Array.isArray(object.video_entry_ids)) - throw TypeError(".CReplayCachedContestData.video_entry_ids: array expected"); - message.video_entry_ids = []; + if (!$Array.isArray(object.video_entry_ids)) + throw $TypeError(".CReplayCachedContestData.video_entry_ids: array expected"); + message.video_entry_ids = $Array(object.video_entry_ids.length); for (var i = 0; i < object.video_entry_ids.length; ++i) message.video_entry_ids[i] = object.video_entry_ids[i] >>> 0; } @@ -5023,9 +6410,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CReplayCachedContestData.toObject = function toObject(message, options) { + CReplayCachedContestData.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.video_entry_ids = []; @@ -5034,16 +6425,16 @@ object.num_votes_last_day = 0; object.num_flags_last_day = 0; } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && $Object.hasOwnProperty.call(message, "timestamp")) object.timestamp = message.timestamp; - if (message.num_votes_last_day != null && message.hasOwnProperty("num_votes_last_day")) + if (message.num_votes_last_day != null && $Object.hasOwnProperty.call(message, "num_votes_last_day")) object.num_votes_last_day = message.num_votes_last_day; if (message.video_entry_ids && message.video_entry_ids.length) { - object.video_entry_ids = []; + object.video_entry_ids = $Array(message.video_entry_ids.length); for (var j = 0; j < message.video_entry_ids.length; ++j) object.video_entry_ids[j] = message.video_entry_ids[j]; } - if (message.num_flags_last_day != null && message.hasOwnProperty("num_flags_last_day")) + if (message.num_flags_last_day != null && $Object.hasOwnProperty.call(message, "num_flags_last_day")) object.num_flags_last_day = message.num_flags_last_day; return object; }; @@ -5055,8 +6446,22 @@ * @instance * @returns {Object.} JSON object */ - CReplayCachedContestData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CReplayCachedContestData.prototype.toJSON = function() { + return CReplayCachedContestData.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CReplayCachedContestData + * @function getTypeUrl + * @memberof CReplayCachedContestData + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CReplayCachedContestData.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CReplayCachedContestData"; }; return CReplayCachedContestData; @@ -5064,36 +6469,53 @@ $root.CMsgTFCoaching_AddToCoaches = (function() { + /** + * Properties of a CMsgTFCoaching_AddToCoaches. + * @typedef {Object} CMsgTFCoaching_AddToCoaches.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFCoaching_AddToCoaches. * @exports ICMsgTFCoaching_AddToCoaches * @interface ICMsgTFCoaching_AddToCoaches + * @augments CMsgTFCoaching_AddToCoaches.$Properties + * @deprecated Use CMsgTFCoaching_AddToCoaches.$Properties instead. + */ + + /** + * Shape of a CMsgTFCoaching_AddToCoaches. + * @typedef {CMsgTFCoaching_AddToCoaches.$Properties} CMsgTFCoaching_AddToCoaches.$Shape */ /** * Constructs a new CMsgTFCoaching_AddToCoaches. * @exports CMsgTFCoaching_AddToCoaches * @classdesc Represents a CMsgTFCoaching_AddToCoaches. - * @implements ICMsgTFCoaching_AddToCoaches * @constructor - * @param {ICMsgTFCoaching_AddToCoaches=} [properties] Properties to set + * @param {CMsgTFCoaching_AddToCoaches.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFCoaching_AddToCoaches(properties) { + var CMsgTFCoaching_AddToCoaches = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgTFCoaching_AddToCoaches instance using the specified properties. * @function create * @memberof CMsgTFCoaching_AddToCoaches * @static - * @param {ICMsgTFCoaching_AddToCoaches=} [properties] Properties to set + * @param {CMsgTFCoaching_AddToCoaches.$Properties=} [properties] Properties to set * @returns {CMsgTFCoaching_AddToCoaches} CMsgTFCoaching_AddToCoaches instance + * @type {{ + * (properties: CMsgTFCoaching_AddToCoaches.$Shape): CMsgTFCoaching_AddToCoaches & CMsgTFCoaching_AddToCoaches.$Shape; + * (properties?: CMsgTFCoaching_AddToCoaches.$Properties): CMsgTFCoaching_AddToCoaches; + * }} */ - CMsgTFCoaching_AddToCoaches.create = function create(properties) { + CMsgTFCoaching_AddToCoaches.create = function(properties) { return new CMsgTFCoaching_AddToCoaches(properties); }; @@ -5102,13 +6524,20 @@ * @function encode * @memberof CMsgTFCoaching_AddToCoaches * @static - * @param {ICMsgTFCoaching_AddToCoaches} message CMsgTFCoaching_AddToCoaches message or plain object to encode + * @param {CMsgTFCoaching_AddToCoaches.$Properties} message CMsgTFCoaching_AddToCoaches message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_AddToCoaches.encode = function encode(message, writer) { + CMsgTFCoaching_AddToCoaches.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5117,12 +6546,12 @@ * @function encodeDelimited * @memberof CMsgTFCoaching_AddToCoaches * @static - * @param {ICMsgTFCoaching_AddToCoaches} message CMsgTFCoaching_AddToCoaches message or plain object to encode + * @param {CMsgTFCoaching_AddToCoaches.$Properties} message CMsgTFCoaching_AddToCoaches message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_AddToCoaches.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFCoaching_AddToCoaches.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5132,22 +6561,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFCoaching_AddToCoaches} CMsgTFCoaching_AddToCoaches + * @returns {CMsgTFCoaching_AddToCoaches & CMsgTFCoaching_AddToCoaches.$Shape} CMsgTFCoaching_AddToCoaches * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_AddToCoaches.decode = function decode(reader, length) { + CMsgTFCoaching_AddToCoaches.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFCoaching_AddToCoaches(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFCoaching_AddToCoaches(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5157,11 +6597,11 @@ * @memberof CMsgTFCoaching_AddToCoaches * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFCoaching_AddToCoaches} CMsgTFCoaching_AddToCoaches + * @returns {CMsgTFCoaching_AddToCoaches & CMsgTFCoaching_AddToCoaches.$Shape} CMsgTFCoaching_AddToCoaches * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_AddToCoaches.decodeDelimited = function decodeDelimited(reader) { + CMsgTFCoaching_AddToCoaches.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5175,9 +6615,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFCoaching_AddToCoaches.verify = function verify(message) { + CMsgTFCoaching_AddToCoaches.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -5189,9 +6633,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFCoaching_AddToCoaches} CMsgTFCoaching_AddToCoaches */ - CMsgTFCoaching_AddToCoaches.fromObject = function fromObject(object) { + CMsgTFCoaching_AddToCoaches.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFCoaching_AddToCoaches) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFCoaching_AddToCoaches: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgTFCoaching_AddToCoaches(); }; @@ -5204,7 +6654,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFCoaching_AddToCoaches.toObject = function toObject() { + CMsgTFCoaching_AddToCoaches.toObject = function () { return {}; }; @@ -5215,8 +6665,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFCoaching_AddToCoaches.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFCoaching_AddToCoaches.prototype.toJSON = function() { + return CMsgTFCoaching_AddToCoaches.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFCoaching_AddToCoaches + * @function getTypeUrl + * @memberof CMsgTFCoaching_AddToCoaches + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFCoaching_AddToCoaches.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFCoaching_AddToCoaches"; }; return CMsgTFCoaching_AddToCoaches; @@ -5224,36 +6688,53 @@ $root.CMsgTFCoaching_RemoveFromCoaches = (function() { + /** + * Properties of a CMsgTFCoaching_RemoveFromCoaches. + * @typedef {Object} CMsgTFCoaching_RemoveFromCoaches.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFCoaching_RemoveFromCoaches. * @exports ICMsgTFCoaching_RemoveFromCoaches * @interface ICMsgTFCoaching_RemoveFromCoaches + * @augments CMsgTFCoaching_RemoveFromCoaches.$Properties + * @deprecated Use CMsgTFCoaching_RemoveFromCoaches.$Properties instead. + */ + + /** + * Shape of a CMsgTFCoaching_RemoveFromCoaches. + * @typedef {CMsgTFCoaching_RemoveFromCoaches.$Properties} CMsgTFCoaching_RemoveFromCoaches.$Shape */ /** * Constructs a new CMsgTFCoaching_RemoveFromCoaches. * @exports CMsgTFCoaching_RemoveFromCoaches * @classdesc Represents a CMsgTFCoaching_RemoveFromCoaches. - * @implements ICMsgTFCoaching_RemoveFromCoaches * @constructor - * @param {ICMsgTFCoaching_RemoveFromCoaches=} [properties] Properties to set + * @param {CMsgTFCoaching_RemoveFromCoaches.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFCoaching_RemoveFromCoaches(properties) { + var CMsgTFCoaching_RemoveFromCoaches = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgTFCoaching_RemoveFromCoaches instance using the specified properties. * @function create * @memberof CMsgTFCoaching_RemoveFromCoaches * @static - * @param {ICMsgTFCoaching_RemoveFromCoaches=} [properties] Properties to set + * @param {CMsgTFCoaching_RemoveFromCoaches.$Properties=} [properties] Properties to set * @returns {CMsgTFCoaching_RemoveFromCoaches} CMsgTFCoaching_RemoveFromCoaches instance + * @type {{ + * (properties: CMsgTFCoaching_RemoveFromCoaches.$Shape): CMsgTFCoaching_RemoveFromCoaches & CMsgTFCoaching_RemoveFromCoaches.$Shape; + * (properties?: CMsgTFCoaching_RemoveFromCoaches.$Properties): CMsgTFCoaching_RemoveFromCoaches; + * }} */ - CMsgTFCoaching_RemoveFromCoaches.create = function create(properties) { + CMsgTFCoaching_RemoveFromCoaches.create = function(properties) { return new CMsgTFCoaching_RemoveFromCoaches(properties); }; @@ -5262,13 +6743,20 @@ * @function encode * @memberof CMsgTFCoaching_RemoveFromCoaches * @static - * @param {ICMsgTFCoaching_RemoveFromCoaches} message CMsgTFCoaching_RemoveFromCoaches message or plain object to encode + * @param {CMsgTFCoaching_RemoveFromCoaches.$Properties} message CMsgTFCoaching_RemoveFromCoaches message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_RemoveFromCoaches.encode = function encode(message, writer) { + CMsgTFCoaching_RemoveFromCoaches.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5277,12 +6765,12 @@ * @function encodeDelimited * @memberof CMsgTFCoaching_RemoveFromCoaches * @static - * @param {ICMsgTFCoaching_RemoveFromCoaches} message CMsgTFCoaching_RemoveFromCoaches message or plain object to encode + * @param {CMsgTFCoaching_RemoveFromCoaches.$Properties} message CMsgTFCoaching_RemoveFromCoaches message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_RemoveFromCoaches.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFCoaching_RemoveFromCoaches.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5292,22 +6780,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFCoaching_RemoveFromCoaches} CMsgTFCoaching_RemoveFromCoaches + * @returns {CMsgTFCoaching_RemoveFromCoaches & CMsgTFCoaching_RemoveFromCoaches.$Shape} CMsgTFCoaching_RemoveFromCoaches * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_RemoveFromCoaches.decode = function decode(reader, length) { + CMsgTFCoaching_RemoveFromCoaches.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFCoaching_RemoveFromCoaches(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFCoaching_RemoveFromCoaches(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5317,11 +6816,11 @@ * @memberof CMsgTFCoaching_RemoveFromCoaches * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFCoaching_RemoveFromCoaches} CMsgTFCoaching_RemoveFromCoaches + * @returns {CMsgTFCoaching_RemoveFromCoaches & CMsgTFCoaching_RemoveFromCoaches.$Shape} CMsgTFCoaching_RemoveFromCoaches * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_RemoveFromCoaches.decodeDelimited = function decodeDelimited(reader) { + CMsgTFCoaching_RemoveFromCoaches.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5335,9 +6834,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFCoaching_RemoveFromCoaches.verify = function verify(message) { + CMsgTFCoaching_RemoveFromCoaches.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -5349,9 +6852,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFCoaching_RemoveFromCoaches} CMsgTFCoaching_RemoveFromCoaches */ - CMsgTFCoaching_RemoveFromCoaches.fromObject = function fromObject(object) { + CMsgTFCoaching_RemoveFromCoaches.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFCoaching_RemoveFromCoaches) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFCoaching_RemoveFromCoaches: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgTFCoaching_RemoveFromCoaches(); }; @@ -5364,7 +6873,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFCoaching_RemoveFromCoaches.toObject = function toObject() { + CMsgTFCoaching_RemoveFromCoaches.toObject = function () { return {}; }; @@ -5375,8 +6884,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFCoaching_RemoveFromCoaches.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFCoaching_RemoveFromCoaches.prototype.toJSON = function() { + return CMsgTFCoaching_RemoveFromCoaches.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFCoaching_RemoveFromCoaches + * @function getTypeUrl + * @memberof CMsgTFCoaching_RemoveFromCoaches + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFCoaching_RemoveFromCoaches.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFCoaching_RemoveFromCoaches"; }; return CMsgTFCoaching_RemoveFromCoaches; @@ -5384,27 +6907,40 @@ $root.CMsgTFCoaching_FindCoach = (function() { + /** + * Properties of a CMsgTFCoaching_FindCoach. + * @typedef {Object} CMsgTFCoaching_FindCoach.$Properties + * @property {number|null} [account_id_friend_as_coach] CMsgTFCoaching_FindCoach account_id_friend_as_coach + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFCoaching_FindCoach. * @exports ICMsgTFCoaching_FindCoach * @interface ICMsgTFCoaching_FindCoach - * @property {number|null} [account_id_friend_as_coach] CMsgTFCoaching_FindCoach account_id_friend_as_coach + * @augments CMsgTFCoaching_FindCoach.$Properties + * @deprecated Use CMsgTFCoaching_FindCoach.$Properties instead. + */ + + /** + * Shape of a CMsgTFCoaching_FindCoach. + * @typedef {CMsgTFCoaching_FindCoach.$Properties} CMsgTFCoaching_FindCoach.$Shape */ /** * Constructs a new CMsgTFCoaching_FindCoach. * @exports CMsgTFCoaching_FindCoach * @classdesc Represents a CMsgTFCoaching_FindCoach. - * @implements ICMsgTFCoaching_FindCoach * @constructor - * @param {ICMsgTFCoaching_FindCoach=} [properties] Properties to set + * @param {CMsgTFCoaching_FindCoach.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFCoaching_FindCoach(properties) { + var CMsgTFCoaching_FindCoach = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFCoaching_FindCoach account_id_friend_as_coach. @@ -5419,10 +6955,14 @@ * @function create * @memberof CMsgTFCoaching_FindCoach * @static - * @param {ICMsgTFCoaching_FindCoach=} [properties] Properties to set + * @param {CMsgTFCoaching_FindCoach.$Properties=} [properties] Properties to set * @returns {CMsgTFCoaching_FindCoach} CMsgTFCoaching_FindCoach instance + * @type {{ + * (properties: CMsgTFCoaching_FindCoach.$Shape): CMsgTFCoaching_FindCoach & CMsgTFCoaching_FindCoach.$Shape; + * (properties?: CMsgTFCoaching_FindCoach.$Properties): CMsgTFCoaching_FindCoach; + * }} */ - CMsgTFCoaching_FindCoach.create = function create(properties) { + CMsgTFCoaching_FindCoach.create = function(properties) { return new CMsgTFCoaching_FindCoach(properties); }; @@ -5431,15 +6971,22 @@ * @function encode * @memberof CMsgTFCoaching_FindCoach * @static - * @param {ICMsgTFCoaching_FindCoach} message CMsgTFCoaching_FindCoach message or plain object to encode + * @param {CMsgTFCoaching_FindCoach.$Properties} message CMsgTFCoaching_FindCoach message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_FindCoach.encode = function encode(message, writer) { + CMsgTFCoaching_FindCoach.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id_friend_as_coach != null && Object.hasOwnProperty.call(message, "account_id_friend_as_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id_friend_as_coach != null && $Object.hasOwnProperty.call(message, "account_id_friend_as_coach")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id_friend_as_coach); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5448,12 +6995,12 @@ * @function encodeDelimited * @memberof CMsgTFCoaching_FindCoach * @static - * @param {ICMsgTFCoaching_FindCoach} message CMsgTFCoaching_FindCoach message or plain object to encode + * @param {CMsgTFCoaching_FindCoach.$Properties} message CMsgTFCoaching_FindCoach message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_FindCoach.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFCoaching_FindCoach.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5463,25 +7010,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFCoaching_FindCoach} CMsgTFCoaching_FindCoach + * @returns {CMsgTFCoaching_FindCoach & CMsgTFCoaching_FindCoach.$Shape} CMsgTFCoaching_FindCoach * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_FindCoach.decode = function decode(reader, length) { + CMsgTFCoaching_FindCoach.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFCoaching_FindCoach(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFCoaching_FindCoach(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id_friend_as_coach = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id_friend_as_coach = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5491,11 +7055,11 @@ * @memberof CMsgTFCoaching_FindCoach * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFCoaching_FindCoach} CMsgTFCoaching_FindCoach + * @returns {CMsgTFCoaching_FindCoach & CMsgTFCoaching_FindCoach.$Shape} CMsgTFCoaching_FindCoach * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_FindCoach.decodeDelimited = function decodeDelimited(reader) { + CMsgTFCoaching_FindCoach.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5509,10 +7073,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFCoaching_FindCoach.verify = function verify(message) { + CMsgTFCoaching_FindCoach.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id_friend_as_coach != null && message.hasOwnProperty("account_id_friend_as_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id_friend_as_coach != null && $Object.hasOwnProperty.call(message, "account_id_friend_as_coach")) if (!$util.isInteger(message.account_id_friend_as_coach)) return "account_id_friend_as_coach: integer expected"; return null; @@ -5526,9 +7094,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFCoaching_FindCoach} CMsgTFCoaching_FindCoach */ - CMsgTFCoaching_FindCoach.fromObject = function fromObject(object) { + CMsgTFCoaching_FindCoach.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFCoaching_FindCoach) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFCoaching_FindCoach: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFCoaching_FindCoach(); if (object.account_id_friend_as_coach != null) message.account_id_friend_as_coach = object.account_id_friend_as_coach >>> 0; @@ -5544,13 +7118,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFCoaching_FindCoach.toObject = function toObject(message, options) { + CMsgTFCoaching_FindCoach.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.account_id_friend_as_coach = 0; - if (message.account_id_friend_as_coach != null && message.hasOwnProperty("account_id_friend_as_coach")) + if (message.account_id_friend_as_coach != null && $Object.hasOwnProperty.call(message, "account_id_friend_as_coach")) object.account_id_friend_as_coach = message.account_id_friend_as_coach; return object; }; @@ -5562,8 +7140,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFCoaching_FindCoach.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFCoaching_FindCoach.prototype.toJSON = function() { + return CMsgTFCoaching_FindCoach.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFCoaching_FindCoach + * @function getTypeUrl + * @memberof CMsgTFCoaching_FindCoach + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFCoaching_FindCoach.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFCoaching_FindCoach"; }; return CMsgTFCoaching_FindCoach; @@ -5573,27 +7165,40 @@ /** * Properties of a CMsgTFCoaching_FindCoachResponse. - * @exports ICMsgTFCoaching_FindCoachResponse - * @interface ICMsgTFCoaching_FindCoachResponse + * @typedef {Object} CMsgTFCoaching_FindCoachResponse.$Properties * @property {boolean|null} [found_coach] CMsgTFCoaching_FindCoachResponse found_coach * @property {number|null} [num_likes] CMsgTFCoaching_FindCoachResponse num_likes * @property {string|null} [coach_name] CMsgTFCoaching_FindCoachResponse coach_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTFCoaching_FindCoachResponse. + * @exports ICMsgTFCoaching_FindCoachResponse + * @interface ICMsgTFCoaching_FindCoachResponse + * @augments CMsgTFCoaching_FindCoachResponse.$Properties + * @deprecated Use CMsgTFCoaching_FindCoachResponse.$Properties instead. + */ + + /** + * Shape of a CMsgTFCoaching_FindCoachResponse. + * @typedef {CMsgTFCoaching_FindCoachResponse.$Properties} CMsgTFCoaching_FindCoachResponse.$Shape */ /** * Constructs a new CMsgTFCoaching_FindCoachResponse. * @exports CMsgTFCoaching_FindCoachResponse * @classdesc Represents a CMsgTFCoaching_FindCoachResponse. - * @implements ICMsgTFCoaching_FindCoachResponse * @constructor - * @param {ICMsgTFCoaching_FindCoachResponse=} [properties] Properties to set + * @param {CMsgTFCoaching_FindCoachResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFCoaching_FindCoachResponse(properties) { + var CMsgTFCoaching_FindCoachResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFCoaching_FindCoachResponse found_coach. @@ -5624,10 +7229,14 @@ * @function create * @memberof CMsgTFCoaching_FindCoachResponse * @static - * @param {ICMsgTFCoaching_FindCoachResponse=} [properties] Properties to set + * @param {CMsgTFCoaching_FindCoachResponse.$Properties=} [properties] Properties to set * @returns {CMsgTFCoaching_FindCoachResponse} CMsgTFCoaching_FindCoachResponse instance + * @type {{ + * (properties: CMsgTFCoaching_FindCoachResponse.$Shape): CMsgTFCoaching_FindCoachResponse & CMsgTFCoaching_FindCoachResponse.$Shape; + * (properties?: CMsgTFCoaching_FindCoachResponse.$Properties): CMsgTFCoaching_FindCoachResponse; + * }} */ - CMsgTFCoaching_FindCoachResponse.create = function create(properties) { + CMsgTFCoaching_FindCoachResponse.create = function(properties) { return new CMsgTFCoaching_FindCoachResponse(properties); }; @@ -5636,19 +7245,26 @@ * @function encode * @memberof CMsgTFCoaching_FindCoachResponse * @static - * @param {ICMsgTFCoaching_FindCoachResponse} message CMsgTFCoaching_FindCoachResponse message or plain object to encode + * @param {CMsgTFCoaching_FindCoachResponse.$Properties} message CMsgTFCoaching_FindCoachResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_FindCoachResponse.encode = function encode(message, writer) { + CMsgTFCoaching_FindCoachResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.found_coach != null && Object.hasOwnProperty.call(message, "found_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.found_coach != null && $Object.hasOwnProperty.call(message, "found_coach")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.found_coach); - if (message.num_likes != null && Object.hasOwnProperty.call(message, "num_likes")) + if (message.num_likes != null && $Object.hasOwnProperty.call(message, "num_likes")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.num_likes); - if (message.coach_name != null && Object.hasOwnProperty.call(message, "coach_name")) + if (message.coach_name != null && $Object.hasOwnProperty.call(message, "coach_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.coach_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5657,12 +7273,12 @@ * @function encodeDelimited * @memberof CMsgTFCoaching_FindCoachResponse * @static - * @param {ICMsgTFCoaching_FindCoachResponse} message CMsgTFCoaching_FindCoachResponse message or plain object to encode + * @param {CMsgTFCoaching_FindCoachResponse.$Properties} message CMsgTFCoaching_FindCoachResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_FindCoachResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFCoaching_FindCoachResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5672,31 +7288,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFCoaching_FindCoachResponse} CMsgTFCoaching_FindCoachResponse + * @returns {CMsgTFCoaching_FindCoachResponse & CMsgTFCoaching_FindCoachResponse.$Shape} CMsgTFCoaching_FindCoachResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_FindCoachResponse.decode = function decode(reader, length) { + CMsgTFCoaching_FindCoachResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFCoaching_FindCoachResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFCoaching_FindCoachResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.found_coach = reader.bool(); - break; - case 2: - message.num_likes = reader.uint32(); - break; - case 3: - message.coach_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.found_coach = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.num_likes = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.coach_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5706,11 +7345,11 @@ * @memberof CMsgTFCoaching_FindCoachResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFCoaching_FindCoachResponse} CMsgTFCoaching_FindCoachResponse + * @returns {CMsgTFCoaching_FindCoachResponse & CMsgTFCoaching_FindCoachResponse.$Shape} CMsgTFCoaching_FindCoachResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_FindCoachResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgTFCoaching_FindCoachResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5724,16 +7363,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFCoaching_FindCoachResponse.verify = function verify(message) { + CMsgTFCoaching_FindCoachResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.found_coach != null && message.hasOwnProperty("found_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.found_coach != null && $Object.hasOwnProperty.call(message, "found_coach")) if (typeof message.found_coach !== "boolean") return "found_coach: boolean expected"; - if (message.num_likes != null && message.hasOwnProperty("num_likes")) + if (message.num_likes != null && $Object.hasOwnProperty.call(message, "num_likes")) if (!$util.isInteger(message.num_likes)) return "num_likes: integer expected"; - if (message.coach_name != null && message.hasOwnProperty("coach_name")) + if (message.coach_name != null && $Object.hasOwnProperty.call(message, "coach_name")) if (!$util.isString(message.coach_name)) return "coach_name: string expected"; return null; @@ -5747,16 +7390,22 @@ * @param {Object.} object Plain object * @returns {CMsgTFCoaching_FindCoachResponse} CMsgTFCoaching_FindCoachResponse */ - CMsgTFCoaching_FindCoachResponse.fromObject = function fromObject(object) { + CMsgTFCoaching_FindCoachResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFCoaching_FindCoachResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFCoaching_FindCoachResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFCoaching_FindCoachResponse(); if (object.found_coach != null) - message.found_coach = Boolean(object.found_coach); + message.found_coach = $Boolean(object.found_coach); if (object.num_likes != null) message.num_likes = object.num_likes >>> 0; if (object.coach_name != null) - message.coach_name = String(object.coach_name); + message.coach_name = $String(object.coach_name); return message; }; @@ -5769,20 +7418,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFCoaching_FindCoachResponse.toObject = function toObject(message, options) { + CMsgTFCoaching_FindCoachResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.found_coach = false; object.num_likes = 0; object.coach_name = ""; } - if (message.found_coach != null && message.hasOwnProperty("found_coach")) + if (message.found_coach != null && $Object.hasOwnProperty.call(message, "found_coach")) object.found_coach = message.found_coach; - if (message.num_likes != null && message.hasOwnProperty("num_likes")) + if (message.num_likes != null && $Object.hasOwnProperty.call(message, "num_likes")) object.num_likes = message.num_likes; - if (message.coach_name != null && message.hasOwnProperty("coach_name")) + if (message.coach_name != null && $Object.hasOwnProperty.call(message, "coach_name")) object.coach_name = message.coach_name; return object; }; @@ -5794,8 +7447,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFCoaching_FindCoachResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFCoaching_FindCoachResponse.prototype.toJSON = function() { + return CMsgTFCoaching_FindCoachResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFCoaching_FindCoachResponse + * @function getTypeUrl + * @memberof CMsgTFCoaching_FindCoachResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFCoaching_FindCoachResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFCoaching_FindCoachResponse"; }; return CMsgTFCoaching_FindCoachResponse; @@ -5805,26 +7472,39 @@ /** * Properties of a CMsgTFCoaching_AskCoach. - * @exports ICMsgTFCoaching_AskCoach - * @interface ICMsgTFCoaching_AskCoach + * @typedef {Object} CMsgTFCoaching_AskCoach.$Properties * @property {number|null} [account_id_student] CMsgTFCoaching_AskCoach account_id_student * @property {boolean|null} [student_is_friend] CMsgTFCoaching_AskCoach student_is_friend + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTFCoaching_AskCoach. + * @exports ICMsgTFCoaching_AskCoach + * @interface ICMsgTFCoaching_AskCoach + * @augments CMsgTFCoaching_AskCoach.$Properties + * @deprecated Use CMsgTFCoaching_AskCoach.$Properties instead. + */ + + /** + * Shape of a CMsgTFCoaching_AskCoach. + * @typedef {CMsgTFCoaching_AskCoach.$Properties} CMsgTFCoaching_AskCoach.$Shape */ /** * Constructs a new CMsgTFCoaching_AskCoach. * @exports CMsgTFCoaching_AskCoach * @classdesc Represents a CMsgTFCoaching_AskCoach. - * @implements ICMsgTFCoaching_AskCoach * @constructor - * @param {ICMsgTFCoaching_AskCoach=} [properties] Properties to set + * @param {CMsgTFCoaching_AskCoach.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFCoaching_AskCoach(properties) { + var CMsgTFCoaching_AskCoach = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFCoaching_AskCoach account_id_student. @@ -5847,10 +7527,14 @@ * @function create * @memberof CMsgTFCoaching_AskCoach * @static - * @param {ICMsgTFCoaching_AskCoach=} [properties] Properties to set + * @param {CMsgTFCoaching_AskCoach.$Properties=} [properties] Properties to set * @returns {CMsgTFCoaching_AskCoach} CMsgTFCoaching_AskCoach instance + * @type {{ + * (properties: CMsgTFCoaching_AskCoach.$Shape): CMsgTFCoaching_AskCoach & CMsgTFCoaching_AskCoach.$Shape; + * (properties?: CMsgTFCoaching_AskCoach.$Properties): CMsgTFCoaching_AskCoach; + * }} */ - CMsgTFCoaching_AskCoach.create = function create(properties) { + CMsgTFCoaching_AskCoach.create = function(properties) { return new CMsgTFCoaching_AskCoach(properties); }; @@ -5859,17 +7543,24 @@ * @function encode * @memberof CMsgTFCoaching_AskCoach * @static - * @param {ICMsgTFCoaching_AskCoach} message CMsgTFCoaching_AskCoach message or plain object to encode + * @param {CMsgTFCoaching_AskCoach.$Properties} message CMsgTFCoaching_AskCoach message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_AskCoach.encode = function encode(message, writer) { + CMsgTFCoaching_AskCoach.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id_student != null && Object.hasOwnProperty.call(message, "account_id_student")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id_student != null && $Object.hasOwnProperty.call(message, "account_id_student")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id_student); - if (message.student_is_friend != null && Object.hasOwnProperty.call(message, "student_is_friend")) + if (message.student_is_friend != null && $Object.hasOwnProperty.call(message, "student_is_friend")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.student_is_friend); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5878,12 +7569,12 @@ * @function encodeDelimited * @memberof CMsgTFCoaching_AskCoach * @static - * @param {ICMsgTFCoaching_AskCoach} message CMsgTFCoaching_AskCoach message or plain object to encode + * @param {CMsgTFCoaching_AskCoach.$Properties} message CMsgTFCoaching_AskCoach message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_AskCoach.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFCoaching_AskCoach.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5893,28 +7584,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFCoaching_AskCoach} CMsgTFCoaching_AskCoach + * @returns {CMsgTFCoaching_AskCoach & CMsgTFCoaching_AskCoach.$Shape} CMsgTFCoaching_AskCoach * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_AskCoach.decode = function decode(reader, length) { + CMsgTFCoaching_AskCoach.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFCoaching_AskCoach(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFCoaching_AskCoach(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id_student = reader.uint32(); - break; - case 2: - message.student_is_friend = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id_student = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.student_is_friend = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -5924,11 +7635,11 @@ * @memberof CMsgTFCoaching_AskCoach * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFCoaching_AskCoach} CMsgTFCoaching_AskCoach + * @returns {CMsgTFCoaching_AskCoach & CMsgTFCoaching_AskCoach.$Shape} CMsgTFCoaching_AskCoach * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_AskCoach.decodeDelimited = function decodeDelimited(reader) { + CMsgTFCoaching_AskCoach.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5942,13 +7653,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFCoaching_AskCoach.verify = function verify(message) { + CMsgTFCoaching_AskCoach.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id_student != null && message.hasOwnProperty("account_id_student")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id_student != null && $Object.hasOwnProperty.call(message, "account_id_student")) if (!$util.isInteger(message.account_id_student)) return "account_id_student: integer expected"; - if (message.student_is_friend != null && message.hasOwnProperty("student_is_friend")) + if (message.student_is_friend != null && $Object.hasOwnProperty.call(message, "student_is_friend")) if (typeof message.student_is_friend !== "boolean") return "student_is_friend: boolean expected"; return null; @@ -5962,14 +7677,20 @@ * @param {Object.} object Plain object * @returns {CMsgTFCoaching_AskCoach} CMsgTFCoaching_AskCoach */ - CMsgTFCoaching_AskCoach.fromObject = function fromObject(object) { + CMsgTFCoaching_AskCoach.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFCoaching_AskCoach) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFCoaching_AskCoach: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFCoaching_AskCoach(); if (object.account_id_student != null) message.account_id_student = object.account_id_student >>> 0; if (object.student_is_friend != null) - message.student_is_friend = Boolean(object.student_is_friend); + message.student_is_friend = $Boolean(object.student_is_friend); return message; }; @@ -5982,17 +7703,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFCoaching_AskCoach.toObject = function toObject(message, options) { + CMsgTFCoaching_AskCoach.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id_student = 0; object.student_is_friend = false; } - if (message.account_id_student != null && message.hasOwnProperty("account_id_student")) + if (message.account_id_student != null && $Object.hasOwnProperty.call(message, "account_id_student")) object.account_id_student = message.account_id_student; - if (message.student_is_friend != null && message.hasOwnProperty("student_is_friend")) + if (message.student_is_friend != null && $Object.hasOwnProperty.call(message, "student_is_friend")) object.student_is_friend = message.student_is_friend; return object; }; @@ -6004,8 +7729,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFCoaching_AskCoach.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFCoaching_AskCoach.prototype.toJSON = function() { + return CMsgTFCoaching_AskCoach.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFCoaching_AskCoach + * @function getTypeUrl + * @memberof CMsgTFCoaching_AskCoach + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFCoaching_AskCoach.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFCoaching_AskCoach"; }; return CMsgTFCoaching_AskCoach; @@ -6013,27 +7752,40 @@ $root.CMsgTFCoaching_AskCoachResponse = (function() { + /** + * Properties of a CMsgTFCoaching_AskCoachResponse. + * @typedef {Object} CMsgTFCoaching_AskCoachResponse.$Properties + * @property {boolean|null} [accept_coaching_assignment] CMsgTFCoaching_AskCoachResponse accept_coaching_assignment + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFCoaching_AskCoachResponse. * @exports ICMsgTFCoaching_AskCoachResponse * @interface ICMsgTFCoaching_AskCoachResponse - * @property {boolean|null} [accept_coaching_assignment] CMsgTFCoaching_AskCoachResponse accept_coaching_assignment + * @augments CMsgTFCoaching_AskCoachResponse.$Properties + * @deprecated Use CMsgTFCoaching_AskCoachResponse.$Properties instead. + */ + + /** + * Shape of a CMsgTFCoaching_AskCoachResponse. + * @typedef {CMsgTFCoaching_AskCoachResponse.$Properties} CMsgTFCoaching_AskCoachResponse.$Shape */ /** * Constructs a new CMsgTFCoaching_AskCoachResponse. * @exports CMsgTFCoaching_AskCoachResponse * @classdesc Represents a CMsgTFCoaching_AskCoachResponse. - * @implements ICMsgTFCoaching_AskCoachResponse * @constructor - * @param {ICMsgTFCoaching_AskCoachResponse=} [properties] Properties to set + * @param {CMsgTFCoaching_AskCoachResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFCoaching_AskCoachResponse(properties) { + var CMsgTFCoaching_AskCoachResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFCoaching_AskCoachResponse accept_coaching_assignment. @@ -6048,10 +7800,14 @@ * @function create * @memberof CMsgTFCoaching_AskCoachResponse * @static - * @param {ICMsgTFCoaching_AskCoachResponse=} [properties] Properties to set + * @param {CMsgTFCoaching_AskCoachResponse.$Properties=} [properties] Properties to set * @returns {CMsgTFCoaching_AskCoachResponse} CMsgTFCoaching_AskCoachResponse instance + * @type {{ + * (properties: CMsgTFCoaching_AskCoachResponse.$Shape): CMsgTFCoaching_AskCoachResponse & CMsgTFCoaching_AskCoachResponse.$Shape; + * (properties?: CMsgTFCoaching_AskCoachResponse.$Properties): CMsgTFCoaching_AskCoachResponse; + * }} */ - CMsgTFCoaching_AskCoachResponse.create = function create(properties) { + CMsgTFCoaching_AskCoachResponse.create = function(properties) { return new CMsgTFCoaching_AskCoachResponse(properties); }; @@ -6060,15 +7816,22 @@ * @function encode * @memberof CMsgTFCoaching_AskCoachResponse * @static - * @param {ICMsgTFCoaching_AskCoachResponse} message CMsgTFCoaching_AskCoachResponse message or plain object to encode + * @param {CMsgTFCoaching_AskCoachResponse.$Properties} message CMsgTFCoaching_AskCoachResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_AskCoachResponse.encode = function encode(message, writer) { + CMsgTFCoaching_AskCoachResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.accept_coaching_assignment != null && Object.hasOwnProperty.call(message, "accept_coaching_assignment")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.accept_coaching_assignment != null && $Object.hasOwnProperty.call(message, "accept_coaching_assignment")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.accept_coaching_assignment); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6077,12 +7840,12 @@ * @function encodeDelimited * @memberof CMsgTFCoaching_AskCoachResponse * @static - * @param {ICMsgTFCoaching_AskCoachResponse} message CMsgTFCoaching_AskCoachResponse message or plain object to encode + * @param {CMsgTFCoaching_AskCoachResponse.$Properties} message CMsgTFCoaching_AskCoachResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_AskCoachResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFCoaching_AskCoachResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6092,25 +7855,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFCoaching_AskCoachResponse} CMsgTFCoaching_AskCoachResponse + * @returns {CMsgTFCoaching_AskCoachResponse & CMsgTFCoaching_AskCoachResponse.$Shape} CMsgTFCoaching_AskCoachResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_AskCoachResponse.decode = function decode(reader, length) { + CMsgTFCoaching_AskCoachResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFCoaching_AskCoachResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFCoaching_AskCoachResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.accept_coaching_assignment = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.accept_coaching_assignment = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6120,11 +7900,11 @@ * @memberof CMsgTFCoaching_AskCoachResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFCoaching_AskCoachResponse} CMsgTFCoaching_AskCoachResponse + * @returns {CMsgTFCoaching_AskCoachResponse & CMsgTFCoaching_AskCoachResponse.$Shape} CMsgTFCoaching_AskCoachResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_AskCoachResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgTFCoaching_AskCoachResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6138,10 +7918,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFCoaching_AskCoachResponse.verify = function verify(message) { + CMsgTFCoaching_AskCoachResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.accept_coaching_assignment != null && message.hasOwnProperty("accept_coaching_assignment")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.accept_coaching_assignment != null && $Object.hasOwnProperty.call(message, "accept_coaching_assignment")) if (typeof message.accept_coaching_assignment !== "boolean") return "accept_coaching_assignment: boolean expected"; return null; @@ -6155,12 +7939,18 @@ * @param {Object.} object Plain object * @returns {CMsgTFCoaching_AskCoachResponse} CMsgTFCoaching_AskCoachResponse */ - CMsgTFCoaching_AskCoachResponse.fromObject = function fromObject(object) { + CMsgTFCoaching_AskCoachResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFCoaching_AskCoachResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFCoaching_AskCoachResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFCoaching_AskCoachResponse(); if (object.accept_coaching_assignment != null) - message.accept_coaching_assignment = Boolean(object.accept_coaching_assignment); + message.accept_coaching_assignment = $Boolean(object.accept_coaching_assignment); return message; }; @@ -6173,13 +7963,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFCoaching_AskCoachResponse.toObject = function toObject(message, options) { + CMsgTFCoaching_AskCoachResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.accept_coaching_assignment = false; - if (message.accept_coaching_assignment != null && message.hasOwnProperty("accept_coaching_assignment")) + if (message.accept_coaching_assignment != null && $Object.hasOwnProperty.call(message, "accept_coaching_assignment")) object.accept_coaching_assignment = message.accept_coaching_assignment; return object; }; @@ -6191,8 +7985,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFCoaching_AskCoachResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFCoaching_AskCoachResponse.prototype.toJSON = function() { + return CMsgTFCoaching_AskCoachResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFCoaching_AskCoachResponse + * @function getTypeUrl + * @memberof CMsgTFCoaching_AskCoachResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFCoaching_AskCoachResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFCoaching_AskCoachResponse"; }; return CMsgTFCoaching_AskCoachResponse; @@ -6202,28 +8010,41 @@ /** * Properties of a CMsgTFCoaching_CoachJoinGame. - * @exports ICMsgTFCoaching_CoachJoinGame - * @interface ICMsgTFCoaching_CoachJoinGame + * @typedef {Object} CMsgTFCoaching_CoachJoinGame.$Properties * @property {boolean|null} [join_game] CMsgTFCoaching_CoachJoinGame join_game * @property {number|null} [server_address] CMsgTFCoaching_CoachJoinGame server_address * @property {number|null} [server_port] CMsgTFCoaching_CoachJoinGame server_port * @property {number|null} [account_id_student] CMsgTFCoaching_CoachJoinGame account_id_student + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTFCoaching_CoachJoinGame. + * @exports ICMsgTFCoaching_CoachJoinGame + * @interface ICMsgTFCoaching_CoachJoinGame + * @augments CMsgTFCoaching_CoachJoinGame.$Properties + * @deprecated Use CMsgTFCoaching_CoachJoinGame.$Properties instead. + */ + + /** + * Shape of a CMsgTFCoaching_CoachJoinGame. + * @typedef {CMsgTFCoaching_CoachJoinGame.$Properties} CMsgTFCoaching_CoachJoinGame.$Shape */ /** * Constructs a new CMsgTFCoaching_CoachJoinGame. * @exports CMsgTFCoaching_CoachJoinGame * @classdesc Represents a CMsgTFCoaching_CoachJoinGame. - * @implements ICMsgTFCoaching_CoachJoinGame * @constructor - * @param {ICMsgTFCoaching_CoachJoinGame=} [properties] Properties to set + * @param {CMsgTFCoaching_CoachJoinGame.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFCoaching_CoachJoinGame(properties) { + var CMsgTFCoaching_CoachJoinGame = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFCoaching_CoachJoinGame join_game. @@ -6262,10 +8083,14 @@ * @function create * @memberof CMsgTFCoaching_CoachJoinGame * @static - * @param {ICMsgTFCoaching_CoachJoinGame=} [properties] Properties to set + * @param {CMsgTFCoaching_CoachJoinGame.$Properties=} [properties] Properties to set * @returns {CMsgTFCoaching_CoachJoinGame} CMsgTFCoaching_CoachJoinGame instance + * @type {{ + * (properties: CMsgTFCoaching_CoachJoinGame.$Shape): CMsgTFCoaching_CoachJoinGame & CMsgTFCoaching_CoachJoinGame.$Shape; + * (properties?: CMsgTFCoaching_CoachJoinGame.$Properties): CMsgTFCoaching_CoachJoinGame; + * }} */ - CMsgTFCoaching_CoachJoinGame.create = function create(properties) { + CMsgTFCoaching_CoachJoinGame.create = function(properties) { return new CMsgTFCoaching_CoachJoinGame(properties); }; @@ -6274,21 +8099,28 @@ * @function encode * @memberof CMsgTFCoaching_CoachJoinGame * @static - * @param {ICMsgTFCoaching_CoachJoinGame} message CMsgTFCoaching_CoachJoinGame message or plain object to encode + * @param {CMsgTFCoaching_CoachJoinGame.$Properties} message CMsgTFCoaching_CoachJoinGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_CoachJoinGame.encode = function encode(message, writer) { + CMsgTFCoaching_CoachJoinGame.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.join_game != null && Object.hasOwnProperty.call(message, "join_game")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.join_game != null && $Object.hasOwnProperty.call(message, "join_game")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.join_game); - if (message.server_address != null && Object.hasOwnProperty.call(message, "server_address")) + if (message.server_address != null && $Object.hasOwnProperty.call(message, "server_address")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.server_address); - if (message.server_port != null && Object.hasOwnProperty.call(message, "server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.server_port); - if (message.account_id_student != null && Object.hasOwnProperty.call(message, "account_id_student")) + if (message.account_id_student != null && $Object.hasOwnProperty.call(message, "account_id_student")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.account_id_student); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6297,12 +8129,12 @@ * @function encodeDelimited * @memberof CMsgTFCoaching_CoachJoinGame * @static - * @param {ICMsgTFCoaching_CoachJoinGame} message CMsgTFCoaching_CoachJoinGame message or plain object to encode + * @param {CMsgTFCoaching_CoachJoinGame.$Properties} message CMsgTFCoaching_CoachJoinGame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_CoachJoinGame.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFCoaching_CoachJoinGame.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6312,34 +8144,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFCoaching_CoachJoinGame} CMsgTFCoaching_CoachJoinGame + * @returns {CMsgTFCoaching_CoachJoinGame & CMsgTFCoaching_CoachJoinGame.$Shape} CMsgTFCoaching_CoachJoinGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_CoachJoinGame.decode = function decode(reader, length) { + CMsgTFCoaching_CoachJoinGame.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFCoaching_CoachJoinGame(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFCoaching_CoachJoinGame(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.join_game = reader.bool(); - break; - case 2: - message.server_address = reader.uint32(); - break; - case 3: - message.server_port = reader.uint32(); - break; - case 4: - message.account_id_student = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.join_game = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.server_address = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.server_port = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.account_id_student = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6349,11 +8207,11 @@ * @memberof CMsgTFCoaching_CoachJoinGame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFCoaching_CoachJoinGame} CMsgTFCoaching_CoachJoinGame + * @returns {CMsgTFCoaching_CoachJoinGame & CMsgTFCoaching_CoachJoinGame.$Shape} CMsgTFCoaching_CoachJoinGame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_CoachJoinGame.decodeDelimited = function decodeDelimited(reader) { + CMsgTFCoaching_CoachJoinGame.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6367,19 +8225,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFCoaching_CoachJoinGame.verify = function verify(message) { + CMsgTFCoaching_CoachJoinGame.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.join_game != null && message.hasOwnProperty("join_game")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.join_game != null && $Object.hasOwnProperty.call(message, "join_game")) if (typeof message.join_game !== "boolean") return "join_game: boolean expected"; - if (message.server_address != null && message.hasOwnProperty("server_address")) + if (message.server_address != null && $Object.hasOwnProperty.call(message, "server_address")) if (!$util.isInteger(message.server_address)) return "server_address: integer expected"; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) if (!$util.isInteger(message.server_port)) return "server_port: integer expected"; - if (message.account_id_student != null && message.hasOwnProperty("account_id_student")) + if (message.account_id_student != null && $Object.hasOwnProperty.call(message, "account_id_student")) if (!$util.isInteger(message.account_id_student)) return "account_id_student: integer expected"; return null; @@ -6393,12 +8255,18 @@ * @param {Object.} object Plain object * @returns {CMsgTFCoaching_CoachJoinGame} CMsgTFCoaching_CoachJoinGame */ - CMsgTFCoaching_CoachJoinGame.fromObject = function fromObject(object) { + CMsgTFCoaching_CoachJoinGame.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFCoaching_CoachJoinGame) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFCoaching_CoachJoinGame: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFCoaching_CoachJoinGame(); if (object.join_game != null) - message.join_game = Boolean(object.join_game); + message.join_game = $Boolean(object.join_game); if (object.server_address != null) message.server_address = object.server_address >>> 0; if (object.server_port != null) @@ -6417,9 +8285,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFCoaching_CoachJoinGame.toObject = function toObject(message, options) { + CMsgTFCoaching_CoachJoinGame.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.join_game = false; @@ -6427,13 +8299,13 @@ object.server_port = 0; object.account_id_student = 0; } - if (message.join_game != null && message.hasOwnProperty("join_game")) + if (message.join_game != null && $Object.hasOwnProperty.call(message, "join_game")) object.join_game = message.join_game; - if (message.server_address != null && message.hasOwnProperty("server_address")) + if (message.server_address != null && $Object.hasOwnProperty.call(message, "server_address")) object.server_address = message.server_address; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) object.server_port = message.server_port; - if (message.account_id_student != null && message.hasOwnProperty("account_id_student")) + if (message.account_id_student != null && $Object.hasOwnProperty.call(message, "account_id_student")) object.account_id_student = message.account_id_student; return object; }; @@ -6445,8 +8317,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFCoaching_CoachJoinGame.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFCoaching_CoachJoinGame.prototype.toJSON = function() { + return CMsgTFCoaching_CoachJoinGame.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFCoaching_CoachJoinGame + * @function getTypeUrl + * @memberof CMsgTFCoaching_CoachJoinGame + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFCoaching_CoachJoinGame.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFCoaching_CoachJoinGame"; }; return CMsgTFCoaching_CoachJoinGame; @@ -6456,26 +8342,39 @@ /** * Properties of a CMsgTFCoaching_CoachJoining. - * @exports ICMsgTFCoaching_CoachJoining - * @interface ICMsgTFCoaching_CoachJoining + * @typedef {Object} CMsgTFCoaching_CoachJoining.$Properties * @property {number|null} [account_id_coach] CMsgTFCoaching_CoachJoining account_id_coach * @property {number|null} [account_id_student] CMsgTFCoaching_CoachJoining account_id_student + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTFCoaching_CoachJoining. + * @exports ICMsgTFCoaching_CoachJoining + * @interface ICMsgTFCoaching_CoachJoining + * @augments CMsgTFCoaching_CoachJoining.$Properties + * @deprecated Use CMsgTFCoaching_CoachJoining.$Properties instead. + */ + + /** + * Shape of a CMsgTFCoaching_CoachJoining. + * @typedef {CMsgTFCoaching_CoachJoining.$Properties} CMsgTFCoaching_CoachJoining.$Shape */ /** * Constructs a new CMsgTFCoaching_CoachJoining. * @exports CMsgTFCoaching_CoachJoining * @classdesc Represents a CMsgTFCoaching_CoachJoining. - * @implements ICMsgTFCoaching_CoachJoining * @constructor - * @param {ICMsgTFCoaching_CoachJoining=} [properties] Properties to set + * @param {CMsgTFCoaching_CoachJoining.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFCoaching_CoachJoining(properties) { + var CMsgTFCoaching_CoachJoining = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFCoaching_CoachJoining account_id_coach. @@ -6498,10 +8397,14 @@ * @function create * @memberof CMsgTFCoaching_CoachJoining * @static - * @param {ICMsgTFCoaching_CoachJoining=} [properties] Properties to set + * @param {CMsgTFCoaching_CoachJoining.$Properties=} [properties] Properties to set * @returns {CMsgTFCoaching_CoachJoining} CMsgTFCoaching_CoachJoining instance + * @type {{ + * (properties: CMsgTFCoaching_CoachJoining.$Shape): CMsgTFCoaching_CoachJoining & CMsgTFCoaching_CoachJoining.$Shape; + * (properties?: CMsgTFCoaching_CoachJoining.$Properties): CMsgTFCoaching_CoachJoining; + * }} */ - CMsgTFCoaching_CoachJoining.create = function create(properties) { + CMsgTFCoaching_CoachJoining.create = function(properties) { return new CMsgTFCoaching_CoachJoining(properties); }; @@ -6510,17 +8413,24 @@ * @function encode * @memberof CMsgTFCoaching_CoachJoining * @static - * @param {ICMsgTFCoaching_CoachJoining} message CMsgTFCoaching_CoachJoining message or plain object to encode + * @param {CMsgTFCoaching_CoachJoining.$Properties} message CMsgTFCoaching_CoachJoining message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_CoachJoining.encode = function encode(message, writer) { + CMsgTFCoaching_CoachJoining.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id_coach != null && Object.hasOwnProperty.call(message, "account_id_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id_coach != null && $Object.hasOwnProperty.call(message, "account_id_coach")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id_coach); - if (message.account_id_student != null && Object.hasOwnProperty.call(message, "account_id_student")) + if (message.account_id_student != null && $Object.hasOwnProperty.call(message, "account_id_student")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_id_student); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6529,12 +8439,12 @@ * @function encodeDelimited * @memberof CMsgTFCoaching_CoachJoining * @static - * @param {ICMsgTFCoaching_CoachJoining} message CMsgTFCoaching_CoachJoining message or plain object to encode + * @param {CMsgTFCoaching_CoachJoining.$Properties} message CMsgTFCoaching_CoachJoining message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_CoachJoining.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFCoaching_CoachJoining.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6544,28 +8454,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFCoaching_CoachJoining} CMsgTFCoaching_CoachJoining + * @returns {CMsgTFCoaching_CoachJoining & CMsgTFCoaching_CoachJoining.$Shape} CMsgTFCoaching_CoachJoining * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_CoachJoining.decode = function decode(reader, length) { + CMsgTFCoaching_CoachJoining.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFCoaching_CoachJoining(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFCoaching_CoachJoining(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id_coach = reader.uint32(); - break; - case 2: - message.account_id_student = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id_coach = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.account_id_student = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6575,11 +8505,11 @@ * @memberof CMsgTFCoaching_CoachJoining * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFCoaching_CoachJoining} CMsgTFCoaching_CoachJoining + * @returns {CMsgTFCoaching_CoachJoining & CMsgTFCoaching_CoachJoining.$Shape} CMsgTFCoaching_CoachJoining * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_CoachJoining.decodeDelimited = function decodeDelimited(reader) { + CMsgTFCoaching_CoachJoining.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6593,13 +8523,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFCoaching_CoachJoining.verify = function verify(message) { + CMsgTFCoaching_CoachJoining.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id_coach != null && message.hasOwnProperty("account_id_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id_coach != null && $Object.hasOwnProperty.call(message, "account_id_coach")) if (!$util.isInteger(message.account_id_coach)) return "account_id_coach: integer expected"; - if (message.account_id_student != null && message.hasOwnProperty("account_id_student")) + if (message.account_id_student != null && $Object.hasOwnProperty.call(message, "account_id_student")) if (!$util.isInteger(message.account_id_student)) return "account_id_student: integer expected"; return null; @@ -6613,9 +8547,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFCoaching_CoachJoining} CMsgTFCoaching_CoachJoining */ - CMsgTFCoaching_CoachJoining.fromObject = function fromObject(object) { + CMsgTFCoaching_CoachJoining.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFCoaching_CoachJoining) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFCoaching_CoachJoining: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFCoaching_CoachJoining(); if (object.account_id_coach != null) message.account_id_coach = object.account_id_coach >>> 0; @@ -6633,17 +8573,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFCoaching_CoachJoining.toObject = function toObject(message, options) { + CMsgTFCoaching_CoachJoining.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id_coach = 0; object.account_id_student = 0; } - if (message.account_id_coach != null && message.hasOwnProperty("account_id_coach")) + if (message.account_id_coach != null && $Object.hasOwnProperty.call(message, "account_id_coach")) object.account_id_coach = message.account_id_coach; - if (message.account_id_student != null && message.hasOwnProperty("account_id_student")) + if (message.account_id_student != null && $Object.hasOwnProperty.call(message, "account_id_student")) object.account_id_student = message.account_id_student; return object; }; @@ -6655,8 +8599,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFCoaching_CoachJoining.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFCoaching_CoachJoining.prototype.toJSON = function() { + return CMsgTFCoaching_CoachJoining.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFCoaching_CoachJoining + * @function getTypeUrl + * @memberof CMsgTFCoaching_CoachJoining + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFCoaching_CoachJoining.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFCoaching_CoachJoining"; }; return CMsgTFCoaching_CoachJoining; @@ -6664,27 +8622,40 @@ $root.CMsgTFCoaching_CoachJoined = (function() { + /** + * Properties of a CMsgTFCoaching_CoachJoined. + * @typedef {Object} CMsgTFCoaching_CoachJoined.$Properties + * @property {number|null} [account_id_coach] CMsgTFCoaching_CoachJoined account_id_coach + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFCoaching_CoachJoined. * @exports ICMsgTFCoaching_CoachJoined * @interface ICMsgTFCoaching_CoachJoined - * @property {number|null} [account_id_coach] CMsgTFCoaching_CoachJoined account_id_coach + * @augments CMsgTFCoaching_CoachJoined.$Properties + * @deprecated Use CMsgTFCoaching_CoachJoined.$Properties instead. + */ + + /** + * Shape of a CMsgTFCoaching_CoachJoined. + * @typedef {CMsgTFCoaching_CoachJoined.$Properties} CMsgTFCoaching_CoachJoined.$Shape */ /** * Constructs a new CMsgTFCoaching_CoachJoined. * @exports CMsgTFCoaching_CoachJoined * @classdesc Represents a CMsgTFCoaching_CoachJoined. - * @implements ICMsgTFCoaching_CoachJoined * @constructor - * @param {ICMsgTFCoaching_CoachJoined=} [properties] Properties to set + * @param {CMsgTFCoaching_CoachJoined.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFCoaching_CoachJoined(properties) { + var CMsgTFCoaching_CoachJoined = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFCoaching_CoachJoined account_id_coach. @@ -6699,10 +8670,14 @@ * @function create * @memberof CMsgTFCoaching_CoachJoined * @static - * @param {ICMsgTFCoaching_CoachJoined=} [properties] Properties to set + * @param {CMsgTFCoaching_CoachJoined.$Properties=} [properties] Properties to set * @returns {CMsgTFCoaching_CoachJoined} CMsgTFCoaching_CoachJoined instance + * @type {{ + * (properties: CMsgTFCoaching_CoachJoined.$Shape): CMsgTFCoaching_CoachJoined & CMsgTFCoaching_CoachJoined.$Shape; + * (properties?: CMsgTFCoaching_CoachJoined.$Properties): CMsgTFCoaching_CoachJoined; + * }} */ - CMsgTFCoaching_CoachJoined.create = function create(properties) { + CMsgTFCoaching_CoachJoined.create = function(properties) { return new CMsgTFCoaching_CoachJoined(properties); }; @@ -6711,15 +8686,22 @@ * @function encode * @memberof CMsgTFCoaching_CoachJoined * @static - * @param {ICMsgTFCoaching_CoachJoined} message CMsgTFCoaching_CoachJoined message or plain object to encode + * @param {CMsgTFCoaching_CoachJoined.$Properties} message CMsgTFCoaching_CoachJoined message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_CoachJoined.encode = function encode(message, writer) { + CMsgTFCoaching_CoachJoined.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id_coach != null && Object.hasOwnProperty.call(message, "account_id_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id_coach != null && $Object.hasOwnProperty.call(message, "account_id_coach")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id_coach); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6728,12 +8710,12 @@ * @function encodeDelimited * @memberof CMsgTFCoaching_CoachJoined * @static - * @param {ICMsgTFCoaching_CoachJoined} message CMsgTFCoaching_CoachJoined message or plain object to encode + * @param {CMsgTFCoaching_CoachJoined.$Properties} message CMsgTFCoaching_CoachJoined message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_CoachJoined.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFCoaching_CoachJoined.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6743,25 +8725,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFCoaching_CoachJoined} CMsgTFCoaching_CoachJoined + * @returns {CMsgTFCoaching_CoachJoined & CMsgTFCoaching_CoachJoined.$Shape} CMsgTFCoaching_CoachJoined * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_CoachJoined.decode = function decode(reader, length) { + CMsgTFCoaching_CoachJoined.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFCoaching_CoachJoined(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFCoaching_CoachJoined(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id_coach = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id_coach = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6771,11 +8770,11 @@ * @memberof CMsgTFCoaching_CoachJoined * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFCoaching_CoachJoined} CMsgTFCoaching_CoachJoined + * @returns {CMsgTFCoaching_CoachJoined & CMsgTFCoaching_CoachJoined.$Shape} CMsgTFCoaching_CoachJoined * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_CoachJoined.decodeDelimited = function decodeDelimited(reader) { + CMsgTFCoaching_CoachJoined.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6789,10 +8788,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFCoaching_CoachJoined.verify = function verify(message) { + CMsgTFCoaching_CoachJoined.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id_coach != null && message.hasOwnProperty("account_id_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id_coach != null && $Object.hasOwnProperty.call(message, "account_id_coach")) if (!$util.isInteger(message.account_id_coach)) return "account_id_coach: integer expected"; return null; @@ -6806,9 +8809,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFCoaching_CoachJoined} CMsgTFCoaching_CoachJoined */ - CMsgTFCoaching_CoachJoined.fromObject = function fromObject(object) { + CMsgTFCoaching_CoachJoined.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFCoaching_CoachJoined) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFCoaching_CoachJoined: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFCoaching_CoachJoined(); if (object.account_id_coach != null) message.account_id_coach = object.account_id_coach >>> 0; @@ -6824,13 +8833,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFCoaching_CoachJoined.toObject = function toObject(message, options) { + CMsgTFCoaching_CoachJoined.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.account_id_coach = 0; - if (message.account_id_coach != null && message.hasOwnProperty("account_id_coach")) + if (message.account_id_coach != null && $Object.hasOwnProperty.call(message, "account_id_coach")) object.account_id_coach = message.account_id_coach; return object; }; @@ -6842,8 +8855,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFCoaching_CoachJoined.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFCoaching_CoachJoined.prototype.toJSON = function() { + return CMsgTFCoaching_CoachJoined.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFCoaching_CoachJoined + * @function getTypeUrl + * @memberof CMsgTFCoaching_CoachJoined + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFCoaching_CoachJoined.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFCoaching_CoachJoined"; }; return CMsgTFCoaching_CoachJoined; @@ -6851,27 +8878,40 @@ $root.CMsgTFCoaching_LikeCurrentCoach = (function() { + /** + * Properties of a CMsgTFCoaching_LikeCurrentCoach. + * @typedef {Object} CMsgTFCoaching_LikeCurrentCoach.$Properties + * @property {boolean|null} [like_coach] CMsgTFCoaching_LikeCurrentCoach like_coach + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFCoaching_LikeCurrentCoach. * @exports ICMsgTFCoaching_LikeCurrentCoach * @interface ICMsgTFCoaching_LikeCurrentCoach - * @property {boolean|null} [like_coach] CMsgTFCoaching_LikeCurrentCoach like_coach + * @augments CMsgTFCoaching_LikeCurrentCoach.$Properties + * @deprecated Use CMsgTFCoaching_LikeCurrentCoach.$Properties instead. + */ + + /** + * Shape of a CMsgTFCoaching_LikeCurrentCoach. + * @typedef {CMsgTFCoaching_LikeCurrentCoach.$Properties} CMsgTFCoaching_LikeCurrentCoach.$Shape */ /** * Constructs a new CMsgTFCoaching_LikeCurrentCoach. * @exports CMsgTFCoaching_LikeCurrentCoach * @classdesc Represents a CMsgTFCoaching_LikeCurrentCoach. - * @implements ICMsgTFCoaching_LikeCurrentCoach * @constructor - * @param {ICMsgTFCoaching_LikeCurrentCoach=} [properties] Properties to set + * @param {CMsgTFCoaching_LikeCurrentCoach.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFCoaching_LikeCurrentCoach(properties) { + var CMsgTFCoaching_LikeCurrentCoach = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFCoaching_LikeCurrentCoach like_coach. @@ -6886,10 +8926,14 @@ * @function create * @memberof CMsgTFCoaching_LikeCurrentCoach * @static - * @param {ICMsgTFCoaching_LikeCurrentCoach=} [properties] Properties to set + * @param {CMsgTFCoaching_LikeCurrentCoach.$Properties=} [properties] Properties to set * @returns {CMsgTFCoaching_LikeCurrentCoach} CMsgTFCoaching_LikeCurrentCoach instance + * @type {{ + * (properties: CMsgTFCoaching_LikeCurrentCoach.$Shape): CMsgTFCoaching_LikeCurrentCoach & CMsgTFCoaching_LikeCurrentCoach.$Shape; + * (properties?: CMsgTFCoaching_LikeCurrentCoach.$Properties): CMsgTFCoaching_LikeCurrentCoach; + * }} */ - CMsgTFCoaching_LikeCurrentCoach.create = function create(properties) { + CMsgTFCoaching_LikeCurrentCoach.create = function(properties) { return new CMsgTFCoaching_LikeCurrentCoach(properties); }; @@ -6898,15 +8942,22 @@ * @function encode * @memberof CMsgTFCoaching_LikeCurrentCoach * @static - * @param {ICMsgTFCoaching_LikeCurrentCoach} message CMsgTFCoaching_LikeCurrentCoach message or plain object to encode + * @param {CMsgTFCoaching_LikeCurrentCoach.$Properties} message CMsgTFCoaching_LikeCurrentCoach message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_LikeCurrentCoach.encode = function encode(message, writer) { + CMsgTFCoaching_LikeCurrentCoach.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.like_coach != null && Object.hasOwnProperty.call(message, "like_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.like_coach != null && $Object.hasOwnProperty.call(message, "like_coach")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.like_coach); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6915,12 +8966,12 @@ * @function encodeDelimited * @memberof CMsgTFCoaching_LikeCurrentCoach * @static - * @param {ICMsgTFCoaching_LikeCurrentCoach} message CMsgTFCoaching_LikeCurrentCoach message or plain object to encode + * @param {CMsgTFCoaching_LikeCurrentCoach.$Properties} message CMsgTFCoaching_LikeCurrentCoach message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_LikeCurrentCoach.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFCoaching_LikeCurrentCoach.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6930,25 +8981,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFCoaching_LikeCurrentCoach} CMsgTFCoaching_LikeCurrentCoach + * @returns {CMsgTFCoaching_LikeCurrentCoach & CMsgTFCoaching_LikeCurrentCoach.$Shape} CMsgTFCoaching_LikeCurrentCoach * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_LikeCurrentCoach.decode = function decode(reader, length) { + CMsgTFCoaching_LikeCurrentCoach.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFCoaching_LikeCurrentCoach(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFCoaching_LikeCurrentCoach(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.like_coach = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.like_coach = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6958,11 +9026,11 @@ * @memberof CMsgTFCoaching_LikeCurrentCoach * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFCoaching_LikeCurrentCoach} CMsgTFCoaching_LikeCurrentCoach + * @returns {CMsgTFCoaching_LikeCurrentCoach & CMsgTFCoaching_LikeCurrentCoach.$Shape} CMsgTFCoaching_LikeCurrentCoach * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_LikeCurrentCoach.decodeDelimited = function decodeDelimited(reader) { + CMsgTFCoaching_LikeCurrentCoach.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6976,10 +9044,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFCoaching_LikeCurrentCoach.verify = function verify(message) { + CMsgTFCoaching_LikeCurrentCoach.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.like_coach != null && message.hasOwnProperty("like_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.like_coach != null && $Object.hasOwnProperty.call(message, "like_coach")) if (typeof message.like_coach !== "boolean") return "like_coach: boolean expected"; return null; @@ -6993,12 +9065,18 @@ * @param {Object.} object Plain object * @returns {CMsgTFCoaching_LikeCurrentCoach} CMsgTFCoaching_LikeCurrentCoach */ - CMsgTFCoaching_LikeCurrentCoach.fromObject = function fromObject(object) { + CMsgTFCoaching_LikeCurrentCoach.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFCoaching_LikeCurrentCoach) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFCoaching_LikeCurrentCoach: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFCoaching_LikeCurrentCoach(); if (object.like_coach != null) - message.like_coach = Boolean(object.like_coach); + message.like_coach = $Boolean(object.like_coach); return message; }; @@ -7011,13 +9089,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFCoaching_LikeCurrentCoach.toObject = function toObject(message, options) { + CMsgTFCoaching_LikeCurrentCoach.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.like_coach = false; - if (message.like_coach != null && message.hasOwnProperty("like_coach")) + if (message.like_coach != null && $Object.hasOwnProperty.call(message, "like_coach")) object.like_coach = message.like_coach; return object; }; @@ -7029,8 +9111,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFCoaching_LikeCurrentCoach.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFCoaching_LikeCurrentCoach.prototype.toJSON = function() { + return CMsgTFCoaching_LikeCurrentCoach.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFCoaching_LikeCurrentCoach + * @function getTypeUrl + * @memberof CMsgTFCoaching_LikeCurrentCoach + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFCoaching_LikeCurrentCoach.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFCoaching_LikeCurrentCoach"; }; return CMsgTFCoaching_LikeCurrentCoach; @@ -7038,27 +9134,40 @@ $root.CMsgTFCoaching_RemoveCurrentCoach = (function() { + /** + * Properties of a CMsgTFCoaching_RemoveCurrentCoach. + * @typedef {Object} CMsgTFCoaching_RemoveCurrentCoach.$Properties + * @property {number|null} [account_id_coach] CMsgTFCoaching_RemoveCurrentCoach account_id_coach + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFCoaching_RemoveCurrentCoach. * @exports ICMsgTFCoaching_RemoveCurrentCoach * @interface ICMsgTFCoaching_RemoveCurrentCoach - * @property {number|null} [account_id_coach] CMsgTFCoaching_RemoveCurrentCoach account_id_coach + * @augments CMsgTFCoaching_RemoveCurrentCoach.$Properties + * @deprecated Use CMsgTFCoaching_RemoveCurrentCoach.$Properties instead. + */ + + /** + * Shape of a CMsgTFCoaching_RemoveCurrentCoach. + * @typedef {CMsgTFCoaching_RemoveCurrentCoach.$Properties} CMsgTFCoaching_RemoveCurrentCoach.$Shape */ /** * Constructs a new CMsgTFCoaching_RemoveCurrentCoach. * @exports CMsgTFCoaching_RemoveCurrentCoach * @classdesc Represents a CMsgTFCoaching_RemoveCurrentCoach. - * @implements ICMsgTFCoaching_RemoveCurrentCoach * @constructor - * @param {ICMsgTFCoaching_RemoveCurrentCoach=} [properties] Properties to set + * @param {CMsgTFCoaching_RemoveCurrentCoach.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFCoaching_RemoveCurrentCoach(properties) { + var CMsgTFCoaching_RemoveCurrentCoach = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFCoaching_RemoveCurrentCoach account_id_coach. @@ -7073,10 +9182,14 @@ * @function create * @memberof CMsgTFCoaching_RemoveCurrentCoach * @static - * @param {ICMsgTFCoaching_RemoveCurrentCoach=} [properties] Properties to set + * @param {CMsgTFCoaching_RemoveCurrentCoach.$Properties=} [properties] Properties to set * @returns {CMsgTFCoaching_RemoveCurrentCoach} CMsgTFCoaching_RemoveCurrentCoach instance + * @type {{ + * (properties: CMsgTFCoaching_RemoveCurrentCoach.$Shape): CMsgTFCoaching_RemoveCurrentCoach & CMsgTFCoaching_RemoveCurrentCoach.$Shape; + * (properties?: CMsgTFCoaching_RemoveCurrentCoach.$Properties): CMsgTFCoaching_RemoveCurrentCoach; + * }} */ - CMsgTFCoaching_RemoveCurrentCoach.create = function create(properties) { + CMsgTFCoaching_RemoveCurrentCoach.create = function(properties) { return new CMsgTFCoaching_RemoveCurrentCoach(properties); }; @@ -7085,15 +9198,22 @@ * @function encode * @memberof CMsgTFCoaching_RemoveCurrentCoach * @static - * @param {ICMsgTFCoaching_RemoveCurrentCoach} message CMsgTFCoaching_RemoveCurrentCoach message or plain object to encode + * @param {CMsgTFCoaching_RemoveCurrentCoach.$Properties} message CMsgTFCoaching_RemoveCurrentCoach message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_RemoveCurrentCoach.encode = function encode(message, writer) { + CMsgTFCoaching_RemoveCurrentCoach.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id_coach != null && Object.hasOwnProperty.call(message, "account_id_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id_coach != null && $Object.hasOwnProperty.call(message, "account_id_coach")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id_coach); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7102,12 +9222,12 @@ * @function encodeDelimited * @memberof CMsgTFCoaching_RemoveCurrentCoach * @static - * @param {ICMsgTFCoaching_RemoveCurrentCoach} message CMsgTFCoaching_RemoveCurrentCoach message or plain object to encode + * @param {CMsgTFCoaching_RemoveCurrentCoach.$Properties} message CMsgTFCoaching_RemoveCurrentCoach message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFCoaching_RemoveCurrentCoach.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFCoaching_RemoveCurrentCoach.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7117,25 +9237,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFCoaching_RemoveCurrentCoach} CMsgTFCoaching_RemoveCurrentCoach + * @returns {CMsgTFCoaching_RemoveCurrentCoach & CMsgTFCoaching_RemoveCurrentCoach.$Shape} CMsgTFCoaching_RemoveCurrentCoach * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_RemoveCurrentCoach.decode = function decode(reader, length) { + CMsgTFCoaching_RemoveCurrentCoach.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFCoaching_RemoveCurrentCoach(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFCoaching_RemoveCurrentCoach(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id_coach = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id_coach = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7145,11 +9282,11 @@ * @memberof CMsgTFCoaching_RemoveCurrentCoach * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFCoaching_RemoveCurrentCoach} CMsgTFCoaching_RemoveCurrentCoach + * @returns {CMsgTFCoaching_RemoveCurrentCoach & CMsgTFCoaching_RemoveCurrentCoach.$Shape} CMsgTFCoaching_RemoveCurrentCoach * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFCoaching_RemoveCurrentCoach.decodeDelimited = function decodeDelimited(reader) { + CMsgTFCoaching_RemoveCurrentCoach.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7163,10 +9300,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFCoaching_RemoveCurrentCoach.verify = function verify(message) { + CMsgTFCoaching_RemoveCurrentCoach.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id_coach != null && message.hasOwnProperty("account_id_coach")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id_coach != null && $Object.hasOwnProperty.call(message, "account_id_coach")) if (!$util.isInteger(message.account_id_coach)) return "account_id_coach: integer expected"; return null; @@ -7180,9 +9321,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFCoaching_RemoveCurrentCoach} CMsgTFCoaching_RemoveCurrentCoach */ - CMsgTFCoaching_RemoveCurrentCoach.fromObject = function fromObject(object) { + CMsgTFCoaching_RemoveCurrentCoach.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFCoaching_RemoveCurrentCoach) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFCoaching_RemoveCurrentCoach: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFCoaching_RemoveCurrentCoach(); if (object.account_id_coach != null) message.account_id_coach = object.account_id_coach >>> 0; @@ -7198,13 +9345,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFCoaching_RemoveCurrentCoach.toObject = function toObject(message, options) { + CMsgTFCoaching_RemoveCurrentCoach.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.account_id_coach = 0; - if (message.account_id_coach != null && message.hasOwnProperty("account_id_coach")) + if (message.account_id_coach != null && $Object.hasOwnProperty.call(message, "account_id_coach")) object.account_id_coach = message.account_id_coach; return object; }; @@ -7216,8 +9367,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFCoaching_RemoveCurrentCoach.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFCoaching_RemoveCurrentCoach.prototype.toJSON = function() { + return CMsgTFCoaching_RemoveCurrentCoach.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFCoaching_RemoveCurrentCoach + * @function getTypeUrl + * @memberof CMsgTFCoaching_RemoveCurrentCoach + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFCoaching_RemoveCurrentCoach.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFCoaching_RemoveCurrentCoach"; }; return CMsgTFCoaching_RemoveCurrentCoach; @@ -7225,32 +9390,45 @@ $root.CMsgTFQuickplay_ScoreServers = (function() { + /** + * Properties of a CMsgTFQuickplay_ScoreServers. + * @typedef {Object} CMsgTFQuickplay_ScoreServers.$Properties + * @property {Array.|null} [servers] CMsgTFQuickplay_ScoreServers servers + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFQuickplay_ScoreServers. * @exports ICMsgTFQuickplay_ScoreServers * @interface ICMsgTFQuickplay_ScoreServers - * @property {Array.|null} [servers] CMsgTFQuickplay_ScoreServers servers + * @augments CMsgTFQuickplay_ScoreServers.$Properties + * @deprecated Use CMsgTFQuickplay_ScoreServers.$Properties instead. + */ + + /** + * Shape of a CMsgTFQuickplay_ScoreServers. + * @typedef {CMsgTFQuickplay_ScoreServers.$Properties} CMsgTFQuickplay_ScoreServers.$Shape */ /** * Constructs a new CMsgTFQuickplay_ScoreServers. * @exports CMsgTFQuickplay_ScoreServers * @classdesc Represents a CMsgTFQuickplay_ScoreServers. - * @implements ICMsgTFQuickplay_ScoreServers * @constructor - * @param {ICMsgTFQuickplay_ScoreServers=} [properties] Properties to set + * @param {CMsgTFQuickplay_ScoreServers.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFQuickplay_ScoreServers(properties) { + var CMsgTFQuickplay_ScoreServers = function (properties) { this.servers = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFQuickplay_ScoreServers servers. - * @member {Array.} servers + * @member {Array.} servers * @memberof CMsgTFQuickplay_ScoreServers * @instance */ @@ -7261,10 +9439,14 @@ * @function create * @memberof CMsgTFQuickplay_ScoreServers * @static - * @param {ICMsgTFQuickplay_ScoreServers=} [properties] Properties to set + * @param {CMsgTFQuickplay_ScoreServers.$Properties=} [properties] Properties to set * @returns {CMsgTFQuickplay_ScoreServers} CMsgTFQuickplay_ScoreServers instance + * @type {{ + * (properties: CMsgTFQuickplay_ScoreServers.$Shape): CMsgTFQuickplay_ScoreServers & CMsgTFQuickplay_ScoreServers.$Shape; + * (properties?: CMsgTFQuickplay_ScoreServers.$Properties): CMsgTFQuickplay_ScoreServers; + * }} */ - CMsgTFQuickplay_ScoreServers.create = function create(properties) { + CMsgTFQuickplay_ScoreServers.create = function(properties) { return new CMsgTFQuickplay_ScoreServers(properties); }; @@ -7273,16 +9455,23 @@ * @function encode * @memberof CMsgTFQuickplay_ScoreServers * @static - * @param {ICMsgTFQuickplay_ScoreServers} message CMsgTFQuickplay_ScoreServers message or plain object to encode + * @param {CMsgTFQuickplay_ScoreServers.$Properties} message CMsgTFQuickplay_ScoreServers message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFQuickplay_ScoreServers.encode = function encode(message, writer) { + CMsgTFQuickplay_ScoreServers.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.servers != null && message.servers.length) for (var i = 0; i < message.servers.length; ++i) - $root.CMsgTFQuickplay_ScoreServers.ServerInfo.encode(message.servers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgTFQuickplay_ScoreServers.ServerInfo.encode(message.servers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7291,12 +9480,12 @@ * @function encodeDelimited * @memberof CMsgTFQuickplay_ScoreServers * @static - * @param {ICMsgTFQuickplay_ScoreServers} message CMsgTFQuickplay_ScoreServers message or plain object to encode + * @param {CMsgTFQuickplay_ScoreServers.$Properties} message CMsgTFQuickplay_ScoreServers message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFQuickplay_ScoreServers.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFQuickplay_ScoreServers.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7306,27 +9495,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFQuickplay_ScoreServers} CMsgTFQuickplay_ScoreServers + * @returns {CMsgTFQuickplay_ScoreServers & CMsgTFQuickplay_ScoreServers.$Shape} CMsgTFQuickplay_ScoreServers * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFQuickplay_ScoreServers.decode = function decode(reader, length) { + CMsgTFQuickplay_ScoreServers.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFQuickplay_ScoreServers(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFQuickplay_ScoreServers(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.servers && message.servers.length)) - message.servers = []; - message.servers.push($root.CMsgTFQuickplay_ScoreServers.ServerInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.servers && message.servers.length)) + message.servers = []; + message.servers.push($root.CMsgTFQuickplay_ScoreServers.ServerInfo.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7336,11 +9542,11 @@ * @memberof CMsgTFQuickplay_ScoreServers * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFQuickplay_ScoreServers} CMsgTFQuickplay_ScoreServers + * @returns {CMsgTFQuickplay_ScoreServers & CMsgTFQuickplay_ScoreServers.$Shape} CMsgTFQuickplay_ScoreServers * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFQuickplay_ScoreServers.decodeDelimited = function decodeDelimited(reader) { + CMsgTFQuickplay_ScoreServers.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7354,14 +9560,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFQuickplay_ScoreServers.verify = function verify(message) { + CMsgTFQuickplay_ScoreServers.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.servers != null && message.hasOwnProperty("servers")) { - if (!Array.isArray(message.servers)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.servers != null && $Object.hasOwnProperty.call(message, "servers")) { + if (!$Array.isArray(message.servers)) return "servers: array expected"; for (var i = 0; i < message.servers.length; ++i) { - var error = $root.CMsgTFQuickplay_ScoreServers.ServerInfo.verify(message.servers[i]); + var error = $root.CMsgTFQuickplay_ScoreServers.ServerInfo.verify(message.servers[i], _depth + 1); if (error) return "servers." + error; } @@ -7377,18 +9587,24 @@ * @param {Object.} object Plain object * @returns {CMsgTFQuickplay_ScoreServers} CMsgTFQuickplay_ScoreServers */ - CMsgTFQuickplay_ScoreServers.fromObject = function fromObject(object) { + CMsgTFQuickplay_ScoreServers.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFQuickplay_ScoreServers) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFQuickplay_ScoreServers: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFQuickplay_ScoreServers(); if (object.servers) { - if (!Array.isArray(object.servers)) - throw TypeError(".CMsgTFQuickplay_ScoreServers.servers: array expected"); - message.servers = []; + if (!$Array.isArray(object.servers)) + throw $TypeError(".CMsgTFQuickplay_ScoreServers.servers: array expected"); + message.servers = $Array(object.servers.length); for (var i = 0; i < object.servers.length; ++i) { - if (typeof object.servers[i] !== "object") - throw TypeError(".CMsgTFQuickplay_ScoreServers.servers: object expected"); - message.servers[i] = $root.CMsgTFQuickplay_ScoreServers.ServerInfo.fromObject(object.servers[i]); + if (!$util.isObject(object.servers[i])) + throw $TypeError(".CMsgTFQuickplay_ScoreServers.servers: object expected"); + message.servers[i] = $root.CMsgTFQuickplay_ScoreServers.ServerInfo.fromObject(object.servers[i], _depth + 1); } } return message; @@ -7403,16 +9619,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFQuickplay_ScoreServers.toObject = function toObject(message, options) { + CMsgTFQuickplay_ScoreServers.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.servers = []; if (message.servers && message.servers.length) { - object.servers = []; + object.servers = $Array(message.servers.length); for (var j = 0; j < message.servers.length; ++j) - object.servers[j] = $root.CMsgTFQuickplay_ScoreServers.ServerInfo.toObject(message.servers[j], options); + object.servers[j] = $root.CMsgTFQuickplay_ScoreServers.ServerInfo.toObject(message.servers[j], options, _depth + 1); } return object; }; @@ -7424,38 +9644,65 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFQuickplay_ScoreServers.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFQuickplay_ScoreServers.prototype.toJSON = function() { + return CMsgTFQuickplay_ScoreServers.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFQuickplay_ScoreServers + * @function getTypeUrl + * @memberof CMsgTFQuickplay_ScoreServers + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFQuickplay_ScoreServers.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFQuickplay_ScoreServers"; }; CMsgTFQuickplay_ScoreServers.ServerInfo = (function() { /** * Properties of a ServerInfo. - * @memberof CMsgTFQuickplay_ScoreServers - * @interface IServerInfo + * @typedef {Object} CMsgTFQuickplay_ScoreServers.ServerInfo.$Properties * @property {number|null} [server_address] ServerInfo server_address * @property {number|null} [server_port] ServerInfo server_port * @property {number|null} [num_users] ServerInfo num_users * @property {number|Long|null} [steam_id] ServerInfo steam_id * @property {number|null} [max_users] ServerInfo max_users * @property {number|null} [user_score] ServerInfo user_score + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ServerInfo. + * @memberof CMsgTFQuickplay_ScoreServers + * @interface IServerInfo + * @augments CMsgTFQuickplay_ScoreServers.ServerInfo.$Properties + * @deprecated Use CMsgTFQuickplay_ScoreServers.ServerInfo.$Properties instead. + */ + + /** + * Shape of a ServerInfo. + * @typedef {CMsgTFQuickplay_ScoreServers.ServerInfo.$Properties} CMsgTFQuickplay_ScoreServers.ServerInfo.$Shape */ /** * Constructs a new ServerInfo. * @memberof CMsgTFQuickplay_ScoreServers * @classdesc Represents a ServerInfo. - * @implements IServerInfo * @constructor - * @param {CMsgTFQuickplay_ScoreServers.IServerInfo=} [properties] Properties to set + * @param {CMsgTFQuickplay_ScoreServers.ServerInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServerInfo(properties) { + var ServerInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServerInfo server_address. @@ -7510,10 +9757,14 @@ * @function create * @memberof CMsgTFQuickplay_ScoreServers.ServerInfo * @static - * @param {CMsgTFQuickplay_ScoreServers.IServerInfo=} [properties] Properties to set + * @param {CMsgTFQuickplay_ScoreServers.ServerInfo.$Properties=} [properties] Properties to set * @returns {CMsgTFQuickplay_ScoreServers.ServerInfo} ServerInfo instance + * @type {{ + * (properties: CMsgTFQuickplay_ScoreServers.ServerInfo.$Shape): CMsgTFQuickplay_ScoreServers.ServerInfo & CMsgTFQuickplay_ScoreServers.ServerInfo.$Shape; + * (properties?: CMsgTFQuickplay_ScoreServers.ServerInfo.$Properties): CMsgTFQuickplay_ScoreServers.ServerInfo; + * }} */ - ServerInfo.create = function create(properties) { + ServerInfo.create = function(properties) { return new ServerInfo(properties); }; @@ -7522,25 +9773,32 @@ * @function encode * @memberof CMsgTFQuickplay_ScoreServers.ServerInfo * @static - * @param {CMsgTFQuickplay_ScoreServers.IServerInfo} message ServerInfo message or plain object to encode + * @param {CMsgTFQuickplay_ScoreServers.ServerInfo.$Properties} message ServerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServerInfo.encode = function encode(message, writer) { + ServerInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.server_address != null && Object.hasOwnProperty.call(message, "server_address")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.server_address != null && $Object.hasOwnProperty.call(message, "server_address")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.server_address); - if (message.server_port != null && Object.hasOwnProperty.call(message, "server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.server_port); - if (message.num_users != null && Object.hasOwnProperty.call(message, "num_users")) + if (message.num_users != null && $Object.hasOwnProperty.call(message, "num_users")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.num_users); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.steam_id); - if (message.max_users != null && Object.hasOwnProperty.call(message, "max_users")) + if (message.max_users != null && $Object.hasOwnProperty.call(message, "max_users")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.max_users); - if (message.user_score != null && Object.hasOwnProperty.call(message, "user_score")) + if (message.user_score != null && $Object.hasOwnProperty.call(message, "user_score")) writer.uint32(/* id 6, wireType 5 =*/53).float(message.user_score); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7549,12 +9807,12 @@ * @function encodeDelimited * @memberof CMsgTFQuickplay_ScoreServers.ServerInfo * @static - * @param {CMsgTFQuickplay_ScoreServers.IServerInfo} message ServerInfo message or plain object to encode + * @param {CMsgTFQuickplay_ScoreServers.ServerInfo.$Properties} message ServerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServerInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServerInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7564,40 +9822,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFQuickplay_ScoreServers.ServerInfo} ServerInfo + * @returns {CMsgTFQuickplay_ScoreServers.ServerInfo & CMsgTFQuickplay_ScoreServers.ServerInfo.$Shape} ServerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServerInfo.decode = function decode(reader, length) { + ServerInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFQuickplay_ScoreServers.ServerInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFQuickplay_ScoreServers.ServerInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.server_address = reader.uint32(); - break; - case 2: - message.server_port = reader.uint32(); - break; - case 3: - message.num_users = reader.uint32(); - break; - case 4: - message.steam_id = reader.uint64(); - break; - case 5: - message.max_users = reader.uint32(); - break; - case 6: - message.user_score = reader.float(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.server_address = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.server_port = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.num_users = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.steam_id = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.max_users = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 5) + break; + message.user_score = reader.float(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7607,11 +9897,11 @@ * @memberof CMsgTFQuickplay_ScoreServers.ServerInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFQuickplay_ScoreServers.ServerInfo} ServerInfo + * @returns {CMsgTFQuickplay_ScoreServers.ServerInfo & CMsgTFQuickplay_ScoreServers.ServerInfo.$Shape} ServerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServerInfo.decodeDelimited = function decodeDelimited(reader) { + ServerInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7625,25 +9915,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServerInfo.verify = function verify(message) { + ServerInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.server_address != null && message.hasOwnProperty("server_address")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.server_address != null && $Object.hasOwnProperty.call(message, "server_address")) if (!$util.isInteger(message.server_address)) return "server_address: integer expected"; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) if (!$util.isInteger(message.server_port)) return "server_port: integer expected"; - if (message.num_users != null && message.hasOwnProperty("num_users")) + if (message.num_users != null && $Object.hasOwnProperty.call(message, "num_users")) if (!$util.isInteger(message.num_users)) return "num_users: integer expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.max_users != null && message.hasOwnProperty("max_users")) + if (message.max_users != null && $Object.hasOwnProperty.call(message, "max_users")) if (!$util.isInteger(message.max_users)) return "max_users: integer expected"; - if (message.user_score != null && message.hasOwnProperty("user_score")) + if (message.user_score != null && $Object.hasOwnProperty.call(message, "user_score")) if (typeof message.user_score !== "number") return "user_score: number expected"; return null; @@ -7657,9 +9951,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFQuickplay_ScoreServers.ServerInfo} ServerInfo */ - ServerInfo.fromObject = function fromObject(object) { + ServerInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFQuickplay_ScoreServers.ServerInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFQuickplay_ScoreServers.ServerInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFQuickplay_ScoreServers.ServerInfo(); if (object.server_address != null) message.server_address = object.server_address >>> 0; @@ -7669,9 +9969,9 @@ message.num_users = object.num_users >>> 0; if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = true; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") @@ -7679,7 +9979,7 @@ if (object.max_users != null) message.max_users = object.max_users >>> 0; if (object.user_score != null) - message.user_score = Number(object.user_score); + message.user_score = $Number(object.user_score); return message; }; @@ -7692,9 +9992,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServerInfo.toObject = function toObject(message, options) { + ServerInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.server_address = 0; @@ -7702,27 +10006,29 @@ object.num_users = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.max_users = 0; object.user_score = 0; } - if (message.server_address != null && message.hasOwnProperty("server_address")) + if (message.server_address != null && $Object.hasOwnProperty.call(message, "server_address")) object.server_address = message.server_address; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) object.server_port = message.server_port; - if (message.num_users != null && message.hasOwnProperty("num_users")) + if (message.num_users != null && $Object.hasOwnProperty.call(message, "num_users")) object.num_users = message.num_users; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; - if (message.max_users != null && message.hasOwnProperty("max_users")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.max_users != null && $Object.hasOwnProperty.call(message, "max_users")) object.max_users = message.max_users; - if (message.user_score != null && message.hasOwnProperty("user_score")) - object.user_score = options.json && !isFinite(message.user_score) ? String(message.user_score) : message.user_score; + if (message.user_score != null && $Object.hasOwnProperty.call(message, "user_score")) + object.user_score = options.json && !$isFinite(message.user_score) ? $String(message.user_score) : message.user_score; return object; }; @@ -7733,8 +10039,22 @@ * @instance * @returns {Object.} JSON object */ - ServerInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServerInfo.prototype.toJSON = function() { + return ServerInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServerInfo + * @function getTypeUrl + * @memberof CMsgTFQuickplay_ScoreServers.ServerInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServerInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFQuickplay_ScoreServers.ServerInfo"; }; return ServerInfo; @@ -7745,32 +10065,45 @@ $root.CMsgTFQuickplay_ScoreServersResponse = (function() { + /** + * Properties of a CMsgTFQuickplay_ScoreServersResponse. + * @typedef {Object} CMsgTFQuickplay_ScoreServersResponse.$Properties + * @property {Array.|null} [servers] CMsgTFQuickplay_ScoreServersResponse servers + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFQuickplay_ScoreServersResponse. * @exports ICMsgTFQuickplay_ScoreServersResponse * @interface ICMsgTFQuickplay_ScoreServersResponse - * @property {Array.|null} [servers] CMsgTFQuickplay_ScoreServersResponse servers + * @augments CMsgTFQuickplay_ScoreServersResponse.$Properties + * @deprecated Use CMsgTFQuickplay_ScoreServersResponse.$Properties instead. + */ + + /** + * Shape of a CMsgTFQuickplay_ScoreServersResponse. + * @typedef {CMsgTFQuickplay_ScoreServersResponse.$Properties} CMsgTFQuickplay_ScoreServersResponse.$Shape */ /** * Constructs a new CMsgTFQuickplay_ScoreServersResponse. * @exports CMsgTFQuickplay_ScoreServersResponse * @classdesc Represents a CMsgTFQuickplay_ScoreServersResponse. - * @implements ICMsgTFQuickplay_ScoreServersResponse * @constructor - * @param {ICMsgTFQuickplay_ScoreServersResponse=} [properties] Properties to set + * @param {CMsgTFQuickplay_ScoreServersResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFQuickplay_ScoreServersResponse(properties) { + var CMsgTFQuickplay_ScoreServersResponse = function (properties) { this.servers = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFQuickplay_ScoreServersResponse servers. - * @member {Array.} servers + * @member {Array.} servers * @memberof CMsgTFQuickplay_ScoreServersResponse * @instance */ @@ -7781,10 +10114,14 @@ * @function create * @memberof CMsgTFQuickplay_ScoreServersResponse * @static - * @param {ICMsgTFQuickplay_ScoreServersResponse=} [properties] Properties to set + * @param {CMsgTFQuickplay_ScoreServersResponse.$Properties=} [properties] Properties to set * @returns {CMsgTFQuickplay_ScoreServersResponse} CMsgTFQuickplay_ScoreServersResponse instance + * @type {{ + * (properties: CMsgTFQuickplay_ScoreServersResponse.$Shape): CMsgTFQuickplay_ScoreServersResponse & CMsgTFQuickplay_ScoreServersResponse.$Shape; + * (properties?: CMsgTFQuickplay_ScoreServersResponse.$Properties): CMsgTFQuickplay_ScoreServersResponse; + * }} */ - CMsgTFQuickplay_ScoreServersResponse.create = function create(properties) { + CMsgTFQuickplay_ScoreServersResponse.create = function(properties) { return new CMsgTFQuickplay_ScoreServersResponse(properties); }; @@ -7793,16 +10130,23 @@ * @function encode * @memberof CMsgTFQuickplay_ScoreServersResponse * @static - * @param {ICMsgTFQuickplay_ScoreServersResponse} message CMsgTFQuickplay_ScoreServersResponse message or plain object to encode + * @param {CMsgTFQuickplay_ScoreServersResponse.$Properties} message CMsgTFQuickplay_ScoreServersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFQuickplay_ScoreServersResponse.encode = function encode(message, writer) { + CMsgTFQuickplay_ScoreServersResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.servers != null && message.servers.length) for (var i = 0; i < message.servers.length; ++i) - $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo.encode(message.servers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo.encode(message.servers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7811,12 +10155,12 @@ * @function encodeDelimited * @memberof CMsgTFQuickplay_ScoreServersResponse * @static - * @param {ICMsgTFQuickplay_ScoreServersResponse} message CMsgTFQuickplay_ScoreServersResponse message or plain object to encode + * @param {CMsgTFQuickplay_ScoreServersResponse.$Properties} message CMsgTFQuickplay_ScoreServersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFQuickplay_ScoreServersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFQuickplay_ScoreServersResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7826,27 +10170,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFQuickplay_ScoreServersResponse} CMsgTFQuickplay_ScoreServersResponse + * @returns {CMsgTFQuickplay_ScoreServersResponse & CMsgTFQuickplay_ScoreServersResponse.$Shape} CMsgTFQuickplay_ScoreServersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFQuickplay_ScoreServersResponse.decode = function decode(reader, length) { + CMsgTFQuickplay_ScoreServersResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFQuickplay_ScoreServersResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFQuickplay_ScoreServersResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.servers && message.servers.length)) - message.servers = []; - message.servers.push($root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.servers && message.servers.length)) + message.servers = []; + message.servers.push($root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7856,11 +10217,11 @@ * @memberof CMsgTFQuickplay_ScoreServersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFQuickplay_ScoreServersResponse} CMsgTFQuickplay_ScoreServersResponse + * @returns {CMsgTFQuickplay_ScoreServersResponse & CMsgTFQuickplay_ScoreServersResponse.$Shape} CMsgTFQuickplay_ScoreServersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFQuickplay_ScoreServersResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgTFQuickplay_ScoreServersResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7874,14 +10235,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFQuickplay_ScoreServersResponse.verify = function verify(message) { + CMsgTFQuickplay_ScoreServersResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.servers != null && message.hasOwnProperty("servers")) { - if (!Array.isArray(message.servers)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.servers != null && $Object.hasOwnProperty.call(message, "servers")) { + if (!$Array.isArray(message.servers)) return "servers: array expected"; for (var i = 0; i < message.servers.length; ++i) { - var error = $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo.verify(message.servers[i]); + var error = $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo.verify(message.servers[i], _depth + 1); if (error) return "servers." + error; } @@ -7897,18 +10262,24 @@ * @param {Object.} object Plain object * @returns {CMsgTFQuickplay_ScoreServersResponse} CMsgTFQuickplay_ScoreServersResponse */ - CMsgTFQuickplay_ScoreServersResponse.fromObject = function fromObject(object) { + CMsgTFQuickplay_ScoreServersResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFQuickplay_ScoreServersResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFQuickplay_ScoreServersResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFQuickplay_ScoreServersResponse(); if (object.servers) { - if (!Array.isArray(object.servers)) - throw TypeError(".CMsgTFQuickplay_ScoreServersResponse.servers: array expected"); - message.servers = []; + if (!$Array.isArray(object.servers)) + throw $TypeError(".CMsgTFQuickplay_ScoreServersResponse.servers: array expected"); + message.servers = $Array(object.servers.length); for (var i = 0; i < object.servers.length; ++i) { - if (typeof object.servers[i] !== "object") - throw TypeError(".CMsgTFQuickplay_ScoreServersResponse.servers: object expected"); - message.servers[i] = $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo.fromObject(object.servers[i]); + if (!$util.isObject(object.servers[i])) + throw $TypeError(".CMsgTFQuickplay_ScoreServersResponse.servers: object expected"); + message.servers[i] = $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo.fromObject(object.servers[i], _depth + 1); } } return message; @@ -7923,16 +10294,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFQuickplay_ScoreServersResponse.toObject = function toObject(message, options) { + CMsgTFQuickplay_ScoreServersResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.servers = []; if (message.servers && message.servers.length) { - object.servers = []; + object.servers = $Array(message.servers.length); for (var j = 0; j < message.servers.length; ++j) - object.servers[j] = $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo.toObject(message.servers[j], options); + object.servers[j] = $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo.toObject(message.servers[j], options, _depth + 1); } return object; }; @@ -7944,37 +10319,64 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFQuickplay_ScoreServersResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFQuickplay_ScoreServersResponse.prototype.toJSON = function() { + return CMsgTFQuickplay_ScoreServersResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFQuickplay_ScoreServersResponse + * @function getTypeUrl + * @memberof CMsgTFQuickplay_ScoreServersResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFQuickplay_ScoreServersResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFQuickplay_ScoreServersResponse"; }; CMsgTFQuickplay_ScoreServersResponse.ServerInfo = (function() { /** * Properties of a ServerInfo. - * @memberof CMsgTFQuickplay_ScoreServersResponse - * @interface IServerInfo + * @typedef {Object} CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Properties * @property {number|null} [server_address] ServerInfo server_address * @property {number|null} [server_port] ServerInfo server_port * @property {number|null} [total_score] ServerInfo total_score * @property {number|Long|null} [steam_id] ServerInfo steam_id * @property {number|null} [options_score] ServerInfo options_score + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ServerInfo. + * @memberof CMsgTFQuickplay_ScoreServersResponse + * @interface IServerInfo + * @augments CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Properties + * @deprecated Use CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Properties instead. + */ + + /** + * Shape of a ServerInfo. + * @typedef {CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Properties} CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Shape */ /** * Constructs a new ServerInfo. * @memberof CMsgTFQuickplay_ScoreServersResponse * @classdesc Represents a ServerInfo. - * @implements IServerInfo * @constructor - * @param {CMsgTFQuickplay_ScoreServersResponse.IServerInfo=} [properties] Properties to set + * @param {CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServerInfo(properties) { + var ServerInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServerInfo server_address. @@ -8021,10 +10423,14 @@ * @function create * @memberof CMsgTFQuickplay_ScoreServersResponse.ServerInfo * @static - * @param {CMsgTFQuickplay_ScoreServersResponse.IServerInfo=} [properties] Properties to set + * @param {CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Properties=} [properties] Properties to set * @returns {CMsgTFQuickplay_ScoreServersResponse.ServerInfo} ServerInfo instance + * @type {{ + * (properties: CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Shape): CMsgTFQuickplay_ScoreServersResponse.ServerInfo & CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Shape; + * (properties?: CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Properties): CMsgTFQuickplay_ScoreServersResponse.ServerInfo; + * }} */ - ServerInfo.create = function create(properties) { + ServerInfo.create = function(properties) { return new ServerInfo(properties); }; @@ -8033,23 +10439,30 @@ * @function encode * @memberof CMsgTFQuickplay_ScoreServersResponse.ServerInfo * @static - * @param {CMsgTFQuickplay_ScoreServersResponse.IServerInfo} message ServerInfo message or plain object to encode + * @param {CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Properties} message ServerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServerInfo.encode = function encode(message, writer) { + ServerInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.server_address != null && Object.hasOwnProperty.call(message, "server_address")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.server_address != null && $Object.hasOwnProperty.call(message, "server_address")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.server_address); - if (message.server_port != null && Object.hasOwnProperty.call(message, "server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.server_port); - if (message.total_score != null && Object.hasOwnProperty.call(message, "total_score")) + if (message.total_score != null && $Object.hasOwnProperty.call(message, "total_score")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.total_score); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.steam_id); - if (message.options_score != null && Object.hasOwnProperty.call(message, "options_score")) + if (message.options_score != null && $Object.hasOwnProperty.call(message, "options_score")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.options_score); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8058,12 +10471,12 @@ * @function encodeDelimited * @memberof CMsgTFQuickplay_ScoreServersResponse.ServerInfo * @static - * @param {CMsgTFQuickplay_ScoreServersResponse.IServerInfo} message ServerInfo message or plain object to encode + * @param {CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Properties} message ServerInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServerInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServerInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8073,37 +10486,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFQuickplay_ScoreServersResponse.ServerInfo} ServerInfo + * @returns {CMsgTFQuickplay_ScoreServersResponse.ServerInfo & CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Shape} ServerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServerInfo.decode = function decode(reader, length) { + ServerInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.server_address = reader.uint32(); - break; - case 2: - message.server_port = reader.uint32(); - break; - case 3: - message.total_score = reader.float(); - break; - case 4: - message.steam_id = reader.uint64(); - break; - case 5: - message.options_score = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.server_address = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.server_port = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.total_score = reader.float(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.steam_id = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.options_score = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8113,11 +10555,11 @@ * @memberof CMsgTFQuickplay_ScoreServersResponse.ServerInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFQuickplay_ScoreServersResponse.ServerInfo} ServerInfo + * @returns {CMsgTFQuickplay_ScoreServersResponse.ServerInfo & CMsgTFQuickplay_ScoreServersResponse.ServerInfo.$Shape} ServerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServerInfo.decodeDelimited = function decodeDelimited(reader) { + ServerInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8131,22 +10573,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServerInfo.verify = function verify(message) { + ServerInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.server_address != null && message.hasOwnProperty("server_address")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.server_address != null && $Object.hasOwnProperty.call(message, "server_address")) if (!$util.isInteger(message.server_address)) return "server_address: integer expected"; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) if (!$util.isInteger(message.server_port)) return "server_port: integer expected"; - if (message.total_score != null && message.hasOwnProperty("total_score")) + if (message.total_score != null && $Object.hasOwnProperty.call(message, "total_score")) if (typeof message.total_score !== "number") return "total_score: number expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.options_score != null && message.hasOwnProperty("options_score")) + if (message.options_score != null && $Object.hasOwnProperty.call(message, "options_score")) if (!$util.isInteger(message.options_score)) return "options_score: integer expected"; return null; @@ -8160,21 +10606,27 @@ * @param {Object.} object Plain object * @returns {CMsgTFQuickplay_ScoreServersResponse.ServerInfo} ServerInfo */ - ServerInfo.fromObject = function fromObject(object) { + ServerInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFQuickplay_ScoreServersResponse.ServerInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFQuickplay_ScoreServersResponse.ServerInfo(); if (object.server_address != null) message.server_address = object.server_address >>> 0; if (object.server_port != null) message.server_port = object.server_port >>> 0; if (object.total_score != null) - message.total_score = Number(object.total_score); + message.total_score = $Number(object.total_score); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = true; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") @@ -8193,9 +10645,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServerInfo.toObject = function toObject(message, options) { + ServerInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.server_address = 0; @@ -8203,23 +10659,25 @@ object.total_score = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.options_score = 0; } - if (message.server_address != null && message.hasOwnProperty("server_address")) + if (message.server_address != null && $Object.hasOwnProperty.call(message, "server_address")) object.server_address = message.server_address; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) object.server_port = message.server_port; - if (message.total_score != null && message.hasOwnProperty("total_score")) - object.total_score = options.json && !isFinite(message.total_score) ? String(message.total_score) : message.total_score; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.total_score != null && $Object.hasOwnProperty.call(message, "total_score")) + object.total_score = options.json && !$isFinite(message.total_score) ? $String(message.total_score) : message.total_score; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; - if (message.options_score != null && message.hasOwnProperty("options_score")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.options_score != null && $Object.hasOwnProperty.call(message, "options_score")) object.options_score = message.options_score; return object; }; @@ -8231,8 +10689,22 @@ * @instance * @returns {Object.} JSON object */ - ServerInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServerInfo.prototype.toJSON = function() { + return ServerInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServerInfo + * @function getTypeUrl + * @memberof CMsgTFQuickplay_ScoreServersResponse.ServerInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServerInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFQuickplay_ScoreServersResponse.ServerInfo"; }; return ServerInfo; @@ -8243,27 +10715,40 @@ $root.CMsgTFQuickplay_PlayerJoining = (function() { + /** + * Properties of a CMsgTFQuickplay_PlayerJoining. + * @typedef {Object} CMsgTFQuickplay_PlayerJoining.$Properties + * @property {number|null} [account_id] CMsgTFQuickplay_PlayerJoining account_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFQuickplay_PlayerJoining. * @exports ICMsgTFQuickplay_PlayerJoining * @interface ICMsgTFQuickplay_PlayerJoining - * @property {number|null} [account_id] CMsgTFQuickplay_PlayerJoining account_id + * @augments CMsgTFQuickplay_PlayerJoining.$Properties + * @deprecated Use CMsgTFQuickplay_PlayerJoining.$Properties instead. + */ + + /** + * Shape of a CMsgTFQuickplay_PlayerJoining. + * @typedef {CMsgTFQuickplay_PlayerJoining.$Properties} CMsgTFQuickplay_PlayerJoining.$Shape */ /** * Constructs a new CMsgTFQuickplay_PlayerJoining. * @exports CMsgTFQuickplay_PlayerJoining * @classdesc Represents a CMsgTFQuickplay_PlayerJoining. - * @implements ICMsgTFQuickplay_PlayerJoining * @constructor - * @param {ICMsgTFQuickplay_PlayerJoining=} [properties] Properties to set + * @param {CMsgTFQuickplay_PlayerJoining.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFQuickplay_PlayerJoining(properties) { + var CMsgTFQuickplay_PlayerJoining = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFQuickplay_PlayerJoining account_id. @@ -8278,10 +10763,14 @@ * @function create * @memberof CMsgTFQuickplay_PlayerJoining * @static - * @param {ICMsgTFQuickplay_PlayerJoining=} [properties] Properties to set + * @param {CMsgTFQuickplay_PlayerJoining.$Properties=} [properties] Properties to set * @returns {CMsgTFQuickplay_PlayerJoining} CMsgTFQuickplay_PlayerJoining instance + * @type {{ + * (properties: CMsgTFQuickplay_PlayerJoining.$Shape): CMsgTFQuickplay_PlayerJoining & CMsgTFQuickplay_PlayerJoining.$Shape; + * (properties?: CMsgTFQuickplay_PlayerJoining.$Properties): CMsgTFQuickplay_PlayerJoining; + * }} */ - CMsgTFQuickplay_PlayerJoining.create = function create(properties) { + CMsgTFQuickplay_PlayerJoining.create = function(properties) { return new CMsgTFQuickplay_PlayerJoining(properties); }; @@ -8290,15 +10779,22 @@ * @function encode * @memberof CMsgTFQuickplay_PlayerJoining * @static - * @param {ICMsgTFQuickplay_PlayerJoining} message CMsgTFQuickplay_PlayerJoining message or plain object to encode + * @param {CMsgTFQuickplay_PlayerJoining.$Properties} message CMsgTFQuickplay_PlayerJoining message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFQuickplay_PlayerJoining.encode = function encode(message, writer) { + CMsgTFQuickplay_PlayerJoining.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8307,12 +10803,12 @@ * @function encodeDelimited * @memberof CMsgTFQuickplay_PlayerJoining * @static - * @param {ICMsgTFQuickplay_PlayerJoining} message CMsgTFQuickplay_PlayerJoining message or plain object to encode + * @param {CMsgTFQuickplay_PlayerJoining.$Properties} message CMsgTFQuickplay_PlayerJoining message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFQuickplay_PlayerJoining.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFQuickplay_PlayerJoining.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8322,25 +10818,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFQuickplay_PlayerJoining} CMsgTFQuickplay_PlayerJoining + * @returns {CMsgTFQuickplay_PlayerJoining & CMsgTFQuickplay_PlayerJoining.$Shape} CMsgTFQuickplay_PlayerJoining * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFQuickplay_PlayerJoining.decode = function decode(reader, length) { + CMsgTFQuickplay_PlayerJoining.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFQuickplay_PlayerJoining(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFQuickplay_PlayerJoining(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8350,11 +10863,11 @@ * @memberof CMsgTFQuickplay_PlayerJoining * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFQuickplay_PlayerJoining} CMsgTFQuickplay_PlayerJoining + * @returns {CMsgTFQuickplay_PlayerJoining & CMsgTFQuickplay_PlayerJoining.$Shape} CMsgTFQuickplay_PlayerJoining * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFQuickplay_PlayerJoining.decodeDelimited = function decodeDelimited(reader) { + CMsgTFQuickplay_PlayerJoining.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8368,10 +10881,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFQuickplay_PlayerJoining.verify = function verify(message) { + CMsgTFQuickplay_PlayerJoining.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; return null; @@ -8385,9 +10902,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFQuickplay_PlayerJoining} CMsgTFQuickplay_PlayerJoining */ - CMsgTFQuickplay_PlayerJoining.fromObject = function fromObject(object) { + CMsgTFQuickplay_PlayerJoining.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFQuickplay_PlayerJoining) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFQuickplay_PlayerJoining: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFQuickplay_PlayerJoining(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -8403,13 +10926,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFQuickplay_PlayerJoining.toObject = function toObject(message, options) { + CMsgTFQuickplay_PlayerJoining.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.account_id = 0; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; return object; }; @@ -8421,8 +10948,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFQuickplay_PlayerJoining.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFQuickplay_PlayerJoining.prototype.toJSON = function() { + return CMsgTFQuickplay_PlayerJoining.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFQuickplay_PlayerJoining + * @function getTypeUrl + * @memberof CMsgTFQuickplay_PlayerJoining + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFQuickplay_PlayerJoining.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFQuickplay_PlayerJoining"; }; return CMsgTFQuickplay_PlayerJoining; @@ -8432,26 +10973,39 @@ /** * Properties of a CMsgGC_GameServer_LevelInfo. - * @exports ICMsgGC_GameServer_LevelInfo - * @interface ICMsgGC_GameServer_LevelInfo + * @typedef {Object} CMsgGC_GameServer_LevelInfo.$Properties * @property {boolean|null} [level_loaded] CMsgGC_GameServer_LevelInfo level_loaded * @property {string|null} [level_name] CMsgGC_GameServer_LevelInfo level_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_GameServer_LevelInfo. + * @exports ICMsgGC_GameServer_LevelInfo + * @interface ICMsgGC_GameServer_LevelInfo + * @augments CMsgGC_GameServer_LevelInfo.$Properties + * @deprecated Use CMsgGC_GameServer_LevelInfo.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_LevelInfo. + * @typedef {CMsgGC_GameServer_LevelInfo.$Properties} CMsgGC_GameServer_LevelInfo.$Shape */ /** * Constructs a new CMsgGC_GameServer_LevelInfo. * @exports CMsgGC_GameServer_LevelInfo * @classdesc Represents a CMsgGC_GameServer_LevelInfo. - * @implements ICMsgGC_GameServer_LevelInfo * @constructor - * @param {ICMsgGC_GameServer_LevelInfo=} [properties] Properties to set + * @param {CMsgGC_GameServer_LevelInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_LevelInfo(properties) { + var CMsgGC_GameServer_LevelInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_LevelInfo level_loaded. @@ -8474,10 +11028,14 @@ * @function create * @memberof CMsgGC_GameServer_LevelInfo * @static - * @param {ICMsgGC_GameServer_LevelInfo=} [properties] Properties to set + * @param {CMsgGC_GameServer_LevelInfo.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_LevelInfo} CMsgGC_GameServer_LevelInfo instance + * @type {{ + * (properties: CMsgGC_GameServer_LevelInfo.$Shape): CMsgGC_GameServer_LevelInfo & CMsgGC_GameServer_LevelInfo.$Shape; + * (properties?: CMsgGC_GameServer_LevelInfo.$Properties): CMsgGC_GameServer_LevelInfo; + * }} */ - CMsgGC_GameServer_LevelInfo.create = function create(properties) { + CMsgGC_GameServer_LevelInfo.create = function(properties) { return new CMsgGC_GameServer_LevelInfo(properties); }; @@ -8486,17 +11044,24 @@ * @function encode * @memberof CMsgGC_GameServer_LevelInfo * @static - * @param {ICMsgGC_GameServer_LevelInfo} message CMsgGC_GameServer_LevelInfo message or plain object to encode + * @param {CMsgGC_GameServer_LevelInfo.$Properties} message CMsgGC_GameServer_LevelInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_LevelInfo.encode = function encode(message, writer) { + CMsgGC_GameServer_LevelInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.level_loaded != null && Object.hasOwnProperty.call(message, "level_loaded")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.level_loaded != null && $Object.hasOwnProperty.call(message, "level_loaded")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.level_loaded); - if (message.level_name != null && Object.hasOwnProperty.call(message, "level_name")) + if (message.level_name != null && $Object.hasOwnProperty.call(message, "level_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.level_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8505,12 +11070,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_LevelInfo * @static - * @param {ICMsgGC_GameServer_LevelInfo} message CMsgGC_GameServer_LevelInfo message or plain object to encode + * @param {CMsgGC_GameServer_LevelInfo.$Properties} message CMsgGC_GameServer_LevelInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_LevelInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_LevelInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8520,28 +11085,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_LevelInfo} CMsgGC_GameServer_LevelInfo + * @returns {CMsgGC_GameServer_LevelInfo & CMsgGC_GameServer_LevelInfo.$Shape} CMsgGC_GameServer_LevelInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_LevelInfo.decode = function decode(reader, length) { + CMsgGC_GameServer_LevelInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_LevelInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_LevelInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.level_loaded = reader.bool(); - break; - case 2: - message.level_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.level_loaded = reader.bool(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.level_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8551,11 +11136,11 @@ * @memberof CMsgGC_GameServer_LevelInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_LevelInfo} CMsgGC_GameServer_LevelInfo + * @returns {CMsgGC_GameServer_LevelInfo & CMsgGC_GameServer_LevelInfo.$Shape} CMsgGC_GameServer_LevelInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_LevelInfo.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_LevelInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8569,13 +11154,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_LevelInfo.verify = function verify(message) { + CMsgGC_GameServer_LevelInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.level_loaded != null && message.hasOwnProperty("level_loaded")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.level_loaded != null && $Object.hasOwnProperty.call(message, "level_loaded")) if (typeof message.level_loaded !== "boolean") return "level_loaded: boolean expected"; - if (message.level_name != null && message.hasOwnProperty("level_name")) + if (message.level_name != null && $Object.hasOwnProperty.call(message, "level_name")) if (!$util.isString(message.level_name)) return "level_name: string expected"; return null; @@ -8589,14 +11178,20 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_LevelInfo} CMsgGC_GameServer_LevelInfo */ - CMsgGC_GameServer_LevelInfo.fromObject = function fromObject(object) { + CMsgGC_GameServer_LevelInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_LevelInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_LevelInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_LevelInfo(); if (object.level_loaded != null) - message.level_loaded = Boolean(object.level_loaded); + message.level_loaded = $Boolean(object.level_loaded); if (object.level_name != null) - message.level_name = String(object.level_name); + message.level_name = $String(object.level_name); return message; }; @@ -8609,17 +11204,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_LevelInfo.toObject = function toObject(message, options) { + CMsgGC_GameServer_LevelInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.level_loaded = false; object.level_name = ""; } - if (message.level_loaded != null && message.hasOwnProperty("level_loaded")) + if (message.level_loaded != null && $Object.hasOwnProperty.call(message, "level_loaded")) object.level_loaded = message.level_loaded; - if (message.level_name != null && message.hasOwnProperty("level_name")) + if (message.level_name != null && $Object.hasOwnProperty.call(message, "level_name")) object.level_name = message.level_name; return object; }; @@ -8631,8 +11230,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_LevelInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_LevelInfo.prototype.toJSON = function() { + return CMsgGC_GameServer_LevelInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_LevelInfo + * @function getTypeUrl + * @memberof CMsgGC_GameServer_LevelInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_LevelInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_LevelInfo"; }; return CMsgGC_GameServer_LevelInfo; @@ -8640,27 +11253,40 @@ $root.CMsgGC_GameServer_AuthChallenge = (function() { + /** + * Properties of a CMsgGC_GameServer_AuthChallenge. + * @typedef {Object} CMsgGC_GameServer_AuthChallenge.$Properties + * @property {string|null} [challenge_string] CMsgGC_GameServer_AuthChallenge challenge_string + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_GameServer_AuthChallenge. * @exports ICMsgGC_GameServer_AuthChallenge * @interface ICMsgGC_GameServer_AuthChallenge - * @property {string|null} [challenge_string] CMsgGC_GameServer_AuthChallenge challenge_string + * @augments CMsgGC_GameServer_AuthChallenge.$Properties + * @deprecated Use CMsgGC_GameServer_AuthChallenge.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_AuthChallenge. + * @typedef {CMsgGC_GameServer_AuthChallenge.$Properties} CMsgGC_GameServer_AuthChallenge.$Shape */ /** * Constructs a new CMsgGC_GameServer_AuthChallenge. * @exports CMsgGC_GameServer_AuthChallenge * @classdesc Represents a CMsgGC_GameServer_AuthChallenge. - * @implements ICMsgGC_GameServer_AuthChallenge * @constructor - * @param {ICMsgGC_GameServer_AuthChallenge=} [properties] Properties to set + * @param {CMsgGC_GameServer_AuthChallenge.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_AuthChallenge(properties) { + var CMsgGC_GameServer_AuthChallenge = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_AuthChallenge challenge_string. @@ -8675,10 +11301,14 @@ * @function create * @memberof CMsgGC_GameServer_AuthChallenge * @static - * @param {ICMsgGC_GameServer_AuthChallenge=} [properties] Properties to set + * @param {CMsgGC_GameServer_AuthChallenge.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_AuthChallenge} CMsgGC_GameServer_AuthChallenge instance + * @type {{ + * (properties: CMsgGC_GameServer_AuthChallenge.$Shape): CMsgGC_GameServer_AuthChallenge & CMsgGC_GameServer_AuthChallenge.$Shape; + * (properties?: CMsgGC_GameServer_AuthChallenge.$Properties): CMsgGC_GameServer_AuthChallenge; + * }} */ - CMsgGC_GameServer_AuthChallenge.create = function create(properties) { + CMsgGC_GameServer_AuthChallenge.create = function(properties) { return new CMsgGC_GameServer_AuthChallenge(properties); }; @@ -8687,15 +11317,22 @@ * @function encode * @memberof CMsgGC_GameServer_AuthChallenge * @static - * @param {ICMsgGC_GameServer_AuthChallenge} message CMsgGC_GameServer_AuthChallenge message or plain object to encode + * @param {CMsgGC_GameServer_AuthChallenge.$Properties} message CMsgGC_GameServer_AuthChallenge message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_AuthChallenge.encode = function encode(message, writer) { + CMsgGC_GameServer_AuthChallenge.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.challenge_string != null && Object.hasOwnProperty.call(message, "challenge_string")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.challenge_string != null && $Object.hasOwnProperty.call(message, "challenge_string")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.challenge_string); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8704,12 +11341,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_AuthChallenge * @static - * @param {ICMsgGC_GameServer_AuthChallenge} message CMsgGC_GameServer_AuthChallenge message or plain object to encode + * @param {CMsgGC_GameServer_AuthChallenge.$Properties} message CMsgGC_GameServer_AuthChallenge message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_AuthChallenge.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_AuthChallenge.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8719,25 +11356,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_AuthChallenge} CMsgGC_GameServer_AuthChallenge + * @returns {CMsgGC_GameServer_AuthChallenge & CMsgGC_GameServer_AuthChallenge.$Shape} CMsgGC_GameServer_AuthChallenge * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_AuthChallenge.decode = function decode(reader, length) { + CMsgGC_GameServer_AuthChallenge.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_AuthChallenge(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_AuthChallenge(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.challenge_string = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.challenge_string = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8747,11 +11401,11 @@ * @memberof CMsgGC_GameServer_AuthChallenge * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_AuthChallenge} CMsgGC_GameServer_AuthChallenge + * @returns {CMsgGC_GameServer_AuthChallenge & CMsgGC_GameServer_AuthChallenge.$Shape} CMsgGC_GameServer_AuthChallenge * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_AuthChallenge.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_AuthChallenge.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8765,10 +11419,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_AuthChallenge.verify = function verify(message) { + CMsgGC_GameServer_AuthChallenge.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.challenge_string != null && message.hasOwnProperty("challenge_string")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.challenge_string != null && $Object.hasOwnProperty.call(message, "challenge_string")) if (!$util.isString(message.challenge_string)) return "challenge_string: string expected"; return null; @@ -8782,12 +11440,18 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_AuthChallenge} CMsgGC_GameServer_AuthChallenge */ - CMsgGC_GameServer_AuthChallenge.fromObject = function fromObject(object) { + CMsgGC_GameServer_AuthChallenge.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_AuthChallenge) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_AuthChallenge: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_AuthChallenge(); if (object.challenge_string != null) - message.challenge_string = String(object.challenge_string); + message.challenge_string = $String(object.challenge_string); return message; }; @@ -8800,13 +11464,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_AuthChallenge.toObject = function toObject(message, options) { + CMsgGC_GameServer_AuthChallenge.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.challenge_string = ""; - if (message.challenge_string != null && message.hasOwnProperty("challenge_string")) + if (message.challenge_string != null && $Object.hasOwnProperty.call(message, "challenge_string")) object.challenge_string = message.challenge_string; return object; }; @@ -8818,8 +11486,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_AuthChallenge.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_AuthChallenge.prototype.toJSON = function() { + return CMsgGC_GameServer_AuthChallenge.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_AuthChallenge + * @function getTypeUrl + * @memberof CMsgGC_GameServer_AuthChallenge + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_AuthChallenge.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_AuthChallenge"; }; return CMsgGC_GameServer_AuthChallenge; @@ -8829,29 +11511,42 @@ /** * Properties of a CMsgGC_GameServer_AuthResult. - * @exports ICMsgGC_GameServer_AuthResult - * @interface ICMsgGC_GameServer_AuthResult + * @typedef {Object} CMsgGC_GameServer_AuthResult.$Properties * @property {boolean|null} [authenticated] CMsgGC_GameServer_AuthResult authenticated * @property {number|null} [game_server_standing] CMsgGC_GameServer_AuthResult game_server_standing * @property {number|null} [game_server_standing_trend] CMsgGC_GameServer_AuthResult game_server_standing_trend * @property {boolean|null} [is_valve_server] CMsgGC_GameServer_AuthResult is_valve_server * @property {string|null} [message] CMsgGC_GameServer_AuthResult message + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_GameServer_AuthResult. + * @exports ICMsgGC_GameServer_AuthResult + * @interface ICMsgGC_GameServer_AuthResult + * @augments CMsgGC_GameServer_AuthResult.$Properties + * @deprecated Use CMsgGC_GameServer_AuthResult.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_AuthResult. + * @typedef {CMsgGC_GameServer_AuthResult.$Properties} CMsgGC_GameServer_AuthResult.$Shape */ /** * Constructs a new CMsgGC_GameServer_AuthResult. * @exports CMsgGC_GameServer_AuthResult * @classdesc Represents a CMsgGC_GameServer_AuthResult. - * @implements ICMsgGC_GameServer_AuthResult * @constructor - * @param {ICMsgGC_GameServer_AuthResult=} [properties] Properties to set + * @param {CMsgGC_GameServer_AuthResult.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_AuthResult(properties) { + var CMsgGC_GameServer_AuthResult = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_AuthResult authenticated. @@ -8898,10 +11593,14 @@ * @function create * @memberof CMsgGC_GameServer_AuthResult * @static - * @param {ICMsgGC_GameServer_AuthResult=} [properties] Properties to set + * @param {CMsgGC_GameServer_AuthResult.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_AuthResult} CMsgGC_GameServer_AuthResult instance + * @type {{ + * (properties: CMsgGC_GameServer_AuthResult.$Shape): CMsgGC_GameServer_AuthResult & CMsgGC_GameServer_AuthResult.$Shape; + * (properties?: CMsgGC_GameServer_AuthResult.$Properties): CMsgGC_GameServer_AuthResult; + * }} */ - CMsgGC_GameServer_AuthResult.create = function create(properties) { + CMsgGC_GameServer_AuthResult.create = function(properties) { return new CMsgGC_GameServer_AuthResult(properties); }; @@ -8910,23 +11609,30 @@ * @function encode * @memberof CMsgGC_GameServer_AuthResult * @static - * @param {ICMsgGC_GameServer_AuthResult} message CMsgGC_GameServer_AuthResult message or plain object to encode + * @param {CMsgGC_GameServer_AuthResult.$Properties} message CMsgGC_GameServer_AuthResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_AuthResult.encode = function encode(message, writer) { + CMsgGC_GameServer_AuthResult.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.authenticated != null && Object.hasOwnProperty.call(message, "authenticated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.authenticated != null && $Object.hasOwnProperty.call(message, "authenticated")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.authenticated); - if (message.game_server_standing != null && Object.hasOwnProperty.call(message, "game_server_standing")) + if (message.game_server_standing != null && $Object.hasOwnProperty.call(message, "game_server_standing")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.game_server_standing); - if (message.game_server_standing_trend != null && Object.hasOwnProperty.call(message, "game_server_standing_trend")) + if (message.game_server_standing_trend != null && $Object.hasOwnProperty.call(message, "game_server_standing_trend")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.game_server_standing_trend); - if (message.is_valve_server != null && Object.hasOwnProperty.call(message, "is_valve_server")) + if (message.is_valve_server != null && $Object.hasOwnProperty.call(message, "is_valve_server")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_valve_server); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.message); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8935,12 +11641,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_AuthResult * @static - * @param {ICMsgGC_GameServer_AuthResult} message CMsgGC_GameServer_AuthResult message or plain object to encode + * @param {CMsgGC_GameServer_AuthResult.$Properties} message CMsgGC_GameServer_AuthResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_AuthResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_AuthResult.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8950,37 +11656,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_AuthResult} CMsgGC_GameServer_AuthResult + * @returns {CMsgGC_GameServer_AuthResult & CMsgGC_GameServer_AuthResult.$Shape} CMsgGC_GameServer_AuthResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_AuthResult.decode = function decode(reader, length) { + CMsgGC_GameServer_AuthResult.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_AuthResult(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_AuthResult(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authenticated = reader.bool(); - break; - case 2: - message.game_server_standing = reader.int32(); - break; - case 3: - message.game_server_standing_trend = reader.int32(); - break; - case 4: - message.is_valve_server = reader.bool(); - break; - case 5: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.authenticated = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.game_server_standing = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.game_server_standing_trend = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_valve_server = reader.bool(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.message = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8990,11 +11725,11 @@ * @memberof CMsgGC_GameServer_AuthResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_AuthResult} CMsgGC_GameServer_AuthResult + * @returns {CMsgGC_GameServer_AuthResult & CMsgGC_GameServer_AuthResult.$Shape} CMsgGC_GameServer_AuthResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_AuthResult.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_AuthResult.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9008,22 +11743,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_AuthResult.verify = function verify(message) { + CMsgGC_GameServer_AuthResult.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.authenticated != null && message.hasOwnProperty("authenticated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.authenticated != null && $Object.hasOwnProperty.call(message, "authenticated")) if (typeof message.authenticated !== "boolean") return "authenticated: boolean expected"; - if (message.game_server_standing != null && message.hasOwnProperty("game_server_standing")) + if (message.game_server_standing != null && $Object.hasOwnProperty.call(message, "game_server_standing")) if (!$util.isInteger(message.game_server_standing)) return "game_server_standing: integer expected"; - if (message.game_server_standing_trend != null && message.hasOwnProperty("game_server_standing_trend")) + if (message.game_server_standing_trend != null && $Object.hasOwnProperty.call(message, "game_server_standing_trend")) if (!$util.isInteger(message.game_server_standing_trend)) return "game_server_standing_trend: integer expected"; - if (message.is_valve_server != null && message.hasOwnProperty("is_valve_server")) + if (message.is_valve_server != null && $Object.hasOwnProperty.call(message, "is_valve_server")) if (typeof message.is_valve_server !== "boolean") return "is_valve_server: boolean expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -9037,20 +11776,26 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_AuthResult} CMsgGC_GameServer_AuthResult */ - CMsgGC_GameServer_AuthResult.fromObject = function fromObject(object) { + CMsgGC_GameServer_AuthResult.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_AuthResult) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_AuthResult: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_AuthResult(); if (object.authenticated != null) - message.authenticated = Boolean(object.authenticated); + message.authenticated = $Boolean(object.authenticated); if (object.game_server_standing != null) message.game_server_standing = object.game_server_standing | 0; if (object.game_server_standing_trend != null) message.game_server_standing_trend = object.game_server_standing_trend | 0; if (object.is_valve_server != null) - message.is_valve_server = Boolean(object.is_valve_server); + message.is_valve_server = $Boolean(object.is_valve_server); if (object.message != null) - message.message = String(object.message); + message.message = $String(object.message); return message; }; @@ -9063,9 +11808,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_AuthResult.toObject = function toObject(message, options) { + CMsgGC_GameServer_AuthResult.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.authenticated = false; @@ -9074,15 +11823,15 @@ object.is_valve_server = false; object.message = ""; } - if (message.authenticated != null && message.hasOwnProperty("authenticated")) + if (message.authenticated != null && $Object.hasOwnProperty.call(message, "authenticated")) object.authenticated = message.authenticated; - if (message.game_server_standing != null && message.hasOwnProperty("game_server_standing")) + if (message.game_server_standing != null && $Object.hasOwnProperty.call(message, "game_server_standing")) object.game_server_standing = message.game_server_standing; - if (message.game_server_standing_trend != null && message.hasOwnProperty("game_server_standing_trend")) + if (message.game_server_standing_trend != null && $Object.hasOwnProperty.call(message, "game_server_standing_trend")) object.game_server_standing_trend = message.game_server_standing_trend; - if (message.is_valve_server != null && message.hasOwnProperty("is_valve_server")) + if (message.is_valve_server != null && $Object.hasOwnProperty.call(message, "is_valve_server")) object.is_valve_server = message.is_valve_server; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -9094,8 +11843,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_AuthResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_AuthResult.prototype.toJSON = function() { + return CMsgGC_GameServer_AuthResult.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_AuthResult + * @function getTypeUrl + * @memberof CMsgGC_GameServer_AuthResult + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_AuthResult.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_AuthResult"; }; return CMsgGC_GameServer_AuthResult; @@ -9105,26 +11868,39 @@ /** * Properties of a CMsgGC_GameServer_AuthChallengeResponse. - * @exports ICMsgGC_GameServer_AuthChallengeResponse - * @interface ICMsgGC_GameServer_AuthChallengeResponse + * @typedef {Object} CMsgGC_GameServer_AuthChallengeResponse.$Properties * @property {number|null} [game_server_account_id] CMsgGC_GameServer_AuthChallengeResponse game_server_account_id * @property {Uint8Array|null} [hashed_challenge_string] CMsgGC_GameServer_AuthChallengeResponse hashed_challenge_string + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_GameServer_AuthChallengeResponse. + * @exports ICMsgGC_GameServer_AuthChallengeResponse + * @interface ICMsgGC_GameServer_AuthChallengeResponse + * @augments CMsgGC_GameServer_AuthChallengeResponse.$Properties + * @deprecated Use CMsgGC_GameServer_AuthChallengeResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_AuthChallengeResponse. + * @typedef {CMsgGC_GameServer_AuthChallengeResponse.$Properties} CMsgGC_GameServer_AuthChallengeResponse.$Shape */ /** * Constructs a new CMsgGC_GameServer_AuthChallengeResponse. * @exports CMsgGC_GameServer_AuthChallengeResponse * @classdesc Represents a CMsgGC_GameServer_AuthChallengeResponse. - * @implements ICMsgGC_GameServer_AuthChallengeResponse * @constructor - * @param {ICMsgGC_GameServer_AuthChallengeResponse=} [properties] Properties to set + * @param {CMsgGC_GameServer_AuthChallengeResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_AuthChallengeResponse(properties) { + var CMsgGC_GameServer_AuthChallengeResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_AuthChallengeResponse game_server_account_id. @@ -9147,10 +11923,14 @@ * @function create * @memberof CMsgGC_GameServer_AuthChallengeResponse * @static - * @param {ICMsgGC_GameServer_AuthChallengeResponse=} [properties] Properties to set + * @param {CMsgGC_GameServer_AuthChallengeResponse.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_AuthChallengeResponse} CMsgGC_GameServer_AuthChallengeResponse instance + * @type {{ + * (properties: CMsgGC_GameServer_AuthChallengeResponse.$Shape): CMsgGC_GameServer_AuthChallengeResponse & CMsgGC_GameServer_AuthChallengeResponse.$Shape; + * (properties?: CMsgGC_GameServer_AuthChallengeResponse.$Properties): CMsgGC_GameServer_AuthChallengeResponse; + * }} */ - CMsgGC_GameServer_AuthChallengeResponse.create = function create(properties) { + CMsgGC_GameServer_AuthChallengeResponse.create = function(properties) { return new CMsgGC_GameServer_AuthChallengeResponse(properties); }; @@ -9159,17 +11939,24 @@ * @function encode * @memberof CMsgGC_GameServer_AuthChallengeResponse * @static - * @param {ICMsgGC_GameServer_AuthChallengeResponse} message CMsgGC_GameServer_AuthChallengeResponse message or plain object to encode + * @param {CMsgGC_GameServer_AuthChallengeResponse.$Properties} message CMsgGC_GameServer_AuthChallengeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_AuthChallengeResponse.encode = function encode(message, writer) { + CMsgGC_GameServer_AuthChallengeResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.game_server_account_id != null && Object.hasOwnProperty.call(message, "game_server_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.game_server_account_id); - if (message.hashed_challenge_string != null && Object.hasOwnProperty.call(message, "hashed_challenge_string")) + if (message.hashed_challenge_string != null && $Object.hasOwnProperty.call(message, "hashed_challenge_string")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hashed_challenge_string); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9178,12 +11965,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_AuthChallengeResponse * @static - * @param {ICMsgGC_GameServer_AuthChallengeResponse} message CMsgGC_GameServer_AuthChallengeResponse message or plain object to encode + * @param {CMsgGC_GameServer_AuthChallengeResponse.$Properties} message CMsgGC_GameServer_AuthChallengeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_AuthChallengeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_AuthChallengeResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9193,28 +11980,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_AuthChallengeResponse} CMsgGC_GameServer_AuthChallengeResponse + * @returns {CMsgGC_GameServer_AuthChallengeResponse & CMsgGC_GameServer_AuthChallengeResponse.$Shape} CMsgGC_GameServer_AuthChallengeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_AuthChallengeResponse.decode = function decode(reader, length) { + CMsgGC_GameServer_AuthChallengeResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_AuthChallengeResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_AuthChallengeResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.game_server_account_id = reader.uint32(); - break; - case 2: - message.hashed_challenge_string = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.game_server_account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.hashed_challenge_string = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9224,11 +12031,11 @@ * @memberof CMsgGC_GameServer_AuthChallengeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_AuthChallengeResponse} CMsgGC_GameServer_AuthChallengeResponse + * @returns {CMsgGC_GameServer_AuthChallengeResponse & CMsgGC_GameServer_AuthChallengeResponse.$Shape} CMsgGC_GameServer_AuthChallengeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_AuthChallengeResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_AuthChallengeResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9242,13 +12049,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_AuthChallengeResponse.verify = function verify(message) { + CMsgGC_GameServer_AuthChallengeResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.game_server_account_id != null && message.hasOwnProperty("game_server_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) if (!$util.isInteger(message.game_server_account_id)) return "game_server_account_id: integer expected"; - if (message.hashed_challenge_string != null && message.hasOwnProperty("hashed_challenge_string")) + if (message.hashed_challenge_string != null && $Object.hasOwnProperty.call(message, "hashed_challenge_string")) if (!(message.hashed_challenge_string && typeof message.hashed_challenge_string.length === "number" || $util.isString(message.hashed_challenge_string))) return "hashed_challenge_string: buffer expected"; return null; @@ -9262,16 +12073,22 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_AuthChallengeResponse} CMsgGC_GameServer_AuthChallengeResponse */ - CMsgGC_GameServer_AuthChallengeResponse.fromObject = function fromObject(object) { + CMsgGC_GameServer_AuthChallengeResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_AuthChallengeResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_AuthChallengeResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_AuthChallengeResponse(); if (object.game_server_account_id != null) message.game_server_account_id = object.game_server_account_id >>> 0; if (object.hashed_challenge_string != null) if (typeof object.hashed_challenge_string === "string") $util.base64.decode(object.hashed_challenge_string, message.hashed_challenge_string = $util.newBuffer($util.base64.length(object.hashed_challenge_string)), 0); - else if (object.hashed_challenge_string.length) + else if (object.hashed_challenge_string.length >= 0) message.hashed_challenge_string = object.hashed_challenge_string; return message; }; @@ -9285,24 +12102,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_AuthChallengeResponse.toObject = function toObject(message, options) { + CMsgGC_GameServer_AuthChallengeResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.game_server_account_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.hashed_challenge_string = ""; else { object.hashed_challenge_string = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.hashed_challenge_string = $util.newBuffer(object.hashed_challenge_string); } } - if (message.game_server_account_id != null && message.hasOwnProperty("game_server_account_id")) + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) object.game_server_account_id = message.game_server_account_id; - if (message.hashed_challenge_string != null && message.hasOwnProperty("hashed_challenge_string")) - object.hashed_challenge_string = options.bytes === String ? $util.base64.encode(message.hashed_challenge_string, 0, message.hashed_challenge_string.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashed_challenge_string) : message.hashed_challenge_string; + if (message.hashed_challenge_string != null && $Object.hasOwnProperty.call(message, "hashed_challenge_string")) + object.hashed_challenge_string = options.bytes === $String ? $util.base64.encode(message.hashed_challenge_string, 0, message.hashed_challenge_string.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.hashed_challenge_string) : message.hashed_challenge_string; return object; }; @@ -9313,8 +12134,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_AuthChallengeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_AuthChallengeResponse.prototype.toJSON = function() { + return CMsgGC_GameServer_AuthChallengeResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_AuthChallengeResponse + * @function getTypeUrl + * @memberof CMsgGC_GameServer_AuthChallengeResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_AuthChallengeResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_AuthChallengeResponse"; }; return CMsgGC_GameServer_AuthChallengeResponse; @@ -9322,27 +12157,40 @@ $root.CMsgGC_GameServer_CreateIdentity = (function() { + /** + * Properties of a CMsgGC_GameServer_CreateIdentity. + * @typedef {Object} CMsgGC_GameServer_CreateIdentity.$Properties + * @property {number|null} [account_id] CMsgGC_GameServer_CreateIdentity account_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_GameServer_CreateIdentity. * @exports ICMsgGC_GameServer_CreateIdentity * @interface ICMsgGC_GameServer_CreateIdentity - * @property {number|null} [account_id] CMsgGC_GameServer_CreateIdentity account_id + * @augments CMsgGC_GameServer_CreateIdentity.$Properties + * @deprecated Use CMsgGC_GameServer_CreateIdentity.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_CreateIdentity. + * @typedef {CMsgGC_GameServer_CreateIdentity.$Properties} CMsgGC_GameServer_CreateIdentity.$Shape */ /** * Constructs a new CMsgGC_GameServer_CreateIdentity. * @exports CMsgGC_GameServer_CreateIdentity * @classdesc Represents a CMsgGC_GameServer_CreateIdentity. - * @implements ICMsgGC_GameServer_CreateIdentity * @constructor - * @param {ICMsgGC_GameServer_CreateIdentity=} [properties] Properties to set + * @param {CMsgGC_GameServer_CreateIdentity.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_CreateIdentity(properties) { + var CMsgGC_GameServer_CreateIdentity = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_CreateIdentity account_id. @@ -9357,10 +12205,14 @@ * @function create * @memberof CMsgGC_GameServer_CreateIdentity * @static - * @param {ICMsgGC_GameServer_CreateIdentity=} [properties] Properties to set + * @param {CMsgGC_GameServer_CreateIdentity.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_CreateIdentity} CMsgGC_GameServer_CreateIdentity instance + * @type {{ + * (properties: CMsgGC_GameServer_CreateIdentity.$Shape): CMsgGC_GameServer_CreateIdentity & CMsgGC_GameServer_CreateIdentity.$Shape; + * (properties?: CMsgGC_GameServer_CreateIdentity.$Properties): CMsgGC_GameServer_CreateIdentity; + * }} */ - CMsgGC_GameServer_CreateIdentity.create = function create(properties) { + CMsgGC_GameServer_CreateIdentity.create = function(properties) { return new CMsgGC_GameServer_CreateIdentity(properties); }; @@ -9369,15 +12221,22 @@ * @function encode * @memberof CMsgGC_GameServer_CreateIdentity * @static - * @param {ICMsgGC_GameServer_CreateIdentity} message CMsgGC_GameServer_CreateIdentity message or plain object to encode + * @param {CMsgGC_GameServer_CreateIdentity.$Properties} message CMsgGC_GameServer_CreateIdentity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_CreateIdentity.encode = function encode(message, writer) { + CMsgGC_GameServer_CreateIdentity.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9386,12 +12245,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_CreateIdentity * @static - * @param {ICMsgGC_GameServer_CreateIdentity} message CMsgGC_GameServer_CreateIdentity message or plain object to encode + * @param {CMsgGC_GameServer_CreateIdentity.$Properties} message CMsgGC_GameServer_CreateIdentity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_CreateIdentity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_CreateIdentity.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9401,25 +12260,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_CreateIdentity} CMsgGC_GameServer_CreateIdentity + * @returns {CMsgGC_GameServer_CreateIdentity & CMsgGC_GameServer_CreateIdentity.$Shape} CMsgGC_GameServer_CreateIdentity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_CreateIdentity.decode = function decode(reader, length) { + CMsgGC_GameServer_CreateIdentity.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_CreateIdentity(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_CreateIdentity(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9429,11 +12305,11 @@ * @memberof CMsgGC_GameServer_CreateIdentity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_CreateIdentity} CMsgGC_GameServer_CreateIdentity + * @returns {CMsgGC_GameServer_CreateIdentity & CMsgGC_GameServer_CreateIdentity.$Shape} CMsgGC_GameServer_CreateIdentity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_CreateIdentity.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_CreateIdentity.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9447,10 +12323,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_CreateIdentity.verify = function verify(message) { + CMsgGC_GameServer_CreateIdentity.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; return null; @@ -9464,9 +12344,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_CreateIdentity} CMsgGC_GameServer_CreateIdentity */ - CMsgGC_GameServer_CreateIdentity.fromObject = function fromObject(object) { + CMsgGC_GameServer_CreateIdentity.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_CreateIdentity) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_CreateIdentity: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_CreateIdentity(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -9482,13 +12368,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_CreateIdentity.toObject = function toObject(message, options) { + CMsgGC_GameServer_CreateIdentity.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.account_id = 0; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; return object; }; @@ -9500,8 +12390,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_CreateIdentity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_CreateIdentity.prototype.toJSON = function() { + return CMsgGC_GameServer_CreateIdentity.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_CreateIdentity + * @function getTypeUrl + * @memberof CMsgGC_GameServer_CreateIdentity + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_CreateIdentity.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_CreateIdentity"; }; return CMsgGC_GameServer_CreateIdentity; @@ -9511,28 +12415,41 @@ /** * Properties of a CMsgGC_GameServer_CreateIdentityResponse. - * @exports ICMsgGC_GameServer_CreateIdentityResponse - * @interface ICMsgGC_GameServer_CreateIdentityResponse + * @typedef {Object} CMsgGC_GameServer_CreateIdentityResponse.$Properties * @property {boolean|null} [account_created] CMsgGC_GameServer_CreateIdentityResponse account_created * @property {number|null} [game_server_account_id] CMsgGC_GameServer_CreateIdentityResponse game_server_account_id * @property {string|null} [game_server_identity_token] CMsgGC_GameServer_CreateIdentityResponse game_server_identity_token * @property {CMsgGC_GameServer_CreateIdentityResponse.EStatus|null} [status] CMsgGC_GameServer_CreateIdentityResponse status + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_GameServer_CreateIdentityResponse. + * @exports ICMsgGC_GameServer_CreateIdentityResponse + * @interface ICMsgGC_GameServer_CreateIdentityResponse + * @augments CMsgGC_GameServer_CreateIdentityResponse.$Properties + * @deprecated Use CMsgGC_GameServer_CreateIdentityResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_CreateIdentityResponse. + * @typedef {CMsgGC_GameServer_CreateIdentityResponse.$Properties} CMsgGC_GameServer_CreateIdentityResponse.$Shape */ /** * Constructs a new CMsgGC_GameServer_CreateIdentityResponse. * @exports CMsgGC_GameServer_CreateIdentityResponse * @classdesc Represents a CMsgGC_GameServer_CreateIdentityResponse. - * @implements ICMsgGC_GameServer_CreateIdentityResponse * @constructor - * @param {ICMsgGC_GameServer_CreateIdentityResponse=} [properties] Properties to set + * @param {CMsgGC_GameServer_CreateIdentityResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_CreateIdentityResponse(properties) { + var CMsgGC_GameServer_CreateIdentityResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_CreateIdentityResponse account_created. @@ -9571,10 +12488,14 @@ * @function create * @memberof CMsgGC_GameServer_CreateIdentityResponse * @static - * @param {ICMsgGC_GameServer_CreateIdentityResponse=} [properties] Properties to set + * @param {CMsgGC_GameServer_CreateIdentityResponse.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_CreateIdentityResponse} CMsgGC_GameServer_CreateIdentityResponse instance + * @type {{ + * (properties: CMsgGC_GameServer_CreateIdentityResponse.$Shape): CMsgGC_GameServer_CreateIdentityResponse & CMsgGC_GameServer_CreateIdentityResponse.$Shape; + * (properties?: CMsgGC_GameServer_CreateIdentityResponse.$Properties): CMsgGC_GameServer_CreateIdentityResponse; + * }} */ - CMsgGC_GameServer_CreateIdentityResponse.create = function create(properties) { + CMsgGC_GameServer_CreateIdentityResponse.create = function(properties) { return new CMsgGC_GameServer_CreateIdentityResponse(properties); }; @@ -9583,21 +12504,28 @@ * @function encode * @memberof CMsgGC_GameServer_CreateIdentityResponse * @static - * @param {ICMsgGC_GameServer_CreateIdentityResponse} message CMsgGC_GameServer_CreateIdentityResponse message or plain object to encode + * @param {CMsgGC_GameServer_CreateIdentityResponse.$Properties} message CMsgGC_GameServer_CreateIdentityResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_CreateIdentityResponse.encode = function encode(message, writer) { + CMsgGC_GameServer_CreateIdentityResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_created != null && Object.hasOwnProperty.call(message, "account_created")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_created != null && $Object.hasOwnProperty.call(message, "account_created")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.account_created); - if (message.game_server_account_id != null && Object.hasOwnProperty.call(message, "game_server_account_id")) + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.game_server_account_id); - if (message.game_server_identity_token != null && Object.hasOwnProperty.call(message, "game_server_identity_token")) + if (message.game_server_identity_token != null && $Object.hasOwnProperty.call(message, "game_server_identity_token")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.game_server_identity_token); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9606,12 +12534,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_CreateIdentityResponse * @static - * @param {ICMsgGC_GameServer_CreateIdentityResponse} message CMsgGC_GameServer_CreateIdentityResponse message or plain object to encode + * @param {CMsgGC_GameServer_CreateIdentityResponse.$Properties} message CMsgGC_GameServer_CreateIdentityResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_CreateIdentityResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_CreateIdentityResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9621,34 +12549,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_CreateIdentityResponse} CMsgGC_GameServer_CreateIdentityResponse + * @returns {CMsgGC_GameServer_CreateIdentityResponse & CMsgGC_GameServer_CreateIdentityResponse.$Shape} CMsgGC_GameServer_CreateIdentityResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_CreateIdentityResponse.decode = function decode(reader, length) { + CMsgGC_GameServer_CreateIdentityResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_CreateIdentityResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_CreateIdentityResponse(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_created = reader.bool(); - break; - case 2: - message.game_server_account_id = reader.uint32(); - break; - case 3: - message.game_server_identity_token = reader.string(); - break; - case 4: - message.status = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_created = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.game_server_account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.game_server_identity_token = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGC_GameServer_CreateIdentityResponse.EStatus[value] !== $undefined) + message.status = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9658,11 +12618,11 @@ * @memberof CMsgGC_GameServer_CreateIdentityResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_CreateIdentityResponse} CMsgGC_GameServer_CreateIdentityResponse + * @returns {CMsgGC_GameServer_CreateIdentityResponse & CMsgGC_GameServer_CreateIdentityResponse.$Shape} CMsgGC_GameServer_CreateIdentityResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_CreateIdentityResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_CreateIdentityResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9676,19 +12636,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_CreateIdentityResponse.verify = function verify(message) { + CMsgGC_GameServer_CreateIdentityResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_created != null && message.hasOwnProperty("account_created")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_created != null && $Object.hasOwnProperty.call(message, "account_created")) if (typeof message.account_created !== "boolean") return "account_created: boolean expected"; - if (message.game_server_account_id != null && message.hasOwnProperty("game_server_account_id")) + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) if (!$util.isInteger(message.game_server_account_id)) return "game_server_account_id: integer expected"; - if (message.game_server_identity_token != null && message.hasOwnProperty("game_server_identity_token")) + if (message.game_server_identity_token != null && $Object.hasOwnProperty.call(message, "game_server_identity_token")) if (!$util.isString(message.game_server_identity_token)) return "game_server_identity_token: string expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -9709,16 +12673,22 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_CreateIdentityResponse} CMsgGC_GameServer_CreateIdentityResponse */ - CMsgGC_GameServer_CreateIdentityResponse.fromObject = function fromObject(object) { + CMsgGC_GameServer_CreateIdentityResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_CreateIdentityResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_CreateIdentityResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_CreateIdentityResponse(); if (object.account_created != null) - message.account_created = Boolean(object.account_created); + message.account_created = $Boolean(object.account_created); if (object.game_server_account_id != null) message.game_server_account_id = object.game_server_account_id >>> 0; if (object.game_server_identity_token != null) - message.game_server_identity_token = String(object.game_server_identity_token); + message.game_server_identity_token = $String(object.game_server_identity_token); switch (object.status) { case "kStatus_GenericFailure": case 0: @@ -9736,6 +12706,7 @@ case 1: message.status = 1; break; + default: } return message; }; @@ -9749,24 +12720,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_CreateIdentityResponse.toObject = function toObject(message, options) { + CMsgGC_GameServer_CreateIdentityResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_created = false; object.game_server_account_id = 0; object.game_server_identity_token = ""; - object.status = options.enums === String ? "kStatus_GenericFailure" : 0; + object.status = options.enums === $String ? "kStatus_GenericFailure" : 0; } - if (message.account_created != null && message.hasOwnProperty("account_created")) + if (message.account_created != null && $Object.hasOwnProperty.call(message, "account_created")) object.account_created = message.account_created; - if (message.game_server_account_id != null && message.hasOwnProperty("game_server_account_id")) + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) object.game_server_account_id = message.game_server_account_id; - if (message.game_server_identity_token != null && message.hasOwnProperty("game_server_identity_token")) + if (message.game_server_identity_token != null && $Object.hasOwnProperty.call(message, "game_server_identity_token")) object.game_server_identity_token = message.game_server_identity_token; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.CMsgGC_GameServer_CreateIdentityResponse.EStatus[message.status] : message.status; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + object.status = options.enums === $String ? $root.CMsgGC_GameServer_CreateIdentityResponse.EStatus[message.status] === $undefined ? message.status : $root.CMsgGC_GameServer_CreateIdentityResponse.EStatus[message.status] : message.status; return object; }; @@ -9777,8 +12752,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_CreateIdentityResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_CreateIdentityResponse.prototype.toJSON = function() { + return CMsgGC_GameServer_CreateIdentityResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_CreateIdentityResponse + * @function getTypeUrl + * @memberof CMsgGC_GameServer_CreateIdentityResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_CreateIdentityResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_CreateIdentityResponse"; }; /** @@ -9791,7 +12780,7 @@ * @property {number} kStatus_Created=1 kStatus_Created value */ CMsgGC_GameServer_CreateIdentityResponse.EStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "kStatus_GenericFailure"] = 0; values[valuesById[-1] = "kStatus_TooMany"] = -1; values[valuesById[-2] = "kStatus_NoPrivs"] = -2; @@ -9804,27 +12793,40 @@ $root.CMsgGC_GameServer_List = (function() { + /** + * Properties of a CMsgGC_GameServer_List. + * @typedef {Object} CMsgGC_GameServer_List.$Properties + * @property {number|null} [account_id] CMsgGC_GameServer_List account_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_GameServer_List. * @exports ICMsgGC_GameServer_List * @interface ICMsgGC_GameServer_List - * @property {number|null} [account_id] CMsgGC_GameServer_List account_id + * @augments CMsgGC_GameServer_List.$Properties + * @deprecated Use CMsgGC_GameServer_List.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_List. + * @typedef {CMsgGC_GameServer_List.$Properties} CMsgGC_GameServer_List.$Shape */ /** * Constructs a new CMsgGC_GameServer_List. * @exports CMsgGC_GameServer_List * @classdesc Represents a CMsgGC_GameServer_List. - * @implements ICMsgGC_GameServer_List * @constructor - * @param {ICMsgGC_GameServer_List=} [properties] Properties to set + * @param {CMsgGC_GameServer_List.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_List(properties) { + var CMsgGC_GameServer_List = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_List account_id. @@ -9839,10 +12841,14 @@ * @function create * @memberof CMsgGC_GameServer_List * @static - * @param {ICMsgGC_GameServer_List=} [properties] Properties to set + * @param {CMsgGC_GameServer_List.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_List} CMsgGC_GameServer_List instance + * @type {{ + * (properties: CMsgGC_GameServer_List.$Shape): CMsgGC_GameServer_List & CMsgGC_GameServer_List.$Shape; + * (properties?: CMsgGC_GameServer_List.$Properties): CMsgGC_GameServer_List; + * }} */ - CMsgGC_GameServer_List.create = function create(properties) { + CMsgGC_GameServer_List.create = function(properties) { return new CMsgGC_GameServer_List(properties); }; @@ -9851,15 +12857,22 @@ * @function encode * @memberof CMsgGC_GameServer_List * @static - * @param {ICMsgGC_GameServer_List} message CMsgGC_GameServer_List message or plain object to encode + * @param {CMsgGC_GameServer_List.$Properties} message CMsgGC_GameServer_List message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_List.encode = function encode(message, writer) { + CMsgGC_GameServer_List.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9868,12 +12881,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_List * @static - * @param {ICMsgGC_GameServer_List} message CMsgGC_GameServer_List message or plain object to encode + * @param {CMsgGC_GameServer_List.$Properties} message CMsgGC_GameServer_List message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_List.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_List.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9883,25 +12896,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_List} CMsgGC_GameServer_List + * @returns {CMsgGC_GameServer_List & CMsgGC_GameServer_List.$Shape} CMsgGC_GameServer_List * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_List.decode = function decode(reader, length) { + CMsgGC_GameServer_List.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_List(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_List(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9911,11 +12941,11 @@ * @memberof CMsgGC_GameServer_List * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_List} CMsgGC_GameServer_List + * @returns {CMsgGC_GameServer_List & CMsgGC_GameServer_List.$Shape} CMsgGC_GameServer_List * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_List.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_List.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9929,10 +12959,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_List.verify = function verify(message) { + CMsgGC_GameServer_List.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; return null; @@ -9946,9 +12980,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_List} CMsgGC_GameServer_List */ - CMsgGC_GameServer_List.fromObject = function fromObject(object) { + CMsgGC_GameServer_List.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_List) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_List: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_List(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -9964,13 +13004,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_List.toObject = function toObject(message, options) { + CMsgGC_GameServer_List.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.account_id = 0; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; return object; }; @@ -9982,8 +13026,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_List.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_List.prototype.toJSON = function() { + return CMsgGC_GameServer_List.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_List + * @function getTypeUrl + * @memberof CMsgGC_GameServer_List + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_List.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_List"; }; return CMsgGC_GameServer_List; @@ -9991,32 +13049,45 @@ $root.CMsgGC_GameServer_ListResponse = (function() { + /** + * Properties of a CMsgGC_GameServer_ListResponse. + * @typedef {Object} CMsgGC_GameServer_ListResponse.$Properties + * @property {Array.|null} [owned_game_servers] CMsgGC_GameServer_ListResponse owned_game_servers + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_GameServer_ListResponse. * @exports ICMsgGC_GameServer_ListResponse * @interface ICMsgGC_GameServer_ListResponse - * @property {Array.|null} [owned_game_servers] CMsgGC_GameServer_ListResponse owned_game_servers + * @augments CMsgGC_GameServer_ListResponse.$Properties + * @deprecated Use CMsgGC_GameServer_ListResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_ListResponse. + * @typedef {CMsgGC_GameServer_ListResponse.$Properties} CMsgGC_GameServer_ListResponse.$Shape */ /** * Constructs a new CMsgGC_GameServer_ListResponse. * @exports CMsgGC_GameServer_ListResponse * @classdesc Represents a CMsgGC_GameServer_ListResponse. - * @implements ICMsgGC_GameServer_ListResponse * @constructor - * @param {ICMsgGC_GameServer_ListResponse=} [properties] Properties to set + * @param {CMsgGC_GameServer_ListResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_ListResponse(properties) { + var CMsgGC_GameServer_ListResponse = function (properties) { this.owned_game_servers = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_ListResponse owned_game_servers. - * @member {Array.} owned_game_servers + * @member {Array.} owned_game_servers * @memberof CMsgGC_GameServer_ListResponse * @instance */ @@ -10027,10 +13098,14 @@ * @function create * @memberof CMsgGC_GameServer_ListResponse * @static - * @param {ICMsgGC_GameServer_ListResponse=} [properties] Properties to set + * @param {CMsgGC_GameServer_ListResponse.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_ListResponse} CMsgGC_GameServer_ListResponse instance + * @type {{ + * (properties: CMsgGC_GameServer_ListResponse.$Shape): CMsgGC_GameServer_ListResponse & CMsgGC_GameServer_ListResponse.$Shape; + * (properties?: CMsgGC_GameServer_ListResponse.$Properties): CMsgGC_GameServer_ListResponse; + * }} */ - CMsgGC_GameServer_ListResponse.create = function create(properties) { + CMsgGC_GameServer_ListResponse.create = function(properties) { return new CMsgGC_GameServer_ListResponse(properties); }; @@ -10039,16 +13114,23 @@ * @function encode * @memberof CMsgGC_GameServer_ListResponse * @static - * @param {ICMsgGC_GameServer_ListResponse} message CMsgGC_GameServer_ListResponse message or plain object to encode + * @param {CMsgGC_GameServer_ListResponse.$Properties} message CMsgGC_GameServer_ListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_ListResponse.encode = function encode(message, writer) { + CMsgGC_GameServer_ListResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.owned_game_servers != null && message.owned_game_servers.length) for (var i = 0; i < message.owned_game_servers.length; ++i) - $root.CMsgGC_GameServer_ListResponse.GameServerIdentity.encode(message.owned_game_servers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGC_GameServer_ListResponse.GameServerIdentity.encode(message.owned_game_servers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10057,12 +13139,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_ListResponse * @static - * @param {ICMsgGC_GameServer_ListResponse} message CMsgGC_GameServer_ListResponse message or plain object to encode + * @param {CMsgGC_GameServer_ListResponse.$Properties} message CMsgGC_GameServer_ListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_ListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_ListResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10072,27 +13154,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_ListResponse} CMsgGC_GameServer_ListResponse + * @returns {CMsgGC_GameServer_ListResponse & CMsgGC_GameServer_ListResponse.$Shape} CMsgGC_GameServer_ListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_ListResponse.decode = function decode(reader, length) { + CMsgGC_GameServer_ListResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_ListResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_ListResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.owned_game_servers && message.owned_game_servers.length)) - message.owned_game_servers = []; - message.owned_game_servers.push($root.CMsgGC_GameServer_ListResponse.GameServerIdentity.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.owned_game_servers && message.owned_game_servers.length)) + message.owned_game_servers = []; + message.owned_game_servers.push($root.CMsgGC_GameServer_ListResponse.GameServerIdentity.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10102,11 +13201,11 @@ * @memberof CMsgGC_GameServer_ListResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_ListResponse} CMsgGC_GameServer_ListResponse + * @returns {CMsgGC_GameServer_ListResponse & CMsgGC_GameServer_ListResponse.$Shape} CMsgGC_GameServer_ListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_ListResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_ListResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10120,14 +13219,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_ListResponse.verify = function verify(message) { + CMsgGC_GameServer_ListResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.owned_game_servers != null && message.hasOwnProperty("owned_game_servers")) { - if (!Array.isArray(message.owned_game_servers)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.owned_game_servers != null && $Object.hasOwnProperty.call(message, "owned_game_servers")) { + if (!$Array.isArray(message.owned_game_servers)) return "owned_game_servers: array expected"; for (var i = 0; i < message.owned_game_servers.length; ++i) { - var error = $root.CMsgGC_GameServer_ListResponse.GameServerIdentity.verify(message.owned_game_servers[i]); + var error = $root.CMsgGC_GameServer_ListResponse.GameServerIdentity.verify(message.owned_game_servers[i], _depth + 1); if (error) return "owned_game_servers." + error; } @@ -10143,18 +13246,24 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_ListResponse} CMsgGC_GameServer_ListResponse */ - CMsgGC_GameServer_ListResponse.fromObject = function fromObject(object) { + CMsgGC_GameServer_ListResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_ListResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_ListResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_ListResponse(); if (object.owned_game_servers) { - if (!Array.isArray(object.owned_game_servers)) - throw TypeError(".CMsgGC_GameServer_ListResponse.owned_game_servers: array expected"); - message.owned_game_servers = []; + if (!$Array.isArray(object.owned_game_servers)) + throw $TypeError(".CMsgGC_GameServer_ListResponse.owned_game_servers: array expected"); + message.owned_game_servers = $Array(object.owned_game_servers.length); for (var i = 0; i < object.owned_game_servers.length; ++i) { - if (typeof object.owned_game_servers[i] !== "object") - throw TypeError(".CMsgGC_GameServer_ListResponse.owned_game_servers: object expected"); - message.owned_game_servers[i] = $root.CMsgGC_GameServer_ListResponse.GameServerIdentity.fromObject(object.owned_game_servers[i]); + if (!$util.isObject(object.owned_game_servers[i])) + throw $TypeError(".CMsgGC_GameServer_ListResponse.owned_game_servers: object expected"); + message.owned_game_servers[i] = $root.CMsgGC_GameServer_ListResponse.GameServerIdentity.fromObject(object.owned_game_servers[i], _depth + 1); } } return message; @@ -10169,16 +13278,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_ListResponse.toObject = function toObject(message, options) { + CMsgGC_GameServer_ListResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.owned_game_servers = []; if (message.owned_game_servers && message.owned_game_servers.length) { - object.owned_game_servers = []; + object.owned_game_servers = $Array(message.owned_game_servers.length); for (var j = 0; j < message.owned_game_servers.length; ++j) - object.owned_game_servers[j] = $root.CMsgGC_GameServer_ListResponse.GameServerIdentity.toObject(message.owned_game_servers[j], options); + object.owned_game_servers[j] = $root.CMsgGC_GameServer_ListResponse.GameServerIdentity.toObject(message.owned_game_servers[j], options, _depth + 1); } return object; }; @@ -10190,36 +13303,63 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_ListResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_ListResponse.prototype.toJSON = function() { + return CMsgGC_GameServer_ListResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_ListResponse + * @function getTypeUrl + * @memberof CMsgGC_GameServer_ListResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_ListResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_ListResponse"; }; CMsgGC_GameServer_ListResponse.GameServerIdentity = (function() { /** * Properties of a GameServerIdentity. - * @memberof CMsgGC_GameServer_ListResponse - * @interface IGameServerIdentity + * @typedef {Object} CMsgGC_GameServer_ListResponse.GameServerIdentity.$Properties * @property {number|null} [game_server_account_id] GameServerIdentity game_server_account_id * @property {string|null} [game_server_identity_token] GameServerIdentity game_server_identity_token * @property {number|null} [game_server_standing] GameServerIdentity game_server_standing * @property {number|null} [game_server_standing_trend] GameServerIdentity game_server_standing_trend + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GameServerIdentity. + * @memberof CMsgGC_GameServer_ListResponse + * @interface IGameServerIdentity + * @augments CMsgGC_GameServer_ListResponse.GameServerIdentity.$Properties + * @deprecated Use CMsgGC_GameServer_ListResponse.GameServerIdentity.$Properties instead. + */ + + /** + * Shape of a GameServerIdentity. + * @typedef {CMsgGC_GameServer_ListResponse.GameServerIdentity.$Properties} CMsgGC_GameServer_ListResponse.GameServerIdentity.$Shape */ /** * Constructs a new GameServerIdentity. * @memberof CMsgGC_GameServer_ListResponse * @classdesc Represents a GameServerIdentity. - * @implements IGameServerIdentity * @constructor - * @param {CMsgGC_GameServer_ListResponse.IGameServerIdentity=} [properties] Properties to set + * @param {CMsgGC_GameServer_ListResponse.GameServerIdentity.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function GameServerIdentity(properties) { + var GameServerIdentity = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * GameServerIdentity game_server_account_id. @@ -10258,10 +13398,14 @@ * @function create * @memberof CMsgGC_GameServer_ListResponse.GameServerIdentity * @static - * @param {CMsgGC_GameServer_ListResponse.IGameServerIdentity=} [properties] Properties to set + * @param {CMsgGC_GameServer_ListResponse.GameServerIdentity.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_ListResponse.GameServerIdentity} GameServerIdentity instance + * @type {{ + * (properties: CMsgGC_GameServer_ListResponse.GameServerIdentity.$Shape): CMsgGC_GameServer_ListResponse.GameServerIdentity & CMsgGC_GameServer_ListResponse.GameServerIdentity.$Shape; + * (properties?: CMsgGC_GameServer_ListResponse.GameServerIdentity.$Properties): CMsgGC_GameServer_ListResponse.GameServerIdentity; + * }} */ - GameServerIdentity.create = function create(properties) { + GameServerIdentity.create = function(properties) { return new GameServerIdentity(properties); }; @@ -10270,21 +13414,28 @@ * @function encode * @memberof CMsgGC_GameServer_ListResponse.GameServerIdentity * @static - * @param {CMsgGC_GameServer_ListResponse.IGameServerIdentity} message GameServerIdentity message or plain object to encode + * @param {CMsgGC_GameServer_ListResponse.GameServerIdentity.$Properties} message GameServerIdentity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GameServerIdentity.encode = function encode(message, writer) { + GameServerIdentity.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.game_server_account_id != null && Object.hasOwnProperty.call(message, "game_server_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.game_server_account_id); - if (message.game_server_identity_token != null && Object.hasOwnProperty.call(message, "game_server_identity_token")) + if (message.game_server_identity_token != null && $Object.hasOwnProperty.call(message, "game_server_identity_token")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.game_server_identity_token); - if (message.game_server_standing != null && Object.hasOwnProperty.call(message, "game_server_standing")) + if (message.game_server_standing != null && $Object.hasOwnProperty.call(message, "game_server_standing")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.game_server_standing); - if (message.game_server_standing_trend != null && Object.hasOwnProperty.call(message, "game_server_standing_trend")) + if (message.game_server_standing_trend != null && $Object.hasOwnProperty.call(message, "game_server_standing_trend")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.game_server_standing_trend); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10293,12 +13444,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_ListResponse.GameServerIdentity * @static - * @param {CMsgGC_GameServer_ListResponse.IGameServerIdentity} message GameServerIdentity message or plain object to encode + * @param {CMsgGC_GameServer_ListResponse.GameServerIdentity.$Properties} message GameServerIdentity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GameServerIdentity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + GameServerIdentity.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10308,34 +13459,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_ListResponse.GameServerIdentity} GameServerIdentity + * @returns {CMsgGC_GameServer_ListResponse.GameServerIdentity & CMsgGC_GameServer_ListResponse.GameServerIdentity.$Shape} GameServerIdentity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GameServerIdentity.decode = function decode(reader, length) { + GameServerIdentity.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_ListResponse.GameServerIdentity(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_ListResponse.GameServerIdentity(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.game_server_account_id = reader.uint32(); - break; - case 2: - message.game_server_identity_token = reader.string(); - break; - case 3: - message.game_server_standing = reader.int32(); - break; - case 4: - message.game_server_standing_trend = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.game_server_account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.game_server_identity_token = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.game_server_standing = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.game_server_standing_trend = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10345,11 +13522,11 @@ * @memberof CMsgGC_GameServer_ListResponse.GameServerIdentity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_ListResponse.GameServerIdentity} GameServerIdentity + * @returns {CMsgGC_GameServer_ListResponse.GameServerIdentity & CMsgGC_GameServer_ListResponse.GameServerIdentity.$Shape} GameServerIdentity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GameServerIdentity.decodeDelimited = function decodeDelimited(reader) { + GameServerIdentity.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10363,19 +13540,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GameServerIdentity.verify = function verify(message) { + GameServerIdentity.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.game_server_account_id != null && message.hasOwnProperty("game_server_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) if (!$util.isInteger(message.game_server_account_id)) return "game_server_account_id: integer expected"; - if (message.game_server_identity_token != null && message.hasOwnProperty("game_server_identity_token")) + if (message.game_server_identity_token != null && $Object.hasOwnProperty.call(message, "game_server_identity_token")) if (!$util.isString(message.game_server_identity_token)) return "game_server_identity_token: string expected"; - if (message.game_server_standing != null && message.hasOwnProperty("game_server_standing")) + if (message.game_server_standing != null && $Object.hasOwnProperty.call(message, "game_server_standing")) if (!$util.isInteger(message.game_server_standing)) return "game_server_standing: integer expected"; - if (message.game_server_standing_trend != null && message.hasOwnProperty("game_server_standing_trend")) + if (message.game_server_standing_trend != null && $Object.hasOwnProperty.call(message, "game_server_standing_trend")) if (!$util.isInteger(message.game_server_standing_trend)) return "game_server_standing_trend: integer expected"; return null; @@ -10389,14 +13570,20 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_ListResponse.GameServerIdentity} GameServerIdentity */ - GameServerIdentity.fromObject = function fromObject(object) { + GameServerIdentity.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_ListResponse.GameServerIdentity) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_ListResponse.GameServerIdentity: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_ListResponse.GameServerIdentity(); if (object.game_server_account_id != null) message.game_server_account_id = object.game_server_account_id >>> 0; if (object.game_server_identity_token != null) - message.game_server_identity_token = String(object.game_server_identity_token); + message.game_server_identity_token = $String(object.game_server_identity_token); if (object.game_server_standing != null) message.game_server_standing = object.game_server_standing | 0; if (object.game_server_standing_trend != null) @@ -10413,9 +13600,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GameServerIdentity.toObject = function toObject(message, options) { + GameServerIdentity.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.game_server_account_id = 0; @@ -10423,13 +13614,13 @@ object.game_server_standing = 0; object.game_server_standing_trend = 0; } - if (message.game_server_account_id != null && message.hasOwnProperty("game_server_account_id")) + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) object.game_server_account_id = message.game_server_account_id; - if (message.game_server_identity_token != null && message.hasOwnProperty("game_server_identity_token")) + if (message.game_server_identity_token != null && $Object.hasOwnProperty.call(message, "game_server_identity_token")) object.game_server_identity_token = message.game_server_identity_token; - if (message.game_server_standing != null && message.hasOwnProperty("game_server_standing")) + if (message.game_server_standing != null && $Object.hasOwnProperty.call(message, "game_server_standing")) object.game_server_standing = message.game_server_standing; - if (message.game_server_standing_trend != null && message.hasOwnProperty("game_server_standing_trend")) + if (message.game_server_standing_trend != null && $Object.hasOwnProperty.call(message, "game_server_standing_trend")) object.game_server_standing_trend = message.game_server_standing_trend; return object; }; @@ -10441,8 +13632,22 @@ * @instance * @returns {Object.} JSON object */ - GameServerIdentity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + GameServerIdentity.prototype.toJSON = function() { + return GameServerIdentity.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GameServerIdentity + * @function getTypeUrl + * @memberof CMsgGC_GameServer_ListResponse.GameServerIdentity + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GameServerIdentity.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_ListResponse.GameServerIdentity"; }; return GameServerIdentity; @@ -10453,27 +13658,40 @@ $root.CMsgGC_GameServer_ResetIdentity = (function() { + /** + * Properties of a CMsgGC_GameServer_ResetIdentity. + * @typedef {Object} CMsgGC_GameServer_ResetIdentity.$Properties + * @property {number|null} [game_server_account_id] CMsgGC_GameServer_ResetIdentity game_server_account_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_GameServer_ResetIdentity. * @exports ICMsgGC_GameServer_ResetIdentity * @interface ICMsgGC_GameServer_ResetIdentity - * @property {number|null} [game_server_account_id] CMsgGC_GameServer_ResetIdentity game_server_account_id + * @augments CMsgGC_GameServer_ResetIdentity.$Properties + * @deprecated Use CMsgGC_GameServer_ResetIdentity.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_ResetIdentity. + * @typedef {CMsgGC_GameServer_ResetIdentity.$Properties} CMsgGC_GameServer_ResetIdentity.$Shape */ /** * Constructs a new CMsgGC_GameServer_ResetIdentity. * @exports CMsgGC_GameServer_ResetIdentity * @classdesc Represents a CMsgGC_GameServer_ResetIdentity. - * @implements ICMsgGC_GameServer_ResetIdentity * @constructor - * @param {ICMsgGC_GameServer_ResetIdentity=} [properties] Properties to set + * @param {CMsgGC_GameServer_ResetIdentity.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_ResetIdentity(properties) { + var CMsgGC_GameServer_ResetIdentity = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_ResetIdentity game_server_account_id. @@ -10488,10 +13706,14 @@ * @function create * @memberof CMsgGC_GameServer_ResetIdentity * @static - * @param {ICMsgGC_GameServer_ResetIdentity=} [properties] Properties to set + * @param {CMsgGC_GameServer_ResetIdentity.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_ResetIdentity} CMsgGC_GameServer_ResetIdentity instance + * @type {{ + * (properties: CMsgGC_GameServer_ResetIdentity.$Shape): CMsgGC_GameServer_ResetIdentity & CMsgGC_GameServer_ResetIdentity.$Shape; + * (properties?: CMsgGC_GameServer_ResetIdentity.$Properties): CMsgGC_GameServer_ResetIdentity; + * }} */ - CMsgGC_GameServer_ResetIdentity.create = function create(properties) { + CMsgGC_GameServer_ResetIdentity.create = function(properties) { return new CMsgGC_GameServer_ResetIdentity(properties); }; @@ -10500,15 +13722,22 @@ * @function encode * @memberof CMsgGC_GameServer_ResetIdentity * @static - * @param {ICMsgGC_GameServer_ResetIdentity} message CMsgGC_GameServer_ResetIdentity message or plain object to encode + * @param {CMsgGC_GameServer_ResetIdentity.$Properties} message CMsgGC_GameServer_ResetIdentity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_ResetIdentity.encode = function encode(message, writer) { + CMsgGC_GameServer_ResetIdentity.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.game_server_account_id != null && Object.hasOwnProperty.call(message, "game_server_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.game_server_account_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10517,12 +13746,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_ResetIdentity * @static - * @param {ICMsgGC_GameServer_ResetIdentity} message CMsgGC_GameServer_ResetIdentity message or plain object to encode + * @param {CMsgGC_GameServer_ResetIdentity.$Properties} message CMsgGC_GameServer_ResetIdentity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_ResetIdentity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_ResetIdentity.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10532,25 +13761,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_ResetIdentity} CMsgGC_GameServer_ResetIdentity + * @returns {CMsgGC_GameServer_ResetIdentity & CMsgGC_GameServer_ResetIdentity.$Shape} CMsgGC_GameServer_ResetIdentity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_ResetIdentity.decode = function decode(reader, length) { + CMsgGC_GameServer_ResetIdentity.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_ResetIdentity(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_ResetIdentity(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.game_server_account_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.game_server_account_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10560,11 +13806,11 @@ * @memberof CMsgGC_GameServer_ResetIdentity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_ResetIdentity} CMsgGC_GameServer_ResetIdentity + * @returns {CMsgGC_GameServer_ResetIdentity & CMsgGC_GameServer_ResetIdentity.$Shape} CMsgGC_GameServer_ResetIdentity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_ResetIdentity.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_ResetIdentity.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10578,10 +13824,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_ResetIdentity.verify = function verify(message) { + CMsgGC_GameServer_ResetIdentity.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.game_server_account_id != null && message.hasOwnProperty("game_server_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) if (!$util.isInteger(message.game_server_account_id)) return "game_server_account_id: integer expected"; return null; @@ -10595,9 +13845,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_ResetIdentity} CMsgGC_GameServer_ResetIdentity */ - CMsgGC_GameServer_ResetIdentity.fromObject = function fromObject(object) { + CMsgGC_GameServer_ResetIdentity.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_ResetIdentity) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_ResetIdentity: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_ResetIdentity(); if (object.game_server_account_id != null) message.game_server_account_id = object.game_server_account_id >>> 0; @@ -10613,13 +13869,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_ResetIdentity.toObject = function toObject(message, options) { + CMsgGC_GameServer_ResetIdentity.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.game_server_account_id = 0; - if (message.game_server_account_id != null && message.hasOwnProperty("game_server_account_id")) + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) object.game_server_account_id = message.game_server_account_id; return object; }; @@ -10631,8 +13891,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_ResetIdentity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_ResetIdentity.prototype.toJSON = function() { + return CMsgGC_GameServer_ResetIdentity.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_ResetIdentity + * @function getTypeUrl + * @memberof CMsgGC_GameServer_ResetIdentity + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_ResetIdentity.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_ResetIdentity"; }; return CMsgGC_GameServer_ResetIdentity; @@ -10642,27 +13916,40 @@ /** * Properties of a CMsgGC_GameServer_ResetIdentityResponse. - * @exports ICMsgGC_GameServer_ResetIdentityResponse - * @interface ICMsgGC_GameServer_ResetIdentityResponse + * @typedef {Object} CMsgGC_GameServer_ResetIdentityResponse.$Properties * @property {boolean|null} [game_server_identity_token_reset] CMsgGC_GameServer_ResetIdentityResponse game_server_identity_token_reset * @property {number|null} [game_server_account_id] CMsgGC_GameServer_ResetIdentityResponse game_server_account_id * @property {string|null} [game_server_identity_token] CMsgGC_GameServer_ResetIdentityResponse game_server_identity_token + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_GameServer_ResetIdentityResponse. + * @exports ICMsgGC_GameServer_ResetIdentityResponse + * @interface ICMsgGC_GameServer_ResetIdentityResponse + * @augments CMsgGC_GameServer_ResetIdentityResponse.$Properties + * @deprecated Use CMsgGC_GameServer_ResetIdentityResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_ResetIdentityResponse. + * @typedef {CMsgGC_GameServer_ResetIdentityResponse.$Properties} CMsgGC_GameServer_ResetIdentityResponse.$Shape */ /** * Constructs a new CMsgGC_GameServer_ResetIdentityResponse. * @exports CMsgGC_GameServer_ResetIdentityResponse * @classdesc Represents a CMsgGC_GameServer_ResetIdentityResponse. - * @implements ICMsgGC_GameServer_ResetIdentityResponse * @constructor - * @param {ICMsgGC_GameServer_ResetIdentityResponse=} [properties] Properties to set + * @param {CMsgGC_GameServer_ResetIdentityResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_ResetIdentityResponse(properties) { + var CMsgGC_GameServer_ResetIdentityResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_ResetIdentityResponse game_server_identity_token_reset. @@ -10693,10 +13980,14 @@ * @function create * @memberof CMsgGC_GameServer_ResetIdentityResponse * @static - * @param {ICMsgGC_GameServer_ResetIdentityResponse=} [properties] Properties to set + * @param {CMsgGC_GameServer_ResetIdentityResponse.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_ResetIdentityResponse} CMsgGC_GameServer_ResetIdentityResponse instance + * @type {{ + * (properties: CMsgGC_GameServer_ResetIdentityResponse.$Shape): CMsgGC_GameServer_ResetIdentityResponse & CMsgGC_GameServer_ResetIdentityResponse.$Shape; + * (properties?: CMsgGC_GameServer_ResetIdentityResponse.$Properties): CMsgGC_GameServer_ResetIdentityResponse; + * }} */ - CMsgGC_GameServer_ResetIdentityResponse.create = function create(properties) { + CMsgGC_GameServer_ResetIdentityResponse.create = function(properties) { return new CMsgGC_GameServer_ResetIdentityResponse(properties); }; @@ -10705,19 +13996,26 @@ * @function encode * @memberof CMsgGC_GameServer_ResetIdentityResponse * @static - * @param {ICMsgGC_GameServer_ResetIdentityResponse} message CMsgGC_GameServer_ResetIdentityResponse message or plain object to encode + * @param {CMsgGC_GameServer_ResetIdentityResponse.$Properties} message CMsgGC_GameServer_ResetIdentityResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_ResetIdentityResponse.encode = function encode(message, writer) { + CMsgGC_GameServer_ResetIdentityResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.game_server_identity_token_reset != null && Object.hasOwnProperty.call(message, "game_server_identity_token_reset")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.game_server_identity_token_reset != null && $Object.hasOwnProperty.call(message, "game_server_identity_token_reset")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.game_server_identity_token_reset); - if (message.game_server_account_id != null && Object.hasOwnProperty.call(message, "game_server_account_id")) + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.game_server_account_id); - if (message.game_server_identity_token != null && Object.hasOwnProperty.call(message, "game_server_identity_token")) + if (message.game_server_identity_token != null && $Object.hasOwnProperty.call(message, "game_server_identity_token")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.game_server_identity_token); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10726,12 +14024,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_ResetIdentityResponse * @static - * @param {ICMsgGC_GameServer_ResetIdentityResponse} message CMsgGC_GameServer_ResetIdentityResponse message or plain object to encode + * @param {CMsgGC_GameServer_ResetIdentityResponse.$Properties} message CMsgGC_GameServer_ResetIdentityResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_ResetIdentityResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_ResetIdentityResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10741,31 +14039,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_ResetIdentityResponse} CMsgGC_GameServer_ResetIdentityResponse + * @returns {CMsgGC_GameServer_ResetIdentityResponse & CMsgGC_GameServer_ResetIdentityResponse.$Shape} CMsgGC_GameServer_ResetIdentityResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_ResetIdentityResponse.decode = function decode(reader, length) { + CMsgGC_GameServer_ResetIdentityResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_ResetIdentityResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_ResetIdentityResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.game_server_identity_token_reset = reader.bool(); - break; - case 2: - message.game_server_account_id = reader.uint32(); - break; - case 3: - message.game_server_identity_token = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.game_server_identity_token_reset = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.game_server_account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.game_server_identity_token = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10775,11 +14096,11 @@ * @memberof CMsgGC_GameServer_ResetIdentityResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_ResetIdentityResponse} CMsgGC_GameServer_ResetIdentityResponse + * @returns {CMsgGC_GameServer_ResetIdentityResponse & CMsgGC_GameServer_ResetIdentityResponse.$Shape} CMsgGC_GameServer_ResetIdentityResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_ResetIdentityResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_ResetIdentityResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10793,16 +14114,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_ResetIdentityResponse.verify = function verify(message) { + CMsgGC_GameServer_ResetIdentityResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.game_server_identity_token_reset != null && message.hasOwnProperty("game_server_identity_token_reset")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.game_server_identity_token_reset != null && $Object.hasOwnProperty.call(message, "game_server_identity_token_reset")) if (typeof message.game_server_identity_token_reset !== "boolean") return "game_server_identity_token_reset: boolean expected"; - if (message.game_server_account_id != null && message.hasOwnProperty("game_server_account_id")) + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) if (!$util.isInteger(message.game_server_account_id)) return "game_server_account_id: integer expected"; - if (message.game_server_identity_token != null && message.hasOwnProperty("game_server_identity_token")) + if (message.game_server_identity_token != null && $Object.hasOwnProperty.call(message, "game_server_identity_token")) if (!$util.isString(message.game_server_identity_token)) return "game_server_identity_token: string expected"; return null; @@ -10816,16 +14141,22 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_ResetIdentityResponse} CMsgGC_GameServer_ResetIdentityResponse */ - CMsgGC_GameServer_ResetIdentityResponse.fromObject = function fromObject(object) { + CMsgGC_GameServer_ResetIdentityResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_ResetIdentityResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_ResetIdentityResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_ResetIdentityResponse(); if (object.game_server_identity_token_reset != null) - message.game_server_identity_token_reset = Boolean(object.game_server_identity_token_reset); + message.game_server_identity_token_reset = $Boolean(object.game_server_identity_token_reset); if (object.game_server_account_id != null) message.game_server_account_id = object.game_server_account_id >>> 0; if (object.game_server_identity_token != null) - message.game_server_identity_token = String(object.game_server_identity_token); + message.game_server_identity_token = $String(object.game_server_identity_token); return message; }; @@ -10838,20 +14169,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_ResetIdentityResponse.toObject = function toObject(message, options) { + CMsgGC_GameServer_ResetIdentityResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.game_server_identity_token_reset = false; object.game_server_account_id = 0; object.game_server_identity_token = ""; } - if (message.game_server_identity_token_reset != null && message.hasOwnProperty("game_server_identity_token_reset")) + if (message.game_server_identity_token_reset != null && $Object.hasOwnProperty.call(message, "game_server_identity_token_reset")) object.game_server_identity_token_reset = message.game_server_identity_token_reset; - if (message.game_server_account_id != null && message.hasOwnProperty("game_server_account_id")) + if (message.game_server_account_id != null && $Object.hasOwnProperty.call(message, "game_server_account_id")) object.game_server_account_id = message.game_server_account_id; - if (message.game_server_identity_token != null && message.hasOwnProperty("game_server_identity_token")) + if (message.game_server_identity_token != null && $Object.hasOwnProperty.call(message, "game_server_identity_token")) object.game_server_identity_token = message.game_server_identity_token; return object; }; @@ -10863,8 +14198,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_ResetIdentityResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_ResetIdentityResponse.prototype.toJSON = function() { + return CMsgGC_GameServer_ResetIdentityResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_ResetIdentityResponse + * @function getTypeUrl + * @memberof CMsgGC_GameServer_ResetIdentityResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_ResetIdentityResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_ResetIdentityResponse"; }; return CMsgGC_GameServer_ResetIdentityResponse; @@ -10872,36 +14221,53 @@ $root.CMsgGC_GameServer_AckPolicy = (function() { + /** + * Properties of a CMsgGC_GameServer_AckPolicy. + * @typedef {Object} CMsgGC_GameServer_AckPolicy.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_GameServer_AckPolicy. * @exports ICMsgGC_GameServer_AckPolicy * @interface ICMsgGC_GameServer_AckPolicy + * @augments CMsgGC_GameServer_AckPolicy.$Properties + * @deprecated Use CMsgGC_GameServer_AckPolicy.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_AckPolicy. + * @typedef {CMsgGC_GameServer_AckPolicy.$Properties} CMsgGC_GameServer_AckPolicy.$Shape */ /** * Constructs a new CMsgGC_GameServer_AckPolicy. * @exports CMsgGC_GameServer_AckPolicy * @classdesc Represents a CMsgGC_GameServer_AckPolicy. - * @implements ICMsgGC_GameServer_AckPolicy * @constructor - * @param {ICMsgGC_GameServer_AckPolicy=} [properties] Properties to set + * @param {CMsgGC_GameServer_AckPolicy.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_AckPolicy(properties) { + var CMsgGC_GameServer_AckPolicy = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgGC_GameServer_AckPolicy instance using the specified properties. * @function create * @memberof CMsgGC_GameServer_AckPolicy * @static - * @param {ICMsgGC_GameServer_AckPolicy=} [properties] Properties to set + * @param {CMsgGC_GameServer_AckPolicy.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_AckPolicy} CMsgGC_GameServer_AckPolicy instance + * @type {{ + * (properties: CMsgGC_GameServer_AckPolicy.$Shape): CMsgGC_GameServer_AckPolicy & CMsgGC_GameServer_AckPolicy.$Shape; + * (properties?: CMsgGC_GameServer_AckPolicy.$Properties): CMsgGC_GameServer_AckPolicy; + * }} */ - CMsgGC_GameServer_AckPolicy.create = function create(properties) { + CMsgGC_GameServer_AckPolicy.create = function(properties) { return new CMsgGC_GameServer_AckPolicy(properties); }; @@ -10910,13 +14276,20 @@ * @function encode * @memberof CMsgGC_GameServer_AckPolicy * @static - * @param {ICMsgGC_GameServer_AckPolicy} message CMsgGC_GameServer_AckPolicy message or plain object to encode + * @param {CMsgGC_GameServer_AckPolicy.$Properties} message CMsgGC_GameServer_AckPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_AckPolicy.encode = function encode(message, writer) { + CMsgGC_GameServer_AckPolicy.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10925,12 +14298,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_AckPolicy * @static - * @param {ICMsgGC_GameServer_AckPolicy} message CMsgGC_GameServer_AckPolicy message or plain object to encode + * @param {CMsgGC_GameServer_AckPolicy.$Properties} message CMsgGC_GameServer_AckPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_AckPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_AckPolicy.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10940,22 +14313,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_AckPolicy} CMsgGC_GameServer_AckPolicy + * @returns {CMsgGC_GameServer_AckPolicy & CMsgGC_GameServer_AckPolicy.$Shape} CMsgGC_GameServer_AckPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_AckPolicy.decode = function decode(reader, length) { + CMsgGC_GameServer_AckPolicy.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_AckPolicy(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_AckPolicy(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -10965,11 +14349,11 @@ * @memberof CMsgGC_GameServer_AckPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_AckPolicy} CMsgGC_GameServer_AckPolicy + * @returns {CMsgGC_GameServer_AckPolicy & CMsgGC_GameServer_AckPolicy.$Shape} CMsgGC_GameServer_AckPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_AckPolicy.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_AckPolicy.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10983,9 +14367,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_AckPolicy.verify = function verify(message) { + CMsgGC_GameServer_AckPolicy.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -10997,9 +14385,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_AckPolicy} CMsgGC_GameServer_AckPolicy */ - CMsgGC_GameServer_AckPolicy.fromObject = function fromObject(object) { + CMsgGC_GameServer_AckPolicy.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_AckPolicy) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_AckPolicy: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgGC_GameServer_AckPolicy(); }; @@ -11012,7 +14406,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_AckPolicy.toObject = function toObject() { + CMsgGC_GameServer_AckPolicy.toObject = function () { return {}; }; @@ -11023,8 +14417,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_AckPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_AckPolicy.prototype.toJSON = function() { + return CMsgGC_GameServer_AckPolicy.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_AckPolicy + * @function getTypeUrl + * @memberof CMsgGC_GameServer_AckPolicy + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_AckPolicy.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_AckPolicy"; }; return CMsgGC_GameServer_AckPolicy; @@ -11034,26 +14442,39 @@ /** * Properties of a CMsgGC_GameServer_AckPolicyResponse. - * @exports ICMsgGC_GameServer_AckPolicyResponse - * @interface ICMsgGC_GameServer_AckPolicyResponse + * @typedef {Object} CMsgGC_GameServer_AckPolicyResponse.$Properties * @property {number|null} [result] CMsgGC_GameServer_AckPolicyResponse result * @property {string|null} [message] CMsgGC_GameServer_AckPolicyResponse message + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_GameServer_AckPolicyResponse. + * @exports ICMsgGC_GameServer_AckPolicyResponse + * @interface ICMsgGC_GameServer_AckPolicyResponse + * @augments CMsgGC_GameServer_AckPolicyResponse.$Properties + * @deprecated Use CMsgGC_GameServer_AckPolicyResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_AckPolicyResponse. + * @typedef {CMsgGC_GameServer_AckPolicyResponse.$Properties} CMsgGC_GameServer_AckPolicyResponse.$Shape */ /** * Constructs a new CMsgGC_GameServer_AckPolicyResponse. * @exports CMsgGC_GameServer_AckPolicyResponse * @classdesc Represents a CMsgGC_GameServer_AckPolicyResponse. - * @implements ICMsgGC_GameServer_AckPolicyResponse * @constructor - * @param {ICMsgGC_GameServer_AckPolicyResponse=} [properties] Properties to set + * @param {CMsgGC_GameServer_AckPolicyResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_AckPolicyResponse(properties) { + var CMsgGC_GameServer_AckPolicyResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_AckPolicyResponse result. @@ -11076,10 +14497,14 @@ * @function create * @memberof CMsgGC_GameServer_AckPolicyResponse * @static - * @param {ICMsgGC_GameServer_AckPolicyResponse=} [properties] Properties to set + * @param {CMsgGC_GameServer_AckPolicyResponse.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_AckPolicyResponse} CMsgGC_GameServer_AckPolicyResponse instance + * @type {{ + * (properties: CMsgGC_GameServer_AckPolicyResponse.$Shape): CMsgGC_GameServer_AckPolicyResponse & CMsgGC_GameServer_AckPolicyResponse.$Shape; + * (properties?: CMsgGC_GameServer_AckPolicyResponse.$Properties): CMsgGC_GameServer_AckPolicyResponse; + * }} */ - CMsgGC_GameServer_AckPolicyResponse.create = function create(properties) { + CMsgGC_GameServer_AckPolicyResponse.create = function(properties) { return new CMsgGC_GameServer_AckPolicyResponse(properties); }; @@ -11088,17 +14513,24 @@ * @function encode * @memberof CMsgGC_GameServer_AckPolicyResponse * @static - * @param {ICMsgGC_GameServer_AckPolicyResponse} message CMsgGC_GameServer_AckPolicyResponse message or plain object to encode + * @param {CMsgGC_GameServer_AckPolicyResponse.$Properties} message CMsgGC_GameServer_AckPolicyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_AckPolicyResponse.encode = function encode(message, writer) { + CMsgGC_GameServer_AckPolicyResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.result); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11107,12 +14539,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_AckPolicyResponse * @static - * @param {ICMsgGC_GameServer_AckPolicyResponse} message CMsgGC_GameServer_AckPolicyResponse message or plain object to encode + * @param {CMsgGC_GameServer_AckPolicyResponse.$Properties} message CMsgGC_GameServer_AckPolicyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_AckPolicyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_AckPolicyResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11122,28 +14554,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_AckPolicyResponse} CMsgGC_GameServer_AckPolicyResponse + * @returns {CMsgGC_GameServer_AckPolicyResponse & CMsgGC_GameServer_AckPolicyResponse.$Shape} CMsgGC_GameServer_AckPolicyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_AckPolicyResponse.decode = function decode(reader, length) { + CMsgGC_GameServer_AckPolicyResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_AckPolicyResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_AckPolicyResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.uint32(); - break; - case 2: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.message = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11153,11 +14605,11 @@ * @memberof CMsgGC_GameServer_AckPolicyResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_AckPolicyResponse} CMsgGC_GameServer_AckPolicyResponse + * @returns {CMsgGC_GameServer_AckPolicyResponse & CMsgGC_GameServer_AckPolicyResponse.$Shape} CMsgGC_GameServer_AckPolicyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_AckPolicyResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_AckPolicyResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11171,13 +14623,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_AckPolicyResponse.verify = function verify(message) { + CMsgGC_GameServer_AckPolicyResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -11191,14 +14647,20 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_AckPolicyResponse} CMsgGC_GameServer_AckPolicyResponse */ - CMsgGC_GameServer_AckPolicyResponse.fromObject = function fromObject(object) { + CMsgGC_GameServer_AckPolicyResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_AckPolicyResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_AckPolicyResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_AckPolicyResponse(); if (object.result != null) message.result = object.result >>> 0; if (object.message != null) - message.message = String(object.message); + message.message = $String(object.message); return message; }; @@ -11211,17 +14673,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_AckPolicyResponse.toObject = function toObject(message, options) { + CMsgGC_GameServer_AckPolicyResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.result = 0; object.message = ""; } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -11233,8 +14699,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_AckPolicyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_AckPolicyResponse.prototype.toJSON = function() { + return CMsgGC_GameServer_AckPolicyResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_AckPolicyResponse + * @function getTypeUrl + * @memberof CMsgGC_GameServer_AckPolicyResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_AckPolicyResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_AckPolicyResponse"; }; return CMsgGC_GameServer_AckPolicyResponse; @@ -11242,27 +14722,40 @@ $root.CMsgGC_Client_UseServerModificationItem = (function() { + /** + * Properties of a CMsgGC_Client_UseServerModificationItem. + * @typedef {Object} CMsgGC_Client_UseServerModificationItem.$Properties + * @property {number|Long|null} [item_id] CMsgGC_Client_UseServerModificationItem item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_Client_UseServerModificationItem. * @exports ICMsgGC_Client_UseServerModificationItem * @interface ICMsgGC_Client_UseServerModificationItem - * @property {number|Long|null} [item_id] CMsgGC_Client_UseServerModificationItem item_id + * @augments CMsgGC_Client_UseServerModificationItem.$Properties + * @deprecated Use CMsgGC_Client_UseServerModificationItem.$Properties instead. + */ + + /** + * Shape of a CMsgGC_Client_UseServerModificationItem. + * @typedef {CMsgGC_Client_UseServerModificationItem.$Properties} CMsgGC_Client_UseServerModificationItem.$Shape */ /** * Constructs a new CMsgGC_Client_UseServerModificationItem. * @exports CMsgGC_Client_UseServerModificationItem * @classdesc Represents a CMsgGC_Client_UseServerModificationItem. - * @implements ICMsgGC_Client_UseServerModificationItem * @constructor - * @param {ICMsgGC_Client_UseServerModificationItem=} [properties] Properties to set + * @param {CMsgGC_Client_UseServerModificationItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_Client_UseServerModificationItem(properties) { + var CMsgGC_Client_UseServerModificationItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_Client_UseServerModificationItem item_id. @@ -11277,10 +14770,14 @@ * @function create * @memberof CMsgGC_Client_UseServerModificationItem * @static - * @param {ICMsgGC_Client_UseServerModificationItem=} [properties] Properties to set + * @param {CMsgGC_Client_UseServerModificationItem.$Properties=} [properties] Properties to set * @returns {CMsgGC_Client_UseServerModificationItem} CMsgGC_Client_UseServerModificationItem instance + * @type {{ + * (properties: CMsgGC_Client_UseServerModificationItem.$Shape): CMsgGC_Client_UseServerModificationItem & CMsgGC_Client_UseServerModificationItem.$Shape; + * (properties?: CMsgGC_Client_UseServerModificationItem.$Properties): CMsgGC_Client_UseServerModificationItem; + * }} */ - CMsgGC_Client_UseServerModificationItem.create = function create(properties) { + CMsgGC_Client_UseServerModificationItem.create = function(properties) { return new CMsgGC_Client_UseServerModificationItem(properties); }; @@ -11289,15 +14786,22 @@ * @function encode * @memberof CMsgGC_Client_UseServerModificationItem * @static - * @param {ICMsgGC_Client_UseServerModificationItem} message CMsgGC_Client_UseServerModificationItem message or plain object to encode + * @param {CMsgGC_Client_UseServerModificationItem.$Properties} message CMsgGC_Client_UseServerModificationItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Client_UseServerModificationItem.encode = function encode(message, writer) { + CMsgGC_Client_UseServerModificationItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11306,12 +14810,12 @@ * @function encodeDelimited * @memberof CMsgGC_Client_UseServerModificationItem * @static - * @param {ICMsgGC_Client_UseServerModificationItem} message CMsgGC_Client_UseServerModificationItem message or plain object to encode + * @param {CMsgGC_Client_UseServerModificationItem.$Properties} message CMsgGC_Client_UseServerModificationItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Client_UseServerModificationItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_Client_UseServerModificationItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11321,25 +14825,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_Client_UseServerModificationItem} CMsgGC_Client_UseServerModificationItem + * @returns {CMsgGC_Client_UseServerModificationItem & CMsgGC_Client_UseServerModificationItem.$Shape} CMsgGC_Client_UseServerModificationItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Client_UseServerModificationItem.decode = function decode(reader, length) { + CMsgGC_Client_UseServerModificationItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_Client_UseServerModificationItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_Client_UseServerModificationItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11349,11 +14870,11 @@ * @memberof CMsgGC_Client_UseServerModificationItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_Client_UseServerModificationItem} CMsgGC_Client_UseServerModificationItem + * @returns {CMsgGC_Client_UseServerModificationItem & CMsgGC_Client_UseServerModificationItem.$Shape} CMsgGC_Client_UseServerModificationItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Client_UseServerModificationItem.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_Client_UseServerModificationItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11367,10 +14888,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_Client_UseServerModificationItem.verify = function verify(message) { + CMsgGC_Client_UseServerModificationItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; return null; @@ -11384,15 +14909,21 @@ * @param {Object.} object Plain object * @returns {CMsgGC_Client_UseServerModificationItem} CMsgGC_Client_UseServerModificationItem */ - CMsgGC_Client_UseServerModificationItem.fromObject = function fromObject(object) { + CMsgGC_Client_UseServerModificationItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_Client_UseServerModificationItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_Client_UseServerModificationItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_Client_UseServerModificationItem(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -11409,21 +14940,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_Client_UseServerModificationItem.toObject = function toObject(message, options) { + CMsgGC_Client_UseServerModificationItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; return object; }; @@ -11434,8 +14971,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_Client_UseServerModificationItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_Client_UseServerModificationItem.prototype.toJSON = function() { + return CMsgGC_Client_UseServerModificationItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_Client_UseServerModificationItem + * @function getTypeUrl + * @memberof CMsgGC_Client_UseServerModificationItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_Client_UseServerModificationItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_Client_UseServerModificationItem"; }; return CMsgGC_Client_UseServerModificationItem; @@ -11443,27 +14994,40 @@ $root.CMsgGC_Client_UseServerModificationItem_Response = (function() { + /** + * Properties of a CMsgGC_Client_UseServerModificationItem_Response. + * @typedef {Object} CMsgGC_Client_UseServerModificationItem_Response.$Properties + * @property {CMsgGC_Client_UseServerModificationItem_Response.EServerModificationItemResponse|null} [response_code] CMsgGC_Client_UseServerModificationItem_Response response_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_Client_UseServerModificationItem_Response. * @exports ICMsgGC_Client_UseServerModificationItem_Response * @interface ICMsgGC_Client_UseServerModificationItem_Response - * @property {CMsgGC_Client_UseServerModificationItem_Response.EServerModificationItemResponse|null} [response_code] CMsgGC_Client_UseServerModificationItem_Response response_code + * @augments CMsgGC_Client_UseServerModificationItem_Response.$Properties + * @deprecated Use CMsgGC_Client_UseServerModificationItem_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGC_Client_UseServerModificationItem_Response. + * @typedef {CMsgGC_Client_UseServerModificationItem_Response.$Properties} CMsgGC_Client_UseServerModificationItem_Response.$Shape */ /** * Constructs a new CMsgGC_Client_UseServerModificationItem_Response. * @exports CMsgGC_Client_UseServerModificationItem_Response * @classdesc Represents a CMsgGC_Client_UseServerModificationItem_Response. - * @implements ICMsgGC_Client_UseServerModificationItem_Response * @constructor - * @param {ICMsgGC_Client_UseServerModificationItem_Response=} [properties] Properties to set + * @param {CMsgGC_Client_UseServerModificationItem_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_Client_UseServerModificationItem_Response(properties) { + var CMsgGC_Client_UseServerModificationItem_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_Client_UseServerModificationItem_Response response_code. @@ -11478,10 +15042,14 @@ * @function create * @memberof CMsgGC_Client_UseServerModificationItem_Response * @static - * @param {ICMsgGC_Client_UseServerModificationItem_Response=} [properties] Properties to set + * @param {CMsgGC_Client_UseServerModificationItem_Response.$Properties=} [properties] Properties to set * @returns {CMsgGC_Client_UseServerModificationItem_Response} CMsgGC_Client_UseServerModificationItem_Response instance + * @type {{ + * (properties: CMsgGC_Client_UseServerModificationItem_Response.$Shape): CMsgGC_Client_UseServerModificationItem_Response & CMsgGC_Client_UseServerModificationItem_Response.$Shape; + * (properties?: CMsgGC_Client_UseServerModificationItem_Response.$Properties): CMsgGC_Client_UseServerModificationItem_Response; + * }} */ - CMsgGC_Client_UseServerModificationItem_Response.create = function create(properties) { + CMsgGC_Client_UseServerModificationItem_Response.create = function(properties) { return new CMsgGC_Client_UseServerModificationItem_Response(properties); }; @@ -11490,15 +15058,22 @@ * @function encode * @memberof CMsgGC_Client_UseServerModificationItem_Response * @static - * @param {ICMsgGC_Client_UseServerModificationItem_Response} message CMsgGC_Client_UseServerModificationItem_Response message or plain object to encode + * @param {CMsgGC_Client_UseServerModificationItem_Response.$Properties} message CMsgGC_Client_UseServerModificationItem_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Client_UseServerModificationItem_Response.encode = function encode(message, writer) { + CMsgGC_Client_UseServerModificationItem_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.response_code != null && Object.hasOwnProperty.call(message, "response_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.response_code != null && $Object.hasOwnProperty.call(message, "response_code")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.response_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11507,12 +15082,12 @@ * @function encodeDelimited * @memberof CMsgGC_Client_UseServerModificationItem_Response * @static - * @param {ICMsgGC_Client_UseServerModificationItem_Response} message CMsgGC_Client_UseServerModificationItem_Response message or plain object to encode + * @param {CMsgGC_Client_UseServerModificationItem_Response.$Properties} message CMsgGC_Client_UseServerModificationItem_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Client_UseServerModificationItem_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_Client_UseServerModificationItem_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11522,25 +15097,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_Client_UseServerModificationItem_Response} CMsgGC_Client_UseServerModificationItem_Response + * @returns {CMsgGC_Client_UseServerModificationItem_Response & CMsgGC_Client_UseServerModificationItem_Response.$Shape} CMsgGC_Client_UseServerModificationItem_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Client_UseServerModificationItem_Response.decode = function decode(reader, length) { + CMsgGC_Client_UseServerModificationItem_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_Client_UseServerModificationItem_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_Client_UseServerModificationItem_Response(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.response_code = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGC_Client_UseServerModificationItem_Response.EServerModificationItemResponse[value] !== $undefined) + message.response_code = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11550,11 +15148,11 @@ * @memberof CMsgGC_Client_UseServerModificationItem_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_Client_UseServerModificationItem_Response} CMsgGC_Client_UseServerModificationItem_Response + * @returns {CMsgGC_Client_UseServerModificationItem_Response & CMsgGC_Client_UseServerModificationItem_Response.$Shape} CMsgGC_Client_UseServerModificationItem_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Client_UseServerModificationItem_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_Client_UseServerModificationItem_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11568,10 +15166,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_Client_UseServerModificationItem_Response.verify = function verify(message) { + CMsgGC_Client_UseServerModificationItem_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.response_code != null && message.hasOwnProperty("response_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.response_code != null && $Object.hasOwnProperty.call(message, "response_code")) switch (message.response_code) { default: return "response_code: enum value expected"; @@ -11593,9 +15195,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_Client_UseServerModificationItem_Response} CMsgGC_Client_UseServerModificationItem_Response */ - CMsgGC_Client_UseServerModificationItem_Response.fromObject = function fromObject(object) { + CMsgGC_Client_UseServerModificationItem_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_Client_UseServerModificationItem_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_Client_UseServerModificationItem_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_Client_UseServerModificationItem_Response(); switch (object.response_code) { case "kServerModificationItemResponse_AlreadyInUse": @@ -11618,6 +15226,7 @@ case 5: message.response_code = 5; break; + default: } return message; }; @@ -11631,14 +15240,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_Client_UseServerModificationItem_Response.toObject = function toObject(message, options) { + CMsgGC_Client_UseServerModificationItem_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) - object.response_code = options.enums === String ? "kServerModificationItemResponse_AlreadyInUse" : 1; - if (message.response_code != null && message.hasOwnProperty("response_code")) - object.response_code = options.enums === String ? $root.CMsgGC_Client_UseServerModificationItem_Response.EServerModificationItemResponse[message.response_code] : message.response_code; + object.response_code = options.enums === $String ? "kServerModificationItemResponse_AlreadyInUse" : 1; + if (message.response_code != null && $Object.hasOwnProperty.call(message, "response_code")) + object.response_code = options.enums === $String ? $root.CMsgGC_Client_UseServerModificationItem_Response.EServerModificationItemResponse[message.response_code] === $undefined ? message.response_code : $root.CMsgGC_Client_UseServerModificationItem_Response.EServerModificationItemResponse[message.response_code] : message.response_code; return object; }; @@ -11649,8 +15262,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_Client_UseServerModificationItem_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_Client_UseServerModificationItem_Response.prototype.toJSON = function() { + return CMsgGC_Client_UseServerModificationItem_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_Client_UseServerModificationItem_Response + * @function getTypeUrl + * @memberof CMsgGC_Client_UseServerModificationItem_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_Client_UseServerModificationItem_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_Client_UseServerModificationItem_Response"; }; /** @@ -11664,7 +15291,7 @@ * @property {number} kServerModificationItemResponse_EventAlreadyActive=5 kServerModificationItemResponse_EventAlreadyActive value */ CMsgGC_Client_UseServerModificationItem_Response.EServerModificationItemResponse = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "kServerModificationItemResponse_AlreadyInUse"] = 1; values[valuesById[2] = "kServerModificationItemResponse_NotOnAuthenticatedServer"] = 2; values[valuesById[3] = "kServerModificationItemResponse_ServerReject"] = 3; @@ -11678,27 +15305,40 @@ $root.CMsgGC_GameServer_UseServerModificationItem = (function() { + /** + * Properties of a CMsgGC_GameServer_UseServerModificationItem. + * @typedef {Object} CMsgGC_GameServer_UseServerModificationItem.$Properties + * @property {EServerModificationItemType|null} [modification_type] CMsgGC_GameServer_UseServerModificationItem modification_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_GameServer_UseServerModificationItem. * @exports ICMsgGC_GameServer_UseServerModificationItem * @interface ICMsgGC_GameServer_UseServerModificationItem - * @property {EServerModificationItemType|null} [modification_type] CMsgGC_GameServer_UseServerModificationItem modification_type + * @augments CMsgGC_GameServer_UseServerModificationItem.$Properties + * @deprecated Use CMsgGC_GameServer_UseServerModificationItem.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_UseServerModificationItem. + * @typedef {CMsgGC_GameServer_UseServerModificationItem.$Properties} CMsgGC_GameServer_UseServerModificationItem.$Shape */ /** * Constructs a new CMsgGC_GameServer_UseServerModificationItem. * @exports CMsgGC_GameServer_UseServerModificationItem * @classdesc Represents a CMsgGC_GameServer_UseServerModificationItem. - * @implements ICMsgGC_GameServer_UseServerModificationItem * @constructor - * @param {ICMsgGC_GameServer_UseServerModificationItem=} [properties] Properties to set + * @param {CMsgGC_GameServer_UseServerModificationItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_UseServerModificationItem(properties) { + var CMsgGC_GameServer_UseServerModificationItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_UseServerModificationItem modification_type. @@ -11713,10 +15353,14 @@ * @function create * @memberof CMsgGC_GameServer_UseServerModificationItem * @static - * @param {ICMsgGC_GameServer_UseServerModificationItem=} [properties] Properties to set + * @param {CMsgGC_GameServer_UseServerModificationItem.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_UseServerModificationItem} CMsgGC_GameServer_UseServerModificationItem instance + * @type {{ + * (properties: CMsgGC_GameServer_UseServerModificationItem.$Shape): CMsgGC_GameServer_UseServerModificationItem & CMsgGC_GameServer_UseServerModificationItem.$Shape; + * (properties?: CMsgGC_GameServer_UseServerModificationItem.$Properties): CMsgGC_GameServer_UseServerModificationItem; + * }} */ - CMsgGC_GameServer_UseServerModificationItem.create = function create(properties) { + CMsgGC_GameServer_UseServerModificationItem.create = function(properties) { return new CMsgGC_GameServer_UseServerModificationItem(properties); }; @@ -11725,15 +15369,22 @@ * @function encode * @memberof CMsgGC_GameServer_UseServerModificationItem * @static - * @param {ICMsgGC_GameServer_UseServerModificationItem} message CMsgGC_GameServer_UseServerModificationItem message or plain object to encode + * @param {CMsgGC_GameServer_UseServerModificationItem.$Properties} message CMsgGC_GameServer_UseServerModificationItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_UseServerModificationItem.encode = function encode(message, writer) { + CMsgGC_GameServer_UseServerModificationItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.modification_type != null && Object.hasOwnProperty.call(message, "modification_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modification_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11742,12 +15393,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_UseServerModificationItem * @static - * @param {ICMsgGC_GameServer_UseServerModificationItem} message CMsgGC_GameServer_UseServerModificationItem message or plain object to encode + * @param {CMsgGC_GameServer_UseServerModificationItem.$Properties} message CMsgGC_GameServer_UseServerModificationItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_UseServerModificationItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_UseServerModificationItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11757,25 +15408,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_UseServerModificationItem} CMsgGC_GameServer_UseServerModificationItem + * @returns {CMsgGC_GameServer_UseServerModificationItem & CMsgGC_GameServer_UseServerModificationItem.$Shape} CMsgGC_GameServer_UseServerModificationItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_UseServerModificationItem.decode = function decode(reader, length) { + CMsgGC_GameServer_UseServerModificationItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_UseServerModificationItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_UseServerModificationItem(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.modification_type = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.EServerModificationItemType[value] !== $undefined) + message.modification_type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11785,11 +15459,11 @@ * @memberof CMsgGC_GameServer_UseServerModificationItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_UseServerModificationItem} CMsgGC_GameServer_UseServerModificationItem + * @returns {CMsgGC_GameServer_UseServerModificationItem & CMsgGC_GameServer_UseServerModificationItem.$Shape} CMsgGC_GameServer_UseServerModificationItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_UseServerModificationItem.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_UseServerModificationItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11803,10 +15477,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_UseServerModificationItem.verify = function verify(message) { + CMsgGC_GameServer_UseServerModificationItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.modification_type != null && message.hasOwnProperty("modification_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) switch (message.modification_type) { default: return "modification_type: enum value expected"; @@ -11824,15 +15502,22 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_UseServerModificationItem} CMsgGC_GameServer_UseServerModificationItem */ - CMsgGC_GameServer_UseServerModificationItem.fromObject = function fromObject(object) { + CMsgGC_GameServer_UseServerModificationItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_UseServerModificationItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_UseServerModificationItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_UseServerModificationItem(); switch (object.modification_type) { case "kGameServerModificationItem_Halloween": case 1: message.modification_type = 1; break; + default: } return message; }; @@ -11846,14 +15531,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_UseServerModificationItem.toObject = function toObject(message, options) { + CMsgGC_GameServer_UseServerModificationItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) - object.modification_type = options.enums === String ? "kGameServerModificationItem_Halloween" : 1; - if (message.modification_type != null && message.hasOwnProperty("modification_type")) - object.modification_type = options.enums === String ? $root.EServerModificationItemType[message.modification_type] : message.modification_type; + object.modification_type = options.enums === $String ? "kGameServerModificationItem_Halloween" : 1; + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) + object.modification_type = options.enums === $String ? $root.EServerModificationItemType[message.modification_type] === $undefined ? message.modification_type : $root.EServerModificationItemType[message.modification_type] : message.modification_type; return object; }; @@ -11864,8 +15553,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_UseServerModificationItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_UseServerModificationItem.prototype.toJSON = function() { + return CMsgGC_GameServer_UseServerModificationItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_UseServerModificationItem + * @function getTypeUrl + * @memberof CMsgGC_GameServer_UseServerModificationItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_UseServerModificationItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_UseServerModificationItem"; }; return CMsgGC_GameServer_UseServerModificationItem; @@ -11875,26 +15578,39 @@ /** * Properties of a CMsgGC_GameServer_UseServerModificationItem_Response. - * @exports ICMsgGC_GameServer_UseServerModificationItem_Response - * @interface ICMsgGC_GameServer_UseServerModificationItem_Response + * @typedef {Object} CMsgGC_GameServer_UseServerModificationItem_Response.$Properties * @property {EServerModificationItemType|null} [modification_type] CMsgGC_GameServer_UseServerModificationItem_Response modification_type * @property {CMsgGC_GameServer_UseServerModificationItem_Response.EServerModificationItemServerResponse|null} [server_response_code] CMsgGC_GameServer_UseServerModificationItem_Response server_response_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_GameServer_UseServerModificationItem_Response. + * @exports ICMsgGC_GameServer_UseServerModificationItem_Response + * @interface ICMsgGC_GameServer_UseServerModificationItem_Response + * @augments CMsgGC_GameServer_UseServerModificationItem_Response.$Properties + * @deprecated Use CMsgGC_GameServer_UseServerModificationItem_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_UseServerModificationItem_Response. + * @typedef {CMsgGC_GameServer_UseServerModificationItem_Response.$Properties} CMsgGC_GameServer_UseServerModificationItem_Response.$Shape */ /** * Constructs a new CMsgGC_GameServer_UseServerModificationItem_Response. * @exports CMsgGC_GameServer_UseServerModificationItem_Response * @classdesc Represents a CMsgGC_GameServer_UseServerModificationItem_Response. - * @implements ICMsgGC_GameServer_UseServerModificationItem_Response * @constructor - * @param {ICMsgGC_GameServer_UseServerModificationItem_Response=} [properties] Properties to set + * @param {CMsgGC_GameServer_UseServerModificationItem_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_UseServerModificationItem_Response(properties) { + var CMsgGC_GameServer_UseServerModificationItem_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_UseServerModificationItem_Response modification_type. @@ -11917,10 +15633,14 @@ * @function create * @memberof CMsgGC_GameServer_UseServerModificationItem_Response * @static - * @param {ICMsgGC_GameServer_UseServerModificationItem_Response=} [properties] Properties to set + * @param {CMsgGC_GameServer_UseServerModificationItem_Response.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_UseServerModificationItem_Response} CMsgGC_GameServer_UseServerModificationItem_Response instance + * @type {{ + * (properties: CMsgGC_GameServer_UseServerModificationItem_Response.$Shape): CMsgGC_GameServer_UseServerModificationItem_Response & CMsgGC_GameServer_UseServerModificationItem_Response.$Shape; + * (properties?: CMsgGC_GameServer_UseServerModificationItem_Response.$Properties): CMsgGC_GameServer_UseServerModificationItem_Response; + * }} */ - CMsgGC_GameServer_UseServerModificationItem_Response.create = function create(properties) { + CMsgGC_GameServer_UseServerModificationItem_Response.create = function(properties) { return new CMsgGC_GameServer_UseServerModificationItem_Response(properties); }; @@ -11929,17 +15649,24 @@ * @function encode * @memberof CMsgGC_GameServer_UseServerModificationItem_Response * @static - * @param {ICMsgGC_GameServer_UseServerModificationItem_Response} message CMsgGC_GameServer_UseServerModificationItem_Response message or plain object to encode + * @param {CMsgGC_GameServer_UseServerModificationItem_Response.$Properties} message CMsgGC_GameServer_UseServerModificationItem_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_UseServerModificationItem_Response.encode = function encode(message, writer) { + CMsgGC_GameServer_UseServerModificationItem_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.modification_type != null && Object.hasOwnProperty.call(message, "modification_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modification_type); - if (message.server_response_code != null && Object.hasOwnProperty.call(message, "server_response_code")) + if (message.server_response_code != null && $Object.hasOwnProperty.call(message, "server_response_code")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.server_response_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11948,12 +15675,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_UseServerModificationItem_Response * @static - * @param {ICMsgGC_GameServer_UseServerModificationItem_Response} message CMsgGC_GameServer_UseServerModificationItem_Response message or plain object to encode + * @param {CMsgGC_GameServer_UseServerModificationItem_Response.$Properties} message CMsgGC_GameServer_UseServerModificationItem_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_UseServerModificationItem_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_UseServerModificationItem_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11963,28 +15690,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_UseServerModificationItem_Response} CMsgGC_GameServer_UseServerModificationItem_Response + * @returns {CMsgGC_GameServer_UseServerModificationItem_Response & CMsgGC_GameServer_UseServerModificationItem_Response.$Shape} CMsgGC_GameServer_UseServerModificationItem_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_UseServerModificationItem_Response.decode = function decode(reader, length) { + CMsgGC_GameServer_UseServerModificationItem_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_UseServerModificationItem_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_UseServerModificationItem_Response(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.modification_type = reader.int32(); - break; - case 2: - message.server_response_code = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.EServerModificationItemType[value] !== $undefined) + message.modification_type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGC_GameServer_UseServerModificationItem_Response.EServerModificationItemServerResponse[value] !== $undefined) + message.server_response_code = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -11994,11 +15753,11 @@ * @memberof CMsgGC_GameServer_UseServerModificationItem_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_UseServerModificationItem_Response} CMsgGC_GameServer_UseServerModificationItem_Response + * @returns {CMsgGC_GameServer_UseServerModificationItem_Response & CMsgGC_GameServer_UseServerModificationItem_Response.$Shape} CMsgGC_GameServer_UseServerModificationItem_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_UseServerModificationItem_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_UseServerModificationItem_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12012,17 +15771,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_UseServerModificationItem_Response.verify = function verify(message) { + CMsgGC_GameServer_UseServerModificationItem_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.modification_type != null && message.hasOwnProperty("modification_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) switch (message.modification_type) { default: return "modification_type: enum value expected"; case 1: break; } - if (message.server_response_code != null && message.hasOwnProperty("server_response_code")) + if (message.server_response_code != null && $Object.hasOwnProperty.call(message, "server_response_code")) switch (message.server_response_code) { default: return "server_response_code: enum value expected"; @@ -12042,15 +15805,22 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_UseServerModificationItem_Response} CMsgGC_GameServer_UseServerModificationItem_Response */ - CMsgGC_GameServer_UseServerModificationItem_Response.fromObject = function fromObject(object) { + CMsgGC_GameServer_UseServerModificationItem_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_UseServerModificationItem_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_UseServerModificationItem_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_UseServerModificationItem_Response(); switch (object.modification_type) { case "kGameServerModificationItem_Halloween": case 1: message.modification_type = 1; break; + default: } switch (object.server_response_code) { case "kServerModificationItemServerResponse_Accepted": @@ -12065,6 +15835,7 @@ case 3: message.server_response_code = 3; break; + default: } return message; }; @@ -12078,18 +15849,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_UseServerModificationItem_Response.toObject = function toObject(message, options) { + CMsgGC_GameServer_UseServerModificationItem_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.modification_type = options.enums === String ? "kGameServerModificationItem_Halloween" : 1; - object.server_response_code = options.enums === String ? "kServerModificationItemServerResponse_Accepted" : 1; + object.modification_type = options.enums === $String ? "kGameServerModificationItem_Halloween" : 1; + object.server_response_code = options.enums === $String ? "kServerModificationItemServerResponse_Accepted" : 1; } - if (message.modification_type != null && message.hasOwnProperty("modification_type")) - object.modification_type = options.enums === String ? $root.EServerModificationItemType[message.modification_type] : message.modification_type; - if (message.server_response_code != null && message.hasOwnProperty("server_response_code")) - object.server_response_code = options.enums === String ? $root.CMsgGC_GameServer_UseServerModificationItem_Response.EServerModificationItemServerResponse[message.server_response_code] : message.server_response_code; + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) + object.modification_type = options.enums === $String ? $root.EServerModificationItemType[message.modification_type] === $undefined ? message.modification_type : $root.EServerModificationItemType[message.modification_type] : message.modification_type; + if (message.server_response_code != null && $Object.hasOwnProperty.call(message, "server_response_code")) + object.server_response_code = options.enums === $String ? $root.CMsgGC_GameServer_UseServerModificationItem_Response.EServerModificationItemServerResponse[message.server_response_code] === $undefined ? message.server_response_code : $root.CMsgGC_GameServer_UseServerModificationItem_Response.EServerModificationItemServerResponse[message.server_response_code] : message.server_response_code; return object; }; @@ -12100,8 +15875,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_UseServerModificationItem_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_UseServerModificationItem_Response.prototype.toJSON = function() { + return CMsgGC_GameServer_UseServerModificationItem_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_UseServerModificationItem_Response + * @function getTypeUrl + * @memberof CMsgGC_GameServer_UseServerModificationItem_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_UseServerModificationItem_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_UseServerModificationItem_Response"; }; /** @@ -12113,7 +15902,7 @@ * @property {number} kServerModificationItemServerResponse_VoteFailed=3 kServerModificationItemServerResponse_VoteFailed value */ CMsgGC_GameServer_UseServerModificationItem_Response.EServerModificationItemServerResponse = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "kServerModificationItemServerResponse_Accepted"] = 1; values[valuesById[2] = "kServerModificationItemServerResponse_NoVoteCalled"] = 2; values[valuesById[3] = "kServerModificationItemServerResponse_VoteFailed"] = 3; @@ -12125,27 +15914,40 @@ $root.CMsgGC_GameServer_ServerModificationItemExpired = (function() { + /** + * Properties of a CMsgGC_GameServer_ServerModificationItemExpired. + * @typedef {Object} CMsgGC_GameServer_ServerModificationItemExpired.$Properties + * @property {EServerModificationItemType|null} [modification_type] CMsgGC_GameServer_ServerModificationItemExpired modification_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_GameServer_ServerModificationItemExpired. * @exports ICMsgGC_GameServer_ServerModificationItemExpired * @interface ICMsgGC_GameServer_ServerModificationItemExpired - * @property {EServerModificationItemType|null} [modification_type] CMsgGC_GameServer_ServerModificationItemExpired modification_type + * @augments CMsgGC_GameServer_ServerModificationItemExpired.$Properties + * @deprecated Use CMsgGC_GameServer_ServerModificationItemExpired.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_ServerModificationItemExpired. + * @typedef {CMsgGC_GameServer_ServerModificationItemExpired.$Properties} CMsgGC_GameServer_ServerModificationItemExpired.$Shape */ /** * Constructs a new CMsgGC_GameServer_ServerModificationItemExpired. * @exports CMsgGC_GameServer_ServerModificationItemExpired * @classdesc Represents a CMsgGC_GameServer_ServerModificationItemExpired. - * @implements ICMsgGC_GameServer_ServerModificationItemExpired * @constructor - * @param {ICMsgGC_GameServer_ServerModificationItemExpired=} [properties] Properties to set + * @param {CMsgGC_GameServer_ServerModificationItemExpired.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_ServerModificationItemExpired(properties) { + var CMsgGC_GameServer_ServerModificationItemExpired = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_ServerModificationItemExpired modification_type. @@ -12160,10 +15962,14 @@ * @function create * @memberof CMsgGC_GameServer_ServerModificationItemExpired * @static - * @param {ICMsgGC_GameServer_ServerModificationItemExpired=} [properties] Properties to set + * @param {CMsgGC_GameServer_ServerModificationItemExpired.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_ServerModificationItemExpired} CMsgGC_GameServer_ServerModificationItemExpired instance + * @type {{ + * (properties: CMsgGC_GameServer_ServerModificationItemExpired.$Shape): CMsgGC_GameServer_ServerModificationItemExpired & CMsgGC_GameServer_ServerModificationItemExpired.$Shape; + * (properties?: CMsgGC_GameServer_ServerModificationItemExpired.$Properties): CMsgGC_GameServer_ServerModificationItemExpired; + * }} */ - CMsgGC_GameServer_ServerModificationItemExpired.create = function create(properties) { + CMsgGC_GameServer_ServerModificationItemExpired.create = function(properties) { return new CMsgGC_GameServer_ServerModificationItemExpired(properties); }; @@ -12172,15 +15978,22 @@ * @function encode * @memberof CMsgGC_GameServer_ServerModificationItemExpired * @static - * @param {ICMsgGC_GameServer_ServerModificationItemExpired} message CMsgGC_GameServer_ServerModificationItemExpired message or plain object to encode + * @param {CMsgGC_GameServer_ServerModificationItemExpired.$Properties} message CMsgGC_GameServer_ServerModificationItemExpired message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_ServerModificationItemExpired.encode = function encode(message, writer) { + CMsgGC_GameServer_ServerModificationItemExpired.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.modification_type != null && Object.hasOwnProperty.call(message, "modification_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modification_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12189,12 +16002,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_ServerModificationItemExpired * @static - * @param {ICMsgGC_GameServer_ServerModificationItemExpired} message CMsgGC_GameServer_ServerModificationItemExpired message or plain object to encode + * @param {CMsgGC_GameServer_ServerModificationItemExpired.$Properties} message CMsgGC_GameServer_ServerModificationItemExpired message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_ServerModificationItemExpired.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_ServerModificationItemExpired.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12204,25 +16017,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_ServerModificationItemExpired} CMsgGC_GameServer_ServerModificationItemExpired + * @returns {CMsgGC_GameServer_ServerModificationItemExpired & CMsgGC_GameServer_ServerModificationItemExpired.$Shape} CMsgGC_GameServer_ServerModificationItemExpired * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_ServerModificationItemExpired.decode = function decode(reader, length) { + CMsgGC_GameServer_ServerModificationItemExpired.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_ServerModificationItemExpired(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_ServerModificationItemExpired(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.modification_type = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.EServerModificationItemType[value] !== $undefined) + message.modification_type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12232,11 +16068,11 @@ * @memberof CMsgGC_GameServer_ServerModificationItemExpired * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_ServerModificationItemExpired} CMsgGC_GameServer_ServerModificationItemExpired + * @returns {CMsgGC_GameServer_ServerModificationItemExpired & CMsgGC_GameServer_ServerModificationItemExpired.$Shape} CMsgGC_GameServer_ServerModificationItemExpired * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_ServerModificationItemExpired.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_ServerModificationItemExpired.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12250,10 +16086,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_ServerModificationItemExpired.verify = function verify(message) { + CMsgGC_GameServer_ServerModificationItemExpired.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.modification_type != null && message.hasOwnProperty("modification_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) switch (message.modification_type) { default: return "modification_type: enum value expected"; @@ -12271,15 +16111,22 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_ServerModificationItemExpired} CMsgGC_GameServer_ServerModificationItemExpired */ - CMsgGC_GameServer_ServerModificationItemExpired.fromObject = function fromObject(object) { + CMsgGC_GameServer_ServerModificationItemExpired.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_ServerModificationItemExpired) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_ServerModificationItemExpired: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_ServerModificationItemExpired(); switch (object.modification_type) { case "kGameServerModificationItem_Halloween": case 1: message.modification_type = 1; break; + default: } return message; }; @@ -12293,14 +16140,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_ServerModificationItemExpired.toObject = function toObject(message, options) { + CMsgGC_GameServer_ServerModificationItemExpired.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) - object.modification_type = options.enums === String ? "kGameServerModificationItem_Halloween" : 1; - if (message.modification_type != null && message.hasOwnProperty("modification_type")) - object.modification_type = options.enums === String ? $root.EServerModificationItemType[message.modification_type] : message.modification_type; + object.modification_type = options.enums === $String ? "kGameServerModificationItem_Halloween" : 1; + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) + object.modification_type = options.enums === $String ? $root.EServerModificationItemType[message.modification_type] === $undefined ? message.modification_type : $root.EServerModificationItemType[message.modification_type] : message.modification_type; return object; }; @@ -12311,8 +16162,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_ServerModificationItemExpired.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_ServerModificationItemExpired.prototype.toJSON = function() { + return CMsgGC_GameServer_ServerModificationItemExpired.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_ServerModificationItemExpired + * @function getTypeUrl + * @memberof CMsgGC_GameServer_ServerModificationItemExpired + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_ServerModificationItemExpired.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_ServerModificationItemExpired"; }; return CMsgGC_GameServer_ServerModificationItemExpired; @@ -12322,26 +16187,39 @@ /** * Properties of a CMsgGC_GameServer_ServerModificationItem. - * @exports ICMsgGC_GameServer_ServerModificationItem - * @interface ICMsgGC_GameServer_ServerModificationItem + * @typedef {Object} CMsgGC_GameServer_ServerModificationItem.$Properties * @property {EServerModificationItemType|null} [modification_type] CMsgGC_GameServer_ServerModificationItem modification_type * @property {boolean|null} [active] CMsgGC_GameServer_ServerModificationItem active + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_GameServer_ServerModificationItem. + * @exports ICMsgGC_GameServer_ServerModificationItem + * @interface ICMsgGC_GameServer_ServerModificationItem + * @augments CMsgGC_GameServer_ServerModificationItem.$Properties + * @deprecated Use CMsgGC_GameServer_ServerModificationItem.$Properties instead. + */ + + /** + * Shape of a CMsgGC_GameServer_ServerModificationItem. + * @typedef {CMsgGC_GameServer_ServerModificationItem.$Properties} CMsgGC_GameServer_ServerModificationItem.$Shape */ /** * Constructs a new CMsgGC_GameServer_ServerModificationItem. * @exports CMsgGC_GameServer_ServerModificationItem * @classdesc Represents a CMsgGC_GameServer_ServerModificationItem. - * @implements ICMsgGC_GameServer_ServerModificationItem * @constructor - * @param {ICMsgGC_GameServer_ServerModificationItem=} [properties] Properties to set + * @param {CMsgGC_GameServer_ServerModificationItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_GameServer_ServerModificationItem(properties) { + var CMsgGC_GameServer_ServerModificationItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_GameServer_ServerModificationItem modification_type. @@ -12364,10 +16242,14 @@ * @function create * @memberof CMsgGC_GameServer_ServerModificationItem * @static - * @param {ICMsgGC_GameServer_ServerModificationItem=} [properties] Properties to set + * @param {CMsgGC_GameServer_ServerModificationItem.$Properties=} [properties] Properties to set * @returns {CMsgGC_GameServer_ServerModificationItem} CMsgGC_GameServer_ServerModificationItem instance + * @type {{ + * (properties: CMsgGC_GameServer_ServerModificationItem.$Shape): CMsgGC_GameServer_ServerModificationItem & CMsgGC_GameServer_ServerModificationItem.$Shape; + * (properties?: CMsgGC_GameServer_ServerModificationItem.$Properties): CMsgGC_GameServer_ServerModificationItem; + * }} */ - CMsgGC_GameServer_ServerModificationItem.create = function create(properties) { + CMsgGC_GameServer_ServerModificationItem.create = function(properties) { return new CMsgGC_GameServer_ServerModificationItem(properties); }; @@ -12376,17 +16258,24 @@ * @function encode * @memberof CMsgGC_GameServer_ServerModificationItem * @static - * @param {ICMsgGC_GameServer_ServerModificationItem} message CMsgGC_GameServer_ServerModificationItem message or plain object to encode + * @param {CMsgGC_GameServer_ServerModificationItem.$Properties} message CMsgGC_GameServer_ServerModificationItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_ServerModificationItem.encode = function encode(message, writer) { + CMsgGC_GameServer_ServerModificationItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.modification_type != null && Object.hasOwnProperty.call(message, "modification_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modification_type); - if (message.active != null && Object.hasOwnProperty.call(message, "active")) + if (message.active != null && $Object.hasOwnProperty.call(message, "active")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.active); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12395,12 +16284,12 @@ * @function encodeDelimited * @memberof CMsgGC_GameServer_ServerModificationItem * @static - * @param {ICMsgGC_GameServer_ServerModificationItem} message CMsgGC_GameServer_ServerModificationItem message or plain object to encode + * @param {CMsgGC_GameServer_ServerModificationItem.$Properties} message CMsgGC_GameServer_ServerModificationItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_GameServer_ServerModificationItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_GameServer_ServerModificationItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12410,28 +16299,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_GameServer_ServerModificationItem} CMsgGC_GameServer_ServerModificationItem + * @returns {CMsgGC_GameServer_ServerModificationItem & CMsgGC_GameServer_ServerModificationItem.$Shape} CMsgGC_GameServer_ServerModificationItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_ServerModificationItem.decode = function decode(reader, length) { + CMsgGC_GameServer_ServerModificationItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_GameServer_ServerModificationItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_GameServer_ServerModificationItem(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.modification_type = reader.int32(); - break; - case 2: - message.active = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.EServerModificationItemType[value] !== $undefined) + message.modification_type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + message.active = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12441,11 +16356,11 @@ * @memberof CMsgGC_GameServer_ServerModificationItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_GameServer_ServerModificationItem} CMsgGC_GameServer_ServerModificationItem + * @returns {CMsgGC_GameServer_ServerModificationItem & CMsgGC_GameServer_ServerModificationItem.$Shape} CMsgGC_GameServer_ServerModificationItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_GameServer_ServerModificationItem.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_GameServer_ServerModificationItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12459,17 +16374,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_GameServer_ServerModificationItem.verify = function verify(message) { + CMsgGC_GameServer_ServerModificationItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.modification_type != null && message.hasOwnProperty("modification_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) switch (message.modification_type) { default: return "modification_type: enum value expected"; case 1: break; } - if (message.active != null && message.hasOwnProperty("active")) + if (message.active != null && $Object.hasOwnProperty.call(message, "active")) if (typeof message.active !== "boolean") return "active: boolean expected"; return null; @@ -12483,18 +16402,25 @@ * @param {Object.} object Plain object * @returns {CMsgGC_GameServer_ServerModificationItem} CMsgGC_GameServer_ServerModificationItem */ - CMsgGC_GameServer_ServerModificationItem.fromObject = function fromObject(object) { + CMsgGC_GameServer_ServerModificationItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_GameServer_ServerModificationItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_GameServer_ServerModificationItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_GameServer_ServerModificationItem(); switch (object.modification_type) { case "kGameServerModificationItem_Halloween": case 1: message.modification_type = 1; break; + default: } if (object.active != null) - message.active = Boolean(object.active); + message.active = $Boolean(object.active); return message; }; @@ -12507,17 +16433,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_GameServer_ServerModificationItem.toObject = function toObject(message, options) { + CMsgGC_GameServer_ServerModificationItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.modification_type = options.enums === String ? "kGameServerModificationItem_Halloween" : 1; + object.modification_type = options.enums === $String ? "kGameServerModificationItem_Halloween" : 1; object.active = false; } - if (message.modification_type != null && message.hasOwnProperty("modification_type")) - object.modification_type = options.enums === String ? $root.EServerModificationItemType[message.modification_type] : message.modification_type; - if (message.active != null && message.hasOwnProperty("active")) + if (message.modification_type != null && $Object.hasOwnProperty.call(message, "modification_type")) + object.modification_type = options.enums === $String ? $root.EServerModificationItemType[message.modification_type] === $undefined ? message.modification_type : $root.EServerModificationItemType[message.modification_type] : message.modification_type; + if (message.active != null && $Object.hasOwnProperty.call(message, "active")) object.active = message.active; return object; }; @@ -12529,8 +16459,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_GameServer_ServerModificationItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_GameServer_ServerModificationItem.prototype.toJSON = function() { + return CMsgGC_GameServer_ServerModificationItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_GameServer_ServerModificationItem + * @function getTypeUrl + * @memberof CMsgGC_GameServer_ServerModificationItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_GameServer_ServerModificationItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_GameServer_ServerModificationItem"; }; return CMsgGC_GameServer_ServerModificationItem; @@ -12540,31 +16484,44 @@ /** * Properties of a CMsgGC_Halloween_ReservedItem. - * @exports ICMsgGC_Halloween_ReservedItem - * @interface ICMsgGC_Halloween_ReservedItem + * @typedef {Object} CMsgGC_Halloween_ReservedItem.$Properties * @property {Array.|null} [x] CMsgGC_Halloween_ReservedItem x * @property {Array.|null} [y] CMsgGC_Halloween_ReservedItem y * @property {Array.|null} [z] CMsgGC_Halloween_ReservedItem z * @property {number|null} [spawn_meta_info] CMsgGC_Halloween_ReservedItem spawn_meta_info + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_Halloween_ReservedItem. + * @exports ICMsgGC_Halloween_ReservedItem + * @interface ICMsgGC_Halloween_ReservedItem + * @augments CMsgGC_Halloween_ReservedItem.$Properties + * @deprecated Use CMsgGC_Halloween_ReservedItem.$Properties instead. + */ + + /** + * Shape of a CMsgGC_Halloween_ReservedItem. + * @typedef {CMsgGC_Halloween_ReservedItem.$Properties} CMsgGC_Halloween_ReservedItem.$Shape */ /** * Constructs a new CMsgGC_Halloween_ReservedItem. * @exports CMsgGC_Halloween_ReservedItem * @classdesc Represents a CMsgGC_Halloween_ReservedItem. - * @implements ICMsgGC_Halloween_ReservedItem * @constructor - * @param {ICMsgGC_Halloween_ReservedItem=} [properties] Properties to set + * @param {CMsgGC_Halloween_ReservedItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_Halloween_ReservedItem(properties) { + var CMsgGC_Halloween_ReservedItem = function (properties) { this.x = []; this.y = []; this.z = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_Halloween_ReservedItem x. @@ -12603,10 +16560,14 @@ * @function create * @memberof CMsgGC_Halloween_ReservedItem * @static - * @param {ICMsgGC_Halloween_ReservedItem=} [properties] Properties to set + * @param {CMsgGC_Halloween_ReservedItem.$Properties=} [properties] Properties to set * @returns {CMsgGC_Halloween_ReservedItem} CMsgGC_Halloween_ReservedItem instance + * @type {{ + * (properties: CMsgGC_Halloween_ReservedItem.$Shape): CMsgGC_Halloween_ReservedItem & CMsgGC_Halloween_ReservedItem.$Shape; + * (properties?: CMsgGC_Halloween_ReservedItem.$Properties): CMsgGC_Halloween_ReservedItem; + * }} */ - CMsgGC_Halloween_ReservedItem.create = function create(properties) { + CMsgGC_Halloween_ReservedItem.create = function(properties) { return new CMsgGC_Halloween_ReservedItem(properties); }; @@ -12615,13 +16576,17 @@ * @function encode * @memberof CMsgGC_Halloween_ReservedItem * @static - * @param {ICMsgGC_Halloween_ReservedItem} message CMsgGC_Halloween_ReservedItem message or plain object to encode + * @param {CMsgGC_Halloween_ReservedItem.$Properties} message CMsgGC_Halloween_ReservedItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Halloween_ReservedItem.encode = function encode(message, writer) { + CMsgGC_Halloween_ReservedItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.x != null && message.x.length) for (var i = 0; i < message.x.length; ++i) writer.uint32(/* id 1, wireType 5 =*/13).float(message.x[i]); @@ -12631,8 +16596,11 @@ if (message.z != null && message.z.length) for (var i = 0; i < message.z.length; ++i) writer.uint32(/* id 3, wireType 5 =*/29).float(message.z[i]); - if (message.spawn_meta_info != null && Object.hasOwnProperty.call(message, "spawn_meta_info")) + if (message.spawn_meta_info != null && $Object.hasOwnProperty.call(message, "spawn_meta_info")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.spawn_meta_info); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12641,12 +16609,12 @@ * @function encodeDelimited * @memberof CMsgGC_Halloween_ReservedItem * @static - * @param {ICMsgGC_Halloween_ReservedItem} message CMsgGC_Halloween_ReservedItem message or plain object to encode + * @param {CMsgGC_Halloween_ReservedItem.$Properties} message CMsgGC_Halloween_ReservedItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Halloween_ReservedItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_Halloween_ReservedItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12656,55 +16624,84 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_Halloween_ReservedItem} CMsgGC_Halloween_ReservedItem + * @returns {CMsgGC_Halloween_ReservedItem & CMsgGC_Halloween_ReservedItem.$Shape} CMsgGC_Halloween_ReservedItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Halloween_ReservedItem.decode = function decode(reader, length) { + CMsgGC_Halloween_ReservedItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_Halloween_ReservedItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_Halloween_ReservedItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.x && message.x.length)) - message.x = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.x.push(reader.float()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.x && message.x.length)) + message.x = []; + reader.floats(message.x); + continue; + } + if (wireType !== 5) + break; + if (!(message.x && message.x.length)) + message.x = []; message.x.push(reader.float()); - break; - case 2: - if (!(message.y && message.y.length)) - message.y = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.y.push(reader.float()); - } else + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.y && message.y.length)) + message.y = []; + reader.floats(message.y); + continue; + } + if (wireType !== 5) + break; + if (!(message.y && message.y.length)) + message.y = []; message.y.push(reader.float()); - break; - case 3: - if (!(message.z && message.z.length)) - message.z = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.z.push(reader.float()); - } else + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.z && message.z.length)) + message.z = []; + reader.floats(message.z); + continue; + } + if (wireType !== 5) + break; + if (!(message.z && message.z.length)) + message.z = []; message.z.push(reader.float()); - break; - case 7: - message.spawn_meta_info = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 7: { + if (wireType !== 0) + break; + message.spawn_meta_info = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12714,11 +16711,11 @@ * @memberof CMsgGC_Halloween_ReservedItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_Halloween_ReservedItem} CMsgGC_Halloween_ReservedItem + * @returns {CMsgGC_Halloween_ReservedItem & CMsgGC_Halloween_ReservedItem.$Shape} CMsgGC_Halloween_ReservedItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Halloween_ReservedItem.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_Halloween_ReservedItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12732,31 +16729,35 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_Halloween_ReservedItem.verify = function verify(message) { + CMsgGC_Halloween_ReservedItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.x != null && message.hasOwnProperty("x")) { - if (!Array.isArray(message.x)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.x != null && $Object.hasOwnProperty.call(message, "x")) { + if (!$Array.isArray(message.x)) return "x: array expected"; for (var i = 0; i < message.x.length; ++i) if (typeof message.x[i] !== "number") return "x: number[] expected"; } - if (message.y != null && message.hasOwnProperty("y")) { - if (!Array.isArray(message.y)) + if (message.y != null && $Object.hasOwnProperty.call(message, "y")) { + if (!$Array.isArray(message.y)) return "y: array expected"; for (var i = 0; i < message.y.length; ++i) if (typeof message.y[i] !== "number") return "y: number[] expected"; } - if (message.z != null && message.hasOwnProperty("z")) { - if (!Array.isArray(message.z)) + if (message.z != null && $Object.hasOwnProperty.call(message, "z")) { + if (!$Array.isArray(message.z)) return "z: array expected"; for (var i = 0; i < message.z.length; ++i) if (typeof message.z[i] !== "number") return "z: number[] expected"; } - if (message.spawn_meta_info != null && message.hasOwnProperty("spawn_meta_info")) + if (message.spawn_meta_info != null && $Object.hasOwnProperty.call(message, "spawn_meta_info")) if (!$util.isInteger(message.spawn_meta_info)) return "spawn_meta_info: integer expected"; return null; @@ -12770,30 +16771,36 @@ * @param {Object.} object Plain object * @returns {CMsgGC_Halloween_ReservedItem} CMsgGC_Halloween_ReservedItem */ - CMsgGC_Halloween_ReservedItem.fromObject = function fromObject(object) { + CMsgGC_Halloween_ReservedItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_Halloween_ReservedItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_Halloween_ReservedItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_Halloween_ReservedItem(); if (object.x) { - if (!Array.isArray(object.x)) - throw TypeError(".CMsgGC_Halloween_ReservedItem.x: array expected"); - message.x = []; + if (!$Array.isArray(object.x)) + throw $TypeError(".CMsgGC_Halloween_ReservedItem.x: array expected"); + message.x = $Array(object.x.length); for (var i = 0; i < object.x.length; ++i) - message.x[i] = Number(object.x[i]); + message.x[i] = $Number(object.x[i]); } if (object.y) { - if (!Array.isArray(object.y)) - throw TypeError(".CMsgGC_Halloween_ReservedItem.y: array expected"); - message.y = []; + if (!$Array.isArray(object.y)) + throw $TypeError(".CMsgGC_Halloween_ReservedItem.y: array expected"); + message.y = $Array(object.y.length); for (var i = 0; i < object.y.length; ++i) - message.y[i] = Number(object.y[i]); + message.y[i] = $Number(object.y[i]); } if (object.z) { - if (!Array.isArray(object.z)) - throw TypeError(".CMsgGC_Halloween_ReservedItem.z: array expected"); - message.z = []; + if (!$Array.isArray(object.z)) + throw $TypeError(".CMsgGC_Halloween_ReservedItem.z: array expected"); + message.z = $Array(object.z.length); for (var i = 0; i < object.z.length; ++i) - message.z[i] = Number(object.z[i]); + message.z[i] = $Number(object.z[i]); } if (object.spawn_meta_info != null) message.spawn_meta_info = object.spawn_meta_info >>> 0; @@ -12809,9 +16816,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_Halloween_ReservedItem.toObject = function toObject(message, options) { + CMsgGC_Halloween_ReservedItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.x = []; @@ -12821,21 +16832,21 @@ if (options.defaults) object.spawn_meta_info = 0; if (message.x && message.x.length) { - object.x = []; + object.x = $Array(message.x.length); for (var j = 0; j < message.x.length; ++j) - object.x[j] = options.json && !isFinite(message.x[j]) ? String(message.x[j]) : message.x[j]; + object.x[j] = options.json && !$isFinite(message.x[j]) ? $String(message.x[j]) : message.x[j]; } if (message.y && message.y.length) { - object.y = []; + object.y = $Array(message.y.length); for (var j = 0; j < message.y.length; ++j) - object.y[j] = options.json && !isFinite(message.y[j]) ? String(message.y[j]) : message.y[j]; + object.y[j] = options.json && !$isFinite(message.y[j]) ? $String(message.y[j]) : message.y[j]; } if (message.z && message.z.length) { - object.z = []; + object.z = $Array(message.z.length); for (var j = 0; j < message.z.length; ++j) - object.z[j] = options.json && !isFinite(message.z[j]) ? String(message.z[j]) : message.z[j]; + object.z[j] = options.json && !$isFinite(message.z[j]) ? $String(message.z[j]) : message.z[j]; } - if (message.spawn_meta_info != null && message.hasOwnProperty("spawn_meta_info")) + if (message.spawn_meta_info != null && $Object.hasOwnProperty.call(message, "spawn_meta_info")) object.spawn_meta_info = message.spawn_meta_info; return object; }; @@ -12847,8 +16858,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_Halloween_ReservedItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_Halloween_ReservedItem.prototype.toJSON = function() { + return CMsgGC_Halloween_ReservedItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_Halloween_ReservedItem + * @function getTypeUrl + * @memberof CMsgGC_Halloween_ReservedItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_Halloween_ReservedItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_Halloween_ReservedItem"; }; return CMsgGC_Halloween_ReservedItem; @@ -12858,27 +16883,40 @@ /** * Properties of a CMsgGC_Halloween_GrantItem. - * @exports ICMsgGC_Halloween_GrantItem - * @interface ICMsgGC_Halloween_GrantItem + * @typedef {Object} CMsgGC_Halloween_GrantItem.$Properties * @property {number|null} [recipient_account_id] CMsgGC_Halloween_GrantItem recipient_account_id * @property {number|null} [level_id] CMsgGC_Halloween_GrantItem level_id * @property {boolean|null} [flagged] CMsgGC_Halloween_GrantItem flagged + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_Halloween_GrantItem. + * @exports ICMsgGC_Halloween_GrantItem + * @interface ICMsgGC_Halloween_GrantItem + * @augments CMsgGC_Halloween_GrantItem.$Properties + * @deprecated Use CMsgGC_Halloween_GrantItem.$Properties instead. + */ + + /** + * Shape of a CMsgGC_Halloween_GrantItem. + * @typedef {CMsgGC_Halloween_GrantItem.$Properties} CMsgGC_Halloween_GrantItem.$Shape */ /** * Constructs a new CMsgGC_Halloween_GrantItem. * @exports CMsgGC_Halloween_GrantItem * @classdesc Represents a CMsgGC_Halloween_GrantItem. - * @implements ICMsgGC_Halloween_GrantItem * @constructor - * @param {ICMsgGC_Halloween_GrantItem=} [properties] Properties to set + * @param {CMsgGC_Halloween_GrantItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_Halloween_GrantItem(properties) { + var CMsgGC_Halloween_GrantItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_Halloween_GrantItem recipient_account_id. @@ -12909,10 +16947,14 @@ * @function create * @memberof CMsgGC_Halloween_GrantItem * @static - * @param {ICMsgGC_Halloween_GrantItem=} [properties] Properties to set + * @param {CMsgGC_Halloween_GrantItem.$Properties=} [properties] Properties to set * @returns {CMsgGC_Halloween_GrantItem} CMsgGC_Halloween_GrantItem instance + * @type {{ + * (properties: CMsgGC_Halloween_GrantItem.$Shape): CMsgGC_Halloween_GrantItem & CMsgGC_Halloween_GrantItem.$Shape; + * (properties?: CMsgGC_Halloween_GrantItem.$Properties): CMsgGC_Halloween_GrantItem; + * }} */ - CMsgGC_Halloween_GrantItem.create = function create(properties) { + CMsgGC_Halloween_GrantItem.create = function(properties) { return new CMsgGC_Halloween_GrantItem(properties); }; @@ -12921,19 +16963,26 @@ * @function encode * @memberof CMsgGC_Halloween_GrantItem * @static - * @param {ICMsgGC_Halloween_GrantItem} message CMsgGC_Halloween_GrantItem message or plain object to encode + * @param {CMsgGC_Halloween_GrantItem.$Properties} message CMsgGC_Halloween_GrantItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Halloween_GrantItem.encode = function encode(message, writer) { + CMsgGC_Halloween_GrantItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.recipient_account_id != null && Object.hasOwnProperty.call(message, "recipient_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.recipient_account_id != null && $Object.hasOwnProperty.call(message, "recipient_account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.recipient_account_id); - if (message.level_id != null && Object.hasOwnProperty.call(message, "level_id")) + if (message.level_id != null && $Object.hasOwnProperty.call(message, "level_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.level_id); - if (message.flagged != null && Object.hasOwnProperty.call(message, "flagged")) + if (message.flagged != null && $Object.hasOwnProperty.call(message, "flagged")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.flagged); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12942,12 +16991,12 @@ * @function encodeDelimited * @memberof CMsgGC_Halloween_GrantItem * @static - * @param {ICMsgGC_Halloween_GrantItem} message CMsgGC_Halloween_GrantItem message or plain object to encode + * @param {CMsgGC_Halloween_GrantItem.$Properties} message CMsgGC_Halloween_GrantItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Halloween_GrantItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_Halloween_GrantItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12957,31 +17006,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_Halloween_GrantItem} CMsgGC_Halloween_GrantItem + * @returns {CMsgGC_Halloween_GrantItem & CMsgGC_Halloween_GrantItem.$Shape} CMsgGC_Halloween_GrantItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Halloween_GrantItem.decode = function decode(reader, length) { + CMsgGC_Halloween_GrantItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_Halloween_GrantItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_Halloween_GrantItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.recipient_account_id = reader.uint32(); - break; - case 2: - message.level_id = reader.uint32(); - break; - case 3: - message.flagged = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.recipient_account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.level_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.flagged = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -12991,11 +17063,11 @@ * @memberof CMsgGC_Halloween_GrantItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_Halloween_GrantItem} CMsgGC_Halloween_GrantItem + * @returns {CMsgGC_Halloween_GrantItem & CMsgGC_Halloween_GrantItem.$Shape} CMsgGC_Halloween_GrantItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Halloween_GrantItem.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_Halloween_GrantItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13009,16 +17081,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_Halloween_GrantItem.verify = function verify(message) { + CMsgGC_Halloween_GrantItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.recipient_account_id != null && message.hasOwnProperty("recipient_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.recipient_account_id != null && $Object.hasOwnProperty.call(message, "recipient_account_id")) if (!$util.isInteger(message.recipient_account_id)) return "recipient_account_id: integer expected"; - if (message.level_id != null && message.hasOwnProperty("level_id")) + if (message.level_id != null && $Object.hasOwnProperty.call(message, "level_id")) if (!$util.isInteger(message.level_id)) return "level_id: integer expected"; - if (message.flagged != null && message.hasOwnProperty("flagged")) + if (message.flagged != null && $Object.hasOwnProperty.call(message, "flagged")) if (typeof message.flagged !== "boolean") return "flagged: boolean expected"; return null; @@ -13032,16 +17108,22 @@ * @param {Object.} object Plain object * @returns {CMsgGC_Halloween_GrantItem} CMsgGC_Halloween_GrantItem */ - CMsgGC_Halloween_GrantItem.fromObject = function fromObject(object) { + CMsgGC_Halloween_GrantItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_Halloween_GrantItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_Halloween_GrantItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_Halloween_GrantItem(); if (object.recipient_account_id != null) message.recipient_account_id = object.recipient_account_id >>> 0; if (object.level_id != null) message.level_id = object.level_id >>> 0; if (object.flagged != null) - message.flagged = Boolean(object.flagged); + message.flagged = $Boolean(object.flagged); return message; }; @@ -13054,20 +17136,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_Halloween_GrantItem.toObject = function toObject(message, options) { + CMsgGC_Halloween_GrantItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.recipient_account_id = 0; object.level_id = 0; object.flagged = false; } - if (message.recipient_account_id != null && message.hasOwnProperty("recipient_account_id")) + if (message.recipient_account_id != null && $Object.hasOwnProperty.call(message, "recipient_account_id")) object.recipient_account_id = message.recipient_account_id; - if (message.level_id != null && message.hasOwnProperty("level_id")) + if (message.level_id != null && $Object.hasOwnProperty.call(message, "level_id")) object.level_id = message.level_id; - if (message.flagged != null && message.hasOwnProperty("flagged")) + if (message.flagged != null && $Object.hasOwnProperty.call(message, "flagged")) object.flagged = message.flagged; return object; }; @@ -13079,8 +17165,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_Halloween_GrantItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_Halloween_GrantItem.prototype.toJSON = function() { + return CMsgGC_Halloween_GrantItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_Halloween_GrantItem + * @function getTypeUrl + * @memberof CMsgGC_Halloween_GrantItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_Halloween_GrantItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_Halloween_GrantItem"; }; return CMsgGC_Halloween_GrantItem; @@ -13088,27 +17188,40 @@ $root.CMsgGC_Halloween_GrantItemResponse = (function() { + /** + * Properties of a CMsgGC_Halloween_GrantItemResponse. + * @typedef {Object} CMsgGC_Halloween_GrantItemResponse.$Properties + * @property {number|null} [recipient_account_id] CMsgGC_Halloween_GrantItemResponse recipient_account_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_Halloween_GrantItemResponse. * @exports ICMsgGC_Halloween_GrantItemResponse * @interface ICMsgGC_Halloween_GrantItemResponse - * @property {number|null} [recipient_account_id] CMsgGC_Halloween_GrantItemResponse recipient_account_id + * @augments CMsgGC_Halloween_GrantItemResponse.$Properties + * @deprecated Use CMsgGC_Halloween_GrantItemResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGC_Halloween_GrantItemResponse. + * @typedef {CMsgGC_Halloween_GrantItemResponse.$Properties} CMsgGC_Halloween_GrantItemResponse.$Shape */ /** * Constructs a new CMsgGC_Halloween_GrantItemResponse. * @exports CMsgGC_Halloween_GrantItemResponse * @classdesc Represents a CMsgGC_Halloween_GrantItemResponse. - * @implements ICMsgGC_Halloween_GrantItemResponse * @constructor - * @param {ICMsgGC_Halloween_GrantItemResponse=} [properties] Properties to set + * @param {CMsgGC_Halloween_GrantItemResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_Halloween_GrantItemResponse(properties) { + var CMsgGC_Halloween_GrantItemResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_Halloween_GrantItemResponse recipient_account_id. @@ -13123,10 +17236,14 @@ * @function create * @memberof CMsgGC_Halloween_GrantItemResponse * @static - * @param {ICMsgGC_Halloween_GrantItemResponse=} [properties] Properties to set + * @param {CMsgGC_Halloween_GrantItemResponse.$Properties=} [properties] Properties to set * @returns {CMsgGC_Halloween_GrantItemResponse} CMsgGC_Halloween_GrantItemResponse instance + * @type {{ + * (properties: CMsgGC_Halloween_GrantItemResponse.$Shape): CMsgGC_Halloween_GrantItemResponse & CMsgGC_Halloween_GrantItemResponse.$Shape; + * (properties?: CMsgGC_Halloween_GrantItemResponse.$Properties): CMsgGC_Halloween_GrantItemResponse; + * }} */ - CMsgGC_Halloween_GrantItemResponse.create = function create(properties) { + CMsgGC_Halloween_GrantItemResponse.create = function(properties) { return new CMsgGC_Halloween_GrantItemResponse(properties); }; @@ -13135,15 +17252,22 @@ * @function encode * @memberof CMsgGC_Halloween_GrantItemResponse * @static - * @param {ICMsgGC_Halloween_GrantItemResponse} message CMsgGC_Halloween_GrantItemResponse message or plain object to encode + * @param {CMsgGC_Halloween_GrantItemResponse.$Properties} message CMsgGC_Halloween_GrantItemResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Halloween_GrantItemResponse.encode = function encode(message, writer) { + CMsgGC_Halloween_GrantItemResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.recipient_account_id != null && Object.hasOwnProperty.call(message, "recipient_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.recipient_account_id != null && $Object.hasOwnProperty.call(message, "recipient_account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.recipient_account_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13152,12 +17276,12 @@ * @function encodeDelimited * @memberof CMsgGC_Halloween_GrantItemResponse * @static - * @param {ICMsgGC_Halloween_GrantItemResponse} message CMsgGC_Halloween_GrantItemResponse message or plain object to encode + * @param {CMsgGC_Halloween_GrantItemResponse.$Properties} message CMsgGC_Halloween_GrantItemResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Halloween_GrantItemResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_Halloween_GrantItemResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13167,25 +17291,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_Halloween_GrantItemResponse} CMsgGC_Halloween_GrantItemResponse + * @returns {CMsgGC_Halloween_GrantItemResponse & CMsgGC_Halloween_GrantItemResponse.$Shape} CMsgGC_Halloween_GrantItemResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Halloween_GrantItemResponse.decode = function decode(reader, length) { + CMsgGC_Halloween_GrantItemResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_Halloween_GrantItemResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_Halloween_GrantItemResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.recipient_account_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.recipient_account_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13195,11 +17336,11 @@ * @memberof CMsgGC_Halloween_GrantItemResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_Halloween_GrantItemResponse} CMsgGC_Halloween_GrantItemResponse + * @returns {CMsgGC_Halloween_GrantItemResponse & CMsgGC_Halloween_GrantItemResponse.$Shape} CMsgGC_Halloween_GrantItemResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Halloween_GrantItemResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_Halloween_GrantItemResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13213,10 +17354,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_Halloween_GrantItemResponse.verify = function verify(message) { + CMsgGC_Halloween_GrantItemResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.recipient_account_id != null && message.hasOwnProperty("recipient_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.recipient_account_id != null && $Object.hasOwnProperty.call(message, "recipient_account_id")) if (!$util.isInteger(message.recipient_account_id)) return "recipient_account_id: integer expected"; return null; @@ -13230,9 +17375,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_Halloween_GrantItemResponse} CMsgGC_Halloween_GrantItemResponse */ - CMsgGC_Halloween_GrantItemResponse.fromObject = function fromObject(object) { + CMsgGC_Halloween_GrantItemResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_Halloween_GrantItemResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_Halloween_GrantItemResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_Halloween_GrantItemResponse(); if (object.recipient_account_id != null) message.recipient_account_id = object.recipient_account_id >>> 0; @@ -13248,13 +17399,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_Halloween_GrantItemResponse.toObject = function toObject(message, options) { + CMsgGC_Halloween_GrantItemResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.recipient_account_id = 0; - if (message.recipient_account_id != null && message.hasOwnProperty("recipient_account_id")) + if (message.recipient_account_id != null && $Object.hasOwnProperty.call(message, "recipient_account_id")) object.recipient_account_id = message.recipient_account_id; return object; }; @@ -13266,8 +17421,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_Halloween_GrantItemResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_Halloween_GrantItemResponse.prototype.toJSON = function() { + return CMsgGC_Halloween_GrantItemResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_Halloween_GrantItemResponse + * @function getTypeUrl + * @memberof CMsgGC_Halloween_GrantItemResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_Halloween_GrantItemResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_Halloween_GrantItemResponse"; }; return CMsgGC_Halloween_GrantItemResponse; @@ -13275,36 +17444,53 @@ $root.CMsgGC_Halloween_ItemClaimed = (function() { + /** + * Properties of a CMsgGC_Halloween_ItemClaimed. + * @typedef {Object} CMsgGC_Halloween_ItemClaimed.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_Halloween_ItemClaimed. * @exports ICMsgGC_Halloween_ItemClaimed * @interface ICMsgGC_Halloween_ItemClaimed + * @augments CMsgGC_Halloween_ItemClaimed.$Properties + * @deprecated Use CMsgGC_Halloween_ItemClaimed.$Properties instead. + */ + + /** + * Shape of a CMsgGC_Halloween_ItemClaimed. + * @typedef {CMsgGC_Halloween_ItemClaimed.$Properties} CMsgGC_Halloween_ItemClaimed.$Shape */ /** * Constructs a new CMsgGC_Halloween_ItemClaimed. * @exports CMsgGC_Halloween_ItemClaimed * @classdesc Represents a CMsgGC_Halloween_ItemClaimed. - * @implements ICMsgGC_Halloween_ItemClaimed * @constructor - * @param {ICMsgGC_Halloween_ItemClaimed=} [properties] Properties to set + * @param {CMsgGC_Halloween_ItemClaimed.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_Halloween_ItemClaimed(properties) { + var CMsgGC_Halloween_ItemClaimed = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgGC_Halloween_ItemClaimed instance using the specified properties. * @function create * @memberof CMsgGC_Halloween_ItemClaimed * @static - * @param {ICMsgGC_Halloween_ItemClaimed=} [properties] Properties to set + * @param {CMsgGC_Halloween_ItemClaimed.$Properties=} [properties] Properties to set * @returns {CMsgGC_Halloween_ItemClaimed} CMsgGC_Halloween_ItemClaimed instance + * @type {{ + * (properties: CMsgGC_Halloween_ItemClaimed.$Shape): CMsgGC_Halloween_ItemClaimed & CMsgGC_Halloween_ItemClaimed.$Shape; + * (properties?: CMsgGC_Halloween_ItemClaimed.$Properties): CMsgGC_Halloween_ItemClaimed; + * }} */ - CMsgGC_Halloween_ItemClaimed.create = function create(properties) { + CMsgGC_Halloween_ItemClaimed.create = function(properties) { return new CMsgGC_Halloween_ItemClaimed(properties); }; @@ -13313,13 +17499,20 @@ * @function encode * @memberof CMsgGC_Halloween_ItemClaimed * @static - * @param {ICMsgGC_Halloween_ItemClaimed} message CMsgGC_Halloween_ItemClaimed message or plain object to encode + * @param {CMsgGC_Halloween_ItemClaimed.$Properties} message CMsgGC_Halloween_ItemClaimed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Halloween_ItemClaimed.encode = function encode(message, writer) { + CMsgGC_Halloween_ItemClaimed.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13328,12 +17521,12 @@ * @function encodeDelimited * @memberof CMsgGC_Halloween_ItemClaimed * @static - * @param {ICMsgGC_Halloween_ItemClaimed} message CMsgGC_Halloween_ItemClaimed message or plain object to encode + * @param {CMsgGC_Halloween_ItemClaimed.$Properties} message CMsgGC_Halloween_ItemClaimed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Halloween_ItemClaimed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_Halloween_ItemClaimed.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13343,22 +17536,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_Halloween_ItemClaimed} CMsgGC_Halloween_ItemClaimed + * @returns {CMsgGC_Halloween_ItemClaimed & CMsgGC_Halloween_ItemClaimed.$Shape} CMsgGC_Halloween_ItemClaimed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Halloween_ItemClaimed.decode = function decode(reader, length) { + CMsgGC_Halloween_ItemClaimed.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_Halloween_ItemClaimed(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_Halloween_ItemClaimed(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13368,11 +17572,11 @@ * @memberof CMsgGC_Halloween_ItemClaimed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_Halloween_ItemClaimed} CMsgGC_Halloween_ItemClaimed + * @returns {CMsgGC_Halloween_ItemClaimed & CMsgGC_Halloween_ItemClaimed.$Shape} CMsgGC_Halloween_ItemClaimed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Halloween_ItemClaimed.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_Halloween_ItemClaimed.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13386,9 +17590,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_Halloween_ItemClaimed.verify = function verify(message) { + CMsgGC_Halloween_ItemClaimed.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -13400,9 +17608,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_Halloween_ItemClaimed} CMsgGC_Halloween_ItemClaimed */ - CMsgGC_Halloween_ItemClaimed.fromObject = function fromObject(object) { + CMsgGC_Halloween_ItemClaimed.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_Halloween_ItemClaimed) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_Halloween_ItemClaimed: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgGC_Halloween_ItemClaimed(); }; @@ -13415,7 +17629,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_Halloween_ItemClaimed.toObject = function toObject() { + CMsgGC_Halloween_ItemClaimed.toObject = function () { return {}; }; @@ -13426,8 +17640,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_Halloween_ItemClaimed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_Halloween_ItemClaimed.prototype.toJSON = function() { + return CMsgGC_Halloween_ItemClaimed.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_Halloween_ItemClaimed + * @function getTypeUrl + * @memberof CMsgGC_Halloween_ItemClaimed + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_Halloween_ItemClaimed.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_Halloween_ItemClaimed"; }; return CMsgGC_Halloween_ItemClaimed; @@ -13437,26 +17665,39 @@ /** * Properties of a CMsgGC_PickupItemEligibility_Query. - * @exports ICMsgGC_PickupItemEligibility_Query - * @interface ICMsgGC_PickupItemEligibility_Query + * @typedef {Object} CMsgGC_PickupItemEligibility_Query.$Properties * @property {number|null} [account_id] CMsgGC_PickupItemEligibility_Query account_id * @property {number|null} [seconds_ago] CMsgGC_PickupItemEligibility_Query seconds_ago + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_PickupItemEligibility_Query. + * @exports ICMsgGC_PickupItemEligibility_Query + * @interface ICMsgGC_PickupItemEligibility_Query + * @augments CMsgGC_PickupItemEligibility_Query.$Properties + * @deprecated Use CMsgGC_PickupItemEligibility_Query.$Properties instead. + */ + + /** + * Shape of a CMsgGC_PickupItemEligibility_Query. + * @typedef {CMsgGC_PickupItemEligibility_Query.$Properties} CMsgGC_PickupItemEligibility_Query.$Shape */ /** * Constructs a new CMsgGC_PickupItemEligibility_Query. * @exports CMsgGC_PickupItemEligibility_Query * @classdesc Represents a CMsgGC_PickupItemEligibility_Query. - * @implements ICMsgGC_PickupItemEligibility_Query * @constructor - * @param {ICMsgGC_PickupItemEligibility_Query=} [properties] Properties to set + * @param {CMsgGC_PickupItemEligibility_Query.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_PickupItemEligibility_Query(properties) { + var CMsgGC_PickupItemEligibility_Query = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_PickupItemEligibility_Query account_id. @@ -13479,10 +17720,14 @@ * @function create * @memberof CMsgGC_PickupItemEligibility_Query * @static - * @param {ICMsgGC_PickupItemEligibility_Query=} [properties] Properties to set + * @param {CMsgGC_PickupItemEligibility_Query.$Properties=} [properties] Properties to set * @returns {CMsgGC_PickupItemEligibility_Query} CMsgGC_PickupItemEligibility_Query instance + * @type {{ + * (properties: CMsgGC_PickupItemEligibility_Query.$Shape): CMsgGC_PickupItemEligibility_Query & CMsgGC_PickupItemEligibility_Query.$Shape; + * (properties?: CMsgGC_PickupItemEligibility_Query.$Properties): CMsgGC_PickupItemEligibility_Query; + * }} */ - CMsgGC_PickupItemEligibility_Query.create = function create(properties) { + CMsgGC_PickupItemEligibility_Query.create = function(properties) { return new CMsgGC_PickupItemEligibility_Query(properties); }; @@ -13491,17 +17736,24 @@ * @function encode * @memberof CMsgGC_PickupItemEligibility_Query * @static - * @param {ICMsgGC_PickupItemEligibility_Query} message CMsgGC_PickupItemEligibility_Query message or plain object to encode + * @param {CMsgGC_PickupItemEligibility_Query.$Properties} message CMsgGC_PickupItemEligibility_Query message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_PickupItemEligibility_Query.encode = function encode(message, writer) { + CMsgGC_PickupItemEligibility_Query.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.seconds_ago != null && Object.hasOwnProperty.call(message, "seconds_ago")) + if (message.seconds_ago != null && $Object.hasOwnProperty.call(message, "seconds_ago")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.seconds_ago); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13510,12 +17762,12 @@ * @function encodeDelimited * @memberof CMsgGC_PickupItemEligibility_Query * @static - * @param {ICMsgGC_PickupItemEligibility_Query} message CMsgGC_PickupItemEligibility_Query message or plain object to encode + * @param {CMsgGC_PickupItemEligibility_Query.$Properties} message CMsgGC_PickupItemEligibility_Query message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_PickupItemEligibility_Query.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_PickupItemEligibility_Query.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13525,28 +17777,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_PickupItemEligibility_Query} CMsgGC_PickupItemEligibility_Query + * @returns {CMsgGC_PickupItemEligibility_Query & CMsgGC_PickupItemEligibility_Query.$Shape} CMsgGC_PickupItemEligibility_Query * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_PickupItemEligibility_Query.decode = function decode(reader, length) { + CMsgGC_PickupItemEligibility_Query.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_PickupItemEligibility_Query(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_PickupItemEligibility_Query(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.seconds_ago = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.seconds_ago = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13556,11 +17828,11 @@ * @memberof CMsgGC_PickupItemEligibility_Query * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_PickupItemEligibility_Query} CMsgGC_PickupItemEligibility_Query + * @returns {CMsgGC_PickupItemEligibility_Query & CMsgGC_PickupItemEligibility_Query.$Shape} CMsgGC_PickupItemEligibility_Query * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_PickupItemEligibility_Query.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_PickupItemEligibility_Query.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13574,13 +17846,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_PickupItemEligibility_Query.verify = function verify(message) { + CMsgGC_PickupItemEligibility_Query.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.seconds_ago != null && message.hasOwnProperty("seconds_ago")) + if (message.seconds_ago != null && $Object.hasOwnProperty.call(message, "seconds_ago")) if (!$util.isInteger(message.seconds_ago)) return "seconds_ago: integer expected"; return null; @@ -13594,9 +17870,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_PickupItemEligibility_Query} CMsgGC_PickupItemEligibility_Query */ - CMsgGC_PickupItemEligibility_Query.fromObject = function fromObject(object) { + CMsgGC_PickupItemEligibility_Query.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_PickupItemEligibility_Query) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_PickupItemEligibility_Query: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_PickupItemEligibility_Query(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -13614,17 +17896,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_PickupItemEligibility_Query.toObject = function toObject(message, options) { + CMsgGC_PickupItemEligibility_Query.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; object.seconds_ago = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.seconds_ago != null && message.hasOwnProperty("seconds_ago")) + if (message.seconds_ago != null && $Object.hasOwnProperty.call(message, "seconds_ago")) object.seconds_ago = message.seconds_ago; return object; }; @@ -13636,8 +17922,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_PickupItemEligibility_Query.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_PickupItemEligibility_Query.prototype.toJSON = function() { + return CMsgGC_PickupItemEligibility_Query.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_PickupItemEligibility_Query + * @function getTypeUrl + * @memberof CMsgGC_PickupItemEligibility_Query + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_PickupItemEligibility_Query.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_PickupItemEligibility_Query"; }; return CMsgGC_PickupItemEligibility_Query; @@ -13647,27 +17947,40 @@ /** * Properties of a CMsgGC_PickupItemEligibility_QueryResponse. - * @exports ICMsgGC_PickupItemEligibility_QueryResponse - * @interface ICMsgGC_PickupItemEligibility_QueryResponse + * @typedef {Object} CMsgGC_PickupItemEligibility_QueryResponse.$Properties * @property {number|null} [account_id] CMsgGC_PickupItemEligibility_QueryResponse account_id * @property {boolean|null} [was_eligible] CMsgGC_PickupItemEligibility_QueryResponse was_eligible * @property {number|null} [level_id] CMsgGC_PickupItemEligibility_QueryResponse level_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_PickupItemEligibility_QueryResponse. + * @exports ICMsgGC_PickupItemEligibility_QueryResponse + * @interface ICMsgGC_PickupItemEligibility_QueryResponse + * @augments CMsgGC_PickupItemEligibility_QueryResponse.$Properties + * @deprecated Use CMsgGC_PickupItemEligibility_QueryResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGC_PickupItemEligibility_QueryResponse. + * @typedef {CMsgGC_PickupItemEligibility_QueryResponse.$Properties} CMsgGC_PickupItemEligibility_QueryResponse.$Shape */ /** * Constructs a new CMsgGC_PickupItemEligibility_QueryResponse. * @exports CMsgGC_PickupItemEligibility_QueryResponse * @classdesc Represents a CMsgGC_PickupItemEligibility_QueryResponse. - * @implements ICMsgGC_PickupItemEligibility_QueryResponse * @constructor - * @param {ICMsgGC_PickupItemEligibility_QueryResponse=} [properties] Properties to set + * @param {CMsgGC_PickupItemEligibility_QueryResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_PickupItemEligibility_QueryResponse(properties) { + var CMsgGC_PickupItemEligibility_QueryResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_PickupItemEligibility_QueryResponse account_id. @@ -13698,10 +18011,14 @@ * @function create * @memberof CMsgGC_PickupItemEligibility_QueryResponse * @static - * @param {ICMsgGC_PickupItemEligibility_QueryResponse=} [properties] Properties to set + * @param {CMsgGC_PickupItemEligibility_QueryResponse.$Properties=} [properties] Properties to set * @returns {CMsgGC_PickupItemEligibility_QueryResponse} CMsgGC_PickupItemEligibility_QueryResponse instance + * @type {{ + * (properties: CMsgGC_PickupItemEligibility_QueryResponse.$Shape): CMsgGC_PickupItemEligibility_QueryResponse & CMsgGC_PickupItemEligibility_QueryResponse.$Shape; + * (properties?: CMsgGC_PickupItemEligibility_QueryResponse.$Properties): CMsgGC_PickupItemEligibility_QueryResponse; + * }} */ - CMsgGC_PickupItemEligibility_QueryResponse.create = function create(properties) { + CMsgGC_PickupItemEligibility_QueryResponse.create = function(properties) { return new CMsgGC_PickupItemEligibility_QueryResponse(properties); }; @@ -13710,19 +18027,26 @@ * @function encode * @memberof CMsgGC_PickupItemEligibility_QueryResponse * @static - * @param {ICMsgGC_PickupItemEligibility_QueryResponse} message CMsgGC_PickupItemEligibility_QueryResponse message or plain object to encode + * @param {CMsgGC_PickupItemEligibility_QueryResponse.$Properties} message CMsgGC_PickupItemEligibility_QueryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_PickupItemEligibility_QueryResponse.encode = function encode(message, writer) { + CMsgGC_PickupItemEligibility_QueryResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.was_eligible != null && Object.hasOwnProperty.call(message, "was_eligible")) + if (message.was_eligible != null && $Object.hasOwnProperty.call(message, "was_eligible")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.was_eligible); - if (message.level_id != null && Object.hasOwnProperty.call(message, "level_id")) + if (message.level_id != null && $Object.hasOwnProperty.call(message, "level_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.level_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13731,12 +18055,12 @@ * @function encodeDelimited * @memberof CMsgGC_PickupItemEligibility_QueryResponse * @static - * @param {ICMsgGC_PickupItemEligibility_QueryResponse} message CMsgGC_PickupItemEligibility_QueryResponse message or plain object to encode + * @param {CMsgGC_PickupItemEligibility_QueryResponse.$Properties} message CMsgGC_PickupItemEligibility_QueryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_PickupItemEligibility_QueryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_PickupItemEligibility_QueryResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13746,31 +18070,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_PickupItemEligibility_QueryResponse} CMsgGC_PickupItemEligibility_QueryResponse + * @returns {CMsgGC_PickupItemEligibility_QueryResponse & CMsgGC_PickupItemEligibility_QueryResponse.$Shape} CMsgGC_PickupItemEligibility_QueryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_PickupItemEligibility_QueryResponse.decode = function decode(reader, length) { + CMsgGC_PickupItemEligibility_QueryResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_PickupItemEligibility_QueryResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_PickupItemEligibility_QueryResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.was_eligible = reader.bool(); - break; - case 3: - message.level_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.was_eligible = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.level_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13780,11 +18127,11 @@ * @memberof CMsgGC_PickupItemEligibility_QueryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_PickupItemEligibility_QueryResponse} CMsgGC_PickupItemEligibility_QueryResponse + * @returns {CMsgGC_PickupItemEligibility_QueryResponse & CMsgGC_PickupItemEligibility_QueryResponse.$Shape} CMsgGC_PickupItemEligibility_QueryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_PickupItemEligibility_QueryResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_PickupItemEligibility_QueryResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13798,16 +18145,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_PickupItemEligibility_QueryResponse.verify = function verify(message) { + CMsgGC_PickupItemEligibility_QueryResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.was_eligible != null && message.hasOwnProperty("was_eligible")) + if (message.was_eligible != null && $Object.hasOwnProperty.call(message, "was_eligible")) if (typeof message.was_eligible !== "boolean") return "was_eligible: boolean expected"; - if (message.level_id != null && message.hasOwnProperty("level_id")) + if (message.level_id != null && $Object.hasOwnProperty.call(message, "level_id")) if (!$util.isInteger(message.level_id)) return "level_id: integer expected"; return null; @@ -13821,14 +18172,20 @@ * @param {Object.} object Plain object * @returns {CMsgGC_PickupItemEligibility_QueryResponse} CMsgGC_PickupItemEligibility_QueryResponse */ - CMsgGC_PickupItemEligibility_QueryResponse.fromObject = function fromObject(object) { + CMsgGC_PickupItemEligibility_QueryResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_PickupItemEligibility_QueryResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_PickupItemEligibility_QueryResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_PickupItemEligibility_QueryResponse(); if (object.account_id != null) message.account_id = object.account_id >>> 0; if (object.was_eligible != null) - message.was_eligible = Boolean(object.was_eligible); + message.was_eligible = $Boolean(object.was_eligible); if (object.level_id != null) message.level_id = object.level_id >>> 0; return message; @@ -13843,20 +18200,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_PickupItemEligibility_QueryResponse.toObject = function toObject(message, options) { + CMsgGC_PickupItemEligibility_QueryResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; object.was_eligible = false; object.level_id = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.was_eligible != null && message.hasOwnProperty("was_eligible")) + if (message.was_eligible != null && $Object.hasOwnProperty.call(message, "was_eligible")) object.was_eligible = message.was_eligible; - if (message.level_id != null && message.hasOwnProperty("level_id")) + if (message.level_id != null && $Object.hasOwnProperty.call(message, "level_id")) object.level_id = message.level_id; return object; }; @@ -13868,8 +18229,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_PickupItemEligibility_QueryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_PickupItemEligibility_QueryResponse.prototype.toJSON = function() { + return CMsgGC_PickupItemEligibility_QueryResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_PickupItemEligibility_QueryResponse + * @function getTypeUrl + * @memberof CMsgGC_PickupItemEligibility_QueryResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_PickupItemEligibility_QueryResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_PickupItemEligibility_QueryResponse"; }; return CMsgGC_PickupItemEligibility_QueryResponse; @@ -13879,36 +18254,49 @@ /** * Properties of a CSOTFPartyMember. - * @exports ICSOTFPartyMember - * @interface ICSOTFPartyMember + * @typedef {Object} CSOTFPartyMember.$Properties * @property {boolean|null} [owns_ticket] CSOTFPartyMember owns_ticket * @property {number|null} [completed_missions] CSOTFPartyMember completed_missions * @property {number|null} [badge_level] CSOTFPartyMember badge_level * @property {boolean|null} [competitive_access] CSOTFPartyMember competitive_access * @property {number|null} [experience] CSOTFPartyMember experience - * @property {ICTFPerPlayerMatchCriteriaProto|null} [player_criteria] CSOTFPartyMember player_criteria - * @property {CSOTFPartyMember.IActivity|null} [activity] CSOTFPartyMember activity + * @property {CTFPerPlayerMatchCriteriaProto.$Properties|null} [player_criteria] CSOTFPartyMember player_criteria + * @property {CSOTFPartyMember.Activity.$Properties|null} [activity] CSOTFPartyMember activity * @property {boolean|null} [casual_banned] CSOTFPartyMember casual_banned * @property {boolean|null} [ranked_banned] CSOTFPartyMember ranked_banned * @property {boolean|null} [casual_low_priority] CSOTFPartyMember casual_low_priority * @property {boolean|null} [ranked_low_priority] CSOTFPartyMember ranked_low_priority * @property {boolean|null} [lobby_standby] CSOTFPartyMember lobby_standby + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOTFPartyMember. + * @exports ICSOTFPartyMember + * @interface ICSOTFPartyMember + * @augments CSOTFPartyMember.$Properties + * @deprecated Use CSOTFPartyMember.$Properties instead. + */ + + /** + * Shape of a CSOTFPartyMember. + * @typedef {CSOTFPartyMember.$Properties} CSOTFPartyMember.$Shape */ /** * Constructs a new CSOTFPartyMember. * @exports CSOTFPartyMember * @classdesc Represents a CSOTFPartyMember. - * @implements ICSOTFPartyMember * @constructor - * @param {ICSOTFPartyMember=} [properties] Properties to set + * @param {CSOTFPartyMember.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOTFPartyMember(properties) { + var CSOTFPartyMember = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOTFPartyMember owns_ticket. @@ -13952,7 +18340,7 @@ /** * CSOTFPartyMember player_criteria. - * @member {ICTFPerPlayerMatchCriteriaProto|null|undefined} player_criteria + * @member {CTFPerPlayerMatchCriteriaProto.$Properties|null|undefined} player_criteria * @memberof CSOTFPartyMember * @instance */ @@ -13960,7 +18348,7 @@ /** * CSOTFPartyMember activity. - * @member {CSOTFPartyMember.IActivity|null|undefined} activity + * @member {CSOTFPartyMember.Activity.$Properties|null|undefined} activity * @memberof CSOTFPartyMember * @instance */ @@ -14011,10 +18399,14 @@ * @function create * @memberof CSOTFPartyMember * @static - * @param {ICSOTFPartyMember=} [properties] Properties to set + * @param {CSOTFPartyMember.$Properties=} [properties] Properties to set * @returns {CSOTFPartyMember} CSOTFPartyMember instance + * @type {{ + * (properties: CSOTFPartyMember.$Shape): CSOTFPartyMember & CSOTFPartyMember.$Shape; + * (properties?: CSOTFPartyMember.$Properties): CSOTFPartyMember; + * }} */ - CSOTFPartyMember.create = function create(properties) { + CSOTFPartyMember.create = function(properties) { return new CSOTFPartyMember(properties); }; @@ -14023,37 +18415,44 @@ * @function encode * @memberof CSOTFPartyMember * @static - * @param {ICSOTFPartyMember} message CSOTFPartyMember message or plain object to encode + * @param {CSOTFPartyMember.$Properties} message CSOTFPartyMember message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFPartyMember.encode = function encode(message, writer) { + CSOTFPartyMember.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.owns_ticket != null && Object.hasOwnProperty.call(message, "owns_ticket")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.owns_ticket != null && $Object.hasOwnProperty.call(message, "owns_ticket")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.owns_ticket); - if (message.completed_missions != null && Object.hasOwnProperty.call(message, "completed_missions")) + if (message.completed_missions != null && $Object.hasOwnProperty.call(message, "completed_missions")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.completed_missions); - if (message.badge_level != null && Object.hasOwnProperty.call(message, "badge_level")) + if (message.badge_level != null && $Object.hasOwnProperty.call(message, "badge_level")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.badge_level); - if (message.competitive_access != null && Object.hasOwnProperty.call(message, "competitive_access")) + if (message.competitive_access != null && $Object.hasOwnProperty.call(message, "competitive_access")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.competitive_access); - if (message.experience != null && Object.hasOwnProperty.call(message, "experience")) + if (message.experience != null && $Object.hasOwnProperty.call(message, "experience")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.experience); - if (message.player_criteria != null && Object.hasOwnProperty.call(message, "player_criteria")) - $root.CTFPerPlayerMatchCriteriaProto.encode(message.player_criteria, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.activity != null && Object.hasOwnProperty.call(message, "activity")) - $root.CSOTFPartyMember.Activity.encode(message.activity, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.casual_banned != null && Object.hasOwnProperty.call(message, "casual_banned")) + if (message.player_criteria != null && $Object.hasOwnProperty.call(message, "player_criteria")) + $root.CTFPerPlayerMatchCriteriaProto.encode(message.player_criteria, writer.uint32(/* id 16, wireType 2 =*/130).fork(), _depth + 1).ldelim(); + if (message.activity != null && $Object.hasOwnProperty.call(message, "activity")) + $root.CSOTFPartyMember.Activity.encode(message.activity, writer.uint32(/* id 17, wireType 2 =*/138).fork(), _depth + 1).ldelim(); + if (message.casual_banned != null && $Object.hasOwnProperty.call(message, "casual_banned")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.casual_banned); - if (message.ranked_banned != null && Object.hasOwnProperty.call(message, "ranked_banned")) + if (message.ranked_banned != null && $Object.hasOwnProperty.call(message, "ranked_banned")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.ranked_banned); - if (message.casual_low_priority != null && Object.hasOwnProperty.call(message, "casual_low_priority")) + if (message.casual_low_priority != null && $Object.hasOwnProperty.call(message, "casual_low_priority")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.casual_low_priority); - if (message.ranked_low_priority != null && Object.hasOwnProperty.call(message, "ranked_low_priority")) + if (message.ranked_low_priority != null && $Object.hasOwnProperty.call(message, "ranked_low_priority")) writer.uint32(/* id 21, wireType 0 =*/168).bool(message.ranked_low_priority); - if (message.lobby_standby != null && Object.hasOwnProperty.call(message, "lobby_standby")) + if (message.lobby_standby != null && $Object.hasOwnProperty.call(message, "lobby_standby")) writer.uint32(/* id 22, wireType 0 =*/176).bool(message.lobby_standby); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14062,12 +18461,12 @@ * @function encodeDelimited * @memberof CSOTFPartyMember * @static - * @param {ICSOTFPartyMember} message CSOTFPartyMember message or plain object to encode + * @param {CSOTFPartyMember.$Properties} message CSOTFPartyMember message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFPartyMember.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOTFPartyMember.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14077,58 +18476,108 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFPartyMember} CSOTFPartyMember + * @returns {CSOTFPartyMember & CSOTFPartyMember.$Shape} CSOTFPartyMember * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFPartyMember.decode = function decode(reader, length) { + CSOTFPartyMember.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFPartyMember(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFPartyMember(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.owns_ticket = reader.bool(); - break; - case 3: - message.completed_missions = reader.uint32(); - break; - case 4: - message.badge_level = reader.uint32(); - break; - case 9: - message.competitive_access = reader.bool(); - break; - case 14: - message.experience = reader.uint32(); - break; - case 16: - message.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.decode(reader, reader.uint32()); - break; - case 17: - message.activity = $root.CSOTFPartyMember.Activity.decode(reader, reader.uint32()); - break; - case 18: - message.casual_banned = reader.bool(); - break; - case 19: - message.ranked_banned = reader.bool(); - break; - case 20: - message.casual_low_priority = reader.bool(); - break; - case 21: - message.ranked_low_priority = reader.bool(); - break; - case 22: - message.lobby_standby = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 0) + break; + message.owns_ticket = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.completed_missions = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.badge_level = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.competitive_access = reader.bool(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.experience = reader.uint32(); + continue; + } + case 16: { + if (wireType !== 2) + break; + message.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.decode(reader, reader.uint32(), $undefined, _depth + 1, message.player_criteria); + continue; + } + case 17: { + if (wireType !== 2) + break; + message.activity = $root.CSOTFPartyMember.Activity.decode(reader, reader.uint32(), $undefined, _depth + 1, message.activity); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.casual_banned = reader.bool(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.ranked_banned = reader.bool(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.casual_low_priority = reader.bool(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.ranked_low_priority = reader.bool(); + continue; + } + case 22: { + if (wireType !== 0) + break; + message.lobby_standby = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14138,11 +18587,11 @@ * @memberof CSOTFPartyMember * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFPartyMember} CSOTFPartyMember + * @returns {CSOTFPartyMember & CSOTFPartyMember.$Shape} CSOTFPartyMember * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFPartyMember.decodeDelimited = function decodeDelimited(reader) { + CSOTFPartyMember.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14156,47 +18605,51 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOTFPartyMember.verify = function verify(message) { + CSOTFPartyMember.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.owns_ticket != null && message.hasOwnProperty("owns_ticket")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.owns_ticket != null && $Object.hasOwnProperty.call(message, "owns_ticket")) if (typeof message.owns_ticket !== "boolean") return "owns_ticket: boolean expected"; - if (message.completed_missions != null && message.hasOwnProperty("completed_missions")) + if (message.completed_missions != null && $Object.hasOwnProperty.call(message, "completed_missions")) if (!$util.isInteger(message.completed_missions)) return "completed_missions: integer expected"; - if (message.badge_level != null && message.hasOwnProperty("badge_level")) + if (message.badge_level != null && $Object.hasOwnProperty.call(message, "badge_level")) if (!$util.isInteger(message.badge_level)) return "badge_level: integer expected"; - if (message.competitive_access != null && message.hasOwnProperty("competitive_access")) + if (message.competitive_access != null && $Object.hasOwnProperty.call(message, "competitive_access")) if (typeof message.competitive_access !== "boolean") return "competitive_access: boolean expected"; - if (message.experience != null && message.hasOwnProperty("experience")) + if (message.experience != null && $Object.hasOwnProperty.call(message, "experience")) if (!$util.isInteger(message.experience)) return "experience: integer expected"; - if (message.player_criteria != null && message.hasOwnProperty("player_criteria")) { - var error = $root.CTFPerPlayerMatchCriteriaProto.verify(message.player_criteria); + if (message.player_criteria != null && $Object.hasOwnProperty.call(message, "player_criteria")) { + var error = $root.CTFPerPlayerMatchCriteriaProto.verify(message.player_criteria, _depth + 1); if (error) return "player_criteria." + error; } - if (message.activity != null && message.hasOwnProperty("activity")) { - var error = $root.CSOTFPartyMember.Activity.verify(message.activity); + if (message.activity != null && $Object.hasOwnProperty.call(message, "activity")) { + var error = $root.CSOTFPartyMember.Activity.verify(message.activity, _depth + 1); if (error) return "activity." + error; } - if (message.casual_banned != null && message.hasOwnProperty("casual_banned")) + if (message.casual_banned != null && $Object.hasOwnProperty.call(message, "casual_banned")) if (typeof message.casual_banned !== "boolean") return "casual_banned: boolean expected"; - if (message.ranked_banned != null && message.hasOwnProperty("ranked_banned")) + if (message.ranked_banned != null && $Object.hasOwnProperty.call(message, "ranked_banned")) if (typeof message.ranked_banned !== "boolean") return "ranked_banned: boolean expected"; - if (message.casual_low_priority != null && message.hasOwnProperty("casual_low_priority")) + if (message.casual_low_priority != null && $Object.hasOwnProperty.call(message, "casual_low_priority")) if (typeof message.casual_low_priority !== "boolean") return "casual_low_priority: boolean expected"; - if (message.ranked_low_priority != null && message.hasOwnProperty("ranked_low_priority")) + if (message.ranked_low_priority != null && $Object.hasOwnProperty.call(message, "ranked_low_priority")) if (typeof message.ranked_low_priority !== "boolean") return "ranked_low_priority: boolean expected"; - if (message.lobby_standby != null && message.hasOwnProperty("lobby_standby")) + if (message.lobby_standby != null && $Object.hasOwnProperty.call(message, "lobby_standby")) if (typeof message.lobby_standby !== "boolean") return "lobby_standby: boolean expected"; return null; @@ -14210,40 +18663,46 @@ * @param {Object.} object Plain object * @returns {CSOTFPartyMember} CSOTFPartyMember */ - CSOTFPartyMember.fromObject = function fromObject(object) { + CSOTFPartyMember.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFPartyMember) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFPartyMember: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFPartyMember(); if (object.owns_ticket != null) - message.owns_ticket = Boolean(object.owns_ticket); + message.owns_ticket = $Boolean(object.owns_ticket); if (object.completed_missions != null) message.completed_missions = object.completed_missions >>> 0; if (object.badge_level != null) message.badge_level = object.badge_level >>> 0; if (object.competitive_access != null) - message.competitive_access = Boolean(object.competitive_access); + message.competitive_access = $Boolean(object.competitive_access); if (object.experience != null) message.experience = object.experience >>> 0; if (object.player_criteria != null) { - if (typeof object.player_criteria !== "object") - throw TypeError(".CSOTFPartyMember.player_criteria: object expected"); - message.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.fromObject(object.player_criteria); + if (!$util.isObject(object.player_criteria)) + throw $TypeError(".CSOTFPartyMember.player_criteria: object expected"); + message.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.fromObject(object.player_criteria, _depth + 1); } if (object.activity != null) { - if (typeof object.activity !== "object") - throw TypeError(".CSOTFPartyMember.activity: object expected"); - message.activity = $root.CSOTFPartyMember.Activity.fromObject(object.activity); + if (!$util.isObject(object.activity)) + throw $TypeError(".CSOTFPartyMember.activity: object expected"); + message.activity = $root.CSOTFPartyMember.Activity.fromObject(object.activity, _depth + 1); } if (object.casual_banned != null) - message.casual_banned = Boolean(object.casual_banned); + message.casual_banned = $Boolean(object.casual_banned); if (object.ranked_banned != null) - message.ranked_banned = Boolean(object.ranked_banned); + message.ranked_banned = $Boolean(object.ranked_banned); if (object.casual_low_priority != null) - message.casual_low_priority = Boolean(object.casual_low_priority); + message.casual_low_priority = $Boolean(object.casual_low_priority); if (object.ranked_low_priority != null) - message.ranked_low_priority = Boolean(object.ranked_low_priority); + message.ranked_low_priority = $Boolean(object.ranked_low_priority); if (object.lobby_standby != null) - message.lobby_standby = Boolean(object.lobby_standby); + message.lobby_standby = $Boolean(object.lobby_standby); return message; }; @@ -14256,9 +18715,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOTFPartyMember.toObject = function toObject(message, options) { + CSOTFPartyMember.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.owns_ticket = false; @@ -14274,29 +18737,29 @@ object.ranked_low_priority = false; object.lobby_standby = false; } - if (message.owns_ticket != null && message.hasOwnProperty("owns_ticket")) + if (message.owns_ticket != null && $Object.hasOwnProperty.call(message, "owns_ticket")) object.owns_ticket = message.owns_ticket; - if (message.completed_missions != null && message.hasOwnProperty("completed_missions")) + if (message.completed_missions != null && $Object.hasOwnProperty.call(message, "completed_missions")) object.completed_missions = message.completed_missions; - if (message.badge_level != null && message.hasOwnProperty("badge_level")) + if (message.badge_level != null && $Object.hasOwnProperty.call(message, "badge_level")) object.badge_level = message.badge_level; - if (message.competitive_access != null && message.hasOwnProperty("competitive_access")) + if (message.competitive_access != null && $Object.hasOwnProperty.call(message, "competitive_access")) object.competitive_access = message.competitive_access; - if (message.experience != null && message.hasOwnProperty("experience")) + if (message.experience != null && $Object.hasOwnProperty.call(message, "experience")) object.experience = message.experience; - if (message.player_criteria != null && message.hasOwnProperty("player_criteria")) - object.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.toObject(message.player_criteria, options); - if (message.activity != null && message.hasOwnProperty("activity")) - object.activity = $root.CSOTFPartyMember.Activity.toObject(message.activity, options); - if (message.casual_banned != null && message.hasOwnProperty("casual_banned")) + if (message.player_criteria != null && $Object.hasOwnProperty.call(message, "player_criteria")) + object.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.toObject(message.player_criteria, options, _depth + 1); + if (message.activity != null && $Object.hasOwnProperty.call(message, "activity")) + object.activity = $root.CSOTFPartyMember.Activity.toObject(message.activity, options, _depth + 1); + if (message.casual_banned != null && $Object.hasOwnProperty.call(message, "casual_banned")) object.casual_banned = message.casual_banned; - if (message.ranked_banned != null && message.hasOwnProperty("ranked_banned")) + if (message.ranked_banned != null && $Object.hasOwnProperty.call(message, "ranked_banned")) object.ranked_banned = message.ranked_banned; - if (message.casual_low_priority != null && message.hasOwnProperty("casual_low_priority")) + if (message.casual_low_priority != null && $Object.hasOwnProperty.call(message, "casual_low_priority")) object.casual_low_priority = message.casual_low_priority; - if (message.ranked_low_priority != null && message.hasOwnProperty("ranked_low_priority")) + if (message.ranked_low_priority != null && $Object.hasOwnProperty.call(message, "ranked_low_priority")) object.ranked_low_priority = message.ranked_low_priority; - if (message.lobby_standby != null && message.hasOwnProperty("lobby_standby")) + if (message.lobby_standby != null && $Object.hasOwnProperty.call(message, "lobby_standby")) object.lobby_standby = message.lobby_standby; return object; }; @@ -14308,37 +18771,64 @@ * @instance * @returns {Object.} JSON object */ - CSOTFPartyMember.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOTFPartyMember.prototype.toJSON = function() { + return CSOTFPartyMember.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOTFPartyMember + * @function getTypeUrl + * @memberof CSOTFPartyMember + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOTFPartyMember.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFPartyMember"; }; CSOTFPartyMember.Activity = (function() { /** * Properties of an Activity. - * @memberof CSOTFPartyMember - * @interface IActivity + * @typedef {Object} CSOTFPartyMember.Activity.$Properties * @property {number|Long|null} [lobby_id] Activity lobby_id * @property {ETFMatchGroup|null} [lobby_match_group] Activity lobby_match_group * @property {boolean|null} [multiqueue_blocked] Activity multiqueue_blocked * @property {boolean|null} [online] Activity online * @property {number|null} [client_version] Activity client_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Activity. + * @memberof CSOTFPartyMember + * @interface IActivity + * @augments CSOTFPartyMember.Activity.$Properties + * @deprecated Use CSOTFPartyMember.Activity.$Properties instead. + */ + + /** + * Shape of an Activity. + * @typedef {CSOTFPartyMember.Activity.$Properties} CSOTFPartyMember.Activity.$Shape */ /** * Constructs a new Activity. * @memberof CSOTFPartyMember * @classdesc Represents an Activity. - * @implements IActivity * @constructor - * @param {CSOTFPartyMember.IActivity=} [properties] Properties to set + * @param {CSOTFPartyMember.Activity.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Activity(properties) { + var Activity = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Activity lobby_id. @@ -14346,7 +18836,7 @@ * @memberof CSOTFPartyMember.Activity * @instance */ - Activity.prototype.lobby_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Activity.prototype.lobby_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Activity lobby_match_group. @@ -14385,10 +18875,14 @@ * @function create * @memberof CSOTFPartyMember.Activity * @static - * @param {CSOTFPartyMember.IActivity=} [properties] Properties to set + * @param {CSOTFPartyMember.Activity.$Properties=} [properties] Properties to set * @returns {CSOTFPartyMember.Activity} Activity instance + * @type {{ + * (properties: CSOTFPartyMember.Activity.$Shape): CSOTFPartyMember.Activity & CSOTFPartyMember.Activity.$Shape; + * (properties?: CSOTFPartyMember.Activity.$Properties): CSOTFPartyMember.Activity; + * }} */ - Activity.create = function create(properties) { + Activity.create = function(properties) { return new Activity(properties); }; @@ -14397,23 +18891,30 @@ * @function encode * @memberof CSOTFPartyMember.Activity * @static - * @param {CSOTFPartyMember.IActivity} message Activity message or plain object to encode + * @param {CSOTFPartyMember.Activity.$Properties} message Activity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Activity.encode = function encode(message, writer) { + Activity.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.lobby_id); - if (message.lobby_match_group != null && Object.hasOwnProperty.call(message, "lobby_match_group")) + if (message.lobby_match_group != null && $Object.hasOwnProperty.call(message, "lobby_match_group")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.lobby_match_group); - if (message.multiqueue_blocked != null && Object.hasOwnProperty.call(message, "multiqueue_blocked")) + if (message.multiqueue_blocked != null && $Object.hasOwnProperty.call(message, "multiqueue_blocked")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.multiqueue_blocked); - if (message.online != null && Object.hasOwnProperty.call(message, "online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.online); - if (message.client_version != null && Object.hasOwnProperty.call(message, "client_version")) + if (message.client_version != null && $Object.hasOwnProperty.call(message, "client_version")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.client_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14422,12 +18923,12 @@ * @function encodeDelimited * @memberof CSOTFPartyMember.Activity * @static - * @param {CSOTFPartyMember.IActivity} message Activity message or plain object to encode + * @param {CSOTFPartyMember.Activity.$Properties} message Activity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Activity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Activity.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14437,37 +18938,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFPartyMember.Activity} Activity + * @returns {CSOTFPartyMember.Activity & CSOTFPartyMember.Activity.$Shape} Activity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Activity.decode = function decode(reader, length) { + Activity.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFPartyMember.Activity(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFPartyMember.Activity(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lobby_id = reader.fixed64(); - break; - case 2: - message.lobby_match_group = reader.int32(); - break; - case 3: - message.multiqueue_blocked = reader.bool(); - break; - case 4: - message.online = reader.bool(); - break; - case 5: - message.client_version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.lobby_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFMatchGroup[value] !== $undefined) + message.lobby_match_group = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 0) + break; + message.multiqueue_blocked = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.online = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.client_version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14477,11 +19013,11 @@ * @memberof CSOTFPartyMember.Activity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFPartyMember.Activity} Activity + * @returns {CSOTFPartyMember.Activity & CSOTFPartyMember.Activity.$Shape} Activity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Activity.decodeDelimited = function decodeDelimited(reader) { + Activity.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14495,13 +19031,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Activity.verify = function verify(message) { + Activity.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; - if (message.lobby_match_group != null && message.hasOwnProperty("lobby_match_group")) + if (message.lobby_match_group != null && $Object.hasOwnProperty.call(message, "lobby_match_group")) switch (message.lobby_match_group) { default: return "lobby_match_group: enum value expected"; @@ -14530,13 +19070,13 @@ case 8: break; } - if (message.multiqueue_blocked != null && message.hasOwnProperty("multiqueue_blocked")) + if (message.multiqueue_blocked != null && $Object.hasOwnProperty.call(message, "multiqueue_blocked")) if (typeof message.multiqueue_blocked !== "boolean") return "multiqueue_blocked: boolean expected"; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) if (typeof message.online !== "boolean") return "online: boolean expected"; - if (message.client_version != null && message.hasOwnProperty("client_version")) + if (message.client_version != null && $Object.hasOwnProperty.call(message, "client_version")) if (!$util.isInteger(message.client_version)) return "client_version: integer expected"; return null; @@ -14550,19 +19090,25 @@ * @param {Object.} object Plain object * @returns {CSOTFPartyMember.Activity} Activity */ - Activity.fromObject = function fromObject(object) { + Activity.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFPartyMember.Activity) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFPartyMember.Activity: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFPartyMember.Activity(); if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = false; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") - message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(); + message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(true); switch (object.lobby_match_group) { case "k_eTFMatchGroup_Invalid": case -1: @@ -14656,11 +19202,12 @@ case 8: message.lobby_match_group = 8; break; + default: } if (object.multiqueue_blocked != null) - message.multiqueue_blocked = Boolean(object.multiqueue_blocked); + message.multiqueue_blocked = $Boolean(object.multiqueue_blocked); if (object.online != null) - message.online = Boolean(object.online); + message.online = $Boolean(object.online); if (object.client_version != null) message.client_version = object.client_version >>> 0; return message; @@ -14675,33 +19222,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Activity.toObject = function toObject(message, options) { + Activity.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; - object.lobby_match_group = options.enums === String ? "k_eTFMatchGroup_Invalid" : -1; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.lobby_match_group = options.enums === $String ? "k_eTFMatchGroup_Invalid" : -1; object.multiqueue_blocked = false; object.online = false; object.client_version = 0; } - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber() : message.lobby_id; - if (message.lobby_match_group != null && message.hasOwnProperty("lobby_match_group")) - object.lobby_match_group = options.enums === String ? $root.ETFMatchGroup[message.lobby_match_group] : message.lobby_match_group; - if (message.multiqueue_blocked != null && message.hasOwnProperty("multiqueue_blocked")) + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; + if (message.lobby_match_group != null && $Object.hasOwnProperty.call(message, "lobby_match_group")) + object.lobby_match_group = options.enums === $String ? $root.ETFMatchGroup[message.lobby_match_group] === $undefined ? message.lobby_match_group : $root.ETFMatchGroup[message.lobby_match_group] : message.lobby_match_group; + if (message.multiqueue_blocked != null && $Object.hasOwnProperty.call(message, "multiqueue_blocked")) object.multiqueue_blocked = message.multiqueue_blocked; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) object.online = message.online; - if (message.client_version != null && message.hasOwnProperty("client_version")) + if (message.client_version != null && $Object.hasOwnProperty.call(message, "client_version")) object.client_version = message.client_version; return object; }; @@ -14713,8 +19266,22 @@ * @instance * @returns {Object.} JSON object */ - Activity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Activity.prototype.toJSON = function() { + return Activity.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Activity + * @function getTypeUrl + * @memberof CSOTFPartyMember.Activity + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Activity.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFPartyMember.Activity"; }; return Activity; @@ -14727,27 +19294,40 @@ /** * Properties of a TFPendingPartyMember. - * @exports ITFPendingPartyMember - * @interface ITFPendingPartyMember + * @typedef {Object} TFPendingPartyMember.$Properties * @property {number|Long|null} [steamid] TFPendingPartyMember steamid * @property {TFPendingPartyMember.EType|null} [type] TFPendingPartyMember type * @property {number|Long|null} [inviter] TFPendingPartyMember inviter + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a TFPendingPartyMember. + * @exports ITFPendingPartyMember + * @interface ITFPendingPartyMember + * @augments TFPendingPartyMember.$Properties + * @deprecated Use TFPendingPartyMember.$Properties instead. + */ + + /** + * Shape of a TFPendingPartyMember. + * @typedef {TFPendingPartyMember.$Properties} TFPendingPartyMember.$Shape */ /** * Constructs a new TFPendingPartyMember. * @exports TFPendingPartyMember * @classdesc Represents a TFPendingPartyMember. - * @implements ITFPendingPartyMember * @constructor - * @param {ITFPendingPartyMember=} [properties] Properties to set + * @param {TFPendingPartyMember.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function TFPendingPartyMember(properties) { + var TFPendingPartyMember = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * TFPendingPartyMember steamid. @@ -14755,7 +19335,7 @@ * @memberof TFPendingPartyMember * @instance */ - TFPendingPartyMember.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TFPendingPartyMember.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * TFPendingPartyMember type. @@ -14771,17 +19351,21 @@ * @memberof TFPendingPartyMember * @instance */ - TFPendingPartyMember.prototype.inviter = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TFPendingPartyMember.prototype.inviter = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new TFPendingPartyMember instance using the specified properties. * @function create * @memberof TFPendingPartyMember * @static - * @param {ITFPendingPartyMember=} [properties] Properties to set + * @param {TFPendingPartyMember.$Properties=} [properties] Properties to set * @returns {TFPendingPartyMember} TFPendingPartyMember instance + * @type {{ + * (properties: TFPendingPartyMember.$Shape): TFPendingPartyMember & TFPendingPartyMember.$Shape; + * (properties?: TFPendingPartyMember.$Properties): TFPendingPartyMember; + * }} */ - TFPendingPartyMember.create = function create(properties) { + TFPendingPartyMember.create = function(properties) { return new TFPendingPartyMember(properties); }; @@ -14790,19 +19374,26 @@ * @function encode * @memberof TFPendingPartyMember * @static - * @param {ITFPendingPartyMember} message TFPendingPartyMember message or plain object to encode + * @param {TFPendingPartyMember.$Properties} message TFPendingPartyMember message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TFPendingPartyMember.encode = function encode(message, writer) { + TFPendingPartyMember.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.inviter != null && Object.hasOwnProperty.call(message, "inviter")) + if (message.inviter != null && $Object.hasOwnProperty.call(message, "inviter")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.inviter); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14811,12 +19402,12 @@ * @function encodeDelimited * @memberof TFPendingPartyMember * @static - * @param {ITFPendingPartyMember} message TFPendingPartyMember message or plain object to encode + * @param {TFPendingPartyMember.$Properties} message TFPendingPartyMember message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TFPendingPartyMember.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + TFPendingPartyMember.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14826,31 +19417,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {TFPendingPartyMember} TFPendingPartyMember + * @returns {TFPendingPartyMember & TFPendingPartyMember.$Shape} TFPendingPartyMember * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TFPendingPartyMember.decode = function decode(reader, length) { + TFPendingPartyMember.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TFPendingPartyMember(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.TFPendingPartyMember(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - message.inviter = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.TFPendingPartyMember.EType[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 1) + break; + message.inviter = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14860,11 +19480,11 @@ * @memberof TFPendingPartyMember * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {TFPendingPartyMember} TFPendingPartyMember + * @returns {TFPendingPartyMember & TFPendingPartyMember.$Shape} TFPendingPartyMember * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TFPendingPartyMember.decodeDelimited = function decodeDelimited(reader) { + TFPendingPartyMember.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14878,13 +19498,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TFPendingPartyMember.verify = function verify(message) { + TFPendingPartyMember.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -14892,7 +19516,7 @@ case 1: break; } - if (message.inviter != null && message.hasOwnProperty("inviter")) + if (message.inviter != null && $Object.hasOwnProperty.call(message, "inviter")) if (!$util.isInteger(message.inviter) && !(message.inviter && $util.isInteger(message.inviter.low) && $util.isInteger(message.inviter.high))) return "inviter: integer|Long expected"; return null; @@ -14906,19 +19530,25 @@ * @param {Object.} object Plain object * @returns {TFPendingPartyMember} TFPendingPartyMember */ - TFPendingPartyMember.fromObject = function fromObject(object) { + TFPendingPartyMember.fromObject = function (object, _depth) { if (object instanceof $root.TFPendingPartyMember) return object; + if (!$util.isObject(object)) + throw $TypeError(".TFPendingPartyMember: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.TFPendingPartyMember(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); switch (object.type) { case "Invited": case 0: @@ -14928,16 +19558,17 @@ case 1: message.type = 1; break; + default: } if (object.inviter != null) if ($util.Long) - (message.inviter = $util.Long.fromValue(object.inviter)).unsigned = false; + message.inviter = $util.Long.fromValue(object.inviter, true); else if (typeof object.inviter === "string") - message.inviter = parseInt(object.inviter, 10); + message.inviter = $parseInt(object.inviter, 10); else if (typeof object.inviter === "number") message.inviter = object.inviter; else if (typeof object.inviter === "object") - message.inviter = new $util.LongBits(object.inviter.low >>> 0, object.inviter.high >>> 0).toNumber(); + message.inviter = new $util.LongBits(object.inviter.low >>> 0, object.inviter.high >>> 0).toNumber(true); return message; }; @@ -14950,35 +19581,43 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TFPendingPartyMember.toObject = function toObject(message, options) { + TFPendingPartyMember.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - object.type = options.enums === String ? "Invited" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.type = options.enums === $String ? "Invited" : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.inviter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.inviter = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.inviter = options.longs === String ? "0" : 0; + object.inviter = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.TFPendingPartyMember.EType[message.type] : message.type; - if (message.inviter != null && message.hasOwnProperty("inviter")) - if (typeof message.inviter === "number") - object.inviter = options.longs === String ? String(message.inviter) : message.inviter; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.TFPendingPartyMember.EType[message.type] === $undefined ? message.type : $root.TFPendingPartyMember.EType[message.type] : message.type; + if (message.inviter != null && $Object.hasOwnProperty.call(message, "inviter")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.inviter = typeof message.inviter === "number" ? $BigInt(message.inviter) : $util.Long.fromBits(message.inviter.low >>> 0, message.inviter.high >>> 0, true).toBigInt(); + else if (typeof message.inviter === "number") + object.inviter = options.longs === $String ? $String(message.inviter) : message.inviter; else - object.inviter = options.longs === String ? $util.Long.prototype.toString.call(message.inviter) : options.longs === Number ? new $util.LongBits(message.inviter.low >>> 0, message.inviter.high >>> 0).toNumber() : message.inviter; + object.inviter = options.longs === $String ? $util.Long.prototype.toString.call(message.inviter) : options.longs === $Number ? new $util.LongBits(message.inviter.low >>> 0, message.inviter.high >>> 0).toNumber(true) : message.inviter; return object; }; @@ -14989,8 +19628,22 @@ * @instance * @returns {Object.} JSON object */ - TFPendingPartyMember.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + TFPendingPartyMember.prototype.toJSON = function() { + return TFPendingPartyMember.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for TFPendingPartyMember + * @function getTypeUrl + * @memberof TFPendingPartyMember + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + TFPendingPartyMember.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/TFPendingPartyMember"; }; /** @@ -15001,7 +19654,7 @@ * @property {number} RequestedToJoin=1 RequestedToJoin value */ TFPendingPartyMember.EType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "Invited"] = 0; values[valuesById[1] = "RequestedToJoin"] = 1; return values; @@ -15014,26 +19667,39 @@ /** * Properties of a TFSyncedMMUIState. - * @exports ITFSyncedMMUIState - * @interface ITFSyncedMMUIState + * @typedef {Object} TFSyncedMMUIState.$Properties * @property {ETFSyncedMMMenuStep|null} [menu_step] TFSyncedMMUIState menu_step * @property {ETFMatchGroup|null} [match_group] TFSyncedMMUIState match_group + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a TFSyncedMMUIState. + * @exports ITFSyncedMMUIState + * @interface ITFSyncedMMUIState + * @augments TFSyncedMMUIState.$Properties + * @deprecated Use TFSyncedMMUIState.$Properties instead. + */ + + /** + * Shape of a TFSyncedMMUIState. + * @typedef {TFSyncedMMUIState.$Properties} TFSyncedMMUIState.$Shape */ /** * Constructs a new TFSyncedMMUIState. * @exports TFSyncedMMUIState * @classdesc Represents a TFSyncedMMUIState. - * @implements ITFSyncedMMUIState * @constructor - * @param {ITFSyncedMMUIState=} [properties] Properties to set + * @param {TFSyncedMMUIState.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function TFSyncedMMUIState(properties) { + var TFSyncedMMUIState = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * TFSyncedMMUIState menu_step. @@ -15056,10 +19722,14 @@ * @function create * @memberof TFSyncedMMUIState * @static - * @param {ITFSyncedMMUIState=} [properties] Properties to set + * @param {TFSyncedMMUIState.$Properties=} [properties] Properties to set * @returns {TFSyncedMMUIState} TFSyncedMMUIState instance + * @type {{ + * (properties: TFSyncedMMUIState.$Shape): TFSyncedMMUIState & TFSyncedMMUIState.$Shape; + * (properties?: TFSyncedMMUIState.$Properties): TFSyncedMMUIState; + * }} */ - TFSyncedMMUIState.create = function create(properties) { + TFSyncedMMUIState.create = function(properties) { return new TFSyncedMMUIState(properties); }; @@ -15068,17 +19738,24 @@ * @function encode * @memberof TFSyncedMMUIState * @static - * @param {ITFSyncedMMUIState} message TFSyncedMMUIState message or plain object to encode + * @param {TFSyncedMMUIState.$Properties} message TFSyncedMMUIState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TFSyncedMMUIState.encode = function encode(message, writer) { + TFSyncedMMUIState.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.menu_step != null && Object.hasOwnProperty.call(message, "menu_step")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.menu_step != null && $Object.hasOwnProperty.call(message, "menu_step")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.menu_step); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.match_group); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15087,12 +19764,12 @@ * @function encodeDelimited * @memberof TFSyncedMMUIState * @static - * @param {ITFSyncedMMUIState} message TFSyncedMMUIState message or plain object to encode + * @param {TFSyncedMMUIState.$Properties} message TFSyncedMMUIState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TFSyncedMMUIState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + TFSyncedMMUIState.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15102,28 +19779,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {TFSyncedMMUIState} TFSyncedMMUIState + * @returns {TFSyncedMMUIState & TFSyncedMMUIState.$Shape} TFSyncedMMUIState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TFSyncedMMUIState.decode = function decode(reader, length) { + TFSyncedMMUIState.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TFSyncedMMUIState(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.TFSyncedMMUIState(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.menu_step = reader.int32(); - break; - case 2: - message.match_group = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFSyncedMMMenuStep[value] !== $undefined) + message.menu_step = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFMatchGroup[value] !== $undefined) + message.match_group = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15133,11 +19842,11 @@ * @memberof TFSyncedMMUIState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {TFSyncedMMUIState} TFSyncedMMUIState + * @returns {TFSyncedMMUIState & TFSyncedMMUIState.$Shape} TFSyncedMMUIState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TFSyncedMMUIState.decodeDelimited = function decodeDelimited(reader) { + TFSyncedMMUIState.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15151,10 +19860,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TFSyncedMMUIState.verify = function verify(message) { + TFSyncedMMUIState.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.menu_step != null && message.hasOwnProperty("menu_step")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.menu_step != null && $Object.hasOwnProperty.call(message, "menu_step")) switch (message.menu_step) { default: return "menu_step: enum value expected"; @@ -15166,7 +19879,7 @@ case 4: break; } - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) switch (message.match_group) { default: return "match_group: enum value expected"; @@ -15206,9 +19919,15 @@ * @param {Object.} object Plain object * @returns {TFSyncedMMUIState} TFSyncedMMUIState */ - TFSyncedMMUIState.fromObject = function fromObject(object) { + TFSyncedMMUIState.fromObject = function (object, _depth) { if (object instanceof $root.TFSyncedMMUIState) return object; + if (!$util.isObject(object)) + throw $TypeError(".TFSyncedMMUIState: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.TFSyncedMMUIState(); switch (object.menu_step) { case "k_eTFSyncedMMMenuStep_Invalid": @@ -15235,6 +19954,7 @@ case 4: message.menu_step = 4; break; + default: } switch (object.match_group) { case "k_eTFMatchGroup_Invalid": @@ -15329,6 +20049,7 @@ case 8: message.match_group = 8; break; + default: } return message; }; @@ -15342,18 +20063,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TFSyncedMMUIState.toObject = function toObject(message, options) { + TFSyncedMMUIState.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.menu_step = options.enums === String ? "k_eTFSyncedMMMenuStep_None" : 0; - object.match_group = options.enums === String ? "k_eTFMatchGroup_Invalid" : -1; + object.menu_step = options.enums === $String ? "k_eTFSyncedMMMenuStep_None" : 0; + object.match_group = options.enums === $String ? "k_eTFMatchGroup_Invalid" : -1; } - if (message.menu_step != null && message.hasOwnProperty("menu_step")) - object.menu_step = options.enums === String ? $root.ETFSyncedMMMenuStep[message.menu_step] : message.menu_step; - if (message.match_group != null && message.hasOwnProperty("match_group")) - object.match_group = options.enums === String ? $root.ETFMatchGroup[message.match_group] : message.match_group; + if (message.menu_step != null && $Object.hasOwnProperty.call(message, "menu_step")) + object.menu_step = options.enums === $String ? $root.ETFSyncedMMMenuStep[message.menu_step] === $undefined ? message.menu_step : $root.ETFSyncedMMMenuStep[message.menu_step] : message.menu_step; + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) + object.match_group = options.enums === $String ? $root.ETFMatchGroup[message.match_group] === $undefined ? message.match_group : $root.ETFMatchGroup[message.match_group] : message.match_group; return object; }; @@ -15364,8 +20089,22 @@ * @instance * @returns {Object.} JSON object */ - TFSyncedMMUIState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + TFSyncedMMUIState.prototype.toJSON = function() { + return TFSyncedMMUIState.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for TFSyncedMMUIState + * @function getTypeUrl + * @memberof TFSyncedMMUIState + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + TFSyncedMMUIState.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/TFSyncedMMUIState"; }; return TFSyncedMMUIState; @@ -15375,32 +20114,45 @@ /** * Properties of a CTFGroupMatchCriteriaProto. - * @exports ICTFGroupMatchCriteriaProto - * @interface ICTFGroupMatchCriteriaProto + * @typedef {Object} CTFGroupMatchCriteriaProto.$Properties * @property {boolean|null} [late_join_ok] CTFGroupMatchCriteriaProto late_join_ok * @property {number|null} [custom_ping_tolerance] CTFGroupMatchCriteriaProto custom_ping_tolerance * @property {string|null} [mvm_mannup_tour] CTFGroupMatchCriteriaProto mvm_mannup_tour * @property {Array.|null} [mvm_mannup_missions] CTFGroupMatchCriteriaProto mvm_mannup_missions * @property {Array.|null} [mvm_bootcamp_missions] CTFGroupMatchCriteriaProto mvm_bootcamp_missions - * @property {ICTFCasualMatchCriteria|null} [casual_criteria] CTFGroupMatchCriteriaProto casual_criteria + * @property {CTFCasualMatchCriteria.$Properties|null} [casual_criteria] CTFGroupMatchCriteriaProto casual_criteria + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CTFGroupMatchCriteriaProto. + * @exports ICTFGroupMatchCriteriaProto + * @interface ICTFGroupMatchCriteriaProto + * @augments CTFGroupMatchCriteriaProto.$Properties + * @deprecated Use CTFGroupMatchCriteriaProto.$Properties instead. + */ + + /** + * Shape of a CTFGroupMatchCriteriaProto. + * @typedef {CTFGroupMatchCriteriaProto.$Properties} CTFGroupMatchCriteriaProto.$Shape */ /** * Constructs a new CTFGroupMatchCriteriaProto. * @exports CTFGroupMatchCriteriaProto * @classdesc Represents a CTFGroupMatchCriteriaProto. - * @implements ICTFGroupMatchCriteriaProto * @constructor - * @param {ICTFGroupMatchCriteriaProto=} [properties] Properties to set + * @param {CTFGroupMatchCriteriaProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CTFGroupMatchCriteriaProto(properties) { + var CTFGroupMatchCriteriaProto = function (properties) { this.mvm_mannup_missions = []; this.mvm_bootcamp_missions = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CTFGroupMatchCriteriaProto late_join_ok. @@ -15444,7 +20196,7 @@ /** * CTFGroupMatchCriteriaProto casual_criteria. - * @member {ICTFCasualMatchCriteria|null|undefined} casual_criteria + * @member {CTFCasualMatchCriteria.$Properties|null|undefined} casual_criteria * @memberof CTFGroupMatchCriteriaProto * @instance */ @@ -15455,10 +20207,14 @@ * @function create * @memberof CTFGroupMatchCriteriaProto * @static - * @param {ICTFGroupMatchCriteriaProto=} [properties] Properties to set + * @param {CTFGroupMatchCriteriaProto.$Properties=} [properties] Properties to set * @returns {CTFGroupMatchCriteriaProto} CTFGroupMatchCriteriaProto instance + * @type {{ + * (properties: CTFGroupMatchCriteriaProto.$Shape): CTFGroupMatchCriteriaProto & CTFGroupMatchCriteriaProto.$Shape; + * (properties?: CTFGroupMatchCriteriaProto.$Properties): CTFGroupMatchCriteriaProto; + * }} */ - CTFGroupMatchCriteriaProto.create = function create(properties) { + CTFGroupMatchCriteriaProto.create = function(properties) { return new CTFGroupMatchCriteriaProto(properties); }; @@ -15467,20 +20223,24 @@ * @function encode * @memberof CTFGroupMatchCriteriaProto * @static - * @param {ICTFGroupMatchCriteriaProto} message CTFGroupMatchCriteriaProto message or plain object to encode + * @param {CTFGroupMatchCriteriaProto.$Properties} message CTFGroupMatchCriteriaProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFGroupMatchCriteriaProto.encode = function encode(message, writer) { + CTFGroupMatchCriteriaProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.late_join_ok != null && Object.hasOwnProperty.call(message, "late_join_ok")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.late_join_ok != null && $Object.hasOwnProperty.call(message, "late_join_ok")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.late_join_ok); - if (message.mvm_mannup_tour != null && Object.hasOwnProperty.call(message, "mvm_mannup_tour")) + if (message.mvm_mannup_tour != null && $Object.hasOwnProperty.call(message, "mvm_mannup_tour")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.mvm_mannup_tour); - if (message.casual_criteria != null && Object.hasOwnProperty.call(message, "casual_criteria")) - $root.CTFCasualMatchCriteria.encode(message.casual_criteria, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.custom_ping_tolerance != null && Object.hasOwnProperty.call(message, "custom_ping_tolerance")) + if (message.casual_criteria != null && $Object.hasOwnProperty.call(message, "casual_criteria")) + $root.CTFCasualMatchCriteria.encode(message.casual_criteria, writer.uint32(/* id 12, wireType 2 =*/98).fork(), _depth + 1).ldelim(); + if (message.custom_ping_tolerance != null && $Object.hasOwnProperty.call(message, "custom_ping_tolerance")) writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.custom_ping_tolerance); if (message.mvm_mannup_missions != null && message.mvm_mannup_missions.length) for (var i = 0; i < message.mvm_mannup_missions.length; ++i) @@ -15488,6 +20248,9 @@ if (message.mvm_bootcamp_missions != null && message.mvm_bootcamp_missions.length) for (var i = 0; i < message.mvm_bootcamp_missions.length; ++i) writer.uint32(/* id 16, wireType 2 =*/130).string(message.mvm_bootcamp_missions[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15496,12 +20259,12 @@ * @function encodeDelimited * @memberof CTFGroupMatchCriteriaProto * @static - * @param {ICTFGroupMatchCriteriaProto} message CTFGroupMatchCriteriaProto message or plain object to encode + * @param {CTFGroupMatchCriteriaProto.$Properties} message CTFGroupMatchCriteriaProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFGroupMatchCriteriaProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CTFGroupMatchCriteriaProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15511,44 +20274,76 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CTFGroupMatchCriteriaProto} CTFGroupMatchCriteriaProto + * @returns {CTFGroupMatchCriteriaProto & CTFGroupMatchCriteriaProto.$Shape} CTFGroupMatchCriteriaProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFGroupMatchCriteriaProto.decode = function decode(reader, length) { + CTFGroupMatchCriteriaProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CTFGroupMatchCriteriaProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CTFGroupMatchCriteriaProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: - message.late_join_ok = reader.bool(); - break; - case 13: - message.custom_ping_tolerance = reader.uint32(); - break; - case 10: - message.mvm_mannup_tour = reader.string(); - break; - case 15: - if (!(message.mvm_mannup_missions && message.mvm_mannup_missions.length)) - message.mvm_mannup_missions = []; - message.mvm_mannup_missions.push(reader.string()); - break; - case 16: - if (!(message.mvm_bootcamp_missions && message.mvm_bootcamp_missions.length)) - message.mvm_bootcamp_missions = []; - message.mvm_bootcamp_missions.push(reader.string()); - break; - case 12: - message.casual_criteria = $root.CTFCasualMatchCriteria.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 5: { + if (wireType !== 0) + break; + message.late_join_ok = reader.bool(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.custom_ping_tolerance = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 2) + break; + message.mvm_mannup_tour = reader.string(); + continue; + } + case 15: { + if (wireType !== 2) + break; + if (!(message.mvm_mannup_missions && message.mvm_mannup_missions.length)) + message.mvm_mannup_missions = []; + message.mvm_mannup_missions.push(reader.string()); + continue; + } + case 16: { + if (wireType !== 2) + break; + if (!(message.mvm_bootcamp_missions && message.mvm_bootcamp_missions.length)) + message.mvm_bootcamp_missions = []; + message.mvm_bootcamp_missions.push(reader.string()); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.casual_criteria = $root.CTFCasualMatchCriteria.decode(reader, reader.uint32(), $undefined, _depth + 1, message.casual_criteria); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15558,11 +20353,11 @@ * @memberof CTFGroupMatchCriteriaProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CTFGroupMatchCriteriaProto} CTFGroupMatchCriteriaProto + * @returns {CTFGroupMatchCriteriaProto & CTFGroupMatchCriteriaProto.$Shape} CTFGroupMatchCriteriaProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFGroupMatchCriteriaProto.decodeDelimited = function decodeDelimited(reader) { + CTFGroupMatchCriteriaProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15576,34 +20371,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CTFGroupMatchCriteriaProto.verify = function verify(message) { + CTFGroupMatchCriteriaProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.late_join_ok != null && message.hasOwnProperty("late_join_ok")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.late_join_ok != null && $Object.hasOwnProperty.call(message, "late_join_ok")) if (typeof message.late_join_ok !== "boolean") return "late_join_ok: boolean expected"; - if (message.custom_ping_tolerance != null && message.hasOwnProperty("custom_ping_tolerance")) + if (message.custom_ping_tolerance != null && $Object.hasOwnProperty.call(message, "custom_ping_tolerance")) if (!$util.isInteger(message.custom_ping_tolerance)) return "custom_ping_tolerance: integer expected"; - if (message.mvm_mannup_tour != null && message.hasOwnProperty("mvm_mannup_tour")) + if (message.mvm_mannup_tour != null && $Object.hasOwnProperty.call(message, "mvm_mannup_tour")) if (!$util.isString(message.mvm_mannup_tour)) return "mvm_mannup_tour: string expected"; - if (message.mvm_mannup_missions != null && message.hasOwnProperty("mvm_mannup_missions")) { - if (!Array.isArray(message.mvm_mannup_missions)) + if (message.mvm_mannup_missions != null && $Object.hasOwnProperty.call(message, "mvm_mannup_missions")) { + if (!$Array.isArray(message.mvm_mannup_missions)) return "mvm_mannup_missions: array expected"; for (var i = 0; i < message.mvm_mannup_missions.length; ++i) if (!$util.isString(message.mvm_mannup_missions[i])) return "mvm_mannup_missions: string[] expected"; } - if (message.mvm_bootcamp_missions != null && message.hasOwnProperty("mvm_bootcamp_missions")) { - if (!Array.isArray(message.mvm_bootcamp_missions)) + if (message.mvm_bootcamp_missions != null && $Object.hasOwnProperty.call(message, "mvm_bootcamp_missions")) { + if (!$Array.isArray(message.mvm_bootcamp_missions)) return "mvm_bootcamp_missions: array expected"; for (var i = 0; i < message.mvm_bootcamp_missions.length; ++i) if (!$util.isString(message.mvm_bootcamp_missions[i])) return "mvm_bootcamp_missions: string[] expected"; } - if (message.casual_criteria != null && message.hasOwnProperty("casual_criteria")) { - var error = $root.CTFCasualMatchCriteria.verify(message.casual_criteria); + if (message.casual_criteria != null && $Object.hasOwnProperty.call(message, "casual_criteria")) { + var error = $root.CTFCasualMatchCriteria.verify(message.casual_criteria, _depth + 1); if (error) return "casual_criteria." + error; } @@ -15618,34 +20417,40 @@ * @param {Object.} object Plain object * @returns {CTFGroupMatchCriteriaProto} CTFGroupMatchCriteriaProto */ - CTFGroupMatchCriteriaProto.fromObject = function fromObject(object) { + CTFGroupMatchCriteriaProto.fromObject = function (object, _depth) { if (object instanceof $root.CTFGroupMatchCriteriaProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".CTFGroupMatchCriteriaProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CTFGroupMatchCriteriaProto(); if (object.late_join_ok != null) - message.late_join_ok = Boolean(object.late_join_ok); + message.late_join_ok = $Boolean(object.late_join_ok); if (object.custom_ping_tolerance != null) message.custom_ping_tolerance = object.custom_ping_tolerance >>> 0; if (object.mvm_mannup_tour != null) - message.mvm_mannup_tour = String(object.mvm_mannup_tour); + message.mvm_mannup_tour = $String(object.mvm_mannup_tour); if (object.mvm_mannup_missions) { - if (!Array.isArray(object.mvm_mannup_missions)) - throw TypeError(".CTFGroupMatchCriteriaProto.mvm_mannup_missions: array expected"); - message.mvm_mannup_missions = []; + if (!$Array.isArray(object.mvm_mannup_missions)) + throw $TypeError(".CTFGroupMatchCriteriaProto.mvm_mannup_missions: array expected"); + message.mvm_mannup_missions = $Array(object.mvm_mannup_missions.length); for (var i = 0; i < object.mvm_mannup_missions.length; ++i) - message.mvm_mannup_missions[i] = String(object.mvm_mannup_missions[i]); + message.mvm_mannup_missions[i] = $String(object.mvm_mannup_missions[i]); } if (object.mvm_bootcamp_missions) { - if (!Array.isArray(object.mvm_bootcamp_missions)) - throw TypeError(".CTFGroupMatchCriteriaProto.mvm_bootcamp_missions: array expected"); - message.mvm_bootcamp_missions = []; + if (!$Array.isArray(object.mvm_bootcamp_missions)) + throw $TypeError(".CTFGroupMatchCriteriaProto.mvm_bootcamp_missions: array expected"); + message.mvm_bootcamp_missions = $Array(object.mvm_bootcamp_missions.length); for (var i = 0; i < object.mvm_bootcamp_missions.length; ++i) - message.mvm_bootcamp_missions[i] = String(object.mvm_bootcamp_missions[i]); + message.mvm_bootcamp_missions[i] = $String(object.mvm_bootcamp_missions[i]); } if (object.casual_criteria != null) { - if (typeof object.casual_criteria !== "object") - throw TypeError(".CTFGroupMatchCriteriaProto.casual_criteria: object expected"); - message.casual_criteria = $root.CTFCasualMatchCriteria.fromObject(object.casual_criteria); + if (!$util.isObject(object.casual_criteria)) + throw $TypeError(".CTFGroupMatchCriteriaProto.casual_criteria: object expected"); + message.casual_criteria = $root.CTFCasualMatchCriteria.fromObject(object.casual_criteria, _depth + 1); } return message; }; @@ -15659,9 +20464,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CTFGroupMatchCriteriaProto.toObject = function toObject(message, options) { + CTFGroupMatchCriteriaProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.mvm_mannup_missions = []; @@ -15673,21 +20482,21 @@ object.casual_criteria = null; object.custom_ping_tolerance = 0; } - if (message.late_join_ok != null && message.hasOwnProperty("late_join_ok")) + if (message.late_join_ok != null && $Object.hasOwnProperty.call(message, "late_join_ok")) object.late_join_ok = message.late_join_ok; - if (message.mvm_mannup_tour != null && message.hasOwnProperty("mvm_mannup_tour")) + if (message.mvm_mannup_tour != null && $Object.hasOwnProperty.call(message, "mvm_mannup_tour")) object.mvm_mannup_tour = message.mvm_mannup_tour; - if (message.casual_criteria != null && message.hasOwnProperty("casual_criteria")) - object.casual_criteria = $root.CTFCasualMatchCriteria.toObject(message.casual_criteria, options); - if (message.custom_ping_tolerance != null && message.hasOwnProperty("custom_ping_tolerance")) + if (message.casual_criteria != null && $Object.hasOwnProperty.call(message, "casual_criteria")) + object.casual_criteria = $root.CTFCasualMatchCriteria.toObject(message.casual_criteria, options, _depth + 1); + if (message.custom_ping_tolerance != null && $Object.hasOwnProperty.call(message, "custom_ping_tolerance")) object.custom_ping_tolerance = message.custom_ping_tolerance; if (message.mvm_mannup_missions && message.mvm_mannup_missions.length) { - object.mvm_mannup_missions = []; + object.mvm_mannup_missions = $Array(message.mvm_mannup_missions.length); for (var j = 0; j < message.mvm_mannup_missions.length; ++j) object.mvm_mannup_missions[j] = message.mvm_mannup_missions[j]; } if (message.mvm_bootcamp_missions && message.mvm_bootcamp_missions.length) { - object.mvm_bootcamp_missions = []; + object.mvm_bootcamp_missions = $Array(message.mvm_bootcamp_missions.length); for (var j = 0; j < message.mvm_bootcamp_missions.length; ++j) object.mvm_bootcamp_missions[j] = message.mvm_bootcamp_missions[j]; } @@ -15701,8 +20510,22 @@ * @instance * @returns {Object.} JSON object */ - CTFGroupMatchCriteriaProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CTFGroupMatchCriteriaProto.prototype.toJSON = function() { + return CTFGroupMatchCriteriaProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CTFGroupMatchCriteriaProto + * @function getTypeUrl + * @memberof CTFGroupMatchCriteriaProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CTFGroupMatchCriteriaProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CTFGroupMatchCriteriaProto"; }; return CTFGroupMatchCriteriaProto; @@ -15710,28 +20533,41 @@ $root.CTFCasualMatchCriteria = (function() { + /** + * Properties of a CTFCasualMatchCriteria. + * @typedef {Object} CTFCasualMatchCriteria.$Properties + * @property {Array.|null} [selected_maps_bits] CTFCasualMatchCriteria selected_maps_bits + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CTFCasualMatchCriteria. * @exports ICTFCasualMatchCriteria * @interface ICTFCasualMatchCriteria - * @property {Array.|null} [selected_maps_bits] CTFCasualMatchCriteria selected_maps_bits + * @augments CTFCasualMatchCriteria.$Properties + * @deprecated Use CTFCasualMatchCriteria.$Properties instead. + */ + + /** + * Shape of a CTFCasualMatchCriteria. + * @typedef {CTFCasualMatchCriteria.$Properties} CTFCasualMatchCriteria.$Shape */ /** * Constructs a new CTFCasualMatchCriteria. * @exports CTFCasualMatchCriteria * @classdesc Represents a CTFCasualMatchCriteria. - * @implements ICTFCasualMatchCriteria * @constructor - * @param {ICTFCasualMatchCriteria=} [properties] Properties to set + * @param {CTFCasualMatchCriteria.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CTFCasualMatchCriteria(properties) { + var CTFCasualMatchCriteria = function (properties) { this.selected_maps_bits = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CTFCasualMatchCriteria selected_maps_bits. @@ -15746,10 +20582,14 @@ * @function create * @memberof CTFCasualMatchCriteria * @static - * @param {ICTFCasualMatchCriteria=} [properties] Properties to set + * @param {CTFCasualMatchCriteria.$Properties=} [properties] Properties to set * @returns {CTFCasualMatchCriteria} CTFCasualMatchCriteria instance + * @type {{ + * (properties: CTFCasualMatchCriteria.$Shape): CTFCasualMatchCriteria & CTFCasualMatchCriteria.$Shape; + * (properties?: CTFCasualMatchCriteria.$Properties): CTFCasualMatchCriteria; + * }} */ - CTFCasualMatchCriteria.create = function create(properties) { + CTFCasualMatchCriteria.create = function(properties) { return new CTFCasualMatchCriteria(properties); }; @@ -15758,16 +20598,23 @@ * @function encode * @memberof CTFCasualMatchCriteria * @static - * @param {ICTFCasualMatchCriteria} message CTFCasualMatchCriteria message or plain object to encode + * @param {CTFCasualMatchCriteria.$Properties} message CTFCasualMatchCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFCasualMatchCriteria.encode = function encode(message, writer) { + CTFCasualMatchCriteria.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.selected_maps_bits != null && message.selected_maps_bits.length) for (var i = 0; i < message.selected_maps_bits.length; ++i) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.selected_maps_bits[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15776,12 +20623,12 @@ * @function encodeDelimited * @memberof CTFCasualMatchCriteria * @static - * @param {ICTFCasualMatchCriteria} message CTFCasualMatchCriteria message or plain object to encode + * @param {CTFCasualMatchCriteria.$Properties} message CTFCasualMatchCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFCasualMatchCriteria.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CTFCasualMatchCriteria.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15791,32 +20638,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CTFCasualMatchCriteria} CTFCasualMatchCriteria + * @returns {CTFCasualMatchCriteria & CTFCasualMatchCriteria.$Shape} CTFCasualMatchCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFCasualMatchCriteria.decode = function decode(reader, length) { + CTFCasualMatchCriteria.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CTFCasualMatchCriteria(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CTFCasualMatchCriteria(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - if (!(message.selected_maps_bits && message.selected_maps_bits.length)) - message.selected_maps_bits = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.selected_maps_bits.push(reader.fixed32()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 3: { + if (wireType === 2) { + if (!(message.selected_maps_bits && message.selected_maps_bits.length)) + message.selected_maps_bits = []; + reader.fixed32s(message.selected_maps_bits); + continue; + } + if (wireType !== 5) + break; + if (!(message.selected_maps_bits && message.selected_maps_bits.length)) + message.selected_maps_bits = []; message.selected_maps_bits.push(reader.fixed32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15826,11 +20691,11 @@ * @memberof CTFCasualMatchCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CTFCasualMatchCriteria} CTFCasualMatchCriteria + * @returns {CTFCasualMatchCriteria & CTFCasualMatchCriteria.$Shape} CTFCasualMatchCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFCasualMatchCriteria.decodeDelimited = function decodeDelimited(reader) { + CTFCasualMatchCriteria.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15844,11 +20709,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CTFCasualMatchCriteria.verify = function verify(message) { + CTFCasualMatchCriteria.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.selected_maps_bits != null && message.hasOwnProperty("selected_maps_bits")) { - if (!Array.isArray(message.selected_maps_bits)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.selected_maps_bits != null && $Object.hasOwnProperty.call(message, "selected_maps_bits")) { + if (!$Array.isArray(message.selected_maps_bits)) return "selected_maps_bits: array expected"; for (var i = 0; i < message.selected_maps_bits.length; ++i) if (!$util.isInteger(message.selected_maps_bits[i])) @@ -15865,14 +20734,20 @@ * @param {Object.} object Plain object * @returns {CTFCasualMatchCriteria} CTFCasualMatchCriteria */ - CTFCasualMatchCriteria.fromObject = function fromObject(object) { + CTFCasualMatchCriteria.fromObject = function (object, _depth) { if (object instanceof $root.CTFCasualMatchCriteria) return object; + if (!$util.isObject(object)) + throw $TypeError(".CTFCasualMatchCriteria: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CTFCasualMatchCriteria(); if (object.selected_maps_bits) { - if (!Array.isArray(object.selected_maps_bits)) - throw TypeError(".CTFCasualMatchCriteria.selected_maps_bits: array expected"); - message.selected_maps_bits = []; + if (!$Array.isArray(object.selected_maps_bits)) + throw $TypeError(".CTFCasualMatchCriteria.selected_maps_bits: array expected"); + message.selected_maps_bits = $Array(object.selected_maps_bits.length); for (var i = 0; i < object.selected_maps_bits.length; ++i) message.selected_maps_bits[i] = object.selected_maps_bits[i] >>> 0; } @@ -15888,14 +20763,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CTFCasualMatchCriteria.toObject = function toObject(message, options) { + CTFCasualMatchCriteria.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.selected_maps_bits = []; if (message.selected_maps_bits && message.selected_maps_bits.length) { - object.selected_maps_bits = []; + object.selected_maps_bits = $Array(message.selected_maps_bits.length); for (var j = 0; j < message.selected_maps_bits.length; ++j) object.selected_maps_bits[j] = message.selected_maps_bits[j]; } @@ -15909,8 +20788,22 @@ * @instance * @returns {Object.} JSON object */ - CTFCasualMatchCriteria.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CTFCasualMatchCriteria.prototype.toJSON = function() { + return CTFCasualMatchCriteria.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CTFCasualMatchCriteria + * @function getTypeUrl + * @memberof CTFCasualMatchCriteria + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CTFCasualMatchCriteria.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CTFCasualMatchCriteria"; }; return CTFCasualMatchCriteria; @@ -15918,27 +20811,40 @@ $root.CTFPerPlayerMatchCriteriaProto = (function() { + /** + * Properties of a CTFPerPlayerMatchCriteriaProto. + * @typedef {Object} CTFPerPlayerMatchCriteriaProto.$Properties + * @property {boolean|null} [mvm_squad_surplus] CTFPerPlayerMatchCriteriaProto mvm_squad_surplus + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CTFPerPlayerMatchCriteriaProto. * @exports ICTFPerPlayerMatchCriteriaProto * @interface ICTFPerPlayerMatchCriteriaProto - * @property {boolean|null} [mvm_squad_surplus] CTFPerPlayerMatchCriteriaProto mvm_squad_surplus + * @augments CTFPerPlayerMatchCriteriaProto.$Properties + * @deprecated Use CTFPerPlayerMatchCriteriaProto.$Properties instead. + */ + + /** + * Shape of a CTFPerPlayerMatchCriteriaProto. + * @typedef {CTFPerPlayerMatchCriteriaProto.$Properties} CTFPerPlayerMatchCriteriaProto.$Shape */ /** * Constructs a new CTFPerPlayerMatchCriteriaProto. * @exports CTFPerPlayerMatchCriteriaProto * @classdesc Represents a CTFPerPlayerMatchCriteriaProto. - * @implements ICTFPerPlayerMatchCriteriaProto * @constructor - * @param {ICTFPerPlayerMatchCriteriaProto=} [properties] Properties to set + * @param {CTFPerPlayerMatchCriteriaProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CTFPerPlayerMatchCriteriaProto(properties) { + var CTFPerPlayerMatchCriteriaProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CTFPerPlayerMatchCriteriaProto mvm_squad_surplus. @@ -15953,10 +20859,14 @@ * @function create * @memberof CTFPerPlayerMatchCriteriaProto * @static - * @param {ICTFPerPlayerMatchCriteriaProto=} [properties] Properties to set + * @param {CTFPerPlayerMatchCriteriaProto.$Properties=} [properties] Properties to set * @returns {CTFPerPlayerMatchCriteriaProto} CTFPerPlayerMatchCriteriaProto instance + * @type {{ + * (properties: CTFPerPlayerMatchCriteriaProto.$Shape): CTFPerPlayerMatchCriteriaProto & CTFPerPlayerMatchCriteriaProto.$Shape; + * (properties?: CTFPerPlayerMatchCriteriaProto.$Properties): CTFPerPlayerMatchCriteriaProto; + * }} */ - CTFPerPlayerMatchCriteriaProto.create = function create(properties) { + CTFPerPlayerMatchCriteriaProto.create = function(properties) { return new CTFPerPlayerMatchCriteriaProto(properties); }; @@ -15965,15 +20875,22 @@ * @function encode * @memberof CTFPerPlayerMatchCriteriaProto * @static - * @param {ICTFPerPlayerMatchCriteriaProto} message CTFPerPlayerMatchCriteriaProto message or plain object to encode + * @param {CTFPerPlayerMatchCriteriaProto.$Properties} message CTFPerPlayerMatchCriteriaProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFPerPlayerMatchCriteriaProto.encode = function encode(message, writer) { + CTFPerPlayerMatchCriteriaProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.mvm_squad_surplus != null && Object.hasOwnProperty.call(message, "mvm_squad_surplus")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.mvm_squad_surplus != null && $Object.hasOwnProperty.call(message, "mvm_squad_surplus")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.mvm_squad_surplus); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15982,12 +20899,12 @@ * @function encodeDelimited * @memberof CTFPerPlayerMatchCriteriaProto * @static - * @param {ICTFPerPlayerMatchCriteriaProto} message CTFPerPlayerMatchCriteriaProto message or plain object to encode + * @param {CTFPerPlayerMatchCriteriaProto.$Properties} message CTFPerPlayerMatchCriteriaProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFPerPlayerMatchCriteriaProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CTFPerPlayerMatchCriteriaProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15997,25 +20914,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CTFPerPlayerMatchCriteriaProto} CTFPerPlayerMatchCriteriaProto + * @returns {CTFPerPlayerMatchCriteriaProto & CTFPerPlayerMatchCriteriaProto.$Shape} CTFPerPlayerMatchCriteriaProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFPerPlayerMatchCriteriaProto.decode = function decode(reader, length) { + CTFPerPlayerMatchCriteriaProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CTFPerPlayerMatchCriteriaProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CTFPerPlayerMatchCriteriaProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mvm_squad_surplus = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.mvm_squad_surplus = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16025,11 +20959,11 @@ * @memberof CTFPerPlayerMatchCriteriaProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CTFPerPlayerMatchCriteriaProto} CTFPerPlayerMatchCriteriaProto + * @returns {CTFPerPlayerMatchCriteriaProto & CTFPerPlayerMatchCriteriaProto.$Shape} CTFPerPlayerMatchCriteriaProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFPerPlayerMatchCriteriaProto.decodeDelimited = function decodeDelimited(reader) { + CTFPerPlayerMatchCriteriaProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16043,10 +20977,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CTFPerPlayerMatchCriteriaProto.verify = function verify(message) { + CTFPerPlayerMatchCriteriaProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mvm_squad_surplus != null && message.hasOwnProperty("mvm_squad_surplus")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.mvm_squad_surplus != null && $Object.hasOwnProperty.call(message, "mvm_squad_surplus")) if (typeof message.mvm_squad_surplus !== "boolean") return "mvm_squad_surplus: boolean expected"; return null; @@ -16060,12 +20998,18 @@ * @param {Object.} object Plain object * @returns {CTFPerPlayerMatchCriteriaProto} CTFPerPlayerMatchCriteriaProto */ - CTFPerPlayerMatchCriteriaProto.fromObject = function fromObject(object) { + CTFPerPlayerMatchCriteriaProto.fromObject = function (object, _depth) { if (object instanceof $root.CTFPerPlayerMatchCriteriaProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".CTFPerPlayerMatchCriteriaProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CTFPerPlayerMatchCriteriaProto(); if (object.mvm_squad_surplus != null) - message.mvm_squad_surplus = Boolean(object.mvm_squad_surplus); + message.mvm_squad_surplus = $Boolean(object.mvm_squad_surplus); return message; }; @@ -16078,13 +21022,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CTFPerPlayerMatchCriteriaProto.toObject = function toObject(message, options) { + CTFPerPlayerMatchCriteriaProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.mvm_squad_surplus = false; - if (message.mvm_squad_surplus != null && message.hasOwnProperty("mvm_squad_surplus")) + if (message.mvm_squad_surplus != null && $Object.hasOwnProperty.call(message, "mvm_squad_surplus")) object.mvm_squad_surplus = message.mvm_squad_surplus; return object; }; @@ -16096,8 +21044,22 @@ * @instance * @returns {Object.} JSON object */ - CTFPerPlayerMatchCriteriaProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CTFPerPlayerMatchCriteriaProto.prototype.toJSON = function() { + return CTFPerPlayerMatchCriteriaProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CTFPerPlayerMatchCriteriaProto + * @function getTypeUrl + * @memberof CTFPerPlayerMatchCriteriaProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CTFPerPlayerMatchCriteriaProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CTFPerPlayerMatchCriteriaProto"; }; return CTFPerPlayerMatchCriteriaProto; @@ -16105,30 +21067,43 @@ $root.CTFPartyOptions = (function() { + /** + * Properties of a CTFPartyOptions. + * @typedef {Object} CTFPartyOptions.$Properties + * @property {boolean|null} [overwrite_existing] CTFPartyOptions overwrite_existing + * @property {CTFGroupMatchCriteriaProto.$Properties|null} [group_criteria] CTFPartyOptions group_criteria + * @property {CTFPerPlayerMatchCriteriaProto.$Properties|null} [player_criteria] CTFPartyOptions player_criteria + * @property {TFSyncedMMUIState.$Properties|null} [player_uistate] CTFPartyOptions player_uistate + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CTFPartyOptions. * @exports ICTFPartyOptions * @interface ICTFPartyOptions - * @property {boolean|null} [overwrite_existing] CTFPartyOptions overwrite_existing - * @property {ICTFGroupMatchCriteriaProto|null} [group_criteria] CTFPartyOptions group_criteria - * @property {ICTFPerPlayerMatchCriteriaProto|null} [player_criteria] CTFPartyOptions player_criteria - * @property {ITFSyncedMMUIState|null} [player_uistate] CTFPartyOptions player_uistate + * @augments CTFPartyOptions.$Properties + * @deprecated Use CTFPartyOptions.$Properties instead. + */ + + /** + * Shape of a CTFPartyOptions. + * @typedef {CTFPartyOptions.$Properties} CTFPartyOptions.$Shape */ /** * Constructs a new CTFPartyOptions. * @exports CTFPartyOptions * @classdesc Represents a CTFPartyOptions. - * @implements ICTFPartyOptions * @constructor - * @param {ICTFPartyOptions=} [properties] Properties to set + * @param {CTFPartyOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CTFPartyOptions(properties) { + var CTFPartyOptions = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CTFPartyOptions overwrite_existing. @@ -16140,7 +21115,7 @@ /** * CTFPartyOptions group_criteria. - * @member {ICTFGroupMatchCriteriaProto|null|undefined} group_criteria + * @member {CTFGroupMatchCriteriaProto.$Properties|null|undefined} group_criteria * @memberof CTFPartyOptions * @instance */ @@ -16148,7 +21123,7 @@ /** * CTFPartyOptions player_criteria. - * @member {ICTFPerPlayerMatchCriteriaProto|null|undefined} player_criteria + * @member {CTFPerPlayerMatchCriteriaProto.$Properties|null|undefined} player_criteria * @memberof CTFPartyOptions * @instance */ @@ -16156,7 +21131,7 @@ /** * CTFPartyOptions player_uistate. - * @member {ITFSyncedMMUIState|null|undefined} player_uistate + * @member {TFSyncedMMUIState.$Properties|null|undefined} player_uistate * @memberof CTFPartyOptions * @instance */ @@ -16167,10 +21142,14 @@ * @function create * @memberof CTFPartyOptions * @static - * @param {ICTFPartyOptions=} [properties] Properties to set + * @param {CTFPartyOptions.$Properties=} [properties] Properties to set * @returns {CTFPartyOptions} CTFPartyOptions instance + * @type {{ + * (properties: CTFPartyOptions.$Shape): CTFPartyOptions & CTFPartyOptions.$Shape; + * (properties?: CTFPartyOptions.$Properties): CTFPartyOptions; + * }} */ - CTFPartyOptions.create = function create(properties) { + CTFPartyOptions.create = function(properties) { return new CTFPartyOptions(properties); }; @@ -16179,21 +21158,28 @@ * @function encode * @memberof CTFPartyOptions * @static - * @param {ICTFPartyOptions} message CTFPartyOptions message or plain object to encode + * @param {CTFPartyOptions.$Properties} message CTFPartyOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFPartyOptions.encode = function encode(message, writer) { + CTFPartyOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.overwrite_existing != null && Object.hasOwnProperty.call(message, "overwrite_existing")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.overwrite_existing != null && $Object.hasOwnProperty.call(message, "overwrite_existing")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.overwrite_existing); - if (message.group_criteria != null && Object.hasOwnProperty.call(message, "group_criteria")) - $root.CTFGroupMatchCriteriaProto.encode(message.group_criteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.player_criteria != null && Object.hasOwnProperty.call(message, "player_criteria")) - $root.CTFPerPlayerMatchCriteriaProto.encode(message.player_criteria, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.player_uistate != null && Object.hasOwnProperty.call(message, "player_uistate")) - $root.TFSyncedMMUIState.encode(message.player_uistate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.group_criteria != null && $Object.hasOwnProperty.call(message, "group_criteria")) + $root.CTFGroupMatchCriteriaProto.encode(message.group_criteria, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.player_criteria != null && $Object.hasOwnProperty.call(message, "player_criteria")) + $root.CTFPerPlayerMatchCriteriaProto.encode(message.player_criteria, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.player_uistate != null && $Object.hasOwnProperty.call(message, "player_uistate")) + $root.TFSyncedMMUIState.encode(message.player_uistate, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16202,12 +21188,12 @@ * @function encodeDelimited * @memberof CTFPartyOptions * @static - * @param {ICTFPartyOptions} message CTFPartyOptions message or plain object to encode + * @param {CTFPartyOptions.$Properties} message CTFPartyOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFPartyOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CTFPartyOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16217,34 +21203,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CTFPartyOptions} CTFPartyOptions + * @returns {CTFPartyOptions & CTFPartyOptions.$Shape} CTFPartyOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFPartyOptions.decode = function decode(reader, length) { + CTFPartyOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CTFPartyOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CTFPartyOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.overwrite_existing = reader.bool(); - break; - case 2: - message.group_criteria = $root.CTFGroupMatchCriteriaProto.decode(reader, reader.uint32()); - break; - case 3: - message.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.decode(reader, reader.uint32()); - break; - case 5: - message.player_uistate = $root.TFSyncedMMUIState.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.overwrite_existing = reader.bool(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.group_criteria = $root.CTFGroupMatchCriteriaProto.decode(reader, reader.uint32(), $undefined, _depth + 1, message.group_criteria); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.decode(reader, reader.uint32(), $undefined, _depth + 1, message.player_criteria); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.player_uistate = $root.TFSyncedMMUIState.decode(reader, reader.uint32(), $undefined, _depth + 1, message.player_uistate); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16254,11 +21266,11 @@ * @memberof CTFPartyOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CTFPartyOptions} CTFPartyOptions + * @returns {CTFPartyOptions & CTFPartyOptions.$Shape} CTFPartyOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFPartyOptions.decodeDelimited = function decodeDelimited(reader) { + CTFPartyOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16272,24 +21284,28 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CTFPartyOptions.verify = function verify(message) { + CTFPartyOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.overwrite_existing != null && message.hasOwnProperty("overwrite_existing")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.overwrite_existing != null && $Object.hasOwnProperty.call(message, "overwrite_existing")) if (typeof message.overwrite_existing !== "boolean") return "overwrite_existing: boolean expected"; - if (message.group_criteria != null && message.hasOwnProperty("group_criteria")) { - var error = $root.CTFGroupMatchCriteriaProto.verify(message.group_criteria); + if (message.group_criteria != null && $Object.hasOwnProperty.call(message, "group_criteria")) { + var error = $root.CTFGroupMatchCriteriaProto.verify(message.group_criteria, _depth + 1); if (error) return "group_criteria." + error; } - if (message.player_criteria != null && message.hasOwnProperty("player_criteria")) { - var error = $root.CTFPerPlayerMatchCriteriaProto.verify(message.player_criteria); + if (message.player_criteria != null && $Object.hasOwnProperty.call(message, "player_criteria")) { + var error = $root.CTFPerPlayerMatchCriteriaProto.verify(message.player_criteria, _depth + 1); if (error) return "player_criteria." + error; } - if (message.player_uistate != null && message.hasOwnProperty("player_uistate")) { - var error = $root.TFSyncedMMUIState.verify(message.player_uistate); + if (message.player_uistate != null && $Object.hasOwnProperty.call(message, "player_uistate")) { + var error = $root.TFSyncedMMUIState.verify(message.player_uistate, _depth + 1); if (error) return "player_uistate." + error; } @@ -16304,26 +21320,32 @@ * @param {Object.} object Plain object * @returns {CTFPartyOptions} CTFPartyOptions */ - CTFPartyOptions.fromObject = function fromObject(object) { + CTFPartyOptions.fromObject = function (object, _depth) { if (object instanceof $root.CTFPartyOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".CTFPartyOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CTFPartyOptions(); if (object.overwrite_existing != null) - message.overwrite_existing = Boolean(object.overwrite_existing); + message.overwrite_existing = $Boolean(object.overwrite_existing); if (object.group_criteria != null) { - if (typeof object.group_criteria !== "object") - throw TypeError(".CTFPartyOptions.group_criteria: object expected"); - message.group_criteria = $root.CTFGroupMatchCriteriaProto.fromObject(object.group_criteria); + if (!$util.isObject(object.group_criteria)) + throw $TypeError(".CTFPartyOptions.group_criteria: object expected"); + message.group_criteria = $root.CTFGroupMatchCriteriaProto.fromObject(object.group_criteria, _depth + 1); } if (object.player_criteria != null) { - if (typeof object.player_criteria !== "object") - throw TypeError(".CTFPartyOptions.player_criteria: object expected"); - message.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.fromObject(object.player_criteria); + if (!$util.isObject(object.player_criteria)) + throw $TypeError(".CTFPartyOptions.player_criteria: object expected"); + message.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.fromObject(object.player_criteria, _depth + 1); } if (object.player_uistate != null) { - if (typeof object.player_uistate !== "object") - throw TypeError(".CTFPartyOptions.player_uistate: object expected"); - message.player_uistate = $root.TFSyncedMMUIState.fromObject(object.player_uistate); + if (!$util.isObject(object.player_uistate)) + throw $TypeError(".CTFPartyOptions.player_uistate: object expected"); + message.player_uistate = $root.TFSyncedMMUIState.fromObject(object.player_uistate, _depth + 1); } return message; }; @@ -16337,9 +21359,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CTFPartyOptions.toObject = function toObject(message, options) { + CTFPartyOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.overwrite_existing = false; @@ -16347,14 +21373,14 @@ object.player_criteria = null; object.player_uistate = null; } - if (message.overwrite_existing != null && message.hasOwnProperty("overwrite_existing")) + if (message.overwrite_existing != null && $Object.hasOwnProperty.call(message, "overwrite_existing")) object.overwrite_existing = message.overwrite_existing; - if (message.group_criteria != null && message.hasOwnProperty("group_criteria")) - object.group_criteria = $root.CTFGroupMatchCriteriaProto.toObject(message.group_criteria, options); - if (message.player_criteria != null && message.hasOwnProperty("player_criteria")) - object.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.toObject(message.player_criteria, options); - if (message.player_uistate != null && message.hasOwnProperty("player_uistate")) - object.player_uistate = $root.TFSyncedMMUIState.toObject(message.player_uistate, options); + if (message.group_criteria != null && $Object.hasOwnProperty.call(message, "group_criteria")) + object.group_criteria = $root.CTFGroupMatchCriteriaProto.toObject(message.group_criteria, options, _depth + 1); + if (message.player_criteria != null && $Object.hasOwnProperty.call(message, "player_criteria")) + object.player_criteria = $root.CTFPerPlayerMatchCriteriaProto.toObject(message.player_criteria, options, _depth + 1); + if (message.player_uistate != null && $Object.hasOwnProperty.call(message, "player_uistate")) + object.player_uistate = $root.TFSyncedMMUIState.toObject(message.player_uistate, options, _depth + 1); return object; }; @@ -16365,8 +21391,22 @@ * @instance * @returns {Object.} JSON object */ - CTFPartyOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CTFPartyOptions.prototype.toJSON = function() { + return CTFPartyOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CTFPartyOptions + * @function getTypeUrl + * @memberof CTFPartyOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CTFPartyOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CTFPartyOptions"; }; return CTFPartyOptions; @@ -16374,28 +21414,41 @@ $root.CMsgPartySetOptions = (function() { + /** + * Properties of a CMsgPartySetOptions. + * @typedef {Object} CMsgPartySetOptions.$Properties + * @property {number|Long|null} [party_id] CMsgPartySetOptions party_id + * @property {CTFPartyOptions.$Properties|null} [options] CMsgPartySetOptions options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPartySetOptions. * @exports ICMsgPartySetOptions * @interface ICMsgPartySetOptions - * @property {number|Long|null} [party_id] CMsgPartySetOptions party_id - * @property {ICTFPartyOptions|null} [options] CMsgPartySetOptions options + * @augments CMsgPartySetOptions.$Properties + * @deprecated Use CMsgPartySetOptions.$Properties instead. + */ + + /** + * Shape of a CMsgPartySetOptions. + * @typedef {CMsgPartySetOptions.$Properties} CMsgPartySetOptions.$Shape */ /** * Constructs a new CMsgPartySetOptions. * @exports CMsgPartySetOptions * @classdesc Represents a CMsgPartySetOptions. - * @implements ICMsgPartySetOptions * @constructor - * @param {ICMsgPartySetOptions=} [properties] Properties to set + * @param {CMsgPartySetOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartySetOptions(properties) { + var CMsgPartySetOptions = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartySetOptions party_id. @@ -16403,11 +21456,11 @@ * @memberof CMsgPartySetOptions * @instance */ - CMsgPartySetOptions.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartySetOptions.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartySetOptions options. - * @member {ICTFPartyOptions|null|undefined} options + * @member {CTFPartyOptions.$Properties|null|undefined} options * @memberof CMsgPartySetOptions * @instance */ @@ -16418,10 +21471,14 @@ * @function create * @memberof CMsgPartySetOptions * @static - * @param {ICMsgPartySetOptions=} [properties] Properties to set + * @param {CMsgPartySetOptions.$Properties=} [properties] Properties to set * @returns {CMsgPartySetOptions} CMsgPartySetOptions instance + * @type {{ + * (properties: CMsgPartySetOptions.$Shape): CMsgPartySetOptions & CMsgPartySetOptions.$Shape; + * (properties?: CMsgPartySetOptions.$Properties): CMsgPartySetOptions; + * }} */ - CMsgPartySetOptions.create = function create(properties) { + CMsgPartySetOptions.create = function(properties) { return new CMsgPartySetOptions(properties); }; @@ -16430,17 +21487,24 @@ * @function encode * @memberof CMsgPartySetOptions * @static - * @param {ICMsgPartySetOptions} message CMsgPartySetOptions message or plain object to encode + * @param {CMsgPartySetOptions.$Properties} message CMsgPartySetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartySetOptions.encode = function encode(message, writer) { + CMsgPartySetOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.party_id); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.CTFPartyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.CTFPartyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16449,12 +21513,12 @@ * @function encodeDelimited * @memberof CMsgPartySetOptions * @static - * @param {ICMsgPartySetOptions} message CMsgPartySetOptions message or plain object to encode + * @param {CMsgPartySetOptions.$Properties} message CMsgPartySetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartySetOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartySetOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16464,28 +21528,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartySetOptions} CMsgPartySetOptions + * @returns {CMsgPartySetOptions & CMsgPartySetOptions.$Shape} CMsgPartySetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartySetOptions.decode = function decode(reader, length) { + CMsgPartySetOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartySetOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartySetOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.fixed64(); - break; - case 2: - message.options = $root.CTFPartyOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.party_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.options = $root.CTFPartyOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16495,11 +21579,11 @@ * @memberof CMsgPartySetOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartySetOptions} CMsgPartySetOptions + * @returns {CMsgPartySetOptions & CMsgPartySetOptions.$Shape} CMsgPartySetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartySetOptions.decodeDelimited = function decodeDelimited(reader) { + CMsgPartySetOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16513,14 +21597,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartySetOptions.verify = function verify(message) { + CMsgPartySetOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.CTFPartyOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.CTFPartyOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -16535,23 +21623,29 @@ * @param {Object.} object Plain object * @returns {CMsgPartySetOptions} CMsgPartySetOptions */ - CMsgPartySetOptions.fromObject = function fromObject(object) { + CMsgPartySetOptions.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartySetOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartySetOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartySetOptions(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = false; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") - message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(); + message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".CMsgPartySetOptions.options: object expected"); - message.options = $root.CTFPartyOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".CMsgPartySetOptions.options: object expected"); + message.options = $root.CTFPartyOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -16565,25 +21659,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartySetOptions.toObject = function toObject(message, options) { + CMsgPartySetOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.options = null; } - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber() : message.party_id; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.CTFPartyOptions.toObject(message.options, options); + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.CTFPartyOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -16594,8 +21694,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartySetOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartySetOptions.prototype.toJSON = function() { + return CMsgPartySetOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartySetOptions + * @function getTypeUrl + * @memberof CMsgPartySetOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartySetOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartySetOptions"; }; return CMsgPartySetOptions; @@ -16603,36 +21717,53 @@ $root.CMsgPartySetOptionsResponse = (function() { + /** + * Properties of a CMsgPartySetOptionsResponse. + * @typedef {Object} CMsgPartySetOptionsResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPartySetOptionsResponse. * @exports ICMsgPartySetOptionsResponse * @interface ICMsgPartySetOptionsResponse + * @augments CMsgPartySetOptionsResponse.$Properties + * @deprecated Use CMsgPartySetOptionsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgPartySetOptionsResponse. + * @typedef {CMsgPartySetOptionsResponse.$Properties} CMsgPartySetOptionsResponse.$Shape */ /** * Constructs a new CMsgPartySetOptionsResponse. * @exports CMsgPartySetOptionsResponse * @classdesc Represents a CMsgPartySetOptionsResponse. - * @implements ICMsgPartySetOptionsResponse * @constructor - * @param {ICMsgPartySetOptionsResponse=} [properties] Properties to set + * @param {CMsgPartySetOptionsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartySetOptionsResponse(properties) { + var CMsgPartySetOptionsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgPartySetOptionsResponse instance using the specified properties. * @function create * @memberof CMsgPartySetOptionsResponse * @static - * @param {ICMsgPartySetOptionsResponse=} [properties] Properties to set + * @param {CMsgPartySetOptionsResponse.$Properties=} [properties] Properties to set * @returns {CMsgPartySetOptionsResponse} CMsgPartySetOptionsResponse instance + * @type {{ + * (properties: CMsgPartySetOptionsResponse.$Shape): CMsgPartySetOptionsResponse & CMsgPartySetOptionsResponse.$Shape; + * (properties?: CMsgPartySetOptionsResponse.$Properties): CMsgPartySetOptionsResponse; + * }} */ - CMsgPartySetOptionsResponse.create = function create(properties) { + CMsgPartySetOptionsResponse.create = function(properties) { return new CMsgPartySetOptionsResponse(properties); }; @@ -16641,13 +21772,20 @@ * @function encode * @memberof CMsgPartySetOptionsResponse * @static - * @param {ICMsgPartySetOptionsResponse} message CMsgPartySetOptionsResponse message or plain object to encode + * @param {CMsgPartySetOptionsResponse.$Properties} message CMsgPartySetOptionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartySetOptionsResponse.encode = function encode(message, writer) { + CMsgPartySetOptionsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16656,12 +21794,12 @@ * @function encodeDelimited * @memberof CMsgPartySetOptionsResponse * @static - * @param {ICMsgPartySetOptionsResponse} message CMsgPartySetOptionsResponse message or plain object to encode + * @param {CMsgPartySetOptionsResponse.$Properties} message CMsgPartySetOptionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartySetOptionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartySetOptionsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16671,22 +21809,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartySetOptionsResponse} CMsgPartySetOptionsResponse + * @returns {CMsgPartySetOptionsResponse & CMsgPartySetOptionsResponse.$Shape} CMsgPartySetOptionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartySetOptionsResponse.decode = function decode(reader, length) { + CMsgPartySetOptionsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartySetOptionsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartySetOptionsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16696,11 +21845,11 @@ * @memberof CMsgPartySetOptionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartySetOptionsResponse} CMsgPartySetOptionsResponse + * @returns {CMsgPartySetOptionsResponse & CMsgPartySetOptionsResponse.$Shape} CMsgPartySetOptionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartySetOptionsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgPartySetOptionsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16714,9 +21863,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartySetOptionsResponse.verify = function verify(message) { + CMsgPartySetOptionsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -16728,9 +21881,15 @@ * @param {Object.} object Plain object * @returns {CMsgPartySetOptionsResponse} CMsgPartySetOptionsResponse */ - CMsgPartySetOptionsResponse.fromObject = function fromObject(object) { + CMsgPartySetOptionsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartySetOptionsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartySetOptionsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgPartySetOptionsResponse(); }; @@ -16743,7 +21902,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartySetOptionsResponse.toObject = function toObject() { + CMsgPartySetOptionsResponse.toObject = function () { return {}; }; @@ -16754,8 +21913,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartySetOptionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartySetOptionsResponse.prototype.toJSON = function() { + return CMsgPartySetOptionsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartySetOptionsResponse + * @function getTypeUrl + * @memberof CMsgPartySetOptionsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartySetOptionsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartySetOptionsResponse"; }; return CMsgPartySetOptionsResponse; @@ -16765,27 +21938,40 @@ /** * Properties of a CMsgPartyQueueForMatch. - * @exports ICMsgPartyQueueForMatch - * @interface ICMsgPartyQueueForMatch + * @typedef {Object} CMsgPartyQueueForMatch.$Properties * @property {number|Long|null} [party_id] CMsgPartyQueueForMatch party_id - * @property {ICTFPartyOptions|null} [final_options] CMsgPartyQueueForMatch final_options + * @property {CTFPartyOptions.$Properties|null} [final_options] CMsgPartyQueueForMatch final_options * @property {ETFMatchGroup|null} [match_group] CMsgPartyQueueForMatch match_group + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPartyQueueForMatch. + * @exports ICMsgPartyQueueForMatch + * @interface ICMsgPartyQueueForMatch + * @augments CMsgPartyQueueForMatch.$Properties + * @deprecated Use CMsgPartyQueueForMatch.$Properties instead. + */ + + /** + * Shape of a CMsgPartyQueueForMatch. + * @typedef {CMsgPartyQueueForMatch.$Properties} CMsgPartyQueueForMatch.$Shape */ /** * Constructs a new CMsgPartyQueueForMatch. * @exports CMsgPartyQueueForMatch * @classdesc Represents a CMsgPartyQueueForMatch. - * @implements ICMsgPartyQueueForMatch * @constructor - * @param {ICMsgPartyQueueForMatch=} [properties] Properties to set + * @param {CMsgPartyQueueForMatch.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyQueueForMatch(properties) { + var CMsgPartyQueueForMatch = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartyQueueForMatch party_id. @@ -16793,11 +21979,11 @@ * @memberof CMsgPartyQueueForMatch * @instance */ - CMsgPartyQueueForMatch.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyQueueForMatch.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyQueueForMatch final_options. - * @member {ICTFPartyOptions|null|undefined} final_options + * @member {CTFPartyOptions.$Properties|null|undefined} final_options * @memberof CMsgPartyQueueForMatch * @instance */ @@ -16816,10 +22002,14 @@ * @function create * @memberof CMsgPartyQueueForMatch * @static - * @param {ICMsgPartyQueueForMatch=} [properties] Properties to set + * @param {CMsgPartyQueueForMatch.$Properties=} [properties] Properties to set * @returns {CMsgPartyQueueForMatch} CMsgPartyQueueForMatch instance + * @type {{ + * (properties: CMsgPartyQueueForMatch.$Shape): CMsgPartyQueueForMatch & CMsgPartyQueueForMatch.$Shape; + * (properties?: CMsgPartyQueueForMatch.$Properties): CMsgPartyQueueForMatch; + * }} */ - CMsgPartyQueueForMatch.create = function create(properties) { + CMsgPartyQueueForMatch.create = function(properties) { return new CMsgPartyQueueForMatch(properties); }; @@ -16828,19 +22018,26 @@ * @function encode * @memberof CMsgPartyQueueForMatch * @static - * @param {ICMsgPartyQueueForMatch} message CMsgPartyQueueForMatch message or plain object to encode + * @param {CMsgPartyQueueForMatch.$Properties} message CMsgPartyQueueForMatch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyQueueForMatch.encode = function encode(message, writer) { + CMsgPartyQueueForMatch.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.party_id); - if (message.final_options != null && Object.hasOwnProperty.call(message, "final_options")) - $root.CTFPartyOptions.encode(message.final_options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (message.final_options != null && $Object.hasOwnProperty.call(message, "final_options")) + $root.CTFPartyOptions.encode(message.final_options, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.match_group); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16849,12 +22046,12 @@ * @function encodeDelimited * @memberof CMsgPartyQueueForMatch * @static - * @param {ICMsgPartyQueueForMatch} message CMsgPartyQueueForMatch message or plain object to encode + * @param {CMsgPartyQueueForMatch.$Properties} message CMsgPartyQueueForMatch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyQueueForMatch.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyQueueForMatch.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16864,31 +22061,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyQueueForMatch} CMsgPartyQueueForMatch + * @returns {CMsgPartyQueueForMatch & CMsgPartyQueueForMatch.$Shape} CMsgPartyQueueForMatch * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyQueueForMatch.decode = function decode(reader, length) { + CMsgPartyQueueForMatch.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyQueueForMatch(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyQueueForMatch(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.fixed64(); - break; - case 2: - message.final_options = $root.CTFPartyOptions.decode(reader, reader.uint32()); - break; - case 3: - message.match_group = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.party_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.final_options = $root.CTFPartyOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.final_options); + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFMatchGroup[value] !== $undefined) + message.match_group = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16898,11 +22124,11 @@ * @memberof CMsgPartyQueueForMatch * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyQueueForMatch} CMsgPartyQueueForMatch + * @returns {CMsgPartyQueueForMatch & CMsgPartyQueueForMatch.$Shape} CMsgPartyQueueForMatch * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyQueueForMatch.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyQueueForMatch.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16916,18 +22142,22 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyQueueForMatch.verify = function verify(message) { + CMsgPartyQueueForMatch.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; - if (message.final_options != null && message.hasOwnProperty("final_options")) { - var error = $root.CTFPartyOptions.verify(message.final_options); + if (message.final_options != null && $Object.hasOwnProperty.call(message, "final_options")) { + var error = $root.CTFPartyOptions.verify(message.final_options, _depth + 1); if (error) return "final_options." + error; } - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) switch (message.match_group) { default: return "match_group: enum value expected"; @@ -16967,23 +22197,29 @@ * @param {Object.} object Plain object * @returns {CMsgPartyQueueForMatch} CMsgPartyQueueForMatch */ - CMsgPartyQueueForMatch.fromObject = function fromObject(object) { + CMsgPartyQueueForMatch.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyQueueForMatch) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyQueueForMatch: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartyQueueForMatch(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = false; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") - message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(); + message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); if (object.final_options != null) { - if (typeof object.final_options !== "object") - throw TypeError(".CMsgPartyQueueForMatch.final_options: object expected"); - message.final_options = $root.CTFPartyOptions.fromObject(object.final_options); + if (!$util.isObject(object.final_options)) + throw $TypeError(".CMsgPartyQueueForMatch.final_options: object expected"); + message.final_options = $root.CTFPartyOptions.fromObject(object.final_options, _depth + 1); } switch (object.match_group) { case "k_eTFMatchGroup_Invalid": @@ -17078,6 +22314,7 @@ case 8: message.match_group = 8; break; + default: } return message; }; @@ -17091,28 +22328,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyQueueForMatch.toObject = function toObject(message, options) { + CMsgPartyQueueForMatch.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.final_options = null; - object.match_group = options.enums === String ? "k_eTFMatchGroup_Invalid" : -1; + object.match_group = options.enums === $String ? "k_eTFMatchGroup_Invalid" : -1; } - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber() : message.party_id; - if (message.final_options != null && message.hasOwnProperty("final_options")) - object.final_options = $root.CTFPartyOptions.toObject(message.final_options, options); - if (message.match_group != null && message.hasOwnProperty("match_group")) - object.match_group = options.enums === String ? $root.ETFMatchGroup[message.match_group] : message.match_group; + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; + if (message.final_options != null && $Object.hasOwnProperty.call(message, "final_options")) + object.final_options = $root.CTFPartyOptions.toObject(message.final_options, options, _depth + 1); + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) + object.match_group = options.enums === $String ? $root.ETFMatchGroup[message.match_group] === $undefined ? message.match_group : $root.ETFMatchGroup[message.match_group] : message.match_group; return object; }; @@ -17123,8 +22366,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyQueueForMatch.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyQueueForMatch.prototype.toJSON = function() { + return CMsgPartyQueueForMatch.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyQueueForMatch + * @function getTypeUrl + * @memberof CMsgPartyQueueForMatch + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyQueueForMatch.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyQueueForMatch"; }; return CMsgPartyQueueForMatch; @@ -17132,36 +22389,53 @@ $root.CMsgPartyQueueForMatchResponse = (function() { + /** + * Properties of a CMsgPartyQueueForMatchResponse. + * @typedef {Object} CMsgPartyQueueForMatchResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPartyQueueForMatchResponse. * @exports ICMsgPartyQueueForMatchResponse * @interface ICMsgPartyQueueForMatchResponse + * @augments CMsgPartyQueueForMatchResponse.$Properties + * @deprecated Use CMsgPartyQueueForMatchResponse.$Properties instead. + */ + + /** + * Shape of a CMsgPartyQueueForMatchResponse. + * @typedef {CMsgPartyQueueForMatchResponse.$Properties} CMsgPartyQueueForMatchResponse.$Shape */ /** * Constructs a new CMsgPartyQueueForMatchResponse. * @exports CMsgPartyQueueForMatchResponse * @classdesc Represents a CMsgPartyQueueForMatchResponse. - * @implements ICMsgPartyQueueForMatchResponse * @constructor - * @param {ICMsgPartyQueueForMatchResponse=} [properties] Properties to set + * @param {CMsgPartyQueueForMatchResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyQueueForMatchResponse(properties) { + var CMsgPartyQueueForMatchResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgPartyQueueForMatchResponse instance using the specified properties. * @function create * @memberof CMsgPartyQueueForMatchResponse * @static - * @param {ICMsgPartyQueueForMatchResponse=} [properties] Properties to set + * @param {CMsgPartyQueueForMatchResponse.$Properties=} [properties] Properties to set * @returns {CMsgPartyQueueForMatchResponse} CMsgPartyQueueForMatchResponse instance + * @type {{ + * (properties: CMsgPartyQueueForMatchResponse.$Shape): CMsgPartyQueueForMatchResponse & CMsgPartyQueueForMatchResponse.$Shape; + * (properties?: CMsgPartyQueueForMatchResponse.$Properties): CMsgPartyQueueForMatchResponse; + * }} */ - CMsgPartyQueueForMatchResponse.create = function create(properties) { + CMsgPartyQueueForMatchResponse.create = function(properties) { return new CMsgPartyQueueForMatchResponse(properties); }; @@ -17170,13 +22444,20 @@ * @function encode * @memberof CMsgPartyQueueForMatchResponse * @static - * @param {ICMsgPartyQueueForMatchResponse} message CMsgPartyQueueForMatchResponse message or plain object to encode + * @param {CMsgPartyQueueForMatchResponse.$Properties} message CMsgPartyQueueForMatchResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyQueueForMatchResponse.encode = function encode(message, writer) { + CMsgPartyQueueForMatchResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17185,12 +22466,12 @@ * @function encodeDelimited * @memberof CMsgPartyQueueForMatchResponse * @static - * @param {ICMsgPartyQueueForMatchResponse} message CMsgPartyQueueForMatchResponse message or plain object to encode + * @param {CMsgPartyQueueForMatchResponse.$Properties} message CMsgPartyQueueForMatchResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyQueueForMatchResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyQueueForMatchResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17200,22 +22481,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyQueueForMatchResponse} CMsgPartyQueueForMatchResponse + * @returns {CMsgPartyQueueForMatchResponse & CMsgPartyQueueForMatchResponse.$Shape} CMsgPartyQueueForMatchResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyQueueForMatchResponse.decode = function decode(reader, length) { + CMsgPartyQueueForMatchResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyQueueForMatchResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyQueueForMatchResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17225,11 +22517,11 @@ * @memberof CMsgPartyQueueForMatchResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyQueueForMatchResponse} CMsgPartyQueueForMatchResponse + * @returns {CMsgPartyQueueForMatchResponse & CMsgPartyQueueForMatchResponse.$Shape} CMsgPartyQueueForMatchResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyQueueForMatchResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyQueueForMatchResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17243,9 +22535,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyQueueForMatchResponse.verify = function verify(message) { + CMsgPartyQueueForMatchResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -17257,9 +22553,15 @@ * @param {Object.} object Plain object * @returns {CMsgPartyQueueForMatchResponse} CMsgPartyQueueForMatchResponse */ - CMsgPartyQueueForMatchResponse.fromObject = function fromObject(object) { + CMsgPartyQueueForMatchResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyQueueForMatchResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyQueueForMatchResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgPartyQueueForMatchResponse(); }; @@ -17272,7 +22574,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyQueueForMatchResponse.toObject = function toObject() { + CMsgPartyQueueForMatchResponse.toObject = function () { return {}; }; @@ -17283,8 +22585,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyQueueForMatchResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyQueueForMatchResponse.prototype.toJSON = function() { + return CMsgPartyQueueForMatchResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyQueueForMatchResponse + * @function getTypeUrl + * @memberof CMsgPartyQueueForMatchResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyQueueForMatchResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyQueueForMatchResponse"; }; return CMsgPartyQueueForMatchResponse; @@ -17294,26 +22610,39 @@ /** * Properties of a CMsgPartyQueueForStandby. - * @exports ICMsgPartyQueueForStandby - * @interface ICMsgPartyQueueForStandby + * @typedef {Object} CMsgPartyQueueForStandby.$Properties * @property {number|Long|null} [party_id] CMsgPartyQueueForStandby party_id * @property {number|Long|null} [party_lobby_id] CMsgPartyQueueForStandby party_lobby_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPartyQueueForStandby. + * @exports ICMsgPartyQueueForStandby + * @interface ICMsgPartyQueueForStandby + * @augments CMsgPartyQueueForStandby.$Properties + * @deprecated Use CMsgPartyQueueForStandby.$Properties instead. + */ + + /** + * Shape of a CMsgPartyQueueForStandby. + * @typedef {CMsgPartyQueueForStandby.$Properties} CMsgPartyQueueForStandby.$Shape */ /** * Constructs a new CMsgPartyQueueForStandby. * @exports CMsgPartyQueueForStandby * @classdesc Represents a CMsgPartyQueueForStandby. - * @implements ICMsgPartyQueueForStandby * @constructor - * @param {ICMsgPartyQueueForStandby=} [properties] Properties to set + * @param {CMsgPartyQueueForStandby.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyQueueForStandby(properties) { + var CMsgPartyQueueForStandby = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartyQueueForStandby party_id. @@ -17321,7 +22650,7 @@ * @memberof CMsgPartyQueueForStandby * @instance */ - CMsgPartyQueueForStandby.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyQueueForStandby.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyQueueForStandby party_lobby_id. @@ -17329,17 +22658,21 @@ * @memberof CMsgPartyQueueForStandby * @instance */ - CMsgPartyQueueForStandby.prototype.party_lobby_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyQueueForStandby.prototype.party_lobby_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgPartyQueueForStandby instance using the specified properties. * @function create * @memberof CMsgPartyQueueForStandby * @static - * @param {ICMsgPartyQueueForStandby=} [properties] Properties to set + * @param {CMsgPartyQueueForStandby.$Properties=} [properties] Properties to set * @returns {CMsgPartyQueueForStandby} CMsgPartyQueueForStandby instance + * @type {{ + * (properties: CMsgPartyQueueForStandby.$Shape): CMsgPartyQueueForStandby & CMsgPartyQueueForStandby.$Shape; + * (properties?: CMsgPartyQueueForStandby.$Properties): CMsgPartyQueueForStandby; + * }} */ - CMsgPartyQueueForStandby.create = function create(properties) { + CMsgPartyQueueForStandby.create = function(properties) { return new CMsgPartyQueueForStandby(properties); }; @@ -17348,17 +22681,24 @@ * @function encode * @memberof CMsgPartyQueueForStandby * @static - * @param {ICMsgPartyQueueForStandby} message CMsgPartyQueueForStandby message or plain object to encode + * @param {CMsgPartyQueueForStandby.$Properties} message CMsgPartyQueueForStandby message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyQueueForStandby.encode = function encode(message, writer) { + CMsgPartyQueueForStandby.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.party_id); - if (message.party_lobby_id != null && Object.hasOwnProperty.call(message, "party_lobby_id")) + if (message.party_lobby_id != null && $Object.hasOwnProperty.call(message, "party_lobby_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.party_lobby_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17367,12 +22707,12 @@ * @function encodeDelimited * @memberof CMsgPartyQueueForStandby * @static - * @param {ICMsgPartyQueueForStandby} message CMsgPartyQueueForStandby message or plain object to encode + * @param {CMsgPartyQueueForStandby.$Properties} message CMsgPartyQueueForStandby message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyQueueForStandby.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyQueueForStandby.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17382,28 +22722,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyQueueForStandby} CMsgPartyQueueForStandby + * @returns {CMsgPartyQueueForStandby & CMsgPartyQueueForStandby.$Shape} CMsgPartyQueueForStandby * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyQueueForStandby.decode = function decode(reader, length) { + CMsgPartyQueueForStandby.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyQueueForStandby(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyQueueForStandby(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.fixed64(); - break; - case 2: - message.party_lobby_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.party_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.party_lobby_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17413,11 +22773,11 @@ * @memberof CMsgPartyQueueForStandby * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyQueueForStandby} CMsgPartyQueueForStandby + * @returns {CMsgPartyQueueForStandby & CMsgPartyQueueForStandby.$Shape} CMsgPartyQueueForStandby * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyQueueForStandby.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyQueueForStandby.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17431,13 +22791,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyQueueForStandby.verify = function verify(message) { + CMsgPartyQueueForStandby.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; - if (message.party_lobby_id != null && message.hasOwnProperty("party_lobby_id")) + if (message.party_lobby_id != null && $Object.hasOwnProperty.call(message, "party_lobby_id")) if (!$util.isInteger(message.party_lobby_id) && !(message.party_lobby_id && $util.isInteger(message.party_lobby_id.low) && $util.isInteger(message.party_lobby_id.high))) return "party_lobby_id: integer|Long expected"; return null; @@ -17451,28 +22815,34 @@ * @param {Object.} object Plain object * @returns {CMsgPartyQueueForStandby} CMsgPartyQueueForStandby */ - CMsgPartyQueueForStandby.fromObject = function fromObject(object) { + CMsgPartyQueueForStandby.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyQueueForStandby) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyQueueForStandby: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartyQueueForStandby(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = false; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") - message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(); + message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); if (object.party_lobby_id != null) if ($util.Long) - (message.party_lobby_id = $util.Long.fromValue(object.party_lobby_id)).unsigned = false; + message.party_lobby_id = $util.Long.fromValue(object.party_lobby_id, true); else if (typeof object.party_lobby_id === "string") - message.party_lobby_id = parseInt(object.party_lobby_id, 10); + message.party_lobby_id = $parseInt(object.party_lobby_id, 10); else if (typeof object.party_lobby_id === "number") message.party_lobby_id = object.party_lobby_id; else if (typeof object.party_lobby_id === "object") - message.party_lobby_id = new $util.LongBits(object.party_lobby_id.low >>> 0, object.party_lobby_id.high >>> 0).toNumber(); + message.party_lobby_id = new $util.LongBits(object.party_lobby_id.low >>> 0, object.party_lobby_id.high >>> 0).toNumber(true); return message; }; @@ -17485,32 +22855,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyQueueForStandby.toObject = function toObject(message, options) { + CMsgPartyQueueForStandby.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_lobby_id = options.longs === String ? "0" : 0; + object.party_lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber() : message.party_id; - if (message.party_lobby_id != null && message.hasOwnProperty("party_lobby_id")) - if (typeof message.party_lobby_id === "number") - object.party_lobby_id = options.longs === String ? String(message.party_lobby_id) : message.party_lobby_id; + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; + if (message.party_lobby_id != null && $Object.hasOwnProperty.call(message, "party_lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_lobby_id = typeof message.party_lobby_id === "number" ? $BigInt(message.party_lobby_id) : $util.Long.fromBits(message.party_lobby_id.low >>> 0, message.party_lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_lobby_id === "number") + object.party_lobby_id = options.longs === $String ? $String(message.party_lobby_id) : message.party_lobby_id; else - object.party_lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_lobby_id) : options.longs === Number ? new $util.LongBits(message.party_lobby_id.low >>> 0, message.party_lobby_id.high >>> 0).toNumber() : message.party_lobby_id; + object.party_lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_lobby_id) : options.longs === $Number ? new $util.LongBits(message.party_lobby_id.low >>> 0, message.party_lobby_id.high >>> 0).toNumber(true) : message.party_lobby_id; return object; }; @@ -17521,8 +22899,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyQueueForStandby.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyQueueForStandby.prototype.toJSON = function() { + return CMsgPartyQueueForStandby.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyQueueForStandby + * @function getTypeUrl + * @memberof CMsgPartyQueueForStandby + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyQueueForStandby.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyQueueForStandby"; }; return CMsgPartyQueueForStandby; @@ -17530,36 +22922,53 @@ $root.CMsgPartyQueueForStandbyResponse = (function() { + /** + * Properties of a CMsgPartyQueueForStandbyResponse. + * @typedef {Object} CMsgPartyQueueForStandbyResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPartyQueueForStandbyResponse. * @exports ICMsgPartyQueueForStandbyResponse * @interface ICMsgPartyQueueForStandbyResponse + * @augments CMsgPartyQueueForStandbyResponse.$Properties + * @deprecated Use CMsgPartyQueueForStandbyResponse.$Properties instead. + */ + + /** + * Shape of a CMsgPartyQueueForStandbyResponse. + * @typedef {CMsgPartyQueueForStandbyResponse.$Properties} CMsgPartyQueueForStandbyResponse.$Shape */ /** * Constructs a new CMsgPartyQueueForStandbyResponse. * @exports CMsgPartyQueueForStandbyResponse * @classdesc Represents a CMsgPartyQueueForStandbyResponse. - * @implements ICMsgPartyQueueForStandbyResponse * @constructor - * @param {ICMsgPartyQueueForStandbyResponse=} [properties] Properties to set + * @param {CMsgPartyQueueForStandbyResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyQueueForStandbyResponse(properties) { + var CMsgPartyQueueForStandbyResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgPartyQueueForStandbyResponse instance using the specified properties. * @function create * @memberof CMsgPartyQueueForStandbyResponse * @static - * @param {ICMsgPartyQueueForStandbyResponse=} [properties] Properties to set + * @param {CMsgPartyQueueForStandbyResponse.$Properties=} [properties] Properties to set * @returns {CMsgPartyQueueForStandbyResponse} CMsgPartyQueueForStandbyResponse instance + * @type {{ + * (properties: CMsgPartyQueueForStandbyResponse.$Shape): CMsgPartyQueueForStandbyResponse & CMsgPartyQueueForStandbyResponse.$Shape; + * (properties?: CMsgPartyQueueForStandbyResponse.$Properties): CMsgPartyQueueForStandbyResponse; + * }} */ - CMsgPartyQueueForStandbyResponse.create = function create(properties) { + CMsgPartyQueueForStandbyResponse.create = function(properties) { return new CMsgPartyQueueForStandbyResponse(properties); }; @@ -17568,13 +22977,20 @@ * @function encode * @memberof CMsgPartyQueueForStandbyResponse * @static - * @param {ICMsgPartyQueueForStandbyResponse} message CMsgPartyQueueForStandbyResponse message or plain object to encode + * @param {CMsgPartyQueueForStandbyResponse.$Properties} message CMsgPartyQueueForStandbyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyQueueForStandbyResponse.encode = function encode(message, writer) { + CMsgPartyQueueForStandbyResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17583,12 +22999,12 @@ * @function encodeDelimited * @memberof CMsgPartyQueueForStandbyResponse * @static - * @param {ICMsgPartyQueueForStandbyResponse} message CMsgPartyQueueForStandbyResponse message or plain object to encode + * @param {CMsgPartyQueueForStandbyResponse.$Properties} message CMsgPartyQueueForStandbyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyQueueForStandbyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyQueueForStandbyResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17598,22 +23014,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyQueueForStandbyResponse} CMsgPartyQueueForStandbyResponse + * @returns {CMsgPartyQueueForStandbyResponse & CMsgPartyQueueForStandbyResponse.$Shape} CMsgPartyQueueForStandbyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyQueueForStandbyResponse.decode = function decode(reader, length) { + CMsgPartyQueueForStandbyResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyQueueForStandbyResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyQueueForStandbyResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17623,11 +23050,11 @@ * @memberof CMsgPartyQueueForStandbyResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyQueueForStandbyResponse} CMsgPartyQueueForStandbyResponse + * @returns {CMsgPartyQueueForStandbyResponse & CMsgPartyQueueForStandbyResponse.$Shape} CMsgPartyQueueForStandbyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyQueueForStandbyResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyQueueForStandbyResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17641,9 +23068,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyQueueForStandbyResponse.verify = function verify(message) { + CMsgPartyQueueForStandbyResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -17655,9 +23086,15 @@ * @param {Object.} object Plain object * @returns {CMsgPartyQueueForStandbyResponse} CMsgPartyQueueForStandbyResponse */ - CMsgPartyQueueForStandbyResponse.fromObject = function fromObject(object) { + CMsgPartyQueueForStandbyResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyQueueForStandbyResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyQueueForStandbyResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgPartyQueueForStandbyResponse(); }; @@ -17670,7 +23107,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyQueueForStandbyResponse.toObject = function toObject() { + CMsgPartyQueueForStandbyResponse.toObject = function () { return {}; }; @@ -17681,8 +23118,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyQueueForStandbyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyQueueForStandbyResponse.prototype.toJSON = function() { + return CMsgPartyQueueForStandbyResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyQueueForStandbyResponse + * @function getTypeUrl + * @memberof CMsgPartyQueueForStandbyResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyQueueForStandbyResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyQueueForStandbyResponse"; }; return CMsgPartyQueueForStandbyResponse; @@ -17692,26 +23143,39 @@ /** * Properties of a CMsgPartyRemoveFromQueue. - * @exports ICMsgPartyRemoveFromQueue - * @interface ICMsgPartyRemoveFromQueue + * @typedef {Object} CMsgPartyRemoveFromQueue.$Properties * @property {number|Long|null} [party_id] CMsgPartyRemoveFromQueue party_id * @property {ETFMatchGroup|null} [match_group] CMsgPartyRemoveFromQueue match_group + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPartyRemoveFromQueue. + * @exports ICMsgPartyRemoveFromQueue + * @interface ICMsgPartyRemoveFromQueue + * @augments CMsgPartyRemoveFromQueue.$Properties + * @deprecated Use CMsgPartyRemoveFromQueue.$Properties instead. + */ + + /** + * Shape of a CMsgPartyRemoveFromQueue. + * @typedef {CMsgPartyRemoveFromQueue.$Properties} CMsgPartyRemoveFromQueue.$Shape */ /** * Constructs a new CMsgPartyRemoveFromQueue. * @exports CMsgPartyRemoveFromQueue * @classdesc Represents a CMsgPartyRemoveFromQueue. - * @implements ICMsgPartyRemoveFromQueue * @constructor - * @param {ICMsgPartyRemoveFromQueue=} [properties] Properties to set + * @param {CMsgPartyRemoveFromQueue.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyRemoveFromQueue(properties) { + var CMsgPartyRemoveFromQueue = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartyRemoveFromQueue party_id. @@ -17719,7 +23183,7 @@ * @memberof CMsgPartyRemoveFromQueue * @instance */ - CMsgPartyRemoveFromQueue.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyRemoveFromQueue.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyRemoveFromQueue match_group. @@ -17734,10 +23198,14 @@ * @function create * @memberof CMsgPartyRemoveFromQueue * @static - * @param {ICMsgPartyRemoveFromQueue=} [properties] Properties to set + * @param {CMsgPartyRemoveFromQueue.$Properties=} [properties] Properties to set * @returns {CMsgPartyRemoveFromQueue} CMsgPartyRemoveFromQueue instance + * @type {{ + * (properties: CMsgPartyRemoveFromQueue.$Shape): CMsgPartyRemoveFromQueue & CMsgPartyRemoveFromQueue.$Shape; + * (properties?: CMsgPartyRemoveFromQueue.$Properties): CMsgPartyRemoveFromQueue; + * }} */ - CMsgPartyRemoveFromQueue.create = function create(properties) { + CMsgPartyRemoveFromQueue.create = function(properties) { return new CMsgPartyRemoveFromQueue(properties); }; @@ -17746,17 +23214,24 @@ * @function encode * @memberof CMsgPartyRemoveFromQueue * @static - * @param {ICMsgPartyRemoveFromQueue} message CMsgPartyRemoveFromQueue message or plain object to encode + * @param {CMsgPartyRemoveFromQueue.$Properties} message CMsgPartyRemoveFromQueue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyRemoveFromQueue.encode = function encode(message, writer) { + CMsgPartyRemoveFromQueue.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.party_id); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.match_group); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17765,12 +23240,12 @@ * @function encodeDelimited * @memberof CMsgPartyRemoveFromQueue * @static - * @param {ICMsgPartyRemoveFromQueue} message CMsgPartyRemoveFromQueue message or plain object to encode + * @param {CMsgPartyRemoveFromQueue.$Properties} message CMsgPartyRemoveFromQueue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyRemoveFromQueue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyRemoveFromQueue.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17780,28 +23255,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyRemoveFromQueue} CMsgPartyRemoveFromQueue + * @returns {CMsgPartyRemoveFromQueue & CMsgPartyRemoveFromQueue.$Shape} CMsgPartyRemoveFromQueue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyRemoveFromQueue.decode = function decode(reader, length) { + CMsgPartyRemoveFromQueue.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyRemoveFromQueue(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyRemoveFromQueue(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.fixed64(); - break; - case 2: - message.match_group = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.party_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFMatchGroup[value] !== $undefined) + message.match_group = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17811,11 +23312,11 @@ * @memberof CMsgPartyRemoveFromQueue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyRemoveFromQueue} CMsgPartyRemoveFromQueue + * @returns {CMsgPartyRemoveFromQueue & CMsgPartyRemoveFromQueue.$Shape} CMsgPartyRemoveFromQueue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyRemoveFromQueue.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyRemoveFromQueue.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17829,13 +23330,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyRemoveFromQueue.verify = function verify(message) { + CMsgPartyRemoveFromQueue.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) switch (message.match_group) { default: return "match_group: enum value expected"; @@ -17875,19 +23380,25 @@ * @param {Object.} object Plain object * @returns {CMsgPartyRemoveFromQueue} CMsgPartyRemoveFromQueue */ - CMsgPartyRemoveFromQueue.fromObject = function fromObject(object) { + CMsgPartyRemoveFromQueue.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyRemoveFromQueue) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyRemoveFromQueue: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartyRemoveFromQueue(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = false; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") - message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(); + message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); switch (object.match_group) { case "k_eTFMatchGroup_Invalid": case -1: @@ -17981,6 +23492,7 @@ case 8: message.match_group = 8; break; + default: } return message; }; @@ -17994,25 +23506,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyRemoveFromQueue.toObject = function toObject(message, options) { + CMsgPartyRemoveFromQueue.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; - object.match_group = options.enums === String ? "k_eTFMatchGroup_Invalid" : -1; - } - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.match_group = options.enums === $String ? "k_eTFMatchGroup_Invalid" : -1; + } + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber() : message.party_id; - if (message.match_group != null && message.hasOwnProperty("match_group")) - object.match_group = options.enums === String ? $root.ETFMatchGroup[message.match_group] : message.match_group; + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) + object.match_group = options.enums === $String ? $root.ETFMatchGroup[message.match_group] === $undefined ? message.match_group : $root.ETFMatchGroup[message.match_group] : message.match_group; return object; }; @@ -18023,8 +23541,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyRemoveFromQueue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyRemoveFromQueue.prototype.toJSON = function() { + return CMsgPartyRemoveFromQueue.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyRemoveFromQueue + * @function getTypeUrl + * @memberof CMsgPartyRemoveFromQueue + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyRemoveFromQueue.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyRemoveFromQueue"; }; return CMsgPartyRemoveFromQueue; @@ -18032,36 +23564,53 @@ $root.CMsgPartyRemoveFromQueueResponse = (function() { + /** + * Properties of a CMsgPartyRemoveFromQueueResponse. + * @typedef {Object} CMsgPartyRemoveFromQueueResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPartyRemoveFromQueueResponse. * @exports ICMsgPartyRemoveFromQueueResponse * @interface ICMsgPartyRemoveFromQueueResponse + * @augments CMsgPartyRemoveFromQueueResponse.$Properties + * @deprecated Use CMsgPartyRemoveFromQueueResponse.$Properties instead. + */ + + /** + * Shape of a CMsgPartyRemoveFromQueueResponse. + * @typedef {CMsgPartyRemoveFromQueueResponse.$Properties} CMsgPartyRemoveFromQueueResponse.$Shape */ /** * Constructs a new CMsgPartyRemoveFromQueueResponse. * @exports CMsgPartyRemoveFromQueueResponse * @classdesc Represents a CMsgPartyRemoveFromQueueResponse. - * @implements ICMsgPartyRemoveFromQueueResponse * @constructor - * @param {ICMsgPartyRemoveFromQueueResponse=} [properties] Properties to set + * @param {CMsgPartyRemoveFromQueueResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyRemoveFromQueueResponse(properties) { + var CMsgPartyRemoveFromQueueResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgPartyRemoveFromQueueResponse instance using the specified properties. * @function create * @memberof CMsgPartyRemoveFromQueueResponse * @static - * @param {ICMsgPartyRemoveFromQueueResponse=} [properties] Properties to set + * @param {CMsgPartyRemoveFromQueueResponse.$Properties=} [properties] Properties to set * @returns {CMsgPartyRemoveFromQueueResponse} CMsgPartyRemoveFromQueueResponse instance + * @type {{ + * (properties: CMsgPartyRemoveFromQueueResponse.$Shape): CMsgPartyRemoveFromQueueResponse & CMsgPartyRemoveFromQueueResponse.$Shape; + * (properties?: CMsgPartyRemoveFromQueueResponse.$Properties): CMsgPartyRemoveFromQueueResponse; + * }} */ - CMsgPartyRemoveFromQueueResponse.create = function create(properties) { + CMsgPartyRemoveFromQueueResponse.create = function(properties) { return new CMsgPartyRemoveFromQueueResponse(properties); }; @@ -18070,13 +23619,20 @@ * @function encode * @memberof CMsgPartyRemoveFromQueueResponse * @static - * @param {ICMsgPartyRemoveFromQueueResponse} message CMsgPartyRemoveFromQueueResponse message or plain object to encode + * @param {CMsgPartyRemoveFromQueueResponse.$Properties} message CMsgPartyRemoveFromQueueResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyRemoveFromQueueResponse.encode = function encode(message, writer) { + CMsgPartyRemoveFromQueueResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18085,12 +23641,12 @@ * @function encodeDelimited * @memberof CMsgPartyRemoveFromQueueResponse * @static - * @param {ICMsgPartyRemoveFromQueueResponse} message CMsgPartyRemoveFromQueueResponse message or plain object to encode + * @param {CMsgPartyRemoveFromQueueResponse.$Properties} message CMsgPartyRemoveFromQueueResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyRemoveFromQueueResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyRemoveFromQueueResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18100,22 +23656,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyRemoveFromQueueResponse} CMsgPartyRemoveFromQueueResponse + * @returns {CMsgPartyRemoveFromQueueResponse & CMsgPartyRemoveFromQueueResponse.$Shape} CMsgPartyRemoveFromQueueResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyRemoveFromQueueResponse.decode = function decode(reader, length) { + CMsgPartyRemoveFromQueueResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyRemoveFromQueueResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyRemoveFromQueueResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18125,11 +23692,11 @@ * @memberof CMsgPartyRemoveFromQueueResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyRemoveFromQueueResponse} CMsgPartyRemoveFromQueueResponse + * @returns {CMsgPartyRemoveFromQueueResponse & CMsgPartyRemoveFromQueueResponse.$Shape} CMsgPartyRemoveFromQueueResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyRemoveFromQueueResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyRemoveFromQueueResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18143,9 +23710,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyRemoveFromQueueResponse.verify = function verify(message) { + CMsgPartyRemoveFromQueueResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -18157,9 +23728,15 @@ * @param {Object.} object Plain object * @returns {CMsgPartyRemoveFromQueueResponse} CMsgPartyRemoveFromQueueResponse */ - CMsgPartyRemoveFromQueueResponse.fromObject = function fromObject(object) { + CMsgPartyRemoveFromQueueResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyRemoveFromQueueResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyRemoveFromQueueResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgPartyRemoveFromQueueResponse(); }; @@ -18172,7 +23749,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyRemoveFromQueueResponse.toObject = function toObject() { + CMsgPartyRemoveFromQueueResponse.toObject = function () { return {}; }; @@ -18183,8 +23760,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyRemoveFromQueueResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyRemoveFromQueueResponse.prototype.toJSON = function() { + return CMsgPartyRemoveFromQueueResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyRemoveFromQueueResponse + * @function getTypeUrl + * @memberof CMsgPartyRemoveFromQueueResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyRemoveFromQueueResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyRemoveFromQueueResponse"; }; return CMsgPartyRemoveFromQueueResponse; @@ -18192,27 +23783,40 @@ $root.CMsgPartyRemoveFromStandbyQueue = (function() { + /** + * Properties of a CMsgPartyRemoveFromStandbyQueue. + * @typedef {Object} CMsgPartyRemoveFromStandbyQueue.$Properties + * @property {number|Long|null} [party_id] CMsgPartyRemoveFromStandbyQueue party_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPartyRemoveFromStandbyQueue. * @exports ICMsgPartyRemoveFromStandbyQueue * @interface ICMsgPartyRemoveFromStandbyQueue - * @property {number|Long|null} [party_id] CMsgPartyRemoveFromStandbyQueue party_id + * @augments CMsgPartyRemoveFromStandbyQueue.$Properties + * @deprecated Use CMsgPartyRemoveFromStandbyQueue.$Properties instead. + */ + + /** + * Shape of a CMsgPartyRemoveFromStandbyQueue. + * @typedef {CMsgPartyRemoveFromStandbyQueue.$Properties} CMsgPartyRemoveFromStandbyQueue.$Shape */ /** * Constructs a new CMsgPartyRemoveFromStandbyQueue. * @exports CMsgPartyRemoveFromStandbyQueue * @classdesc Represents a CMsgPartyRemoveFromStandbyQueue. - * @implements ICMsgPartyRemoveFromStandbyQueue * @constructor - * @param {ICMsgPartyRemoveFromStandbyQueue=} [properties] Properties to set + * @param {CMsgPartyRemoveFromStandbyQueue.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyRemoveFromStandbyQueue(properties) { + var CMsgPartyRemoveFromStandbyQueue = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartyRemoveFromStandbyQueue party_id. @@ -18220,17 +23824,21 @@ * @memberof CMsgPartyRemoveFromStandbyQueue * @instance */ - CMsgPartyRemoveFromStandbyQueue.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyRemoveFromStandbyQueue.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgPartyRemoveFromStandbyQueue instance using the specified properties. * @function create * @memberof CMsgPartyRemoveFromStandbyQueue * @static - * @param {ICMsgPartyRemoveFromStandbyQueue=} [properties] Properties to set + * @param {CMsgPartyRemoveFromStandbyQueue.$Properties=} [properties] Properties to set * @returns {CMsgPartyRemoveFromStandbyQueue} CMsgPartyRemoveFromStandbyQueue instance + * @type {{ + * (properties: CMsgPartyRemoveFromStandbyQueue.$Shape): CMsgPartyRemoveFromStandbyQueue & CMsgPartyRemoveFromStandbyQueue.$Shape; + * (properties?: CMsgPartyRemoveFromStandbyQueue.$Properties): CMsgPartyRemoveFromStandbyQueue; + * }} */ - CMsgPartyRemoveFromStandbyQueue.create = function create(properties) { + CMsgPartyRemoveFromStandbyQueue.create = function(properties) { return new CMsgPartyRemoveFromStandbyQueue(properties); }; @@ -18239,15 +23847,22 @@ * @function encode * @memberof CMsgPartyRemoveFromStandbyQueue * @static - * @param {ICMsgPartyRemoveFromStandbyQueue} message CMsgPartyRemoveFromStandbyQueue message or plain object to encode + * @param {CMsgPartyRemoveFromStandbyQueue.$Properties} message CMsgPartyRemoveFromStandbyQueue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyRemoveFromStandbyQueue.encode = function encode(message, writer) { + CMsgPartyRemoveFromStandbyQueue.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.party_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18256,12 +23871,12 @@ * @function encodeDelimited * @memberof CMsgPartyRemoveFromStandbyQueue * @static - * @param {ICMsgPartyRemoveFromStandbyQueue} message CMsgPartyRemoveFromStandbyQueue message or plain object to encode + * @param {CMsgPartyRemoveFromStandbyQueue.$Properties} message CMsgPartyRemoveFromStandbyQueue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyRemoveFromStandbyQueue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyRemoveFromStandbyQueue.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18271,25 +23886,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyRemoveFromStandbyQueue} CMsgPartyRemoveFromStandbyQueue + * @returns {CMsgPartyRemoveFromStandbyQueue & CMsgPartyRemoveFromStandbyQueue.$Shape} CMsgPartyRemoveFromStandbyQueue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyRemoveFromStandbyQueue.decode = function decode(reader, length) { + CMsgPartyRemoveFromStandbyQueue.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyRemoveFromStandbyQueue(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyRemoveFromStandbyQueue(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.party_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18299,11 +23931,11 @@ * @memberof CMsgPartyRemoveFromStandbyQueue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyRemoveFromStandbyQueue} CMsgPartyRemoveFromStandbyQueue + * @returns {CMsgPartyRemoveFromStandbyQueue & CMsgPartyRemoveFromStandbyQueue.$Shape} CMsgPartyRemoveFromStandbyQueue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyRemoveFromStandbyQueue.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyRemoveFromStandbyQueue.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18317,10 +23949,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyRemoveFromStandbyQueue.verify = function verify(message) { + CMsgPartyRemoveFromStandbyQueue.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; return null; @@ -18334,19 +23970,25 @@ * @param {Object.} object Plain object * @returns {CMsgPartyRemoveFromStandbyQueue} CMsgPartyRemoveFromStandbyQueue */ - CMsgPartyRemoveFromStandbyQueue.fromObject = function fromObject(object) { + CMsgPartyRemoveFromStandbyQueue.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyRemoveFromStandbyQueue) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyRemoveFromStandbyQueue: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartyRemoveFromStandbyQueue(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = false; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") - message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(); + message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); return message; }; @@ -18359,21 +24001,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyRemoveFromStandbyQueue.toObject = function toObject(message, options) { + CMsgPartyRemoveFromStandbyQueue.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber() : message.party_id; + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; return object; }; @@ -18384,8 +24032,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyRemoveFromStandbyQueue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyRemoveFromStandbyQueue.prototype.toJSON = function() { + return CMsgPartyRemoveFromStandbyQueue.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyRemoveFromStandbyQueue + * @function getTypeUrl + * @memberof CMsgPartyRemoveFromStandbyQueue + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyRemoveFromStandbyQueue.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyRemoveFromStandbyQueue"; }; return CMsgPartyRemoveFromStandbyQueue; @@ -18393,36 +24055,53 @@ $root.CMsgPartyRemoveFromStandbyQueueResponse = (function() { + /** + * Properties of a CMsgPartyRemoveFromStandbyQueueResponse. + * @typedef {Object} CMsgPartyRemoveFromStandbyQueueResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPartyRemoveFromStandbyQueueResponse. * @exports ICMsgPartyRemoveFromStandbyQueueResponse * @interface ICMsgPartyRemoveFromStandbyQueueResponse + * @augments CMsgPartyRemoveFromStandbyQueueResponse.$Properties + * @deprecated Use CMsgPartyRemoveFromStandbyQueueResponse.$Properties instead. + */ + + /** + * Shape of a CMsgPartyRemoveFromStandbyQueueResponse. + * @typedef {CMsgPartyRemoveFromStandbyQueueResponse.$Properties} CMsgPartyRemoveFromStandbyQueueResponse.$Shape */ /** * Constructs a new CMsgPartyRemoveFromStandbyQueueResponse. * @exports CMsgPartyRemoveFromStandbyQueueResponse * @classdesc Represents a CMsgPartyRemoveFromStandbyQueueResponse. - * @implements ICMsgPartyRemoveFromStandbyQueueResponse * @constructor - * @param {ICMsgPartyRemoveFromStandbyQueueResponse=} [properties] Properties to set + * @param {CMsgPartyRemoveFromStandbyQueueResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyRemoveFromStandbyQueueResponse(properties) { + var CMsgPartyRemoveFromStandbyQueueResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgPartyRemoveFromStandbyQueueResponse instance using the specified properties. * @function create * @memberof CMsgPartyRemoveFromStandbyQueueResponse * @static - * @param {ICMsgPartyRemoveFromStandbyQueueResponse=} [properties] Properties to set + * @param {CMsgPartyRemoveFromStandbyQueueResponse.$Properties=} [properties] Properties to set * @returns {CMsgPartyRemoveFromStandbyQueueResponse} CMsgPartyRemoveFromStandbyQueueResponse instance + * @type {{ + * (properties: CMsgPartyRemoveFromStandbyQueueResponse.$Shape): CMsgPartyRemoveFromStandbyQueueResponse & CMsgPartyRemoveFromStandbyQueueResponse.$Shape; + * (properties?: CMsgPartyRemoveFromStandbyQueueResponse.$Properties): CMsgPartyRemoveFromStandbyQueueResponse; + * }} */ - CMsgPartyRemoveFromStandbyQueueResponse.create = function create(properties) { + CMsgPartyRemoveFromStandbyQueueResponse.create = function(properties) { return new CMsgPartyRemoveFromStandbyQueueResponse(properties); }; @@ -18431,13 +24110,20 @@ * @function encode * @memberof CMsgPartyRemoveFromStandbyQueueResponse * @static - * @param {ICMsgPartyRemoveFromStandbyQueueResponse} message CMsgPartyRemoveFromStandbyQueueResponse message or plain object to encode + * @param {CMsgPartyRemoveFromStandbyQueueResponse.$Properties} message CMsgPartyRemoveFromStandbyQueueResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyRemoveFromStandbyQueueResponse.encode = function encode(message, writer) { + CMsgPartyRemoveFromStandbyQueueResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18446,12 +24132,12 @@ * @function encodeDelimited * @memberof CMsgPartyRemoveFromStandbyQueueResponse * @static - * @param {ICMsgPartyRemoveFromStandbyQueueResponse} message CMsgPartyRemoveFromStandbyQueueResponse message or plain object to encode + * @param {CMsgPartyRemoveFromStandbyQueueResponse.$Properties} message CMsgPartyRemoveFromStandbyQueueResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyRemoveFromStandbyQueueResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyRemoveFromStandbyQueueResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18461,22 +24147,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyRemoveFromStandbyQueueResponse} CMsgPartyRemoveFromStandbyQueueResponse + * @returns {CMsgPartyRemoveFromStandbyQueueResponse & CMsgPartyRemoveFromStandbyQueueResponse.$Shape} CMsgPartyRemoveFromStandbyQueueResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyRemoveFromStandbyQueueResponse.decode = function decode(reader, length) { + CMsgPartyRemoveFromStandbyQueueResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyRemoveFromStandbyQueueResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyRemoveFromStandbyQueueResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18486,11 +24183,11 @@ * @memberof CMsgPartyRemoveFromStandbyQueueResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyRemoveFromStandbyQueueResponse} CMsgPartyRemoveFromStandbyQueueResponse + * @returns {CMsgPartyRemoveFromStandbyQueueResponse & CMsgPartyRemoveFromStandbyQueueResponse.$Shape} CMsgPartyRemoveFromStandbyQueueResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyRemoveFromStandbyQueueResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyRemoveFromStandbyQueueResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18504,9 +24201,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyRemoveFromStandbyQueueResponse.verify = function verify(message) { + CMsgPartyRemoveFromStandbyQueueResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -18518,9 +24219,15 @@ * @param {Object.} object Plain object * @returns {CMsgPartyRemoveFromStandbyQueueResponse} CMsgPartyRemoveFromStandbyQueueResponse */ - CMsgPartyRemoveFromStandbyQueueResponse.fromObject = function fromObject(object) { + CMsgPartyRemoveFromStandbyQueueResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyRemoveFromStandbyQueueResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyRemoveFromStandbyQueueResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgPartyRemoveFromStandbyQueueResponse(); }; @@ -18533,7 +24240,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyRemoveFromStandbyQueueResponse.toObject = function toObject() { + CMsgPartyRemoveFromStandbyQueueResponse.toObject = function () { return {}; }; @@ -18544,8 +24251,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyRemoveFromStandbyQueueResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyRemoveFromStandbyQueueResponse.prototype.toJSON = function() { + return CMsgPartyRemoveFromStandbyQueueResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyRemoveFromStandbyQueueResponse + * @function getTypeUrl + * @memberof CMsgPartyRemoveFromStandbyQueueResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyRemoveFromStandbyQueueResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyRemoveFromStandbyQueueResponse"; }; return CMsgPartyRemoveFromStandbyQueueResponse; @@ -18555,27 +24276,40 @@ /** * Properties of a CMsgPartyInvitePlayer. - * @exports ICMsgPartyInvitePlayer - * @interface ICMsgPartyInvitePlayer + * @typedef {Object} CMsgPartyInvitePlayer.$Properties * @property {number|Long|null} [party_id] CMsgPartyInvitePlayer party_id * @property {number|Long|null} [player_id] CMsgPartyInvitePlayer player_id * @property {boolean|null} [expecting_request_to_join] CMsgPartyInvitePlayer expecting_request_to_join + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPartyInvitePlayer. + * @exports ICMsgPartyInvitePlayer + * @interface ICMsgPartyInvitePlayer + * @augments CMsgPartyInvitePlayer.$Properties + * @deprecated Use CMsgPartyInvitePlayer.$Properties instead. + */ + + /** + * Shape of a CMsgPartyInvitePlayer. + * @typedef {CMsgPartyInvitePlayer.$Properties} CMsgPartyInvitePlayer.$Shape */ /** * Constructs a new CMsgPartyInvitePlayer. * @exports CMsgPartyInvitePlayer * @classdesc Represents a CMsgPartyInvitePlayer. - * @implements ICMsgPartyInvitePlayer * @constructor - * @param {ICMsgPartyInvitePlayer=} [properties] Properties to set + * @param {CMsgPartyInvitePlayer.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyInvitePlayer(properties) { + var CMsgPartyInvitePlayer = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartyInvitePlayer party_id. @@ -18583,7 +24317,7 @@ * @memberof CMsgPartyInvitePlayer * @instance */ - CMsgPartyInvitePlayer.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyInvitePlayer.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyInvitePlayer player_id. @@ -18591,7 +24325,7 @@ * @memberof CMsgPartyInvitePlayer * @instance */ - CMsgPartyInvitePlayer.prototype.player_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyInvitePlayer.prototype.player_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyInvitePlayer expecting_request_to_join. @@ -18606,10 +24340,14 @@ * @function create * @memberof CMsgPartyInvitePlayer * @static - * @param {ICMsgPartyInvitePlayer=} [properties] Properties to set + * @param {CMsgPartyInvitePlayer.$Properties=} [properties] Properties to set * @returns {CMsgPartyInvitePlayer} CMsgPartyInvitePlayer instance + * @type {{ + * (properties: CMsgPartyInvitePlayer.$Shape): CMsgPartyInvitePlayer & CMsgPartyInvitePlayer.$Shape; + * (properties?: CMsgPartyInvitePlayer.$Properties): CMsgPartyInvitePlayer; + * }} */ - CMsgPartyInvitePlayer.create = function create(properties) { + CMsgPartyInvitePlayer.create = function(properties) { return new CMsgPartyInvitePlayer(properties); }; @@ -18618,19 +24356,26 @@ * @function encode * @memberof CMsgPartyInvitePlayer * @static - * @param {ICMsgPartyInvitePlayer} message CMsgPartyInvitePlayer message or plain object to encode + * @param {CMsgPartyInvitePlayer.$Properties} message CMsgPartyInvitePlayer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyInvitePlayer.encode = function encode(message, writer) { + CMsgPartyInvitePlayer.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.party_id); - if (message.player_id != null && Object.hasOwnProperty.call(message, "player_id")) + if (message.player_id != null && $Object.hasOwnProperty.call(message, "player_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.player_id); - if (message.expecting_request_to_join != null && Object.hasOwnProperty.call(message, "expecting_request_to_join")) + if (message.expecting_request_to_join != null && $Object.hasOwnProperty.call(message, "expecting_request_to_join")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.expecting_request_to_join); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18639,12 +24384,12 @@ * @function encodeDelimited * @memberof CMsgPartyInvitePlayer * @static - * @param {ICMsgPartyInvitePlayer} message CMsgPartyInvitePlayer message or plain object to encode + * @param {CMsgPartyInvitePlayer.$Properties} message CMsgPartyInvitePlayer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyInvitePlayer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyInvitePlayer.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18654,31 +24399,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyInvitePlayer} CMsgPartyInvitePlayer + * @returns {CMsgPartyInvitePlayer & CMsgPartyInvitePlayer.$Shape} CMsgPartyInvitePlayer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyInvitePlayer.decode = function decode(reader, length) { + CMsgPartyInvitePlayer.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyInvitePlayer(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyInvitePlayer(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.fixed64(); - break; - case 2: - message.player_id = reader.fixed64(); - break; - case 3: - message.expecting_request_to_join = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.party_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.player_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.expecting_request_to_join = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18688,11 +24456,11 @@ * @memberof CMsgPartyInvitePlayer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyInvitePlayer} CMsgPartyInvitePlayer + * @returns {CMsgPartyInvitePlayer & CMsgPartyInvitePlayer.$Shape} CMsgPartyInvitePlayer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyInvitePlayer.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyInvitePlayer.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18706,16 +24474,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyInvitePlayer.verify = function verify(message) { + CMsgPartyInvitePlayer.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; - if (message.player_id != null && message.hasOwnProperty("player_id")) + if (message.player_id != null && $Object.hasOwnProperty.call(message, "player_id")) if (!$util.isInteger(message.player_id) && !(message.player_id && $util.isInteger(message.player_id.low) && $util.isInteger(message.player_id.high))) return "player_id: integer|Long expected"; - if (message.expecting_request_to_join != null && message.hasOwnProperty("expecting_request_to_join")) + if (message.expecting_request_to_join != null && $Object.hasOwnProperty.call(message, "expecting_request_to_join")) if (typeof message.expecting_request_to_join !== "boolean") return "expecting_request_to_join: boolean expected"; return null; @@ -18729,30 +24501,36 @@ * @param {Object.} object Plain object * @returns {CMsgPartyInvitePlayer} CMsgPartyInvitePlayer */ - CMsgPartyInvitePlayer.fromObject = function fromObject(object) { + CMsgPartyInvitePlayer.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyInvitePlayer) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyInvitePlayer: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartyInvitePlayer(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = false; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") - message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(); + message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); if (object.player_id != null) if ($util.Long) - (message.player_id = $util.Long.fromValue(object.player_id)).unsigned = false; + message.player_id = $util.Long.fromValue(object.player_id, true); else if (typeof object.player_id === "string") - message.player_id = parseInt(object.player_id, 10); + message.player_id = $parseInt(object.player_id, 10); else if (typeof object.player_id === "number") message.player_id = object.player_id; else if (typeof object.player_id === "object") - message.player_id = new $util.LongBits(object.player_id.low >>> 0, object.player_id.high >>> 0).toNumber(); + message.player_id = new $util.LongBits(object.player_id.low >>> 0, object.player_id.high >>> 0).toNumber(true); if (object.expecting_request_to_join != null) - message.expecting_request_to_join = Boolean(object.expecting_request_to_join); + message.expecting_request_to_join = $Boolean(object.expecting_request_to_join); return message; }; @@ -18765,34 +24543,42 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyInvitePlayer.toObject = function toObject(message, options) { + CMsgPartyInvitePlayer.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.player_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.player_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.player_id = options.longs === String ? "0" : 0; + object.player_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.expecting_request_to_join = false; } - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber() : message.party_id; - if (message.player_id != null && message.hasOwnProperty("player_id")) - if (typeof message.player_id === "number") - object.player_id = options.longs === String ? String(message.player_id) : message.player_id; + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; + if (message.player_id != null && $Object.hasOwnProperty.call(message, "player_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.player_id = typeof message.player_id === "number" ? $BigInt(message.player_id) : $util.Long.fromBits(message.player_id.low >>> 0, message.player_id.high >>> 0, true).toBigInt(); + else if (typeof message.player_id === "number") + object.player_id = options.longs === $String ? $String(message.player_id) : message.player_id; else - object.player_id = options.longs === String ? $util.Long.prototype.toString.call(message.player_id) : options.longs === Number ? new $util.LongBits(message.player_id.low >>> 0, message.player_id.high >>> 0).toNumber() : message.player_id; - if (message.expecting_request_to_join != null && message.hasOwnProperty("expecting_request_to_join")) + object.player_id = options.longs === $String ? $util.Long.prototype.toString.call(message.player_id) : options.longs === $Number ? new $util.LongBits(message.player_id.low >>> 0, message.player_id.high >>> 0).toNumber(true) : message.player_id; + if (message.expecting_request_to_join != null && $Object.hasOwnProperty.call(message, "expecting_request_to_join")) object.expecting_request_to_join = message.expecting_request_to_join; return object; }; @@ -18804,8 +24590,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyInvitePlayer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyInvitePlayer.prototype.toJSON = function() { + return CMsgPartyInvitePlayer.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyInvitePlayer + * @function getTypeUrl + * @memberof CMsgPartyInvitePlayer + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyInvitePlayer.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyInvitePlayer"; }; return CMsgPartyInvitePlayer; @@ -18815,28 +24615,41 @@ /** * Properties of a CMsgPartyRequestJoinPlayer. - * @exports ICMsgPartyRequestJoinPlayer - * @interface ICMsgPartyRequestJoinPlayer + * @typedef {Object} CMsgPartyRequestJoinPlayer.$Properties * @property {number|Long|null} [current_party_id] CMsgPartyRequestJoinPlayer current_party_id * @property {number|Long|null} [join_player_id] CMsgPartyRequestJoinPlayer join_player_id * @property {number|Long|null} [join_party_id] CMsgPartyRequestJoinPlayer join_party_id * @property {boolean|null} [expecting_invite] CMsgPartyRequestJoinPlayer expecting_invite + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPartyRequestJoinPlayer. + * @exports ICMsgPartyRequestJoinPlayer + * @interface ICMsgPartyRequestJoinPlayer + * @augments CMsgPartyRequestJoinPlayer.$Properties + * @deprecated Use CMsgPartyRequestJoinPlayer.$Properties instead. + */ + + /** + * Shape of a CMsgPartyRequestJoinPlayer. + * @typedef {CMsgPartyRequestJoinPlayer.$Properties} CMsgPartyRequestJoinPlayer.$Shape */ /** * Constructs a new CMsgPartyRequestJoinPlayer. * @exports CMsgPartyRequestJoinPlayer * @classdesc Represents a CMsgPartyRequestJoinPlayer. - * @implements ICMsgPartyRequestJoinPlayer * @constructor - * @param {ICMsgPartyRequestJoinPlayer=} [properties] Properties to set + * @param {CMsgPartyRequestJoinPlayer.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyRequestJoinPlayer(properties) { + var CMsgPartyRequestJoinPlayer = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartyRequestJoinPlayer current_party_id. @@ -18844,7 +24657,7 @@ * @memberof CMsgPartyRequestJoinPlayer * @instance */ - CMsgPartyRequestJoinPlayer.prototype.current_party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyRequestJoinPlayer.prototype.current_party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyRequestJoinPlayer join_player_id. @@ -18852,7 +24665,7 @@ * @memberof CMsgPartyRequestJoinPlayer * @instance */ - CMsgPartyRequestJoinPlayer.prototype.join_player_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyRequestJoinPlayer.prototype.join_player_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyRequestJoinPlayer join_party_id. @@ -18860,7 +24673,7 @@ * @memberof CMsgPartyRequestJoinPlayer * @instance */ - CMsgPartyRequestJoinPlayer.prototype.join_party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyRequestJoinPlayer.prototype.join_party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyRequestJoinPlayer expecting_invite. @@ -18875,10 +24688,14 @@ * @function create * @memberof CMsgPartyRequestJoinPlayer * @static - * @param {ICMsgPartyRequestJoinPlayer=} [properties] Properties to set + * @param {CMsgPartyRequestJoinPlayer.$Properties=} [properties] Properties to set * @returns {CMsgPartyRequestJoinPlayer} CMsgPartyRequestJoinPlayer instance + * @type {{ + * (properties: CMsgPartyRequestJoinPlayer.$Shape): CMsgPartyRequestJoinPlayer & CMsgPartyRequestJoinPlayer.$Shape; + * (properties?: CMsgPartyRequestJoinPlayer.$Properties): CMsgPartyRequestJoinPlayer; + * }} */ - CMsgPartyRequestJoinPlayer.create = function create(properties) { + CMsgPartyRequestJoinPlayer.create = function(properties) { return new CMsgPartyRequestJoinPlayer(properties); }; @@ -18887,21 +24704,28 @@ * @function encode * @memberof CMsgPartyRequestJoinPlayer * @static - * @param {ICMsgPartyRequestJoinPlayer} message CMsgPartyRequestJoinPlayer message or plain object to encode + * @param {CMsgPartyRequestJoinPlayer.$Properties} message CMsgPartyRequestJoinPlayer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyRequestJoinPlayer.encode = function encode(message, writer) { + CMsgPartyRequestJoinPlayer.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.current_party_id != null && Object.hasOwnProperty.call(message, "current_party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.current_party_id != null && $Object.hasOwnProperty.call(message, "current_party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.current_party_id); - if (message.join_player_id != null && Object.hasOwnProperty.call(message, "join_player_id")) + if (message.join_player_id != null && $Object.hasOwnProperty.call(message, "join_player_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.join_player_id); - if (message.join_party_id != null && Object.hasOwnProperty.call(message, "join_party_id")) + if (message.join_party_id != null && $Object.hasOwnProperty.call(message, "join_party_id")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.join_party_id); - if (message.expecting_invite != null && Object.hasOwnProperty.call(message, "expecting_invite")) + if (message.expecting_invite != null && $Object.hasOwnProperty.call(message, "expecting_invite")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.expecting_invite); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18910,12 +24734,12 @@ * @function encodeDelimited * @memberof CMsgPartyRequestJoinPlayer * @static - * @param {ICMsgPartyRequestJoinPlayer} message CMsgPartyRequestJoinPlayer message or plain object to encode + * @param {CMsgPartyRequestJoinPlayer.$Properties} message CMsgPartyRequestJoinPlayer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyRequestJoinPlayer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyRequestJoinPlayer.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18925,34 +24749,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyRequestJoinPlayer} CMsgPartyRequestJoinPlayer + * @returns {CMsgPartyRequestJoinPlayer & CMsgPartyRequestJoinPlayer.$Shape} CMsgPartyRequestJoinPlayer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyRequestJoinPlayer.decode = function decode(reader, length) { + CMsgPartyRequestJoinPlayer.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyRequestJoinPlayer(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyRequestJoinPlayer(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.current_party_id = reader.fixed64(); - break; - case 2: - message.join_player_id = reader.fixed64(); - break; - case 3: - message.join_party_id = reader.fixed64(); - break; - case 4: - message.expecting_invite = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.current_party_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.join_player_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.join_party_id = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.expecting_invite = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18962,11 +24812,11 @@ * @memberof CMsgPartyRequestJoinPlayer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyRequestJoinPlayer} CMsgPartyRequestJoinPlayer + * @returns {CMsgPartyRequestJoinPlayer & CMsgPartyRequestJoinPlayer.$Shape} CMsgPartyRequestJoinPlayer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyRequestJoinPlayer.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyRequestJoinPlayer.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18980,19 +24830,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyRequestJoinPlayer.verify = function verify(message) { + CMsgPartyRequestJoinPlayer.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.current_party_id != null && message.hasOwnProperty("current_party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.current_party_id != null && $Object.hasOwnProperty.call(message, "current_party_id")) if (!$util.isInteger(message.current_party_id) && !(message.current_party_id && $util.isInteger(message.current_party_id.low) && $util.isInteger(message.current_party_id.high))) return "current_party_id: integer|Long expected"; - if (message.join_player_id != null && message.hasOwnProperty("join_player_id")) + if (message.join_player_id != null && $Object.hasOwnProperty.call(message, "join_player_id")) if (!$util.isInteger(message.join_player_id) && !(message.join_player_id && $util.isInteger(message.join_player_id.low) && $util.isInteger(message.join_player_id.high))) return "join_player_id: integer|Long expected"; - if (message.join_party_id != null && message.hasOwnProperty("join_party_id")) + if (message.join_party_id != null && $Object.hasOwnProperty.call(message, "join_party_id")) if (!$util.isInteger(message.join_party_id) && !(message.join_party_id && $util.isInteger(message.join_party_id.low) && $util.isInteger(message.join_party_id.high))) return "join_party_id: integer|Long expected"; - if (message.expecting_invite != null && message.hasOwnProperty("expecting_invite")) + if (message.expecting_invite != null && $Object.hasOwnProperty.call(message, "expecting_invite")) if (typeof message.expecting_invite !== "boolean") return "expecting_invite: boolean expected"; return null; @@ -19006,39 +24860,45 @@ * @param {Object.} object Plain object * @returns {CMsgPartyRequestJoinPlayer} CMsgPartyRequestJoinPlayer */ - CMsgPartyRequestJoinPlayer.fromObject = function fromObject(object) { + CMsgPartyRequestJoinPlayer.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyRequestJoinPlayer) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyRequestJoinPlayer: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartyRequestJoinPlayer(); if (object.current_party_id != null) if ($util.Long) - (message.current_party_id = $util.Long.fromValue(object.current_party_id)).unsigned = false; + message.current_party_id = $util.Long.fromValue(object.current_party_id, true); else if (typeof object.current_party_id === "string") - message.current_party_id = parseInt(object.current_party_id, 10); + message.current_party_id = $parseInt(object.current_party_id, 10); else if (typeof object.current_party_id === "number") message.current_party_id = object.current_party_id; else if (typeof object.current_party_id === "object") - message.current_party_id = new $util.LongBits(object.current_party_id.low >>> 0, object.current_party_id.high >>> 0).toNumber(); + message.current_party_id = new $util.LongBits(object.current_party_id.low >>> 0, object.current_party_id.high >>> 0).toNumber(true); if (object.join_player_id != null) if ($util.Long) - (message.join_player_id = $util.Long.fromValue(object.join_player_id)).unsigned = false; + message.join_player_id = $util.Long.fromValue(object.join_player_id, true); else if (typeof object.join_player_id === "string") - message.join_player_id = parseInt(object.join_player_id, 10); + message.join_player_id = $parseInt(object.join_player_id, 10); else if (typeof object.join_player_id === "number") message.join_player_id = object.join_player_id; else if (typeof object.join_player_id === "object") - message.join_player_id = new $util.LongBits(object.join_player_id.low >>> 0, object.join_player_id.high >>> 0).toNumber(); + message.join_player_id = new $util.LongBits(object.join_player_id.low >>> 0, object.join_player_id.high >>> 0).toNumber(true); if (object.join_party_id != null) if ($util.Long) - (message.join_party_id = $util.Long.fromValue(object.join_party_id)).unsigned = false; + message.join_party_id = $util.Long.fromValue(object.join_party_id, true); else if (typeof object.join_party_id === "string") - message.join_party_id = parseInt(object.join_party_id, 10); + message.join_party_id = $parseInt(object.join_party_id, 10); else if (typeof object.join_party_id === "number") message.join_party_id = object.join_party_id; else if (typeof object.join_party_id === "object") - message.join_party_id = new $util.LongBits(object.join_party_id.low >>> 0, object.join_party_id.high >>> 0).toNumber(); + message.join_party_id = new $util.LongBits(object.join_party_id.low >>> 0, object.join_party_id.high >>> 0).toNumber(true); if (object.expecting_invite != null) - message.expecting_invite = Boolean(object.expecting_invite); + message.expecting_invite = $Boolean(object.expecting_invite); return message; }; @@ -19051,44 +24911,54 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyRequestJoinPlayer.toObject = function toObject(message, options) { + CMsgPartyRequestJoinPlayer.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.current_party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.current_party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.current_party_id = options.longs === String ? "0" : 0; + object.current_party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.join_player_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.join_player_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.join_player_id = options.longs === String ? "0" : 0; + object.join_player_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.join_party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.join_party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.join_party_id = options.longs === String ? "0" : 0; + object.join_party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.expecting_invite = false; } - if (message.current_party_id != null && message.hasOwnProperty("current_party_id")) - if (typeof message.current_party_id === "number") - object.current_party_id = options.longs === String ? String(message.current_party_id) : message.current_party_id; + if (message.current_party_id != null && $Object.hasOwnProperty.call(message, "current_party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.current_party_id = typeof message.current_party_id === "number" ? $BigInt(message.current_party_id) : $util.Long.fromBits(message.current_party_id.low >>> 0, message.current_party_id.high >>> 0, true).toBigInt(); + else if (typeof message.current_party_id === "number") + object.current_party_id = options.longs === $String ? $String(message.current_party_id) : message.current_party_id; else - object.current_party_id = options.longs === String ? $util.Long.prototype.toString.call(message.current_party_id) : options.longs === Number ? new $util.LongBits(message.current_party_id.low >>> 0, message.current_party_id.high >>> 0).toNumber() : message.current_party_id; - if (message.join_player_id != null && message.hasOwnProperty("join_player_id")) - if (typeof message.join_player_id === "number") - object.join_player_id = options.longs === String ? String(message.join_player_id) : message.join_player_id; + object.current_party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.current_party_id) : options.longs === $Number ? new $util.LongBits(message.current_party_id.low >>> 0, message.current_party_id.high >>> 0).toNumber(true) : message.current_party_id; + if (message.join_player_id != null && $Object.hasOwnProperty.call(message, "join_player_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.join_player_id = typeof message.join_player_id === "number" ? $BigInt(message.join_player_id) : $util.Long.fromBits(message.join_player_id.low >>> 0, message.join_player_id.high >>> 0, true).toBigInt(); + else if (typeof message.join_player_id === "number") + object.join_player_id = options.longs === $String ? $String(message.join_player_id) : message.join_player_id; else - object.join_player_id = options.longs === String ? $util.Long.prototype.toString.call(message.join_player_id) : options.longs === Number ? new $util.LongBits(message.join_player_id.low >>> 0, message.join_player_id.high >>> 0).toNumber() : message.join_player_id; - if (message.join_party_id != null && message.hasOwnProperty("join_party_id")) - if (typeof message.join_party_id === "number") - object.join_party_id = options.longs === String ? String(message.join_party_id) : message.join_party_id; + object.join_player_id = options.longs === $String ? $util.Long.prototype.toString.call(message.join_player_id) : options.longs === $Number ? new $util.LongBits(message.join_player_id.low >>> 0, message.join_player_id.high >>> 0).toNumber(true) : message.join_player_id; + if (message.join_party_id != null && $Object.hasOwnProperty.call(message, "join_party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.join_party_id = typeof message.join_party_id === "number" ? $BigInt(message.join_party_id) : $util.Long.fromBits(message.join_party_id.low >>> 0, message.join_party_id.high >>> 0, true).toBigInt(); + else if (typeof message.join_party_id === "number") + object.join_party_id = options.longs === $String ? $String(message.join_party_id) : message.join_party_id; else - object.join_party_id = options.longs === String ? $util.Long.prototype.toString.call(message.join_party_id) : options.longs === Number ? new $util.LongBits(message.join_party_id.low >>> 0, message.join_party_id.high >>> 0).toNumber() : message.join_party_id; - if (message.expecting_invite != null && message.hasOwnProperty("expecting_invite")) + object.join_party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.join_party_id) : options.longs === $Number ? new $util.LongBits(message.join_party_id.low >>> 0, message.join_party_id.high >>> 0).toNumber(true) : message.join_party_id; + if (message.expecting_invite != null && $Object.hasOwnProperty.call(message, "expecting_invite")) object.expecting_invite = message.expecting_invite; return object; }; @@ -19100,8 +24970,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyRequestJoinPlayer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyRequestJoinPlayer.prototype.toJSON = function() { + return CMsgPartyRequestJoinPlayer.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyRequestJoinPlayer + * @function getTypeUrl + * @memberof CMsgPartyRequestJoinPlayer + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyRequestJoinPlayer.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyRequestJoinPlayer"; }; return CMsgPartyRequestJoinPlayer; @@ -19111,26 +24995,39 @@ /** * Properties of a CMsgPartyClearPendingPlayer. - * @exports ICMsgPartyClearPendingPlayer - * @interface ICMsgPartyClearPendingPlayer + * @typedef {Object} CMsgPartyClearPendingPlayer.$Properties * @property {number|Long|null} [party_id] CMsgPartyClearPendingPlayer party_id * @property {number|Long|null} [pending_player_id] CMsgPartyClearPendingPlayer pending_player_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPartyClearPendingPlayer. + * @exports ICMsgPartyClearPendingPlayer + * @interface ICMsgPartyClearPendingPlayer + * @augments CMsgPartyClearPendingPlayer.$Properties + * @deprecated Use CMsgPartyClearPendingPlayer.$Properties instead. + */ + + /** + * Shape of a CMsgPartyClearPendingPlayer. + * @typedef {CMsgPartyClearPendingPlayer.$Properties} CMsgPartyClearPendingPlayer.$Shape */ /** * Constructs a new CMsgPartyClearPendingPlayer. * @exports CMsgPartyClearPendingPlayer * @classdesc Represents a CMsgPartyClearPendingPlayer. - * @implements ICMsgPartyClearPendingPlayer * @constructor - * @param {ICMsgPartyClearPendingPlayer=} [properties] Properties to set + * @param {CMsgPartyClearPendingPlayer.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyClearPendingPlayer(properties) { + var CMsgPartyClearPendingPlayer = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartyClearPendingPlayer party_id. @@ -19138,7 +25035,7 @@ * @memberof CMsgPartyClearPendingPlayer * @instance */ - CMsgPartyClearPendingPlayer.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyClearPendingPlayer.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyClearPendingPlayer pending_player_id. @@ -19146,17 +25043,21 @@ * @memberof CMsgPartyClearPendingPlayer * @instance */ - CMsgPartyClearPendingPlayer.prototype.pending_player_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyClearPendingPlayer.prototype.pending_player_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgPartyClearPendingPlayer instance using the specified properties. * @function create * @memberof CMsgPartyClearPendingPlayer * @static - * @param {ICMsgPartyClearPendingPlayer=} [properties] Properties to set + * @param {CMsgPartyClearPendingPlayer.$Properties=} [properties] Properties to set * @returns {CMsgPartyClearPendingPlayer} CMsgPartyClearPendingPlayer instance + * @type {{ + * (properties: CMsgPartyClearPendingPlayer.$Shape): CMsgPartyClearPendingPlayer & CMsgPartyClearPendingPlayer.$Shape; + * (properties?: CMsgPartyClearPendingPlayer.$Properties): CMsgPartyClearPendingPlayer; + * }} */ - CMsgPartyClearPendingPlayer.create = function create(properties) { + CMsgPartyClearPendingPlayer.create = function(properties) { return new CMsgPartyClearPendingPlayer(properties); }; @@ -19165,17 +25066,24 @@ * @function encode * @memberof CMsgPartyClearPendingPlayer * @static - * @param {ICMsgPartyClearPendingPlayer} message CMsgPartyClearPendingPlayer message or plain object to encode + * @param {CMsgPartyClearPendingPlayer.$Properties} message CMsgPartyClearPendingPlayer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyClearPendingPlayer.encode = function encode(message, writer) { + CMsgPartyClearPendingPlayer.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.party_id); - if (message.pending_player_id != null && Object.hasOwnProperty.call(message, "pending_player_id")) + if (message.pending_player_id != null && $Object.hasOwnProperty.call(message, "pending_player_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.pending_player_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19184,12 +25092,12 @@ * @function encodeDelimited * @memberof CMsgPartyClearPendingPlayer * @static - * @param {ICMsgPartyClearPendingPlayer} message CMsgPartyClearPendingPlayer message or plain object to encode + * @param {CMsgPartyClearPendingPlayer.$Properties} message CMsgPartyClearPendingPlayer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyClearPendingPlayer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyClearPendingPlayer.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19199,28 +25107,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyClearPendingPlayer} CMsgPartyClearPendingPlayer + * @returns {CMsgPartyClearPendingPlayer & CMsgPartyClearPendingPlayer.$Shape} CMsgPartyClearPendingPlayer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyClearPendingPlayer.decode = function decode(reader, length) { + CMsgPartyClearPendingPlayer.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyClearPendingPlayer(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyClearPendingPlayer(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.fixed64(); - break; - case 2: - message.pending_player_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.party_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.pending_player_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19230,11 +25158,11 @@ * @memberof CMsgPartyClearPendingPlayer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyClearPendingPlayer} CMsgPartyClearPendingPlayer + * @returns {CMsgPartyClearPendingPlayer & CMsgPartyClearPendingPlayer.$Shape} CMsgPartyClearPendingPlayer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyClearPendingPlayer.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyClearPendingPlayer.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19248,13 +25176,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyClearPendingPlayer.verify = function verify(message) { + CMsgPartyClearPendingPlayer.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; - if (message.pending_player_id != null && message.hasOwnProperty("pending_player_id")) + if (message.pending_player_id != null && $Object.hasOwnProperty.call(message, "pending_player_id")) if (!$util.isInteger(message.pending_player_id) && !(message.pending_player_id && $util.isInteger(message.pending_player_id.low) && $util.isInteger(message.pending_player_id.high))) return "pending_player_id: integer|Long expected"; return null; @@ -19268,28 +25200,34 @@ * @param {Object.} object Plain object * @returns {CMsgPartyClearPendingPlayer} CMsgPartyClearPendingPlayer */ - CMsgPartyClearPendingPlayer.fromObject = function fromObject(object) { + CMsgPartyClearPendingPlayer.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyClearPendingPlayer) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyClearPendingPlayer: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartyClearPendingPlayer(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = false; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") - message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(); + message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); if (object.pending_player_id != null) if ($util.Long) - (message.pending_player_id = $util.Long.fromValue(object.pending_player_id)).unsigned = false; + message.pending_player_id = $util.Long.fromValue(object.pending_player_id, true); else if (typeof object.pending_player_id === "string") - message.pending_player_id = parseInt(object.pending_player_id, 10); + message.pending_player_id = $parseInt(object.pending_player_id, 10); else if (typeof object.pending_player_id === "number") message.pending_player_id = object.pending_player_id; else if (typeof object.pending_player_id === "object") - message.pending_player_id = new $util.LongBits(object.pending_player_id.low >>> 0, object.pending_player_id.high >>> 0).toNumber(); + message.pending_player_id = new $util.LongBits(object.pending_player_id.low >>> 0, object.pending_player_id.high >>> 0).toNumber(true); return message; }; @@ -19302,32 +25240,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyClearPendingPlayer.toObject = function toObject(message, options) { + CMsgPartyClearPendingPlayer.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.pending_player_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.pending_player_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.pending_player_id = options.longs === String ? "0" : 0; + object.pending_player_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber() : message.party_id; - if (message.pending_player_id != null && message.hasOwnProperty("pending_player_id")) - if (typeof message.pending_player_id === "number") - object.pending_player_id = options.longs === String ? String(message.pending_player_id) : message.pending_player_id; + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; + if (message.pending_player_id != null && $Object.hasOwnProperty.call(message, "pending_player_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.pending_player_id = typeof message.pending_player_id === "number" ? $BigInt(message.pending_player_id) : $util.Long.fromBits(message.pending_player_id.low >>> 0, message.pending_player_id.high >>> 0, true).toBigInt(); + else if (typeof message.pending_player_id === "number") + object.pending_player_id = options.longs === $String ? $String(message.pending_player_id) : message.pending_player_id; else - object.pending_player_id = options.longs === String ? $util.Long.prototype.toString.call(message.pending_player_id) : options.longs === Number ? new $util.LongBits(message.pending_player_id.low >>> 0, message.pending_player_id.high >>> 0).toNumber() : message.pending_player_id; + object.pending_player_id = options.longs === $String ? $util.Long.prototype.toString.call(message.pending_player_id) : options.longs === $Number ? new $util.LongBits(message.pending_player_id.low >>> 0, message.pending_player_id.high >>> 0).toNumber(true) : message.pending_player_id; return object; }; @@ -19338,8 +25284,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyClearPendingPlayer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyClearPendingPlayer.prototype.toJSON = function() { + return CMsgPartyClearPendingPlayer.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyClearPendingPlayer + * @function getTypeUrl + * @memberof CMsgPartyClearPendingPlayer + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyClearPendingPlayer.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyClearPendingPlayer"; }; return CMsgPartyClearPendingPlayer; @@ -19347,36 +25307,53 @@ $root.CMsgPartyClearPendingPlayerResponse = (function() { + /** + * Properties of a CMsgPartyClearPendingPlayerResponse. + * @typedef {Object} CMsgPartyClearPendingPlayerResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPartyClearPendingPlayerResponse. * @exports ICMsgPartyClearPendingPlayerResponse * @interface ICMsgPartyClearPendingPlayerResponse + * @augments CMsgPartyClearPendingPlayerResponse.$Properties + * @deprecated Use CMsgPartyClearPendingPlayerResponse.$Properties instead. + */ + + /** + * Shape of a CMsgPartyClearPendingPlayerResponse. + * @typedef {CMsgPartyClearPendingPlayerResponse.$Properties} CMsgPartyClearPendingPlayerResponse.$Shape */ /** * Constructs a new CMsgPartyClearPendingPlayerResponse. * @exports CMsgPartyClearPendingPlayerResponse * @classdesc Represents a CMsgPartyClearPendingPlayerResponse. - * @implements ICMsgPartyClearPendingPlayerResponse * @constructor - * @param {ICMsgPartyClearPendingPlayerResponse=} [properties] Properties to set + * @param {CMsgPartyClearPendingPlayerResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyClearPendingPlayerResponse(properties) { + var CMsgPartyClearPendingPlayerResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgPartyClearPendingPlayerResponse instance using the specified properties. * @function create * @memberof CMsgPartyClearPendingPlayerResponse * @static - * @param {ICMsgPartyClearPendingPlayerResponse=} [properties] Properties to set + * @param {CMsgPartyClearPendingPlayerResponse.$Properties=} [properties] Properties to set * @returns {CMsgPartyClearPendingPlayerResponse} CMsgPartyClearPendingPlayerResponse instance + * @type {{ + * (properties: CMsgPartyClearPendingPlayerResponse.$Shape): CMsgPartyClearPendingPlayerResponse & CMsgPartyClearPendingPlayerResponse.$Shape; + * (properties?: CMsgPartyClearPendingPlayerResponse.$Properties): CMsgPartyClearPendingPlayerResponse; + * }} */ - CMsgPartyClearPendingPlayerResponse.create = function create(properties) { + CMsgPartyClearPendingPlayerResponse.create = function(properties) { return new CMsgPartyClearPendingPlayerResponse(properties); }; @@ -19385,13 +25362,20 @@ * @function encode * @memberof CMsgPartyClearPendingPlayerResponse * @static - * @param {ICMsgPartyClearPendingPlayerResponse} message CMsgPartyClearPendingPlayerResponse message or plain object to encode + * @param {CMsgPartyClearPendingPlayerResponse.$Properties} message CMsgPartyClearPendingPlayerResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyClearPendingPlayerResponse.encode = function encode(message, writer) { + CMsgPartyClearPendingPlayerResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19400,12 +25384,12 @@ * @function encodeDelimited * @memberof CMsgPartyClearPendingPlayerResponse * @static - * @param {ICMsgPartyClearPendingPlayerResponse} message CMsgPartyClearPendingPlayerResponse message or plain object to encode + * @param {CMsgPartyClearPendingPlayerResponse.$Properties} message CMsgPartyClearPendingPlayerResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyClearPendingPlayerResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyClearPendingPlayerResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19415,22 +25399,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyClearPendingPlayerResponse} CMsgPartyClearPendingPlayerResponse + * @returns {CMsgPartyClearPendingPlayerResponse & CMsgPartyClearPendingPlayerResponse.$Shape} CMsgPartyClearPendingPlayerResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyClearPendingPlayerResponse.decode = function decode(reader, length) { + CMsgPartyClearPendingPlayerResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyClearPendingPlayerResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyClearPendingPlayerResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19440,11 +25435,11 @@ * @memberof CMsgPartyClearPendingPlayerResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyClearPendingPlayerResponse} CMsgPartyClearPendingPlayerResponse + * @returns {CMsgPartyClearPendingPlayerResponse & CMsgPartyClearPendingPlayerResponse.$Shape} CMsgPartyClearPendingPlayerResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyClearPendingPlayerResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyClearPendingPlayerResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19458,9 +25453,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyClearPendingPlayerResponse.verify = function verify(message) { + CMsgPartyClearPendingPlayerResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -19472,9 +25471,15 @@ * @param {Object.} object Plain object * @returns {CMsgPartyClearPendingPlayerResponse} CMsgPartyClearPendingPlayerResponse */ - CMsgPartyClearPendingPlayerResponse.fromObject = function fromObject(object) { + CMsgPartyClearPendingPlayerResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyClearPendingPlayerResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyClearPendingPlayerResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgPartyClearPendingPlayerResponse(); }; @@ -19487,7 +25492,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyClearPendingPlayerResponse.toObject = function toObject() { + CMsgPartyClearPendingPlayerResponse.toObject = function () { return {}; }; @@ -19498,8 +25503,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyClearPendingPlayerResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyClearPendingPlayerResponse.prototype.toJSON = function() { + return CMsgPartyClearPendingPlayerResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyClearPendingPlayerResponse + * @function getTypeUrl + * @memberof CMsgPartyClearPendingPlayerResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyClearPendingPlayerResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyClearPendingPlayerResponse"; }; return CMsgPartyClearPendingPlayerResponse; @@ -19507,27 +25526,40 @@ $root.CMsgPartyClearOtherPartyRequest = (function() { + /** + * Properties of a CMsgPartyClearOtherPartyRequest. + * @typedef {Object} CMsgPartyClearOtherPartyRequest.$Properties + * @property {number|Long|null} [other_party_id] CMsgPartyClearOtherPartyRequest other_party_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPartyClearOtherPartyRequest. * @exports ICMsgPartyClearOtherPartyRequest * @interface ICMsgPartyClearOtherPartyRequest - * @property {number|Long|null} [other_party_id] CMsgPartyClearOtherPartyRequest other_party_id + * @augments CMsgPartyClearOtherPartyRequest.$Properties + * @deprecated Use CMsgPartyClearOtherPartyRequest.$Properties instead. + */ + + /** + * Shape of a CMsgPartyClearOtherPartyRequest. + * @typedef {CMsgPartyClearOtherPartyRequest.$Properties} CMsgPartyClearOtherPartyRequest.$Shape */ /** * Constructs a new CMsgPartyClearOtherPartyRequest. * @exports CMsgPartyClearOtherPartyRequest * @classdesc Represents a CMsgPartyClearOtherPartyRequest. - * @implements ICMsgPartyClearOtherPartyRequest * @constructor - * @param {ICMsgPartyClearOtherPartyRequest=} [properties] Properties to set + * @param {CMsgPartyClearOtherPartyRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyClearOtherPartyRequest(properties) { + var CMsgPartyClearOtherPartyRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartyClearOtherPartyRequest other_party_id. @@ -19535,17 +25567,21 @@ * @memberof CMsgPartyClearOtherPartyRequest * @instance */ - CMsgPartyClearOtherPartyRequest.prototype.other_party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyClearOtherPartyRequest.prototype.other_party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgPartyClearOtherPartyRequest instance using the specified properties. * @function create * @memberof CMsgPartyClearOtherPartyRequest * @static - * @param {ICMsgPartyClearOtherPartyRequest=} [properties] Properties to set + * @param {CMsgPartyClearOtherPartyRequest.$Properties=} [properties] Properties to set * @returns {CMsgPartyClearOtherPartyRequest} CMsgPartyClearOtherPartyRequest instance + * @type {{ + * (properties: CMsgPartyClearOtherPartyRequest.$Shape): CMsgPartyClearOtherPartyRequest & CMsgPartyClearOtherPartyRequest.$Shape; + * (properties?: CMsgPartyClearOtherPartyRequest.$Properties): CMsgPartyClearOtherPartyRequest; + * }} */ - CMsgPartyClearOtherPartyRequest.create = function create(properties) { + CMsgPartyClearOtherPartyRequest.create = function(properties) { return new CMsgPartyClearOtherPartyRequest(properties); }; @@ -19554,15 +25590,22 @@ * @function encode * @memberof CMsgPartyClearOtherPartyRequest * @static - * @param {ICMsgPartyClearOtherPartyRequest} message CMsgPartyClearOtherPartyRequest message or plain object to encode + * @param {CMsgPartyClearOtherPartyRequest.$Properties} message CMsgPartyClearOtherPartyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyClearOtherPartyRequest.encode = function encode(message, writer) { + CMsgPartyClearOtherPartyRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.other_party_id != null && Object.hasOwnProperty.call(message, "other_party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.other_party_id != null && $Object.hasOwnProperty.call(message, "other_party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.other_party_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19571,12 +25614,12 @@ * @function encodeDelimited * @memberof CMsgPartyClearOtherPartyRequest * @static - * @param {ICMsgPartyClearOtherPartyRequest} message CMsgPartyClearOtherPartyRequest message or plain object to encode + * @param {CMsgPartyClearOtherPartyRequest.$Properties} message CMsgPartyClearOtherPartyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyClearOtherPartyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyClearOtherPartyRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19586,25 +25629,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyClearOtherPartyRequest} CMsgPartyClearOtherPartyRequest + * @returns {CMsgPartyClearOtherPartyRequest & CMsgPartyClearOtherPartyRequest.$Shape} CMsgPartyClearOtherPartyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyClearOtherPartyRequest.decode = function decode(reader, length) { + CMsgPartyClearOtherPartyRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyClearOtherPartyRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyClearOtherPartyRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.other_party_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.other_party_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19614,11 +25674,11 @@ * @memberof CMsgPartyClearOtherPartyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyClearOtherPartyRequest} CMsgPartyClearOtherPartyRequest + * @returns {CMsgPartyClearOtherPartyRequest & CMsgPartyClearOtherPartyRequest.$Shape} CMsgPartyClearOtherPartyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyClearOtherPartyRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyClearOtherPartyRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19632,10 +25692,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyClearOtherPartyRequest.verify = function verify(message) { + CMsgPartyClearOtherPartyRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.other_party_id != null && message.hasOwnProperty("other_party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.other_party_id != null && $Object.hasOwnProperty.call(message, "other_party_id")) if (!$util.isInteger(message.other_party_id) && !(message.other_party_id && $util.isInteger(message.other_party_id.low) && $util.isInteger(message.other_party_id.high))) return "other_party_id: integer|Long expected"; return null; @@ -19649,19 +25713,25 @@ * @param {Object.} object Plain object * @returns {CMsgPartyClearOtherPartyRequest} CMsgPartyClearOtherPartyRequest */ - CMsgPartyClearOtherPartyRequest.fromObject = function fromObject(object) { + CMsgPartyClearOtherPartyRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyClearOtherPartyRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyClearOtherPartyRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartyClearOtherPartyRequest(); if (object.other_party_id != null) if ($util.Long) - (message.other_party_id = $util.Long.fromValue(object.other_party_id)).unsigned = false; + message.other_party_id = $util.Long.fromValue(object.other_party_id, true); else if (typeof object.other_party_id === "string") - message.other_party_id = parseInt(object.other_party_id, 10); + message.other_party_id = $parseInt(object.other_party_id, 10); else if (typeof object.other_party_id === "number") message.other_party_id = object.other_party_id; else if (typeof object.other_party_id === "object") - message.other_party_id = new $util.LongBits(object.other_party_id.low >>> 0, object.other_party_id.high >>> 0).toNumber(); + message.other_party_id = new $util.LongBits(object.other_party_id.low >>> 0, object.other_party_id.high >>> 0).toNumber(true); return message; }; @@ -19674,21 +25744,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyClearOtherPartyRequest.toObject = function toObject(message, options) { + CMsgPartyClearOtherPartyRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.other_party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.other_party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.other_party_id = options.longs === String ? "0" : 0; - if (message.other_party_id != null && message.hasOwnProperty("other_party_id")) - if (typeof message.other_party_id === "number") - object.other_party_id = options.longs === String ? String(message.other_party_id) : message.other_party_id; + object.other_party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.other_party_id != null && $Object.hasOwnProperty.call(message, "other_party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.other_party_id = typeof message.other_party_id === "number" ? $BigInt(message.other_party_id) : $util.Long.fromBits(message.other_party_id.low >>> 0, message.other_party_id.high >>> 0, true).toBigInt(); + else if (typeof message.other_party_id === "number") + object.other_party_id = options.longs === $String ? $String(message.other_party_id) : message.other_party_id; else - object.other_party_id = options.longs === String ? $util.Long.prototype.toString.call(message.other_party_id) : options.longs === Number ? new $util.LongBits(message.other_party_id.low >>> 0, message.other_party_id.high >>> 0).toNumber() : message.other_party_id; + object.other_party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.other_party_id) : options.longs === $Number ? new $util.LongBits(message.other_party_id.low >>> 0, message.other_party_id.high >>> 0).toNumber(true) : message.other_party_id; return object; }; @@ -19699,8 +25775,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyClearOtherPartyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyClearOtherPartyRequest.prototype.toJSON = function() { + return CMsgPartyClearOtherPartyRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyClearOtherPartyRequest + * @function getTypeUrl + * @memberof CMsgPartyClearOtherPartyRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyClearOtherPartyRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyClearOtherPartyRequest"; }; return CMsgPartyClearOtherPartyRequest; @@ -19708,36 +25798,53 @@ $root.CMsgPartyClearOtherPartyRequestResponse = (function() { + /** + * Properties of a CMsgPartyClearOtherPartyRequestResponse. + * @typedef {Object} CMsgPartyClearOtherPartyRequestResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPartyClearOtherPartyRequestResponse. * @exports ICMsgPartyClearOtherPartyRequestResponse * @interface ICMsgPartyClearOtherPartyRequestResponse + * @augments CMsgPartyClearOtherPartyRequestResponse.$Properties + * @deprecated Use CMsgPartyClearOtherPartyRequestResponse.$Properties instead. + */ + + /** + * Shape of a CMsgPartyClearOtherPartyRequestResponse. + * @typedef {CMsgPartyClearOtherPartyRequestResponse.$Properties} CMsgPartyClearOtherPartyRequestResponse.$Shape */ /** * Constructs a new CMsgPartyClearOtherPartyRequestResponse. * @exports CMsgPartyClearOtherPartyRequestResponse * @classdesc Represents a CMsgPartyClearOtherPartyRequestResponse. - * @implements ICMsgPartyClearOtherPartyRequestResponse * @constructor - * @param {ICMsgPartyClearOtherPartyRequestResponse=} [properties] Properties to set + * @param {CMsgPartyClearOtherPartyRequestResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyClearOtherPartyRequestResponse(properties) { + var CMsgPartyClearOtherPartyRequestResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgPartyClearOtherPartyRequestResponse instance using the specified properties. * @function create * @memberof CMsgPartyClearOtherPartyRequestResponse * @static - * @param {ICMsgPartyClearOtherPartyRequestResponse=} [properties] Properties to set + * @param {CMsgPartyClearOtherPartyRequestResponse.$Properties=} [properties] Properties to set * @returns {CMsgPartyClearOtherPartyRequestResponse} CMsgPartyClearOtherPartyRequestResponse instance + * @type {{ + * (properties: CMsgPartyClearOtherPartyRequestResponse.$Shape): CMsgPartyClearOtherPartyRequestResponse & CMsgPartyClearOtherPartyRequestResponse.$Shape; + * (properties?: CMsgPartyClearOtherPartyRequestResponse.$Properties): CMsgPartyClearOtherPartyRequestResponse; + * }} */ - CMsgPartyClearOtherPartyRequestResponse.create = function create(properties) { + CMsgPartyClearOtherPartyRequestResponse.create = function(properties) { return new CMsgPartyClearOtherPartyRequestResponse(properties); }; @@ -19746,13 +25853,20 @@ * @function encode * @memberof CMsgPartyClearOtherPartyRequestResponse * @static - * @param {ICMsgPartyClearOtherPartyRequestResponse} message CMsgPartyClearOtherPartyRequestResponse message or plain object to encode + * @param {CMsgPartyClearOtherPartyRequestResponse.$Properties} message CMsgPartyClearOtherPartyRequestResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyClearOtherPartyRequestResponse.encode = function encode(message, writer) { + CMsgPartyClearOtherPartyRequestResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19761,12 +25875,12 @@ * @function encodeDelimited * @memberof CMsgPartyClearOtherPartyRequestResponse * @static - * @param {ICMsgPartyClearOtherPartyRequestResponse} message CMsgPartyClearOtherPartyRequestResponse message or plain object to encode + * @param {CMsgPartyClearOtherPartyRequestResponse.$Properties} message CMsgPartyClearOtherPartyRequestResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyClearOtherPartyRequestResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyClearOtherPartyRequestResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19776,22 +25890,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyClearOtherPartyRequestResponse} CMsgPartyClearOtherPartyRequestResponse + * @returns {CMsgPartyClearOtherPartyRequestResponse & CMsgPartyClearOtherPartyRequestResponse.$Shape} CMsgPartyClearOtherPartyRequestResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyClearOtherPartyRequestResponse.decode = function decode(reader, length) { + CMsgPartyClearOtherPartyRequestResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyClearOtherPartyRequestResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyClearOtherPartyRequestResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19801,11 +25926,11 @@ * @memberof CMsgPartyClearOtherPartyRequestResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyClearOtherPartyRequestResponse} CMsgPartyClearOtherPartyRequestResponse + * @returns {CMsgPartyClearOtherPartyRequestResponse & CMsgPartyClearOtherPartyRequestResponse.$Shape} CMsgPartyClearOtherPartyRequestResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyClearOtherPartyRequestResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyClearOtherPartyRequestResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19819,9 +25944,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyClearOtherPartyRequestResponse.verify = function verify(message) { + CMsgPartyClearOtherPartyRequestResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -19833,9 +25962,15 @@ * @param {Object.} object Plain object * @returns {CMsgPartyClearOtherPartyRequestResponse} CMsgPartyClearOtherPartyRequestResponse */ - CMsgPartyClearOtherPartyRequestResponse.fromObject = function fromObject(object) { + CMsgPartyClearOtherPartyRequestResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyClearOtherPartyRequestResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyClearOtherPartyRequestResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgPartyClearOtherPartyRequestResponse(); }; @@ -19848,7 +25983,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyClearOtherPartyRequestResponse.toObject = function toObject() { + CMsgPartyClearOtherPartyRequestResponse.toObject = function () { return {}; }; @@ -19859,8 +25994,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyClearOtherPartyRequestResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyClearOtherPartyRequestResponse.prototype.toJSON = function() { + return CMsgPartyClearOtherPartyRequestResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyClearOtherPartyRequestResponse + * @function getTypeUrl + * @memberof CMsgPartyClearOtherPartyRequestResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyClearOtherPartyRequestResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyClearOtherPartyRequestResponse"; }; return CMsgPartyClearOtherPartyRequestResponse; @@ -19870,26 +26019,39 @@ /** * Properties of a CMsgPartyPromoteToLeader. - * @exports ICMsgPartyPromoteToLeader - * @interface ICMsgPartyPromoteToLeader + * @typedef {Object} CMsgPartyPromoteToLeader.$Properties * @property {number|Long|null} [party_id] CMsgPartyPromoteToLeader party_id * @property {number|Long|null} [new_leader_id] CMsgPartyPromoteToLeader new_leader_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPartyPromoteToLeader. + * @exports ICMsgPartyPromoteToLeader + * @interface ICMsgPartyPromoteToLeader + * @augments CMsgPartyPromoteToLeader.$Properties + * @deprecated Use CMsgPartyPromoteToLeader.$Properties instead. + */ + + /** + * Shape of a CMsgPartyPromoteToLeader. + * @typedef {CMsgPartyPromoteToLeader.$Properties} CMsgPartyPromoteToLeader.$Shape */ /** * Constructs a new CMsgPartyPromoteToLeader. * @exports CMsgPartyPromoteToLeader * @classdesc Represents a CMsgPartyPromoteToLeader. - * @implements ICMsgPartyPromoteToLeader * @constructor - * @param {ICMsgPartyPromoteToLeader=} [properties] Properties to set + * @param {CMsgPartyPromoteToLeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyPromoteToLeader(properties) { + var CMsgPartyPromoteToLeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartyPromoteToLeader party_id. @@ -19897,7 +26059,7 @@ * @memberof CMsgPartyPromoteToLeader * @instance */ - CMsgPartyPromoteToLeader.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyPromoteToLeader.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyPromoteToLeader new_leader_id. @@ -19905,17 +26067,21 @@ * @memberof CMsgPartyPromoteToLeader * @instance */ - CMsgPartyPromoteToLeader.prototype.new_leader_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyPromoteToLeader.prototype.new_leader_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgPartyPromoteToLeader instance using the specified properties. * @function create * @memberof CMsgPartyPromoteToLeader * @static - * @param {ICMsgPartyPromoteToLeader=} [properties] Properties to set + * @param {CMsgPartyPromoteToLeader.$Properties=} [properties] Properties to set * @returns {CMsgPartyPromoteToLeader} CMsgPartyPromoteToLeader instance + * @type {{ + * (properties: CMsgPartyPromoteToLeader.$Shape): CMsgPartyPromoteToLeader & CMsgPartyPromoteToLeader.$Shape; + * (properties?: CMsgPartyPromoteToLeader.$Properties): CMsgPartyPromoteToLeader; + * }} */ - CMsgPartyPromoteToLeader.create = function create(properties) { + CMsgPartyPromoteToLeader.create = function(properties) { return new CMsgPartyPromoteToLeader(properties); }; @@ -19924,17 +26090,24 @@ * @function encode * @memberof CMsgPartyPromoteToLeader * @static - * @param {ICMsgPartyPromoteToLeader} message CMsgPartyPromoteToLeader message or plain object to encode + * @param {CMsgPartyPromoteToLeader.$Properties} message CMsgPartyPromoteToLeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyPromoteToLeader.encode = function encode(message, writer) { + CMsgPartyPromoteToLeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.party_id); - if (message.new_leader_id != null && Object.hasOwnProperty.call(message, "new_leader_id")) + if (message.new_leader_id != null && $Object.hasOwnProperty.call(message, "new_leader_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.new_leader_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19943,12 +26116,12 @@ * @function encodeDelimited * @memberof CMsgPartyPromoteToLeader * @static - * @param {ICMsgPartyPromoteToLeader} message CMsgPartyPromoteToLeader message or plain object to encode + * @param {CMsgPartyPromoteToLeader.$Properties} message CMsgPartyPromoteToLeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyPromoteToLeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyPromoteToLeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19958,28 +26131,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyPromoteToLeader} CMsgPartyPromoteToLeader + * @returns {CMsgPartyPromoteToLeader & CMsgPartyPromoteToLeader.$Shape} CMsgPartyPromoteToLeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyPromoteToLeader.decode = function decode(reader, length) { + CMsgPartyPromoteToLeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyPromoteToLeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyPromoteToLeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.fixed64(); - break; - case 2: - message.new_leader_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.party_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.new_leader_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19989,11 +26182,11 @@ * @memberof CMsgPartyPromoteToLeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyPromoteToLeader} CMsgPartyPromoteToLeader + * @returns {CMsgPartyPromoteToLeader & CMsgPartyPromoteToLeader.$Shape} CMsgPartyPromoteToLeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyPromoteToLeader.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyPromoteToLeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20007,13 +26200,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyPromoteToLeader.verify = function verify(message) { + CMsgPartyPromoteToLeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; - if (message.new_leader_id != null && message.hasOwnProperty("new_leader_id")) + if (message.new_leader_id != null && $Object.hasOwnProperty.call(message, "new_leader_id")) if (!$util.isInteger(message.new_leader_id) && !(message.new_leader_id && $util.isInteger(message.new_leader_id.low) && $util.isInteger(message.new_leader_id.high))) return "new_leader_id: integer|Long expected"; return null; @@ -20027,28 +26224,34 @@ * @param {Object.} object Plain object * @returns {CMsgPartyPromoteToLeader} CMsgPartyPromoteToLeader */ - CMsgPartyPromoteToLeader.fromObject = function fromObject(object) { + CMsgPartyPromoteToLeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyPromoteToLeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyPromoteToLeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartyPromoteToLeader(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = false; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") - message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(); + message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); if (object.new_leader_id != null) if ($util.Long) - (message.new_leader_id = $util.Long.fromValue(object.new_leader_id)).unsigned = false; + message.new_leader_id = $util.Long.fromValue(object.new_leader_id, true); else if (typeof object.new_leader_id === "string") - message.new_leader_id = parseInt(object.new_leader_id, 10); + message.new_leader_id = $parseInt(object.new_leader_id, 10); else if (typeof object.new_leader_id === "number") message.new_leader_id = object.new_leader_id; else if (typeof object.new_leader_id === "object") - message.new_leader_id = new $util.LongBits(object.new_leader_id.low >>> 0, object.new_leader_id.high >>> 0).toNumber(); + message.new_leader_id = new $util.LongBits(object.new_leader_id.low >>> 0, object.new_leader_id.high >>> 0).toNumber(true); return message; }; @@ -20061,32 +26264,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyPromoteToLeader.toObject = function toObject(message, options) { + CMsgPartyPromoteToLeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.new_leader_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.new_leader_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.new_leader_id = options.longs === String ? "0" : 0; + object.new_leader_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber() : message.party_id; - if (message.new_leader_id != null && message.hasOwnProperty("new_leader_id")) - if (typeof message.new_leader_id === "number") - object.new_leader_id = options.longs === String ? String(message.new_leader_id) : message.new_leader_id; + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; + if (message.new_leader_id != null && $Object.hasOwnProperty.call(message, "new_leader_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.new_leader_id = typeof message.new_leader_id === "number" ? $BigInt(message.new_leader_id) : $util.Long.fromBits(message.new_leader_id.low >>> 0, message.new_leader_id.high >>> 0, true).toBigInt(); + else if (typeof message.new_leader_id === "number") + object.new_leader_id = options.longs === $String ? $String(message.new_leader_id) : message.new_leader_id; else - object.new_leader_id = options.longs === String ? $util.Long.prototype.toString.call(message.new_leader_id) : options.longs === Number ? new $util.LongBits(message.new_leader_id.low >>> 0, message.new_leader_id.high >>> 0).toNumber() : message.new_leader_id; + object.new_leader_id = options.longs === $String ? $util.Long.prototype.toString.call(message.new_leader_id) : options.longs === $Number ? new $util.LongBits(message.new_leader_id.low >>> 0, message.new_leader_id.high >>> 0).toNumber(true) : message.new_leader_id; return object; }; @@ -20097,8 +26308,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyPromoteToLeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyPromoteToLeader.prototype.toJSON = function() { + return CMsgPartyPromoteToLeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyPromoteToLeader + * @function getTypeUrl + * @memberof CMsgPartyPromoteToLeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyPromoteToLeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyPromoteToLeader"; }; return CMsgPartyPromoteToLeader; @@ -20108,26 +26333,39 @@ /** * Properties of a CMsgPartyKickMember. - * @exports ICMsgPartyKickMember - * @interface ICMsgPartyKickMember + * @typedef {Object} CMsgPartyKickMember.$Properties * @property {number|Long|null} [party_id] CMsgPartyKickMember party_id * @property {number|Long|null} [target_id] CMsgPartyKickMember target_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPartyKickMember. + * @exports ICMsgPartyKickMember + * @interface ICMsgPartyKickMember + * @augments CMsgPartyKickMember.$Properties + * @deprecated Use CMsgPartyKickMember.$Properties instead. + */ + + /** + * Shape of a CMsgPartyKickMember. + * @typedef {CMsgPartyKickMember.$Properties} CMsgPartyKickMember.$Shape */ /** * Constructs a new CMsgPartyKickMember. * @exports CMsgPartyKickMember * @classdesc Represents a CMsgPartyKickMember. - * @implements ICMsgPartyKickMember * @constructor - * @param {ICMsgPartyKickMember=} [properties] Properties to set + * @param {CMsgPartyKickMember.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyKickMember(properties) { + var CMsgPartyKickMember = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartyKickMember party_id. @@ -20135,7 +26373,7 @@ * @memberof CMsgPartyKickMember * @instance */ - CMsgPartyKickMember.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyKickMember.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyKickMember target_id. @@ -20143,17 +26381,21 @@ * @memberof CMsgPartyKickMember * @instance */ - CMsgPartyKickMember.prototype.target_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyKickMember.prototype.target_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgPartyKickMember instance using the specified properties. * @function create * @memberof CMsgPartyKickMember * @static - * @param {ICMsgPartyKickMember=} [properties] Properties to set + * @param {CMsgPartyKickMember.$Properties=} [properties] Properties to set * @returns {CMsgPartyKickMember} CMsgPartyKickMember instance + * @type {{ + * (properties: CMsgPartyKickMember.$Shape): CMsgPartyKickMember & CMsgPartyKickMember.$Shape; + * (properties?: CMsgPartyKickMember.$Properties): CMsgPartyKickMember; + * }} */ - CMsgPartyKickMember.create = function create(properties) { + CMsgPartyKickMember.create = function(properties) { return new CMsgPartyKickMember(properties); }; @@ -20162,17 +26404,24 @@ * @function encode * @memberof CMsgPartyKickMember * @static - * @param {ICMsgPartyKickMember} message CMsgPartyKickMember message or plain object to encode + * @param {CMsgPartyKickMember.$Properties} message CMsgPartyKickMember message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyKickMember.encode = function encode(message, writer) { + CMsgPartyKickMember.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.party_id); - if (message.target_id != null && Object.hasOwnProperty.call(message, "target_id")) + if (message.target_id != null && $Object.hasOwnProperty.call(message, "target_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.target_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20181,12 +26430,12 @@ * @function encodeDelimited * @memberof CMsgPartyKickMember * @static - * @param {ICMsgPartyKickMember} message CMsgPartyKickMember message or plain object to encode + * @param {CMsgPartyKickMember.$Properties} message CMsgPartyKickMember message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyKickMember.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyKickMember.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20196,28 +26445,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyKickMember} CMsgPartyKickMember + * @returns {CMsgPartyKickMember & CMsgPartyKickMember.$Shape} CMsgPartyKickMember * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyKickMember.decode = function decode(reader, length) { + CMsgPartyKickMember.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyKickMember(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyKickMember(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.fixed64(); - break; - case 2: - message.target_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.party_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.target_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20227,11 +26496,11 @@ * @memberof CMsgPartyKickMember * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyKickMember} CMsgPartyKickMember + * @returns {CMsgPartyKickMember & CMsgPartyKickMember.$Shape} CMsgPartyKickMember * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyKickMember.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyKickMember.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20245,13 +26514,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyKickMember.verify = function verify(message) { + CMsgPartyKickMember.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; - if (message.target_id != null && message.hasOwnProperty("target_id")) + if (message.target_id != null && $Object.hasOwnProperty.call(message, "target_id")) if (!$util.isInteger(message.target_id) && !(message.target_id && $util.isInteger(message.target_id.low) && $util.isInteger(message.target_id.high))) return "target_id: integer|Long expected"; return null; @@ -20265,28 +26538,34 @@ * @param {Object.} object Plain object * @returns {CMsgPartyKickMember} CMsgPartyKickMember */ - CMsgPartyKickMember.fromObject = function fromObject(object) { + CMsgPartyKickMember.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyKickMember) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyKickMember: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartyKickMember(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = false; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") - message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(); + message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); if (object.target_id != null) if ($util.Long) - (message.target_id = $util.Long.fromValue(object.target_id)).unsigned = false; + message.target_id = $util.Long.fromValue(object.target_id, true); else if (typeof object.target_id === "string") - message.target_id = parseInt(object.target_id, 10); + message.target_id = $parseInt(object.target_id, 10); else if (typeof object.target_id === "number") message.target_id = object.target_id; else if (typeof object.target_id === "object") - message.target_id = new $util.LongBits(object.target_id.low >>> 0, object.target_id.high >>> 0).toNumber(); + message.target_id = new $util.LongBits(object.target_id.low >>> 0, object.target_id.high >>> 0).toNumber(true); return message; }; @@ -20299,32 +26578,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyKickMember.toObject = function toObject(message, options) { + CMsgPartyKickMember.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.target_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.target_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.target_id = options.longs === String ? "0" : 0; + object.target_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber() : message.party_id; - if (message.target_id != null && message.hasOwnProperty("target_id")) - if (typeof message.target_id === "number") - object.target_id = options.longs === String ? String(message.target_id) : message.target_id; + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; + if (message.target_id != null && $Object.hasOwnProperty.call(message, "target_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.target_id = typeof message.target_id === "number" ? $BigInt(message.target_id) : $util.Long.fromBits(message.target_id.low >>> 0, message.target_id.high >>> 0, true).toBigInt(); + else if (typeof message.target_id === "number") + object.target_id = options.longs === $String ? $String(message.target_id) : message.target_id; else - object.target_id = options.longs === String ? $util.Long.prototype.toString.call(message.target_id) : options.longs === Number ? new $util.LongBits(message.target_id.low >>> 0, message.target_id.high >>> 0).toNumber() : message.target_id; + object.target_id = options.longs === $String ? $util.Long.prototype.toString.call(message.target_id) : options.longs === $Number ? new $util.LongBits(message.target_id.low >>> 0, message.target_id.high >>> 0).toNumber(true) : message.target_id; return object; }; @@ -20335,8 +26622,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyKickMember.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyKickMember.prototype.toJSON = function() { + return CMsgPartyKickMember.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyKickMember + * @function getTypeUrl + * @memberof CMsgPartyKickMember + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyKickMember.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyKickMember"; }; return CMsgPartyKickMember; @@ -20346,26 +26647,39 @@ /** * Properties of a CMsgPartySendChat. - * @exports ICMsgPartySendChat - * @interface ICMsgPartySendChat + * @typedef {Object} CMsgPartySendChat.$Properties * @property {number|Long|null} [party_id] CMsgPartySendChat party_id * @property {string|null} [msg] CMsgPartySendChat msg + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPartySendChat. + * @exports ICMsgPartySendChat + * @interface ICMsgPartySendChat + * @augments CMsgPartySendChat.$Properties + * @deprecated Use CMsgPartySendChat.$Properties instead. + */ + + /** + * Shape of a CMsgPartySendChat. + * @typedef {CMsgPartySendChat.$Properties} CMsgPartySendChat.$Shape */ /** * Constructs a new CMsgPartySendChat. * @exports CMsgPartySendChat * @classdesc Represents a CMsgPartySendChat. - * @implements ICMsgPartySendChat * @constructor - * @param {ICMsgPartySendChat=} [properties] Properties to set + * @param {CMsgPartySendChat.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartySendChat(properties) { + var CMsgPartySendChat = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartySendChat party_id. @@ -20373,7 +26687,7 @@ * @memberof CMsgPartySendChat * @instance */ - CMsgPartySendChat.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartySendChat.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartySendChat msg. @@ -20388,10 +26702,14 @@ * @function create * @memberof CMsgPartySendChat * @static - * @param {ICMsgPartySendChat=} [properties] Properties to set + * @param {CMsgPartySendChat.$Properties=} [properties] Properties to set * @returns {CMsgPartySendChat} CMsgPartySendChat instance + * @type {{ + * (properties: CMsgPartySendChat.$Shape): CMsgPartySendChat & CMsgPartySendChat.$Shape; + * (properties?: CMsgPartySendChat.$Properties): CMsgPartySendChat; + * }} */ - CMsgPartySendChat.create = function create(properties) { + CMsgPartySendChat.create = function(properties) { return new CMsgPartySendChat(properties); }; @@ -20400,17 +26718,24 @@ * @function encode * @memberof CMsgPartySendChat * @static - * @param {ICMsgPartySendChat} message CMsgPartySendChat message or plain object to encode + * @param {CMsgPartySendChat.$Properties} message CMsgPartySendChat message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartySendChat.encode = function encode(message, writer) { + CMsgPartySendChat.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.party_id); - if (message.msg != null && Object.hasOwnProperty.call(message, "msg")) + if (message.msg != null && $Object.hasOwnProperty.call(message, "msg")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.msg); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20419,12 +26744,12 @@ * @function encodeDelimited * @memberof CMsgPartySendChat * @static - * @param {ICMsgPartySendChat} message CMsgPartySendChat message or plain object to encode + * @param {CMsgPartySendChat.$Properties} message CMsgPartySendChat message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartySendChat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartySendChat.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20434,28 +26759,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartySendChat} CMsgPartySendChat + * @returns {CMsgPartySendChat & CMsgPartySendChat.$Shape} CMsgPartySendChat * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartySendChat.decode = function decode(reader, length) { + CMsgPartySendChat.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartySendChat(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartySendChat(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.fixed64(); - break; - case 2: - message.msg = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.party_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.msg = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20465,11 +26810,11 @@ * @memberof CMsgPartySendChat * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartySendChat} CMsgPartySendChat + * @returns {CMsgPartySendChat & CMsgPartySendChat.$Shape} CMsgPartySendChat * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartySendChat.decodeDelimited = function decodeDelimited(reader) { + CMsgPartySendChat.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20483,13 +26828,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartySendChat.verify = function verify(message) { + CMsgPartySendChat.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; - if (message.msg != null && message.hasOwnProperty("msg")) + if (message.msg != null && $Object.hasOwnProperty.call(message, "msg")) if (!$util.isString(message.msg)) return "msg: string expected"; return null; @@ -20503,21 +26852,27 @@ * @param {Object.} object Plain object * @returns {CMsgPartySendChat} CMsgPartySendChat */ - CMsgPartySendChat.fromObject = function fromObject(object) { + CMsgPartySendChat.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartySendChat) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartySendChat: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartySendChat(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = false; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") - message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(); + message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); if (object.msg != null) - message.msg = String(object.msg); + message.msg = $String(object.msg); return message; }; @@ -20530,24 +26885,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartySendChat.toObject = function toObject(message, options) { + CMsgPartySendChat.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.msg = ""; } - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber() : message.party_id; - if (message.msg != null && message.hasOwnProperty("msg")) + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; + if (message.msg != null && $Object.hasOwnProperty.call(message, "msg")) object.msg = message.msg; return object; }; @@ -20559,8 +26920,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartySendChat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartySendChat.prototype.toJSON = function() { + return CMsgPartySendChat.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartySendChat + * @function getTypeUrl + * @memberof CMsgPartySendChat + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartySendChat.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartySendChat"; }; return CMsgPartySendChat; @@ -20570,27 +26945,40 @@ /** * Properties of a CMsgPartyChatMsg. - * @exports ICMsgPartyChatMsg - * @interface ICMsgPartyChatMsg + * @typedef {Object} CMsgPartyChatMsg.$Properties * @property {ETFPartyChatType|null} [type] CMsgPartyChatMsg type * @property {number|Long|null} [actor_id] CMsgPartyChatMsg actor_id * @property {string|null} [msg] CMsgPartyChatMsg msg + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPartyChatMsg. + * @exports ICMsgPartyChatMsg + * @interface ICMsgPartyChatMsg + * @augments CMsgPartyChatMsg.$Properties + * @deprecated Use CMsgPartyChatMsg.$Properties instead. + */ + + /** + * Shape of a CMsgPartyChatMsg. + * @typedef {CMsgPartyChatMsg.$Properties} CMsgPartyChatMsg.$Shape */ /** * Constructs a new CMsgPartyChatMsg. * @exports CMsgPartyChatMsg * @classdesc Represents a CMsgPartyChatMsg. - * @implements ICMsgPartyChatMsg * @constructor - * @param {ICMsgPartyChatMsg=} [properties] Properties to set + * @param {CMsgPartyChatMsg.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPartyChatMsg(properties) { + var CMsgPartyChatMsg = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPartyChatMsg type. @@ -20606,7 +26994,7 @@ * @memberof CMsgPartyChatMsg * @instance */ - CMsgPartyChatMsg.prototype.actor_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPartyChatMsg.prototype.actor_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPartyChatMsg msg. @@ -20621,10 +27009,14 @@ * @function create * @memberof CMsgPartyChatMsg * @static - * @param {ICMsgPartyChatMsg=} [properties] Properties to set + * @param {CMsgPartyChatMsg.$Properties=} [properties] Properties to set * @returns {CMsgPartyChatMsg} CMsgPartyChatMsg instance + * @type {{ + * (properties: CMsgPartyChatMsg.$Shape): CMsgPartyChatMsg & CMsgPartyChatMsg.$Shape; + * (properties?: CMsgPartyChatMsg.$Properties): CMsgPartyChatMsg; + * }} */ - CMsgPartyChatMsg.create = function create(properties) { + CMsgPartyChatMsg.create = function(properties) { return new CMsgPartyChatMsg(properties); }; @@ -20633,19 +27025,26 @@ * @function encode * @memberof CMsgPartyChatMsg * @static - * @param {ICMsgPartyChatMsg} message CMsgPartyChatMsg message or plain object to encode + * @param {CMsgPartyChatMsg.$Properties} message CMsgPartyChatMsg message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyChatMsg.encode = function encode(message, writer) { + CMsgPartyChatMsg.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.actor_id != null && Object.hasOwnProperty.call(message, "actor_id")) + if (message.actor_id != null && $Object.hasOwnProperty.call(message, "actor_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.actor_id); - if (message.msg != null && Object.hasOwnProperty.call(message, "msg")) + if (message.msg != null && $Object.hasOwnProperty.call(message, "msg")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.msg); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20654,12 +27053,12 @@ * @function encodeDelimited * @memberof CMsgPartyChatMsg * @static - * @param {ICMsgPartyChatMsg} message CMsgPartyChatMsg message or plain object to encode + * @param {CMsgPartyChatMsg.$Properties} message CMsgPartyChatMsg message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPartyChatMsg.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPartyChatMsg.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20669,31 +27068,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPartyChatMsg} CMsgPartyChatMsg + * @returns {CMsgPartyChatMsg & CMsgPartyChatMsg.$Shape} CMsgPartyChatMsg * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyChatMsg.decode = function decode(reader, length) { + CMsgPartyChatMsg.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPartyChatMsg(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPartyChatMsg(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.actor_id = reader.fixed64(); - break; - case 3: - message.msg = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFPartyChatType[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 1) + break; + message.actor_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.msg = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20703,11 +27131,11 @@ * @memberof CMsgPartyChatMsg * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPartyChatMsg} CMsgPartyChatMsg + * @returns {CMsgPartyChatMsg & CMsgPartyChatMsg.$Shape} CMsgPartyChatMsg * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPartyChatMsg.decodeDelimited = function decodeDelimited(reader) { + CMsgPartyChatMsg.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20721,10 +27149,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPartyChatMsg.verify = function verify(message) { + CMsgPartyChatMsg.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -20737,10 +27169,10 @@ case 1004: break; } - if (message.actor_id != null && message.hasOwnProperty("actor_id")) + if (message.actor_id != null && $Object.hasOwnProperty.call(message, "actor_id")) if (!$util.isInteger(message.actor_id) && !(message.actor_id && $util.isInteger(message.actor_id.low) && $util.isInteger(message.actor_id.high))) return "actor_id: integer|Long expected"; - if (message.msg != null && message.hasOwnProperty("msg")) + if (message.msg != null && $Object.hasOwnProperty.call(message, "msg")) if (!$util.isString(message.msg)) return "msg: string expected"; return null; @@ -20754,9 +27186,15 @@ * @param {Object.} object Plain object * @returns {CMsgPartyChatMsg} CMsgPartyChatMsg */ - CMsgPartyChatMsg.fromObject = function fromObject(object) { + CMsgPartyChatMsg.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPartyChatMsg) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPartyChatMsg: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPartyChatMsg(); switch (object.type) { case "k_eTFPartyChatType_Invalid": @@ -20787,18 +27225,19 @@ case 1004: message.type = 1004; break; + default: } if (object.actor_id != null) if ($util.Long) - (message.actor_id = $util.Long.fromValue(object.actor_id)).unsigned = false; + message.actor_id = $util.Long.fromValue(object.actor_id, true); else if (typeof object.actor_id === "string") - message.actor_id = parseInt(object.actor_id, 10); + message.actor_id = $parseInt(object.actor_id, 10); else if (typeof object.actor_id === "number") message.actor_id = object.actor_id; else if (typeof object.actor_id === "object") - message.actor_id = new $util.LongBits(object.actor_id.low >>> 0, object.actor_id.high >>> 0).toNumber(); + message.actor_id = new $util.LongBits(object.actor_id.low >>> 0, object.actor_id.high >>> 0).toNumber(true); if (object.msg != null) - message.msg = String(object.msg); + message.msg = $String(object.msg); return message; }; @@ -20811,27 +27250,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPartyChatMsg.toObject = function toObject(message, options) { + CMsgPartyChatMsg.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.type = options.enums === String ? "k_eTFPartyChatType_Invalid" : 0; + object.type = options.enums === $String ? "k_eTFPartyChatType_Invalid" : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.actor_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.actor_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.actor_id = options.longs === String ? "0" : 0; + object.actor_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.msg = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.ETFPartyChatType[message.type] : message.type; - if (message.actor_id != null && message.hasOwnProperty("actor_id")) - if (typeof message.actor_id === "number") - object.actor_id = options.longs === String ? String(message.actor_id) : message.actor_id; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.ETFPartyChatType[message.type] === $undefined ? message.type : $root.ETFPartyChatType[message.type] : message.type; + if (message.actor_id != null && $Object.hasOwnProperty.call(message, "actor_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.actor_id = typeof message.actor_id === "number" ? $BigInt(message.actor_id) : $util.Long.fromBits(message.actor_id.low >>> 0, message.actor_id.high >>> 0, true).toBigInt(); + else if (typeof message.actor_id === "number") + object.actor_id = options.longs === $String ? $String(message.actor_id) : message.actor_id; else - object.actor_id = options.longs === String ? $util.Long.prototype.toString.call(message.actor_id) : options.longs === Number ? new $util.LongBits(message.actor_id.low >>> 0, message.actor_id.high >>> 0).toNumber() : message.actor_id; - if (message.msg != null && message.hasOwnProperty("msg")) + object.actor_id = options.longs === $String ? $util.Long.prototype.toString.call(message.actor_id) : options.longs === $Number ? new $util.LongBits(message.actor_id.low >>> 0, message.actor_id.high >>> 0).toNumber(true) : message.actor_id; + if (message.msg != null && $Object.hasOwnProperty.call(message, "msg")) object.msg = message.msg; return object; }; @@ -20843,8 +27288,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPartyChatMsg.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPartyChatMsg.prototype.toJSON = function() { + return CMsgPartyChatMsg.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPartyChatMsg + * @function getTypeUrl + * @memberof CMsgPartyChatMsg + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPartyChatMsg.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPartyChatMsg"; }; return CMsgPartyChatMsg; @@ -20854,42 +27313,55 @@ /** * Properties of a CSOTFParty. - * @exports ICSOTFParty - * @interface ICSOTFParty + * @typedef {Object} CSOTFParty.$Properties * @property {number|Long|null} [party_id] CSOTFParty party_id * @property {number|Long|null} [leader_id] CSOTFParty leader_id * @property {Array.|null} [member_ids] CSOTFParty member_ids - * @property {Array.|null} [members] CSOTFParty members + * @property {Array.|null} [members] CSOTFParty members * @property {number|Long|null} [associated_lobby_id] CSOTFParty associated_lobby_id * @property {ETFMatchGroup|null} [associated_lobby_match_group] CSOTFParty associated_lobby_match_group - * @property {Array.|null} [matchmaking_queues] CSOTFParty matchmaking_queues - * @property {ICTFGroupMatchCriteriaProto|null} [group_criteria] CSOTFParty group_criteria + * @property {Array.|null} [matchmaking_queues] CSOTFParty matchmaking_queues + * @property {CTFGroupMatchCriteriaProto.$Properties|null} [group_criteria] CSOTFParty group_criteria * @property {number|null} [casual_banned_time] CSOTFParty casual_banned_time * @property {number|null} [casual_low_priority_time] CSOTFParty casual_low_priority_time * @property {number|null} [ranked_banned_time] CSOTFParty ranked_banned_time * @property {number|null} [ranked_low_priority_time] CSOTFParty ranked_low_priority_time - * @property {ITFSyncedMMUIState|null} [leader_ui_state] CSOTFParty leader_ui_state - * @property {Array.|null} [pending_members] CSOTFParty pending_members + * @property {TFSyncedMMUIState.$Properties|null} [leader_ui_state] CSOTFParty leader_ui_state + * @property {Array.|null} [pending_members] CSOTFParty pending_members + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOTFParty. + * @exports ICSOTFParty + * @interface ICSOTFParty + * @augments CSOTFParty.$Properties + * @deprecated Use CSOTFParty.$Properties instead. + */ + + /** + * Shape of a CSOTFParty. + * @typedef {CSOTFParty.$Properties} CSOTFParty.$Shape */ /** * Constructs a new CSOTFParty. * @exports CSOTFParty * @classdesc Represents a CSOTFParty. - * @implements ICSOTFParty * @constructor - * @param {ICSOTFParty=} [properties] Properties to set + * @param {CSOTFParty.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOTFParty(properties) { + var CSOTFParty = function (properties) { this.member_ids = []; this.members = []; this.matchmaking_queues = []; this.pending_members = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOTFParty party_id. @@ -20905,7 +27377,7 @@ * @memberof CSOTFParty * @instance */ - CSOTFParty.prototype.leader_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CSOTFParty.prototype.leader_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CSOTFParty member_ids. @@ -20917,7 +27389,7 @@ /** * CSOTFParty members. - * @member {Array.} members + * @member {Array.} members * @memberof CSOTFParty * @instance */ @@ -20941,7 +27413,7 @@ /** * CSOTFParty matchmaking_queues. - * @member {Array.} matchmaking_queues + * @member {Array.} matchmaking_queues * @memberof CSOTFParty * @instance */ @@ -20949,7 +27421,7 @@ /** * CSOTFParty group_criteria. - * @member {ICTFGroupMatchCriteriaProto|null|undefined} group_criteria + * @member {CTFGroupMatchCriteriaProto.$Properties|null|undefined} group_criteria * @memberof CSOTFParty * @instance */ @@ -20989,7 +27461,7 @@ /** * CSOTFParty leader_ui_state. - * @member {ITFSyncedMMUIState|null|undefined} leader_ui_state + * @member {TFSyncedMMUIState.$Properties|null|undefined} leader_ui_state * @memberof CSOTFParty * @instance */ @@ -20997,7 +27469,7 @@ /** * CSOTFParty pending_members. - * @member {Array.} pending_members + * @member {Array.} pending_members * @memberof CSOTFParty * @instance */ @@ -21008,10 +27480,14 @@ * @function create * @memberof CSOTFParty * @static - * @param {ICSOTFParty=} [properties] Properties to set + * @param {CSOTFParty.$Properties=} [properties] Properties to set * @returns {CSOTFParty} CSOTFParty instance + * @type {{ + * (properties: CSOTFParty.$Shape): CSOTFParty & CSOTFParty.$Shape; + * (properties?: CSOTFParty.$Properties): CSOTFParty; + * }} */ - CSOTFParty.create = function create(properties) { + CSOTFParty.create = function(properties) { return new CSOTFParty(properties); }; @@ -21020,45 +27496,52 @@ * @function encode * @memberof CSOTFParty * @static - * @param {ICSOTFParty} message CSOTFParty message or plain object to encode + * @param {CSOTFParty.$Properties} message CSOTFParty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFParty.encode = function encode(message, writer) { + CSOTFParty.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.party_id); - if (message.leader_id != null && Object.hasOwnProperty.call(message, "leader_id")) + if (message.leader_id != null && $Object.hasOwnProperty.call(message, "leader_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.leader_id); if (message.member_ids != null && message.member_ids.length) for (var i = 0; i < message.member_ids.length; ++i) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.member_ids[i]); if (message.members != null && message.members.length) for (var i = 0; i < message.members.length; ++i) - $root.CSOTFPartyMember.encode(message.members[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.casual_banned_time != null && Object.hasOwnProperty.call(message, "casual_banned_time")) + $root.CSOTFPartyMember.encode(message.members[i], writer.uint32(/* id 13, wireType 2 =*/106).fork(), _depth + 1).ldelim(); + if (message.casual_banned_time != null && $Object.hasOwnProperty.call(message, "casual_banned_time")) writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.casual_banned_time); - if (message.casual_low_priority_time != null && Object.hasOwnProperty.call(message, "casual_low_priority_time")) + if (message.casual_low_priority_time != null && $Object.hasOwnProperty.call(message, "casual_low_priority_time")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.casual_low_priority_time); - if (message.associated_lobby_id != null && Object.hasOwnProperty.call(message, "associated_lobby_id")) + if (message.associated_lobby_id != null && $Object.hasOwnProperty.call(message, "associated_lobby_id")) writer.uint32(/* id 35, wireType 0 =*/280).uint64(message.associated_lobby_id); - if (message.group_criteria != null && Object.hasOwnProperty.call(message, "group_criteria")) - $root.CTFGroupMatchCriteriaProto.encode(message.group_criteria, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + if (message.group_criteria != null && $Object.hasOwnProperty.call(message, "group_criteria")) + $root.CTFGroupMatchCriteriaProto.encode(message.group_criteria, writer.uint32(/* id 37, wireType 2 =*/298).fork(), _depth + 1).ldelim(); if (message.pending_members != null && message.pending_members.length) for (var i = 0; i < message.pending_members.length; ++i) - $root.TFPendingPartyMember.encode(message.pending_members[i], writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.associated_lobby_match_group != null && Object.hasOwnProperty.call(message, "associated_lobby_match_group")) + $root.TFPendingPartyMember.encode(message.pending_members[i], writer.uint32(/* id 39, wireType 2 =*/314).fork(), _depth + 1).ldelim(); + if (message.associated_lobby_match_group != null && $Object.hasOwnProperty.call(message, "associated_lobby_match_group")) writer.uint32(/* id 40, wireType 0 =*/320).int32(message.associated_lobby_match_group); - if (message.ranked_banned_time != null && Object.hasOwnProperty.call(message, "ranked_banned_time")) + if (message.ranked_banned_time != null && $Object.hasOwnProperty.call(message, "ranked_banned_time")) writer.uint32(/* id 41, wireType 0 =*/328).uint32(message.ranked_banned_time); - if (message.ranked_low_priority_time != null && Object.hasOwnProperty.call(message, "ranked_low_priority_time")) + if (message.ranked_low_priority_time != null && $Object.hasOwnProperty.call(message, "ranked_low_priority_time")) writer.uint32(/* id 42, wireType 0 =*/336).uint32(message.ranked_low_priority_time); if (message.matchmaking_queues != null && message.matchmaking_queues.length) for (var i = 0; i < message.matchmaking_queues.length; ++i) - $root.CSOTFParty.QueueEntry.encode(message.matchmaking_queues[i], writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); - if (message.leader_ui_state != null && Object.hasOwnProperty.call(message, "leader_ui_state")) - $root.TFSyncedMMUIState.encode(message.leader_ui_state, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + $root.CSOTFParty.QueueEntry.encode(message.matchmaking_queues[i], writer.uint32(/* id 43, wireType 2 =*/346).fork(), _depth + 1).ldelim(); + if (message.leader_ui_state != null && $Object.hasOwnProperty.call(message, "leader_ui_state")) + $root.TFSyncedMMUIState.encode(message.leader_ui_state, writer.uint32(/* id 44, wireType 2 =*/354).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21067,12 +27550,12 @@ * @function encodeDelimited * @memberof CSOTFParty * @static - * @param {ICSOTFParty} message CSOTFParty message or plain object to encode + * @param {CSOTFParty.$Properties} message CSOTFParty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFParty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOTFParty.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21082,77 +27565,140 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFParty} CSOTFParty + * @returns {CSOTFParty & CSOTFParty.$Shape} CSOTFParty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFParty.decode = function decode(reader, length) { + CSOTFParty.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFParty(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFParty(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.uint64(); - break; - case 2: - message.leader_id = reader.fixed64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 3: - if (!(message.member_ids && message.member_ids.length)) - message.member_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.member_ids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.party_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.leader_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.member_ids && message.member_ids.length)) + message.member_ids = []; + reader.fixed64s(message.member_ids); + continue; + } + if (wireType !== 1) + break; + if (!(message.member_ids && message.member_ids.length)) + message.member_ids = []; message.member_ids.push(reader.fixed64()); - break; - case 13: - if (!(message.members && message.members.length)) - message.members = []; - message.members.push($root.CSOTFPartyMember.decode(reader, reader.uint32())); - break; - case 35: - message.associated_lobby_id = reader.uint64(); - break; - case 40: - message.associated_lobby_match_group = reader.int32(); - break; - case 43: - if (!(message.matchmaking_queues && message.matchmaking_queues.length)) - message.matchmaking_queues = []; - message.matchmaking_queues.push($root.CSOTFParty.QueueEntry.decode(reader, reader.uint32())); - break; - case 37: - message.group_criteria = $root.CTFGroupMatchCriteriaProto.decode(reader, reader.uint32()); - break; - case 18: - message.casual_banned_time = reader.uint32(); - break; - case 20: - message.casual_low_priority_time = reader.uint32(); - break; - case 41: - message.ranked_banned_time = reader.uint32(); - break; - case 42: - message.ranked_low_priority_time = reader.uint32(); - break; - case 44: - message.leader_ui_state = $root.TFSyncedMMUIState.decode(reader, reader.uint32()); - break; - case 39: - if (!(message.pending_members && message.pending_members.length)) - message.pending_members = []; - message.pending_members.push($root.TFPendingPartyMember.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 13: { + if (wireType !== 2) + break; + if (!(message.members && message.members.length)) + message.members = []; + message.members.push($root.CSOTFPartyMember.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 35: { + if (wireType !== 0) + break; + message.associated_lobby_id = reader.uint64(); + continue; + } + case 40: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFMatchGroup[value] !== $undefined) + message.associated_lobby_match_group = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 43: { + if (wireType !== 2) + break; + if (!(message.matchmaking_queues && message.matchmaking_queues.length)) + message.matchmaking_queues = []; + message.matchmaking_queues.push($root.CSOTFParty.QueueEntry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 37: { + if (wireType !== 2) + break; + message.group_criteria = $root.CTFGroupMatchCriteriaProto.decode(reader, reader.uint32(), $undefined, _depth + 1, message.group_criteria); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.casual_banned_time = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.casual_low_priority_time = reader.uint32(); + continue; + } + case 41: { + if (wireType !== 0) + break; + message.ranked_banned_time = reader.uint32(); + continue; + } + case 42: { + if (wireType !== 0) + break; + message.ranked_low_priority_time = reader.uint32(); + continue; + } + case 44: { + if (wireType !== 2) + break; + message.leader_ui_state = $root.TFSyncedMMUIState.decode(reader, reader.uint32(), $undefined, _depth + 1, message.leader_ui_state); + continue; + } + case 39: { + if (wireType !== 2) + break; + if (!(message.pending_members && message.pending_members.length)) + message.pending_members = []; + message.pending_members.push($root.TFPendingPartyMember.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21162,11 +27708,11 @@ * @memberof CSOTFParty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFParty} CSOTFParty + * @returns {CSOTFParty & CSOTFParty.$Shape} CSOTFParty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFParty.decodeDelimited = function decodeDelimited(reader) { + CSOTFParty.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21180,35 +27726,39 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOTFParty.verify = function verify(message) { + CSOTFParty.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; - if (message.leader_id != null && message.hasOwnProperty("leader_id")) + if (message.leader_id != null && $Object.hasOwnProperty.call(message, "leader_id")) if (!$util.isInteger(message.leader_id) && !(message.leader_id && $util.isInteger(message.leader_id.low) && $util.isInteger(message.leader_id.high))) return "leader_id: integer|Long expected"; - if (message.member_ids != null && message.hasOwnProperty("member_ids")) { - if (!Array.isArray(message.member_ids)) + if (message.member_ids != null && $Object.hasOwnProperty.call(message, "member_ids")) { + if (!$Array.isArray(message.member_ids)) return "member_ids: array expected"; for (var i = 0; i < message.member_ids.length; ++i) if (!$util.isInteger(message.member_ids[i]) && !(message.member_ids[i] && $util.isInteger(message.member_ids[i].low) && $util.isInteger(message.member_ids[i].high))) return "member_ids: integer|Long[] expected"; } - if (message.members != null && message.hasOwnProperty("members")) { - if (!Array.isArray(message.members)) + if (message.members != null && $Object.hasOwnProperty.call(message, "members")) { + if (!$Array.isArray(message.members)) return "members: array expected"; for (var i = 0; i < message.members.length; ++i) { - var error = $root.CSOTFPartyMember.verify(message.members[i]); + var error = $root.CSOTFPartyMember.verify(message.members[i], _depth + 1); if (error) return "members." + error; } } - if (message.associated_lobby_id != null && message.hasOwnProperty("associated_lobby_id")) + if (message.associated_lobby_id != null && $Object.hasOwnProperty.call(message, "associated_lobby_id")) if (!$util.isInteger(message.associated_lobby_id) && !(message.associated_lobby_id && $util.isInteger(message.associated_lobby_id.low) && $util.isInteger(message.associated_lobby_id.high))) return "associated_lobby_id: integer|Long expected"; - if (message.associated_lobby_match_group != null && message.hasOwnProperty("associated_lobby_match_group")) + if (message.associated_lobby_match_group != null && $Object.hasOwnProperty.call(message, "associated_lobby_match_group")) switch (message.associated_lobby_match_group) { default: return "associated_lobby_match_group: enum value expected"; @@ -21237,42 +27787,42 @@ case 8: break; } - if (message.matchmaking_queues != null && message.hasOwnProperty("matchmaking_queues")) { - if (!Array.isArray(message.matchmaking_queues)) + if (message.matchmaking_queues != null && $Object.hasOwnProperty.call(message, "matchmaking_queues")) { + if (!$Array.isArray(message.matchmaking_queues)) return "matchmaking_queues: array expected"; for (var i = 0; i < message.matchmaking_queues.length; ++i) { - var error = $root.CSOTFParty.QueueEntry.verify(message.matchmaking_queues[i]); + var error = $root.CSOTFParty.QueueEntry.verify(message.matchmaking_queues[i], _depth + 1); if (error) return "matchmaking_queues." + error; } } - if (message.group_criteria != null && message.hasOwnProperty("group_criteria")) { - var error = $root.CTFGroupMatchCriteriaProto.verify(message.group_criteria); + if (message.group_criteria != null && $Object.hasOwnProperty.call(message, "group_criteria")) { + var error = $root.CTFGroupMatchCriteriaProto.verify(message.group_criteria, _depth + 1); if (error) return "group_criteria." + error; } - if (message.casual_banned_time != null && message.hasOwnProperty("casual_banned_time")) + if (message.casual_banned_time != null && $Object.hasOwnProperty.call(message, "casual_banned_time")) if (!$util.isInteger(message.casual_banned_time)) return "casual_banned_time: integer expected"; - if (message.casual_low_priority_time != null && message.hasOwnProperty("casual_low_priority_time")) + if (message.casual_low_priority_time != null && $Object.hasOwnProperty.call(message, "casual_low_priority_time")) if (!$util.isInteger(message.casual_low_priority_time)) return "casual_low_priority_time: integer expected"; - if (message.ranked_banned_time != null && message.hasOwnProperty("ranked_banned_time")) + if (message.ranked_banned_time != null && $Object.hasOwnProperty.call(message, "ranked_banned_time")) if (!$util.isInteger(message.ranked_banned_time)) return "ranked_banned_time: integer expected"; - if (message.ranked_low_priority_time != null && message.hasOwnProperty("ranked_low_priority_time")) + if (message.ranked_low_priority_time != null && $Object.hasOwnProperty.call(message, "ranked_low_priority_time")) if (!$util.isInteger(message.ranked_low_priority_time)) return "ranked_low_priority_time: integer expected"; - if (message.leader_ui_state != null && message.hasOwnProperty("leader_ui_state")) { - var error = $root.TFSyncedMMUIState.verify(message.leader_ui_state); + if (message.leader_ui_state != null && $Object.hasOwnProperty.call(message, "leader_ui_state")) { + var error = $root.TFSyncedMMUIState.verify(message.leader_ui_state, _depth + 1); if (error) return "leader_ui_state." + error; } - if (message.pending_members != null && message.hasOwnProperty("pending_members")) { - if (!Array.isArray(message.pending_members)) + if (message.pending_members != null && $Object.hasOwnProperty.call(message, "pending_members")) { + if (!$Array.isArray(message.pending_members)) return "pending_members: array expected"; for (var i = 0; i < message.pending_members.length; ++i) { - var error = $root.TFPendingPartyMember.verify(message.pending_members[i]); + var error = $root.TFPendingPartyMember.verify(message.pending_members[i], _depth + 1); if (error) return "pending_members." + error; } @@ -21288,57 +27838,63 @@ * @param {Object.} object Plain object * @returns {CSOTFParty} CSOTFParty */ - CSOTFParty.fromObject = function fromObject(object) { + CSOTFParty.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFParty) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFParty: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFParty(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = true; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); if (object.leader_id != null) if ($util.Long) - (message.leader_id = $util.Long.fromValue(object.leader_id)).unsigned = false; + message.leader_id = $util.Long.fromValue(object.leader_id, true); else if (typeof object.leader_id === "string") - message.leader_id = parseInt(object.leader_id, 10); + message.leader_id = $parseInt(object.leader_id, 10); else if (typeof object.leader_id === "number") message.leader_id = object.leader_id; else if (typeof object.leader_id === "object") - message.leader_id = new $util.LongBits(object.leader_id.low >>> 0, object.leader_id.high >>> 0).toNumber(); + message.leader_id = new $util.LongBits(object.leader_id.low >>> 0, object.leader_id.high >>> 0).toNumber(true); if (object.member_ids) { - if (!Array.isArray(object.member_ids)) - throw TypeError(".CSOTFParty.member_ids: array expected"); - message.member_ids = []; + if (!$Array.isArray(object.member_ids)) + throw $TypeError(".CSOTFParty.member_ids: array expected"); + message.member_ids = $Array(object.member_ids.length); for (var i = 0; i < object.member_ids.length; ++i) if ($util.Long) - (message.member_ids[i] = $util.Long.fromValue(object.member_ids[i])).unsigned = false; + message.member_ids[i] = $util.Long.fromValue(object.member_ids[i], true); else if (typeof object.member_ids[i] === "string") - message.member_ids[i] = parseInt(object.member_ids[i], 10); + message.member_ids[i] = $parseInt(object.member_ids[i], 10); else if (typeof object.member_ids[i] === "number") message.member_ids[i] = object.member_ids[i]; else if (typeof object.member_ids[i] === "object") - message.member_ids[i] = new $util.LongBits(object.member_ids[i].low >>> 0, object.member_ids[i].high >>> 0).toNumber(); + message.member_ids[i] = new $util.LongBits(object.member_ids[i].low >>> 0, object.member_ids[i].high >>> 0).toNumber(true); } if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".CSOTFParty.members: array expected"); - message.members = []; + if (!$Array.isArray(object.members)) + throw $TypeError(".CSOTFParty.members: array expected"); + message.members = $Array(object.members.length); for (var i = 0; i < object.members.length; ++i) { - if (typeof object.members[i] !== "object") - throw TypeError(".CSOTFParty.members: object expected"); - message.members[i] = $root.CSOTFPartyMember.fromObject(object.members[i]); + if (!$util.isObject(object.members[i])) + throw $TypeError(".CSOTFParty.members: object expected"); + message.members[i] = $root.CSOTFPartyMember.fromObject(object.members[i], _depth + 1); } } if (object.associated_lobby_id != null) if ($util.Long) - (message.associated_lobby_id = $util.Long.fromValue(object.associated_lobby_id)).unsigned = true; + message.associated_lobby_id = $util.Long.fromValue(object.associated_lobby_id, true); else if (typeof object.associated_lobby_id === "string") - message.associated_lobby_id = parseInt(object.associated_lobby_id, 10); + message.associated_lobby_id = $parseInt(object.associated_lobby_id, 10); else if (typeof object.associated_lobby_id === "number") message.associated_lobby_id = object.associated_lobby_id; else if (typeof object.associated_lobby_id === "object") @@ -21436,21 +27992,22 @@ case 8: message.associated_lobby_match_group = 8; break; + default: } if (object.matchmaking_queues) { - if (!Array.isArray(object.matchmaking_queues)) - throw TypeError(".CSOTFParty.matchmaking_queues: array expected"); - message.matchmaking_queues = []; + if (!$Array.isArray(object.matchmaking_queues)) + throw $TypeError(".CSOTFParty.matchmaking_queues: array expected"); + message.matchmaking_queues = $Array(object.matchmaking_queues.length); for (var i = 0; i < object.matchmaking_queues.length; ++i) { - if (typeof object.matchmaking_queues[i] !== "object") - throw TypeError(".CSOTFParty.matchmaking_queues: object expected"); - message.matchmaking_queues[i] = $root.CSOTFParty.QueueEntry.fromObject(object.matchmaking_queues[i]); + if (!$util.isObject(object.matchmaking_queues[i])) + throw $TypeError(".CSOTFParty.matchmaking_queues: object expected"); + message.matchmaking_queues[i] = $root.CSOTFParty.QueueEntry.fromObject(object.matchmaking_queues[i], _depth + 1); } } if (object.group_criteria != null) { - if (typeof object.group_criteria !== "object") - throw TypeError(".CSOTFParty.group_criteria: object expected"); - message.group_criteria = $root.CTFGroupMatchCriteriaProto.fromObject(object.group_criteria); + if (!$util.isObject(object.group_criteria)) + throw $TypeError(".CSOTFParty.group_criteria: object expected"); + message.group_criteria = $root.CTFGroupMatchCriteriaProto.fromObject(object.group_criteria, _depth + 1); } if (object.casual_banned_time != null) message.casual_banned_time = object.casual_banned_time >>> 0; @@ -21461,18 +28018,18 @@ if (object.ranked_low_priority_time != null) message.ranked_low_priority_time = object.ranked_low_priority_time >>> 0; if (object.leader_ui_state != null) { - if (typeof object.leader_ui_state !== "object") - throw TypeError(".CSOTFParty.leader_ui_state: object expected"); - message.leader_ui_state = $root.TFSyncedMMUIState.fromObject(object.leader_ui_state); + if (!$util.isObject(object.leader_ui_state)) + throw $TypeError(".CSOTFParty.leader_ui_state: object expected"); + message.leader_ui_state = $root.TFSyncedMMUIState.fromObject(object.leader_ui_state, _depth + 1); } if (object.pending_members) { - if (!Array.isArray(object.pending_members)) - throw TypeError(".CSOTFParty.pending_members: array expected"); - message.pending_members = []; + if (!$Array.isArray(object.pending_members)) + throw $TypeError(".CSOTFParty.pending_members: array expected"); + message.pending_members = $Array(object.pending_members.length); for (var i = 0; i < object.pending_members.length; ++i) { - if (typeof object.pending_members[i] !== "object") - throw TypeError(".CSOTFParty.pending_members: object expected"); - message.pending_members[i] = $root.TFPendingPartyMember.fromObject(object.pending_members[i]); + if (!$util.isObject(object.pending_members[i])) + throw $TypeError(".CSOTFParty.pending_members: object expected"); + message.pending_members[i] = $root.TFPendingPartyMember.fromObject(object.pending_members[i], _depth + 1); } } return message; @@ -21487,9 +28044,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOTFParty.toObject = function toObject(message, options) { + CSOTFParty.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.member_ids = []; @@ -21500,79 +28061,87 @@ if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.leader_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.leader_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.leader_id = options.longs === String ? "0" : 0; + object.leader_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.casual_banned_time = 0; object.casual_low_priority_time = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.associated_lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.associated_lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.associated_lobby_id = options.longs === String ? "0" : 0; + object.associated_lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.group_criteria = null; - object.associated_lobby_match_group = options.enums === String ? "k_eTFMatchGroup_Invalid" : -1; + object.associated_lobby_match_group = options.enums === $String ? "k_eTFMatchGroup_Invalid" : -1; object.ranked_banned_time = 0; object.ranked_low_priority_time = 0; object.leader_ui_state = null; } - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; - if (message.leader_id != null && message.hasOwnProperty("leader_id")) - if (typeof message.leader_id === "number") - object.leader_id = options.longs === String ? String(message.leader_id) : message.leader_id; + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; + if (message.leader_id != null && $Object.hasOwnProperty.call(message, "leader_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.leader_id = typeof message.leader_id === "number" ? $BigInt(message.leader_id) : $util.Long.fromBits(message.leader_id.low >>> 0, message.leader_id.high >>> 0, true).toBigInt(); + else if (typeof message.leader_id === "number") + object.leader_id = options.longs === $String ? $String(message.leader_id) : message.leader_id; else - object.leader_id = options.longs === String ? $util.Long.prototype.toString.call(message.leader_id) : options.longs === Number ? new $util.LongBits(message.leader_id.low >>> 0, message.leader_id.high >>> 0).toNumber() : message.leader_id; + object.leader_id = options.longs === $String ? $util.Long.prototype.toString.call(message.leader_id) : options.longs === $Number ? new $util.LongBits(message.leader_id.low >>> 0, message.leader_id.high >>> 0).toNumber(true) : message.leader_id; if (message.member_ids && message.member_ids.length) { - object.member_ids = []; + object.member_ids = $Array(message.member_ids.length); for (var j = 0; j < message.member_ids.length; ++j) - if (typeof message.member_ids[j] === "number") - object.member_ids[j] = options.longs === String ? String(message.member_ids[j]) : message.member_ids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.member_ids[j] = typeof message.member_ids[j] === "number" ? $BigInt(message.member_ids[j]) : $util.Long.fromBits(message.member_ids[j].low >>> 0, message.member_ids[j].high >>> 0, true).toBigInt(); + else if (typeof message.member_ids[j] === "number") + object.member_ids[j] = options.longs === $String ? $String(message.member_ids[j]) : message.member_ids[j]; else - object.member_ids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.member_ids[j]) : options.longs === Number ? new $util.LongBits(message.member_ids[j].low >>> 0, message.member_ids[j].high >>> 0).toNumber() : message.member_ids[j]; + object.member_ids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.member_ids[j]) : options.longs === $Number ? new $util.LongBits(message.member_ids[j].low >>> 0, message.member_ids[j].high >>> 0).toNumber(true) : message.member_ids[j]; } if (message.members && message.members.length) { - object.members = []; + object.members = $Array(message.members.length); for (var j = 0; j < message.members.length; ++j) - object.members[j] = $root.CSOTFPartyMember.toObject(message.members[j], options); + object.members[j] = $root.CSOTFPartyMember.toObject(message.members[j], options, _depth + 1); } - if (message.casual_banned_time != null && message.hasOwnProperty("casual_banned_time")) + if (message.casual_banned_time != null && $Object.hasOwnProperty.call(message, "casual_banned_time")) object.casual_banned_time = message.casual_banned_time; - if (message.casual_low_priority_time != null && message.hasOwnProperty("casual_low_priority_time")) + if (message.casual_low_priority_time != null && $Object.hasOwnProperty.call(message, "casual_low_priority_time")) object.casual_low_priority_time = message.casual_low_priority_time; - if (message.associated_lobby_id != null && message.hasOwnProperty("associated_lobby_id")) - if (typeof message.associated_lobby_id === "number") - object.associated_lobby_id = options.longs === String ? String(message.associated_lobby_id) : message.associated_lobby_id; + if (message.associated_lobby_id != null && $Object.hasOwnProperty.call(message, "associated_lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.associated_lobby_id = typeof message.associated_lobby_id === "number" ? $BigInt(message.associated_lobby_id) : $util.Long.fromBits(message.associated_lobby_id.low >>> 0, message.associated_lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.associated_lobby_id === "number") + object.associated_lobby_id = options.longs === $String ? $String(message.associated_lobby_id) : message.associated_lobby_id; else - object.associated_lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.associated_lobby_id) : options.longs === Number ? new $util.LongBits(message.associated_lobby_id.low >>> 0, message.associated_lobby_id.high >>> 0).toNumber(true) : message.associated_lobby_id; - if (message.group_criteria != null && message.hasOwnProperty("group_criteria")) - object.group_criteria = $root.CTFGroupMatchCriteriaProto.toObject(message.group_criteria, options); + object.associated_lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.associated_lobby_id) : options.longs === $Number ? new $util.LongBits(message.associated_lobby_id.low >>> 0, message.associated_lobby_id.high >>> 0).toNumber(true) : message.associated_lobby_id; + if (message.group_criteria != null && $Object.hasOwnProperty.call(message, "group_criteria")) + object.group_criteria = $root.CTFGroupMatchCriteriaProto.toObject(message.group_criteria, options, _depth + 1); if (message.pending_members && message.pending_members.length) { - object.pending_members = []; + object.pending_members = $Array(message.pending_members.length); for (var j = 0; j < message.pending_members.length; ++j) - object.pending_members[j] = $root.TFPendingPartyMember.toObject(message.pending_members[j], options); + object.pending_members[j] = $root.TFPendingPartyMember.toObject(message.pending_members[j], options, _depth + 1); } - if (message.associated_lobby_match_group != null && message.hasOwnProperty("associated_lobby_match_group")) - object.associated_lobby_match_group = options.enums === String ? $root.ETFMatchGroup[message.associated_lobby_match_group] : message.associated_lobby_match_group; - if (message.ranked_banned_time != null && message.hasOwnProperty("ranked_banned_time")) + if (message.associated_lobby_match_group != null && $Object.hasOwnProperty.call(message, "associated_lobby_match_group")) + object.associated_lobby_match_group = options.enums === $String ? $root.ETFMatchGroup[message.associated_lobby_match_group] === $undefined ? message.associated_lobby_match_group : $root.ETFMatchGroup[message.associated_lobby_match_group] : message.associated_lobby_match_group; + if (message.ranked_banned_time != null && $Object.hasOwnProperty.call(message, "ranked_banned_time")) object.ranked_banned_time = message.ranked_banned_time; - if (message.ranked_low_priority_time != null && message.hasOwnProperty("ranked_low_priority_time")) + if (message.ranked_low_priority_time != null && $Object.hasOwnProperty.call(message, "ranked_low_priority_time")) object.ranked_low_priority_time = message.ranked_low_priority_time; if (message.matchmaking_queues && message.matchmaking_queues.length) { - object.matchmaking_queues = []; + object.matchmaking_queues = $Array(message.matchmaking_queues.length); for (var j = 0; j < message.matchmaking_queues.length; ++j) - object.matchmaking_queues[j] = $root.CSOTFParty.QueueEntry.toObject(message.matchmaking_queues[j], options); + object.matchmaking_queues[j] = $root.CSOTFParty.QueueEntry.toObject(message.matchmaking_queues[j], options, _depth + 1); } - if (message.leader_ui_state != null && message.hasOwnProperty("leader_ui_state")) - object.leader_ui_state = $root.TFSyncedMMUIState.toObject(message.leader_ui_state, options); + if (message.leader_ui_state != null && $Object.hasOwnProperty.call(message, "leader_ui_state")) + object.leader_ui_state = $root.TFSyncedMMUIState.toObject(message.leader_ui_state, options, _depth + 1); return object; }; @@ -21583,34 +28152,61 @@ * @instance * @returns {Object.} JSON object */ - CSOTFParty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOTFParty.prototype.toJSON = function() { + return CSOTFParty.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOTFParty + * @function getTypeUrl + * @memberof CSOTFParty + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOTFParty.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFParty"; }; CSOTFParty.QueueEntry = (function() { /** * Properties of a QueueEntry. - * @memberof CSOTFParty - * @interface IQueueEntry + * @typedef {Object} CSOTFParty.QueueEntry.$Properties * @property {ETFMatchGroup|null} [match_group] QueueEntry match_group * @property {number|null} [queued_time] QueueEntry queued_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a QueueEntry. + * @memberof CSOTFParty + * @interface IQueueEntry + * @augments CSOTFParty.QueueEntry.$Properties + * @deprecated Use CSOTFParty.QueueEntry.$Properties instead. + */ + + /** + * Shape of a QueueEntry. + * @typedef {CSOTFParty.QueueEntry.$Properties} CSOTFParty.QueueEntry.$Shape */ /** * Constructs a new QueueEntry. * @memberof CSOTFParty * @classdesc Represents a QueueEntry. - * @implements IQueueEntry * @constructor - * @param {CSOTFParty.IQueueEntry=} [properties] Properties to set + * @param {CSOTFParty.QueueEntry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function QueueEntry(properties) { + var QueueEntry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * QueueEntry match_group. @@ -21633,10 +28229,14 @@ * @function create * @memberof CSOTFParty.QueueEntry * @static - * @param {CSOTFParty.IQueueEntry=} [properties] Properties to set + * @param {CSOTFParty.QueueEntry.$Properties=} [properties] Properties to set * @returns {CSOTFParty.QueueEntry} QueueEntry instance + * @type {{ + * (properties: CSOTFParty.QueueEntry.$Shape): CSOTFParty.QueueEntry & CSOTFParty.QueueEntry.$Shape; + * (properties?: CSOTFParty.QueueEntry.$Properties): CSOTFParty.QueueEntry; + * }} */ - QueueEntry.create = function create(properties) { + QueueEntry.create = function(properties) { return new QueueEntry(properties); }; @@ -21645,17 +28245,24 @@ * @function encode * @memberof CSOTFParty.QueueEntry * @static - * @param {CSOTFParty.IQueueEntry} message QueueEntry message or plain object to encode + * @param {CSOTFParty.QueueEntry.$Properties} message QueueEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueueEntry.encode = function encode(message, writer) { + QueueEntry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.match_group); - if (message.queued_time != null && Object.hasOwnProperty.call(message, "queued_time")) + if (message.queued_time != null && $Object.hasOwnProperty.call(message, "queued_time")) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.queued_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -21664,12 +28271,12 @@ * @function encodeDelimited * @memberof CSOTFParty.QueueEntry * @static - * @param {CSOTFParty.IQueueEntry} message QueueEntry message or plain object to encode + * @param {CSOTFParty.QueueEntry.$Properties} message QueueEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueueEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueueEntry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -21679,28 +28286,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFParty.QueueEntry} QueueEntry + * @returns {CSOTFParty.QueueEntry & CSOTFParty.QueueEntry.$Shape} QueueEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueueEntry.decode = function decode(reader, length) { + QueueEntry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFParty.QueueEntry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFParty.QueueEntry(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.match_group = reader.int32(); - break; - case 2: - message.queued_time = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFMatchGroup[value] !== $undefined) + message.match_group = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 5) + break; + message.queued_time = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -21710,11 +28343,11 @@ * @memberof CSOTFParty.QueueEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFParty.QueueEntry} QueueEntry + * @returns {CSOTFParty.QueueEntry & CSOTFParty.QueueEntry.$Shape} QueueEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueueEntry.decodeDelimited = function decodeDelimited(reader) { + QueueEntry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -21728,10 +28361,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueueEntry.verify = function verify(message) { + QueueEntry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) switch (message.match_group) { default: return "match_group: enum value expected"; @@ -21760,7 +28397,7 @@ case 8: break; } - if (message.queued_time != null && message.hasOwnProperty("queued_time")) + if (message.queued_time != null && $Object.hasOwnProperty.call(message, "queued_time")) if (!$util.isInteger(message.queued_time)) return "queued_time: integer expected"; return null; @@ -21774,9 +28411,15 @@ * @param {Object.} object Plain object * @returns {CSOTFParty.QueueEntry} QueueEntry */ - QueueEntry.fromObject = function fromObject(object) { + QueueEntry.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFParty.QueueEntry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFParty.QueueEntry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFParty.QueueEntry(); switch (object.match_group) { case "k_eTFMatchGroup_Invalid": @@ -21871,6 +28514,7 @@ case 8: message.match_group = 8; break; + default: } if (object.queued_time != null) message.queued_time = object.queued_time >>> 0; @@ -21886,17 +28530,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueueEntry.toObject = function toObject(message, options) { + QueueEntry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.match_group = options.enums === String ? "k_eTFMatchGroup_Invalid" : -1; + object.match_group = options.enums === $String ? "k_eTFMatchGroup_Invalid" : -1; object.queued_time = 0; } - if (message.match_group != null && message.hasOwnProperty("match_group")) - object.match_group = options.enums === String ? $root.ETFMatchGroup[message.match_group] : message.match_group; - if (message.queued_time != null && message.hasOwnProperty("queued_time")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) + object.match_group = options.enums === $String ? $root.ETFMatchGroup[message.match_group] === $undefined ? message.match_group : $root.ETFMatchGroup[message.match_group] : message.match_group; + if (message.queued_time != null && $Object.hasOwnProperty.call(message, "queued_time")) object.queued_time = message.queued_time; return object; }; @@ -21908,8 +28556,22 @@ * @instance * @returns {Object.} JSON object */ - QueueEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + QueueEntry.prototype.toJSON = function() { + return QueueEntry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for QueueEntry + * @function getTypeUrl + * @memberof CSOTFParty.QueueEntry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + QueueEntry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFParty.QueueEntry"; }; return QueueEntry; @@ -21922,29 +28584,42 @@ /** * Properties of a CSOTFPartyInvite. - * @exports ICSOTFPartyInvite - * @interface ICSOTFPartyInvite + * @typedef {Object} CSOTFPartyInvite.$Properties * @property {number|Long|null} [group_id] CSOTFPartyInvite group_id * @property {number|Long|null} [inviter] CSOTFPartyInvite inviter - * @property {Array.|null} [members] CSOTFPartyInvite members + * @property {Array.|null} [members] CSOTFPartyInvite members * @property {CSOTFPartyInvite.Type|null} [type] CSOTFPartyInvite type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOTFPartyInvite. + * @exports ICSOTFPartyInvite + * @interface ICSOTFPartyInvite + * @augments CSOTFPartyInvite.$Properties + * @deprecated Use CSOTFPartyInvite.$Properties instead. + */ + + /** + * Shape of a CSOTFPartyInvite. + * @typedef {CSOTFPartyInvite.$Properties} CSOTFPartyInvite.$Shape */ /** * Constructs a new CSOTFPartyInvite. * @exports CSOTFPartyInvite * @classdesc Represents a CSOTFPartyInvite. - * @implements ICSOTFPartyInvite * @constructor - * @param {ICSOTFPartyInvite=} [properties] Properties to set + * @param {CSOTFPartyInvite.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOTFPartyInvite(properties) { + var CSOTFPartyInvite = function (properties) { this.members = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOTFPartyInvite group_id. @@ -21960,11 +28635,11 @@ * @memberof CSOTFPartyInvite * @instance */ - CSOTFPartyInvite.prototype.inviter = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CSOTFPartyInvite.prototype.inviter = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CSOTFPartyInvite members. - * @member {Array.} members + * @member {Array.} members * @memberof CSOTFPartyInvite * @instance */ @@ -21983,10 +28658,14 @@ * @function create * @memberof CSOTFPartyInvite * @static - * @param {ICSOTFPartyInvite=} [properties] Properties to set + * @param {CSOTFPartyInvite.$Properties=} [properties] Properties to set * @returns {CSOTFPartyInvite} CSOTFPartyInvite instance + * @type {{ + * (properties: CSOTFPartyInvite.$Shape): CSOTFPartyInvite & CSOTFPartyInvite.$Shape; + * (properties?: CSOTFPartyInvite.$Properties): CSOTFPartyInvite; + * }} */ - CSOTFPartyInvite.create = function create(properties) { + CSOTFPartyInvite.create = function(properties) { return new CSOTFPartyInvite(properties); }; @@ -21995,22 +28674,29 @@ * @function encode * @memberof CSOTFPartyInvite * @static - * @param {ICSOTFPartyInvite} message CSOTFPartyInvite message or plain object to encode + * @param {CSOTFPartyInvite.$Properties} message CSOTFPartyInvite message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFPartyInvite.encode = function encode(message, writer) { + CSOTFPartyInvite.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.group_id != null && Object.hasOwnProperty.call(message, "group_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.group_id != null && $Object.hasOwnProperty.call(message, "group_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.group_id); - if (message.inviter != null && Object.hasOwnProperty.call(message, "inviter")) + if (message.inviter != null && $Object.hasOwnProperty.call(message, "inviter")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.inviter); if (message.members != null && message.members.length) for (var i = 0; i < message.members.length; ++i) - $root.CSOTFPartyInvite.PartyMember.encode(message.members[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.CSOTFPartyInvite.PartyMember.encode(message.members[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22019,12 +28705,12 @@ * @function encodeDelimited * @memberof CSOTFPartyInvite * @static - * @param {ICSOTFPartyInvite} message CSOTFPartyInvite message or plain object to encode + * @param {CSOTFPartyInvite.$Properties} message CSOTFPartyInvite message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFPartyInvite.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOTFPartyInvite.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22034,36 +28720,68 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFPartyInvite} CSOTFPartyInvite + * @returns {CSOTFPartyInvite & CSOTFPartyInvite.$Shape} CSOTFPartyInvite * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFPartyInvite.decode = function decode(reader, length) { + CSOTFPartyInvite.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFPartyInvite(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFPartyInvite(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.group_id = reader.uint64(); - break; - case 2: - message.inviter = reader.fixed64(); - break; - case 4: - if (!(message.members && message.members.length)) - message.members = []; - message.members.push($root.CSOTFPartyInvite.PartyMember.decode(reader, reader.uint32())); - break; - case 5: - message.type = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.group_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.inviter = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.members && message.members.length)) + message.members = []; + message.members.push($root.CSOTFPartyInvite.PartyMember.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CSOTFPartyInvite.Type[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22073,11 +28791,11 @@ * @memberof CSOTFPartyInvite * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFPartyInvite} CSOTFPartyInvite + * @returns {CSOTFPartyInvite & CSOTFPartyInvite.$Shape} CSOTFPartyInvite * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFPartyInvite.decodeDelimited = function decodeDelimited(reader) { + CSOTFPartyInvite.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22091,25 +28809,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOTFPartyInvite.verify = function verify(message) { + CSOTFPartyInvite.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.group_id != null && message.hasOwnProperty("group_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.group_id != null && $Object.hasOwnProperty.call(message, "group_id")) if (!$util.isInteger(message.group_id) && !(message.group_id && $util.isInteger(message.group_id.low) && $util.isInteger(message.group_id.high))) return "group_id: integer|Long expected"; - if (message.inviter != null && message.hasOwnProperty("inviter")) + if (message.inviter != null && $Object.hasOwnProperty.call(message, "inviter")) if (!$util.isInteger(message.inviter) && !(message.inviter && $util.isInteger(message.inviter.low) && $util.isInteger(message.inviter.high))) return "inviter: integer|Long expected"; - if (message.members != null && message.hasOwnProperty("members")) { - if (!Array.isArray(message.members)) + if (message.members != null && $Object.hasOwnProperty.call(message, "members")) { + if (!$Array.isArray(message.members)) return "members: array expected"; for (var i = 0; i < message.members.length; ++i) { - var error = $root.CSOTFPartyInvite.PartyMember.verify(message.members[i]); + var error = $root.CSOTFPartyInvite.PartyMember.verify(message.members[i], _depth + 1); if (error) return "members." + error; } } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -22128,36 +28850,42 @@ * @param {Object.} object Plain object * @returns {CSOTFPartyInvite} CSOTFPartyInvite */ - CSOTFPartyInvite.fromObject = function fromObject(object) { + CSOTFPartyInvite.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFPartyInvite) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFPartyInvite: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFPartyInvite(); if (object.group_id != null) if ($util.Long) - (message.group_id = $util.Long.fromValue(object.group_id)).unsigned = true; + message.group_id = $util.Long.fromValue(object.group_id, true); else if (typeof object.group_id === "string") - message.group_id = parseInt(object.group_id, 10); + message.group_id = $parseInt(object.group_id, 10); else if (typeof object.group_id === "number") message.group_id = object.group_id; else if (typeof object.group_id === "object") message.group_id = new $util.LongBits(object.group_id.low >>> 0, object.group_id.high >>> 0).toNumber(true); if (object.inviter != null) if ($util.Long) - (message.inviter = $util.Long.fromValue(object.inviter)).unsigned = false; + message.inviter = $util.Long.fromValue(object.inviter, true); else if (typeof object.inviter === "string") - message.inviter = parseInt(object.inviter, 10); + message.inviter = $parseInt(object.inviter, 10); else if (typeof object.inviter === "number") message.inviter = object.inviter; else if (typeof object.inviter === "object") - message.inviter = new $util.LongBits(object.inviter.low >>> 0, object.inviter.high >>> 0).toNumber(); + message.inviter = new $util.LongBits(object.inviter.low >>> 0, object.inviter.high >>> 0).toNumber(true); if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".CSOTFPartyInvite.members: array expected"); - message.members = []; + if (!$Array.isArray(object.members)) + throw $TypeError(".CSOTFPartyInvite.members: array expected"); + message.members = $Array(object.members.length); for (var i = 0; i < object.members.length; ++i) { - if (typeof object.members[i] !== "object") - throw TypeError(".CSOTFPartyInvite.members: object expected"); - message.members[i] = $root.CSOTFPartyInvite.PartyMember.fromObject(object.members[i]); + if (!$util.isObject(object.members[i])) + throw $TypeError(".CSOTFPartyInvite.members: object expected"); + message.members[i] = $root.CSOTFPartyInvite.PartyMember.fromObject(object.members[i], _depth + 1); } } switch (object.type) { @@ -22169,6 +28897,7 @@ case 2: message.type = 2; break; + default: } return message; }; @@ -22182,42 +28911,50 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOTFPartyInvite.toObject = function toObject(message, options) { + CSOTFPartyInvite.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.members = []; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.group_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.group_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.group_id = options.longs === String ? "0" : 0; + object.group_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.inviter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.inviter = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.inviter = options.longs === String ? "0" : 0; - object.type = options.enums === String ? "PENDING_INVITE" : 1; - } - if (message.group_id != null && message.hasOwnProperty("group_id")) - if (typeof message.group_id === "number") - object.group_id = options.longs === String ? String(message.group_id) : message.group_id; + object.inviter = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.type = options.enums === $String ? "PENDING_INVITE" : 1; + } + if (message.group_id != null && $Object.hasOwnProperty.call(message, "group_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.group_id = typeof message.group_id === "number" ? $BigInt(message.group_id) : $util.Long.fromBits(message.group_id.low >>> 0, message.group_id.high >>> 0, true).toBigInt(); + else if (typeof message.group_id === "number") + object.group_id = options.longs === $String ? $String(message.group_id) : message.group_id; else - object.group_id = options.longs === String ? $util.Long.prototype.toString.call(message.group_id) : options.longs === Number ? new $util.LongBits(message.group_id.low >>> 0, message.group_id.high >>> 0).toNumber(true) : message.group_id; - if (message.inviter != null && message.hasOwnProperty("inviter")) - if (typeof message.inviter === "number") - object.inviter = options.longs === String ? String(message.inviter) : message.inviter; + object.group_id = options.longs === $String ? $util.Long.prototype.toString.call(message.group_id) : options.longs === $Number ? new $util.LongBits(message.group_id.low >>> 0, message.group_id.high >>> 0).toNumber(true) : message.group_id; + if (message.inviter != null && $Object.hasOwnProperty.call(message, "inviter")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.inviter = typeof message.inviter === "number" ? $BigInt(message.inviter) : $util.Long.fromBits(message.inviter.low >>> 0, message.inviter.high >>> 0, true).toBigInt(); + else if (typeof message.inviter === "number") + object.inviter = options.longs === $String ? $String(message.inviter) : message.inviter; else - object.inviter = options.longs === String ? $util.Long.prototype.toString.call(message.inviter) : options.longs === Number ? new $util.LongBits(message.inviter.low >>> 0, message.inviter.high >>> 0).toNumber() : message.inviter; + object.inviter = options.longs === $String ? $util.Long.prototype.toString.call(message.inviter) : options.longs === $Number ? new $util.LongBits(message.inviter.low >>> 0, message.inviter.high >>> 0).toNumber(true) : message.inviter; if (message.members && message.members.length) { - object.members = []; + object.members = $Array(message.members.length); for (var j = 0; j < message.members.length; ++j) - object.members[j] = $root.CSOTFPartyInvite.PartyMember.toObject(message.members[j], options); + object.members[j] = $root.CSOTFPartyInvite.PartyMember.toObject(message.members[j], options, _depth + 1); } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.CSOTFPartyInvite.Type[message.type] : message.type; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.CSOTFPartyInvite.Type[message.type] === $undefined ? message.type : $root.CSOTFPartyInvite.Type[message.type] : message.type; return object; }; @@ -22228,33 +28965,60 @@ * @instance * @returns {Object.} JSON object */ - CSOTFPartyInvite.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOTFPartyInvite.prototype.toJSON = function() { + return CSOTFPartyInvite.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOTFPartyInvite + * @function getTypeUrl + * @memberof CSOTFPartyInvite + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOTFPartyInvite.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFPartyInvite"; }; CSOTFPartyInvite.PartyMember = (function() { + /** + * Properties of a PartyMember. + * @typedef {Object} CSOTFPartyInvite.PartyMember.$Properties + * @property {number|Long|null} [steamid] PartyMember steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a PartyMember. * @memberof CSOTFPartyInvite * @interface IPartyMember - * @property {number|Long|null} [steamid] PartyMember steamid + * @augments CSOTFPartyInvite.PartyMember.$Properties + * @deprecated Use CSOTFPartyInvite.PartyMember.$Properties instead. + */ + + /** + * Shape of a PartyMember. + * @typedef {CSOTFPartyInvite.PartyMember.$Properties} CSOTFPartyInvite.PartyMember.$Shape */ /** * Constructs a new PartyMember. * @memberof CSOTFPartyInvite * @classdesc Represents a PartyMember. - * @implements IPartyMember * @constructor - * @param {CSOTFPartyInvite.IPartyMember=} [properties] Properties to set + * @param {CSOTFPartyInvite.PartyMember.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PartyMember(properties) { + var PartyMember = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PartyMember steamid. @@ -22262,17 +29026,21 @@ * @memberof CSOTFPartyInvite.PartyMember * @instance */ - PartyMember.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PartyMember.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new PartyMember instance using the specified properties. * @function create * @memberof CSOTFPartyInvite.PartyMember * @static - * @param {CSOTFPartyInvite.IPartyMember=} [properties] Properties to set + * @param {CSOTFPartyInvite.PartyMember.$Properties=} [properties] Properties to set * @returns {CSOTFPartyInvite.PartyMember} PartyMember instance + * @type {{ + * (properties: CSOTFPartyInvite.PartyMember.$Shape): CSOTFPartyInvite.PartyMember & CSOTFPartyInvite.PartyMember.$Shape; + * (properties?: CSOTFPartyInvite.PartyMember.$Properties): CSOTFPartyInvite.PartyMember; + * }} */ - PartyMember.create = function create(properties) { + PartyMember.create = function(properties) { return new PartyMember(properties); }; @@ -22281,15 +29049,22 @@ * @function encode * @memberof CSOTFPartyInvite.PartyMember * @static - * @param {CSOTFPartyInvite.IPartyMember} message PartyMember message or plain object to encode + * @param {CSOTFPartyInvite.PartyMember.$Properties} message PartyMember message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartyMember.encode = function encode(message, writer) { + PartyMember.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22298,12 +29073,12 @@ * @function encodeDelimited * @memberof CSOTFPartyInvite.PartyMember * @static - * @param {CSOTFPartyInvite.IPartyMember} message PartyMember message or plain object to encode + * @param {CSOTFPartyInvite.PartyMember.$Properties} message PartyMember message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartyMember.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PartyMember.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22313,25 +29088,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFPartyInvite.PartyMember} PartyMember + * @returns {CSOTFPartyInvite.PartyMember & CSOTFPartyInvite.PartyMember.$Shape} PartyMember * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartyMember.decode = function decode(reader, length) { + PartyMember.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFPartyInvite.PartyMember(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFPartyInvite.PartyMember(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22341,11 +29133,11 @@ * @memberof CSOTFPartyInvite.PartyMember * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFPartyInvite.PartyMember} PartyMember + * @returns {CSOTFPartyInvite.PartyMember & CSOTFPartyInvite.PartyMember.$Shape} PartyMember * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartyMember.decodeDelimited = function decodeDelimited(reader) { + PartyMember.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22359,10 +29151,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PartyMember.verify = function verify(message) { + PartyMember.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -22376,19 +29172,25 @@ * @param {Object.} object Plain object * @returns {CSOTFPartyInvite.PartyMember} PartyMember */ - PartyMember.fromObject = function fromObject(object) { + PartyMember.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFPartyInvite.PartyMember) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFPartyInvite.PartyMember: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFPartyInvite.PartyMember(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -22401,21 +29203,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartyMember.toObject = function toObject(message, options) { + PartyMember.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -22426,8 +29234,22 @@ * @instance * @returns {Object.} JSON object */ - PartyMember.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PartyMember.prototype.toJSON = function() { + return PartyMember.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PartyMember + * @function getTypeUrl + * @memberof CSOTFPartyInvite.PartyMember + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PartyMember.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFPartyInvite.PartyMember"; }; return PartyMember; @@ -22441,7 +29263,7 @@ * @property {number} PENDING_JOIN_REQUEST=2 PENDING_JOIN_REQUEST value */ CSOTFPartyInvite.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "PENDING_INVITE"] = 1; values[valuesById[2] = "PENDING_JOIN_REQUEST"] = 2; return values; @@ -22454,8 +29276,7 @@ /** * Properties of a CTFLobbyPlayerProto. - * @exports ICTFLobbyPlayerProto - * @interface ICTFLobbyPlayerProto + * @typedef {Object} CTFLobbyPlayerProto.$Properties * @property {number|Long|null} [id] CTFLobbyPlayerProto id * @property {TF_GC_TEAM|null} [team] CTFLobbyPlayerProto team * @property {CTFLobbyPlayerProto.ConnectState|null} [connect_state] CTFLobbyPlayerProto connect_state @@ -22468,22 +29289,36 @@ * @property {number|null} [normalized_rating] CTFLobbyPlayerProto normalized_rating * @property {number|null} [normalized_uncertainty] CTFLobbyPlayerProto normalized_uncertainty * @property {number|null} [rank] CTFLobbyPlayerProto rank + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CTFLobbyPlayerProto. + * @exports ICTFLobbyPlayerProto + * @interface ICTFLobbyPlayerProto + * @augments CTFLobbyPlayerProto.$Properties + * @deprecated Use CTFLobbyPlayerProto.$Properties instead. + */ + + /** + * Shape of a CTFLobbyPlayerProto. + * @typedef {CTFLobbyPlayerProto.$Properties} CTFLobbyPlayerProto.$Shape */ /** * Constructs a new CTFLobbyPlayerProto. * @exports CTFLobbyPlayerProto * @classdesc Represents a CTFLobbyPlayerProto. - * @implements ICTFLobbyPlayerProto * @constructor - * @param {ICTFLobbyPlayerProto=} [properties] Properties to set + * @param {CTFLobbyPlayerProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CTFLobbyPlayerProto(properties) { + var CTFLobbyPlayerProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CTFLobbyPlayerProto id. @@ -22491,7 +29326,7 @@ * @memberof CTFLobbyPlayerProto * @instance */ - CTFLobbyPlayerProto.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CTFLobbyPlayerProto.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CTFLobbyPlayerProto team. @@ -22586,10 +29421,14 @@ * @function create * @memberof CTFLobbyPlayerProto * @static - * @param {ICTFLobbyPlayerProto=} [properties] Properties to set + * @param {CTFLobbyPlayerProto.$Properties=} [properties] Properties to set * @returns {CTFLobbyPlayerProto} CTFLobbyPlayerProto instance + * @type {{ + * (properties: CTFLobbyPlayerProto.$Shape): CTFLobbyPlayerProto & CTFLobbyPlayerProto.$Shape; + * (properties?: CTFLobbyPlayerProto.$Properties): CTFLobbyPlayerProto; + * }} */ - CTFLobbyPlayerProto.create = function create(properties) { + CTFLobbyPlayerProto.create = function(properties) { return new CTFLobbyPlayerProto(properties); }; @@ -22598,37 +29437,44 @@ * @function encode * @memberof CTFLobbyPlayerProto * @static - * @param {ICTFLobbyPlayerProto} message CTFLobbyPlayerProto message or plain object to encode + * @param {CTFLobbyPlayerProto.$Properties} message CTFLobbyPlayerProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFLobbyPlayerProto.encode = function encode(message, writer) { + CTFLobbyPlayerProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.id); - if (message.team != null && Object.hasOwnProperty.call(message, "team")) + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.team); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.original_party_id != null && Object.hasOwnProperty.call(message, "original_party_id")) + if (message.original_party_id != null && $Object.hasOwnProperty.call(message, "original_party_id")) writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.original_party_id); - if (message.connect_state != null && Object.hasOwnProperty.call(message, "connect_state")) + if (message.connect_state != null && $Object.hasOwnProperty.call(message, "connect_state")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.connect_state); - if (message.squad_surplus != null && Object.hasOwnProperty.call(message, "squad_surplus")) + if (message.squad_surplus != null && $Object.hasOwnProperty.call(message, "squad_surplus")) writer.uint32(/* id 14, wireType 0 =*/112).bool(message.squad_surplus); - if (message.badge_level != null && Object.hasOwnProperty.call(message, "badge_level")) + if (message.badge_level != null && $Object.hasOwnProperty.call(message, "badge_level")) writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.badge_level); - if (message.last_connect_time != null && Object.hasOwnProperty.call(message, "last_connect_time")) + if (message.last_connect_time != null && $Object.hasOwnProperty.call(message, "last_connect_time")) writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.last_connect_time); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 19, wireType 0 =*/152).int32(message.type); - if (message.normalized_rating != null && Object.hasOwnProperty.call(message, "normalized_rating")) + if (message.normalized_rating != null && $Object.hasOwnProperty.call(message, "normalized_rating")) writer.uint32(/* id 20, wireType 1 =*/161).double(message.normalized_rating); - if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.rank); - if (message.normalized_uncertainty != null && Object.hasOwnProperty.call(message, "normalized_uncertainty")) + if (message.normalized_uncertainty != null && $Object.hasOwnProperty.call(message, "normalized_uncertainty")) writer.uint32(/* id 22, wireType 1 =*/177).double(message.normalized_uncertainty); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -22637,12 +29483,12 @@ * @function encodeDelimited * @memberof CTFLobbyPlayerProto * @static - * @param {ICTFLobbyPlayerProto} message CTFLobbyPlayerProto message or plain object to encode + * @param {CTFLobbyPlayerProto.$Properties} message CTFLobbyPlayerProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFLobbyPlayerProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CTFLobbyPlayerProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -22652,58 +29498,126 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CTFLobbyPlayerProto} CTFLobbyPlayerProto + * @returns {CTFLobbyPlayerProto & CTFLobbyPlayerProto.$Shape} CTFLobbyPlayerProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFLobbyPlayerProto.decode = function decode(reader, length) { + CTFLobbyPlayerProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CTFLobbyPlayerProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CTFLobbyPlayerProto(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.fixed64(); - break; - case 3: - message.team = reader.int32(); - break; - case 13: - message.connect_state = reader.int32(); - break; - case 6: - message.name = reader.string(); - break; - case 12: - message.original_party_id = reader.uint64(); - break; - case 14: - message.squad_surplus = reader.bool(); - break; - case 15: - message.badge_level = reader.uint32(); - break; - case 17: - message.last_connect_time = reader.uint32(); - break; - case 19: - message.type = reader.int32(); - break; - case 20: - message.normalized_rating = reader.double(); - break; - case 22: - message.normalized_uncertainty = reader.double(); - break; - case 21: - message.rank = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.TF_GC_TEAM[value] !== $undefined) + message.team = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 13: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CTFLobbyPlayerProto.ConnectState[value] !== $undefined) + message.connect_state = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 6: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.original_party_id = reader.uint64(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.squad_surplus = reader.bool(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.badge_level = reader.uint32(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.last_connect_time = reader.uint32(); + continue; + } + case 19: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CTFLobbyPlayerProto.Type[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 20: { + if (wireType !== 1) + break; + message.normalized_rating = reader.double(); + continue; + } + case 22: { + if (wireType !== 1) + break; + message.normalized_uncertainty = reader.double(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.rank = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -22713,11 +29627,11 @@ * @memberof CTFLobbyPlayerProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CTFLobbyPlayerProto} CTFLobbyPlayerProto + * @returns {CTFLobbyPlayerProto & CTFLobbyPlayerProto.$Shape} CTFLobbyPlayerProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFLobbyPlayerProto.decodeDelimited = function decodeDelimited(reader) { + CTFLobbyPlayerProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -22731,13 +29645,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CTFLobbyPlayerProto.verify = function verify(message) { + CTFLobbyPlayerProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) return "id: integer|Long expected"; - if (message.team != null && message.hasOwnProperty("team")) + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) switch (message.team) { default: return "team: enum value expected"; @@ -22749,7 +29667,7 @@ case 5: break; } - if (message.connect_state != null && message.hasOwnProperty("connect_state")) + if (message.connect_state != null && $Object.hasOwnProperty.call(message, "connect_state")) switch (message.connect_state) { default: return "connect_state: enum value expected"; @@ -22760,22 +29678,22 @@ case 5: break; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.original_party_id != null && message.hasOwnProperty("original_party_id")) + if (message.original_party_id != null && $Object.hasOwnProperty.call(message, "original_party_id")) if (!$util.isInteger(message.original_party_id) && !(message.original_party_id && $util.isInteger(message.original_party_id.low) && $util.isInteger(message.original_party_id.high))) return "original_party_id: integer|Long expected"; - if (message.squad_surplus != null && message.hasOwnProperty("squad_surplus")) + if (message.squad_surplus != null && $Object.hasOwnProperty.call(message, "squad_surplus")) if (typeof message.squad_surplus !== "boolean") return "squad_surplus: boolean expected"; - if (message.badge_level != null && message.hasOwnProperty("badge_level")) + if (message.badge_level != null && $Object.hasOwnProperty.call(message, "badge_level")) if (!$util.isInteger(message.badge_level)) return "badge_level: integer expected"; - if (message.last_connect_time != null && message.hasOwnProperty("last_connect_time")) + if (message.last_connect_time != null && $Object.hasOwnProperty.call(message, "last_connect_time")) if (!$util.isInteger(message.last_connect_time)) return "last_connect_time: integer expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -22785,13 +29703,13 @@ case 3: break; } - if (message.normalized_rating != null && message.hasOwnProperty("normalized_rating")) + if (message.normalized_rating != null && $Object.hasOwnProperty.call(message, "normalized_rating")) if (typeof message.normalized_rating !== "number") return "normalized_rating: number expected"; - if (message.normalized_uncertainty != null && message.hasOwnProperty("normalized_uncertainty")) + if (message.normalized_uncertainty != null && $Object.hasOwnProperty.call(message, "normalized_uncertainty")) if (typeof message.normalized_uncertainty !== "number") return "normalized_uncertainty: number expected"; - if (message.rank != null && message.hasOwnProperty("rank")) + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) if (!$util.isInteger(message.rank)) return "rank: integer expected"; return null; @@ -22805,19 +29723,25 @@ * @param {Object.} object Plain object * @returns {CTFLobbyPlayerProto} CTFLobbyPlayerProto */ - CTFLobbyPlayerProto.fromObject = function fromObject(object) { + CTFLobbyPlayerProto.fromObject = function (object, _depth) { if (object instanceof $root.CTFLobbyPlayerProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".CTFLobbyPlayerProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CTFLobbyPlayerProto(); if (object.id != null) if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = false; + message.id = $util.Long.fromValue(object.id, true); else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); + message.id = $parseInt(object.id, 10); else if (typeof object.id === "number") message.id = object.id; else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); + message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(true); switch (object.team) { case "TF_GC_TEAM_DEFENDERS": case 0: @@ -22843,6 +29767,7 @@ case 5: message.team = 5; break; + default: } switch (object.connect_state) { case "INVALID": @@ -22865,20 +29790,21 @@ case 5: message.connect_state = 5; break; + default: } if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.original_party_id != null) if ($util.Long) - (message.original_party_id = $util.Long.fromValue(object.original_party_id)).unsigned = true; + message.original_party_id = $util.Long.fromValue(object.original_party_id, true); else if (typeof object.original_party_id === "string") - message.original_party_id = parseInt(object.original_party_id, 10); + message.original_party_id = $parseInt(object.original_party_id, 10); else if (typeof object.original_party_id === "number") message.original_party_id = object.original_party_id; else if (typeof object.original_party_id === "object") message.original_party_id = new $util.LongBits(object.original_party_id.low >>> 0, object.original_party_id.high >>> 0).toNumber(true); if (object.squad_surplus != null) - message.squad_surplus = Boolean(object.squad_surplus); + message.squad_surplus = $Boolean(object.squad_surplus); if (object.badge_level != null) message.badge_level = object.badge_level >>> 0; if (object.last_connect_time != null) @@ -22900,11 +29826,12 @@ case 3: message.type = 3; break; + default: } if (object.normalized_rating != null) - message.normalized_rating = Number(object.normalized_rating); + message.normalized_rating = $Number(object.normalized_rating); if (object.normalized_uncertainty != null) - message.normalized_uncertainty = Number(object.normalized_uncertainty); + message.normalized_uncertainty = $Number(object.normalized_uncertainty); if (object.rank != null) message.rank = object.rank >>> 0; return message; @@ -22919,62 +29846,70 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CTFLobbyPlayerProto.toObject = function toObject(message, options) { + CTFLobbyPlayerProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.id = options.longs === String ? "0" : 0; - object.team = options.enums === String ? "TF_GC_TEAM_DEFENDERS" : 0; + object.id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.team = options.enums === $String ? "TF_GC_TEAM_DEFENDERS" : 0; object.name = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.original_party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.original_party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.original_party_id = options.longs === String ? "0" : 0; - object.connect_state = options.enums === String ? "INVALID" : 0; + object.original_party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.connect_state = options.enums === $String ? "INVALID" : 0; object.squad_surplus = false; object.badge_level = 0; object.last_connect_time = 0; - object.type = options.enums === String ? "INVALID_PLAYER" : 0; + object.type = options.enums === $String ? "INVALID_PLAYER" : 0; object.normalized_rating = 0; object.rank = 0; object.normalized_uncertainty = 0; } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.id = typeof message.id === "number" ? $BigInt(message.id) : $util.Long.fromBits(message.id.low >>> 0, message.id.high >>> 0, true).toBigInt(); + else if (typeof message.id === "number") + object.id = options.longs === $String ? $String(message.id) : message.id; else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; - if (message.team != null && message.hasOwnProperty("team")) - object.team = options.enums === String ? $root.TF_GC_TEAM[message.team] : message.team; - if (message.name != null && message.hasOwnProperty("name")) + object.id = options.longs === $String ? $util.Long.prototype.toString.call(message.id) : options.longs === $Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) + object.team = options.enums === $String ? $root.TF_GC_TEAM[message.team] === $undefined ? message.team : $root.TF_GC_TEAM[message.team] : message.team; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.original_party_id != null && message.hasOwnProperty("original_party_id")) - if (typeof message.original_party_id === "number") - object.original_party_id = options.longs === String ? String(message.original_party_id) : message.original_party_id; + if (message.original_party_id != null && $Object.hasOwnProperty.call(message, "original_party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.original_party_id = typeof message.original_party_id === "number" ? $BigInt(message.original_party_id) : $util.Long.fromBits(message.original_party_id.low >>> 0, message.original_party_id.high >>> 0, true).toBigInt(); + else if (typeof message.original_party_id === "number") + object.original_party_id = options.longs === $String ? $String(message.original_party_id) : message.original_party_id; else - object.original_party_id = options.longs === String ? $util.Long.prototype.toString.call(message.original_party_id) : options.longs === Number ? new $util.LongBits(message.original_party_id.low >>> 0, message.original_party_id.high >>> 0).toNumber(true) : message.original_party_id; - if (message.connect_state != null && message.hasOwnProperty("connect_state")) - object.connect_state = options.enums === String ? $root.CTFLobbyPlayerProto.ConnectState[message.connect_state] : message.connect_state; - if (message.squad_surplus != null && message.hasOwnProperty("squad_surplus")) + object.original_party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.original_party_id) : options.longs === $Number ? new $util.LongBits(message.original_party_id.low >>> 0, message.original_party_id.high >>> 0).toNumber(true) : message.original_party_id; + if (message.connect_state != null && $Object.hasOwnProperty.call(message, "connect_state")) + object.connect_state = options.enums === $String ? $root.CTFLobbyPlayerProto.ConnectState[message.connect_state] === $undefined ? message.connect_state : $root.CTFLobbyPlayerProto.ConnectState[message.connect_state] : message.connect_state; + if (message.squad_surplus != null && $Object.hasOwnProperty.call(message, "squad_surplus")) object.squad_surplus = message.squad_surplus; - if (message.badge_level != null && message.hasOwnProperty("badge_level")) + if (message.badge_level != null && $Object.hasOwnProperty.call(message, "badge_level")) object.badge_level = message.badge_level; - if (message.last_connect_time != null && message.hasOwnProperty("last_connect_time")) + if (message.last_connect_time != null && $Object.hasOwnProperty.call(message, "last_connect_time")) object.last_connect_time = message.last_connect_time; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.CTFLobbyPlayerProto.Type[message.type] : message.type; - if (message.normalized_rating != null && message.hasOwnProperty("normalized_rating")) - object.normalized_rating = options.json && !isFinite(message.normalized_rating) ? String(message.normalized_rating) : message.normalized_rating; - if (message.rank != null && message.hasOwnProperty("rank")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.CTFLobbyPlayerProto.Type[message.type] === $undefined ? message.type : $root.CTFLobbyPlayerProto.Type[message.type] : message.type; + if (message.normalized_rating != null && $Object.hasOwnProperty.call(message, "normalized_rating")) + object.normalized_rating = options.json && !$isFinite(message.normalized_rating) ? $String(message.normalized_rating) : message.normalized_rating; + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) object.rank = message.rank; - if (message.normalized_uncertainty != null && message.hasOwnProperty("normalized_uncertainty")) - object.normalized_uncertainty = options.json && !isFinite(message.normalized_uncertainty) ? String(message.normalized_uncertainty) : message.normalized_uncertainty; + if (message.normalized_uncertainty != null && $Object.hasOwnProperty.call(message, "normalized_uncertainty")) + object.normalized_uncertainty = options.json && !$isFinite(message.normalized_uncertainty) ? $String(message.normalized_uncertainty) : message.normalized_uncertainty; return object; }; @@ -22985,8 +29920,22 @@ * @instance * @returns {Object.} JSON object */ - CTFLobbyPlayerProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CTFLobbyPlayerProto.prototype.toJSON = function() { + return CTFLobbyPlayerProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CTFLobbyPlayerProto + * @function getTypeUrl + * @memberof CTFLobbyPlayerProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CTFLobbyPlayerProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CTFLobbyPlayerProto"; }; /** @@ -23000,7 +29949,7 @@ * @property {number} DISCONNECTED=5 DISCONNECTED value */ CTFLobbyPlayerProto.ConnectState = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "INVALID"] = 0; values[valuesById[1] = "RESERVATION_PENDING"] = 1; values[valuesById[2] = "RESERVED"] = 2; @@ -23019,7 +29968,7 @@ * @property {number} OBSERVING_PLAYER=3 OBSERVING_PLAYER value */ CTFLobbyPlayerProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "INVALID_PLAYER"] = 0; values[valuesById[1] = "MATCH_PLAYER"] = 1; values[valuesById[2] = "STANDBY_PLAYER"] = 2; @@ -23034,26 +29983,39 @@ /** * Properties of a CTFLobbyInviteProto. - * @exports ICTFLobbyInviteProto - * @interface ICTFLobbyInviteProto + * @typedef {Object} CTFLobbyInviteProto.$Properties * @property {number|Long|null} [lobby_id] CTFLobbyInviteProto lobby_id * @property {ETFMatchGroup|null} [match_group] CTFLobbyInviteProto match_group + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CTFLobbyInviteProto. + * @exports ICTFLobbyInviteProto + * @interface ICTFLobbyInviteProto + * @augments CTFLobbyInviteProto.$Properties + * @deprecated Use CTFLobbyInviteProto.$Properties instead. + */ + + /** + * Shape of a CTFLobbyInviteProto. + * @typedef {CTFLobbyInviteProto.$Properties} CTFLobbyInviteProto.$Shape */ /** * Constructs a new CTFLobbyInviteProto. * @exports CTFLobbyInviteProto * @classdesc Represents a CTFLobbyInviteProto. - * @implements ICTFLobbyInviteProto * @constructor - * @param {ICTFLobbyInviteProto=} [properties] Properties to set + * @param {CTFLobbyInviteProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CTFLobbyInviteProto(properties) { + var CTFLobbyInviteProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CTFLobbyInviteProto lobby_id. @@ -23061,7 +30023,7 @@ * @memberof CTFLobbyInviteProto * @instance */ - CTFLobbyInviteProto.prototype.lobby_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CTFLobbyInviteProto.prototype.lobby_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CTFLobbyInviteProto match_group. @@ -23076,10 +30038,14 @@ * @function create * @memberof CTFLobbyInviteProto * @static - * @param {ICTFLobbyInviteProto=} [properties] Properties to set + * @param {CTFLobbyInviteProto.$Properties=} [properties] Properties to set * @returns {CTFLobbyInviteProto} CTFLobbyInviteProto instance + * @type {{ + * (properties: CTFLobbyInviteProto.$Shape): CTFLobbyInviteProto & CTFLobbyInviteProto.$Shape; + * (properties?: CTFLobbyInviteProto.$Properties): CTFLobbyInviteProto; + * }} */ - CTFLobbyInviteProto.create = function create(properties) { + CTFLobbyInviteProto.create = function(properties) { return new CTFLobbyInviteProto(properties); }; @@ -23088,17 +30054,24 @@ * @function encode * @memberof CTFLobbyInviteProto * @static - * @param {ICTFLobbyInviteProto} message CTFLobbyInviteProto message or plain object to encode + * @param {CTFLobbyInviteProto.$Properties} message CTFLobbyInviteProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFLobbyInviteProto.encode = function encode(message, writer) { + CTFLobbyInviteProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.lobby_id); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.match_group); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23107,12 +30080,12 @@ * @function encodeDelimited * @memberof CTFLobbyInviteProto * @static - * @param {ICTFLobbyInviteProto} message CTFLobbyInviteProto message or plain object to encode + * @param {CTFLobbyInviteProto.$Properties} message CTFLobbyInviteProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CTFLobbyInviteProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CTFLobbyInviteProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23122,28 +30095,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CTFLobbyInviteProto} CTFLobbyInviteProto + * @returns {CTFLobbyInviteProto & CTFLobbyInviteProto.$Shape} CTFLobbyInviteProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFLobbyInviteProto.decode = function decode(reader, length) { + CTFLobbyInviteProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CTFLobbyInviteProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CTFLobbyInviteProto(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lobby_id = reader.fixed64(); - break; - case 2: - message.match_group = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.lobby_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFMatchGroup[value] !== $undefined) + message.match_group = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23153,11 +30152,11 @@ * @memberof CTFLobbyInviteProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CTFLobbyInviteProto} CTFLobbyInviteProto + * @returns {CTFLobbyInviteProto & CTFLobbyInviteProto.$Shape} CTFLobbyInviteProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CTFLobbyInviteProto.decodeDelimited = function decodeDelimited(reader) { + CTFLobbyInviteProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23171,13 +30170,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CTFLobbyInviteProto.verify = function verify(message) { + CTFLobbyInviteProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) switch (message.match_group) { default: return "match_group: enum value expected"; @@ -23217,19 +30220,25 @@ * @param {Object.} object Plain object * @returns {CTFLobbyInviteProto} CTFLobbyInviteProto */ - CTFLobbyInviteProto.fromObject = function fromObject(object) { + CTFLobbyInviteProto.fromObject = function (object, _depth) { if (object instanceof $root.CTFLobbyInviteProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".CTFLobbyInviteProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CTFLobbyInviteProto(); if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = false; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") - message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(); + message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(true); switch (object.match_group) { case "k_eTFMatchGroup_Invalid": case -1: @@ -23323,6 +30332,7 @@ case 8: message.match_group = 8; break; + default: } return message; }; @@ -23336,25 +30346,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CTFLobbyInviteProto.toObject = function toObject(message, options) { + CTFLobbyInviteProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; - object.match_group = options.enums === String ? "k_eTFMatchGroup_Invalid" : -1; - } - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.match_group = options.enums === $String ? "k_eTFMatchGroup_Invalid" : -1; + } + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber() : message.lobby_id; - if (message.match_group != null && message.hasOwnProperty("match_group")) - object.match_group = options.enums === String ? $root.ETFMatchGroup[message.match_group] : message.match_group; + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) + object.match_group = options.enums === $String ? $root.ETFMatchGroup[message.match_group] === $undefined ? message.match_group : $root.ETFMatchGroup[message.match_group] : message.match_group; return object; }; @@ -23365,8 +30381,22 @@ * @instance * @returns {Object.} JSON object */ - CTFLobbyInviteProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CTFLobbyInviteProto.prototype.toJSON = function() { + return CTFLobbyInviteProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CTFLobbyInviteProto + * @function getTypeUrl + * @memberof CTFLobbyInviteProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CTFLobbyInviteProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CTFLobbyInviteProto"; }; return CTFLobbyInviteProto; @@ -23376,10 +30406,9 @@ /** * Properties of a CSOTFGameServerLobby. - * @exports ICSOTFGameServerLobby - * @interface ICSOTFGameServerLobby + * @typedef {Object} CSOTFGameServerLobby.$Properties * @property {number|Long|null} [lobby_id] CSOTFGameServerLobby lobby_id - * @property {Array.|null} [members] CSOTFGameServerLobby members + * @property {Array.|null} [members] CSOTFGameServerLobby members * @property {number|Long|null} [server_id] CSOTFGameServerLobby server_id * @property {CSOTFGameServerLobby.State|null} [state] CSOTFGameServerLobby state * @property {string|null} [connect] CSOTFGameServerLobby connect @@ -23397,26 +30426,40 @@ * @property {CSOTFGameServerLobby.WarMatch|null} [is_war_match] CSOTFGameServerLobby is_war_match * @property {Array.|null} [next_maps_for_vote] CSOTFGameServerLobby next_maps_for_vote * @property {number|null} [lobby_mm_version] CSOTFGameServerLobby lobby_mm_version - * @property {Array.|null} [pending_members] CSOTFGameServerLobby pending_members + * @property {Array.|null} [pending_members] CSOTFGameServerLobby pending_members + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOTFGameServerLobby. + * @exports ICSOTFGameServerLobby + * @interface ICSOTFGameServerLobby + * @augments CSOTFGameServerLobby.$Properties + * @deprecated Use CSOTFGameServerLobby.$Properties instead. + */ + + /** + * Shape of a CSOTFGameServerLobby. + * @typedef {CSOTFGameServerLobby.$Properties} CSOTFGameServerLobby.$Shape */ /** * Constructs a new CSOTFGameServerLobby. * @exports CSOTFGameServerLobby * @classdesc Represents a CSOTFGameServerLobby. - * @implements ICSOTFGameServerLobby * @constructor - * @param {ICSOTFGameServerLobby=} [properties] Properties to set + * @param {CSOTFGameServerLobby.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOTFGameServerLobby(properties) { + var CSOTFGameServerLobby = function (properties) { this.members = []; this.next_maps_for_vote = []; this.pending_members = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOTFGameServerLobby lobby_id. @@ -23428,7 +30471,7 @@ /** * CSOTFGameServerLobby members. - * @member {Array.} members + * @member {Array.} members * @memberof CSOTFGameServerLobby * @instance */ @@ -23440,7 +30483,7 @@ * @memberof CSOTFGameServerLobby * @instance */ - CSOTFGameServerLobby.prototype.server_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CSOTFGameServerLobby.prototype.server_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CSOTFGameServerLobby state. @@ -23572,7 +30615,7 @@ /** * CSOTFGameServerLobby pending_members. - * @member {Array.} pending_members + * @member {Array.} pending_members * @memberof CSOTFGameServerLobby * @instance */ @@ -23583,10 +30626,14 @@ * @function create * @memberof CSOTFGameServerLobby * @static - * @param {ICSOTFGameServerLobby=} [properties] Properties to set + * @param {CSOTFGameServerLobby.$Properties=} [properties] Properties to set * @returns {CSOTFGameServerLobby} CSOTFGameServerLobby instance + * @type {{ + * (properties: CSOTFGameServerLobby.$Shape): CSOTFGameServerLobby & CSOTFGameServerLobby.$Shape; + * (properties?: CSOTFGameServerLobby.$Properties): CSOTFGameServerLobby; + * }} */ - CSOTFGameServerLobby.create = function create(properties) { + CSOTFGameServerLobby.create = function(properties) { return new CSOTFGameServerLobby(properties); }; @@ -23595,56 +30642,63 @@ * @function encode * @memberof CSOTFGameServerLobby * @static - * @param {ICSOTFGameServerLobby} message CSOTFGameServerLobby message or plain object to encode + * @param {CSOTFGameServerLobby.$Properties} message CSOTFGameServerLobby message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFGameServerLobby.encode = function encode(message, writer) { + CSOTFGameServerLobby.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.lobby_id); if (message.members != null && message.members.length) for (var i = 0; i < message.members.length; ++i) - $root.CTFLobbyPlayerProto.encode(message.members[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + $root.CTFLobbyPlayerProto.encode(message.members[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.connect != null && Object.hasOwnProperty.call(message, "connect")) + if (message.connect != null && $Object.hasOwnProperty.call(message, "connect")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.connect); - if (message.server_id != null && Object.hasOwnProperty.call(message, "server_id")) + if (message.server_id != null && $Object.hasOwnProperty.call(message, "server_id")) writer.uint32(/* id 6, wireType 1 =*/49).fixed64(message.server_id); - if (message.game_state != null && Object.hasOwnProperty.call(message, "game_state")) + if (message.game_state != null && $Object.hasOwnProperty.call(message, "game_state")) writer.uint32(/* id 22, wireType 0 =*/176).int32(message.game_state); - if (message.match_id != null && Object.hasOwnProperty.call(message, "match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) writer.uint32(/* id 30, wireType 0 =*/240).uint64(message.match_id); - if (message.initial_average_mm_rating != null && Object.hasOwnProperty.call(message, "initial_average_mm_rating")) + if (message.initial_average_mm_rating != null && $Object.hasOwnProperty.call(message, "initial_average_mm_rating")) writer.uint32(/* id 32, wireType 1 =*/257).double(message.initial_average_mm_rating); - if (message.formed_time != null && Object.hasOwnProperty.call(message, "formed_time")) + if (message.formed_time != null && $Object.hasOwnProperty.call(message, "formed_time")) writer.uint32(/* id 36, wireType 0 =*/288).uint32(message.formed_time); - if (message.map_name != null && Object.hasOwnProperty.call(message, "map_name")) + if (message.map_name != null && $Object.hasOwnProperty.call(message, "map_name")) writer.uint32(/* id 38, wireType 2 =*/306).string(message.map_name); - if (message.mission_name != null && Object.hasOwnProperty.call(message, "mission_name")) + if (message.mission_name != null && $Object.hasOwnProperty.call(message, "mission_name")) writer.uint32(/* id 39, wireType 2 =*/314).string(message.mission_name); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 41, wireType 0 =*/328).uint32(message.match_group); - if (message.mannup_tour_name != null && Object.hasOwnProperty.call(message, "mannup_tour_name")) + if (message.mannup_tour_name != null && $Object.hasOwnProperty.call(message, "mannup_tour_name")) writer.uint32(/* id 42, wireType 2 =*/338).string(message.mannup_tour_name); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 43, wireType 0 =*/344).uint32(message.flags); - if (message.late_join_eligible != null && Object.hasOwnProperty.call(message, "late_join_eligible")) + if (message.late_join_eligible != null && $Object.hasOwnProperty.call(message, "late_join_eligible")) writer.uint32(/* id 44, wireType 0 =*/352).bool(message.late_join_eligible); - if (message.fixed_match_size != null && Object.hasOwnProperty.call(message, "fixed_match_size")) + if (message.fixed_match_size != null && $Object.hasOwnProperty.call(message, "fixed_match_size")) writer.uint32(/* id 45, wireType 0 =*/360).uint32(message.fixed_match_size); - if (message.is_war_match != null && Object.hasOwnProperty.call(message, "is_war_match")) + if (message.is_war_match != null && $Object.hasOwnProperty.call(message, "is_war_match")) writer.uint32(/* id 46, wireType 0 =*/368).int32(message.is_war_match); if (message.next_maps_for_vote != null && message.next_maps_for_vote.length) for (var i = 0; i < message.next_maps_for_vote.length; ++i) writer.uint32(/* id 47, wireType 0 =*/376).uint32(message.next_maps_for_vote[i]); - if (message.lobby_mm_version != null && Object.hasOwnProperty.call(message, "lobby_mm_version")) + if (message.lobby_mm_version != null && $Object.hasOwnProperty.call(message, "lobby_mm_version")) writer.uint32(/* id 48, wireType 0 =*/384).uint32(message.lobby_mm_version); if (message.pending_members != null && message.pending_members.length) for (var i = 0; i < message.pending_members.length; ++i) - $root.CTFLobbyPlayerProto.encode(message.pending_members[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + $root.CTFLobbyPlayerProto.encode(message.pending_members[i], writer.uint32(/* id 49, wireType 2 =*/394).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -23653,12 +30707,12 @@ * @function encodeDelimited * @memberof CSOTFGameServerLobby * @static - * @param {ICSOTFGameServerLobby} message CSOTFGameServerLobby message or plain object to encode + * @param {CSOTFGameServerLobby.$Properties} message CSOTFGameServerLobby message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFGameServerLobby.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOTFGameServerLobby.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -23668,93 +30722,186 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFGameServerLobby} CSOTFGameServerLobby + * @returns {CSOTFGameServerLobby & CSOTFGameServerLobby.$Shape} CSOTFGameServerLobby * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFGameServerLobby.decode = function decode(reader, length) { + CSOTFGameServerLobby.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFGameServerLobby(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFGameServerLobby(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lobby_id = reader.uint64(); - break; - case 2: - if (!(message.members && message.members.length)) - message.members = []; - message.members.push($root.CTFLobbyPlayerProto.decode(reader, reader.uint32())); - break; - case 6: - message.server_id = reader.fixed64(); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.connect = reader.string(); - break; - case 22: - message.game_state = reader.int32(); - break; - case 32: - message.initial_average_mm_rating = reader.double(); - break; - case 42: - message.mannup_tour_name = reader.string(); - break; - case 38: - message.map_name = reader.string(); - break; - case 39: - message.mission_name = reader.string(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 41: - message.match_group = reader.uint32(); - break; - case 30: - message.match_id = reader.uint64(); - break; - case 36: - message.formed_time = reader.uint32(); - break; - case 43: - message.flags = reader.uint32(); - break; - case 44: - message.late_join_eligible = reader.bool(); - break; - case 45: - message.fixed_match_size = reader.uint32(); - break; - case 46: - message.is_war_match = reader.int32(); - break; - case 47: - if (!(message.next_maps_for_vote && message.next_maps_for_vote.length)) - message.next_maps_for_vote = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.next_maps_for_vote.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.lobby_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.members && message.members.length)) + message.members = []; + message.members.push($root.CTFLobbyPlayerProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 1) + break; + message.server_id = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CSOTFGameServerLobby.State[value] !== $undefined) + message.state = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 5: { + if (wireType !== 2) + break; + message.connect = reader.string(); + continue; + } + case 22: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.TF_GC_GameState[value] !== $undefined) + message.game_state = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 32: { + if (wireType !== 1) + break; + message.initial_average_mm_rating = reader.double(); + continue; + } + case 42: { + if (wireType !== 2) + break; + message.mannup_tour_name = reader.string(); + continue; + } + case 38: { + if (wireType !== 2) + break; + message.map_name = reader.string(); + continue; + } + case 39: { + if (wireType !== 2) + break; + message.mission_name = reader.string(); + continue; + } + case 41: { + if (wireType !== 0) + break; + message.match_group = reader.uint32(); + continue; + } + case 30: { + if (wireType !== 0) + break; + message.match_id = reader.uint64(); + continue; + } + case 36: { + if (wireType !== 0) + break; + message.formed_time = reader.uint32(); + continue; + } + case 43: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 44: { + if (wireType !== 0) + break; + message.late_join_eligible = reader.bool(); + continue; + } + case 45: { + if (wireType !== 0) + break; + message.fixed_match_size = reader.uint32(); + continue; + } + case 46: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CSOTFGameServerLobby.WarMatch[value] !== $undefined) + message.is_war_match = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 47: { + if (wireType === 2) { + if (!(message.next_maps_for_vote && message.next_maps_for_vote.length)) + message.next_maps_for_vote = []; + reader.uint32s(message.next_maps_for_vote); + continue; + } + if (wireType !== 0) + break; + if (!(message.next_maps_for_vote && message.next_maps_for_vote.length)) + message.next_maps_for_vote = []; message.next_maps_for_vote.push(reader.uint32()); - break; - case 48: - message.lobby_mm_version = reader.uint32(); - break; - case 49: - if (!(message.pending_members && message.pending_members.length)) - message.pending_members = []; - message.pending_members.push($root.CTFLobbyPlayerProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 48: { + if (wireType !== 0) + break; + message.lobby_mm_version = reader.uint32(); + continue; + } + case 49: { + if (wireType !== 2) + break; + if (!(message.pending_members && message.pending_members.length)) + message.pending_members = []; + message.pending_members.push($root.CTFLobbyPlayerProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -23764,11 +30911,11 @@ * @memberof CSOTFGameServerLobby * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFGameServerLobby} CSOTFGameServerLobby + * @returns {CSOTFGameServerLobby & CSOTFGameServerLobby.$Shape} CSOTFGameServerLobby * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFGameServerLobby.decodeDelimited = function decodeDelimited(reader) { + CSOTFGameServerLobby.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -23782,25 +30929,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOTFGameServerLobby.verify = function verify(message) { + CSOTFGameServerLobby.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; - if (message.members != null && message.hasOwnProperty("members")) { - if (!Array.isArray(message.members)) + if (message.members != null && $Object.hasOwnProperty.call(message, "members")) { + if (!$Array.isArray(message.members)) return "members: array expected"; for (var i = 0; i < message.members.length; ++i) { - var error = $root.CTFLobbyPlayerProto.verify(message.members[i]); + var error = $root.CTFLobbyPlayerProto.verify(message.members[i], _depth + 1); if (error) return "members." + error; } } - if (message.server_id != null && message.hasOwnProperty("server_id")) + if (message.server_id != null && $Object.hasOwnProperty.call(message, "server_id")) if (!$util.isInteger(message.server_id) && !(message.server_id && $util.isInteger(message.server_id.low) && $util.isInteger(message.server_id.high))) return "server_id: integer|Long expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) switch (message.state) { default: return "state: enum value expected"; @@ -23809,10 +30960,10 @@ case 2: break; } - if (message.connect != null && message.hasOwnProperty("connect")) + if (message.connect != null && $Object.hasOwnProperty.call(message, "connect")) if (!$util.isString(message.connect)) return "connect: string expected"; - if (message.game_state != null && message.hasOwnProperty("game_state")) + if (message.game_state != null && $Object.hasOwnProperty.call(message, "game_state")) switch (message.game_state) { default: return "game_state: enum value expected"; @@ -23825,37 +30976,37 @@ case 8: break; } - if (message.initial_average_mm_rating != null && message.hasOwnProperty("initial_average_mm_rating")) + if (message.initial_average_mm_rating != null && $Object.hasOwnProperty.call(message, "initial_average_mm_rating")) if (typeof message.initial_average_mm_rating !== "number") return "initial_average_mm_rating: number expected"; - if (message.mannup_tour_name != null && message.hasOwnProperty("mannup_tour_name")) + if (message.mannup_tour_name != null && $Object.hasOwnProperty.call(message, "mannup_tour_name")) if (!$util.isString(message.mannup_tour_name)) return "mannup_tour_name: string expected"; - if (message.map_name != null && message.hasOwnProperty("map_name")) + if (message.map_name != null && $Object.hasOwnProperty.call(message, "map_name")) if (!$util.isString(message.map_name)) return "map_name: string expected"; - if (message.mission_name != null && message.hasOwnProperty("mission_name")) + if (message.mission_name != null && $Object.hasOwnProperty.call(message, "mission_name")) if (!$util.isString(message.mission_name)) return "mission_name: string expected"; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) if (!$util.isInteger(message.match_group)) return "match_group: integer expected"; - if (message.match_id != null && message.hasOwnProperty("match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) if (!$util.isInteger(message.match_id) && !(message.match_id && $util.isInteger(message.match_id.low) && $util.isInteger(message.match_id.high))) return "match_id: integer|Long expected"; - if (message.formed_time != null && message.hasOwnProperty("formed_time")) + if (message.formed_time != null && $Object.hasOwnProperty.call(message, "formed_time")) if (!$util.isInteger(message.formed_time)) return "formed_time: integer expected"; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.late_join_eligible != null && message.hasOwnProperty("late_join_eligible")) + if (message.late_join_eligible != null && $Object.hasOwnProperty.call(message, "late_join_eligible")) if (typeof message.late_join_eligible !== "boolean") return "late_join_eligible: boolean expected"; - if (message.fixed_match_size != null && message.hasOwnProperty("fixed_match_size")) + if (message.fixed_match_size != null && $Object.hasOwnProperty.call(message, "fixed_match_size")) if (!$util.isInteger(message.fixed_match_size)) return "fixed_match_size: integer expected"; - if (message.is_war_match != null && message.hasOwnProperty("is_war_match")) + if (message.is_war_match != null && $Object.hasOwnProperty.call(message, "is_war_match")) switch (message.is_war_match) { default: return "is_war_match: enum value expected"; @@ -23864,21 +31015,21 @@ case 2: break; } - if (message.next_maps_for_vote != null && message.hasOwnProperty("next_maps_for_vote")) { - if (!Array.isArray(message.next_maps_for_vote)) + if (message.next_maps_for_vote != null && $Object.hasOwnProperty.call(message, "next_maps_for_vote")) { + if (!$Array.isArray(message.next_maps_for_vote)) return "next_maps_for_vote: array expected"; for (var i = 0; i < message.next_maps_for_vote.length; ++i) if (!$util.isInteger(message.next_maps_for_vote[i])) return "next_maps_for_vote: integer[] expected"; } - if (message.lobby_mm_version != null && message.hasOwnProperty("lobby_mm_version")) + if (message.lobby_mm_version != null && $Object.hasOwnProperty.call(message, "lobby_mm_version")) if (!$util.isInteger(message.lobby_mm_version)) return "lobby_mm_version: integer expected"; - if (message.pending_members != null && message.hasOwnProperty("pending_members")) { - if (!Array.isArray(message.pending_members)) + if (message.pending_members != null && $Object.hasOwnProperty.call(message, "pending_members")) { + if (!$Array.isArray(message.pending_members)) return "pending_members: array expected"; for (var i = 0; i < message.pending_members.length; ++i) { - var error = $root.CTFLobbyPlayerProto.verify(message.pending_members[i]); + var error = $root.CTFLobbyPlayerProto.verify(message.pending_members[i], _depth + 1); if (error) return "pending_members." + error; } @@ -23894,38 +31045,44 @@ * @param {Object.} object Plain object * @returns {CSOTFGameServerLobby} CSOTFGameServerLobby */ - CSOTFGameServerLobby.fromObject = function fromObject(object) { + CSOTFGameServerLobby.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFGameServerLobby) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFGameServerLobby: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFGameServerLobby(); if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = true; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(true); if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".CSOTFGameServerLobby.members: array expected"); - message.members = []; + if (!$Array.isArray(object.members)) + throw $TypeError(".CSOTFGameServerLobby.members: array expected"); + message.members = $Array(object.members.length); for (var i = 0; i < object.members.length; ++i) { - if (typeof object.members[i] !== "object") - throw TypeError(".CSOTFGameServerLobby.members: object expected"); - message.members[i] = $root.CTFLobbyPlayerProto.fromObject(object.members[i]); + if (!$util.isObject(object.members[i])) + throw $TypeError(".CSOTFGameServerLobby.members: object expected"); + message.members[i] = $root.CTFLobbyPlayerProto.fromObject(object.members[i], _depth + 1); } } if (object.server_id != null) if ($util.Long) - (message.server_id = $util.Long.fromValue(object.server_id)).unsigned = false; + message.server_id = $util.Long.fromValue(object.server_id, true); else if (typeof object.server_id === "string") - message.server_id = parseInt(object.server_id, 10); + message.server_id = $parseInt(object.server_id, 10); else if (typeof object.server_id === "number") message.server_id = object.server_id; else if (typeof object.server_id === "object") - message.server_id = new $util.LongBits(object.server_id.low >>> 0, object.server_id.high >>> 0).toNumber(); + message.server_id = new $util.LongBits(object.server_id.low >>> 0, object.server_id.high >>> 0).toNumber(true); switch (object.state) { case "UNKNOWN": case 0: @@ -23939,9 +31096,10 @@ case 2: message.state = 2; break; + default: } if (object.connect != null) - message.connect = String(object.connect); + message.connect = $String(object.connect); switch (object.game_state) { case "TF_GC_GAMESTATE_STATE_INIT": case 0: @@ -23971,22 +31129,23 @@ case 8: message.game_state = 8; break; + default: } if (object.initial_average_mm_rating != null) - message.initial_average_mm_rating = Number(object.initial_average_mm_rating); + message.initial_average_mm_rating = $Number(object.initial_average_mm_rating); if (object.mannup_tour_name != null) - message.mannup_tour_name = String(object.mannup_tour_name); + message.mannup_tour_name = $String(object.mannup_tour_name); if (object.map_name != null) - message.map_name = String(object.map_name); + message.map_name = $String(object.map_name); if (object.mission_name != null) - message.mission_name = String(object.mission_name); + message.mission_name = $String(object.mission_name); if (object.match_group != null) message.match_group = object.match_group >>> 0; if (object.match_id != null) if ($util.Long) - (message.match_id = $util.Long.fromValue(object.match_id)).unsigned = true; + message.match_id = $util.Long.fromValue(object.match_id, true); else if (typeof object.match_id === "string") - message.match_id = parseInt(object.match_id, 10); + message.match_id = $parseInt(object.match_id, 10); else if (typeof object.match_id === "number") message.match_id = object.match_id; else if (typeof object.match_id === "object") @@ -23996,7 +31155,7 @@ if (object.flags != null) message.flags = object.flags >>> 0; if (object.late_join_eligible != null) - message.late_join_eligible = Boolean(object.late_join_eligible); + message.late_join_eligible = $Boolean(object.late_join_eligible); if (object.fixed_match_size != null) message.fixed_match_size = object.fixed_match_size >>> 0; switch (object.is_war_match) { @@ -24012,24 +31171,25 @@ case 2: message.is_war_match = 2; break; + default: } if (object.next_maps_for_vote) { - if (!Array.isArray(object.next_maps_for_vote)) - throw TypeError(".CSOTFGameServerLobby.next_maps_for_vote: array expected"); - message.next_maps_for_vote = []; + if (!$Array.isArray(object.next_maps_for_vote)) + throw $TypeError(".CSOTFGameServerLobby.next_maps_for_vote: array expected"); + message.next_maps_for_vote = $Array(object.next_maps_for_vote.length); for (var i = 0; i < object.next_maps_for_vote.length; ++i) message.next_maps_for_vote[i] = object.next_maps_for_vote[i] >>> 0; } if (object.lobby_mm_version != null) message.lobby_mm_version = object.lobby_mm_version >>> 0; if (object.pending_members) { - if (!Array.isArray(object.pending_members)) - throw TypeError(".CSOTFGameServerLobby.pending_members: array expected"); - message.pending_members = []; + if (!$Array.isArray(object.pending_members)) + throw $TypeError(".CSOTFGameServerLobby.pending_members: array expected"); + message.pending_members = $Array(object.pending_members.length); for (var i = 0; i < object.pending_members.length; ++i) { - if (typeof object.pending_members[i] !== "object") - throw TypeError(".CSOTFGameServerLobby.pending_members: object expected"); - message.pending_members[i] = $root.CTFLobbyPlayerProto.fromObject(object.pending_members[i]); + if (!$util.isObject(object.pending_members[i])) + throw $TypeError(".CSOTFGameServerLobby.pending_members: object expected"); + message.pending_members[i] = $root.CTFLobbyPlayerProto.fromObject(object.pending_members[i], _depth + 1); } } return message; @@ -24044,9 +31204,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOTFGameServerLobby.toObject = function toObject(message, options) { + CSOTFGameServerLobby.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.members = []; @@ -24056,22 +31220,22 @@ if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; - object.state = options.enums === String ? "UNKNOWN" : 0; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.state = options.enums === $String ? "UNKNOWN" : 0; object.connect = ""; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.server_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.server_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.server_id = options.longs === String ? "0" : 0; - object.game_state = options.enums === String ? "TF_GC_GAMESTATE_STATE_INIT" : 0; + object.server_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.game_state = options.enums === $String ? "TF_GC_GAMESTATE_STATE_INIT" : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.match_id = options.longs === String ? "0" : 0; + object.match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.initial_average_mm_rating = 0; object.formed_time = 0; object.map_name = ""; @@ -24081,66 +31245,72 @@ object.flags = 0; object.late_join_eligible = false; object.fixed_match_size = 0; - object.is_war_match = options.enums === String ? "NOPE" : 0; + object.is_war_match = options.enums === $String ? "NOPE" : 0; object.lobby_mm_version = 0; } - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; if (message.members && message.members.length) { - object.members = []; + object.members = $Array(message.members.length); for (var j = 0; j < message.members.length; ++j) - object.members[j] = $root.CTFLobbyPlayerProto.toObject(message.members[j], options); + object.members[j] = $root.CTFLobbyPlayerProto.toObject(message.members[j], options, _depth + 1); } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.CSOTFGameServerLobby.State[message.state] : message.state; - if (message.connect != null && message.hasOwnProperty("connect")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) + object.state = options.enums === $String ? $root.CSOTFGameServerLobby.State[message.state] === $undefined ? message.state : $root.CSOTFGameServerLobby.State[message.state] : message.state; + if (message.connect != null && $Object.hasOwnProperty.call(message, "connect")) object.connect = message.connect; - if (message.server_id != null && message.hasOwnProperty("server_id")) - if (typeof message.server_id === "number") - object.server_id = options.longs === String ? String(message.server_id) : message.server_id; + if (message.server_id != null && $Object.hasOwnProperty.call(message, "server_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.server_id = typeof message.server_id === "number" ? $BigInt(message.server_id) : $util.Long.fromBits(message.server_id.low >>> 0, message.server_id.high >>> 0, true).toBigInt(); + else if (typeof message.server_id === "number") + object.server_id = options.longs === $String ? $String(message.server_id) : message.server_id; else - object.server_id = options.longs === String ? $util.Long.prototype.toString.call(message.server_id) : options.longs === Number ? new $util.LongBits(message.server_id.low >>> 0, message.server_id.high >>> 0).toNumber() : message.server_id; - if (message.game_state != null && message.hasOwnProperty("game_state")) - object.game_state = options.enums === String ? $root.TF_GC_GameState[message.game_state] : message.game_state; - if (message.match_id != null && message.hasOwnProperty("match_id")) - if (typeof message.match_id === "number") - object.match_id = options.longs === String ? String(message.match_id) : message.match_id; + object.server_id = options.longs === $String ? $util.Long.prototype.toString.call(message.server_id) : options.longs === $Number ? new $util.LongBits(message.server_id.low >>> 0, message.server_id.high >>> 0).toNumber(true) : message.server_id; + if (message.game_state != null && $Object.hasOwnProperty.call(message, "game_state")) + object.game_state = options.enums === $String ? $root.TF_GC_GameState[message.game_state] === $undefined ? message.game_state : $root.TF_GC_GameState[message.game_state] : message.game_state; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.match_id = typeof message.match_id === "number" ? $BigInt(message.match_id) : $util.Long.fromBits(message.match_id.low >>> 0, message.match_id.high >>> 0, true).toBigInt(); + else if (typeof message.match_id === "number") + object.match_id = options.longs === $String ? $String(message.match_id) : message.match_id; else - object.match_id = options.longs === String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; - if (message.initial_average_mm_rating != null && message.hasOwnProperty("initial_average_mm_rating")) - object.initial_average_mm_rating = options.json && !isFinite(message.initial_average_mm_rating) ? String(message.initial_average_mm_rating) : message.initial_average_mm_rating; - if (message.formed_time != null && message.hasOwnProperty("formed_time")) + object.match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === $Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; + if (message.initial_average_mm_rating != null && $Object.hasOwnProperty.call(message, "initial_average_mm_rating")) + object.initial_average_mm_rating = options.json && !$isFinite(message.initial_average_mm_rating) ? $String(message.initial_average_mm_rating) : message.initial_average_mm_rating; + if (message.formed_time != null && $Object.hasOwnProperty.call(message, "formed_time")) object.formed_time = message.formed_time; - if (message.map_name != null && message.hasOwnProperty("map_name")) + if (message.map_name != null && $Object.hasOwnProperty.call(message, "map_name")) object.map_name = message.map_name; - if (message.mission_name != null && message.hasOwnProperty("mission_name")) + if (message.mission_name != null && $Object.hasOwnProperty.call(message, "mission_name")) object.mission_name = message.mission_name; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) object.match_group = message.match_group; - if (message.mannup_tour_name != null && message.hasOwnProperty("mannup_tour_name")) + if (message.mannup_tour_name != null && $Object.hasOwnProperty.call(message, "mannup_tour_name")) object.mannup_tour_name = message.mannup_tour_name; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.late_join_eligible != null && message.hasOwnProperty("late_join_eligible")) + if (message.late_join_eligible != null && $Object.hasOwnProperty.call(message, "late_join_eligible")) object.late_join_eligible = message.late_join_eligible; - if (message.fixed_match_size != null && message.hasOwnProperty("fixed_match_size")) + if (message.fixed_match_size != null && $Object.hasOwnProperty.call(message, "fixed_match_size")) object.fixed_match_size = message.fixed_match_size; - if (message.is_war_match != null && message.hasOwnProperty("is_war_match")) - object.is_war_match = options.enums === String ? $root.CSOTFGameServerLobby.WarMatch[message.is_war_match] : message.is_war_match; + if (message.is_war_match != null && $Object.hasOwnProperty.call(message, "is_war_match")) + object.is_war_match = options.enums === $String ? $root.CSOTFGameServerLobby.WarMatch[message.is_war_match] === $undefined ? message.is_war_match : $root.CSOTFGameServerLobby.WarMatch[message.is_war_match] : message.is_war_match; if (message.next_maps_for_vote && message.next_maps_for_vote.length) { - object.next_maps_for_vote = []; + object.next_maps_for_vote = $Array(message.next_maps_for_vote.length); for (var j = 0; j < message.next_maps_for_vote.length; ++j) object.next_maps_for_vote[j] = message.next_maps_for_vote[j]; } - if (message.lobby_mm_version != null && message.hasOwnProperty("lobby_mm_version")) + if (message.lobby_mm_version != null && $Object.hasOwnProperty.call(message, "lobby_mm_version")) object.lobby_mm_version = message.lobby_mm_version; if (message.pending_members && message.pending_members.length) { - object.pending_members = []; + object.pending_members = $Array(message.pending_members.length); for (var j = 0; j < message.pending_members.length; ++j) - object.pending_members[j] = $root.CTFLobbyPlayerProto.toObject(message.pending_members[j], options); + object.pending_members[j] = $root.CTFLobbyPlayerProto.toObject(message.pending_members[j], options, _depth + 1); } return object; }; @@ -24152,8 +31322,22 @@ * @instance * @returns {Object.} JSON object */ - CSOTFGameServerLobby.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOTFGameServerLobby.prototype.toJSON = function() { + return CSOTFGameServerLobby.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOTFGameServerLobby + * @function getTypeUrl + * @memberof CSOTFGameServerLobby + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOTFGameServerLobby.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFGameServerLobby"; }; /** @@ -24165,7 +31349,7 @@ * @property {number} RUN=2 RUN value */ CSOTFGameServerLobby.State = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "UNKNOWN"] = 0; values[valuesById[1] = "SERVERSETUP"] = 1; values[valuesById[2] = "RUN"] = 2; @@ -24181,7 +31365,7 @@ * @property {number} INVADERS_ARE_HEAVY=2 INVADERS_ARE_HEAVY value */ CSOTFGameServerLobby.WarMatch = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "NOPE"] = 0; values[valuesById[1] = "INVADERS_ARE_PYRO"] = 1; values[valuesById[2] = "INVADERS_ARE_HEAVY"] = 2; @@ -24195,27 +31379,40 @@ /** * Properties of a CMsgExitMatchmaking. - * @exports ICMsgExitMatchmaking - * @interface ICMsgExitMatchmaking + * @typedef {Object} CMsgExitMatchmaking.$Properties * @property {boolean|null} [explicit_abandon] CMsgExitMatchmaking explicit_abandon * @property {number|Long|null} [party_id] CMsgExitMatchmaking party_id * @property {number|Long|null} [lobby_id] CMsgExitMatchmaking lobby_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgExitMatchmaking. + * @exports ICMsgExitMatchmaking + * @interface ICMsgExitMatchmaking + * @augments CMsgExitMatchmaking.$Properties + * @deprecated Use CMsgExitMatchmaking.$Properties instead. + */ + + /** + * Shape of a CMsgExitMatchmaking. + * @typedef {CMsgExitMatchmaking.$Properties} CMsgExitMatchmaking.$Shape */ /** * Constructs a new CMsgExitMatchmaking. * @exports CMsgExitMatchmaking * @classdesc Represents a CMsgExitMatchmaking. - * @implements ICMsgExitMatchmaking * @constructor - * @param {ICMsgExitMatchmaking=} [properties] Properties to set + * @param {CMsgExitMatchmaking.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgExitMatchmaking(properties) { + var CMsgExitMatchmaking = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgExitMatchmaking explicit_abandon. @@ -24246,10 +31443,14 @@ * @function create * @memberof CMsgExitMatchmaking * @static - * @param {ICMsgExitMatchmaking=} [properties] Properties to set + * @param {CMsgExitMatchmaking.$Properties=} [properties] Properties to set * @returns {CMsgExitMatchmaking} CMsgExitMatchmaking instance + * @type {{ + * (properties: CMsgExitMatchmaking.$Shape): CMsgExitMatchmaking & CMsgExitMatchmaking.$Shape; + * (properties?: CMsgExitMatchmaking.$Properties): CMsgExitMatchmaking; + * }} */ - CMsgExitMatchmaking.create = function create(properties) { + CMsgExitMatchmaking.create = function(properties) { return new CMsgExitMatchmaking(properties); }; @@ -24258,19 +31459,26 @@ * @function encode * @memberof CMsgExitMatchmaking * @static - * @param {ICMsgExitMatchmaking} message CMsgExitMatchmaking message or plain object to encode + * @param {CMsgExitMatchmaking.$Properties} message CMsgExitMatchmaking message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgExitMatchmaking.encode = function encode(message, writer) { + CMsgExitMatchmaking.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.explicit_abandon != null && Object.hasOwnProperty.call(message, "explicit_abandon")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.explicit_abandon != null && $Object.hasOwnProperty.call(message, "explicit_abandon")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.explicit_abandon); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.party_id); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.lobby_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24279,12 +31487,12 @@ * @function encodeDelimited * @memberof CMsgExitMatchmaking * @static - * @param {ICMsgExitMatchmaking} message CMsgExitMatchmaking message or plain object to encode + * @param {CMsgExitMatchmaking.$Properties} message CMsgExitMatchmaking message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgExitMatchmaking.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgExitMatchmaking.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24294,31 +31502,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgExitMatchmaking} CMsgExitMatchmaking + * @returns {CMsgExitMatchmaking & CMsgExitMatchmaking.$Shape} CMsgExitMatchmaking * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgExitMatchmaking.decode = function decode(reader, length) { + CMsgExitMatchmaking.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgExitMatchmaking(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgExitMatchmaking(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.explicit_abandon = reader.bool(); - break; - case 2: - message.party_id = reader.uint64(); - break; - case 3: - message.lobby_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.explicit_abandon = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.party_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.lobby_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24328,11 +31559,11 @@ * @memberof CMsgExitMatchmaking * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgExitMatchmaking} CMsgExitMatchmaking + * @returns {CMsgExitMatchmaking & CMsgExitMatchmaking.$Shape} CMsgExitMatchmaking * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgExitMatchmaking.decodeDelimited = function decodeDelimited(reader) { + CMsgExitMatchmaking.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24346,16 +31577,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgExitMatchmaking.verify = function verify(message) { + CMsgExitMatchmaking.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.explicit_abandon != null && message.hasOwnProperty("explicit_abandon")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.explicit_abandon != null && $Object.hasOwnProperty.call(message, "explicit_abandon")) if (typeof message.explicit_abandon !== "boolean") return "explicit_abandon: boolean expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; return null; @@ -24369,26 +31604,32 @@ * @param {Object.} object Plain object * @returns {CMsgExitMatchmaking} CMsgExitMatchmaking */ - CMsgExitMatchmaking.fromObject = function fromObject(object) { + CMsgExitMatchmaking.fromObject = function (object, _depth) { if (object instanceof $root.CMsgExitMatchmaking) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgExitMatchmaking: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgExitMatchmaking(); if (object.explicit_abandon != null) - message.explicit_abandon = Boolean(object.explicit_abandon); + message.explicit_abandon = $Boolean(object.explicit_abandon); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = true; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = true; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") @@ -24405,35 +31646,43 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgExitMatchmaking.toObject = function toObject(message, options) { + CMsgExitMatchmaking.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.explicit_abandon = false; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.explicit_abandon != null && message.hasOwnProperty("explicit_abandon")) + if (message.explicit_abandon != null && $Object.hasOwnProperty.call(message, "explicit_abandon")) object.explicit_abandon = message.explicit_abandon; - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; return object; }; @@ -24444,8 +31693,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgExitMatchmaking.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgExitMatchmaking.prototype.toJSON = function() { + return CMsgExitMatchmaking.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgExitMatchmaking + * @function getTypeUrl + * @memberof CMsgExitMatchmaking + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgExitMatchmaking.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgExitMatchmaking"; }; return CMsgExitMatchmaking; @@ -24455,28 +31718,41 @@ /** * Properties of a CMsgAcceptLobbyInvite. - * @exports ICMsgAcceptLobbyInvite - * @interface ICMsgAcceptLobbyInvite + * @typedef {Object} CMsgAcceptLobbyInvite.$Properties * @property {number|Long|null} [invited_lobby_id] CMsgAcceptLobbyInvite invited_lobby_id * @property {number|Long|null} [abandoning_match_id] CMsgAcceptLobbyInvite abandoning_match_id * @property {Array.|null} [abandoning_invite_lobby_ids] CMsgAcceptLobbyInvite abandoning_invite_lobby_ids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAcceptLobbyInvite. + * @exports ICMsgAcceptLobbyInvite + * @interface ICMsgAcceptLobbyInvite + * @augments CMsgAcceptLobbyInvite.$Properties + * @deprecated Use CMsgAcceptLobbyInvite.$Properties instead. + */ + + /** + * Shape of a CMsgAcceptLobbyInvite. + * @typedef {CMsgAcceptLobbyInvite.$Properties} CMsgAcceptLobbyInvite.$Shape */ /** * Constructs a new CMsgAcceptLobbyInvite. * @exports CMsgAcceptLobbyInvite * @classdesc Represents a CMsgAcceptLobbyInvite. - * @implements ICMsgAcceptLobbyInvite * @constructor - * @param {ICMsgAcceptLobbyInvite=} [properties] Properties to set + * @param {CMsgAcceptLobbyInvite.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAcceptLobbyInvite(properties) { + var CMsgAcceptLobbyInvite = function (properties) { this.abandoning_invite_lobby_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAcceptLobbyInvite invited_lobby_id. @@ -24507,10 +31783,14 @@ * @function create * @memberof CMsgAcceptLobbyInvite * @static - * @param {ICMsgAcceptLobbyInvite=} [properties] Properties to set + * @param {CMsgAcceptLobbyInvite.$Properties=} [properties] Properties to set * @returns {CMsgAcceptLobbyInvite} CMsgAcceptLobbyInvite instance + * @type {{ + * (properties: CMsgAcceptLobbyInvite.$Shape): CMsgAcceptLobbyInvite & CMsgAcceptLobbyInvite.$Shape; + * (properties?: CMsgAcceptLobbyInvite.$Properties): CMsgAcceptLobbyInvite; + * }} */ - CMsgAcceptLobbyInvite.create = function create(properties) { + CMsgAcceptLobbyInvite.create = function(properties) { return new CMsgAcceptLobbyInvite(properties); }; @@ -24519,20 +31799,27 @@ * @function encode * @memberof CMsgAcceptLobbyInvite * @static - * @param {ICMsgAcceptLobbyInvite} message CMsgAcceptLobbyInvite message or plain object to encode + * @param {CMsgAcceptLobbyInvite.$Properties} message CMsgAcceptLobbyInvite message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAcceptLobbyInvite.encode = function encode(message, writer) { + CMsgAcceptLobbyInvite.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.invited_lobby_id != null && Object.hasOwnProperty.call(message, "invited_lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.invited_lobby_id != null && $Object.hasOwnProperty.call(message, "invited_lobby_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.invited_lobby_id); - if (message.abandoning_match_id != null && Object.hasOwnProperty.call(message, "abandoning_match_id")) + if (message.abandoning_match_id != null && $Object.hasOwnProperty.call(message, "abandoning_match_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.abandoning_match_id); if (message.abandoning_invite_lobby_ids != null && message.abandoning_invite_lobby_ids.length) for (var i = 0; i < message.abandoning_invite_lobby_ids.length; ++i) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.abandoning_invite_lobby_ids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24541,12 +31828,12 @@ * @function encodeDelimited * @memberof CMsgAcceptLobbyInvite * @static - * @param {ICMsgAcceptLobbyInvite} message CMsgAcceptLobbyInvite message or plain object to encode + * @param {CMsgAcceptLobbyInvite.$Properties} message CMsgAcceptLobbyInvite message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAcceptLobbyInvite.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAcceptLobbyInvite.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24556,38 +31843,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAcceptLobbyInvite} CMsgAcceptLobbyInvite + * @returns {CMsgAcceptLobbyInvite & CMsgAcceptLobbyInvite.$Shape} CMsgAcceptLobbyInvite * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAcceptLobbyInvite.decode = function decode(reader, length) { + CMsgAcceptLobbyInvite.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAcceptLobbyInvite(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAcceptLobbyInvite(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.invited_lobby_id = reader.uint64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - message.abandoning_match_id = reader.uint64(); - break; - case 3: - if (!(message.abandoning_invite_lobby_ids && message.abandoning_invite_lobby_ids.length)) - message.abandoning_invite_lobby_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.abandoning_invite_lobby_ids.push(reader.uint64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.invited_lobby_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.abandoning_match_id = reader.uint64(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.abandoning_invite_lobby_ids && message.abandoning_invite_lobby_ids.length)) + message.abandoning_invite_lobby_ids = []; + reader.uint64s(message.abandoning_invite_lobby_ids); + continue; + } + if (wireType !== 0) + break; + if (!(message.abandoning_invite_lobby_ids && message.abandoning_invite_lobby_ids.length)) + message.abandoning_invite_lobby_ids = []; message.abandoning_invite_lobby_ids.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24597,11 +31908,11 @@ * @memberof CMsgAcceptLobbyInvite * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAcceptLobbyInvite} CMsgAcceptLobbyInvite + * @returns {CMsgAcceptLobbyInvite & CMsgAcceptLobbyInvite.$Shape} CMsgAcceptLobbyInvite * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAcceptLobbyInvite.decodeDelimited = function decodeDelimited(reader) { + CMsgAcceptLobbyInvite.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24615,17 +31926,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAcceptLobbyInvite.verify = function verify(message) { + CMsgAcceptLobbyInvite.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.invited_lobby_id != null && message.hasOwnProperty("invited_lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.invited_lobby_id != null && $Object.hasOwnProperty.call(message, "invited_lobby_id")) if (!$util.isInteger(message.invited_lobby_id) && !(message.invited_lobby_id && $util.isInteger(message.invited_lobby_id.low) && $util.isInteger(message.invited_lobby_id.high))) return "invited_lobby_id: integer|Long expected"; - if (message.abandoning_match_id != null && message.hasOwnProperty("abandoning_match_id")) + if (message.abandoning_match_id != null && $Object.hasOwnProperty.call(message, "abandoning_match_id")) if (!$util.isInteger(message.abandoning_match_id) && !(message.abandoning_match_id && $util.isInteger(message.abandoning_match_id.low) && $util.isInteger(message.abandoning_match_id.high))) return "abandoning_match_id: integer|Long expected"; - if (message.abandoning_invite_lobby_ids != null && message.hasOwnProperty("abandoning_invite_lobby_ids")) { - if (!Array.isArray(message.abandoning_invite_lobby_ids)) + if (message.abandoning_invite_lobby_ids != null && $Object.hasOwnProperty.call(message, "abandoning_invite_lobby_ids")) { + if (!$Array.isArray(message.abandoning_invite_lobby_ids)) return "abandoning_invite_lobby_ids: array expected"; for (var i = 0; i < message.abandoning_invite_lobby_ids.length; ++i) if (!$util.isInteger(message.abandoning_invite_lobby_ids[i]) && !(message.abandoning_invite_lobby_ids[i] && $util.isInteger(message.abandoning_invite_lobby_ids[i].low) && $util.isInteger(message.abandoning_invite_lobby_ids[i].high))) @@ -24642,37 +31957,43 @@ * @param {Object.} object Plain object * @returns {CMsgAcceptLobbyInvite} CMsgAcceptLobbyInvite */ - CMsgAcceptLobbyInvite.fromObject = function fromObject(object) { + CMsgAcceptLobbyInvite.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAcceptLobbyInvite) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAcceptLobbyInvite: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAcceptLobbyInvite(); if (object.invited_lobby_id != null) if ($util.Long) - (message.invited_lobby_id = $util.Long.fromValue(object.invited_lobby_id)).unsigned = true; + message.invited_lobby_id = $util.Long.fromValue(object.invited_lobby_id, true); else if (typeof object.invited_lobby_id === "string") - message.invited_lobby_id = parseInt(object.invited_lobby_id, 10); + message.invited_lobby_id = $parseInt(object.invited_lobby_id, 10); else if (typeof object.invited_lobby_id === "number") message.invited_lobby_id = object.invited_lobby_id; else if (typeof object.invited_lobby_id === "object") message.invited_lobby_id = new $util.LongBits(object.invited_lobby_id.low >>> 0, object.invited_lobby_id.high >>> 0).toNumber(true); if (object.abandoning_match_id != null) if ($util.Long) - (message.abandoning_match_id = $util.Long.fromValue(object.abandoning_match_id)).unsigned = true; + message.abandoning_match_id = $util.Long.fromValue(object.abandoning_match_id, true); else if (typeof object.abandoning_match_id === "string") - message.abandoning_match_id = parseInt(object.abandoning_match_id, 10); + message.abandoning_match_id = $parseInt(object.abandoning_match_id, 10); else if (typeof object.abandoning_match_id === "number") message.abandoning_match_id = object.abandoning_match_id; else if (typeof object.abandoning_match_id === "object") message.abandoning_match_id = new $util.LongBits(object.abandoning_match_id.low >>> 0, object.abandoning_match_id.high >>> 0).toNumber(true); if (object.abandoning_invite_lobby_ids) { - if (!Array.isArray(object.abandoning_invite_lobby_ids)) - throw TypeError(".CMsgAcceptLobbyInvite.abandoning_invite_lobby_ids: array expected"); - message.abandoning_invite_lobby_ids = []; + if (!$Array.isArray(object.abandoning_invite_lobby_ids)) + throw $TypeError(".CMsgAcceptLobbyInvite.abandoning_invite_lobby_ids: array expected"); + message.abandoning_invite_lobby_ids = $Array(object.abandoning_invite_lobby_ids.length); for (var i = 0; i < object.abandoning_invite_lobby_ids.length; ++i) if ($util.Long) - (message.abandoning_invite_lobby_ids[i] = $util.Long.fromValue(object.abandoning_invite_lobby_ids[i])).unsigned = true; + message.abandoning_invite_lobby_ids[i] = $util.Long.fromValue(object.abandoning_invite_lobby_ids[i], true); else if (typeof object.abandoning_invite_lobby_ids[i] === "string") - message.abandoning_invite_lobby_ids[i] = parseInt(object.abandoning_invite_lobby_ids[i], 10); + message.abandoning_invite_lobby_ids[i] = $parseInt(object.abandoning_invite_lobby_ids[i], 10); else if (typeof object.abandoning_invite_lobby_ids[i] === "number") message.abandoning_invite_lobby_ids[i] = object.abandoning_invite_lobby_ids[i]; else if (typeof object.abandoning_invite_lobby_ids[i] === "object") @@ -24690,41 +32011,51 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAcceptLobbyInvite.toObject = function toObject(message, options) { + CMsgAcceptLobbyInvite.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.abandoning_invite_lobby_ids = []; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.invited_lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.invited_lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.invited_lobby_id = options.longs === String ? "0" : 0; + object.invited_lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.abandoning_match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.abandoning_match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.abandoning_match_id = options.longs === String ? "0" : 0; + object.abandoning_match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.invited_lobby_id != null && message.hasOwnProperty("invited_lobby_id")) - if (typeof message.invited_lobby_id === "number") - object.invited_lobby_id = options.longs === String ? String(message.invited_lobby_id) : message.invited_lobby_id; + if (message.invited_lobby_id != null && $Object.hasOwnProperty.call(message, "invited_lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.invited_lobby_id = typeof message.invited_lobby_id === "number" ? $BigInt(message.invited_lobby_id) : $util.Long.fromBits(message.invited_lobby_id.low >>> 0, message.invited_lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.invited_lobby_id === "number") + object.invited_lobby_id = options.longs === $String ? $String(message.invited_lobby_id) : message.invited_lobby_id; else - object.invited_lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.invited_lobby_id) : options.longs === Number ? new $util.LongBits(message.invited_lobby_id.low >>> 0, message.invited_lobby_id.high >>> 0).toNumber(true) : message.invited_lobby_id; - if (message.abandoning_match_id != null && message.hasOwnProperty("abandoning_match_id")) - if (typeof message.abandoning_match_id === "number") - object.abandoning_match_id = options.longs === String ? String(message.abandoning_match_id) : message.abandoning_match_id; + object.invited_lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.invited_lobby_id) : options.longs === $Number ? new $util.LongBits(message.invited_lobby_id.low >>> 0, message.invited_lobby_id.high >>> 0).toNumber(true) : message.invited_lobby_id; + if (message.abandoning_match_id != null && $Object.hasOwnProperty.call(message, "abandoning_match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.abandoning_match_id = typeof message.abandoning_match_id === "number" ? $BigInt(message.abandoning_match_id) : $util.Long.fromBits(message.abandoning_match_id.low >>> 0, message.abandoning_match_id.high >>> 0, true).toBigInt(); + else if (typeof message.abandoning_match_id === "number") + object.abandoning_match_id = options.longs === $String ? $String(message.abandoning_match_id) : message.abandoning_match_id; else - object.abandoning_match_id = options.longs === String ? $util.Long.prototype.toString.call(message.abandoning_match_id) : options.longs === Number ? new $util.LongBits(message.abandoning_match_id.low >>> 0, message.abandoning_match_id.high >>> 0).toNumber(true) : message.abandoning_match_id; + object.abandoning_match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.abandoning_match_id) : options.longs === $Number ? new $util.LongBits(message.abandoning_match_id.low >>> 0, message.abandoning_match_id.high >>> 0).toNumber(true) : message.abandoning_match_id; if (message.abandoning_invite_lobby_ids && message.abandoning_invite_lobby_ids.length) { - object.abandoning_invite_lobby_ids = []; + object.abandoning_invite_lobby_ids = $Array(message.abandoning_invite_lobby_ids.length); for (var j = 0; j < message.abandoning_invite_lobby_ids.length; ++j) - if (typeof message.abandoning_invite_lobby_ids[j] === "number") - object.abandoning_invite_lobby_ids[j] = options.longs === String ? String(message.abandoning_invite_lobby_ids[j]) : message.abandoning_invite_lobby_ids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.abandoning_invite_lobby_ids[j] = typeof message.abandoning_invite_lobby_ids[j] === "number" ? $BigInt(message.abandoning_invite_lobby_ids[j]) : $util.Long.fromBits(message.abandoning_invite_lobby_ids[j].low >>> 0, message.abandoning_invite_lobby_ids[j].high >>> 0, true).toBigInt(); + else if (typeof message.abandoning_invite_lobby_ids[j] === "number") + object.abandoning_invite_lobby_ids[j] = options.longs === $String ? $String(message.abandoning_invite_lobby_ids[j]) : message.abandoning_invite_lobby_ids[j]; else - object.abandoning_invite_lobby_ids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.abandoning_invite_lobby_ids[j]) : options.longs === Number ? new $util.LongBits(message.abandoning_invite_lobby_ids[j].low >>> 0, message.abandoning_invite_lobby_ids[j].high >>> 0).toNumber(true) : message.abandoning_invite_lobby_ids[j]; + object.abandoning_invite_lobby_ids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.abandoning_invite_lobby_ids[j]) : options.longs === $Number ? new $util.LongBits(message.abandoning_invite_lobby_ids[j].low >>> 0, message.abandoning_invite_lobby_ids[j].high >>> 0).toNumber(true) : message.abandoning_invite_lobby_ids[j]; } return object; }; @@ -24736,8 +32067,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAcceptLobbyInvite.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAcceptLobbyInvite.prototype.toJSON = function() { + return CMsgAcceptLobbyInvite.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAcceptLobbyInvite + * @function getTypeUrl + * @memberof CMsgAcceptLobbyInvite + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAcceptLobbyInvite.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAcceptLobbyInvite"; }; return CMsgAcceptLobbyInvite; @@ -24745,36 +32090,53 @@ $root.CMsgAcceptLobbyInviteReply = (function() { + /** + * Properties of a CMsgAcceptLobbyInviteReply. + * @typedef {Object} CMsgAcceptLobbyInviteReply.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAcceptLobbyInviteReply. * @exports ICMsgAcceptLobbyInviteReply * @interface ICMsgAcceptLobbyInviteReply + * @augments CMsgAcceptLobbyInviteReply.$Properties + * @deprecated Use CMsgAcceptLobbyInviteReply.$Properties instead. + */ + + /** + * Shape of a CMsgAcceptLobbyInviteReply. + * @typedef {CMsgAcceptLobbyInviteReply.$Properties} CMsgAcceptLobbyInviteReply.$Shape */ /** * Constructs a new CMsgAcceptLobbyInviteReply. * @exports CMsgAcceptLobbyInviteReply * @classdesc Represents a CMsgAcceptLobbyInviteReply. - * @implements ICMsgAcceptLobbyInviteReply * @constructor - * @param {ICMsgAcceptLobbyInviteReply=} [properties] Properties to set + * @param {CMsgAcceptLobbyInviteReply.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAcceptLobbyInviteReply(properties) { + var CMsgAcceptLobbyInviteReply = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgAcceptLobbyInviteReply instance using the specified properties. * @function create * @memberof CMsgAcceptLobbyInviteReply * @static - * @param {ICMsgAcceptLobbyInviteReply=} [properties] Properties to set + * @param {CMsgAcceptLobbyInviteReply.$Properties=} [properties] Properties to set * @returns {CMsgAcceptLobbyInviteReply} CMsgAcceptLobbyInviteReply instance + * @type {{ + * (properties: CMsgAcceptLobbyInviteReply.$Shape): CMsgAcceptLobbyInviteReply & CMsgAcceptLobbyInviteReply.$Shape; + * (properties?: CMsgAcceptLobbyInviteReply.$Properties): CMsgAcceptLobbyInviteReply; + * }} */ - CMsgAcceptLobbyInviteReply.create = function create(properties) { + CMsgAcceptLobbyInviteReply.create = function(properties) { return new CMsgAcceptLobbyInviteReply(properties); }; @@ -24783,13 +32145,20 @@ * @function encode * @memberof CMsgAcceptLobbyInviteReply * @static - * @param {ICMsgAcceptLobbyInviteReply} message CMsgAcceptLobbyInviteReply message or plain object to encode + * @param {CMsgAcceptLobbyInviteReply.$Properties} message CMsgAcceptLobbyInviteReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAcceptLobbyInviteReply.encode = function encode(message, writer) { + CMsgAcceptLobbyInviteReply.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24798,12 +32167,12 @@ * @function encodeDelimited * @memberof CMsgAcceptLobbyInviteReply * @static - * @param {ICMsgAcceptLobbyInviteReply} message CMsgAcceptLobbyInviteReply message or plain object to encode + * @param {CMsgAcceptLobbyInviteReply.$Properties} message CMsgAcceptLobbyInviteReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAcceptLobbyInviteReply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAcceptLobbyInviteReply.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24813,22 +32182,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAcceptLobbyInviteReply} CMsgAcceptLobbyInviteReply + * @returns {CMsgAcceptLobbyInviteReply & CMsgAcceptLobbyInviteReply.$Shape} CMsgAcceptLobbyInviteReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAcceptLobbyInviteReply.decode = function decode(reader, length) { + CMsgAcceptLobbyInviteReply.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAcceptLobbyInviteReply(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAcceptLobbyInviteReply(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24838,11 +32218,11 @@ * @memberof CMsgAcceptLobbyInviteReply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAcceptLobbyInviteReply} CMsgAcceptLobbyInviteReply + * @returns {CMsgAcceptLobbyInviteReply & CMsgAcceptLobbyInviteReply.$Shape} CMsgAcceptLobbyInviteReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAcceptLobbyInviteReply.decodeDelimited = function decodeDelimited(reader) { + CMsgAcceptLobbyInviteReply.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -24856,9 +32236,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAcceptLobbyInviteReply.verify = function verify(message) { + CMsgAcceptLobbyInviteReply.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -24870,9 +32254,15 @@ * @param {Object.} object Plain object * @returns {CMsgAcceptLobbyInviteReply} CMsgAcceptLobbyInviteReply */ - CMsgAcceptLobbyInviteReply.fromObject = function fromObject(object) { + CMsgAcceptLobbyInviteReply.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAcceptLobbyInviteReply) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAcceptLobbyInviteReply: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgAcceptLobbyInviteReply(); }; @@ -24885,7 +32275,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAcceptLobbyInviteReply.toObject = function toObject() { + CMsgAcceptLobbyInviteReply.toObject = function () { return {}; }; @@ -24896,8 +32286,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAcceptLobbyInviteReply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAcceptLobbyInviteReply.prototype.toJSON = function() { + return CMsgAcceptLobbyInviteReply.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAcceptLobbyInviteReply + * @function getTypeUrl + * @memberof CMsgAcceptLobbyInviteReply + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAcceptLobbyInviteReply.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAcceptLobbyInviteReply"; }; return CMsgAcceptLobbyInviteReply; @@ -24905,36 +32309,53 @@ $root.CMsgMatchmakingSearchCountRequest = (function() { + /** + * Properties of a CMsgMatchmakingSearchCountRequest. + * @typedef {Object} CMsgMatchmakingSearchCountRequest.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgMatchmakingSearchCountRequest. * @exports ICMsgMatchmakingSearchCountRequest * @interface ICMsgMatchmakingSearchCountRequest + * @augments CMsgMatchmakingSearchCountRequest.$Properties + * @deprecated Use CMsgMatchmakingSearchCountRequest.$Properties instead. + */ + + /** + * Shape of a CMsgMatchmakingSearchCountRequest. + * @typedef {CMsgMatchmakingSearchCountRequest.$Properties} CMsgMatchmakingSearchCountRequest.$Shape */ /** * Constructs a new CMsgMatchmakingSearchCountRequest. * @exports CMsgMatchmakingSearchCountRequest * @classdesc Represents a CMsgMatchmakingSearchCountRequest. - * @implements ICMsgMatchmakingSearchCountRequest * @constructor - * @param {ICMsgMatchmakingSearchCountRequest=} [properties] Properties to set + * @param {CMsgMatchmakingSearchCountRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgMatchmakingSearchCountRequest(properties) { + var CMsgMatchmakingSearchCountRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgMatchmakingSearchCountRequest instance using the specified properties. * @function create * @memberof CMsgMatchmakingSearchCountRequest * @static - * @param {ICMsgMatchmakingSearchCountRequest=} [properties] Properties to set + * @param {CMsgMatchmakingSearchCountRequest.$Properties=} [properties] Properties to set * @returns {CMsgMatchmakingSearchCountRequest} CMsgMatchmakingSearchCountRequest instance + * @type {{ + * (properties: CMsgMatchmakingSearchCountRequest.$Shape): CMsgMatchmakingSearchCountRequest & CMsgMatchmakingSearchCountRequest.$Shape; + * (properties?: CMsgMatchmakingSearchCountRequest.$Properties): CMsgMatchmakingSearchCountRequest; + * }} */ - CMsgMatchmakingSearchCountRequest.create = function create(properties) { + CMsgMatchmakingSearchCountRequest.create = function(properties) { return new CMsgMatchmakingSearchCountRequest(properties); }; @@ -24943,13 +32364,20 @@ * @function encode * @memberof CMsgMatchmakingSearchCountRequest * @static - * @param {ICMsgMatchmakingSearchCountRequest} message CMsgMatchmakingSearchCountRequest message or plain object to encode + * @param {CMsgMatchmakingSearchCountRequest.$Properties} message CMsgMatchmakingSearchCountRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMatchmakingSearchCountRequest.encode = function encode(message, writer) { + CMsgMatchmakingSearchCountRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -24958,12 +32386,12 @@ * @function encodeDelimited * @memberof CMsgMatchmakingSearchCountRequest * @static - * @param {ICMsgMatchmakingSearchCountRequest} message CMsgMatchmakingSearchCountRequest message or plain object to encode + * @param {CMsgMatchmakingSearchCountRequest.$Properties} message CMsgMatchmakingSearchCountRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMatchmakingSearchCountRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgMatchmakingSearchCountRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -24973,22 +32401,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgMatchmakingSearchCountRequest} CMsgMatchmakingSearchCountRequest + * @returns {CMsgMatchmakingSearchCountRequest & CMsgMatchmakingSearchCountRequest.$Shape} CMsgMatchmakingSearchCountRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMatchmakingSearchCountRequest.decode = function decode(reader, length) { + CMsgMatchmakingSearchCountRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgMatchmakingSearchCountRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgMatchmakingSearchCountRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -24998,11 +32437,11 @@ * @memberof CMsgMatchmakingSearchCountRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgMatchmakingSearchCountRequest} CMsgMatchmakingSearchCountRequest + * @returns {CMsgMatchmakingSearchCountRequest & CMsgMatchmakingSearchCountRequest.$Shape} CMsgMatchmakingSearchCountRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMatchmakingSearchCountRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgMatchmakingSearchCountRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25016,9 +32455,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgMatchmakingSearchCountRequest.verify = function verify(message) { + CMsgMatchmakingSearchCountRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -25030,9 +32473,15 @@ * @param {Object.} object Plain object * @returns {CMsgMatchmakingSearchCountRequest} CMsgMatchmakingSearchCountRequest */ - CMsgMatchmakingSearchCountRequest.fromObject = function fromObject(object) { + CMsgMatchmakingSearchCountRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgMatchmakingSearchCountRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgMatchmakingSearchCountRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgMatchmakingSearchCountRequest(); }; @@ -25045,7 +32494,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgMatchmakingSearchCountRequest.toObject = function toObject() { + CMsgMatchmakingSearchCountRequest.toObject = function () { return {}; }; @@ -25056,8 +32505,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgMatchmakingSearchCountRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgMatchmakingSearchCountRequest.prototype.toJSON = function() { + return CMsgMatchmakingSearchCountRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgMatchmakingSearchCountRequest + * @function getTypeUrl + * @memberof CMsgMatchmakingSearchCountRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgMatchmakingSearchCountRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgMatchmakingSearchCountRequest"; }; return CMsgMatchmakingSearchCountRequest; @@ -25065,28 +32528,41 @@ $root.CMsgMatchmakingSearchCountResponse = (function() { + /** + * Properties of a CMsgMatchmakingSearchCountResponse. + * @typedef {Object} CMsgMatchmakingSearchCountResponse.$Properties + * @property {Array.|null} [searching_players_by_group] CMsgMatchmakingSearchCountResponse searching_players_by_group + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgMatchmakingSearchCountResponse. * @exports ICMsgMatchmakingSearchCountResponse * @interface ICMsgMatchmakingSearchCountResponse - * @property {Array.|null} [searching_players_by_group] CMsgMatchmakingSearchCountResponse searching_players_by_group + * @augments CMsgMatchmakingSearchCountResponse.$Properties + * @deprecated Use CMsgMatchmakingSearchCountResponse.$Properties instead. + */ + + /** + * Shape of a CMsgMatchmakingSearchCountResponse. + * @typedef {CMsgMatchmakingSearchCountResponse.$Properties} CMsgMatchmakingSearchCountResponse.$Shape */ /** * Constructs a new CMsgMatchmakingSearchCountResponse. * @exports CMsgMatchmakingSearchCountResponse * @classdesc Represents a CMsgMatchmakingSearchCountResponse. - * @implements ICMsgMatchmakingSearchCountResponse * @constructor - * @param {ICMsgMatchmakingSearchCountResponse=} [properties] Properties to set + * @param {CMsgMatchmakingSearchCountResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgMatchmakingSearchCountResponse(properties) { + var CMsgMatchmakingSearchCountResponse = function (properties) { this.searching_players_by_group = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgMatchmakingSearchCountResponse searching_players_by_group. @@ -25101,10 +32577,14 @@ * @function create * @memberof CMsgMatchmakingSearchCountResponse * @static - * @param {ICMsgMatchmakingSearchCountResponse=} [properties] Properties to set + * @param {CMsgMatchmakingSearchCountResponse.$Properties=} [properties] Properties to set * @returns {CMsgMatchmakingSearchCountResponse} CMsgMatchmakingSearchCountResponse instance + * @type {{ + * (properties: CMsgMatchmakingSearchCountResponse.$Shape): CMsgMatchmakingSearchCountResponse & CMsgMatchmakingSearchCountResponse.$Shape; + * (properties?: CMsgMatchmakingSearchCountResponse.$Properties): CMsgMatchmakingSearchCountResponse; + * }} */ - CMsgMatchmakingSearchCountResponse.create = function create(properties) { + CMsgMatchmakingSearchCountResponse.create = function(properties) { return new CMsgMatchmakingSearchCountResponse(properties); }; @@ -25113,16 +32593,23 @@ * @function encode * @memberof CMsgMatchmakingSearchCountResponse * @static - * @param {ICMsgMatchmakingSearchCountResponse} message CMsgMatchmakingSearchCountResponse message or plain object to encode + * @param {CMsgMatchmakingSearchCountResponse.$Properties} message CMsgMatchmakingSearchCountResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMatchmakingSearchCountResponse.encode = function encode(message, writer) { + CMsgMatchmakingSearchCountResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.searching_players_by_group != null && message.searching_players_by_group.length) for (var i = 0; i < message.searching_players_by_group.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.searching_players_by_group[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25131,12 +32618,12 @@ * @function encodeDelimited * @memberof CMsgMatchmakingSearchCountResponse * @static - * @param {ICMsgMatchmakingSearchCountResponse} message CMsgMatchmakingSearchCountResponse message or plain object to encode + * @param {CMsgMatchmakingSearchCountResponse.$Properties} message CMsgMatchmakingSearchCountResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMatchmakingSearchCountResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgMatchmakingSearchCountResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25146,32 +32633,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgMatchmakingSearchCountResponse} CMsgMatchmakingSearchCountResponse + * @returns {CMsgMatchmakingSearchCountResponse & CMsgMatchmakingSearchCountResponse.$Shape} CMsgMatchmakingSearchCountResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMatchmakingSearchCountResponse.decode = function decode(reader, length) { + CMsgMatchmakingSearchCountResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgMatchmakingSearchCountResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgMatchmakingSearchCountResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.searching_players_by_group && message.searching_players_by_group.length)) - message.searching_players_by_group = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.searching_players_by_group.push(reader.uint32()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.searching_players_by_group && message.searching_players_by_group.length)) + message.searching_players_by_group = []; + reader.uint32s(message.searching_players_by_group); + continue; + } + if (wireType !== 0) + break; + if (!(message.searching_players_by_group && message.searching_players_by_group.length)) + message.searching_players_by_group = []; message.searching_players_by_group.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25181,11 +32686,11 @@ * @memberof CMsgMatchmakingSearchCountResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgMatchmakingSearchCountResponse} CMsgMatchmakingSearchCountResponse + * @returns {CMsgMatchmakingSearchCountResponse & CMsgMatchmakingSearchCountResponse.$Shape} CMsgMatchmakingSearchCountResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMatchmakingSearchCountResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgMatchmakingSearchCountResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25199,11 +32704,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgMatchmakingSearchCountResponse.verify = function verify(message) { + CMsgMatchmakingSearchCountResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.searching_players_by_group != null && message.hasOwnProperty("searching_players_by_group")) { - if (!Array.isArray(message.searching_players_by_group)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.searching_players_by_group != null && $Object.hasOwnProperty.call(message, "searching_players_by_group")) { + if (!$Array.isArray(message.searching_players_by_group)) return "searching_players_by_group: array expected"; for (var i = 0; i < message.searching_players_by_group.length; ++i) if (!$util.isInteger(message.searching_players_by_group[i])) @@ -25220,14 +32729,20 @@ * @param {Object.} object Plain object * @returns {CMsgMatchmakingSearchCountResponse} CMsgMatchmakingSearchCountResponse */ - CMsgMatchmakingSearchCountResponse.fromObject = function fromObject(object) { + CMsgMatchmakingSearchCountResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgMatchmakingSearchCountResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgMatchmakingSearchCountResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgMatchmakingSearchCountResponse(); if (object.searching_players_by_group) { - if (!Array.isArray(object.searching_players_by_group)) - throw TypeError(".CMsgMatchmakingSearchCountResponse.searching_players_by_group: array expected"); - message.searching_players_by_group = []; + if (!$Array.isArray(object.searching_players_by_group)) + throw $TypeError(".CMsgMatchmakingSearchCountResponse.searching_players_by_group: array expected"); + message.searching_players_by_group = $Array(object.searching_players_by_group.length); for (var i = 0; i < object.searching_players_by_group.length; ++i) message.searching_players_by_group[i] = object.searching_players_by_group[i] >>> 0; } @@ -25243,14 +32758,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgMatchmakingSearchCountResponse.toObject = function toObject(message, options) { + CMsgMatchmakingSearchCountResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.searching_players_by_group = []; if (message.searching_players_by_group && message.searching_players_by_group.length) { - object.searching_players_by_group = []; + object.searching_players_by_group = $Array(message.searching_players_by_group.length); for (var j = 0; j < message.searching_players_by_group.length; ++j) object.searching_players_by_group[j] = message.searching_players_by_group[j]; } @@ -25264,8 +32783,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgMatchmakingSearchCountResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgMatchmakingSearchCountResponse.prototype.toJSON = function() { + return CMsgMatchmakingSearchCountResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgMatchmakingSearchCountResponse + * @function getTypeUrl + * @memberof CMsgMatchmakingSearchCountResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgMatchmakingSearchCountResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgMatchmakingSearchCountResponse"; }; return CMsgMatchmakingSearchCountResponse; @@ -25273,36 +32806,53 @@ $root.CMsgKickedFromMatchmakingQueue = (function() { + /** + * Properties of a CMsgKickedFromMatchmakingQueue. + * @typedef {Object} CMsgKickedFromMatchmakingQueue.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgKickedFromMatchmakingQueue. * @exports ICMsgKickedFromMatchmakingQueue * @interface ICMsgKickedFromMatchmakingQueue + * @augments CMsgKickedFromMatchmakingQueue.$Properties + * @deprecated Use CMsgKickedFromMatchmakingQueue.$Properties instead. + */ + + /** + * Shape of a CMsgKickedFromMatchmakingQueue. + * @typedef {CMsgKickedFromMatchmakingQueue.$Properties} CMsgKickedFromMatchmakingQueue.$Shape */ /** * Constructs a new CMsgKickedFromMatchmakingQueue. * @exports CMsgKickedFromMatchmakingQueue * @classdesc Represents a CMsgKickedFromMatchmakingQueue. - * @implements ICMsgKickedFromMatchmakingQueue * @constructor - * @param {ICMsgKickedFromMatchmakingQueue=} [properties] Properties to set + * @param {CMsgKickedFromMatchmakingQueue.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgKickedFromMatchmakingQueue(properties) { + var CMsgKickedFromMatchmakingQueue = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgKickedFromMatchmakingQueue instance using the specified properties. * @function create * @memberof CMsgKickedFromMatchmakingQueue * @static - * @param {ICMsgKickedFromMatchmakingQueue=} [properties] Properties to set + * @param {CMsgKickedFromMatchmakingQueue.$Properties=} [properties] Properties to set * @returns {CMsgKickedFromMatchmakingQueue} CMsgKickedFromMatchmakingQueue instance + * @type {{ + * (properties: CMsgKickedFromMatchmakingQueue.$Shape): CMsgKickedFromMatchmakingQueue & CMsgKickedFromMatchmakingQueue.$Shape; + * (properties?: CMsgKickedFromMatchmakingQueue.$Properties): CMsgKickedFromMatchmakingQueue; + * }} */ - CMsgKickedFromMatchmakingQueue.create = function create(properties) { + CMsgKickedFromMatchmakingQueue.create = function(properties) { return new CMsgKickedFromMatchmakingQueue(properties); }; @@ -25311,13 +32861,20 @@ * @function encode * @memberof CMsgKickedFromMatchmakingQueue * @static - * @param {ICMsgKickedFromMatchmakingQueue} message CMsgKickedFromMatchmakingQueue message or plain object to encode + * @param {CMsgKickedFromMatchmakingQueue.$Properties} message CMsgKickedFromMatchmakingQueue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgKickedFromMatchmakingQueue.encode = function encode(message, writer) { + CMsgKickedFromMatchmakingQueue.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25326,12 +32883,12 @@ * @function encodeDelimited * @memberof CMsgKickedFromMatchmakingQueue * @static - * @param {ICMsgKickedFromMatchmakingQueue} message CMsgKickedFromMatchmakingQueue message or plain object to encode + * @param {CMsgKickedFromMatchmakingQueue.$Properties} message CMsgKickedFromMatchmakingQueue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgKickedFromMatchmakingQueue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgKickedFromMatchmakingQueue.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25341,22 +32898,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgKickedFromMatchmakingQueue} CMsgKickedFromMatchmakingQueue + * @returns {CMsgKickedFromMatchmakingQueue & CMsgKickedFromMatchmakingQueue.$Shape} CMsgKickedFromMatchmakingQueue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgKickedFromMatchmakingQueue.decode = function decode(reader, length) { + CMsgKickedFromMatchmakingQueue.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgKickedFromMatchmakingQueue(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgKickedFromMatchmakingQueue(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25366,11 +32934,11 @@ * @memberof CMsgKickedFromMatchmakingQueue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgKickedFromMatchmakingQueue} CMsgKickedFromMatchmakingQueue + * @returns {CMsgKickedFromMatchmakingQueue & CMsgKickedFromMatchmakingQueue.$Shape} CMsgKickedFromMatchmakingQueue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgKickedFromMatchmakingQueue.decodeDelimited = function decodeDelimited(reader) { + CMsgKickedFromMatchmakingQueue.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25384,9 +32952,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgKickedFromMatchmakingQueue.verify = function verify(message) { + CMsgKickedFromMatchmakingQueue.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -25398,9 +32970,15 @@ * @param {Object.} object Plain object * @returns {CMsgKickedFromMatchmakingQueue} CMsgKickedFromMatchmakingQueue */ - CMsgKickedFromMatchmakingQueue.fromObject = function fromObject(object) { + CMsgKickedFromMatchmakingQueue.fromObject = function (object, _depth) { if (object instanceof $root.CMsgKickedFromMatchmakingQueue) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgKickedFromMatchmakingQueue: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgKickedFromMatchmakingQueue(); }; @@ -25413,7 +32991,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgKickedFromMatchmakingQueue.toObject = function toObject() { + CMsgKickedFromMatchmakingQueue.toObject = function () { return {}; }; @@ -25424,8 +33002,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgKickedFromMatchmakingQueue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgKickedFromMatchmakingQueue.prototype.toJSON = function() { + return CMsgKickedFromMatchmakingQueue.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgKickedFromMatchmakingQueue + * @function getTypeUrl + * @memberof CMsgKickedFromMatchmakingQueue + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgKickedFromMatchmakingQueue.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgKickedFromMatchmakingQueue"; }; return CMsgKickedFromMatchmakingQueue; @@ -25435,8 +33027,7 @@ /** * Properties of a CMsgGameServerMatchmakingStatus. - * @exports ICMsgGameServerMatchmakingStatus - * @interface ICMsgGameServerMatchmakingStatus + * @typedef {Object} CMsgGameServerMatchmakingStatus.$Properties * @property {number|null} [server_version] CMsgGameServerMatchmakingStatus server_version * @property {ServerMatchmakingState|null} [matchmaking_state] CMsgGameServerMatchmakingStatus matchmaking_state * @property {string|null} [map] CMsgGameServerMatchmakingStatus map @@ -25450,7 +33041,7 @@ * @property {boolean|null} [server_trusted] CMsgGameServerMatchmakingStatus server_trusted * @property {boolean|null} [server_dedicated] CMsgGameServerMatchmakingStatus server_dedicated * @property {number|null} [strict] CMsgGameServerMatchmakingStatus strict - * @property {Array.|null} [players] CMsgGameServerMatchmakingStatus players + * @property {Array.|null} [players] CMsgGameServerMatchmakingStatus players * @property {TF_GC_GameState|null} [game_state] CMsgGameServerMatchmakingStatus game_state * @property {CMsgGameServerMatchmakingStatus.Event|null} [event] CMsgGameServerMatchmakingStatus event * @property {number|null} [mvm_wave] CMsgGameServerMatchmakingStatus mvm_wave @@ -25458,23 +33049,37 @@ * @property {number|null} [mvm_credits_dropped] CMsgGameServerMatchmakingStatus mvm_credits_dropped * @property {number|null} [match_group] CMsgGameServerMatchmakingStatus match_group * @property {number|null} [lobby_mm_version] CMsgGameServerMatchmakingStatus lobby_mm_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGameServerMatchmakingStatus. + * @exports ICMsgGameServerMatchmakingStatus + * @interface ICMsgGameServerMatchmakingStatus + * @augments CMsgGameServerMatchmakingStatus.$Properties + * @deprecated Use CMsgGameServerMatchmakingStatus.$Properties instead. + */ + + /** + * Shape of a CMsgGameServerMatchmakingStatus. + * @typedef {CMsgGameServerMatchmakingStatus.$Properties} CMsgGameServerMatchmakingStatus.$Shape */ /** * Constructs a new CMsgGameServerMatchmakingStatus. * @exports CMsgGameServerMatchmakingStatus * @classdesc Represents a CMsgGameServerMatchmakingStatus. - * @implements ICMsgGameServerMatchmakingStatus * @constructor - * @param {ICMsgGameServerMatchmakingStatus=} [properties] Properties to set + * @param {CMsgGameServerMatchmakingStatus.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGameServerMatchmakingStatus(properties) { + var CMsgGameServerMatchmakingStatus = function (properties) { this.players = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGameServerMatchmakingStatus server_version. @@ -25582,7 +33187,7 @@ /** * CMsgGameServerMatchmakingStatus players. - * @member {Array.} players + * @member {Array.} players * @memberof CMsgGameServerMatchmakingStatus * @instance */ @@ -25649,10 +33254,14 @@ * @function create * @memberof CMsgGameServerMatchmakingStatus * @static - * @param {ICMsgGameServerMatchmakingStatus=} [properties] Properties to set + * @param {CMsgGameServerMatchmakingStatus.$Properties=} [properties] Properties to set * @returns {CMsgGameServerMatchmakingStatus} CMsgGameServerMatchmakingStatus instance + * @type {{ + * (properties: CMsgGameServerMatchmakingStatus.$Shape): CMsgGameServerMatchmakingStatus & CMsgGameServerMatchmakingStatus.$Shape; + * (properties?: CMsgGameServerMatchmakingStatus.$Properties): CMsgGameServerMatchmakingStatus; + * }} */ - CMsgGameServerMatchmakingStatus.create = function create(properties) { + CMsgGameServerMatchmakingStatus.create = function(properties) { return new CMsgGameServerMatchmakingStatus(properties); }; @@ -25661,56 +33270,63 @@ * @function encode * @memberof CMsgGameServerMatchmakingStatus * @static - * @param {ICMsgGameServerMatchmakingStatus} message CMsgGameServerMatchmakingStatus message or plain object to encode + * @param {CMsgGameServerMatchmakingStatus.$Properties} message CMsgGameServerMatchmakingStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGameServerMatchmakingStatus.encode = function encode(message, writer) { + CMsgGameServerMatchmakingStatus.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.matchmaking_state != null && Object.hasOwnProperty.call(message, "matchmaking_state")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.matchmaking_state != null && $Object.hasOwnProperty.call(message, "matchmaking_state")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchmaking_state); - if (message.map != null && Object.hasOwnProperty.call(message, "map")) + if (message.map != null && $Object.hasOwnProperty.call(message, "map")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.map); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.tags); - if (message.bot_count != null && Object.hasOwnProperty.call(message, "bot_count")) + if (message.bot_count != null && $Object.hasOwnProperty.call(message, "bot_count")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.bot_count); - if (message.num_spectators != null && Object.hasOwnProperty.call(message, "num_spectators")) + if (message.num_spectators != null && $Object.hasOwnProperty.call(message, "num_spectators")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.num_spectators); - if (message.max_players != null && Object.hasOwnProperty.call(message, "max_players")) + if (message.max_players != null && $Object.hasOwnProperty.call(message, "max_players")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.max_players); - if (message.slots_free != null && Object.hasOwnProperty.call(message, "slots_free")) + if (message.slots_free != null && $Object.hasOwnProperty.call(message, "slots_free")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.slots_free); - if (message.server_region != null && Object.hasOwnProperty.call(message, "server_region")) + if (message.server_region != null && $Object.hasOwnProperty.call(message, "server_region")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.server_region); - if (message.server_loadavg != null && Object.hasOwnProperty.call(message, "server_loadavg")) + if (message.server_loadavg != null && $Object.hasOwnProperty.call(message, "server_loadavg")) writer.uint32(/* id 10, wireType 5 =*/85).float(message.server_loadavg); - if (message.server_trusted != null && Object.hasOwnProperty.call(message, "server_trusted")) + if (message.server_trusted != null && $Object.hasOwnProperty.call(message, "server_trusted")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.server_trusted); - if (message.server_dedicated != null && Object.hasOwnProperty.call(message, "server_dedicated")) + if (message.server_dedicated != null && $Object.hasOwnProperty.call(message, "server_dedicated")) writer.uint32(/* id 12, wireType 0 =*/96).bool(message.server_dedicated); if (message.players != null && message.players.length) for (var i = 0; i < message.players.length; ++i) - $root.CMsgGameServerMatchmakingStatus.Player.encode(message.players[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.game_state != null && Object.hasOwnProperty.call(message, "game_state")) + $root.CMsgGameServerMatchmakingStatus.Player.encode(message.players[i], writer.uint32(/* id 13, wireType 2 =*/106).fork(), _depth + 1).ldelim(); + if (message.game_state != null && $Object.hasOwnProperty.call(message, "game_state")) writer.uint32(/* id 14, wireType 0 =*/112).int32(message.game_state); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) + if (message.event != null && $Object.hasOwnProperty.call(message, "event")) writer.uint32(/* id 15, wireType 0 =*/120).int32(message.event); - if (message.server_version != null && Object.hasOwnProperty.call(message, "server_version")) + if (message.server_version != null && $Object.hasOwnProperty.call(message, "server_version")) writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.server_version); - if (message.strict != null && Object.hasOwnProperty.call(message, "strict")) + if (message.strict != null && $Object.hasOwnProperty.call(message, "strict")) writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.strict); - if (message.mvm_wave != null && Object.hasOwnProperty.call(message, "mvm_wave")) + if (message.mvm_wave != null && $Object.hasOwnProperty.call(message, "mvm_wave")) writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.mvm_wave); - if (message.mvm_credits_acquired != null && Object.hasOwnProperty.call(message, "mvm_credits_acquired")) + if (message.mvm_credits_acquired != null && $Object.hasOwnProperty.call(message, "mvm_credits_acquired")) writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.mvm_credits_acquired); - if (message.mvm_credits_dropped != null && Object.hasOwnProperty.call(message, "mvm_credits_dropped")) + if (message.mvm_credits_dropped != null && $Object.hasOwnProperty.call(message, "mvm_credits_dropped")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.mvm_credits_dropped); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 23, wireType 0 =*/184).sint32(message.match_group); - if (message.lobby_mm_version != null && Object.hasOwnProperty.call(message, "lobby_mm_version")) + if (message.lobby_mm_version != null && $Object.hasOwnProperty.call(message, "lobby_mm_version")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.lobby_mm_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -25719,12 +33335,12 @@ * @function encodeDelimited * @memberof CMsgGameServerMatchmakingStatus * @static - * @param {ICMsgGameServerMatchmakingStatus} message CMsgGameServerMatchmakingStatus message or plain object to encode + * @param {CMsgGameServerMatchmakingStatus.$Properties} message CMsgGameServerMatchmakingStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGameServerMatchmakingStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGameServerMatchmakingStatus.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -25734,87 +33350,182 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGameServerMatchmakingStatus} CMsgGameServerMatchmakingStatus + * @returns {CMsgGameServerMatchmakingStatus & CMsgGameServerMatchmakingStatus.$Shape} CMsgGameServerMatchmakingStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGameServerMatchmakingStatus.decode = function decode(reader, length) { + CMsgGameServerMatchmakingStatus.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGameServerMatchmakingStatus(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGameServerMatchmakingStatus(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 16: - message.server_version = reader.uint32(); - break; - case 1: - message.matchmaking_state = reader.int32(); - break; - case 3: - message.map = reader.string(); - break; - case 4: - message.tags = reader.string(); - break; - case 5: - message.bot_count = reader.uint32(); - break; - case 6: - message.num_spectators = reader.uint32(); - break; - case 7: - message.max_players = reader.uint32(); - break; - case 8: - message.slots_free = reader.uint32(); - break; - case 9: - message.server_region = reader.uint32(); - break; - case 10: - message.server_loadavg = reader.float(); - break; - case 11: - message.server_trusted = reader.bool(); - break; - case 12: - message.server_dedicated = reader.bool(); - break; - case 17: - message.strict = reader.uint32(); - break; - case 13: - if (!(message.players && message.players.length)) - message.players = []; - message.players.push($root.CMsgGameServerMatchmakingStatus.Player.decode(reader, reader.uint32())); - break; - case 14: - message.game_state = reader.int32(); - break; - case 15: - message.event = reader.int32(); - break; - case 18: - message.mvm_wave = reader.uint32(); - break; - case 19: - message.mvm_credits_acquired = reader.uint32(); - break; - case 20: - message.mvm_credits_dropped = reader.uint32(); - break; - case 23: - message.match_group = reader.sint32(); - break; - case 24: - message.lobby_mm_version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 16: { + if (wireType !== 0) + break; + message.server_version = reader.uint32(); + continue; + } + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ServerMatchmakingState[value] !== $undefined) + message.matchmaking_state = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 2) + break; + message.map = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.tags = reader.string(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.bot_count = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.num_spectators = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.max_players = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.slots_free = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.server_region = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 5) + break; + message.server_loadavg = reader.float(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.server_trusted = reader.bool(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.server_dedicated = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.strict = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 2) + break; + if (!(message.players && message.players.length)) + message.players = []; + message.players.push($root.CMsgGameServerMatchmakingStatus.Player.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 14: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.TF_GC_GameState[value] !== $undefined) + message.game_state = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 15: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGameServerMatchmakingStatus.Event[value] !== $undefined) + message.event = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 18: { + if (wireType !== 0) + break; + message.mvm_wave = reader.uint32(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.mvm_credits_acquired = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.mvm_credits_dropped = reader.uint32(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.match_group = reader.sint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.lobby_mm_version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -25824,11 +33535,11 @@ * @memberof CMsgGameServerMatchmakingStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGameServerMatchmakingStatus} CMsgGameServerMatchmakingStatus + * @returns {CMsgGameServerMatchmakingStatus & CMsgGameServerMatchmakingStatus.$Shape} CMsgGameServerMatchmakingStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGameServerMatchmakingStatus.decodeDelimited = function decodeDelimited(reader) { + CMsgGameServerMatchmakingStatus.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -25842,13 +33553,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGameServerMatchmakingStatus.verify = function verify(message) { + CMsgGameServerMatchmakingStatus.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.server_version != null && message.hasOwnProperty("server_version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.server_version != null && $Object.hasOwnProperty.call(message, "server_version")) if (!$util.isInteger(message.server_version)) return "server_version: integer expected"; - if (message.matchmaking_state != null && message.hasOwnProperty("matchmaking_state")) + if (message.matchmaking_state != null && $Object.hasOwnProperty.call(message, "matchmaking_state")) switch (message.matchmaking_state) { default: return "matchmaking_state: enum value expected"; @@ -25859,49 +33574,49 @@ case 4: break; } - if (message.map != null && message.hasOwnProperty("map")) + if (message.map != null && $Object.hasOwnProperty.call(message, "map")) if (!$util.isString(message.map)) return "map: string expected"; - if (message.tags != null && message.hasOwnProperty("tags")) + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) if (!$util.isString(message.tags)) return "tags: string expected"; - if (message.bot_count != null && message.hasOwnProperty("bot_count")) + if (message.bot_count != null && $Object.hasOwnProperty.call(message, "bot_count")) if (!$util.isInteger(message.bot_count)) return "bot_count: integer expected"; - if (message.num_spectators != null && message.hasOwnProperty("num_spectators")) + if (message.num_spectators != null && $Object.hasOwnProperty.call(message, "num_spectators")) if (!$util.isInteger(message.num_spectators)) return "num_spectators: integer expected"; - if (message.max_players != null && message.hasOwnProperty("max_players")) + if (message.max_players != null && $Object.hasOwnProperty.call(message, "max_players")) if (!$util.isInteger(message.max_players)) return "max_players: integer expected"; - if (message.slots_free != null && message.hasOwnProperty("slots_free")) + if (message.slots_free != null && $Object.hasOwnProperty.call(message, "slots_free")) if (!$util.isInteger(message.slots_free)) return "slots_free: integer expected"; - if (message.server_region != null && message.hasOwnProperty("server_region")) + if (message.server_region != null && $Object.hasOwnProperty.call(message, "server_region")) if (!$util.isInteger(message.server_region)) return "server_region: integer expected"; - if (message.server_loadavg != null && message.hasOwnProperty("server_loadavg")) + if (message.server_loadavg != null && $Object.hasOwnProperty.call(message, "server_loadavg")) if (typeof message.server_loadavg !== "number") return "server_loadavg: number expected"; - if (message.server_trusted != null && message.hasOwnProperty("server_trusted")) + if (message.server_trusted != null && $Object.hasOwnProperty.call(message, "server_trusted")) if (typeof message.server_trusted !== "boolean") return "server_trusted: boolean expected"; - if (message.server_dedicated != null && message.hasOwnProperty("server_dedicated")) + if (message.server_dedicated != null && $Object.hasOwnProperty.call(message, "server_dedicated")) if (typeof message.server_dedicated !== "boolean") return "server_dedicated: boolean expected"; - if (message.strict != null && message.hasOwnProperty("strict")) + if (message.strict != null && $Object.hasOwnProperty.call(message, "strict")) if (!$util.isInteger(message.strict)) return "strict: integer expected"; - if (message.players != null && message.hasOwnProperty("players")) { - if (!Array.isArray(message.players)) + if (message.players != null && $Object.hasOwnProperty.call(message, "players")) { + if (!$Array.isArray(message.players)) return "players: array expected"; for (var i = 0; i < message.players.length; ++i) { - var error = $root.CMsgGameServerMatchmakingStatus.Player.verify(message.players[i]); + var error = $root.CMsgGameServerMatchmakingStatus.Player.verify(message.players[i], _depth + 1); if (error) return "players." + error; } } - if (message.game_state != null && message.hasOwnProperty("game_state")) + if (message.game_state != null && $Object.hasOwnProperty.call(message, "game_state")) switch (message.game_state) { default: return "game_state: enum value expected"; @@ -25914,7 +33629,7 @@ case 8: break; } - if (message.event != null && message.hasOwnProperty("event")) + if (message.event != null && $Object.hasOwnProperty.call(message, "event")) switch (message.event) { default: return "event: enum value expected"; @@ -25924,19 +33639,19 @@ case 3: break; } - if (message.mvm_wave != null && message.hasOwnProperty("mvm_wave")) + if (message.mvm_wave != null && $Object.hasOwnProperty.call(message, "mvm_wave")) if (!$util.isInteger(message.mvm_wave)) return "mvm_wave: integer expected"; - if (message.mvm_credits_acquired != null && message.hasOwnProperty("mvm_credits_acquired")) + if (message.mvm_credits_acquired != null && $Object.hasOwnProperty.call(message, "mvm_credits_acquired")) if (!$util.isInteger(message.mvm_credits_acquired)) return "mvm_credits_acquired: integer expected"; - if (message.mvm_credits_dropped != null && message.hasOwnProperty("mvm_credits_dropped")) + if (message.mvm_credits_dropped != null && $Object.hasOwnProperty.call(message, "mvm_credits_dropped")) if (!$util.isInteger(message.mvm_credits_dropped)) return "mvm_credits_dropped: integer expected"; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) if (!$util.isInteger(message.match_group)) return "match_group: integer expected"; - if (message.lobby_mm_version != null && message.hasOwnProperty("lobby_mm_version")) + if (message.lobby_mm_version != null && $Object.hasOwnProperty.call(message, "lobby_mm_version")) if (!$util.isInteger(message.lobby_mm_version)) return "lobby_mm_version: integer expected"; return null; @@ -25950,9 +33665,15 @@ * @param {Object.} object Plain object * @returns {CMsgGameServerMatchmakingStatus} CMsgGameServerMatchmakingStatus */ - CMsgGameServerMatchmakingStatus.fromObject = function fromObject(object) { + CMsgGameServerMatchmakingStatus.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGameServerMatchmakingStatus) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGameServerMatchmakingStatus: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGameServerMatchmakingStatus(); if (object.server_version != null) message.server_version = object.server_version >>> 0; @@ -25977,11 +33698,12 @@ case 4: message.matchmaking_state = 4; break; + default: } if (object.map != null) - message.map = String(object.map); + message.map = $String(object.map); if (object.tags != null) - message.tags = String(object.tags); + message.tags = $String(object.tags); if (object.bot_count != null) message.bot_count = object.bot_count >>> 0; if (object.num_spectators != null) @@ -25993,21 +33715,21 @@ if (object.server_region != null) message.server_region = object.server_region >>> 0; if (object.server_loadavg != null) - message.server_loadavg = Number(object.server_loadavg); + message.server_loadavg = $Number(object.server_loadavg); if (object.server_trusted != null) - message.server_trusted = Boolean(object.server_trusted); + message.server_trusted = $Boolean(object.server_trusted); if (object.server_dedicated != null) - message.server_dedicated = Boolean(object.server_dedicated); + message.server_dedicated = $Boolean(object.server_dedicated); if (object.strict != null) message.strict = object.strict >>> 0; if (object.players) { - if (!Array.isArray(object.players)) - throw TypeError(".CMsgGameServerMatchmakingStatus.players: array expected"); - message.players = []; + if (!$Array.isArray(object.players)) + throw $TypeError(".CMsgGameServerMatchmakingStatus.players: array expected"); + message.players = $Array(object.players.length); for (var i = 0; i < object.players.length; ++i) { - if (typeof object.players[i] !== "object") - throw TypeError(".CMsgGameServerMatchmakingStatus.players: object expected"); - message.players[i] = $root.CMsgGameServerMatchmakingStatus.Player.fromObject(object.players[i]); + if (!$util.isObject(object.players[i])) + throw $TypeError(".CMsgGameServerMatchmakingStatus.players: object expected"); + message.players[i] = $root.CMsgGameServerMatchmakingStatus.Player.fromObject(object.players[i], _depth + 1); } } switch (object.game_state) { @@ -26039,6 +33761,7 @@ case 8: message.game_state = 8; break; + default: } switch (object.event) { case "None": @@ -26057,6 +33780,7 @@ case 3: message.event = 3; break; + default: } if (object.mvm_wave != null) message.mvm_wave = object.mvm_wave >>> 0; @@ -26080,14 +33804,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGameServerMatchmakingStatus.toObject = function toObject(message, options) { + CMsgGameServerMatchmakingStatus.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.players = []; if (options.defaults) { - object.matchmaking_state = options.enums === String ? "ServerMatchmakingState_INVALID" : 0; + object.matchmaking_state = options.enums === $String ? "ServerMatchmakingState_INVALID" : 0; object.map = ""; object.tags = ""; object.bot_count = 0; @@ -26098,8 +33826,8 @@ object.server_loadavg = 0; object.server_trusted = false; object.server_dedicated = false; - object.game_state = options.enums === String ? "TF_GC_GAMESTATE_STATE_INIT" : 0; - object.event = options.enums === String ? "None" : 0; + object.game_state = options.enums === $String ? "TF_GC_GAMESTATE_STATE_INIT" : 0; + object.event = options.enums === $String ? "None" : 0; object.server_version = 1225; object.strict = 0; object.mvm_wave = 0; @@ -26108,50 +33836,50 @@ object.match_group = -1; object.lobby_mm_version = 0; } - if (message.matchmaking_state != null && message.hasOwnProperty("matchmaking_state")) - object.matchmaking_state = options.enums === String ? $root.ServerMatchmakingState[message.matchmaking_state] : message.matchmaking_state; - if (message.map != null && message.hasOwnProperty("map")) + if (message.matchmaking_state != null && $Object.hasOwnProperty.call(message, "matchmaking_state")) + object.matchmaking_state = options.enums === $String ? $root.ServerMatchmakingState[message.matchmaking_state] === $undefined ? message.matchmaking_state : $root.ServerMatchmakingState[message.matchmaking_state] : message.matchmaking_state; + if (message.map != null && $Object.hasOwnProperty.call(message, "map")) object.map = message.map; - if (message.tags != null && message.hasOwnProperty("tags")) + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) object.tags = message.tags; - if (message.bot_count != null && message.hasOwnProperty("bot_count")) + if (message.bot_count != null && $Object.hasOwnProperty.call(message, "bot_count")) object.bot_count = message.bot_count; - if (message.num_spectators != null && message.hasOwnProperty("num_spectators")) + if (message.num_spectators != null && $Object.hasOwnProperty.call(message, "num_spectators")) object.num_spectators = message.num_spectators; - if (message.max_players != null && message.hasOwnProperty("max_players")) + if (message.max_players != null && $Object.hasOwnProperty.call(message, "max_players")) object.max_players = message.max_players; - if (message.slots_free != null && message.hasOwnProperty("slots_free")) + if (message.slots_free != null && $Object.hasOwnProperty.call(message, "slots_free")) object.slots_free = message.slots_free; - if (message.server_region != null && message.hasOwnProperty("server_region")) + if (message.server_region != null && $Object.hasOwnProperty.call(message, "server_region")) object.server_region = message.server_region; - if (message.server_loadavg != null && message.hasOwnProperty("server_loadavg")) - object.server_loadavg = options.json && !isFinite(message.server_loadavg) ? String(message.server_loadavg) : message.server_loadavg; - if (message.server_trusted != null && message.hasOwnProperty("server_trusted")) + if (message.server_loadavg != null && $Object.hasOwnProperty.call(message, "server_loadavg")) + object.server_loadavg = options.json && !$isFinite(message.server_loadavg) ? $String(message.server_loadavg) : message.server_loadavg; + if (message.server_trusted != null && $Object.hasOwnProperty.call(message, "server_trusted")) object.server_trusted = message.server_trusted; - if (message.server_dedicated != null && message.hasOwnProperty("server_dedicated")) + if (message.server_dedicated != null && $Object.hasOwnProperty.call(message, "server_dedicated")) object.server_dedicated = message.server_dedicated; if (message.players && message.players.length) { - object.players = []; + object.players = $Array(message.players.length); for (var j = 0; j < message.players.length; ++j) - object.players[j] = $root.CMsgGameServerMatchmakingStatus.Player.toObject(message.players[j], options); + object.players[j] = $root.CMsgGameServerMatchmakingStatus.Player.toObject(message.players[j], options, _depth + 1); } - if (message.game_state != null && message.hasOwnProperty("game_state")) - object.game_state = options.enums === String ? $root.TF_GC_GameState[message.game_state] : message.game_state; - if (message.event != null && message.hasOwnProperty("event")) - object.event = options.enums === String ? $root.CMsgGameServerMatchmakingStatus.Event[message.event] : message.event; - if (message.server_version != null && message.hasOwnProperty("server_version")) + if (message.game_state != null && $Object.hasOwnProperty.call(message, "game_state")) + object.game_state = options.enums === $String ? $root.TF_GC_GameState[message.game_state] === $undefined ? message.game_state : $root.TF_GC_GameState[message.game_state] : message.game_state; + if (message.event != null && $Object.hasOwnProperty.call(message, "event")) + object.event = options.enums === $String ? $root.CMsgGameServerMatchmakingStatus.Event[message.event] === $undefined ? message.event : $root.CMsgGameServerMatchmakingStatus.Event[message.event] : message.event; + if (message.server_version != null && $Object.hasOwnProperty.call(message, "server_version")) object.server_version = message.server_version; - if (message.strict != null && message.hasOwnProperty("strict")) + if (message.strict != null && $Object.hasOwnProperty.call(message, "strict")) object.strict = message.strict; - if (message.mvm_wave != null && message.hasOwnProperty("mvm_wave")) + if (message.mvm_wave != null && $Object.hasOwnProperty.call(message, "mvm_wave")) object.mvm_wave = message.mvm_wave; - if (message.mvm_credits_acquired != null && message.hasOwnProperty("mvm_credits_acquired")) + if (message.mvm_credits_acquired != null && $Object.hasOwnProperty.call(message, "mvm_credits_acquired")) object.mvm_credits_acquired = message.mvm_credits_acquired; - if (message.mvm_credits_dropped != null && message.hasOwnProperty("mvm_credits_dropped")) + if (message.mvm_credits_dropped != null && $Object.hasOwnProperty.call(message, "mvm_credits_dropped")) object.mvm_credits_dropped = message.mvm_credits_dropped; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) object.match_group = message.match_group; - if (message.lobby_mm_version != null && message.hasOwnProperty("lobby_mm_version")) + if (message.lobby_mm_version != null && $Object.hasOwnProperty.call(message, "lobby_mm_version")) object.lobby_mm_version = message.lobby_mm_version; return object; }; @@ -26163,34 +33891,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGameServerMatchmakingStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGameServerMatchmakingStatus.prototype.toJSON = function() { + return CMsgGameServerMatchmakingStatus.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGameServerMatchmakingStatus + * @function getTypeUrl + * @memberof CMsgGameServerMatchmakingStatus + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGameServerMatchmakingStatus.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGameServerMatchmakingStatus"; }; CMsgGameServerMatchmakingStatus.Player = (function() { /** * Properties of a Player. - * @memberof CMsgGameServerMatchmakingStatus - * @interface IPlayer + * @typedef {Object} CMsgGameServerMatchmakingStatus.Player.$Properties * @property {number|Long|null} [steam_id] Player steam_id * @property {CMsgGameServerMatchmakingStatus.PlayerConnectState|null} [connect_state] Player connect_state + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Player. + * @memberof CMsgGameServerMatchmakingStatus + * @interface IPlayer + * @augments CMsgGameServerMatchmakingStatus.Player.$Properties + * @deprecated Use CMsgGameServerMatchmakingStatus.Player.$Properties instead. + */ + + /** + * Shape of a Player. + * @typedef {CMsgGameServerMatchmakingStatus.Player.$Properties} CMsgGameServerMatchmakingStatus.Player.$Shape */ /** * Constructs a new Player. * @memberof CMsgGameServerMatchmakingStatus * @classdesc Represents a Player. - * @implements IPlayer * @constructor - * @param {CMsgGameServerMatchmakingStatus.IPlayer=} [properties] Properties to set + * @param {CMsgGameServerMatchmakingStatus.Player.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Player(properties) { + var Player = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Player steam_id. @@ -26198,7 +33953,7 @@ * @memberof CMsgGameServerMatchmakingStatus.Player * @instance */ - Player.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Player.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Player connect_state. @@ -26213,10 +33968,14 @@ * @function create * @memberof CMsgGameServerMatchmakingStatus.Player * @static - * @param {CMsgGameServerMatchmakingStatus.IPlayer=} [properties] Properties to set + * @param {CMsgGameServerMatchmakingStatus.Player.$Properties=} [properties] Properties to set * @returns {CMsgGameServerMatchmakingStatus.Player} Player instance + * @type {{ + * (properties: CMsgGameServerMatchmakingStatus.Player.$Shape): CMsgGameServerMatchmakingStatus.Player & CMsgGameServerMatchmakingStatus.Player.$Shape; + * (properties?: CMsgGameServerMatchmakingStatus.Player.$Properties): CMsgGameServerMatchmakingStatus.Player; + * }} */ - Player.create = function create(properties) { + Player.create = function(properties) { return new Player(properties); }; @@ -26225,17 +33984,24 @@ * @function encode * @memberof CMsgGameServerMatchmakingStatus.Player * @static - * @param {CMsgGameServerMatchmakingStatus.IPlayer} message Player message or plain object to encode + * @param {CMsgGameServerMatchmakingStatus.Player.$Properties} message Player message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Player.encode = function encode(message, writer) { + Player.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.connect_state != null && Object.hasOwnProperty.call(message, "connect_state")) + if (message.connect_state != null && $Object.hasOwnProperty.call(message, "connect_state")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.connect_state); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26244,12 +34010,12 @@ * @function encodeDelimited * @memberof CMsgGameServerMatchmakingStatus.Player * @static - * @param {CMsgGameServerMatchmakingStatus.IPlayer} message Player message or plain object to encode + * @param {CMsgGameServerMatchmakingStatus.Player.$Properties} message Player message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Player.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Player.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26259,28 +34025,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGameServerMatchmakingStatus.Player} Player + * @returns {CMsgGameServerMatchmakingStatus.Player & CMsgGameServerMatchmakingStatus.Player.$Shape} Player * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Player.decode = function decode(reader, length) { + Player.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGameServerMatchmakingStatus.Player(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGameServerMatchmakingStatus.Player(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.connect_state = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGameServerMatchmakingStatus.PlayerConnectState[value] !== $undefined) + message.connect_state = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26290,11 +34082,11 @@ * @memberof CMsgGameServerMatchmakingStatus.Player * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGameServerMatchmakingStatus.Player} Player + * @returns {CMsgGameServerMatchmakingStatus.Player & CMsgGameServerMatchmakingStatus.Player.$Shape} Player * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Player.decodeDelimited = function decodeDelimited(reader) { + Player.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26308,13 +34100,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Player.verify = function verify(message) { + Player.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.connect_state != null && message.hasOwnProperty("connect_state")) + if (message.connect_state != null && $Object.hasOwnProperty.call(message, "connect_state")) switch (message.connect_state) { default: return "connect_state: enum value expected"; @@ -26334,19 +34130,25 @@ * @param {Object.} object Plain object * @returns {CMsgGameServerMatchmakingStatus.Player} Player */ - Player.fromObject = function fromObject(object) { + Player.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGameServerMatchmakingStatus.Player) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGameServerMatchmakingStatus.Player: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGameServerMatchmakingStatus.Player(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); switch (object.connect_state) { case "INVALID": case 0: @@ -26360,6 +34162,7 @@ case 2: message.connect_state = 2; break; + default: } return message; }; @@ -26373,25 +34176,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Player.toObject = function toObject(message, options) { + Player.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; - object.connect_state = options.enums === String ? "INVALID" : 0; - } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.connect_state = options.enums === $String ? "INVALID" : 0; + } + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.connect_state != null && message.hasOwnProperty("connect_state")) - object.connect_state = options.enums === String ? $root.CMsgGameServerMatchmakingStatus.PlayerConnectState[message.connect_state] : message.connect_state; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.connect_state != null && $Object.hasOwnProperty.call(message, "connect_state")) + object.connect_state = options.enums === $String ? $root.CMsgGameServerMatchmakingStatus.PlayerConnectState[message.connect_state] === $undefined ? message.connect_state : $root.CMsgGameServerMatchmakingStatus.PlayerConnectState[message.connect_state] : message.connect_state; return object; }; @@ -26402,8 +34211,22 @@ * @instance * @returns {Object.} JSON object */ - Player.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Player.prototype.toJSON = function() { + return Player.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Player + * @function getTypeUrl + * @memberof CMsgGameServerMatchmakingStatus.Player + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Player.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGameServerMatchmakingStatus.Player"; }; return Player; @@ -26418,7 +34241,7 @@ * @property {number} RESERVED=2 RESERVED value */ CMsgGameServerMatchmakingStatus.PlayerConnectState = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "INVALID"] = 0; values[valuesById[1] = "CONNECTED"] = 1; values[valuesById[2] = "RESERVED"] = 2; @@ -26435,7 +34258,7 @@ * @property {number} AcknowledgePlayers=3 AcknowledgePlayers value */ CMsgGameServerMatchmakingStatus.Event = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "None"] = 0; values[valuesById[1] = "MvMVictory"] = 1; values[valuesById[2] = "MvMDefeat"] = 2; @@ -26450,8 +34273,7 @@ /** * Properties of a CMsgMatchmakingProgress. - * @exports ICMsgMatchmakingProgress - * @interface ICMsgMatchmakingProgress + * @typedef {Object} CMsgMatchmakingProgress.$Properties * @property {number|null} [avg_wait_time_new] CMsgMatchmakingProgress avg_wait_time_new * @property {number|null} [avg_wait_time_join_late] CMsgMatchmakingProgress avg_wait_time_join_late * @property {number|null} [your_wait_time] CMsgMatchmakingProgress your_wait_time @@ -26468,22 +34290,36 @@ * @property {number|null} [total_worldwide_empty_gameservers] CMsgMatchmakingProgress total_worldwide_empty_gameservers * @property {number|null} [total_near_you_empty_gameservers] CMsgMatchmakingProgress total_near_you_empty_gameservers * @property {number|null} [urgency_pct] CMsgMatchmakingProgress urgency_pct + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgMatchmakingProgress. + * @exports ICMsgMatchmakingProgress + * @interface ICMsgMatchmakingProgress + * @augments CMsgMatchmakingProgress.$Properties + * @deprecated Use CMsgMatchmakingProgress.$Properties instead. + */ + + /** + * Shape of a CMsgMatchmakingProgress. + * @typedef {CMsgMatchmakingProgress.$Properties} CMsgMatchmakingProgress.$Shape */ /** * Constructs a new CMsgMatchmakingProgress. * @exports CMsgMatchmakingProgress * @classdesc Represents a CMsgMatchmakingProgress. - * @implements ICMsgMatchmakingProgress * @constructor - * @param {ICMsgMatchmakingProgress=} [properties] Properties to set + * @param {CMsgMatchmakingProgress.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgMatchmakingProgress(properties) { + var CMsgMatchmakingProgress = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgMatchmakingProgress avg_wait_time_new. @@ -26618,10 +34454,14 @@ * @function create * @memberof CMsgMatchmakingProgress * @static - * @param {ICMsgMatchmakingProgress=} [properties] Properties to set + * @param {CMsgMatchmakingProgress.$Properties=} [properties] Properties to set * @returns {CMsgMatchmakingProgress} CMsgMatchmakingProgress instance + * @type {{ + * (properties: CMsgMatchmakingProgress.$Shape): CMsgMatchmakingProgress & CMsgMatchmakingProgress.$Shape; + * (properties?: CMsgMatchmakingProgress.$Properties): CMsgMatchmakingProgress; + * }} */ - CMsgMatchmakingProgress.create = function create(properties) { + CMsgMatchmakingProgress.create = function(properties) { return new CMsgMatchmakingProgress(properties); }; @@ -26630,45 +34470,52 @@ * @function encode * @memberof CMsgMatchmakingProgress * @static - * @param {ICMsgMatchmakingProgress} message CMsgMatchmakingProgress message or plain object to encode + * @param {CMsgMatchmakingProgress.$Properties} message CMsgMatchmakingProgress message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMatchmakingProgress.encode = function encode(message, writer) { + CMsgMatchmakingProgress.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.urgency_pct != null && Object.hasOwnProperty.call(message, "urgency_pct")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.urgency_pct != null && $Object.hasOwnProperty.call(message, "urgency_pct")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.urgency_pct); - if (message.avg_wait_time_new != null && Object.hasOwnProperty.call(message, "avg_wait_time_new")) + if (message.avg_wait_time_new != null && $Object.hasOwnProperty.call(message, "avg_wait_time_new")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.avg_wait_time_new); - if (message.avg_wait_time_join_late != null && Object.hasOwnProperty.call(message, "avg_wait_time_join_late")) + if (message.avg_wait_time_join_late != null && $Object.hasOwnProperty.call(message, "avg_wait_time_join_late")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.avg_wait_time_join_late); - if (message.your_wait_time != null && Object.hasOwnProperty.call(message, "your_wait_time")) + if (message.your_wait_time != null && $Object.hasOwnProperty.call(message, "your_wait_time")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.your_wait_time); - if (message.matching_worldwide_searching_players != null && Object.hasOwnProperty.call(message, "matching_worldwide_searching_players")) + if (message.matching_worldwide_searching_players != null && $Object.hasOwnProperty.call(message, "matching_worldwide_searching_players")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.matching_worldwide_searching_players); - if (message.matching_near_you_searching_players != null && Object.hasOwnProperty.call(message, "matching_near_you_searching_players")) + if (message.matching_near_you_searching_players != null && $Object.hasOwnProperty.call(message, "matching_near_you_searching_players")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.matching_near_you_searching_players); - if (message.total_worldwide_searching_players != null && Object.hasOwnProperty.call(message, "total_worldwide_searching_players")) + if (message.total_worldwide_searching_players != null && $Object.hasOwnProperty.call(message, "total_worldwide_searching_players")) writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.total_worldwide_searching_players); - if (message.total_near_you_searching_players != null && Object.hasOwnProperty.call(message, "total_near_you_searching_players")) + if (message.total_near_you_searching_players != null && $Object.hasOwnProperty.call(message, "total_near_you_searching_players")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.total_near_you_searching_players); - if (message.matching_worldwide_active_players != null && Object.hasOwnProperty.call(message, "matching_worldwide_active_players")) + if (message.matching_worldwide_active_players != null && $Object.hasOwnProperty.call(message, "matching_worldwide_active_players")) writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.matching_worldwide_active_players); - if (message.matching_near_you_active_players != null && Object.hasOwnProperty.call(message, "matching_near_you_active_players")) + if (message.matching_near_you_active_players != null && $Object.hasOwnProperty.call(message, "matching_near_you_active_players")) writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.matching_near_you_active_players); - if (message.total_worldwide_active_players != null && Object.hasOwnProperty.call(message, "total_worldwide_active_players")) + if (message.total_worldwide_active_players != null && $Object.hasOwnProperty.call(message, "total_worldwide_active_players")) writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.total_worldwide_active_players); - if (message.total_near_you_active_players != null && Object.hasOwnProperty.call(message, "total_near_you_active_players")) + if (message.total_near_you_active_players != null && $Object.hasOwnProperty.call(message, "total_near_you_active_players")) writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.total_near_you_active_players); - if (message.matching_worldwide_empty_gameservers != null && Object.hasOwnProperty.call(message, "matching_worldwide_empty_gameservers")) + if (message.matching_worldwide_empty_gameservers != null && $Object.hasOwnProperty.call(message, "matching_worldwide_empty_gameservers")) writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.matching_worldwide_empty_gameservers); - if (message.matching_near_you_empty_gameservers != null && Object.hasOwnProperty.call(message, "matching_near_you_empty_gameservers")) + if (message.matching_near_you_empty_gameservers != null && $Object.hasOwnProperty.call(message, "matching_near_you_empty_gameservers")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.matching_near_you_empty_gameservers); - if (message.total_worldwide_empty_gameservers != null && Object.hasOwnProperty.call(message, "total_worldwide_empty_gameservers")) + if (message.total_worldwide_empty_gameservers != null && $Object.hasOwnProperty.call(message, "total_worldwide_empty_gameservers")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.total_worldwide_empty_gameservers); - if (message.total_near_you_empty_gameservers != null && Object.hasOwnProperty.call(message, "total_near_you_empty_gameservers")) + if (message.total_near_you_empty_gameservers != null && $Object.hasOwnProperty.call(message, "total_near_you_empty_gameservers")) writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.total_near_you_empty_gameservers); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -26677,12 +34524,12 @@ * @function encodeDelimited * @memberof CMsgMatchmakingProgress * @static - * @param {ICMsgMatchmakingProgress} message CMsgMatchmakingProgress message or plain object to encode + * @param {CMsgMatchmakingProgress.$Properties} message CMsgMatchmakingProgress message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMatchmakingProgress.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgMatchmakingProgress.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -26692,70 +34539,132 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgMatchmakingProgress} CMsgMatchmakingProgress + * @returns {CMsgMatchmakingProgress & CMsgMatchmakingProgress.$Shape} CMsgMatchmakingProgress * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMatchmakingProgress.decode = function decode(reader, length) { + CMsgMatchmakingProgress.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgMatchmakingProgress(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgMatchmakingProgress(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.avg_wait_time_new = reader.uint32(); - break; - case 5: - message.avg_wait_time_join_late = reader.uint32(); - break; - case 6: - message.your_wait_time = reader.uint32(); - break; - case 8: - message.matching_worldwide_searching_players = reader.uint32(); - break; - case 9: - message.matching_near_you_searching_players = reader.uint32(); - break; - case 13: - message.total_worldwide_searching_players = reader.uint32(); - break; - case 14: - message.total_near_you_searching_players = reader.uint32(); - break; - case 15: - message.matching_worldwide_active_players = reader.uint32(); - break; - case 16: - message.matching_near_you_active_players = reader.uint32(); - break; - case 17: - message.total_worldwide_active_players = reader.uint32(); - break; - case 18: - message.total_near_you_active_players = reader.uint32(); - break; - case 19: - message.matching_worldwide_empty_gameservers = reader.uint32(); - break; - case 20: - message.matching_near_you_empty_gameservers = reader.uint32(); - break; - case 21: - message.total_worldwide_empty_gameservers = reader.uint32(); - break; - case 22: - message.total_near_you_empty_gameservers = reader.uint32(); - break; - case 1: - message.urgency_pct = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 4: { + if (wireType !== 0) + break; + message.avg_wait_time_new = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.avg_wait_time_join_late = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.your_wait_time = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.matching_worldwide_searching_players = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.matching_near_you_searching_players = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.total_worldwide_searching_players = reader.uint32(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.total_near_you_searching_players = reader.uint32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.matching_worldwide_active_players = reader.uint32(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.matching_near_you_active_players = reader.uint32(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.total_worldwide_active_players = reader.uint32(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.total_near_you_active_players = reader.uint32(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.matching_worldwide_empty_gameservers = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.matching_near_you_empty_gameservers = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.total_worldwide_empty_gameservers = reader.uint32(); + continue; + } + case 22: { + if (wireType !== 0) + break; + message.total_near_you_empty_gameservers = reader.uint32(); + continue; + } + case 1: { + if (wireType !== 0) + break; + message.urgency_pct = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -26765,11 +34674,11 @@ * @memberof CMsgMatchmakingProgress * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgMatchmakingProgress} CMsgMatchmakingProgress + * @returns {CMsgMatchmakingProgress & CMsgMatchmakingProgress.$Shape} CMsgMatchmakingProgress * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMatchmakingProgress.decodeDelimited = function decodeDelimited(reader) { + CMsgMatchmakingProgress.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -26783,55 +34692,59 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgMatchmakingProgress.verify = function verify(message) { + CMsgMatchmakingProgress.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.avg_wait_time_new != null && message.hasOwnProperty("avg_wait_time_new")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.avg_wait_time_new != null && $Object.hasOwnProperty.call(message, "avg_wait_time_new")) if (!$util.isInteger(message.avg_wait_time_new)) return "avg_wait_time_new: integer expected"; - if (message.avg_wait_time_join_late != null && message.hasOwnProperty("avg_wait_time_join_late")) + if (message.avg_wait_time_join_late != null && $Object.hasOwnProperty.call(message, "avg_wait_time_join_late")) if (!$util.isInteger(message.avg_wait_time_join_late)) return "avg_wait_time_join_late: integer expected"; - if (message.your_wait_time != null && message.hasOwnProperty("your_wait_time")) + if (message.your_wait_time != null && $Object.hasOwnProperty.call(message, "your_wait_time")) if (!$util.isInteger(message.your_wait_time)) return "your_wait_time: integer expected"; - if (message.matching_worldwide_searching_players != null && message.hasOwnProperty("matching_worldwide_searching_players")) + if (message.matching_worldwide_searching_players != null && $Object.hasOwnProperty.call(message, "matching_worldwide_searching_players")) if (!$util.isInteger(message.matching_worldwide_searching_players)) return "matching_worldwide_searching_players: integer expected"; - if (message.matching_near_you_searching_players != null && message.hasOwnProperty("matching_near_you_searching_players")) + if (message.matching_near_you_searching_players != null && $Object.hasOwnProperty.call(message, "matching_near_you_searching_players")) if (!$util.isInteger(message.matching_near_you_searching_players)) return "matching_near_you_searching_players: integer expected"; - if (message.total_worldwide_searching_players != null && message.hasOwnProperty("total_worldwide_searching_players")) + if (message.total_worldwide_searching_players != null && $Object.hasOwnProperty.call(message, "total_worldwide_searching_players")) if (!$util.isInteger(message.total_worldwide_searching_players)) return "total_worldwide_searching_players: integer expected"; - if (message.total_near_you_searching_players != null && message.hasOwnProperty("total_near_you_searching_players")) + if (message.total_near_you_searching_players != null && $Object.hasOwnProperty.call(message, "total_near_you_searching_players")) if (!$util.isInteger(message.total_near_you_searching_players)) return "total_near_you_searching_players: integer expected"; - if (message.matching_worldwide_active_players != null && message.hasOwnProperty("matching_worldwide_active_players")) + if (message.matching_worldwide_active_players != null && $Object.hasOwnProperty.call(message, "matching_worldwide_active_players")) if (!$util.isInteger(message.matching_worldwide_active_players)) return "matching_worldwide_active_players: integer expected"; - if (message.matching_near_you_active_players != null && message.hasOwnProperty("matching_near_you_active_players")) + if (message.matching_near_you_active_players != null && $Object.hasOwnProperty.call(message, "matching_near_you_active_players")) if (!$util.isInteger(message.matching_near_you_active_players)) return "matching_near_you_active_players: integer expected"; - if (message.total_worldwide_active_players != null && message.hasOwnProperty("total_worldwide_active_players")) + if (message.total_worldwide_active_players != null && $Object.hasOwnProperty.call(message, "total_worldwide_active_players")) if (!$util.isInteger(message.total_worldwide_active_players)) return "total_worldwide_active_players: integer expected"; - if (message.total_near_you_active_players != null && message.hasOwnProperty("total_near_you_active_players")) + if (message.total_near_you_active_players != null && $Object.hasOwnProperty.call(message, "total_near_you_active_players")) if (!$util.isInteger(message.total_near_you_active_players)) return "total_near_you_active_players: integer expected"; - if (message.matching_worldwide_empty_gameservers != null && message.hasOwnProperty("matching_worldwide_empty_gameservers")) + if (message.matching_worldwide_empty_gameservers != null && $Object.hasOwnProperty.call(message, "matching_worldwide_empty_gameservers")) if (!$util.isInteger(message.matching_worldwide_empty_gameservers)) return "matching_worldwide_empty_gameservers: integer expected"; - if (message.matching_near_you_empty_gameservers != null && message.hasOwnProperty("matching_near_you_empty_gameservers")) + if (message.matching_near_you_empty_gameservers != null && $Object.hasOwnProperty.call(message, "matching_near_you_empty_gameservers")) if (!$util.isInteger(message.matching_near_you_empty_gameservers)) return "matching_near_you_empty_gameservers: integer expected"; - if (message.total_worldwide_empty_gameservers != null && message.hasOwnProperty("total_worldwide_empty_gameservers")) + if (message.total_worldwide_empty_gameservers != null && $Object.hasOwnProperty.call(message, "total_worldwide_empty_gameservers")) if (!$util.isInteger(message.total_worldwide_empty_gameservers)) return "total_worldwide_empty_gameservers: integer expected"; - if (message.total_near_you_empty_gameservers != null && message.hasOwnProperty("total_near_you_empty_gameservers")) + if (message.total_near_you_empty_gameservers != null && $Object.hasOwnProperty.call(message, "total_near_you_empty_gameservers")) if (!$util.isInteger(message.total_near_you_empty_gameservers)) return "total_near_you_empty_gameservers: integer expected"; - if (message.urgency_pct != null && message.hasOwnProperty("urgency_pct")) + if (message.urgency_pct != null && $Object.hasOwnProperty.call(message, "urgency_pct")) if (!$util.isInteger(message.urgency_pct)) return "urgency_pct: integer expected"; return null; @@ -26845,9 +34758,15 @@ * @param {Object.} object Plain object * @returns {CMsgMatchmakingProgress} CMsgMatchmakingProgress */ - CMsgMatchmakingProgress.fromObject = function fromObject(object) { + CMsgMatchmakingProgress.fromObject = function (object, _depth) { if (object instanceof $root.CMsgMatchmakingProgress) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgMatchmakingProgress: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgMatchmakingProgress(); if (object.avg_wait_time_new != null) message.avg_wait_time_new = object.avg_wait_time_new >>> 0; @@ -26893,9 +34812,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgMatchmakingProgress.toObject = function toObject(message, options) { + CMsgMatchmakingProgress.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.urgency_pct = 0; @@ -26915,37 +34838,37 @@ object.total_worldwide_empty_gameservers = 0; object.total_near_you_empty_gameservers = 0; } - if (message.urgency_pct != null && message.hasOwnProperty("urgency_pct")) + if (message.urgency_pct != null && $Object.hasOwnProperty.call(message, "urgency_pct")) object.urgency_pct = message.urgency_pct; - if (message.avg_wait_time_new != null && message.hasOwnProperty("avg_wait_time_new")) + if (message.avg_wait_time_new != null && $Object.hasOwnProperty.call(message, "avg_wait_time_new")) object.avg_wait_time_new = message.avg_wait_time_new; - if (message.avg_wait_time_join_late != null && message.hasOwnProperty("avg_wait_time_join_late")) + if (message.avg_wait_time_join_late != null && $Object.hasOwnProperty.call(message, "avg_wait_time_join_late")) object.avg_wait_time_join_late = message.avg_wait_time_join_late; - if (message.your_wait_time != null && message.hasOwnProperty("your_wait_time")) + if (message.your_wait_time != null && $Object.hasOwnProperty.call(message, "your_wait_time")) object.your_wait_time = message.your_wait_time; - if (message.matching_worldwide_searching_players != null && message.hasOwnProperty("matching_worldwide_searching_players")) + if (message.matching_worldwide_searching_players != null && $Object.hasOwnProperty.call(message, "matching_worldwide_searching_players")) object.matching_worldwide_searching_players = message.matching_worldwide_searching_players; - if (message.matching_near_you_searching_players != null && message.hasOwnProperty("matching_near_you_searching_players")) + if (message.matching_near_you_searching_players != null && $Object.hasOwnProperty.call(message, "matching_near_you_searching_players")) object.matching_near_you_searching_players = message.matching_near_you_searching_players; - if (message.total_worldwide_searching_players != null && message.hasOwnProperty("total_worldwide_searching_players")) + if (message.total_worldwide_searching_players != null && $Object.hasOwnProperty.call(message, "total_worldwide_searching_players")) object.total_worldwide_searching_players = message.total_worldwide_searching_players; - if (message.total_near_you_searching_players != null && message.hasOwnProperty("total_near_you_searching_players")) + if (message.total_near_you_searching_players != null && $Object.hasOwnProperty.call(message, "total_near_you_searching_players")) object.total_near_you_searching_players = message.total_near_you_searching_players; - if (message.matching_worldwide_active_players != null && message.hasOwnProperty("matching_worldwide_active_players")) + if (message.matching_worldwide_active_players != null && $Object.hasOwnProperty.call(message, "matching_worldwide_active_players")) object.matching_worldwide_active_players = message.matching_worldwide_active_players; - if (message.matching_near_you_active_players != null && message.hasOwnProperty("matching_near_you_active_players")) + if (message.matching_near_you_active_players != null && $Object.hasOwnProperty.call(message, "matching_near_you_active_players")) object.matching_near_you_active_players = message.matching_near_you_active_players; - if (message.total_worldwide_active_players != null && message.hasOwnProperty("total_worldwide_active_players")) + if (message.total_worldwide_active_players != null && $Object.hasOwnProperty.call(message, "total_worldwide_active_players")) object.total_worldwide_active_players = message.total_worldwide_active_players; - if (message.total_near_you_active_players != null && message.hasOwnProperty("total_near_you_active_players")) + if (message.total_near_you_active_players != null && $Object.hasOwnProperty.call(message, "total_near_you_active_players")) object.total_near_you_active_players = message.total_near_you_active_players; - if (message.matching_worldwide_empty_gameservers != null && message.hasOwnProperty("matching_worldwide_empty_gameservers")) + if (message.matching_worldwide_empty_gameservers != null && $Object.hasOwnProperty.call(message, "matching_worldwide_empty_gameservers")) object.matching_worldwide_empty_gameservers = message.matching_worldwide_empty_gameservers; - if (message.matching_near_you_empty_gameservers != null && message.hasOwnProperty("matching_near_you_empty_gameservers")) + if (message.matching_near_you_empty_gameservers != null && $Object.hasOwnProperty.call(message, "matching_near_you_empty_gameservers")) object.matching_near_you_empty_gameservers = message.matching_near_you_empty_gameservers; - if (message.total_worldwide_empty_gameservers != null && message.hasOwnProperty("total_worldwide_empty_gameservers")) + if (message.total_worldwide_empty_gameservers != null && $Object.hasOwnProperty.call(message, "total_worldwide_empty_gameservers")) object.total_worldwide_empty_gameservers = message.total_worldwide_empty_gameservers; - if (message.total_near_you_empty_gameservers != null && message.hasOwnProperty("total_near_you_empty_gameservers")) + if (message.total_near_you_empty_gameservers != null && $Object.hasOwnProperty.call(message, "total_near_you_empty_gameservers")) object.total_near_you_empty_gameservers = message.total_near_you_empty_gameservers; return object; }; @@ -26957,8 +34880,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgMatchmakingProgress.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgMatchmakingProgress.prototype.toJSON = function() { + return CMsgMatchmakingProgress.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgMatchmakingProgress + * @function getTypeUrl + * @memberof CMsgMatchmakingProgress + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgMatchmakingProgress.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgMatchmakingProgress"; }; return CMsgMatchmakingProgress; @@ -26968,32 +34905,45 @@ /** * Properties of a CMsgMvMVictoryInfo. - * @exports ICMsgMvMVictoryInfo - * @interface ICMsgMvMVictoryInfo - * @property {Array.|null} [players] CMsgMvMVictoryInfo players + * @typedef {Object} CMsgMvMVictoryInfo.$Properties + * @property {Array.|null} [players] CMsgMvMVictoryInfo players * @property {string|null} [tour_name] CMsgMvMVictoryInfo tour_name * @property {string|null} [mission_name] CMsgMvMVictoryInfo mission_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgMvMVictoryInfo. + * @exports ICMsgMvMVictoryInfo + * @interface ICMsgMvMVictoryInfo + * @augments CMsgMvMVictoryInfo.$Properties + * @deprecated Use CMsgMvMVictoryInfo.$Properties instead. + */ + + /** + * Shape of a CMsgMvMVictoryInfo. + * @typedef {CMsgMvMVictoryInfo.$Properties} CMsgMvMVictoryInfo.$Shape */ /** * Constructs a new CMsgMvMVictoryInfo. * @exports CMsgMvMVictoryInfo * @classdesc Represents a CMsgMvMVictoryInfo. - * @implements ICMsgMvMVictoryInfo * @constructor - * @param {ICMsgMvMVictoryInfo=} [properties] Properties to set + * @param {CMsgMvMVictoryInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgMvMVictoryInfo(properties) { + var CMsgMvMVictoryInfo = function (properties) { this.players = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgMvMVictoryInfo players. - * @member {Array.} players + * @member {Array.} players * @memberof CMsgMvMVictoryInfo * @instance */ @@ -27020,10 +34970,14 @@ * @function create * @memberof CMsgMvMVictoryInfo * @static - * @param {ICMsgMvMVictoryInfo=} [properties] Properties to set + * @param {CMsgMvMVictoryInfo.$Properties=} [properties] Properties to set * @returns {CMsgMvMVictoryInfo} CMsgMvMVictoryInfo instance + * @type {{ + * (properties: CMsgMvMVictoryInfo.$Shape): CMsgMvMVictoryInfo & CMsgMvMVictoryInfo.$Shape; + * (properties?: CMsgMvMVictoryInfo.$Properties): CMsgMvMVictoryInfo; + * }} */ - CMsgMvMVictoryInfo.create = function create(properties) { + CMsgMvMVictoryInfo.create = function(properties) { return new CMsgMvMVictoryInfo(properties); }; @@ -27032,20 +34986,27 @@ * @function encode * @memberof CMsgMvMVictoryInfo * @static - * @param {ICMsgMvMVictoryInfo} message CMsgMvMVictoryInfo message or plain object to encode + * @param {CMsgMvMVictoryInfo.$Properties} message CMsgMvMVictoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMvMVictoryInfo.encode = function encode(message, writer) { + CMsgMvMVictoryInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.players != null && message.players.length) for (var i = 0; i < message.players.length; ++i) - $root.CMsgMvMVictoryInfo.Player.encode(message.players[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tour_name != null && Object.hasOwnProperty.call(message, "tour_name")) + $root.CMsgMvMVictoryInfo.Player.encode(message.players[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.tour_name != null && $Object.hasOwnProperty.call(message, "tour_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.tour_name); - if (message.mission_name != null && Object.hasOwnProperty.call(message, "mission_name")) + if (message.mission_name != null && $Object.hasOwnProperty.call(message, "mission_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.mission_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27054,12 +35015,12 @@ * @function encodeDelimited * @memberof CMsgMvMVictoryInfo * @static - * @param {ICMsgMvMVictoryInfo} message CMsgMvMVictoryInfo message or plain object to encode + * @param {CMsgMvMVictoryInfo.$Properties} message CMsgMvMVictoryInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMvMVictoryInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgMvMVictoryInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27069,33 +35030,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgMvMVictoryInfo} CMsgMvMVictoryInfo + * @returns {CMsgMvMVictoryInfo & CMsgMvMVictoryInfo.$Shape} CMsgMvMVictoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMvMVictoryInfo.decode = function decode(reader, length) { + CMsgMvMVictoryInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgMvMVictoryInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgMvMVictoryInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.players && message.players.length)) - message.players = []; - message.players.push($root.CMsgMvMVictoryInfo.Player.decode(reader, reader.uint32())); - break; - case 2: - message.tour_name = reader.string(); - break; - case 3: - message.mission_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.players && message.players.length)) + message.players = []; + message.players.push($root.CMsgMvMVictoryInfo.Player.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.tour_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.mission_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27105,11 +35089,11 @@ * @memberof CMsgMvMVictoryInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgMvMVictoryInfo} CMsgMvMVictoryInfo + * @returns {CMsgMvMVictoryInfo & CMsgMvMVictoryInfo.$Shape} CMsgMvMVictoryInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMvMVictoryInfo.decodeDelimited = function decodeDelimited(reader) { + CMsgMvMVictoryInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27123,22 +35107,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgMvMVictoryInfo.verify = function verify(message) { + CMsgMvMVictoryInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.players != null && message.hasOwnProperty("players")) { - if (!Array.isArray(message.players)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.players != null && $Object.hasOwnProperty.call(message, "players")) { + if (!$Array.isArray(message.players)) return "players: array expected"; for (var i = 0; i < message.players.length; ++i) { - var error = $root.CMsgMvMVictoryInfo.Player.verify(message.players[i]); + var error = $root.CMsgMvMVictoryInfo.Player.verify(message.players[i], _depth + 1); if (error) return "players." + error; } } - if (message.tour_name != null && message.hasOwnProperty("tour_name")) + if (message.tour_name != null && $Object.hasOwnProperty.call(message, "tour_name")) if (!$util.isString(message.tour_name)) return "tour_name: string expected"; - if (message.mission_name != null && message.hasOwnProperty("mission_name")) + if (message.mission_name != null && $Object.hasOwnProperty.call(message, "mission_name")) if (!$util.isString(message.mission_name)) return "mission_name: string expected"; return null; @@ -27152,24 +35140,30 @@ * @param {Object.} object Plain object * @returns {CMsgMvMVictoryInfo} CMsgMvMVictoryInfo */ - CMsgMvMVictoryInfo.fromObject = function fromObject(object) { + CMsgMvMVictoryInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgMvMVictoryInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgMvMVictoryInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgMvMVictoryInfo(); if (object.players) { - if (!Array.isArray(object.players)) - throw TypeError(".CMsgMvMVictoryInfo.players: array expected"); - message.players = []; + if (!$Array.isArray(object.players)) + throw $TypeError(".CMsgMvMVictoryInfo.players: array expected"); + message.players = $Array(object.players.length); for (var i = 0; i < object.players.length; ++i) { - if (typeof object.players[i] !== "object") - throw TypeError(".CMsgMvMVictoryInfo.players: object expected"); - message.players[i] = $root.CMsgMvMVictoryInfo.Player.fromObject(object.players[i]); + if (!$util.isObject(object.players[i])) + throw $TypeError(".CMsgMvMVictoryInfo.players: object expected"); + message.players[i] = $root.CMsgMvMVictoryInfo.Player.fromObject(object.players[i], _depth + 1); } } if (object.tour_name != null) - message.tour_name = String(object.tour_name); + message.tour_name = $String(object.tour_name); if (object.mission_name != null) - message.mission_name = String(object.mission_name); + message.mission_name = $String(object.mission_name); return message; }; @@ -27182,9 +35176,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgMvMVictoryInfo.toObject = function toObject(message, options) { + CMsgMvMVictoryInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.players = []; @@ -27193,13 +35191,13 @@ object.mission_name = ""; } if (message.players && message.players.length) { - object.players = []; + object.players = $Array(message.players.length); for (var j = 0; j < message.players.length; ++j) - object.players[j] = $root.CMsgMvMVictoryInfo.Player.toObject(message.players[j], options); + object.players[j] = $root.CMsgMvMVictoryInfo.Player.toObject(message.players[j], options, _depth + 1); } - if (message.tour_name != null && message.hasOwnProperty("tour_name")) + if (message.tour_name != null && $Object.hasOwnProperty.call(message, "tour_name")) object.tour_name = message.tour_name; - if (message.mission_name != null && message.hasOwnProperty("mission_name")) + if (message.mission_name != null && $Object.hasOwnProperty.call(message, "mission_name")) object.mission_name = message.mission_name; return object; }; @@ -27211,35 +35209,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgMvMVictoryInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgMvMVictoryInfo.prototype.toJSON = function() { + return CMsgMvMVictoryInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgMvMVictoryInfo + * @function getTypeUrl + * @memberof CMsgMvMVictoryInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgMvMVictoryInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgMvMVictoryInfo"; }; CMsgMvMVictoryInfo.Item = (function() { /** * Properties of an Item. - * @memberof CMsgMvMVictoryInfo - * @interface IItem + * @typedef {Object} CMsgMvMVictoryInfo.Item.$Properties * @property {CMsgMvMVictoryInfo.GrantReason|null} [grant_reason] Item grant_reason * @property {Uint8Array|null} [item_data] Item item_data * @property {number|Long|null} [squad_surplus_claimer_steam_id] Item squad_surplus_claimer_steam_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Item. + * @memberof CMsgMvMVictoryInfo + * @interface IItem + * @augments CMsgMvMVictoryInfo.Item.$Properties + * @deprecated Use CMsgMvMVictoryInfo.Item.$Properties instead. + */ + + /** + * Shape of an Item. + * @typedef {CMsgMvMVictoryInfo.Item.$Properties} CMsgMvMVictoryInfo.Item.$Shape */ /** * Constructs a new Item. * @memberof CMsgMvMVictoryInfo * @classdesc Represents an Item. - * @implements IItem * @constructor - * @param {CMsgMvMVictoryInfo.IItem=} [properties] Properties to set + * @param {CMsgMvMVictoryInfo.Item.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Item(properties) { + var Item = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Item grant_reason. @@ -27263,17 +35288,21 @@ * @memberof CMsgMvMVictoryInfo.Item * @instance */ - Item.prototype.squad_surplus_claimer_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Item.prototype.squad_surplus_claimer_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new Item instance using the specified properties. * @function create * @memberof CMsgMvMVictoryInfo.Item * @static - * @param {CMsgMvMVictoryInfo.IItem=} [properties] Properties to set + * @param {CMsgMvMVictoryInfo.Item.$Properties=} [properties] Properties to set * @returns {CMsgMvMVictoryInfo.Item} Item instance + * @type {{ + * (properties: CMsgMvMVictoryInfo.Item.$Shape): CMsgMvMVictoryInfo.Item & CMsgMvMVictoryInfo.Item.$Shape; + * (properties?: CMsgMvMVictoryInfo.Item.$Properties): CMsgMvMVictoryInfo.Item; + * }} */ - Item.create = function create(properties) { + Item.create = function(properties) { return new Item(properties); }; @@ -27282,19 +35311,26 @@ * @function encode * @memberof CMsgMvMVictoryInfo.Item * @static - * @param {CMsgMvMVictoryInfo.IItem} message Item message or plain object to encode + * @param {CMsgMvMVictoryInfo.Item.$Properties} message Item message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Item.encode = function encode(message, writer) { + Item.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.grant_reason != null && Object.hasOwnProperty.call(message, "grant_reason")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.grant_reason != null && $Object.hasOwnProperty.call(message, "grant_reason")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.grant_reason); - if (message.item_data != null && Object.hasOwnProperty.call(message, "item_data")) + if (message.item_data != null && $Object.hasOwnProperty.call(message, "item_data")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.item_data); - if (message.squad_surplus_claimer_steam_id != null && Object.hasOwnProperty.call(message, "squad_surplus_claimer_steam_id")) + if (message.squad_surplus_claimer_steam_id != null && $Object.hasOwnProperty.call(message, "squad_surplus_claimer_steam_id")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.squad_surplus_claimer_steam_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27303,12 +35339,12 @@ * @function encodeDelimited * @memberof CMsgMvMVictoryInfo.Item * @static - * @param {CMsgMvMVictoryInfo.IItem} message Item message or plain object to encode + * @param {CMsgMvMVictoryInfo.Item.$Properties} message Item message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Item.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Item.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27318,31 +35354,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgMvMVictoryInfo.Item} Item + * @returns {CMsgMvMVictoryInfo.Item & CMsgMvMVictoryInfo.Item.$Shape} Item * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Item.decode = function decode(reader, length) { + Item.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgMvMVictoryInfo.Item(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgMvMVictoryInfo.Item(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.grant_reason = reader.int32(); - break; - case 2: - message.item_data = reader.bytes(); - break; - case 3: - message.squad_surplus_claimer_steam_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgMvMVictoryInfo.GrantReason[value] !== $undefined) + message.grant_reason = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 2) + break; + message.item_data = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.squad_surplus_claimer_steam_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27352,11 +35417,11 @@ * @memberof CMsgMvMVictoryInfo.Item * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgMvMVictoryInfo.Item} Item + * @returns {CMsgMvMVictoryInfo.Item & CMsgMvMVictoryInfo.Item.$Shape} Item * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Item.decodeDelimited = function decodeDelimited(reader) { + Item.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27370,10 +35435,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Item.verify = function verify(message) { + Item.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.grant_reason != null && message.hasOwnProperty("grant_reason")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.grant_reason != null && $Object.hasOwnProperty.call(message, "grant_reason")) switch (message.grant_reason) { default: return "grant_reason: enum value expected"; @@ -27384,10 +35453,10 @@ case 4: break; } - if (message.item_data != null && message.hasOwnProperty("item_data")) + if (message.item_data != null && $Object.hasOwnProperty.call(message, "item_data")) if (!(message.item_data && typeof message.item_data.length === "number" || $util.isString(message.item_data))) return "item_data: buffer expected"; - if (message.squad_surplus_claimer_steam_id != null && message.hasOwnProperty("squad_surplus_claimer_steam_id")) + if (message.squad_surplus_claimer_steam_id != null && $Object.hasOwnProperty.call(message, "squad_surplus_claimer_steam_id")) if (!$util.isInteger(message.squad_surplus_claimer_steam_id) && !(message.squad_surplus_claimer_steam_id && $util.isInteger(message.squad_surplus_claimer_steam_id.low) && $util.isInteger(message.squad_surplus_claimer_steam_id.high))) return "squad_surplus_claimer_steam_id: integer|Long expected"; return null; @@ -27401,9 +35470,15 @@ * @param {Object.} object Plain object * @returns {CMsgMvMVictoryInfo.Item} Item */ - Item.fromObject = function fromObject(object) { + Item.fromObject = function (object, _depth) { if (object instanceof $root.CMsgMvMVictoryInfo.Item) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgMvMVictoryInfo.Item: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgMvMVictoryInfo.Item(); switch (object.grant_reason) { case "INVALID": @@ -27426,21 +35501,22 @@ case 4: message.grant_reason = 4; break; + default: } if (object.item_data != null) if (typeof object.item_data === "string") $util.base64.decode(object.item_data, message.item_data = $util.newBuffer($util.base64.length(object.item_data)), 0); - else if (object.item_data.length) + else if (object.item_data.length >= 0) message.item_data = object.item_data; if (object.squad_surplus_claimer_steam_id != null) if ($util.Long) - (message.squad_surplus_claimer_steam_id = $util.Long.fromValue(object.squad_surplus_claimer_steam_id)).unsigned = false; + message.squad_surplus_claimer_steam_id = $util.Long.fromValue(object.squad_surplus_claimer_steam_id, true); else if (typeof object.squad_surplus_claimer_steam_id === "string") - message.squad_surplus_claimer_steam_id = parseInt(object.squad_surplus_claimer_steam_id, 10); + message.squad_surplus_claimer_steam_id = $parseInt(object.squad_surplus_claimer_steam_id, 10); else if (typeof object.squad_surplus_claimer_steam_id === "number") message.squad_surplus_claimer_steam_id = object.squad_surplus_claimer_steam_id; else if (typeof object.squad_surplus_claimer_steam_id === "object") - message.squad_surplus_claimer_steam_id = new $util.LongBits(object.squad_surplus_claimer_steam_id.low >>> 0, object.squad_surplus_claimer_steam_id.high >>> 0).toNumber(); + message.squad_surplus_claimer_steam_id = new $util.LongBits(object.squad_surplus_claimer_steam_id.low >>> 0, object.squad_surplus_claimer_steam_id.high >>> 0).toNumber(true); return message; }; @@ -27453,34 +35529,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Item.toObject = function toObject(message, options) { + Item.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.grant_reason = options.enums === String ? "INVALID" : 0; - if (options.bytes === String) + object.grant_reason = options.enums === $String ? "INVALID" : 0; + if (options.bytes === $String) object.item_data = ""; else { object.item_data = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.item_data = $util.newBuffer(object.item_data); } if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.squad_surplus_claimer_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.squad_surplus_claimer_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.squad_surplus_claimer_steam_id = options.longs === String ? "0" : 0; - } - if (message.grant_reason != null && message.hasOwnProperty("grant_reason")) - object.grant_reason = options.enums === String ? $root.CMsgMvMVictoryInfo.GrantReason[message.grant_reason] : message.grant_reason; - if (message.item_data != null && message.hasOwnProperty("item_data")) - object.item_data = options.bytes === String ? $util.base64.encode(message.item_data, 0, message.item_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.item_data) : message.item_data; - if (message.squad_surplus_claimer_steam_id != null && message.hasOwnProperty("squad_surplus_claimer_steam_id")) - if (typeof message.squad_surplus_claimer_steam_id === "number") - object.squad_surplus_claimer_steam_id = options.longs === String ? String(message.squad_surplus_claimer_steam_id) : message.squad_surplus_claimer_steam_id; + object.squad_surplus_claimer_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + } + if (message.grant_reason != null && $Object.hasOwnProperty.call(message, "grant_reason")) + object.grant_reason = options.enums === $String ? $root.CMsgMvMVictoryInfo.GrantReason[message.grant_reason] === $undefined ? message.grant_reason : $root.CMsgMvMVictoryInfo.GrantReason[message.grant_reason] : message.grant_reason; + if (message.item_data != null && $Object.hasOwnProperty.call(message, "item_data")) + object.item_data = options.bytes === $String ? $util.base64.encode(message.item_data, 0, message.item_data.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.item_data) : message.item_data; + if (message.squad_surplus_claimer_steam_id != null && $Object.hasOwnProperty.call(message, "squad_surplus_claimer_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.squad_surplus_claimer_steam_id = typeof message.squad_surplus_claimer_steam_id === "number" ? $BigInt(message.squad_surplus_claimer_steam_id) : $util.Long.fromBits(message.squad_surplus_claimer_steam_id.low >>> 0, message.squad_surplus_claimer_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.squad_surplus_claimer_steam_id === "number") + object.squad_surplus_claimer_steam_id = options.longs === $String ? $String(message.squad_surplus_claimer_steam_id) : message.squad_surplus_claimer_steam_id; else - object.squad_surplus_claimer_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.squad_surplus_claimer_steam_id) : options.longs === Number ? new $util.LongBits(message.squad_surplus_claimer_steam_id.low >>> 0, message.squad_surplus_claimer_steam_id.high >>> 0).toNumber() : message.squad_surplus_claimer_steam_id; + object.squad_surplus_claimer_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.squad_surplus_claimer_steam_id) : options.longs === $Number ? new $util.LongBits(message.squad_surplus_claimer_steam_id.low >>> 0, message.squad_surplus_claimer_steam_id.high >>> 0).toNumber(true) : message.squad_surplus_claimer_steam_id; return object; }; @@ -27491,8 +35573,22 @@ * @instance * @returns {Object.} JSON object */ - Item.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Item.prototype.toJSON = function() { + return Item.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Item + * @function getTypeUrl + * @memberof CMsgMvMVictoryInfo.Item + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Item.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgMvMVictoryInfo.Item"; }; return Item; @@ -27502,34 +35598,47 @@ /** * Properties of a Player. - * @memberof CMsgMvMVictoryInfo - * @interface IPlayer + * @typedef {Object} CMsgMvMVictoryInfo.Player.$Properties * @property {number|Long|null} [steam_id] Player steam_id * @property {boolean|null} [badge_granted] Player badge_granted * @property {boolean|null} [badge_progress_updated] Player badge_progress_updated * @property {boolean|null} [badge_leveled] Player badge_leveled * @property {number|null} [badge_level] Player badge_level * @property {number|null} [badge_progress_bits] Player badge_progress_bits - * @property {Array.|null} [items] Player items + * @property {Array.|null} [items] Player items * @property {boolean|null} [voucher_missing] Player voucher_missing * @property {number|null} [badge_points] Player badge_points + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Player. + * @memberof CMsgMvMVictoryInfo + * @interface IPlayer + * @augments CMsgMvMVictoryInfo.Player.$Properties + * @deprecated Use CMsgMvMVictoryInfo.Player.$Properties instead. + */ + + /** + * Shape of a Player. + * @typedef {CMsgMvMVictoryInfo.Player.$Properties} CMsgMvMVictoryInfo.Player.$Shape */ /** * Constructs a new Player. * @memberof CMsgMvMVictoryInfo * @classdesc Represents a Player. - * @implements IPlayer * @constructor - * @param {CMsgMvMVictoryInfo.IPlayer=} [properties] Properties to set + * @param {CMsgMvMVictoryInfo.Player.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Player(properties) { + var Player = function (properties) { this.items = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Player steam_id. @@ -27537,7 +35646,7 @@ * @memberof CMsgMvMVictoryInfo.Player * @instance */ - Player.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Player.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Player badge_granted. @@ -27581,7 +35690,7 @@ /** * Player items. - * @member {Array.} items + * @member {Array.} items * @memberof CMsgMvMVictoryInfo.Player * @instance */ @@ -27608,10 +35717,14 @@ * @function create * @memberof CMsgMvMVictoryInfo.Player * @static - * @param {CMsgMvMVictoryInfo.IPlayer=} [properties] Properties to set + * @param {CMsgMvMVictoryInfo.Player.$Properties=} [properties] Properties to set * @returns {CMsgMvMVictoryInfo.Player} Player instance + * @type {{ + * (properties: CMsgMvMVictoryInfo.Player.$Shape): CMsgMvMVictoryInfo.Player & CMsgMvMVictoryInfo.Player.$Shape; + * (properties?: CMsgMvMVictoryInfo.Player.$Properties): CMsgMvMVictoryInfo.Player; + * }} */ - Player.create = function create(properties) { + Player.create = function(properties) { return new Player(properties); }; @@ -27620,32 +35733,39 @@ * @function encode * @memberof CMsgMvMVictoryInfo.Player * @static - * @param {CMsgMvMVictoryInfo.IPlayer} message Player message or plain object to encode + * @param {CMsgMvMVictoryInfo.Player.$Properties} message Player message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Player.encode = function encode(message, writer) { + Player.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.badge_granted != null && Object.hasOwnProperty.call(message, "badge_granted")) + if (message.badge_granted != null && $Object.hasOwnProperty.call(message, "badge_granted")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.badge_granted); - if (message.badge_progress_updated != null && Object.hasOwnProperty.call(message, "badge_progress_updated")) + if (message.badge_progress_updated != null && $Object.hasOwnProperty.call(message, "badge_progress_updated")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.badge_progress_updated); - if (message.badge_leveled != null && Object.hasOwnProperty.call(message, "badge_leveled")) + if (message.badge_leveled != null && $Object.hasOwnProperty.call(message, "badge_leveled")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.badge_leveled); - if (message.badge_level != null && Object.hasOwnProperty.call(message, "badge_level")) + if (message.badge_level != null && $Object.hasOwnProperty.call(message, "badge_level")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.badge_level); - if (message.badge_progress_bits != null && Object.hasOwnProperty.call(message, "badge_progress_bits")) + if (message.badge_progress_bits != null && $Object.hasOwnProperty.call(message, "badge_progress_bits")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.badge_progress_bits); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) - $root.CMsgMvMVictoryInfo.Item.encode(message.items[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.voucher_missing != null && Object.hasOwnProperty.call(message, "voucher_missing")) + $root.CMsgMvMVictoryInfo.Item.encode(message.items[i], writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.voucher_missing != null && $Object.hasOwnProperty.call(message, "voucher_missing")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.voucher_missing); - if (message.badge_points != null && Object.hasOwnProperty.call(message, "badge_points")) + if (message.badge_points != null && $Object.hasOwnProperty.call(message, "badge_points")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.badge_points); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -27654,12 +35774,12 @@ * @function encodeDelimited * @memberof CMsgMvMVictoryInfo.Player * @static - * @param {CMsgMvMVictoryInfo.IPlayer} message Player message or plain object to encode + * @param {CMsgMvMVictoryInfo.Player.$Properties} message Player message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Player.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Player.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -27669,51 +35789,92 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgMvMVictoryInfo.Player} Player + * @returns {CMsgMvMVictoryInfo.Player & CMsgMvMVictoryInfo.Player.$Shape} Player * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Player.decode = function decode(reader, length) { + Player.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgMvMVictoryInfo.Player(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgMvMVictoryInfo.Player(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 3: - message.badge_granted = reader.bool(); - break; - case 4: - message.badge_progress_updated = reader.bool(); - break; - case 5: - message.badge_leveled = reader.bool(); - break; - case 6: - message.badge_level = reader.uint32(); - break; - case 7: - message.badge_progress_bits = reader.uint32(); - break; - case 8: - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.CMsgMvMVictoryInfo.Item.decode(reader, reader.uint32())); - break; - case 9: - message.voucher_missing = reader.bool(); - break; - case 10: - message.badge_points = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.badge_granted = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.badge_progress_updated = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.badge_leveled = reader.bool(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.badge_level = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.badge_progress_bits = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 2) + break; + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.CMsgMvMVictoryInfo.Item.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.voucher_missing = reader.bool(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.badge_points = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -27723,11 +35884,11 @@ * @memberof CMsgMvMVictoryInfo.Player * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgMvMVictoryInfo.Player} Player + * @returns {CMsgMvMVictoryInfo.Player & CMsgMvMVictoryInfo.Player.$Shape} Player * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Player.decodeDelimited = function decodeDelimited(reader) { + Player.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -27741,40 +35902,44 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Player.verify = function verify(message) { + Player.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.badge_granted != null && message.hasOwnProperty("badge_granted")) + if (message.badge_granted != null && $Object.hasOwnProperty.call(message, "badge_granted")) if (typeof message.badge_granted !== "boolean") return "badge_granted: boolean expected"; - if (message.badge_progress_updated != null && message.hasOwnProperty("badge_progress_updated")) + if (message.badge_progress_updated != null && $Object.hasOwnProperty.call(message, "badge_progress_updated")) if (typeof message.badge_progress_updated !== "boolean") return "badge_progress_updated: boolean expected"; - if (message.badge_leveled != null && message.hasOwnProperty("badge_leveled")) + if (message.badge_leveled != null && $Object.hasOwnProperty.call(message, "badge_leveled")) if (typeof message.badge_leveled !== "boolean") return "badge_leveled: boolean expected"; - if (message.badge_level != null && message.hasOwnProperty("badge_level")) + if (message.badge_level != null && $Object.hasOwnProperty.call(message, "badge_level")) if (!$util.isInteger(message.badge_level)) return "badge_level: integer expected"; - if (message.badge_progress_bits != null && message.hasOwnProperty("badge_progress_bits")) + if (message.badge_progress_bits != null && $Object.hasOwnProperty.call(message, "badge_progress_bits")) if (!$util.isInteger(message.badge_progress_bits)) return "badge_progress_bits: integer expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) + if (message.items != null && $Object.hasOwnProperty.call(message, "items")) { + if (!$Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { - var error = $root.CMsgMvMVictoryInfo.Item.verify(message.items[i]); + var error = $root.CMsgMvMVictoryInfo.Item.verify(message.items[i], _depth + 1); if (error) return "items." + error; } } - if (message.voucher_missing != null && message.hasOwnProperty("voucher_missing")) + if (message.voucher_missing != null && $Object.hasOwnProperty.call(message, "voucher_missing")) if (typeof message.voucher_missing !== "boolean") return "voucher_missing: boolean expected"; - if (message.badge_points != null && message.hasOwnProperty("badge_points")) + if (message.badge_points != null && $Object.hasOwnProperty.call(message, "badge_points")) if (!$util.isInteger(message.badge_points)) return "badge_points: integer expected"; return null; @@ -27788,41 +35953,47 @@ * @param {Object.} object Plain object * @returns {CMsgMvMVictoryInfo.Player} Player */ - Player.fromObject = function fromObject(object) { + Player.fromObject = function (object, _depth) { if (object instanceof $root.CMsgMvMVictoryInfo.Player) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgMvMVictoryInfo.Player: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgMvMVictoryInfo.Player(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.badge_granted != null) - message.badge_granted = Boolean(object.badge_granted); + message.badge_granted = $Boolean(object.badge_granted); if (object.badge_progress_updated != null) - message.badge_progress_updated = Boolean(object.badge_progress_updated); + message.badge_progress_updated = $Boolean(object.badge_progress_updated); if (object.badge_leveled != null) - message.badge_leveled = Boolean(object.badge_leveled); + message.badge_leveled = $Boolean(object.badge_leveled); if (object.badge_level != null) message.badge_level = object.badge_level >>> 0; if (object.badge_progress_bits != null) message.badge_progress_bits = object.badge_progress_bits >>> 0; if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".CMsgMvMVictoryInfo.Player.items: array expected"); - message.items = []; + if (!$Array.isArray(object.items)) + throw $TypeError(".CMsgMvMVictoryInfo.Player.items: array expected"); + message.items = $Array(object.items.length); for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".CMsgMvMVictoryInfo.Player.items: object expected"); - message.items[i] = $root.CMsgMvMVictoryInfo.Item.fromObject(object.items[i]); + if (!$util.isObject(object.items[i])) + throw $TypeError(".CMsgMvMVictoryInfo.Player.items: object expected"); + message.items[i] = $root.CMsgMvMVictoryInfo.Item.fromObject(object.items[i], _depth + 1); } } if (object.voucher_missing != null) - message.voucher_missing = Boolean(object.voucher_missing); + message.voucher_missing = $Boolean(object.voucher_missing); if (object.badge_points != null) message.badge_points = object.badge_points >>> 0; return message; @@ -27837,18 +36008,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Player.toObject = function toObject(message, options) { + Player.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.items = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.badge_granted = false; object.badge_progress_updated = false; object.badge_leveled = false; @@ -27857,29 +36032,31 @@ object.voucher_missing = false; object.badge_points = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.badge_granted != null && message.hasOwnProperty("badge_granted")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.badge_granted != null && $Object.hasOwnProperty.call(message, "badge_granted")) object.badge_granted = message.badge_granted; - if (message.badge_progress_updated != null && message.hasOwnProperty("badge_progress_updated")) + if (message.badge_progress_updated != null && $Object.hasOwnProperty.call(message, "badge_progress_updated")) object.badge_progress_updated = message.badge_progress_updated; - if (message.badge_leveled != null && message.hasOwnProperty("badge_leveled")) + if (message.badge_leveled != null && $Object.hasOwnProperty.call(message, "badge_leveled")) object.badge_leveled = message.badge_leveled; - if (message.badge_level != null && message.hasOwnProperty("badge_level")) + if (message.badge_level != null && $Object.hasOwnProperty.call(message, "badge_level")) object.badge_level = message.badge_level; - if (message.badge_progress_bits != null && message.hasOwnProperty("badge_progress_bits")) + if (message.badge_progress_bits != null && $Object.hasOwnProperty.call(message, "badge_progress_bits")) object.badge_progress_bits = message.badge_progress_bits; if (message.items && message.items.length) { - object.items = []; + object.items = $Array(message.items.length); for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.CMsgMvMVictoryInfo.Item.toObject(message.items[j], options); + object.items[j] = $root.CMsgMvMVictoryInfo.Item.toObject(message.items[j], options, _depth + 1); } - if (message.voucher_missing != null && message.hasOwnProperty("voucher_missing")) + if (message.voucher_missing != null && $Object.hasOwnProperty.call(message, "voucher_missing")) object.voucher_missing = message.voucher_missing; - if (message.badge_points != null && message.hasOwnProperty("badge_points")) + if (message.badge_points != null && $Object.hasOwnProperty.call(message, "badge_points")) object.badge_points = message.badge_points; return object; }; @@ -27891,8 +36068,22 @@ * @instance * @returns {Object.} JSON object */ - Player.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Player.prototype.toJSON = function() { + return Player.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Player + * @function getTypeUrl + * @memberof CMsgMvMVictoryInfo.Player + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Player.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgMvMVictoryInfo.Player"; }; return Player; @@ -27909,7 +36100,7 @@ * @property {number} HELP_A_NOOB=4 HELP_A_NOOB value */ CMsgMvMVictoryInfo.GrantReason = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "INVALID"] = 0; values[valuesById[1] = "BADGE_LEVELED"] = 1; values[valuesById[2] = "SQUAD_SURPLUS"] = 2; @@ -27925,28 +36116,41 @@ /** * Properties of a CGCMsgTFHelloResponse. - * @exports ICGCMsgTFHelloResponse - * @interface ICGCMsgTFHelloResponse + * @typedef {Object} CGCMsgTFHelloResponse.$Properties * @property {number|null} [version_check] CGCMsgTFHelloResponse version_check * @property {Array.|null} [version_checksum] CGCMsgTFHelloResponse version_checksum * @property {number|null} [version_verbose] CGCMsgTFHelloResponse version_verbose + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgTFHelloResponse. + * @exports ICGCMsgTFHelloResponse + * @interface ICGCMsgTFHelloResponse + * @augments CGCMsgTFHelloResponse.$Properties + * @deprecated Use CGCMsgTFHelloResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgTFHelloResponse. + * @typedef {CGCMsgTFHelloResponse.$Properties} CGCMsgTFHelloResponse.$Shape */ /** * Constructs a new CGCMsgTFHelloResponse. * @exports CGCMsgTFHelloResponse * @classdesc Represents a CGCMsgTFHelloResponse. - * @implements ICGCMsgTFHelloResponse * @constructor - * @param {ICGCMsgTFHelloResponse=} [properties] Properties to set + * @param {CGCMsgTFHelloResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgTFHelloResponse(properties) { + var CGCMsgTFHelloResponse = function (properties) { this.version_checksum = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgTFHelloResponse version_check. @@ -27977,10 +36181,14 @@ * @function create * @memberof CGCMsgTFHelloResponse * @static - * @param {ICGCMsgTFHelloResponse=} [properties] Properties to set + * @param {CGCMsgTFHelloResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgTFHelloResponse} CGCMsgTFHelloResponse instance + * @type {{ + * (properties: CGCMsgTFHelloResponse.$Shape): CGCMsgTFHelloResponse & CGCMsgTFHelloResponse.$Shape; + * (properties?: CGCMsgTFHelloResponse.$Properties): CGCMsgTFHelloResponse; + * }} */ - CGCMsgTFHelloResponse.create = function create(properties) { + CGCMsgTFHelloResponse.create = function(properties) { return new CGCMsgTFHelloResponse(properties); }; @@ -27989,20 +36197,27 @@ * @function encode * @memberof CGCMsgTFHelloResponse * @static - * @param {ICGCMsgTFHelloResponse} message CGCMsgTFHelloResponse message or plain object to encode + * @param {CGCMsgTFHelloResponse.$Properties} message CGCMsgTFHelloResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgTFHelloResponse.encode = function encode(message, writer) { + CGCMsgTFHelloResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version_check != null && Object.hasOwnProperty.call(message, "version_check")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version_check != null && $Object.hasOwnProperty.call(message, "version_check")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version_check); if (message.version_checksum != null && message.version_checksum.length) for (var i = 0; i < message.version_checksum.length; ++i) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.version_checksum[i]); - if (message.version_verbose != null && Object.hasOwnProperty.call(message, "version_verbose")) + if (message.version_verbose != null && $Object.hasOwnProperty.call(message, "version_verbose")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.version_verbose); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28011,12 +36226,12 @@ * @function encodeDelimited * @memberof CGCMsgTFHelloResponse * @static - * @param {ICGCMsgTFHelloResponse} message CGCMsgTFHelloResponse message or plain object to encode + * @param {CGCMsgTFHelloResponse.$Properties} message CGCMsgTFHelloResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgTFHelloResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgTFHelloResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28026,38 +36241,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgTFHelloResponse} CGCMsgTFHelloResponse + * @returns {CGCMsgTFHelloResponse & CGCMsgTFHelloResponse.$Shape} CGCMsgTFHelloResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgTFHelloResponse.decode = function decode(reader, length) { + CGCMsgTFHelloResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgTFHelloResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgTFHelloResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version_check = reader.uint32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.version_checksum && message.version_checksum.length)) - message.version_checksum = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.version_checksum.push(reader.uint64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.version_check = reader.uint32(); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.version_checksum && message.version_checksum.length)) + message.version_checksum = []; + reader.uint64s(message.version_checksum); + continue; + } + if (wireType !== 0) + break; + if (!(message.version_checksum && message.version_checksum.length)) + message.version_checksum = []; message.version_checksum.push(reader.uint64()); - break; - case 3: - message.version_verbose = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.version_verbose = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28067,11 +36306,11 @@ * @memberof CGCMsgTFHelloResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgTFHelloResponse} CGCMsgTFHelloResponse + * @returns {CGCMsgTFHelloResponse & CGCMsgTFHelloResponse.$Shape} CGCMsgTFHelloResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgTFHelloResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgTFHelloResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28085,20 +36324,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgTFHelloResponse.verify = function verify(message) { + CGCMsgTFHelloResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version_check != null && message.hasOwnProperty("version_check")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version_check != null && $Object.hasOwnProperty.call(message, "version_check")) if (!$util.isInteger(message.version_check)) return "version_check: integer expected"; - if (message.version_checksum != null && message.hasOwnProperty("version_checksum")) { - if (!Array.isArray(message.version_checksum)) + if (message.version_checksum != null && $Object.hasOwnProperty.call(message, "version_checksum")) { + if (!$Array.isArray(message.version_checksum)) return "version_checksum: array expected"; for (var i = 0; i < message.version_checksum.length; ++i) if (!$util.isInteger(message.version_checksum[i]) && !(message.version_checksum[i] && $util.isInteger(message.version_checksum[i].low) && $util.isInteger(message.version_checksum[i].high))) return "version_checksum: integer|Long[] expected"; } - if (message.version_verbose != null && message.hasOwnProperty("version_verbose")) + if (message.version_verbose != null && $Object.hasOwnProperty.call(message, "version_verbose")) if (!$util.isInteger(message.version_verbose)) return "version_verbose: integer expected"; return null; @@ -28112,21 +36355,27 @@ * @param {Object.} object Plain object * @returns {CGCMsgTFHelloResponse} CGCMsgTFHelloResponse */ - CGCMsgTFHelloResponse.fromObject = function fromObject(object) { + CGCMsgTFHelloResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgTFHelloResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgTFHelloResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgTFHelloResponse(); if (object.version_check != null) message.version_check = object.version_check >>> 0; if (object.version_checksum) { - if (!Array.isArray(object.version_checksum)) - throw TypeError(".CGCMsgTFHelloResponse.version_checksum: array expected"); - message.version_checksum = []; + if (!$Array.isArray(object.version_checksum)) + throw $TypeError(".CGCMsgTFHelloResponse.version_checksum: array expected"); + message.version_checksum = $Array(object.version_checksum.length); for (var i = 0; i < object.version_checksum.length; ++i) if ($util.Long) - (message.version_checksum[i] = $util.Long.fromValue(object.version_checksum[i])).unsigned = true; + message.version_checksum[i] = $util.Long.fromValue(object.version_checksum[i], true); else if (typeof object.version_checksum[i] === "string") - message.version_checksum[i] = parseInt(object.version_checksum[i], 10); + message.version_checksum[i] = $parseInt(object.version_checksum[i], 10); else if (typeof object.version_checksum[i] === "number") message.version_checksum[i] = object.version_checksum[i]; else if (typeof object.version_checksum[i] === "object") @@ -28146,9 +36395,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgTFHelloResponse.toObject = function toObject(message, options) { + CGCMsgTFHelloResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.version_checksum = []; @@ -28156,17 +36409,19 @@ object.version_check = 0; object.version_verbose = 0; } - if (message.version_check != null && message.hasOwnProperty("version_check")) + if (message.version_check != null && $Object.hasOwnProperty.call(message, "version_check")) object.version_check = message.version_check; if (message.version_checksum && message.version_checksum.length) { - object.version_checksum = []; + object.version_checksum = $Array(message.version_checksum.length); for (var j = 0; j < message.version_checksum.length; ++j) - if (typeof message.version_checksum[j] === "number") - object.version_checksum[j] = options.longs === String ? String(message.version_checksum[j]) : message.version_checksum[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.version_checksum[j] = typeof message.version_checksum[j] === "number" ? $BigInt(message.version_checksum[j]) : $util.Long.fromBits(message.version_checksum[j].low >>> 0, message.version_checksum[j].high >>> 0, true).toBigInt(); + else if (typeof message.version_checksum[j] === "number") + object.version_checksum[j] = options.longs === $String ? $String(message.version_checksum[j]) : message.version_checksum[j]; else - object.version_checksum[j] = options.longs === String ? $util.Long.prototype.toString.call(message.version_checksum[j]) : options.longs === Number ? new $util.LongBits(message.version_checksum[j].low >>> 0, message.version_checksum[j].high >>> 0).toNumber(true) : message.version_checksum[j]; + object.version_checksum[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.version_checksum[j]) : options.longs === $Number ? new $util.LongBits(message.version_checksum[j].low >>> 0, message.version_checksum[j].high >>> 0).toNumber(true) : message.version_checksum[j]; } - if (message.version_verbose != null && message.hasOwnProperty("version_verbose")) + if (message.version_verbose != null && $Object.hasOwnProperty.call(message, "version_verbose")) object.version_verbose = message.version_verbose; return object; }; @@ -28178,8 +36433,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgTFHelloResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgTFHelloResponse.prototype.toJSON = function() { + return CGCMsgTFHelloResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgTFHelloResponse + * @function getTypeUrl + * @memberof CGCMsgTFHelloResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgTFHelloResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgTFHelloResponse"; }; return CGCMsgTFHelloResponse; @@ -28189,29 +36458,42 @@ /** * Properties of a CGCMsgTFSync. - * @exports ICGCMsgTFSync - * @interface ICGCMsgTFSync + * @typedef {Object} CGCMsgTFSync.$Properties * @property {Uint8Array|null} [version_checksum] CGCMsgTFSync version_checksum * @property {number|null} [version_check] CGCMsgTFSync version_check * @property {number|null} [version_check_ex] CGCMsgTFSync version_check_ex * @property {number|null} [version_check_ex2] CGCMsgTFSync version_check_ex2 * @property {Uint8Array|null} [version_checksum_ex] CGCMsgTFSync version_checksum_ex + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgTFSync. + * @exports ICGCMsgTFSync + * @interface ICGCMsgTFSync + * @augments CGCMsgTFSync.$Properties + * @deprecated Use CGCMsgTFSync.$Properties instead. + */ + + /** + * Shape of a CGCMsgTFSync. + * @typedef {CGCMsgTFSync.$Properties} CGCMsgTFSync.$Shape */ /** * Constructs a new CGCMsgTFSync. * @exports CGCMsgTFSync * @classdesc Represents a CGCMsgTFSync. - * @implements ICGCMsgTFSync * @constructor - * @param {ICGCMsgTFSync=} [properties] Properties to set + * @param {CGCMsgTFSync.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgTFSync(properties) { + var CGCMsgTFSync = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgTFSync version_checksum. @@ -28258,10 +36540,14 @@ * @function create * @memberof CGCMsgTFSync * @static - * @param {ICGCMsgTFSync=} [properties] Properties to set + * @param {CGCMsgTFSync.$Properties=} [properties] Properties to set * @returns {CGCMsgTFSync} CGCMsgTFSync instance + * @type {{ + * (properties: CGCMsgTFSync.$Shape): CGCMsgTFSync & CGCMsgTFSync.$Shape; + * (properties?: CGCMsgTFSync.$Properties): CGCMsgTFSync; + * }} */ - CGCMsgTFSync.create = function create(properties) { + CGCMsgTFSync.create = function(properties) { return new CGCMsgTFSync(properties); }; @@ -28270,23 +36556,30 @@ * @function encode * @memberof CGCMsgTFSync * @static - * @param {ICGCMsgTFSync} message CGCMsgTFSync message or plain object to encode + * @param {CGCMsgTFSync.$Properties} message CGCMsgTFSync message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgTFSync.encode = function encode(message, writer) { + CGCMsgTFSync.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version_checksum != null && Object.hasOwnProperty.call(message, "version_checksum")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version_checksum != null && $Object.hasOwnProperty.call(message, "version_checksum")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.version_checksum); - if (message.version_check != null && Object.hasOwnProperty.call(message, "version_check")) + if (message.version_check != null && $Object.hasOwnProperty.call(message, "version_check")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.version_check); - if (message.version_check_ex != null && Object.hasOwnProperty.call(message, "version_check_ex")) + if (message.version_check_ex != null && $Object.hasOwnProperty.call(message, "version_check_ex")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.version_check_ex); - if (message.version_check_ex2 != null && Object.hasOwnProperty.call(message, "version_check_ex2")) + if (message.version_check_ex2 != null && $Object.hasOwnProperty.call(message, "version_check_ex2")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.version_check_ex2); - if (message.version_checksum_ex != null && Object.hasOwnProperty.call(message, "version_checksum_ex")) + if (message.version_checksum_ex != null && $Object.hasOwnProperty.call(message, "version_checksum_ex")) writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.version_checksum_ex); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28295,12 +36588,12 @@ * @function encodeDelimited * @memberof CGCMsgTFSync * @static - * @param {ICGCMsgTFSync} message CGCMsgTFSync message or plain object to encode + * @param {CGCMsgTFSync.$Properties} message CGCMsgTFSync message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgTFSync.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgTFSync.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28310,37 +36603,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgTFSync} CGCMsgTFSync + * @returns {CGCMsgTFSync & CGCMsgTFSync.$Shape} CGCMsgTFSync * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgTFSync.decode = function decode(reader, length) { + CGCMsgTFSync.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgTFSync(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgTFSync(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version_checksum = reader.bytes(); - break; - case 2: - message.version_check = reader.uint32(); - break; - case 3: - message.version_check_ex = reader.uint32(); - break; - case 4: - message.version_check_ex2 = reader.uint32(); - break; - case 5: - message.version_checksum_ex = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.version_checksum = reader.bytes(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.version_check = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.version_check_ex = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.version_check_ex2 = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.version_checksum_ex = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28350,11 +36672,11 @@ * @memberof CGCMsgTFSync * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgTFSync} CGCMsgTFSync + * @returns {CGCMsgTFSync & CGCMsgTFSync.$Shape} CGCMsgTFSync * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgTFSync.decodeDelimited = function decodeDelimited(reader) { + CGCMsgTFSync.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28368,22 +36690,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgTFSync.verify = function verify(message) { + CGCMsgTFSync.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version_checksum != null && message.hasOwnProperty("version_checksum")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version_checksum != null && $Object.hasOwnProperty.call(message, "version_checksum")) if (!(message.version_checksum && typeof message.version_checksum.length === "number" || $util.isString(message.version_checksum))) return "version_checksum: buffer expected"; - if (message.version_check != null && message.hasOwnProperty("version_check")) + if (message.version_check != null && $Object.hasOwnProperty.call(message, "version_check")) if (!$util.isInteger(message.version_check)) return "version_check: integer expected"; - if (message.version_check_ex != null && message.hasOwnProperty("version_check_ex")) + if (message.version_check_ex != null && $Object.hasOwnProperty.call(message, "version_check_ex")) if (!$util.isInteger(message.version_check_ex)) return "version_check_ex: integer expected"; - if (message.version_check_ex2 != null && message.hasOwnProperty("version_check_ex2")) + if (message.version_check_ex2 != null && $Object.hasOwnProperty.call(message, "version_check_ex2")) if (!$util.isInteger(message.version_check_ex2)) return "version_check_ex2: integer expected"; - if (message.version_checksum_ex != null && message.hasOwnProperty("version_checksum_ex")) + if (message.version_checksum_ex != null && $Object.hasOwnProperty.call(message, "version_checksum_ex")) if (!(message.version_checksum_ex && typeof message.version_checksum_ex.length === "number" || $util.isString(message.version_checksum_ex))) return "version_checksum_ex: buffer expected"; return null; @@ -28397,14 +36723,20 @@ * @param {Object.} object Plain object * @returns {CGCMsgTFSync} CGCMsgTFSync */ - CGCMsgTFSync.fromObject = function fromObject(object) { + CGCMsgTFSync.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgTFSync) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgTFSync: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgTFSync(); if (object.version_checksum != null) if (typeof object.version_checksum === "string") $util.base64.decode(object.version_checksum, message.version_checksum = $util.newBuffer($util.base64.length(object.version_checksum)), 0); - else if (object.version_checksum.length) + else if (object.version_checksum.length >= 0) message.version_checksum = object.version_checksum; if (object.version_check != null) message.version_check = object.version_check >>> 0; @@ -28415,7 +36747,7 @@ if (object.version_checksum_ex != null) if (typeof object.version_checksum_ex === "string") $util.base64.decode(object.version_checksum_ex, message.version_checksum_ex = $util.newBuffer($util.base64.length(object.version_checksum_ex)), 0); - else if (object.version_checksum_ex.length) + else if (object.version_checksum_ex.length >= 0) message.version_checksum_ex = object.version_checksum_ex; return message; }; @@ -28429,39 +36761,43 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgTFSync.toObject = function toObject(message, options) { + CGCMsgTFSync.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - if (options.bytes === String) + if (options.bytes === $String) object.version_checksum = ""; else { object.version_checksum = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.version_checksum = $util.newBuffer(object.version_checksum); } object.version_check = 0; object.version_check_ex = 0; object.version_check_ex2 = 0; - if (options.bytes === String) + if (options.bytes === $String) object.version_checksum_ex = ""; else { object.version_checksum_ex = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.version_checksum_ex = $util.newBuffer(object.version_checksum_ex); } } - if (message.version_checksum != null && message.hasOwnProperty("version_checksum")) - object.version_checksum = options.bytes === String ? $util.base64.encode(message.version_checksum, 0, message.version_checksum.length) : options.bytes === Array ? Array.prototype.slice.call(message.version_checksum) : message.version_checksum; - if (message.version_check != null && message.hasOwnProperty("version_check")) + if (message.version_checksum != null && $Object.hasOwnProperty.call(message, "version_checksum")) + object.version_checksum = options.bytes === $String ? $util.base64.encode(message.version_checksum, 0, message.version_checksum.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.version_checksum) : message.version_checksum; + if (message.version_check != null && $Object.hasOwnProperty.call(message, "version_check")) object.version_check = message.version_check; - if (message.version_check_ex != null && message.hasOwnProperty("version_check_ex")) + if (message.version_check_ex != null && $Object.hasOwnProperty.call(message, "version_check_ex")) object.version_check_ex = message.version_check_ex; - if (message.version_check_ex2 != null && message.hasOwnProperty("version_check_ex2")) + if (message.version_check_ex2 != null && $Object.hasOwnProperty.call(message, "version_check_ex2")) object.version_check_ex2 = message.version_check_ex2; - if (message.version_checksum_ex != null && message.hasOwnProperty("version_checksum_ex")) - object.version_checksum_ex = options.bytes === String ? $util.base64.encode(message.version_checksum_ex, 0, message.version_checksum_ex.length) : options.bytes === Array ? Array.prototype.slice.call(message.version_checksum_ex) : message.version_checksum_ex; + if (message.version_checksum_ex != null && $Object.hasOwnProperty.call(message, "version_checksum_ex")) + object.version_checksum_ex = options.bytes === $String ? $util.base64.encode(message.version_checksum_ex, 0, message.version_checksum_ex.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.version_checksum_ex) : message.version_checksum_ex; return object; }; @@ -28472,8 +36808,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgTFSync.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgTFSync.prototype.toJSON = function() { + return CGCMsgTFSync.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgTFSync + * @function getTypeUrl + * @memberof CGCMsgTFSync + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgTFSync.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgTFSync"; }; return CGCMsgTFSync; @@ -28483,27 +36833,40 @@ /** * Properties of a CGCMsgTFSyncEx. - * @exports ICGCMsgTFSyncEx - * @interface ICGCMsgTFSyncEx + * @typedef {Object} CGCMsgTFSyncEx.$Properties * @property {string|null} [version_checksum] CGCMsgTFSyncEx version_checksum * @property {Uint8Array|null} [version_checksum_ex] CGCMsgTFSyncEx version_checksum_ex * @property {number|null} [version_check] CGCMsgTFSyncEx version_check + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgTFSyncEx. + * @exports ICGCMsgTFSyncEx + * @interface ICGCMsgTFSyncEx + * @augments CGCMsgTFSyncEx.$Properties + * @deprecated Use CGCMsgTFSyncEx.$Properties instead. + */ + + /** + * Shape of a CGCMsgTFSyncEx. + * @typedef {CGCMsgTFSyncEx.$Properties} CGCMsgTFSyncEx.$Shape */ /** * Constructs a new CGCMsgTFSyncEx. * @exports CGCMsgTFSyncEx * @classdesc Represents a CGCMsgTFSyncEx. - * @implements ICGCMsgTFSyncEx * @constructor - * @param {ICGCMsgTFSyncEx=} [properties] Properties to set + * @param {CGCMsgTFSyncEx.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgTFSyncEx(properties) { + var CGCMsgTFSyncEx = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgTFSyncEx version_checksum. @@ -28534,10 +36897,14 @@ * @function create * @memberof CGCMsgTFSyncEx * @static - * @param {ICGCMsgTFSyncEx=} [properties] Properties to set + * @param {CGCMsgTFSyncEx.$Properties=} [properties] Properties to set * @returns {CGCMsgTFSyncEx} CGCMsgTFSyncEx instance + * @type {{ + * (properties: CGCMsgTFSyncEx.$Shape): CGCMsgTFSyncEx & CGCMsgTFSyncEx.$Shape; + * (properties?: CGCMsgTFSyncEx.$Properties): CGCMsgTFSyncEx; + * }} */ - CGCMsgTFSyncEx.create = function create(properties) { + CGCMsgTFSyncEx.create = function(properties) { return new CGCMsgTFSyncEx(properties); }; @@ -28546,19 +36913,26 @@ * @function encode * @memberof CGCMsgTFSyncEx * @static - * @param {ICGCMsgTFSyncEx} message CGCMsgTFSyncEx message or plain object to encode + * @param {CGCMsgTFSyncEx.$Properties} message CGCMsgTFSyncEx message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgTFSyncEx.encode = function encode(message, writer) { + CGCMsgTFSyncEx.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version_checksum != null && Object.hasOwnProperty.call(message, "version_checksum")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version_checksum != null && $Object.hasOwnProperty.call(message, "version_checksum")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.version_checksum); - if (message.version_checksum_ex != null && Object.hasOwnProperty.call(message, "version_checksum_ex")) + if (message.version_checksum_ex != null && $Object.hasOwnProperty.call(message, "version_checksum_ex")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.version_checksum_ex); - if (message.version_check != null && Object.hasOwnProperty.call(message, "version_check")) + if (message.version_check != null && $Object.hasOwnProperty.call(message, "version_check")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.version_check); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28567,12 +36941,12 @@ * @function encodeDelimited * @memberof CGCMsgTFSyncEx * @static - * @param {ICGCMsgTFSyncEx} message CGCMsgTFSyncEx message or plain object to encode + * @param {CGCMsgTFSyncEx.$Properties} message CGCMsgTFSyncEx message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgTFSyncEx.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgTFSyncEx.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28582,31 +36956,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgTFSyncEx} CGCMsgTFSyncEx + * @returns {CGCMsgTFSyncEx & CGCMsgTFSyncEx.$Shape} CGCMsgTFSyncEx * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgTFSyncEx.decode = function decode(reader, length) { + CGCMsgTFSyncEx.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgTFSyncEx(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgTFSyncEx(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version_checksum = reader.string(); - break; - case 2: - message.version_checksum_ex = reader.bytes(); - break; - case 3: - message.version_check = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.version_checksum = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.version_checksum_ex = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.version_check = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28616,11 +37013,11 @@ * @memberof CGCMsgTFSyncEx * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgTFSyncEx} CGCMsgTFSyncEx + * @returns {CGCMsgTFSyncEx & CGCMsgTFSyncEx.$Shape} CGCMsgTFSyncEx * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgTFSyncEx.decodeDelimited = function decodeDelimited(reader) { + CGCMsgTFSyncEx.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28634,16 +37031,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgTFSyncEx.verify = function verify(message) { + CGCMsgTFSyncEx.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version_checksum != null && message.hasOwnProperty("version_checksum")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version_checksum != null && $Object.hasOwnProperty.call(message, "version_checksum")) if (!$util.isString(message.version_checksum)) return "version_checksum: string expected"; - if (message.version_checksum_ex != null && message.hasOwnProperty("version_checksum_ex")) + if (message.version_checksum_ex != null && $Object.hasOwnProperty.call(message, "version_checksum_ex")) if (!(message.version_checksum_ex && typeof message.version_checksum_ex.length === "number" || $util.isString(message.version_checksum_ex))) return "version_checksum_ex: buffer expected"; - if (message.version_check != null && message.hasOwnProperty("version_check")) + if (message.version_check != null && $Object.hasOwnProperty.call(message, "version_check")) if (!$util.isInteger(message.version_check)) return "version_check: integer expected"; return null; @@ -28657,16 +37058,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgTFSyncEx} CGCMsgTFSyncEx */ - CGCMsgTFSyncEx.fromObject = function fromObject(object) { + CGCMsgTFSyncEx.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgTFSyncEx) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgTFSyncEx: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgTFSyncEx(); if (object.version_checksum != null) - message.version_checksum = String(object.version_checksum); + message.version_checksum = $String(object.version_checksum); if (object.version_checksum_ex != null) if (typeof object.version_checksum_ex === "string") $util.base64.decode(object.version_checksum_ex, message.version_checksum_ex = $util.newBuffer($util.base64.length(object.version_checksum_ex)), 0); - else if (object.version_checksum_ex.length) + else if (object.version_checksum_ex.length >= 0) message.version_checksum_ex = object.version_checksum_ex; if (object.version_check != null) message.version_check = object.version_check >>> 0; @@ -28682,26 +37089,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgTFSyncEx.toObject = function toObject(message, options) { + CGCMsgTFSyncEx.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.version_checksum = ""; - if (options.bytes === String) + if (options.bytes === $String) object.version_checksum_ex = ""; else { object.version_checksum_ex = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.version_checksum_ex = $util.newBuffer(object.version_checksum_ex); } object.version_check = 0; } - if (message.version_checksum != null && message.hasOwnProperty("version_checksum")) + if (message.version_checksum != null && $Object.hasOwnProperty.call(message, "version_checksum")) object.version_checksum = message.version_checksum; - if (message.version_checksum_ex != null && message.hasOwnProperty("version_checksum_ex")) - object.version_checksum_ex = options.bytes === String ? $util.base64.encode(message.version_checksum_ex, 0, message.version_checksum_ex.length) : options.bytes === Array ? Array.prototype.slice.call(message.version_checksum_ex) : message.version_checksum_ex; - if (message.version_check != null && message.hasOwnProperty("version_check")) + if (message.version_checksum_ex != null && $Object.hasOwnProperty.call(message, "version_checksum_ex")) + object.version_checksum_ex = options.bytes === $String ? $util.base64.encode(message.version_checksum_ex, 0, message.version_checksum_ex.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.version_checksum_ex) : message.version_checksum_ex; + if (message.version_check != null && $Object.hasOwnProperty.call(message, "version_check")) object.version_check = message.version_check; return object; }; @@ -28713,8 +37124,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgTFSyncEx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgTFSyncEx.prototype.toJSON = function() { + return CGCMsgTFSyncEx.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgTFSyncEx + * @function getTypeUrl + * @memberof CGCMsgTFSyncEx + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgTFSyncEx.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgTFSyncEx"; }; return CGCMsgTFSyncEx; @@ -28724,31 +37149,44 @@ /** * Properties of a CMsgMvMVictory. - * @exports ICMsgMvMVictory - * @interface ICMsgMvMVictory + * @typedef {Object} CMsgMvMVictory.$Properties * @property {number|null} [legacy_mission_index] CMsgMvMVictory legacy_mission_index * @property {string|null} [tour_name_mannup] CMsgMvMVictory tour_name_mannup * @property {string|null} [mission_name] CMsgMvMVictory mission_name - * @property {Array.|null} [players] CMsgMvMVictory players + * @property {Array.|null} [players] CMsgMvMVictory players * @property {number|Long|null} [lobby_id] CMsgMvMVictory lobby_id * @property {number|null} [event_time] CMsgMvMVictory event_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgMvMVictory. + * @exports ICMsgMvMVictory + * @interface ICMsgMvMVictory + * @augments CMsgMvMVictory.$Properties + * @deprecated Use CMsgMvMVictory.$Properties instead. + */ + + /** + * Shape of a CMsgMvMVictory. + * @typedef {CMsgMvMVictory.$Properties} CMsgMvMVictory.$Shape */ /** * Constructs a new CMsgMvMVictory. * @exports CMsgMvMVictory * @classdesc Represents a CMsgMvMVictory. - * @implements ICMsgMvMVictory * @constructor - * @param {ICMsgMvMVictory=} [properties] Properties to set + * @param {CMsgMvMVictory.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgMvMVictory(properties) { + var CMsgMvMVictory = function (properties) { this.players = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgMvMVictory legacy_mission_index. @@ -28776,7 +37214,7 @@ /** * CMsgMvMVictory players. - * @member {Array.} players + * @member {Array.} players * @memberof CMsgMvMVictory * @instance */ @@ -28803,10 +37241,14 @@ * @function create * @memberof CMsgMvMVictory * @static - * @param {ICMsgMvMVictory=} [properties] Properties to set + * @param {CMsgMvMVictory.$Properties=} [properties] Properties to set * @returns {CMsgMvMVictory} CMsgMvMVictory instance + * @type {{ + * (properties: CMsgMvMVictory.$Shape): CMsgMvMVictory & CMsgMvMVictory.$Shape; + * (properties?: CMsgMvMVictory.$Properties): CMsgMvMVictory; + * }} */ - CMsgMvMVictory.create = function create(properties) { + CMsgMvMVictory.create = function(properties) { return new CMsgMvMVictory(properties); }; @@ -28815,26 +37257,33 @@ * @function encode * @memberof CMsgMvMVictory * @static - * @param {ICMsgMvMVictory} message CMsgMvMVictory message or plain object to encode + * @param {CMsgMvMVictory.$Properties} message CMsgMvMVictory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMvMVictory.encode = function encode(message, writer) { + CMsgMvMVictory.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.legacy_mission_index != null && Object.hasOwnProperty.call(message, "legacy_mission_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.legacy_mission_index != null && $Object.hasOwnProperty.call(message, "legacy_mission_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.legacy_mission_index); if (message.players != null && message.players.length) for (var i = 0; i < message.players.length; ++i) - $root.CMsgMvMVictory.Player.encode(message.players[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + $root.CMsgMvMVictory.Player.encode(message.players[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.lobby_id); - if (message.event_time != null && Object.hasOwnProperty.call(message, "event_time")) + if (message.event_time != null && $Object.hasOwnProperty.call(message, "event_time")) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.event_time); - if (message.tour_name_mannup != null && Object.hasOwnProperty.call(message, "tour_name_mannup")) + if (message.tour_name_mannup != null && $Object.hasOwnProperty.call(message, "tour_name_mannup")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.tour_name_mannup); - if (message.mission_name != null && Object.hasOwnProperty.call(message, "mission_name")) + if (message.mission_name != null && $Object.hasOwnProperty.call(message, "mission_name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.mission_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -28843,12 +37292,12 @@ * @function encodeDelimited * @memberof CMsgMvMVictory * @static - * @param {ICMsgMvMVictory} message CMsgMvMVictory message or plain object to encode + * @param {CMsgMvMVictory.$Properties} message CMsgMvMVictory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMvMVictory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgMvMVictory.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -28858,42 +37307,74 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgMvMVictory} CMsgMvMVictory + * @returns {CMsgMvMVictory & CMsgMvMVictory.$Shape} CMsgMvMVictory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMvMVictory.decode = function decode(reader, length) { + CMsgMvMVictory.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgMvMVictory(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgMvMVictory(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.legacy_mission_index = reader.uint32(); - break; - case 5: - message.tour_name_mannup = reader.string(); - break; - case 6: - message.mission_name = reader.string(); - break; - case 2: - if (!(message.players && message.players.length)) - message.players = []; - message.players.push($root.CMsgMvMVictory.Player.decode(reader, reader.uint32())); - break; - case 3: - message.lobby_id = reader.uint64(); - break; - case 4: - message.event_time = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.legacy_mission_index = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.tour_name_mannup = reader.string(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.mission_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.players && message.players.length)) + message.players = []; + message.players.push($root.CMsgMvMVictory.Player.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.lobby_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.event_time = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -28903,11 +37384,11 @@ * @memberof CMsgMvMVictory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgMvMVictory} CMsgMvMVictory + * @returns {CMsgMvMVictory & CMsgMvMVictory.$Shape} CMsgMvMVictory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMvMVictory.decodeDelimited = function decodeDelimited(reader) { + CMsgMvMVictory.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -28921,31 +37402,35 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgMvMVictory.verify = function verify(message) { + CMsgMvMVictory.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.legacy_mission_index != null && message.hasOwnProperty("legacy_mission_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.legacy_mission_index != null && $Object.hasOwnProperty.call(message, "legacy_mission_index")) if (!$util.isInteger(message.legacy_mission_index)) return "legacy_mission_index: integer expected"; - if (message.tour_name_mannup != null && message.hasOwnProperty("tour_name_mannup")) + if (message.tour_name_mannup != null && $Object.hasOwnProperty.call(message, "tour_name_mannup")) if (!$util.isString(message.tour_name_mannup)) return "tour_name_mannup: string expected"; - if (message.mission_name != null && message.hasOwnProperty("mission_name")) + if (message.mission_name != null && $Object.hasOwnProperty.call(message, "mission_name")) if (!$util.isString(message.mission_name)) return "mission_name: string expected"; - if (message.players != null && message.hasOwnProperty("players")) { - if (!Array.isArray(message.players)) + if (message.players != null && $Object.hasOwnProperty.call(message, "players")) { + if (!$Array.isArray(message.players)) return "players: array expected"; for (var i = 0; i < message.players.length; ++i) { - var error = $root.CMsgMvMVictory.Player.verify(message.players[i]); + var error = $root.CMsgMvMVictory.Player.verify(message.players[i], _depth + 1); if (error) return "players." + error; } } - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; - if (message.event_time != null && message.hasOwnProperty("event_time")) + if (message.event_time != null && $Object.hasOwnProperty.call(message, "event_time")) if (!$util.isInteger(message.event_time)) return "event_time: integer expected"; return null; @@ -28959,31 +37444,37 @@ * @param {Object.} object Plain object * @returns {CMsgMvMVictory} CMsgMvMVictory */ - CMsgMvMVictory.fromObject = function fromObject(object) { + CMsgMvMVictory.fromObject = function (object, _depth) { if (object instanceof $root.CMsgMvMVictory) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgMvMVictory: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgMvMVictory(); if (object.legacy_mission_index != null) message.legacy_mission_index = object.legacy_mission_index >>> 0; if (object.tour_name_mannup != null) - message.tour_name_mannup = String(object.tour_name_mannup); + message.tour_name_mannup = $String(object.tour_name_mannup); if (object.mission_name != null) - message.mission_name = String(object.mission_name); + message.mission_name = $String(object.mission_name); if (object.players) { - if (!Array.isArray(object.players)) - throw TypeError(".CMsgMvMVictory.players: array expected"); - message.players = []; + if (!$Array.isArray(object.players)) + throw $TypeError(".CMsgMvMVictory.players: array expected"); + message.players = $Array(object.players.length); for (var i = 0; i < object.players.length; ++i) { - if (typeof object.players[i] !== "object") - throw TypeError(".CMsgMvMVictory.players: object expected"); - message.players[i] = $root.CMsgMvMVictory.Player.fromObject(object.players[i]); + if (!$util.isObject(object.players[i])) + throw $TypeError(".CMsgMvMVictory.players: object expected"); + message.players[i] = $root.CMsgMvMVictory.Player.fromObject(object.players[i], _depth + 1); } } if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = true; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") @@ -29002,9 +37493,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgMvMVictory.toObject = function toObject(message, options) { + CMsgMvMVictory.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.players = []; @@ -29012,30 +37507,32 @@ object.legacy_mission_index = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.event_time = 0; object.tour_name_mannup = ""; object.mission_name = ""; } - if (message.legacy_mission_index != null && message.hasOwnProperty("legacy_mission_index")) + if (message.legacy_mission_index != null && $Object.hasOwnProperty.call(message, "legacy_mission_index")) object.legacy_mission_index = message.legacy_mission_index; if (message.players && message.players.length) { - object.players = []; + object.players = $Array(message.players.length); for (var j = 0; j < message.players.length; ++j) - object.players[j] = $root.CMsgMvMVictory.Player.toObject(message.players[j], options); + object.players[j] = $root.CMsgMvMVictory.Player.toObject(message.players[j], options, _depth + 1); } - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; - if (message.event_time != null && message.hasOwnProperty("event_time")) + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; + if (message.event_time != null && $Object.hasOwnProperty.call(message, "event_time")) object.event_time = message.event_time; - if (message.tour_name_mannup != null && message.hasOwnProperty("tour_name_mannup")) + if (message.tour_name_mannup != null && $Object.hasOwnProperty.call(message, "tour_name_mannup")) object.tour_name_mannup = message.tour_name_mannup; - if (message.mission_name != null && message.hasOwnProperty("mission_name")) + if (message.mission_name != null && $Object.hasOwnProperty.call(message, "mission_name")) object.mission_name = message.mission_name; return object; }; @@ -29047,34 +37544,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgMvMVictory.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgMvMVictory.prototype.toJSON = function() { + return CMsgMvMVictory.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgMvMVictory + * @function getTypeUrl + * @memberof CMsgMvMVictory + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgMvMVictory.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgMvMVictory"; }; CMsgMvMVictory.Player = (function() { /** * Properties of a Player. - * @memberof CMsgMvMVictory - * @interface IPlayer + * @typedef {Object} CMsgMvMVictory.Player.$Properties * @property {number|Long|null} [steam_id] Player steam_id * @property {boolean|null} [squad_surplus] Player squad_surplus + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Player. + * @memberof CMsgMvMVictory + * @interface IPlayer + * @augments CMsgMvMVictory.Player.$Properties + * @deprecated Use CMsgMvMVictory.Player.$Properties instead. + */ + + /** + * Shape of a Player. + * @typedef {CMsgMvMVictory.Player.$Properties} CMsgMvMVictory.Player.$Shape */ /** * Constructs a new Player. * @memberof CMsgMvMVictory * @classdesc Represents a Player. - * @implements IPlayer * @constructor - * @param {CMsgMvMVictory.IPlayer=} [properties] Properties to set + * @param {CMsgMvMVictory.Player.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Player(properties) { + var Player = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Player steam_id. @@ -29082,7 +37606,7 @@ * @memberof CMsgMvMVictory.Player * @instance */ - Player.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Player.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Player squad_surplus. @@ -29097,10 +37621,14 @@ * @function create * @memberof CMsgMvMVictory.Player * @static - * @param {CMsgMvMVictory.IPlayer=} [properties] Properties to set + * @param {CMsgMvMVictory.Player.$Properties=} [properties] Properties to set * @returns {CMsgMvMVictory.Player} Player instance + * @type {{ + * (properties: CMsgMvMVictory.Player.$Shape): CMsgMvMVictory.Player & CMsgMvMVictory.Player.$Shape; + * (properties?: CMsgMvMVictory.Player.$Properties): CMsgMvMVictory.Player; + * }} */ - Player.create = function create(properties) { + Player.create = function(properties) { return new Player(properties); }; @@ -29109,17 +37637,24 @@ * @function encode * @memberof CMsgMvMVictory.Player * @static - * @param {CMsgMvMVictory.IPlayer} message Player message or plain object to encode + * @param {CMsgMvMVictory.Player.$Properties} message Player message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Player.encode = function encode(message, writer) { + Player.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.squad_surplus != null && Object.hasOwnProperty.call(message, "squad_surplus")) + if (message.squad_surplus != null && $Object.hasOwnProperty.call(message, "squad_surplus")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.squad_surplus); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29128,12 +37663,12 @@ * @function encodeDelimited * @memberof CMsgMvMVictory.Player * @static - * @param {CMsgMvMVictory.IPlayer} message Player message or plain object to encode + * @param {CMsgMvMVictory.Player.$Properties} message Player message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Player.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Player.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29143,28 +37678,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgMvMVictory.Player} Player + * @returns {CMsgMvMVictory.Player & CMsgMvMVictory.Player.$Shape} Player * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Player.decode = function decode(reader, length) { + Player.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgMvMVictory.Player(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgMvMVictory.Player(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.squad_surplus = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.squad_surplus = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29174,11 +37729,11 @@ * @memberof CMsgMvMVictory.Player * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgMvMVictory.Player} Player + * @returns {CMsgMvMVictory.Player & CMsgMvMVictory.Player.$Shape} Player * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Player.decodeDelimited = function decodeDelimited(reader) { + Player.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29192,13 +37747,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Player.verify = function verify(message) { + Player.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.squad_surplus != null && message.hasOwnProperty("squad_surplus")) + if (message.squad_surplus != null && $Object.hasOwnProperty.call(message, "squad_surplus")) if (typeof message.squad_surplus !== "boolean") return "squad_surplus: boolean expected"; return null; @@ -29212,21 +37771,27 @@ * @param {Object.} object Plain object * @returns {CMsgMvMVictory.Player} Player */ - Player.fromObject = function fromObject(object) { + Player.fromObject = function (object, _depth) { if (object instanceof $root.CMsgMvMVictory.Player) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgMvMVictory.Player: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgMvMVictory.Player(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.squad_surplus != null) - message.squad_surplus = Boolean(object.squad_surplus); + message.squad_surplus = $Boolean(object.squad_surplus); return message; }; @@ -29239,24 +37804,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Player.toObject = function toObject(message, options) { + Player.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.squad_surplus = false; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.squad_surplus != null && message.hasOwnProperty("squad_surplus")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.squad_surplus != null && $Object.hasOwnProperty.call(message, "squad_surplus")) object.squad_surplus = message.squad_surplus; return object; }; @@ -29268,8 +37839,22 @@ * @instance * @returns {Object.} JSON object */ - Player.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Player.prototype.toJSON = function() { + return Player.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Player + * @function getTypeUrl + * @memberof CMsgMvMVictory.Player + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Player.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgMvMVictory.Player"; }; return Player; @@ -29280,36 +37865,53 @@ $root.CMsgMvMMannUpVictoryReply = (function() { + /** + * Properties of a CMsgMvMMannUpVictoryReply. + * @typedef {Object} CMsgMvMMannUpVictoryReply.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgMvMMannUpVictoryReply. * @exports ICMsgMvMMannUpVictoryReply * @interface ICMsgMvMMannUpVictoryReply + * @augments CMsgMvMMannUpVictoryReply.$Properties + * @deprecated Use CMsgMvMMannUpVictoryReply.$Properties instead. + */ + + /** + * Shape of a CMsgMvMMannUpVictoryReply. + * @typedef {CMsgMvMMannUpVictoryReply.$Properties} CMsgMvMMannUpVictoryReply.$Shape */ /** * Constructs a new CMsgMvMMannUpVictoryReply. * @exports CMsgMvMMannUpVictoryReply * @classdesc Represents a CMsgMvMMannUpVictoryReply. - * @implements ICMsgMvMMannUpVictoryReply * @constructor - * @param {ICMsgMvMMannUpVictoryReply=} [properties] Properties to set + * @param {CMsgMvMMannUpVictoryReply.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgMvMMannUpVictoryReply(properties) { + var CMsgMvMMannUpVictoryReply = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgMvMMannUpVictoryReply instance using the specified properties. * @function create * @memberof CMsgMvMMannUpVictoryReply * @static - * @param {ICMsgMvMMannUpVictoryReply=} [properties] Properties to set + * @param {CMsgMvMMannUpVictoryReply.$Properties=} [properties] Properties to set * @returns {CMsgMvMMannUpVictoryReply} CMsgMvMMannUpVictoryReply instance + * @type {{ + * (properties: CMsgMvMMannUpVictoryReply.$Shape): CMsgMvMMannUpVictoryReply & CMsgMvMMannUpVictoryReply.$Shape; + * (properties?: CMsgMvMMannUpVictoryReply.$Properties): CMsgMvMMannUpVictoryReply; + * }} */ - CMsgMvMMannUpVictoryReply.create = function create(properties) { + CMsgMvMMannUpVictoryReply.create = function(properties) { return new CMsgMvMMannUpVictoryReply(properties); }; @@ -29318,13 +37920,20 @@ * @function encode * @memberof CMsgMvMMannUpVictoryReply * @static - * @param {ICMsgMvMMannUpVictoryReply} message CMsgMvMMannUpVictoryReply message or plain object to encode + * @param {CMsgMvMMannUpVictoryReply.$Properties} message CMsgMvMMannUpVictoryReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMvMMannUpVictoryReply.encode = function encode(message, writer) { + CMsgMvMMannUpVictoryReply.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29333,12 +37942,12 @@ * @function encodeDelimited * @memberof CMsgMvMMannUpVictoryReply * @static - * @param {ICMsgMvMMannUpVictoryReply} message CMsgMvMMannUpVictoryReply message or plain object to encode + * @param {CMsgMvMMannUpVictoryReply.$Properties} message CMsgMvMMannUpVictoryReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgMvMMannUpVictoryReply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgMvMMannUpVictoryReply.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29348,22 +37957,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgMvMMannUpVictoryReply} CMsgMvMMannUpVictoryReply + * @returns {CMsgMvMMannUpVictoryReply & CMsgMvMMannUpVictoryReply.$Shape} CMsgMvMMannUpVictoryReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMvMMannUpVictoryReply.decode = function decode(reader, length) { + CMsgMvMMannUpVictoryReply.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgMvMMannUpVictoryReply(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgMvMMannUpVictoryReply(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29373,11 +37993,11 @@ * @memberof CMsgMvMMannUpVictoryReply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgMvMMannUpVictoryReply} CMsgMvMMannUpVictoryReply + * @returns {CMsgMvMMannUpVictoryReply & CMsgMvMMannUpVictoryReply.$Shape} CMsgMvMMannUpVictoryReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgMvMMannUpVictoryReply.decodeDelimited = function decodeDelimited(reader) { + CMsgMvMMannUpVictoryReply.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29391,9 +38011,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgMvMMannUpVictoryReply.verify = function verify(message) { + CMsgMvMMannUpVictoryReply.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -29405,9 +38029,15 @@ * @param {Object.} object Plain object * @returns {CMsgMvMMannUpVictoryReply} CMsgMvMMannUpVictoryReply */ - CMsgMvMMannUpVictoryReply.fromObject = function fromObject(object) { + CMsgMvMMannUpVictoryReply.fromObject = function (object, _depth) { if (object instanceof $root.CMsgMvMMannUpVictoryReply) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgMvMMannUpVictoryReply: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgMvMMannUpVictoryReply(); }; @@ -29420,7 +38050,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgMvMMannUpVictoryReply.toObject = function toObject() { + CMsgMvMMannUpVictoryReply.toObject = function () { return {}; }; @@ -29431,8 +38061,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgMvMMannUpVictoryReply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgMvMMannUpVictoryReply.prototype.toJSON = function() { + return CMsgMvMMannUpVictoryReply.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgMvMMannUpVictoryReply + * @function getTypeUrl + * @memberof CMsgMvMMannUpVictoryReply + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgMvMMannUpVictoryReply.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgMvMMannUpVictoryReply"; }; return CMsgMvMMannUpVictoryReply; @@ -29442,26 +38086,39 @@ /** * Properties of a CMsgGameServerKickingLobby. - * @exports ICMsgGameServerKickingLobby - * @interface ICMsgGameServerKickingLobby + * @typedef {Object} CMsgGameServerKickingLobby.$Properties * @property {number|Long|null} [lobby_id] CMsgGameServerKickingLobby lobby_id * @property {number|Long|null} [match_id] CMsgGameServerKickingLobby match_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGameServerKickingLobby. + * @exports ICMsgGameServerKickingLobby + * @interface ICMsgGameServerKickingLobby + * @augments CMsgGameServerKickingLobby.$Properties + * @deprecated Use CMsgGameServerKickingLobby.$Properties instead. + */ + + /** + * Shape of a CMsgGameServerKickingLobby. + * @typedef {CMsgGameServerKickingLobby.$Properties} CMsgGameServerKickingLobby.$Shape */ /** * Constructs a new CMsgGameServerKickingLobby. * @exports CMsgGameServerKickingLobby * @classdesc Represents a CMsgGameServerKickingLobby. - * @implements ICMsgGameServerKickingLobby * @constructor - * @param {ICMsgGameServerKickingLobby=} [properties] Properties to set + * @param {CMsgGameServerKickingLobby.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGameServerKickingLobby(properties) { + var CMsgGameServerKickingLobby = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGameServerKickingLobby lobby_id. @@ -29484,10 +38141,14 @@ * @function create * @memberof CMsgGameServerKickingLobby * @static - * @param {ICMsgGameServerKickingLobby=} [properties] Properties to set + * @param {CMsgGameServerKickingLobby.$Properties=} [properties] Properties to set * @returns {CMsgGameServerKickingLobby} CMsgGameServerKickingLobby instance + * @type {{ + * (properties: CMsgGameServerKickingLobby.$Shape): CMsgGameServerKickingLobby & CMsgGameServerKickingLobby.$Shape; + * (properties?: CMsgGameServerKickingLobby.$Properties): CMsgGameServerKickingLobby; + * }} */ - CMsgGameServerKickingLobby.create = function create(properties) { + CMsgGameServerKickingLobby.create = function(properties) { return new CMsgGameServerKickingLobby(properties); }; @@ -29496,17 +38157,24 @@ * @function encode * @memberof CMsgGameServerKickingLobby * @static - * @param {ICMsgGameServerKickingLobby} message CMsgGameServerKickingLobby message or plain object to encode + * @param {CMsgGameServerKickingLobby.$Properties} message CMsgGameServerKickingLobby message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGameServerKickingLobby.encode = function encode(message, writer) { + CMsgGameServerKickingLobby.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.lobby_id); - if (message.match_id != null && Object.hasOwnProperty.call(message, "match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.match_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29515,12 +38183,12 @@ * @function encodeDelimited * @memberof CMsgGameServerKickingLobby * @static - * @param {ICMsgGameServerKickingLobby} message CMsgGameServerKickingLobby message or plain object to encode + * @param {CMsgGameServerKickingLobby.$Properties} message CMsgGameServerKickingLobby message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGameServerKickingLobby.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGameServerKickingLobby.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29530,28 +38198,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGameServerKickingLobby} CMsgGameServerKickingLobby + * @returns {CMsgGameServerKickingLobby & CMsgGameServerKickingLobby.$Shape} CMsgGameServerKickingLobby * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGameServerKickingLobby.decode = function decode(reader, length) { + CMsgGameServerKickingLobby.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGameServerKickingLobby(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGameServerKickingLobby(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.lobby_id = reader.uint64(); - break; - case 4: - message.match_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 3: { + if (wireType !== 0) + break; + message.lobby_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.match_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29561,11 +38249,11 @@ * @memberof CMsgGameServerKickingLobby * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGameServerKickingLobby} CMsgGameServerKickingLobby + * @returns {CMsgGameServerKickingLobby & CMsgGameServerKickingLobby.$Shape} CMsgGameServerKickingLobby * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGameServerKickingLobby.decodeDelimited = function decodeDelimited(reader) { + CMsgGameServerKickingLobby.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29579,13 +38267,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGameServerKickingLobby.verify = function verify(message) { + CMsgGameServerKickingLobby.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; - if (message.match_id != null && message.hasOwnProperty("match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) if (!$util.isInteger(message.match_id) && !(message.match_id && $util.isInteger(message.match_id.low) && $util.isInteger(message.match_id.high))) return "match_id: integer|Long expected"; return null; @@ -29599,24 +38291,30 @@ * @param {Object.} object Plain object * @returns {CMsgGameServerKickingLobby} CMsgGameServerKickingLobby */ - CMsgGameServerKickingLobby.fromObject = function fromObject(object) { + CMsgGameServerKickingLobby.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGameServerKickingLobby) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGameServerKickingLobby: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGameServerKickingLobby(); if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = true; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(true); if (object.match_id != null) if ($util.Long) - (message.match_id = $util.Long.fromValue(object.match_id)).unsigned = true; + message.match_id = $util.Long.fromValue(object.match_id, true); else if (typeof object.match_id === "string") - message.match_id = parseInt(object.match_id, 10); + message.match_id = $parseInt(object.match_id, 10); else if (typeof object.match_id === "number") message.match_id = object.match_id; else if (typeof object.match_id === "object") @@ -29633,32 +38331,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGameServerKickingLobby.toObject = function toObject(message, options) { + CMsgGameServerKickingLobby.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.match_id = options.longs === String ? "0" : 0; + object.match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; - if (message.match_id != null && message.hasOwnProperty("match_id")) - if (typeof message.match_id === "number") - object.match_id = options.longs === String ? String(message.match_id) : message.match_id; + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.match_id = typeof message.match_id === "number" ? $BigInt(message.match_id) : $util.Long.fromBits(message.match_id.low >>> 0, message.match_id.high >>> 0, true).toBigInt(); + else if (typeof message.match_id === "number") + object.match_id = options.longs === $String ? $String(message.match_id) : message.match_id; else - object.match_id = options.longs === String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; + object.match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === $Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; return object; }; @@ -29669,8 +38375,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGameServerKickingLobby.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGameServerKickingLobby.prototype.toJSON = function() { + return CMsgGameServerKickingLobby.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGameServerKickingLobby + * @function getTypeUrl + * @memberof CMsgGameServerKickingLobby + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGameServerKickingLobby.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGameServerKickingLobby"; }; return CMsgGameServerKickingLobby; @@ -29678,36 +38398,53 @@ $root.CMsgGameServerKickingLobbyResponse = (function() { + /** + * Properties of a CMsgGameServerKickingLobbyResponse. + * @typedef {Object} CMsgGameServerKickingLobbyResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGameServerKickingLobbyResponse. * @exports ICMsgGameServerKickingLobbyResponse * @interface ICMsgGameServerKickingLobbyResponse + * @augments CMsgGameServerKickingLobbyResponse.$Properties + * @deprecated Use CMsgGameServerKickingLobbyResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGameServerKickingLobbyResponse. + * @typedef {CMsgGameServerKickingLobbyResponse.$Properties} CMsgGameServerKickingLobbyResponse.$Shape */ /** * Constructs a new CMsgGameServerKickingLobbyResponse. * @exports CMsgGameServerKickingLobbyResponse * @classdesc Represents a CMsgGameServerKickingLobbyResponse. - * @implements ICMsgGameServerKickingLobbyResponse * @constructor - * @param {ICMsgGameServerKickingLobbyResponse=} [properties] Properties to set + * @param {CMsgGameServerKickingLobbyResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGameServerKickingLobbyResponse(properties) { + var CMsgGameServerKickingLobbyResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgGameServerKickingLobbyResponse instance using the specified properties. * @function create * @memberof CMsgGameServerKickingLobbyResponse * @static - * @param {ICMsgGameServerKickingLobbyResponse=} [properties] Properties to set + * @param {CMsgGameServerKickingLobbyResponse.$Properties=} [properties] Properties to set * @returns {CMsgGameServerKickingLobbyResponse} CMsgGameServerKickingLobbyResponse instance + * @type {{ + * (properties: CMsgGameServerKickingLobbyResponse.$Shape): CMsgGameServerKickingLobbyResponse & CMsgGameServerKickingLobbyResponse.$Shape; + * (properties?: CMsgGameServerKickingLobbyResponse.$Properties): CMsgGameServerKickingLobbyResponse; + * }} */ - CMsgGameServerKickingLobbyResponse.create = function create(properties) { + CMsgGameServerKickingLobbyResponse.create = function(properties) { return new CMsgGameServerKickingLobbyResponse(properties); }; @@ -29716,13 +38453,20 @@ * @function encode * @memberof CMsgGameServerKickingLobbyResponse * @static - * @param {ICMsgGameServerKickingLobbyResponse} message CMsgGameServerKickingLobbyResponse message or plain object to encode + * @param {CMsgGameServerKickingLobbyResponse.$Properties} message CMsgGameServerKickingLobbyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGameServerKickingLobbyResponse.encode = function encode(message, writer) { + CMsgGameServerKickingLobbyResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29731,12 +38475,12 @@ * @function encodeDelimited * @memberof CMsgGameServerKickingLobbyResponse * @static - * @param {ICMsgGameServerKickingLobbyResponse} message CMsgGameServerKickingLobbyResponse message or plain object to encode + * @param {CMsgGameServerKickingLobbyResponse.$Properties} message CMsgGameServerKickingLobbyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGameServerKickingLobbyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGameServerKickingLobbyResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29746,22 +38490,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGameServerKickingLobbyResponse} CMsgGameServerKickingLobbyResponse + * @returns {CMsgGameServerKickingLobbyResponse & CMsgGameServerKickingLobbyResponse.$Shape} CMsgGameServerKickingLobbyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGameServerKickingLobbyResponse.decode = function decode(reader, length) { + CMsgGameServerKickingLobbyResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGameServerKickingLobbyResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGameServerKickingLobbyResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29771,11 +38526,11 @@ * @memberof CMsgGameServerKickingLobbyResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGameServerKickingLobbyResponse} CMsgGameServerKickingLobbyResponse + * @returns {CMsgGameServerKickingLobbyResponse & CMsgGameServerKickingLobbyResponse.$Shape} CMsgGameServerKickingLobbyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGameServerKickingLobbyResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGameServerKickingLobbyResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29789,9 +38544,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGameServerKickingLobbyResponse.verify = function verify(message) { + CMsgGameServerKickingLobbyResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -29803,9 +38562,15 @@ * @param {Object.} object Plain object * @returns {CMsgGameServerKickingLobbyResponse} CMsgGameServerKickingLobbyResponse */ - CMsgGameServerKickingLobbyResponse.fromObject = function fromObject(object) { + CMsgGameServerKickingLobbyResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGameServerKickingLobbyResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGameServerKickingLobbyResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgGameServerKickingLobbyResponse(); }; @@ -29818,7 +38583,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGameServerKickingLobbyResponse.toObject = function toObject() { + CMsgGameServerKickingLobbyResponse.toObject = function () { return {}; }; @@ -29829,8 +38594,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGameServerKickingLobbyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGameServerKickingLobbyResponse.prototype.toJSON = function() { + return CMsgGameServerKickingLobbyResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGameServerKickingLobbyResponse + * @function getTypeUrl + * @memberof CMsgGameServerKickingLobbyResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGameServerKickingLobbyResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGameServerKickingLobbyResponse"; }; return CMsgGameServerKickingLobbyResponse; @@ -29838,27 +38617,40 @@ $root.CMsgLeaveGameAndPrepareToJoinParty = (function() { + /** + * Properties of a CMsgLeaveGameAndPrepareToJoinParty. + * @typedef {Object} CMsgLeaveGameAndPrepareToJoinParty.$Properties + * @property {number|Long|null} [party_id] CMsgLeaveGameAndPrepareToJoinParty party_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgLeaveGameAndPrepareToJoinParty. * @exports ICMsgLeaveGameAndPrepareToJoinParty * @interface ICMsgLeaveGameAndPrepareToJoinParty - * @property {number|Long|null} [party_id] CMsgLeaveGameAndPrepareToJoinParty party_id + * @augments CMsgLeaveGameAndPrepareToJoinParty.$Properties + * @deprecated Use CMsgLeaveGameAndPrepareToJoinParty.$Properties instead. + */ + + /** + * Shape of a CMsgLeaveGameAndPrepareToJoinParty. + * @typedef {CMsgLeaveGameAndPrepareToJoinParty.$Properties} CMsgLeaveGameAndPrepareToJoinParty.$Shape */ /** * Constructs a new CMsgLeaveGameAndPrepareToJoinParty. * @exports CMsgLeaveGameAndPrepareToJoinParty * @classdesc Represents a CMsgLeaveGameAndPrepareToJoinParty. - * @implements ICMsgLeaveGameAndPrepareToJoinParty * @constructor - * @param {ICMsgLeaveGameAndPrepareToJoinParty=} [properties] Properties to set + * @param {CMsgLeaveGameAndPrepareToJoinParty.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgLeaveGameAndPrepareToJoinParty(properties) { + var CMsgLeaveGameAndPrepareToJoinParty = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgLeaveGameAndPrepareToJoinParty party_id. @@ -29866,17 +38658,21 @@ * @memberof CMsgLeaveGameAndPrepareToJoinParty * @instance */ - CMsgLeaveGameAndPrepareToJoinParty.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgLeaveGameAndPrepareToJoinParty.prototype.party_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgLeaveGameAndPrepareToJoinParty instance using the specified properties. * @function create * @memberof CMsgLeaveGameAndPrepareToJoinParty * @static - * @param {ICMsgLeaveGameAndPrepareToJoinParty=} [properties] Properties to set + * @param {CMsgLeaveGameAndPrepareToJoinParty.$Properties=} [properties] Properties to set * @returns {CMsgLeaveGameAndPrepareToJoinParty} CMsgLeaveGameAndPrepareToJoinParty instance + * @type {{ + * (properties: CMsgLeaveGameAndPrepareToJoinParty.$Shape): CMsgLeaveGameAndPrepareToJoinParty & CMsgLeaveGameAndPrepareToJoinParty.$Shape; + * (properties?: CMsgLeaveGameAndPrepareToJoinParty.$Properties): CMsgLeaveGameAndPrepareToJoinParty; + * }} */ - CMsgLeaveGameAndPrepareToJoinParty.create = function create(properties) { + CMsgLeaveGameAndPrepareToJoinParty.create = function(properties) { return new CMsgLeaveGameAndPrepareToJoinParty(properties); }; @@ -29885,15 +38681,22 @@ * @function encode * @memberof CMsgLeaveGameAndPrepareToJoinParty * @static - * @param {ICMsgLeaveGameAndPrepareToJoinParty} message CMsgLeaveGameAndPrepareToJoinParty message or plain object to encode + * @param {CMsgLeaveGameAndPrepareToJoinParty.$Properties} message CMsgLeaveGameAndPrepareToJoinParty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgLeaveGameAndPrepareToJoinParty.encode = function encode(message, writer) { + CMsgLeaveGameAndPrepareToJoinParty.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.party_id != null && Object.hasOwnProperty.call(message, "party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.party_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -29902,12 +38705,12 @@ * @function encodeDelimited * @memberof CMsgLeaveGameAndPrepareToJoinParty * @static - * @param {ICMsgLeaveGameAndPrepareToJoinParty} message CMsgLeaveGameAndPrepareToJoinParty message or plain object to encode + * @param {CMsgLeaveGameAndPrepareToJoinParty.$Properties} message CMsgLeaveGameAndPrepareToJoinParty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgLeaveGameAndPrepareToJoinParty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgLeaveGameAndPrepareToJoinParty.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -29917,25 +38720,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgLeaveGameAndPrepareToJoinParty} CMsgLeaveGameAndPrepareToJoinParty + * @returns {CMsgLeaveGameAndPrepareToJoinParty & CMsgLeaveGameAndPrepareToJoinParty.$Shape} CMsgLeaveGameAndPrepareToJoinParty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgLeaveGameAndPrepareToJoinParty.decode = function decode(reader, length) { + CMsgLeaveGameAndPrepareToJoinParty.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgLeaveGameAndPrepareToJoinParty(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgLeaveGameAndPrepareToJoinParty(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.party_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.party_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -29945,11 +38765,11 @@ * @memberof CMsgLeaveGameAndPrepareToJoinParty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgLeaveGameAndPrepareToJoinParty} CMsgLeaveGameAndPrepareToJoinParty + * @returns {CMsgLeaveGameAndPrepareToJoinParty & CMsgLeaveGameAndPrepareToJoinParty.$Shape} CMsgLeaveGameAndPrepareToJoinParty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgLeaveGameAndPrepareToJoinParty.decodeDelimited = function decodeDelimited(reader) { + CMsgLeaveGameAndPrepareToJoinParty.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -29963,10 +38783,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgLeaveGameAndPrepareToJoinParty.verify = function verify(message) { + CMsgLeaveGameAndPrepareToJoinParty.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.party_id != null && message.hasOwnProperty("party_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) if (!$util.isInteger(message.party_id) && !(message.party_id && $util.isInteger(message.party_id.low) && $util.isInteger(message.party_id.high))) return "party_id: integer|Long expected"; return null; @@ -29980,19 +38804,25 @@ * @param {Object.} object Plain object * @returns {CMsgLeaveGameAndPrepareToJoinParty} CMsgLeaveGameAndPrepareToJoinParty */ - CMsgLeaveGameAndPrepareToJoinParty.fromObject = function fromObject(object) { + CMsgLeaveGameAndPrepareToJoinParty.fromObject = function (object, _depth) { if (object instanceof $root.CMsgLeaveGameAndPrepareToJoinParty) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgLeaveGameAndPrepareToJoinParty: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgLeaveGameAndPrepareToJoinParty(); if (object.party_id != null) if ($util.Long) - (message.party_id = $util.Long.fromValue(object.party_id)).unsigned = false; + message.party_id = $util.Long.fromValue(object.party_id, true); else if (typeof object.party_id === "string") - message.party_id = parseInt(object.party_id, 10); + message.party_id = $parseInt(object.party_id, 10); else if (typeof object.party_id === "number") message.party_id = object.party_id; else if (typeof object.party_id === "object") - message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(); + message.party_id = new $util.LongBits(object.party_id.low >>> 0, object.party_id.high >>> 0).toNumber(true); return message; }; @@ -30005,21 +38835,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgLeaveGameAndPrepareToJoinParty.toObject = function toObject(message, options) { + CMsgLeaveGameAndPrepareToJoinParty.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.party_id = options.longs === String ? "0" : 0; - if (message.party_id != null && message.hasOwnProperty("party_id")) - if (typeof message.party_id === "number") - object.party_id = options.longs === String ? String(message.party_id) : message.party_id; + object.party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.party_id != null && $Object.hasOwnProperty.call(message, "party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.party_id = typeof message.party_id === "number" ? $BigInt(message.party_id) : $util.Long.fromBits(message.party_id.low >>> 0, message.party_id.high >>> 0, true).toBigInt(); + else if (typeof message.party_id === "number") + object.party_id = options.longs === $String ? $String(message.party_id) : message.party_id; else - object.party_id = options.longs === String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber() : message.party_id; + object.party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.party_id) : options.longs === $Number ? new $util.LongBits(message.party_id.low >>> 0, message.party_id.high >>> 0).toNumber(true) : message.party_id; return object; }; @@ -30030,8 +38866,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgLeaveGameAndPrepareToJoinParty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgLeaveGameAndPrepareToJoinParty.prototype.toJSON = function() { + return CMsgLeaveGameAndPrepareToJoinParty.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgLeaveGameAndPrepareToJoinParty + * @function getTypeUrl + * @memberof CMsgLeaveGameAndPrepareToJoinParty + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgLeaveGameAndPrepareToJoinParty.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgLeaveGameAndPrepareToJoinParty"; }; return CMsgLeaveGameAndPrepareToJoinParty; @@ -30041,31 +38891,44 @@ /** * Properties of a CMsgPlayerLeftMatch. - * @exports ICMsgPlayerLeftMatch - * @interface ICMsgPlayerLeftMatch + * @typedef {Object} CMsgPlayerLeftMatch.$Properties * @property {number|Long|null} [steam_id] CMsgPlayerLeftMatch steam_id * @property {TFMatchLeaveReason|null} [leave_reason] CMsgPlayerLeftMatch leave_reason * @property {boolean|null} [was_abandon] CMsgPlayerLeftMatch was_abandon * @property {number|Long|null} [lobby_id] CMsgPlayerLeftMatch lobby_id * @property {number|Long|null} [match_id] CMsgPlayerLeftMatch match_id - * @property {Array.|null} [xp_breakdown] CMsgPlayerLeftMatch xp_breakdown + * @property {Array.|null} [xp_breakdown] CMsgPlayerLeftMatch xp_breakdown + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPlayerLeftMatch. + * @exports ICMsgPlayerLeftMatch + * @interface ICMsgPlayerLeftMatch + * @augments CMsgPlayerLeftMatch.$Properties + * @deprecated Use CMsgPlayerLeftMatch.$Properties instead. + */ + + /** + * Shape of a CMsgPlayerLeftMatch. + * @typedef {CMsgPlayerLeftMatch.$Properties} CMsgPlayerLeftMatch.$Shape */ /** * Constructs a new CMsgPlayerLeftMatch. * @exports CMsgPlayerLeftMatch * @classdesc Represents a CMsgPlayerLeftMatch. - * @implements ICMsgPlayerLeftMatch * @constructor - * @param {ICMsgPlayerLeftMatch=} [properties] Properties to set + * @param {CMsgPlayerLeftMatch.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPlayerLeftMatch(properties) { + var CMsgPlayerLeftMatch = function (properties) { this.xp_breakdown = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPlayerLeftMatch steam_id. @@ -30073,7 +38936,7 @@ * @memberof CMsgPlayerLeftMatch * @instance */ - CMsgPlayerLeftMatch.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPlayerLeftMatch.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPlayerLeftMatch leave_reason. @@ -30109,7 +38972,7 @@ /** * CMsgPlayerLeftMatch xp_breakdown. - * @member {Array.} xp_breakdown + * @member {Array.} xp_breakdown * @memberof CMsgPlayerLeftMatch * @instance */ @@ -30120,10 +38983,14 @@ * @function create * @memberof CMsgPlayerLeftMatch * @static - * @param {ICMsgPlayerLeftMatch=} [properties] Properties to set + * @param {CMsgPlayerLeftMatch.$Properties=} [properties] Properties to set * @returns {CMsgPlayerLeftMatch} CMsgPlayerLeftMatch instance + * @type {{ + * (properties: CMsgPlayerLeftMatch.$Shape): CMsgPlayerLeftMatch & CMsgPlayerLeftMatch.$Shape; + * (properties?: CMsgPlayerLeftMatch.$Properties): CMsgPlayerLeftMatch; + * }} */ - CMsgPlayerLeftMatch.create = function create(properties) { + CMsgPlayerLeftMatch.create = function(properties) { return new CMsgPlayerLeftMatch(properties); }; @@ -30132,26 +38999,33 @@ * @function encode * @memberof CMsgPlayerLeftMatch * @static - * @param {ICMsgPlayerLeftMatch} message CMsgPlayerLeftMatch message or plain object to encode + * @param {CMsgPlayerLeftMatch.$Properties} message CMsgPlayerLeftMatch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPlayerLeftMatch.encode = function encode(message, writer) { + CMsgPlayerLeftMatch.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.leave_reason != null && Object.hasOwnProperty.call(message, "leave_reason")) + if (message.leave_reason != null && $Object.hasOwnProperty.call(message, "leave_reason")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.leave_reason); - if (message.was_abandon != null && Object.hasOwnProperty.call(message, "was_abandon")) + if (message.was_abandon != null && $Object.hasOwnProperty.call(message, "was_abandon")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.was_abandon); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.lobby_id); - if (message.match_id != null && Object.hasOwnProperty.call(message, "match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.match_id); if (message.xp_breakdown != null && message.xp_breakdown.length) for (var i = 0; i < message.xp_breakdown.length; ++i) - $root.CMsgTFXPSource.encode(message.xp_breakdown[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.CMsgTFXPSource.encode(message.xp_breakdown[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30160,12 +39034,12 @@ * @function encodeDelimited * @memberof CMsgPlayerLeftMatch * @static - * @param {ICMsgPlayerLeftMatch} message CMsgPlayerLeftMatch message or plain object to encode + * @param {CMsgPlayerLeftMatch.$Properties} message CMsgPlayerLeftMatch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPlayerLeftMatch.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPlayerLeftMatch.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30175,42 +39049,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPlayerLeftMatch} CMsgPlayerLeftMatch + * @returns {CMsgPlayerLeftMatch & CMsgPlayerLeftMatch.$Shape} CMsgPlayerLeftMatch * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPlayerLeftMatch.decode = function decode(reader, length) { + CMsgPlayerLeftMatch.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPlayerLeftMatch(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPlayerLeftMatch(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.leave_reason = reader.int32(); - break; - case 3: - message.was_abandon = reader.bool(); - break; - case 4: - message.lobby_id = reader.uint64(); - break; - case 5: - message.match_id = reader.uint64(); - break; - case 6: - if (!(message.xp_breakdown && message.xp_breakdown.length)) - message.xp_breakdown = []; - message.xp_breakdown.push($root.CMsgTFXPSource.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.TFMatchLeaveReason[value] !== $undefined) + message.leave_reason = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 0) + break; + message.was_abandon = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.lobby_id = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.match_id = reader.uint64(); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.xp_breakdown && message.xp_breakdown.length)) + message.xp_breakdown = []; + message.xp_breakdown.push($root.CMsgTFXPSource.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30220,11 +39132,11 @@ * @memberof CMsgPlayerLeftMatch * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPlayerLeftMatch} CMsgPlayerLeftMatch + * @returns {CMsgPlayerLeftMatch & CMsgPlayerLeftMatch.$Shape} CMsgPlayerLeftMatch * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPlayerLeftMatch.decodeDelimited = function decodeDelimited(reader) { + CMsgPlayerLeftMatch.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30238,13 +39150,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPlayerLeftMatch.verify = function verify(message) { + CMsgPlayerLeftMatch.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.leave_reason != null && message.hasOwnProperty("leave_reason")) + if (message.leave_reason != null && $Object.hasOwnProperty.call(message, "leave_reason")) switch (message.leave_reason) { default: return "leave_reason: enum value expected"; @@ -30257,20 +39173,20 @@ case 6: break; } - if (message.was_abandon != null && message.hasOwnProperty("was_abandon")) + if (message.was_abandon != null && $Object.hasOwnProperty.call(message, "was_abandon")) if (typeof message.was_abandon !== "boolean") return "was_abandon: boolean expected"; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; - if (message.match_id != null && message.hasOwnProperty("match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) if (!$util.isInteger(message.match_id) && !(message.match_id && $util.isInteger(message.match_id.low) && $util.isInteger(message.match_id.high))) return "match_id: integer|Long expected"; - if (message.xp_breakdown != null && message.hasOwnProperty("xp_breakdown")) { - if (!Array.isArray(message.xp_breakdown)) + if (message.xp_breakdown != null && $Object.hasOwnProperty.call(message, "xp_breakdown")) { + if (!$Array.isArray(message.xp_breakdown)) return "xp_breakdown: array expected"; for (var i = 0; i < message.xp_breakdown.length; ++i) { - var error = $root.CMsgTFXPSource.verify(message.xp_breakdown[i]); + var error = $root.CMsgTFXPSource.verify(message.xp_breakdown[i], _depth + 1); if (error) return "xp_breakdown." + error; } @@ -30286,19 +39202,25 @@ * @param {Object.} object Plain object * @returns {CMsgPlayerLeftMatch} CMsgPlayerLeftMatch */ - CMsgPlayerLeftMatch.fromObject = function fromObject(object) { + CMsgPlayerLeftMatch.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPlayerLeftMatch) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPlayerLeftMatch: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPlayerLeftMatch(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); switch (object.leave_reason) { case "TFMatchLeaveReason_UNSPECIFIED": case 0: @@ -30328,35 +39250,36 @@ case 6: message.leave_reason = 6; break; + default: } if (object.was_abandon != null) - message.was_abandon = Boolean(object.was_abandon); + message.was_abandon = $Boolean(object.was_abandon); if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = true; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(true); if (object.match_id != null) if ($util.Long) - (message.match_id = $util.Long.fromValue(object.match_id)).unsigned = true; + message.match_id = $util.Long.fromValue(object.match_id, true); else if (typeof object.match_id === "string") - message.match_id = parseInt(object.match_id, 10); + message.match_id = $parseInt(object.match_id, 10); else if (typeof object.match_id === "number") message.match_id = object.match_id; else if (typeof object.match_id === "object") message.match_id = new $util.LongBits(object.match_id.low >>> 0, object.match_id.high >>> 0).toNumber(true); if (object.xp_breakdown) { - if (!Array.isArray(object.xp_breakdown)) - throw TypeError(".CMsgPlayerLeftMatch.xp_breakdown: array expected"); - message.xp_breakdown = []; + if (!$Array.isArray(object.xp_breakdown)) + throw $TypeError(".CMsgPlayerLeftMatch.xp_breakdown: array expected"); + message.xp_breakdown = $Array(object.xp_breakdown.length); for (var i = 0; i < object.xp_breakdown.length; ++i) { - if (typeof object.xp_breakdown[i] !== "object") - throw TypeError(".CMsgPlayerLeftMatch.xp_breakdown: object expected"); - message.xp_breakdown[i] = $root.CMsgTFXPSource.fromObject(object.xp_breakdown[i]); + if (!$util.isObject(object.xp_breakdown[i])) + throw $TypeError(".CMsgPlayerLeftMatch.xp_breakdown: object expected"); + message.xp_breakdown[i] = $root.CMsgTFXPSource.fromObject(object.xp_breakdown[i], _depth + 1); } } return message; @@ -30371,54 +39294,64 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPlayerLeftMatch.toObject = function toObject(message, options) { + CMsgPlayerLeftMatch.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.xp_breakdown = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; - object.leave_reason = options.enums === String ? "TFMatchLeaveReason_UNSPECIFIED" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.leave_reason = options.enums === $String ? "TFMatchLeaveReason_UNSPECIFIED" : 0; object.was_abandon = false; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.match_id = options.longs === String ? "0" : 0; + object.match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.leave_reason != null && message.hasOwnProperty("leave_reason")) - object.leave_reason = options.enums === String ? $root.TFMatchLeaveReason[message.leave_reason] : message.leave_reason; - if (message.was_abandon != null && message.hasOwnProperty("was_abandon")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.leave_reason != null && $Object.hasOwnProperty.call(message, "leave_reason")) + object.leave_reason = options.enums === $String ? $root.TFMatchLeaveReason[message.leave_reason] === $undefined ? message.leave_reason : $root.TFMatchLeaveReason[message.leave_reason] : message.leave_reason; + if (message.was_abandon != null && $Object.hasOwnProperty.call(message, "was_abandon")) object.was_abandon = message.was_abandon; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; - if (message.match_id != null && message.hasOwnProperty("match_id")) - if (typeof message.match_id === "number") - object.match_id = options.longs === String ? String(message.match_id) : message.match_id; + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.match_id = typeof message.match_id === "number" ? $BigInt(message.match_id) : $util.Long.fromBits(message.match_id.low >>> 0, message.match_id.high >>> 0, true).toBigInt(); + else if (typeof message.match_id === "number") + object.match_id = options.longs === $String ? $String(message.match_id) : message.match_id; else - object.match_id = options.longs === String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; + object.match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === $Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; if (message.xp_breakdown && message.xp_breakdown.length) { - object.xp_breakdown = []; + object.xp_breakdown = $Array(message.xp_breakdown.length); for (var j = 0; j < message.xp_breakdown.length; ++j) - object.xp_breakdown[j] = $root.CMsgTFXPSource.toObject(message.xp_breakdown[j], options); + object.xp_breakdown[j] = $root.CMsgTFXPSource.toObject(message.xp_breakdown[j], options, _depth + 1); } return object; }; @@ -30430,8 +39363,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPlayerLeftMatch.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPlayerLeftMatch.prototype.toJSON = function() { + return CMsgPlayerLeftMatch.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPlayerLeftMatch + * @function getTypeUrl + * @memberof CMsgPlayerLeftMatch + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPlayerLeftMatch.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPlayerLeftMatch"; }; return CMsgPlayerLeftMatch; @@ -30439,36 +39386,53 @@ $root.CMsgPlayerLeftMatchResponse = (function() { + /** + * Properties of a CMsgPlayerLeftMatchResponse. + * @typedef {Object} CMsgPlayerLeftMatchResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPlayerLeftMatchResponse. * @exports ICMsgPlayerLeftMatchResponse * @interface ICMsgPlayerLeftMatchResponse + * @augments CMsgPlayerLeftMatchResponse.$Properties + * @deprecated Use CMsgPlayerLeftMatchResponse.$Properties instead. + */ + + /** + * Shape of a CMsgPlayerLeftMatchResponse. + * @typedef {CMsgPlayerLeftMatchResponse.$Properties} CMsgPlayerLeftMatchResponse.$Shape */ /** * Constructs a new CMsgPlayerLeftMatchResponse. * @exports CMsgPlayerLeftMatchResponse * @classdesc Represents a CMsgPlayerLeftMatchResponse. - * @implements ICMsgPlayerLeftMatchResponse * @constructor - * @param {ICMsgPlayerLeftMatchResponse=} [properties] Properties to set + * @param {CMsgPlayerLeftMatchResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPlayerLeftMatchResponse(properties) { + var CMsgPlayerLeftMatchResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgPlayerLeftMatchResponse instance using the specified properties. * @function create * @memberof CMsgPlayerLeftMatchResponse * @static - * @param {ICMsgPlayerLeftMatchResponse=} [properties] Properties to set + * @param {CMsgPlayerLeftMatchResponse.$Properties=} [properties] Properties to set * @returns {CMsgPlayerLeftMatchResponse} CMsgPlayerLeftMatchResponse instance + * @type {{ + * (properties: CMsgPlayerLeftMatchResponse.$Shape): CMsgPlayerLeftMatchResponse & CMsgPlayerLeftMatchResponse.$Shape; + * (properties?: CMsgPlayerLeftMatchResponse.$Properties): CMsgPlayerLeftMatchResponse; + * }} */ - CMsgPlayerLeftMatchResponse.create = function create(properties) { + CMsgPlayerLeftMatchResponse.create = function(properties) { return new CMsgPlayerLeftMatchResponse(properties); }; @@ -30477,13 +39441,20 @@ * @function encode * @memberof CMsgPlayerLeftMatchResponse * @static - * @param {ICMsgPlayerLeftMatchResponse} message CMsgPlayerLeftMatchResponse message or plain object to encode + * @param {CMsgPlayerLeftMatchResponse.$Properties} message CMsgPlayerLeftMatchResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPlayerLeftMatchResponse.encode = function encode(message, writer) { + CMsgPlayerLeftMatchResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30492,12 +39463,12 @@ * @function encodeDelimited * @memberof CMsgPlayerLeftMatchResponse * @static - * @param {ICMsgPlayerLeftMatchResponse} message CMsgPlayerLeftMatchResponse message or plain object to encode + * @param {CMsgPlayerLeftMatchResponse.$Properties} message CMsgPlayerLeftMatchResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPlayerLeftMatchResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPlayerLeftMatchResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30507,22 +39478,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPlayerLeftMatchResponse} CMsgPlayerLeftMatchResponse + * @returns {CMsgPlayerLeftMatchResponse & CMsgPlayerLeftMatchResponse.$Shape} CMsgPlayerLeftMatchResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPlayerLeftMatchResponse.decode = function decode(reader, length) { + CMsgPlayerLeftMatchResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPlayerLeftMatchResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPlayerLeftMatchResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30532,11 +39514,11 @@ * @memberof CMsgPlayerLeftMatchResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPlayerLeftMatchResponse} CMsgPlayerLeftMatchResponse + * @returns {CMsgPlayerLeftMatchResponse & CMsgPlayerLeftMatchResponse.$Shape} CMsgPlayerLeftMatchResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPlayerLeftMatchResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgPlayerLeftMatchResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30550,9 +39532,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPlayerLeftMatchResponse.verify = function verify(message) { + CMsgPlayerLeftMatchResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -30564,9 +39550,15 @@ * @param {Object.} object Plain object * @returns {CMsgPlayerLeftMatchResponse} CMsgPlayerLeftMatchResponse */ - CMsgPlayerLeftMatchResponse.fromObject = function fromObject(object) { + CMsgPlayerLeftMatchResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPlayerLeftMatchResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPlayerLeftMatchResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgPlayerLeftMatchResponse(); }; @@ -30579,7 +39571,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPlayerLeftMatchResponse.toObject = function toObject() { + CMsgPlayerLeftMatchResponse.toObject = function () { return {}; }; @@ -30590,8 +39582,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPlayerLeftMatchResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPlayerLeftMatchResponse.prototype.toJSON = function() { + return CMsgPlayerLeftMatchResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPlayerLeftMatchResponse + * @function getTypeUrl + * @memberof CMsgPlayerLeftMatchResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPlayerLeftMatchResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPlayerLeftMatchResponse"; }; return CMsgPlayerLeftMatchResponse; @@ -30601,27 +39607,40 @@ /** * Properties of a CMsgPlayerVoteKickedAfterLeavingMatch. - * @exports ICMsgPlayerVoteKickedAfterLeavingMatch - * @interface ICMsgPlayerVoteKickedAfterLeavingMatch + * @typedef {Object} CMsgPlayerVoteKickedAfterLeavingMatch.$Properties * @property {number|Long|null} [steam_id] CMsgPlayerVoteKickedAfterLeavingMatch steam_id * @property {number|Long|null} [lobby_id] CMsgPlayerVoteKickedAfterLeavingMatch lobby_id * @property {number|Long|null} [match_id] CMsgPlayerVoteKickedAfterLeavingMatch match_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPlayerVoteKickedAfterLeavingMatch. + * @exports ICMsgPlayerVoteKickedAfterLeavingMatch + * @interface ICMsgPlayerVoteKickedAfterLeavingMatch + * @augments CMsgPlayerVoteKickedAfterLeavingMatch.$Properties + * @deprecated Use CMsgPlayerVoteKickedAfterLeavingMatch.$Properties instead. + */ + + /** + * Shape of a CMsgPlayerVoteKickedAfterLeavingMatch. + * @typedef {CMsgPlayerVoteKickedAfterLeavingMatch.$Properties} CMsgPlayerVoteKickedAfterLeavingMatch.$Shape */ /** * Constructs a new CMsgPlayerVoteKickedAfterLeavingMatch. * @exports CMsgPlayerVoteKickedAfterLeavingMatch * @classdesc Represents a CMsgPlayerVoteKickedAfterLeavingMatch. - * @implements ICMsgPlayerVoteKickedAfterLeavingMatch * @constructor - * @param {ICMsgPlayerVoteKickedAfterLeavingMatch=} [properties] Properties to set + * @param {CMsgPlayerVoteKickedAfterLeavingMatch.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPlayerVoteKickedAfterLeavingMatch(properties) { + var CMsgPlayerVoteKickedAfterLeavingMatch = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPlayerVoteKickedAfterLeavingMatch steam_id. @@ -30629,7 +39648,7 @@ * @memberof CMsgPlayerVoteKickedAfterLeavingMatch * @instance */ - CMsgPlayerVoteKickedAfterLeavingMatch.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPlayerVoteKickedAfterLeavingMatch.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPlayerVoteKickedAfterLeavingMatch lobby_id. @@ -30637,7 +39656,7 @@ * @memberof CMsgPlayerVoteKickedAfterLeavingMatch * @instance */ - CMsgPlayerVoteKickedAfterLeavingMatch.prototype.lobby_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPlayerVoteKickedAfterLeavingMatch.prototype.lobby_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgPlayerVoteKickedAfterLeavingMatch match_id. @@ -30645,17 +39664,21 @@ * @memberof CMsgPlayerVoteKickedAfterLeavingMatch * @instance */ - CMsgPlayerVoteKickedAfterLeavingMatch.prototype.match_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgPlayerVoteKickedAfterLeavingMatch.prototype.match_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgPlayerVoteKickedAfterLeavingMatch instance using the specified properties. * @function create * @memberof CMsgPlayerVoteKickedAfterLeavingMatch * @static - * @param {ICMsgPlayerVoteKickedAfterLeavingMatch=} [properties] Properties to set + * @param {CMsgPlayerVoteKickedAfterLeavingMatch.$Properties=} [properties] Properties to set * @returns {CMsgPlayerVoteKickedAfterLeavingMatch} CMsgPlayerVoteKickedAfterLeavingMatch instance + * @type {{ + * (properties: CMsgPlayerVoteKickedAfterLeavingMatch.$Shape): CMsgPlayerVoteKickedAfterLeavingMatch & CMsgPlayerVoteKickedAfterLeavingMatch.$Shape; + * (properties?: CMsgPlayerVoteKickedAfterLeavingMatch.$Properties): CMsgPlayerVoteKickedAfterLeavingMatch; + * }} */ - CMsgPlayerVoteKickedAfterLeavingMatch.create = function create(properties) { + CMsgPlayerVoteKickedAfterLeavingMatch.create = function(properties) { return new CMsgPlayerVoteKickedAfterLeavingMatch(properties); }; @@ -30664,19 +39687,26 @@ * @function encode * @memberof CMsgPlayerVoteKickedAfterLeavingMatch * @static - * @param {ICMsgPlayerVoteKickedAfterLeavingMatch} message CMsgPlayerVoteKickedAfterLeavingMatch message or plain object to encode + * @param {CMsgPlayerVoteKickedAfterLeavingMatch.$Properties} message CMsgPlayerVoteKickedAfterLeavingMatch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPlayerVoteKickedAfterLeavingMatch.encode = function encode(message, writer) { + CMsgPlayerVoteKickedAfterLeavingMatch.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.lobby_id); - if (message.match_id != null && Object.hasOwnProperty.call(message, "match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.match_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30685,12 +39715,12 @@ * @function encodeDelimited * @memberof CMsgPlayerVoteKickedAfterLeavingMatch * @static - * @param {ICMsgPlayerVoteKickedAfterLeavingMatch} message CMsgPlayerVoteKickedAfterLeavingMatch message or plain object to encode + * @param {CMsgPlayerVoteKickedAfterLeavingMatch.$Properties} message CMsgPlayerVoteKickedAfterLeavingMatch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPlayerVoteKickedAfterLeavingMatch.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPlayerVoteKickedAfterLeavingMatch.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30700,31 +39730,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPlayerVoteKickedAfterLeavingMatch} CMsgPlayerVoteKickedAfterLeavingMatch + * @returns {CMsgPlayerVoteKickedAfterLeavingMatch & CMsgPlayerVoteKickedAfterLeavingMatch.$Shape} CMsgPlayerVoteKickedAfterLeavingMatch * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPlayerVoteKickedAfterLeavingMatch.decode = function decode(reader, length) { + CMsgPlayerVoteKickedAfterLeavingMatch.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPlayerVoteKickedAfterLeavingMatch(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPlayerVoteKickedAfterLeavingMatch(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.lobby_id = reader.fixed64(); - break; - case 3: - message.match_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.lobby_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.match_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30734,11 +39787,11 @@ * @memberof CMsgPlayerVoteKickedAfterLeavingMatch * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPlayerVoteKickedAfterLeavingMatch} CMsgPlayerVoteKickedAfterLeavingMatch + * @returns {CMsgPlayerVoteKickedAfterLeavingMatch & CMsgPlayerVoteKickedAfterLeavingMatch.$Shape} CMsgPlayerVoteKickedAfterLeavingMatch * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPlayerVoteKickedAfterLeavingMatch.decodeDelimited = function decodeDelimited(reader) { + CMsgPlayerVoteKickedAfterLeavingMatch.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30752,16 +39805,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPlayerVoteKickedAfterLeavingMatch.verify = function verify(message) { + CMsgPlayerVoteKickedAfterLeavingMatch.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; - if (message.match_id != null && message.hasOwnProperty("match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) if (!$util.isInteger(message.match_id) && !(message.match_id && $util.isInteger(message.match_id.low) && $util.isInteger(message.match_id.high))) return "match_id: integer|Long expected"; return null; @@ -30775,37 +39832,43 @@ * @param {Object.} object Plain object * @returns {CMsgPlayerVoteKickedAfterLeavingMatch} CMsgPlayerVoteKickedAfterLeavingMatch */ - CMsgPlayerVoteKickedAfterLeavingMatch.fromObject = function fromObject(object) { + CMsgPlayerVoteKickedAfterLeavingMatch.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPlayerVoteKickedAfterLeavingMatch) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPlayerVoteKickedAfterLeavingMatch: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPlayerVoteKickedAfterLeavingMatch(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = false; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") - message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(); + message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(true); if (object.match_id != null) if ($util.Long) - (message.match_id = $util.Long.fromValue(object.match_id)).unsigned = false; + message.match_id = $util.Long.fromValue(object.match_id, true); else if (typeof object.match_id === "string") - message.match_id = parseInt(object.match_id, 10); + message.match_id = $parseInt(object.match_id, 10); else if (typeof object.match_id === "number") message.match_id = object.match_id; else if (typeof object.match_id === "object") - message.match_id = new $util.LongBits(object.match_id.low >>> 0, object.match_id.high >>> 0).toNumber(); + message.match_id = new $util.LongBits(object.match_id.low >>> 0, object.match_id.high >>> 0).toNumber(true); return message; }; @@ -30818,42 +39881,52 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPlayerVoteKickedAfterLeavingMatch.toObject = function toObject(message, options) { + CMsgPlayerVoteKickedAfterLeavingMatch.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.match_id = options.longs === String ? "0" : 0; + object.match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber() : message.lobby_id; - if (message.match_id != null && message.hasOwnProperty("match_id")) - if (typeof message.match_id === "number") - object.match_id = options.longs === String ? String(message.match_id) : message.match_id; + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.match_id = typeof message.match_id === "number" ? $BigInt(message.match_id) : $util.Long.fromBits(message.match_id.low >>> 0, message.match_id.high >>> 0, true).toBigInt(); + else if (typeof message.match_id === "number") + object.match_id = options.longs === $String ? $String(message.match_id) : message.match_id; else - object.match_id = options.longs === String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber() : message.match_id; + object.match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === $Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; return object; }; @@ -30864,8 +39937,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPlayerVoteKickedAfterLeavingMatch.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPlayerVoteKickedAfterLeavingMatch.prototype.toJSON = function() { + return CMsgPlayerVoteKickedAfterLeavingMatch.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPlayerVoteKickedAfterLeavingMatch + * @function getTypeUrl + * @memberof CMsgPlayerVoteKickedAfterLeavingMatch + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPlayerVoteKickedAfterLeavingMatch.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPlayerVoteKickedAfterLeavingMatch"; }; return CMsgPlayerVoteKickedAfterLeavingMatch; @@ -30873,36 +39960,53 @@ $root.CMsgPlayerVoteKickedAfterLeavingMatchResponse = (function() { + /** + * Properties of a CMsgPlayerVoteKickedAfterLeavingMatchResponse. + * @typedef {Object} CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPlayerVoteKickedAfterLeavingMatchResponse. * @exports ICMsgPlayerVoteKickedAfterLeavingMatchResponse * @interface ICMsgPlayerVoteKickedAfterLeavingMatchResponse + * @augments CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Properties + * @deprecated Use CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Properties instead. + */ + + /** + * Shape of a CMsgPlayerVoteKickedAfterLeavingMatchResponse. + * @typedef {CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Properties} CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Shape */ /** * Constructs a new CMsgPlayerVoteKickedAfterLeavingMatchResponse. * @exports CMsgPlayerVoteKickedAfterLeavingMatchResponse * @classdesc Represents a CMsgPlayerVoteKickedAfterLeavingMatchResponse. - * @implements ICMsgPlayerVoteKickedAfterLeavingMatchResponse * @constructor - * @param {ICMsgPlayerVoteKickedAfterLeavingMatchResponse=} [properties] Properties to set + * @param {CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPlayerVoteKickedAfterLeavingMatchResponse(properties) { + var CMsgPlayerVoteKickedAfterLeavingMatchResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgPlayerVoteKickedAfterLeavingMatchResponse instance using the specified properties. * @function create * @memberof CMsgPlayerVoteKickedAfterLeavingMatchResponse * @static - * @param {ICMsgPlayerVoteKickedAfterLeavingMatchResponse=} [properties] Properties to set + * @param {CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Properties=} [properties] Properties to set * @returns {CMsgPlayerVoteKickedAfterLeavingMatchResponse} CMsgPlayerVoteKickedAfterLeavingMatchResponse instance + * @type {{ + * (properties: CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Shape): CMsgPlayerVoteKickedAfterLeavingMatchResponse & CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Shape; + * (properties?: CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Properties): CMsgPlayerVoteKickedAfterLeavingMatchResponse; + * }} */ - CMsgPlayerVoteKickedAfterLeavingMatchResponse.create = function create(properties) { + CMsgPlayerVoteKickedAfterLeavingMatchResponse.create = function(properties) { return new CMsgPlayerVoteKickedAfterLeavingMatchResponse(properties); }; @@ -30911,13 +40015,20 @@ * @function encode * @memberof CMsgPlayerVoteKickedAfterLeavingMatchResponse * @static - * @param {ICMsgPlayerVoteKickedAfterLeavingMatchResponse} message CMsgPlayerVoteKickedAfterLeavingMatchResponse message or plain object to encode + * @param {CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Properties} message CMsgPlayerVoteKickedAfterLeavingMatchResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPlayerVoteKickedAfterLeavingMatchResponse.encode = function encode(message, writer) { + CMsgPlayerVoteKickedAfterLeavingMatchResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -30926,12 +40037,12 @@ * @function encodeDelimited * @memberof CMsgPlayerVoteKickedAfterLeavingMatchResponse * @static - * @param {ICMsgPlayerVoteKickedAfterLeavingMatchResponse} message CMsgPlayerVoteKickedAfterLeavingMatchResponse message or plain object to encode + * @param {CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Properties} message CMsgPlayerVoteKickedAfterLeavingMatchResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPlayerVoteKickedAfterLeavingMatchResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPlayerVoteKickedAfterLeavingMatchResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -30941,22 +40052,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPlayerVoteKickedAfterLeavingMatchResponse} CMsgPlayerVoteKickedAfterLeavingMatchResponse + * @returns {CMsgPlayerVoteKickedAfterLeavingMatchResponse & CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Shape} CMsgPlayerVoteKickedAfterLeavingMatchResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPlayerVoteKickedAfterLeavingMatchResponse.decode = function decode(reader, length) { + CMsgPlayerVoteKickedAfterLeavingMatchResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPlayerVoteKickedAfterLeavingMatchResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPlayerVoteKickedAfterLeavingMatchResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -30966,11 +40088,11 @@ * @memberof CMsgPlayerVoteKickedAfterLeavingMatchResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPlayerVoteKickedAfterLeavingMatchResponse} CMsgPlayerVoteKickedAfterLeavingMatchResponse + * @returns {CMsgPlayerVoteKickedAfterLeavingMatchResponse & CMsgPlayerVoteKickedAfterLeavingMatchResponse.$Shape} CMsgPlayerVoteKickedAfterLeavingMatchResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPlayerVoteKickedAfterLeavingMatchResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgPlayerVoteKickedAfterLeavingMatchResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -30984,9 +40106,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPlayerVoteKickedAfterLeavingMatchResponse.verify = function verify(message) { + CMsgPlayerVoteKickedAfterLeavingMatchResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -30998,9 +40124,15 @@ * @param {Object.} object Plain object * @returns {CMsgPlayerVoteKickedAfterLeavingMatchResponse} CMsgPlayerVoteKickedAfterLeavingMatchResponse */ - CMsgPlayerVoteKickedAfterLeavingMatchResponse.fromObject = function fromObject(object) { + CMsgPlayerVoteKickedAfterLeavingMatchResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPlayerVoteKickedAfterLeavingMatchResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPlayerVoteKickedAfterLeavingMatchResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgPlayerVoteKickedAfterLeavingMatchResponse(); }; @@ -31013,7 +40145,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPlayerVoteKickedAfterLeavingMatchResponse.toObject = function toObject() { + CMsgPlayerVoteKickedAfterLeavingMatchResponse.toObject = function () { return {}; }; @@ -31024,8 +40156,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPlayerVoteKickedAfterLeavingMatchResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPlayerVoteKickedAfterLeavingMatchResponse.prototype.toJSON = function() { + return CMsgPlayerVoteKickedAfterLeavingMatchResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPlayerVoteKickedAfterLeavingMatchResponse + * @function getTypeUrl + * @memberof CMsgPlayerVoteKickedAfterLeavingMatchResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPlayerVoteKickedAfterLeavingMatchResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPlayerVoteKickedAfterLeavingMatchResponse"; }; return CMsgPlayerVoteKickedAfterLeavingMatchResponse; @@ -31035,8 +40181,7 @@ /** * Properties of a CMsgHalloween_ServerBossEvent. - * @exports ICMsgHalloween_ServerBossEvent - * @interface ICMsgHalloween_ServerBossEvent + * @typedef {Object} CMsgHalloween_ServerBossEvent.$Properties * @property {number|null} [event_counter] CMsgHalloween_ServerBossEvent event_counter * @property {number|null} [timestamp] CMsgHalloween_ServerBossEvent timestamp * @property {number|null} [boss_type] CMsgHalloween_ServerBossEvent boss_type @@ -31044,22 +40189,36 @@ * @property {number|null} [event_type] CMsgHalloween_ServerBossEvent event_type * @property {number|null} [players_involved] CMsgHalloween_ServerBossEvent players_involved * @property {number|null} [elapsed_time] CMsgHalloween_ServerBossEvent elapsed_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHalloween_ServerBossEvent. + * @exports ICMsgHalloween_ServerBossEvent + * @interface ICMsgHalloween_ServerBossEvent + * @augments CMsgHalloween_ServerBossEvent.$Properties + * @deprecated Use CMsgHalloween_ServerBossEvent.$Properties instead. + */ + + /** + * Shape of a CMsgHalloween_ServerBossEvent. + * @typedef {CMsgHalloween_ServerBossEvent.$Properties} CMsgHalloween_ServerBossEvent.$Shape */ /** * Constructs a new CMsgHalloween_ServerBossEvent. * @exports CMsgHalloween_ServerBossEvent * @classdesc Represents a CMsgHalloween_ServerBossEvent. - * @implements ICMsgHalloween_ServerBossEvent * @constructor - * @param {ICMsgHalloween_ServerBossEvent=} [properties] Properties to set + * @param {CMsgHalloween_ServerBossEvent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHalloween_ServerBossEvent(properties) { + var CMsgHalloween_ServerBossEvent = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHalloween_ServerBossEvent event_counter. @@ -31122,10 +40281,14 @@ * @function create * @memberof CMsgHalloween_ServerBossEvent * @static - * @param {ICMsgHalloween_ServerBossEvent=} [properties] Properties to set + * @param {CMsgHalloween_ServerBossEvent.$Properties=} [properties] Properties to set * @returns {CMsgHalloween_ServerBossEvent} CMsgHalloween_ServerBossEvent instance + * @type {{ + * (properties: CMsgHalloween_ServerBossEvent.$Shape): CMsgHalloween_ServerBossEvent & CMsgHalloween_ServerBossEvent.$Shape; + * (properties?: CMsgHalloween_ServerBossEvent.$Properties): CMsgHalloween_ServerBossEvent; + * }} */ - CMsgHalloween_ServerBossEvent.create = function create(properties) { + CMsgHalloween_ServerBossEvent.create = function(properties) { return new CMsgHalloween_ServerBossEvent(properties); }; @@ -31134,27 +40297,34 @@ * @function encode * @memberof CMsgHalloween_ServerBossEvent * @static - * @param {ICMsgHalloween_ServerBossEvent} message CMsgHalloween_ServerBossEvent message or plain object to encode + * @param {CMsgHalloween_ServerBossEvent.$Properties} message CMsgHalloween_ServerBossEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHalloween_ServerBossEvent.encode = function encode(message, writer) { + CMsgHalloween_ServerBossEvent.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.event_counter != null && Object.hasOwnProperty.call(message, "event_counter")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.event_counter != null && $Object.hasOwnProperty.call(message, "event_counter")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.event_counter); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + if (message.timestamp != null && $Object.hasOwnProperty.call(message, "timestamp")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.timestamp); - if (message.boss_type != null && Object.hasOwnProperty.call(message, "boss_type")) + if (message.boss_type != null && $Object.hasOwnProperty.call(message, "boss_type")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.boss_type); - if (message.boss_level != null && Object.hasOwnProperty.call(message, "boss_level")) + if (message.boss_level != null && $Object.hasOwnProperty.call(message, "boss_level")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.boss_level); - if (message.event_type != null && Object.hasOwnProperty.call(message, "event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.event_type); - if (message.players_involved != null && Object.hasOwnProperty.call(message, "players_involved")) + if (message.players_involved != null && $Object.hasOwnProperty.call(message, "players_involved")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.players_involved); - if (message.elapsed_time != null && Object.hasOwnProperty.call(message, "elapsed_time")) + if (message.elapsed_time != null && $Object.hasOwnProperty.call(message, "elapsed_time")) writer.uint32(/* id 7, wireType 5 =*/61).float(message.elapsed_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31163,12 +40333,12 @@ * @function encodeDelimited * @memberof CMsgHalloween_ServerBossEvent * @static - * @param {ICMsgHalloween_ServerBossEvent} message CMsgHalloween_ServerBossEvent message or plain object to encode + * @param {CMsgHalloween_ServerBossEvent.$Properties} message CMsgHalloween_ServerBossEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHalloween_ServerBossEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHalloween_ServerBossEvent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31178,43 +40348,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHalloween_ServerBossEvent} CMsgHalloween_ServerBossEvent + * @returns {CMsgHalloween_ServerBossEvent & CMsgHalloween_ServerBossEvent.$Shape} CMsgHalloween_ServerBossEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHalloween_ServerBossEvent.decode = function decode(reader, length) { + CMsgHalloween_ServerBossEvent.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHalloween_ServerBossEvent(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHalloween_ServerBossEvent(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.event_counter = reader.uint32(); - break; - case 2: - message.timestamp = reader.uint32(); - break; - case 3: - message.boss_type = reader.uint32(); - break; - case 4: - message.boss_level = reader.uint32(); - break; - case 5: - message.event_type = reader.uint32(); - break; - case 6: - message.players_involved = reader.uint32(); - break; - case 7: - message.elapsed_time = reader.float(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.event_counter = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.timestamp = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.boss_type = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.boss_level = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.event_type = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.players_involved = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.elapsed_time = reader.float(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31224,11 +40429,11 @@ * @memberof CMsgHalloween_ServerBossEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHalloween_ServerBossEvent} CMsgHalloween_ServerBossEvent + * @returns {CMsgHalloween_ServerBossEvent & CMsgHalloween_ServerBossEvent.$Shape} CMsgHalloween_ServerBossEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHalloween_ServerBossEvent.decodeDelimited = function decodeDelimited(reader) { + CMsgHalloween_ServerBossEvent.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31242,28 +40447,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHalloween_ServerBossEvent.verify = function verify(message) { + CMsgHalloween_ServerBossEvent.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.event_counter != null && message.hasOwnProperty("event_counter")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.event_counter != null && $Object.hasOwnProperty.call(message, "event_counter")) if (!$util.isInteger(message.event_counter)) return "event_counter: integer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && $Object.hasOwnProperty.call(message, "timestamp")) if (!$util.isInteger(message.timestamp)) return "timestamp: integer expected"; - if (message.boss_type != null && message.hasOwnProperty("boss_type")) + if (message.boss_type != null && $Object.hasOwnProperty.call(message, "boss_type")) if (!$util.isInteger(message.boss_type)) return "boss_type: integer expected"; - if (message.boss_level != null && message.hasOwnProperty("boss_level")) + if (message.boss_level != null && $Object.hasOwnProperty.call(message, "boss_level")) if (!$util.isInteger(message.boss_level)) return "boss_level: integer expected"; - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) if (!$util.isInteger(message.event_type)) return "event_type: integer expected"; - if (message.players_involved != null && message.hasOwnProperty("players_involved")) + if (message.players_involved != null && $Object.hasOwnProperty.call(message, "players_involved")) if (!$util.isInteger(message.players_involved)) return "players_involved: integer expected"; - if (message.elapsed_time != null && message.hasOwnProperty("elapsed_time")) + if (message.elapsed_time != null && $Object.hasOwnProperty.call(message, "elapsed_time")) if (typeof message.elapsed_time !== "number") return "elapsed_time: number expected"; return null; @@ -31277,9 +40486,15 @@ * @param {Object.} object Plain object * @returns {CMsgHalloween_ServerBossEvent} CMsgHalloween_ServerBossEvent */ - CMsgHalloween_ServerBossEvent.fromObject = function fromObject(object) { + CMsgHalloween_ServerBossEvent.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHalloween_ServerBossEvent) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHalloween_ServerBossEvent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHalloween_ServerBossEvent(); if (object.event_counter != null) message.event_counter = object.event_counter >>> 0; @@ -31294,7 +40509,7 @@ if (object.players_involved != null) message.players_involved = object.players_involved >>> 0; if (object.elapsed_time != null) - message.elapsed_time = Number(object.elapsed_time); + message.elapsed_time = $Number(object.elapsed_time); return message; }; @@ -31307,9 +40522,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHalloween_ServerBossEvent.toObject = function toObject(message, options) { + CMsgHalloween_ServerBossEvent.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.event_counter = 0; @@ -31320,20 +40539,20 @@ object.players_involved = 0; object.elapsed_time = 0; } - if (message.event_counter != null && message.hasOwnProperty("event_counter")) + if (message.event_counter != null && $Object.hasOwnProperty.call(message, "event_counter")) object.event_counter = message.event_counter; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && $Object.hasOwnProperty.call(message, "timestamp")) object.timestamp = message.timestamp; - if (message.boss_type != null && message.hasOwnProperty("boss_type")) + if (message.boss_type != null && $Object.hasOwnProperty.call(message, "boss_type")) object.boss_type = message.boss_type; - if (message.boss_level != null && message.hasOwnProperty("boss_level")) + if (message.boss_level != null && $Object.hasOwnProperty.call(message, "boss_level")) object.boss_level = message.boss_level; - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) object.event_type = message.event_type; - if (message.players_involved != null && message.hasOwnProperty("players_involved")) + if (message.players_involved != null && $Object.hasOwnProperty.call(message, "players_involved")) object.players_involved = message.players_involved; - if (message.elapsed_time != null && message.hasOwnProperty("elapsed_time")) - object.elapsed_time = options.json && !isFinite(message.elapsed_time) ? String(message.elapsed_time) : message.elapsed_time; + if (message.elapsed_time != null && $Object.hasOwnProperty.call(message, "elapsed_time")) + object.elapsed_time = options.json && !$isFinite(message.elapsed_time) ? $String(message.elapsed_time) : message.elapsed_time; return object; }; @@ -31344,8 +40563,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgHalloween_ServerBossEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHalloween_ServerBossEvent.prototype.toJSON = function() { + return CMsgHalloween_ServerBossEvent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHalloween_ServerBossEvent + * @function getTypeUrl + * @memberof CMsgHalloween_ServerBossEvent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHalloween_ServerBossEvent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHalloween_ServerBossEvent"; }; return CMsgHalloween_ServerBossEvent; @@ -31355,8 +40588,7 @@ /** * Properties of a CMsgHalloween_Merasmus2012. - * @exports ICMsgHalloween_Merasmus2012 - * @interface ICMsgHalloween_Merasmus2012 + * @typedef {Object} CMsgHalloween_Merasmus2012.$Properties * @property {number|null} [event_counter] CMsgHalloween_Merasmus2012 event_counter * @property {number|null} [time_submitted] CMsgHalloween_Merasmus2012 time_submitted * @property {boolean|null} [is_valve_server] CMsgHalloween_Merasmus2012 is_valve_server @@ -31387,22 +40619,36 @@ * @property {number|null} [pyro_count] CMsgHalloween_Merasmus2012 pyro_count * @property {number|null} [spy_count] CMsgHalloween_Merasmus2012 spy_count * @property {number|null} [engineer_count] CMsgHalloween_Merasmus2012 engineer_count + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHalloween_Merasmus2012. + * @exports ICMsgHalloween_Merasmus2012 + * @interface ICMsgHalloween_Merasmus2012 + * @augments CMsgHalloween_Merasmus2012.$Properties + * @deprecated Use CMsgHalloween_Merasmus2012.$Properties instead. + */ + + /** + * Shape of a CMsgHalloween_Merasmus2012. + * @typedef {CMsgHalloween_Merasmus2012.$Properties} CMsgHalloween_Merasmus2012.$Shape */ /** * Constructs a new CMsgHalloween_Merasmus2012. * @exports CMsgHalloween_Merasmus2012 * @classdesc Represents a CMsgHalloween_Merasmus2012. - * @implements ICMsgHalloween_Merasmus2012 * @constructor - * @param {ICMsgHalloween_Merasmus2012=} [properties] Properties to set + * @param {CMsgHalloween_Merasmus2012.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHalloween_Merasmus2012(properties) { + var CMsgHalloween_Merasmus2012 = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHalloween_Merasmus2012 event_counter. @@ -31649,10 +40895,14 @@ * @function create * @memberof CMsgHalloween_Merasmus2012 * @static - * @param {ICMsgHalloween_Merasmus2012=} [properties] Properties to set + * @param {CMsgHalloween_Merasmus2012.$Properties=} [properties] Properties to set * @returns {CMsgHalloween_Merasmus2012} CMsgHalloween_Merasmus2012 instance + * @type {{ + * (properties: CMsgHalloween_Merasmus2012.$Shape): CMsgHalloween_Merasmus2012 & CMsgHalloween_Merasmus2012.$Shape; + * (properties?: CMsgHalloween_Merasmus2012.$Properties): CMsgHalloween_Merasmus2012; + * }} */ - CMsgHalloween_Merasmus2012.create = function create(properties) { + CMsgHalloween_Merasmus2012.create = function(properties) { return new CMsgHalloween_Merasmus2012(properties); }; @@ -31661,73 +40911,80 @@ * @function encode * @memberof CMsgHalloween_Merasmus2012 * @static - * @param {ICMsgHalloween_Merasmus2012} message CMsgHalloween_Merasmus2012 message or plain object to encode + * @param {CMsgHalloween_Merasmus2012.$Properties} message CMsgHalloween_Merasmus2012 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHalloween_Merasmus2012.encode = function encode(message, writer) { + CMsgHalloween_Merasmus2012.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.event_counter != null && Object.hasOwnProperty.call(message, "event_counter")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.event_counter != null && $Object.hasOwnProperty.call(message, "event_counter")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.event_counter); - if (message.time_submitted != null && Object.hasOwnProperty.call(message, "time_submitted")) + if (message.time_submitted != null && $Object.hasOwnProperty.call(message, "time_submitted")) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.time_submitted); - if (message.is_valve_server != null && Object.hasOwnProperty.call(message, "is_valve_server")) + if (message.is_valve_server != null && $Object.hasOwnProperty.call(message, "is_valve_server")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_valve_server); - if (message.boss_level != null && Object.hasOwnProperty.call(message, "boss_level")) + if (message.boss_level != null && $Object.hasOwnProperty.call(message, "boss_level")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.boss_level); - if (message.spawned_health != null && Object.hasOwnProperty.call(message, "spawned_health")) + if (message.spawned_health != null && $Object.hasOwnProperty.call(message, "spawned_health")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.spawned_health); - if (message.remaining_health != null && Object.hasOwnProperty.call(message, "remaining_health")) + if (message.remaining_health != null && $Object.hasOwnProperty.call(message, "remaining_health")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.remaining_health); - if (message.life_time != null && Object.hasOwnProperty.call(message, "life_time")) + if (message.life_time != null && $Object.hasOwnProperty.call(message, "life_time")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.life_time); - if (message.bomb_kills != null && Object.hasOwnProperty.call(message, "bomb_kills")) + if (message.bomb_kills != null && $Object.hasOwnProperty.call(message, "bomb_kills")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.bomb_kills); - if (message.staff_kills != null && Object.hasOwnProperty.call(message, "staff_kills")) + if (message.staff_kills != null && $Object.hasOwnProperty.call(message, "staff_kills")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.staff_kills); - if (message.pvp_kills != null && Object.hasOwnProperty.call(message, "pvp_kills")) + if (message.pvp_kills != null && $Object.hasOwnProperty.call(message, "pvp_kills")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.pvp_kills); - if (message.prophunt_time1 != null && Object.hasOwnProperty.call(message, "prophunt_time1")) + if (message.prophunt_time1 != null && $Object.hasOwnProperty.call(message, "prophunt_time1")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.prophunt_time1); - if (message.prophunt_time2 != null && Object.hasOwnProperty.call(message, "prophunt_time2")) + if (message.prophunt_time2 != null && $Object.hasOwnProperty.call(message, "prophunt_time2")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.prophunt_time2); - if (message.dmg_scout != null && Object.hasOwnProperty.call(message, "dmg_scout")) + if (message.dmg_scout != null && $Object.hasOwnProperty.call(message, "dmg_scout")) writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.dmg_scout); - if (message.dmg_sniper != null && Object.hasOwnProperty.call(message, "dmg_sniper")) + if (message.dmg_sniper != null && $Object.hasOwnProperty.call(message, "dmg_sniper")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.dmg_sniper); - if (message.dmg_soldier != null && Object.hasOwnProperty.call(message, "dmg_soldier")) + if (message.dmg_soldier != null && $Object.hasOwnProperty.call(message, "dmg_soldier")) writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.dmg_soldier); - if (message.dmg_demo != null && Object.hasOwnProperty.call(message, "dmg_demo")) + if (message.dmg_demo != null && $Object.hasOwnProperty.call(message, "dmg_demo")) writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.dmg_demo); - if (message.dmg_medic != null && Object.hasOwnProperty.call(message, "dmg_medic")) + if (message.dmg_medic != null && $Object.hasOwnProperty.call(message, "dmg_medic")) writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.dmg_medic); - if (message.dmg_heavy != null && Object.hasOwnProperty.call(message, "dmg_heavy")) + if (message.dmg_heavy != null && $Object.hasOwnProperty.call(message, "dmg_heavy")) writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.dmg_heavy); - if (message.dmg_pyro != null && Object.hasOwnProperty.call(message, "dmg_pyro")) + if (message.dmg_pyro != null && $Object.hasOwnProperty.call(message, "dmg_pyro")) writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.dmg_pyro); - if (message.dmg_spy != null && Object.hasOwnProperty.call(message, "dmg_spy")) + if (message.dmg_spy != null && $Object.hasOwnProperty.call(message, "dmg_spy")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.dmg_spy); - if (message.dmg_engineer != null && Object.hasOwnProperty.call(message, "dmg_engineer")) + if (message.dmg_engineer != null && $Object.hasOwnProperty.call(message, "dmg_engineer")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.dmg_engineer); - if (message.scout_count != null && Object.hasOwnProperty.call(message, "scout_count")) + if (message.scout_count != null && $Object.hasOwnProperty.call(message, "scout_count")) writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.scout_count); - if (message.sniper_count != null && Object.hasOwnProperty.call(message, "sniper_count")) + if (message.sniper_count != null && $Object.hasOwnProperty.call(message, "sniper_count")) writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.sniper_count); - if (message.solider_count != null && Object.hasOwnProperty.call(message, "solider_count")) + if (message.solider_count != null && $Object.hasOwnProperty.call(message, "solider_count")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.solider_count); - if (message.demo_count != null && Object.hasOwnProperty.call(message, "demo_count")) + if (message.demo_count != null && $Object.hasOwnProperty.call(message, "demo_count")) writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.demo_count); - if (message.medic_count != null && Object.hasOwnProperty.call(message, "medic_count")) + if (message.medic_count != null && $Object.hasOwnProperty.call(message, "medic_count")) writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.medic_count); - if (message.heavy_count != null && Object.hasOwnProperty.call(message, "heavy_count")) + if (message.heavy_count != null && $Object.hasOwnProperty.call(message, "heavy_count")) writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.heavy_count); - if (message.pyro_count != null && Object.hasOwnProperty.call(message, "pyro_count")) + if (message.pyro_count != null && $Object.hasOwnProperty.call(message, "pyro_count")) writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.pyro_count); - if (message.spy_count != null && Object.hasOwnProperty.call(message, "spy_count")) + if (message.spy_count != null && $Object.hasOwnProperty.call(message, "spy_count")) writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.spy_count); - if (message.engineer_count != null && Object.hasOwnProperty.call(message, "engineer_count")) + if (message.engineer_count != null && $Object.hasOwnProperty.call(message, "engineer_count")) writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.engineer_count); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -31736,12 +40993,12 @@ * @function encodeDelimited * @memberof CMsgHalloween_Merasmus2012 * @static - * @param {ICMsgHalloween_Merasmus2012} message CMsgHalloween_Merasmus2012 message or plain object to encode + * @param {CMsgHalloween_Merasmus2012.$Properties} message CMsgHalloween_Merasmus2012 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHalloween_Merasmus2012.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHalloween_Merasmus2012.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -31751,112 +41008,216 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHalloween_Merasmus2012} CMsgHalloween_Merasmus2012 + * @returns {CMsgHalloween_Merasmus2012 & CMsgHalloween_Merasmus2012.$Shape} CMsgHalloween_Merasmus2012 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHalloween_Merasmus2012.decode = function decode(reader, length) { + CMsgHalloween_Merasmus2012.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHalloween_Merasmus2012(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHalloween_Merasmus2012(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.event_counter = reader.uint32(); - break; - case 2: - message.time_submitted = reader.fixed32(); - break; - case 3: - message.is_valve_server = reader.bool(); - break; - case 4: - message.boss_level = reader.uint32(); - break; - case 5: - message.spawned_health = reader.uint32(); - break; - case 6: - message.remaining_health = reader.uint32(); - break; - case 7: - message.life_time = reader.uint32(); - break; - case 8: - message.bomb_kills = reader.uint32(); - break; - case 9: - message.staff_kills = reader.uint32(); - break; - case 10: - message.pvp_kills = reader.uint32(); - break; - case 11: - message.prophunt_time1 = reader.uint32(); - break; - case 12: - message.prophunt_time2 = reader.uint32(); - break; - case 13: - message.dmg_scout = reader.uint32(); - break; - case 14: - message.dmg_sniper = reader.uint32(); - break; - case 15: - message.dmg_soldier = reader.uint32(); - break; - case 16: - message.dmg_demo = reader.uint32(); - break; - case 17: - message.dmg_medic = reader.uint32(); - break; - case 18: - message.dmg_heavy = reader.uint32(); - break; - case 19: - message.dmg_pyro = reader.uint32(); - break; - case 20: - message.dmg_spy = reader.uint32(); - break; - case 21: - message.dmg_engineer = reader.uint32(); - break; - case 22: - message.scout_count = reader.uint32(); - break; - case 23: - message.sniper_count = reader.uint32(); - break; - case 24: - message.solider_count = reader.uint32(); - break; - case 25: - message.demo_count = reader.uint32(); - break; - case 26: - message.medic_count = reader.uint32(); - break; - case 27: - message.heavy_count = reader.uint32(); - break; - case 28: - message.pyro_count = reader.uint32(); - break; - case 29: - message.spy_count = reader.uint32(); - break; - case 30: - message.engineer_count = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.event_counter = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.time_submitted = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_valve_server = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.boss_level = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.spawned_health = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.remaining_health = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.life_time = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.bomb_kills = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.staff_kills = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.pvp_kills = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.prophunt_time1 = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.prophunt_time2 = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.dmg_scout = reader.uint32(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.dmg_sniper = reader.uint32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.dmg_soldier = reader.uint32(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.dmg_demo = reader.uint32(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.dmg_medic = reader.uint32(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.dmg_heavy = reader.uint32(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.dmg_pyro = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.dmg_spy = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.dmg_engineer = reader.uint32(); + continue; + } + case 22: { + if (wireType !== 0) + break; + message.scout_count = reader.uint32(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.sniper_count = reader.uint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.solider_count = reader.uint32(); + continue; + } + case 25: { + if (wireType !== 0) + break; + message.demo_count = reader.uint32(); + continue; + } + case 26: { + if (wireType !== 0) + break; + message.medic_count = reader.uint32(); + continue; + } + case 27: { + if (wireType !== 0) + break; + message.heavy_count = reader.uint32(); + continue; + } + case 28: { + if (wireType !== 0) + break; + message.pyro_count = reader.uint32(); + continue; + } + case 29: { + if (wireType !== 0) + break; + message.spy_count = reader.uint32(); + continue; + } + case 30: { + if (wireType !== 0) + break; + message.engineer_count = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -31866,11 +41227,11 @@ * @memberof CMsgHalloween_Merasmus2012 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHalloween_Merasmus2012} CMsgHalloween_Merasmus2012 + * @returns {CMsgHalloween_Merasmus2012 & CMsgHalloween_Merasmus2012.$Shape} CMsgHalloween_Merasmus2012 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHalloween_Merasmus2012.decodeDelimited = function decodeDelimited(reader) { + CMsgHalloween_Merasmus2012.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -31884,97 +41245,101 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHalloween_Merasmus2012.verify = function verify(message) { + CMsgHalloween_Merasmus2012.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.event_counter != null && message.hasOwnProperty("event_counter")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.event_counter != null && $Object.hasOwnProperty.call(message, "event_counter")) if (!$util.isInteger(message.event_counter)) return "event_counter: integer expected"; - if (message.time_submitted != null && message.hasOwnProperty("time_submitted")) + if (message.time_submitted != null && $Object.hasOwnProperty.call(message, "time_submitted")) if (!$util.isInteger(message.time_submitted)) return "time_submitted: integer expected"; - if (message.is_valve_server != null && message.hasOwnProperty("is_valve_server")) + if (message.is_valve_server != null && $Object.hasOwnProperty.call(message, "is_valve_server")) if (typeof message.is_valve_server !== "boolean") return "is_valve_server: boolean expected"; - if (message.boss_level != null && message.hasOwnProperty("boss_level")) + if (message.boss_level != null && $Object.hasOwnProperty.call(message, "boss_level")) if (!$util.isInteger(message.boss_level)) return "boss_level: integer expected"; - if (message.spawned_health != null && message.hasOwnProperty("spawned_health")) + if (message.spawned_health != null && $Object.hasOwnProperty.call(message, "spawned_health")) if (!$util.isInteger(message.spawned_health)) return "spawned_health: integer expected"; - if (message.remaining_health != null && message.hasOwnProperty("remaining_health")) + if (message.remaining_health != null && $Object.hasOwnProperty.call(message, "remaining_health")) if (!$util.isInteger(message.remaining_health)) return "remaining_health: integer expected"; - if (message.life_time != null && message.hasOwnProperty("life_time")) + if (message.life_time != null && $Object.hasOwnProperty.call(message, "life_time")) if (!$util.isInteger(message.life_time)) return "life_time: integer expected"; - if (message.bomb_kills != null && message.hasOwnProperty("bomb_kills")) + if (message.bomb_kills != null && $Object.hasOwnProperty.call(message, "bomb_kills")) if (!$util.isInteger(message.bomb_kills)) return "bomb_kills: integer expected"; - if (message.staff_kills != null && message.hasOwnProperty("staff_kills")) + if (message.staff_kills != null && $Object.hasOwnProperty.call(message, "staff_kills")) if (!$util.isInteger(message.staff_kills)) return "staff_kills: integer expected"; - if (message.pvp_kills != null && message.hasOwnProperty("pvp_kills")) + if (message.pvp_kills != null && $Object.hasOwnProperty.call(message, "pvp_kills")) if (!$util.isInteger(message.pvp_kills)) return "pvp_kills: integer expected"; - if (message.prophunt_time1 != null && message.hasOwnProperty("prophunt_time1")) + if (message.prophunt_time1 != null && $Object.hasOwnProperty.call(message, "prophunt_time1")) if (!$util.isInteger(message.prophunt_time1)) return "prophunt_time1: integer expected"; - if (message.prophunt_time2 != null && message.hasOwnProperty("prophunt_time2")) + if (message.prophunt_time2 != null && $Object.hasOwnProperty.call(message, "prophunt_time2")) if (!$util.isInteger(message.prophunt_time2)) return "prophunt_time2: integer expected"; - if (message.dmg_scout != null && message.hasOwnProperty("dmg_scout")) + if (message.dmg_scout != null && $Object.hasOwnProperty.call(message, "dmg_scout")) if (!$util.isInteger(message.dmg_scout)) return "dmg_scout: integer expected"; - if (message.dmg_sniper != null && message.hasOwnProperty("dmg_sniper")) + if (message.dmg_sniper != null && $Object.hasOwnProperty.call(message, "dmg_sniper")) if (!$util.isInteger(message.dmg_sniper)) return "dmg_sniper: integer expected"; - if (message.dmg_soldier != null && message.hasOwnProperty("dmg_soldier")) + if (message.dmg_soldier != null && $Object.hasOwnProperty.call(message, "dmg_soldier")) if (!$util.isInteger(message.dmg_soldier)) return "dmg_soldier: integer expected"; - if (message.dmg_demo != null && message.hasOwnProperty("dmg_demo")) + if (message.dmg_demo != null && $Object.hasOwnProperty.call(message, "dmg_demo")) if (!$util.isInteger(message.dmg_demo)) return "dmg_demo: integer expected"; - if (message.dmg_medic != null && message.hasOwnProperty("dmg_medic")) + if (message.dmg_medic != null && $Object.hasOwnProperty.call(message, "dmg_medic")) if (!$util.isInteger(message.dmg_medic)) return "dmg_medic: integer expected"; - if (message.dmg_heavy != null && message.hasOwnProperty("dmg_heavy")) + if (message.dmg_heavy != null && $Object.hasOwnProperty.call(message, "dmg_heavy")) if (!$util.isInteger(message.dmg_heavy)) return "dmg_heavy: integer expected"; - if (message.dmg_pyro != null && message.hasOwnProperty("dmg_pyro")) + if (message.dmg_pyro != null && $Object.hasOwnProperty.call(message, "dmg_pyro")) if (!$util.isInteger(message.dmg_pyro)) return "dmg_pyro: integer expected"; - if (message.dmg_spy != null && message.hasOwnProperty("dmg_spy")) + if (message.dmg_spy != null && $Object.hasOwnProperty.call(message, "dmg_spy")) if (!$util.isInteger(message.dmg_spy)) return "dmg_spy: integer expected"; - if (message.dmg_engineer != null && message.hasOwnProperty("dmg_engineer")) + if (message.dmg_engineer != null && $Object.hasOwnProperty.call(message, "dmg_engineer")) if (!$util.isInteger(message.dmg_engineer)) return "dmg_engineer: integer expected"; - if (message.scout_count != null && message.hasOwnProperty("scout_count")) + if (message.scout_count != null && $Object.hasOwnProperty.call(message, "scout_count")) if (!$util.isInteger(message.scout_count)) return "scout_count: integer expected"; - if (message.sniper_count != null && message.hasOwnProperty("sniper_count")) + if (message.sniper_count != null && $Object.hasOwnProperty.call(message, "sniper_count")) if (!$util.isInteger(message.sniper_count)) return "sniper_count: integer expected"; - if (message.solider_count != null && message.hasOwnProperty("solider_count")) + if (message.solider_count != null && $Object.hasOwnProperty.call(message, "solider_count")) if (!$util.isInteger(message.solider_count)) return "solider_count: integer expected"; - if (message.demo_count != null && message.hasOwnProperty("demo_count")) + if (message.demo_count != null && $Object.hasOwnProperty.call(message, "demo_count")) if (!$util.isInteger(message.demo_count)) return "demo_count: integer expected"; - if (message.medic_count != null && message.hasOwnProperty("medic_count")) + if (message.medic_count != null && $Object.hasOwnProperty.call(message, "medic_count")) if (!$util.isInteger(message.medic_count)) return "medic_count: integer expected"; - if (message.heavy_count != null && message.hasOwnProperty("heavy_count")) + if (message.heavy_count != null && $Object.hasOwnProperty.call(message, "heavy_count")) if (!$util.isInteger(message.heavy_count)) return "heavy_count: integer expected"; - if (message.pyro_count != null && message.hasOwnProperty("pyro_count")) + if (message.pyro_count != null && $Object.hasOwnProperty.call(message, "pyro_count")) if (!$util.isInteger(message.pyro_count)) return "pyro_count: integer expected"; - if (message.spy_count != null && message.hasOwnProperty("spy_count")) + if (message.spy_count != null && $Object.hasOwnProperty.call(message, "spy_count")) if (!$util.isInteger(message.spy_count)) return "spy_count: integer expected"; - if (message.engineer_count != null && message.hasOwnProperty("engineer_count")) + if (message.engineer_count != null && $Object.hasOwnProperty.call(message, "engineer_count")) if (!$util.isInteger(message.engineer_count)) return "engineer_count: integer expected"; return null; @@ -31988,16 +41353,22 @@ * @param {Object.} object Plain object * @returns {CMsgHalloween_Merasmus2012} CMsgHalloween_Merasmus2012 */ - CMsgHalloween_Merasmus2012.fromObject = function fromObject(object) { + CMsgHalloween_Merasmus2012.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHalloween_Merasmus2012) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHalloween_Merasmus2012: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHalloween_Merasmus2012(); if (object.event_counter != null) message.event_counter = object.event_counter >>> 0; if (object.time_submitted != null) message.time_submitted = object.time_submitted >>> 0; if (object.is_valve_server != null) - message.is_valve_server = Boolean(object.is_valve_server); + message.is_valve_server = $Boolean(object.is_valve_server); if (object.boss_level != null) message.boss_level = object.boss_level >>> 0; if (object.spawned_health != null) @@ -32064,9 +41435,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHalloween_Merasmus2012.toObject = function toObject(message, options) { + CMsgHalloween_Merasmus2012.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.event_counter = 0; @@ -32100,65 +41475,65 @@ object.spy_count = 0; object.engineer_count = 0; } - if (message.event_counter != null && message.hasOwnProperty("event_counter")) + if (message.event_counter != null && $Object.hasOwnProperty.call(message, "event_counter")) object.event_counter = message.event_counter; - if (message.time_submitted != null && message.hasOwnProperty("time_submitted")) + if (message.time_submitted != null && $Object.hasOwnProperty.call(message, "time_submitted")) object.time_submitted = message.time_submitted; - if (message.is_valve_server != null && message.hasOwnProperty("is_valve_server")) + if (message.is_valve_server != null && $Object.hasOwnProperty.call(message, "is_valve_server")) object.is_valve_server = message.is_valve_server; - if (message.boss_level != null && message.hasOwnProperty("boss_level")) + if (message.boss_level != null && $Object.hasOwnProperty.call(message, "boss_level")) object.boss_level = message.boss_level; - if (message.spawned_health != null && message.hasOwnProperty("spawned_health")) + if (message.spawned_health != null && $Object.hasOwnProperty.call(message, "spawned_health")) object.spawned_health = message.spawned_health; - if (message.remaining_health != null && message.hasOwnProperty("remaining_health")) + if (message.remaining_health != null && $Object.hasOwnProperty.call(message, "remaining_health")) object.remaining_health = message.remaining_health; - if (message.life_time != null && message.hasOwnProperty("life_time")) + if (message.life_time != null && $Object.hasOwnProperty.call(message, "life_time")) object.life_time = message.life_time; - if (message.bomb_kills != null && message.hasOwnProperty("bomb_kills")) + if (message.bomb_kills != null && $Object.hasOwnProperty.call(message, "bomb_kills")) object.bomb_kills = message.bomb_kills; - if (message.staff_kills != null && message.hasOwnProperty("staff_kills")) + if (message.staff_kills != null && $Object.hasOwnProperty.call(message, "staff_kills")) object.staff_kills = message.staff_kills; - if (message.pvp_kills != null && message.hasOwnProperty("pvp_kills")) + if (message.pvp_kills != null && $Object.hasOwnProperty.call(message, "pvp_kills")) object.pvp_kills = message.pvp_kills; - if (message.prophunt_time1 != null && message.hasOwnProperty("prophunt_time1")) + if (message.prophunt_time1 != null && $Object.hasOwnProperty.call(message, "prophunt_time1")) object.prophunt_time1 = message.prophunt_time1; - if (message.prophunt_time2 != null && message.hasOwnProperty("prophunt_time2")) + if (message.prophunt_time2 != null && $Object.hasOwnProperty.call(message, "prophunt_time2")) object.prophunt_time2 = message.prophunt_time2; - if (message.dmg_scout != null && message.hasOwnProperty("dmg_scout")) + if (message.dmg_scout != null && $Object.hasOwnProperty.call(message, "dmg_scout")) object.dmg_scout = message.dmg_scout; - if (message.dmg_sniper != null && message.hasOwnProperty("dmg_sniper")) + if (message.dmg_sniper != null && $Object.hasOwnProperty.call(message, "dmg_sniper")) object.dmg_sniper = message.dmg_sniper; - if (message.dmg_soldier != null && message.hasOwnProperty("dmg_soldier")) + if (message.dmg_soldier != null && $Object.hasOwnProperty.call(message, "dmg_soldier")) object.dmg_soldier = message.dmg_soldier; - if (message.dmg_demo != null && message.hasOwnProperty("dmg_demo")) + if (message.dmg_demo != null && $Object.hasOwnProperty.call(message, "dmg_demo")) object.dmg_demo = message.dmg_demo; - if (message.dmg_medic != null && message.hasOwnProperty("dmg_medic")) + if (message.dmg_medic != null && $Object.hasOwnProperty.call(message, "dmg_medic")) object.dmg_medic = message.dmg_medic; - if (message.dmg_heavy != null && message.hasOwnProperty("dmg_heavy")) + if (message.dmg_heavy != null && $Object.hasOwnProperty.call(message, "dmg_heavy")) object.dmg_heavy = message.dmg_heavy; - if (message.dmg_pyro != null && message.hasOwnProperty("dmg_pyro")) + if (message.dmg_pyro != null && $Object.hasOwnProperty.call(message, "dmg_pyro")) object.dmg_pyro = message.dmg_pyro; - if (message.dmg_spy != null && message.hasOwnProperty("dmg_spy")) + if (message.dmg_spy != null && $Object.hasOwnProperty.call(message, "dmg_spy")) object.dmg_spy = message.dmg_spy; - if (message.dmg_engineer != null && message.hasOwnProperty("dmg_engineer")) + if (message.dmg_engineer != null && $Object.hasOwnProperty.call(message, "dmg_engineer")) object.dmg_engineer = message.dmg_engineer; - if (message.scout_count != null && message.hasOwnProperty("scout_count")) + if (message.scout_count != null && $Object.hasOwnProperty.call(message, "scout_count")) object.scout_count = message.scout_count; - if (message.sniper_count != null && message.hasOwnProperty("sniper_count")) + if (message.sniper_count != null && $Object.hasOwnProperty.call(message, "sniper_count")) object.sniper_count = message.sniper_count; - if (message.solider_count != null && message.hasOwnProperty("solider_count")) + if (message.solider_count != null && $Object.hasOwnProperty.call(message, "solider_count")) object.solider_count = message.solider_count; - if (message.demo_count != null && message.hasOwnProperty("demo_count")) + if (message.demo_count != null && $Object.hasOwnProperty.call(message, "demo_count")) object.demo_count = message.demo_count; - if (message.medic_count != null && message.hasOwnProperty("medic_count")) + if (message.medic_count != null && $Object.hasOwnProperty.call(message, "medic_count")) object.medic_count = message.medic_count; - if (message.heavy_count != null && message.hasOwnProperty("heavy_count")) + if (message.heavy_count != null && $Object.hasOwnProperty.call(message, "heavy_count")) object.heavy_count = message.heavy_count; - if (message.pyro_count != null && message.hasOwnProperty("pyro_count")) + if (message.pyro_count != null && $Object.hasOwnProperty.call(message, "pyro_count")) object.pyro_count = message.pyro_count; - if (message.spy_count != null && message.hasOwnProperty("spy_count")) + if (message.spy_count != null && $Object.hasOwnProperty.call(message, "spy_count")) object.spy_count = message.spy_count; - if (message.engineer_count != null && message.hasOwnProperty("engineer_count")) + if (message.engineer_count != null && $Object.hasOwnProperty.call(message, "engineer_count")) object.engineer_count = message.engineer_count; return object; }; @@ -32170,8 +41545,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgHalloween_Merasmus2012.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHalloween_Merasmus2012.prototype.toJSON = function() { + return CMsgHalloween_Merasmus2012.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHalloween_Merasmus2012 + * @function getTypeUrl + * @memberof CMsgHalloween_Merasmus2012 + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHalloween_Merasmus2012.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHalloween_Merasmus2012"; }; return CMsgHalloween_Merasmus2012; @@ -32179,33 +41568,46 @@ $root.CMsgUpdateHalloweenMerasmusLootLevel = (function() { + /** + * Properties of a CMsgUpdateHalloweenMerasmusLootLevel. + * @typedef {Object} CMsgUpdateHalloweenMerasmusLootLevel.$Properties + * @property {Array.|null} [players] CMsgUpdateHalloweenMerasmusLootLevel players + * @property {number|null} [merasmus_level] CMsgUpdateHalloweenMerasmusLootLevel merasmus_level + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgUpdateHalloweenMerasmusLootLevel. * @exports ICMsgUpdateHalloweenMerasmusLootLevel * @interface ICMsgUpdateHalloweenMerasmusLootLevel - * @property {Array.|null} [players] CMsgUpdateHalloweenMerasmusLootLevel players - * @property {number|null} [merasmus_level] CMsgUpdateHalloweenMerasmusLootLevel merasmus_level + * @augments CMsgUpdateHalloweenMerasmusLootLevel.$Properties + * @deprecated Use CMsgUpdateHalloweenMerasmusLootLevel.$Properties instead. + */ + + /** + * Shape of a CMsgUpdateHalloweenMerasmusLootLevel. + * @typedef {CMsgUpdateHalloweenMerasmusLootLevel.$Properties} CMsgUpdateHalloweenMerasmusLootLevel.$Shape */ /** * Constructs a new CMsgUpdateHalloweenMerasmusLootLevel. * @exports CMsgUpdateHalloweenMerasmusLootLevel * @classdesc Represents a CMsgUpdateHalloweenMerasmusLootLevel. - * @implements ICMsgUpdateHalloweenMerasmusLootLevel * @constructor - * @param {ICMsgUpdateHalloweenMerasmusLootLevel=} [properties] Properties to set + * @param {CMsgUpdateHalloweenMerasmusLootLevel.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgUpdateHalloweenMerasmusLootLevel(properties) { + var CMsgUpdateHalloweenMerasmusLootLevel = function (properties) { this.players = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgUpdateHalloweenMerasmusLootLevel players. - * @member {Array.} players + * @member {Array.} players * @memberof CMsgUpdateHalloweenMerasmusLootLevel * @instance */ @@ -32224,10 +41626,14 @@ * @function create * @memberof CMsgUpdateHalloweenMerasmusLootLevel * @static - * @param {ICMsgUpdateHalloweenMerasmusLootLevel=} [properties] Properties to set + * @param {CMsgUpdateHalloweenMerasmusLootLevel.$Properties=} [properties] Properties to set * @returns {CMsgUpdateHalloweenMerasmusLootLevel} CMsgUpdateHalloweenMerasmusLootLevel instance + * @type {{ + * (properties: CMsgUpdateHalloweenMerasmusLootLevel.$Shape): CMsgUpdateHalloweenMerasmusLootLevel & CMsgUpdateHalloweenMerasmusLootLevel.$Shape; + * (properties?: CMsgUpdateHalloweenMerasmusLootLevel.$Properties): CMsgUpdateHalloweenMerasmusLootLevel; + * }} */ - CMsgUpdateHalloweenMerasmusLootLevel.create = function create(properties) { + CMsgUpdateHalloweenMerasmusLootLevel.create = function(properties) { return new CMsgUpdateHalloweenMerasmusLootLevel(properties); }; @@ -32236,18 +41642,25 @@ * @function encode * @memberof CMsgUpdateHalloweenMerasmusLootLevel * @static - * @param {ICMsgUpdateHalloweenMerasmusLootLevel} message CMsgUpdateHalloweenMerasmusLootLevel message or plain object to encode + * @param {CMsgUpdateHalloweenMerasmusLootLevel.$Properties} message CMsgUpdateHalloweenMerasmusLootLevel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdateHalloweenMerasmusLootLevel.encode = function encode(message, writer) { + CMsgUpdateHalloweenMerasmusLootLevel.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.players != null && message.players.length) for (var i = 0; i < message.players.length; ++i) - $root.CMsgUpdateHalloweenMerasmusLootLevel.Player.encode(message.players[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.merasmus_level != null && Object.hasOwnProperty.call(message, "merasmus_level")) + $root.CMsgUpdateHalloweenMerasmusLootLevel.Player.encode(message.players[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.merasmus_level != null && $Object.hasOwnProperty.call(message, "merasmus_level")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.merasmus_level); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32256,12 +41669,12 @@ * @function encodeDelimited * @memberof CMsgUpdateHalloweenMerasmusLootLevel * @static - * @param {ICMsgUpdateHalloweenMerasmusLootLevel} message CMsgUpdateHalloweenMerasmusLootLevel message or plain object to encode + * @param {CMsgUpdateHalloweenMerasmusLootLevel.$Properties} message CMsgUpdateHalloweenMerasmusLootLevel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdateHalloweenMerasmusLootLevel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgUpdateHalloweenMerasmusLootLevel.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32271,30 +41684,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgUpdateHalloweenMerasmusLootLevel} CMsgUpdateHalloweenMerasmusLootLevel + * @returns {CMsgUpdateHalloweenMerasmusLootLevel & CMsgUpdateHalloweenMerasmusLootLevel.$Shape} CMsgUpdateHalloweenMerasmusLootLevel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdateHalloweenMerasmusLootLevel.decode = function decode(reader, length) { + CMsgUpdateHalloweenMerasmusLootLevel.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgUpdateHalloweenMerasmusLootLevel(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgUpdateHalloweenMerasmusLootLevel(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.players && message.players.length)) - message.players = []; - message.players.push($root.CMsgUpdateHalloweenMerasmusLootLevel.Player.decode(reader, reader.uint32())); - break; - case 2: - message.merasmus_level = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.players && message.players.length)) + message.players = []; + message.players.push($root.CMsgUpdateHalloweenMerasmusLootLevel.Player.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.merasmus_level = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32304,11 +41737,11 @@ * @memberof CMsgUpdateHalloweenMerasmusLootLevel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgUpdateHalloweenMerasmusLootLevel} CMsgUpdateHalloweenMerasmusLootLevel + * @returns {CMsgUpdateHalloweenMerasmusLootLevel & CMsgUpdateHalloweenMerasmusLootLevel.$Shape} CMsgUpdateHalloweenMerasmusLootLevel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdateHalloweenMerasmusLootLevel.decodeDelimited = function decodeDelimited(reader) { + CMsgUpdateHalloweenMerasmusLootLevel.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32322,19 +41755,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgUpdateHalloweenMerasmusLootLevel.verify = function verify(message) { + CMsgUpdateHalloweenMerasmusLootLevel.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.players != null && message.hasOwnProperty("players")) { - if (!Array.isArray(message.players)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.players != null && $Object.hasOwnProperty.call(message, "players")) { + if (!$Array.isArray(message.players)) return "players: array expected"; for (var i = 0; i < message.players.length; ++i) { - var error = $root.CMsgUpdateHalloweenMerasmusLootLevel.Player.verify(message.players[i]); + var error = $root.CMsgUpdateHalloweenMerasmusLootLevel.Player.verify(message.players[i], _depth + 1); if (error) return "players." + error; } } - if (message.merasmus_level != null && message.hasOwnProperty("merasmus_level")) + if (message.merasmus_level != null && $Object.hasOwnProperty.call(message, "merasmus_level")) if (!$util.isInteger(message.merasmus_level)) return "merasmus_level: integer expected"; return null; @@ -32348,18 +41785,24 @@ * @param {Object.} object Plain object * @returns {CMsgUpdateHalloweenMerasmusLootLevel} CMsgUpdateHalloweenMerasmusLootLevel */ - CMsgUpdateHalloweenMerasmusLootLevel.fromObject = function fromObject(object) { + CMsgUpdateHalloweenMerasmusLootLevel.fromObject = function (object, _depth) { if (object instanceof $root.CMsgUpdateHalloweenMerasmusLootLevel) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgUpdateHalloweenMerasmusLootLevel: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgUpdateHalloweenMerasmusLootLevel(); if (object.players) { - if (!Array.isArray(object.players)) - throw TypeError(".CMsgUpdateHalloweenMerasmusLootLevel.players: array expected"); - message.players = []; + if (!$Array.isArray(object.players)) + throw $TypeError(".CMsgUpdateHalloweenMerasmusLootLevel.players: array expected"); + message.players = $Array(object.players.length); for (var i = 0; i < object.players.length; ++i) { - if (typeof object.players[i] !== "object") - throw TypeError(".CMsgUpdateHalloweenMerasmusLootLevel.players: object expected"); - message.players[i] = $root.CMsgUpdateHalloweenMerasmusLootLevel.Player.fromObject(object.players[i]); + if (!$util.isObject(object.players[i])) + throw $TypeError(".CMsgUpdateHalloweenMerasmusLootLevel.players: object expected"); + message.players[i] = $root.CMsgUpdateHalloweenMerasmusLootLevel.Player.fromObject(object.players[i], _depth + 1); } } if (object.merasmus_level != null) @@ -32376,20 +41819,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgUpdateHalloweenMerasmusLootLevel.toObject = function toObject(message, options) { + CMsgUpdateHalloweenMerasmusLootLevel.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.players = []; if (options.defaults) object.merasmus_level = 0; if (message.players && message.players.length) { - object.players = []; + object.players = $Array(message.players.length); for (var j = 0; j < message.players.length; ++j) - object.players[j] = $root.CMsgUpdateHalloweenMerasmusLootLevel.Player.toObject(message.players[j], options); + object.players[j] = $root.CMsgUpdateHalloweenMerasmusLootLevel.Player.toObject(message.players[j], options, _depth + 1); } - if (message.merasmus_level != null && message.hasOwnProperty("merasmus_level")) + if (message.merasmus_level != null && $Object.hasOwnProperty.call(message, "merasmus_level")) object.merasmus_level = message.merasmus_level; return object; }; @@ -32401,33 +41848,60 @@ * @instance * @returns {Object.} JSON object */ - CMsgUpdateHalloweenMerasmusLootLevel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgUpdateHalloweenMerasmusLootLevel.prototype.toJSON = function() { + return CMsgUpdateHalloweenMerasmusLootLevel.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgUpdateHalloweenMerasmusLootLevel + * @function getTypeUrl + * @memberof CMsgUpdateHalloweenMerasmusLootLevel + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgUpdateHalloweenMerasmusLootLevel.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgUpdateHalloweenMerasmusLootLevel"; }; CMsgUpdateHalloweenMerasmusLootLevel.Player = (function() { + /** + * Properties of a Player. + * @typedef {Object} CMsgUpdateHalloweenMerasmusLootLevel.Player.$Properties + * @property {number|Long|null} [steam_id] Player steam_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a Player. * @memberof CMsgUpdateHalloweenMerasmusLootLevel * @interface IPlayer - * @property {number|Long|null} [steam_id] Player steam_id + * @augments CMsgUpdateHalloweenMerasmusLootLevel.Player.$Properties + * @deprecated Use CMsgUpdateHalloweenMerasmusLootLevel.Player.$Properties instead. + */ + + /** + * Shape of a Player. + * @typedef {CMsgUpdateHalloweenMerasmusLootLevel.Player.$Properties} CMsgUpdateHalloweenMerasmusLootLevel.Player.$Shape */ /** * Constructs a new Player. * @memberof CMsgUpdateHalloweenMerasmusLootLevel * @classdesc Represents a Player. - * @implements IPlayer * @constructor - * @param {CMsgUpdateHalloweenMerasmusLootLevel.IPlayer=} [properties] Properties to set + * @param {CMsgUpdateHalloweenMerasmusLootLevel.Player.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Player(properties) { + var Player = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Player steam_id. @@ -32435,17 +41909,21 @@ * @memberof CMsgUpdateHalloweenMerasmusLootLevel.Player * @instance */ - Player.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Player.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new Player instance using the specified properties. * @function create * @memberof CMsgUpdateHalloweenMerasmusLootLevel.Player * @static - * @param {CMsgUpdateHalloweenMerasmusLootLevel.IPlayer=} [properties] Properties to set + * @param {CMsgUpdateHalloweenMerasmusLootLevel.Player.$Properties=} [properties] Properties to set * @returns {CMsgUpdateHalloweenMerasmusLootLevel.Player} Player instance + * @type {{ + * (properties: CMsgUpdateHalloweenMerasmusLootLevel.Player.$Shape): CMsgUpdateHalloweenMerasmusLootLevel.Player & CMsgUpdateHalloweenMerasmusLootLevel.Player.$Shape; + * (properties?: CMsgUpdateHalloweenMerasmusLootLevel.Player.$Properties): CMsgUpdateHalloweenMerasmusLootLevel.Player; + * }} */ - Player.create = function create(properties) { + Player.create = function(properties) { return new Player(properties); }; @@ -32454,15 +41932,22 @@ * @function encode * @memberof CMsgUpdateHalloweenMerasmusLootLevel.Player * @static - * @param {CMsgUpdateHalloweenMerasmusLootLevel.IPlayer} message Player message or plain object to encode + * @param {CMsgUpdateHalloweenMerasmusLootLevel.Player.$Properties} message Player message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Player.encode = function encode(message, writer) { + Player.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32471,12 +41956,12 @@ * @function encodeDelimited * @memberof CMsgUpdateHalloweenMerasmusLootLevel.Player * @static - * @param {CMsgUpdateHalloweenMerasmusLootLevel.IPlayer} message Player message or plain object to encode + * @param {CMsgUpdateHalloweenMerasmusLootLevel.Player.$Properties} message Player message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Player.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Player.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32486,25 +41971,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgUpdateHalloweenMerasmusLootLevel.Player} Player + * @returns {CMsgUpdateHalloweenMerasmusLootLevel.Player & CMsgUpdateHalloweenMerasmusLootLevel.Player.$Shape} Player * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Player.decode = function decode(reader, length) { + Player.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgUpdateHalloweenMerasmusLootLevel.Player(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgUpdateHalloweenMerasmusLootLevel.Player(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32514,11 +42016,11 @@ * @memberof CMsgUpdateHalloweenMerasmusLootLevel.Player * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgUpdateHalloweenMerasmusLootLevel.Player} Player + * @returns {CMsgUpdateHalloweenMerasmusLootLevel.Player & CMsgUpdateHalloweenMerasmusLootLevel.Player.$Shape} Player * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Player.decodeDelimited = function decodeDelimited(reader) { + Player.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32532,10 +42034,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Player.verify = function verify(message) { + Player.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; return null; @@ -32549,19 +42055,25 @@ * @param {Object.} object Plain object * @returns {CMsgUpdateHalloweenMerasmusLootLevel.Player} Player */ - Player.fromObject = function fromObject(object) { + Player.fromObject = function (object, _depth) { if (object instanceof $root.CMsgUpdateHalloweenMerasmusLootLevel.Player) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgUpdateHalloweenMerasmusLootLevel.Player: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgUpdateHalloweenMerasmusLootLevel.Player(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); return message; }; @@ -32574,21 +42086,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Player.toObject = function toObject(message, options) { + Player.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; return object; }; @@ -32599,8 +42117,22 @@ * @instance * @returns {Object.} JSON object */ - Player.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Player.prototype.toJSON = function() { + return Player.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Player + * @function getTypeUrl + * @memberof CMsgUpdateHalloweenMerasmusLootLevel.Player + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Player.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgUpdateHalloweenMerasmusLootLevel.Player"; }; return Player; @@ -32611,27 +42143,40 @@ $root.CAttribute_String = (function() { + /** + * Properties of a CAttribute_String. + * @typedef {Object} CAttribute_String.$Properties + * @property {string|null} [value] CAttribute_String value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CAttribute_String. * @exports ICAttribute_String * @interface ICAttribute_String - * @property {string|null} [value] CAttribute_String value + * @augments CAttribute_String.$Properties + * @deprecated Use CAttribute_String.$Properties instead. + */ + + /** + * Shape of a CAttribute_String. + * @typedef {CAttribute_String.$Properties} CAttribute_String.$Shape */ /** * Constructs a new CAttribute_String. * @exports CAttribute_String * @classdesc Represents a CAttribute_String. - * @implements ICAttribute_String * @constructor - * @param {ICAttribute_String=} [properties] Properties to set + * @param {CAttribute_String.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CAttribute_String(properties) { + var CAttribute_String = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CAttribute_String value. @@ -32646,10 +42191,14 @@ * @function create * @memberof CAttribute_String * @static - * @param {ICAttribute_String=} [properties] Properties to set + * @param {CAttribute_String.$Properties=} [properties] Properties to set * @returns {CAttribute_String} CAttribute_String instance + * @type {{ + * (properties: CAttribute_String.$Shape): CAttribute_String & CAttribute_String.$Shape; + * (properties?: CAttribute_String.$Properties): CAttribute_String; + * }} */ - CAttribute_String.create = function create(properties) { + CAttribute_String.create = function(properties) { return new CAttribute_String(properties); }; @@ -32658,15 +42207,22 @@ * @function encode * @memberof CAttribute_String * @static - * @param {ICAttribute_String} message CAttribute_String message or plain object to encode + * @param {CAttribute_String.$Properties} message CAttribute_String message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CAttribute_String.encode = function encode(message, writer) { + CAttribute_String.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32675,12 +42231,12 @@ * @function encodeDelimited * @memberof CAttribute_String * @static - * @param {ICAttribute_String} message CAttribute_String message or plain object to encode + * @param {CAttribute_String.$Properties} message CAttribute_String message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CAttribute_String.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CAttribute_String.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32690,25 +42246,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CAttribute_String} CAttribute_String + * @returns {CAttribute_String & CAttribute_String.$Shape} CAttribute_String * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CAttribute_String.decode = function decode(reader, length) { + CAttribute_String.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CAttribute_String(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CAttribute_String(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32718,11 +42291,11 @@ * @memberof CAttribute_String * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CAttribute_String} CAttribute_String + * @returns {CAttribute_String & CAttribute_String.$Shape} CAttribute_String * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CAttribute_String.decodeDelimited = function decodeDelimited(reader) { + CAttribute_String.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32736,10 +42309,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CAttribute_String.verify = function verify(message) { + CAttribute_String.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -32753,12 +42330,18 @@ * @param {Object.} object Plain object * @returns {CAttribute_String} CAttribute_String */ - CAttribute_String.fromObject = function fromObject(object) { + CAttribute_String.fromObject = function (object, _depth) { if (object instanceof $root.CAttribute_String) return object; + if (!$util.isObject(object)) + throw $TypeError(".CAttribute_String: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CAttribute_String(); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -32771,13 +42354,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CAttribute_String.toObject = function toObject(message, options) { + CAttribute_String.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -32789,8 +42376,22 @@ * @instance * @returns {Object.} JSON object */ - CAttribute_String.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CAttribute_String.prototype.toJSON = function() { + return CAttribute_String.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CAttribute_String + * @function getTypeUrl + * @memberof CAttribute_String + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CAttribute_String.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CAttribute_String"; }; return CAttribute_String; @@ -32800,30 +42401,43 @@ /** * Properties of a CAttribute_DynamicRecipeComponent. - * @exports ICAttribute_DynamicRecipeComponent - * @interface ICAttribute_DynamicRecipeComponent + * @typedef {Object} CAttribute_DynamicRecipeComponent.$Properties * @property {number|null} [def_index] CAttribute_DynamicRecipeComponent def_index * @property {number|null} [item_quality] CAttribute_DynamicRecipeComponent item_quality * @property {number|null} [component_flags] CAttribute_DynamicRecipeComponent component_flags * @property {string|null} [attributes_string] CAttribute_DynamicRecipeComponent attributes_string * @property {number|null} [num_required] CAttribute_DynamicRecipeComponent num_required * @property {number|null} [num_fulfilled] CAttribute_DynamicRecipeComponent num_fulfilled + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CAttribute_DynamicRecipeComponent. + * @exports ICAttribute_DynamicRecipeComponent + * @interface ICAttribute_DynamicRecipeComponent + * @augments CAttribute_DynamicRecipeComponent.$Properties + * @deprecated Use CAttribute_DynamicRecipeComponent.$Properties instead. + */ + + /** + * Shape of a CAttribute_DynamicRecipeComponent. + * @typedef {CAttribute_DynamicRecipeComponent.$Properties} CAttribute_DynamicRecipeComponent.$Shape */ /** * Constructs a new CAttribute_DynamicRecipeComponent. * @exports CAttribute_DynamicRecipeComponent * @classdesc Represents a CAttribute_DynamicRecipeComponent. - * @implements ICAttribute_DynamicRecipeComponent * @constructor - * @param {ICAttribute_DynamicRecipeComponent=} [properties] Properties to set + * @param {CAttribute_DynamicRecipeComponent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CAttribute_DynamicRecipeComponent(properties) { + var CAttribute_DynamicRecipeComponent = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CAttribute_DynamicRecipeComponent def_index. @@ -32878,10 +42492,14 @@ * @function create * @memberof CAttribute_DynamicRecipeComponent * @static - * @param {ICAttribute_DynamicRecipeComponent=} [properties] Properties to set + * @param {CAttribute_DynamicRecipeComponent.$Properties=} [properties] Properties to set * @returns {CAttribute_DynamicRecipeComponent} CAttribute_DynamicRecipeComponent instance + * @type {{ + * (properties: CAttribute_DynamicRecipeComponent.$Shape): CAttribute_DynamicRecipeComponent & CAttribute_DynamicRecipeComponent.$Shape; + * (properties?: CAttribute_DynamicRecipeComponent.$Properties): CAttribute_DynamicRecipeComponent; + * }} */ - CAttribute_DynamicRecipeComponent.create = function create(properties) { + CAttribute_DynamicRecipeComponent.create = function(properties) { return new CAttribute_DynamicRecipeComponent(properties); }; @@ -32890,25 +42508,32 @@ * @function encode * @memberof CAttribute_DynamicRecipeComponent * @static - * @param {ICAttribute_DynamicRecipeComponent} message CAttribute_DynamicRecipeComponent message or plain object to encode + * @param {CAttribute_DynamicRecipeComponent.$Properties} message CAttribute_DynamicRecipeComponent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CAttribute_DynamicRecipeComponent.encode = function encode(message, writer) { + CAttribute_DynamicRecipeComponent.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.def_index); - if (message.item_quality != null && Object.hasOwnProperty.call(message, "item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.item_quality); - if (message.component_flags != null && Object.hasOwnProperty.call(message, "component_flags")) + if (message.component_flags != null && $Object.hasOwnProperty.call(message, "component_flags")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.component_flags); - if (message.attributes_string != null && Object.hasOwnProperty.call(message, "attributes_string")) + if (message.attributes_string != null && $Object.hasOwnProperty.call(message, "attributes_string")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.attributes_string); - if (message.num_required != null && Object.hasOwnProperty.call(message, "num_required")) + if (message.num_required != null && $Object.hasOwnProperty.call(message, "num_required")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.num_required); - if (message.num_fulfilled != null && Object.hasOwnProperty.call(message, "num_fulfilled")) + if (message.num_fulfilled != null && $Object.hasOwnProperty.call(message, "num_fulfilled")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.num_fulfilled); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -32917,12 +42542,12 @@ * @function encodeDelimited * @memberof CAttribute_DynamicRecipeComponent * @static - * @param {ICAttribute_DynamicRecipeComponent} message CAttribute_DynamicRecipeComponent message or plain object to encode + * @param {CAttribute_DynamicRecipeComponent.$Properties} message CAttribute_DynamicRecipeComponent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CAttribute_DynamicRecipeComponent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CAttribute_DynamicRecipeComponent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -32932,40 +42557,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CAttribute_DynamicRecipeComponent} CAttribute_DynamicRecipeComponent + * @returns {CAttribute_DynamicRecipeComponent & CAttribute_DynamicRecipeComponent.$Shape} CAttribute_DynamicRecipeComponent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CAttribute_DynamicRecipeComponent.decode = function decode(reader, length) { + CAttribute_DynamicRecipeComponent.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CAttribute_DynamicRecipeComponent(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CAttribute_DynamicRecipeComponent(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.def_index = reader.uint32(); - break; - case 2: - message.item_quality = reader.uint32(); - break; - case 3: - message.component_flags = reader.uint32(); - break; - case 4: - message.attributes_string = reader.string(); - break; - case 5: - message.num_required = reader.uint32(); - break; - case 6: - message.num_fulfilled = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.def_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_quality = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.component_flags = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.attributes_string = reader.string(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.num_required = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.num_fulfilled = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -32975,11 +42632,11 @@ * @memberof CAttribute_DynamicRecipeComponent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CAttribute_DynamicRecipeComponent} CAttribute_DynamicRecipeComponent + * @returns {CAttribute_DynamicRecipeComponent & CAttribute_DynamicRecipeComponent.$Shape} CAttribute_DynamicRecipeComponent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CAttribute_DynamicRecipeComponent.decodeDelimited = function decodeDelimited(reader) { + CAttribute_DynamicRecipeComponent.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -32993,25 +42650,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CAttribute_DynamicRecipeComponent.verify = function verify(message) { + CAttribute_DynamicRecipeComponent.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) if (!$util.isInteger(message.def_index)) return "def_index: integer expected"; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) if (!$util.isInteger(message.item_quality)) return "item_quality: integer expected"; - if (message.component_flags != null && message.hasOwnProperty("component_flags")) + if (message.component_flags != null && $Object.hasOwnProperty.call(message, "component_flags")) if (!$util.isInteger(message.component_flags)) return "component_flags: integer expected"; - if (message.attributes_string != null && message.hasOwnProperty("attributes_string")) + if (message.attributes_string != null && $Object.hasOwnProperty.call(message, "attributes_string")) if (!$util.isString(message.attributes_string)) return "attributes_string: string expected"; - if (message.num_required != null && message.hasOwnProperty("num_required")) + if (message.num_required != null && $Object.hasOwnProperty.call(message, "num_required")) if (!$util.isInteger(message.num_required)) return "num_required: integer expected"; - if (message.num_fulfilled != null && message.hasOwnProperty("num_fulfilled")) + if (message.num_fulfilled != null && $Object.hasOwnProperty.call(message, "num_fulfilled")) if (!$util.isInteger(message.num_fulfilled)) return "num_fulfilled: integer expected"; return null; @@ -33025,9 +42686,15 @@ * @param {Object.} object Plain object * @returns {CAttribute_DynamicRecipeComponent} CAttribute_DynamicRecipeComponent */ - CAttribute_DynamicRecipeComponent.fromObject = function fromObject(object) { + CAttribute_DynamicRecipeComponent.fromObject = function (object, _depth) { if (object instanceof $root.CAttribute_DynamicRecipeComponent) return object; + if (!$util.isObject(object)) + throw $TypeError(".CAttribute_DynamicRecipeComponent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CAttribute_DynamicRecipeComponent(); if (object.def_index != null) message.def_index = object.def_index >>> 0; @@ -33036,7 +42703,7 @@ if (object.component_flags != null) message.component_flags = object.component_flags >>> 0; if (object.attributes_string != null) - message.attributes_string = String(object.attributes_string); + message.attributes_string = $String(object.attributes_string); if (object.num_required != null) message.num_required = object.num_required >>> 0; if (object.num_fulfilled != null) @@ -33053,9 +42720,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CAttribute_DynamicRecipeComponent.toObject = function toObject(message, options) { + CAttribute_DynamicRecipeComponent.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.def_index = 0; @@ -33065,17 +42736,17 @@ object.num_required = 0; object.num_fulfilled = 0; } - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) object.def_index = message.def_index; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) object.item_quality = message.item_quality; - if (message.component_flags != null && message.hasOwnProperty("component_flags")) + if (message.component_flags != null && $Object.hasOwnProperty.call(message, "component_flags")) object.component_flags = message.component_flags; - if (message.attributes_string != null && message.hasOwnProperty("attributes_string")) + if (message.attributes_string != null && $Object.hasOwnProperty.call(message, "attributes_string")) object.attributes_string = message.attributes_string; - if (message.num_required != null && message.hasOwnProperty("num_required")) + if (message.num_required != null && $Object.hasOwnProperty.call(message, "num_required")) object.num_required = message.num_required; - if (message.num_fulfilled != null && message.hasOwnProperty("num_fulfilled")) + if (message.num_fulfilled != null && $Object.hasOwnProperty.call(message, "num_fulfilled")) object.num_fulfilled = message.num_fulfilled; return object; }; @@ -33087,8 +42758,22 @@ * @instance * @returns {Object.} JSON object */ - CAttribute_DynamicRecipeComponent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CAttribute_DynamicRecipeComponent.prototype.toJSON = function() { + return CAttribute_DynamicRecipeComponent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CAttribute_DynamicRecipeComponent + * @function getTypeUrl + * @memberof CAttribute_DynamicRecipeComponent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CAttribute_DynamicRecipeComponent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CAttribute_DynamicRecipeComponent"; }; return CAttribute_DynamicRecipeComponent; @@ -33098,8 +42783,7 @@ /** * Properties of a CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT. - * @exports ICAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT - * @interface ICAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT + * @typedef {Object} CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Properties * @property {number|null} [def_index] CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT def_index * @property {number|null} [item_def] CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT item_def * @property {number|null} [item_quality] CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT item_quality @@ -33110,22 +42794,36 @@ * @property {number|null} [item_count] CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT item_count * @property {number|null} [num_fulfilled] CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT num_fulfilled * @property {number|null} [items_fulfilled] CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT items_fulfilled + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT. + * @exports ICAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT + * @interface ICAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT + * @augments CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Properties + * @deprecated Use CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Properties instead. + */ + + /** + * Shape of a CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT. + * @typedef {CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Properties} CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Shape */ /** * Constructs a new CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT. * @exports CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT * @classdesc Represents a CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT. - * @implements ICAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT * @constructor - * @param {ICAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT=} [properties] Properties to set + * @param {CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT(properties) { + var CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT def_index. @@ -33212,10 +42910,14 @@ * @function create * @memberof CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT * @static - * @param {ICAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT=} [properties] Properties to set + * @param {CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Properties=} [properties] Properties to set * @returns {CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT} CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT instance + * @type {{ + * (properties: CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Shape): CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT & CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Shape; + * (properties?: CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Properties): CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT; + * }} */ - CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.create = function create(properties) { + CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.create = function(properties) { return new CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT(properties); }; @@ -33224,33 +42926,40 @@ * @function encode * @memberof CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT * @static - * @param {ICAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT} message CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT message or plain object to encode + * @param {CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Properties} message CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.encode = function encode(message, writer) { + CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.def_index); - if (message.item_def != null && Object.hasOwnProperty.call(message, "item_def")) + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.item_def); - if (message.item_quality != null && Object.hasOwnProperty.call(message, "item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.item_quality); - if (message.component_flags != null && Object.hasOwnProperty.call(message, "component_flags")) + if (message.component_flags != null && $Object.hasOwnProperty.call(message, "component_flags")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.component_flags); - if (message.item_flags != null && Object.hasOwnProperty.call(message, "item_flags")) + if (message.item_flags != null && $Object.hasOwnProperty.call(message, "item_flags")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.item_flags); - if (message.attributes_string != null && Object.hasOwnProperty.call(message, "attributes_string")) + if (message.attributes_string != null && $Object.hasOwnProperty.call(message, "attributes_string")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.attributes_string); - if (message.num_required != null && Object.hasOwnProperty.call(message, "num_required")) + if (message.num_required != null && $Object.hasOwnProperty.call(message, "num_required")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.num_required); - if (message.item_count != null && Object.hasOwnProperty.call(message, "item_count")) + if (message.item_count != null && $Object.hasOwnProperty.call(message, "item_count")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.item_count); - if (message.num_fulfilled != null && Object.hasOwnProperty.call(message, "num_fulfilled")) + if (message.num_fulfilled != null && $Object.hasOwnProperty.call(message, "num_fulfilled")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.num_fulfilled); - if (message.items_fulfilled != null && Object.hasOwnProperty.call(message, "items_fulfilled")) + if (message.items_fulfilled != null && $Object.hasOwnProperty.call(message, "items_fulfilled")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.items_fulfilled); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33259,12 +42968,12 @@ * @function encodeDelimited * @memberof CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT * @static - * @param {ICAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT} message CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT message or plain object to encode + * @param {CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Properties} message CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33274,52 +42983,96 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT} CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT + * @returns {CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT & CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Shape} CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.decode = function decode(reader, length) { + CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.def_index = reader.uint32(); - break; - case 2: - message.item_def = reader.uint32(); - break; - case 3: - message.item_quality = reader.uint32(); - break; - case 4: - message.component_flags = reader.uint32(); - break; - case 5: - message.item_flags = reader.uint32(); - break; - case 6: - message.attributes_string = reader.string(); - break; - case 7: - message.num_required = reader.uint32(); - break; - case 8: - message.item_count = reader.uint32(); - break; - case 9: - message.num_fulfilled = reader.uint32(); - break; - case 10: - message.items_fulfilled = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.def_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_def = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_quality = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.component_flags = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.item_flags = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.attributes_string = reader.string(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.num_required = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.item_count = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.num_fulfilled = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.items_fulfilled = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33329,11 +43082,11 @@ * @memberof CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT} CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT + * @returns {CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT & CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.$Shape} CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.decodeDelimited = function decodeDelimited(reader) { + CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33347,37 +43100,41 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.verify = function verify(message) { + CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) if (!$util.isInteger(message.def_index)) return "def_index: integer expected"; - if (message.item_def != null && message.hasOwnProperty("item_def")) + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) if (!$util.isInteger(message.item_def)) return "item_def: integer expected"; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) if (!$util.isInteger(message.item_quality)) return "item_quality: integer expected"; - if (message.component_flags != null && message.hasOwnProperty("component_flags")) + if (message.component_flags != null && $Object.hasOwnProperty.call(message, "component_flags")) if (!$util.isInteger(message.component_flags)) return "component_flags: integer expected"; - if (message.item_flags != null && message.hasOwnProperty("item_flags")) + if (message.item_flags != null && $Object.hasOwnProperty.call(message, "item_flags")) if (!$util.isInteger(message.item_flags)) return "item_flags: integer expected"; - if (message.attributes_string != null && message.hasOwnProperty("attributes_string")) + if (message.attributes_string != null && $Object.hasOwnProperty.call(message, "attributes_string")) if (!$util.isString(message.attributes_string)) return "attributes_string: string expected"; - if (message.num_required != null && message.hasOwnProperty("num_required")) + if (message.num_required != null && $Object.hasOwnProperty.call(message, "num_required")) if (!$util.isInteger(message.num_required)) return "num_required: integer expected"; - if (message.item_count != null && message.hasOwnProperty("item_count")) + if (message.item_count != null && $Object.hasOwnProperty.call(message, "item_count")) if (!$util.isInteger(message.item_count)) return "item_count: integer expected"; - if (message.num_fulfilled != null && message.hasOwnProperty("num_fulfilled")) + if (message.num_fulfilled != null && $Object.hasOwnProperty.call(message, "num_fulfilled")) if (!$util.isInteger(message.num_fulfilled)) return "num_fulfilled: integer expected"; - if (message.items_fulfilled != null && message.hasOwnProperty("items_fulfilled")) + if (message.items_fulfilled != null && $Object.hasOwnProperty.call(message, "items_fulfilled")) if (!$util.isInteger(message.items_fulfilled)) return "items_fulfilled: integer expected"; return null; @@ -33391,9 +43148,15 @@ * @param {Object.} object Plain object * @returns {CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT} CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT */ - CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.fromObject = function fromObject(object) { + CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.fromObject = function (object, _depth) { if (object instanceof $root.CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT) return object; + if (!$util.isObject(object)) + throw $TypeError(".CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT(); if (object.def_index != null) message.def_index = object.def_index >>> 0; @@ -33406,7 +43169,7 @@ if (object.item_flags != null) message.item_flags = object.item_flags >>> 0; if (object.attributes_string != null) - message.attributes_string = String(object.attributes_string); + message.attributes_string = $String(object.attributes_string); if (object.num_required != null) message.num_required = object.num_required >>> 0; if (object.item_count != null) @@ -33427,9 +43190,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.toObject = function toObject(message, options) { + CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.def_index = 0; @@ -33443,25 +43210,25 @@ object.num_fulfilled = 0; object.items_fulfilled = 0; } - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) object.def_index = message.def_index; - if (message.item_def != null && message.hasOwnProperty("item_def")) + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) object.item_def = message.item_def; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) object.item_quality = message.item_quality; - if (message.component_flags != null && message.hasOwnProperty("component_flags")) + if (message.component_flags != null && $Object.hasOwnProperty.call(message, "component_flags")) object.component_flags = message.component_flags; - if (message.item_flags != null && message.hasOwnProperty("item_flags")) + if (message.item_flags != null && $Object.hasOwnProperty.call(message, "item_flags")) object.item_flags = message.item_flags; - if (message.attributes_string != null && message.hasOwnProperty("attributes_string")) + if (message.attributes_string != null && $Object.hasOwnProperty.call(message, "attributes_string")) object.attributes_string = message.attributes_string; - if (message.num_required != null && message.hasOwnProperty("num_required")) + if (message.num_required != null && $Object.hasOwnProperty.call(message, "num_required")) object.num_required = message.num_required; - if (message.item_count != null && message.hasOwnProperty("item_count")) + if (message.item_count != null && $Object.hasOwnProperty.call(message, "item_count")) object.item_count = message.item_count; - if (message.num_fulfilled != null && message.hasOwnProperty("num_fulfilled")) + if (message.num_fulfilled != null && $Object.hasOwnProperty.call(message, "num_fulfilled")) object.num_fulfilled = message.num_fulfilled; - if (message.items_fulfilled != null && message.hasOwnProperty("items_fulfilled")) + if (message.items_fulfilled != null && $Object.hasOwnProperty.call(message, "items_fulfilled")) object.items_fulfilled = message.items_fulfilled; return object; }; @@ -33473,8 +43240,22 @@ * @instance * @returns {Object.} JSON object */ - CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.prototype.toJSON = function() { + return CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT + * @function getTypeUrl + * @memberof CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT"; }; return CAttribute_DynamicRecipeComponent_COMPAT_NEVER_SERIALIZE_THIS_OUT; @@ -33482,27 +43263,40 @@ $root.CAttribute_ItemSlotCriteria = (function() { + /** + * Properties of a CAttribute_ItemSlotCriteria. + * @typedef {Object} CAttribute_ItemSlotCriteria.$Properties + * @property {string|null} [tags] CAttribute_ItemSlotCriteria tags + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CAttribute_ItemSlotCriteria. * @exports ICAttribute_ItemSlotCriteria * @interface ICAttribute_ItemSlotCriteria - * @property {string|null} [tags] CAttribute_ItemSlotCriteria tags + * @augments CAttribute_ItemSlotCriteria.$Properties + * @deprecated Use CAttribute_ItemSlotCriteria.$Properties instead. + */ + + /** + * Shape of a CAttribute_ItemSlotCriteria. + * @typedef {CAttribute_ItemSlotCriteria.$Properties} CAttribute_ItemSlotCriteria.$Shape */ /** * Constructs a new CAttribute_ItemSlotCriteria. * @exports CAttribute_ItemSlotCriteria * @classdesc Represents a CAttribute_ItemSlotCriteria. - * @implements ICAttribute_ItemSlotCriteria * @constructor - * @param {ICAttribute_ItemSlotCriteria=} [properties] Properties to set + * @param {CAttribute_ItemSlotCriteria.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CAttribute_ItemSlotCriteria(properties) { + var CAttribute_ItemSlotCriteria = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CAttribute_ItemSlotCriteria tags. @@ -33517,10 +43311,14 @@ * @function create * @memberof CAttribute_ItemSlotCriteria * @static - * @param {ICAttribute_ItemSlotCriteria=} [properties] Properties to set + * @param {CAttribute_ItemSlotCriteria.$Properties=} [properties] Properties to set * @returns {CAttribute_ItemSlotCriteria} CAttribute_ItemSlotCriteria instance + * @type {{ + * (properties: CAttribute_ItemSlotCriteria.$Shape): CAttribute_ItemSlotCriteria & CAttribute_ItemSlotCriteria.$Shape; + * (properties?: CAttribute_ItemSlotCriteria.$Properties): CAttribute_ItemSlotCriteria; + * }} */ - CAttribute_ItemSlotCriteria.create = function create(properties) { + CAttribute_ItemSlotCriteria.create = function(properties) { return new CAttribute_ItemSlotCriteria(properties); }; @@ -33529,15 +43327,22 @@ * @function encode * @memberof CAttribute_ItemSlotCriteria * @static - * @param {ICAttribute_ItemSlotCriteria} message CAttribute_ItemSlotCriteria message or plain object to encode + * @param {CAttribute_ItemSlotCriteria.$Properties} message CAttribute_ItemSlotCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CAttribute_ItemSlotCriteria.encode = function encode(message, writer) { + CAttribute_ItemSlotCriteria.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.tags); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33546,12 +43351,12 @@ * @function encodeDelimited * @memberof CAttribute_ItemSlotCriteria * @static - * @param {ICAttribute_ItemSlotCriteria} message CAttribute_ItemSlotCriteria message or plain object to encode + * @param {CAttribute_ItemSlotCriteria.$Properties} message CAttribute_ItemSlotCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CAttribute_ItemSlotCriteria.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CAttribute_ItemSlotCriteria.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33561,25 +43366,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CAttribute_ItemSlotCriteria} CAttribute_ItemSlotCriteria + * @returns {CAttribute_ItemSlotCriteria & CAttribute_ItemSlotCriteria.$Shape} CAttribute_ItemSlotCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CAttribute_ItemSlotCriteria.decode = function decode(reader, length) { + CAttribute_ItemSlotCriteria.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CAttribute_ItemSlotCriteria(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CAttribute_ItemSlotCriteria(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tags = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.tags = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33589,11 +43411,11 @@ * @memberof CAttribute_ItemSlotCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CAttribute_ItemSlotCriteria} CAttribute_ItemSlotCriteria + * @returns {CAttribute_ItemSlotCriteria & CAttribute_ItemSlotCriteria.$Shape} CAttribute_ItemSlotCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CAttribute_ItemSlotCriteria.decodeDelimited = function decodeDelimited(reader) { + CAttribute_ItemSlotCriteria.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33607,10 +43429,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CAttribute_ItemSlotCriteria.verify = function verify(message) { + CAttribute_ItemSlotCriteria.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tags != null && message.hasOwnProperty("tags")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) if (!$util.isString(message.tags)) return "tags: string expected"; return null; @@ -33624,12 +43450,18 @@ * @param {Object.} object Plain object * @returns {CAttribute_ItemSlotCriteria} CAttribute_ItemSlotCriteria */ - CAttribute_ItemSlotCriteria.fromObject = function fromObject(object) { + CAttribute_ItemSlotCriteria.fromObject = function (object, _depth) { if (object instanceof $root.CAttribute_ItemSlotCriteria) return object; + if (!$util.isObject(object)) + throw $TypeError(".CAttribute_ItemSlotCriteria: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CAttribute_ItemSlotCriteria(); if (object.tags != null) - message.tags = String(object.tags); + message.tags = $String(object.tags); return message; }; @@ -33642,13 +43474,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CAttribute_ItemSlotCriteria.toObject = function toObject(message, options) { + CAttribute_ItemSlotCriteria.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.tags = ""; - if (message.tags != null && message.hasOwnProperty("tags")) + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) object.tags = message.tags; return object; }; @@ -33660,8 +43496,22 @@ * @instance * @returns {Object.} JSON object */ - CAttribute_ItemSlotCriteria.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CAttribute_ItemSlotCriteria.prototype.toJSON = function() { + return CAttribute_ItemSlotCriteria.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CAttribute_ItemSlotCriteria + * @function getTypeUrl + * @memberof CAttribute_ItemSlotCriteria + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CAttribute_ItemSlotCriteria.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CAttribute_ItemSlotCriteria"; }; return CAttribute_ItemSlotCriteria; @@ -33671,27 +43521,40 @@ /** * Properties of a CMsgSetItemSlotAttribute. - * @exports ICMsgSetItemSlotAttribute - * @interface ICMsgSetItemSlotAttribute + * @typedef {Object} CMsgSetItemSlotAttribute.$Properties * @property {number|Long|null} [item_id] CMsgSetItemSlotAttribute item_id * @property {number|Long|null} [slot_item_original_id] CMsgSetItemSlotAttribute slot_item_original_id * @property {number|null} [slot_index] CMsgSetItemSlotAttribute slot_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSetItemSlotAttribute. + * @exports ICMsgSetItemSlotAttribute + * @interface ICMsgSetItemSlotAttribute + * @augments CMsgSetItemSlotAttribute.$Properties + * @deprecated Use CMsgSetItemSlotAttribute.$Properties instead. + */ + + /** + * Shape of a CMsgSetItemSlotAttribute. + * @typedef {CMsgSetItemSlotAttribute.$Properties} CMsgSetItemSlotAttribute.$Shape */ /** * Constructs a new CMsgSetItemSlotAttribute. * @exports CMsgSetItemSlotAttribute * @classdesc Represents a CMsgSetItemSlotAttribute. - * @implements ICMsgSetItemSlotAttribute * @constructor - * @param {ICMsgSetItemSlotAttribute=} [properties] Properties to set + * @param {CMsgSetItemSlotAttribute.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSetItemSlotAttribute(properties) { + var CMsgSetItemSlotAttribute = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSetItemSlotAttribute item_id. @@ -33722,10 +43585,14 @@ * @function create * @memberof CMsgSetItemSlotAttribute * @static - * @param {ICMsgSetItemSlotAttribute=} [properties] Properties to set + * @param {CMsgSetItemSlotAttribute.$Properties=} [properties] Properties to set * @returns {CMsgSetItemSlotAttribute} CMsgSetItemSlotAttribute instance + * @type {{ + * (properties: CMsgSetItemSlotAttribute.$Shape): CMsgSetItemSlotAttribute & CMsgSetItemSlotAttribute.$Shape; + * (properties?: CMsgSetItemSlotAttribute.$Properties): CMsgSetItemSlotAttribute; + * }} */ - CMsgSetItemSlotAttribute.create = function create(properties) { + CMsgSetItemSlotAttribute.create = function(properties) { return new CMsgSetItemSlotAttribute(properties); }; @@ -33734,19 +43601,26 @@ * @function encode * @memberof CMsgSetItemSlotAttribute * @static - * @param {ICMsgSetItemSlotAttribute} message CMsgSetItemSlotAttribute message or plain object to encode + * @param {CMsgSetItemSlotAttribute.$Properties} message CMsgSetItemSlotAttribute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetItemSlotAttribute.encode = function encode(message, writer) { + CMsgSetItemSlotAttribute.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.slot_item_original_id != null && Object.hasOwnProperty.call(message, "slot_item_original_id")) + if (message.slot_item_original_id != null && $Object.hasOwnProperty.call(message, "slot_item_original_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.slot_item_original_id); - if (message.slot_index != null && Object.hasOwnProperty.call(message, "slot_index")) + if (message.slot_index != null && $Object.hasOwnProperty.call(message, "slot_index")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.slot_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -33755,12 +43629,12 @@ * @function encodeDelimited * @memberof CMsgSetItemSlotAttribute * @static - * @param {ICMsgSetItemSlotAttribute} message CMsgSetItemSlotAttribute message or plain object to encode + * @param {CMsgSetItemSlotAttribute.$Properties} message CMsgSetItemSlotAttribute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetItemSlotAttribute.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSetItemSlotAttribute.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -33770,31 +43644,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSetItemSlotAttribute} CMsgSetItemSlotAttribute + * @returns {CMsgSetItemSlotAttribute & CMsgSetItemSlotAttribute.$Shape} CMsgSetItemSlotAttribute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetItemSlotAttribute.decode = function decode(reader, length) { + CMsgSetItemSlotAttribute.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSetItemSlotAttribute(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSetItemSlotAttribute(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.slot_item_original_id = reader.uint64(); - break; - case 3: - message.slot_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.slot_item_original_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.slot_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -33804,11 +43701,11 @@ * @memberof CMsgSetItemSlotAttribute * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSetItemSlotAttribute} CMsgSetItemSlotAttribute + * @returns {CMsgSetItemSlotAttribute & CMsgSetItemSlotAttribute.$Shape} CMsgSetItemSlotAttribute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetItemSlotAttribute.decodeDelimited = function decodeDelimited(reader) { + CMsgSetItemSlotAttribute.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -33822,16 +43719,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSetItemSlotAttribute.verify = function verify(message) { + CMsgSetItemSlotAttribute.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.slot_item_original_id != null && message.hasOwnProperty("slot_item_original_id")) + if (message.slot_item_original_id != null && $Object.hasOwnProperty.call(message, "slot_item_original_id")) if (!$util.isInteger(message.slot_item_original_id) && !(message.slot_item_original_id && $util.isInteger(message.slot_item_original_id.low) && $util.isInteger(message.slot_item_original_id.high))) return "slot_item_original_id: integer|Long expected"; - if (message.slot_index != null && message.hasOwnProperty("slot_index")) + if (message.slot_index != null && $Object.hasOwnProperty.call(message, "slot_index")) if (!$util.isInteger(message.slot_index)) return "slot_index: integer expected"; return null; @@ -33845,24 +43746,30 @@ * @param {Object.} object Plain object * @returns {CMsgSetItemSlotAttribute} CMsgSetItemSlotAttribute */ - CMsgSetItemSlotAttribute.fromObject = function fromObject(object) { + CMsgSetItemSlotAttribute.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSetItemSlotAttribute) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSetItemSlotAttribute: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSetItemSlotAttribute(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") message.item_id = new $util.LongBits(object.item_id.low >>> 0, object.item_id.high >>> 0).toNumber(true); if (object.slot_item_original_id != null) if ($util.Long) - (message.slot_item_original_id = $util.Long.fromValue(object.slot_item_original_id)).unsigned = true; + message.slot_item_original_id = $util.Long.fromValue(object.slot_item_original_id, true); else if (typeof object.slot_item_original_id === "string") - message.slot_item_original_id = parseInt(object.slot_item_original_id, 10); + message.slot_item_original_id = $parseInt(object.slot_item_original_id, 10); else if (typeof object.slot_item_original_id === "number") message.slot_item_original_id = object.slot_item_original_id; else if (typeof object.slot_item_original_id === "object") @@ -33881,34 +43788,42 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSetItemSlotAttribute.toObject = function toObject(message, options) { + CMsgSetItemSlotAttribute.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.slot_item_original_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.slot_item_original_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.slot_item_original_id = options.longs === String ? "0" : 0; + object.slot_item_original_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.slot_index = 0; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.slot_item_original_id != null && message.hasOwnProperty("slot_item_original_id")) - if (typeof message.slot_item_original_id === "number") - object.slot_item_original_id = options.longs === String ? String(message.slot_item_original_id) : message.slot_item_original_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.slot_item_original_id != null && $Object.hasOwnProperty.call(message, "slot_item_original_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.slot_item_original_id = typeof message.slot_item_original_id === "number" ? $BigInt(message.slot_item_original_id) : $util.Long.fromBits(message.slot_item_original_id.low >>> 0, message.slot_item_original_id.high >>> 0, true).toBigInt(); + else if (typeof message.slot_item_original_id === "number") + object.slot_item_original_id = options.longs === $String ? $String(message.slot_item_original_id) : message.slot_item_original_id; else - object.slot_item_original_id = options.longs === String ? $util.Long.prototype.toString.call(message.slot_item_original_id) : options.longs === Number ? new $util.LongBits(message.slot_item_original_id.low >>> 0, message.slot_item_original_id.high >>> 0).toNumber(true) : message.slot_item_original_id; - if (message.slot_index != null && message.hasOwnProperty("slot_index")) + object.slot_item_original_id = options.longs === $String ? $util.Long.prototype.toString.call(message.slot_item_original_id) : options.longs === $Number ? new $util.LongBits(message.slot_item_original_id.low >>> 0, message.slot_item_original_id.high >>> 0).toNumber(true) : message.slot_item_original_id; + if (message.slot_index != null && $Object.hasOwnProperty.call(message, "slot_index")) object.slot_index = message.slot_index; return object; }; @@ -33920,8 +43835,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSetItemSlotAttribute.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSetItemSlotAttribute.prototype.toJSON = function() { + return CMsgSetItemSlotAttribute.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSetItemSlotAttribute + * @function getTypeUrl + * @memberof CMsgSetItemSlotAttribute + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSetItemSlotAttribute.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSetItemSlotAttribute"; }; return CMsgSetItemSlotAttribute; @@ -33931,28 +43860,41 @@ /** * Properties of a CSOWarData. - * @exports ICSOWarData - * @interface ICSOWarData + * @typedef {Object} CSOWarData.$Properties * @property {number|null} [account_id] CSOWarData account_id * @property {number|null} [war_id] CSOWarData war_id * @property {number|null} [affiliation] CSOWarData affiliation * @property {number|null} [points_scored] CSOWarData points_scored + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOWarData. + * @exports ICSOWarData + * @interface ICSOWarData + * @augments CSOWarData.$Properties + * @deprecated Use CSOWarData.$Properties instead. + */ + + /** + * Shape of a CSOWarData. + * @typedef {CSOWarData.$Properties} CSOWarData.$Shape */ /** * Constructs a new CSOWarData. * @exports CSOWarData * @classdesc Represents a CSOWarData. - * @implements ICSOWarData * @constructor - * @param {ICSOWarData=} [properties] Properties to set + * @param {CSOWarData.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOWarData(properties) { + var CSOWarData = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOWarData account_id. @@ -33991,10 +43933,14 @@ * @function create * @memberof CSOWarData * @static - * @param {ICSOWarData=} [properties] Properties to set + * @param {CSOWarData.$Properties=} [properties] Properties to set * @returns {CSOWarData} CSOWarData instance + * @type {{ + * (properties: CSOWarData.$Shape): CSOWarData & CSOWarData.$Shape; + * (properties?: CSOWarData.$Properties): CSOWarData; + * }} */ - CSOWarData.create = function create(properties) { + CSOWarData.create = function(properties) { return new CSOWarData(properties); }; @@ -34003,21 +43949,28 @@ * @function encode * @memberof CSOWarData * @static - * @param {ICSOWarData} message CSOWarData message or plain object to encode + * @param {CSOWarData.$Properties} message CSOWarData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOWarData.encode = function encode(message, writer) { + CSOWarData.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.war_id != null && Object.hasOwnProperty.call(message, "war_id")) + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.war_id); - if (message.affiliation != null && Object.hasOwnProperty.call(message, "affiliation")) + if (message.affiliation != null && $Object.hasOwnProperty.call(message, "affiliation")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.affiliation); - if (message.points_scored != null && Object.hasOwnProperty.call(message, "points_scored")) + if (message.points_scored != null && $Object.hasOwnProperty.call(message, "points_scored")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.points_scored); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -34026,12 +43979,12 @@ * @function encodeDelimited * @memberof CSOWarData * @static - * @param {ICSOWarData} message CSOWarData message or plain object to encode + * @param {CSOWarData.$Properties} message CSOWarData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOWarData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOWarData.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -34041,34 +43994,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOWarData} CSOWarData + * @returns {CSOWarData & CSOWarData.$Shape} CSOWarData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOWarData.decode = function decode(reader, length) { + CSOWarData.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOWarData(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOWarData(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.war_id = reader.uint32(); - break; - case 3: - message.affiliation = reader.uint32(); - break; - case 4: - message.points_scored = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.war_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.affiliation = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.points_scored = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -34078,11 +44057,11 @@ * @memberof CSOWarData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOWarData} CSOWarData + * @returns {CSOWarData & CSOWarData.$Shape} CSOWarData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOWarData.decodeDelimited = function decodeDelimited(reader) { + CSOWarData.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34096,19 +44075,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOWarData.verify = function verify(message) { + CSOWarData.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.war_id != null && message.hasOwnProperty("war_id")) + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) if (!$util.isInteger(message.war_id)) return "war_id: integer expected"; - if (message.affiliation != null && message.hasOwnProperty("affiliation")) + if (message.affiliation != null && $Object.hasOwnProperty.call(message, "affiliation")) if (!$util.isInteger(message.affiliation)) return "affiliation: integer expected"; - if (message.points_scored != null && message.hasOwnProperty("points_scored")) + if (message.points_scored != null && $Object.hasOwnProperty.call(message, "points_scored")) if (!$util.isInteger(message.points_scored)) return "points_scored: integer expected"; return null; @@ -34122,9 +44105,15 @@ * @param {Object.} object Plain object * @returns {CSOWarData} CSOWarData */ - CSOWarData.fromObject = function fromObject(object) { + CSOWarData.fromObject = function (object, _depth) { if (object instanceof $root.CSOWarData) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOWarData: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOWarData(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -34146,9 +44135,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOWarData.toObject = function toObject(message, options) { + CSOWarData.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; @@ -34156,13 +44149,13 @@ object.affiliation = 0; object.points_scored = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.war_id != null && message.hasOwnProperty("war_id")) + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) object.war_id = message.war_id; - if (message.affiliation != null && message.hasOwnProperty("affiliation")) + if (message.affiliation != null && $Object.hasOwnProperty.call(message, "affiliation")) object.affiliation = message.affiliation; - if (message.points_scored != null && message.hasOwnProperty("points_scored")) + if (message.points_scored != null && $Object.hasOwnProperty.call(message, "points_scored")) object.points_scored = message.points_scored; return object; }; @@ -34174,8 +44167,22 @@ * @instance * @returns {Object.} JSON object */ - CSOWarData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOWarData.prototype.toJSON = function() { + return CSOWarData.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOWarData + * @function getTypeUrl + * @memberof CSOWarData + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOWarData.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOWarData"; }; return CSOWarData; @@ -34185,27 +44192,40 @@ /** * Properties of a CGCMsgGC_War_IndividualUpdate. - * @exports ICGCMsgGC_War_IndividualUpdate - * @interface ICGCMsgGC_War_IndividualUpdate + * @typedef {Object} CGCMsgGC_War_IndividualUpdate.$Properties * @property {number|Long|null} [steam_id] CGCMsgGC_War_IndividualUpdate steam_id * @property {number|null} [war_id] CGCMsgGC_War_IndividualUpdate war_id * @property {number|null} [score] CGCMsgGC_War_IndividualUpdate score + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgGC_War_IndividualUpdate. + * @exports ICGCMsgGC_War_IndividualUpdate + * @interface ICGCMsgGC_War_IndividualUpdate + * @augments CGCMsgGC_War_IndividualUpdate.$Properties + * @deprecated Use CGCMsgGC_War_IndividualUpdate.$Properties instead. + */ + + /** + * Shape of a CGCMsgGC_War_IndividualUpdate. + * @typedef {CGCMsgGC_War_IndividualUpdate.$Properties} CGCMsgGC_War_IndividualUpdate.$Shape */ /** * Constructs a new CGCMsgGC_War_IndividualUpdate. * @exports CGCMsgGC_War_IndividualUpdate * @classdesc Represents a CGCMsgGC_War_IndividualUpdate. - * @implements ICGCMsgGC_War_IndividualUpdate * @constructor - * @param {ICGCMsgGC_War_IndividualUpdate=} [properties] Properties to set + * @param {CGCMsgGC_War_IndividualUpdate.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGC_War_IndividualUpdate(properties) { + var CGCMsgGC_War_IndividualUpdate = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGC_War_IndividualUpdate steam_id. @@ -34213,7 +44233,7 @@ * @memberof CGCMsgGC_War_IndividualUpdate * @instance */ - CGCMsgGC_War_IndividualUpdate.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCMsgGC_War_IndividualUpdate.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CGCMsgGC_War_IndividualUpdate war_id. @@ -34236,10 +44256,14 @@ * @function create * @memberof CGCMsgGC_War_IndividualUpdate * @static - * @param {ICGCMsgGC_War_IndividualUpdate=} [properties] Properties to set + * @param {CGCMsgGC_War_IndividualUpdate.$Properties=} [properties] Properties to set * @returns {CGCMsgGC_War_IndividualUpdate} CGCMsgGC_War_IndividualUpdate instance + * @type {{ + * (properties: CGCMsgGC_War_IndividualUpdate.$Shape): CGCMsgGC_War_IndividualUpdate & CGCMsgGC_War_IndividualUpdate.$Shape; + * (properties?: CGCMsgGC_War_IndividualUpdate.$Properties): CGCMsgGC_War_IndividualUpdate; + * }} */ - CGCMsgGC_War_IndividualUpdate.create = function create(properties) { + CGCMsgGC_War_IndividualUpdate.create = function(properties) { return new CGCMsgGC_War_IndividualUpdate(properties); }; @@ -34248,19 +44272,26 @@ * @function encode * @memberof CGCMsgGC_War_IndividualUpdate * @static - * @param {ICGCMsgGC_War_IndividualUpdate} message CGCMsgGC_War_IndividualUpdate message or plain object to encode + * @param {CGCMsgGC_War_IndividualUpdate.$Properties} message CGCMsgGC_War_IndividualUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGC_War_IndividualUpdate.encode = function encode(message, writer) { + CGCMsgGC_War_IndividualUpdate.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.war_id != null && Object.hasOwnProperty.call(message, "war_id")) + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.war_id); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.score); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -34269,12 +44300,12 @@ * @function encodeDelimited * @memberof CGCMsgGC_War_IndividualUpdate * @static - * @param {ICGCMsgGC_War_IndividualUpdate} message CGCMsgGC_War_IndividualUpdate message or plain object to encode + * @param {CGCMsgGC_War_IndividualUpdate.$Properties} message CGCMsgGC_War_IndividualUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGC_War_IndividualUpdate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGC_War_IndividualUpdate.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -34284,31 +44315,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGC_War_IndividualUpdate} CGCMsgGC_War_IndividualUpdate + * @returns {CGCMsgGC_War_IndividualUpdate & CGCMsgGC_War_IndividualUpdate.$Shape} CGCMsgGC_War_IndividualUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGC_War_IndividualUpdate.decode = function decode(reader, length) { + CGCMsgGC_War_IndividualUpdate.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGC_War_IndividualUpdate(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGC_War_IndividualUpdate(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.war_id = reader.uint32(); - break; - case 3: - message.score = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.war_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.score = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -34318,11 +44372,11 @@ * @memberof CGCMsgGC_War_IndividualUpdate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGC_War_IndividualUpdate} CGCMsgGC_War_IndividualUpdate + * @returns {CGCMsgGC_War_IndividualUpdate & CGCMsgGC_War_IndividualUpdate.$Shape} CGCMsgGC_War_IndividualUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGC_War_IndividualUpdate.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGC_War_IndividualUpdate.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34336,16 +44390,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGC_War_IndividualUpdate.verify = function verify(message) { + CGCMsgGC_War_IndividualUpdate.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.war_id != null && message.hasOwnProperty("war_id")) + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) if (!$util.isInteger(message.war_id)) return "war_id: integer expected"; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) if (!$util.isInteger(message.score)) return "score: integer expected"; return null; @@ -34359,19 +44417,25 @@ * @param {Object.} object Plain object * @returns {CGCMsgGC_War_IndividualUpdate} CGCMsgGC_War_IndividualUpdate */ - CGCMsgGC_War_IndividualUpdate.fromObject = function fromObject(object) { + CGCMsgGC_War_IndividualUpdate.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGC_War_IndividualUpdate) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGC_War_IndividualUpdate: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGC_War_IndividualUpdate(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.war_id != null) message.war_id = object.war_id >>> 0; if (object.score != null) @@ -34388,27 +44452,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGC_War_IndividualUpdate.toObject = function toObject(message, options) { + CGCMsgGC_War_IndividualUpdate.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.war_id = 0; object.score = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.war_id != null && message.hasOwnProperty("war_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) object.war_id = message.war_id; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) object.score = message.score; return object; }; @@ -34420,8 +44490,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGC_War_IndividualUpdate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGC_War_IndividualUpdate.prototype.toJSON = function() { + return CGCMsgGC_War_IndividualUpdate.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGC_War_IndividualUpdate + * @function getTypeUrl + * @memberof CGCMsgGC_War_IndividualUpdate + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGC_War_IndividualUpdate.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGC_War_IndividualUpdate"; }; return CGCMsgGC_War_IndividualUpdate; @@ -34431,26 +44515,39 @@ /** * Properties of a CGCMsgGC_War_JoinWar. - * @exports ICGCMsgGC_War_JoinWar - * @interface ICGCMsgGC_War_JoinWar + * @typedef {Object} CGCMsgGC_War_JoinWar.$Properties * @property {number|null} [affiliation] CGCMsgGC_War_JoinWar affiliation * @property {number|null} [war_id] CGCMsgGC_War_JoinWar war_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgGC_War_JoinWar. + * @exports ICGCMsgGC_War_JoinWar + * @interface ICGCMsgGC_War_JoinWar + * @augments CGCMsgGC_War_JoinWar.$Properties + * @deprecated Use CGCMsgGC_War_JoinWar.$Properties instead. + */ + + /** + * Shape of a CGCMsgGC_War_JoinWar. + * @typedef {CGCMsgGC_War_JoinWar.$Properties} CGCMsgGC_War_JoinWar.$Shape */ /** * Constructs a new CGCMsgGC_War_JoinWar. * @exports CGCMsgGC_War_JoinWar * @classdesc Represents a CGCMsgGC_War_JoinWar. - * @implements ICGCMsgGC_War_JoinWar * @constructor - * @param {ICGCMsgGC_War_JoinWar=} [properties] Properties to set + * @param {CGCMsgGC_War_JoinWar.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGC_War_JoinWar(properties) { + var CGCMsgGC_War_JoinWar = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGC_War_JoinWar affiliation. @@ -34473,10 +44570,14 @@ * @function create * @memberof CGCMsgGC_War_JoinWar * @static - * @param {ICGCMsgGC_War_JoinWar=} [properties] Properties to set + * @param {CGCMsgGC_War_JoinWar.$Properties=} [properties] Properties to set * @returns {CGCMsgGC_War_JoinWar} CGCMsgGC_War_JoinWar instance + * @type {{ + * (properties: CGCMsgGC_War_JoinWar.$Shape): CGCMsgGC_War_JoinWar & CGCMsgGC_War_JoinWar.$Shape; + * (properties?: CGCMsgGC_War_JoinWar.$Properties): CGCMsgGC_War_JoinWar; + * }} */ - CGCMsgGC_War_JoinWar.create = function create(properties) { + CGCMsgGC_War_JoinWar.create = function(properties) { return new CGCMsgGC_War_JoinWar(properties); }; @@ -34485,17 +44586,24 @@ * @function encode * @memberof CGCMsgGC_War_JoinWar * @static - * @param {ICGCMsgGC_War_JoinWar} message CGCMsgGC_War_JoinWar message or plain object to encode + * @param {CGCMsgGC_War_JoinWar.$Properties} message CGCMsgGC_War_JoinWar message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGC_War_JoinWar.encode = function encode(message, writer) { + CGCMsgGC_War_JoinWar.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.affiliation != null && Object.hasOwnProperty.call(message, "affiliation")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.affiliation != null && $Object.hasOwnProperty.call(message, "affiliation")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.affiliation); - if (message.war_id != null && Object.hasOwnProperty.call(message, "war_id")) + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.war_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -34504,12 +44612,12 @@ * @function encodeDelimited * @memberof CGCMsgGC_War_JoinWar * @static - * @param {ICGCMsgGC_War_JoinWar} message CGCMsgGC_War_JoinWar message or plain object to encode + * @param {CGCMsgGC_War_JoinWar.$Properties} message CGCMsgGC_War_JoinWar message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGC_War_JoinWar.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGC_War_JoinWar.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -34519,28 +44627,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGC_War_JoinWar} CGCMsgGC_War_JoinWar + * @returns {CGCMsgGC_War_JoinWar & CGCMsgGC_War_JoinWar.$Shape} CGCMsgGC_War_JoinWar * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGC_War_JoinWar.decode = function decode(reader, length) { + CGCMsgGC_War_JoinWar.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGC_War_JoinWar(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGC_War_JoinWar(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.affiliation = reader.uint32(); - break; - case 2: - message.war_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.affiliation = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.war_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -34550,11 +44678,11 @@ * @memberof CGCMsgGC_War_JoinWar * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGC_War_JoinWar} CGCMsgGC_War_JoinWar + * @returns {CGCMsgGC_War_JoinWar & CGCMsgGC_War_JoinWar.$Shape} CGCMsgGC_War_JoinWar * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGC_War_JoinWar.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGC_War_JoinWar.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34568,13 +44696,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGC_War_JoinWar.verify = function verify(message) { + CGCMsgGC_War_JoinWar.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.affiliation != null && message.hasOwnProperty("affiliation")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.affiliation != null && $Object.hasOwnProperty.call(message, "affiliation")) if (!$util.isInteger(message.affiliation)) return "affiliation: integer expected"; - if (message.war_id != null && message.hasOwnProperty("war_id")) + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) if (!$util.isInteger(message.war_id)) return "war_id: integer expected"; return null; @@ -34588,9 +44720,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgGC_War_JoinWar} CGCMsgGC_War_JoinWar */ - CGCMsgGC_War_JoinWar.fromObject = function fromObject(object) { + CGCMsgGC_War_JoinWar.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGC_War_JoinWar) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGC_War_JoinWar: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGC_War_JoinWar(); if (object.affiliation != null) message.affiliation = object.affiliation >>> 0; @@ -34608,17 +44746,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGC_War_JoinWar.toObject = function toObject(message, options) { + CGCMsgGC_War_JoinWar.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.affiliation = 0; object.war_id = 0; } - if (message.affiliation != null && message.hasOwnProperty("affiliation")) + if (message.affiliation != null && $Object.hasOwnProperty.call(message, "affiliation")) object.affiliation = message.affiliation; - if (message.war_id != null && message.hasOwnProperty("war_id")) + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) object.war_id = message.war_id; return object; }; @@ -34630,8 +44772,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGC_War_JoinWar.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGC_War_JoinWar.prototype.toJSON = function() { + return CGCMsgGC_War_JoinWar.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGC_War_JoinWar + * @function getTypeUrl + * @memberof CGCMsgGC_War_JoinWar + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGC_War_JoinWar.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGC_War_JoinWar"; }; return CGCMsgGC_War_JoinWar; @@ -34639,27 +44795,40 @@ $root.CGCMsgGC_War_RequestGlobalStats = (function() { + /** + * Properties of a CGCMsgGC_War_RequestGlobalStats. + * @typedef {Object} CGCMsgGC_War_RequestGlobalStats.$Properties + * @property {number|null} [war_id] CGCMsgGC_War_RequestGlobalStats war_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGC_War_RequestGlobalStats. * @exports ICGCMsgGC_War_RequestGlobalStats * @interface ICGCMsgGC_War_RequestGlobalStats - * @property {number|null} [war_id] CGCMsgGC_War_RequestGlobalStats war_id + * @augments CGCMsgGC_War_RequestGlobalStats.$Properties + * @deprecated Use CGCMsgGC_War_RequestGlobalStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgGC_War_RequestGlobalStats. + * @typedef {CGCMsgGC_War_RequestGlobalStats.$Properties} CGCMsgGC_War_RequestGlobalStats.$Shape */ /** * Constructs a new CGCMsgGC_War_RequestGlobalStats. * @exports CGCMsgGC_War_RequestGlobalStats * @classdesc Represents a CGCMsgGC_War_RequestGlobalStats. - * @implements ICGCMsgGC_War_RequestGlobalStats * @constructor - * @param {ICGCMsgGC_War_RequestGlobalStats=} [properties] Properties to set + * @param {CGCMsgGC_War_RequestGlobalStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGC_War_RequestGlobalStats(properties) { + var CGCMsgGC_War_RequestGlobalStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGC_War_RequestGlobalStats war_id. @@ -34674,10 +44843,14 @@ * @function create * @memberof CGCMsgGC_War_RequestGlobalStats * @static - * @param {ICGCMsgGC_War_RequestGlobalStats=} [properties] Properties to set + * @param {CGCMsgGC_War_RequestGlobalStats.$Properties=} [properties] Properties to set * @returns {CGCMsgGC_War_RequestGlobalStats} CGCMsgGC_War_RequestGlobalStats instance + * @type {{ + * (properties: CGCMsgGC_War_RequestGlobalStats.$Shape): CGCMsgGC_War_RequestGlobalStats & CGCMsgGC_War_RequestGlobalStats.$Shape; + * (properties?: CGCMsgGC_War_RequestGlobalStats.$Properties): CGCMsgGC_War_RequestGlobalStats; + * }} */ - CGCMsgGC_War_RequestGlobalStats.create = function create(properties) { + CGCMsgGC_War_RequestGlobalStats.create = function(properties) { return new CGCMsgGC_War_RequestGlobalStats(properties); }; @@ -34686,15 +44859,22 @@ * @function encode * @memberof CGCMsgGC_War_RequestGlobalStats * @static - * @param {ICGCMsgGC_War_RequestGlobalStats} message CGCMsgGC_War_RequestGlobalStats message or plain object to encode + * @param {CGCMsgGC_War_RequestGlobalStats.$Properties} message CGCMsgGC_War_RequestGlobalStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGC_War_RequestGlobalStats.encode = function encode(message, writer) { + CGCMsgGC_War_RequestGlobalStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.war_id != null && Object.hasOwnProperty.call(message, "war_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.war_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -34703,12 +44883,12 @@ * @function encodeDelimited * @memberof CGCMsgGC_War_RequestGlobalStats * @static - * @param {ICGCMsgGC_War_RequestGlobalStats} message CGCMsgGC_War_RequestGlobalStats message or plain object to encode + * @param {CGCMsgGC_War_RequestGlobalStats.$Properties} message CGCMsgGC_War_RequestGlobalStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGC_War_RequestGlobalStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGC_War_RequestGlobalStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -34718,25 +44898,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGC_War_RequestGlobalStats} CGCMsgGC_War_RequestGlobalStats + * @returns {CGCMsgGC_War_RequestGlobalStats & CGCMsgGC_War_RequestGlobalStats.$Shape} CGCMsgGC_War_RequestGlobalStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGC_War_RequestGlobalStats.decode = function decode(reader, length) { + CGCMsgGC_War_RequestGlobalStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGC_War_RequestGlobalStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGC_War_RequestGlobalStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.war_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.war_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -34746,11 +44943,11 @@ * @memberof CGCMsgGC_War_RequestGlobalStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGC_War_RequestGlobalStats} CGCMsgGC_War_RequestGlobalStats + * @returns {CGCMsgGC_War_RequestGlobalStats & CGCMsgGC_War_RequestGlobalStats.$Shape} CGCMsgGC_War_RequestGlobalStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGC_War_RequestGlobalStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGC_War_RequestGlobalStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34764,10 +44961,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGC_War_RequestGlobalStats.verify = function verify(message) { + CGCMsgGC_War_RequestGlobalStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.war_id != null && message.hasOwnProperty("war_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) if (!$util.isInteger(message.war_id)) return "war_id: integer expected"; return null; @@ -34781,9 +44982,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgGC_War_RequestGlobalStats} CGCMsgGC_War_RequestGlobalStats */ - CGCMsgGC_War_RequestGlobalStats.fromObject = function fromObject(object) { + CGCMsgGC_War_RequestGlobalStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGC_War_RequestGlobalStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGC_War_RequestGlobalStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGC_War_RequestGlobalStats(); if (object.war_id != null) message.war_id = object.war_id >>> 0; @@ -34799,13 +45006,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGC_War_RequestGlobalStats.toObject = function toObject(message, options) { + CGCMsgGC_War_RequestGlobalStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.war_id = 0; - if (message.war_id != null && message.hasOwnProperty("war_id")) + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) object.war_id = message.war_id; return object; }; @@ -34817,8 +45028,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGC_War_RequestGlobalStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGC_War_RequestGlobalStats.prototype.toJSON = function() { + return CGCMsgGC_War_RequestGlobalStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGC_War_RequestGlobalStats + * @function getTypeUrl + * @memberof CGCMsgGC_War_RequestGlobalStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGC_War_RequestGlobalStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGC_War_RequestGlobalStats"; }; return CGCMsgGC_War_RequestGlobalStats; @@ -34826,33 +45051,46 @@ $root.CGCMsgGC_War_GlobalStatsResponse = (function() { + /** + * Properties of a CGCMsgGC_War_GlobalStatsResponse. + * @typedef {Object} CGCMsgGC_War_GlobalStatsResponse.$Properties + * @property {Array.|null} [side_scores] CGCMsgGC_War_GlobalStatsResponse side_scores + * @property {number|null} [war_id] CGCMsgGC_War_GlobalStatsResponse war_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGC_War_GlobalStatsResponse. * @exports ICGCMsgGC_War_GlobalStatsResponse * @interface ICGCMsgGC_War_GlobalStatsResponse - * @property {Array.|null} [side_scores] CGCMsgGC_War_GlobalStatsResponse side_scores - * @property {number|null} [war_id] CGCMsgGC_War_GlobalStatsResponse war_id + * @augments CGCMsgGC_War_GlobalStatsResponse.$Properties + * @deprecated Use CGCMsgGC_War_GlobalStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgGC_War_GlobalStatsResponse. + * @typedef {CGCMsgGC_War_GlobalStatsResponse.$Properties} CGCMsgGC_War_GlobalStatsResponse.$Shape */ /** * Constructs a new CGCMsgGC_War_GlobalStatsResponse. * @exports CGCMsgGC_War_GlobalStatsResponse * @classdesc Represents a CGCMsgGC_War_GlobalStatsResponse. - * @implements ICGCMsgGC_War_GlobalStatsResponse * @constructor - * @param {ICGCMsgGC_War_GlobalStatsResponse=} [properties] Properties to set + * @param {CGCMsgGC_War_GlobalStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGC_War_GlobalStatsResponse(properties) { + var CGCMsgGC_War_GlobalStatsResponse = function (properties) { this.side_scores = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGC_War_GlobalStatsResponse side_scores. - * @member {Array.} side_scores + * @member {Array.} side_scores * @memberof CGCMsgGC_War_GlobalStatsResponse * @instance */ @@ -34871,10 +45109,14 @@ * @function create * @memberof CGCMsgGC_War_GlobalStatsResponse * @static - * @param {ICGCMsgGC_War_GlobalStatsResponse=} [properties] Properties to set + * @param {CGCMsgGC_War_GlobalStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgGC_War_GlobalStatsResponse} CGCMsgGC_War_GlobalStatsResponse instance + * @type {{ + * (properties: CGCMsgGC_War_GlobalStatsResponse.$Shape): CGCMsgGC_War_GlobalStatsResponse & CGCMsgGC_War_GlobalStatsResponse.$Shape; + * (properties?: CGCMsgGC_War_GlobalStatsResponse.$Properties): CGCMsgGC_War_GlobalStatsResponse; + * }} */ - CGCMsgGC_War_GlobalStatsResponse.create = function create(properties) { + CGCMsgGC_War_GlobalStatsResponse.create = function(properties) { return new CGCMsgGC_War_GlobalStatsResponse(properties); }; @@ -34883,18 +45125,25 @@ * @function encode * @memberof CGCMsgGC_War_GlobalStatsResponse * @static - * @param {ICGCMsgGC_War_GlobalStatsResponse} message CGCMsgGC_War_GlobalStatsResponse message or plain object to encode + * @param {CGCMsgGC_War_GlobalStatsResponse.$Properties} message CGCMsgGC_War_GlobalStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGC_War_GlobalStatsResponse.encode = function encode(message, writer) { + CGCMsgGC_War_GlobalStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.side_scores != null && message.side_scores.length) for (var i = 0; i < message.side_scores.length; ++i) - $root.CGCMsgGC_War_GlobalStatsResponse.SideScore.encode(message.side_scores[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.war_id != null && Object.hasOwnProperty.call(message, "war_id")) + $root.CGCMsgGC_War_GlobalStatsResponse.SideScore.encode(message.side_scores[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.war_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -34903,12 +45152,12 @@ * @function encodeDelimited * @memberof CGCMsgGC_War_GlobalStatsResponse * @static - * @param {ICGCMsgGC_War_GlobalStatsResponse} message CGCMsgGC_War_GlobalStatsResponse message or plain object to encode + * @param {CGCMsgGC_War_GlobalStatsResponse.$Properties} message CGCMsgGC_War_GlobalStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGC_War_GlobalStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGC_War_GlobalStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -34918,30 +45167,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGC_War_GlobalStatsResponse} CGCMsgGC_War_GlobalStatsResponse + * @returns {CGCMsgGC_War_GlobalStatsResponse & CGCMsgGC_War_GlobalStatsResponse.$Shape} CGCMsgGC_War_GlobalStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGC_War_GlobalStatsResponse.decode = function decode(reader, length) { + CGCMsgGC_War_GlobalStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGC_War_GlobalStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGC_War_GlobalStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.side_scores && message.side_scores.length)) - message.side_scores = []; - message.side_scores.push($root.CGCMsgGC_War_GlobalStatsResponse.SideScore.decode(reader, reader.uint32())); - break; - case 2: - message.war_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.side_scores && message.side_scores.length)) + message.side_scores = []; + message.side_scores.push($root.CGCMsgGC_War_GlobalStatsResponse.SideScore.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.war_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -34951,11 +45220,11 @@ * @memberof CGCMsgGC_War_GlobalStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGC_War_GlobalStatsResponse} CGCMsgGC_War_GlobalStatsResponse + * @returns {CGCMsgGC_War_GlobalStatsResponse & CGCMsgGC_War_GlobalStatsResponse.$Shape} CGCMsgGC_War_GlobalStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGC_War_GlobalStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGC_War_GlobalStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -34969,19 +45238,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGC_War_GlobalStatsResponse.verify = function verify(message) { + CGCMsgGC_War_GlobalStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.side_scores != null && message.hasOwnProperty("side_scores")) { - if (!Array.isArray(message.side_scores)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.side_scores != null && $Object.hasOwnProperty.call(message, "side_scores")) { + if (!$Array.isArray(message.side_scores)) return "side_scores: array expected"; for (var i = 0; i < message.side_scores.length; ++i) { - var error = $root.CGCMsgGC_War_GlobalStatsResponse.SideScore.verify(message.side_scores[i]); + var error = $root.CGCMsgGC_War_GlobalStatsResponse.SideScore.verify(message.side_scores[i], _depth + 1); if (error) return "side_scores." + error; } } - if (message.war_id != null && message.hasOwnProperty("war_id")) + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) if (!$util.isInteger(message.war_id)) return "war_id: integer expected"; return null; @@ -34995,18 +45268,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgGC_War_GlobalStatsResponse} CGCMsgGC_War_GlobalStatsResponse */ - CGCMsgGC_War_GlobalStatsResponse.fromObject = function fromObject(object) { + CGCMsgGC_War_GlobalStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGC_War_GlobalStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGC_War_GlobalStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGC_War_GlobalStatsResponse(); if (object.side_scores) { - if (!Array.isArray(object.side_scores)) - throw TypeError(".CGCMsgGC_War_GlobalStatsResponse.side_scores: array expected"); - message.side_scores = []; + if (!$Array.isArray(object.side_scores)) + throw $TypeError(".CGCMsgGC_War_GlobalStatsResponse.side_scores: array expected"); + message.side_scores = $Array(object.side_scores.length); for (var i = 0; i < object.side_scores.length; ++i) { - if (typeof object.side_scores[i] !== "object") - throw TypeError(".CGCMsgGC_War_GlobalStatsResponse.side_scores: object expected"); - message.side_scores[i] = $root.CGCMsgGC_War_GlobalStatsResponse.SideScore.fromObject(object.side_scores[i]); + if (!$util.isObject(object.side_scores[i])) + throw $TypeError(".CGCMsgGC_War_GlobalStatsResponse.side_scores: object expected"); + message.side_scores[i] = $root.CGCMsgGC_War_GlobalStatsResponse.SideScore.fromObject(object.side_scores[i], _depth + 1); } } if (object.war_id != null) @@ -35023,20 +45302,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGC_War_GlobalStatsResponse.toObject = function toObject(message, options) { + CGCMsgGC_War_GlobalStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.side_scores = []; if (options.defaults) object.war_id = 0; if (message.side_scores && message.side_scores.length) { - object.side_scores = []; + object.side_scores = $Array(message.side_scores.length); for (var j = 0; j < message.side_scores.length; ++j) - object.side_scores[j] = $root.CGCMsgGC_War_GlobalStatsResponse.SideScore.toObject(message.side_scores[j], options); + object.side_scores[j] = $root.CGCMsgGC_War_GlobalStatsResponse.SideScore.toObject(message.side_scores[j], options, _depth + 1); } - if (message.war_id != null && message.hasOwnProperty("war_id")) + if (message.war_id != null && $Object.hasOwnProperty.call(message, "war_id")) object.war_id = message.war_id; return object; }; @@ -35048,34 +45331,61 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGC_War_GlobalStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGC_War_GlobalStatsResponse.prototype.toJSON = function() { + return CGCMsgGC_War_GlobalStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGC_War_GlobalStatsResponse + * @function getTypeUrl + * @memberof CGCMsgGC_War_GlobalStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGC_War_GlobalStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGC_War_GlobalStatsResponse"; }; CGCMsgGC_War_GlobalStatsResponse.SideScore = (function() { /** * Properties of a SideScore. - * @memberof CGCMsgGC_War_GlobalStatsResponse - * @interface ISideScore + * @typedef {Object} CGCMsgGC_War_GlobalStatsResponse.SideScore.$Properties * @property {number|null} [side] SideScore side * @property {number|Long|null} [score] SideScore score + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SideScore. + * @memberof CGCMsgGC_War_GlobalStatsResponse + * @interface ISideScore + * @augments CGCMsgGC_War_GlobalStatsResponse.SideScore.$Properties + * @deprecated Use CGCMsgGC_War_GlobalStatsResponse.SideScore.$Properties instead. + */ + + /** + * Shape of a SideScore. + * @typedef {CGCMsgGC_War_GlobalStatsResponse.SideScore.$Properties} CGCMsgGC_War_GlobalStatsResponse.SideScore.$Shape */ /** * Constructs a new SideScore. * @memberof CGCMsgGC_War_GlobalStatsResponse * @classdesc Represents a SideScore. - * @implements ISideScore * @constructor - * @param {CGCMsgGC_War_GlobalStatsResponse.ISideScore=} [properties] Properties to set + * @param {CGCMsgGC_War_GlobalStatsResponse.SideScore.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SideScore(properties) { + var SideScore = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SideScore side. @@ -35098,10 +45408,14 @@ * @function create * @memberof CGCMsgGC_War_GlobalStatsResponse.SideScore * @static - * @param {CGCMsgGC_War_GlobalStatsResponse.ISideScore=} [properties] Properties to set + * @param {CGCMsgGC_War_GlobalStatsResponse.SideScore.$Properties=} [properties] Properties to set * @returns {CGCMsgGC_War_GlobalStatsResponse.SideScore} SideScore instance + * @type {{ + * (properties: CGCMsgGC_War_GlobalStatsResponse.SideScore.$Shape): CGCMsgGC_War_GlobalStatsResponse.SideScore & CGCMsgGC_War_GlobalStatsResponse.SideScore.$Shape; + * (properties?: CGCMsgGC_War_GlobalStatsResponse.SideScore.$Properties): CGCMsgGC_War_GlobalStatsResponse.SideScore; + * }} */ - SideScore.create = function create(properties) { + SideScore.create = function(properties) { return new SideScore(properties); }; @@ -35110,17 +45424,24 @@ * @function encode * @memberof CGCMsgGC_War_GlobalStatsResponse.SideScore * @static - * @param {CGCMsgGC_War_GlobalStatsResponse.ISideScore} message SideScore message or plain object to encode + * @param {CGCMsgGC_War_GlobalStatsResponse.SideScore.$Properties} message SideScore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SideScore.encode = function encode(message, writer) { + SideScore.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.side != null && Object.hasOwnProperty.call(message, "side")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.side != null && $Object.hasOwnProperty.call(message, "side")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.side); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.score); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -35129,12 +45450,12 @@ * @function encodeDelimited * @memberof CGCMsgGC_War_GlobalStatsResponse.SideScore * @static - * @param {CGCMsgGC_War_GlobalStatsResponse.ISideScore} message SideScore message or plain object to encode + * @param {CGCMsgGC_War_GlobalStatsResponse.SideScore.$Properties} message SideScore message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SideScore.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SideScore.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -35144,28 +45465,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGC_War_GlobalStatsResponse.SideScore} SideScore + * @returns {CGCMsgGC_War_GlobalStatsResponse.SideScore & CGCMsgGC_War_GlobalStatsResponse.SideScore.$Shape} SideScore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SideScore.decode = function decode(reader, length) { + SideScore.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGC_War_GlobalStatsResponse.SideScore(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGC_War_GlobalStatsResponse.SideScore(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.side = reader.uint32(); - break; - case 2: - message.score = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.side = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.score = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -35175,11 +45516,11 @@ * @memberof CGCMsgGC_War_GlobalStatsResponse.SideScore * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGC_War_GlobalStatsResponse.SideScore} SideScore + * @returns {CGCMsgGC_War_GlobalStatsResponse.SideScore & CGCMsgGC_War_GlobalStatsResponse.SideScore.$Shape} SideScore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SideScore.decodeDelimited = function decodeDelimited(reader) { + SideScore.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -35193,13 +45534,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SideScore.verify = function verify(message) { + SideScore.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.side != null && message.hasOwnProperty("side")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.side != null && $Object.hasOwnProperty.call(message, "side")) if (!$util.isInteger(message.side)) return "side: integer expected"; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) if (!$util.isInteger(message.score) && !(message.score && $util.isInteger(message.score.low) && $util.isInteger(message.score.high))) return "score: integer|Long expected"; return null; @@ -35213,17 +45558,23 @@ * @param {Object.} object Plain object * @returns {CGCMsgGC_War_GlobalStatsResponse.SideScore} SideScore */ - SideScore.fromObject = function fromObject(object) { + SideScore.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGC_War_GlobalStatsResponse.SideScore) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGC_War_GlobalStatsResponse.SideScore: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGC_War_GlobalStatsResponse.SideScore(); if (object.side != null) message.side = object.side >>> 0; if (object.score != null) if ($util.Long) - (message.score = $util.Long.fromValue(object.score)).unsigned = true; + message.score = $util.Long.fromValue(object.score, true); else if (typeof object.score === "string") - message.score = parseInt(object.score, 10); + message.score = $parseInt(object.score, 10); else if (typeof object.score === "number") message.score = object.score; else if (typeof object.score === "object") @@ -35240,25 +45591,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SideScore.toObject = function toObject(message, options) { + SideScore.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.side = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.score = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.score = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.score = options.longs === String ? "0" : 0; + object.score = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.side != null && message.hasOwnProperty("side")) + if (message.side != null && $Object.hasOwnProperty.call(message, "side")) object.side = message.side; - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score === "number") - object.score = options.longs === String ? String(message.score) : message.score; + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.score = typeof message.score === "number" ? $BigInt(message.score) : $util.Long.fromBits(message.score.low >>> 0, message.score.high >>> 0, true).toBigInt(); + else if (typeof message.score === "number") + object.score = options.longs === $String ? $String(message.score) : message.score; else - object.score = options.longs === String ? $util.Long.prototype.toString.call(message.score) : options.longs === Number ? new $util.LongBits(message.score.low >>> 0, message.score.high >>> 0).toNumber(true) : message.score; + object.score = options.longs === $String ? $util.Long.prototype.toString.call(message.score) : options.longs === $Number ? new $util.LongBits(message.score.low >>> 0, message.score.high >>> 0).toNumber(true) : message.score; return object; }; @@ -35269,8 +45626,22 @@ * @instance * @returns {Object.} JSON object */ - SideScore.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SideScore.prototype.toJSON = function() { + return SideScore.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SideScore + * @function getTypeUrl + * @memberof CGCMsgGC_War_GlobalStatsResponse.SideScore + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SideScore.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGC_War_GlobalStatsResponse.SideScore"; }; return SideScore; @@ -35283,28 +45654,41 @@ /** * Properties of a CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate. - * @exports ICGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate - * @interface ICGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate + * @typedef {Object} CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Properties * @property {number|null} [score] CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate score * @property {number|null} [type] CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate type * @property {Uint8Array|null} [score_id] CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate score_id * @property {number|null} [score_check] CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate score_check + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate. + * @exports ICGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate + * @interface ICGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate + * @augments CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Properties + * @deprecated Use CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Properties instead. + */ + + /** + * Shape of a CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate. + * @typedef {CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Properties} CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Shape */ /** * Constructs a new CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate. * @exports CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate * @classdesc Represents a CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate. - * @implements ICGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate * @constructor - * @param {ICGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate=} [properties] Properties to set + * @param {CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate(properties) { + var CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate score. @@ -35343,10 +45727,14 @@ * @function create * @memberof CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate * @static - * @param {ICGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate=} [properties] Properties to set + * @param {CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Properties=} [properties] Properties to set * @returns {CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate} CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate instance + * @type {{ + * (properties: CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Shape): CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate & CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Shape; + * (properties?: CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Properties): CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate; + * }} */ - CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.create = function create(properties) { + CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.create = function(properties) { return new CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate(properties); }; @@ -35355,21 +45743,28 @@ * @function encode * @memberof CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate * @static - * @param {ICGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate} message CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate message or plain object to encode + * @param {CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Properties} message CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.encode = function encode(message, writer) { + CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.score); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.type); - if (message.score_id != null && Object.hasOwnProperty.call(message, "score_id")) + if (message.score_id != null && $Object.hasOwnProperty.call(message, "score_id")) writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.score_id); - if (message.score_check != null && Object.hasOwnProperty.call(message, "score_check")) + if (message.score_check != null && $Object.hasOwnProperty.call(message, "score_check")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.score_check); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -35378,12 +45773,12 @@ * @function encodeDelimited * @memberof CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate * @static - * @param {ICGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate} message CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate message or plain object to encode + * @param {CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Properties} message CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -35393,34 +45788,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate} CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate + * @returns {CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate & CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Shape} CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.decode = function decode(reader, length) { + CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.score = reader.uint32(); - break; - case 3: - message.type = reader.uint32(); - break; - case 4: - message.score_id = reader.bytes(); - break; - case 5: - message.score_check = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 0) + break; + message.score = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.type = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.score_id = reader.bytes(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.score_check = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -35430,11 +45851,11 @@ * @memberof CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate} CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate + * @returns {CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate & CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.$Shape} CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -35448,19 +45869,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.verify = function verify(message) { + CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.score != null && message.hasOwnProperty("score")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) if (!$util.isInteger(message.score)) return "score: integer expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) if (!$util.isInteger(message.type)) return "type: integer expected"; - if (message.score_id != null && message.hasOwnProperty("score_id")) + if (message.score_id != null && $Object.hasOwnProperty.call(message, "score_id")) if (!(message.score_id && typeof message.score_id.length === "number" || $util.isString(message.score_id))) return "score_id: buffer expected"; - if (message.score_check != null && message.hasOwnProperty("score_check")) + if (message.score_check != null && $Object.hasOwnProperty.call(message, "score_check")) if (!$util.isInteger(message.score_check)) return "score_check: integer expected"; return null; @@ -35474,9 +45899,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate} CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate */ - CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.fromObject = function fromObject(object) { + CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate(); if (object.score != null) message.score = object.score >>> 0; @@ -35485,7 +45916,7 @@ if (object.score_id != null) if (typeof object.score_id === "string") $util.base64.decode(object.score_id, message.score_id = $util.newBuffer($util.base64.length(object.score_id)), 0); - else if (object.score_id.length) + else if (object.score_id.length >= 0) message.score_id = object.score_id; if (object.score_check != null) message.score_check = object.score_check >>> 0; @@ -35501,29 +45932,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.toObject = function toObject(message, options) { + CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.score = 0; object.type = 0; - if (options.bytes === String) + if (options.bytes === $String) object.score_id = ""; else { object.score_id = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.score_id = $util.newBuffer(object.score_id); } object.score_check = 0; } - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) object.score = message.score; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.score_id != null && message.hasOwnProperty("score_id")) - object.score_id = options.bytes === String ? $util.base64.encode(message.score_id, 0, message.score_id.length) : options.bytes === Array ? Array.prototype.slice.call(message.score_id) : message.score_id; - if (message.score_check != null && message.hasOwnProperty("score_check")) + if (message.score_id != null && $Object.hasOwnProperty.call(message, "score_id")) + object.score_id = options.bytes === $String ? $util.base64.encode(message.score_id, 0, message.score_id.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.score_id) : message.score_id; + if (message.score_check != null && $Object.hasOwnProperty.call(message, "score_check")) object.score_check = message.score_check; return object; }; @@ -35535,8 +45970,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.prototype.toJSON = function() { + return CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate + * @function getTypeUrl + * @memberof CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate"; }; return CGCMsgGC_PlayerDuckLeaderboard_IndividualUpdate; @@ -35546,8 +45995,7 @@ /** * Properties of a CAttribute_WorldItemPlacement. - * @exports ICAttribute_WorldItemPlacement - * @interface ICAttribute_WorldItemPlacement + * @typedef {Object} CAttribute_WorldItemPlacement.$Properties * @property {number|Long|null} [original_item_id] CAttribute_WorldItemPlacement original_item_id * @property {number|null} [pos_x] CAttribute_WorldItemPlacement pos_x * @property {number|null} [pos_y] CAttribute_WorldItemPlacement pos_y @@ -35555,22 +46003,36 @@ * @property {number|null} [ang_x] CAttribute_WorldItemPlacement ang_x * @property {number|null} [ang_y] CAttribute_WorldItemPlacement ang_y * @property {number|null} [ang_z] CAttribute_WorldItemPlacement ang_z + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CAttribute_WorldItemPlacement. + * @exports ICAttribute_WorldItemPlacement + * @interface ICAttribute_WorldItemPlacement + * @augments CAttribute_WorldItemPlacement.$Properties + * @deprecated Use CAttribute_WorldItemPlacement.$Properties instead. + */ + + /** + * Shape of a CAttribute_WorldItemPlacement. + * @typedef {CAttribute_WorldItemPlacement.$Properties} CAttribute_WorldItemPlacement.$Shape */ /** * Constructs a new CAttribute_WorldItemPlacement. * @exports CAttribute_WorldItemPlacement * @classdesc Represents a CAttribute_WorldItemPlacement. - * @implements ICAttribute_WorldItemPlacement * @constructor - * @param {ICAttribute_WorldItemPlacement=} [properties] Properties to set + * @param {CAttribute_WorldItemPlacement.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CAttribute_WorldItemPlacement(properties) { + var CAttribute_WorldItemPlacement = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CAttribute_WorldItemPlacement original_item_id. @@ -35633,10 +46095,14 @@ * @function create * @memberof CAttribute_WorldItemPlacement * @static - * @param {ICAttribute_WorldItemPlacement=} [properties] Properties to set + * @param {CAttribute_WorldItemPlacement.$Properties=} [properties] Properties to set * @returns {CAttribute_WorldItemPlacement} CAttribute_WorldItemPlacement instance + * @type {{ + * (properties: CAttribute_WorldItemPlacement.$Shape): CAttribute_WorldItemPlacement & CAttribute_WorldItemPlacement.$Shape; + * (properties?: CAttribute_WorldItemPlacement.$Properties): CAttribute_WorldItemPlacement; + * }} */ - CAttribute_WorldItemPlacement.create = function create(properties) { + CAttribute_WorldItemPlacement.create = function(properties) { return new CAttribute_WorldItemPlacement(properties); }; @@ -35645,27 +46111,34 @@ * @function encode * @memberof CAttribute_WorldItemPlacement * @static - * @param {ICAttribute_WorldItemPlacement} message CAttribute_WorldItemPlacement message or plain object to encode + * @param {CAttribute_WorldItemPlacement.$Properties} message CAttribute_WorldItemPlacement message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CAttribute_WorldItemPlacement.encode = function encode(message, writer) { + CAttribute_WorldItemPlacement.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.original_item_id != null && Object.hasOwnProperty.call(message, "original_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.original_item_id != null && $Object.hasOwnProperty.call(message, "original_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.original_item_id); - if (message.pos_x != null && Object.hasOwnProperty.call(message, "pos_x")) + if (message.pos_x != null && $Object.hasOwnProperty.call(message, "pos_x")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.pos_x); - if (message.pos_y != null && Object.hasOwnProperty.call(message, "pos_y")) + if (message.pos_y != null && $Object.hasOwnProperty.call(message, "pos_y")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.pos_y); - if (message.pos_z != null && Object.hasOwnProperty.call(message, "pos_z")) + if (message.pos_z != null && $Object.hasOwnProperty.call(message, "pos_z")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.pos_z); - if (message.ang_x != null && Object.hasOwnProperty.call(message, "ang_x")) + if (message.ang_x != null && $Object.hasOwnProperty.call(message, "ang_x")) writer.uint32(/* id 5, wireType 5 =*/45).float(message.ang_x); - if (message.ang_y != null && Object.hasOwnProperty.call(message, "ang_y")) + if (message.ang_y != null && $Object.hasOwnProperty.call(message, "ang_y")) writer.uint32(/* id 6, wireType 5 =*/53).float(message.ang_y); - if (message.ang_z != null && Object.hasOwnProperty.call(message, "ang_z")) + if (message.ang_z != null && $Object.hasOwnProperty.call(message, "ang_z")) writer.uint32(/* id 7, wireType 5 =*/61).float(message.ang_z); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -35674,12 +46147,12 @@ * @function encodeDelimited * @memberof CAttribute_WorldItemPlacement * @static - * @param {ICAttribute_WorldItemPlacement} message CAttribute_WorldItemPlacement message or plain object to encode + * @param {CAttribute_WorldItemPlacement.$Properties} message CAttribute_WorldItemPlacement message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CAttribute_WorldItemPlacement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CAttribute_WorldItemPlacement.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -35689,43 +46162,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CAttribute_WorldItemPlacement} CAttribute_WorldItemPlacement + * @returns {CAttribute_WorldItemPlacement & CAttribute_WorldItemPlacement.$Shape} CAttribute_WorldItemPlacement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CAttribute_WorldItemPlacement.decode = function decode(reader, length) { + CAttribute_WorldItemPlacement.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CAttribute_WorldItemPlacement(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CAttribute_WorldItemPlacement(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.original_item_id = reader.uint64(); - break; - case 2: - message.pos_x = reader.float(); - break; - case 3: - message.pos_y = reader.float(); - break; - case 4: - message.pos_z = reader.float(); - break; - case 5: - message.ang_x = reader.float(); - break; - case 6: - message.ang_y = reader.float(); - break; - case 7: - message.ang_z = reader.float(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.original_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.pos_x = reader.float(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.pos_y = reader.float(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.pos_z = reader.float(); + continue; + } + case 5: { + if (wireType !== 5) + break; + message.ang_x = reader.float(); + continue; + } + case 6: { + if (wireType !== 5) + break; + message.ang_y = reader.float(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.ang_z = reader.float(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -35735,11 +46243,11 @@ * @memberof CAttribute_WorldItemPlacement * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CAttribute_WorldItemPlacement} CAttribute_WorldItemPlacement + * @returns {CAttribute_WorldItemPlacement & CAttribute_WorldItemPlacement.$Shape} CAttribute_WorldItemPlacement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CAttribute_WorldItemPlacement.decodeDelimited = function decodeDelimited(reader) { + CAttribute_WorldItemPlacement.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -35753,28 +46261,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CAttribute_WorldItemPlacement.verify = function verify(message) { + CAttribute_WorldItemPlacement.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.original_item_id != null && message.hasOwnProperty("original_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.original_item_id != null && $Object.hasOwnProperty.call(message, "original_item_id")) if (!$util.isInteger(message.original_item_id) && !(message.original_item_id && $util.isInteger(message.original_item_id.low) && $util.isInteger(message.original_item_id.high))) return "original_item_id: integer|Long expected"; - if (message.pos_x != null && message.hasOwnProperty("pos_x")) + if (message.pos_x != null && $Object.hasOwnProperty.call(message, "pos_x")) if (typeof message.pos_x !== "number") return "pos_x: number expected"; - if (message.pos_y != null && message.hasOwnProperty("pos_y")) + if (message.pos_y != null && $Object.hasOwnProperty.call(message, "pos_y")) if (typeof message.pos_y !== "number") return "pos_y: number expected"; - if (message.pos_z != null && message.hasOwnProperty("pos_z")) + if (message.pos_z != null && $Object.hasOwnProperty.call(message, "pos_z")) if (typeof message.pos_z !== "number") return "pos_z: number expected"; - if (message.ang_x != null && message.hasOwnProperty("ang_x")) + if (message.ang_x != null && $Object.hasOwnProperty.call(message, "ang_x")) if (typeof message.ang_x !== "number") return "ang_x: number expected"; - if (message.ang_y != null && message.hasOwnProperty("ang_y")) + if (message.ang_y != null && $Object.hasOwnProperty.call(message, "ang_y")) if (typeof message.ang_y !== "number") return "ang_y: number expected"; - if (message.ang_z != null && message.hasOwnProperty("ang_z")) + if (message.ang_z != null && $Object.hasOwnProperty.call(message, "ang_z")) if (typeof message.ang_z !== "number") return "ang_z: number expected"; return null; @@ -35788,31 +46300,37 @@ * @param {Object.} object Plain object * @returns {CAttribute_WorldItemPlacement} CAttribute_WorldItemPlacement */ - CAttribute_WorldItemPlacement.fromObject = function fromObject(object) { + CAttribute_WorldItemPlacement.fromObject = function (object, _depth) { if (object instanceof $root.CAttribute_WorldItemPlacement) return object; + if (!$util.isObject(object)) + throw $TypeError(".CAttribute_WorldItemPlacement: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CAttribute_WorldItemPlacement(); if (object.original_item_id != null) if ($util.Long) - (message.original_item_id = $util.Long.fromValue(object.original_item_id)).unsigned = true; + message.original_item_id = $util.Long.fromValue(object.original_item_id, true); else if (typeof object.original_item_id === "string") - message.original_item_id = parseInt(object.original_item_id, 10); + message.original_item_id = $parseInt(object.original_item_id, 10); else if (typeof object.original_item_id === "number") message.original_item_id = object.original_item_id; else if (typeof object.original_item_id === "object") message.original_item_id = new $util.LongBits(object.original_item_id.low >>> 0, object.original_item_id.high >>> 0).toNumber(true); if (object.pos_x != null) - message.pos_x = Number(object.pos_x); + message.pos_x = $Number(object.pos_x); if (object.pos_y != null) - message.pos_y = Number(object.pos_y); + message.pos_y = $Number(object.pos_y); if (object.pos_z != null) - message.pos_z = Number(object.pos_z); + message.pos_z = $Number(object.pos_z); if (object.ang_x != null) - message.ang_x = Number(object.ang_x); + message.ang_x = $Number(object.ang_x); if (object.ang_y != null) - message.ang_y = Number(object.ang_y); + message.ang_y = $Number(object.ang_y); if (object.ang_z != null) - message.ang_z = Number(object.ang_z); + message.ang_z = $Number(object.ang_z); return message; }; @@ -35825,16 +46343,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CAttribute_WorldItemPlacement.toObject = function toObject(message, options) { + CAttribute_WorldItemPlacement.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.original_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.original_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.original_item_id = options.longs === String ? "0" : 0; + object.original_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.pos_x = 0; object.pos_y = 0; object.pos_z = 0; @@ -35842,23 +46364,25 @@ object.ang_y = 0; object.ang_z = 0; } - if (message.original_item_id != null && message.hasOwnProperty("original_item_id")) - if (typeof message.original_item_id === "number") - object.original_item_id = options.longs === String ? String(message.original_item_id) : message.original_item_id; + if (message.original_item_id != null && $Object.hasOwnProperty.call(message, "original_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.original_item_id = typeof message.original_item_id === "number" ? $BigInt(message.original_item_id) : $util.Long.fromBits(message.original_item_id.low >>> 0, message.original_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.original_item_id === "number") + object.original_item_id = options.longs === $String ? $String(message.original_item_id) : message.original_item_id; else - object.original_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.original_item_id) : options.longs === Number ? new $util.LongBits(message.original_item_id.low >>> 0, message.original_item_id.high >>> 0).toNumber(true) : message.original_item_id; - if (message.pos_x != null && message.hasOwnProperty("pos_x")) - object.pos_x = options.json && !isFinite(message.pos_x) ? String(message.pos_x) : message.pos_x; - if (message.pos_y != null && message.hasOwnProperty("pos_y")) - object.pos_y = options.json && !isFinite(message.pos_y) ? String(message.pos_y) : message.pos_y; - if (message.pos_z != null && message.hasOwnProperty("pos_z")) - object.pos_z = options.json && !isFinite(message.pos_z) ? String(message.pos_z) : message.pos_z; - if (message.ang_x != null && message.hasOwnProperty("ang_x")) - object.ang_x = options.json && !isFinite(message.ang_x) ? String(message.ang_x) : message.ang_x; - if (message.ang_y != null && message.hasOwnProperty("ang_y")) - object.ang_y = options.json && !isFinite(message.ang_y) ? String(message.ang_y) : message.ang_y; - if (message.ang_z != null && message.hasOwnProperty("ang_z")) - object.ang_z = options.json && !isFinite(message.ang_z) ? String(message.ang_z) : message.ang_z; + object.original_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.original_item_id) : options.longs === $Number ? new $util.LongBits(message.original_item_id.low >>> 0, message.original_item_id.high >>> 0).toNumber(true) : message.original_item_id; + if (message.pos_x != null && $Object.hasOwnProperty.call(message, "pos_x")) + object.pos_x = options.json && !$isFinite(message.pos_x) ? $String(message.pos_x) : message.pos_x; + if (message.pos_y != null && $Object.hasOwnProperty.call(message, "pos_y")) + object.pos_y = options.json && !$isFinite(message.pos_y) ? $String(message.pos_y) : message.pos_y; + if (message.pos_z != null && $Object.hasOwnProperty.call(message, "pos_z")) + object.pos_z = options.json && !$isFinite(message.pos_z) ? $String(message.pos_z) : message.pos_z; + if (message.ang_x != null && $Object.hasOwnProperty.call(message, "ang_x")) + object.ang_x = options.json && !$isFinite(message.ang_x) ? $String(message.ang_x) : message.ang_x; + if (message.ang_y != null && $Object.hasOwnProperty.call(message, "ang_y")) + object.ang_y = options.json && !$isFinite(message.ang_y) ? $String(message.ang_y) : message.ang_y; + if (message.ang_z != null && $Object.hasOwnProperty.call(message, "ang_z")) + object.ang_z = options.json && !$isFinite(message.ang_z) ? $String(message.ang_z) : message.ang_z; return object; }; @@ -35869,8 +46393,22 @@ * @instance * @returns {Object.} JSON object */ - CAttribute_WorldItemPlacement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CAttribute_WorldItemPlacement.prototype.toJSON = function() { + return CAttribute_WorldItemPlacement.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CAttribute_WorldItemPlacement + * @function getTypeUrl + * @memberof CAttribute_WorldItemPlacement + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CAttribute_WorldItemPlacement.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CAttribute_WorldItemPlacement"; }; return CAttribute_WorldItemPlacement; @@ -35880,8 +46418,7 @@ /** * Properties of a CGCMsg_WorldItemPlacement_Update. - * @exports ICGCMsg_WorldItemPlacement_Update - * @interface ICGCMsg_WorldItemPlacement_Update + * @typedef {Object} CGCMsg_WorldItemPlacement_Update.$Properties * @property {number|Long|null} [original_item_id] CGCMsg_WorldItemPlacement_Update original_item_id * @property {number|null} [pos_x] CGCMsg_WorldItemPlacement_Update pos_x * @property {number|null} [pos_y] CGCMsg_WorldItemPlacement_Update pos_y @@ -35891,22 +46428,36 @@ * @property {number|null} [ang_z] CGCMsg_WorldItemPlacement_Update ang_z * @property {boolean|null} [force_remove_all] CGCMsg_WorldItemPlacement_Update force_remove_all * @property {string|null} [attrib_name] CGCMsg_WorldItemPlacement_Update attrib_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsg_WorldItemPlacement_Update. + * @exports ICGCMsg_WorldItemPlacement_Update + * @interface ICGCMsg_WorldItemPlacement_Update + * @augments CGCMsg_WorldItemPlacement_Update.$Properties + * @deprecated Use CGCMsg_WorldItemPlacement_Update.$Properties instead. + */ + + /** + * Shape of a CGCMsg_WorldItemPlacement_Update. + * @typedef {CGCMsg_WorldItemPlacement_Update.$Properties} CGCMsg_WorldItemPlacement_Update.$Shape */ /** * Constructs a new CGCMsg_WorldItemPlacement_Update. * @exports CGCMsg_WorldItemPlacement_Update * @classdesc Represents a CGCMsg_WorldItemPlacement_Update. - * @implements ICGCMsg_WorldItemPlacement_Update * @constructor - * @param {ICGCMsg_WorldItemPlacement_Update=} [properties] Properties to set + * @param {CGCMsg_WorldItemPlacement_Update.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsg_WorldItemPlacement_Update(properties) { + var CGCMsg_WorldItemPlacement_Update = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsg_WorldItemPlacement_Update original_item_id. @@ -35985,10 +46536,14 @@ * @function create * @memberof CGCMsg_WorldItemPlacement_Update * @static - * @param {ICGCMsg_WorldItemPlacement_Update=} [properties] Properties to set + * @param {CGCMsg_WorldItemPlacement_Update.$Properties=} [properties] Properties to set * @returns {CGCMsg_WorldItemPlacement_Update} CGCMsg_WorldItemPlacement_Update instance + * @type {{ + * (properties: CGCMsg_WorldItemPlacement_Update.$Shape): CGCMsg_WorldItemPlacement_Update & CGCMsg_WorldItemPlacement_Update.$Shape; + * (properties?: CGCMsg_WorldItemPlacement_Update.$Properties): CGCMsg_WorldItemPlacement_Update; + * }} */ - CGCMsg_WorldItemPlacement_Update.create = function create(properties) { + CGCMsg_WorldItemPlacement_Update.create = function(properties) { return new CGCMsg_WorldItemPlacement_Update(properties); }; @@ -35997,31 +46552,38 @@ * @function encode * @memberof CGCMsg_WorldItemPlacement_Update * @static - * @param {ICGCMsg_WorldItemPlacement_Update} message CGCMsg_WorldItemPlacement_Update message or plain object to encode + * @param {CGCMsg_WorldItemPlacement_Update.$Properties} message CGCMsg_WorldItemPlacement_Update message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsg_WorldItemPlacement_Update.encode = function encode(message, writer) { + CGCMsg_WorldItemPlacement_Update.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.original_item_id != null && Object.hasOwnProperty.call(message, "original_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.original_item_id != null && $Object.hasOwnProperty.call(message, "original_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.original_item_id); - if (message.pos_x != null && Object.hasOwnProperty.call(message, "pos_x")) + if (message.pos_x != null && $Object.hasOwnProperty.call(message, "pos_x")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.pos_x); - if (message.pos_y != null && Object.hasOwnProperty.call(message, "pos_y")) + if (message.pos_y != null && $Object.hasOwnProperty.call(message, "pos_y")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.pos_y); - if (message.pos_z != null && Object.hasOwnProperty.call(message, "pos_z")) + if (message.pos_z != null && $Object.hasOwnProperty.call(message, "pos_z")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.pos_z); - if (message.ang_x != null && Object.hasOwnProperty.call(message, "ang_x")) + if (message.ang_x != null && $Object.hasOwnProperty.call(message, "ang_x")) writer.uint32(/* id 5, wireType 5 =*/45).float(message.ang_x); - if (message.ang_y != null && Object.hasOwnProperty.call(message, "ang_y")) + if (message.ang_y != null && $Object.hasOwnProperty.call(message, "ang_y")) writer.uint32(/* id 6, wireType 5 =*/53).float(message.ang_y); - if (message.ang_z != null && Object.hasOwnProperty.call(message, "ang_z")) + if (message.ang_z != null && $Object.hasOwnProperty.call(message, "ang_z")) writer.uint32(/* id 7, wireType 5 =*/61).float(message.ang_z); - if (message.force_remove_all != null && Object.hasOwnProperty.call(message, "force_remove_all")) + if (message.force_remove_all != null && $Object.hasOwnProperty.call(message, "force_remove_all")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.force_remove_all); - if (message.attrib_name != null && Object.hasOwnProperty.call(message, "attrib_name")) + if (message.attrib_name != null && $Object.hasOwnProperty.call(message, "attrib_name")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.attrib_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -36030,12 +46592,12 @@ * @function encodeDelimited * @memberof CGCMsg_WorldItemPlacement_Update * @static - * @param {ICGCMsg_WorldItemPlacement_Update} message CGCMsg_WorldItemPlacement_Update message or plain object to encode + * @param {CGCMsg_WorldItemPlacement_Update.$Properties} message CGCMsg_WorldItemPlacement_Update message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsg_WorldItemPlacement_Update.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsg_WorldItemPlacement_Update.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -36045,49 +46607,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsg_WorldItemPlacement_Update} CGCMsg_WorldItemPlacement_Update + * @returns {CGCMsg_WorldItemPlacement_Update & CGCMsg_WorldItemPlacement_Update.$Shape} CGCMsg_WorldItemPlacement_Update * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsg_WorldItemPlacement_Update.decode = function decode(reader, length) { + CGCMsg_WorldItemPlacement_Update.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsg_WorldItemPlacement_Update(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsg_WorldItemPlacement_Update(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.original_item_id = reader.uint64(); - break; - case 2: - message.pos_x = reader.float(); - break; - case 3: - message.pos_y = reader.float(); - break; - case 4: - message.pos_z = reader.float(); - break; - case 5: - message.ang_x = reader.float(); - break; - case 6: - message.ang_y = reader.float(); - break; - case 7: - message.ang_z = reader.float(); - break; - case 8: - message.force_remove_all = reader.bool(); - break; - case 9: - message.attrib_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.original_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.pos_x = reader.float(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.pos_y = reader.float(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.pos_z = reader.float(); + continue; + } + case 5: { + if (wireType !== 5) + break; + message.ang_x = reader.float(); + continue; + } + case 6: { + if (wireType !== 5) + break; + message.ang_y = reader.float(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.ang_z = reader.float(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.force_remove_all = reader.bool(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.attrib_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -36097,11 +46700,11 @@ * @memberof CGCMsg_WorldItemPlacement_Update * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsg_WorldItemPlacement_Update} CGCMsg_WorldItemPlacement_Update + * @returns {CGCMsg_WorldItemPlacement_Update & CGCMsg_WorldItemPlacement_Update.$Shape} CGCMsg_WorldItemPlacement_Update * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsg_WorldItemPlacement_Update.decodeDelimited = function decodeDelimited(reader) { + CGCMsg_WorldItemPlacement_Update.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -36115,34 +46718,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsg_WorldItemPlacement_Update.verify = function verify(message) { + CGCMsg_WorldItemPlacement_Update.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.original_item_id != null && message.hasOwnProperty("original_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.original_item_id != null && $Object.hasOwnProperty.call(message, "original_item_id")) if (!$util.isInteger(message.original_item_id) && !(message.original_item_id && $util.isInteger(message.original_item_id.low) && $util.isInteger(message.original_item_id.high))) return "original_item_id: integer|Long expected"; - if (message.pos_x != null && message.hasOwnProperty("pos_x")) + if (message.pos_x != null && $Object.hasOwnProperty.call(message, "pos_x")) if (typeof message.pos_x !== "number") return "pos_x: number expected"; - if (message.pos_y != null && message.hasOwnProperty("pos_y")) + if (message.pos_y != null && $Object.hasOwnProperty.call(message, "pos_y")) if (typeof message.pos_y !== "number") return "pos_y: number expected"; - if (message.pos_z != null && message.hasOwnProperty("pos_z")) + if (message.pos_z != null && $Object.hasOwnProperty.call(message, "pos_z")) if (typeof message.pos_z !== "number") return "pos_z: number expected"; - if (message.ang_x != null && message.hasOwnProperty("ang_x")) + if (message.ang_x != null && $Object.hasOwnProperty.call(message, "ang_x")) if (typeof message.ang_x !== "number") return "ang_x: number expected"; - if (message.ang_y != null && message.hasOwnProperty("ang_y")) + if (message.ang_y != null && $Object.hasOwnProperty.call(message, "ang_y")) if (typeof message.ang_y !== "number") return "ang_y: number expected"; - if (message.ang_z != null && message.hasOwnProperty("ang_z")) + if (message.ang_z != null && $Object.hasOwnProperty.call(message, "ang_z")) if (typeof message.ang_z !== "number") return "ang_z: number expected"; - if (message.force_remove_all != null && message.hasOwnProperty("force_remove_all")) + if (message.force_remove_all != null && $Object.hasOwnProperty.call(message, "force_remove_all")) if (typeof message.force_remove_all !== "boolean") return "force_remove_all: boolean expected"; - if (message.attrib_name != null && message.hasOwnProperty("attrib_name")) + if (message.attrib_name != null && $Object.hasOwnProperty.call(message, "attrib_name")) if (!$util.isString(message.attrib_name)) return "attrib_name: string expected"; return null; @@ -36156,35 +46763,41 @@ * @param {Object.} object Plain object * @returns {CGCMsg_WorldItemPlacement_Update} CGCMsg_WorldItemPlacement_Update */ - CGCMsg_WorldItemPlacement_Update.fromObject = function fromObject(object) { + CGCMsg_WorldItemPlacement_Update.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsg_WorldItemPlacement_Update) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsg_WorldItemPlacement_Update: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsg_WorldItemPlacement_Update(); if (object.original_item_id != null) if ($util.Long) - (message.original_item_id = $util.Long.fromValue(object.original_item_id)).unsigned = true; + message.original_item_id = $util.Long.fromValue(object.original_item_id, true); else if (typeof object.original_item_id === "string") - message.original_item_id = parseInt(object.original_item_id, 10); + message.original_item_id = $parseInt(object.original_item_id, 10); else if (typeof object.original_item_id === "number") message.original_item_id = object.original_item_id; else if (typeof object.original_item_id === "object") message.original_item_id = new $util.LongBits(object.original_item_id.low >>> 0, object.original_item_id.high >>> 0).toNumber(true); if (object.pos_x != null) - message.pos_x = Number(object.pos_x); + message.pos_x = $Number(object.pos_x); if (object.pos_y != null) - message.pos_y = Number(object.pos_y); + message.pos_y = $Number(object.pos_y); if (object.pos_z != null) - message.pos_z = Number(object.pos_z); + message.pos_z = $Number(object.pos_z); if (object.ang_x != null) - message.ang_x = Number(object.ang_x); + message.ang_x = $Number(object.ang_x); if (object.ang_y != null) - message.ang_y = Number(object.ang_y); + message.ang_y = $Number(object.ang_y); if (object.ang_z != null) - message.ang_z = Number(object.ang_z); + message.ang_z = $Number(object.ang_z); if (object.force_remove_all != null) - message.force_remove_all = Boolean(object.force_remove_all); + message.force_remove_all = $Boolean(object.force_remove_all); if (object.attrib_name != null) - message.attrib_name = String(object.attrib_name); + message.attrib_name = $String(object.attrib_name); return message; }; @@ -36197,16 +46810,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsg_WorldItemPlacement_Update.toObject = function toObject(message, options) { + CGCMsg_WorldItemPlacement_Update.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.original_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.original_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.original_item_id = options.longs === String ? "0" : 0; + object.original_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.pos_x = 0; object.pos_y = 0; object.pos_z = 0; @@ -36216,26 +46833,28 @@ object.force_remove_all = false; object.attrib_name = ""; } - if (message.original_item_id != null && message.hasOwnProperty("original_item_id")) - if (typeof message.original_item_id === "number") - object.original_item_id = options.longs === String ? String(message.original_item_id) : message.original_item_id; + if (message.original_item_id != null && $Object.hasOwnProperty.call(message, "original_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.original_item_id = typeof message.original_item_id === "number" ? $BigInt(message.original_item_id) : $util.Long.fromBits(message.original_item_id.low >>> 0, message.original_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.original_item_id === "number") + object.original_item_id = options.longs === $String ? $String(message.original_item_id) : message.original_item_id; else - object.original_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.original_item_id) : options.longs === Number ? new $util.LongBits(message.original_item_id.low >>> 0, message.original_item_id.high >>> 0).toNumber(true) : message.original_item_id; - if (message.pos_x != null && message.hasOwnProperty("pos_x")) - object.pos_x = options.json && !isFinite(message.pos_x) ? String(message.pos_x) : message.pos_x; - if (message.pos_y != null && message.hasOwnProperty("pos_y")) - object.pos_y = options.json && !isFinite(message.pos_y) ? String(message.pos_y) : message.pos_y; - if (message.pos_z != null && message.hasOwnProperty("pos_z")) - object.pos_z = options.json && !isFinite(message.pos_z) ? String(message.pos_z) : message.pos_z; - if (message.ang_x != null && message.hasOwnProperty("ang_x")) - object.ang_x = options.json && !isFinite(message.ang_x) ? String(message.ang_x) : message.ang_x; - if (message.ang_y != null && message.hasOwnProperty("ang_y")) - object.ang_y = options.json && !isFinite(message.ang_y) ? String(message.ang_y) : message.ang_y; - if (message.ang_z != null && message.hasOwnProperty("ang_z")) - object.ang_z = options.json && !isFinite(message.ang_z) ? String(message.ang_z) : message.ang_z; - if (message.force_remove_all != null && message.hasOwnProperty("force_remove_all")) + object.original_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.original_item_id) : options.longs === $Number ? new $util.LongBits(message.original_item_id.low >>> 0, message.original_item_id.high >>> 0).toNumber(true) : message.original_item_id; + if (message.pos_x != null && $Object.hasOwnProperty.call(message, "pos_x")) + object.pos_x = options.json && !$isFinite(message.pos_x) ? $String(message.pos_x) : message.pos_x; + if (message.pos_y != null && $Object.hasOwnProperty.call(message, "pos_y")) + object.pos_y = options.json && !$isFinite(message.pos_y) ? $String(message.pos_y) : message.pos_y; + if (message.pos_z != null && $Object.hasOwnProperty.call(message, "pos_z")) + object.pos_z = options.json && !$isFinite(message.pos_z) ? $String(message.pos_z) : message.pos_z; + if (message.ang_x != null && $Object.hasOwnProperty.call(message, "ang_x")) + object.ang_x = options.json && !$isFinite(message.ang_x) ? $String(message.ang_x) : message.ang_x; + if (message.ang_y != null && $Object.hasOwnProperty.call(message, "ang_y")) + object.ang_y = options.json && !$isFinite(message.ang_y) ? $String(message.ang_y) : message.ang_y; + if (message.ang_z != null && $Object.hasOwnProperty.call(message, "ang_z")) + object.ang_z = options.json && !$isFinite(message.ang_z) ? $String(message.ang_z) : message.ang_z; + if (message.force_remove_all != null && $Object.hasOwnProperty.call(message, "force_remove_all")) object.force_remove_all = message.force_remove_all; - if (message.attrib_name != null && message.hasOwnProperty("attrib_name")) + if (message.attrib_name != null && $Object.hasOwnProperty.call(message, "attrib_name")) object.attrib_name = message.attrib_name; return object; }; @@ -36247,8 +46866,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsg_WorldItemPlacement_Update.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsg_WorldItemPlacement_Update.prototype.toJSON = function() { + return CGCMsg_WorldItemPlacement_Update.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsg_WorldItemPlacement_Update + * @function getTypeUrl + * @memberof CGCMsg_WorldItemPlacement_Update + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsg_WorldItemPlacement_Update.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsg_WorldItemPlacement_Update"; }; return CGCMsg_WorldItemPlacement_Update; @@ -36258,26 +46891,39 @@ /** * Properties of a CMsgAcknowledgeXP. - * @exports ICMsgAcknowledgeXP - * @interface ICMsgAcknowledgeXP + * @typedef {Object} CMsgAcknowledgeXP.$Properties * @property {number|null} [match_group] CMsgAcknowledgeXP match_group * @property {number|null} [predicted_experience] CMsgAcknowledgeXP predicted_experience + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAcknowledgeXP. + * @exports ICMsgAcknowledgeXP + * @interface ICMsgAcknowledgeXP + * @augments CMsgAcknowledgeXP.$Properties + * @deprecated Use CMsgAcknowledgeXP.$Properties instead. + */ + + /** + * Shape of a CMsgAcknowledgeXP. + * @typedef {CMsgAcknowledgeXP.$Properties} CMsgAcknowledgeXP.$Shape */ /** * Constructs a new CMsgAcknowledgeXP. * @exports CMsgAcknowledgeXP * @classdesc Represents a CMsgAcknowledgeXP. - * @implements ICMsgAcknowledgeXP * @constructor - * @param {ICMsgAcknowledgeXP=} [properties] Properties to set + * @param {CMsgAcknowledgeXP.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAcknowledgeXP(properties) { + var CMsgAcknowledgeXP = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAcknowledgeXP match_group. @@ -36300,10 +46946,14 @@ * @function create * @memberof CMsgAcknowledgeXP * @static - * @param {ICMsgAcknowledgeXP=} [properties] Properties to set + * @param {CMsgAcknowledgeXP.$Properties=} [properties] Properties to set * @returns {CMsgAcknowledgeXP} CMsgAcknowledgeXP instance + * @type {{ + * (properties: CMsgAcknowledgeXP.$Shape): CMsgAcknowledgeXP & CMsgAcknowledgeXP.$Shape; + * (properties?: CMsgAcknowledgeXP.$Properties): CMsgAcknowledgeXP; + * }} */ - CMsgAcknowledgeXP.create = function create(properties) { + CMsgAcknowledgeXP.create = function(properties) { return new CMsgAcknowledgeXP(properties); }; @@ -36312,17 +46962,24 @@ * @function encode * @memberof CMsgAcknowledgeXP * @static - * @param {ICMsgAcknowledgeXP} message CMsgAcknowledgeXP message or plain object to encode + * @param {CMsgAcknowledgeXP.$Properties} message CMsgAcknowledgeXP message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAcknowledgeXP.encode = function encode(message, writer) { + CMsgAcknowledgeXP.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.match_group); - if (message.predicted_experience != null && Object.hasOwnProperty.call(message, "predicted_experience")) + if (message.predicted_experience != null && $Object.hasOwnProperty.call(message, "predicted_experience")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.predicted_experience); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -36331,12 +46988,12 @@ * @function encodeDelimited * @memberof CMsgAcknowledgeXP * @static - * @param {ICMsgAcknowledgeXP} message CMsgAcknowledgeXP message or plain object to encode + * @param {CMsgAcknowledgeXP.$Properties} message CMsgAcknowledgeXP message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAcknowledgeXP.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAcknowledgeXP.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -36346,28 +47003,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAcknowledgeXP} CMsgAcknowledgeXP + * @returns {CMsgAcknowledgeXP & CMsgAcknowledgeXP.$Shape} CMsgAcknowledgeXP * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAcknowledgeXP.decode = function decode(reader, length) { + CMsgAcknowledgeXP.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAcknowledgeXP(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAcknowledgeXP(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.match_group = reader.int32(); - break; - case 2: - message.predicted_experience = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.match_group = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.predicted_experience = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -36377,11 +47054,11 @@ * @memberof CMsgAcknowledgeXP * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAcknowledgeXP} CMsgAcknowledgeXP + * @returns {CMsgAcknowledgeXP & CMsgAcknowledgeXP.$Shape} CMsgAcknowledgeXP * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAcknowledgeXP.decodeDelimited = function decodeDelimited(reader) { + CMsgAcknowledgeXP.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -36395,13 +47072,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAcknowledgeXP.verify = function verify(message) { + CMsgAcknowledgeXP.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) if (!$util.isInteger(message.match_group)) return "match_group: integer expected"; - if (message.predicted_experience != null && message.hasOwnProperty("predicted_experience")) + if (message.predicted_experience != null && $Object.hasOwnProperty.call(message, "predicted_experience")) if (!$util.isInteger(message.predicted_experience)) return "predicted_experience: integer expected"; return null; @@ -36415,9 +47096,15 @@ * @param {Object.} object Plain object * @returns {CMsgAcknowledgeXP} CMsgAcknowledgeXP */ - CMsgAcknowledgeXP.fromObject = function fromObject(object) { + CMsgAcknowledgeXP.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAcknowledgeXP) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAcknowledgeXP: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAcknowledgeXP(); if (object.match_group != null) message.match_group = object.match_group | 0; @@ -36435,17 +47122,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAcknowledgeXP.toObject = function toObject(message, options) { + CMsgAcknowledgeXP.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.match_group = 0; object.predicted_experience = 0; } - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) object.match_group = message.match_group; - if (message.predicted_experience != null && message.hasOwnProperty("predicted_experience")) + if (message.predicted_experience != null && $Object.hasOwnProperty.call(message, "predicted_experience")) object.predicted_experience = message.predicted_experience; return object; }; @@ -36457,8 +47148,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAcknowledgeXP.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAcknowledgeXP.prototype.toJSON = function() { + return CMsgAcknowledgeXP.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAcknowledgeXP + * @function getTypeUrl + * @memberof CMsgAcknowledgeXP + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAcknowledgeXP.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAcknowledgeXP"; }; return CMsgAcknowledgeXP; @@ -36468,29 +47173,42 @@ /** * Properties of a CMsgTFXPSource. - * @exports ICMsgTFXPSource - * @interface ICMsgTFXPSource + * @typedef {Object} CMsgTFXPSource.$Properties * @property {CMsgTFXPSource.XPSourceType|null} [type] CMsgTFXPSource type * @property {number|null} [amount] CMsgTFXPSource amount * @property {number|null} [match_group] CMsgTFXPSource match_group * @property {number|null} [account_id] CMsgTFXPSource account_id * @property {number|Long|null} [match_id] CMsgTFXPSource match_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTFXPSource. + * @exports ICMsgTFXPSource + * @interface ICMsgTFXPSource + * @augments CMsgTFXPSource.$Properties + * @deprecated Use CMsgTFXPSource.$Properties instead. + */ + + /** + * Shape of a CMsgTFXPSource. + * @typedef {CMsgTFXPSource.$Properties} CMsgTFXPSource.$Shape */ /** * Constructs a new CMsgTFXPSource. * @exports CMsgTFXPSource * @classdesc Represents a CMsgTFXPSource. - * @implements ICMsgTFXPSource * @constructor - * @param {ICMsgTFXPSource=} [properties] Properties to set + * @param {CMsgTFXPSource.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFXPSource(properties) { + var CMsgTFXPSource = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFXPSource type. @@ -36537,10 +47255,14 @@ * @function create * @memberof CMsgTFXPSource * @static - * @param {ICMsgTFXPSource=} [properties] Properties to set + * @param {CMsgTFXPSource.$Properties=} [properties] Properties to set * @returns {CMsgTFXPSource} CMsgTFXPSource instance + * @type {{ + * (properties: CMsgTFXPSource.$Shape): CMsgTFXPSource & CMsgTFXPSource.$Shape; + * (properties?: CMsgTFXPSource.$Properties): CMsgTFXPSource; + * }} */ - CMsgTFXPSource.create = function create(properties) { + CMsgTFXPSource.create = function(properties) { return new CMsgTFXPSource(properties); }; @@ -36549,23 +47271,30 @@ * @function encode * @memberof CMsgTFXPSource * @static - * @param {ICMsgTFXPSource} message CMsgTFXPSource message or plain object to encode + * @param {CMsgTFXPSource.$Properties} message CMsgTFXPSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFXPSource.encode = function encode(message, writer) { + CMsgTFXPSource.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + if (message.amount != null && $Object.hasOwnProperty.call(message, "amount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.amount); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.match_group); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.account_id); - if (message.match_id != null && Object.hasOwnProperty.call(message, "match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.match_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -36574,12 +47303,12 @@ * @function encodeDelimited * @memberof CMsgTFXPSource * @static - * @param {ICMsgTFXPSource} message CMsgTFXPSource message or plain object to encode + * @param {CMsgTFXPSource.$Properties} message CMsgTFXPSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFXPSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFXPSource.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -36589,37 +47318,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFXPSource} CMsgTFXPSource + * @returns {CMsgTFXPSource & CMsgTFXPSource.$Shape} CMsgTFXPSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFXPSource.decode = function decode(reader, length) { + CMsgTFXPSource.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFXPSource(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFXPSource(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.amount = reader.int32(); - break; - case 3: - message.match_group = reader.int32(); - break; - case 4: - message.account_id = reader.uint32(); - break; - case 5: - message.match_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgTFXPSource.XPSourceType[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + message.amount = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.match_group = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.match_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -36629,11 +47393,11 @@ * @memberof CMsgTFXPSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFXPSource} CMsgTFXPSource + * @returns {CMsgTFXPSource & CMsgTFXPSource.$Shape} CMsgTFXPSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFXPSource.decodeDelimited = function decodeDelimited(reader) { + CMsgTFXPSource.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -36647,10 +47411,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFXPSource.verify = function verify(message) { + CMsgTFXPSource.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -36664,16 +47432,16 @@ case 7: break; } - if (message.amount != null && message.hasOwnProperty("amount")) + if (message.amount != null && $Object.hasOwnProperty.call(message, "amount")) if (!$util.isInteger(message.amount)) return "amount: integer expected"; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) if (!$util.isInteger(message.match_group)) return "match_group: integer expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.match_id != null && message.hasOwnProperty("match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) if (!$util.isInteger(message.match_id) && !(message.match_id && $util.isInteger(message.match_id.low) && $util.isInteger(message.match_id.high))) return "match_id: integer|Long expected"; return null; @@ -36687,9 +47455,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFXPSource} CMsgTFXPSource */ - CMsgTFXPSource.fromObject = function fromObject(object) { + CMsgTFXPSource.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFXPSource) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFXPSource: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFXPSource(); switch (object.type) { case "SOURCE_SCORE": @@ -36724,6 +47498,7 @@ case 7: message.type = 7; break; + default: } if (object.amount != null) message.amount = object.amount | 0; @@ -36733,9 +47508,9 @@ message.account_id = object.account_id >>> 0; if (object.match_id != null) if ($util.Long) - (message.match_id = $util.Long.fromValue(object.match_id)).unsigned = true; + message.match_id = $util.Long.fromValue(object.match_id, true); else if (typeof object.match_id === "string") - message.match_id = parseInt(object.match_id, 10); + message.match_id = $parseInt(object.match_id, 10); else if (typeof object.match_id === "number") message.match_id = object.match_id; else if (typeof object.match_id === "object") @@ -36752,34 +47527,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFXPSource.toObject = function toObject(message, options) { + CMsgTFXPSource.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.type = options.enums === String ? "SOURCE_SCORE" : 0; + object.type = options.enums === $String ? "SOURCE_SCORE" : 0; object.amount = 0; object.match_group = 0; object.account_id = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.match_id = options.longs === String ? "0" : 0; + object.match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.CMsgTFXPSource.XPSourceType[message.type] : message.type; - if (message.amount != null && message.hasOwnProperty("amount")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.CMsgTFXPSource.XPSourceType[message.type] === $undefined ? message.type : $root.CMsgTFXPSource.XPSourceType[message.type] : message.type; + if (message.amount != null && $Object.hasOwnProperty.call(message, "amount")) object.amount = message.amount; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) object.match_group = message.match_group; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.match_id != null && message.hasOwnProperty("match_id")) - if (typeof message.match_id === "number") - object.match_id = options.longs === String ? String(message.match_id) : message.match_id; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.match_id = typeof message.match_id === "number" ? $BigInt(message.match_id) : $util.Long.fromBits(message.match_id.low >>> 0, message.match_id.high >>> 0, true).toBigInt(); + else if (typeof message.match_id === "number") + object.match_id = options.longs === $String ? $String(message.match_id) : message.match_id; else - object.match_id = options.longs === String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; + object.match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === $Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; return object; }; @@ -36790,8 +47571,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFXPSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFXPSource.prototype.toJSON = function() { + return CMsgTFXPSource.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFXPSource + * @function getTypeUrl + * @memberof CMsgTFXPSource + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFXPSource.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFXPSource"; }; /** @@ -36808,7 +47603,7 @@ * @property {number} SOURCE_PRESTIGE_BONUS=7 SOURCE_PRESTIGE_BONUS value */ CMsgTFXPSource.XPSourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "SOURCE_SCORE"] = 0; values[valuesById[1] = "SOURCE_OBJECTIVE_BONUS"] = 1; values[valuesById[2] = "SOURCE_COMPLETED_MATCH"] = 2; @@ -36825,32 +47620,45 @@ $root.CMsgTFXPSourceBreakdown = (function() { + /** + * Properties of a CMsgTFXPSourceBreakdown. + * @typedef {Object} CMsgTFXPSourceBreakdown.$Properties + * @property {Array.|null} [sources] CMsgTFXPSourceBreakdown sources + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgTFXPSourceBreakdown. * @exports ICMsgTFXPSourceBreakdown * @interface ICMsgTFXPSourceBreakdown - * @property {Array.|null} [sources] CMsgTFXPSourceBreakdown sources + * @augments CMsgTFXPSourceBreakdown.$Properties + * @deprecated Use CMsgTFXPSourceBreakdown.$Properties instead. + */ + + /** + * Shape of a CMsgTFXPSourceBreakdown. + * @typedef {CMsgTFXPSourceBreakdown.$Properties} CMsgTFXPSourceBreakdown.$Shape */ /** * Constructs a new CMsgTFXPSourceBreakdown. * @exports CMsgTFXPSourceBreakdown * @classdesc Represents a CMsgTFXPSourceBreakdown. - * @implements ICMsgTFXPSourceBreakdown * @constructor - * @param {ICMsgTFXPSourceBreakdown=} [properties] Properties to set + * @param {CMsgTFXPSourceBreakdown.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFXPSourceBreakdown(properties) { + var CMsgTFXPSourceBreakdown = function (properties) { this.sources = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFXPSourceBreakdown sources. - * @member {Array.} sources + * @member {Array.} sources * @memberof CMsgTFXPSourceBreakdown * @instance */ @@ -36861,10 +47669,14 @@ * @function create * @memberof CMsgTFXPSourceBreakdown * @static - * @param {ICMsgTFXPSourceBreakdown=} [properties] Properties to set + * @param {CMsgTFXPSourceBreakdown.$Properties=} [properties] Properties to set * @returns {CMsgTFXPSourceBreakdown} CMsgTFXPSourceBreakdown instance + * @type {{ + * (properties: CMsgTFXPSourceBreakdown.$Shape): CMsgTFXPSourceBreakdown & CMsgTFXPSourceBreakdown.$Shape; + * (properties?: CMsgTFXPSourceBreakdown.$Properties): CMsgTFXPSourceBreakdown; + * }} */ - CMsgTFXPSourceBreakdown.create = function create(properties) { + CMsgTFXPSourceBreakdown.create = function(properties) { return new CMsgTFXPSourceBreakdown(properties); }; @@ -36873,16 +47685,23 @@ * @function encode * @memberof CMsgTFXPSourceBreakdown * @static - * @param {ICMsgTFXPSourceBreakdown} message CMsgTFXPSourceBreakdown message or plain object to encode + * @param {CMsgTFXPSourceBreakdown.$Properties} message CMsgTFXPSourceBreakdown message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFXPSourceBreakdown.encode = function encode(message, writer) { + CMsgTFXPSourceBreakdown.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.sources != null && message.sources.length) for (var i = 0; i < message.sources.length; ++i) - $root.CMsgTFXPSource.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgTFXPSource.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -36891,12 +47710,12 @@ * @function encodeDelimited * @memberof CMsgTFXPSourceBreakdown * @static - * @param {ICMsgTFXPSourceBreakdown} message CMsgTFXPSourceBreakdown message or plain object to encode + * @param {CMsgTFXPSourceBreakdown.$Properties} message CMsgTFXPSourceBreakdown message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFXPSourceBreakdown.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFXPSourceBreakdown.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -36906,27 +47725,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFXPSourceBreakdown} CMsgTFXPSourceBreakdown + * @returns {CMsgTFXPSourceBreakdown & CMsgTFXPSourceBreakdown.$Shape} CMsgTFXPSourceBreakdown * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFXPSourceBreakdown.decode = function decode(reader, length) { + CMsgTFXPSourceBreakdown.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFXPSourceBreakdown(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFXPSourceBreakdown(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.sources && message.sources.length)) - message.sources = []; - message.sources.push($root.CMsgTFXPSource.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.sources && message.sources.length)) + message.sources = []; + message.sources.push($root.CMsgTFXPSource.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -36936,11 +47772,11 @@ * @memberof CMsgTFXPSourceBreakdown * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFXPSourceBreakdown} CMsgTFXPSourceBreakdown + * @returns {CMsgTFXPSourceBreakdown & CMsgTFXPSourceBreakdown.$Shape} CMsgTFXPSourceBreakdown * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFXPSourceBreakdown.decodeDelimited = function decodeDelimited(reader) { + CMsgTFXPSourceBreakdown.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -36954,14 +47790,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFXPSourceBreakdown.verify = function verify(message) { + CMsgTFXPSourceBreakdown.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sources != null && message.hasOwnProperty("sources")) { - if (!Array.isArray(message.sources)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.sources != null && $Object.hasOwnProperty.call(message, "sources")) { + if (!$Array.isArray(message.sources)) return "sources: array expected"; for (var i = 0; i < message.sources.length; ++i) { - var error = $root.CMsgTFXPSource.verify(message.sources[i]); + var error = $root.CMsgTFXPSource.verify(message.sources[i], _depth + 1); if (error) return "sources." + error; } @@ -36977,18 +47817,24 @@ * @param {Object.} object Plain object * @returns {CMsgTFXPSourceBreakdown} CMsgTFXPSourceBreakdown */ - CMsgTFXPSourceBreakdown.fromObject = function fromObject(object) { + CMsgTFXPSourceBreakdown.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFXPSourceBreakdown) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFXPSourceBreakdown: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFXPSourceBreakdown(); if (object.sources) { - if (!Array.isArray(object.sources)) - throw TypeError(".CMsgTFXPSourceBreakdown.sources: array expected"); - message.sources = []; + if (!$Array.isArray(object.sources)) + throw $TypeError(".CMsgTFXPSourceBreakdown.sources: array expected"); + message.sources = $Array(object.sources.length); for (var i = 0; i < object.sources.length; ++i) { - if (typeof object.sources[i] !== "object") - throw TypeError(".CMsgTFXPSourceBreakdown.sources: object expected"); - message.sources[i] = $root.CMsgTFXPSource.fromObject(object.sources[i]); + if (!$util.isObject(object.sources[i])) + throw $TypeError(".CMsgTFXPSourceBreakdown.sources: object expected"); + message.sources[i] = $root.CMsgTFXPSource.fromObject(object.sources[i], _depth + 1); } } return message; @@ -37003,16 +47849,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFXPSourceBreakdown.toObject = function toObject(message, options) { + CMsgTFXPSourceBreakdown.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.sources = []; if (message.sources && message.sources.length) { - object.sources = []; + object.sources = $Array(message.sources.length); for (var j = 0; j < message.sources.length; ++j) - object.sources[j] = $root.CMsgTFXPSource.toObject(message.sources[j], options); + object.sources[j] = $root.CMsgTFXPSource.toObject(message.sources[j], options, _depth + 1); } return object; }; @@ -37024,8 +47874,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFXPSourceBreakdown.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFXPSourceBreakdown.prototype.toJSON = function() { + return CMsgTFXPSourceBreakdown.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFXPSourceBreakdown + * @function getTypeUrl + * @memberof CMsgTFXPSourceBreakdown + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFXPSourceBreakdown.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFXPSourceBreakdown"; }; return CMsgTFXPSourceBreakdown; @@ -37035,26 +47899,39 @@ /** * Properties of a CMsgTFClientInit. - * @exports ICMsgTFClientInit - * @interface ICMsgTFClientInit + * @typedef {Object} CMsgTFClientInit.$Properties * @property {number|null} [client_version] CMsgTFClientInit client_version * @property {number|null} [language] CMsgTFClientInit language + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTFClientInit. + * @exports ICMsgTFClientInit + * @interface ICMsgTFClientInit + * @augments CMsgTFClientInit.$Properties + * @deprecated Use CMsgTFClientInit.$Properties instead. + */ + + /** + * Shape of a CMsgTFClientInit. + * @typedef {CMsgTFClientInit.$Properties} CMsgTFClientInit.$Shape */ /** * Constructs a new CMsgTFClientInit. * @exports CMsgTFClientInit * @classdesc Represents a CMsgTFClientInit. - * @implements ICMsgTFClientInit * @constructor - * @param {ICMsgTFClientInit=} [properties] Properties to set + * @param {CMsgTFClientInit.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTFClientInit(properties) { + var CMsgTFClientInit = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTFClientInit client_version. @@ -37077,10 +47954,14 @@ * @function create * @memberof CMsgTFClientInit * @static - * @param {ICMsgTFClientInit=} [properties] Properties to set + * @param {CMsgTFClientInit.$Properties=} [properties] Properties to set * @returns {CMsgTFClientInit} CMsgTFClientInit instance + * @type {{ + * (properties: CMsgTFClientInit.$Shape): CMsgTFClientInit & CMsgTFClientInit.$Shape; + * (properties?: CMsgTFClientInit.$Properties): CMsgTFClientInit; + * }} */ - CMsgTFClientInit.create = function create(properties) { + CMsgTFClientInit.create = function(properties) { return new CMsgTFClientInit(properties); }; @@ -37089,17 +47970,24 @@ * @function encode * @memberof CMsgTFClientInit * @static - * @param {ICMsgTFClientInit} message CMsgTFClientInit message or plain object to encode + * @param {CMsgTFClientInit.$Properties} message CMsgTFClientInit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFClientInit.encode = function encode(message, writer) { + CMsgTFClientInit.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.client_version != null && Object.hasOwnProperty.call(message, "client_version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.client_version != null && $Object.hasOwnProperty.call(message, "client_version")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.client_version); - if (message.language != null && Object.hasOwnProperty.call(message, "language")) + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.language); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -37108,12 +47996,12 @@ * @function encodeDelimited * @memberof CMsgTFClientInit * @static - * @param {ICMsgTFClientInit} message CMsgTFClientInit message or plain object to encode + * @param {CMsgTFClientInit.$Properties} message CMsgTFClientInit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTFClientInit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTFClientInit.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -37123,28 +48011,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTFClientInit} CMsgTFClientInit + * @returns {CMsgTFClientInit & CMsgTFClientInit.$Shape} CMsgTFClientInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFClientInit.decode = function decode(reader, length) { + CMsgTFClientInit.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTFClientInit(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTFClientInit(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_version = reader.uint32(); - break; - case 2: - message.language = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.client_version = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.language = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -37154,11 +48062,11 @@ * @memberof CMsgTFClientInit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTFClientInit} CMsgTFClientInit + * @returns {CMsgTFClientInit & CMsgTFClientInit.$Shape} CMsgTFClientInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTFClientInit.decodeDelimited = function decodeDelimited(reader) { + CMsgTFClientInit.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -37172,13 +48080,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTFClientInit.verify = function verify(message) { + CMsgTFClientInit.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.client_version != null && message.hasOwnProperty("client_version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.client_version != null && $Object.hasOwnProperty.call(message, "client_version")) if (!$util.isInteger(message.client_version)) return "client_version: integer expected"; - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) if (!$util.isInteger(message.language)) return "language: integer expected"; return null; @@ -37192,9 +48104,15 @@ * @param {Object.} object Plain object * @returns {CMsgTFClientInit} CMsgTFClientInit */ - CMsgTFClientInit.fromObject = function fromObject(object) { + CMsgTFClientInit.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTFClientInit) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTFClientInit: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTFClientInit(); if (object.client_version != null) message.client_version = object.client_version >>> 0; @@ -37212,17 +48130,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTFClientInit.toObject = function toObject(message, options) { + CMsgTFClientInit.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.client_version = 0; object.language = 0; } - if (message.client_version != null && message.hasOwnProperty("client_version")) + if (message.client_version != null && $Object.hasOwnProperty.call(message, "client_version")) object.client_version = message.client_version; - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) object.language = message.language; return object; }; @@ -37234,8 +48156,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTFClientInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTFClientInit.prototype.toJSON = function() { + return CMsgTFClientInit.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTFClientInit + * @function getTypeUrl + * @memberof CMsgTFClientInit + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTFClientInit.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTFClientInit"; }; return CMsgTFClientInit; @@ -37245,29 +48181,42 @@ /** * Properties of a CMsgGCNotification. - * @exports ICMsgGCNotification - * @interface ICMsgGCNotification + * @typedef {Object} CMsgGCNotification.$Properties * @property {number|Long|null} [notification_id] CMsgGCNotification notification_id * @property {number|null} [account_id] CMsgGCNotification account_id * @property {number|null} [expiration_time] CMsgGCNotification expiration_time * @property {CMsgGCNotification.NotificationType|null} [type] CMsgGCNotification type * @property {string|null} [notification_string] CMsgGCNotification notification_string + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCNotification. + * @exports ICMsgGCNotification + * @interface ICMsgGCNotification + * @augments CMsgGCNotification.$Properties + * @deprecated Use CMsgGCNotification.$Properties instead. + */ + + /** + * Shape of a CMsgGCNotification. + * @typedef {CMsgGCNotification.$Properties} CMsgGCNotification.$Shape */ /** * Constructs a new CMsgGCNotification. * @exports CMsgGCNotification * @classdesc Represents a CMsgGCNotification. - * @implements ICMsgGCNotification * @constructor - * @param {ICMsgGCNotification=} [properties] Properties to set + * @param {CMsgGCNotification.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCNotification(properties) { + var CMsgGCNotification = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCNotification notification_id. @@ -37314,10 +48263,14 @@ * @function create * @memberof CMsgGCNotification * @static - * @param {ICMsgGCNotification=} [properties] Properties to set + * @param {CMsgGCNotification.$Properties=} [properties] Properties to set * @returns {CMsgGCNotification} CMsgGCNotification instance + * @type {{ + * (properties: CMsgGCNotification.$Shape): CMsgGCNotification & CMsgGCNotification.$Shape; + * (properties?: CMsgGCNotification.$Properties): CMsgGCNotification; + * }} */ - CMsgGCNotification.create = function create(properties) { + CMsgGCNotification.create = function(properties) { return new CMsgGCNotification(properties); }; @@ -37326,23 +48279,30 @@ * @function encode * @memberof CMsgGCNotification * @static - * @param {ICMsgGCNotification} message CMsgGCNotification message or plain object to encode + * @param {CMsgGCNotification.$Properties} message CMsgGCNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNotification.encode = function encode(message, writer) { + CMsgGCNotification.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.notification_id != null && Object.hasOwnProperty.call(message, "notification_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.notification_id != null && $Object.hasOwnProperty.call(message, "notification_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.notification_id); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_id); - if (message.expiration_time != null && Object.hasOwnProperty.call(message, "expiration_time")) + if (message.expiration_time != null && $Object.hasOwnProperty.call(message, "expiration_time")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.expiration_time); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); - if (message.notification_string != null && Object.hasOwnProperty.call(message, "notification_string")) + if (message.notification_string != null && $Object.hasOwnProperty.call(message, "notification_string")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.notification_string); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -37351,12 +48311,12 @@ * @function encodeDelimited * @memberof CMsgGCNotification * @static - * @param {ICMsgGCNotification} message CMsgGCNotification message or plain object to encode + * @param {CMsgGCNotification.$Properties} message CMsgGCNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCNotification.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -37366,37 +48326,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCNotification} CMsgGCNotification + * @returns {CMsgGCNotification & CMsgGCNotification.$Shape} CMsgGCNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNotification.decode = function decode(reader, length) { + CMsgGCNotification.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCNotification(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCNotification(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.notification_id = reader.uint64(); - break; - case 2: - message.account_id = reader.uint32(); - break; - case 3: - message.expiration_time = reader.fixed32(); - break; - case 4: - message.type = reader.int32(); - break; - case 5: - message.notification_string = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.notification_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.expiration_time = reader.fixed32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCNotification.NotificationType[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 5: { + if (wireType !== 2) + break; + message.notification_string = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -37406,11 +48401,11 @@ * @memberof CMsgGCNotification * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCNotification} CMsgGCNotification + * @returns {CMsgGCNotification & CMsgGCNotification.$Shape} CMsgGCNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNotification.decodeDelimited = function decodeDelimited(reader) { + CMsgGCNotification.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -37424,19 +48419,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCNotification.verify = function verify(message) { + CMsgGCNotification.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.notification_id != null && message.hasOwnProperty("notification_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.notification_id != null && $Object.hasOwnProperty.call(message, "notification_id")) if (!$util.isInteger(message.notification_id) && !(message.notification_id && $util.isInteger(message.notification_id.low) && $util.isInteger(message.notification_id.high))) return "notification_id: integer|Long expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.expiration_time != null && message.hasOwnProperty("expiration_time")) + if (message.expiration_time != null && $Object.hasOwnProperty.call(message, "expiration_time")) if (!$util.isInteger(message.expiration_time)) return "expiration_time: integer expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -37448,7 +48447,7 @@ case 5: break; } - if (message.notification_string != null && message.hasOwnProperty("notification_string")) + if (message.notification_string != null && $Object.hasOwnProperty.call(message, "notification_string")) if (!$util.isString(message.notification_string)) return "notification_string: string expected"; return null; @@ -37462,15 +48461,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCNotification} CMsgGCNotification */ - CMsgGCNotification.fromObject = function fromObject(object) { + CMsgGCNotification.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCNotification) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCNotification: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCNotification(); if (object.notification_id != null) if ($util.Long) - (message.notification_id = $util.Long.fromValue(object.notification_id)).unsigned = true; + message.notification_id = $util.Long.fromValue(object.notification_id, true); else if (typeof object.notification_id === "string") - message.notification_id = parseInt(object.notification_id, 10); + message.notification_id = $parseInt(object.notification_id, 10); else if (typeof object.notification_id === "number") message.notification_id = object.notification_id; else if (typeof object.notification_id === "object") @@ -37504,9 +48509,10 @@ case 5: message.type = 5; break; + default: } if (object.notification_string != null) - message.notification_string = String(object.notification_string); + message.notification_string = $String(object.notification_string); return message; }; @@ -37519,33 +48525,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCNotification.toObject = function toObject(message, options) { + CMsgGCNotification.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.notification_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.notification_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.notification_id = options.longs === String ? "0" : 0; + object.notification_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.account_id = 0; object.expiration_time = 0; - object.type = options.enums === String ? "NOTIFICATION_CUSTOM_STRING" : 1; + object.type = options.enums === $String ? "NOTIFICATION_CUSTOM_STRING" : 1; object.notification_string = ""; } - if (message.notification_id != null && message.hasOwnProperty("notification_id")) - if (typeof message.notification_id === "number") - object.notification_id = options.longs === String ? String(message.notification_id) : message.notification_id; + if (message.notification_id != null && $Object.hasOwnProperty.call(message, "notification_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.notification_id = typeof message.notification_id === "number" ? $BigInt(message.notification_id) : $util.Long.fromBits(message.notification_id.low >>> 0, message.notification_id.high >>> 0, true).toBigInt(); + else if (typeof message.notification_id === "number") + object.notification_id = options.longs === $String ? $String(message.notification_id) : message.notification_id; else - object.notification_id = options.longs === String ? $util.Long.prototype.toString.call(message.notification_id) : options.longs === Number ? new $util.LongBits(message.notification_id.low >>> 0, message.notification_id.high >>> 0).toNumber(true) : message.notification_id; - if (message.account_id != null && message.hasOwnProperty("account_id")) + object.notification_id = options.longs === $String ? $util.Long.prototype.toString.call(message.notification_id) : options.longs === $Number ? new $util.LongBits(message.notification_id.low >>> 0, message.notification_id.high >>> 0).toNumber(true) : message.notification_id; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.expiration_time != null && message.hasOwnProperty("expiration_time")) + if (message.expiration_time != null && $Object.hasOwnProperty.call(message, "expiration_time")) object.expiration_time = message.expiration_time; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.CMsgGCNotification.NotificationType[message.type] : message.type; - if (message.notification_string != null && message.hasOwnProperty("notification_string")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.CMsgGCNotification.NotificationType[message.type] === $undefined ? message.type : $root.CMsgGCNotification.NotificationType[message.type] : message.type; + if (message.notification_string != null && $Object.hasOwnProperty.call(message, "notification_string")) object.notification_string = message.notification_string; return object; }; @@ -37557,8 +48569,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCNotification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCNotification.prototype.toJSON = function() { + return CMsgGCNotification.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCNotification + * @function getTypeUrl + * @memberof CMsgGCNotification + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCNotification.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCNotification"; }; /** @@ -37573,7 +48599,7 @@ * @property {number} NOTIFICATION_NUM_TYPES=5 NOTIFICATION_NUM_TYPES value */ CMsgGCNotification.NotificationType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "NOTIFICATION_REPORTED_PLAYER_BANNED"] = 0; values[valuesById[1] = "NOTIFICATION_CUSTOM_STRING"] = 1; values[valuesById[2] = "NOTIFICATION_MM_BAN_DUE_TO_EXCESSIVE_REPORTS"] = 2; @@ -37588,32 +48614,45 @@ $root.CMsgGCNotificationQueue = (function() { + /** + * Properties of a CMsgGCNotificationQueue. + * @typedef {Object} CMsgGCNotificationQueue.$Properties + * @property {Array.|null} [notifications] CMsgGCNotificationQueue notifications + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCNotificationQueue. * @exports ICMsgGCNotificationQueue * @interface ICMsgGCNotificationQueue - * @property {Array.|null} [notifications] CMsgGCNotificationQueue notifications + * @augments CMsgGCNotificationQueue.$Properties + * @deprecated Use CMsgGCNotificationQueue.$Properties instead. + */ + + /** + * Shape of a CMsgGCNotificationQueue. + * @typedef {CMsgGCNotificationQueue.$Properties} CMsgGCNotificationQueue.$Shape */ /** * Constructs a new CMsgGCNotificationQueue. * @exports CMsgGCNotificationQueue * @classdesc Represents a CMsgGCNotificationQueue. - * @implements ICMsgGCNotificationQueue * @constructor - * @param {ICMsgGCNotificationQueue=} [properties] Properties to set + * @param {CMsgGCNotificationQueue.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCNotificationQueue(properties) { + var CMsgGCNotificationQueue = function (properties) { this.notifications = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCNotificationQueue notifications. - * @member {Array.} notifications + * @member {Array.} notifications * @memberof CMsgGCNotificationQueue * @instance */ @@ -37624,10 +48663,14 @@ * @function create * @memberof CMsgGCNotificationQueue * @static - * @param {ICMsgGCNotificationQueue=} [properties] Properties to set + * @param {CMsgGCNotificationQueue.$Properties=} [properties] Properties to set * @returns {CMsgGCNotificationQueue} CMsgGCNotificationQueue instance + * @type {{ + * (properties: CMsgGCNotificationQueue.$Shape): CMsgGCNotificationQueue & CMsgGCNotificationQueue.$Shape; + * (properties?: CMsgGCNotificationQueue.$Properties): CMsgGCNotificationQueue; + * }} */ - CMsgGCNotificationQueue.create = function create(properties) { + CMsgGCNotificationQueue.create = function(properties) { return new CMsgGCNotificationQueue(properties); }; @@ -37636,16 +48679,23 @@ * @function encode * @memberof CMsgGCNotificationQueue * @static - * @param {ICMsgGCNotificationQueue} message CMsgGCNotificationQueue message or plain object to encode + * @param {CMsgGCNotificationQueue.$Properties} message CMsgGCNotificationQueue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNotificationQueue.encode = function encode(message, writer) { + CMsgGCNotificationQueue.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.notifications != null && message.notifications.length) for (var i = 0; i < message.notifications.length; ++i) - $root.CMsgGCNotification.encode(message.notifications[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCNotification.encode(message.notifications[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -37654,12 +48704,12 @@ * @function encodeDelimited * @memberof CMsgGCNotificationQueue * @static - * @param {ICMsgGCNotificationQueue} message CMsgGCNotificationQueue message or plain object to encode + * @param {CMsgGCNotificationQueue.$Properties} message CMsgGCNotificationQueue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNotificationQueue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCNotificationQueue.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -37669,27 +48719,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCNotificationQueue} CMsgGCNotificationQueue + * @returns {CMsgGCNotificationQueue & CMsgGCNotificationQueue.$Shape} CMsgGCNotificationQueue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNotificationQueue.decode = function decode(reader, length) { + CMsgGCNotificationQueue.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCNotificationQueue(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCNotificationQueue(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.notifications && message.notifications.length)) - message.notifications = []; - message.notifications.push($root.CMsgGCNotification.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.notifications && message.notifications.length)) + message.notifications = []; + message.notifications.push($root.CMsgGCNotification.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -37699,11 +48766,11 @@ * @memberof CMsgGCNotificationQueue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCNotificationQueue} CMsgGCNotificationQueue + * @returns {CMsgGCNotificationQueue & CMsgGCNotificationQueue.$Shape} CMsgGCNotificationQueue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNotificationQueue.decodeDelimited = function decodeDelimited(reader) { + CMsgGCNotificationQueue.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -37717,14 +48784,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCNotificationQueue.verify = function verify(message) { + CMsgGCNotificationQueue.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.notifications != null && message.hasOwnProperty("notifications")) { - if (!Array.isArray(message.notifications)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.notifications != null && $Object.hasOwnProperty.call(message, "notifications")) { + if (!$Array.isArray(message.notifications)) return "notifications: array expected"; for (var i = 0; i < message.notifications.length; ++i) { - var error = $root.CMsgGCNotification.verify(message.notifications[i]); + var error = $root.CMsgGCNotification.verify(message.notifications[i], _depth + 1); if (error) return "notifications." + error; } @@ -37740,18 +48811,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCNotificationQueue} CMsgGCNotificationQueue */ - CMsgGCNotificationQueue.fromObject = function fromObject(object) { + CMsgGCNotificationQueue.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCNotificationQueue) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCNotificationQueue: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCNotificationQueue(); if (object.notifications) { - if (!Array.isArray(object.notifications)) - throw TypeError(".CMsgGCNotificationQueue.notifications: array expected"); - message.notifications = []; + if (!$Array.isArray(object.notifications)) + throw $TypeError(".CMsgGCNotificationQueue.notifications: array expected"); + message.notifications = $Array(object.notifications.length); for (var i = 0; i < object.notifications.length; ++i) { - if (typeof object.notifications[i] !== "object") - throw TypeError(".CMsgGCNotificationQueue.notifications: object expected"); - message.notifications[i] = $root.CMsgGCNotification.fromObject(object.notifications[i]); + if (!$util.isObject(object.notifications[i])) + throw $TypeError(".CMsgGCNotificationQueue.notifications: object expected"); + message.notifications[i] = $root.CMsgGCNotification.fromObject(object.notifications[i], _depth + 1); } } return message; @@ -37766,16 +48843,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCNotificationQueue.toObject = function toObject(message, options) { + CMsgGCNotificationQueue.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.notifications = []; if (message.notifications && message.notifications.length) { - object.notifications = []; + object.notifications = $Array(message.notifications.length); for (var j = 0; j < message.notifications.length; ++j) - object.notifications[j] = $root.CMsgGCNotification.toObject(message.notifications[j], options); + object.notifications[j] = $root.CMsgGCNotification.toObject(message.notifications[j], options, _depth + 1); } return object; }; @@ -37787,8 +48868,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCNotificationQueue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCNotificationQueue.prototype.toJSON = function() { + return CMsgGCNotificationQueue.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCNotificationQueue + * @function getTypeUrl + * @memberof CMsgGCNotificationQueue + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCNotificationQueue.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCNotificationQueue"; }; return CMsgGCNotificationQueue; @@ -37798,26 +48893,39 @@ /** * Properties of a CMsgNotificationAcknowledge. - * @exports ICMsgNotificationAcknowledge - * @interface ICMsgNotificationAcknowledge + * @typedef {Object} CMsgNotificationAcknowledge.$Properties * @property {number|null} [account_id] CMsgNotificationAcknowledge account_id * @property {number|Long|null} [notification_id] CMsgNotificationAcknowledge notification_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgNotificationAcknowledge. + * @exports ICMsgNotificationAcknowledge + * @interface ICMsgNotificationAcknowledge + * @augments CMsgNotificationAcknowledge.$Properties + * @deprecated Use CMsgNotificationAcknowledge.$Properties instead. + */ + + /** + * Shape of a CMsgNotificationAcknowledge. + * @typedef {CMsgNotificationAcknowledge.$Properties} CMsgNotificationAcknowledge.$Shape */ /** * Constructs a new CMsgNotificationAcknowledge. * @exports CMsgNotificationAcknowledge * @classdesc Represents a CMsgNotificationAcknowledge. - * @implements ICMsgNotificationAcknowledge * @constructor - * @param {ICMsgNotificationAcknowledge=} [properties] Properties to set + * @param {CMsgNotificationAcknowledge.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotificationAcknowledge(properties) { + var CMsgNotificationAcknowledge = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgNotificationAcknowledge account_id. @@ -37840,10 +48948,14 @@ * @function create * @memberof CMsgNotificationAcknowledge * @static - * @param {ICMsgNotificationAcknowledge=} [properties] Properties to set + * @param {CMsgNotificationAcknowledge.$Properties=} [properties] Properties to set * @returns {CMsgNotificationAcknowledge} CMsgNotificationAcknowledge instance + * @type {{ + * (properties: CMsgNotificationAcknowledge.$Shape): CMsgNotificationAcknowledge & CMsgNotificationAcknowledge.$Shape; + * (properties?: CMsgNotificationAcknowledge.$Properties): CMsgNotificationAcknowledge; + * }} */ - CMsgNotificationAcknowledge.create = function create(properties) { + CMsgNotificationAcknowledge.create = function(properties) { return new CMsgNotificationAcknowledge(properties); }; @@ -37852,17 +48964,24 @@ * @function encode * @memberof CMsgNotificationAcknowledge * @static - * @param {ICMsgNotificationAcknowledge} message CMsgNotificationAcknowledge message or plain object to encode + * @param {CMsgNotificationAcknowledge.$Properties} message CMsgNotificationAcknowledge message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationAcknowledge.encode = function encode(message, writer) { + CMsgNotificationAcknowledge.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.notification_id != null && Object.hasOwnProperty.call(message, "notification_id")) + if (message.notification_id != null && $Object.hasOwnProperty.call(message, "notification_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.notification_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -37871,12 +48990,12 @@ * @function encodeDelimited * @memberof CMsgNotificationAcknowledge * @static - * @param {ICMsgNotificationAcknowledge} message CMsgNotificationAcknowledge message or plain object to encode + * @param {CMsgNotificationAcknowledge.$Properties} message CMsgNotificationAcknowledge message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationAcknowledge.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotificationAcknowledge.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -37886,28 +49005,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationAcknowledge} CMsgNotificationAcknowledge + * @returns {CMsgNotificationAcknowledge & CMsgNotificationAcknowledge.$Shape} CMsgNotificationAcknowledge * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationAcknowledge.decode = function decode(reader, length) { + CMsgNotificationAcknowledge.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationAcknowledge(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationAcknowledge(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.notification_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.notification_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -37917,11 +49056,11 @@ * @memberof CMsgNotificationAcknowledge * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationAcknowledge} CMsgNotificationAcknowledge + * @returns {CMsgNotificationAcknowledge & CMsgNotificationAcknowledge.$Shape} CMsgNotificationAcknowledge * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationAcknowledge.decodeDelimited = function decodeDelimited(reader) { + CMsgNotificationAcknowledge.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -37935,13 +49074,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotificationAcknowledge.verify = function verify(message) { + CMsgNotificationAcknowledge.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.notification_id != null && message.hasOwnProperty("notification_id")) + if (message.notification_id != null && $Object.hasOwnProperty.call(message, "notification_id")) if (!$util.isInteger(message.notification_id) && !(message.notification_id && $util.isInteger(message.notification_id.low) && $util.isInteger(message.notification_id.high))) return "notification_id: integer|Long expected"; return null; @@ -37955,17 +49098,23 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationAcknowledge} CMsgNotificationAcknowledge */ - CMsgNotificationAcknowledge.fromObject = function fromObject(object) { + CMsgNotificationAcknowledge.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationAcknowledge) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationAcknowledge: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotificationAcknowledge(); if (object.account_id != null) message.account_id = object.account_id >>> 0; if (object.notification_id != null) if ($util.Long) - (message.notification_id = $util.Long.fromValue(object.notification_id)).unsigned = true; + message.notification_id = $util.Long.fromValue(object.notification_id, true); else if (typeof object.notification_id === "string") - message.notification_id = parseInt(object.notification_id, 10); + message.notification_id = $parseInt(object.notification_id, 10); else if (typeof object.notification_id === "number") message.notification_id = object.notification_id; else if (typeof object.notification_id === "object") @@ -37982,25 +49131,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotificationAcknowledge.toObject = function toObject(message, options) { + CMsgNotificationAcknowledge.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.notification_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.notification_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.notification_id = options.longs === String ? "0" : 0; + object.notification_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.notification_id != null && message.hasOwnProperty("notification_id")) - if (typeof message.notification_id === "number") - object.notification_id = options.longs === String ? String(message.notification_id) : message.notification_id; + if (message.notification_id != null && $Object.hasOwnProperty.call(message, "notification_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.notification_id = typeof message.notification_id === "number" ? $BigInt(message.notification_id) : $util.Long.fromBits(message.notification_id.low >>> 0, message.notification_id.high >>> 0, true).toBigInt(); + else if (typeof message.notification_id === "number") + object.notification_id = options.longs === $String ? $String(message.notification_id) : message.notification_id; else - object.notification_id = options.longs === String ? $util.Long.prototype.toString.call(message.notification_id) : options.longs === Number ? new $util.LongBits(message.notification_id.low >>> 0, message.notification_id.high >>> 0).toNumber(true) : message.notification_id; + object.notification_id = options.longs === $String ? $util.Long.prototype.toString.call(message.notification_id) : options.longs === $Number ? new $util.LongBits(message.notification_id.low >>> 0, message.notification_id.high >>> 0).toNumber(true) : message.notification_id; return object; }; @@ -38011,8 +49166,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotificationAcknowledge.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotificationAcknowledge.prototype.toJSON = function() { + return CMsgNotificationAcknowledge.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotificationAcknowledge + * @function getTypeUrl + * @memberof CMsgNotificationAcknowledge + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotificationAcknowledge.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationAcknowledge"; }; return CMsgNotificationAcknowledge; @@ -38020,36 +49189,53 @@ $root.CMsgNotificationAcknowledgeReply = (function() { + /** + * Properties of a CMsgNotificationAcknowledgeReply. + * @typedef {Object} CMsgNotificationAcknowledgeReply.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgNotificationAcknowledgeReply. * @exports ICMsgNotificationAcknowledgeReply * @interface ICMsgNotificationAcknowledgeReply + * @augments CMsgNotificationAcknowledgeReply.$Properties + * @deprecated Use CMsgNotificationAcknowledgeReply.$Properties instead. + */ + + /** + * Shape of a CMsgNotificationAcknowledgeReply. + * @typedef {CMsgNotificationAcknowledgeReply.$Properties} CMsgNotificationAcknowledgeReply.$Shape */ /** * Constructs a new CMsgNotificationAcknowledgeReply. * @exports CMsgNotificationAcknowledgeReply * @classdesc Represents a CMsgNotificationAcknowledgeReply. - * @implements ICMsgNotificationAcknowledgeReply * @constructor - * @param {ICMsgNotificationAcknowledgeReply=} [properties] Properties to set + * @param {CMsgNotificationAcknowledgeReply.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotificationAcknowledgeReply(properties) { + var CMsgNotificationAcknowledgeReply = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgNotificationAcknowledgeReply instance using the specified properties. * @function create * @memberof CMsgNotificationAcknowledgeReply * @static - * @param {ICMsgNotificationAcknowledgeReply=} [properties] Properties to set + * @param {CMsgNotificationAcknowledgeReply.$Properties=} [properties] Properties to set * @returns {CMsgNotificationAcknowledgeReply} CMsgNotificationAcknowledgeReply instance + * @type {{ + * (properties: CMsgNotificationAcknowledgeReply.$Shape): CMsgNotificationAcknowledgeReply & CMsgNotificationAcknowledgeReply.$Shape; + * (properties?: CMsgNotificationAcknowledgeReply.$Properties): CMsgNotificationAcknowledgeReply; + * }} */ - CMsgNotificationAcknowledgeReply.create = function create(properties) { + CMsgNotificationAcknowledgeReply.create = function(properties) { return new CMsgNotificationAcknowledgeReply(properties); }; @@ -38058,13 +49244,20 @@ * @function encode * @memberof CMsgNotificationAcknowledgeReply * @static - * @param {ICMsgNotificationAcknowledgeReply} message CMsgNotificationAcknowledgeReply message or plain object to encode + * @param {CMsgNotificationAcknowledgeReply.$Properties} message CMsgNotificationAcknowledgeReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationAcknowledgeReply.encode = function encode(message, writer) { + CMsgNotificationAcknowledgeReply.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -38073,12 +49266,12 @@ * @function encodeDelimited * @memberof CMsgNotificationAcknowledgeReply * @static - * @param {ICMsgNotificationAcknowledgeReply} message CMsgNotificationAcknowledgeReply message or plain object to encode + * @param {CMsgNotificationAcknowledgeReply.$Properties} message CMsgNotificationAcknowledgeReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationAcknowledgeReply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotificationAcknowledgeReply.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -38088,22 +49281,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationAcknowledgeReply} CMsgNotificationAcknowledgeReply + * @returns {CMsgNotificationAcknowledgeReply & CMsgNotificationAcknowledgeReply.$Shape} CMsgNotificationAcknowledgeReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationAcknowledgeReply.decode = function decode(reader, length) { + CMsgNotificationAcknowledgeReply.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationAcknowledgeReply(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationAcknowledgeReply(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -38113,11 +49317,11 @@ * @memberof CMsgNotificationAcknowledgeReply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationAcknowledgeReply} CMsgNotificationAcknowledgeReply + * @returns {CMsgNotificationAcknowledgeReply & CMsgNotificationAcknowledgeReply.$Shape} CMsgNotificationAcknowledgeReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationAcknowledgeReply.decodeDelimited = function decodeDelimited(reader) { + CMsgNotificationAcknowledgeReply.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -38131,9 +49335,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotificationAcknowledgeReply.verify = function verify(message) { + CMsgNotificationAcknowledgeReply.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -38145,9 +49353,15 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationAcknowledgeReply} CMsgNotificationAcknowledgeReply */ - CMsgNotificationAcknowledgeReply.fromObject = function fromObject(object) { + CMsgNotificationAcknowledgeReply.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationAcknowledgeReply) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationAcknowledgeReply: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgNotificationAcknowledgeReply(); }; @@ -38160,7 +49374,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotificationAcknowledgeReply.toObject = function toObject() { + CMsgNotificationAcknowledgeReply.toObject = function () { return {}; }; @@ -38171,8 +49385,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotificationAcknowledgeReply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotificationAcknowledgeReply.prototype.toJSON = function() { + return CMsgNotificationAcknowledgeReply.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotificationAcknowledgeReply + * @function getTypeUrl + * @memberof CMsgNotificationAcknowledgeReply + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotificationAcknowledgeReply.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationAcknowledgeReply"; }; return CMsgNotificationAcknowledgeReply; @@ -38182,8 +49410,7 @@ /** * Properties of a CMsgGC_Match_Result. - * @exports ICMsgGC_Match_Result - * @interface ICMsgGC_Match_Result + * @typedef {Object} CMsgGC_Match_Result.$Properties * @property {number|Long|null} [match_id] CMsgGC_Match_Result match_id * @property {number|null} [match_group] CMsgGC_Match_Result match_group * @property {CMsgGC_Match_Result.Status|null} [status] CMsgGC_Match_Result status @@ -38193,27 +49420,41 @@ * @property {number|null} [winning_team] CMsgGC_Match_Result winning_team * @property {number|null} [map_index] CMsgGC_Match_Result map_index * @property {number|null} [game_type] CMsgGC_Match_Result game_type - * @property {Array.|null} [players] CMsgGC_Match_Result players + * @property {Array.|null} [players] CMsgGC_Match_Result players * @property {number|null} [win_reason] CMsgGC_Match_Result win_reason * @property {number|null} [flags] CMsgGC_Match_Result flags * @property {number|null} [bots] CMsgGC_Match_Result bots + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_Match_Result. + * @exports ICMsgGC_Match_Result + * @interface ICMsgGC_Match_Result + * @augments CMsgGC_Match_Result.$Properties + * @deprecated Use CMsgGC_Match_Result.$Properties instead. + */ + + /** + * Shape of a CMsgGC_Match_Result. + * @typedef {CMsgGC_Match_Result.$Properties} CMsgGC_Match_Result.$Shape */ /** * Constructs a new CMsgGC_Match_Result. * @exports CMsgGC_Match_Result * @classdesc Represents a CMsgGC_Match_Result. - * @implements ICMsgGC_Match_Result * @constructor - * @param {ICMsgGC_Match_Result=} [properties] Properties to set + * @param {CMsgGC_Match_Result.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_Match_Result(properties) { + var CMsgGC_Match_Result = function (properties) { this.players = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_Match_Result match_id. @@ -38289,7 +49530,7 @@ /** * CMsgGC_Match_Result players. - * @member {Array.} players + * @member {Array.} players * @memberof CMsgGC_Match_Result * @instance */ @@ -38324,10 +49565,14 @@ * @function create * @memberof CMsgGC_Match_Result * @static - * @param {ICMsgGC_Match_Result=} [properties] Properties to set + * @param {CMsgGC_Match_Result.$Properties=} [properties] Properties to set * @returns {CMsgGC_Match_Result} CMsgGC_Match_Result instance + * @type {{ + * (properties: CMsgGC_Match_Result.$Shape): CMsgGC_Match_Result & CMsgGC_Match_Result.$Shape; + * (properties?: CMsgGC_Match_Result.$Properties): CMsgGC_Match_Result; + * }} */ - CMsgGC_Match_Result.create = function create(properties) { + CMsgGC_Match_Result.create = function(properties) { return new CMsgGC_Match_Result(properties); }; @@ -38336,40 +49581,47 @@ * @function encode * @memberof CMsgGC_Match_Result * @static - * @param {ICMsgGC_Match_Result} message CMsgGC_Match_Result message or plain object to encode + * @param {CMsgGC_Match_Result.$Properties} message CMsgGC_Match_Result message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Match_Result.encode = function encode(message, writer) { + CMsgGC_Match_Result.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.match_id != null && Object.hasOwnProperty.call(message, "match_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.match_id); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.match_group); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + if (message.duration != null && $Object.hasOwnProperty.call(message, "duration")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.duration); - if (message.red_score != null && Object.hasOwnProperty.call(message, "red_score")) + if (message.red_score != null && $Object.hasOwnProperty.call(message, "red_score")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.red_score); - if (message.blue_score != null && Object.hasOwnProperty.call(message, "blue_score")) + if (message.blue_score != null && $Object.hasOwnProperty.call(message, "blue_score")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.blue_score); - if (message.winning_team != null && Object.hasOwnProperty.call(message, "winning_team")) + if (message.winning_team != null && $Object.hasOwnProperty.call(message, "winning_team")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.winning_team); - if (message.map_index != null && Object.hasOwnProperty.call(message, "map_index")) + if (message.map_index != null && $Object.hasOwnProperty.call(message, "map_index")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.map_index); - if (message.game_type != null && Object.hasOwnProperty.call(message, "game_type")) + if (message.game_type != null && $Object.hasOwnProperty.call(message, "game_type")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.game_type); if (message.players != null && message.players.length) for (var i = 0; i < message.players.length; ++i) - $root.CMsgGC_Match_Result.Player.encode(message.players[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.win_reason != null && Object.hasOwnProperty.call(message, "win_reason")) + $root.CMsgGC_Match_Result.Player.encode(message.players[i], writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); + if (message.win_reason != null && $Object.hasOwnProperty.call(message, "win_reason")) writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.win_reason); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.flags); - if (message.bots != null && Object.hasOwnProperty.call(message, "bots")) + if (message.bots != null && $Object.hasOwnProperty.call(message, "bots")) writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.bots); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -38378,12 +49630,12 @@ * @function encodeDelimited * @memberof CMsgGC_Match_Result * @static - * @param {ICMsgGC_Match_Result} message CMsgGC_Match_Result message or plain object to encode + * @param {CMsgGC_Match_Result.$Properties} message CMsgGC_Match_Result message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Match_Result.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_Match_Result.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -38393,63 +49645,122 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_Match_Result} CMsgGC_Match_Result + * @returns {CMsgGC_Match_Result & CMsgGC_Match_Result.$Shape} CMsgGC_Match_Result * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Match_Result.decode = function decode(reader, length) { + CMsgGC_Match_Result.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_Match_Result(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_Match_Result(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.match_id = reader.uint64(); - break; - case 2: - message.match_group = reader.int32(); - break; - case 3: - message.status = reader.int32(); - break; - case 4: - message.duration = reader.uint32(); - break; - case 5: - message.red_score = reader.uint32(); - break; - case 6: - message.blue_score = reader.uint32(); - break; - case 7: - message.winning_team = reader.uint32(); - break; - case 8: - message.map_index = reader.uint32(); - break; - case 9: - message.game_type = reader.uint32(); - break; - case 10: - if (!(message.players && message.players.length)) - message.players = []; - message.players.push($root.CMsgGC_Match_Result.Player.decode(reader, reader.uint32())); - break; - case 13: - message.win_reason = reader.uint32(); - break; - case 14: - message.flags = reader.uint32(); - break; - case 16: - message.bots = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.match_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.match_group = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGC_Match_Result.Status[value] !== $undefined) + message.status = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 4: { + if (wireType !== 0) + break; + message.duration = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.red_score = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.blue_score = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.winning_team = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.map_index = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.game_type = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 2) + break; + if (!(message.players && message.players.length)) + message.players = []; + message.players.push($root.CMsgGC_Match_Result.Player.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.win_reason = reader.uint32(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.bots = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -38459,11 +49770,11 @@ * @memberof CMsgGC_Match_Result * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_Match_Result} CMsgGC_Match_Result + * @returns {CMsgGC_Match_Result & CMsgGC_Match_Result.$Shape} CMsgGC_Match_Result * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Match_Result.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_Match_Result.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -38477,16 +49788,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_Match_Result.verify = function verify(message) { + CMsgGC_Match_Result.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.match_id != null && message.hasOwnProperty("match_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) if (!$util.isInteger(message.match_id) && !(message.match_id && $util.isInteger(message.match_id.low) && $util.isInteger(message.match_id.high))) return "match_id: integer|Long expected"; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) if (!$util.isInteger(message.match_group)) return "match_group: integer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) switch (message.status) { default: return "status: enum value expected"; @@ -38499,40 +49814,40 @@ case 7: break; } - if (message.duration != null && message.hasOwnProperty("duration")) + if (message.duration != null && $Object.hasOwnProperty.call(message, "duration")) if (!$util.isInteger(message.duration)) return "duration: integer expected"; - if (message.red_score != null && message.hasOwnProperty("red_score")) + if (message.red_score != null && $Object.hasOwnProperty.call(message, "red_score")) if (!$util.isInteger(message.red_score)) return "red_score: integer expected"; - if (message.blue_score != null && message.hasOwnProperty("blue_score")) + if (message.blue_score != null && $Object.hasOwnProperty.call(message, "blue_score")) if (!$util.isInteger(message.blue_score)) return "blue_score: integer expected"; - if (message.winning_team != null && message.hasOwnProperty("winning_team")) + if (message.winning_team != null && $Object.hasOwnProperty.call(message, "winning_team")) if (!$util.isInteger(message.winning_team)) return "winning_team: integer expected"; - if (message.map_index != null && message.hasOwnProperty("map_index")) + if (message.map_index != null && $Object.hasOwnProperty.call(message, "map_index")) if (!$util.isInteger(message.map_index)) return "map_index: integer expected"; - if (message.game_type != null && message.hasOwnProperty("game_type")) + if (message.game_type != null && $Object.hasOwnProperty.call(message, "game_type")) if (!$util.isInteger(message.game_type)) return "game_type: integer expected"; - if (message.players != null && message.hasOwnProperty("players")) { - if (!Array.isArray(message.players)) + if (message.players != null && $Object.hasOwnProperty.call(message, "players")) { + if (!$Array.isArray(message.players)) return "players: array expected"; for (var i = 0; i < message.players.length; ++i) { - var error = $root.CMsgGC_Match_Result.Player.verify(message.players[i]); + var error = $root.CMsgGC_Match_Result.Player.verify(message.players[i], _depth + 1); if (error) return "players." + error; } } - if (message.win_reason != null && message.hasOwnProperty("win_reason")) + if (message.win_reason != null && $Object.hasOwnProperty.call(message, "win_reason")) if (!$util.isInteger(message.win_reason)) return "win_reason: integer expected"; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.bots != null && message.hasOwnProperty("bots")) + if (message.bots != null && $Object.hasOwnProperty.call(message, "bots")) if (!$util.isInteger(message.bots)) return "bots: integer expected"; return null; @@ -38546,15 +49861,21 @@ * @param {Object.} object Plain object * @returns {CMsgGC_Match_Result} CMsgGC_Match_Result */ - CMsgGC_Match_Result.fromObject = function fromObject(object) { + CMsgGC_Match_Result.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_Match_Result) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_Match_Result: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_Match_Result(); if (object.match_id != null) if ($util.Long) - (message.match_id = $util.Long.fromValue(object.match_id)).unsigned = true; + message.match_id = $util.Long.fromValue(object.match_id, true); else if (typeof object.match_id === "string") - message.match_id = parseInt(object.match_id, 10); + message.match_id = $parseInt(object.match_id, 10); else if (typeof object.match_id === "number") message.match_id = object.match_id; else if (typeof object.match_id === "object") @@ -38590,6 +49911,7 @@ case 7: message.status = 7; break; + default: } if (object.duration != null) message.duration = object.duration >>> 0; @@ -38604,13 +49926,13 @@ if (object.game_type != null) message.game_type = object.game_type >>> 0; if (object.players) { - if (!Array.isArray(object.players)) - throw TypeError(".CMsgGC_Match_Result.players: array expected"); - message.players = []; + if (!$Array.isArray(object.players)) + throw $TypeError(".CMsgGC_Match_Result.players: array expected"); + message.players = $Array(object.players.length); for (var i = 0; i < object.players.length; ++i) { - if (typeof object.players[i] !== "object") - throw TypeError(".CMsgGC_Match_Result.players: object expected"); - message.players[i] = $root.CMsgGC_Match_Result.Player.fromObject(object.players[i]); + if (!$util.isObject(object.players[i])) + throw $TypeError(".CMsgGC_Match_Result.players: object expected"); + message.players[i] = $root.CMsgGC_Match_Result.Player.fromObject(object.players[i], _depth + 1); } } if (object.win_reason != null) @@ -38631,20 +49953,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_Match_Result.toObject = function toObject(message, options) { + CMsgGC_Match_Result.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.players = []; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.match_id = options.longs === String ? "0" : 0; + object.match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.match_group = 0; - object.status = options.enums === String ? "MATCH_SUCCEEDED" : 0; + object.status = options.enums === $String ? "MATCH_SUCCEEDED" : 0; object.duration = 0; object.red_score = 0; object.blue_score = 0; @@ -38655,37 +49981,39 @@ object.flags = 0; object.bots = 0; } - if (message.match_id != null && message.hasOwnProperty("match_id")) - if (typeof message.match_id === "number") - object.match_id = options.longs === String ? String(message.match_id) : message.match_id; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.match_id = typeof message.match_id === "number" ? $BigInt(message.match_id) : $util.Long.fromBits(message.match_id.low >>> 0, message.match_id.high >>> 0, true).toBigInt(); + else if (typeof message.match_id === "number") + object.match_id = options.longs === $String ? $String(message.match_id) : message.match_id; else - object.match_id = options.longs === String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; - if (message.match_group != null && message.hasOwnProperty("match_group")) + object.match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === $Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) object.match_group = message.match_group; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.CMsgGC_Match_Result.Status[message.status] : message.status; - if (message.duration != null && message.hasOwnProperty("duration")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + object.status = options.enums === $String ? $root.CMsgGC_Match_Result.Status[message.status] === $undefined ? message.status : $root.CMsgGC_Match_Result.Status[message.status] : message.status; + if (message.duration != null && $Object.hasOwnProperty.call(message, "duration")) object.duration = message.duration; - if (message.red_score != null && message.hasOwnProperty("red_score")) + if (message.red_score != null && $Object.hasOwnProperty.call(message, "red_score")) object.red_score = message.red_score; - if (message.blue_score != null && message.hasOwnProperty("blue_score")) + if (message.blue_score != null && $Object.hasOwnProperty.call(message, "blue_score")) object.blue_score = message.blue_score; - if (message.winning_team != null && message.hasOwnProperty("winning_team")) + if (message.winning_team != null && $Object.hasOwnProperty.call(message, "winning_team")) object.winning_team = message.winning_team; - if (message.map_index != null && message.hasOwnProperty("map_index")) + if (message.map_index != null && $Object.hasOwnProperty.call(message, "map_index")) object.map_index = message.map_index; - if (message.game_type != null && message.hasOwnProperty("game_type")) + if (message.game_type != null && $Object.hasOwnProperty.call(message, "game_type")) object.game_type = message.game_type; if (message.players && message.players.length) { - object.players = []; + object.players = $Array(message.players.length); for (var j = 0; j < message.players.length; ++j) - object.players[j] = $root.CMsgGC_Match_Result.Player.toObject(message.players[j], options); + object.players[j] = $root.CMsgGC_Match_Result.Player.toObject(message.players[j], options, _depth + 1); } - if (message.win_reason != null && message.hasOwnProperty("win_reason")) + if (message.win_reason != null && $Object.hasOwnProperty.call(message, "win_reason")) object.win_reason = message.win_reason; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.bots != null && message.hasOwnProperty("bots")) + if (message.bots != null && $Object.hasOwnProperty.call(message, "bots")) object.bots = message.bots; return object; }; @@ -38697,16 +50025,29 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_Match_Result.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_Match_Result.prototype.toJSON = function() { + return CMsgGC_Match_Result.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_Match_Result + * @function getTypeUrl + * @memberof CMsgGC_Match_Result + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_Match_Result.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_Match_Result"; }; CMsgGC_Match_Result.Player = (function() { /** * Properties of a Player. - * @memberof CMsgGC_Match_Result - * @interface IPlayer + * @typedef {Object} CMsgGC_Match_Result.Player.$Properties * @property {number|Long|null} [steam_id] Player steam_id * @property {number|Long|null} [original_party_id] Player original_party_id * @property {number|null} [team] Player team @@ -38725,27 +50066,41 @@ * @property {number|null} [damage_medal] Player damage_medal * @property {number|null} [healing_medal] Player healing_medal * @property {number|null} [support_medal] Player support_medal - * @property {Array.|null} [xp_breakdown] Player xp_breakdown + * @property {Array.|null} [xp_breakdown] Player xp_breakdown * @property {number|null} [leave_time] Player leave_time * @property {TFMatchLeaveReason|null} [leave_reason] Player leave_reason * @property {number|null} [connect_time] Player connect_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Player. + * @memberof CMsgGC_Match_Result + * @interface IPlayer + * @augments CMsgGC_Match_Result.Player.$Properties + * @deprecated Use CMsgGC_Match_Result.Player.$Properties instead. + */ + + /** + * Shape of a Player. + * @typedef {CMsgGC_Match_Result.Player.$Properties} CMsgGC_Match_Result.Player.$Shape */ /** * Constructs a new Player. * @memberof CMsgGC_Match_Result * @classdesc Represents a Player. - * @implements IPlayer * @constructor - * @param {CMsgGC_Match_Result.IPlayer=} [properties] Properties to set + * @param {CMsgGC_Match_Result.Player.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Player(properties) { + var Player = function (properties) { this.xp_breakdown = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Player steam_id. @@ -38753,7 +50108,7 @@ * @memberof CMsgGC_Match_Result.Player * @instance */ - Player.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Player.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Player original_party_id. @@ -38893,7 +50248,7 @@ /** * Player xp_breakdown. - * @member {Array.} xp_breakdown + * @member {Array.} xp_breakdown * @memberof CMsgGC_Match_Result.Player * @instance */ @@ -38928,10 +50283,14 @@ * @function create * @memberof CMsgGC_Match_Result.Player * @static - * @param {CMsgGC_Match_Result.IPlayer=} [properties] Properties to set + * @param {CMsgGC_Match_Result.Player.$Properties=} [properties] Properties to set * @returns {CMsgGC_Match_Result.Player} Player instance + * @type {{ + * (properties: CMsgGC_Match_Result.Player.$Shape): CMsgGC_Match_Result.Player & CMsgGC_Match_Result.Player.$Shape; + * (properties?: CMsgGC_Match_Result.Player.$Properties): CMsgGC_Match_Result.Player; + * }} */ - Player.create = function create(properties) { + Player.create = function(properties) { return new Player(properties); }; @@ -38940,58 +50299,65 @@ * @function encode * @memberof CMsgGC_Match_Result.Player * @static - * @param {CMsgGC_Match_Result.IPlayer} message Player message or plain object to encode + * @param {CMsgGC_Match_Result.Player.$Properties} message Player message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Player.encode = function encode(message, writer) { + Player.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.original_party_id != null && Object.hasOwnProperty.call(message, "original_party_id")) + if (message.original_party_id != null && $Object.hasOwnProperty.call(message, "original_party_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.original_party_id); - if (message.team != null && Object.hasOwnProperty.call(message, "team")) + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.team); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.score); - if (message.ping != null && Object.hasOwnProperty.call(message, "ping")) + if (message.ping != null && $Object.hasOwnProperty.call(message, "ping")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.ping); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.flags); - if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.rank); - if (message.classes_played != null && Object.hasOwnProperty.call(message, "classes_played")) + if (message.classes_played != null && $Object.hasOwnProperty.call(message, "classes_played")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.classes_played); - if (message.kills != null && Object.hasOwnProperty.call(message, "kills")) + if (message.kills != null && $Object.hasOwnProperty.call(message, "kills")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.kills); - if (message.deaths != null && Object.hasOwnProperty.call(message, "deaths")) + if (message.deaths != null && $Object.hasOwnProperty.call(message, "deaths")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.deaths); - if (message.damage != null && Object.hasOwnProperty.call(message, "damage")) + if (message.damage != null && $Object.hasOwnProperty.call(message, "damage")) writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.damage); - if (message.healing != null && Object.hasOwnProperty.call(message, "healing")) + if (message.healing != null && $Object.hasOwnProperty.call(message, "healing")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.healing); - if (message.support != null && Object.hasOwnProperty.call(message, "support")) + if (message.support != null && $Object.hasOwnProperty.call(message, "support")) writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.support); - if (message.score_medal != null && Object.hasOwnProperty.call(message, "score_medal")) + if (message.score_medal != null && $Object.hasOwnProperty.call(message, "score_medal")) writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.score_medal); - if (message.kills_medal != null && Object.hasOwnProperty.call(message, "kills_medal")) + if (message.kills_medal != null && $Object.hasOwnProperty.call(message, "kills_medal")) writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.kills_medal); - if (message.damage_medal != null && Object.hasOwnProperty.call(message, "damage_medal")) + if (message.damage_medal != null && $Object.hasOwnProperty.call(message, "damage_medal")) writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.damage_medal); - if (message.healing_medal != null && Object.hasOwnProperty.call(message, "healing_medal")) + if (message.healing_medal != null && $Object.hasOwnProperty.call(message, "healing_medal")) writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.healing_medal); - if (message.support_medal != null && Object.hasOwnProperty.call(message, "support_medal")) + if (message.support_medal != null && $Object.hasOwnProperty.call(message, "support_medal")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.support_medal); if (message.xp_breakdown != null && message.xp_breakdown.length) for (var i = 0; i < message.xp_breakdown.length; ++i) - $root.CMsgTFXPSource.encode(message.xp_breakdown[i], writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.leave_time != null && Object.hasOwnProperty.call(message, "leave_time")) + $root.CMsgTFXPSource.encode(message.xp_breakdown[i], writer.uint32(/* id 21, wireType 2 =*/170).fork(), _depth + 1).ldelim(); + if (message.leave_time != null && $Object.hasOwnProperty.call(message, "leave_time")) writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.leave_time); - if (message.leave_reason != null && Object.hasOwnProperty.call(message, "leave_reason")) + if (message.leave_reason != null && $Object.hasOwnProperty.call(message, "leave_reason")) writer.uint32(/* id 23, wireType 0 =*/184).int32(message.leave_reason); - if (message.connect_time != null && Object.hasOwnProperty.call(message, "connect_time")) + if (message.connect_time != null && $Object.hasOwnProperty.call(message, "connect_time")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.connect_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -39000,12 +50366,12 @@ * @function encodeDelimited * @memberof CMsgGC_Match_Result.Player * @static - * @param {CMsgGC_Match_Result.IPlayer} message Player message or plain object to encode + * @param {CMsgGC_Match_Result.Player.$Properties} message Player message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Player.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Player.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -39015,90 +50381,176 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_Match_Result.Player} Player + * @returns {CMsgGC_Match_Result.Player & CMsgGC_Match_Result.Player.$Shape} Player * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Player.decode = function decode(reader, length) { + Player.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_Match_Result.Player(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_Match_Result.Player(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.original_party_id = reader.uint64(); - break; - case 3: - message.team = reader.uint32(); - break; - case 4: - message.score = reader.uint32(); - break; - case 5: - message.ping = reader.uint32(); - break; - case 6: - message.flags = reader.uint32(); - break; - case 9: - message.rank = reader.uint32(); - break; - case 10: - message.classes_played = reader.uint32(); - break; - case 11: - message.kills = reader.uint32(); - break; - case 12: - message.deaths = reader.uint32(); - break; - case 13: - message.damage = reader.uint32(); - break; - case 14: - message.healing = reader.uint32(); - break; - case 15: - message.support = reader.uint32(); - break; - case 16: - message.score_medal = reader.uint32(); - break; - case 17: - message.kills_medal = reader.uint32(); - break; - case 18: - message.damage_medal = reader.uint32(); - break; - case 19: - message.healing_medal = reader.uint32(); - break; - case 20: - message.support_medal = reader.uint32(); - break; - case 21: - if (!(message.xp_breakdown && message.xp_breakdown.length)) - message.xp_breakdown = []; - message.xp_breakdown.push($root.CMsgTFXPSource.decode(reader, reader.uint32())); - break; - case 22: - message.leave_time = reader.uint32(); - break; - case 23: - message.leave_reason = reader.int32(); - break; - case 24: - message.connect_time = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.original_party_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.team = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.score = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.ping = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.rank = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.classes_played = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.kills = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.deaths = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.damage = reader.uint32(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.healing = reader.uint32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.support = reader.uint32(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.score_medal = reader.uint32(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.kills_medal = reader.uint32(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.damage_medal = reader.uint32(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.healing_medal = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.support_medal = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 2) + break; + if (!(message.xp_breakdown && message.xp_breakdown.length)) + message.xp_breakdown = []; + message.xp_breakdown.push($root.CMsgTFXPSource.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 22: { + if (wireType !== 0) + break; + message.leave_time = reader.uint32(); + continue; + } + case 23: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.TFMatchLeaveReason[value] !== $undefined) + message.leave_reason = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 24: { + if (wireType !== 0) + break; + message.connect_time = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -39108,11 +50560,11 @@ * @memberof CMsgGC_Match_Result.Player * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_Match_Result.Player} Player + * @returns {CMsgGC_Match_Result.Player & CMsgGC_Match_Result.Player.$Shape} Player * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Player.decodeDelimited = function decodeDelimited(reader) { + Player.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -39126,76 +50578,80 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Player.verify = function verify(message) { + Player.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.original_party_id != null && message.hasOwnProperty("original_party_id")) + if (message.original_party_id != null && $Object.hasOwnProperty.call(message, "original_party_id")) if (!$util.isInteger(message.original_party_id) && !(message.original_party_id && $util.isInteger(message.original_party_id.low) && $util.isInteger(message.original_party_id.high))) return "original_party_id: integer|Long expected"; - if (message.team != null && message.hasOwnProperty("team")) + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) if (!$util.isInteger(message.team)) return "team: integer expected"; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) if (!$util.isInteger(message.score)) return "score: integer expected"; - if (message.ping != null && message.hasOwnProperty("ping")) + if (message.ping != null && $Object.hasOwnProperty.call(message, "ping")) if (!$util.isInteger(message.ping)) return "ping: integer expected"; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.rank != null && message.hasOwnProperty("rank")) + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) if (!$util.isInteger(message.rank)) return "rank: integer expected"; - if (message.classes_played != null && message.hasOwnProperty("classes_played")) + if (message.classes_played != null && $Object.hasOwnProperty.call(message, "classes_played")) if (!$util.isInteger(message.classes_played)) return "classes_played: integer expected"; - if (message.kills != null && message.hasOwnProperty("kills")) + if (message.kills != null && $Object.hasOwnProperty.call(message, "kills")) if (!$util.isInteger(message.kills)) return "kills: integer expected"; - if (message.deaths != null && message.hasOwnProperty("deaths")) + if (message.deaths != null && $Object.hasOwnProperty.call(message, "deaths")) if (!$util.isInteger(message.deaths)) return "deaths: integer expected"; - if (message.damage != null && message.hasOwnProperty("damage")) + if (message.damage != null && $Object.hasOwnProperty.call(message, "damage")) if (!$util.isInteger(message.damage)) return "damage: integer expected"; - if (message.healing != null && message.hasOwnProperty("healing")) + if (message.healing != null && $Object.hasOwnProperty.call(message, "healing")) if (!$util.isInteger(message.healing)) return "healing: integer expected"; - if (message.support != null && message.hasOwnProperty("support")) + if (message.support != null && $Object.hasOwnProperty.call(message, "support")) if (!$util.isInteger(message.support)) return "support: integer expected"; - if (message.score_medal != null && message.hasOwnProperty("score_medal")) + if (message.score_medal != null && $Object.hasOwnProperty.call(message, "score_medal")) if (!$util.isInteger(message.score_medal)) return "score_medal: integer expected"; - if (message.kills_medal != null && message.hasOwnProperty("kills_medal")) + if (message.kills_medal != null && $Object.hasOwnProperty.call(message, "kills_medal")) if (!$util.isInteger(message.kills_medal)) return "kills_medal: integer expected"; - if (message.damage_medal != null && message.hasOwnProperty("damage_medal")) + if (message.damage_medal != null && $Object.hasOwnProperty.call(message, "damage_medal")) if (!$util.isInteger(message.damage_medal)) return "damage_medal: integer expected"; - if (message.healing_medal != null && message.hasOwnProperty("healing_medal")) + if (message.healing_medal != null && $Object.hasOwnProperty.call(message, "healing_medal")) if (!$util.isInteger(message.healing_medal)) return "healing_medal: integer expected"; - if (message.support_medal != null && message.hasOwnProperty("support_medal")) + if (message.support_medal != null && $Object.hasOwnProperty.call(message, "support_medal")) if (!$util.isInteger(message.support_medal)) return "support_medal: integer expected"; - if (message.xp_breakdown != null && message.hasOwnProperty("xp_breakdown")) { - if (!Array.isArray(message.xp_breakdown)) + if (message.xp_breakdown != null && $Object.hasOwnProperty.call(message, "xp_breakdown")) { + if (!$Array.isArray(message.xp_breakdown)) return "xp_breakdown: array expected"; for (var i = 0; i < message.xp_breakdown.length; ++i) { - var error = $root.CMsgTFXPSource.verify(message.xp_breakdown[i]); + var error = $root.CMsgTFXPSource.verify(message.xp_breakdown[i], _depth + 1); if (error) return "xp_breakdown." + error; } } - if (message.leave_time != null && message.hasOwnProperty("leave_time")) + if (message.leave_time != null && $Object.hasOwnProperty.call(message, "leave_time")) if (!$util.isInteger(message.leave_time)) return "leave_time: integer expected"; - if (message.leave_reason != null && message.hasOwnProperty("leave_reason")) + if (message.leave_reason != null && $Object.hasOwnProperty.call(message, "leave_reason")) switch (message.leave_reason) { default: return "leave_reason: enum value expected"; @@ -39208,7 +50664,7 @@ case 6: break; } - if (message.connect_time != null && message.hasOwnProperty("connect_time")) + if (message.connect_time != null && $Object.hasOwnProperty.call(message, "connect_time")) if (!$util.isInteger(message.connect_time)) return "connect_time: integer expected"; return null; @@ -39222,24 +50678,30 @@ * @param {Object.} object Plain object * @returns {CMsgGC_Match_Result.Player} Player */ - Player.fromObject = function fromObject(object) { + Player.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_Match_Result.Player) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_Match_Result.Player: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_Match_Result.Player(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.original_party_id != null) if ($util.Long) - (message.original_party_id = $util.Long.fromValue(object.original_party_id)).unsigned = true; + message.original_party_id = $util.Long.fromValue(object.original_party_id, true); else if (typeof object.original_party_id === "string") - message.original_party_id = parseInt(object.original_party_id, 10); + message.original_party_id = $parseInt(object.original_party_id, 10); else if (typeof object.original_party_id === "number") message.original_party_id = object.original_party_id; else if (typeof object.original_party_id === "object") @@ -39277,13 +50739,13 @@ if (object.support_medal != null) message.support_medal = object.support_medal >>> 0; if (object.xp_breakdown) { - if (!Array.isArray(object.xp_breakdown)) - throw TypeError(".CMsgGC_Match_Result.Player.xp_breakdown: array expected"); - message.xp_breakdown = []; + if (!$Array.isArray(object.xp_breakdown)) + throw $TypeError(".CMsgGC_Match_Result.Player.xp_breakdown: array expected"); + message.xp_breakdown = $Array(object.xp_breakdown.length); for (var i = 0; i < object.xp_breakdown.length; ++i) { - if (typeof object.xp_breakdown[i] !== "object") - throw TypeError(".CMsgGC_Match_Result.Player.xp_breakdown: object expected"); - message.xp_breakdown[i] = $root.CMsgTFXPSource.fromObject(object.xp_breakdown[i]); + if (!$util.isObject(object.xp_breakdown[i])) + throw $TypeError(".CMsgGC_Match_Result.Player.xp_breakdown: object expected"); + message.xp_breakdown[i] = $root.CMsgTFXPSource.fromObject(object.xp_breakdown[i], _depth + 1); } } if (object.leave_time != null) @@ -39317,6 +50779,7 @@ case 6: message.leave_reason = 6; break; + default: } if (object.connect_time != null) message.connect_time = object.connect_time >>> 0; @@ -39332,23 +50795,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Player.toObject = function toObject(message, options) { + Player.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.xp_breakdown = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.original_party_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.original_party_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.original_party_id = options.longs === String ? "0" : 0; + object.original_party_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.team = 0; object.score = 0; object.ping = 0; @@ -39366,61 +50833,65 @@ object.healing_medal = 0; object.support_medal = 0; object.leave_time = 0; - object.leave_reason = options.enums === String ? "TFMatchLeaveReason_UNSPECIFIED" : 0; + object.leave_reason = options.enums === $String ? "TFMatchLeaveReason_UNSPECIFIED" : 0; object.connect_time = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.original_party_id != null && message.hasOwnProperty("original_party_id")) - if (typeof message.original_party_id === "number") - object.original_party_id = options.longs === String ? String(message.original_party_id) : message.original_party_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.original_party_id != null && $Object.hasOwnProperty.call(message, "original_party_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.original_party_id = typeof message.original_party_id === "number" ? $BigInt(message.original_party_id) : $util.Long.fromBits(message.original_party_id.low >>> 0, message.original_party_id.high >>> 0, true).toBigInt(); + else if (typeof message.original_party_id === "number") + object.original_party_id = options.longs === $String ? $String(message.original_party_id) : message.original_party_id; else - object.original_party_id = options.longs === String ? $util.Long.prototype.toString.call(message.original_party_id) : options.longs === Number ? new $util.LongBits(message.original_party_id.low >>> 0, message.original_party_id.high >>> 0).toNumber(true) : message.original_party_id; - if (message.team != null && message.hasOwnProperty("team")) + object.original_party_id = options.longs === $String ? $util.Long.prototype.toString.call(message.original_party_id) : options.longs === $Number ? new $util.LongBits(message.original_party_id.low >>> 0, message.original_party_id.high >>> 0).toNumber(true) : message.original_party_id; + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) object.team = message.team; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) object.score = message.score; - if (message.ping != null && message.hasOwnProperty("ping")) + if (message.ping != null && $Object.hasOwnProperty.call(message, "ping")) object.ping = message.ping; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.rank != null && message.hasOwnProperty("rank")) + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) object.rank = message.rank; - if (message.classes_played != null && message.hasOwnProperty("classes_played")) + if (message.classes_played != null && $Object.hasOwnProperty.call(message, "classes_played")) object.classes_played = message.classes_played; - if (message.kills != null && message.hasOwnProperty("kills")) + if (message.kills != null && $Object.hasOwnProperty.call(message, "kills")) object.kills = message.kills; - if (message.deaths != null && message.hasOwnProperty("deaths")) + if (message.deaths != null && $Object.hasOwnProperty.call(message, "deaths")) object.deaths = message.deaths; - if (message.damage != null && message.hasOwnProperty("damage")) + if (message.damage != null && $Object.hasOwnProperty.call(message, "damage")) object.damage = message.damage; - if (message.healing != null && message.hasOwnProperty("healing")) + if (message.healing != null && $Object.hasOwnProperty.call(message, "healing")) object.healing = message.healing; - if (message.support != null && message.hasOwnProperty("support")) + if (message.support != null && $Object.hasOwnProperty.call(message, "support")) object.support = message.support; - if (message.score_medal != null && message.hasOwnProperty("score_medal")) + if (message.score_medal != null && $Object.hasOwnProperty.call(message, "score_medal")) object.score_medal = message.score_medal; - if (message.kills_medal != null && message.hasOwnProperty("kills_medal")) + if (message.kills_medal != null && $Object.hasOwnProperty.call(message, "kills_medal")) object.kills_medal = message.kills_medal; - if (message.damage_medal != null && message.hasOwnProperty("damage_medal")) + if (message.damage_medal != null && $Object.hasOwnProperty.call(message, "damage_medal")) object.damage_medal = message.damage_medal; - if (message.healing_medal != null && message.hasOwnProperty("healing_medal")) + if (message.healing_medal != null && $Object.hasOwnProperty.call(message, "healing_medal")) object.healing_medal = message.healing_medal; - if (message.support_medal != null && message.hasOwnProperty("support_medal")) + if (message.support_medal != null && $Object.hasOwnProperty.call(message, "support_medal")) object.support_medal = message.support_medal; if (message.xp_breakdown && message.xp_breakdown.length) { - object.xp_breakdown = []; + object.xp_breakdown = $Array(message.xp_breakdown.length); for (var j = 0; j < message.xp_breakdown.length; ++j) - object.xp_breakdown[j] = $root.CMsgTFXPSource.toObject(message.xp_breakdown[j], options); + object.xp_breakdown[j] = $root.CMsgTFXPSource.toObject(message.xp_breakdown[j], options, _depth + 1); } - if (message.leave_time != null && message.hasOwnProperty("leave_time")) + if (message.leave_time != null && $Object.hasOwnProperty.call(message, "leave_time")) object.leave_time = message.leave_time; - if (message.leave_reason != null && message.hasOwnProperty("leave_reason")) - object.leave_reason = options.enums === String ? $root.TFMatchLeaveReason[message.leave_reason] : message.leave_reason; - if (message.connect_time != null && message.hasOwnProperty("connect_time")) + if (message.leave_reason != null && $Object.hasOwnProperty.call(message, "leave_reason")) + object.leave_reason = options.enums === $String ? $root.TFMatchLeaveReason[message.leave_reason] === $undefined ? message.leave_reason : $root.TFMatchLeaveReason[message.leave_reason] : message.leave_reason; + if (message.connect_time != null && $Object.hasOwnProperty.call(message, "connect_time")) object.connect_time = message.connect_time; return object; }; @@ -39432,8 +50903,22 @@ * @instance * @returns {Object.} JSON object */ - Player.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Player.prototype.toJSON = function() { + return Player.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Player + * @function getTypeUrl + * @memberof CMsgGC_Match_Result.Player + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Player.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_Match_Result.Player"; }; return Player; @@ -39452,7 +50937,7 @@ * @property {number} MATCH_FINISHED_ABANDON=7 MATCH_FINISHED_ABANDON value */ CMsgGC_Match_Result.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "MATCH_SUCCEEDED"] = 0; values[valuesById[1] = "MATCH_FAILED_GC"] = 1; values[valuesById[2] = "MATCH_FAILED_TRUSTED"] = 2; @@ -39468,36 +50953,53 @@ $root.CMsgGC_Match_ResultResponse = (function() { + /** + * Properties of a CMsgGC_Match_ResultResponse. + * @typedef {Object} CMsgGC_Match_ResultResponse.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_Match_ResultResponse. * @exports ICMsgGC_Match_ResultResponse * @interface ICMsgGC_Match_ResultResponse + * @augments CMsgGC_Match_ResultResponse.$Properties + * @deprecated Use CMsgGC_Match_ResultResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGC_Match_ResultResponse. + * @typedef {CMsgGC_Match_ResultResponse.$Properties} CMsgGC_Match_ResultResponse.$Shape */ /** * Constructs a new CMsgGC_Match_ResultResponse. * @exports CMsgGC_Match_ResultResponse * @classdesc Represents a CMsgGC_Match_ResultResponse. - * @implements ICMsgGC_Match_ResultResponse * @constructor - * @param {ICMsgGC_Match_ResultResponse=} [properties] Properties to set + * @param {CMsgGC_Match_ResultResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_Match_ResultResponse(properties) { + var CMsgGC_Match_ResultResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgGC_Match_ResultResponse instance using the specified properties. * @function create * @memberof CMsgGC_Match_ResultResponse * @static - * @param {ICMsgGC_Match_ResultResponse=} [properties] Properties to set + * @param {CMsgGC_Match_ResultResponse.$Properties=} [properties] Properties to set * @returns {CMsgGC_Match_ResultResponse} CMsgGC_Match_ResultResponse instance + * @type {{ + * (properties: CMsgGC_Match_ResultResponse.$Shape): CMsgGC_Match_ResultResponse & CMsgGC_Match_ResultResponse.$Shape; + * (properties?: CMsgGC_Match_ResultResponse.$Properties): CMsgGC_Match_ResultResponse; + * }} */ - CMsgGC_Match_ResultResponse.create = function create(properties) { + CMsgGC_Match_ResultResponse.create = function(properties) { return new CMsgGC_Match_ResultResponse(properties); }; @@ -39506,13 +51008,20 @@ * @function encode * @memberof CMsgGC_Match_ResultResponse * @static - * @param {ICMsgGC_Match_ResultResponse} message CMsgGC_Match_ResultResponse message or plain object to encode + * @param {CMsgGC_Match_ResultResponse.$Properties} message CMsgGC_Match_ResultResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Match_ResultResponse.encode = function encode(message, writer) { + CMsgGC_Match_ResultResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -39521,12 +51030,12 @@ * @function encodeDelimited * @memberof CMsgGC_Match_ResultResponse * @static - * @param {ICMsgGC_Match_ResultResponse} message CMsgGC_Match_ResultResponse message or plain object to encode + * @param {CMsgGC_Match_ResultResponse.$Properties} message CMsgGC_Match_ResultResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Match_ResultResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_Match_ResultResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -39536,22 +51045,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_Match_ResultResponse} CMsgGC_Match_ResultResponse + * @returns {CMsgGC_Match_ResultResponse & CMsgGC_Match_ResultResponse.$Shape} CMsgGC_Match_ResultResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Match_ResultResponse.decode = function decode(reader, length) { + CMsgGC_Match_ResultResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_Match_ResultResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_Match_ResultResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -39561,11 +51081,11 @@ * @memberof CMsgGC_Match_ResultResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_Match_ResultResponse} CMsgGC_Match_ResultResponse + * @returns {CMsgGC_Match_ResultResponse & CMsgGC_Match_ResultResponse.$Shape} CMsgGC_Match_ResultResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Match_ResultResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_Match_ResultResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -39579,9 +51099,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_Match_ResultResponse.verify = function verify(message) { + CMsgGC_Match_ResultResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -39593,9 +51117,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_Match_ResultResponse} CMsgGC_Match_ResultResponse */ - CMsgGC_Match_ResultResponse.fromObject = function fromObject(object) { + CMsgGC_Match_ResultResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_Match_ResultResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_Match_ResultResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgGC_Match_ResultResponse(); }; @@ -39608,7 +51138,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_Match_ResultResponse.toObject = function toObject() { + CMsgGC_Match_ResultResponse.toObject = function () { return {}; }; @@ -39619,8 +51149,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_Match_ResultResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_Match_ResultResponse.prototype.toJSON = function() { + return CMsgGC_Match_ResultResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_Match_ResultResponse + * @function getTypeUrl + * @memberof CMsgGC_Match_ResultResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_Match_ResultResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_Match_ResultResponse"; }; return CMsgGC_Match_ResultResponse; @@ -39628,31 +51172,44 @@ $root.CEconItemPreviewDataBlock = (function() { + /** + * Properties of a CEconItemPreviewDataBlock. + * @typedef {Object} CEconItemPreviewDataBlock.$Properties + * @property {CSOEconItem.$Properties|null} [econitem] CEconItemPreviewDataBlock econitem + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CEconItemPreviewDataBlock. * @exports ICEconItemPreviewDataBlock * @interface ICEconItemPreviewDataBlock - * @property {ICSOEconItem|null} [econitem] CEconItemPreviewDataBlock econitem + * @augments CEconItemPreviewDataBlock.$Properties + * @deprecated Use CEconItemPreviewDataBlock.$Properties instead. + */ + + /** + * Shape of a CEconItemPreviewDataBlock. + * @typedef {CEconItemPreviewDataBlock.$Properties} CEconItemPreviewDataBlock.$Shape */ /** * Constructs a new CEconItemPreviewDataBlock. * @exports CEconItemPreviewDataBlock * @classdesc Represents a CEconItemPreviewDataBlock. - * @implements ICEconItemPreviewDataBlock * @constructor - * @param {ICEconItemPreviewDataBlock=} [properties] Properties to set + * @param {CEconItemPreviewDataBlock.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CEconItemPreviewDataBlock(properties) { + var CEconItemPreviewDataBlock = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CEconItemPreviewDataBlock econitem. - * @member {ICSOEconItem|null|undefined} econitem + * @member {CSOEconItem.$Properties|null|undefined} econitem * @memberof CEconItemPreviewDataBlock * @instance */ @@ -39663,10 +51220,14 @@ * @function create * @memberof CEconItemPreviewDataBlock * @static - * @param {ICEconItemPreviewDataBlock=} [properties] Properties to set + * @param {CEconItemPreviewDataBlock.$Properties=} [properties] Properties to set * @returns {CEconItemPreviewDataBlock} CEconItemPreviewDataBlock instance + * @type {{ + * (properties: CEconItemPreviewDataBlock.$Shape): CEconItemPreviewDataBlock & CEconItemPreviewDataBlock.$Shape; + * (properties?: CEconItemPreviewDataBlock.$Properties): CEconItemPreviewDataBlock; + * }} */ - CEconItemPreviewDataBlock.create = function create(properties) { + CEconItemPreviewDataBlock.create = function(properties) { return new CEconItemPreviewDataBlock(properties); }; @@ -39675,15 +51236,22 @@ * @function encode * @memberof CEconItemPreviewDataBlock * @static - * @param {ICEconItemPreviewDataBlock} message CEconItemPreviewDataBlock message or plain object to encode + * @param {CEconItemPreviewDataBlock.$Properties} message CEconItemPreviewDataBlock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CEconItemPreviewDataBlock.encode = function encode(message, writer) { + CEconItemPreviewDataBlock.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.econitem != null && Object.hasOwnProperty.call(message, "econitem")) - $root.CSOEconItem.encode(message.econitem, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.econitem != null && $Object.hasOwnProperty.call(message, "econitem")) + $root.CSOEconItem.encode(message.econitem, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -39692,12 +51260,12 @@ * @function encodeDelimited * @memberof CEconItemPreviewDataBlock * @static - * @param {ICEconItemPreviewDataBlock} message CEconItemPreviewDataBlock message or plain object to encode + * @param {CEconItemPreviewDataBlock.$Properties} message CEconItemPreviewDataBlock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CEconItemPreviewDataBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CEconItemPreviewDataBlock.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -39707,25 +51275,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CEconItemPreviewDataBlock} CEconItemPreviewDataBlock + * @returns {CEconItemPreviewDataBlock & CEconItemPreviewDataBlock.$Shape} CEconItemPreviewDataBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CEconItemPreviewDataBlock.decode = function decode(reader, length) { + CEconItemPreviewDataBlock.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CEconItemPreviewDataBlock(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CEconItemPreviewDataBlock(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.econitem = $root.CSOEconItem.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.econitem = $root.CSOEconItem.decode(reader, reader.uint32(), $undefined, _depth + 1, message.econitem); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -39735,11 +51320,11 @@ * @memberof CEconItemPreviewDataBlock * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CEconItemPreviewDataBlock} CEconItemPreviewDataBlock + * @returns {CEconItemPreviewDataBlock & CEconItemPreviewDataBlock.$Shape} CEconItemPreviewDataBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CEconItemPreviewDataBlock.decodeDelimited = function decodeDelimited(reader) { + CEconItemPreviewDataBlock.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -39753,11 +51338,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CEconItemPreviewDataBlock.verify = function verify(message) { + CEconItemPreviewDataBlock.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.econitem != null && message.hasOwnProperty("econitem")) { - var error = $root.CSOEconItem.verify(message.econitem); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.econitem != null && $Object.hasOwnProperty.call(message, "econitem")) { + var error = $root.CSOEconItem.verify(message.econitem, _depth + 1); if (error) return "econitem." + error; } @@ -39772,14 +51361,20 @@ * @param {Object.} object Plain object * @returns {CEconItemPreviewDataBlock} CEconItemPreviewDataBlock */ - CEconItemPreviewDataBlock.fromObject = function fromObject(object) { + CEconItemPreviewDataBlock.fromObject = function (object, _depth) { if (object instanceof $root.CEconItemPreviewDataBlock) return object; + if (!$util.isObject(object)) + throw $TypeError(".CEconItemPreviewDataBlock: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CEconItemPreviewDataBlock(); if (object.econitem != null) { - if (typeof object.econitem !== "object") - throw TypeError(".CEconItemPreviewDataBlock.econitem: object expected"); - message.econitem = $root.CSOEconItem.fromObject(object.econitem); + if (!$util.isObject(object.econitem)) + throw $TypeError(".CEconItemPreviewDataBlock.econitem: object expected"); + message.econitem = $root.CSOEconItem.fromObject(object.econitem, _depth + 1); } return message; }; @@ -39793,14 +51388,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CEconItemPreviewDataBlock.toObject = function toObject(message, options) { + CEconItemPreviewDataBlock.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.econitem = null; - if (message.econitem != null && message.hasOwnProperty("econitem")) - object.econitem = $root.CSOEconItem.toObject(message.econitem, options); + if (message.econitem != null && $Object.hasOwnProperty.call(message, "econitem")) + object.econitem = $root.CSOEconItem.toObject(message.econitem, options, _depth + 1); return object; }; @@ -39811,8 +51410,22 @@ * @instance * @returns {Object.} JSON object */ - CEconItemPreviewDataBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CEconItemPreviewDataBlock.prototype.toJSON = function() { + return CEconItemPreviewDataBlock.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CEconItemPreviewDataBlock + * @function getTypeUrl + * @memberof CEconItemPreviewDataBlock + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CEconItemPreviewDataBlock.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CEconItemPreviewDataBlock"; }; return CEconItemPreviewDataBlock; @@ -39822,28 +51435,41 @@ /** * Properties of a CMsgGC_Client2GCEconPreviewDataBlockRequest. - * @exports ICMsgGC_Client2GCEconPreviewDataBlockRequest - * @interface ICMsgGC_Client2GCEconPreviewDataBlockRequest + * @typedef {Object} CMsgGC_Client2GCEconPreviewDataBlockRequest.$Properties * @property {number|Long|null} [param_s] CMsgGC_Client2GCEconPreviewDataBlockRequest param_s * @property {number|Long|null} [param_a] CMsgGC_Client2GCEconPreviewDataBlockRequest param_a * @property {number|Long|null} [param_d] CMsgGC_Client2GCEconPreviewDataBlockRequest param_d * @property {number|Long|null} [param_m] CMsgGC_Client2GCEconPreviewDataBlockRequest param_m + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_Client2GCEconPreviewDataBlockRequest. + * @exports ICMsgGC_Client2GCEconPreviewDataBlockRequest + * @interface ICMsgGC_Client2GCEconPreviewDataBlockRequest + * @augments CMsgGC_Client2GCEconPreviewDataBlockRequest.$Properties + * @deprecated Use CMsgGC_Client2GCEconPreviewDataBlockRequest.$Properties instead. + */ + + /** + * Shape of a CMsgGC_Client2GCEconPreviewDataBlockRequest. + * @typedef {CMsgGC_Client2GCEconPreviewDataBlockRequest.$Properties} CMsgGC_Client2GCEconPreviewDataBlockRequest.$Shape */ /** * Constructs a new CMsgGC_Client2GCEconPreviewDataBlockRequest. * @exports CMsgGC_Client2GCEconPreviewDataBlockRequest * @classdesc Represents a CMsgGC_Client2GCEconPreviewDataBlockRequest. - * @implements ICMsgGC_Client2GCEconPreviewDataBlockRequest * @constructor - * @param {ICMsgGC_Client2GCEconPreviewDataBlockRequest=} [properties] Properties to set + * @param {CMsgGC_Client2GCEconPreviewDataBlockRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_Client2GCEconPreviewDataBlockRequest(properties) { + var CMsgGC_Client2GCEconPreviewDataBlockRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_Client2GCEconPreviewDataBlockRequest param_s. @@ -39882,10 +51508,14 @@ * @function create * @memberof CMsgGC_Client2GCEconPreviewDataBlockRequest * @static - * @param {ICMsgGC_Client2GCEconPreviewDataBlockRequest=} [properties] Properties to set + * @param {CMsgGC_Client2GCEconPreviewDataBlockRequest.$Properties=} [properties] Properties to set * @returns {CMsgGC_Client2GCEconPreviewDataBlockRequest} CMsgGC_Client2GCEconPreviewDataBlockRequest instance + * @type {{ + * (properties: CMsgGC_Client2GCEconPreviewDataBlockRequest.$Shape): CMsgGC_Client2GCEconPreviewDataBlockRequest & CMsgGC_Client2GCEconPreviewDataBlockRequest.$Shape; + * (properties?: CMsgGC_Client2GCEconPreviewDataBlockRequest.$Properties): CMsgGC_Client2GCEconPreviewDataBlockRequest; + * }} */ - CMsgGC_Client2GCEconPreviewDataBlockRequest.create = function create(properties) { + CMsgGC_Client2GCEconPreviewDataBlockRequest.create = function(properties) { return new CMsgGC_Client2GCEconPreviewDataBlockRequest(properties); }; @@ -39894,21 +51524,28 @@ * @function encode * @memberof CMsgGC_Client2GCEconPreviewDataBlockRequest * @static - * @param {ICMsgGC_Client2GCEconPreviewDataBlockRequest} message CMsgGC_Client2GCEconPreviewDataBlockRequest message or plain object to encode + * @param {CMsgGC_Client2GCEconPreviewDataBlockRequest.$Properties} message CMsgGC_Client2GCEconPreviewDataBlockRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Client2GCEconPreviewDataBlockRequest.encode = function encode(message, writer) { + CMsgGC_Client2GCEconPreviewDataBlockRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.param_s != null && Object.hasOwnProperty.call(message, "param_s")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.param_s != null && $Object.hasOwnProperty.call(message, "param_s")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.param_s); - if (message.param_a != null && Object.hasOwnProperty.call(message, "param_a")) + if (message.param_a != null && $Object.hasOwnProperty.call(message, "param_a")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.param_a); - if (message.param_d != null && Object.hasOwnProperty.call(message, "param_d")) + if (message.param_d != null && $Object.hasOwnProperty.call(message, "param_d")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.param_d); - if (message.param_m != null && Object.hasOwnProperty.call(message, "param_m")) + if (message.param_m != null && $Object.hasOwnProperty.call(message, "param_m")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.param_m); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -39917,12 +51554,12 @@ * @function encodeDelimited * @memberof CMsgGC_Client2GCEconPreviewDataBlockRequest * @static - * @param {ICMsgGC_Client2GCEconPreviewDataBlockRequest} message CMsgGC_Client2GCEconPreviewDataBlockRequest message or plain object to encode + * @param {CMsgGC_Client2GCEconPreviewDataBlockRequest.$Properties} message CMsgGC_Client2GCEconPreviewDataBlockRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Client2GCEconPreviewDataBlockRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_Client2GCEconPreviewDataBlockRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -39932,34 +51569,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_Client2GCEconPreviewDataBlockRequest} CMsgGC_Client2GCEconPreviewDataBlockRequest + * @returns {CMsgGC_Client2GCEconPreviewDataBlockRequest & CMsgGC_Client2GCEconPreviewDataBlockRequest.$Shape} CMsgGC_Client2GCEconPreviewDataBlockRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Client2GCEconPreviewDataBlockRequest.decode = function decode(reader, length) { + CMsgGC_Client2GCEconPreviewDataBlockRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_Client2GCEconPreviewDataBlockRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_Client2GCEconPreviewDataBlockRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.param_s = reader.uint64(); - break; - case 2: - message.param_a = reader.uint64(); - break; - case 3: - message.param_d = reader.uint64(); - break; - case 4: - message.param_m = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.param_s = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.param_a = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.param_d = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.param_m = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -39969,11 +51632,11 @@ * @memberof CMsgGC_Client2GCEconPreviewDataBlockRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_Client2GCEconPreviewDataBlockRequest} CMsgGC_Client2GCEconPreviewDataBlockRequest + * @returns {CMsgGC_Client2GCEconPreviewDataBlockRequest & CMsgGC_Client2GCEconPreviewDataBlockRequest.$Shape} CMsgGC_Client2GCEconPreviewDataBlockRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Client2GCEconPreviewDataBlockRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_Client2GCEconPreviewDataBlockRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -39987,19 +51650,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_Client2GCEconPreviewDataBlockRequest.verify = function verify(message) { + CMsgGC_Client2GCEconPreviewDataBlockRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.param_s != null && message.hasOwnProperty("param_s")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.param_s != null && $Object.hasOwnProperty.call(message, "param_s")) if (!$util.isInteger(message.param_s) && !(message.param_s && $util.isInteger(message.param_s.low) && $util.isInteger(message.param_s.high))) return "param_s: integer|Long expected"; - if (message.param_a != null && message.hasOwnProperty("param_a")) + if (message.param_a != null && $Object.hasOwnProperty.call(message, "param_a")) if (!$util.isInteger(message.param_a) && !(message.param_a && $util.isInteger(message.param_a.low) && $util.isInteger(message.param_a.high))) return "param_a: integer|Long expected"; - if (message.param_d != null && message.hasOwnProperty("param_d")) + if (message.param_d != null && $Object.hasOwnProperty.call(message, "param_d")) if (!$util.isInteger(message.param_d) && !(message.param_d && $util.isInteger(message.param_d.low) && $util.isInteger(message.param_d.high))) return "param_d: integer|Long expected"; - if (message.param_m != null && message.hasOwnProperty("param_m")) + if (message.param_m != null && $Object.hasOwnProperty.call(message, "param_m")) if (!$util.isInteger(message.param_m) && !(message.param_m && $util.isInteger(message.param_m.low) && $util.isInteger(message.param_m.high))) return "param_m: integer|Long expected"; return null; @@ -40013,42 +51680,48 @@ * @param {Object.} object Plain object * @returns {CMsgGC_Client2GCEconPreviewDataBlockRequest} CMsgGC_Client2GCEconPreviewDataBlockRequest */ - CMsgGC_Client2GCEconPreviewDataBlockRequest.fromObject = function fromObject(object) { + CMsgGC_Client2GCEconPreviewDataBlockRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_Client2GCEconPreviewDataBlockRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_Client2GCEconPreviewDataBlockRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_Client2GCEconPreviewDataBlockRequest(); if (object.param_s != null) if ($util.Long) - (message.param_s = $util.Long.fromValue(object.param_s)).unsigned = true; + message.param_s = $util.Long.fromValue(object.param_s, true); else if (typeof object.param_s === "string") - message.param_s = parseInt(object.param_s, 10); + message.param_s = $parseInt(object.param_s, 10); else if (typeof object.param_s === "number") message.param_s = object.param_s; else if (typeof object.param_s === "object") message.param_s = new $util.LongBits(object.param_s.low >>> 0, object.param_s.high >>> 0).toNumber(true); if (object.param_a != null) if ($util.Long) - (message.param_a = $util.Long.fromValue(object.param_a)).unsigned = true; + message.param_a = $util.Long.fromValue(object.param_a, true); else if (typeof object.param_a === "string") - message.param_a = parseInt(object.param_a, 10); + message.param_a = $parseInt(object.param_a, 10); else if (typeof object.param_a === "number") message.param_a = object.param_a; else if (typeof object.param_a === "object") message.param_a = new $util.LongBits(object.param_a.low >>> 0, object.param_a.high >>> 0).toNumber(true); if (object.param_d != null) if ($util.Long) - (message.param_d = $util.Long.fromValue(object.param_d)).unsigned = true; + message.param_d = $util.Long.fromValue(object.param_d, true); else if (typeof object.param_d === "string") - message.param_d = parseInt(object.param_d, 10); + message.param_d = $parseInt(object.param_d, 10); else if (typeof object.param_d === "number") message.param_d = object.param_d; else if (typeof object.param_d === "object") message.param_d = new $util.LongBits(object.param_d.low >>> 0, object.param_d.high >>> 0).toNumber(true); if (object.param_m != null) if ($util.Long) - (message.param_m = $util.Long.fromValue(object.param_m)).unsigned = true; + message.param_m = $util.Long.fromValue(object.param_m, true); else if (typeof object.param_m === "string") - message.param_m = parseInt(object.param_m, 10); + message.param_m = $parseInt(object.param_m, 10); else if (typeof object.param_m === "number") message.param_m = object.param_m; else if (typeof object.param_m === "object") @@ -40065,52 +51738,64 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_Client2GCEconPreviewDataBlockRequest.toObject = function toObject(message, options) { + CMsgGC_Client2GCEconPreviewDataBlockRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.param_s = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.param_s = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.param_s = options.longs === String ? "0" : 0; + object.param_s = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.param_a = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.param_a = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.param_a = options.longs === String ? "0" : 0; + object.param_a = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.param_d = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.param_d = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.param_d = options.longs === String ? "0" : 0; + object.param_d = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.param_m = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.param_m = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.param_m = options.longs === String ? "0" : 0; + object.param_m = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.param_s != null && message.hasOwnProperty("param_s")) - if (typeof message.param_s === "number") - object.param_s = options.longs === String ? String(message.param_s) : message.param_s; + if (message.param_s != null && $Object.hasOwnProperty.call(message, "param_s")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.param_s = typeof message.param_s === "number" ? $BigInt(message.param_s) : $util.Long.fromBits(message.param_s.low >>> 0, message.param_s.high >>> 0, true).toBigInt(); + else if (typeof message.param_s === "number") + object.param_s = options.longs === $String ? $String(message.param_s) : message.param_s; else - object.param_s = options.longs === String ? $util.Long.prototype.toString.call(message.param_s) : options.longs === Number ? new $util.LongBits(message.param_s.low >>> 0, message.param_s.high >>> 0).toNumber(true) : message.param_s; - if (message.param_a != null && message.hasOwnProperty("param_a")) - if (typeof message.param_a === "number") - object.param_a = options.longs === String ? String(message.param_a) : message.param_a; + object.param_s = options.longs === $String ? $util.Long.prototype.toString.call(message.param_s) : options.longs === $Number ? new $util.LongBits(message.param_s.low >>> 0, message.param_s.high >>> 0).toNumber(true) : message.param_s; + if (message.param_a != null && $Object.hasOwnProperty.call(message, "param_a")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.param_a = typeof message.param_a === "number" ? $BigInt(message.param_a) : $util.Long.fromBits(message.param_a.low >>> 0, message.param_a.high >>> 0, true).toBigInt(); + else if (typeof message.param_a === "number") + object.param_a = options.longs === $String ? $String(message.param_a) : message.param_a; else - object.param_a = options.longs === String ? $util.Long.prototype.toString.call(message.param_a) : options.longs === Number ? new $util.LongBits(message.param_a.low >>> 0, message.param_a.high >>> 0).toNumber(true) : message.param_a; - if (message.param_d != null && message.hasOwnProperty("param_d")) - if (typeof message.param_d === "number") - object.param_d = options.longs === String ? String(message.param_d) : message.param_d; + object.param_a = options.longs === $String ? $util.Long.prototype.toString.call(message.param_a) : options.longs === $Number ? new $util.LongBits(message.param_a.low >>> 0, message.param_a.high >>> 0).toNumber(true) : message.param_a; + if (message.param_d != null && $Object.hasOwnProperty.call(message, "param_d")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.param_d = typeof message.param_d === "number" ? $BigInt(message.param_d) : $util.Long.fromBits(message.param_d.low >>> 0, message.param_d.high >>> 0, true).toBigInt(); + else if (typeof message.param_d === "number") + object.param_d = options.longs === $String ? $String(message.param_d) : message.param_d; else - object.param_d = options.longs === String ? $util.Long.prototype.toString.call(message.param_d) : options.longs === Number ? new $util.LongBits(message.param_d.low >>> 0, message.param_d.high >>> 0).toNumber(true) : message.param_d; - if (message.param_m != null && message.hasOwnProperty("param_m")) - if (typeof message.param_m === "number") - object.param_m = options.longs === String ? String(message.param_m) : message.param_m; + object.param_d = options.longs === $String ? $util.Long.prototype.toString.call(message.param_d) : options.longs === $Number ? new $util.LongBits(message.param_d.low >>> 0, message.param_d.high >>> 0).toNumber(true) : message.param_d; + if (message.param_m != null && $Object.hasOwnProperty.call(message, "param_m")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.param_m = typeof message.param_m === "number" ? $BigInt(message.param_m) : $util.Long.fromBits(message.param_m.low >>> 0, message.param_m.high >>> 0, true).toBigInt(); + else if (typeof message.param_m === "number") + object.param_m = options.longs === $String ? $String(message.param_m) : message.param_m; else - object.param_m = options.longs === String ? $util.Long.prototype.toString.call(message.param_m) : options.longs === Number ? new $util.LongBits(message.param_m.low >>> 0, message.param_m.high >>> 0).toNumber(true) : message.param_m; + object.param_m = options.longs === $String ? $util.Long.prototype.toString.call(message.param_m) : options.longs === $Number ? new $util.LongBits(message.param_m.low >>> 0, message.param_m.high >>> 0).toNumber(true) : message.param_m; return object; }; @@ -40121,8 +51806,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_Client2GCEconPreviewDataBlockRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_Client2GCEconPreviewDataBlockRequest.prototype.toJSON = function() { + return CMsgGC_Client2GCEconPreviewDataBlockRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_Client2GCEconPreviewDataBlockRequest + * @function getTypeUrl + * @memberof CMsgGC_Client2GCEconPreviewDataBlockRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_Client2GCEconPreviewDataBlockRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_Client2GCEconPreviewDataBlockRequest"; }; return CMsgGC_Client2GCEconPreviewDataBlockRequest; @@ -40130,31 +51829,44 @@ $root.CMsgGC_Client2GCEconPreviewDataBlockResponse = (function() { + /** + * Properties of a CMsgGC_Client2GCEconPreviewDataBlockResponse. + * @typedef {Object} CMsgGC_Client2GCEconPreviewDataBlockResponse.$Properties + * @property {CEconItemPreviewDataBlock.$Properties|null} [iteminfo] CMsgGC_Client2GCEconPreviewDataBlockResponse iteminfo + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_Client2GCEconPreviewDataBlockResponse. * @exports ICMsgGC_Client2GCEconPreviewDataBlockResponse * @interface ICMsgGC_Client2GCEconPreviewDataBlockResponse - * @property {ICEconItemPreviewDataBlock|null} [iteminfo] CMsgGC_Client2GCEconPreviewDataBlockResponse iteminfo + * @augments CMsgGC_Client2GCEconPreviewDataBlockResponse.$Properties + * @deprecated Use CMsgGC_Client2GCEconPreviewDataBlockResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGC_Client2GCEconPreviewDataBlockResponse. + * @typedef {CMsgGC_Client2GCEconPreviewDataBlockResponse.$Properties} CMsgGC_Client2GCEconPreviewDataBlockResponse.$Shape */ /** * Constructs a new CMsgGC_Client2GCEconPreviewDataBlockResponse. * @exports CMsgGC_Client2GCEconPreviewDataBlockResponse * @classdesc Represents a CMsgGC_Client2GCEconPreviewDataBlockResponse. - * @implements ICMsgGC_Client2GCEconPreviewDataBlockResponse * @constructor - * @param {ICMsgGC_Client2GCEconPreviewDataBlockResponse=} [properties] Properties to set + * @param {CMsgGC_Client2GCEconPreviewDataBlockResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_Client2GCEconPreviewDataBlockResponse(properties) { + var CMsgGC_Client2GCEconPreviewDataBlockResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_Client2GCEconPreviewDataBlockResponse iteminfo. - * @member {ICEconItemPreviewDataBlock|null|undefined} iteminfo + * @member {CEconItemPreviewDataBlock.$Properties|null|undefined} iteminfo * @memberof CMsgGC_Client2GCEconPreviewDataBlockResponse * @instance */ @@ -40165,10 +51877,14 @@ * @function create * @memberof CMsgGC_Client2GCEconPreviewDataBlockResponse * @static - * @param {ICMsgGC_Client2GCEconPreviewDataBlockResponse=} [properties] Properties to set + * @param {CMsgGC_Client2GCEconPreviewDataBlockResponse.$Properties=} [properties] Properties to set * @returns {CMsgGC_Client2GCEconPreviewDataBlockResponse} CMsgGC_Client2GCEconPreviewDataBlockResponse instance + * @type {{ + * (properties: CMsgGC_Client2GCEconPreviewDataBlockResponse.$Shape): CMsgGC_Client2GCEconPreviewDataBlockResponse & CMsgGC_Client2GCEconPreviewDataBlockResponse.$Shape; + * (properties?: CMsgGC_Client2GCEconPreviewDataBlockResponse.$Properties): CMsgGC_Client2GCEconPreviewDataBlockResponse; + * }} */ - CMsgGC_Client2GCEconPreviewDataBlockResponse.create = function create(properties) { + CMsgGC_Client2GCEconPreviewDataBlockResponse.create = function(properties) { return new CMsgGC_Client2GCEconPreviewDataBlockResponse(properties); }; @@ -40177,15 +51893,22 @@ * @function encode * @memberof CMsgGC_Client2GCEconPreviewDataBlockResponse * @static - * @param {ICMsgGC_Client2GCEconPreviewDataBlockResponse} message CMsgGC_Client2GCEconPreviewDataBlockResponse message or plain object to encode + * @param {CMsgGC_Client2GCEconPreviewDataBlockResponse.$Properties} message CMsgGC_Client2GCEconPreviewDataBlockResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Client2GCEconPreviewDataBlockResponse.encode = function encode(message, writer) { + CMsgGC_Client2GCEconPreviewDataBlockResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.iteminfo != null && Object.hasOwnProperty.call(message, "iteminfo")) - $root.CEconItemPreviewDataBlock.encode(message.iteminfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.iteminfo != null && $Object.hasOwnProperty.call(message, "iteminfo")) + $root.CEconItemPreviewDataBlock.encode(message.iteminfo, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -40194,12 +51917,12 @@ * @function encodeDelimited * @memberof CMsgGC_Client2GCEconPreviewDataBlockResponse * @static - * @param {ICMsgGC_Client2GCEconPreviewDataBlockResponse} message CMsgGC_Client2GCEconPreviewDataBlockResponse message or plain object to encode + * @param {CMsgGC_Client2GCEconPreviewDataBlockResponse.$Properties} message CMsgGC_Client2GCEconPreviewDataBlockResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_Client2GCEconPreviewDataBlockResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_Client2GCEconPreviewDataBlockResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -40209,25 +51932,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_Client2GCEconPreviewDataBlockResponse} CMsgGC_Client2GCEconPreviewDataBlockResponse + * @returns {CMsgGC_Client2GCEconPreviewDataBlockResponse & CMsgGC_Client2GCEconPreviewDataBlockResponse.$Shape} CMsgGC_Client2GCEconPreviewDataBlockResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Client2GCEconPreviewDataBlockResponse.decode = function decode(reader, length) { + CMsgGC_Client2GCEconPreviewDataBlockResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_Client2GCEconPreviewDataBlockResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_Client2GCEconPreviewDataBlockResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.iteminfo = $root.CEconItemPreviewDataBlock.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.iteminfo = $root.CEconItemPreviewDataBlock.decode(reader, reader.uint32(), $undefined, _depth + 1, message.iteminfo); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -40237,11 +51977,11 @@ * @memberof CMsgGC_Client2GCEconPreviewDataBlockResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_Client2GCEconPreviewDataBlockResponse} CMsgGC_Client2GCEconPreviewDataBlockResponse + * @returns {CMsgGC_Client2GCEconPreviewDataBlockResponse & CMsgGC_Client2GCEconPreviewDataBlockResponse.$Shape} CMsgGC_Client2GCEconPreviewDataBlockResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_Client2GCEconPreviewDataBlockResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_Client2GCEconPreviewDataBlockResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -40255,11 +51995,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_Client2GCEconPreviewDataBlockResponse.verify = function verify(message) { + CMsgGC_Client2GCEconPreviewDataBlockResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.iteminfo != null && message.hasOwnProperty("iteminfo")) { - var error = $root.CEconItemPreviewDataBlock.verify(message.iteminfo); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.iteminfo != null && $Object.hasOwnProperty.call(message, "iteminfo")) { + var error = $root.CEconItemPreviewDataBlock.verify(message.iteminfo, _depth + 1); if (error) return "iteminfo." + error; } @@ -40274,14 +52018,20 @@ * @param {Object.} object Plain object * @returns {CMsgGC_Client2GCEconPreviewDataBlockResponse} CMsgGC_Client2GCEconPreviewDataBlockResponse */ - CMsgGC_Client2GCEconPreviewDataBlockResponse.fromObject = function fromObject(object) { + CMsgGC_Client2GCEconPreviewDataBlockResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_Client2GCEconPreviewDataBlockResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_Client2GCEconPreviewDataBlockResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_Client2GCEconPreviewDataBlockResponse(); if (object.iteminfo != null) { - if (typeof object.iteminfo !== "object") - throw TypeError(".CMsgGC_Client2GCEconPreviewDataBlockResponse.iteminfo: object expected"); - message.iteminfo = $root.CEconItemPreviewDataBlock.fromObject(object.iteminfo); + if (!$util.isObject(object.iteminfo)) + throw $TypeError(".CMsgGC_Client2GCEconPreviewDataBlockResponse.iteminfo: object expected"); + message.iteminfo = $root.CEconItemPreviewDataBlock.fromObject(object.iteminfo, _depth + 1); } return message; }; @@ -40295,14 +52045,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_Client2GCEconPreviewDataBlockResponse.toObject = function toObject(message, options) { + CMsgGC_Client2GCEconPreviewDataBlockResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.iteminfo = null; - if (message.iteminfo != null && message.hasOwnProperty("iteminfo")) - object.iteminfo = $root.CEconItemPreviewDataBlock.toObject(message.iteminfo, options); + if (message.iteminfo != null && $Object.hasOwnProperty.call(message, "iteminfo")) + object.iteminfo = $root.CEconItemPreviewDataBlock.toObject(message.iteminfo, options, _depth + 1); return object; }; @@ -40313,8 +52067,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_Client2GCEconPreviewDataBlockResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_Client2GCEconPreviewDataBlockResponse.prototype.toJSON = function() { + return CMsgGC_Client2GCEconPreviewDataBlockResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_Client2GCEconPreviewDataBlockResponse + * @function getTypeUrl + * @memberof CMsgGC_Client2GCEconPreviewDataBlockResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_Client2GCEconPreviewDataBlockResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_Client2GCEconPreviewDataBlockResponse"; }; return CMsgGC_Client2GCEconPreviewDataBlockResponse; @@ -40324,8 +52092,7 @@ /** * Properties of a CSOTFLadderPlayerStats. - * @exports ICSOTFLadderPlayerStats - * @interface ICSOTFLadderPlayerStats + * @typedef {Object} CSOTFLadderPlayerStats.$Properties * @property {number|null} [account_id] CSOTFLadderPlayerStats account_id * @property {number|null} [match_group] CSOTFLadderPlayerStats match_group * @property {number|null} [season_id] CSOTFLadderPlayerStats season_id @@ -40351,22 +52118,36 @@ * @property {number|null} [support_bronze] CSOTFLadderPlayerStats support_bronze * @property {number|null} [support_silver] CSOTFLadderPlayerStats support_silver * @property {number|null} [support_gold] CSOTFLadderPlayerStats support_gold + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOTFLadderPlayerStats. + * @exports ICSOTFLadderPlayerStats + * @interface ICSOTFLadderPlayerStats + * @augments CSOTFLadderPlayerStats.$Properties + * @deprecated Use CSOTFLadderPlayerStats.$Properties instead. + */ + + /** + * Shape of a CSOTFLadderPlayerStats. + * @typedef {CSOTFLadderPlayerStats.$Properties} CSOTFLadderPlayerStats.$Shape */ /** * Constructs a new CSOTFLadderPlayerStats. * @exports CSOTFLadderPlayerStats * @classdesc Represents a CSOTFLadderPlayerStats. - * @implements ICSOTFLadderPlayerStats * @constructor - * @param {ICSOTFLadderPlayerStats=} [properties] Properties to set + * @param {CSOTFLadderPlayerStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOTFLadderPlayerStats(properties) { + var CSOTFLadderPlayerStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOTFLadderPlayerStats account_id. @@ -40573,10 +52354,14 @@ * @function create * @memberof CSOTFLadderPlayerStats * @static - * @param {ICSOTFLadderPlayerStats=} [properties] Properties to set + * @param {CSOTFLadderPlayerStats.$Properties=} [properties] Properties to set * @returns {CSOTFLadderPlayerStats} CSOTFLadderPlayerStats instance + * @type {{ + * (properties: CSOTFLadderPlayerStats.$Shape): CSOTFLadderPlayerStats & CSOTFLadderPlayerStats.$Shape; + * (properties?: CSOTFLadderPlayerStats.$Properties): CSOTFLadderPlayerStats; + * }} */ - CSOTFLadderPlayerStats.create = function create(properties) { + CSOTFLadderPlayerStats.create = function(properties) { return new CSOTFLadderPlayerStats(properties); }; @@ -40585,63 +52370,70 @@ * @function encode * @memberof CSOTFLadderPlayerStats * @static - * @param {ICSOTFLadderPlayerStats} message CSOTFLadderPlayerStats message or plain object to encode + * @param {CSOTFLadderPlayerStats.$Properties} message CSOTFLadderPlayerStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFLadderPlayerStats.encode = function encode(message, writer) { + CSOTFLadderPlayerStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.match_group); - if (message.season_id != null && Object.hasOwnProperty.call(message, "season_id")) + if (message.season_id != null && $Object.hasOwnProperty.call(message, "season_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.season_id); - if (message.games != null && Object.hasOwnProperty.call(message, "games")) + if (message.games != null && $Object.hasOwnProperty.call(message, "games")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.games); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.score); - if (message.kills != null && Object.hasOwnProperty.call(message, "kills")) + if (message.kills != null && $Object.hasOwnProperty.call(message, "kills")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.kills); - if (message.deaths != null && Object.hasOwnProperty.call(message, "deaths")) + if (message.deaths != null && $Object.hasOwnProperty.call(message, "deaths")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.deaths); - if (message.damage != null && Object.hasOwnProperty.call(message, "damage")) + if (message.damage != null && $Object.hasOwnProperty.call(message, "damage")) writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.damage); - if (message.healing != null && Object.hasOwnProperty.call(message, "healing")) + if (message.healing != null && $Object.hasOwnProperty.call(message, "healing")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.healing); - if (message.support != null && Object.hasOwnProperty.call(message, "support")) + if (message.support != null && $Object.hasOwnProperty.call(message, "support")) writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.support); - if (message.score_bronze != null && Object.hasOwnProperty.call(message, "score_bronze")) + if (message.score_bronze != null && $Object.hasOwnProperty.call(message, "score_bronze")) writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.score_bronze); - if (message.score_silver != null && Object.hasOwnProperty.call(message, "score_silver")) + if (message.score_silver != null && $Object.hasOwnProperty.call(message, "score_silver")) writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.score_silver); - if (message.score_gold != null && Object.hasOwnProperty.call(message, "score_gold")) + if (message.score_gold != null && $Object.hasOwnProperty.call(message, "score_gold")) writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.score_gold); - if (message.kills_bronze != null && Object.hasOwnProperty.call(message, "kills_bronze")) + if (message.kills_bronze != null && $Object.hasOwnProperty.call(message, "kills_bronze")) writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.kills_bronze); - if (message.kills_silver != null && Object.hasOwnProperty.call(message, "kills_silver")) + if (message.kills_silver != null && $Object.hasOwnProperty.call(message, "kills_silver")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.kills_silver); - if (message.kills_gold != null && Object.hasOwnProperty.call(message, "kills_gold")) + if (message.kills_gold != null && $Object.hasOwnProperty.call(message, "kills_gold")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.kills_gold); - if (message.damage_bronze != null && Object.hasOwnProperty.call(message, "damage_bronze")) + if (message.damage_bronze != null && $Object.hasOwnProperty.call(message, "damage_bronze")) writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.damage_bronze); - if (message.damage_silver != null && Object.hasOwnProperty.call(message, "damage_silver")) + if (message.damage_silver != null && $Object.hasOwnProperty.call(message, "damage_silver")) writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.damage_silver); - if (message.damage_gold != null && Object.hasOwnProperty.call(message, "damage_gold")) + if (message.damage_gold != null && $Object.hasOwnProperty.call(message, "damage_gold")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.damage_gold); - if (message.healing_bronze != null && Object.hasOwnProperty.call(message, "healing_bronze")) + if (message.healing_bronze != null && $Object.hasOwnProperty.call(message, "healing_bronze")) writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.healing_bronze); - if (message.healing_silver != null && Object.hasOwnProperty.call(message, "healing_silver")) + if (message.healing_silver != null && $Object.hasOwnProperty.call(message, "healing_silver")) writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.healing_silver); - if (message.healing_gold != null && Object.hasOwnProperty.call(message, "healing_gold")) + if (message.healing_gold != null && $Object.hasOwnProperty.call(message, "healing_gold")) writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.healing_gold); - if (message.support_bronze != null && Object.hasOwnProperty.call(message, "support_bronze")) + if (message.support_bronze != null && $Object.hasOwnProperty.call(message, "support_bronze")) writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.support_bronze); - if (message.support_silver != null && Object.hasOwnProperty.call(message, "support_silver")) + if (message.support_silver != null && $Object.hasOwnProperty.call(message, "support_silver")) writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.support_silver); - if (message.support_gold != null && Object.hasOwnProperty.call(message, "support_gold")) + if (message.support_gold != null && $Object.hasOwnProperty.call(message, "support_gold")) writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.support_gold); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -40650,12 +52442,12 @@ * @function encodeDelimited * @memberof CSOTFLadderPlayerStats * @static - * @param {ICSOTFLadderPlayerStats} message CSOTFLadderPlayerStats message or plain object to encode + * @param {CSOTFLadderPlayerStats.$Properties} message CSOTFLadderPlayerStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFLadderPlayerStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOTFLadderPlayerStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -40665,97 +52457,186 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFLadderPlayerStats} CSOTFLadderPlayerStats + * @returns {CSOTFLadderPlayerStats & CSOTFLadderPlayerStats.$Shape} CSOTFLadderPlayerStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFLadderPlayerStats.decode = function decode(reader, length) { + CSOTFLadderPlayerStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFLadderPlayerStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFLadderPlayerStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.match_group = reader.int32(); - break; - case 3: - message.season_id = reader.uint32(); - break; - case 9: - message.games = reader.uint32(); - break; - case 10: - message.score = reader.uint32(); - break; - case 11: - message.kills = reader.uint32(); - break; - case 12: - message.deaths = reader.uint32(); - break; - case 13: - message.damage = reader.uint32(); - break; - case 14: - message.healing = reader.uint32(); - break; - case 15: - message.support = reader.uint32(); - break; - case 16: - message.score_bronze = reader.uint32(); - break; - case 17: - message.score_silver = reader.uint32(); - break; - case 18: - message.score_gold = reader.uint32(); - break; - case 19: - message.kills_bronze = reader.uint32(); - break; - case 20: - message.kills_silver = reader.uint32(); - break; - case 21: - message.kills_gold = reader.uint32(); - break; - case 22: - message.damage_bronze = reader.uint32(); - break; - case 23: - message.damage_silver = reader.uint32(); - break; - case 24: - message.damage_gold = reader.uint32(); - break; - case 25: - message.healing_bronze = reader.uint32(); - break; - case 26: - message.healing_silver = reader.uint32(); - break; - case 27: - message.healing_gold = reader.uint32(); - break; - case 28: - message.support_bronze = reader.uint32(); - break; - case 29: - message.support_silver = reader.uint32(); - break; - case 30: - message.support_gold = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.match_group = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.season_id = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.games = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.score = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.kills = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.deaths = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.damage = reader.uint32(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.healing = reader.uint32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.support = reader.uint32(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.score_bronze = reader.uint32(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.score_silver = reader.uint32(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.score_gold = reader.uint32(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.kills_bronze = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.kills_silver = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.kills_gold = reader.uint32(); + continue; + } + case 22: { + if (wireType !== 0) + break; + message.damage_bronze = reader.uint32(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.damage_silver = reader.uint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.damage_gold = reader.uint32(); + continue; + } + case 25: { + if (wireType !== 0) + break; + message.healing_bronze = reader.uint32(); + continue; + } + case 26: { + if (wireType !== 0) + break; + message.healing_silver = reader.uint32(); + continue; + } + case 27: { + if (wireType !== 0) + break; + message.healing_gold = reader.uint32(); + continue; + } + case 28: { + if (wireType !== 0) + break; + message.support_bronze = reader.uint32(); + continue; + } + case 29: { + if (wireType !== 0) + break; + message.support_silver = reader.uint32(); + continue; + } + case 30: { + if (wireType !== 0) + break; + message.support_gold = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -40765,11 +52646,11 @@ * @memberof CSOTFLadderPlayerStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFLadderPlayerStats} CSOTFLadderPlayerStats + * @returns {CSOTFLadderPlayerStats & CSOTFLadderPlayerStats.$Shape} CSOTFLadderPlayerStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFLadderPlayerStats.decodeDelimited = function decodeDelimited(reader) { + CSOTFLadderPlayerStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -40783,82 +52664,86 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOTFLadderPlayerStats.verify = function verify(message) { + CSOTFLadderPlayerStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) if (!$util.isInteger(message.match_group)) return "match_group: integer expected"; - if (message.season_id != null && message.hasOwnProperty("season_id")) + if (message.season_id != null && $Object.hasOwnProperty.call(message, "season_id")) if (!$util.isInteger(message.season_id)) return "season_id: integer expected"; - if (message.games != null && message.hasOwnProperty("games")) + if (message.games != null && $Object.hasOwnProperty.call(message, "games")) if (!$util.isInteger(message.games)) return "games: integer expected"; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) if (!$util.isInteger(message.score)) return "score: integer expected"; - if (message.kills != null && message.hasOwnProperty("kills")) + if (message.kills != null && $Object.hasOwnProperty.call(message, "kills")) if (!$util.isInteger(message.kills)) return "kills: integer expected"; - if (message.deaths != null && message.hasOwnProperty("deaths")) + if (message.deaths != null && $Object.hasOwnProperty.call(message, "deaths")) if (!$util.isInteger(message.deaths)) return "deaths: integer expected"; - if (message.damage != null && message.hasOwnProperty("damage")) + if (message.damage != null && $Object.hasOwnProperty.call(message, "damage")) if (!$util.isInteger(message.damage)) return "damage: integer expected"; - if (message.healing != null && message.hasOwnProperty("healing")) + if (message.healing != null && $Object.hasOwnProperty.call(message, "healing")) if (!$util.isInteger(message.healing)) return "healing: integer expected"; - if (message.support != null && message.hasOwnProperty("support")) + if (message.support != null && $Object.hasOwnProperty.call(message, "support")) if (!$util.isInteger(message.support)) return "support: integer expected"; - if (message.score_bronze != null && message.hasOwnProperty("score_bronze")) + if (message.score_bronze != null && $Object.hasOwnProperty.call(message, "score_bronze")) if (!$util.isInteger(message.score_bronze)) return "score_bronze: integer expected"; - if (message.score_silver != null && message.hasOwnProperty("score_silver")) + if (message.score_silver != null && $Object.hasOwnProperty.call(message, "score_silver")) if (!$util.isInteger(message.score_silver)) return "score_silver: integer expected"; - if (message.score_gold != null && message.hasOwnProperty("score_gold")) + if (message.score_gold != null && $Object.hasOwnProperty.call(message, "score_gold")) if (!$util.isInteger(message.score_gold)) return "score_gold: integer expected"; - if (message.kills_bronze != null && message.hasOwnProperty("kills_bronze")) + if (message.kills_bronze != null && $Object.hasOwnProperty.call(message, "kills_bronze")) if (!$util.isInteger(message.kills_bronze)) return "kills_bronze: integer expected"; - if (message.kills_silver != null && message.hasOwnProperty("kills_silver")) + if (message.kills_silver != null && $Object.hasOwnProperty.call(message, "kills_silver")) if (!$util.isInteger(message.kills_silver)) return "kills_silver: integer expected"; - if (message.kills_gold != null && message.hasOwnProperty("kills_gold")) + if (message.kills_gold != null && $Object.hasOwnProperty.call(message, "kills_gold")) if (!$util.isInteger(message.kills_gold)) return "kills_gold: integer expected"; - if (message.damage_bronze != null && message.hasOwnProperty("damage_bronze")) + if (message.damage_bronze != null && $Object.hasOwnProperty.call(message, "damage_bronze")) if (!$util.isInteger(message.damage_bronze)) return "damage_bronze: integer expected"; - if (message.damage_silver != null && message.hasOwnProperty("damage_silver")) + if (message.damage_silver != null && $Object.hasOwnProperty.call(message, "damage_silver")) if (!$util.isInteger(message.damage_silver)) return "damage_silver: integer expected"; - if (message.damage_gold != null && message.hasOwnProperty("damage_gold")) + if (message.damage_gold != null && $Object.hasOwnProperty.call(message, "damage_gold")) if (!$util.isInteger(message.damage_gold)) return "damage_gold: integer expected"; - if (message.healing_bronze != null && message.hasOwnProperty("healing_bronze")) + if (message.healing_bronze != null && $Object.hasOwnProperty.call(message, "healing_bronze")) if (!$util.isInteger(message.healing_bronze)) return "healing_bronze: integer expected"; - if (message.healing_silver != null && message.hasOwnProperty("healing_silver")) + if (message.healing_silver != null && $Object.hasOwnProperty.call(message, "healing_silver")) if (!$util.isInteger(message.healing_silver)) return "healing_silver: integer expected"; - if (message.healing_gold != null && message.hasOwnProperty("healing_gold")) + if (message.healing_gold != null && $Object.hasOwnProperty.call(message, "healing_gold")) if (!$util.isInteger(message.healing_gold)) return "healing_gold: integer expected"; - if (message.support_bronze != null && message.hasOwnProperty("support_bronze")) + if (message.support_bronze != null && $Object.hasOwnProperty.call(message, "support_bronze")) if (!$util.isInteger(message.support_bronze)) return "support_bronze: integer expected"; - if (message.support_silver != null && message.hasOwnProperty("support_silver")) + if (message.support_silver != null && $Object.hasOwnProperty.call(message, "support_silver")) if (!$util.isInteger(message.support_silver)) return "support_silver: integer expected"; - if (message.support_gold != null && message.hasOwnProperty("support_gold")) + if (message.support_gold != null && $Object.hasOwnProperty.call(message, "support_gold")) if (!$util.isInteger(message.support_gold)) return "support_gold: integer expected"; return null; @@ -40872,9 +52757,15 @@ * @param {Object.} object Plain object * @returns {CSOTFLadderPlayerStats} CSOTFLadderPlayerStats */ - CSOTFLadderPlayerStats.fromObject = function fromObject(object) { + CSOTFLadderPlayerStats.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFLadderPlayerStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFLadderPlayerStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFLadderPlayerStats(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -40938,9 +52829,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOTFLadderPlayerStats.toObject = function toObject(message, options) { + CSOTFLadderPlayerStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; @@ -40969,55 +52864,55 @@ object.support_silver = 0; object.support_gold = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) object.match_group = message.match_group; - if (message.season_id != null && message.hasOwnProperty("season_id")) + if (message.season_id != null && $Object.hasOwnProperty.call(message, "season_id")) object.season_id = message.season_id; - if (message.games != null && message.hasOwnProperty("games")) + if (message.games != null && $Object.hasOwnProperty.call(message, "games")) object.games = message.games; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) object.score = message.score; - if (message.kills != null && message.hasOwnProperty("kills")) + if (message.kills != null && $Object.hasOwnProperty.call(message, "kills")) object.kills = message.kills; - if (message.deaths != null && message.hasOwnProperty("deaths")) + if (message.deaths != null && $Object.hasOwnProperty.call(message, "deaths")) object.deaths = message.deaths; - if (message.damage != null && message.hasOwnProperty("damage")) + if (message.damage != null && $Object.hasOwnProperty.call(message, "damage")) object.damage = message.damage; - if (message.healing != null && message.hasOwnProperty("healing")) + if (message.healing != null && $Object.hasOwnProperty.call(message, "healing")) object.healing = message.healing; - if (message.support != null && message.hasOwnProperty("support")) + if (message.support != null && $Object.hasOwnProperty.call(message, "support")) object.support = message.support; - if (message.score_bronze != null && message.hasOwnProperty("score_bronze")) + if (message.score_bronze != null && $Object.hasOwnProperty.call(message, "score_bronze")) object.score_bronze = message.score_bronze; - if (message.score_silver != null && message.hasOwnProperty("score_silver")) + if (message.score_silver != null && $Object.hasOwnProperty.call(message, "score_silver")) object.score_silver = message.score_silver; - if (message.score_gold != null && message.hasOwnProperty("score_gold")) + if (message.score_gold != null && $Object.hasOwnProperty.call(message, "score_gold")) object.score_gold = message.score_gold; - if (message.kills_bronze != null && message.hasOwnProperty("kills_bronze")) + if (message.kills_bronze != null && $Object.hasOwnProperty.call(message, "kills_bronze")) object.kills_bronze = message.kills_bronze; - if (message.kills_silver != null && message.hasOwnProperty("kills_silver")) + if (message.kills_silver != null && $Object.hasOwnProperty.call(message, "kills_silver")) object.kills_silver = message.kills_silver; - if (message.kills_gold != null && message.hasOwnProperty("kills_gold")) + if (message.kills_gold != null && $Object.hasOwnProperty.call(message, "kills_gold")) object.kills_gold = message.kills_gold; - if (message.damage_bronze != null && message.hasOwnProperty("damage_bronze")) + if (message.damage_bronze != null && $Object.hasOwnProperty.call(message, "damage_bronze")) object.damage_bronze = message.damage_bronze; - if (message.damage_silver != null && message.hasOwnProperty("damage_silver")) + if (message.damage_silver != null && $Object.hasOwnProperty.call(message, "damage_silver")) object.damage_silver = message.damage_silver; - if (message.damage_gold != null && message.hasOwnProperty("damage_gold")) + if (message.damage_gold != null && $Object.hasOwnProperty.call(message, "damage_gold")) object.damage_gold = message.damage_gold; - if (message.healing_bronze != null && message.hasOwnProperty("healing_bronze")) + if (message.healing_bronze != null && $Object.hasOwnProperty.call(message, "healing_bronze")) object.healing_bronze = message.healing_bronze; - if (message.healing_silver != null && message.hasOwnProperty("healing_silver")) + if (message.healing_silver != null && $Object.hasOwnProperty.call(message, "healing_silver")) object.healing_silver = message.healing_silver; - if (message.healing_gold != null && message.hasOwnProperty("healing_gold")) + if (message.healing_gold != null && $Object.hasOwnProperty.call(message, "healing_gold")) object.healing_gold = message.healing_gold; - if (message.support_bronze != null && message.hasOwnProperty("support_bronze")) + if (message.support_bronze != null && $Object.hasOwnProperty.call(message, "support_bronze")) object.support_bronze = message.support_bronze; - if (message.support_silver != null && message.hasOwnProperty("support_silver")) + if (message.support_silver != null && $Object.hasOwnProperty.call(message, "support_silver")) object.support_silver = message.support_silver; - if (message.support_gold != null && message.hasOwnProperty("support_gold")) + if (message.support_gold != null && $Object.hasOwnProperty.call(message, "support_gold")) object.support_gold = message.support_gold; return object; }; @@ -41029,8 +52924,22 @@ * @instance * @returns {Object.} JSON object */ - CSOTFLadderPlayerStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOTFLadderPlayerStats.prototype.toJSON = function() { + return CSOTFLadderPlayerStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOTFLadderPlayerStats + * @function getTypeUrl + * @memberof CSOTFLadderPlayerStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOTFLadderPlayerStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFLadderPlayerStats"; }; return CSOTFLadderPlayerStats; @@ -41040,29 +52949,42 @@ /** * Properties of a CSOTFRatingData. - * @exports ICSOTFRatingData - * @interface ICSOTFRatingData + * @typedef {Object} CSOTFRatingData.$Properties * @property {number|null} [account_id] CSOTFRatingData account_id * @property {number|null} [rating_type] CSOTFRatingData rating_type * @property {number|null} [rating_primary] CSOTFRatingData rating_primary * @property {number|null} [rating_secondary] CSOTFRatingData rating_secondary * @property {number|null} [rating_tertiary] CSOTFRatingData rating_tertiary + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOTFRatingData. + * @exports ICSOTFRatingData + * @interface ICSOTFRatingData + * @augments CSOTFRatingData.$Properties + * @deprecated Use CSOTFRatingData.$Properties instead. + */ + + /** + * Shape of a CSOTFRatingData. + * @typedef {CSOTFRatingData.$Properties} CSOTFRatingData.$Shape */ /** * Constructs a new CSOTFRatingData. * @exports CSOTFRatingData * @classdesc Represents a CSOTFRatingData. - * @implements ICSOTFRatingData * @constructor - * @param {ICSOTFRatingData=} [properties] Properties to set + * @param {CSOTFRatingData.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOTFRatingData(properties) { + var CSOTFRatingData = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOTFRatingData account_id. @@ -41109,10 +53031,14 @@ * @function create * @memberof CSOTFRatingData * @static - * @param {ICSOTFRatingData=} [properties] Properties to set + * @param {CSOTFRatingData.$Properties=} [properties] Properties to set * @returns {CSOTFRatingData} CSOTFRatingData instance + * @type {{ + * (properties: CSOTFRatingData.$Shape): CSOTFRatingData & CSOTFRatingData.$Shape; + * (properties?: CSOTFRatingData.$Properties): CSOTFRatingData; + * }} */ - CSOTFRatingData.create = function create(properties) { + CSOTFRatingData.create = function(properties) { return new CSOTFRatingData(properties); }; @@ -41121,23 +53047,30 @@ * @function encode * @memberof CSOTFRatingData * @static - * @param {ICSOTFRatingData} message CSOTFRatingData message or plain object to encode + * @param {CSOTFRatingData.$Properties} message CSOTFRatingData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFRatingData.encode = function encode(message, writer) { + CSOTFRatingData.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.rating_type != null && Object.hasOwnProperty.call(message, "rating_type")) + if (message.rating_type != null && $Object.hasOwnProperty.call(message, "rating_type")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rating_type); - if (message.rating_primary != null && Object.hasOwnProperty.call(message, "rating_primary")) + if (message.rating_primary != null && $Object.hasOwnProperty.call(message, "rating_primary")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rating_primary); - if (message.rating_secondary != null && Object.hasOwnProperty.call(message, "rating_secondary")) + if (message.rating_secondary != null && $Object.hasOwnProperty.call(message, "rating_secondary")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.rating_secondary); - if (message.rating_tertiary != null && Object.hasOwnProperty.call(message, "rating_tertiary")) + if (message.rating_tertiary != null && $Object.hasOwnProperty.call(message, "rating_tertiary")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.rating_tertiary); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -41146,12 +53079,12 @@ * @function encodeDelimited * @memberof CSOTFRatingData * @static - * @param {ICSOTFRatingData} message CSOTFRatingData message or plain object to encode + * @param {CSOTFRatingData.$Properties} message CSOTFRatingData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFRatingData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOTFRatingData.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -41161,37 +53094,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFRatingData} CSOTFRatingData + * @returns {CSOTFRatingData & CSOTFRatingData.$Shape} CSOTFRatingData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFRatingData.decode = function decode(reader, length) { + CSOTFRatingData.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFRatingData(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFRatingData(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.rating_type = reader.int32(); - break; - case 3: - message.rating_primary = reader.uint32(); - break; - case 4: - message.rating_secondary = reader.uint32(); - break; - case 5: - message.rating_tertiary = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.rating_type = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.rating_primary = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.rating_secondary = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.rating_tertiary = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -41201,11 +53163,11 @@ * @memberof CSOTFRatingData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFRatingData} CSOTFRatingData + * @returns {CSOTFRatingData & CSOTFRatingData.$Shape} CSOTFRatingData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFRatingData.decodeDelimited = function decodeDelimited(reader) { + CSOTFRatingData.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -41219,22 +53181,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOTFRatingData.verify = function verify(message) { + CSOTFRatingData.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.rating_type != null && message.hasOwnProperty("rating_type")) + if (message.rating_type != null && $Object.hasOwnProperty.call(message, "rating_type")) if (!$util.isInteger(message.rating_type)) return "rating_type: integer expected"; - if (message.rating_primary != null && message.hasOwnProperty("rating_primary")) + if (message.rating_primary != null && $Object.hasOwnProperty.call(message, "rating_primary")) if (!$util.isInteger(message.rating_primary)) return "rating_primary: integer expected"; - if (message.rating_secondary != null && message.hasOwnProperty("rating_secondary")) + if (message.rating_secondary != null && $Object.hasOwnProperty.call(message, "rating_secondary")) if (!$util.isInteger(message.rating_secondary)) return "rating_secondary: integer expected"; - if (message.rating_tertiary != null && message.hasOwnProperty("rating_tertiary")) + if (message.rating_tertiary != null && $Object.hasOwnProperty.call(message, "rating_tertiary")) if (!$util.isInteger(message.rating_tertiary)) return "rating_tertiary: integer expected"; return null; @@ -41248,9 +53214,15 @@ * @param {Object.} object Plain object * @returns {CSOTFRatingData} CSOTFRatingData */ - CSOTFRatingData.fromObject = function fromObject(object) { + CSOTFRatingData.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFRatingData) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFRatingData: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFRatingData(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -41274,9 +53246,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOTFRatingData.toObject = function toObject(message, options) { + CSOTFRatingData.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; @@ -41285,15 +53261,15 @@ object.rating_secondary = 0; object.rating_tertiary = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.rating_type != null && message.hasOwnProperty("rating_type")) + if (message.rating_type != null && $Object.hasOwnProperty.call(message, "rating_type")) object.rating_type = message.rating_type; - if (message.rating_primary != null && message.hasOwnProperty("rating_primary")) + if (message.rating_primary != null && $Object.hasOwnProperty.call(message, "rating_primary")) object.rating_primary = message.rating_primary; - if (message.rating_secondary != null && message.hasOwnProperty("rating_secondary")) + if (message.rating_secondary != null && $Object.hasOwnProperty.call(message, "rating_secondary")) object.rating_secondary = message.rating_secondary; - if (message.rating_tertiary != null && message.hasOwnProperty("rating_tertiary")) + if (message.rating_tertiary != null && $Object.hasOwnProperty.call(message, "rating_tertiary")) object.rating_tertiary = message.rating_tertiary; return object; }; @@ -41305,8 +53281,22 @@ * @instance * @returns {Object.} JSON object */ - CSOTFRatingData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOTFRatingData.prototype.toJSON = function() { + return CSOTFRatingData.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOTFRatingData + * @function getTypeUrl + * @memberof CSOTFRatingData + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOTFRatingData.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFRatingData"; }; return CSOTFRatingData; @@ -41316,26 +53306,39 @@ /** * Properties of a CMsgGC_TFVoteKickPlayerRequest. - * @exports ICMsgGC_TFVoteKickPlayerRequest - * @interface ICMsgGC_TFVoteKickPlayerRequest + * @typedef {Object} CMsgGC_TFVoteKickPlayerRequest.$Properties * @property {number|null} [account_id] CMsgGC_TFVoteKickPlayerRequest account_id * @property {number|Long|null} [target_id] CMsgGC_TFVoteKickPlayerRequest target_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_TFVoteKickPlayerRequest. + * @exports ICMsgGC_TFVoteKickPlayerRequest + * @interface ICMsgGC_TFVoteKickPlayerRequest + * @augments CMsgGC_TFVoteKickPlayerRequest.$Properties + * @deprecated Use CMsgGC_TFVoteKickPlayerRequest.$Properties instead. + */ + + /** + * Shape of a CMsgGC_TFVoteKickPlayerRequest. + * @typedef {CMsgGC_TFVoteKickPlayerRequest.$Properties} CMsgGC_TFVoteKickPlayerRequest.$Shape */ /** * Constructs a new CMsgGC_TFVoteKickPlayerRequest. * @exports CMsgGC_TFVoteKickPlayerRequest * @classdesc Represents a CMsgGC_TFVoteKickPlayerRequest. - * @implements ICMsgGC_TFVoteKickPlayerRequest * @constructor - * @param {ICMsgGC_TFVoteKickPlayerRequest=} [properties] Properties to set + * @param {CMsgGC_TFVoteKickPlayerRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_TFVoteKickPlayerRequest(properties) { + var CMsgGC_TFVoteKickPlayerRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_TFVoteKickPlayerRequest account_id. @@ -41358,10 +53361,14 @@ * @function create * @memberof CMsgGC_TFVoteKickPlayerRequest * @static - * @param {ICMsgGC_TFVoteKickPlayerRequest=} [properties] Properties to set + * @param {CMsgGC_TFVoteKickPlayerRequest.$Properties=} [properties] Properties to set * @returns {CMsgGC_TFVoteKickPlayerRequest} CMsgGC_TFVoteKickPlayerRequest instance + * @type {{ + * (properties: CMsgGC_TFVoteKickPlayerRequest.$Shape): CMsgGC_TFVoteKickPlayerRequest & CMsgGC_TFVoteKickPlayerRequest.$Shape; + * (properties?: CMsgGC_TFVoteKickPlayerRequest.$Properties): CMsgGC_TFVoteKickPlayerRequest; + * }} */ - CMsgGC_TFVoteKickPlayerRequest.create = function create(properties) { + CMsgGC_TFVoteKickPlayerRequest.create = function(properties) { return new CMsgGC_TFVoteKickPlayerRequest(properties); }; @@ -41370,17 +53377,24 @@ * @function encode * @memberof CMsgGC_TFVoteKickPlayerRequest * @static - * @param {ICMsgGC_TFVoteKickPlayerRequest} message CMsgGC_TFVoteKickPlayerRequest message or plain object to encode + * @param {CMsgGC_TFVoteKickPlayerRequest.$Properties} message CMsgGC_TFVoteKickPlayerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_TFVoteKickPlayerRequest.encode = function encode(message, writer) { + CMsgGC_TFVoteKickPlayerRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.target_id != null && Object.hasOwnProperty.call(message, "target_id")) + if (message.target_id != null && $Object.hasOwnProperty.call(message, "target_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.target_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -41389,12 +53403,12 @@ * @function encodeDelimited * @memberof CMsgGC_TFVoteKickPlayerRequest * @static - * @param {ICMsgGC_TFVoteKickPlayerRequest} message CMsgGC_TFVoteKickPlayerRequest message or plain object to encode + * @param {CMsgGC_TFVoteKickPlayerRequest.$Properties} message CMsgGC_TFVoteKickPlayerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_TFVoteKickPlayerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_TFVoteKickPlayerRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -41404,28 +53418,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_TFVoteKickPlayerRequest} CMsgGC_TFVoteKickPlayerRequest + * @returns {CMsgGC_TFVoteKickPlayerRequest & CMsgGC_TFVoteKickPlayerRequest.$Shape} CMsgGC_TFVoteKickPlayerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_TFVoteKickPlayerRequest.decode = function decode(reader, length) { + CMsgGC_TFVoteKickPlayerRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_TFVoteKickPlayerRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_TFVoteKickPlayerRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.target_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.target_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -41435,11 +53469,11 @@ * @memberof CMsgGC_TFVoteKickPlayerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_TFVoteKickPlayerRequest} CMsgGC_TFVoteKickPlayerRequest + * @returns {CMsgGC_TFVoteKickPlayerRequest & CMsgGC_TFVoteKickPlayerRequest.$Shape} CMsgGC_TFVoteKickPlayerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_TFVoteKickPlayerRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_TFVoteKickPlayerRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -41453,13 +53487,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_TFVoteKickPlayerRequest.verify = function verify(message) { + CMsgGC_TFVoteKickPlayerRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.target_id != null && message.hasOwnProperty("target_id")) + if (message.target_id != null && $Object.hasOwnProperty.call(message, "target_id")) if (!$util.isInteger(message.target_id) && !(message.target_id && $util.isInteger(message.target_id.low) && $util.isInteger(message.target_id.high))) return "target_id: integer|Long expected"; return null; @@ -41473,17 +53511,23 @@ * @param {Object.} object Plain object * @returns {CMsgGC_TFVoteKickPlayerRequest} CMsgGC_TFVoteKickPlayerRequest */ - CMsgGC_TFVoteKickPlayerRequest.fromObject = function fromObject(object) { + CMsgGC_TFVoteKickPlayerRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_TFVoteKickPlayerRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_TFVoteKickPlayerRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_TFVoteKickPlayerRequest(); if (object.account_id != null) message.account_id = object.account_id >>> 0; if (object.target_id != null) if ($util.Long) - (message.target_id = $util.Long.fromValue(object.target_id)).unsigned = true; + message.target_id = $util.Long.fromValue(object.target_id, true); else if (typeof object.target_id === "string") - message.target_id = parseInt(object.target_id, 10); + message.target_id = $parseInt(object.target_id, 10); else if (typeof object.target_id === "number") message.target_id = object.target_id; else if (typeof object.target_id === "object") @@ -41500,25 +53544,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_TFVoteKickPlayerRequest.toObject = function toObject(message, options) { + CMsgGC_TFVoteKickPlayerRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.target_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.target_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.target_id = options.longs === String ? "0" : 0; + object.target_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.target_id != null && message.hasOwnProperty("target_id")) - if (typeof message.target_id === "number") - object.target_id = options.longs === String ? String(message.target_id) : message.target_id; + if (message.target_id != null && $Object.hasOwnProperty.call(message, "target_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.target_id = typeof message.target_id === "number" ? $BigInt(message.target_id) : $util.Long.fromBits(message.target_id.low >>> 0, message.target_id.high >>> 0, true).toBigInt(); + else if (typeof message.target_id === "number") + object.target_id = options.longs === $String ? $String(message.target_id) : message.target_id; else - object.target_id = options.longs === String ? $util.Long.prototype.toString.call(message.target_id) : options.longs === Number ? new $util.LongBits(message.target_id.low >>> 0, message.target_id.high >>> 0).toNumber(true) : message.target_id; + object.target_id = options.longs === $String ? $util.Long.prototype.toString.call(message.target_id) : options.longs === $Number ? new $util.LongBits(message.target_id.low >>> 0, message.target_id.high >>> 0).toNumber(true) : message.target_id; return object; }; @@ -41529,8 +53579,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_TFVoteKickPlayerRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_TFVoteKickPlayerRequest.prototype.toJSON = function() { + return CMsgGC_TFVoteKickPlayerRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_TFVoteKickPlayerRequest + * @function getTypeUrl + * @memberof CMsgGC_TFVoteKickPlayerRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_TFVoteKickPlayerRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_TFVoteKickPlayerRequest"; }; return CMsgGC_TFVoteKickPlayerRequest; @@ -41540,26 +53604,39 @@ /** * Properties of a CMsgGC_VoteKickPlayerRequestResponse. - * @exports ICMsgGC_VoteKickPlayerRequestResponse - * @interface ICMsgGC_VoteKickPlayerRequestResponse + * @typedef {Object} CMsgGC_VoteKickPlayerRequestResponse.$Properties * @property {boolean|null} [allowed] CMsgGC_VoteKickPlayerRequestResponse allowed * @property {number|null} [cooldown] CMsgGC_VoteKickPlayerRequestResponse cooldown + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_VoteKickPlayerRequestResponse. + * @exports ICMsgGC_VoteKickPlayerRequestResponse + * @interface ICMsgGC_VoteKickPlayerRequestResponse + * @augments CMsgGC_VoteKickPlayerRequestResponse.$Properties + * @deprecated Use CMsgGC_VoteKickPlayerRequestResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGC_VoteKickPlayerRequestResponse. + * @typedef {CMsgGC_VoteKickPlayerRequestResponse.$Properties} CMsgGC_VoteKickPlayerRequestResponse.$Shape */ /** * Constructs a new CMsgGC_VoteKickPlayerRequestResponse. * @exports CMsgGC_VoteKickPlayerRequestResponse * @classdesc Represents a CMsgGC_VoteKickPlayerRequestResponse. - * @implements ICMsgGC_VoteKickPlayerRequestResponse * @constructor - * @param {ICMsgGC_VoteKickPlayerRequestResponse=} [properties] Properties to set + * @param {CMsgGC_VoteKickPlayerRequestResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_VoteKickPlayerRequestResponse(properties) { + var CMsgGC_VoteKickPlayerRequestResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_VoteKickPlayerRequestResponse allowed. @@ -41582,10 +53659,14 @@ * @function create * @memberof CMsgGC_VoteKickPlayerRequestResponse * @static - * @param {ICMsgGC_VoteKickPlayerRequestResponse=} [properties] Properties to set + * @param {CMsgGC_VoteKickPlayerRequestResponse.$Properties=} [properties] Properties to set * @returns {CMsgGC_VoteKickPlayerRequestResponse} CMsgGC_VoteKickPlayerRequestResponse instance + * @type {{ + * (properties: CMsgGC_VoteKickPlayerRequestResponse.$Shape): CMsgGC_VoteKickPlayerRequestResponse & CMsgGC_VoteKickPlayerRequestResponse.$Shape; + * (properties?: CMsgGC_VoteKickPlayerRequestResponse.$Properties): CMsgGC_VoteKickPlayerRequestResponse; + * }} */ - CMsgGC_VoteKickPlayerRequestResponse.create = function create(properties) { + CMsgGC_VoteKickPlayerRequestResponse.create = function(properties) { return new CMsgGC_VoteKickPlayerRequestResponse(properties); }; @@ -41594,17 +53675,24 @@ * @function encode * @memberof CMsgGC_VoteKickPlayerRequestResponse * @static - * @param {ICMsgGC_VoteKickPlayerRequestResponse} message CMsgGC_VoteKickPlayerRequestResponse message or plain object to encode + * @param {CMsgGC_VoteKickPlayerRequestResponse.$Properties} message CMsgGC_VoteKickPlayerRequestResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_VoteKickPlayerRequestResponse.encode = function encode(message, writer) { + CMsgGC_VoteKickPlayerRequestResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.allowed != null && Object.hasOwnProperty.call(message, "allowed")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.allowed != null && $Object.hasOwnProperty.call(message, "allowed")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowed); - if (message.cooldown != null && Object.hasOwnProperty.call(message, "cooldown")) + if (message.cooldown != null && $Object.hasOwnProperty.call(message, "cooldown")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.cooldown); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -41613,12 +53701,12 @@ * @function encodeDelimited * @memberof CMsgGC_VoteKickPlayerRequestResponse * @static - * @param {ICMsgGC_VoteKickPlayerRequestResponse} message CMsgGC_VoteKickPlayerRequestResponse message or plain object to encode + * @param {CMsgGC_VoteKickPlayerRequestResponse.$Properties} message CMsgGC_VoteKickPlayerRequestResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_VoteKickPlayerRequestResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_VoteKickPlayerRequestResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -41628,28 +53716,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_VoteKickPlayerRequestResponse} CMsgGC_VoteKickPlayerRequestResponse + * @returns {CMsgGC_VoteKickPlayerRequestResponse & CMsgGC_VoteKickPlayerRequestResponse.$Shape} CMsgGC_VoteKickPlayerRequestResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_VoteKickPlayerRequestResponse.decode = function decode(reader, length) { + CMsgGC_VoteKickPlayerRequestResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_VoteKickPlayerRequestResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_VoteKickPlayerRequestResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowed = reader.bool(); - break; - case 2: - message.cooldown = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.allowed = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.cooldown = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -41659,11 +53767,11 @@ * @memberof CMsgGC_VoteKickPlayerRequestResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_VoteKickPlayerRequestResponse} CMsgGC_VoteKickPlayerRequestResponse + * @returns {CMsgGC_VoteKickPlayerRequestResponse & CMsgGC_VoteKickPlayerRequestResponse.$Shape} CMsgGC_VoteKickPlayerRequestResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_VoteKickPlayerRequestResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_VoteKickPlayerRequestResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -41677,13 +53785,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_VoteKickPlayerRequestResponse.verify = function verify(message) { + CMsgGC_VoteKickPlayerRequestResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.allowed != null && message.hasOwnProperty("allowed")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.allowed != null && $Object.hasOwnProperty.call(message, "allowed")) if (typeof message.allowed !== "boolean") return "allowed: boolean expected"; - if (message.cooldown != null && message.hasOwnProperty("cooldown")) + if (message.cooldown != null && $Object.hasOwnProperty.call(message, "cooldown")) if (!$util.isInteger(message.cooldown)) return "cooldown: integer expected"; return null; @@ -41697,12 +53809,18 @@ * @param {Object.} object Plain object * @returns {CMsgGC_VoteKickPlayerRequestResponse} CMsgGC_VoteKickPlayerRequestResponse */ - CMsgGC_VoteKickPlayerRequestResponse.fromObject = function fromObject(object) { + CMsgGC_VoteKickPlayerRequestResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_VoteKickPlayerRequestResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_VoteKickPlayerRequestResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_VoteKickPlayerRequestResponse(); if (object.allowed != null) - message.allowed = Boolean(object.allowed); + message.allowed = $Boolean(object.allowed); if (object.cooldown != null) message.cooldown = object.cooldown >>> 0; return message; @@ -41717,17 +53835,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_VoteKickPlayerRequestResponse.toObject = function toObject(message, options) { + CMsgGC_VoteKickPlayerRequestResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.allowed = false; object.cooldown = 0; } - if (message.allowed != null && message.hasOwnProperty("allowed")) + if (message.allowed != null && $Object.hasOwnProperty.call(message, "allowed")) object.allowed = message.allowed; - if (message.cooldown != null && message.hasOwnProperty("cooldown")) + if (message.cooldown != null && $Object.hasOwnProperty.call(message, "cooldown")) object.cooldown = message.cooldown; return object; }; @@ -41739,8 +53861,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_VoteKickPlayerRequestResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_VoteKickPlayerRequestResponse.prototype.toJSON = function() { + return CMsgGC_VoteKickPlayerRequestResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_VoteKickPlayerRequestResponse + * @function getTypeUrl + * @memberof CMsgGC_VoteKickPlayerRequestResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_VoteKickPlayerRequestResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_VoteKickPlayerRequestResponse"; }; return CMsgGC_VoteKickPlayerRequestResponse; @@ -41748,36 +53884,53 @@ $root.CMsgGC_DailyCompetitiveStatsRollup = (function() { + /** + * Properties of a CMsgGC_DailyCompetitiveStatsRollup. + * @typedef {Object} CMsgGC_DailyCompetitiveStatsRollup.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_DailyCompetitiveStatsRollup. * @exports ICMsgGC_DailyCompetitiveStatsRollup * @interface ICMsgGC_DailyCompetitiveStatsRollup + * @augments CMsgGC_DailyCompetitiveStatsRollup.$Properties + * @deprecated Use CMsgGC_DailyCompetitiveStatsRollup.$Properties instead. + */ + + /** + * Shape of a CMsgGC_DailyCompetitiveStatsRollup. + * @typedef {CMsgGC_DailyCompetitiveStatsRollup.$Properties} CMsgGC_DailyCompetitiveStatsRollup.$Shape */ /** * Constructs a new CMsgGC_DailyCompetitiveStatsRollup. * @exports CMsgGC_DailyCompetitiveStatsRollup * @classdesc Represents a CMsgGC_DailyCompetitiveStatsRollup. - * @implements ICMsgGC_DailyCompetitiveStatsRollup * @constructor - * @param {ICMsgGC_DailyCompetitiveStatsRollup=} [properties] Properties to set + * @param {CMsgGC_DailyCompetitiveStatsRollup.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_DailyCompetitiveStatsRollup(properties) { + var CMsgGC_DailyCompetitiveStatsRollup = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgGC_DailyCompetitiveStatsRollup instance using the specified properties. * @function create * @memberof CMsgGC_DailyCompetitiveStatsRollup * @static - * @param {ICMsgGC_DailyCompetitiveStatsRollup=} [properties] Properties to set + * @param {CMsgGC_DailyCompetitiveStatsRollup.$Properties=} [properties] Properties to set * @returns {CMsgGC_DailyCompetitiveStatsRollup} CMsgGC_DailyCompetitiveStatsRollup instance + * @type {{ + * (properties: CMsgGC_DailyCompetitiveStatsRollup.$Shape): CMsgGC_DailyCompetitiveStatsRollup & CMsgGC_DailyCompetitiveStatsRollup.$Shape; + * (properties?: CMsgGC_DailyCompetitiveStatsRollup.$Properties): CMsgGC_DailyCompetitiveStatsRollup; + * }} */ - CMsgGC_DailyCompetitiveStatsRollup.create = function create(properties) { + CMsgGC_DailyCompetitiveStatsRollup.create = function(properties) { return new CMsgGC_DailyCompetitiveStatsRollup(properties); }; @@ -41786,13 +53939,20 @@ * @function encode * @memberof CMsgGC_DailyCompetitiveStatsRollup * @static - * @param {ICMsgGC_DailyCompetitiveStatsRollup} message CMsgGC_DailyCompetitiveStatsRollup message or plain object to encode + * @param {CMsgGC_DailyCompetitiveStatsRollup.$Properties} message CMsgGC_DailyCompetitiveStatsRollup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_DailyCompetitiveStatsRollup.encode = function encode(message, writer) { + CMsgGC_DailyCompetitiveStatsRollup.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -41801,12 +53961,12 @@ * @function encodeDelimited * @memberof CMsgGC_DailyCompetitiveStatsRollup * @static - * @param {ICMsgGC_DailyCompetitiveStatsRollup} message CMsgGC_DailyCompetitiveStatsRollup message or plain object to encode + * @param {CMsgGC_DailyCompetitiveStatsRollup.$Properties} message CMsgGC_DailyCompetitiveStatsRollup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_DailyCompetitiveStatsRollup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_DailyCompetitiveStatsRollup.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -41816,22 +53976,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_DailyCompetitiveStatsRollup} CMsgGC_DailyCompetitiveStatsRollup + * @returns {CMsgGC_DailyCompetitiveStatsRollup & CMsgGC_DailyCompetitiveStatsRollup.$Shape} CMsgGC_DailyCompetitiveStatsRollup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_DailyCompetitiveStatsRollup.decode = function decode(reader, length) { + CMsgGC_DailyCompetitiveStatsRollup.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_DailyCompetitiveStatsRollup(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_DailyCompetitiveStatsRollup(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -41841,11 +54012,11 @@ * @memberof CMsgGC_DailyCompetitiveStatsRollup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_DailyCompetitiveStatsRollup} CMsgGC_DailyCompetitiveStatsRollup + * @returns {CMsgGC_DailyCompetitiveStatsRollup & CMsgGC_DailyCompetitiveStatsRollup.$Shape} CMsgGC_DailyCompetitiveStatsRollup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_DailyCompetitiveStatsRollup.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_DailyCompetitiveStatsRollup.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -41859,9 +54030,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_DailyCompetitiveStatsRollup.verify = function verify(message) { + CMsgGC_DailyCompetitiveStatsRollup.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -41873,9 +54048,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_DailyCompetitiveStatsRollup} CMsgGC_DailyCompetitiveStatsRollup */ - CMsgGC_DailyCompetitiveStatsRollup.fromObject = function fromObject(object) { + CMsgGC_DailyCompetitiveStatsRollup.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_DailyCompetitiveStatsRollup) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_DailyCompetitiveStatsRollup: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgGC_DailyCompetitiveStatsRollup(); }; @@ -41888,7 +54069,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_DailyCompetitiveStatsRollup.toObject = function toObject() { + CMsgGC_DailyCompetitiveStatsRollup.toObject = function () { return {}; }; @@ -41899,8 +54080,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_DailyCompetitiveStatsRollup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_DailyCompetitiveStatsRollup.prototype.toJSON = function() { + return CMsgGC_DailyCompetitiveStatsRollup.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_DailyCompetitiveStatsRollup + * @function getTypeUrl + * @memberof CMsgGC_DailyCompetitiveStatsRollup + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_DailyCompetitiveStatsRollup.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_DailyCompetitiveStatsRollup"; }; return CMsgGC_DailyCompetitiveStatsRollup; @@ -41908,32 +54103,45 @@ $root.CMsgGC_DailyCompetitiveStatsRollup_Response = (function() { + /** + * Properties of a CMsgGC_DailyCompetitiveStatsRollup_Response. + * @typedef {Object} CMsgGC_DailyCompetitiveStatsRollup_Response.$Properties + * @property {Array.|null} [rankdata] CMsgGC_DailyCompetitiveStatsRollup_Response rankdata + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_DailyCompetitiveStatsRollup_Response. * @exports ICMsgGC_DailyCompetitiveStatsRollup_Response * @interface ICMsgGC_DailyCompetitiveStatsRollup_Response - * @property {Array.|null} [rankdata] CMsgGC_DailyCompetitiveStatsRollup_Response rankdata + * @augments CMsgGC_DailyCompetitiveStatsRollup_Response.$Properties + * @deprecated Use CMsgGC_DailyCompetitiveStatsRollup_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGC_DailyCompetitiveStatsRollup_Response. + * @typedef {CMsgGC_DailyCompetitiveStatsRollup_Response.$Properties} CMsgGC_DailyCompetitiveStatsRollup_Response.$Shape */ /** * Constructs a new CMsgGC_DailyCompetitiveStatsRollup_Response. * @exports CMsgGC_DailyCompetitiveStatsRollup_Response * @classdesc Represents a CMsgGC_DailyCompetitiveStatsRollup_Response. - * @implements ICMsgGC_DailyCompetitiveStatsRollup_Response * @constructor - * @param {ICMsgGC_DailyCompetitiveStatsRollup_Response=} [properties] Properties to set + * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_DailyCompetitiveStatsRollup_Response(properties) { + var CMsgGC_DailyCompetitiveStatsRollup_Response = function (properties) { this.rankdata = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_DailyCompetitiveStatsRollup_Response rankdata. - * @member {Array.} rankdata + * @member {Array.} rankdata * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response * @instance */ @@ -41944,10 +54152,14 @@ * @function create * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response * @static - * @param {ICMsgGC_DailyCompetitiveStatsRollup_Response=} [properties] Properties to set + * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.$Properties=} [properties] Properties to set * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response} CMsgGC_DailyCompetitiveStatsRollup_Response instance + * @type {{ + * (properties: CMsgGC_DailyCompetitiveStatsRollup_Response.$Shape): CMsgGC_DailyCompetitiveStatsRollup_Response & CMsgGC_DailyCompetitiveStatsRollup_Response.$Shape; + * (properties?: CMsgGC_DailyCompetitiveStatsRollup_Response.$Properties): CMsgGC_DailyCompetitiveStatsRollup_Response; + * }} */ - CMsgGC_DailyCompetitiveStatsRollup_Response.create = function create(properties) { + CMsgGC_DailyCompetitiveStatsRollup_Response.create = function(properties) { return new CMsgGC_DailyCompetitiveStatsRollup_Response(properties); }; @@ -41956,16 +54168,23 @@ * @function encode * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response * @static - * @param {ICMsgGC_DailyCompetitiveStatsRollup_Response} message CMsgGC_DailyCompetitiveStatsRollup_Response message or plain object to encode + * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.$Properties} message CMsgGC_DailyCompetitiveStatsRollup_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_DailyCompetitiveStatsRollup_Response.encode = function encode(message, writer) { + CMsgGC_DailyCompetitiveStatsRollup_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.rankdata != null && message.rankdata.length) for (var i = 0; i < message.rankdata.length; ++i) - $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.encode(message.rankdata[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.encode(message.rankdata[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -41974,12 +54193,12 @@ * @function encodeDelimited * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response * @static - * @param {ICMsgGC_DailyCompetitiveStatsRollup_Response} message CMsgGC_DailyCompetitiveStatsRollup_Response message or plain object to encode + * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.$Properties} message CMsgGC_DailyCompetitiveStatsRollup_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_DailyCompetitiveStatsRollup_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_DailyCompetitiveStatsRollup_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -41989,27 +54208,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response} CMsgGC_DailyCompetitiveStatsRollup_Response + * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response & CMsgGC_DailyCompetitiveStatsRollup_Response.$Shape} CMsgGC_DailyCompetitiveStatsRollup_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_DailyCompetitiveStatsRollup_Response.decode = function decode(reader, length) { + CMsgGC_DailyCompetitiveStatsRollup_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_DailyCompetitiveStatsRollup_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_DailyCompetitiveStatsRollup_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rankdata && message.rankdata.length)) - message.rankdata = []; - message.rankdata.push($root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.rankdata && message.rankdata.length)) + message.rankdata = []; + message.rankdata.push($root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -42019,11 +54255,11 @@ * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response} CMsgGC_DailyCompetitiveStatsRollup_Response + * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response & CMsgGC_DailyCompetitiveStatsRollup_Response.$Shape} CMsgGC_DailyCompetitiveStatsRollup_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_DailyCompetitiveStatsRollup_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_DailyCompetitiveStatsRollup_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -42037,14 +54273,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_DailyCompetitiveStatsRollup_Response.verify = function verify(message) { + CMsgGC_DailyCompetitiveStatsRollup_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rankdata != null && message.hasOwnProperty("rankdata")) { - if (!Array.isArray(message.rankdata)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.rankdata != null && $Object.hasOwnProperty.call(message, "rankdata")) { + if (!$Array.isArray(message.rankdata)) return "rankdata: array expected"; for (var i = 0; i < message.rankdata.length; ++i) { - var error = $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.verify(message.rankdata[i]); + var error = $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.verify(message.rankdata[i], _depth + 1); if (error) return "rankdata." + error; } @@ -42060,18 +54300,24 @@ * @param {Object.} object Plain object * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response} CMsgGC_DailyCompetitiveStatsRollup_Response */ - CMsgGC_DailyCompetitiveStatsRollup_Response.fromObject = function fromObject(object) { + CMsgGC_DailyCompetitiveStatsRollup_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_DailyCompetitiveStatsRollup_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_DailyCompetitiveStatsRollup_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_DailyCompetitiveStatsRollup_Response(); if (object.rankdata) { - if (!Array.isArray(object.rankdata)) - throw TypeError(".CMsgGC_DailyCompetitiveStatsRollup_Response.rankdata: array expected"); - message.rankdata = []; + if (!$Array.isArray(object.rankdata)) + throw $TypeError(".CMsgGC_DailyCompetitiveStatsRollup_Response.rankdata: array expected"); + message.rankdata = $Array(object.rankdata.length); for (var i = 0; i < object.rankdata.length; ++i) { - if (typeof object.rankdata[i] !== "object") - throw TypeError(".CMsgGC_DailyCompetitiveStatsRollup_Response.rankdata: object expected"); - message.rankdata[i] = $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.fromObject(object.rankdata[i]); + if (!$util.isObject(object.rankdata[i])) + throw $TypeError(".CMsgGC_DailyCompetitiveStatsRollup_Response.rankdata: object expected"); + message.rankdata[i] = $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.fromObject(object.rankdata[i], _depth + 1); } } return message; @@ -42086,16 +54332,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_DailyCompetitiveStatsRollup_Response.toObject = function toObject(message, options) { + CMsgGC_DailyCompetitiveStatsRollup_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.rankdata = []; if (message.rankdata && message.rankdata.length) { - object.rankdata = []; + object.rankdata = $Array(message.rankdata.length); for (var j = 0; j < message.rankdata.length; ++j) - object.rankdata[j] = $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.toObject(message.rankdata[j], options); + object.rankdata[j] = $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.toObject(message.rankdata[j], options, _depth + 1); } return object; }; @@ -42107,16 +54357,29 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_DailyCompetitiveStatsRollup_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_DailyCompetitiveStatsRollup_Response.prototype.toJSON = function() { + return CMsgGC_DailyCompetitiveStatsRollup_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_DailyCompetitiveStatsRollup_Response + * @function getTypeUrl + * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_DailyCompetitiveStatsRollup_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_DailyCompetitiveStatsRollup_Response"; }; CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry = (function() { /** * Properties of a RankBucketEntry. - * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response - * @interface IRankBucketEntry + * @typedef {Object} CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Properties * @property {number|null} [rank] RankBucketEntry rank * @property {number|null} [records] RankBucketEntry records * @property {number|null} [avg_score] RankBucketEntry avg_score @@ -42129,22 +54392,36 @@ * @property {number|null} [stdev_healing] RankBucketEntry stdev_healing * @property {number|null} [avg_support] RankBucketEntry avg_support * @property {number|null} [stdev_support] RankBucketEntry stdev_support + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RankBucketEntry. + * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response + * @interface IRankBucketEntry + * @augments CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Properties + * @deprecated Use CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Properties instead. + */ + + /** + * Shape of a RankBucketEntry. + * @typedef {CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Properties} CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Shape */ /** * Constructs a new RankBucketEntry. * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response * @classdesc Represents a RankBucketEntry. - * @implements IRankBucketEntry * @constructor - * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.IRankBucketEntry=} [properties] Properties to set + * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function RankBucketEntry(properties) { + var RankBucketEntry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * RankBucketEntry rank. @@ -42247,10 +54524,14 @@ * @function create * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry * @static - * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.IRankBucketEntry=} [properties] Properties to set + * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Properties=} [properties] Properties to set * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry} RankBucketEntry instance + * @type {{ + * (properties: CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Shape): CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry & CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Shape; + * (properties?: CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Properties): CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry; + * }} */ - RankBucketEntry.create = function create(properties) { + RankBucketEntry.create = function(properties) { return new RankBucketEntry(properties); }; @@ -42259,37 +54540,44 @@ * @function encode * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry * @static - * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.IRankBucketEntry} message RankBucketEntry message or plain object to encode + * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Properties} message RankBucketEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RankBucketEntry.encode = function encode(message, writer) { + RankBucketEntry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rank); - if (message.records != null && Object.hasOwnProperty.call(message, "records")) + if (message.records != null && $Object.hasOwnProperty.call(message, "records")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.records); - if (message.avg_score != null && Object.hasOwnProperty.call(message, "avg_score")) + if (message.avg_score != null && $Object.hasOwnProperty.call(message, "avg_score")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.avg_score); - if (message.stdev_score != null && Object.hasOwnProperty.call(message, "stdev_score")) + if (message.stdev_score != null && $Object.hasOwnProperty.call(message, "stdev_score")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.stdev_score); - if (message.avg_kills != null && Object.hasOwnProperty.call(message, "avg_kills")) + if (message.avg_kills != null && $Object.hasOwnProperty.call(message, "avg_kills")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.avg_kills); - if (message.stdev_kills != null && Object.hasOwnProperty.call(message, "stdev_kills")) + if (message.stdev_kills != null && $Object.hasOwnProperty.call(message, "stdev_kills")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.stdev_kills); - if (message.avg_damage != null && Object.hasOwnProperty.call(message, "avg_damage")) + if (message.avg_damage != null && $Object.hasOwnProperty.call(message, "avg_damage")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.avg_damage); - if (message.stdev_damage != null && Object.hasOwnProperty.call(message, "stdev_damage")) + if (message.stdev_damage != null && $Object.hasOwnProperty.call(message, "stdev_damage")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.stdev_damage); - if (message.avg_healing != null && Object.hasOwnProperty.call(message, "avg_healing")) + if (message.avg_healing != null && $Object.hasOwnProperty.call(message, "avg_healing")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.avg_healing); - if (message.stdev_healing != null && Object.hasOwnProperty.call(message, "stdev_healing")) + if (message.stdev_healing != null && $Object.hasOwnProperty.call(message, "stdev_healing")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.stdev_healing); - if (message.avg_support != null && Object.hasOwnProperty.call(message, "avg_support")) + if (message.avg_support != null && $Object.hasOwnProperty.call(message, "avg_support")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.avg_support); - if (message.stdev_support != null && Object.hasOwnProperty.call(message, "stdev_support")) + if (message.stdev_support != null && $Object.hasOwnProperty.call(message, "stdev_support")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.stdev_support); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -42298,12 +54586,12 @@ * @function encodeDelimited * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry * @static - * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.IRankBucketEntry} message RankBucketEntry message or plain object to encode + * @param {CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Properties} message RankBucketEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RankBucketEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RankBucketEntry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -42313,58 +54601,108 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry} RankBucketEntry + * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry & CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Shape} RankBucketEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RankBucketEntry.decode = function decode(reader, length) { + RankBucketEntry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rank = reader.uint32(); - break; - case 2: - message.records = reader.uint32(); - break; - case 3: - message.avg_score = reader.uint32(); - break; - case 4: - message.stdev_score = reader.uint32(); - break; - case 5: - message.avg_kills = reader.uint32(); - break; - case 6: - message.stdev_kills = reader.uint32(); - break; - case 7: - message.avg_damage = reader.uint32(); - break; - case 8: - message.stdev_damage = reader.uint32(); - break; - case 9: - message.avg_healing = reader.uint32(); - break; - case 10: - message.stdev_healing = reader.uint32(); - break; - case 11: - message.avg_support = reader.uint32(); - break; - case 12: - message.stdev_support = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.rank = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.records = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.avg_score = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.stdev_score = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.avg_kills = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.stdev_kills = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.avg_damage = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.stdev_damage = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.avg_healing = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.stdev_healing = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.avg_support = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.stdev_support = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -42374,11 +54712,11 @@ * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry} RankBucketEntry + * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry & CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry.$Shape} RankBucketEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RankBucketEntry.decodeDelimited = function decodeDelimited(reader) { + RankBucketEntry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -42392,43 +54730,47 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RankBucketEntry.verify = function verify(message) { + RankBucketEntry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rank != null && message.hasOwnProperty("rank")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) if (!$util.isInteger(message.rank)) return "rank: integer expected"; - if (message.records != null && message.hasOwnProperty("records")) + if (message.records != null && $Object.hasOwnProperty.call(message, "records")) if (!$util.isInteger(message.records)) return "records: integer expected"; - if (message.avg_score != null && message.hasOwnProperty("avg_score")) + if (message.avg_score != null && $Object.hasOwnProperty.call(message, "avg_score")) if (!$util.isInteger(message.avg_score)) return "avg_score: integer expected"; - if (message.stdev_score != null && message.hasOwnProperty("stdev_score")) + if (message.stdev_score != null && $Object.hasOwnProperty.call(message, "stdev_score")) if (!$util.isInteger(message.stdev_score)) return "stdev_score: integer expected"; - if (message.avg_kills != null && message.hasOwnProperty("avg_kills")) + if (message.avg_kills != null && $Object.hasOwnProperty.call(message, "avg_kills")) if (!$util.isInteger(message.avg_kills)) return "avg_kills: integer expected"; - if (message.stdev_kills != null && message.hasOwnProperty("stdev_kills")) + if (message.stdev_kills != null && $Object.hasOwnProperty.call(message, "stdev_kills")) if (!$util.isInteger(message.stdev_kills)) return "stdev_kills: integer expected"; - if (message.avg_damage != null && message.hasOwnProperty("avg_damage")) + if (message.avg_damage != null && $Object.hasOwnProperty.call(message, "avg_damage")) if (!$util.isInteger(message.avg_damage)) return "avg_damage: integer expected"; - if (message.stdev_damage != null && message.hasOwnProperty("stdev_damage")) + if (message.stdev_damage != null && $Object.hasOwnProperty.call(message, "stdev_damage")) if (!$util.isInteger(message.stdev_damage)) return "stdev_damage: integer expected"; - if (message.avg_healing != null && message.hasOwnProperty("avg_healing")) + if (message.avg_healing != null && $Object.hasOwnProperty.call(message, "avg_healing")) if (!$util.isInteger(message.avg_healing)) return "avg_healing: integer expected"; - if (message.stdev_healing != null && message.hasOwnProperty("stdev_healing")) + if (message.stdev_healing != null && $Object.hasOwnProperty.call(message, "stdev_healing")) if (!$util.isInteger(message.stdev_healing)) return "stdev_healing: integer expected"; - if (message.avg_support != null && message.hasOwnProperty("avg_support")) + if (message.avg_support != null && $Object.hasOwnProperty.call(message, "avg_support")) if (!$util.isInteger(message.avg_support)) return "avg_support: integer expected"; - if (message.stdev_support != null && message.hasOwnProperty("stdev_support")) + if (message.stdev_support != null && $Object.hasOwnProperty.call(message, "stdev_support")) if (!$util.isInteger(message.stdev_support)) return "stdev_support: integer expected"; return null; @@ -42442,9 +54784,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry} RankBucketEntry */ - RankBucketEntry.fromObject = function fromObject(object) { + RankBucketEntry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry(); if (object.rank != null) message.rank = object.rank >>> 0; @@ -42482,9 +54830,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RankBucketEntry.toObject = function toObject(message, options) { + RankBucketEntry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.rank = 0; @@ -42500,29 +54852,29 @@ object.avg_support = 0; object.stdev_support = 0; } - if (message.rank != null && message.hasOwnProperty("rank")) + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) object.rank = message.rank; - if (message.records != null && message.hasOwnProperty("records")) + if (message.records != null && $Object.hasOwnProperty.call(message, "records")) object.records = message.records; - if (message.avg_score != null && message.hasOwnProperty("avg_score")) + if (message.avg_score != null && $Object.hasOwnProperty.call(message, "avg_score")) object.avg_score = message.avg_score; - if (message.stdev_score != null && message.hasOwnProperty("stdev_score")) + if (message.stdev_score != null && $Object.hasOwnProperty.call(message, "stdev_score")) object.stdev_score = message.stdev_score; - if (message.avg_kills != null && message.hasOwnProperty("avg_kills")) + if (message.avg_kills != null && $Object.hasOwnProperty.call(message, "avg_kills")) object.avg_kills = message.avg_kills; - if (message.stdev_kills != null && message.hasOwnProperty("stdev_kills")) + if (message.stdev_kills != null && $Object.hasOwnProperty.call(message, "stdev_kills")) object.stdev_kills = message.stdev_kills; - if (message.avg_damage != null && message.hasOwnProperty("avg_damage")) + if (message.avg_damage != null && $Object.hasOwnProperty.call(message, "avg_damage")) object.avg_damage = message.avg_damage; - if (message.stdev_damage != null && message.hasOwnProperty("stdev_damage")) + if (message.stdev_damage != null && $Object.hasOwnProperty.call(message, "stdev_damage")) object.stdev_damage = message.stdev_damage; - if (message.avg_healing != null && message.hasOwnProperty("avg_healing")) + if (message.avg_healing != null && $Object.hasOwnProperty.call(message, "avg_healing")) object.avg_healing = message.avg_healing; - if (message.stdev_healing != null && message.hasOwnProperty("stdev_healing")) + if (message.stdev_healing != null && $Object.hasOwnProperty.call(message, "stdev_healing")) object.stdev_healing = message.stdev_healing; - if (message.avg_support != null && message.hasOwnProperty("avg_support")) + if (message.avg_support != null && $Object.hasOwnProperty.call(message, "avg_support")) object.avg_support = message.avg_support; - if (message.stdev_support != null && message.hasOwnProperty("stdev_support")) + if (message.stdev_support != null && $Object.hasOwnProperty.call(message, "stdev_support")) object.stdev_support = message.stdev_support; return object; }; @@ -42534,8 +54886,22 @@ * @instance * @returns {Object.} JSON object */ - RankBucketEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + RankBucketEntry.prototype.toJSON = function() { + return RankBucketEntry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RankBucketEntry + * @function getTypeUrl + * @memberof CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RankBucketEntry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_DailyCompetitiveStatsRollup_Response.RankBucketEntry"; }; return RankBucketEntry; @@ -42548,26 +54914,39 @@ /** * Properties of a CMsgGC_ReportPlayer. - * @exports ICMsgGC_ReportPlayer - * @interface ICMsgGC_ReportPlayer + * @typedef {Object} CMsgGC_ReportPlayer.$Properties * @property {number|null} [account_id_target] CMsgGC_ReportPlayer account_id_target * @property {CMsgGC_ReportPlayer.EReason|null} [reason] CMsgGC_ReportPlayer reason + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGC_ReportPlayer. + * @exports ICMsgGC_ReportPlayer + * @interface ICMsgGC_ReportPlayer + * @augments CMsgGC_ReportPlayer.$Properties + * @deprecated Use CMsgGC_ReportPlayer.$Properties instead. + */ + + /** + * Shape of a CMsgGC_ReportPlayer. + * @typedef {CMsgGC_ReportPlayer.$Properties} CMsgGC_ReportPlayer.$Shape */ /** * Constructs a new CMsgGC_ReportPlayer. * @exports CMsgGC_ReportPlayer * @classdesc Represents a CMsgGC_ReportPlayer. - * @implements ICMsgGC_ReportPlayer * @constructor - * @param {ICMsgGC_ReportPlayer=} [properties] Properties to set + * @param {CMsgGC_ReportPlayer.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_ReportPlayer(properties) { + var CMsgGC_ReportPlayer = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_ReportPlayer account_id_target. @@ -42590,10 +54969,14 @@ * @function create * @memberof CMsgGC_ReportPlayer * @static - * @param {ICMsgGC_ReportPlayer=} [properties] Properties to set + * @param {CMsgGC_ReportPlayer.$Properties=} [properties] Properties to set * @returns {CMsgGC_ReportPlayer} CMsgGC_ReportPlayer instance + * @type {{ + * (properties: CMsgGC_ReportPlayer.$Shape): CMsgGC_ReportPlayer & CMsgGC_ReportPlayer.$Shape; + * (properties?: CMsgGC_ReportPlayer.$Properties): CMsgGC_ReportPlayer; + * }} */ - CMsgGC_ReportPlayer.create = function create(properties) { + CMsgGC_ReportPlayer.create = function(properties) { return new CMsgGC_ReportPlayer(properties); }; @@ -42602,17 +54985,24 @@ * @function encode * @memberof CMsgGC_ReportPlayer * @static - * @param {ICMsgGC_ReportPlayer} message CMsgGC_ReportPlayer message or plain object to encode + * @param {CMsgGC_ReportPlayer.$Properties} message CMsgGC_ReportPlayer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_ReportPlayer.encode = function encode(message, writer) { + CMsgGC_ReportPlayer.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id_target != null && Object.hasOwnProperty.call(message, "account_id_target")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id_target != null && $Object.hasOwnProperty.call(message, "account_id_target")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id_target); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.reason); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -42621,12 +55011,12 @@ * @function encodeDelimited * @memberof CMsgGC_ReportPlayer * @static - * @param {ICMsgGC_ReportPlayer} message CMsgGC_ReportPlayer message or plain object to encode + * @param {CMsgGC_ReportPlayer.$Properties} message CMsgGC_ReportPlayer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_ReportPlayer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_ReportPlayer.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -42636,28 +55026,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_ReportPlayer} CMsgGC_ReportPlayer + * @returns {CMsgGC_ReportPlayer & CMsgGC_ReportPlayer.$Shape} CMsgGC_ReportPlayer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_ReportPlayer.decode = function decode(reader, length) { + CMsgGC_ReportPlayer.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_ReportPlayer(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_ReportPlayer(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id_target = reader.uint32(); - break; - case 2: - message.reason = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id_target = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGC_ReportPlayer.EReason[value] !== $undefined) + message.reason = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -42667,11 +55083,11 @@ * @memberof CMsgGC_ReportPlayer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_ReportPlayer} CMsgGC_ReportPlayer + * @returns {CMsgGC_ReportPlayer & CMsgGC_ReportPlayer.$Shape} CMsgGC_ReportPlayer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_ReportPlayer.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_ReportPlayer.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -42685,13 +55101,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_ReportPlayer.verify = function verify(message) { + CMsgGC_ReportPlayer.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id_target != null && message.hasOwnProperty("account_id_target")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id_target != null && $Object.hasOwnProperty.call(message, "account_id_target")) if (!$util.isInteger(message.account_id_target)) return "account_id_target: integer expected"; - if (message.reason != null && message.hasOwnProperty("reason")) + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) switch (message.reason) { default: return "reason: enum value expected"; @@ -42714,9 +55134,15 @@ * @param {Object.} object Plain object * @returns {CMsgGC_ReportPlayer} CMsgGC_ReportPlayer */ - CMsgGC_ReportPlayer.fromObject = function fromObject(object) { + CMsgGC_ReportPlayer.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_ReportPlayer) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_ReportPlayer: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_ReportPlayer(); if (object.account_id_target != null) message.account_id_target = object.account_id_target >>> 0; @@ -42745,6 +55171,7 @@ case 5: message.reason = 5; break; + default: } return message; }; @@ -42758,18 +55185,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_ReportPlayer.toObject = function toObject(message, options) { + CMsgGC_ReportPlayer.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id_target = 0; - object.reason = options.enums === String ? "kReason_INVALID" : 0; + object.reason = options.enums === $String ? "kReason_INVALID" : 0; } - if (message.account_id_target != null && message.hasOwnProperty("account_id_target")) + if (message.account_id_target != null && $Object.hasOwnProperty.call(message, "account_id_target")) object.account_id_target = message.account_id_target; - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = options.enums === String ? $root.CMsgGC_ReportPlayer.EReason[message.reason] : message.reason; + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) + object.reason = options.enums === $String ? $root.CMsgGC_ReportPlayer.EReason[message.reason] === $undefined ? message.reason : $root.CMsgGC_ReportPlayer.EReason[message.reason] : message.reason; return object; }; @@ -42780,8 +55211,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_ReportPlayer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_ReportPlayer.prototype.toJSON = function() { + return CMsgGC_ReportPlayer.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_ReportPlayer + * @function getTypeUrl + * @memberof CMsgGC_ReportPlayer + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_ReportPlayer.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_ReportPlayer"; }; /** @@ -42796,7 +55241,7 @@ * @property {number} kReason_COUNT=5 kReason_COUNT value */ CMsgGC_ReportPlayer.EReason = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "kReason_INVALID"] = 0; values[valuesById[1] = "kReason_CHEATING"] = 1; values[valuesById[2] = "kReason_IDLE"] = 2; @@ -42813,8 +55258,7 @@ /** * Properties of a CSOTFMatchResultPlayerStats. - * @exports ICSOTFMatchResultPlayerStats - * @interface ICSOTFMatchResultPlayerStats + * @typedef {Object} CSOTFMatchResultPlayerStats.$Properties * @property {number|Long|null} [match_id] CSOTFMatchResultPlayerStats match_id * @property {number|null} [account_id] CSOTFMatchResultPlayerStats account_id * @property {number|null} [match_group] CSOTFMatchResultPlayerStats match_group @@ -42842,22 +55286,36 @@ * @property {number|null} [support_medal] CSOTFMatchResultPlayerStats support_medal * @property {number|null} [map_index] CSOTFMatchResultPlayerStats map_index * @property {number|null} [winning_team] CSOTFMatchResultPlayerStats winning_team + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOTFMatchResultPlayerStats. + * @exports ICSOTFMatchResultPlayerStats + * @interface ICSOTFMatchResultPlayerStats + * @augments CSOTFMatchResultPlayerStats.$Properties + * @deprecated Use CSOTFMatchResultPlayerStats.$Properties instead. + */ + + /** + * Shape of a CSOTFMatchResultPlayerStats. + * @typedef {CSOTFMatchResultPlayerStats.$Properties} CSOTFMatchResultPlayerStats.$Shape */ /** * Constructs a new CSOTFMatchResultPlayerStats. * @exports CSOTFMatchResultPlayerStats * @classdesc Represents a CSOTFMatchResultPlayerStats. - * @implements ICSOTFMatchResultPlayerStats * @constructor - * @param {ICSOTFMatchResultPlayerStats=} [properties] Properties to set + * @param {CSOTFMatchResultPlayerStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOTFMatchResultPlayerStats(properties) { + var CSOTFMatchResultPlayerStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOTFMatchResultPlayerStats match_id. @@ -43080,10 +55538,14 @@ * @function create * @memberof CSOTFMatchResultPlayerStats * @static - * @param {ICSOTFMatchResultPlayerStats=} [properties] Properties to set + * @param {CSOTFMatchResultPlayerStats.$Properties=} [properties] Properties to set * @returns {CSOTFMatchResultPlayerStats} CSOTFMatchResultPlayerStats instance + * @type {{ + * (properties: CSOTFMatchResultPlayerStats.$Shape): CSOTFMatchResultPlayerStats & CSOTFMatchResultPlayerStats.$Shape; + * (properties?: CSOTFMatchResultPlayerStats.$Properties): CSOTFMatchResultPlayerStats; + * }} */ - CSOTFMatchResultPlayerStats.create = function create(properties) { + CSOTFMatchResultPlayerStats.create = function(properties) { return new CSOTFMatchResultPlayerStats(properties); }; @@ -43092,67 +55554,74 @@ * @function encode * @memberof CSOTFMatchResultPlayerStats * @static - * @param {ICSOTFMatchResultPlayerStats} message CSOTFMatchResultPlayerStats message or plain object to encode + * @param {CSOTFMatchResultPlayerStats.$Properties} message CSOTFMatchResultPlayerStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFMatchResultPlayerStats.encode = function encode(message, writer) { + CSOTFMatchResultPlayerStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.match_id != null && Object.hasOwnProperty.call(message, "match_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.match_id); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_id); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.match_group); - if (message.endtime != null && Object.hasOwnProperty.call(message, "endtime")) + if (message.endtime != null && $Object.hasOwnProperty.call(message, "endtime")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.endtime); - if (message.season_id != null && Object.hasOwnProperty.call(message, "season_id")) + if (message.season_id != null && $Object.hasOwnProperty.call(message, "season_id")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.season_id); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.status); - if (message.original_party_id != null && Object.hasOwnProperty.call(message, "original_party_id")) + if (message.original_party_id != null && $Object.hasOwnProperty.call(message, "original_party_id")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.original_party_id); - if (message.team != null && Object.hasOwnProperty.call(message, "team")) + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.team); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.score); - if (message.ping != null && Object.hasOwnProperty.call(message, "ping")) + if (message.ping != null && $Object.hasOwnProperty.call(message, "ping")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.ping); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.flags); - if (message.display_rating != null && Object.hasOwnProperty.call(message, "display_rating")) + if (message.display_rating != null && $Object.hasOwnProperty.call(message, "display_rating")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.display_rating); - if (message.display_rating_change != null && Object.hasOwnProperty.call(message, "display_rating_change")) + if (message.display_rating_change != null && $Object.hasOwnProperty.call(message, "display_rating_change")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.display_rating_change); - if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.rank); - if (message.classes_played != null && Object.hasOwnProperty.call(message, "classes_played")) + if (message.classes_played != null && $Object.hasOwnProperty.call(message, "classes_played")) writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.classes_played); - if (message.kills != null && Object.hasOwnProperty.call(message, "kills")) + if (message.kills != null && $Object.hasOwnProperty.call(message, "kills")) writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.kills); - if (message.deaths != null && Object.hasOwnProperty.call(message, "deaths")) + if (message.deaths != null && $Object.hasOwnProperty.call(message, "deaths")) writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.deaths); - if (message.damage != null && Object.hasOwnProperty.call(message, "damage")) + if (message.damage != null && $Object.hasOwnProperty.call(message, "damage")) writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.damage); - if (message.healing != null && Object.hasOwnProperty.call(message, "healing")) + if (message.healing != null && $Object.hasOwnProperty.call(message, "healing")) writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.healing); - if (message.support != null && Object.hasOwnProperty.call(message, "support")) + if (message.support != null && $Object.hasOwnProperty.call(message, "support")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.support); - if (message.score_medal != null && Object.hasOwnProperty.call(message, "score_medal")) + if (message.score_medal != null && $Object.hasOwnProperty.call(message, "score_medal")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.score_medal); - if (message.kills_medal != null && Object.hasOwnProperty.call(message, "kills_medal")) + if (message.kills_medal != null && $Object.hasOwnProperty.call(message, "kills_medal")) writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.kills_medal); - if (message.damage_medal != null && Object.hasOwnProperty.call(message, "damage_medal")) + if (message.damage_medal != null && $Object.hasOwnProperty.call(message, "damage_medal")) writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.damage_medal); - if (message.healing_medal != null && Object.hasOwnProperty.call(message, "healing_medal")) + if (message.healing_medal != null && $Object.hasOwnProperty.call(message, "healing_medal")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.healing_medal); - if (message.support_medal != null && Object.hasOwnProperty.call(message, "support_medal")) + if (message.support_medal != null && $Object.hasOwnProperty.call(message, "support_medal")) writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.support_medal); - if (message.map_index != null && Object.hasOwnProperty.call(message, "map_index")) + if (message.map_index != null && $Object.hasOwnProperty.call(message, "map_index")) writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.map_index); - if (message.winning_team != null && Object.hasOwnProperty.call(message, "winning_team")) + if (message.winning_team != null && $Object.hasOwnProperty.call(message, "winning_team")) writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.winning_team); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -43161,12 +55630,12 @@ * @function encodeDelimited * @memberof CSOTFMatchResultPlayerStats * @static - * @param {ICSOTFMatchResultPlayerStats} message CSOTFMatchResultPlayerStats message or plain object to encode + * @param {CSOTFMatchResultPlayerStats.$Properties} message CSOTFMatchResultPlayerStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOTFMatchResultPlayerStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOTFMatchResultPlayerStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -43176,103 +55645,198 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOTFMatchResultPlayerStats} CSOTFMatchResultPlayerStats + * @returns {CSOTFMatchResultPlayerStats & CSOTFMatchResultPlayerStats.$Shape} CSOTFMatchResultPlayerStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFMatchResultPlayerStats.decode = function decode(reader, length) { + CSOTFMatchResultPlayerStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOTFMatchResultPlayerStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOTFMatchResultPlayerStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.match_id = reader.uint64(); - break; - case 2: - message.account_id = reader.uint32(); - break; - case 3: - message.match_group = reader.int32(); - break; - case 4: - message.endtime = reader.uint32(); - break; - case 5: - message.season_id = reader.uint32(); - break; - case 6: - message.status = reader.uint32(); - break; - case 7: - message.original_party_id = reader.uint32(); - break; - case 8: - message.team = reader.uint32(); - break; - case 9: - message.score = reader.uint32(); - break; - case 10: - message.ping = reader.uint32(); - break; - case 11: - message.flags = reader.uint32(); - break; - case 12: - message.display_rating = reader.uint32(); - break; - case 13: - message.display_rating_change = reader.int32(); - break; - case 14: - message.rank = reader.uint32(); - break; - case 15: - message.classes_played = reader.uint32(); - break; - case 16: - message.kills = reader.uint32(); - break; - case 17: - message.deaths = reader.uint32(); - break; - case 18: - message.damage = reader.uint32(); - break; - case 19: - message.healing = reader.uint32(); - break; - case 20: - message.support = reader.uint32(); - break; - case 21: - message.score_medal = reader.uint32(); - break; - case 22: - message.kills_medal = reader.uint32(); - break; - case 23: - message.damage_medal = reader.uint32(); - break; - case 24: - message.healing_medal = reader.uint32(); - break; - case 25: - message.support_medal = reader.uint32(); - break; - case 26: - message.map_index = reader.uint32(); - break; - case 27: - message.winning_team = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.match_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.match_group = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.endtime = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.season_id = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.status = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.original_party_id = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.team = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.score = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.ping = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.display_rating = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.display_rating_change = reader.int32(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.rank = reader.uint32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.classes_played = reader.uint32(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.kills = reader.uint32(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.deaths = reader.uint32(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.damage = reader.uint32(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.healing = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.support = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.score_medal = reader.uint32(); + continue; + } + case 22: { + if (wireType !== 0) + break; + message.kills_medal = reader.uint32(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.damage_medal = reader.uint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.healing_medal = reader.uint32(); + continue; + } + case 25: { + if (wireType !== 0) + break; + message.support_medal = reader.uint32(); + continue; + } + case 26: { + if (wireType !== 0) + break; + message.map_index = reader.uint32(); + continue; + } + case 27: { + if (wireType !== 0) + break; + message.winning_team = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -43282,11 +55846,11 @@ * @memberof CSOTFMatchResultPlayerStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOTFMatchResultPlayerStats} CSOTFMatchResultPlayerStats + * @returns {CSOTFMatchResultPlayerStats & CSOTFMatchResultPlayerStats.$Shape} CSOTFMatchResultPlayerStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOTFMatchResultPlayerStats.decodeDelimited = function decodeDelimited(reader) { + CSOTFMatchResultPlayerStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -43300,88 +55864,92 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOTFMatchResultPlayerStats.verify = function verify(message) { + CSOTFMatchResultPlayerStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.match_id != null && message.hasOwnProperty("match_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) if (!$util.isInteger(message.match_id) && !(message.match_id && $util.isInteger(message.match_id.low) && $util.isInteger(message.match_id.high))) return "match_id: integer|Long expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) if (!$util.isInteger(message.match_group)) return "match_group: integer expected"; - if (message.endtime != null && message.hasOwnProperty("endtime")) + if (message.endtime != null && $Object.hasOwnProperty.call(message, "endtime")) if (!$util.isInteger(message.endtime)) return "endtime: integer expected"; - if (message.season_id != null && message.hasOwnProperty("season_id")) + if (message.season_id != null && $Object.hasOwnProperty.call(message, "season_id")) if (!$util.isInteger(message.season_id)) return "season_id: integer expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) if (!$util.isInteger(message.status)) return "status: integer expected"; - if (message.original_party_id != null && message.hasOwnProperty("original_party_id")) + if (message.original_party_id != null && $Object.hasOwnProperty.call(message, "original_party_id")) if (!$util.isInteger(message.original_party_id)) return "original_party_id: integer expected"; - if (message.team != null && message.hasOwnProperty("team")) + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) if (!$util.isInteger(message.team)) return "team: integer expected"; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) if (!$util.isInteger(message.score)) return "score: integer expected"; - if (message.ping != null && message.hasOwnProperty("ping")) + if (message.ping != null && $Object.hasOwnProperty.call(message, "ping")) if (!$util.isInteger(message.ping)) return "ping: integer expected"; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.display_rating != null && message.hasOwnProperty("display_rating")) + if (message.display_rating != null && $Object.hasOwnProperty.call(message, "display_rating")) if (!$util.isInteger(message.display_rating)) return "display_rating: integer expected"; - if (message.display_rating_change != null && message.hasOwnProperty("display_rating_change")) + if (message.display_rating_change != null && $Object.hasOwnProperty.call(message, "display_rating_change")) if (!$util.isInteger(message.display_rating_change)) return "display_rating_change: integer expected"; - if (message.rank != null && message.hasOwnProperty("rank")) + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) if (!$util.isInteger(message.rank)) return "rank: integer expected"; - if (message.classes_played != null && message.hasOwnProperty("classes_played")) + if (message.classes_played != null && $Object.hasOwnProperty.call(message, "classes_played")) if (!$util.isInteger(message.classes_played)) return "classes_played: integer expected"; - if (message.kills != null && message.hasOwnProperty("kills")) + if (message.kills != null && $Object.hasOwnProperty.call(message, "kills")) if (!$util.isInteger(message.kills)) return "kills: integer expected"; - if (message.deaths != null && message.hasOwnProperty("deaths")) + if (message.deaths != null && $Object.hasOwnProperty.call(message, "deaths")) if (!$util.isInteger(message.deaths)) return "deaths: integer expected"; - if (message.damage != null && message.hasOwnProperty("damage")) + if (message.damage != null && $Object.hasOwnProperty.call(message, "damage")) if (!$util.isInteger(message.damage)) return "damage: integer expected"; - if (message.healing != null && message.hasOwnProperty("healing")) + if (message.healing != null && $Object.hasOwnProperty.call(message, "healing")) if (!$util.isInteger(message.healing)) return "healing: integer expected"; - if (message.support != null && message.hasOwnProperty("support")) + if (message.support != null && $Object.hasOwnProperty.call(message, "support")) if (!$util.isInteger(message.support)) return "support: integer expected"; - if (message.score_medal != null && message.hasOwnProperty("score_medal")) + if (message.score_medal != null && $Object.hasOwnProperty.call(message, "score_medal")) if (!$util.isInteger(message.score_medal)) return "score_medal: integer expected"; - if (message.kills_medal != null && message.hasOwnProperty("kills_medal")) + if (message.kills_medal != null && $Object.hasOwnProperty.call(message, "kills_medal")) if (!$util.isInteger(message.kills_medal)) return "kills_medal: integer expected"; - if (message.damage_medal != null && message.hasOwnProperty("damage_medal")) + if (message.damage_medal != null && $Object.hasOwnProperty.call(message, "damage_medal")) if (!$util.isInteger(message.damage_medal)) return "damage_medal: integer expected"; - if (message.healing_medal != null && message.hasOwnProperty("healing_medal")) + if (message.healing_medal != null && $Object.hasOwnProperty.call(message, "healing_medal")) if (!$util.isInteger(message.healing_medal)) return "healing_medal: integer expected"; - if (message.support_medal != null && message.hasOwnProperty("support_medal")) + if (message.support_medal != null && $Object.hasOwnProperty.call(message, "support_medal")) if (!$util.isInteger(message.support_medal)) return "support_medal: integer expected"; - if (message.map_index != null && message.hasOwnProperty("map_index")) + if (message.map_index != null && $Object.hasOwnProperty.call(message, "map_index")) if (!$util.isInteger(message.map_index)) return "map_index: integer expected"; - if (message.winning_team != null && message.hasOwnProperty("winning_team")) + if (message.winning_team != null && $Object.hasOwnProperty.call(message, "winning_team")) if (!$util.isInteger(message.winning_team)) return "winning_team: integer expected"; return null; @@ -43395,15 +55963,21 @@ * @param {Object.} object Plain object * @returns {CSOTFMatchResultPlayerStats} CSOTFMatchResultPlayerStats */ - CSOTFMatchResultPlayerStats.fromObject = function fromObject(object) { + CSOTFMatchResultPlayerStats.fromObject = function (object, _depth) { if (object instanceof $root.CSOTFMatchResultPlayerStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOTFMatchResultPlayerStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOTFMatchResultPlayerStats(); if (object.match_id != null) if ($util.Long) - (message.match_id = $util.Long.fromValue(object.match_id)).unsigned = true; + message.match_id = $util.Long.fromValue(object.match_id, true); else if (typeof object.match_id === "string") - message.match_id = parseInt(object.match_id, 10); + message.match_id = $parseInt(object.match_id, 10); else if (typeof object.match_id === "number") message.match_id = object.match_id; else if (typeof object.match_id === "object") @@ -43472,16 +56046,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOTFMatchResultPlayerStats.toObject = function toObject(message, options) { + CSOTFMatchResultPlayerStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.match_id = options.longs === String ? "0" : 0; + object.match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.account_id = 0; object.match_group = 0; object.endtime = 0; @@ -43509,62 +56087,64 @@ object.map_index = 0; object.winning_team = 0; } - if (message.match_id != null && message.hasOwnProperty("match_id")) - if (typeof message.match_id === "number") - object.match_id = options.longs === String ? String(message.match_id) : message.match_id; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.match_id = typeof message.match_id === "number" ? $BigInt(message.match_id) : $util.Long.fromBits(message.match_id.low >>> 0, message.match_id.high >>> 0, true).toBigInt(); + else if (typeof message.match_id === "number") + object.match_id = options.longs === $String ? $String(message.match_id) : message.match_id; else - object.match_id = options.longs === String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; - if (message.account_id != null && message.hasOwnProperty("account_id")) + object.match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === $Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) object.match_group = message.match_group; - if (message.endtime != null && message.hasOwnProperty("endtime")) + if (message.endtime != null && $Object.hasOwnProperty.call(message, "endtime")) object.endtime = message.endtime; - if (message.season_id != null && message.hasOwnProperty("season_id")) + if (message.season_id != null && $Object.hasOwnProperty.call(message, "season_id")) object.season_id = message.season_id; - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.original_party_id != null && message.hasOwnProperty("original_party_id")) + if (message.original_party_id != null && $Object.hasOwnProperty.call(message, "original_party_id")) object.original_party_id = message.original_party_id; - if (message.team != null && message.hasOwnProperty("team")) + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) object.team = message.team; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) object.score = message.score; - if (message.ping != null && message.hasOwnProperty("ping")) + if (message.ping != null && $Object.hasOwnProperty.call(message, "ping")) object.ping = message.ping; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.display_rating != null && message.hasOwnProperty("display_rating")) + if (message.display_rating != null && $Object.hasOwnProperty.call(message, "display_rating")) object.display_rating = message.display_rating; - if (message.display_rating_change != null && message.hasOwnProperty("display_rating_change")) + if (message.display_rating_change != null && $Object.hasOwnProperty.call(message, "display_rating_change")) object.display_rating_change = message.display_rating_change; - if (message.rank != null && message.hasOwnProperty("rank")) + if (message.rank != null && $Object.hasOwnProperty.call(message, "rank")) object.rank = message.rank; - if (message.classes_played != null && message.hasOwnProperty("classes_played")) + if (message.classes_played != null && $Object.hasOwnProperty.call(message, "classes_played")) object.classes_played = message.classes_played; - if (message.kills != null && message.hasOwnProperty("kills")) + if (message.kills != null && $Object.hasOwnProperty.call(message, "kills")) object.kills = message.kills; - if (message.deaths != null && message.hasOwnProperty("deaths")) + if (message.deaths != null && $Object.hasOwnProperty.call(message, "deaths")) object.deaths = message.deaths; - if (message.damage != null && message.hasOwnProperty("damage")) + if (message.damage != null && $Object.hasOwnProperty.call(message, "damage")) object.damage = message.damage; - if (message.healing != null && message.hasOwnProperty("healing")) + if (message.healing != null && $Object.hasOwnProperty.call(message, "healing")) object.healing = message.healing; - if (message.support != null && message.hasOwnProperty("support")) + if (message.support != null && $Object.hasOwnProperty.call(message, "support")) object.support = message.support; - if (message.score_medal != null && message.hasOwnProperty("score_medal")) + if (message.score_medal != null && $Object.hasOwnProperty.call(message, "score_medal")) object.score_medal = message.score_medal; - if (message.kills_medal != null && message.hasOwnProperty("kills_medal")) + if (message.kills_medal != null && $Object.hasOwnProperty.call(message, "kills_medal")) object.kills_medal = message.kills_medal; - if (message.damage_medal != null && message.hasOwnProperty("damage_medal")) + if (message.damage_medal != null && $Object.hasOwnProperty.call(message, "damage_medal")) object.damage_medal = message.damage_medal; - if (message.healing_medal != null && message.hasOwnProperty("healing_medal")) + if (message.healing_medal != null && $Object.hasOwnProperty.call(message, "healing_medal")) object.healing_medal = message.healing_medal; - if (message.support_medal != null && message.hasOwnProperty("support_medal")) + if (message.support_medal != null && $Object.hasOwnProperty.call(message, "support_medal")) object.support_medal = message.support_medal; - if (message.map_index != null && message.hasOwnProperty("map_index")) + if (message.map_index != null && $Object.hasOwnProperty.call(message, "map_index")) object.map_index = message.map_index; - if (message.winning_team != null && message.hasOwnProperty("winning_team")) + if (message.winning_team != null && $Object.hasOwnProperty.call(message, "winning_team")) object.winning_team = message.winning_team; return object; }; @@ -43576,8 +56156,22 @@ * @instance * @returns {Object.} JSON object */ - CSOTFMatchResultPlayerStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOTFMatchResultPlayerStats.prototype.toJSON = function() { + return CSOTFMatchResultPlayerStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOTFMatchResultPlayerStats + * @function getTypeUrl + * @memberof CSOTFMatchResultPlayerStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOTFMatchResultPlayerStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOTFMatchResultPlayerStats"; }; return CSOTFMatchResultPlayerStats; @@ -43585,36 +56179,53 @@ $root.CMsgGCRequestMatchMakerStats = (function() { + /** + * Properties of a CMsgGCRequestMatchMakerStats. + * @typedef {Object} CMsgGCRequestMatchMakerStats.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCRequestMatchMakerStats. * @exports ICMsgGCRequestMatchMakerStats * @interface ICMsgGCRequestMatchMakerStats + * @augments CMsgGCRequestMatchMakerStats.$Properties + * @deprecated Use CMsgGCRequestMatchMakerStats.$Properties instead. + */ + + /** + * Shape of a CMsgGCRequestMatchMakerStats. + * @typedef {CMsgGCRequestMatchMakerStats.$Properties} CMsgGCRequestMatchMakerStats.$Shape */ /** * Constructs a new CMsgGCRequestMatchMakerStats. * @exports CMsgGCRequestMatchMakerStats * @classdesc Represents a CMsgGCRequestMatchMakerStats. - * @implements ICMsgGCRequestMatchMakerStats * @constructor - * @param {ICMsgGCRequestMatchMakerStats=} [properties] Properties to set + * @param {CMsgGCRequestMatchMakerStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRequestMatchMakerStats(properties) { + var CMsgGCRequestMatchMakerStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgGCRequestMatchMakerStats instance using the specified properties. * @function create * @memberof CMsgGCRequestMatchMakerStats * @static - * @param {ICMsgGCRequestMatchMakerStats=} [properties] Properties to set + * @param {CMsgGCRequestMatchMakerStats.$Properties=} [properties] Properties to set * @returns {CMsgGCRequestMatchMakerStats} CMsgGCRequestMatchMakerStats instance + * @type {{ + * (properties: CMsgGCRequestMatchMakerStats.$Shape): CMsgGCRequestMatchMakerStats & CMsgGCRequestMatchMakerStats.$Shape; + * (properties?: CMsgGCRequestMatchMakerStats.$Properties): CMsgGCRequestMatchMakerStats; + * }} */ - CMsgGCRequestMatchMakerStats.create = function create(properties) { + CMsgGCRequestMatchMakerStats.create = function(properties) { return new CMsgGCRequestMatchMakerStats(properties); }; @@ -43623,13 +56234,20 @@ * @function encode * @memberof CMsgGCRequestMatchMakerStats * @static - * @param {ICMsgGCRequestMatchMakerStats} message CMsgGCRequestMatchMakerStats message or plain object to encode + * @param {CMsgGCRequestMatchMakerStats.$Properties} message CMsgGCRequestMatchMakerStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestMatchMakerStats.encode = function encode(message, writer) { + CMsgGCRequestMatchMakerStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -43638,12 +56256,12 @@ * @function encodeDelimited * @memberof CMsgGCRequestMatchMakerStats * @static - * @param {ICMsgGCRequestMatchMakerStats} message CMsgGCRequestMatchMakerStats message or plain object to encode + * @param {CMsgGCRequestMatchMakerStats.$Properties} message CMsgGCRequestMatchMakerStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRequestMatchMakerStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRequestMatchMakerStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -43653,22 +56271,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRequestMatchMakerStats} CMsgGCRequestMatchMakerStats + * @returns {CMsgGCRequestMatchMakerStats & CMsgGCRequestMatchMakerStats.$Shape} CMsgGCRequestMatchMakerStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestMatchMakerStats.decode = function decode(reader, length) { + CMsgGCRequestMatchMakerStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRequestMatchMakerStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRequestMatchMakerStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -43678,11 +56307,11 @@ * @memberof CMsgGCRequestMatchMakerStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRequestMatchMakerStats} CMsgGCRequestMatchMakerStats + * @returns {CMsgGCRequestMatchMakerStats & CMsgGCRequestMatchMakerStats.$Shape} CMsgGCRequestMatchMakerStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRequestMatchMakerStats.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRequestMatchMakerStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -43696,9 +56325,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRequestMatchMakerStats.verify = function verify(message) { + CMsgGCRequestMatchMakerStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -43710,9 +56343,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCRequestMatchMakerStats} CMsgGCRequestMatchMakerStats */ - CMsgGCRequestMatchMakerStats.fromObject = function fromObject(object) { + CMsgGCRequestMatchMakerStats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRequestMatchMakerStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRequestMatchMakerStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgGCRequestMatchMakerStats(); }; @@ -43725,7 +56364,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRequestMatchMakerStats.toObject = function toObject() { + CMsgGCRequestMatchMakerStats.toObject = function () { return {}; }; @@ -43736,8 +56375,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRequestMatchMakerStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRequestMatchMakerStats.prototype.toJSON = function() { + return CMsgGCRequestMatchMakerStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRequestMatchMakerStats + * @function getTypeUrl + * @memberof CMsgGCRequestMatchMakerStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRequestMatchMakerStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRequestMatchMakerStats"; }; return CMsgGCRequestMatchMakerStats; @@ -43747,26 +56400,39 @@ /** * Properties of a CMsgGCDataCenterPopulation. - * @exports ICMsgGCDataCenterPopulation - * @interface ICMsgGCDataCenterPopulation + * @typedef {Object} CMsgGCDataCenterPopulation.$Properties * @property {string|null} [name] CMsgGCDataCenterPopulation name * @property {number|null} [health_ratio] CMsgGCDataCenterPopulation health_ratio + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCDataCenterPopulation. + * @exports ICMsgGCDataCenterPopulation + * @interface ICMsgGCDataCenterPopulation + * @augments CMsgGCDataCenterPopulation.$Properties + * @deprecated Use CMsgGCDataCenterPopulation.$Properties instead. + */ + + /** + * Shape of a CMsgGCDataCenterPopulation. + * @typedef {CMsgGCDataCenterPopulation.$Properties} CMsgGCDataCenterPopulation.$Shape */ /** * Constructs a new CMsgGCDataCenterPopulation. * @exports CMsgGCDataCenterPopulation * @classdesc Represents a CMsgGCDataCenterPopulation. - * @implements ICMsgGCDataCenterPopulation * @constructor - * @param {ICMsgGCDataCenterPopulation=} [properties] Properties to set + * @param {CMsgGCDataCenterPopulation.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCDataCenterPopulation(properties) { + var CMsgGCDataCenterPopulation = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCDataCenterPopulation name. @@ -43789,10 +56455,14 @@ * @function create * @memberof CMsgGCDataCenterPopulation * @static - * @param {ICMsgGCDataCenterPopulation=} [properties] Properties to set + * @param {CMsgGCDataCenterPopulation.$Properties=} [properties] Properties to set * @returns {CMsgGCDataCenterPopulation} CMsgGCDataCenterPopulation instance + * @type {{ + * (properties: CMsgGCDataCenterPopulation.$Shape): CMsgGCDataCenterPopulation & CMsgGCDataCenterPopulation.$Shape; + * (properties?: CMsgGCDataCenterPopulation.$Properties): CMsgGCDataCenterPopulation; + * }} */ - CMsgGCDataCenterPopulation.create = function create(properties) { + CMsgGCDataCenterPopulation.create = function(properties) { return new CMsgGCDataCenterPopulation(properties); }; @@ -43801,17 +56471,24 @@ * @function encode * @memberof CMsgGCDataCenterPopulation * @static - * @param {ICMsgGCDataCenterPopulation} message CMsgGCDataCenterPopulation message or plain object to encode + * @param {CMsgGCDataCenterPopulation.$Properties} message CMsgGCDataCenterPopulation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCDataCenterPopulation.encode = function encode(message, writer) { + CMsgGCDataCenterPopulation.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.health_ratio != null && Object.hasOwnProperty.call(message, "health_ratio")) + if (message.health_ratio != null && $Object.hasOwnProperty.call(message, "health_ratio")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.health_ratio); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -43820,12 +56497,12 @@ * @function encodeDelimited * @memberof CMsgGCDataCenterPopulation * @static - * @param {ICMsgGCDataCenterPopulation} message CMsgGCDataCenterPopulation message or plain object to encode + * @param {CMsgGCDataCenterPopulation.$Properties} message CMsgGCDataCenterPopulation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCDataCenterPopulation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCDataCenterPopulation.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -43835,28 +56512,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCDataCenterPopulation} CMsgGCDataCenterPopulation + * @returns {CMsgGCDataCenterPopulation & CMsgGCDataCenterPopulation.$Shape} CMsgGCDataCenterPopulation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCDataCenterPopulation.decode = function decode(reader, length) { + CMsgGCDataCenterPopulation.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCDataCenterPopulation(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCDataCenterPopulation(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.health_ratio = reader.float(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.health_ratio = reader.float(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -43866,11 +56563,11 @@ * @memberof CMsgGCDataCenterPopulation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCDataCenterPopulation} CMsgGCDataCenterPopulation + * @returns {CMsgGCDataCenterPopulation & CMsgGCDataCenterPopulation.$Shape} CMsgGCDataCenterPopulation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCDataCenterPopulation.decodeDelimited = function decodeDelimited(reader) { + CMsgGCDataCenterPopulation.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -43884,13 +56581,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCDataCenterPopulation.verify = function verify(message) { + CMsgGCDataCenterPopulation.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.health_ratio != null && message.hasOwnProperty("health_ratio")) + if (message.health_ratio != null && $Object.hasOwnProperty.call(message, "health_ratio")) if (typeof message.health_ratio !== "number") return "health_ratio: number expected"; return null; @@ -43904,14 +56605,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCDataCenterPopulation} CMsgGCDataCenterPopulation */ - CMsgGCDataCenterPopulation.fromObject = function fromObject(object) { + CMsgGCDataCenterPopulation.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCDataCenterPopulation) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCDataCenterPopulation: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCDataCenterPopulation(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.health_ratio != null) - message.health_ratio = Number(object.health_ratio); + message.health_ratio = $Number(object.health_ratio); return message; }; @@ -43924,18 +56631,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCDataCenterPopulation.toObject = function toObject(message, options) { + CMsgGCDataCenterPopulation.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.health_ratio = 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.health_ratio != null && message.hasOwnProperty("health_ratio")) - object.health_ratio = options.json && !isFinite(message.health_ratio) ? String(message.health_ratio) : message.health_ratio; + if (message.health_ratio != null && $Object.hasOwnProperty.call(message, "health_ratio")) + object.health_ratio = options.json && !$isFinite(message.health_ratio) ? $String(message.health_ratio) : message.health_ratio; return object; }; @@ -43946,8 +56657,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCDataCenterPopulation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCDataCenterPopulation.prototype.toJSON = function() { + return CMsgGCDataCenterPopulation.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCDataCenterPopulation + * @function getTypeUrl + * @memberof CMsgGCDataCenterPopulation + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCDataCenterPopulation.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCDataCenterPopulation"; }; return CMsgGCDataCenterPopulation; @@ -43955,32 +56680,45 @@ $root.CMsgGCMatchGroupDataCenterPopulation = (function() { + /** + * Properties of a CMsgGCMatchGroupDataCenterPopulation. + * @typedef {Object} CMsgGCMatchGroupDataCenterPopulation.$Properties + * @property {Array.|null} [data_center_population] CMsgGCMatchGroupDataCenterPopulation data_center_population + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMatchGroupDataCenterPopulation. * @exports ICMsgGCMatchGroupDataCenterPopulation * @interface ICMsgGCMatchGroupDataCenterPopulation - * @property {Array.|null} [data_center_population] CMsgGCMatchGroupDataCenterPopulation data_center_population + * @augments CMsgGCMatchGroupDataCenterPopulation.$Properties + * @deprecated Use CMsgGCMatchGroupDataCenterPopulation.$Properties instead. + */ + + /** + * Shape of a CMsgGCMatchGroupDataCenterPopulation. + * @typedef {CMsgGCMatchGroupDataCenterPopulation.$Properties} CMsgGCMatchGroupDataCenterPopulation.$Shape */ /** * Constructs a new CMsgGCMatchGroupDataCenterPopulation. * @exports CMsgGCMatchGroupDataCenterPopulation * @classdesc Represents a CMsgGCMatchGroupDataCenterPopulation. - * @implements ICMsgGCMatchGroupDataCenterPopulation * @constructor - * @param {ICMsgGCMatchGroupDataCenterPopulation=} [properties] Properties to set + * @param {CMsgGCMatchGroupDataCenterPopulation.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMatchGroupDataCenterPopulation(properties) { + var CMsgGCMatchGroupDataCenterPopulation = function (properties) { this.data_center_population = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMatchGroupDataCenterPopulation data_center_population. - * @member {Array.} data_center_population + * @member {Array.} data_center_population * @memberof CMsgGCMatchGroupDataCenterPopulation * @instance */ @@ -43991,10 +56729,14 @@ * @function create * @memberof CMsgGCMatchGroupDataCenterPopulation * @static - * @param {ICMsgGCMatchGroupDataCenterPopulation=} [properties] Properties to set + * @param {CMsgGCMatchGroupDataCenterPopulation.$Properties=} [properties] Properties to set * @returns {CMsgGCMatchGroupDataCenterPopulation} CMsgGCMatchGroupDataCenterPopulation instance + * @type {{ + * (properties: CMsgGCMatchGroupDataCenterPopulation.$Shape): CMsgGCMatchGroupDataCenterPopulation & CMsgGCMatchGroupDataCenterPopulation.$Shape; + * (properties?: CMsgGCMatchGroupDataCenterPopulation.$Properties): CMsgGCMatchGroupDataCenterPopulation; + * }} */ - CMsgGCMatchGroupDataCenterPopulation.create = function create(properties) { + CMsgGCMatchGroupDataCenterPopulation.create = function(properties) { return new CMsgGCMatchGroupDataCenterPopulation(properties); }; @@ -44003,16 +56745,23 @@ * @function encode * @memberof CMsgGCMatchGroupDataCenterPopulation * @static - * @param {ICMsgGCMatchGroupDataCenterPopulation} message CMsgGCMatchGroupDataCenterPopulation message or plain object to encode + * @param {CMsgGCMatchGroupDataCenterPopulation.$Properties} message CMsgGCMatchGroupDataCenterPopulation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMatchGroupDataCenterPopulation.encode = function encode(message, writer) { + CMsgGCMatchGroupDataCenterPopulation.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.data_center_population != null && message.data_center_population.length) for (var i = 0; i < message.data_center_population.length; ++i) - $root.CMsgGCDataCenterPopulation.encode(message.data_center_population[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCDataCenterPopulation.encode(message.data_center_population[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -44021,12 +56770,12 @@ * @function encodeDelimited * @memberof CMsgGCMatchGroupDataCenterPopulation * @static - * @param {ICMsgGCMatchGroupDataCenterPopulation} message CMsgGCMatchGroupDataCenterPopulation message or plain object to encode + * @param {CMsgGCMatchGroupDataCenterPopulation.$Properties} message CMsgGCMatchGroupDataCenterPopulation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMatchGroupDataCenterPopulation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMatchGroupDataCenterPopulation.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -44036,27 +56785,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMatchGroupDataCenterPopulation} CMsgGCMatchGroupDataCenterPopulation + * @returns {CMsgGCMatchGroupDataCenterPopulation & CMsgGCMatchGroupDataCenterPopulation.$Shape} CMsgGCMatchGroupDataCenterPopulation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMatchGroupDataCenterPopulation.decode = function decode(reader, length) { + CMsgGCMatchGroupDataCenterPopulation.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMatchGroupDataCenterPopulation(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMatchGroupDataCenterPopulation(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.data_center_population && message.data_center_population.length)) - message.data_center_population = []; - message.data_center_population.push($root.CMsgGCDataCenterPopulation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.data_center_population && message.data_center_population.length)) + message.data_center_population = []; + message.data_center_population.push($root.CMsgGCDataCenterPopulation.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -44066,11 +56832,11 @@ * @memberof CMsgGCMatchGroupDataCenterPopulation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMatchGroupDataCenterPopulation} CMsgGCMatchGroupDataCenterPopulation + * @returns {CMsgGCMatchGroupDataCenterPopulation & CMsgGCMatchGroupDataCenterPopulation.$Shape} CMsgGCMatchGroupDataCenterPopulation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMatchGroupDataCenterPopulation.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMatchGroupDataCenterPopulation.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -44084,14 +56850,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMatchGroupDataCenterPopulation.verify = function verify(message) { + CMsgGCMatchGroupDataCenterPopulation.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.data_center_population != null && message.hasOwnProperty("data_center_population")) { - if (!Array.isArray(message.data_center_population)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.data_center_population != null && $Object.hasOwnProperty.call(message, "data_center_population")) { + if (!$Array.isArray(message.data_center_population)) return "data_center_population: array expected"; for (var i = 0; i < message.data_center_population.length; ++i) { - var error = $root.CMsgGCDataCenterPopulation.verify(message.data_center_population[i]); + var error = $root.CMsgGCDataCenterPopulation.verify(message.data_center_population[i], _depth + 1); if (error) return "data_center_population." + error; } @@ -44107,18 +56877,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMatchGroupDataCenterPopulation} CMsgGCMatchGroupDataCenterPopulation */ - CMsgGCMatchGroupDataCenterPopulation.fromObject = function fromObject(object) { + CMsgGCMatchGroupDataCenterPopulation.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMatchGroupDataCenterPopulation) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMatchGroupDataCenterPopulation: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMatchGroupDataCenterPopulation(); if (object.data_center_population) { - if (!Array.isArray(object.data_center_population)) - throw TypeError(".CMsgGCMatchGroupDataCenterPopulation.data_center_population: array expected"); - message.data_center_population = []; + if (!$Array.isArray(object.data_center_population)) + throw $TypeError(".CMsgGCMatchGroupDataCenterPopulation.data_center_population: array expected"); + message.data_center_population = $Array(object.data_center_population.length); for (var i = 0; i < object.data_center_population.length; ++i) { - if (typeof object.data_center_population[i] !== "object") - throw TypeError(".CMsgGCMatchGroupDataCenterPopulation.data_center_population: object expected"); - message.data_center_population[i] = $root.CMsgGCDataCenterPopulation.fromObject(object.data_center_population[i]); + if (!$util.isObject(object.data_center_population[i])) + throw $TypeError(".CMsgGCMatchGroupDataCenterPopulation.data_center_population: object expected"); + message.data_center_population[i] = $root.CMsgGCDataCenterPopulation.fromObject(object.data_center_population[i], _depth + 1); } } return message; @@ -44133,16 +56909,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMatchGroupDataCenterPopulation.toObject = function toObject(message, options) { + CMsgGCMatchGroupDataCenterPopulation.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.data_center_population = []; if (message.data_center_population && message.data_center_population.length) { - object.data_center_population = []; + object.data_center_population = $Array(message.data_center_population.length); for (var j = 0; j < message.data_center_population.length; ++j) - object.data_center_population[j] = $root.CMsgGCDataCenterPopulation.toObject(message.data_center_population[j], options); + object.data_center_population[j] = $root.CMsgGCDataCenterPopulation.toObject(message.data_center_population[j], options, _depth + 1); } return object; }; @@ -44154,8 +56934,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMatchGroupDataCenterPopulation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMatchGroupDataCenterPopulation.prototype.toJSON = function() { + return CMsgGCMatchGroupDataCenterPopulation.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMatchGroupDataCenterPopulation + * @function getTypeUrl + * @memberof CMsgGCMatchGroupDataCenterPopulation + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMatchGroupDataCenterPopulation.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMatchGroupDataCenterPopulation"; }; return CMsgGCMatchGroupDataCenterPopulation; @@ -44163,30 +56957,43 @@ $root.CMsgGCMatchMakerStatsResponse = (function() { + /** + * Properties of a CMsgGCMatchMakerStatsResponse. + * @typedef {Object} CMsgGCMatchMakerStatsResponse.$Properties + * @property {Array.|null} [map_count] CMsgGCMatchMakerStatsResponse map_count + * @property {Array.|null} [matchgroup_data_center_population] CMsgGCMatchMakerStatsResponse matchgroup_data_center_population + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMatchMakerStatsResponse. * @exports ICMsgGCMatchMakerStatsResponse * @interface ICMsgGCMatchMakerStatsResponse - * @property {Array.|null} [map_count] CMsgGCMatchMakerStatsResponse map_count - * @property {Array.|null} [matchgroup_data_center_population] CMsgGCMatchMakerStatsResponse matchgroup_data_center_population + * @augments CMsgGCMatchMakerStatsResponse.$Properties + * @deprecated Use CMsgGCMatchMakerStatsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCMatchMakerStatsResponse. + * @typedef {CMsgGCMatchMakerStatsResponse.$Properties} CMsgGCMatchMakerStatsResponse.$Shape */ /** * Constructs a new CMsgGCMatchMakerStatsResponse. * @exports CMsgGCMatchMakerStatsResponse * @classdesc Represents a CMsgGCMatchMakerStatsResponse. - * @implements ICMsgGCMatchMakerStatsResponse * @constructor - * @param {ICMsgGCMatchMakerStatsResponse=} [properties] Properties to set + * @param {CMsgGCMatchMakerStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMatchMakerStatsResponse(properties) { + var CMsgGCMatchMakerStatsResponse = function (properties) { this.map_count = []; this.matchgroup_data_center_population = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMatchMakerStatsResponse map_count. @@ -44198,7 +57005,7 @@ /** * CMsgGCMatchMakerStatsResponse matchgroup_data_center_population. - * @member {Array.} matchgroup_data_center_population + * @member {Array.} matchgroup_data_center_population * @memberof CMsgGCMatchMakerStatsResponse * @instance */ @@ -44209,10 +57016,14 @@ * @function create * @memberof CMsgGCMatchMakerStatsResponse * @static - * @param {ICMsgGCMatchMakerStatsResponse=} [properties] Properties to set + * @param {CMsgGCMatchMakerStatsResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCMatchMakerStatsResponse} CMsgGCMatchMakerStatsResponse instance + * @type {{ + * (properties: CMsgGCMatchMakerStatsResponse.$Shape): CMsgGCMatchMakerStatsResponse & CMsgGCMatchMakerStatsResponse.$Shape; + * (properties?: CMsgGCMatchMakerStatsResponse.$Properties): CMsgGCMatchMakerStatsResponse; + * }} */ - CMsgGCMatchMakerStatsResponse.create = function create(properties) { + CMsgGCMatchMakerStatsResponse.create = function(properties) { return new CMsgGCMatchMakerStatsResponse(properties); }; @@ -44221,19 +57032,26 @@ * @function encode * @memberof CMsgGCMatchMakerStatsResponse * @static - * @param {ICMsgGCMatchMakerStatsResponse} message CMsgGCMatchMakerStatsResponse message or plain object to encode + * @param {CMsgGCMatchMakerStatsResponse.$Properties} message CMsgGCMatchMakerStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMatchMakerStatsResponse.encode = function encode(message, writer) { + CMsgGCMatchMakerStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.map_count != null && message.map_count.length) for (var i = 0; i < message.map_count.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.map_count[i]); if (message.matchgroup_data_center_population != null && message.matchgroup_data_center_population.length) for (var i = 0; i < message.matchgroup_data_center_population.length; ++i) - $root.CMsgGCMatchGroupDataCenterPopulation.encode(message.matchgroup_data_center_population[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgGCMatchGroupDataCenterPopulation.encode(message.matchgroup_data_center_population[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -44242,12 +57060,12 @@ * @function encodeDelimited * @memberof CMsgGCMatchMakerStatsResponse * @static - * @param {ICMsgGCMatchMakerStatsResponse} message CMsgGCMatchMakerStatsResponse message or plain object to encode + * @param {CMsgGCMatchMakerStatsResponse.$Properties} message CMsgGCMatchMakerStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMatchMakerStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMatchMakerStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -44257,37 +57075,58 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMatchMakerStatsResponse} CMsgGCMatchMakerStatsResponse + * @returns {CMsgGCMatchMakerStatsResponse & CMsgGCMatchMakerStatsResponse.$Shape} CMsgGCMatchMakerStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMatchMakerStatsResponse.decode = function decode(reader, length) { + CMsgGCMatchMakerStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMatchMakerStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMatchMakerStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.map_count && message.map_count.length)) - message.map_count = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.map_count.push(reader.uint32()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.map_count && message.map_count.length)) + message.map_count = []; + reader.uint32s(message.map_count); + continue; + } + if (wireType !== 0) + break; + if (!(message.map_count && message.map_count.length)) + message.map_count = []; message.map_count.push(reader.uint32()); - break; - case 2: - if (!(message.matchgroup_data_center_population && message.matchgroup_data_center_population.length)) - message.matchgroup_data_center_population = []; - message.matchgroup_data_center_population.push($root.CMsgGCMatchGroupDataCenterPopulation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.matchgroup_data_center_population && message.matchgroup_data_center_population.length)) + message.matchgroup_data_center_population = []; + message.matchgroup_data_center_population.push($root.CMsgGCMatchGroupDataCenterPopulation.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -44297,11 +57136,11 @@ * @memberof CMsgGCMatchMakerStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMatchMakerStatsResponse} CMsgGCMatchMakerStatsResponse + * @returns {CMsgGCMatchMakerStatsResponse & CMsgGCMatchMakerStatsResponse.$Shape} CMsgGCMatchMakerStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMatchMakerStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMatchMakerStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -44315,21 +57154,25 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMatchMakerStatsResponse.verify = function verify(message) { + CMsgGCMatchMakerStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.map_count != null && message.hasOwnProperty("map_count")) { - if (!Array.isArray(message.map_count)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.map_count != null && $Object.hasOwnProperty.call(message, "map_count")) { + if (!$Array.isArray(message.map_count)) return "map_count: array expected"; for (var i = 0; i < message.map_count.length; ++i) if (!$util.isInteger(message.map_count[i])) return "map_count: integer[] expected"; } - if (message.matchgroup_data_center_population != null && message.hasOwnProperty("matchgroup_data_center_population")) { - if (!Array.isArray(message.matchgroup_data_center_population)) + if (message.matchgroup_data_center_population != null && $Object.hasOwnProperty.call(message, "matchgroup_data_center_population")) { + if (!$Array.isArray(message.matchgroup_data_center_population)) return "matchgroup_data_center_population: array expected"; for (var i = 0; i < message.matchgroup_data_center_population.length; ++i) { - var error = $root.CMsgGCMatchGroupDataCenterPopulation.verify(message.matchgroup_data_center_population[i]); + var error = $root.CMsgGCMatchGroupDataCenterPopulation.verify(message.matchgroup_data_center_population[i], _depth + 1); if (error) return "matchgroup_data_center_population." + error; } @@ -44345,25 +57188,31 @@ * @param {Object.} object Plain object * @returns {CMsgGCMatchMakerStatsResponse} CMsgGCMatchMakerStatsResponse */ - CMsgGCMatchMakerStatsResponse.fromObject = function fromObject(object) { + CMsgGCMatchMakerStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMatchMakerStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMatchMakerStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMatchMakerStatsResponse(); if (object.map_count) { - if (!Array.isArray(object.map_count)) - throw TypeError(".CMsgGCMatchMakerStatsResponse.map_count: array expected"); - message.map_count = []; + if (!$Array.isArray(object.map_count)) + throw $TypeError(".CMsgGCMatchMakerStatsResponse.map_count: array expected"); + message.map_count = $Array(object.map_count.length); for (var i = 0; i < object.map_count.length; ++i) message.map_count[i] = object.map_count[i] >>> 0; } if (object.matchgroup_data_center_population) { - if (!Array.isArray(object.matchgroup_data_center_population)) - throw TypeError(".CMsgGCMatchMakerStatsResponse.matchgroup_data_center_population: array expected"); - message.matchgroup_data_center_population = []; + if (!$Array.isArray(object.matchgroup_data_center_population)) + throw $TypeError(".CMsgGCMatchMakerStatsResponse.matchgroup_data_center_population: array expected"); + message.matchgroup_data_center_population = $Array(object.matchgroup_data_center_population.length); for (var i = 0; i < object.matchgroup_data_center_population.length; ++i) { - if (typeof object.matchgroup_data_center_population[i] !== "object") - throw TypeError(".CMsgGCMatchMakerStatsResponse.matchgroup_data_center_population: object expected"); - message.matchgroup_data_center_population[i] = $root.CMsgGCMatchGroupDataCenterPopulation.fromObject(object.matchgroup_data_center_population[i]); + if (!$util.isObject(object.matchgroup_data_center_population[i])) + throw $TypeError(".CMsgGCMatchMakerStatsResponse.matchgroup_data_center_population: object expected"); + message.matchgroup_data_center_population[i] = $root.CMsgGCMatchGroupDataCenterPopulation.fromObject(object.matchgroup_data_center_population[i], _depth + 1); } } return message; @@ -44378,23 +57227,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMatchMakerStatsResponse.toObject = function toObject(message, options) { + CMsgGCMatchMakerStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.map_count = []; object.matchgroup_data_center_population = []; } if (message.map_count && message.map_count.length) { - object.map_count = []; + object.map_count = $Array(message.map_count.length); for (var j = 0; j < message.map_count.length; ++j) object.map_count[j] = message.map_count[j]; } if (message.matchgroup_data_center_population && message.matchgroup_data_center_population.length) { - object.matchgroup_data_center_population = []; + object.matchgroup_data_center_population = $Array(message.matchgroup_data_center_population.length); for (var j = 0; j < message.matchgroup_data_center_population.length; ++j) - object.matchgroup_data_center_population[j] = $root.CMsgGCMatchGroupDataCenterPopulation.toObject(message.matchgroup_data_center_population[j], options); + object.matchgroup_data_center_population[j] = $root.CMsgGCMatchGroupDataCenterPopulation.toObject(message.matchgroup_data_center_population[j], options, _depth + 1); } return object; }; @@ -44406,8 +57259,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMatchMakerStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMatchMakerStatsResponse.prototype.toJSON = function() { + return CMsgGCMatchMakerStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMatchMakerStatsResponse + * @function getTypeUrl + * @memberof CMsgGCMatchMakerStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMatchMakerStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMatchMakerStatsResponse"; }; return CMsgGCMatchMakerStatsResponse; @@ -44415,27 +57282,40 @@ $root.CMsgGCMatchHistoryLoad = (function() { + /** + * Properties of a CMsgGCMatchHistoryLoad. + * @typedef {Object} CMsgGCMatchHistoryLoad.$Properties + * @property {ETFMatchGroup|null} [match_group] CMsgGCMatchHistoryLoad match_group + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMatchHistoryLoad. * @exports ICMsgGCMatchHistoryLoad * @interface ICMsgGCMatchHistoryLoad - * @property {ETFMatchGroup|null} [match_group] CMsgGCMatchHistoryLoad match_group + * @augments CMsgGCMatchHistoryLoad.$Properties + * @deprecated Use CMsgGCMatchHistoryLoad.$Properties instead. + */ + + /** + * Shape of a CMsgGCMatchHistoryLoad. + * @typedef {CMsgGCMatchHistoryLoad.$Properties} CMsgGCMatchHistoryLoad.$Shape */ /** * Constructs a new CMsgGCMatchHistoryLoad. * @exports CMsgGCMatchHistoryLoad * @classdesc Represents a CMsgGCMatchHistoryLoad. - * @implements ICMsgGCMatchHistoryLoad * @constructor - * @param {ICMsgGCMatchHistoryLoad=} [properties] Properties to set + * @param {CMsgGCMatchHistoryLoad.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMatchHistoryLoad(properties) { + var CMsgGCMatchHistoryLoad = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMatchHistoryLoad match_group. @@ -44450,10 +57330,14 @@ * @function create * @memberof CMsgGCMatchHistoryLoad * @static - * @param {ICMsgGCMatchHistoryLoad=} [properties] Properties to set + * @param {CMsgGCMatchHistoryLoad.$Properties=} [properties] Properties to set * @returns {CMsgGCMatchHistoryLoad} CMsgGCMatchHistoryLoad instance + * @type {{ + * (properties: CMsgGCMatchHistoryLoad.$Shape): CMsgGCMatchHistoryLoad & CMsgGCMatchHistoryLoad.$Shape; + * (properties?: CMsgGCMatchHistoryLoad.$Properties): CMsgGCMatchHistoryLoad; + * }} */ - CMsgGCMatchHistoryLoad.create = function create(properties) { + CMsgGCMatchHistoryLoad.create = function(properties) { return new CMsgGCMatchHistoryLoad(properties); }; @@ -44462,15 +57346,22 @@ * @function encode * @memberof CMsgGCMatchHistoryLoad * @static - * @param {ICMsgGCMatchHistoryLoad} message CMsgGCMatchHistoryLoad message or plain object to encode + * @param {CMsgGCMatchHistoryLoad.$Properties} message CMsgGCMatchHistoryLoad message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMatchHistoryLoad.encode = function encode(message, writer) { + CMsgGCMatchHistoryLoad.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.match_group != null && Object.hasOwnProperty.call(message, "match_group")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.match_group); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -44479,12 +57370,12 @@ * @function encodeDelimited * @memberof CMsgGCMatchHistoryLoad * @static - * @param {ICMsgGCMatchHistoryLoad} message CMsgGCMatchHistoryLoad message or plain object to encode + * @param {CMsgGCMatchHistoryLoad.$Properties} message CMsgGCMatchHistoryLoad message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMatchHistoryLoad.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMatchHistoryLoad.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -44494,25 +57385,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMatchHistoryLoad} CMsgGCMatchHistoryLoad + * @returns {CMsgGCMatchHistoryLoad & CMsgGCMatchHistoryLoad.$Shape} CMsgGCMatchHistoryLoad * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMatchHistoryLoad.decode = function decode(reader, length) { + CMsgGCMatchHistoryLoad.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMatchHistoryLoad(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMatchHistoryLoad(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.match_group = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ETFMatchGroup[value] !== $undefined) + message.match_group = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -44522,11 +57436,11 @@ * @memberof CMsgGCMatchHistoryLoad * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMatchHistoryLoad} CMsgGCMatchHistoryLoad + * @returns {CMsgGCMatchHistoryLoad & CMsgGCMatchHistoryLoad.$Shape} CMsgGCMatchHistoryLoad * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMatchHistoryLoad.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMatchHistoryLoad.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -44540,10 +57454,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMatchHistoryLoad.verify = function verify(message) { + CMsgGCMatchHistoryLoad.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.match_group != null && message.hasOwnProperty("match_group")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) switch (message.match_group) { default: return "match_group: enum value expected"; @@ -44583,9 +57501,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMatchHistoryLoad} CMsgGCMatchHistoryLoad */ - CMsgGCMatchHistoryLoad.fromObject = function fromObject(object) { + CMsgGCMatchHistoryLoad.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMatchHistoryLoad) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMatchHistoryLoad: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMatchHistoryLoad(); switch (object.match_group) { case "k_eTFMatchGroup_Invalid": @@ -44680,6 +57604,7 @@ case 8: message.match_group = 8; break; + default: } return message; }; @@ -44693,14 +57618,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMatchHistoryLoad.toObject = function toObject(message, options) { + CMsgGCMatchHistoryLoad.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) - object.match_group = options.enums === String ? "k_eTFMatchGroup_Invalid" : -1; - if (message.match_group != null && message.hasOwnProperty("match_group")) - object.match_group = options.enums === String ? $root.ETFMatchGroup[message.match_group] : message.match_group; + object.match_group = options.enums === $String ? "k_eTFMatchGroup_Invalid" : -1; + if (message.match_group != null && $Object.hasOwnProperty.call(message, "match_group")) + object.match_group = options.enums === $String ? $root.ETFMatchGroup[message.match_group] === $undefined ? message.match_group : $root.ETFMatchGroup[message.match_group] : message.match_group; return object; }; @@ -44711,8 +57640,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMatchHistoryLoad.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMatchHistoryLoad.prototype.toJSON = function() { + return CMsgGCMatchHistoryLoad.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMatchHistoryLoad + * @function getTypeUrl + * @memberof CMsgGCMatchHistoryLoad + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMatchHistoryLoad.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMatchHistoryLoad"; }; return CMsgGCMatchHistoryLoad; @@ -44720,32 +57663,45 @@ $root.CMsgGCDataCenterPing_Update = (function() { + /** + * Properties of a CMsgGCDataCenterPing_Update. + * @typedef {Object} CMsgGCDataCenterPing_Update.$Properties + * @property {Array.|null} [pingdata] CMsgGCDataCenterPing_Update pingdata + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCDataCenterPing_Update. * @exports ICMsgGCDataCenterPing_Update * @interface ICMsgGCDataCenterPing_Update - * @property {Array.|null} [pingdata] CMsgGCDataCenterPing_Update pingdata + * @augments CMsgGCDataCenterPing_Update.$Properties + * @deprecated Use CMsgGCDataCenterPing_Update.$Properties instead. + */ + + /** + * Shape of a CMsgGCDataCenterPing_Update. + * @typedef {CMsgGCDataCenterPing_Update.$Properties} CMsgGCDataCenterPing_Update.$Shape */ /** * Constructs a new CMsgGCDataCenterPing_Update. * @exports CMsgGCDataCenterPing_Update * @classdesc Represents a CMsgGCDataCenterPing_Update. - * @implements ICMsgGCDataCenterPing_Update * @constructor - * @param {ICMsgGCDataCenterPing_Update=} [properties] Properties to set + * @param {CMsgGCDataCenterPing_Update.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCDataCenterPing_Update(properties) { + var CMsgGCDataCenterPing_Update = function (properties) { this.pingdata = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCDataCenterPing_Update pingdata. - * @member {Array.} pingdata + * @member {Array.} pingdata * @memberof CMsgGCDataCenterPing_Update * @instance */ @@ -44756,10 +57712,14 @@ * @function create * @memberof CMsgGCDataCenterPing_Update * @static - * @param {ICMsgGCDataCenterPing_Update=} [properties] Properties to set + * @param {CMsgGCDataCenterPing_Update.$Properties=} [properties] Properties to set * @returns {CMsgGCDataCenterPing_Update} CMsgGCDataCenterPing_Update instance + * @type {{ + * (properties: CMsgGCDataCenterPing_Update.$Shape): CMsgGCDataCenterPing_Update & CMsgGCDataCenterPing_Update.$Shape; + * (properties?: CMsgGCDataCenterPing_Update.$Properties): CMsgGCDataCenterPing_Update; + * }} */ - CMsgGCDataCenterPing_Update.create = function create(properties) { + CMsgGCDataCenterPing_Update.create = function(properties) { return new CMsgGCDataCenterPing_Update(properties); }; @@ -44768,16 +57728,23 @@ * @function encode * @memberof CMsgGCDataCenterPing_Update * @static - * @param {ICMsgGCDataCenterPing_Update} message CMsgGCDataCenterPing_Update message or plain object to encode + * @param {CMsgGCDataCenterPing_Update.$Properties} message CMsgGCDataCenterPing_Update message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCDataCenterPing_Update.encode = function encode(message, writer) { + CMsgGCDataCenterPing_Update.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.pingdata != null && message.pingdata.length) for (var i = 0; i < message.pingdata.length; ++i) - $root.CMsgGCDataCenterPing_Update.PingEntry.encode(message.pingdata[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCDataCenterPing_Update.PingEntry.encode(message.pingdata[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -44786,12 +57753,12 @@ * @function encodeDelimited * @memberof CMsgGCDataCenterPing_Update * @static - * @param {ICMsgGCDataCenterPing_Update} message CMsgGCDataCenterPing_Update message or plain object to encode + * @param {CMsgGCDataCenterPing_Update.$Properties} message CMsgGCDataCenterPing_Update message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCDataCenterPing_Update.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCDataCenterPing_Update.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -44801,27 +57768,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCDataCenterPing_Update} CMsgGCDataCenterPing_Update + * @returns {CMsgGCDataCenterPing_Update & CMsgGCDataCenterPing_Update.$Shape} CMsgGCDataCenterPing_Update * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCDataCenterPing_Update.decode = function decode(reader, length) { + CMsgGCDataCenterPing_Update.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCDataCenterPing_Update(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCDataCenterPing_Update(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.pingdata && message.pingdata.length)) - message.pingdata = []; - message.pingdata.push($root.CMsgGCDataCenterPing_Update.PingEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.pingdata && message.pingdata.length)) + message.pingdata = []; + message.pingdata.push($root.CMsgGCDataCenterPing_Update.PingEntry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -44831,11 +57815,11 @@ * @memberof CMsgGCDataCenterPing_Update * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCDataCenterPing_Update} CMsgGCDataCenterPing_Update + * @returns {CMsgGCDataCenterPing_Update & CMsgGCDataCenterPing_Update.$Shape} CMsgGCDataCenterPing_Update * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCDataCenterPing_Update.decodeDelimited = function decodeDelimited(reader) { + CMsgGCDataCenterPing_Update.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -44849,14 +57833,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCDataCenterPing_Update.verify = function verify(message) { + CMsgGCDataCenterPing_Update.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pingdata != null && message.hasOwnProperty("pingdata")) { - if (!Array.isArray(message.pingdata)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.pingdata != null && $Object.hasOwnProperty.call(message, "pingdata")) { + if (!$Array.isArray(message.pingdata)) return "pingdata: array expected"; for (var i = 0; i < message.pingdata.length; ++i) { - var error = $root.CMsgGCDataCenterPing_Update.PingEntry.verify(message.pingdata[i]); + var error = $root.CMsgGCDataCenterPing_Update.PingEntry.verify(message.pingdata[i], _depth + 1); if (error) return "pingdata." + error; } @@ -44872,18 +57860,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCDataCenterPing_Update} CMsgGCDataCenterPing_Update */ - CMsgGCDataCenterPing_Update.fromObject = function fromObject(object) { + CMsgGCDataCenterPing_Update.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCDataCenterPing_Update) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCDataCenterPing_Update: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCDataCenterPing_Update(); if (object.pingdata) { - if (!Array.isArray(object.pingdata)) - throw TypeError(".CMsgGCDataCenterPing_Update.pingdata: array expected"); - message.pingdata = []; + if (!$Array.isArray(object.pingdata)) + throw $TypeError(".CMsgGCDataCenterPing_Update.pingdata: array expected"); + message.pingdata = $Array(object.pingdata.length); for (var i = 0; i < object.pingdata.length; ++i) { - if (typeof object.pingdata[i] !== "object") - throw TypeError(".CMsgGCDataCenterPing_Update.pingdata: object expected"); - message.pingdata[i] = $root.CMsgGCDataCenterPing_Update.PingEntry.fromObject(object.pingdata[i]); + if (!$util.isObject(object.pingdata[i])) + throw $TypeError(".CMsgGCDataCenterPing_Update.pingdata: object expected"); + message.pingdata[i] = $root.CMsgGCDataCenterPing_Update.PingEntry.fromObject(object.pingdata[i], _depth + 1); } } return message; @@ -44898,16 +57892,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCDataCenterPing_Update.toObject = function toObject(message, options) { + CMsgGCDataCenterPing_Update.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.pingdata = []; if (message.pingdata && message.pingdata.length) { - object.pingdata = []; + object.pingdata = $Array(message.pingdata.length); for (var j = 0; j < message.pingdata.length; ++j) - object.pingdata[j] = $root.CMsgGCDataCenterPing_Update.PingEntry.toObject(message.pingdata[j], options); + object.pingdata[j] = $root.CMsgGCDataCenterPing_Update.PingEntry.toObject(message.pingdata[j], options, _depth + 1); } return object; }; @@ -44919,35 +57917,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCDataCenterPing_Update.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCDataCenterPing_Update.prototype.toJSON = function() { + return CMsgGCDataCenterPing_Update.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCDataCenterPing_Update + * @function getTypeUrl + * @memberof CMsgGCDataCenterPing_Update + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCDataCenterPing_Update.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCDataCenterPing_Update"; }; CMsgGCDataCenterPing_Update.PingEntry = (function() { /** * Properties of a PingEntry. - * @memberof CMsgGCDataCenterPing_Update - * @interface IPingEntry + * @typedef {Object} CMsgGCDataCenterPing_Update.PingEntry.$Properties * @property {string|null} [name] PingEntry name * @property {number|null} [ping] PingEntry ping * @property {CMsgGCDataCenterPing_Update.Status|null} [ping_status] PingEntry ping_status + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PingEntry. + * @memberof CMsgGCDataCenterPing_Update + * @interface IPingEntry + * @augments CMsgGCDataCenterPing_Update.PingEntry.$Properties + * @deprecated Use CMsgGCDataCenterPing_Update.PingEntry.$Properties instead. + */ + + /** + * Shape of a PingEntry. + * @typedef {CMsgGCDataCenterPing_Update.PingEntry.$Properties} CMsgGCDataCenterPing_Update.PingEntry.$Shape */ /** * Constructs a new PingEntry. * @memberof CMsgGCDataCenterPing_Update * @classdesc Represents a PingEntry. - * @implements IPingEntry * @constructor - * @param {CMsgGCDataCenterPing_Update.IPingEntry=} [properties] Properties to set + * @param {CMsgGCDataCenterPing_Update.PingEntry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PingEntry(properties) { + var PingEntry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PingEntry name. @@ -44978,10 +58003,14 @@ * @function create * @memberof CMsgGCDataCenterPing_Update.PingEntry * @static - * @param {CMsgGCDataCenterPing_Update.IPingEntry=} [properties] Properties to set + * @param {CMsgGCDataCenterPing_Update.PingEntry.$Properties=} [properties] Properties to set * @returns {CMsgGCDataCenterPing_Update.PingEntry} PingEntry instance + * @type {{ + * (properties: CMsgGCDataCenterPing_Update.PingEntry.$Shape): CMsgGCDataCenterPing_Update.PingEntry & CMsgGCDataCenterPing_Update.PingEntry.$Shape; + * (properties?: CMsgGCDataCenterPing_Update.PingEntry.$Properties): CMsgGCDataCenterPing_Update.PingEntry; + * }} */ - PingEntry.create = function create(properties) { + PingEntry.create = function(properties) { return new PingEntry(properties); }; @@ -44990,19 +58019,26 @@ * @function encode * @memberof CMsgGCDataCenterPing_Update.PingEntry * @static - * @param {CMsgGCDataCenterPing_Update.IPingEntry} message PingEntry message or plain object to encode + * @param {CMsgGCDataCenterPing_Update.PingEntry.$Properties} message PingEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingEntry.encode = function encode(message, writer) { + PingEntry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.ping != null && Object.hasOwnProperty.call(message, "ping")) + if (message.ping != null && $Object.hasOwnProperty.call(message, "ping")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ping); - if (message.ping_status != null && Object.hasOwnProperty.call(message, "ping_status")) + if (message.ping_status != null && $Object.hasOwnProperty.call(message, "ping_status")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.ping_status); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -45011,12 +58047,12 @@ * @function encodeDelimited * @memberof CMsgGCDataCenterPing_Update.PingEntry * @static - * @param {CMsgGCDataCenterPing_Update.IPingEntry} message PingEntry message or plain object to encode + * @param {CMsgGCDataCenterPing_Update.PingEntry.$Properties} message PingEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PingEntry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -45026,31 +58062,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCDataCenterPing_Update.PingEntry} PingEntry + * @returns {CMsgGCDataCenterPing_Update.PingEntry & CMsgGCDataCenterPing_Update.PingEntry.$Shape} PingEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PingEntry.decode = function decode(reader, length) { + PingEntry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCDataCenterPing_Update.PingEntry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCDataCenterPing_Update.PingEntry(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.ping = reader.uint32(); - break; - case 3: - message.ping_status = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.ping = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCDataCenterPing_Update.Status[value] !== $undefined) + message.ping_status = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -45060,11 +58125,11 @@ * @memberof CMsgGCDataCenterPing_Update.PingEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCDataCenterPing_Update.PingEntry} PingEntry + * @returns {CMsgGCDataCenterPing_Update.PingEntry & CMsgGCDataCenterPing_Update.PingEntry.$Shape} PingEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PingEntry.decodeDelimited = function decodeDelimited(reader) { + PingEntry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -45078,16 +58143,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PingEntry.verify = function verify(message) { + PingEntry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.ping != null && message.hasOwnProperty("ping")) + if (message.ping != null && $Object.hasOwnProperty.call(message, "ping")) if (!$util.isInteger(message.ping)) return "ping: integer expected"; - if (message.ping_status != null && message.hasOwnProperty("ping_status")) + if (message.ping_status != null && $Object.hasOwnProperty.call(message, "ping_status")) switch (message.ping_status) { default: return "ping_status: enum value expected"; @@ -45108,12 +58177,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCDataCenterPing_Update.PingEntry} PingEntry */ - PingEntry.fromObject = function fromObject(object) { + PingEntry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCDataCenterPing_Update.PingEntry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCDataCenterPing_Update.PingEntry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCDataCenterPing_Update.PingEntry(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.ping != null) message.ping = object.ping >>> 0; switch (object.ping_status) { @@ -45133,6 +58208,7 @@ case 3: message.ping_status = 3; break; + default: } return message; }; @@ -45146,21 +58222,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PingEntry.toObject = function toObject(message, options) { + PingEntry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.ping = 0; - object.ping_status = options.enums === String ? "Normal" : 1; + object.ping_status = options.enums === $String ? "Normal" : 1; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.ping != null && message.hasOwnProperty("ping")) + if (message.ping != null && $Object.hasOwnProperty.call(message, "ping")) object.ping = message.ping; - if (message.ping_status != null && message.hasOwnProperty("ping_status")) - object.ping_status = options.enums === String ? $root.CMsgGCDataCenterPing_Update.Status[message.ping_status] : message.ping_status; + if (message.ping_status != null && $Object.hasOwnProperty.call(message, "ping_status")) + object.ping_status = options.enums === $String ? $root.CMsgGCDataCenterPing_Update.Status[message.ping_status] === $undefined ? message.ping_status : $root.CMsgGCDataCenterPing_Update.Status[message.ping_status] : message.ping_status; return object; }; @@ -45171,8 +58251,22 @@ * @instance * @returns {Object.} JSON object */ - PingEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PingEntry.prototype.toJSON = function() { + return PingEntry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PingEntry + * @function getTypeUrl + * @memberof CMsgGCDataCenterPing_Update.PingEntry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PingEntry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCDataCenterPing_Update.PingEntry"; }; return PingEntry; @@ -45188,7 +58282,7 @@ * @property {number} FallbackToDCPing=3 FallbackToDCPing value */ CMsgGCDataCenterPing_Update.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "Invalid"] = 0; values[valuesById[1] = "Normal"] = 1; values[valuesById[2] = "Unreachable"] = 2; @@ -45201,27 +58295,40 @@ $root.CMsgGC_KickPlayerFromLobby = (function() { + /** + * Properties of a CMsgGC_KickPlayerFromLobby. + * @typedef {Object} CMsgGC_KickPlayerFromLobby.$Properties + * @property {number|Long|null} [targetID] CMsgGC_KickPlayerFromLobby targetID + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGC_KickPlayerFromLobby. * @exports ICMsgGC_KickPlayerFromLobby * @interface ICMsgGC_KickPlayerFromLobby - * @property {number|Long|null} [targetID] CMsgGC_KickPlayerFromLobby targetID + * @augments CMsgGC_KickPlayerFromLobby.$Properties + * @deprecated Use CMsgGC_KickPlayerFromLobby.$Properties instead. + */ + + /** + * Shape of a CMsgGC_KickPlayerFromLobby. + * @typedef {CMsgGC_KickPlayerFromLobby.$Properties} CMsgGC_KickPlayerFromLobby.$Shape */ /** * Constructs a new CMsgGC_KickPlayerFromLobby. * @exports CMsgGC_KickPlayerFromLobby * @classdesc Represents a CMsgGC_KickPlayerFromLobby. - * @implements ICMsgGC_KickPlayerFromLobby * @constructor - * @param {ICMsgGC_KickPlayerFromLobby=} [properties] Properties to set + * @param {CMsgGC_KickPlayerFromLobby.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGC_KickPlayerFromLobby(properties) { + var CMsgGC_KickPlayerFromLobby = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGC_KickPlayerFromLobby targetID. @@ -45236,10 +58343,14 @@ * @function create * @memberof CMsgGC_KickPlayerFromLobby * @static - * @param {ICMsgGC_KickPlayerFromLobby=} [properties] Properties to set + * @param {CMsgGC_KickPlayerFromLobby.$Properties=} [properties] Properties to set * @returns {CMsgGC_KickPlayerFromLobby} CMsgGC_KickPlayerFromLobby instance + * @type {{ + * (properties: CMsgGC_KickPlayerFromLobby.$Shape): CMsgGC_KickPlayerFromLobby & CMsgGC_KickPlayerFromLobby.$Shape; + * (properties?: CMsgGC_KickPlayerFromLobby.$Properties): CMsgGC_KickPlayerFromLobby; + * }} */ - CMsgGC_KickPlayerFromLobby.create = function create(properties) { + CMsgGC_KickPlayerFromLobby.create = function(properties) { return new CMsgGC_KickPlayerFromLobby(properties); }; @@ -45248,15 +58359,22 @@ * @function encode * @memberof CMsgGC_KickPlayerFromLobby * @static - * @param {ICMsgGC_KickPlayerFromLobby} message CMsgGC_KickPlayerFromLobby message or plain object to encode + * @param {CMsgGC_KickPlayerFromLobby.$Properties} message CMsgGC_KickPlayerFromLobby message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_KickPlayerFromLobby.encode = function encode(message, writer) { + CMsgGC_KickPlayerFromLobby.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.targetID != null && Object.hasOwnProperty.call(message, "targetID")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.targetID != null && $Object.hasOwnProperty.call(message, "targetID")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.targetID); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -45265,12 +58383,12 @@ * @function encodeDelimited * @memberof CMsgGC_KickPlayerFromLobby * @static - * @param {ICMsgGC_KickPlayerFromLobby} message CMsgGC_KickPlayerFromLobby message or plain object to encode + * @param {CMsgGC_KickPlayerFromLobby.$Properties} message CMsgGC_KickPlayerFromLobby message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGC_KickPlayerFromLobby.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGC_KickPlayerFromLobby.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -45280,25 +58398,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGC_KickPlayerFromLobby} CMsgGC_KickPlayerFromLobby + * @returns {CMsgGC_KickPlayerFromLobby & CMsgGC_KickPlayerFromLobby.$Shape} CMsgGC_KickPlayerFromLobby * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_KickPlayerFromLobby.decode = function decode(reader, length) { + CMsgGC_KickPlayerFromLobby.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGC_KickPlayerFromLobby(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGC_KickPlayerFromLobby(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.targetID = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.targetID = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -45308,11 +58443,11 @@ * @memberof CMsgGC_KickPlayerFromLobby * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGC_KickPlayerFromLobby} CMsgGC_KickPlayerFromLobby + * @returns {CMsgGC_KickPlayerFromLobby & CMsgGC_KickPlayerFromLobby.$Shape} CMsgGC_KickPlayerFromLobby * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGC_KickPlayerFromLobby.decodeDelimited = function decodeDelimited(reader) { + CMsgGC_KickPlayerFromLobby.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -45326,10 +58461,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGC_KickPlayerFromLobby.verify = function verify(message) { + CMsgGC_KickPlayerFromLobby.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targetID != null && message.hasOwnProperty("targetID")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.targetID != null && $Object.hasOwnProperty.call(message, "targetID")) if (!$util.isInteger(message.targetID) && !(message.targetID && $util.isInteger(message.targetID.low) && $util.isInteger(message.targetID.high))) return "targetID: integer|Long expected"; return null; @@ -45343,15 +58482,21 @@ * @param {Object.} object Plain object * @returns {CMsgGC_KickPlayerFromLobby} CMsgGC_KickPlayerFromLobby */ - CMsgGC_KickPlayerFromLobby.fromObject = function fromObject(object) { + CMsgGC_KickPlayerFromLobby.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGC_KickPlayerFromLobby) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGC_KickPlayerFromLobby: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGC_KickPlayerFromLobby(); if (object.targetID != null) if ($util.Long) - (message.targetID = $util.Long.fromValue(object.targetID)).unsigned = true; + message.targetID = $util.Long.fromValue(object.targetID, true); else if (typeof object.targetID === "string") - message.targetID = parseInt(object.targetID, 10); + message.targetID = $parseInt(object.targetID, 10); else if (typeof object.targetID === "number") message.targetID = object.targetID; else if (typeof object.targetID === "object") @@ -45368,21 +58513,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGC_KickPlayerFromLobby.toObject = function toObject(message, options) { + CMsgGC_KickPlayerFromLobby.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.targetID = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.targetID = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.targetID = options.longs === String ? "0" : 0; - if (message.targetID != null && message.hasOwnProperty("targetID")) - if (typeof message.targetID === "number") - object.targetID = options.longs === String ? String(message.targetID) : message.targetID; + object.targetID = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.targetID != null && $Object.hasOwnProperty.call(message, "targetID")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.targetID = typeof message.targetID === "number" ? $BigInt(message.targetID) : $util.Long.fromBits(message.targetID.low >>> 0, message.targetID.high >>> 0, true).toBigInt(); + else if (typeof message.targetID === "number") + object.targetID = options.longs === $String ? $String(message.targetID) : message.targetID; else - object.targetID = options.longs === String ? $util.Long.prototype.toString.call(message.targetID) : options.longs === Number ? new $util.LongBits(message.targetID.low >>> 0, message.targetID.high >>> 0).toNumber(true) : message.targetID; + object.targetID = options.longs === $String ? $util.Long.prototype.toString.call(message.targetID) : options.longs === $Number ? new $util.LongBits(message.targetID.low >>> 0, message.targetID.high >>> 0).toNumber(true) : message.targetID; return object; }; @@ -45393,8 +58544,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGC_KickPlayerFromLobby.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGC_KickPlayerFromLobby.prototype.toJSON = function() { + return CMsgGC_KickPlayerFromLobby.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGC_KickPlayerFromLobby + * @function getTypeUrl + * @memberof CMsgGC_KickPlayerFromLobby + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGC_KickPlayerFromLobby.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGC_KickPlayerFromLobby"; }; return CMsgGC_KickPlayerFromLobby; @@ -45404,26 +58569,39 @@ /** * Properties of a CMsgGCSurveyRequest. - * @exports ICMsgGCSurveyRequest - * @interface ICMsgGCSurveyRequest + * @typedef {Object} CMsgGCSurveyRequest.$Properties * @property {SurveyQuestionType|null} [question_type] CMsgGCSurveyRequest question_type * @property {number|Long|null} [match_id] CMsgGCSurveyRequest match_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCSurveyRequest. + * @exports ICMsgGCSurveyRequest + * @interface ICMsgGCSurveyRequest + * @augments CMsgGCSurveyRequest.$Properties + * @deprecated Use CMsgGCSurveyRequest.$Properties instead. + */ + + /** + * Shape of a CMsgGCSurveyRequest. + * @typedef {CMsgGCSurveyRequest.$Properties} CMsgGCSurveyRequest.$Shape */ /** * Constructs a new CMsgGCSurveyRequest. * @exports CMsgGCSurveyRequest * @classdesc Represents a CMsgGCSurveyRequest. - * @implements ICMsgGCSurveyRequest * @constructor - * @param {ICMsgGCSurveyRequest=} [properties] Properties to set + * @param {CMsgGCSurveyRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCSurveyRequest(properties) { + var CMsgGCSurveyRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCSurveyRequest question_type. @@ -45446,10 +58624,14 @@ * @function create * @memberof CMsgGCSurveyRequest * @static - * @param {ICMsgGCSurveyRequest=} [properties] Properties to set + * @param {CMsgGCSurveyRequest.$Properties=} [properties] Properties to set * @returns {CMsgGCSurveyRequest} CMsgGCSurveyRequest instance + * @type {{ + * (properties: CMsgGCSurveyRequest.$Shape): CMsgGCSurveyRequest & CMsgGCSurveyRequest.$Shape; + * (properties?: CMsgGCSurveyRequest.$Properties): CMsgGCSurveyRequest; + * }} */ - CMsgGCSurveyRequest.create = function create(properties) { + CMsgGCSurveyRequest.create = function(properties) { return new CMsgGCSurveyRequest(properties); }; @@ -45458,17 +58640,24 @@ * @function encode * @memberof CMsgGCSurveyRequest * @static - * @param {ICMsgGCSurveyRequest} message CMsgGCSurveyRequest message or plain object to encode + * @param {CMsgGCSurveyRequest.$Properties} message CMsgGCSurveyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCSurveyRequest.encode = function encode(message, writer) { + CMsgGCSurveyRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.question_type != null && Object.hasOwnProperty.call(message, "question_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.question_type != null && $Object.hasOwnProperty.call(message, "question_type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.question_type); - if (message.match_id != null && Object.hasOwnProperty.call(message, "match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.match_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -45477,12 +58666,12 @@ * @function encodeDelimited * @memberof CMsgGCSurveyRequest * @static - * @param {ICMsgGCSurveyRequest} message CMsgGCSurveyRequest message or plain object to encode + * @param {CMsgGCSurveyRequest.$Properties} message CMsgGCSurveyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCSurveyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCSurveyRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -45492,28 +58681,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCSurveyRequest} CMsgGCSurveyRequest + * @returns {CMsgGCSurveyRequest & CMsgGCSurveyRequest.$Shape} CMsgGCSurveyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCSurveyRequest.decode = function decode(reader, length) { + CMsgGCSurveyRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCSurveyRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCSurveyRequest(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.question_type = reader.int32(); - break; - case 2: - message.match_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.SurveyQuestionType[value] !== $undefined) + message.question_type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + message.match_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -45523,11 +58738,11 @@ * @memberof CMsgGCSurveyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCSurveyRequest} CMsgGCSurveyRequest + * @returns {CMsgGCSurveyRequest & CMsgGCSurveyRequest.$Shape} CMsgGCSurveyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCSurveyRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgGCSurveyRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -45541,10 +58756,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCSurveyRequest.verify = function verify(message) { + CMsgGCSurveyRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.question_type != null && message.hasOwnProperty("question_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.question_type != null && $Object.hasOwnProperty.call(message, "question_type")) switch (message.question_type) { default: return "question_type: enum value expected"; @@ -45555,7 +58774,7 @@ case 4: break; } - if (message.match_id != null && message.hasOwnProperty("match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) if (!$util.isInteger(message.match_id) && !(message.match_id && $util.isInteger(message.match_id.low) && $util.isInteger(message.match_id.high))) return "match_id: integer|Long expected"; return null; @@ -45569,9 +58788,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCSurveyRequest} CMsgGCSurveyRequest */ - CMsgGCSurveyRequest.fromObject = function fromObject(object) { + CMsgGCSurveyRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCSurveyRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCSurveyRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCSurveyRequest(); switch (object.question_type) { case "QUESTION_MATCH_QUALITY": @@ -45594,12 +58819,13 @@ case 4: message.question_type = 4; break; + default: } if (object.match_id != null) if ($util.Long) - (message.match_id = $util.Long.fromValue(object.match_id)).unsigned = true; + message.match_id = $util.Long.fromValue(object.match_id, true); else if (typeof object.match_id === "string") - message.match_id = parseInt(object.match_id, 10); + message.match_id = $parseInt(object.match_id, 10); else if (typeof object.match_id === "number") message.match_id = object.match_id; else if (typeof object.match_id === "object") @@ -45616,25 +58842,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCSurveyRequest.toObject = function toObject(message, options) { + CMsgGCSurveyRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.question_type = options.enums === String ? "QUESTION_MATCH_QUALITY" : 0; + object.question_type = options.enums === $String ? "QUESTION_MATCH_QUALITY" : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.match_id = options.longs === String ? "0" : 0; - } - if (message.question_type != null && message.hasOwnProperty("question_type")) - object.question_type = options.enums === String ? $root.SurveyQuestionType[message.question_type] : message.question_type; - if (message.match_id != null && message.hasOwnProperty("match_id")) - if (typeof message.match_id === "number") - object.match_id = options.longs === String ? String(message.match_id) : message.match_id; + object.match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + } + if (message.question_type != null && $Object.hasOwnProperty.call(message, "question_type")) + object.question_type = options.enums === $String ? $root.SurveyQuestionType[message.question_type] === $undefined ? message.question_type : $root.SurveyQuestionType[message.question_type] : message.question_type; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.match_id = typeof message.match_id === "number" ? $BigInt(message.match_id) : $util.Long.fromBits(message.match_id.low >>> 0, message.match_id.high >>> 0, true).toBigInt(); + else if (typeof message.match_id === "number") + object.match_id = options.longs === $String ? $String(message.match_id) : message.match_id; else - object.match_id = options.longs === String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; + object.match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === $Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; return object; }; @@ -45645,8 +58877,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCSurveyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCSurveyRequest.prototype.toJSON = function() { + return CMsgGCSurveyRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCSurveyRequest + * @function getTypeUrl + * @memberof CMsgGCSurveyRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCSurveyRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCSurveyRequest"; }; return CMsgGCSurveyRequest; @@ -45656,27 +58902,40 @@ /** * Properties of a CMsgGCSurveyResponse. - * @exports ICMsgGCSurveyResponse - * @interface ICMsgGCSurveyResponse + * @typedef {Object} CMsgGCSurveyResponse.$Properties * @property {SurveyQuestionType|null} [question_type] CMsgGCSurveyResponse question_type * @property {number|Long|null} [match_id] CMsgGCSurveyResponse match_id * @property {number|null} [response] CMsgGCSurveyResponse response + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCSurveyResponse. + * @exports ICMsgGCSurveyResponse + * @interface ICMsgGCSurveyResponse + * @augments CMsgGCSurveyResponse.$Properties + * @deprecated Use CMsgGCSurveyResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCSurveyResponse. + * @typedef {CMsgGCSurveyResponse.$Properties} CMsgGCSurveyResponse.$Shape */ /** * Constructs a new CMsgGCSurveyResponse. * @exports CMsgGCSurveyResponse * @classdesc Represents a CMsgGCSurveyResponse. - * @implements ICMsgGCSurveyResponse * @constructor - * @param {ICMsgGCSurveyResponse=} [properties] Properties to set + * @param {CMsgGCSurveyResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCSurveyResponse(properties) { + var CMsgGCSurveyResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCSurveyResponse question_type. @@ -45707,10 +58966,14 @@ * @function create * @memberof CMsgGCSurveyResponse * @static - * @param {ICMsgGCSurveyResponse=} [properties] Properties to set + * @param {CMsgGCSurveyResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCSurveyResponse} CMsgGCSurveyResponse instance + * @type {{ + * (properties: CMsgGCSurveyResponse.$Shape): CMsgGCSurveyResponse & CMsgGCSurveyResponse.$Shape; + * (properties?: CMsgGCSurveyResponse.$Properties): CMsgGCSurveyResponse; + * }} */ - CMsgGCSurveyResponse.create = function create(properties) { + CMsgGCSurveyResponse.create = function(properties) { return new CMsgGCSurveyResponse(properties); }; @@ -45719,19 +58982,26 @@ * @function encode * @memberof CMsgGCSurveyResponse * @static - * @param {ICMsgGCSurveyResponse} message CMsgGCSurveyResponse message or plain object to encode + * @param {CMsgGCSurveyResponse.$Properties} message CMsgGCSurveyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCSurveyResponse.encode = function encode(message, writer) { + CMsgGCSurveyResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.question_type != null && Object.hasOwnProperty.call(message, "question_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.question_type != null && $Object.hasOwnProperty.call(message, "question_type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.question_type); - if (message.match_id != null && Object.hasOwnProperty.call(message, "match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.match_id); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) + if (message.response != null && $Object.hasOwnProperty.call(message, "response")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.response); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -45740,12 +59010,12 @@ * @function encodeDelimited * @memberof CMsgGCSurveyResponse * @static - * @param {ICMsgGCSurveyResponse} message CMsgGCSurveyResponse message or plain object to encode + * @param {CMsgGCSurveyResponse.$Properties} message CMsgGCSurveyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCSurveyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCSurveyResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -45755,31 +59025,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCSurveyResponse} CMsgGCSurveyResponse + * @returns {CMsgGCSurveyResponse & CMsgGCSurveyResponse.$Shape} CMsgGCSurveyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCSurveyResponse.decode = function decode(reader, length) { + CMsgGCSurveyResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCSurveyResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCSurveyResponse(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.question_type = reader.int32(); - break; - case 2: - message.match_id = reader.uint64(); - break; - case 3: - message.response = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.SurveyQuestionType[value] !== $undefined) + message.question_type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + message.match_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.response = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -45789,11 +59088,11 @@ * @memberof CMsgGCSurveyResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCSurveyResponse} CMsgGCSurveyResponse + * @returns {CMsgGCSurveyResponse & CMsgGCSurveyResponse.$Shape} CMsgGCSurveyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCSurveyResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCSurveyResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -45807,10 +59106,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCSurveyResponse.verify = function verify(message) { + CMsgGCSurveyResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.question_type != null && message.hasOwnProperty("question_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.question_type != null && $Object.hasOwnProperty.call(message, "question_type")) switch (message.question_type) { default: return "question_type: enum value expected"; @@ -45821,10 +59124,10 @@ case 4: break; } - if (message.match_id != null && message.hasOwnProperty("match_id")) + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) if (!$util.isInteger(message.match_id) && !(message.match_id && $util.isInteger(message.match_id.low) && $util.isInteger(message.match_id.high))) return "match_id: integer|Long expected"; - if (message.response != null && message.hasOwnProperty("response")) + if (message.response != null && $Object.hasOwnProperty.call(message, "response")) if (!$util.isInteger(message.response)) return "response: integer expected"; return null; @@ -45838,9 +59141,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCSurveyResponse} CMsgGCSurveyResponse */ - CMsgGCSurveyResponse.fromObject = function fromObject(object) { + CMsgGCSurveyResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCSurveyResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCSurveyResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCSurveyResponse(); switch (object.question_type) { case "QUESTION_MATCH_QUALITY": @@ -45863,12 +59172,13 @@ case 4: message.question_type = 4; break; + default: } if (object.match_id != null) if ($util.Long) - (message.match_id = $util.Long.fromValue(object.match_id)).unsigned = true; + message.match_id = $util.Long.fromValue(object.match_id, true); else if (typeof object.match_id === "string") - message.match_id = parseInt(object.match_id, 10); + message.match_id = $parseInt(object.match_id, 10); else if (typeof object.match_id === "number") message.match_id = object.match_id; else if (typeof object.match_id === "object") @@ -45887,27 +59197,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCSurveyResponse.toObject = function toObject(message, options) { + CMsgGCSurveyResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.question_type = options.enums === String ? "QUESTION_MATCH_QUALITY" : 0; + object.question_type = options.enums === $String ? "QUESTION_MATCH_QUALITY" : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.match_id = options.longs === String ? "0" : 0; + object.match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.response = 0; } - if (message.question_type != null && message.hasOwnProperty("question_type")) - object.question_type = options.enums === String ? $root.SurveyQuestionType[message.question_type] : message.question_type; - if (message.match_id != null && message.hasOwnProperty("match_id")) - if (typeof message.match_id === "number") - object.match_id = options.longs === String ? String(message.match_id) : message.match_id; + if (message.question_type != null && $Object.hasOwnProperty.call(message, "question_type")) + object.question_type = options.enums === $String ? $root.SurveyQuestionType[message.question_type] === $undefined ? message.question_type : $root.SurveyQuestionType[message.question_type] : message.question_type; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.match_id = typeof message.match_id === "number" ? $BigInt(message.match_id) : $util.Long.fromBits(message.match_id.low >>> 0, message.match_id.high >>> 0, true).toBigInt(); + else if (typeof message.match_id === "number") + object.match_id = options.longs === $String ? $String(message.match_id) : message.match_id; else - object.match_id = options.longs === String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; - if (message.response != null && message.hasOwnProperty("response")) + object.match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === $Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; + if (message.response != null && $Object.hasOwnProperty.call(message, "response")) object.response = message.response; return object; }; @@ -45919,8 +59235,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCSurveyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCSurveyResponse.prototype.toJSON = function() { + return CMsgGCSurveyResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCSurveyResponse + * @function getTypeUrl + * @memberof CMsgGCSurveyResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCSurveyResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCSurveyResponse"; }; return CMsgGCSurveyResponse; @@ -45930,8 +59260,7 @@ /** * Properties of a CSOQuestMapNode. - * @exports ICSOQuestMapNode - * @interface ICSOQuestMapNode + * @typedef {Object} CSOQuestMapNode.$Properties * @property {number|null} [account_id] CSOQuestMapNode account_id * @property {number|null} [defindex] CSOQuestMapNode defindex * @property {number|null} [node_id] CSOQuestMapNode node_id @@ -45941,22 +59270,36 @@ * @property {boolean|null} [loot_claimed] CSOQuestMapNode loot_claimed * @property {number|null} [selected_quest_def] CSOQuestMapNode selected_quest_def * @property {number|null} [map_cycle] CSOQuestMapNode map_cycle + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOQuestMapNode. + * @exports ICSOQuestMapNode + * @interface ICSOQuestMapNode + * @augments CSOQuestMapNode.$Properties + * @deprecated Use CSOQuestMapNode.$Properties instead. + */ + + /** + * Shape of a CSOQuestMapNode. + * @typedef {CSOQuestMapNode.$Properties} CSOQuestMapNode.$Shape */ /** * Constructs a new CSOQuestMapNode. * @exports CSOQuestMapNode * @classdesc Represents a CSOQuestMapNode. - * @implements ICSOQuestMapNode * @constructor - * @param {ICSOQuestMapNode=} [properties] Properties to set + * @param {CSOQuestMapNode.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOQuestMapNode(properties) { + var CSOQuestMapNode = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOQuestMapNode account_id. @@ -46035,10 +59378,14 @@ * @function create * @memberof CSOQuestMapNode * @static - * @param {ICSOQuestMapNode=} [properties] Properties to set + * @param {CSOQuestMapNode.$Properties=} [properties] Properties to set * @returns {CSOQuestMapNode} CSOQuestMapNode instance + * @type {{ + * (properties: CSOQuestMapNode.$Shape): CSOQuestMapNode & CSOQuestMapNode.$Shape; + * (properties?: CSOQuestMapNode.$Properties): CSOQuestMapNode; + * }} */ - CSOQuestMapNode.create = function create(properties) { + CSOQuestMapNode.create = function(properties) { return new CSOQuestMapNode(properties); }; @@ -46047,31 +59394,38 @@ * @function encode * @memberof CSOQuestMapNode * @static - * @param {ICSOQuestMapNode} message CSOQuestMapNode message or plain object to encode + * @param {CSOQuestMapNode.$Properties} message CSOQuestMapNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOQuestMapNode.encode = function encode(message, writer) { + CSOQuestMapNode.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.defindex != null && Object.hasOwnProperty.call(message, "defindex")) + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.defindex); - if (message.node_id != null && Object.hasOwnProperty.call(message, "node_id")) + if (message.node_id != null && $Object.hasOwnProperty.call(message, "node_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.node_id); - if (message.star_0_earned != null && Object.hasOwnProperty.call(message, "star_0_earned")) + if (message.star_0_earned != null && $Object.hasOwnProperty.call(message, "star_0_earned")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.star_0_earned); - if (message.star_1_earned != null && Object.hasOwnProperty.call(message, "star_1_earned")) + if (message.star_1_earned != null && $Object.hasOwnProperty.call(message, "star_1_earned")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.star_1_earned); - if (message.star_2_earned != null && Object.hasOwnProperty.call(message, "star_2_earned")) + if (message.star_2_earned != null && $Object.hasOwnProperty.call(message, "star_2_earned")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.star_2_earned); - if (message.loot_claimed != null && Object.hasOwnProperty.call(message, "loot_claimed")) + if (message.loot_claimed != null && $Object.hasOwnProperty.call(message, "loot_claimed")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.loot_claimed); - if (message.selected_quest_def != null && Object.hasOwnProperty.call(message, "selected_quest_def")) + if (message.selected_quest_def != null && $Object.hasOwnProperty.call(message, "selected_quest_def")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.selected_quest_def); - if (message.map_cycle != null && Object.hasOwnProperty.call(message, "map_cycle")) + if (message.map_cycle != null && $Object.hasOwnProperty.call(message, "map_cycle")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.map_cycle); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -46080,12 +59434,12 @@ * @function encodeDelimited * @memberof CSOQuestMapNode * @static - * @param {ICSOQuestMapNode} message CSOQuestMapNode message or plain object to encode + * @param {CSOQuestMapNode.$Properties} message CSOQuestMapNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOQuestMapNode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOQuestMapNode.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -46095,49 +59449,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOQuestMapNode} CSOQuestMapNode + * @returns {CSOQuestMapNode & CSOQuestMapNode.$Shape} CSOQuestMapNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOQuestMapNode.decode = function decode(reader, length) { + CSOQuestMapNode.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOQuestMapNode(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOQuestMapNode(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 3: - message.defindex = reader.uint32(); - break; - case 4: - message.node_id = reader.uint32(); - break; - case 6: - message.star_0_earned = reader.bool(); - break; - case 7: - message.star_1_earned = reader.bool(); - break; - case 8: - message.star_2_earned = reader.bool(); - break; - case 9: - message.loot_claimed = reader.bool(); - break; - case 10: - message.selected_quest_def = reader.uint32(); - break; - case 11: - message.map_cycle = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.defindex = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.node_id = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.star_0_earned = reader.bool(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.star_1_earned = reader.bool(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.star_2_earned = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.loot_claimed = reader.bool(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.selected_quest_def = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.map_cycle = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -46147,11 +59542,11 @@ * @memberof CSOQuestMapNode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOQuestMapNode} CSOQuestMapNode + * @returns {CSOQuestMapNode & CSOQuestMapNode.$Shape} CSOQuestMapNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOQuestMapNode.decodeDelimited = function decodeDelimited(reader) { + CSOQuestMapNode.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -46165,34 +59560,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOQuestMapNode.verify = function verify(message) { + CSOQuestMapNode.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.defindex != null && message.hasOwnProperty("defindex")) + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) if (!$util.isInteger(message.defindex)) return "defindex: integer expected"; - if (message.node_id != null && message.hasOwnProperty("node_id")) + if (message.node_id != null && $Object.hasOwnProperty.call(message, "node_id")) if (!$util.isInteger(message.node_id)) return "node_id: integer expected"; - if (message.star_0_earned != null && message.hasOwnProperty("star_0_earned")) + if (message.star_0_earned != null && $Object.hasOwnProperty.call(message, "star_0_earned")) if (typeof message.star_0_earned !== "boolean") return "star_0_earned: boolean expected"; - if (message.star_1_earned != null && message.hasOwnProperty("star_1_earned")) + if (message.star_1_earned != null && $Object.hasOwnProperty.call(message, "star_1_earned")) if (typeof message.star_1_earned !== "boolean") return "star_1_earned: boolean expected"; - if (message.star_2_earned != null && message.hasOwnProperty("star_2_earned")) + if (message.star_2_earned != null && $Object.hasOwnProperty.call(message, "star_2_earned")) if (typeof message.star_2_earned !== "boolean") return "star_2_earned: boolean expected"; - if (message.loot_claimed != null && message.hasOwnProperty("loot_claimed")) + if (message.loot_claimed != null && $Object.hasOwnProperty.call(message, "loot_claimed")) if (typeof message.loot_claimed !== "boolean") return "loot_claimed: boolean expected"; - if (message.selected_quest_def != null && message.hasOwnProperty("selected_quest_def")) + if (message.selected_quest_def != null && $Object.hasOwnProperty.call(message, "selected_quest_def")) if (!$util.isInteger(message.selected_quest_def)) return "selected_quest_def: integer expected"; - if (message.map_cycle != null && message.hasOwnProperty("map_cycle")) + if (message.map_cycle != null && $Object.hasOwnProperty.call(message, "map_cycle")) if (!$util.isInteger(message.map_cycle)) return "map_cycle: integer expected"; return null; @@ -46206,9 +59605,15 @@ * @param {Object.} object Plain object * @returns {CSOQuestMapNode} CSOQuestMapNode */ - CSOQuestMapNode.fromObject = function fromObject(object) { + CSOQuestMapNode.fromObject = function (object, _depth) { if (object instanceof $root.CSOQuestMapNode) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOQuestMapNode: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOQuestMapNode(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -46217,13 +59622,13 @@ if (object.node_id != null) message.node_id = object.node_id >>> 0; if (object.star_0_earned != null) - message.star_0_earned = Boolean(object.star_0_earned); + message.star_0_earned = $Boolean(object.star_0_earned); if (object.star_1_earned != null) - message.star_1_earned = Boolean(object.star_1_earned); + message.star_1_earned = $Boolean(object.star_1_earned); if (object.star_2_earned != null) - message.star_2_earned = Boolean(object.star_2_earned); + message.star_2_earned = $Boolean(object.star_2_earned); if (object.loot_claimed != null) - message.loot_claimed = Boolean(object.loot_claimed); + message.loot_claimed = $Boolean(object.loot_claimed); if (object.selected_quest_def != null) message.selected_quest_def = object.selected_quest_def >>> 0; if (object.map_cycle != null) @@ -46240,9 +59645,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOQuestMapNode.toObject = function toObject(message, options) { + CSOQuestMapNode.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; @@ -46255,23 +59664,23 @@ object.selected_quest_def = 0; object.map_cycle = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.defindex != null && message.hasOwnProperty("defindex")) + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) object.defindex = message.defindex; - if (message.node_id != null && message.hasOwnProperty("node_id")) + if (message.node_id != null && $Object.hasOwnProperty.call(message, "node_id")) object.node_id = message.node_id; - if (message.star_0_earned != null && message.hasOwnProperty("star_0_earned")) + if (message.star_0_earned != null && $Object.hasOwnProperty.call(message, "star_0_earned")) object.star_0_earned = message.star_0_earned; - if (message.star_1_earned != null && message.hasOwnProperty("star_1_earned")) + if (message.star_1_earned != null && $Object.hasOwnProperty.call(message, "star_1_earned")) object.star_1_earned = message.star_1_earned; - if (message.star_2_earned != null && message.hasOwnProperty("star_2_earned")) + if (message.star_2_earned != null && $Object.hasOwnProperty.call(message, "star_2_earned")) object.star_2_earned = message.star_2_earned; - if (message.loot_claimed != null && message.hasOwnProperty("loot_claimed")) + if (message.loot_claimed != null && $Object.hasOwnProperty.call(message, "loot_claimed")) object.loot_claimed = message.loot_claimed; - if (message.selected_quest_def != null && message.hasOwnProperty("selected_quest_def")) + if (message.selected_quest_def != null && $Object.hasOwnProperty.call(message, "selected_quest_def")) object.selected_quest_def = message.selected_quest_def; - if (message.map_cycle != null && message.hasOwnProperty("map_cycle")) + if (message.map_cycle != null && $Object.hasOwnProperty.call(message, "map_cycle")) object.map_cycle = message.map_cycle; return object; }; @@ -46283,8 +59692,22 @@ * @instance * @returns {Object.} JSON object */ - CSOQuestMapNode.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOQuestMapNode.prototype.toJSON = function() { + return CSOQuestMapNode.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOQuestMapNode + * @function getTypeUrl + * @memberof CSOQuestMapNode + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOQuestMapNode.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOQuestMapNode"; }; return CSOQuestMapNode; @@ -46294,8 +59717,7 @@ /** * Properties of a CSOQuest. - * @exports ICSOQuest - * @interface ICSOQuest + * @typedef {Object} CSOQuest.$Properties * @property {number|null} [account_id] CSOQuest account_id * @property {number|Long|null} [quest_id] CSOQuest quest_id * @property {number|null} [defindex] CSOQuest defindex @@ -46305,22 +59727,36 @@ * @property {number|null} [points_2] CSOQuest points_2 * @property {number|null} [quest_map_node_source_id] CSOQuest quest_map_node_source_id * @property {number|null} [map_cycle] CSOQuest map_cycle + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOQuest. + * @exports ICSOQuest + * @interface ICSOQuest + * @augments CSOQuest.$Properties + * @deprecated Use CSOQuest.$Properties instead. + */ + + /** + * Shape of a CSOQuest. + * @typedef {CSOQuest.$Properties} CSOQuest.$Shape */ /** * Constructs a new CSOQuest. * @exports CSOQuest * @classdesc Represents a CSOQuest. - * @implements ICSOQuest * @constructor - * @param {ICSOQuest=} [properties] Properties to set + * @param {CSOQuest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOQuest(properties) { + var CSOQuest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOQuest account_id. @@ -46399,10 +59835,14 @@ * @function create * @memberof CSOQuest * @static - * @param {ICSOQuest=} [properties] Properties to set + * @param {CSOQuest.$Properties=} [properties] Properties to set * @returns {CSOQuest} CSOQuest instance + * @type {{ + * (properties: CSOQuest.$Shape): CSOQuest & CSOQuest.$Shape; + * (properties?: CSOQuest.$Properties): CSOQuest; + * }} */ - CSOQuest.create = function create(properties) { + CSOQuest.create = function(properties) { return new CSOQuest(properties); }; @@ -46411,31 +59851,38 @@ * @function encode * @memberof CSOQuest * @static - * @param {ICSOQuest} message CSOQuest message or plain object to encode + * @param {CSOQuest.$Properties} message CSOQuest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOQuest.encode = function encode(message, writer) { + CSOQuest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.quest_id != null && Object.hasOwnProperty.call(message, "quest_id")) + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.quest_id); - if (message.defindex != null && Object.hasOwnProperty.call(message, "defindex")) + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.defindex); - if (message.active != null && Object.hasOwnProperty.call(message, "active")) + if (message.active != null && $Object.hasOwnProperty.call(message, "active")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.active); - if (message.points_0 != null && Object.hasOwnProperty.call(message, "points_0")) + if (message.points_0 != null && $Object.hasOwnProperty.call(message, "points_0")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.points_0); - if (message.points_1 != null && Object.hasOwnProperty.call(message, "points_1")) + if (message.points_1 != null && $Object.hasOwnProperty.call(message, "points_1")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.points_1); - if (message.points_2 != null && Object.hasOwnProperty.call(message, "points_2")) + if (message.points_2 != null && $Object.hasOwnProperty.call(message, "points_2")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.points_2); - if (message.quest_map_node_source_id != null && Object.hasOwnProperty.call(message, "quest_map_node_source_id")) + if (message.quest_map_node_source_id != null && $Object.hasOwnProperty.call(message, "quest_map_node_source_id")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.quest_map_node_source_id); - if (message.map_cycle != null && Object.hasOwnProperty.call(message, "map_cycle")) + if (message.map_cycle != null && $Object.hasOwnProperty.call(message, "map_cycle")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.map_cycle); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -46444,12 +59891,12 @@ * @function encodeDelimited * @memberof CSOQuest * @static - * @param {ICSOQuest} message CSOQuest message or plain object to encode + * @param {CSOQuest.$Properties} message CSOQuest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOQuest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOQuest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -46459,49 +59906,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOQuest} CSOQuest + * @returns {CSOQuest & CSOQuest.$Shape} CSOQuest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOQuest.decode = function decode(reader, length) { + CSOQuest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOQuest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOQuest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.quest_id = reader.uint64(); - break; - case 3: - message.defindex = reader.uint32(); - break; - case 4: - message.active = reader.bool(); - break; - case 5: - message.points_0 = reader.uint32(); - break; - case 6: - message.points_1 = reader.uint32(); - break; - case 7: - message.points_2 = reader.uint32(); - break; - case 8: - message.quest_map_node_source_id = reader.uint32(); - break; - case 9: - message.map_cycle = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.quest_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.defindex = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.active = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.points_0 = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.points_1 = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.points_2 = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.quest_map_node_source_id = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.map_cycle = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -46511,11 +59999,11 @@ * @memberof CSOQuest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOQuest} CSOQuest + * @returns {CSOQuest & CSOQuest.$Shape} CSOQuest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOQuest.decodeDelimited = function decodeDelimited(reader) { + CSOQuest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -46529,34 +60017,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOQuest.verify = function verify(message) { + CSOQuest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) if (!$util.isInteger(message.quest_id) && !(message.quest_id && $util.isInteger(message.quest_id.low) && $util.isInteger(message.quest_id.high))) return "quest_id: integer|Long expected"; - if (message.defindex != null && message.hasOwnProperty("defindex")) + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) if (!$util.isInteger(message.defindex)) return "defindex: integer expected"; - if (message.active != null && message.hasOwnProperty("active")) + if (message.active != null && $Object.hasOwnProperty.call(message, "active")) if (typeof message.active !== "boolean") return "active: boolean expected"; - if (message.points_0 != null && message.hasOwnProperty("points_0")) + if (message.points_0 != null && $Object.hasOwnProperty.call(message, "points_0")) if (!$util.isInteger(message.points_0)) return "points_0: integer expected"; - if (message.points_1 != null && message.hasOwnProperty("points_1")) + if (message.points_1 != null && $Object.hasOwnProperty.call(message, "points_1")) if (!$util.isInteger(message.points_1)) return "points_1: integer expected"; - if (message.points_2 != null && message.hasOwnProperty("points_2")) + if (message.points_2 != null && $Object.hasOwnProperty.call(message, "points_2")) if (!$util.isInteger(message.points_2)) return "points_2: integer expected"; - if (message.quest_map_node_source_id != null && message.hasOwnProperty("quest_map_node_source_id")) + if (message.quest_map_node_source_id != null && $Object.hasOwnProperty.call(message, "quest_map_node_source_id")) if (!$util.isInteger(message.quest_map_node_source_id)) return "quest_map_node_source_id: integer expected"; - if (message.map_cycle != null && message.hasOwnProperty("map_cycle")) + if (message.map_cycle != null && $Object.hasOwnProperty.call(message, "map_cycle")) if (!$util.isInteger(message.map_cycle)) return "map_cycle: integer expected"; return null; @@ -46570,17 +60062,23 @@ * @param {Object.} object Plain object * @returns {CSOQuest} CSOQuest */ - CSOQuest.fromObject = function fromObject(object) { + CSOQuest.fromObject = function (object, _depth) { if (object instanceof $root.CSOQuest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOQuest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOQuest(); if (object.account_id != null) message.account_id = object.account_id >>> 0; if (object.quest_id != null) if ($util.Long) - (message.quest_id = $util.Long.fromValue(object.quest_id)).unsigned = true; + message.quest_id = $util.Long.fromValue(object.quest_id, true); else if (typeof object.quest_id === "string") - message.quest_id = parseInt(object.quest_id, 10); + message.quest_id = $parseInt(object.quest_id, 10); else if (typeof object.quest_id === "number") message.quest_id = object.quest_id; else if (typeof object.quest_id === "object") @@ -46588,7 +60086,7 @@ if (object.defindex != null) message.defindex = object.defindex >>> 0; if (object.active != null) - message.active = Boolean(object.active); + message.active = $Boolean(object.active); if (object.points_0 != null) message.points_0 = object.points_0 >>> 0; if (object.points_1 != null) @@ -46611,17 +60109,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOQuest.toObject = function toObject(message, options) { + CSOQuest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.quest_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.quest_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.quest_id = options.longs === String ? "0" : 0; + object.quest_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.defindex = 0; object.active = false; object.points_0 = 0; @@ -46630,26 +60132,28 @@ object.quest_map_node_source_id = 0; object.map_cycle = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) - if (typeof message.quest_id === "number") - object.quest_id = options.longs === String ? String(message.quest_id) : message.quest_id; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.quest_id = typeof message.quest_id === "number" ? $BigInt(message.quest_id) : $util.Long.fromBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0, true).toBigInt(); + else if (typeof message.quest_id === "number") + object.quest_id = options.longs === $String ? $String(message.quest_id) : message.quest_id; else - object.quest_id = options.longs === String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; - if (message.defindex != null && message.hasOwnProperty("defindex")) + object.quest_id = options.longs === $String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === $Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) object.defindex = message.defindex; - if (message.active != null && message.hasOwnProperty("active")) + if (message.active != null && $Object.hasOwnProperty.call(message, "active")) object.active = message.active; - if (message.points_0 != null && message.hasOwnProperty("points_0")) + if (message.points_0 != null && $Object.hasOwnProperty.call(message, "points_0")) object.points_0 = message.points_0; - if (message.points_1 != null && message.hasOwnProperty("points_1")) + if (message.points_1 != null && $Object.hasOwnProperty.call(message, "points_1")) object.points_1 = message.points_1; - if (message.points_2 != null && message.hasOwnProperty("points_2")) + if (message.points_2 != null && $Object.hasOwnProperty.call(message, "points_2")) object.points_2 = message.points_2; - if (message.quest_map_node_source_id != null && message.hasOwnProperty("quest_map_node_source_id")) + if (message.quest_map_node_source_id != null && $Object.hasOwnProperty.call(message, "quest_map_node_source_id")) object.quest_map_node_source_id = message.quest_map_node_source_id; - if (message.map_cycle != null && message.hasOwnProperty("map_cycle")) + if (message.map_cycle != null && $Object.hasOwnProperty.call(message, "map_cycle")) object.map_cycle = message.map_cycle; return object; }; @@ -46661,8 +60165,22 @@ * @instance * @returns {Object.} JSON object */ - CSOQuest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOQuest.prototype.toJSON = function() { + return CSOQuest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOQuest + * @function getTypeUrl + * @memberof CSOQuest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOQuest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOQuest"; }; return CSOQuest; @@ -46672,29 +60190,42 @@ /** * Properties of a CSOQuestMapRewardPurchase. - * @exports ICSOQuestMapRewardPurchase - * @interface ICSOQuestMapRewardPurchase + * @typedef {Object} CSOQuestMapRewardPurchase.$Properties * @property {number|null} [account_id] CSOQuestMapRewardPurchase account_id * @property {number|null} [defindex] CSOQuestMapRewardPurchase defindex * @property {number|null} [count] CSOQuestMapRewardPurchase count * @property {number|null} [map_cycle] CSOQuestMapRewardPurchase map_cycle * @property {number|null} [purchase_id] CSOQuestMapRewardPurchase purchase_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOQuestMapRewardPurchase. + * @exports ICSOQuestMapRewardPurchase + * @interface ICSOQuestMapRewardPurchase + * @augments CSOQuestMapRewardPurchase.$Properties + * @deprecated Use CSOQuestMapRewardPurchase.$Properties instead. + */ + + /** + * Shape of a CSOQuestMapRewardPurchase. + * @typedef {CSOQuestMapRewardPurchase.$Properties} CSOQuestMapRewardPurchase.$Shape */ /** * Constructs a new CSOQuestMapRewardPurchase. * @exports CSOQuestMapRewardPurchase * @classdesc Represents a CSOQuestMapRewardPurchase. - * @implements ICSOQuestMapRewardPurchase * @constructor - * @param {ICSOQuestMapRewardPurchase=} [properties] Properties to set + * @param {CSOQuestMapRewardPurchase.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOQuestMapRewardPurchase(properties) { + var CSOQuestMapRewardPurchase = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOQuestMapRewardPurchase account_id. @@ -46741,10 +60272,14 @@ * @function create * @memberof CSOQuestMapRewardPurchase * @static - * @param {ICSOQuestMapRewardPurchase=} [properties] Properties to set + * @param {CSOQuestMapRewardPurchase.$Properties=} [properties] Properties to set * @returns {CSOQuestMapRewardPurchase} CSOQuestMapRewardPurchase instance + * @type {{ + * (properties: CSOQuestMapRewardPurchase.$Shape): CSOQuestMapRewardPurchase & CSOQuestMapRewardPurchase.$Shape; + * (properties?: CSOQuestMapRewardPurchase.$Properties): CSOQuestMapRewardPurchase; + * }} */ - CSOQuestMapRewardPurchase.create = function create(properties) { + CSOQuestMapRewardPurchase.create = function(properties) { return new CSOQuestMapRewardPurchase(properties); }; @@ -46753,23 +60288,30 @@ * @function encode * @memberof CSOQuestMapRewardPurchase * @static - * @param {ICSOQuestMapRewardPurchase} message CSOQuestMapRewardPurchase message or plain object to encode + * @param {CSOQuestMapRewardPurchase.$Properties} message CSOQuestMapRewardPurchase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOQuestMapRewardPurchase.encode = function encode(message, writer) { + CSOQuestMapRewardPurchase.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.defindex != null && Object.hasOwnProperty.call(message, "defindex")) + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.defindex); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) + if (message.count != null && $Object.hasOwnProperty.call(message, "count")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.count); - if (message.map_cycle != null && Object.hasOwnProperty.call(message, "map_cycle")) + if (message.map_cycle != null && $Object.hasOwnProperty.call(message, "map_cycle")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.map_cycle); - if (message.purchase_id != null && Object.hasOwnProperty.call(message, "purchase_id")) + if (message.purchase_id != null && $Object.hasOwnProperty.call(message, "purchase_id")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.purchase_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -46778,12 +60320,12 @@ * @function encodeDelimited * @memberof CSOQuestMapRewardPurchase * @static - * @param {ICSOQuestMapRewardPurchase} message CSOQuestMapRewardPurchase message or plain object to encode + * @param {CSOQuestMapRewardPurchase.$Properties} message CSOQuestMapRewardPurchase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOQuestMapRewardPurchase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOQuestMapRewardPurchase.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -46793,37 +60335,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOQuestMapRewardPurchase} CSOQuestMapRewardPurchase + * @returns {CSOQuestMapRewardPurchase & CSOQuestMapRewardPurchase.$Shape} CSOQuestMapRewardPurchase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOQuestMapRewardPurchase.decode = function decode(reader, length) { + CSOQuestMapRewardPurchase.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOQuestMapRewardPurchase(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOQuestMapRewardPurchase(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.defindex = reader.uint32(); - break; - case 3: - message.count = reader.uint32(); - break; - case 4: - message.map_cycle = reader.uint32(); - break; - case 5: - message.purchase_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.defindex = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.count = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.map_cycle = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.purchase_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -46833,11 +60404,11 @@ * @memberof CSOQuestMapRewardPurchase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOQuestMapRewardPurchase} CSOQuestMapRewardPurchase + * @returns {CSOQuestMapRewardPurchase & CSOQuestMapRewardPurchase.$Shape} CSOQuestMapRewardPurchase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOQuestMapRewardPurchase.decodeDelimited = function decodeDelimited(reader) { + CSOQuestMapRewardPurchase.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -46851,22 +60422,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOQuestMapRewardPurchase.verify = function verify(message) { + CSOQuestMapRewardPurchase.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.defindex != null && message.hasOwnProperty("defindex")) + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) if (!$util.isInteger(message.defindex)) return "defindex: integer expected"; - if (message.count != null && message.hasOwnProperty("count")) + if (message.count != null && $Object.hasOwnProperty.call(message, "count")) if (!$util.isInteger(message.count)) return "count: integer expected"; - if (message.map_cycle != null && message.hasOwnProperty("map_cycle")) + if (message.map_cycle != null && $Object.hasOwnProperty.call(message, "map_cycle")) if (!$util.isInteger(message.map_cycle)) return "map_cycle: integer expected"; - if (message.purchase_id != null && message.hasOwnProperty("purchase_id")) + if (message.purchase_id != null && $Object.hasOwnProperty.call(message, "purchase_id")) if (!$util.isInteger(message.purchase_id)) return "purchase_id: integer expected"; return null; @@ -46880,9 +60455,15 @@ * @param {Object.} object Plain object * @returns {CSOQuestMapRewardPurchase} CSOQuestMapRewardPurchase */ - CSOQuestMapRewardPurchase.fromObject = function fromObject(object) { + CSOQuestMapRewardPurchase.fromObject = function (object, _depth) { if (object instanceof $root.CSOQuestMapRewardPurchase) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOQuestMapRewardPurchase: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOQuestMapRewardPurchase(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -46906,9 +60487,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOQuestMapRewardPurchase.toObject = function toObject(message, options) { + CSOQuestMapRewardPurchase.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; @@ -46917,15 +60502,15 @@ object.map_cycle = 0; object.purchase_id = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.defindex != null && message.hasOwnProperty("defindex")) + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) object.defindex = message.defindex; - if (message.count != null && message.hasOwnProperty("count")) + if (message.count != null && $Object.hasOwnProperty.call(message, "count")) object.count = message.count; - if (message.map_cycle != null && message.hasOwnProperty("map_cycle")) + if (message.map_cycle != null && $Object.hasOwnProperty.call(message, "map_cycle")) object.map_cycle = message.map_cycle; - if (message.purchase_id != null && message.hasOwnProperty("purchase_id")) + if (message.purchase_id != null && $Object.hasOwnProperty.call(message, "purchase_id")) object.purchase_id = message.purchase_id; return object; }; @@ -46937,8 +60522,22 @@ * @instance * @returns {Object.} JSON object */ - CSOQuestMapRewardPurchase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOQuestMapRewardPurchase.prototype.toJSON = function() { + return CSOQuestMapRewardPurchase.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOQuestMapRewardPurchase + * @function getTypeUrl + * @memberof CSOQuestMapRewardPurchase + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOQuestMapRewardPurchase.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOQuestMapRewardPurchase"; }; return CSOQuestMapRewardPurchase; @@ -46946,27 +60545,40 @@ $root.CMsgGCQuestIdentify = (function() { + /** + * Properties of a CMsgGCQuestIdentify. + * @typedef {Object} CMsgGCQuestIdentify.$Properties + * @property {number|Long|null} [quest_id] CMsgGCQuestIdentify quest_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCQuestIdentify. * @exports ICMsgGCQuestIdentify * @interface ICMsgGCQuestIdentify - * @property {number|Long|null} [quest_id] CMsgGCQuestIdentify quest_id + * @augments CMsgGCQuestIdentify.$Properties + * @deprecated Use CMsgGCQuestIdentify.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestIdentify. + * @typedef {CMsgGCQuestIdentify.$Properties} CMsgGCQuestIdentify.$Shape */ /** * Constructs a new CMsgGCQuestIdentify. * @exports CMsgGCQuestIdentify * @classdesc Represents a CMsgGCQuestIdentify. - * @implements ICMsgGCQuestIdentify * @constructor - * @param {ICMsgGCQuestIdentify=} [properties] Properties to set + * @param {CMsgGCQuestIdentify.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestIdentify(properties) { + var CMsgGCQuestIdentify = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestIdentify quest_id. @@ -46981,10 +60593,14 @@ * @function create * @memberof CMsgGCQuestIdentify * @static - * @param {ICMsgGCQuestIdentify=} [properties] Properties to set + * @param {CMsgGCQuestIdentify.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestIdentify} CMsgGCQuestIdentify instance + * @type {{ + * (properties: CMsgGCQuestIdentify.$Shape): CMsgGCQuestIdentify & CMsgGCQuestIdentify.$Shape; + * (properties?: CMsgGCQuestIdentify.$Properties): CMsgGCQuestIdentify; + * }} */ - CMsgGCQuestIdentify.create = function create(properties) { + CMsgGCQuestIdentify.create = function(properties) { return new CMsgGCQuestIdentify(properties); }; @@ -46993,15 +60609,22 @@ * @function encode * @memberof CMsgGCQuestIdentify * @static - * @param {ICMsgGCQuestIdentify} message CMsgGCQuestIdentify message or plain object to encode + * @param {CMsgGCQuestIdentify.$Properties} message CMsgGCQuestIdentify message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestIdentify.encode = function encode(message, writer) { + CMsgGCQuestIdentify.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.quest_id != null && Object.hasOwnProperty.call(message, "quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.quest_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -47010,12 +60633,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestIdentify * @static - * @param {ICMsgGCQuestIdentify} message CMsgGCQuestIdentify message or plain object to encode + * @param {CMsgGCQuestIdentify.$Properties} message CMsgGCQuestIdentify message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestIdentify.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestIdentify.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -47025,25 +60648,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestIdentify} CMsgGCQuestIdentify + * @returns {CMsgGCQuestIdentify & CMsgGCQuestIdentify.$Shape} CMsgGCQuestIdentify * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestIdentify.decode = function decode(reader, length) { + CMsgGCQuestIdentify.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestIdentify(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestIdentify(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quest_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.quest_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -47053,11 +60693,11 @@ * @memberof CMsgGCQuestIdentify * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestIdentify} CMsgGCQuestIdentify + * @returns {CMsgGCQuestIdentify & CMsgGCQuestIdentify.$Shape} CMsgGCQuestIdentify * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestIdentify.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestIdentify.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -47071,10 +60711,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestIdentify.verify = function verify(message) { + CMsgGCQuestIdentify.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) if (!$util.isInteger(message.quest_id) && !(message.quest_id && $util.isInteger(message.quest_id.low) && $util.isInteger(message.quest_id.high))) return "quest_id: integer|Long expected"; return null; @@ -47088,15 +60732,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestIdentify} CMsgGCQuestIdentify */ - CMsgGCQuestIdentify.fromObject = function fromObject(object) { + CMsgGCQuestIdentify.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestIdentify) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestIdentify: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestIdentify(); if (object.quest_id != null) if ($util.Long) - (message.quest_id = $util.Long.fromValue(object.quest_id)).unsigned = true; + message.quest_id = $util.Long.fromValue(object.quest_id, true); else if (typeof object.quest_id === "string") - message.quest_id = parseInt(object.quest_id, 10); + message.quest_id = $parseInt(object.quest_id, 10); else if (typeof object.quest_id === "number") message.quest_id = object.quest_id; else if (typeof object.quest_id === "object") @@ -47113,21 +60763,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestIdentify.toObject = function toObject(message, options) { + CMsgGCQuestIdentify.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.quest_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.quest_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.quest_id = options.longs === String ? "0" : 0; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) - if (typeof message.quest_id === "number") - object.quest_id = options.longs === String ? String(message.quest_id) : message.quest_id; + object.quest_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.quest_id = typeof message.quest_id === "number" ? $BigInt(message.quest_id) : $util.Long.fromBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0, true).toBigInt(); + else if (typeof message.quest_id === "number") + object.quest_id = options.longs === $String ? $String(message.quest_id) : message.quest_id; else - object.quest_id = options.longs === String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; + object.quest_id = options.longs === $String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === $Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; return object; }; @@ -47138,8 +60794,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestIdentify.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestIdentify.prototype.toJSON = function() { + return CMsgGCQuestIdentify.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestIdentify + * @function getTypeUrl + * @memberof CMsgGCQuestIdentify + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestIdentify.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestIdentify"; }; return CMsgGCQuestIdentify; @@ -47147,27 +60817,40 @@ $root.CMsgGCQuestDevGive = (function() { + /** + * Properties of a CMsgGCQuestDevGive. + * @typedef {Object} CMsgGCQuestDevGive.$Properties + * @property {number|null} [quest_def_index] CMsgGCQuestDevGive quest_def_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCQuestDevGive. * @exports ICMsgGCQuestDevGive * @interface ICMsgGCQuestDevGive - * @property {number|null} [quest_def_index] CMsgGCQuestDevGive quest_def_index + * @augments CMsgGCQuestDevGive.$Properties + * @deprecated Use CMsgGCQuestDevGive.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestDevGive. + * @typedef {CMsgGCQuestDevGive.$Properties} CMsgGCQuestDevGive.$Shape */ /** * Constructs a new CMsgGCQuestDevGive. * @exports CMsgGCQuestDevGive * @classdesc Represents a CMsgGCQuestDevGive. - * @implements ICMsgGCQuestDevGive * @constructor - * @param {ICMsgGCQuestDevGive=} [properties] Properties to set + * @param {CMsgGCQuestDevGive.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestDevGive(properties) { + var CMsgGCQuestDevGive = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestDevGive quest_def_index. @@ -47182,10 +60865,14 @@ * @function create * @memberof CMsgGCQuestDevGive * @static - * @param {ICMsgGCQuestDevGive=} [properties] Properties to set + * @param {CMsgGCQuestDevGive.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestDevGive} CMsgGCQuestDevGive instance + * @type {{ + * (properties: CMsgGCQuestDevGive.$Shape): CMsgGCQuestDevGive & CMsgGCQuestDevGive.$Shape; + * (properties?: CMsgGCQuestDevGive.$Properties): CMsgGCQuestDevGive; + * }} */ - CMsgGCQuestDevGive.create = function create(properties) { + CMsgGCQuestDevGive.create = function(properties) { return new CMsgGCQuestDevGive(properties); }; @@ -47194,15 +60881,22 @@ * @function encode * @memberof CMsgGCQuestDevGive * @static - * @param {ICMsgGCQuestDevGive} message CMsgGCQuestDevGive message or plain object to encode + * @param {CMsgGCQuestDevGive.$Properties} message CMsgGCQuestDevGive message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestDevGive.encode = function encode(message, writer) { + CMsgGCQuestDevGive.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.quest_def_index != null && Object.hasOwnProperty.call(message, "quest_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.quest_def_index != null && $Object.hasOwnProperty.call(message, "quest_def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.quest_def_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -47211,12 +60905,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestDevGive * @static - * @param {ICMsgGCQuestDevGive} message CMsgGCQuestDevGive message or plain object to encode + * @param {CMsgGCQuestDevGive.$Properties} message CMsgGCQuestDevGive message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestDevGive.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestDevGive.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -47226,25 +60920,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestDevGive} CMsgGCQuestDevGive + * @returns {CMsgGCQuestDevGive & CMsgGCQuestDevGive.$Shape} CMsgGCQuestDevGive * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestDevGive.decode = function decode(reader, length) { + CMsgGCQuestDevGive.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestDevGive(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestDevGive(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quest_def_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.quest_def_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -47254,11 +60965,11 @@ * @memberof CMsgGCQuestDevGive * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestDevGive} CMsgGCQuestDevGive + * @returns {CMsgGCQuestDevGive & CMsgGCQuestDevGive.$Shape} CMsgGCQuestDevGive * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestDevGive.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestDevGive.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -47272,10 +60983,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestDevGive.verify = function verify(message) { + CMsgGCQuestDevGive.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.quest_def_index != null && message.hasOwnProperty("quest_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.quest_def_index != null && $Object.hasOwnProperty.call(message, "quest_def_index")) if (!$util.isInteger(message.quest_def_index)) return "quest_def_index: integer expected"; return null; @@ -47289,9 +61004,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestDevGive} CMsgGCQuestDevGive */ - CMsgGCQuestDevGive.fromObject = function fromObject(object) { + CMsgGCQuestDevGive.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestDevGive) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestDevGive: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestDevGive(); if (object.quest_def_index != null) message.quest_def_index = object.quest_def_index >>> 0; @@ -47307,13 +61028,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestDevGive.toObject = function toObject(message, options) { + CMsgGCQuestDevGive.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.quest_def_index = 0; - if (message.quest_def_index != null && message.hasOwnProperty("quest_def_index")) + if (message.quest_def_index != null && $Object.hasOwnProperty.call(message, "quest_def_index")) object.quest_def_index = message.quest_def_index; return object; }; @@ -47325,8 +61050,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestDevGive.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestDevGive.prototype.toJSON = function() { + return CMsgGCQuestDevGive.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestDevGive + * @function getTypeUrl + * @memberof CMsgGCQuestDevGive + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestDevGive.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestDevGive"; }; return CMsgGCQuestDevGive; @@ -47334,27 +61073,40 @@ $root.CMsgGCQuestNodeTurnIn = (function() { + /** + * Properties of a CMsgGCQuestNodeTurnIn. + * @typedef {Object} CMsgGCQuestNodeTurnIn.$Properties + * @property {number|null} [node_defindex] CMsgGCQuestNodeTurnIn node_defindex + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCQuestNodeTurnIn. * @exports ICMsgGCQuestNodeTurnIn * @interface ICMsgGCQuestNodeTurnIn - * @property {number|null} [node_defindex] CMsgGCQuestNodeTurnIn node_defindex + * @augments CMsgGCQuestNodeTurnIn.$Properties + * @deprecated Use CMsgGCQuestNodeTurnIn.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestNodeTurnIn. + * @typedef {CMsgGCQuestNodeTurnIn.$Properties} CMsgGCQuestNodeTurnIn.$Shape */ /** * Constructs a new CMsgGCQuestNodeTurnIn. * @exports CMsgGCQuestNodeTurnIn * @classdesc Represents a CMsgGCQuestNodeTurnIn. - * @implements ICMsgGCQuestNodeTurnIn * @constructor - * @param {ICMsgGCQuestNodeTurnIn=} [properties] Properties to set + * @param {CMsgGCQuestNodeTurnIn.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestNodeTurnIn(properties) { + var CMsgGCQuestNodeTurnIn = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestNodeTurnIn node_defindex. @@ -47369,10 +61121,14 @@ * @function create * @memberof CMsgGCQuestNodeTurnIn * @static - * @param {ICMsgGCQuestNodeTurnIn=} [properties] Properties to set + * @param {CMsgGCQuestNodeTurnIn.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestNodeTurnIn} CMsgGCQuestNodeTurnIn instance + * @type {{ + * (properties: CMsgGCQuestNodeTurnIn.$Shape): CMsgGCQuestNodeTurnIn & CMsgGCQuestNodeTurnIn.$Shape; + * (properties?: CMsgGCQuestNodeTurnIn.$Properties): CMsgGCQuestNodeTurnIn; + * }} */ - CMsgGCQuestNodeTurnIn.create = function create(properties) { + CMsgGCQuestNodeTurnIn.create = function(properties) { return new CMsgGCQuestNodeTurnIn(properties); }; @@ -47381,15 +61137,22 @@ * @function encode * @memberof CMsgGCQuestNodeTurnIn * @static - * @param {ICMsgGCQuestNodeTurnIn} message CMsgGCQuestNodeTurnIn message or plain object to encode + * @param {CMsgGCQuestNodeTurnIn.$Properties} message CMsgGCQuestNodeTurnIn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestNodeTurnIn.encode = function encode(message, writer) { + CMsgGCQuestNodeTurnIn.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.node_defindex != null && Object.hasOwnProperty.call(message, "node_defindex")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.node_defindex != null && $Object.hasOwnProperty.call(message, "node_defindex")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.node_defindex); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -47398,12 +61161,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestNodeTurnIn * @static - * @param {ICMsgGCQuestNodeTurnIn} message CMsgGCQuestNodeTurnIn message or plain object to encode + * @param {CMsgGCQuestNodeTurnIn.$Properties} message CMsgGCQuestNodeTurnIn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestNodeTurnIn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestNodeTurnIn.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -47413,25 +61176,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestNodeTurnIn} CMsgGCQuestNodeTurnIn + * @returns {CMsgGCQuestNodeTurnIn & CMsgGCQuestNodeTurnIn.$Shape} CMsgGCQuestNodeTurnIn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestNodeTurnIn.decode = function decode(reader, length) { + CMsgGCQuestNodeTurnIn.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestNodeTurnIn(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestNodeTurnIn(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.node_defindex = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.node_defindex = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -47441,11 +61221,11 @@ * @memberof CMsgGCQuestNodeTurnIn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestNodeTurnIn} CMsgGCQuestNodeTurnIn + * @returns {CMsgGCQuestNodeTurnIn & CMsgGCQuestNodeTurnIn.$Shape} CMsgGCQuestNodeTurnIn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestNodeTurnIn.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestNodeTurnIn.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -47459,10 +61239,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestNodeTurnIn.verify = function verify(message) { + CMsgGCQuestNodeTurnIn.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.node_defindex != null && message.hasOwnProperty("node_defindex")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.node_defindex != null && $Object.hasOwnProperty.call(message, "node_defindex")) if (!$util.isInteger(message.node_defindex)) return "node_defindex: integer expected"; return null; @@ -47476,9 +61260,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestNodeTurnIn} CMsgGCQuestNodeTurnIn */ - CMsgGCQuestNodeTurnIn.fromObject = function fromObject(object) { + CMsgGCQuestNodeTurnIn.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestNodeTurnIn) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestNodeTurnIn: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestNodeTurnIn(); if (object.node_defindex != null) message.node_defindex = object.node_defindex >>> 0; @@ -47494,13 +61284,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestNodeTurnIn.toObject = function toObject(message, options) { + CMsgGCQuestNodeTurnIn.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.node_defindex = 0; - if (message.node_defindex != null && message.hasOwnProperty("node_defindex")) + if (message.node_defindex != null && $Object.hasOwnProperty.call(message, "node_defindex")) object.node_defindex = message.node_defindex; return object; }; @@ -47512,8 +61306,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestNodeTurnIn.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestNodeTurnIn.prototype.toJSON = function() { + return CMsgGCQuestNodeTurnIn.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestNodeTurnIn + * @function getTypeUrl + * @memberof CMsgGCQuestNodeTurnIn + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestNodeTurnIn.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestNodeTurnIn"; }; return CMsgGCQuestNodeTurnIn; @@ -47523,26 +61331,39 @@ /** * Properties of a CMsgGCQuestMapUnlockNode. - * @exports ICMsgGCQuestMapUnlockNode - * @interface ICMsgGCQuestMapUnlockNode + * @typedef {Object} CMsgGCQuestMapUnlockNode.$Properties * @property {number|null} [node_defindex] CMsgGCQuestMapUnlockNode node_defindex * @property {number|null} [quest_defindex] CMsgGCQuestMapUnlockNode quest_defindex + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCQuestMapUnlockNode. + * @exports ICMsgGCQuestMapUnlockNode + * @interface ICMsgGCQuestMapUnlockNode + * @augments CMsgGCQuestMapUnlockNode.$Properties + * @deprecated Use CMsgGCQuestMapUnlockNode.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestMapUnlockNode. + * @typedef {CMsgGCQuestMapUnlockNode.$Properties} CMsgGCQuestMapUnlockNode.$Shape */ /** * Constructs a new CMsgGCQuestMapUnlockNode. * @exports CMsgGCQuestMapUnlockNode * @classdesc Represents a CMsgGCQuestMapUnlockNode. - * @implements ICMsgGCQuestMapUnlockNode * @constructor - * @param {ICMsgGCQuestMapUnlockNode=} [properties] Properties to set + * @param {CMsgGCQuestMapUnlockNode.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestMapUnlockNode(properties) { + var CMsgGCQuestMapUnlockNode = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestMapUnlockNode node_defindex. @@ -47565,10 +61386,14 @@ * @function create * @memberof CMsgGCQuestMapUnlockNode * @static - * @param {ICMsgGCQuestMapUnlockNode=} [properties] Properties to set + * @param {CMsgGCQuestMapUnlockNode.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestMapUnlockNode} CMsgGCQuestMapUnlockNode instance + * @type {{ + * (properties: CMsgGCQuestMapUnlockNode.$Shape): CMsgGCQuestMapUnlockNode & CMsgGCQuestMapUnlockNode.$Shape; + * (properties?: CMsgGCQuestMapUnlockNode.$Properties): CMsgGCQuestMapUnlockNode; + * }} */ - CMsgGCQuestMapUnlockNode.create = function create(properties) { + CMsgGCQuestMapUnlockNode.create = function(properties) { return new CMsgGCQuestMapUnlockNode(properties); }; @@ -47577,17 +61402,24 @@ * @function encode * @memberof CMsgGCQuestMapUnlockNode * @static - * @param {ICMsgGCQuestMapUnlockNode} message CMsgGCQuestMapUnlockNode message or plain object to encode + * @param {CMsgGCQuestMapUnlockNode.$Properties} message CMsgGCQuestMapUnlockNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestMapUnlockNode.encode = function encode(message, writer) { + CMsgGCQuestMapUnlockNode.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.node_defindex != null && Object.hasOwnProperty.call(message, "node_defindex")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.node_defindex != null && $Object.hasOwnProperty.call(message, "node_defindex")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.node_defindex); - if (message.quest_defindex != null && Object.hasOwnProperty.call(message, "quest_defindex")) + if (message.quest_defindex != null && $Object.hasOwnProperty.call(message, "quest_defindex")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.quest_defindex); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -47596,12 +61428,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestMapUnlockNode * @static - * @param {ICMsgGCQuestMapUnlockNode} message CMsgGCQuestMapUnlockNode message or plain object to encode + * @param {CMsgGCQuestMapUnlockNode.$Properties} message CMsgGCQuestMapUnlockNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestMapUnlockNode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestMapUnlockNode.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -47611,28 +61443,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestMapUnlockNode} CMsgGCQuestMapUnlockNode + * @returns {CMsgGCQuestMapUnlockNode & CMsgGCQuestMapUnlockNode.$Shape} CMsgGCQuestMapUnlockNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestMapUnlockNode.decode = function decode(reader, length) { + CMsgGCQuestMapUnlockNode.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestMapUnlockNode(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestMapUnlockNode(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.node_defindex = reader.uint32(); - break; - case 2: - message.quest_defindex = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.node_defindex = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.quest_defindex = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -47642,11 +61494,11 @@ * @memberof CMsgGCQuestMapUnlockNode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestMapUnlockNode} CMsgGCQuestMapUnlockNode + * @returns {CMsgGCQuestMapUnlockNode & CMsgGCQuestMapUnlockNode.$Shape} CMsgGCQuestMapUnlockNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestMapUnlockNode.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestMapUnlockNode.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -47660,13 +61512,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestMapUnlockNode.verify = function verify(message) { + CMsgGCQuestMapUnlockNode.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.node_defindex != null && message.hasOwnProperty("node_defindex")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.node_defindex != null && $Object.hasOwnProperty.call(message, "node_defindex")) if (!$util.isInteger(message.node_defindex)) return "node_defindex: integer expected"; - if (message.quest_defindex != null && message.hasOwnProperty("quest_defindex")) + if (message.quest_defindex != null && $Object.hasOwnProperty.call(message, "quest_defindex")) if (!$util.isInteger(message.quest_defindex)) return "quest_defindex: integer expected"; return null; @@ -47680,9 +61536,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestMapUnlockNode} CMsgGCQuestMapUnlockNode */ - CMsgGCQuestMapUnlockNode.fromObject = function fromObject(object) { + CMsgGCQuestMapUnlockNode.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestMapUnlockNode) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestMapUnlockNode: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestMapUnlockNode(); if (object.node_defindex != null) message.node_defindex = object.node_defindex >>> 0; @@ -47700,17 +61562,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestMapUnlockNode.toObject = function toObject(message, options) { + CMsgGCQuestMapUnlockNode.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.node_defindex = 0; object.quest_defindex = 0; } - if (message.node_defindex != null && message.hasOwnProperty("node_defindex")) + if (message.node_defindex != null && $Object.hasOwnProperty.call(message, "node_defindex")) object.node_defindex = message.node_defindex; - if (message.quest_defindex != null && message.hasOwnProperty("quest_defindex")) + if (message.quest_defindex != null && $Object.hasOwnProperty.call(message, "quest_defindex")) object.quest_defindex = message.quest_defindex; return object; }; @@ -47722,8 +61588,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestMapUnlockNode.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestMapUnlockNode.prototype.toJSON = function() { + return CMsgGCQuestMapUnlockNode.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestMapUnlockNode + * @function getTypeUrl + * @memberof CMsgGCQuestMapUnlockNode + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestMapUnlockNode.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestMapUnlockNode"; }; return CMsgGCQuestMapUnlockNode; @@ -47733,27 +61613,40 @@ /** * Properties of a CMsgGCNewMatchForLobbyRequest. - * @exports ICMsgGCNewMatchForLobbyRequest - * @interface ICMsgGCNewMatchForLobbyRequest + * @typedef {Object} CMsgGCNewMatchForLobbyRequest.$Properties * @property {number|Long|null} [current_match_id] CMsgGCNewMatchForLobbyRequest current_match_id * @property {number|null} [next_map_id] CMsgGCNewMatchForLobbyRequest next_map_id * @property {number|Long|null} [lobby_id] CMsgGCNewMatchForLobbyRequest lobby_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCNewMatchForLobbyRequest. + * @exports ICMsgGCNewMatchForLobbyRequest + * @interface ICMsgGCNewMatchForLobbyRequest + * @augments CMsgGCNewMatchForLobbyRequest.$Properties + * @deprecated Use CMsgGCNewMatchForLobbyRequest.$Properties instead. + */ + + /** + * Shape of a CMsgGCNewMatchForLobbyRequest. + * @typedef {CMsgGCNewMatchForLobbyRequest.$Properties} CMsgGCNewMatchForLobbyRequest.$Shape */ /** * Constructs a new CMsgGCNewMatchForLobbyRequest. * @exports CMsgGCNewMatchForLobbyRequest * @classdesc Represents a CMsgGCNewMatchForLobbyRequest. - * @implements ICMsgGCNewMatchForLobbyRequest * @constructor - * @param {ICMsgGCNewMatchForLobbyRequest=} [properties] Properties to set + * @param {CMsgGCNewMatchForLobbyRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCNewMatchForLobbyRequest(properties) { + var CMsgGCNewMatchForLobbyRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCNewMatchForLobbyRequest current_match_id. @@ -47784,10 +61677,14 @@ * @function create * @memberof CMsgGCNewMatchForLobbyRequest * @static - * @param {ICMsgGCNewMatchForLobbyRequest=} [properties] Properties to set + * @param {CMsgGCNewMatchForLobbyRequest.$Properties=} [properties] Properties to set * @returns {CMsgGCNewMatchForLobbyRequest} CMsgGCNewMatchForLobbyRequest instance + * @type {{ + * (properties: CMsgGCNewMatchForLobbyRequest.$Shape): CMsgGCNewMatchForLobbyRequest & CMsgGCNewMatchForLobbyRequest.$Shape; + * (properties?: CMsgGCNewMatchForLobbyRequest.$Properties): CMsgGCNewMatchForLobbyRequest; + * }} */ - CMsgGCNewMatchForLobbyRequest.create = function create(properties) { + CMsgGCNewMatchForLobbyRequest.create = function(properties) { return new CMsgGCNewMatchForLobbyRequest(properties); }; @@ -47796,19 +61693,26 @@ * @function encode * @memberof CMsgGCNewMatchForLobbyRequest * @static - * @param {ICMsgGCNewMatchForLobbyRequest} message CMsgGCNewMatchForLobbyRequest message or plain object to encode + * @param {CMsgGCNewMatchForLobbyRequest.$Properties} message CMsgGCNewMatchForLobbyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNewMatchForLobbyRequest.encode = function encode(message, writer) { + CMsgGCNewMatchForLobbyRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.current_match_id != null && Object.hasOwnProperty.call(message, "current_match_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.current_match_id != null && $Object.hasOwnProperty.call(message, "current_match_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.current_match_id); - if (message.next_map_id != null && Object.hasOwnProperty.call(message, "next_map_id")) + if (message.next_map_id != null && $Object.hasOwnProperty.call(message, "next_map_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.next_map_id); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.lobby_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -47817,12 +61721,12 @@ * @function encodeDelimited * @memberof CMsgGCNewMatchForLobbyRequest * @static - * @param {ICMsgGCNewMatchForLobbyRequest} message CMsgGCNewMatchForLobbyRequest message or plain object to encode + * @param {CMsgGCNewMatchForLobbyRequest.$Properties} message CMsgGCNewMatchForLobbyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNewMatchForLobbyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCNewMatchForLobbyRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -47832,31 +61736,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCNewMatchForLobbyRequest} CMsgGCNewMatchForLobbyRequest + * @returns {CMsgGCNewMatchForLobbyRequest & CMsgGCNewMatchForLobbyRequest.$Shape} CMsgGCNewMatchForLobbyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNewMatchForLobbyRequest.decode = function decode(reader, length) { + CMsgGCNewMatchForLobbyRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCNewMatchForLobbyRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCNewMatchForLobbyRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.current_match_id = reader.uint64(); - break; - case 2: - message.next_map_id = reader.uint32(); - break; - case 3: - message.lobby_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.current_match_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.next_map_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.lobby_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -47866,11 +61793,11 @@ * @memberof CMsgGCNewMatchForLobbyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCNewMatchForLobbyRequest} CMsgGCNewMatchForLobbyRequest + * @returns {CMsgGCNewMatchForLobbyRequest & CMsgGCNewMatchForLobbyRequest.$Shape} CMsgGCNewMatchForLobbyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNewMatchForLobbyRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgGCNewMatchForLobbyRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -47884,16 +61811,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCNewMatchForLobbyRequest.verify = function verify(message) { + CMsgGCNewMatchForLobbyRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.current_match_id != null && message.hasOwnProperty("current_match_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.current_match_id != null && $Object.hasOwnProperty.call(message, "current_match_id")) if (!$util.isInteger(message.current_match_id) && !(message.current_match_id && $util.isInteger(message.current_match_id.low) && $util.isInteger(message.current_match_id.high))) return "current_match_id: integer|Long expected"; - if (message.next_map_id != null && message.hasOwnProperty("next_map_id")) + if (message.next_map_id != null && $Object.hasOwnProperty.call(message, "next_map_id")) if (!$util.isInteger(message.next_map_id)) return "next_map_id: integer expected"; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; return null; @@ -47907,15 +61838,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCNewMatchForLobbyRequest} CMsgGCNewMatchForLobbyRequest */ - CMsgGCNewMatchForLobbyRequest.fromObject = function fromObject(object) { + CMsgGCNewMatchForLobbyRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCNewMatchForLobbyRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCNewMatchForLobbyRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCNewMatchForLobbyRequest(); if (object.current_match_id != null) if ($util.Long) - (message.current_match_id = $util.Long.fromValue(object.current_match_id)).unsigned = true; + message.current_match_id = $util.Long.fromValue(object.current_match_id, true); else if (typeof object.current_match_id === "string") - message.current_match_id = parseInt(object.current_match_id, 10); + message.current_match_id = $parseInt(object.current_match_id, 10); else if (typeof object.current_match_id === "number") message.current_match_id = object.current_match_id; else if (typeof object.current_match_id === "object") @@ -47924,9 +61861,9 @@ message.next_map_id = object.next_map_id >>> 0; if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = true; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") @@ -47943,35 +61880,43 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCNewMatchForLobbyRequest.toObject = function toObject(message, options) { + CMsgGCNewMatchForLobbyRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.current_match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.current_match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.current_match_id = options.longs === String ? "0" : 0; + object.current_match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.next_map_id = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.current_match_id != null && message.hasOwnProperty("current_match_id")) - if (typeof message.current_match_id === "number") - object.current_match_id = options.longs === String ? String(message.current_match_id) : message.current_match_id; + if (message.current_match_id != null && $Object.hasOwnProperty.call(message, "current_match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.current_match_id = typeof message.current_match_id === "number" ? $BigInt(message.current_match_id) : $util.Long.fromBits(message.current_match_id.low >>> 0, message.current_match_id.high >>> 0, true).toBigInt(); + else if (typeof message.current_match_id === "number") + object.current_match_id = options.longs === $String ? $String(message.current_match_id) : message.current_match_id; else - object.current_match_id = options.longs === String ? $util.Long.prototype.toString.call(message.current_match_id) : options.longs === Number ? new $util.LongBits(message.current_match_id.low >>> 0, message.current_match_id.high >>> 0).toNumber(true) : message.current_match_id; - if (message.next_map_id != null && message.hasOwnProperty("next_map_id")) + object.current_match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.current_match_id) : options.longs === $Number ? new $util.LongBits(message.current_match_id.low >>> 0, message.current_match_id.high >>> 0).toNumber(true) : message.current_match_id; + if (message.next_map_id != null && $Object.hasOwnProperty.call(message, "next_map_id")) object.next_map_id = message.next_map_id; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; return object; }; @@ -47982,8 +61927,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCNewMatchForLobbyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCNewMatchForLobbyRequest.prototype.toJSON = function() { + return CMsgGCNewMatchForLobbyRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCNewMatchForLobbyRequest + * @function getTypeUrl + * @memberof CMsgGCNewMatchForLobbyRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCNewMatchForLobbyRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCNewMatchForLobbyRequest"; }; return CMsgGCNewMatchForLobbyRequest; @@ -47991,27 +61950,40 @@ $root.CMsgGCNewMatchForLobbyResponse = (function() { + /** + * Properties of a CMsgGCNewMatchForLobbyResponse. + * @typedef {Object} CMsgGCNewMatchForLobbyResponse.$Properties + * @property {boolean|null} [success] CMsgGCNewMatchForLobbyResponse success + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCNewMatchForLobbyResponse. * @exports ICMsgGCNewMatchForLobbyResponse * @interface ICMsgGCNewMatchForLobbyResponse - * @property {boolean|null} [success] CMsgGCNewMatchForLobbyResponse success + * @augments CMsgGCNewMatchForLobbyResponse.$Properties + * @deprecated Use CMsgGCNewMatchForLobbyResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCNewMatchForLobbyResponse. + * @typedef {CMsgGCNewMatchForLobbyResponse.$Properties} CMsgGCNewMatchForLobbyResponse.$Shape */ /** * Constructs a new CMsgGCNewMatchForLobbyResponse. * @exports CMsgGCNewMatchForLobbyResponse * @classdesc Represents a CMsgGCNewMatchForLobbyResponse. - * @implements ICMsgGCNewMatchForLobbyResponse * @constructor - * @param {ICMsgGCNewMatchForLobbyResponse=} [properties] Properties to set + * @param {CMsgGCNewMatchForLobbyResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCNewMatchForLobbyResponse(properties) { + var CMsgGCNewMatchForLobbyResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCNewMatchForLobbyResponse success. @@ -48026,10 +61998,14 @@ * @function create * @memberof CMsgGCNewMatchForLobbyResponse * @static - * @param {ICMsgGCNewMatchForLobbyResponse=} [properties] Properties to set + * @param {CMsgGCNewMatchForLobbyResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCNewMatchForLobbyResponse} CMsgGCNewMatchForLobbyResponse instance + * @type {{ + * (properties: CMsgGCNewMatchForLobbyResponse.$Shape): CMsgGCNewMatchForLobbyResponse & CMsgGCNewMatchForLobbyResponse.$Shape; + * (properties?: CMsgGCNewMatchForLobbyResponse.$Properties): CMsgGCNewMatchForLobbyResponse; + * }} */ - CMsgGCNewMatchForLobbyResponse.create = function create(properties) { + CMsgGCNewMatchForLobbyResponse.create = function(properties) { return new CMsgGCNewMatchForLobbyResponse(properties); }; @@ -48038,15 +62014,22 @@ * @function encode * @memberof CMsgGCNewMatchForLobbyResponse * @static - * @param {ICMsgGCNewMatchForLobbyResponse} message CMsgGCNewMatchForLobbyResponse message or plain object to encode + * @param {CMsgGCNewMatchForLobbyResponse.$Properties} message CMsgGCNewMatchForLobbyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNewMatchForLobbyResponse.encode = function encode(message, writer) { + CMsgGCNewMatchForLobbyResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.success != null && Object.hasOwnProperty.call(message, "success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -48055,12 +62038,12 @@ * @function encodeDelimited * @memberof CMsgGCNewMatchForLobbyResponse * @static - * @param {ICMsgGCNewMatchForLobbyResponse} message CMsgGCNewMatchForLobbyResponse message or plain object to encode + * @param {CMsgGCNewMatchForLobbyResponse.$Properties} message CMsgGCNewMatchForLobbyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNewMatchForLobbyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCNewMatchForLobbyResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -48070,25 +62053,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCNewMatchForLobbyResponse} CMsgGCNewMatchForLobbyResponse + * @returns {CMsgGCNewMatchForLobbyResponse & CMsgGCNewMatchForLobbyResponse.$Shape} CMsgGCNewMatchForLobbyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNewMatchForLobbyResponse.decode = function decode(reader, length) { + CMsgGCNewMatchForLobbyResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCNewMatchForLobbyResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCNewMatchForLobbyResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.success = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -48098,11 +62098,11 @@ * @memberof CMsgGCNewMatchForLobbyResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCNewMatchForLobbyResponse} CMsgGCNewMatchForLobbyResponse + * @returns {CMsgGCNewMatchForLobbyResponse & CMsgGCNewMatchForLobbyResponse.$Shape} CMsgGCNewMatchForLobbyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNewMatchForLobbyResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCNewMatchForLobbyResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -48116,10 +62116,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCNewMatchForLobbyResponse.verify = function verify(message) { + CMsgGCNewMatchForLobbyResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.success != null && message.hasOwnProperty("success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; return null; @@ -48133,12 +62137,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCNewMatchForLobbyResponse} CMsgGCNewMatchForLobbyResponse */ - CMsgGCNewMatchForLobbyResponse.fromObject = function fromObject(object) { + CMsgGCNewMatchForLobbyResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCNewMatchForLobbyResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCNewMatchForLobbyResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCNewMatchForLobbyResponse(); if (object.success != null) - message.success = Boolean(object.success); + message.success = $Boolean(object.success); return message; }; @@ -48151,13 +62161,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCNewMatchForLobbyResponse.toObject = function toObject(message, options) { + CMsgGCNewMatchForLobbyResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.success = false; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) object.success = message.success; return object; }; @@ -48169,8 +62183,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCNewMatchForLobbyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCNewMatchForLobbyResponse.prototype.toJSON = function() { + return CMsgGCNewMatchForLobbyResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCNewMatchForLobbyResponse + * @function getTypeUrl + * @memberof CMsgGCNewMatchForLobbyResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCNewMatchForLobbyResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCNewMatchForLobbyResponse"; }; return CMsgGCNewMatchForLobbyResponse; @@ -48180,28 +62208,41 @@ /** * Properties of a CMsgGCChangeMatchPlayerTeamsRequest. - * @exports ICMsgGCChangeMatchPlayerTeamsRequest - * @interface ICMsgGCChangeMatchPlayerTeamsRequest + * @typedef {Object} CMsgGCChangeMatchPlayerTeamsRequest.$Properties * @property {number|Long|null} [match_id] CMsgGCChangeMatchPlayerTeamsRequest match_id * @property {number|Long|null} [lobby_id] CMsgGCChangeMatchPlayerTeamsRequest lobby_id - * @property {Array.|null} [member] CMsgGCChangeMatchPlayerTeamsRequest member + * @property {Array.|null} [member] CMsgGCChangeMatchPlayerTeamsRequest member + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCChangeMatchPlayerTeamsRequest. + * @exports ICMsgGCChangeMatchPlayerTeamsRequest + * @interface ICMsgGCChangeMatchPlayerTeamsRequest + * @augments CMsgGCChangeMatchPlayerTeamsRequest.$Properties + * @deprecated Use CMsgGCChangeMatchPlayerTeamsRequest.$Properties instead. + */ + + /** + * Shape of a CMsgGCChangeMatchPlayerTeamsRequest. + * @typedef {CMsgGCChangeMatchPlayerTeamsRequest.$Properties} CMsgGCChangeMatchPlayerTeamsRequest.$Shape */ /** * Constructs a new CMsgGCChangeMatchPlayerTeamsRequest. * @exports CMsgGCChangeMatchPlayerTeamsRequest * @classdesc Represents a CMsgGCChangeMatchPlayerTeamsRequest. - * @implements ICMsgGCChangeMatchPlayerTeamsRequest * @constructor - * @param {ICMsgGCChangeMatchPlayerTeamsRequest=} [properties] Properties to set + * @param {CMsgGCChangeMatchPlayerTeamsRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCChangeMatchPlayerTeamsRequest(properties) { + var CMsgGCChangeMatchPlayerTeamsRequest = function (properties) { this.member = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCChangeMatchPlayerTeamsRequest match_id. @@ -48221,7 +62262,7 @@ /** * CMsgGCChangeMatchPlayerTeamsRequest member. - * @member {Array.} member + * @member {Array.} member * @memberof CMsgGCChangeMatchPlayerTeamsRequest * @instance */ @@ -48232,10 +62273,14 @@ * @function create * @memberof CMsgGCChangeMatchPlayerTeamsRequest * @static - * @param {ICMsgGCChangeMatchPlayerTeamsRequest=} [properties] Properties to set + * @param {CMsgGCChangeMatchPlayerTeamsRequest.$Properties=} [properties] Properties to set * @returns {CMsgGCChangeMatchPlayerTeamsRequest} CMsgGCChangeMatchPlayerTeamsRequest instance + * @type {{ + * (properties: CMsgGCChangeMatchPlayerTeamsRequest.$Shape): CMsgGCChangeMatchPlayerTeamsRequest & CMsgGCChangeMatchPlayerTeamsRequest.$Shape; + * (properties?: CMsgGCChangeMatchPlayerTeamsRequest.$Properties): CMsgGCChangeMatchPlayerTeamsRequest; + * }} */ - CMsgGCChangeMatchPlayerTeamsRequest.create = function create(properties) { + CMsgGCChangeMatchPlayerTeamsRequest.create = function(properties) { return new CMsgGCChangeMatchPlayerTeamsRequest(properties); }; @@ -48244,20 +62289,27 @@ * @function encode * @memberof CMsgGCChangeMatchPlayerTeamsRequest * @static - * @param {ICMsgGCChangeMatchPlayerTeamsRequest} message CMsgGCChangeMatchPlayerTeamsRequest message or plain object to encode + * @param {CMsgGCChangeMatchPlayerTeamsRequest.$Properties} message CMsgGCChangeMatchPlayerTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCChangeMatchPlayerTeamsRequest.encode = function encode(message, writer) { + CMsgGCChangeMatchPlayerTeamsRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.match_id != null && Object.hasOwnProperty.call(message, "match_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.match_id); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.lobby_id); if (message.member != null && message.member.length) for (var i = 0; i < message.member.length; ++i) - $root.CMsgGCChangeMatchPlayerTeamsRequest.Member.encode(message.member[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.CMsgGCChangeMatchPlayerTeamsRequest.Member.encode(message.member[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -48266,12 +62318,12 @@ * @function encodeDelimited * @memberof CMsgGCChangeMatchPlayerTeamsRequest * @static - * @param {ICMsgGCChangeMatchPlayerTeamsRequest} message CMsgGCChangeMatchPlayerTeamsRequest message or plain object to encode + * @param {CMsgGCChangeMatchPlayerTeamsRequest.$Properties} message CMsgGCChangeMatchPlayerTeamsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCChangeMatchPlayerTeamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCChangeMatchPlayerTeamsRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -48281,33 +62333,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCChangeMatchPlayerTeamsRequest} CMsgGCChangeMatchPlayerTeamsRequest + * @returns {CMsgGCChangeMatchPlayerTeamsRequest & CMsgGCChangeMatchPlayerTeamsRequest.$Shape} CMsgGCChangeMatchPlayerTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCChangeMatchPlayerTeamsRequest.decode = function decode(reader, length) { + CMsgGCChangeMatchPlayerTeamsRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCChangeMatchPlayerTeamsRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCChangeMatchPlayerTeamsRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.match_id = reader.uint64(); - break; - case 2: - message.lobby_id = reader.uint64(); - break; - case 3: - if (!(message.member && message.member.length)) - message.member = []; - message.member.push($root.CMsgGCChangeMatchPlayerTeamsRequest.Member.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.match_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.lobby_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.member && message.member.length)) + message.member = []; + message.member.push($root.CMsgGCChangeMatchPlayerTeamsRequest.Member.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -48317,11 +62392,11 @@ * @memberof CMsgGCChangeMatchPlayerTeamsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCChangeMatchPlayerTeamsRequest} CMsgGCChangeMatchPlayerTeamsRequest + * @returns {CMsgGCChangeMatchPlayerTeamsRequest & CMsgGCChangeMatchPlayerTeamsRequest.$Shape} CMsgGCChangeMatchPlayerTeamsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCChangeMatchPlayerTeamsRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgGCChangeMatchPlayerTeamsRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -48335,20 +62410,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCChangeMatchPlayerTeamsRequest.verify = function verify(message) { + CMsgGCChangeMatchPlayerTeamsRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.match_id != null && message.hasOwnProperty("match_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) if (!$util.isInteger(message.match_id) && !(message.match_id && $util.isInteger(message.match_id.low) && $util.isInteger(message.match_id.high))) return "match_id: integer|Long expected"; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; - if (message.member != null && message.hasOwnProperty("member")) { - if (!Array.isArray(message.member)) + if (message.member != null && $Object.hasOwnProperty.call(message, "member")) { + if (!$Array.isArray(message.member)) return "member: array expected"; for (var i = 0; i < message.member.length; ++i) { - var error = $root.CMsgGCChangeMatchPlayerTeamsRequest.Member.verify(message.member[i]); + var error = $root.CMsgGCChangeMatchPlayerTeamsRequest.Member.verify(message.member[i], _depth + 1); if (error) return "member." + error; } @@ -48364,36 +62443,42 @@ * @param {Object.} object Plain object * @returns {CMsgGCChangeMatchPlayerTeamsRequest} CMsgGCChangeMatchPlayerTeamsRequest */ - CMsgGCChangeMatchPlayerTeamsRequest.fromObject = function fromObject(object) { + CMsgGCChangeMatchPlayerTeamsRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCChangeMatchPlayerTeamsRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCChangeMatchPlayerTeamsRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCChangeMatchPlayerTeamsRequest(); if (object.match_id != null) if ($util.Long) - (message.match_id = $util.Long.fromValue(object.match_id)).unsigned = true; + message.match_id = $util.Long.fromValue(object.match_id, true); else if (typeof object.match_id === "string") - message.match_id = parseInt(object.match_id, 10); + message.match_id = $parseInt(object.match_id, 10); else if (typeof object.match_id === "number") message.match_id = object.match_id; else if (typeof object.match_id === "object") message.match_id = new $util.LongBits(object.match_id.low >>> 0, object.match_id.high >>> 0).toNumber(true); if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = true; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(true); if (object.member) { - if (!Array.isArray(object.member)) - throw TypeError(".CMsgGCChangeMatchPlayerTeamsRequest.member: array expected"); - message.member = []; + if (!$Array.isArray(object.member)) + throw $TypeError(".CMsgGCChangeMatchPlayerTeamsRequest.member: array expected"); + message.member = $Array(object.member.length); for (var i = 0; i < object.member.length; ++i) { - if (typeof object.member[i] !== "object") - throw TypeError(".CMsgGCChangeMatchPlayerTeamsRequest.member: object expected"); - message.member[i] = $root.CMsgGCChangeMatchPlayerTeamsRequest.Member.fromObject(object.member[i]); + if (!$util.isObject(object.member[i])) + throw $TypeError(".CMsgGCChangeMatchPlayerTeamsRequest.member: object expected"); + message.member[i] = $root.CMsgGCChangeMatchPlayerTeamsRequest.Member.fromObject(object.member[i], _depth + 1); } } return message; @@ -48408,38 +62493,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCChangeMatchPlayerTeamsRequest.toObject = function toObject(message, options) { + CMsgGCChangeMatchPlayerTeamsRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.member = []; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.match_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.match_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.match_id = options.longs === String ? "0" : 0; + object.match_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.match_id != null && message.hasOwnProperty("match_id")) - if (typeof message.match_id === "number") - object.match_id = options.longs === String ? String(message.match_id) : message.match_id; + if (message.match_id != null && $Object.hasOwnProperty.call(message, "match_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.match_id = typeof message.match_id === "number" ? $BigInt(message.match_id) : $util.Long.fromBits(message.match_id.low >>> 0, message.match_id.high >>> 0, true).toBigInt(); + else if (typeof message.match_id === "number") + object.match_id = options.longs === $String ? $String(message.match_id) : message.match_id; else - object.match_id = options.longs === String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + object.match_id = options.longs === $String ? $util.Long.prototype.toString.call(message.match_id) : options.longs === $Number ? new $util.LongBits(message.match_id.low >>> 0, message.match_id.high >>> 0).toNumber(true) : message.match_id; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; if (message.member && message.member.length) { - object.member = []; + object.member = $Array(message.member.length); for (var j = 0; j < message.member.length; ++j) - object.member[j] = $root.CMsgGCChangeMatchPlayerTeamsRequest.Member.toObject(message.member[j], options); + object.member[j] = $root.CMsgGCChangeMatchPlayerTeamsRequest.Member.toObject(message.member[j], options, _depth + 1); } return object; }; @@ -48451,34 +62544,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCChangeMatchPlayerTeamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCChangeMatchPlayerTeamsRequest.prototype.toJSON = function() { + return CMsgGCChangeMatchPlayerTeamsRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCChangeMatchPlayerTeamsRequest + * @function getTypeUrl + * @memberof CMsgGCChangeMatchPlayerTeamsRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCChangeMatchPlayerTeamsRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCChangeMatchPlayerTeamsRequest"; }; CMsgGCChangeMatchPlayerTeamsRequest.Member = (function() { /** * Properties of a Member. - * @memberof CMsgGCChangeMatchPlayerTeamsRequest - * @interface IMember + * @typedef {Object} CMsgGCChangeMatchPlayerTeamsRequest.Member.$Properties * @property {number|Long|null} [member_id] Member member_id * @property {TF_GC_TEAM|null} [new_team] Member new_team + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Member. + * @memberof CMsgGCChangeMatchPlayerTeamsRequest + * @interface IMember + * @augments CMsgGCChangeMatchPlayerTeamsRequest.Member.$Properties + * @deprecated Use CMsgGCChangeMatchPlayerTeamsRequest.Member.$Properties instead. + */ + + /** + * Shape of a Member. + * @typedef {CMsgGCChangeMatchPlayerTeamsRequest.Member.$Properties} CMsgGCChangeMatchPlayerTeamsRequest.Member.$Shape */ /** * Constructs a new Member. * @memberof CMsgGCChangeMatchPlayerTeamsRequest * @classdesc Represents a Member. - * @implements IMember * @constructor - * @param {CMsgGCChangeMatchPlayerTeamsRequest.IMember=} [properties] Properties to set + * @param {CMsgGCChangeMatchPlayerTeamsRequest.Member.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Member(properties) { + var Member = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Member member_id. @@ -48501,10 +62621,14 @@ * @function create * @memberof CMsgGCChangeMatchPlayerTeamsRequest.Member * @static - * @param {CMsgGCChangeMatchPlayerTeamsRequest.IMember=} [properties] Properties to set + * @param {CMsgGCChangeMatchPlayerTeamsRequest.Member.$Properties=} [properties] Properties to set * @returns {CMsgGCChangeMatchPlayerTeamsRequest.Member} Member instance + * @type {{ + * (properties: CMsgGCChangeMatchPlayerTeamsRequest.Member.$Shape): CMsgGCChangeMatchPlayerTeamsRequest.Member & CMsgGCChangeMatchPlayerTeamsRequest.Member.$Shape; + * (properties?: CMsgGCChangeMatchPlayerTeamsRequest.Member.$Properties): CMsgGCChangeMatchPlayerTeamsRequest.Member; + * }} */ - Member.create = function create(properties) { + Member.create = function(properties) { return new Member(properties); }; @@ -48513,17 +62637,24 @@ * @function encode * @memberof CMsgGCChangeMatchPlayerTeamsRequest.Member * @static - * @param {CMsgGCChangeMatchPlayerTeamsRequest.IMember} message Member message or plain object to encode + * @param {CMsgGCChangeMatchPlayerTeamsRequest.Member.$Properties} message Member message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Member.encode = function encode(message, writer) { + Member.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.member_id != null && Object.hasOwnProperty.call(message, "member_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.member_id != null && $Object.hasOwnProperty.call(message, "member_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.member_id); - if (message.new_team != null && Object.hasOwnProperty.call(message, "new_team")) + if (message.new_team != null && $Object.hasOwnProperty.call(message, "new_team")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.new_team); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -48532,12 +62663,12 @@ * @function encodeDelimited * @memberof CMsgGCChangeMatchPlayerTeamsRequest.Member * @static - * @param {CMsgGCChangeMatchPlayerTeamsRequest.IMember} message Member message or plain object to encode + * @param {CMsgGCChangeMatchPlayerTeamsRequest.Member.$Properties} message Member message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Member.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Member.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -48547,28 +62678,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCChangeMatchPlayerTeamsRequest.Member} Member + * @returns {CMsgGCChangeMatchPlayerTeamsRequest.Member & CMsgGCChangeMatchPlayerTeamsRequest.Member.$Shape} Member * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Member.decode = function decode(reader, length) { + Member.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCChangeMatchPlayerTeamsRequest.Member(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCChangeMatchPlayerTeamsRequest.Member(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.member_id = reader.uint64(); - break; - case 2: - message.new_team = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.member_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.TF_GC_TEAM[value] !== $undefined) + message.new_team = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -48578,11 +62735,11 @@ * @memberof CMsgGCChangeMatchPlayerTeamsRequest.Member * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCChangeMatchPlayerTeamsRequest.Member} Member + * @returns {CMsgGCChangeMatchPlayerTeamsRequest.Member & CMsgGCChangeMatchPlayerTeamsRequest.Member.$Shape} Member * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Member.decodeDelimited = function decodeDelimited(reader) { + Member.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -48596,13 +62753,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Member.verify = function verify(message) { + Member.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.member_id != null && message.hasOwnProperty("member_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.member_id != null && $Object.hasOwnProperty.call(message, "member_id")) if (!$util.isInteger(message.member_id) && !(message.member_id && $util.isInteger(message.member_id.low) && $util.isInteger(message.member_id.high))) return "member_id: integer|Long expected"; - if (message.new_team != null && message.hasOwnProperty("new_team")) + if (message.new_team != null && $Object.hasOwnProperty.call(message, "new_team")) switch (message.new_team) { default: return "new_team: enum value expected"; @@ -48625,15 +62786,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCChangeMatchPlayerTeamsRequest.Member} Member */ - Member.fromObject = function fromObject(object) { + Member.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCChangeMatchPlayerTeamsRequest.Member) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCChangeMatchPlayerTeamsRequest.Member: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCChangeMatchPlayerTeamsRequest.Member(); if (object.member_id != null) if ($util.Long) - (message.member_id = $util.Long.fromValue(object.member_id)).unsigned = true; + message.member_id = $util.Long.fromValue(object.member_id, true); else if (typeof object.member_id === "string") - message.member_id = parseInt(object.member_id, 10); + message.member_id = $parseInt(object.member_id, 10); else if (typeof object.member_id === "number") message.member_id = object.member_id; else if (typeof object.member_id === "object") @@ -48663,6 +62830,7 @@ case 5: message.new_team = 5; break; + default: } return message; }; @@ -48676,25 +62844,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Member.toObject = function toObject(message, options) { + Member.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.member_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.member_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.member_id = options.longs === String ? "0" : 0; - object.new_team = options.enums === String ? "TF_GC_TEAM_NOTEAM" : 5; - } - if (message.member_id != null && message.hasOwnProperty("member_id")) - if (typeof message.member_id === "number") - object.member_id = options.longs === String ? String(message.member_id) : message.member_id; + object.member_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.new_team = options.enums === $String ? "TF_GC_TEAM_NOTEAM" : 5; + } + if (message.member_id != null && $Object.hasOwnProperty.call(message, "member_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.member_id = typeof message.member_id === "number" ? $BigInt(message.member_id) : $util.Long.fromBits(message.member_id.low >>> 0, message.member_id.high >>> 0, true).toBigInt(); + else if (typeof message.member_id === "number") + object.member_id = options.longs === $String ? $String(message.member_id) : message.member_id; else - object.member_id = options.longs === String ? $util.Long.prototype.toString.call(message.member_id) : options.longs === Number ? new $util.LongBits(message.member_id.low >>> 0, message.member_id.high >>> 0).toNumber(true) : message.member_id; - if (message.new_team != null && message.hasOwnProperty("new_team")) - object.new_team = options.enums === String ? $root.TF_GC_TEAM[message.new_team] : message.new_team; + object.member_id = options.longs === $String ? $util.Long.prototype.toString.call(message.member_id) : options.longs === $Number ? new $util.LongBits(message.member_id.low >>> 0, message.member_id.high >>> 0).toNumber(true) : message.member_id; + if (message.new_team != null && $Object.hasOwnProperty.call(message, "new_team")) + object.new_team = options.enums === $String ? $root.TF_GC_TEAM[message.new_team] === $undefined ? message.new_team : $root.TF_GC_TEAM[message.new_team] : message.new_team; return object; }; @@ -48705,8 +62879,22 @@ * @instance * @returns {Object.} JSON object */ - Member.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Member.prototype.toJSON = function() { + return Member.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Member + * @function getTypeUrl + * @memberof CMsgGCChangeMatchPlayerTeamsRequest.Member + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Member.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCChangeMatchPlayerTeamsRequest.Member"; }; return Member; @@ -48717,27 +62905,40 @@ $root.CMsgGCChangeMatchPlayerTeamsResponse = (function() { + /** + * Properties of a CMsgGCChangeMatchPlayerTeamsResponse. + * @typedef {Object} CMsgGCChangeMatchPlayerTeamsResponse.$Properties + * @property {boolean|null} [success] CMsgGCChangeMatchPlayerTeamsResponse success + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCChangeMatchPlayerTeamsResponse. * @exports ICMsgGCChangeMatchPlayerTeamsResponse * @interface ICMsgGCChangeMatchPlayerTeamsResponse - * @property {boolean|null} [success] CMsgGCChangeMatchPlayerTeamsResponse success + * @augments CMsgGCChangeMatchPlayerTeamsResponse.$Properties + * @deprecated Use CMsgGCChangeMatchPlayerTeamsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCChangeMatchPlayerTeamsResponse. + * @typedef {CMsgGCChangeMatchPlayerTeamsResponse.$Properties} CMsgGCChangeMatchPlayerTeamsResponse.$Shape */ /** * Constructs a new CMsgGCChangeMatchPlayerTeamsResponse. * @exports CMsgGCChangeMatchPlayerTeamsResponse * @classdesc Represents a CMsgGCChangeMatchPlayerTeamsResponse. - * @implements ICMsgGCChangeMatchPlayerTeamsResponse * @constructor - * @param {ICMsgGCChangeMatchPlayerTeamsResponse=} [properties] Properties to set + * @param {CMsgGCChangeMatchPlayerTeamsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCChangeMatchPlayerTeamsResponse(properties) { + var CMsgGCChangeMatchPlayerTeamsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCChangeMatchPlayerTeamsResponse success. @@ -48752,10 +62953,14 @@ * @function create * @memberof CMsgGCChangeMatchPlayerTeamsResponse * @static - * @param {ICMsgGCChangeMatchPlayerTeamsResponse=} [properties] Properties to set + * @param {CMsgGCChangeMatchPlayerTeamsResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCChangeMatchPlayerTeamsResponse} CMsgGCChangeMatchPlayerTeamsResponse instance + * @type {{ + * (properties: CMsgGCChangeMatchPlayerTeamsResponse.$Shape): CMsgGCChangeMatchPlayerTeamsResponse & CMsgGCChangeMatchPlayerTeamsResponse.$Shape; + * (properties?: CMsgGCChangeMatchPlayerTeamsResponse.$Properties): CMsgGCChangeMatchPlayerTeamsResponse; + * }} */ - CMsgGCChangeMatchPlayerTeamsResponse.create = function create(properties) { + CMsgGCChangeMatchPlayerTeamsResponse.create = function(properties) { return new CMsgGCChangeMatchPlayerTeamsResponse(properties); }; @@ -48764,15 +62969,22 @@ * @function encode * @memberof CMsgGCChangeMatchPlayerTeamsResponse * @static - * @param {ICMsgGCChangeMatchPlayerTeamsResponse} message CMsgGCChangeMatchPlayerTeamsResponse message or plain object to encode + * @param {CMsgGCChangeMatchPlayerTeamsResponse.$Properties} message CMsgGCChangeMatchPlayerTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCChangeMatchPlayerTeamsResponse.encode = function encode(message, writer) { + CMsgGCChangeMatchPlayerTeamsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.success != null && Object.hasOwnProperty.call(message, "success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -48781,12 +62993,12 @@ * @function encodeDelimited * @memberof CMsgGCChangeMatchPlayerTeamsResponse * @static - * @param {ICMsgGCChangeMatchPlayerTeamsResponse} message CMsgGCChangeMatchPlayerTeamsResponse message or plain object to encode + * @param {CMsgGCChangeMatchPlayerTeamsResponse.$Properties} message CMsgGCChangeMatchPlayerTeamsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCChangeMatchPlayerTeamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCChangeMatchPlayerTeamsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -48796,25 +63008,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCChangeMatchPlayerTeamsResponse} CMsgGCChangeMatchPlayerTeamsResponse + * @returns {CMsgGCChangeMatchPlayerTeamsResponse & CMsgGCChangeMatchPlayerTeamsResponse.$Shape} CMsgGCChangeMatchPlayerTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCChangeMatchPlayerTeamsResponse.decode = function decode(reader, length) { + CMsgGCChangeMatchPlayerTeamsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCChangeMatchPlayerTeamsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCChangeMatchPlayerTeamsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.success = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -48824,11 +63053,11 @@ * @memberof CMsgGCChangeMatchPlayerTeamsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCChangeMatchPlayerTeamsResponse} CMsgGCChangeMatchPlayerTeamsResponse + * @returns {CMsgGCChangeMatchPlayerTeamsResponse & CMsgGCChangeMatchPlayerTeamsResponse.$Shape} CMsgGCChangeMatchPlayerTeamsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCChangeMatchPlayerTeamsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCChangeMatchPlayerTeamsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -48842,10 +63071,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCChangeMatchPlayerTeamsResponse.verify = function verify(message) { + CMsgGCChangeMatchPlayerTeamsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.success != null && message.hasOwnProperty("success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; return null; @@ -48859,12 +63092,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCChangeMatchPlayerTeamsResponse} CMsgGCChangeMatchPlayerTeamsResponse */ - CMsgGCChangeMatchPlayerTeamsResponse.fromObject = function fromObject(object) { + CMsgGCChangeMatchPlayerTeamsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCChangeMatchPlayerTeamsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCChangeMatchPlayerTeamsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCChangeMatchPlayerTeamsResponse(); if (object.success != null) - message.success = Boolean(object.success); + message.success = $Boolean(object.success); return message; }; @@ -48877,13 +63116,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCChangeMatchPlayerTeamsResponse.toObject = function toObject(message, options) { + CMsgGCChangeMatchPlayerTeamsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.success = false; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) object.success = message.success; return object; }; @@ -48895,8 +63138,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCChangeMatchPlayerTeamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCChangeMatchPlayerTeamsResponse.prototype.toJSON = function() { + return CMsgGCChangeMatchPlayerTeamsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCChangeMatchPlayerTeamsResponse + * @function getTypeUrl + * @memberof CMsgGCChangeMatchPlayerTeamsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCChangeMatchPlayerTeamsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCChangeMatchPlayerTeamsResponse"; }; return CMsgGCChangeMatchPlayerTeamsResponse; @@ -48906,26 +63163,39 @@ /** * Properties of a CMsgGCQuestComplete_Debug. - * @exports ICMsgGCQuestComplete_Debug - * @interface ICMsgGCQuestComplete_Debug + * @typedef {Object} CMsgGCQuestComplete_Debug.$Properties * @property {number|Long|null} [quest_id] CMsgGCQuestComplete_Debug quest_id * @property {number|null} [points_type] CMsgGCQuestComplete_Debug points_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCQuestComplete_Debug. + * @exports ICMsgGCQuestComplete_Debug + * @interface ICMsgGCQuestComplete_Debug + * @augments CMsgGCQuestComplete_Debug.$Properties + * @deprecated Use CMsgGCQuestComplete_Debug.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestComplete_Debug. + * @typedef {CMsgGCQuestComplete_Debug.$Properties} CMsgGCQuestComplete_Debug.$Shape */ /** * Constructs a new CMsgGCQuestComplete_Debug. * @exports CMsgGCQuestComplete_Debug * @classdesc Represents a CMsgGCQuestComplete_Debug. - * @implements ICMsgGCQuestComplete_Debug * @constructor - * @param {ICMsgGCQuestComplete_Debug=} [properties] Properties to set + * @param {CMsgGCQuestComplete_Debug.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestComplete_Debug(properties) { + var CMsgGCQuestComplete_Debug = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestComplete_Debug quest_id. @@ -48948,10 +63218,14 @@ * @function create * @memberof CMsgGCQuestComplete_Debug * @static - * @param {ICMsgGCQuestComplete_Debug=} [properties] Properties to set + * @param {CMsgGCQuestComplete_Debug.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestComplete_Debug} CMsgGCQuestComplete_Debug instance + * @type {{ + * (properties: CMsgGCQuestComplete_Debug.$Shape): CMsgGCQuestComplete_Debug & CMsgGCQuestComplete_Debug.$Shape; + * (properties?: CMsgGCQuestComplete_Debug.$Properties): CMsgGCQuestComplete_Debug; + * }} */ - CMsgGCQuestComplete_Debug.create = function create(properties) { + CMsgGCQuestComplete_Debug.create = function(properties) { return new CMsgGCQuestComplete_Debug(properties); }; @@ -48960,17 +63234,24 @@ * @function encode * @memberof CMsgGCQuestComplete_Debug * @static - * @param {ICMsgGCQuestComplete_Debug} message CMsgGCQuestComplete_Debug message or plain object to encode + * @param {CMsgGCQuestComplete_Debug.$Properties} message CMsgGCQuestComplete_Debug message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestComplete_Debug.encode = function encode(message, writer) { + CMsgGCQuestComplete_Debug.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.quest_id != null && Object.hasOwnProperty.call(message, "quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.quest_id); - if (message.points_type != null && Object.hasOwnProperty.call(message, "points_type")) + if (message.points_type != null && $Object.hasOwnProperty.call(message, "points_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.points_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -48979,12 +63260,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestComplete_Debug * @static - * @param {ICMsgGCQuestComplete_Debug} message CMsgGCQuestComplete_Debug message or plain object to encode + * @param {CMsgGCQuestComplete_Debug.$Properties} message CMsgGCQuestComplete_Debug message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestComplete_Debug.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestComplete_Debug.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -48994,28 +63275,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestComplete_Debug} CMsgGCQuestComplete_Debug + * @returns {CMsgGCQuestComplete_Debug & CMsgGCQuestComplete_Debug.$Shape} CMsgGCQuestComplete_Debug * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestComplete_Debug.decode = function decode(reader, length) { + CMsgGCQuestComplete_Debug.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestComplete_Debug(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestComplete_Debug(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quest_id = reader.uint64(); - break; - case 2: - message.points_type = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.quest_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.points_type = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -49025,11 +63326,11 @@ * @memberof CMsgGCQuestComplete_Debug * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestComplete_Debug} CMsgGCQuestComplete_Debug + * @returns {CMsgGCQuestComplete_Debug & CMsgGCQuestComplete_Debug.$Shape} CMsgGCQuestComplete_Debug * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestComplete_Debug.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestComplete_Debug.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -49043,13 +63344,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestComplete_Debug.verify = function verify(message) { + CMsgGCQuestComplete_Debug.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) if (!$util.isInteger(message.quest_id) && !(message.quest_id && $util.isInteger(message.quest_id.low) && $util.isInteger(message.quest_id.high))) return "quest_id: integer|Long expected"; - if (message.points_type != null && message.hasOwnProperty("points_type")) + if (message.points_type != null && $Object.hasOwnProperty.call(message, "points_type")) if (!$util.isInteger(message.points_type)) return "points_type: integer expected"; return null; @@ -49063,15 +63368,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestComplete_Debug} CMsgGCQuestComplete_Debug */ - CMsgGCQuestComplete_Debug.fromObject = function fromObject(object) { + CMsgGCQuestComplete_Debug.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestComplete_Debug) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestComplete_Debug: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestComplete_Debug(); if (object.quest_id != null) if ($util.Long) - (message.quest_id = $util.Long.fromValue(object.quest_id)).unsigned = true; + message.quest_id = $util.Long.fromValue(object.quest_id, true); else if (typeof object.quest_id === "string") - message.quest_id = parseInt(object.quest_id, 10); + message.quest_id = $parseInt(object.quest_id, 10); else if (typeof object.quest_id === "number") message.quest_id = object.quest_id; else if (typeof object.quest_id === "object") @@ -49090,24 +63401,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestComplete_Debug.toObject = function toObject(message, options) { + CMsgGCQuestComplete_Debug.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.quest_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.quest_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.quest_id = options.longs === String ? "0" : 0; + object.quest_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.points_type = 0; } - if (message.quest_id != null && message.hasOwnProperty("quest_id")) - if (typeof message.quest_id === "number") - object.quest_id = options.longs === String ? String(message.quest_id) : message.quest_id; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.quest_id = typeof message.quest_id === "number" ? $BigInt(message.quest_id) : $util.Long.fromBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0, true).toBigInt(); + else if (typeof message.quest_id === "number") + object.quest_id = options.longs === $String ? $String(message.quest_id) : message.quest_id; else - object.quest_id = options.longs === String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; - if (message.points_type != null && message.hasOwnProperty("points_type")) + object.quest_id = options.longs === $String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === $Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; + if (message.points_type != null && $Object.hasOwnProperty.call(message, "points_type")) object.points_type = message.points_type; return object; }; @@ -49119,8 +63436,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestComplete_Debug.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestComplete_Debug.prototype.toJSON = function() { + return CMsgGCQuestComplete_Debug.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestComplete_Debug + * @function getTypeUrl + * @memberof CMsgGCQuestComplete_Debug + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestComplete_Debug.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestComplete_Debug"; }; return CMsgGCQuestComplete_Debug; @@ -49130,27 +63461,40 @@ /** * Properties of a CMsgGCQuestMap_Debug. - * @exports ICMsgGCQuestMap_Debug - * @interface ICMsgGCQuestMap_Debug + * @typedef {Object} CMsgGCQuestMap_Debug.$Properties * @property {number|null} [reset_operation] CMsgGCQuestMap_Debug reset_operation * @property {number|null} [give_credit] CMsgGCQuestMap_Debug give_credit - * @property {ICMsgGCQuestMapUnlockNode|null} [unlock_node] CMsgGCQuestMap_Debug unlock_node + * @property {CMsgGCQuestMapUnlockNode.$Properties|null} [unlock_node] CMsgGCQuestMap_Debug unlock_node + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCQuestMap_Debug. + * @exports ICMsgGCQuestMap_Debug + * @interface ICMsgGCQuestMap_Debug + * @augments CMsgGCQuestMap_Debug.$Properties + * @deprecated Use CMsgGCQuestMap_Debug.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestMap_Debug. + * @typedef {CMsgGCQuestMap_Debug.$Properties} CMsgGCQuestMap_Debug.$Shape */ /** * Constructs a new CMsgGCQuestMap_Debug. * @exports CMsgGCQuestMap_Debug * @classdesc Represents a CMsgGCQuestMap_Debug. - * @implements ICMsgGCQuestMap_Debug * @constructor - * @param {ICMsgGCQuestMap_Debug=} [properties] Properties to set + * @param {CMsgGCQuestMap_Debug.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestMap_Debug(properties) { + var CMsgGCQuestMap_Debug = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestMap_Debug reset_operation. @@ -49170,7 +63514,7 @@ /** * CMsgGCQuestMap_Debug unlock_node. - * @member {ICMsgGCQuestMapUnlockNode|null|undefined} unlock_node + * @member {CMsgGCQuestMapUnlockNode.$Properties|null|undefined} unlock_node * @memberof CMsgGCQuestMap_Debug * @instance */ @@ -49181,10 +63525,14 @@ * @function create * @memberof CMsgGCQuestMap_Debug * @static - * @param {ICMsgGCQuestMap_Debug=} [properties] Properties to set + * @param {CMsgGCQuestMap_Debug.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestMap_Debug} CMsgGCQuestMap_Debug instance + * @type {{ + * (properties: CMsgGCQuestMap_Debug.$Shape): CMsgGCQuestMap_Debug & CMsgGCQuestMap_Debug.$Shape; + * (properties?: CMsgGCQuestMap_Debug.$Properties): CMsgGCQuestMap_Debug; + * }} */ - CMsgGCQuestMap_Debug.create = function create(properties) { + CMsgGCQuestMap_Debug.create = function(properties) { return new CMsgGCQuestMap_Debug(properties); }; @@ -49193,19 +63541,26 @@ * @function encode * @memberof CMsgGCQuestMap_Debug * @static - * @param {ICMsgGCQuestMap_Debug} message CMsgGCQuestMap_Debug message or plain object to encode + * @param {CMsgGCQuestMap_Debug.$Properties} message CMsgGCQuestMap_Debug message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestMap_Debug.encode = function encode(message, writer) { + CMsgGCQuestMap_Debug.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.reset_operation != null && Object.hasOwnProperty.call(message, "reset_operation")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.reset_operation != null && $Object.hasOwnProperty.call(message, "reset_operation")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.reset_operation); - if (message.give_credit != null && Object.hasOwnProperty.call(message, "give_credit")) + if (message.give_credit != null && $Object.hasOwnProperty.call(message, "give_credit")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.give_credit); - if (message.unlock_node != null && Object.hasOwnProperty.call(message, "unlock_node")) - $root.CMsgGCQuestMapUnlockNode.encode(message.unlock_node, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.unlock_node != null && $Object.hasOwnProperty.call(message, "unlock_node")) + $root.CMsgGCQuestMapUnlockNode.encode(message.unlock_node, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -49214,12 +63569,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestMap_Debug * @static - * @param {ICMsgGCQuestMap_Debug} message CMsgGCQuestMap_Debug message or plain object to encode + * @param {CMsgGCQuestMap_Debug.$Properties} message CMsgGCQuestMap_Debug message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestMap_Debug.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestMap_Debug.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -49229,31 +63584,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestMap_Debug} CMsgGCQuestMap_Debug + * @returns {CMsgGCQuestMap_Debug & CMsgGCQuestMap_Debug.$Shape} CMsgGCQuestMap_Debug * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestMap_Debug.decode = function decode(reader, length) { + CMsgGCQuestMap_Debug.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestMap_Debug(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestMap_Debug(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reset_operation = reader.uint32(); - break; - case 2: - message.give_credit = reader.uint32(); - break; - case 3: - message.unlock_node = $root.CMsgGCQuestMapUnlockNode.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.reset_operation = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.give_credit = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.unlock_node = $root.CMsgGCQuestMapUnlockNode.decode(reader, reader.uint32(), $undefined, _depth + 1, message.unlock_node); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -49263,11 +63641,11 @@ * @memberof CMsgGCQuestMap_Debug * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestMap_Debug} CMsgGCQuestMap_Debug + * @returns {CMsgGCQuestMap_Debug & CMsgGCQuestMap_Debug.$Shape} CMsgGCQuestMap_Debug * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestMap_Debug.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestMap_Debug.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -49281,17 +63659,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestMap_Debug.verify = function verify(message) { + CMsgGCQuestMap_Debug.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reset_operation != null && message.hasOwnProperty("reset_operation")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.reset_operation != null && $Object.hasOwnProperty.call(message, "reset_operation")) if (!$util.isInteger(message.reset_operation)) return "reset_operation: integer expected"; - if (message.give_credit != null && message.hasOwnProperty("give_credit")) + if (message.give_credit != null && $Object.hasOwnProperty.call(message, "give_credit")) if (!$util.isInteger(message.give_credit)) return "give_credit: integer expected"; - if (message.unlock_node != null && message.hasOwnProperty("unlock_node")) { - var error = $root.CMsgGCQuestMapUnlockNode.verify(message.unlock_node); + if (message.unlock_node != null && $Object.hasOwnProperty.call(message, "unlock_node")) { + var error = $root.CMsgGCQuestMapUnlockNode.verify(message.unlock_node, _depth + 1); if (error) return "unlock_node." + error; } @@ -49306,18 +63688,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestMap_Debug} CMsgGCQuestMap_Debug */ - CMsgGCQuestMap_Debug.fromObject = function fromObject(object) { + CMsgGCQuestMap_Debug.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestMap_Debug) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestMap_Debug: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestMap_Debug(); if (object.reset_operation != null) message.reset_operation = object.reset_operation >>> 0; if (object.give_credit != null) message.give_credit = object.give_credit >>> 0; if (object.unlock_node != null) { - if (typeof object.unlock_node !== "object") - throw TypeError(".CMsgGCQuestMap_Debug.unlock_node: object expected"); - message.unlock_node = $root.CMsgGCQuestMapUnlockNode.fromObject(object.unlock_node); + if (!$util.isObject(object.unlock_node)) + throw $TypeError(".CMsgGCQuestMap_Debug.unlock_node: object expected"); + message.unlock_node = $root.CMsgGCQuestMapUnlockNode.fromObject(object.unlock_node, _depth + 1); } return message; }; @@ -49331,21 +63719,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestMap_Debug.toObject = function toObject(message, options) { + CMsgGCQuestMap_Debug.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.reset_operation = 0; object.give_credit = 0; object.unlock_node = null; } - if (message.reset_operation != null && message.hasOwnProperty("reset_operation")) + if (message.reset_operation != null && $Object.hasOwnProperty.call(message, "reset_operation")) object.reset_operation = message.reset_operation; - if (message.give_credit != null && message.hasOwnProperty("give_credit")) + if (message.give_credit != null && $Object.hasOwnProperty.call(message, "give_credit")) object.give_credit = message.give_credit; - if (message.unlock_node != null && message.hasOwnProperty("unlock_node")) - object.unlock_node = $root.CMsgGCQuestMapUnlockNode.toObject(message.unlock_node, options); + if (message.unlock_node != null && $Object.hasOwnProperty.call(message, "unlock_node")) + object.unlock_node = $root.CMsgGCQuestMapUnlockNode.toObject(message.unlock_node, options, _depth + 1); return object; }; @@ -49356,8 +63748,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestMap_Debug.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestMap_Debug.prototype.toJSON = function() { + return CMsgGCQuestMap_Debug.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestMap_Debug + * @function getTypeUrl + * @memberof CMsgGCQuestMap_Debug + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestMap_Debug.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestMap_Debug"; }; return CMsgGCQuestMap_Debug; @@ -49365,27 +63771,40 @@ $root.CMsgGCQuestMapPurchaseReward = (function() { + /** + * Properties of a CMsgGCQuestMapPurchaseReward. + * @typedef {Object} CMsgGCQuestMapPurchaseReward.$Properties + * @property {number|null} [store_item_defindex] CMsgGCQuestMapPurchaseReward store_item_defindex + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCQuestMapPurchaseReward. * @exports ICMsgGCQuestMapPurchaseReward * @interface ICMsgGCQuestMapPurchaseReward - * @property {number|null} [store_item_defindex] CMsgGCQuestMapPurchaseReward store_item_defindex + * @augments CMsgGCQuestMapPurchaseReward.$Properties + * @deprecated Use CMsgGCQuestMapPurchaseReward.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestMapPurchaseReward. + * @typedef {CMsgGCQuestMapPurchaseReward.$Properties} CMsgGCQuestMapPurchaseReward.$Shape */ /** * Constructs a new CMsgGCQuestMapPurchaseReward. * @exports CMsgGCQuestMapPurchaseReward * @classdesc Represents a CMsgGCQuestMapPurchaseReward. - * @implements ICMsgGCQuestMapPurchaseReward * @constructor - * @param {ICMsgGCQuestMapPurchaseReward=} [properties] Properties to set + * @param {CMsgGCQuestMapPurchaseReward.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestMapPurchaseReward(properties) { + var CMsgGCQuestMapPurchaseReward = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestMapPurchaseReward store_item_defindex. @@ -49400,10 +63819,14 @@ * @function create * @memberof CMsgGCQuestMapPurchaseReward * @static - * @param {ICMsgGCQuestMapPurchaseReward=} [properties] Properties to set + * @param {CMsgGCQuestMapPurchaseReward.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestMapPurchaseReward} CMsgGCQuestMapPurchaseReward instance + * @type {{ + * (properties: CMsgGCQuestMapPurchaseReward.$Shape): CMsgGCQuestMapPurchaseReward & CMsgGCQuestMapPurchaseReward.$Shape; + * (properties?: CMsgGCQuestMapPurchaseReward.$Properties): CMsgGCQuestMapPurchaseReward; + * }} */ - CMsgGCQuestMapPurchaseReward.create = function create(properties) { + CMsgGCQuestMapPurchaseReward.create = function(properties) { return new CMsgGCQuestMapPurchaseReward(properties); }; @@ -49412,15 +63835,22 @@ * @function encode * @memberof CMsgGCQuestMapPurchaseReward * @static - * @param {ICMsgGCQuestMapPurchaseReward} message CMsgGCQuestMapPurchaseReward message or plain object to encode + * @param {CMsgGCQuestMapPurchaseReward.$Properties} message CMsgGCQuestMapPurchaseReward message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestMapPurchaseReward.encode = function encode(message, writer) { + CMsgGCQuestMapPurchaseReward.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.store_item_defindex != null && Object.hasOwnProperty.call(message, "store_item_defindex")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.store_item_defindex != null && $Object.hasOwnProperty.call(message, "store_item_defindex")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.store_item_defindex); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -49429,12 +63859,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestMapPurchaseReward * @static - * @param {ICMsgGCQuestMapPurchaseReward} message CMsgGCQuestMapPurchaseReward message or plain object to encode + * @param {CMsgGCQuestMapPurchaseReward.$Properties} message CMsgGCQuestMapPurchaseReward message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestMapPurchaseReward.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestMapPurchaseReward.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -49444,25 +63874,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestMapPurchaseReward} CMsgGCQuestMapPurchaseReward + * @returns {CMsgGCQuestMapPurchaseReward & CMsgGCQuestMapPurchaseReward.$Shape} CMsgGCQuestMapPurchaseReward * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestMapPurchaseReward.decode = function decode(reader, length) { + CMsgGCQuestMapPurchaseReward.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestMapPurchaseReward(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestMapPurchaseReward(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.store_item_defindex = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.store_item_defindex = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -49472,11 +63919,11 @@ * @memberof CMsgGCQuestMapPurchaseReward * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestMapPurchaseReward} CMsgGCQuestMapPurchaseReward + * @returns {CMsgGCQuestMapPurchaseReward & CMsgGCQuestMapPurchaseReward.$Shape} CMsgGCQuestMapPurchaseReward * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestMapPurchaseReward.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestMapPurchaseReward.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -49490,10 +63937,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestMapPurchaseReward.verify = function verify(message) { + CMsgGCQuestMapPurchaseReward.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.store_item_defindex != null && message.hasOwnProperty("store_item_defindex")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.store_item_defindex != null && $Object.hasOwnProperty.call(message, "store_item_defindex")) if (!$util.isInteger(message.store_item_defindex)) return "store_item_defindex: integer expected"; return null; @@ -49507,9 +63958,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestMapPurchaseReward} CMsgGCQuestMapPurchaseReward */ - CMsgGCQuestMapPurchaseReward.fromObject = function fromObject(object) { + CMsgGCQuestMapPurchaseReward.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestMapPurchaseReward) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestMapPurchaseReward: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestMapPurchaseReward(); if (object.store_item_defindex != null) message.store_item_defindex = object.store_item_defindex >>> 0; @@ -49525,13 +63982,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestMapPurchaseReward.toObject = function toObject(message, options) { + CMsgGCQuestMapPurchaseReward.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.store_item_defindex = 0; - if (message.store_item_defindex != null && message.hasOwnProperty("store_item_defindex")) + if (message.store_item_defindex != null && $Object.hasOwnProperty.call(message, "store_item_defindex")) object.store_item_defindex = message.store_item_defindex; return object; }; @@ -49543,8 +64004,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestMapPurchaseReward.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestMapPurchaseReward.prototype.toJSON = function() { + return CMsgGCQuestMapPurchaseReward.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestMapPurchaseReward + * @function getTypeUrl + * @memberof CMsgGCQuestMapPurchaseReward + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestMapPurchaseReward.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestMapPurchaseReward"; }; return CMsgGCQuestMapPurchaseReward; @@ -49552,27 +64027,40 @@ $root.CMsgGCQuestResponse = (function() { + /** + * Properties of a CMsgGCQuestResponse. + * @typedef {Object} CMsgGCQuestResponse.$Properties + * @property {boolean|null} [success] CMsgGCQuestResponse success + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCQuestResponse. * @exports ICMsgGCQuestResponse * @interface ICMsgGCQuestResponse - * @property {boolean|null} [success] CMsgGCQuestResponse success + * @augments CMsgGCQuestResponse.$Properties + * @deprecated Use CMsgGCQuestResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCQuestResponse. + * @typedef {CMsgGCQuestResponse.$Properties} CMsgGCQuestResponse.$Shape */ /** * Constructs a new CMsgGCQuestResponse. * @exports CMsgGCQuestResponse * @classdesc Represents a CMsgGCQuestResponse. - * @implements ICMsgGCQuestResponse * @constructor - * @param {ICMsgGCQuestResponse=} [properties] Properties to set + * @param {CMsgGCQuestResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCQuestResponse(properties) { + var CMsgGCQuestResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCQuestResponse success. @@ -49587,10 +64075,14 @@ * @function create * @memberof CMsgGCQuestResponse * @static - * @param {ICMsgGCQuestResponse=} [properties] Properties to set + * @param {CMsgGCQuestResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCQuestResponse} CMsgGCQuestResponse instance + * @type {{ + * (properties: CMsgGCQuestResponse.$Shape): CMsgGCQuestResponse & CMsgGCQuestResponse.$Shape; + * (properties?: CMsgGCQuestResponse.$Properties): CMsgGCQuestResponse; + * }} */ - CMsgGCQuestResponse.create = function create(properties) { + CMsgGCQuestResponse.create = function(properties) { return new CMsgGCQuestResponse(properties); }; @@ -49599,15 +64091,22 @@ * @function encode * @memberof CMsgGCQuestResponse * @static - * @param {ICMsgGCQuestResponse} message CMsgGCQuestResponse message or plain object to encode + * @param {CMsgGCQuestResponse.$Properties} message CMsgGCQuestResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestResponse.encode = function encode(message, writer) { + CMsgGCQuestResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.success != null && Object.hasOwnProperty.call(message, "success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -49616,12 +64115,12 @@ * @function encodeDelimited * @memberof CMsgGCQuestResponse * @static - * @param {ICMsgGCQuestResponse} message CMsgGCQuestResponse message or plain object to encode + * @param {CMsgGCQuestResponse.$Properties} message CMsgGCQuestResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCQuestResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCQuestResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -49631,25 +64130,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCQuestResponse} CMsgGCQuestResponse + * @returns {CMsgGCQuestResponse & CMsgGCQuestResponse.$Shape} CMsgGCQuestResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestResponse.decode = function decode(reader, length) { + CMsgGCQuestResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCQuestResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCQuestResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.success = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -49659,11 +64175,11 @@ * @memberof CMsgGCQuestResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCQuestResponse} CMsgGCQuestResponse + * @returns {CMsgGCQuestResponse & CMsgGCQuestResponse.$Shape} CMsgGCQuestResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCQuestResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCQuestResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -49677,10 +64193,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCQuestResponse.verify = function verify(message) { + CMsgGCQuestResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.success != null && message.hasOwnProperty("success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; return null; @@ -49694,12 +64214,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCQuestResponse} CMsgGCQuestResponse */ - CMsgGCQuestResponse.fromObject = function fromObject(object) { + CMsgGCQuestResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCQuestResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCQuestResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCQuestResponse(); if (object.success != null) - message.success = Boolean(object.success); + message.success = $Boolean(object.success); return message; }; @@ -49712,13 +64238,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCQuestResponse.toObject = function toObject(message, options) { + CMsgGCQuestResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.success = false; - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) object.success = message.success; return object; }; @@ -49730,8 +64260,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCQuestResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCQuestResponse.prototype.toJSON = function() { + return CMsgGCQuestResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCQuestResponse + * @function getTypeUrl + * @memberof CMsgGCQuestResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCQuestResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCQuestResponse"; }; return CMsgGCQuestResponse; @@ -49739,27 +64283,40 @@ $root.CMsgGCSetDisablePartyQuestProgress = (function() { + /** + * Properties of a CMsgGCSetDisablePartyQuestProgress. + * @typedef {Object} CMsgGCSetDisablePartyQuestProgress.$Properties + * @property {boolean|null} [state] CMsgGCSetDisablePartyQuestProgress state + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCSetDisablePartyQuestProgress. * @exports ICMsgGCSetDisablePartyQuestProgress * @interface ICMsgGCSetDisablePartyQuestProgress - * @property {boolean|null} [state] CMsgGCSetDisablePartyQuestProgress state + * @augments CMsgGCSetDisablePartyQuestProgress.$Properties + * @deprecated Use CMsgGCSetDisablePartyQuestProgress.$Properties instead. + */ + + /** + * Shape of a CMsgGCSetDisablePartyQuestProgress. + * @typedef {CMsgGCSetDisablePartyQuestProgress.$Properties} CMsgGCSetDisablePartyQuestProgress.$Shape */ /** * Constructs a new CMsgGCSetDisablePartyQuestProgress. * @exports CMsgGCSetDisablePartyQuestProgress * @classdesc Represents a CMsgGCSetDisablePartyQuestProgress. - * @implements ICMsgGCSetDisablePartyQuestProgress * @constructor - * @param {ICMsgGCSetDisablePartyQuestProgress=} [properties] Properties to set + * @param {CMsgGCSetDisablePartyQuestProgress.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCSetDisablePartyQuestProgress(properties) { + var CMsgGCSetDisablePartyQuestProgress = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCSetDisablePartyQuestProgress state. @@ -49774,10 +64331,14 @@ * @function create * @memberof CMsgGCSetDisablePartyQuestProgress * @static - * @param {ICMsgGCSetDisablePartyQuestProgress=} [properties] Properties to set + * @param {CMsgGCSetDisablePartyQuestProgress.$Properties=} [properties] Properties to set * @returns {CMsgGCSetDisablePartyQuestProgress} CMsgGCSetDisablePartyQuestProgress instance + * @type {{ + * (properties: CMsgGCSetDisablePartyQuestProgress.$Shape): CMsgGCSetDisablePartyQuestProgress & CMsgGCSetDisablePartyQuestProgress.$Shape; + * (properties?: CMsgGCSetDisablePartyQuestProgress.$Properties): CMsgGCSetDisablePartyQuestProgress; + * }} */ - CMsgGCSetDisablePartyQuestProgress.create = function create(properties) { + CMsgGCSetDisablePartyQuestProgress.create = function(properties) { return new CMsgGCSetDisablePartyQuestProgress(properties); }; @@ -49786,15 +64347,22 @@ * @function encode * @memberof CMsgGCSetDisablePartyQuestProgress * @static - * @param {ICMsgGCSetDisablePartyQuestProgress} message CMsgGCSetDisablePartyQuestProgress message or plain object to encode + * @param {CMsgGCSetDisablePartyQuestProgress.$Properties} message CMsgGCSetDisablePartyQuestProgress message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCSetDisablePartyQuestProgress.encode = function encode(message, writer) { + CMsgGCSetDisablePartyQuestProgress.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.state); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -49803,12 +64371,12 @@ * @function encodeDelimited * @memberof CMsgGCSetDisablePartyQuestProgress * @static - * @param {ICMsgGCSetDisablePartyQuestProgress} message CMsgGCSetDisablePartyQuestProgress message or plain object to encode + * @param {CMsgGCSetDisablePartyQuestProgress.$Properties} message CMsgGCSetDisablePartyQuestProgress message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCSetDisablePartyQuestProgress.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCSetDisablePartyQuestProgress.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -49818,25 +64386,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCSetDisablePartyQuestProgress} CMsgGCSetDisablePartyQuestProgress + * @returns {CMsgGCSetDisablePartyQuestProgress & CMsgGCSetDisablePartyQuestProgress.$Shape} CMsgGCSetDisablePartyQuestProgress * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCSetDisablePartyQuestProgress.decode = function decode(reader, length) { + CMsgGCSetDisablePartyQuestProgress.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCSetDisablePartyQuestProgress(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCSetDisablePartyQuestProgress(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.state = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -49846,11 +64431,11 @@ * @memberof CMsgGCSetDisablePartyQuestProgress * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCSetDisablePartyQuestProgress} CMsgGCSetDisablePartyQuestProgress + * @returns {CMsgGCSetDisablePartyQuestProgress & CMsgGCSetDisablePartyQuestProgress.$Shape} CMsgGCSetDisablePartyQuestProgress * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCSetDisablePartyQuestProgress.decodeDelimited = function decodeDelimited(reader) { + CMsgGCSetDisablePartyQuestProgress.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -49864,10 +64449,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCSetDisablePartyQuestProgress.verify = function verify(message) { + CMsgGCSetDisablePartyQuestProgress.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) if (typeof message.state !== "boolean") return "state: boolean expected"; return null; @@ -49881,12 +64470,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCSetDisablePartyQuestProgress} CMsgGCSetDisablePartyQuestProgress */ - CMsgGCSetDisablePartyQuestProgress.fromObject = function fromObject(object) { + CMsgGCSetDisablePartyQuestProgress.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCSetDisablePartyQuestProgress) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCSetDisablePartyQuestProgress: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCSetDisablePartyQuestProgress(); if (object.state != null) - message.state = Boolean(object.state); + message.state = $Boolean(object.state); return message; }; @@ -49899,13 +64494,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCSetDisablePartyQuestProgress.toObject = function toObject(message, options) { + CMsgGCSetDisablePartyQuestProgress.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.state = false; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) object.state = message.state; return object; }; @@ -49917,8 +64516,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCSetDisablePartyQuestProgress.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCSetDisablePartyQuestProgress.prototype.toJSON = function() { + return CMsgGCSetDisablePartyQuestProgress.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCSetDisablePartyQuestProgress + * @function getTypeUrl + * @memberof CMsgGCSetDisablePartyQuestProgress + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCSetDisablePartyQuestProgress.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCSetDisablePartyQuestProgress"; }; return CMsgGCSetDisablePartyQuestProgress; @@ -49928,8 +64541,7 @@ /** * Properties of a CMsgQuestProgressReport. - * @exports ICMsgQuestProgressReport - * @interface ICMsgQuestProgressReport + * @typedef {Object} CMsgQuestProgressReport.$Properties * @property {number|Long|null} [quest_id] CMsgQuestProgressReport quest_id * @property {boolean|null} [star_0_earned] CMsgQuestProgressReport star_0_earned * @property {boolean|null} [star_1_earned] CMsgQuestProgressReport star_1_earned @@ -49937,23 +64549,37 @@ * @property {Array.|null} [items_earned] CMsgQuestProgressReport items_earned * @property {number|null} [reward_credits_earned] CMsgQuestProgressReport reward_credits_earned * @property {boolean|null} [contract_completed] CMsgQuestProgressReport contract_completed + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgQuestProgressReport. + * @exports ICMsgQuestProgressReport + * @interface ICMsgQuestProgressReport + * @augments CMsgQuestProgressReport.$Properties + * @deprecated Use CMsgQuestProgressReport.$Properties instead. + */ + + /** + * Shape of a CMsgQuestProgressReport. + * @typedef {CMsgQuestProgressReport.$Properties} CMsgQuestProgressReport.$Shape */ /** * Constructs a new CMsgQuestProgressReport. * @exports CMsgQuestProgressReport * @classdesc Represents a CMsgQuestProgressReport. - * @implements ICMsgQuestProgressReport * @constructor - * @param {ICMsgQuestProgressReport=} [properties] Properties to set + * @param {CMsgQuestProgressReport.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgQuestProgressReport(properties) { + var CMsgQuestProgressReport = function (properties) { this.items_earned = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgQuestProgressReport quest_id. @@ -50016,10 +64642,14 @@ * @function create * @memberof CMsgQuestProgressReport * @static - * @param {ICMsgQuestProgressReport=} [properties] Properties to set + * @param {CMsgQuestProgressReport.$Properties=} [properties] Properties to set * @returns {CMsgQuestProgressReport} CMsgQuestProgressReport instance + * @type {{ + * (properties: CMsgQuestProgressReport.$Shape): CMsgQuestProgressReport & CMsgQuestProgressReport.$Shape; + * (properties?: CMsgQuestProgressReport.$Properties): CMsgQuestProgressReport; + * }} */ - CMsgQuestProgressReport.create = function create(properties) { + CMsgQuestProgressReport.create = function(properties) { return new CMsgQuestProgressReport(properties); }; @@ -50028,28 +64658,35 @@ * @function encode * @memberof CMsgQuestProgressReport * @static - * @param {ICMsgQuestProgressReport} message CMsgQuestProgressReport message or plain object to encode + * @param {CMsgQuestProgressReport.$Properties} message CMsgQuestProgressReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestProgressReport.encode = function encode(message, writer) { + CMsgQuestProgressReport.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.quest_id != null && Object.hasOwnProperty.call(message, "quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.quest_id); - if (message.star_0_earned != null && Object.hasOwnProperty.call(message, "star_0_earned")) + if (message.star_0_earned != null && $Object.hasOwnProperty.call(message, "star_0_earned")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.star_0_earned); - if (message.star_1_earned != null && Object.hasOwnProperty.call(message, "star_1_earned")) + if (message.star_1_earned != null && $Object.hasOwnProperty.call(message, "star_1_earned")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.star_1_earned); - if (message.star_2_earned != null && Object.hasOwnProperty.call(message, "star_2_earned")) + if (message.star_2_earned != null && $Object.hasOwnProperty.call(message, "star_2_earned")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.star_2_earned); if (message.items_earned != null && message.items_earned.length) for (var i = 0; i < message.items_earned.length; ++i) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.items_earned[i]); - if (message.reward_credits_earned != null && Object.hasOwnProperty.call(message, "reward_credits_earned")) + if (message.reward_credits_earned != null && $Object.hasOwnProperty.call(message, "reward_credits_earned")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.reward_credits_earned); - if (message.contract_completed != null && Object.hasOwnProperty.call(message, "contract_completed")) + if (message.contract_completed != null && $Object.hasOwnProperty.call(message, "contract_completed")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.contract_completed); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -50058,12 +64695,12 @@ * @function encodeDelimited * @memberof CMsgQuestProgressReport * @static - * @param {ICMsgQuestProgressReport} message CMsgQuestProgressReport message or plain object to encode + * @param {CMsgQuestProgressReport.$Properties} message CMsgQuestProgressReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestProgressReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgQuestProgressReport.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -50073,50 +64710,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestProgressReport} CMsgQuestProgressReport + * @returns {CMsgQuestProgressReport & CMsgQuestProgressReport.$Shape} CMsgQuestProgressReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestProgressReport.decode = function decode(reader, length) { + CMsgQuestProgressReport.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestProgressReport(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestProgressReport(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quest_id = reader.uint64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - message.star_0_earned = reader.bool(); - break; - case 3: - message.star_1_earned = reader.bool(); - break; - case 4: - message.star_2_earned = reader.bool(); - break; - case 5: - if (!(message.items_earned && message.items_earned.length)) - message.items_earned = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.items_earned.push(reader.uint64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.quest_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.star_0_earned = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.star_1_earned = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.star_2_earned = reader.bool(); + continue; + } + case 5: { + if (wireType === 2) { + if (!(message.items_earned && message.items_earned.length)) + message.items_earned = []; + reader.uint64s(message.items_earned); + continue; + } + if (wireType !== 0) + break; + if (!(message.items_earned && message.items_earned.length)) + message.items_earned = []; message.items_earned.push(reader.uint64()); - break; - case 6: - message.reward_credits_earned = reader.uint32(); - break; - case 7: - message.contract_completed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 6: { + if (wireType !== 0) + break; + message.reward_credits_earned = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.contract_completed = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -50126,11 +64799,11 @@ * @memberof CMsgQuestProgressReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestProgressReport} CMsgQuestProgressReport + * @returns {CMsgQuestProgressReport & CMsgQuestProgressReport.$Shape} CMsgQuestProgressReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestProgressReport.decodeDelimited = function decodeDelimited(reader) { + CMsgQuestProgressReport.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -50144,32 +64817,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgQuestProgressReport.verify = function verify(message) { + CMsgQuestProgressReport.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) if (!$util.isInteger(message.quest_id) && !(message.quest_id && $util.isInteger(message.quest_id.low) && $util.isInteger(message.quest_id.high))) return "quest_id: integer|Long expected"; - if (message.star_0_earned != null && message.hasOwnProperty("star_0_earned")) + if (message.star_0_earned != null && $Object.hasOwnProperty.call(message, "star_0_earned")) if (typeof message.star_0_earned !== "boolean") return "star_0_earned: boolean expected"; - if (message.star_1_earned != null && message.hasOwnProperty("star_1_earned")) + if (message.star_1_earned != null && $Object.hasOwnProperty.call(message, "star_1_earned")) if (typeof message.star_1_earned !== "boolean") return "star_1_earned: boolean expected"; - if (message.star_2_earned != null && message.hasOwnProperty("star_2_earned")) + if (message.star_2_earned != null && $Object.hasOwnProperty.call(message, "star_2_earned")) if (typeof message.star_2_earned !== "boolean") return "star_2_earned: boolean expected"; - if (message.items_earned != null && message.hasOwnProperty("items_earned")) { - if (!Array.isArray(message.items_earned)) + if (message.items_earned != null && $Object.hasOwnProperty.call(message, "items_earned")) { + if (!$Array.isArray(message.items_earned)) return "items_earned: array expected"; for (var i = 0; i < message.items_earned.length; ++i) if (!$util.isInteger(message.items_earned[i]) && !(message.items_earned[i] && $util.isInteger(message.items_earned[i].low) && $util.isInteger(message.items_earned[i].high))) return "items_earned: integer|Long[] expected"; } - if (message.reward_credits_earned != null && message.hasOwnProperty("reward_credits_earned")) + if (message.reward_credits_earned != null && $Object.hasOwnProperty.call(message, "reward_credits_earned")) if (!$util.isInteger(message.reward_credits_earned)) return "reward_credits_earned: integer expected"; - if (message.contract_completed != null && message.hasOwnProperty("contract_completed")) + if (message.contract_completed != null && $Object.hasOwnProperty.call(message, "contract_completed")) if (typeof message.contract_completed !== "boolean") return "contract_completed: boolean expected"; return null; @@ -50183,34 +64860,40 @@ * @param {Object.} object Plain object * @returns {CMsgQuestProgressReport} CMsgQuestProgressReport */ - CMsgQuestProgressReport.fromObject = function fromObject(object) { + CMsgQuestProgressReport.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestProgressReport) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestProgressReport: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestProgressReport(); if (object.quest_id != null) if ($util.Long) - (message.quest_id = $util.Long.fromValue(object.quest_id)).unsigned = true; + message.quest_id = $util.Long.fromValue(object.quest_id, true); else if (typeof object.quest_id === "string") - message.quest_id = parseInt(object.quest_id, 10); + message.quest_id = $parseInt(object.quest_id, 10); else if (typeof object.quest_id === "number") message.quest_id = object.quest_id; else if (typeof object.quest_id === "object") message.quest_id = new $util.LongBits(object.quest_id.low >>> 0, object.quest_id.high >>> 0).toNumber(true); if (object.star_0_earned != null) - message.star_0_earned = Boolean(object.star_0_earned); + message.star_0_earned = $Boolean(object.star_0_earned); if (object.star_1_earned != null) - message.star_1_earned = Boolean(object.star_1_earned); + message.star_1_earned = $Boolean(object.star_1_earned); if (object.star_2_earned != null) - message.star_2_earned = Boolean(object.star_2_earned); + message.star_2_earned = $Boolean(object.star_2_earned); if (object.items_earned) { - if (!Array.isArray(object.items_earned)) - throw TypeError(".CMsgQuestProgressReport.items_earned: array expected"); - message.items_earned = []; + if (!$Array.isArray(object.items_earned)) + throw $TypeError(".CMsgQuestProgressReport.items_earned: array expected"); + message.items_earned = $Array(object.items_earned.length); for (var i = 0; i < object.items_earned.length; ++i) if ($util.Long) - (message.items_earned[i] = $util.Long.fromValue(object.items_earned[i])).unsigned = true; + message.items_earned[i] = $util.Long.fromValue(object.items_earned[i], true); else if (typeof object.items_earned[i] === "string") - message.items_earned[i] = parseInt(object.items_earned[i], 10); + message.items_earned[i] = $parseInt(object.items_earned[i], 10); else if (typeof object.items_earned[i] === "number") message.items_earned[i] = object.items_earned[i]; else if (typeof object.items_earned[i] === "object") @@ -50219,7 +64902,7 @@ if (object.reward_credits_earned != null) message.reward_credits_earned = object.reward_credits_earned >>> 0; if (object.contract_completed != null) - message.contract_completed = Boolean(object.contract_completed); + message.contract_completed = $Boolean(object.contract_completed); return message; }; @@ -50232,46 +64915,54 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgQuestProgressReport.toObject = function toObject(message, options) { + CMsgQuestProgressReport.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.items_earned = []; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.quest_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.quest_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.quest_id = options.longs === String ? "0" : 0; + object.quest_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.star_0_earned = false; object.star_1_earned = false; object.star_2_earned = false; object.reward_credits_earned = 0; object.contract_completed = false; } - if (message.quest_id != null && message.hasOwnProperty("quest_id")) - if (typeof message.quest_id === "number") - object.quest_id = options.longs === String ? String(message.quest_id) : message.quest_id; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.quest_id = typeof message.quest_id === "number" ? $BigInt(message.quest_id) : $util.Long.fromBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0, true).toBigInt(); + else if (typeof message.quest_id === "number") + object.quest_id = options.longs === $String ? $String(message.quest_id) : message.quest_id; else - object.quest_id = options.longs === String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; - if (message.star_0_earned != null && message.hasOwnProperty("star_0_earned")) + object.quest_id = options.longs === $String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === $Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; + if (message.star_0_earned != null && $Object.hasOwnProperty.call(message, "star_0_earned")) object.star_0_earned = message.star_0_earned; - if (message.star_1_earned != null && message.hasOwnProperty("star_1_earned")) + if (message.star_1_earned != null && $Object.hasOwnProperty.call(message, "star_1_earned")) object.star_1_earned = message.star_1_earned; - if (message.star_2_earned != null && message.hasOwnProperty("star_2_earned")) + if (message.star_2_earned != null && $Object.hasOwnProperty.call(message, "star_2_earned")) object.star_2_earned = message.star_2_earned; if (message.items_earned && message.items_earned.length) { - object.items_earned = []; + object.items_earned = $Array(message.items_earned.length); for (var j = 0; j < message.items_earned.length; ++j) - if (typeof message.items_earned[j] === "number") - object.items_earned[j] = options.longs === String ? String(message.items_earned[j]) : message.items_earned[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.items_earned[j] = typeof message.items_earned[j] === "number" ? $BigInt(message.items_earned[j]) : $util.Long.fromBits(message.items_earned[j].low >>> 0, message.items_earned[j].high >>> 0, true).toBigInt(); + else if (typeof message.items_earned[j] === "number") + object.items_earned[j] = options.longs === $String ? $String(message.items_earned[j]) : message.items_earned[j]; else - object.items_earned[j] = options.longs === String ? $util.Long.prototype.toString.call(message.items_earned[j]) : options.longs === Number ? new $util.LongBits(message.items_earned[j].low >>> 0, message.items_earned[j].high >>> 0).toNumber(true) : message.items_earned[j]; + object.items_earned[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.items_earned[j]) : options.longs === $Number ? new $util.LongBits(message.items_earned[j].low >>> 0, message.items_earned[j].high >>> 0).toNumber(true) : message.items_earned[j]; } - if (message.reward_credits_earned != null && message.hasOwnProperty("reward_credits_earned")) + if (message.reward_credits_earned != null && $Object.hasOwnProperty.call(message, "reward_credits_earned")) object.reward_credits_earned = message.reward_credits_earned; - if (message.contract_completed != null && message.hasOwnProperty("contract_completed")) + if (message.contract_completed != null && $Object.hasOwnProperty.call(message, "contract_completed")) object.contract_completed = message.contract_completed; return object; }; @@ -50283,8 +64974,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgQuestProgressReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgQuestProgressReport.prototype.toJSON = function() { + return CMsgQuestProgressReport.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgQuestProgressReport + * @function getTypeUrl + * @memberof CMsgQuestProgressReport + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgQuestProgressReport.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestProgressReport"; }; return CMsgQuestProgressReport; @@ -50294,26 +64999,39 @@ /** * Properties of a CMsgConsumePaintkit. - * @exports ICMsgConsumePaintkit - * @interface ICMsgConsumePaintkit + * @typedef {Object} CMsgConsumePaintkit.$Properties * @property {number|Long|null} [source_id] CMsgConsumePaintkit source_id * @property {number|null} [target_defindex] CMsgConsumePaintkit target_defindex + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgConsumePaintkit. + * @exports ICMsgConsumePaintkit + * @interface ICMsgConsumePaintkit + * @augments CMsgConsumePaintkit.$Properties + * @deprecated Use CMsgConsumePaintkit.$Properties instead. + */ + + /** + * Shape of a CMsgConsumePaintkit. + * @typedef {CMsgConsumePaintkit.$Properties} CMsgConsumePaintkit.$Shape */ /** * Constructs a new CMsgConsumePaintkit. * @exports CMsgConsumePaintkit * @classdesc Represents a CMsgConsumePaintkit. - * @implements ICMsgConsumePaintkit * @constructor - * @param {ICMsgConsumePaintkit=} [properties] Properties to set + * @param {CMsgConsumePaintkit.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgConsumePaintkit(properties) { + var CMsgConsumePaintkit = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgConsumePaintkit source_id. @@ -50321,7 +65039,7 @@ * @memberof CMsgConsumePaintkit * @instance */ - CMsgConsumePaintkit.prototype.source_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgConsumePaintkit.prototype.source_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgConsumePaintkit target_defindex. @@ -50336,10 +65054,14 @@ * @function create * @memberof CMsgConsumePaintkit * @static - * @param {ICMsgConsumePaintkit=} [properties] Properties to set + * @param {CMsgConsumePaintkit.$Properties=} [properties] Properties to set * @returns {CMsgConsumePaintkit} CMsgConsumePaintkit instance + * @type {{ + * (properties: CMsgConsumePaintkit.$Shape): CMsgConsumePaintkit & CMsgConsumePaintkit.$Shape; + * (properties?: CMsgConsumePaintkit.$Properties): CMsgConsumePaintkit; + * }} */ - CMsgConsumePaintkit.create = function create(properties) { + CMsgConsumePaintkit.create = function(properties) { return new CMsgConsumePaintkit(properties); }; @@ -50348,17 +65070,24 @@ * @function encode * @memberof CMsgConsumePaintkit * @static - * @param {ICMsgConsumePaintkit} message CMsgConsumePaintkit message or plain object to encode + * @param {CMsgConsumePaintkit.$Properties} message CMsgConsumePaintkit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConsumePaintkit.encode = function encode(message, writer) { + CMsgConsumePaintkit.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.source_id != null && Object.hasOwnProperty.call(message, "source_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.source_id != null && $Object.hasOwnProperty.call(message, "source_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.source_id); - if (message.target_defindex != null && Object.hasOwnProperty.call(message, "target_defindex")) + if (message.target_defindex != null && $Object.hasOwnProperty.call(message, "target_defindex")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.target_defindex); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -50367,12 +65096,12 @@ * @function encodeDelimited * @memberof CMsgConsumePaintkit * @static - * @param {ICMsgConsumePaintkit} message CMsgConsumePaintkit message or plain object to encode + * @param {CMsgConsumePaintkit.$Properties} message CMsgConsumePaintkit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConsumePaintkit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgConsumePaintkit.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -50382,28 +65111,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgConsumePaintkit} CMsgConsumePaintkit + * @returns {CMsgConsumePaintkit & CMsgConsumePaintkit.$Shape} CMsgConsumePaintkit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConsumePaintkit.decode = function decode(reader, length) { + CMsgConsumePaintkit.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgConsumePaintkit(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgConsumePaintkit(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source_id = reader.fixed64(); - break; - case 2: - message.target_defindex = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.source_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.target_defindex = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -50413,11 +65162,11 @@ * @memberof CMsgConsumePaintkit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgConsumePaintkit} CMsgConsumePaintkit + * @returns {CMsgConsumePaintkit & CMsgConsumePaintkit.$Shape} CMsgConsumePaintkit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConsumePaintkit.decodeDelimited = function decodeDelimited(reader) { + CMsgConsumePaintkit.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -50431,13 +65180,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgConsumePaintkit.verify = function verify(message) { + CMsgConsumePaintkit.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source_id != null && message.hasOwnProperty("source_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.source_id != null && $Object.hasOwnProperty.call(message, "source_id")) if (!$util.isInteger(message.source_id) && !(message.source_id && $util.isInteger(message.source_id.low) && $util.isInteger(message.source_id.high))) return "source_id: integer|Long expected"; - if (message.target_defindex != null && message.hasOwnProperty("target_defindex")) + if (message.target_defindex != null && $Object.hasOwnProperty.call(message, "target_defindex")) if (!$util.isInteger(message.target_defindex)) return "target_defindex: integer expected"; return null; @@ -50451,19 +65204,25 @@ * @param {Object.} object Plain object * @returns {CMsgConsumePaintkit} CMsgConsumePaintkit */ - CMsgConsumePaintkit.fromObject = function fromObject(object) { + CMsgConsumePaintkit.fromObject = function (object, _depth) { if (object instanceof $root.CMsgConsumePaintkit) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgConsumePaintkit: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgConsumePaintkit(); if (object.source_id != null) if ($util.Long) - (message.source_id = $util.Long.fromValue(object.source_id)).unsigned = false; + message.source_id = $util.Long.fromValue(object.source_id, true); else if (typeof object.source_id === "string") - message.source_id = parseInt(object.source_id, 10); + message.source_id = $parseInt(object.source_id, 10); else if (typeof object.source_id === "number") message.source_id = object.source_id; else if (typeof object.source_id === "object") - message.source_id = new $util.LongBits(object.source_id.low >>> 0, object.source_id.high >>> 0).toNumber(); + message.source_id = new $util.LongBits(object.source_id.low >>> 0, object.source_id.high >>> 0).toNumber(true); if (object.target_defindex != null) message.target_defindex = object.target_defindex >>> 0; return message; @@ -50478,24 +65237,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgConsumePaintkit.toObject = function toObject(message, options) { + CMsgConsumePaintkit.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.source_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.source_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.source_id = options.longs === String ? "0" : 0; + object.source_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.target_defindex = 0; } - if (message.source_id != null && message.hasOwnProperty("source_id")) - if (typeof message.source_id === "number") - object.source_id = options.longs === String ? String(message.source_id) : message.source_id; + if (message.source_id != null && $Object.hasOwnProperty.call(message, "source_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.source_id = typeof message.source_id === "number" ? $BigInt(message.source_id) : $util.Long.fromBits(message.source_id.low >>> 0, message.source_id.high >>> 0, true).toBigInt(); + else if (typeof message.source_id === "number") + object.source_id = options.longs === $String ? $String(message.source_id) : message.source_id; else - object.source_id = options.longs === String ? $util.Long.prototype.toString.call(message.source_id) : options.longs === Number ? new $util.LongBits(message.source_id.low >>> 0, message.source_id.high >>> 0).toNumber() : message.source_id; - if (message.target_defindex != null && message.hasOwnProperty("target_defindex")) + object.source_id = options.longs === $String ? $util.Long.prototype.toString.call(message.source_id) : options.longs === $Number ? new $util.LongBits(message.source_id.low >>> 0, message.source_id.high >>> 0).toNumber(true) : message.source_id; + if (message.target_defindex != null && $Object.hasOwnProperty.call(message, "target_defindex")) object.target_defindex = message.target_defindex; return object; }; @@ -50507,8 +65272,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgConsumePaintkit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgConsumePaintkit.prototype.toJSON = function() { + return CMsgConsumePaintkit.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgConsumePaintkit + * @function getTypeUrl + * @memberof CMsgConsumePaintkit + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgConsumePaintkit.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgConsumePaintkit"; }; return CMsgConsumePaintkit; @@ -50518,27 +65297,40 @@ /** * Properties of a CMsgPainkitDevGrant. - * @exports ICMsgPainkitDevGrant - * @interface ICMsgPainkitDevGrant + * @typedef {Object} CMsgPainkitDevGrant.$Properties * @property {number|null} [paintkit_defindex] CMsgPainkitDevGrant paintkit_defindex * @property {number|null} [wear] CMsgPainkitDevGrant wear * @property {number|null} [item_defindex] CMsgPainkitDevGrant item_defindex + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPainkitDevGrant. + * @exports ICMsgPainkitDevGrant + * @interface ICMsgPainkitDevGrant + * @augments CMsgPainkitDevGrant.$Properties + * @deprecated Use CMsgPainkitDevGrant.$Properties instead. + */ + + /** + * Shape of a CMsgPainkitDevGrant. + * @typedef {CMsgPainkitDevGrant.$Properties} CMsgPainkitDevGrant.$Shape */ /** * Constructs a new CMsgPainkitDevGrant. * @exports CMsgPainkitDevGrant * @classdesc Represents a CMsgPainkitDevGrant. - * @implements ICMsgPainkitDevGrant * @constructor - * @param {ICMsgPainkitDevGrant=} [properties] Properties to set + * @param {CMsgPainkitDevGrant.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPainkitDevGrant(properties) { + var CMsgPainkitDevGrant = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPainkitDevGrant paintkit_defindex. @@ -50569,10 +65361,14 @@ * @function create * @memberof CMsgPainkitDevGrant * @static - * @param {ICMsgPainkitDevGrant=} [properties] Properties to set + * @param {CMsgPainkitDevGrant.$Properties=} [properties] Properties to set * @returns {CMsgPainkitDevGrant} CMsgPainkitDevGrant instance + * @type {{ + * (properties: CMsgPainkitDevGrant.$Shape): CMsgPainkitDevGrant & CMsgPainkitDevGrant.$Shape; + * (properties?: CMsgPainkitDevGrant.$Properties): CMsgPainkitDevGrant; + * }} */ - CMsgPainkitDevGrant.create = function create(properties) { + CMsgPainkitDevGrant.create = function(properties) { return new CMsgPainkitDevGrant(properties); }; @@ -50581,19 +65377,26 @@ * @function encode * @memberof CMsgPainkitDevGrant * @static - * @param {ICMsgPainkitDevGrant} message CMsgPainkitDevGrant message or plain object to encode + * @param {CMsgPainkitDevGrant.$Properties} message CMsgPainkitDevGrant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPainkitDevGrant.encode = function encode(message, writer) { + CMsgPainkitDevGrant.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.paintkit_defindex != null && Object.hasOwnProperty.call(message, "paintkit_defindex")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.paintkit_defindex != null && $Object.hasOwnProperty.call(message, "paintkit_defindex")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.paintkit_defindex); - if (message.wear != null && Object.hasOwnProperty.call(message, "wear")) + if (message.wear != null && $Object.hasOwnProperty.call(message, "wear")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.wear); - if (message.item_defindex != null && Object.hasOwnProperty.call(message, "item_defindex")) + if (message.item_defindex != null && $Object.hasOwnProperty.call(message, "item_defindex")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.item_defindex); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -50602,12 +65405,12 @@ * @function encodeDelimited * @memberof CMsgPainkitDevGrant * @static - * @param {ICMsgPainkitDevGrant} message CMsgPainkitDevGrant message or plain object to encode + * @param {CMsgPainkitDevGrant.$Properties} message CMsgPainkitDevGrant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPainkitDevGrant.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPainkitDevGrant.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -50617,31 +65420,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPainkitDevGrant} CMsgPainkitDevGrant + * @returns {CMsgPainkitDevGrant & CMsgPainkitDevGrant.$Shape} CMsgPainkitDevGrant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPainkitDevGrant.decode = function decode(reader, length) { + CMsgPainkitDevGrant.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPainkitDevGrant(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPainkitDevGrant(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.paintkit_defindex = reader.uint32(); - break; - case 2: - message.wear = reader.float(); - break; - case 3: - message.item_defindex = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.paintkit_defindex = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.wear = reader.float(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_defindex = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -50651,11 +65477,11 @@ * @memberof CMsgPainkitDevGrant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPainkitDevGrant} CMsgPainkitDevGrant + * @returns {CMsgPainkitDevGrant & CMsgPainkitDevGrant.$Shape} CMsgPainkitDevGrant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPainkitDevGrant.decodeDelimited = function decodeDelimited(reader) { + CMsgPainkitDevGrant.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -50669,16 +65495,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPainkitDevGrant.verify = function verify(message) { + CMsgPainkitDevGrant.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.paintkit_defindex != null && message.hasOwnProperty("paintkit_defindex")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.paintkit_defindex != null && $Object.hasOwnProperty.call(message, "paintkit_defindex")) if (!$util.isInteger(message.paintkit_defindex)) return "paintkit_defindex: integer expected"; - if (message.wear != null && message.hasOwnProperty("wear")) + if (message.wear != null && $Object.hasOwnProperty.call(message, "wear")) if (typeof message.wear !== "number") return "wear: number expected"; - if (message.item_defindex != null && message.hasOwnProperty("item_defindex")) + if (message.item_defindex != null && $Object.hasOwnProperty.call(message, "item_defindex")) if (!$util.isInteger(message.item_defindex)) return "item_defindex: integer expected"; return null; @@ -50692,14 +65522,20 @@ * @param {Object.} object Plain object * @returns {CMsgPainkitDevGrant} CMsgPainkitDevGrant */ - CMsgPainkitDevGrant.fromObject = function fromObject(object) { + CMsgPainkitDevGrant.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPainkitDevGrant) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPainkitDevGrant: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPainkitDevGrant(); if (object.paintkit_defindex != null) message.paintkit_defindex = object.paintkit_defindex >>> 0; if (object.wear != null) - message.wear = Number(object.wear); + message.wear = $Number(object.wear); if (object.item_defindex != null) message.item_defindex = object.item_defindex >>> 0; return message; @@ -50714,20 +65550,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPainkitDevGrant.toObject = function toObject(message, options) { + CMsgPainkitDevGrant.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.paintkit_defindex = 0; object.wear = 0; object.item_defindex = 0; } - if (message.paintkit_defindex != null && message.hasOwnProperty("paintkit_defindex")) + if (message.paintkit_defindex != null && $Object.hasOwnProperty.call(message, "paintkit_defindex")) object.paintkit_defindex = message.paintkit_defindex; - if (message.wear != null && message.hasOwnProperty("wear")) - object.wear = options.json && !isFinite(message.wear) ? String(message.wear) : message.wear; - if (message.item_defindex != null && message.hasOwnProperty("item_defindex")) + if (message.wear != null && $Object.hasOwnProperty.call(message, "wear")) + object.wear = options.json && !$isFinite(message.wear) ? $String(message.wear) : message.wear; + if (message.item_defindex != null && $Object.hasOwnProperty.call(message, "item_defindex")) object.item_defindex = message.item_defindex; return object; }; @@ -50739,8 +65579,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPainkitDevGrant.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPainkitDevGrant.prototype.toJSON = function() { + return CMsgPainkitDevGrant.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPainkitDevGrant + * @function getTypeUrl + * @memberof CMsgPainkitDevGrant + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPainkitDevGrant.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPainkitDevGrant"; }; return CMsgPainkitDevGrant; @@ -50750,29 +65604,42 @@ /** * Properties of a GCQuestStrangeEvent. - * @exports IGCQuestStrangeEvent - * @interface IGCQuestStrangeEvent + * @typedef {Object} GCQuestStrangeEvent.$Properties * @property {number|null} [owner_account_id] GCQuestStrangeEvent owner_account_id * @property {number|null} [scorer_account_id] GCQuestStrangeEvent scorer_account_id * @property {number|Long|null} [quest_id] GCQuestStrangeEvent quest_id * @property {number|null} [strange_event_id] GCQuestStrangeEvent strange_event_id * @property {number|null} [score] GCQuestStrangeEvent score + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GCQuestStrangeEvent. + * @exports IGCQuestStrangeEvent + * @interface IGCQuestStrangeEvent + * @augments GCQuestStrangeEvent.$Properties + * @deprecated Use GCQuestStrangeEvent.$Properties instead. + */ + + /** + * Shape of a GCQuestStrangeEvent. + * @typedef {GCQuestStrangeEvent.$Properties} GCQuestStrangeEvent.$Shape */ /** * Constructs a new GCQuestStrangeEvent. * @exports GCQuestStrangeEvent * @classdesc Represents a GCQuestStrangeEvent. - * @implements IGCQuestStrangeEvent * @constructor - * @param {IGCQuestStrangeEvent=} [properties] Properties to set + * @param {GCQuestStrangeEvent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function GCQuestStrangeEvent(properties) { + var GCQuestStrangeEvent = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * GCQuestStrangeEvent owner_account_id. @@ -50819,10 +65686,14 @@ * @function create * @memberof GCQuestStrangeEvent * @static - * @param {IGCQuestStrangeEvent=} [properties] Properties to set + * @param {GCQuestStrangeEvent.$Properties=} [properties] Properties to set * @returns {GCQuestStrangeEvent} GCQuestStrangeEvent instance + * @type {{ + * (properties: GCQuestStrangeEvent.$Shape): GCQuestStrangeEvent & GCQuestStrangeEvent.$Shape; + * (properties?: GCQuestStrangeEvent.$Properties): GCQuestStrangeEvent; + * }} */ - GCQuestStrangeEvent.create = function create(properties) { + GCQuestStrangeEvent.create = function(properties) { return new GCQuestStrangeEvent(properties); }; @@ -50831,23 +65702,30 @@ * @function encode * @memberof GCQuestStrangeEvent * @static - * @param {IGCQuestStrangeEvent} message GCQuestStrangeEvent message or plain object to encode + * @param {GCQuestStrangeEvent.$Properties} message GCQuestStrangeEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GCQuestStrangeEvent.encode = function encode(message, writer) { + GCQuestStrangeEvent.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.owner_account_id != null && Object.hasOwnProperty.call(message, "owner_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.owner_account_id != null && $Object.hasOwnProperty.call(message, "owner_account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.owner_account_id); - if (message.scorer_account_id != null && Object.hasOwnProperty.call(message, "scorer_account_id")) + if (message.scorer_account_id != null && $Object.hasOwnProperty.call(message, "scorer_account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.scorer_account_id); - if (message.quest_id != null && Object.hasOwnProperty.call(message, "quest_id")) + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.quest_id); - if (message.strange_event_id != null && Object.hasOwnProperty.call(message, "strange_event_id")) + if (message.strange_event_id != null && $Object.hasOwnProperty.call(message, "strange_event_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.strange_event_id); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.score); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -50856,12 +65734,12 @@ * @function encodeDelimited * @memberof GCQuestStrangeEvent * @static - * @param {IGCQuestStrangeEvent} message GCQuestStrangeEvent message or plain object to encode + * @param {GCQuestStrangeEvent.$Properties} message GCQuestStrangeEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GCQuestStrangeEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + GCQuestStrangeEvent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -50871,37 +65749,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {GCQuestStrangeEvent} GCQuestStrangeEvent + * @returns {GCQuestStrangeEvent & GCQuestStrangeEvent.$Shape} GCQuestStrangeEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GCQuestStrangeEvent.decode = function decode(reader, length) { + GCQuestStrangeEvent.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.GCQuestStrangeEvent(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.GCQuestStrangeEvent(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner_account_id = reader.uint32(); - break; - case 2: - message.scorer_account_id = reader.uint32(); - break; - case 3: - message.quest_id = reader.uint64(); - break; - case 4: - message.strange_event_id = reader.uint32(); - break; - case 5: - message.score = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.owner_account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.scorer_account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.quest_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.strange_event_id = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.score = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -50911,11 +65818,11 @@ * @memberof GCQuestStrangeEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {GCQuestStrangeEvent} GCQuestStrangeEvent + * @returns {GCQuestStrangeEvent & GCQuestStrangeEvent.$Shape} GCQuestStrangeEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GCQuestStrangeEvent.decodeDelimited = function decodeDelimited(reader) { + GCQuestStrangeEvent.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -50929,22 +65836,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GCQuestStrangeEvent.verify = function verify(message) { + GCQuestStrangeEvent.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.owner_account_id != null && message.hasOwnProperty("owner_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.owner_account_id != null && $Object.hasOwnProperty.call(message, "owner_account_id")) if (!$util.isInteger(message.owner_account_id)) return "owner_account_id: integer expected"; - if (message.scorer_account_id != null && message.hasOwnProperty("scorer_account_id")) + if (message.scorer_account_id != null && $Object.hasOwnProperty.call(message, "scorer_account_id")) if (!$util.isInteger(message.scorer_account_id)) return "scorer_account_id: integer expected"; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) if (!$util.isInteger(message.quest_id) && !(message.quest_id && $util.isInteger(message.quest_id.low) && $util.isInteger(message.quest_id.high))) return "quest_id: integer|Long expected"; - if (message.strange_event_id != null && message.hasOwnProperty("strange_event_id")) + if (message.strange_event_id != null && $Object.hasOwnProperty.call(message, "strange_event_id")) if (!$util.isInteger(message.strange_event_id)) return "strange_event_id: integer expected"; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) if (!$util.isInteger(message.score)) return "score: integer expected"; return null; @@ -50958,9 +65869,15 @@ * @param {Object.} object Plain object * @returns {GCQuestStrangeEvent} GCQuestStrangeEvent */ - GCQuestStrangeEvent.fromObject = function fromObject(object) { + GCQuestStrangeEvent.fromObject = function (object, _depth) { if (object instanceof $root.GCQuestStrangeEvent) return object; + if (!$util.isObject(object)) + throw $TypeError(".GCQuestStrangeEvent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.GCQuestStrangeEvent(); if (object.owner_account_id != null) message.owner_account_id = object.owner_account_id >>> 0; @@ -50968,9 +65885,9 @@ message.scorer_account_id = object.scorer_account_id >>> 0; if (object.quest_id != null) if ($util.Long) - (message.quest_id = $util.Long.fromValue(object.quest_id)).unsigned = true; + message.quest_id = $util.Long.fromValue(object.quest_id, true); else if (typeof object.quest_id === "string") - message.quest_id = parseInt(object.quest_id, 10); + message.quest_id = $parseInt(object.quest_id, 10); else if (typeof object.quest_id === "number") message.quest_id = object.quest_id; else if (typeof object.quest_id === "object") @@ -50991,33 +65908,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GCQuestStrangeEvent.toObject = function toObject(message, options) { + GCQuestStrangeEvent.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.owner_account_id = 0; object.scorer_account_id = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.quest_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.quest_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.quest_id = options.longs === String ? "0" : 0; + object.quest_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.strange_event_id = 0; object.score = 0; } - if (message.owner_account_id != null && message.hasOwnProperty("owner_account_id")) + if (message.owner_account_id != null && $Object.hasOwnProperty.call(message, "owner_account_id")) object.owner_account_id = message.owner_account_id; - if (message.scorer_account_id != null && message.hasOwnProperty("scorer_account_id")) + if (message.scorer_account_id != null && $Object.hasOwnProperty.call(message, "scorer_account_id")) object.scorer_account_id = message.scorer_account_id; - if (message.quest_id != null && message.hasOwnProperty("quest_id")) - if (typeof message.quest_id === "number") - object.quest_id = options.longs === String ? String(message.quest_id) : message.quest_id; + if (message.quest_id != null && $Object.hasOwnProperty.call(message, "quest_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.quest_id = typeof message.quest_id === "number" ? $BigInt(message.quest_id) : $util.Long.fromBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0, true).toBigInt(); + else if (typeof message.quest_id === "number") + object.quest_id = options.longs === $String ? $String(message.quest_id) : message.quest_id; else - object.quest_id = options.longs === String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; - if (message.strange_event_id != null && message.hasOwnProperty("strange_event_id")) + object.quest_id = options.longs === $String ? $util.Long.prototype.toString.call(message.quest_id) : options.longs === $Number ? new $util.LongBits(message.quest_id.low >>> 0, message.quest_id.high >>> 0).toNumber(true) : message.quest_id; + if (message.strange_event_id != null && $Object.hasOwnProperty.call(message, "strange_event_id")) object.strange_event_id = message.strange_event_id; - if (message.score != null && message.hasOwnProperty("score")) + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) object.score = message.score; return object; }; @@ -51029,8 +65952,22 @@ * @instance * @returns {Object.} JSON object */ - GCQuestStrangeEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + GCQuestStrangeEvent.prototype.toJSON = function() { + return GCQuestStrangeEvent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GCQuestStrangeEvent + * @function getTypeUrl + * @memberof GCQuestStrangeEvent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GCQuestStrangeEvent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/GCQuestStrangeEvent"; }; return GCQuestStrangeEvent; @@ -51038,7 +65975,7 @@ /** * GCProtoBufMsgSrc enum. - * @exports GCProtoBufMsgSrc + * @name GCProtoBufMsgSrc * @enum {number} * @property {number} GCProtoBufMsgSrc_Unspecified=0 GCProtoBufMsgSrc_Unspecified value * @property {number} GCProtoBufMsgSrc_FromSystem=1 GCProtoBufMsgSrc_FromSystem value @@ -51047,7 +65984,7 @@ * @property {number} GCProtoBufMsgSrc_ReplySystem=4 GCProtoBufMsgSrc_ReplySystem value */ $root.GCProtoBufMsgSrc = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "GCProtoBufMsgSrc_Unspecified"] = 0; values[valuesById[1] = "GCProtoBufMsgSrc_FromSystem"] = 1; values[valuesById[2] = "GCProtoBufMsgSrc_FromSteamID"] = 2; @@ -51060,8 +65997,7 @@ /** * Properties of a CMsgProtoBufHeader. - * @exports ICMsgProtoBufHeader - * @interface ICMsgProtoBufHeader + * @typedef {Object} CMsgProtoBufHeader.$Properties * @property {number|Long|null} [client_steam_id] CMsgProtoBufHeader client_steam_id * @property {number|null} [client_session_id] CMsgProtoBufHeader client_session_id * @property {number|null} [source_app_id] CMsgProtoBufHeader source_app_id @@ -51072,22 +66008,36 @@ * @property {string|null} [error_message] CMsgProtoBufHeader error_message * @property {GCProtoBufMsgSrc|null} [gc_msg_src] CMsgProtoBufHeader gc_msg_src * @property {number|null} [gc_dir_index_source] CMsgProtoBufHeader gc_dir_index_source + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgProtoBufHeader. + * @exports ICMsgProtoBufHeader + * @interface ICMsgProtoBufHeader + * @augments CMsgProtoBufHeader.$Properties + * @deprecated Use CMsgProtoBufHeader.$Properties instead. + */ + + /** + * Shape of a CMsgProtoBufHeader. + * @typedef {CMsgProtoBufHeader.$Properties} CMsgProtoBufHeader.$Shape */ /** * Constructs a new CMsgProtoBufHeader. * @exports CMsgProtoBufHeader * @classdesc Represents a CMsgProtoBufHeader. - * @implements ICMsgProtoBufHeader * @constructor - * @param {ICMsgProtoBufHeader=} [properties] Properties to set + * @param {CMsgProtoBufHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgProtoBufHeader(properties) { + var CMsgProtoBufHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgProtoBufHeader client_steam_id. @@ -51095,7 +66045,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgProtoBufHeader.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgProtoBufHeader client_session_id. @@ -51119,7 +66069,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.job_id_source = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000; + CMsgProtoBufHeader.prototype.job_id_source = $util.Long ? $util.Long.fromBits(-1,-1,true) : 18446744073709552000; /** * CMsgProtoBufHeader job_id_target. @@ -51127,7 +66077,7 @@ * @memberof CMsgProtoBufHeader * @instance */ - CMsgProtoBufHeader.prototype.job_id_target = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000; + CMsgProtoBufHeader.prototype.job_id_target = $util.Long ? $util.Long.fromBits(-1,-1,true) : 18446744073709552000; /** * CMsgProtoBufHeader target_job_name. @@ -51174,10 +66124,14 @@ * @function create * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader=} [properties] Properties to set + * @param {CMsgProtoBufHeader.$Properties=} [properties] Properties to set * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader instance + * @type {{ + * (properties: CMsgProtoBufHeader.$Shape): CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape; + * (properties?: CMsgProtoBufHeader.$Properties): CMsgProtoBufHeader; + * }} */ - CMsgProtoBufHeader.create = function create(properties) { + CMsgProtoBufHeader.create = function(properties) { return new CMsgProtoBufHeader(properties); }; @@ -51186,33 +66140,40 @@ * @function encode * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader} message CMsgProtoBufHeader message or plain object to encode + * @param {CMsgProtoBufHeader.$Properties} message CMsgProtoBufHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoBufHeader.encode = function encode(message, writer) { + CMsgProtoBufHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.client_steam_id != null && Object.hasOwnProperty.call(message, "client_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.client_steam_id); - if (message.client_session_id != null && Object.hasOwnProperty.call(message, "client_session_id")) + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.client_session_id); - if (message.source_app_id != null && Object.hasOwnProperty.call(message, "source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.source_app_id); - if (message.job_id_source != null && Object.hasOwnProperty.call(message, "job_id_source")) + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) writer.uint32(/* id 10, wireType 1 =*/81).fixed64(message.job_id_source); - if (message.job_id_target != null && Object.hasOwnProperty.call(message, "job_id_target")) + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) writer.uint32(/* id 11, wireType 1 =*/89).fixed64(message.job_id_target); - if (message.target_job_name != null && Object.hasOwnProperty.call(message, "target_job_name")) + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.target_job_name); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.eresult); - if (message.error_message != null && Object.hasOwnProperty.call(message, "error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) writer.uint32(/* id 14, wireType 2 =*/114).string(message.error_message); - if (message.gc_msg_src != null && Object.hasOwnProperty.call(message, "gc_msg_src")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) writer.uint32(/* id 200, wireType 0 =*/1600).int32(message.gc_msg_src); - if (message.gc_dir_index_source != null && Object.hasOwnProperty.call(message, "gc_dir_index_source")) + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) writer.uint32(/* id 201, wireType 0 =*/1608).uint32(message.gc_dir_index_source); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -51221,12 +66182,12 @@ * @function encodeDelimited * @memberof CMsgProtoBufHeader * @static - * @param {ICMsgProtoBufHeader} message CMsgProtoBufHeader message or plain object to encode + * @param {CMsgProtoBufHeader.$Properties} message CMsgProtoBufHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoBufHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgProtoBufHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -51236,52 +66197,102 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader + * @returns {CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape} CMsgProtoBufHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoBufHeader.decode = function decode(reader, length) { + CMsgProtoBufHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgProtoBufHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgProtoBufHeader(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_steam_id = reader.fixed64(); - break; - case 2: - message.client_session_id = reader.int32(); - break; - case 3: - message.source_app_id = reader.uint32(); - break; - case 10: - message.job_id_source = reader.fixed64(); - break; - case 11: - message.job_id_target = reader.fixed64(); - break; - case 12: - message.target_job_name = reader.string(); - break; - case 13: - message.eresult = reader.int32(); - break; - case 14: - message.error_message = reader.string(); - break; - case 200: - message.gc_msg_src = reader.int32(); - break; - case 201: - message.gc_dir_index_source = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.client_steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.client_session_id = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.source_app_id = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 1) + break; + message.job_id_source = reader.fixed64(); + continue; + } + case 11: { + if (wireType !== 1) + break; + message.job_id_target = reader.fixed64(); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.target_job_name = reader.string(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 14: { + if (wireType !== 2) + break; + message.error_message = reader.string(); + continue; + } + case 200: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.GCProtoBufMsgSrc[value] !== $undefined) + message.gc_msg_src = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 201: { + if (wireType !== 0) + break; + message.gc_dir_index_source = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -51291,11 +66302,11 @@ * @memberof CMsgProtoBufHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader + * @returns {CMsgProtoBufHeader & CMsgProtoBufHeader.$Shape} CMsgProtoBufHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoBufHeader.decodeDelimited = function decodeDelimited(reader) { + CMsgProtoBufHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -51309,34 +66320,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgProtoBufHeader.verify = function verify(message) { + CMsgProtoBufHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) if (!$util.isInteger(message.client_steam_id) && !(message.client_steam_id && $util.isInteger(message.client_steam_id.low) && $util.isInteger(message.client_steam_id.high))) return "client_steam_id: integer|Long expected"; - if (message.client_session_id != null && message.hasOwnProperty("client_session_id")) + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) if (!$util.isInteger(message.client_session_id)) return "client_session_id: integer expected"; - if (message.source_app_id != null && message.hasOwnProperty("source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) if (!$util.isInteger(message.source_app_id)) return "source_app_id: integer expected"; - if (message.job_id_source != null && message.hasOwnProperty("job_id_source")) + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) if (!$util.isInteger(message.job_id_source) && !(message.job_id_source && $util.isInteger(message.job_id_source.low) && $util.isInteger(message.job_id_source.high))) return "job_id_source: integer|Long expected"; - if (message.job_id_target != null && message.hasOwnProperty("job_id_target")) + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) if (!$util.isInteger(message.job_id_target) && !(message.job_id_target && $util.isInteger(message.job_id_target.low) && $util.isInteger(message.job_id_target.high))) return "job_id_target: integer|Long expected"; - if (message.target_job_name != null && message.hasOwnProperty("target_job_name")) + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) if (!$util.isString(message.target_job_name)) return "target_job_name: string expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) if (!$util.isString(message.error_message)) return "error_message: string expected"; - if (message.gc_msg_src != null && message.hasOwnProperty("gc_msg_src")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) switch (message.gc_msg_src) { default: return "gc_msg_src: enum value expected"; @@ -51347,7 +66362,7 @@ case 4: break; } - if (message.gc_dir_index_source != null && message.hasOwnProperty("gc_dir_index_source")) + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) if (!$util.isInteger(message.gc_dir_index_source)) return "gc_dir_index_source: integer expected"; return null; @@ -51361,47 +66376,53 @@ * @param {Object.} object Plain object * @returns {CMsgProtoBufHeader} CMsgProtoBufHeader */ - CMsgProtoBufHeader.fromObject = function fromObject(object) { + CMsgProtoBufHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgProtoBufHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgProtoBufHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgProtoBufHeader(); if (object.client_steam_id != null) if ($util.Long) - (message.client_steam_id = $util.Long.fromValue(object.client_steam_id)).unsigned = false; + message.client_steam_id = $util.Long.fromValue(object.client_steam_id, true); else if (typeof object.client_steam_id === "string") - message.client_steam_id = parseInt(object.client_steam_id, 10); + message.client_steam_id = $parseInt(object.client_steam_id, 10); else if (typeof object.client_steam_id === "number") message.client_steam_id = object.client_steam_id; else if (typeof object.client_steam_id === "object") - message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(); + message.client_steam_id = new $util.LongBits(object.client_steam_id.low >>> 0, object.client_steam_id.high >>> 0).toNumber(true); if (object.client_session_id != null) message.client_session_id = object.client_session_id | 0; if (object.source_app_id != null) message.source_app_id = object.source_app_id >>> 0; if (object.job_id_source != null) if ($util.Long) - (message.job_id_source = $util.Long.fromValue(object.job_id_source)).unsigned = false; + message.job_id_source = $util.Long.fromValue(object.job_id_source, true); else if (typeof object.job_id_source === "string") - message.job_id_source = parseInt(object.job_id_source, 10); + message.job_id_source = $parseInt(object.job_id_source, 10); else if (typeof object.job_id_source === "number") message.job_id_source = object.job_id_source; else if (typeof object.job_id_source === "object") - message.job_id_source = new $util.LongBits(object.job_id_source.low >>> 0, object.job_id_source.high >>> 0).toNumber(); + message.job_id_source = new $util.LongBits(object.job_id_source.low >>> 0, object.job_id_source.high >>> 0).toNumber(true); if (object.job_id_target != null) if ($util.Long) - (message.job_id_target = $util.Long.fromValue(object.job_id_target)).unsigned = false; + message.job_id_target = $util.Long.fromValue(object.job_id_target, true); else if (typeof object.job_id_target === "string") - message.job_id_target = parseInt(object.job_id_target, 10); + message.job_id_target = $parseInt(object.job_id_target, 10); else if (typeof object.job_id_target === "number") message.job_id_target = object.job_id_target; else if (typeof object.job_id_target === "object") - message.job_id_target = new $util.LongBits(object.job_id_target.low >>> 0, object.job_id_target.high >>> 0).toNumber(); + message.job_id_target = new $util.LongBits(object.job_id_target.low >>> 0, object.job_id_target.high >>> 0).toNumber(true); if (object.target_job_name != null) - message.target_job_name = String(object.target_job_name); + message.target_job_name = $String(object.target_job_name); if (object.eresult != null) message.eresult = object.eresult | 0; if (object.error_message != null) - message.error_message = String(object.error_message); + message.error_message = $String(object.error_message); switch (object.gc_msg_src) { case "GCProtoBufMsgSrc_Unspecified": case 0: @@ -51423,6 +66444,7 @@ case 4: message.gc_msg_src = 4; break; + default: } if (object.gc_dir_index_source != null) message.gc_dir_index_source = object.gc_dir_index_source >>> 0; @@ -51438,62 +66460,72 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgProtoBufHeader.toObject = function toObject(message, options) { + CMsgProtoBufHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.client_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.client_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.client_steam_id = options.longs === String ? "0" : 0; + object.client_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.client_session_id = 0; object.source_app_id = 0; if ($util.Long) { - var long = new $util.Long(-1, 2147483647, false); - object.job_id_source = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(-1, -1, true); + object.job_id_source = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.job_id_source = options.longs === String ? "9223372036854775807" : 9223372036854776000; + object.job_id_source = options.longs === $String ? "18446744073709551615" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("18446744073709551615") : 18446744073709552000; if ($util.Long) { - var long = new $util.Long(-1, 2147483647, false); - object.job_id_target = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(-1, -1, true); + object.job_id_target = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.job_id_target = options.longs === String ? "9223372036854775807" : 9223372036854776000; + object.job_id_target = options.longs === $String ? "18446744073709551615" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("18446744073709551615") : 18446744073709552000; object.target_job_name = ""; object.eresult = 2; object.error_message = ""; - object.gc_msg_src = options.enums === String ? "GCProtoBufMsgSrc_Unspecified" : 0; + object.gc_msg_src = options.enums === $String ? "GCProtoBufMsgSrc_Unspecified" : 0; object.gc_dir_index_source = 0; } - if (message.client_steam_id != null && message.hasOwnProperty("client_steam_id")) - if (typeof message.client_steam_id === "number") - object.client_steam_id = options.longs === String ? String(message.client_steam_id) : message.client_steam_id; + if (message.client_steam_id != null && $Object.hasOwnProperty.call(message, "client_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.client_steam_id = typeof message.client_steam_id === "number" ? $BigInt(message.client_steam_id) : $util.Long.fromBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.client_steam_id === "number") + object.client_steam_id = options.longs === $String ? $String(message.client_steam_id) : message.client_steam_id; else - object.client_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber() : message.client_steam_id; - if (message.client_session_id != null && message.hasOwnProperty("client_session_id")) + object.client_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.client_steam_id) : options.longs === $Number ? new $util.LongBits(message.client_steam_id.low >>> 0, message.client_steam_id.high >>> 0).toNumber(true) : message.client_steam_id; + if (message.client_session_id != null && $Object.hasOwnProperty.call(message, "client_session_id")) object.client_session_id = message.client_session_id; - if (message.source_app_id != null && message.hasOwnProperty("source_app_id")) + if (message.source_app_id != null && $Object.hasOwnProperty.call(message, "source_app_id")) object.source_app_id = message.source_app_id; - if (message.job_id_source != null && message.hasOwnProperty("job_id_source")) - if (typeof message.job_id_source === "number") - object.job_id_source = options.longs === String ? String(message.job_id_source) : message.job_id_source; + if (message.job_id_source != null && $Object.hasOwnProperty.call(message, "job_id_source")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.job_id_source = typeof message.job_id_source === "number" ? $BigInt(message.job_id_source) : $util.Long.fromBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0, true).toBigInt(); + else if (typeof message.job_id_source === "number") + object.job_id_source = options.longs === $String ? $String(message.job_id_source) : message.job_id_source; else - object.job_id_source = options.longs === String ? $util.Long.prototype.toString.call(message.job_id_source) : options.longs === Number ? new $util.LongBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0).toNumber() : message.job_id_source; - if (message.job_id_target != null && message.hasOwnProperty("job_id_target")) - if (typeof message.job_id_target === "number") - object.job_id_target = options.longs === String ? String(message.job_id_target) : message.job_id_target; + object.job_id_source = options.longs === $String ? $util.Long.prototype.toString.call(message.job_id_source) : options.longs === $Number ? new $util.LongBits(message.job_id_source.low >>> 0, message.job_id_source.high >>> 0).toNumber(true) : message.job_id_source; + if (message.job_id_target != null && $Object.hasOwnProperty.call(message, "job_id_target")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.job_id_target = typeof message.job_id_target === "number" ? $BigInt(message.job_id_target) : $util.Long.fromBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0, true).toBigInt(); + else if (typeof message.job_id_target === "number") + object.job_id_target = options.longs === $String ? $String(message.job_id_target) : message.job_id_target; else - object.job_id_target = options.longs === String ? $util.Long.prototype.toString.call(message.job_id_target) : options.longs === Number ? new $util.LongBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0).toNumber() : message.job_id_target; - if (message.target_job_name != null && message.hasOwnProperty("target_job_name")) + object.job_id_target = options.longs === $String ? $util.Long.prototype.toString.call(message.job_id_target) : options.longs === $Number ? new $util.LongBits(message.job_id_target.low >>> 0, message.job_id_target.high >>> 0).toNumber(true) : message.job_id_target; + if (message.target_job_name != null && $Object.hasOwnProperty.call(message, "target_job_name")) object.target_job_name = message.target_job_name; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) object.error_message = message.error_message; - if (message.gc_msg_src != null && message.hasOwnProperty("gc_msg_src")) - object.gc_msg_src = options.enums === String ? $root.GCProtoBufMsgSrc[message.gc_msg_src] : message.gc_msg_src; - if (message.gc_dir_index_source != null && message.hasOwnProperty("gc_dir_index_source")) + if (message.gc_msg_src != null && $Object.hasOwnProperty.call(message, "gc_msg_src")) + object.gc_msg_src = options.enums === $String ? $root.GCProtoBufMsgSrc[message.gc_msg_src] === $undefined ? message.gc_msg_src : $root.GCProtoBufMsgSrc[message.gc_msg_src] : message.gc_msg_src; + if (message.gc_dir_index_source != null && $Object.hasOwnProperty.call(message, "gc_dir_index_source")) object.gc_dir_index_source = message.gc_dir_index_source; return object; }; @@ -51505,8 +66537,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgProtoBufHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgProtoBufHeader.prototype.toJSON = function() { + return CMsgProtoBufHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgProtoBufHeader + * @function getTypeUrl + * @memberof CMsgProtoBufHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgProtoBufHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgProtoBufHeader"; }; return CMsgProtoBufHeader; @@ -51516,29 +66562,42 @@ /** * Properties of a CMsgWebAPIKey. - * @exports ICMsgWebAPIKey - * @interface ICMsgWebAPIKey + * @typedef {Object} CMsgWebAPIKey.$Properties * @property {number|null} [status] CMsgWebAPIKey status * @property {number|null} [account_id] CMsgWebAPIKey account_id * @property {number|null} [publisher_group_id] CMsgWebAPIKey publisher_group_id * @property {number|null} [key_id] CMsgWebAPIKey key_id * @property {string|null} [domain] CMsgWebAPIKey domain + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgWebAPIKey. + * @exports ICMsgWebAPIKey + * @interface ICMsgWebAPIKey + * @augments CMsgWebAPIKey.$Properties + * @deprecated Use CMsgWebAPIKey.$Properties instead. + */ + + /** + * Shape of a CMsgWebAPIKey. + * @typedef {CMsgWebAPIKey.$Properties} CMsgWebAPIKey.$Shape */ /** * Constructs a new CMsgWebAPIKey. * @exports CMsgWebAPIKey * @classdesc Represents a CMsgWebAPIKey. - * @implements ICMsgWebAPIKey * @constructor - * @param {ICMsgWebAPIKey=} [properties] Properties to set + * @param {CMsgWebAPIKey.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgWebAPIKey(properties) { + var CMsgWebAPIKey = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgWebAPIKey status. @@ -51585,10 +66644,14 @@ * @function create * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey=} [properties] Properties to set + * @param {CMsgWebAPIKey.$Properties=} [properties] Properties to set * @returns {CMsgWebAPIKey} CMsgWebAPIKey instance + * @type {{ + * (properties: CMsgWebAPIKey.$Shape): CMsgWebAPIKey & CMsgWebAPIKey.$Shape; + * (properties?: CMsgWebAPIKey.$Properties): CMsgWebAPIKey; + * }} */ - CMsgWebAPIKey.create = function create(properties) { + CMsgWebAPIKey.create = function(properties) { return new CMsgWebAPIKey(properties); }; @@ -51597,23 +66660,30 @@ * @function encode * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey} message CMsgWebAPIKey message or plain object to encode + * @param {CMsgWebAPIKey.$Properties} message CMsgWebAPIKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIKey.encode = function encode(message, writer) { + CMsgWebAPIKey.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.status); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_id); - if (message.publisher_group_id != null && Object.hasOwnProperty.call(message, "publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.publisher_group_id); - if (message.key_id != null && Object.hasOwnProperty.call(message, "key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.key_id); - if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.domain); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -51622,12 +66692,12 @@ * @function encodeDelimited * @memberof CMsgWebAPIKey * @static - * @param {ICMsgWebAPIKey} message CMsgWebAPIKey message or plain object to encode + * @param {CMsgWebAPIKey.$Properties} message CMsgWebAPIKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgWebAPIKey.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -51637,37 +66707,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgWebAPIKey} CMsgWebAPIKey + * @returns {CMsgWebAPIKey & CMsgWebAPIKey.$Shape} CMsgWebAPIKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIKey.decode = function decode(reader, length) { + CMsgWebAPIKey.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgWebAPIKey(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgWebAPIKey(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.uint32(); - break; - case 2: - message.account_id = reader.uint32(); - break; - case 3: - message.publisher_group_id = reader.uint32(); - break; - case 4: - message.key_id = reader.uint32(); - break; - case 5: - message.domain = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.status = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.publisher_group_id = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.key_id = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.domain = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -51677,11 +66776,11 @@ * @memberof CMsgWebAPIKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgWebAPIKey} CMsgWebAPIKey + * @returns {CMsgWebAPIKey & CMsgWebAPIKey.$Shape} CMsgWebAPIKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIKey.decodeDelimited = function decodeDelimited(reader) { + CMsgWebAPIKey.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -51695,22 +66794,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgWebAPIKey.verify = function verify(message) { + CMsgWebAPIKey.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) if (!$util.isInteger(message.status)) return "status: integer expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.publisher_group_id != null && message.hasOwnProperty("publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) if (!$util.isInteger(message.publisher_group_id)) return "publisher_group_id: integer expected"; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) if (!$util.isInteger(message.key_id)) return "key_id: integer expected"; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) if (!$util.isString(message.domain)) return "domain: string expected"; return null; @@ -51724,9 +66827,15 @@ * @param {Object.} object Plain object * @returns {CMsgWebAPIKey} CMsgWebAPIKey */ - CMsgWebAPIKey.fromObject = function fromObject(object) { + CMsgWebAPIKey.fromObject = function (object, _depth) { if (object instanceof $root.CMsgWebAPIKey) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgWebAPIKey: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgWebAPIKey(); if (object.status != null) message.status = object.status >>> 0; @@ -51737,7 +66846,7 @@ if (object.key_id != null) message.key_id = object.key_id >>> 0; if (object.domain != null) - message.domain = String(object.domain); + message.domain = $String(object.domain); return message; }; @@ -51750,9 +66859,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgWebAPIKey.toObject = function toObject(message, options) { + CMsgWebAPIKey.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.status = 255; @@ -51761,15 +66874,15 @@ object.key_id = 0; object.domain = ""; } - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) object.status = message.status; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.publisher_group_id != null && message.hasOwnProperty("publisher_group_id")) + if (message.publisher_group_id != null && $Object.hasOwnProperty.call(message, "publisher_group_id")) object.publisher_group_id = message.publisher_group_id; - if (message.key_id != null && message.hasOwnProperty("key_id")) + if (message.key_id != null && $Object.hasOwnProperty.call(message, "key_id")) object.key_id = message.key_id; - if (message.domain != null && message.hasOwnProperty("domain")) + if (message.domain != null && $Object.hasOwnProperty.call(message, "domain")) object.domain = message.domain; return object; }; @@ -51781,8 +66894,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgWebAPIKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgWebAPIKey.prototype.toJSON = function() { + return CMsgWebAPIKey.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgWebAPIKey + * @function getTypeUrl + * @memberof CMsgWebAPIKey + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgWebAPIKey.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgWebAPIKey"; }; return CMsgWebAPIKey; @@ -51792,35 +66919,48 @@ /** * Properties of a CMsgHttpRequest. - * @exports ICMsgHttpRequest - * @interface ICMsgHttpRequest + * @typedef {Object} CMsgHttpRequest.$Properties * @property {number|null} [request_method] CMsgHttpRequest request_method * @property {string|null} [hostname] CMsgHttpRequest hostname * @property {string|null} [url] CMsgHttpRequest url - * @property {Array.|null} [headers] CMsgHttpRequest headers - * @property {Array.|null} [get_params] CMsgHttpRequest get_params - * @property {Array.|null} [post_params] CMsgHttpRequest post_params + * @property {Array.|null} [headers] CMsgHttpRequest headers + * @property {Array.|null} [get_params] CMsgHttpRequest get_params + * @property {Array.|null} [post_params] CMsgHttpRequest post_params * @property {Uint8Array|null} [body] CMsgHttpRequest body * @property {number|null} [absolute_timeout] CMsgHttpRequest absolute_timeout + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHttpRequest. + * @exports ICMsgHttpRequest + * @interface ICMsgHttpRequest + * @augments CMsgHttpRequest.$Properties + * @deprecated Use CMsgHttpRequest.$Properties instead. + */ + + /** + * Shape of a CMsgHttpRequest. + * @typedef {CMsgHttpRequest.$Properties} CMsgHttpRequest.$Shape */ /** * Constructs a new CMsgHttpRequest. * @exports CMsgHttpRequest * @classdesc Represents a CMsgHttpRequest. - * @implements ICMsgHttpRequest * @constructor - * @param {ICMsgHttpRequest=} [properties] Properties to set + * @param {CMsgHttpRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHttpRequest(properties) { + var CMsgHttpRequest = function (properties) { this.headers = []; this.get_params = []; this.post_params = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHttpRequest request_method. @@ -51848,7 +66988,7 @@ /** * CMsgHttpRequest headers. - * @member {Array.} headers + * @member {Array.} headers * @memberof CMsgHttpRequest * @instance */ @@ -51856,7 +66996,7 @@ /** * CMsgHttpRequest get_params. - * @member {Array.} get_params + * @member {Array.} get_params * @memberof CMsgHttpRequest * @instance */ @@ -51864,7 +67004,7 @@ /** * CMsgHttpRequest post_params. - * @member {Array.} post_params + * @member {Array.} post_params * @memberof CMsgHttpRequest * @instance */ @@ -51891,10 +67031,14 @@ * @function create * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest=} [properties] Properties to set + * @param {CMsgHttpRequest.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest} CMsgHttpRequest instance + * @type {{ + * (properties: CMsgHttpRequest.$Shape): CMsgHttpRequest & CMsgHttpRequest.$Shape; + * (properties?: CMsgHttpRequest.$Properties): CMsgHttpRequest; + * }} */ - CMsgHttpRequest.create = function create(properties) { + CMsgHttpRequest.create = function(properties) { return new CMsgHttpRequest(properties); }; @@ -51903,32 +67047,39 @@ * @function encode * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest} message CMsgHttpRequest message or plain object to encode + * @param {CMsgHttpRequest.$Properties} message CMsgHttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpRequest.encode = function encode(message, writer) { + CMsgHttpRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.request_method != null && Object.hasOwnProperty.call(message, "request_method")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.request_method); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.hostname); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.url); if (message.headers != null && message.headers.length) for (var i = 0; i < message.headers.length; ++i) - $root.CMsgHttpRequest.RequestHeader.encode(message.headers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgHttpRequest.RequestHeader.encode(message.headers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.get_params != null && message.get_params.length) for (var i = 0; i < message.get_params.length; ++i) - $root.CMsgHttpRequest.QueryParam.encode(message.get_params[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.CMsgHttpRequest.QueryParam.encode(message.get_params[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.post_params != null && message.post_params.length) for (var i = 0; i < message.post_params.length; ++i) - $root.CMsgHttpRequest.QueryParam.encode(message.post_params[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.CMsgHttpRequest.QueryParam.encode(message.post_params[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.body); - if (message.absolute_timeout != null && Object.hasOwnProperty.call(message, "absolute_timeout")) + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.absolute_timeout); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -51937,12 +67088,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest * @static - * @param {ICMsgHttpRequest} message CMsgHttpRequest message or plain object to encode + * @param {CMsgHttpRequest.$Properties} message CMsgHttpRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHttpRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -51952,52 +67103,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest} CMsgHttpRequest + * @returns {CMsgHttpRequest & CMsgHttpRequest.$Shape} CMsgHttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpRequest.decode = function decode(reader, length) { + CMsgHttpRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.request_method = reader.uint32(); - break; - case 2: - message.hostname = reader.string(); - break; - case 3: - message.url = reader.string(); - break; - case 4: - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.CMsgHttpRequest.RequestHeader.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.get_params && message.get_params.length)) - message.get_params = []; - message.get_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.post_params && message.post_params.length)) - message.post_params = []; - message.post_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32())); - break; - case 7: - message.body = reader.bytes(); - break; - case 8: - message.absolute_timeout = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.request_method = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.hostname = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.url = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push($root.CMsgHttpRequest.RequestHeader.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.get_params && message.get_params.length)) + message.get_params = []; + message.get_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.post_params && message.post_params.length)) + message.post_params = []; + message.post_params.push($root.CMsgHttpRequest.QueryParam.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.body = reader.bytes(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.absolute_timeout = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -52007,11 +67196,11 @@ * @memberof CMsgHttpRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest} CMsgHttpRequest + * @returns {CMsgHttpRequest & CMsgHttpRequest.$Shape} CMsgHttpRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgHttpRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -52025,49 +67214,53 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHttpRequest.verify = function verify(message) { + CMsgHttpRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.request_method != null && message.hasOwnProperty("request_method")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) if (!$util.isInteger(message.request_method)) return "request_method: integer expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) if (!$util.isString(message.hostname)) return "hostname: string expected"; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) if (!$util.isString(message.url)) return "url: string expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) + if (message.headers != null && $Object.hasOwnProperty.call(message, "headers")) { + if (!$Array.isArray(message.headers)) return "headers: array expected"; for (var i = 0; i < message.headers.length; ++i) { - var error = $root.CMsgHttpRequest.RequestHeader.verify(message.headers[i]); + var error = $root.CMsgHttpRequest.RequestHeader.verify(message.headers[i], _depth + 1); if (error) return "headers." + error; } } - if (message.get_params != null && message.hasOwnProperty("get_params")) { - if (!Array.isArray(message.get_params)) + if (message.get_params != null && $Object.hasOwnProperty.call(message, "get_params")) { + if (!$Array.isArray(message.get_params)) return "get_params: array expected"; for (var i = 0; i < message.get_params.length; ++i) { - var error = $root.CMsgHttpRequest.QueryParam.verify(message.get_params[i]); + var error = $root.CMsgHttpRequest.QueryParam.verify(message.get_params[i], _depth + 1); if (error) return "get_params." + error; } } - if (message.post_params != null && message.hasOwnProperty("post_params")) { - if (!Array.isArray(message.post_params)) + if (message.post_params != null && $Object.hasOwnProperty.call(message, "post_params")) { + if (!$Array.isArray(message.post_params)) return "post_params: array expected"; for (var i = 0; i < message.post_params.length; ++i) { - var error = $root.CMsgHttpRequest.QueryParam.verify(message.post_params[i]); + var error = $root.CMsgHttpRequest.QueryParam.verify(message.post_params[i], _depth + 1); if (error) return "post_params." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) return "body: buffer expected"; - if (message.absolute_timeout != null && message.hasOwnProperty("absolute_timeout")) + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) if (!$util.isInteger(message.absolute_timeout)) return "absolute_timeout: integer expected"; return null; @@ -52081,50 +67274,56 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest} CMsgHttpRequest */ - CMsgHttpRequest.fromObject = function fromObject(object) { + CMsgHttpRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest(); if (object.request_method != null) message.request_method = object.request_method >>> 0; if (object.hostname != null) - message.hostname = String(object.hostname); + message.hostname = $String(object.hostname); if (object.url != null) - message.url = String(object.url); + message.url = $String(object.url); if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".CMsgHttpRequest.headers: array expected"); - message.headers = []; + if (!$Array.isArray(object.headers)) + throw $TypeError(".CMsgHttpRequest.headers: array expected"); + message.headers = $Array(object.headers.length); for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".CMsgHttpRequest.headers: object expected"); - message.headers[i] = $root.CMsgHttpRequest.RequestHeader.fromObject(object.headers[i]); + if (!$util.isObject(object.headers[i])) + throw $TypeError(".CMsgHttpRequest.headers: object expected"); + message.headers[i] = $root.CMsgHttpRequest.RequestHeader.fromObject(object.headers[i], _depth + 1); } } if (object.get_params) { - if (!Array.isArray(object.get_params)) - throw TypeError(".CMsgHttpRequest.get_params: array expected"); - message.get_params = []; + if (!$Array.isArray(object.get_params)) + throw $TypeError(".CMsgHttpRequest.get_params: array expected"); + message.get_params = $Array(object.get_params.length); for (var i = 0; i < object.get_params.length; ++i) { - if (typeof object.get_params[i] !== "object") - throw TypeError(".CMsgHttpRequest.get_params: object expected"); - message.get_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.get_params[i]); + if (!$util.isObject(object.get_params[i])) + throw $TypeError(".CMsgHttpRequest.get_params: object expected"); + message.get_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.get_params[i], _depth + 1); } } if (object.post_params) { - if (!Array.isArray(object.post_params)) - throw TypeError(".CMsgHttpRequest.post_params: array expected"); - message.post_params = []; + if (!$Array.isArray(object.post_params)) + throw $TypeError(".CMsgHttpRequest.post_params: array expected"); + message.post_params = $Array(object.post_params.length); for (var i = 0; i < object.post_params.length; ++i) { - if (typeof object.post_params[i] !== "object") - throw TypeError(".CMsgHttpRequest.post_params: object expected"); - message.post_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.post_params[i]); + if (!$util.isObject(object.post_params[i])) + throw $TypeError(".CMsgHttpRequest.post_params: object expected"); + message.post_params[i] = $root.CMsgHttpRequest.QueryParam.fromObject(object.post_params[i], _depth + 1); } } if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; if (object.absolute_timeout != null) message.absolute_timeout = object.absolute_timeout >>> 0; @@ -52140,9 +67339,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHttpRequest.toObject = function toObject(message, options) { + CMsgHttpRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.headers = []; @@ -52153,39 +67356,39 @@ object.request_method = 0; object.hostname = ""; object.url = ""; - if (options.bytes === String) + if (options.bytes === $String) object.body = ""; else { object.body = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.body = $util.newBuffer(object.body); } object.absolute_timeout = 0; } - if (message.request_method != null && message.hasOwnProperty("request_method")) + if (message.request_method != null && $Object.hasOwnProperty.call(message, "request_method")) object.request_method = message.request_method; - if (message.hostname != null && message.hasOwnProperty("hostname")) + if (message.hostname != null && $Object.hasOwnProperty.call(message, "hostname")) object.hostname = message.hostname; - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) object.url = message.url; if (message.headers && message.headers.length) { - object.headers = []; + object.headers = $Array(message.headers.length); for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.CMsgHttpRequest.RequestHeader.toObject(message.headers[j], options); + object.headers[j] = $root.CMsgHttpRequest.RequestHeader.toObject(message.headers[j], options, _depth + 1); } if (message.get_params && message.get_params.length) { - object.get_params = []; + object.get_params = $Array(message.get_params.length); for (var j = 0; j < message.get_params.length; ++j) - object.get_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.get_params[j], options); + object.get_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.get_params[j], options, _depth + 1); } if (message.post_params && message.post_params.length) { - object.post_params = []; + object.post_params = $Array(message.post_params.length); for (var j = 0; j < message.post_params.length; ++j) - object.post_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.post_params[j], options); + object.post_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.post_params[j], options, _depth + 1); } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; - if (message.absolute_timeout != null && message.hasOwnProperty("absolute_timeout")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = options.bytes === $String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.body) : message.body; + if (message.absolute_timeout != null && $Object.hasOwnProperty.call(message, "absolute_timeout")) object.absolute_timeout = message.absolute_timeout; return object; }; @@ -52197,34 +67400,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgHttpRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHttpRequest.prototype.toJSON = function() { + return CMsgHttpRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHttpRequest + * @function getTypeUrl + * @memberof CMsgHttpRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHttpRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest"; }; CMsgHttpRequest.RequestHeader = (function() { /** * Properties of a RequestHeader. - * @memberof CMsgHttpRequest - * @interface IRequestHeader + * @typedef {Object} CMsgHttpRequest.RequestHeader.$Properties * @property {string|null} [name] RequestHeader name * @property {string|null} [value] RequestHeader value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RequestHeader. + * @memberof CMsgHttpRequest + * @interface IRequestHeader + * @augments CMsgHttpRequest.RequestHeader.$Properties + * @deprecated Use CMsgHttpRequest.RequestHeader.$Properties instead. + */ + + /** + * Shape of a RequestHeader. + * @typedef {CMsgHttpRequest.RequestHeader.$Properties} CMsgHttpRequest.RequestHeader.$Shape */ /** * Constructs a new RequestHeader. * @memberof CMsgHttpRequest * @classdesc Represents a RequestHeader. - * @implements IRequestHeader * @constructor - * @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set + * @param {CMsgHttpRequest.RequestHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function RequestHeader(properties) { + var RequestHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * RequestHeader name. @@ -52247,10 +67477,14 @@ * @function create * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set + * @param {CMsgHttpRequest.RequestHeader.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest.RequestHeader} RequestHeader instance + * @type {{ + * (properties: CMsgHttpRequest.RequestHeader.$Shape): CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape; + * (properties?: CMsgHttpRequest.RequestHeader.$Properties): CMsgHttpRequest.RequestHeader; + * }} */ - RequestHeader.create = function create(properties) { + RequestHeader.create = function(properties) { return new RequestHeader(properties); }; @@ -52259,17 +67493,24 @@ * @function encode * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader} message RequestHeader message or plain object to encode + * @param {CMsgHttpRequest.RequestHeader.$Properties} message RequestHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestHeader.encode = function encode(message, writer) { + RequestHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -52278,12 +67519,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest.RequestHeader * @static - * @param {CMsgHttpRequest.IRequestHeader} message RequestHeader message or plain object to encode + * @param {CMsgHttpRequest.RequestHeader.$Properties} message RequestHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RequestHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -52293,28 +67534,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest.RequestHeader} RequestHeader + * @returns {CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape} RequestHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestHeader.decode = function decode(reader, length) { + RequestHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest.RequestHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest.RequestHeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -52324,11 +67585,11 @@ * @memberof CMsgHttpRequest.RequestHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest.RequestHeader} RequestHeader + * @returns {CMsgHttpRequest.RequestHeader & CMsgHttpRequest.RequestHeader.$Shape} RequestHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestHeader.decodeDelimited = function decodeDelimited(reader) { + RequestHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -52342,13 +67603,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RequestHeader.verify = function verify(message) { + RequestHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -52362,14 +67627,20 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest.RequestHeader} RequestHeader */ - RequestHeader.fromObject = function fromObject(object) { + RequestHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest.RequestHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest.RequestHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest.RequestHeader(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -52382,17 +67653,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RequestHeader.toObject = function toObject(message, options) { + RequestHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -52404,8 +67679,22 @@ * @instance * @returns {Object.} JSON object */ - RequestHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + RequestHeader.prototype.toJSON = function() { + return RequestHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RequestHeader + * @function getTypeUrl + * @memberof CMsgHttpRequest.RequestHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RequestHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest.RequestHeader"; }; return RequestHeader; @@ -52415,26 +67704,39 @@ /** * Properties of a QueryParam. - * @memberof CMsgHttpRequest - * @interface IQueryParam + * @typedef {Object} CMsgHttpRequest.QueryParam.$Properties * @property {string|null} [name] QueryParam name * @property {Uint8Array|null} [value] QueryParam value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a QueryParam. + * @memberof CMsgHttpRequest + * @interface IQueryParam + * @augments CMsgHttpRequest.QueryParam.$Properties + * @deprecated Use CMsgHttpRequest.QueryParam.$Properties instead. + */ + + /** + * Shape of a QueryParam. + * @typedef {CMsgHttpRequest.QueryParam.$Properties} CMsgHttpRequest.QueryParam.$Shape */ /** * Constructs a new QueryParam. * @memberof CMsgHttpRequest * @classdesc Represents a QueryParam. - * @implements IQueryParam * @constructor - * @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set + * @param {CMsgHttpRequest.QueryParam.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function QueryParam(properties) { + var QueryParam = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * QueryParam name. @@ -52457,10 +67759,14 @@ * @function create * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set + * @param {CMsgHttpRequest.QueryParam.$Properties=} [properties] Properties to set * @returns {CMsgHttpRequest.QueryParam} QueryParam instance + * @type {{ + * (properties: CMsgHttpRequest.QueryParam.$Shape): CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape; + * (properties?: CMsgHttpRequest.QueryParam.$Properties): CMsgHttpRequest.QueryParam; + * }} */ - QueryParam.create = function create(properties) { + QueryParam.create = function(properties) { return new QueryParam(properties); }; @@ -52469,17 +67775,24 @@ * @function encode * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam} message QueryParam message or plain object to encode + * @param {CMsgHttpRequest.QueryParam.$Properties} message QueryParam message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParam.encode = function encode(message, writer) { + QueryParam.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -52488,12 +67801,12 @@ * @function encodeDelimited * @memberof CMsgHttpRequest.QueryParam * @static - * @param {CMsgHttpRequest.IQueryParam} message QueryParam message or plain object to encode + * @param {CMsgHttpRequest.QueryParam.$Properties} message QueryParam message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParam.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueryParam.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -52503,28 +67816,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpRequest.QueryParam} QueryParam + * @returns {CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape} QueryParam * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParam.decode = function decode(reader, length) { + QueryParam.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpRequest.QueryParam(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpRequest.QueryParam(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -52534,11 +67867,11 @@ * @memberof CMsgHttpRequest.QueryParam * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpRequest.QueryParam} QueryParam + * @returns {CMsgHttpRequest.QueryParam & CMsgHttpRequest.QueryParam.$Shape} QueryParam * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryParam.decodeDelimited = function decodeDelimited(reader) { + QueryParam.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -52552,13 +67885,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryParam.verify = function verify(message) { + QueryParam.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -52572,16 +67909,22 @@ * @param {Object.} object Plain object * @returns {CMsgHttpRequest.QueryParam} QueryParam */ - QueryParam.fromObject = function fromObject(object) { + QueryParam.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpRequest.QueryParam) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpRequest.QueryParam: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpRequest.QueryParam(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -52595,24 +67938,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryParam.toObject = function toObject(message, options) { + QueryParam.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -52623,8 +67970,22 @@ * @instance * @returns {Object.} JSON object */ - QueryParam.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + QueryParam.prototype.toJSON = function() { + return QueryParam.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for QueryParam + * @function getTypeUrl + * @memberof CMsgHttpRequest.QueryParam + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + QueryParam.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpRequest.QueryParam"; }; return QueryParam; @@ -52637,31 +67998,44 @@ /** * Properties of a CMsgWebAPIRequest. - * @exports ICMsgWebAPIRequest - * @interface ICMsgWebAPIRequest + * @typedef {Object} CMsgWebAPIRequest.$Properties * @property {string|null} [UNUSED_job_name] CMsgWebAPIRequest UNUSED_job_name * @property {string|null} [interface_name] CMsgWebAPIRequest interface_name * @property {string|null} [method_name] CMsgWebAPIRequest method_name * @property {number|null} [version] CMsgWebAPIRequest version - * @property {ICMsgWebAPIKey|null} [api_key] CMsgWebAPIRequest api_key - * @property {ICMsgHttpRequest|null} [request] CMsgWebAPIRequest request + * @property {CMsgWebAPIKey.$Properties|null} [api_key] CMsgWebAPIRequest api_key + * @property {CMsgHttpRequest.$Properties|null} [request] CMsgWebAPIRequest request * @property {number|null} [routing_app_id] CMsgWebAPIRequest routing_app_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgWebAPIRequest. + * @exports ICMsgWebAPIRequest + * @interface ICMsgWebAPIRequest + * @augments CMsgWebAPIRequest.$Properties + * @deprecated Use CMsgWebAPIRequest.$Properties instead. + */ + + /** + * Shape of a CMsgWebAPIRequest. + * @typedef {CMsgWebAPIRequest.$Properties} CMsgWebAPIRequest.$Shape */ /** * Constructs a new CMsgWebAPIRequest. * @exports CMsgWebAPIRequest * @classdesc Represents a CMsgWebAPIRequest. - * @implements ICMsgWebAPIRequest * @constructor - * @param {ICMsgWebAPIRequest=} [properties] Properties to set + * @param {CMsgWebAPIRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgWebAPIRequest(properties) { + var CMsgWebAPIRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgWebAPIRequest UNUSED_job_name. @@ -52697,7 +68071,7 @@ /** * CMsgWebAPIRequest api_key. - * @member {ICMsgWebAPIKey|null|undefined} api_key + * @member {CMsgWebAPIKey.$Properties|null|undefined} api_key * @memberof CMsgWebAPIRequest * @instance */ @@ -52705,7 +68079,7 @@ /** * CMsgWebAPIRequest request. - * @member {ICMsgHttpRequest|null|undefined} request + * @member {CMsgHttpRequest.$Properties|null|undefined} request * @memberof CMsgWebAPIRequest * @instance */ @@ -52724,10 +68098,14 @@ * @function create * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest=} [properties] Properties to set + * @param {CMsgWebAPIRequest.$Properties=} [properties] Properties to set * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest instance + * @type {{ + * (properties: CMsgWebAPIRequest.$Shape): CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape; + * (properties?: CMsgWebAPIRequest.$Properties): CMsgWebAPIRequest; + * }} */ - CMsgWebAPIRequest.create = function create(properties) { + CMsgWebAPIRequest.create = function(properties) { return new CMsgWebAPIRequest(properties); }; @@ -52736,27 +68114,34 @@ * @function encode * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest} message CMsgWebAPIRequest message or plain object to encode + * @param {CMsgWebAPIRequest.$Properties} message CMsgWebAPIRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIRequest.encode = function encode(message, writer) { + CMsgWebAPIRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.UNUSED_job_name != null && Object.hasOwnProperty.call(message, "UNUSED_job_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.UNUSED_job_name); - if (message.interface_name != null && Object.hasOwnProperty.call(message, "interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.interface_name); - if (message.method_name != null && Object.hasOwnProperty.call(message, "method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.method_name); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.version); - if (message.api_key != null && Object.hasOwnProperty.call(message, "api_key")) - $root.CMsgWebAPIKey.encode(message.api_key, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.request != null && Object.hasOwnProperty.call(message, "request")) - $root.CMsgHttpRequest.encode(message.request, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.routing_app_id != null && Object.hasOwnProperty.call(message, "routing_app_id")) + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) + $root.CMsgWebAPIKey.encode(message.api_key, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) + $root.CMsgHttpRequest.encode(message.request, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.routing_app_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -52765,12 +68150,12 @@ * @function encodeDelimited * @memberof CMsgWebAPIRequest * @static - * @param {ICMsgWebAPIRequest} message CMsgWebAPIRequest message or plain object to encode + * @param {CMsgWebAPIRequest.$Properties} message CMsgWebAPIRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgWebAPIRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgWebAPIRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -52780,43 +68165,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest + * @returns {CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape} CMsgWebAPIRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIRequest.decode = function decode(reader, length) { + CMsgWebAPIRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgWebAPIRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgWebAPIRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.UNUSED_job_name = reader.string(); - break; - case 2: - message.interface_name = reader.string(); - break; - case 3: - message.method_name = reader.string(); - break; - case 4: - message.version = reader.uint32(); - break; - case 5: - message.api_key = $root.CMsgWebAPIKey.decode(reader, reader.uint32()); - break; - case 6: - message.request = $root.CMsgHttpRequest.decode(reader, reader.uint32()); - break; - case 7: - message.routing_app_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.UNUSED_job_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.interface_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.method_name = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.api_key = $root.CMsgWebAPIKey.decode(reader, reader.uint32(), $undefined, _depth + 1, message.api_key); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.request = $root.CMsgHttpRequest.decode(reader, reader.uint32(), $undefined, _depth + 1, message.request); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.routing_app_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -52826,11 +68246,11 @@ * @memberof CMsgWebAPIRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest + * @returns {CMsgWebAPIRequest & CMsgWebAPIRequest.$Shape} CMsgWebAPIRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgWebAPIRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgWebAPIRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -52844,32 +68264,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgWebAPIRequest.verify = function verify(message) { + CMsgWebAPIRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.UNUSED_job_name != null && message.hasOwnProperty("UNUSED_job_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) if (!$util.isString(message.UNUSED_job_name)) return "UNUSED_job_name: string expected"; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) if (!$util.isString(message.interface_name)) return "interface_name: string expected"; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) if (!$util.isString(message.method_name)) return "method_name: string expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.api_key != null && message.hasOwnProperty("api_key")) { - var error = $root.CMsgWebAPIKey.verify(message.api_key); + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) { + var error = $root.CMsgWebAPIKey.verify(message.api_key, _depth + 1); if (error) return "api_key." + error; } - if (message.request != null && message.hasOwnProperty("request")) { - var error = $root.CMsgHttpRequest.verify(message.request); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) { + var error = $root.CMsgHttpRequest.verify(message.request, _depth + 1); if (error) return "request." + error; } - if (message.routing_app_id != null && message.hasOwnProperty("routing_app_id")) + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) if (!$util.isInteger(message.routing_app_id)) return "routing_app_id: integer expected"; return null; @@ -52883,27 +68307,33 @@ * @param {Object.} object Plain object * @returns {CMsgWebAPIRequest} CMsgWebAPIRequest */ - CMsgWebAPIRequest.fromObject = function fromObject(object) { + CMsgWebAPIRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgWebAPIRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgWebAPIRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgWebAPIRequest(); if (object.UNUSED_job_name != null) - message.UNUSED_job_name = String(object.UNUSED_job_name); + message.UNUSED_job_name = $String(object.UNUSED_job_name); if (object.interface_name != null) - message.interface_name = String(object.interface_name); + message.interface_name = $String(object.interface_name); if (object.method_name != null) - message.method_name = String(object.method_name); + message.method_name = $String(object.method_name); if (object.version != null) message.version = object.version >>> 0; if (object.api_key != null) { - if (typeof object.api_key !== "object") - throw TypeError(".CMsgWebAPIRequest.api_key: object expected"); - message.api_key = $root.CMsgWebAPIKey.fromObject(object.api_key); + if (!$util.isObject(object.api_key)) + throw $TypeError(".CMsgWebAPIRequest.api_key: object expected"); + message.api_key = $root.CMsgWebAPIKey.fromObject(object.api_key, _depth + 1); } if (object.request != null) { - if (typeof object.request !== "object") - throw TypeError(".CMsgWebAPIRequest.request: object expected"); - message.request = $root.CMsgHttpRequest.fromObject(object.request); + if (!$util.isObject(object.request)) + throw $TypeError(".CMsgWebAPIRequest.request: object expected"); + message.request = $root.CMsgHttpRequest.fromObject(object.request, _depth + 1); } if (object.routing_app_id != null) message.routing_app_id = object.routing_app_id >>> 0; @@ -52919,9 +68349,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgWebAPIRequest.toObject = function toObject(message, options) { + CMsgWebAPIRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.UNUSED_job_name = ""; @@ -52932,19 +68366,19 @@ object.request = null; object.routing_app_id = 0; } - if (message.UNUSED_job_name != null && message.hasOwnProperty("UNUSED_job_name")) + if (message.UNUSED_job_name != null && $Object.hasOwnProperty.call(message, "UNUSED_job_name")) object.UNUSED_job_name = message.UNUSED_job_name; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) object.interface_name = message.interface_name; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) object.method_name = message.method_name; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.api_key != null && message.hasOwnProperty("api_key")) - object.api_key = $root.CMsgWebAPIKey.toObject(message.api_key, options); - if (message.request != null && message.hasOwnProperty("request")) - object.request = $root.CMsgHttpRequest.toObject(message.request, options); - if (message.routing_app_id != null && message.hasOwnProperty("routing_app_id")) + if (message.api_key != null && $Object.hasOwnProperty.call(message, "api_key")) + object.api_key = $root.CMsgWebAPIKey.toObject(message.api_key, options, _depth + 1); + if (message.request != null && $Object.hasOwnProperty.call(message, "request")) + object.request = $root.CMsgHttpRequest.toObject(message.request, options, _depth + 1); + if (message.routing_app_id != null && $Object.hasOwnProperty.call(message, "routing_app_id")) object.routing_app_id = message.routing_app_id; return object; }; @@ -52956,8 +68390,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgWebAPIRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgWebAPIRequest.prototype.toJSON = function() { + return CMsgWebAPIRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgWebAPIRequest + * @function getTypeUrl + * @memberof CMsgWebAPIRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgWebAPIRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgWebAPIRequest"; }; return CMsgWebAPIRequest; @@ -52967,28 +68415,41 @@ /** * Properties of a CMsgHttpResponse. - * @exports ICMsgHttpResponse - * @interface ICMsgHttpResponse + * @typedef {Object} CMsgHttpResponse.$Properties * @property {number|null} [status_code] CMsgHttpResponse status_code - * @property {Array.|null} [headers] CMsgHttpResponse headers + * @property {Array.|null} [headers] CMsgHttpResponse headers * @property {Uint8Array|null} [body] CMsgHttpResponse body + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgHttpResponse. + * @exports ICMsgHttpResponse + * @interface ICMsgHttpResponse + * @augments CMsgHttpResponse.$Properties + * @deprecated Use CMsgHttpResponse.$Properties instead. + */ + + /** + * Shape of a CMsgHttpResponse. + * @typedef {CMsgHttpResponse.$Properties} CMsgHttpResponse.$Shape */ /** * Constructs a new CMsgHttpResponse. * @exports CMsgHttpResponse * @classdesc Represents a CMsgHttpResponse. - * @implements ICMsgHttpResponse * @constructor - * @param {ICMsgHttpResponse=} [properties] Properties to set + * @param {CMsgHttpResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHttpResponse(properties) { + var CMsgHttpResponse = function (properties) { this.headers = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHttpResponse status_code. @@ -53000,7 +68461,7 @@ /** * CMsgHttpResponse headers. - * @member {Array.} headers + * @member {Array.} headers * @memberof CMsgHttpResponse * @instance */ @@ -53019,10 +68480,14 @@ * @function create * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse=} [properties] Properties to set + * @param {CMsgHttpResponse.$Properties=} [properties] Properties to set * @returns {CMsgHttpResponse} CMsgHttpResponse instance + * @type {{ + * (properties: CMsgHttpResponse.$Shape): CMsgHttpResponse & CMsgHttpResponse.$Shape; + * (properties?: CMsgHttpResponse.$Properties): CMsgHttpResponse; + * }} */ - CMsgHttpResponse.create = function create(properties) { + CMsgHttpResponse.create = function(properties) { return new CMsgHttpResponse(properties); }; @@ -53031,20 +68496,27 @@ * @function encode * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse} message CMsgHttpResponse message or plain object to encode + * @param {CMsgHttpResponse.$Properties} message CMsgHttpResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpResponse.encode = function encode(message, writer) { + CMsgHttpResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.status_code != null && Object.hasOwnProperty.call(message, "status_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.status_code); if (message.headers != null && message.headers.length) for (var i = 0; i < message.headers.length; ++i) - $root.CMsgHttpResponse.ResponseHeader.encode(message.headers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.CMsgHttpResponse.ResponseHeader.encode(message.headers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.body); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -53053,12 +68525,12 @@ * @function encodeDelimited * @memberof CMsgHttpResponse * @static - * @param {ICMsgHttpResponse} message CMsgHttpResponse message or plain object to encode + * @param {CMsgHttpResponse.$Properties} message CMsgHttpResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHttpResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHttpResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -53068,33 +68540,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpResponse} CMsgHttpResponse + * @returns {CMsgHttpResponse & CMsgHttpResponse.$Shape} CMsgHttpResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpResponse.decode = function decode(reader, length) { + CMsgHttpResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status_code = reader.uint32(); - break; - case 2: - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.CMsgHttpResponse.ResponseHeader.decode(reader, reader.uint32())); - break; - case 3: - message.body = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.status_code = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push($root.CMsgHttpResponse.ResponseHeader.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.body = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -53104,11 +68599,11 @@ * @memberof CMsgHttpResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpResponse} CMsgHttpResponse + * @returns {CMsgHttpResponse & CMsgHttpResponse.$Shape} CMsgHttpResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHttpResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgHttpResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -53122,22 +68617,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHttpResponse.verify = function verify(message) { + CMsgHttpResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status_code != null && message.hasOwnProperty("status_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) if (!$util.isInteger(message.status_code)) return "status_code: integer expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) + if (message.headers != null && $Object.hasOwnProperty.call(message, "headers")) { + if (!$Array.isArray(message.headers)) return "headers: array expected"; for (var i = 0; i < message.headers.length; ++i) { - var error = $root.CMsgHttpResponse.ResponseHeader.verify(message.headers[i]); + var error = $root.CMsgHttpResponse.ResponseHeader.verify(message.headers[i], _depth + 1); if (error) return "headers." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) return "body: buffer expected"; return null; @@ -53151,26 +68650,32 @@ * @param {Object.} object Plain object * @returns {CMsgHttpResponse} CMsgHttpResponse */ - CMsgHttpResponse.fromObject = function fromObject(object) { + CMsgHttpResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpResponse(); if (object.status_code != null) message.status_code = object.status_code >>> 0; if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".CMsgHttpResponse.headers: array expected"); - message.headers = []; + if (!$Array.isArray(object.headers)) + throw $TypeError(".CMsgHttpResponse.headers: array expected"); + message.headers = $Array(object.headers.length); for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".CMsgHttpResponse.headers: object expected"); - message.headers[i] = $root.CMsgHttpResponse.ResponseHeader.fromObject(object.headers[i]); + if (!$util.isObject(object.headers[i])) + throw $TypeError(".CMsgHttpResponse.headers: object expected"); + message.headers[i] = $root.CMsgHttpResponse.ResponseHeader.fromObject(object.headers[i], _depth + 1); } } if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; return message; }; @@ -53184,31 +68689,35 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHttpResponse.toObject = function toObject(message, options) { + CMsgHttpResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.headers = []; if (options.defaults) { object.status_code = 0; - if (options.bytes === String) + if (options.bytes === $String) object.body = ""; else { object.body = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.body = $util.newBuffer(object.body); } } - if (message.status_code != null && message.hasOwnProperty("status_code")) + if (message.status_code != null && $Object.hasOwnProperty.call(message, "status_code")) object.status_code = message.status_code; if (message.headers && message.headers.length) { - object.headers = []; + object.headers = $Array(message.headers.length); for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.CMsgHttpResponse.ResponseHeader.toObject(message.headers[j], options); + object.headers[j] = $root.CMsgHttpResponse.ResponseHeader.toObject(message.headers[j], options, _depth + 1); } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = options.bytes === $String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.body) : message.body; return object; }; @@ -53219,34 +68728,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgHttpResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHttpResponse.prototype.toJSON = function() { + return CMsgHttpResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHttpResponse + * @function getTypeUrl + * @memberof CMsgHttpResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHttpResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpResponse"; }; CMsgHttpResponse.ResponseHeader = (function() { /** * Properties of a ResponseHeader. - * @memberof CMsgHttpResponse - * @interface IResponseHeader + * @typedef {Object} CMsgHttpResponse.ResponseHeader.$Properties * @property {string|null} [name] ResponseHeader name * @property {string|null} [value] ResponseHeader value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ResponseHeader. + * @memberof CMsgHttpResponse + * @interface IResponseHeader + * @augments CMsgHttpResponse.ResponseHeader.$Properties + * @deprecated Use CMsgHttpResponse.ResponseHeader.$Properties instead. + */ + + /** + * Shape of a ResponseHeader. + * @typedef {CMsgHttpResponse.ResponseHeader.$Properties} CMsgHttpResponse.ResponseHeader.$Shape */ /** * Constructs a new ResponseHeader. * @memberof CMsgHttpResponse * @classdesc Represents a ResponseHeader. - * @implements IResponseHeader * @constructor - * @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set + * @param {CMsgHttpResponse.ResponseHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ResponseHeader(properties) { + var ResponseHeader = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ResponseHeader name. @@ -53269,10 +68805,14 @@ * @function create * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set + * @param {CMsgHttpResponse.ResponseHeader.$Properties=} [properties] Properties to set * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader instance + * @type {{ + * (properties: CMsgHttpResponse.ResponseHeader.$Shape): CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape; + * (properties?: CMsgHttpResponse.ResponseHeader.$Properties): CMsgHttpResponse.ResponseHeader; + * }} */ - ResponseHeader.create = function create(properties) { + ResponseHeader.create = function(properties) { return new ResponseHeader(properties); }; @@ -53281,17 +68821,24 @@ * @function encode * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader} message ResponseHeader message or plain object to encode + * @param {CMsgHttpResponse.ResponseHeader.$Properties} message ResponseHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseHeader.encode = function encode(message, writer) { + ResponseHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -53300,12 +68847,12 @@ * @function encodeDelimited * @memberof CMsgHttpResponse.ResponseHeader * @static - * @param {CMsgHttpResponse.IResponseHeader} message ResponseHeader message or plain object to encode + * @param {CMsgHttpResponse.ResponseHeader.$Properties} message ResponseHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ResponseHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -53315,28 +68862,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader + * @returns {CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape} ResponseHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseHeader.decode = function decode(reader, length) { + ResponseHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHttpResponse.ResponseHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHttpResponse.ResponseHeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -53346,11 +68913,11 @@ * @memberof CMsgHttpResponse.ResponseHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader + * @returns {CMsgHttpResponse.ResponseHeader & CMsgHttpResponse.ResponseHeader.$Shape} ResponseHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseHeader.decodeDelimited = function decodeDelimited(reader) { + ResponseHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -53364,13 +68931,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseHeader.verify = function verify(message) { + ResponseHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -53384,14 +68955,20 @@ * @param {Object.} object Plain object * @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader */ - ResponseHeader.fromObject = function fromObject(object) { + ResponseHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHttpResponse.ResponseHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHttpResponse.ResponseHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHttpResponse.ResponseHeader(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -53404,17 +68981,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseHeader.toObject = function toObject(message, options) { + ResponseHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -53426,8 +69007,22 @@ * @instance * @returns {Object.} JSON object */ - ResponseHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ResponseHeader.prototype.toJSON = function() { + return ResponseHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ResponseHeader + * @function getTypeUrl + * @memberof CMsgHttpResponse.ResponseHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ResponseHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHttpResponse.ResponseHeader"; }; return ResponseHeader; @@ -53440,26 +69035,39 @@ /** * Properties of a CMsgAMFindAccounts. - * @exports ICMsgAMFindAccounts - * @interface ICMsgAMFindAccounts + * @typedef {Object} CMsgAMFindAccounts.$Properties * @property {number|null} [search_type] CMsgAMFindAccounts search_type * @property {string|null} [search_string] CMsgAMFindAccounts search_string + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMFindAccounts. + * @exports ICMsgAMFindAccounts + * @interface ICMsgAMFindAccounts + * @augments CMsgAMFindAccounts.$Properties + * @deprecated Use CMsgAMFindAccounts.$Properties instead. + */ + + /** + * Shape of a CMsgAMFindAccounts. + * @typedef {CMsgAMFindAccounts.$Properties} CMsgAMFindAccounts.$Shape */ /** * Constructs a new CMsgAMFindAccounts. * @exports CMsgAMFindAccounts * @classdesc Represents a CMsgAMFindAccounts. - * @implements ICMsgAMFindAccounts * @constructor - * @param {ICMsgAMFindAccounts=} [properties] Properties to set + * @param {CMsgAMFindAccounts.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMFindAccounts(properties) { + var CMsgAMFindAccounts = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMFindAccounts search_type. @@ -53482,10 +69090,14 @@ * @function create * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts=} [properties] Properties to set + * @param {CMsgAMFindAccounts.$Properties=} [properties] Properties to set * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts instance + * @type {{ + * (properties: CMsgAMFindAccounts.$Shape): CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape; + * (properties?: CMsgAMFindAccounts.$Properties): CMsgAMFindAccounts; + * }} */ - CMsgAMFindAccounts.create = function create(properties) { + CMsgAMFindAccounts.create = function(properties) { return new CMsgAMFindAccounts(properties); }; @@ -53494,17 +69106,24 @@ * @function encode * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts} message CMsgAMFindAccounts message or plain object to encode + * @param {CMsgAMFindAccounts.$Properties} message CMsgAMFindAccounts message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccounts.encode = function encode(message, writer) { + CMsgAMFindAccounts.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.search_type != null && Object.hasOwnProperty.call(message, "search_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.search_type); - if (message.search_string != null && Object.hasOwnProperty.call(message, "search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.search_string); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -53513,12 +69132,12 @@ * @function encodeDelimited * @memberof CMsgAMFindAccounts * @static - * @param {ICMsgAMFindAccounts} message CMsgAMFindAccounts message or plain object to encode + * @param {CMsgAMFindAccounts.$Properties} message CMsgAMFindAccounts message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccounts.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMFindAccounts.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -53528,28 +69147,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts + * @returns {CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape} CMsgAMFindAccounts * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccounts.decode = function decode(reader, length) { + CMsgAMFindAccounts.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMFindAccounts(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMFindAccounts(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.search_type = reader.uint32(); - break; - case 2: - message.search_string = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.search_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.search_string = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -53559,11 +69198,11 @@ * @memberof CMsgAMFindAccounts * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts + * @returns {CMsgAMFindAccounts & CMsgAMFindAccounts.$Shape} CMsgAMFindAccounts * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccounts.decodeDelimited = function decodeDelimited(reader) { + CMsgAMFindAccounts.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -53577,13 +69216,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMFindAccounts.verify = function verify(message) { + CMsgAMFindAccounts.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.search_type != null && message.hasOwnProperty("search_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) if (!$util.isInteger(message.search_type)) return "search_type: integer expected"; - if (message.search_string != null && message.hasOwnProperty("search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) if (!$util.isString(message.search_string)) return "search_string: string expected"; return null; @@ -53597,14 +69240,20 @@ * @param {Object.} object Plain object * @returns {CMsgAMFindAccounts} CMsgAMFindAccounts */ - CMsgAMFindAccounts.fromObject = function fromObject(object) { + CMsgAMFindAccounts.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMFindAccounts) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMFindAccounts: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMFindAccounts(); if (object.search_type != null) message.search_type = object.search_type >>> 0; if (object.search_string != null) - message.search_string = String(object.search_string); + message.search_string = $String(object.search_string); return message; }; @@ -53617,17 +69266,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMFindAccounts.toObject = function toObject(message, options) { + CMsgAMFindAccounts.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.search_type = 0; object.search_string = ""; } - if (message.search_type != null && message.hasOwnProperty("search_type")) + if (message.search_type != null && $Object.hasOwnProperty.call(message, "search_type")) object.search_type = message.search_type; - if (message.search_string != null && message.hasOwnProperty("search_string")) + if (message.search_string != null && $Object.hasOwnProperty.call(message, "search_string")) object.search_string = message.search_string; return object; }; @@ -53639,8 +69292,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMFindAccounts.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMFindAccounts.prototype.toJSON = function() { + return CMsgAMFindAccounts.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMFindAccounts + * @function getTypeUrl + * @memberof CMsgAMFindAccounts + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMFindAccounts.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMFindAccounts"; }; return CMsgAMFindAccounts; @@ -53648,28 +69315,41 @@ $root.CMsgAMFindAccountsResponse = (function() { + /** + * Properties of a CMsgAMFindAccountsResponse. + * @typedef {Object} CMsgAMFindAccountsResponse.$Properties + * @property {Array.|null} [steam_id] CMsgAMFindAccountsResponse steam_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMFindAccountsResponse. * @exports ICMsgAMFindAccountsResponse * @interface ICMsgAMFindAccountsResponse - * @property {Array.|null} [steam_id] CMsgAMFindAccountsResponse steam_id + * @augments CMsgAMFindAccountsResponse.$Properties + * @deprecated Use CMsgAMFindAccountsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMFindAccountsResponse. + * @typedef {CMsgAMFindAccountsResponse.$Properties} CMsgAMFindAccountsResponse.$Shape */ /** * Constructs a new CMsgAMFindAccountsResponse. * @exports CMsgAMFindAccountsResponse * @classdesc Represents a CMsgAMFindAccountsResponse. - * @implements ICMsgAMFindAccountsResponse * @constructor - * @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set + * @param {CMsgAMFindAccountsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMFindAccountsResponse(properties) { + var CMsgAMFindAccountsResponse = function (properties) { this.steam_id = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMFindAccountsResponse steam_id. @@ -53684,10 +69364,14 @@ * @function create * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set + * @param {CMsgAMFindAccountsResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse instance + * @type {{ + * (properties: CMsgAMFindAccountsResponse.$Shape): CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape; + * (properties?: CMsgAMFindAccountsResponse.$Properties): CMsgAMFindAccountsResponse; + * }} */ - CMsgAMFindAccountsResponse.create = function create(properties) { + CMsgAMFindAccountsResponse.create = function(properties) { return new CMsgAMFindAccountsResponse(properties); }; @@ -53696,16 +69380,23 @@ * @function encode * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse} message CMsgAMFindAccountsResponse message or plain object to encode + * @param {CMsgAMFindAccountsResponse.$Properties} message CMsgAMFindAccountsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccountsResponse.encode = function encode(message, writer) { + CMsgAMFindAccountsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.steam_id != null && message.steam_id.length) for (var i = 0; i < message.steam_id.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -53714,12 +69405,12 @@ * @function encodeDelimited * @memberof CMsgAMFindAccountsResponse * @static - * @param {ICMsgAMFindAccountsResponse} message CMsgAMFindAccountsResponse message or plain object to encode + * @param {CMsgAMFindAccountsResponse.$Properties} message CMsgAMFindAccountsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMFindAccountsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMFindAccountsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -53729,32 +69420,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse + * @returns {CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape} CMsgAMFindAccountsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccountsResponse.decode = function decode(reader, length) { + CMsgAMFindAccountsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMFindAccountsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMFindAccountsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.steam_id && message.steam_id.length)) - message.steam_id = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.steam_id.push(reader.fixed64()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.steam_id && message.steam_id.length)) + message.steam_id = []; + reader.fixed64s(message.steam_id); + continue; + } + if (wireType !== 1) + break; + if (!(message.steam_id && message.steam_id.length)) + message.steam_id = []; message.steam_id.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -53764,11 +69473,11 @@ * @memberof CMsgAMFindAccountsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse + * @returns {CMsgAMFindAccountsResponse & CMsgAMFindAccountsResponse.$Shape} CMsgAMFindAccountsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMFindAccountsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMFindAccountsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -53782,11 +69491,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMFindAccountsResponse.verify = function verify(message) { + CMsgAMFindAccountsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) { - if (!Array.isArray(message.steam_id)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) { + if (!$Array.isArray(message.steam_id)) return "steam_id: array expected"; for (var i = 0; i < message.steam_id.length; ++i) if (!$util.isInteger(message.steam_id[i]) && !(message.steam_id[i] && $util.isInteger(message.steam_id[i].low) && $util.isInteger(message.steam_id[i].high))) @@ -53803,23 +69516,29 @@ * @param {Object.} object Plain object * @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse */ - CMsgAMFindAccountsResponse.fromObject = function fromObject(object) { + CMsgAMFindAccountsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMFindAccountsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMFindAccountsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMFindAccountsResponse(); if (object.steam_id) { - if (!Array.isArray(object.steam_id)) - throw TypeError(".CMsgAMFindAccountsResponse.steam_id: array expected"); - message.steam_id = []; + if (!$Array.isArray(object.steam_id)) + throw $TypeError(".CMsgAMFindAccountsResponse.steam_id: array expected"); + message.steam_id = $Array(object.steam_id.length); for (var i = 0; i < object.steam_id.length; ++i) if ($util.Long) - (message.steam_id[i] = $util.Long.fromValue(object.steam_id[i])).unsigned = false; + message.steam_id[i] = $util.Long.fromValue(object.steam_id[i], true); else if (typeof object.steam_id[i] === "string") - message.steam_id[i] = parseInt(object.steam_id[i], 10); + message.steam_id[i] = $parseInt(object.steam_id[i], 10); else if (typeof object.steam_id[i] === "number") message.steam_id[i] = object.steam_id[i]; else if (typeof object.steam_id[i] === "object") - message.steam_id[i] = new $util.LongBits(object.steam_id[i].low >>> 0, object.steam_id[i].high >>> 0).toNumber(); + message.steam_id[i] = new $util.LongBits(object.steam_id[i].low >>> 0, object.steam_id[i].high >>> 0).toNumber(true); } return message; }; @@ -53833,19 +69552,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMFindAccountsResponse.toObject = function toObject(message, options) { + CMsgAMFindAccountsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.steam_id = []; if (message.steam_id && message.steam_id.length) { - object.steam_id = []; + object.steam_id = $Array(message.steam_id.length); for (var j = 0; j < message.steam_id.length; ++j) - if (typeof message.steam_id[j] === "number") - object.steam_id[j] = options.longs === String ? String(message.steam_id[j]) : message.steam_id[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id[j] = typeof message.steam_id[j] === "number" ? $BigInt(message.steam_id[j]) : $util.Long.fromBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0, true).toBigInt(); + else if (typeof message.steam_id[j] === "number") + object.steam_id[j] = options.longs === $String ? $String(message.steam_id[j]) : message.steam_id[j]; else - object.steam_id[j] = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id[j]) : options.longs === Number ? new $util.LongBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0).toNumber() : message.steam_id[j]; + object.steam_id[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id[j]) : options.longs === $Number ? new $util.LongBits(message.steam_id[j].low >>> 0, message.steam_id[j].high >>> 0).toNumber(true) : message.steam_id[j]; } return object; }; @@ -53857,8 +69582,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMFindAccountsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMFindAccountsResponse.prototype.toJSON = function() { + return CMsgAMFindAccountsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMFindAccountsResponse + * @function getTypeUrl + * @memberof CMsgAMFindAccountsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMFindAccountsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMFindAccountsResponse"; }; return CMsgAMFindAccountsResponse; @@ -53868,8 +69607,7 @@ /** * Properties of a CMsgNotifyWatchdog. - * @exports ICMsgNotifyWatchdog - * @interface ICMsgNotifyWatchdog + * @typedef {Object} CMsgNotifyWatchdog.$Properties * @property {number|null} [source] CMsgNotifyWatchdog source * @property {number|null} [alert_type] CMsgNotifyWatchdog alert_type * @property {number|null} [alert_destination] CMsgNotifyWatchdog alert_destination @@ -53877,22 +69615,36 @@ * @property {number|null} [time] CMsgNotifyWatchdog time * @property {number|null} [appid] CMsgNotifyWatchdog appid * @property {string|null} [text] CMsgNotifyWatchdog text + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgNotifyWatchdog. + * @exports ICMsgNotifyWatchdog + * @interface ICMsgNotifyWatchdog + * @augments CMsgNotifyWatchdog.$Properties + * @deprecated Use CMsgNotifyWatchdog.$Properties instead. + */ + + /** + * Shape of a CMsgNotifyWatchdog. + * @typedef {CMsgNotifyWatchdog.$Properties} CMsgNotifyWatchdog.$Shape */ /** * Constructs a new CMsgNotifyWatchdog. * @exports CMsgNotifyWatchdog * @classdesc Represents a CMsgNotifyWatchdog. - * @implements ICMsgNotifyWatchdog * @constructor - * @param {ICMsgNotifyWatchdog=} [properties] Properties to set + * @param {CMsgNotifyWatchdog.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotifyWatchdog(properties) { + var CMsgNotifyWatchdog = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgNotifyWatchdog source. @@ -53955,10 +69707,14 @@ * @function create * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog=} [properties] Properties to set + * @param {CMsgNotifyWatchdog.$Properties=} [properties] Properties to set * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog instance + * @type {{ + * (properties: CMsgNotifyWatchdog.$Shape): CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape; + * (properties?: CMsgNotifyWatchdog.$Properties): CMsgNotifyWatchdog; + * }} */ - CMsgNotifyWatchdog.create = function create(properties) { + CMsgNotifyWatchdog.create = function(properties) { return new CMsgNotifyWatchdog(properties); }; @@ -53967,27 +69723,34 @@ * @function encode * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog} message CMsgNotifyWatchdog message or plain object to encode + * @param {CMsgNotifyWatchdog.$Properties} message CMsgNotifyWatchdog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotifyWatchdog.encode = function encode(message, writer) { + CMsgNotifyWatchdog.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.source); - if (message.alert_type != null && Object.hasOwnProperty.call(message, "alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.alert_type); - if (message.alert_destination != null && Object.hasOwnProperty.call(message, "alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.alert_destination); - if (message.critical != null && Object.hasOwnProperty.call(message, "critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.critical); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.time); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.appid); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.text); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -53996,12 +69759,12 @@ * @function encodeDelimited * @memberof CMsgNotifyWatchdog * @static - * @param {ICMsgNotifyWatchdog} message CMsgNotifyWatchdog message or plain object to encode + * @param {CMsgNotifyWatchdog.$Properties} message CMsgNotifyWatchdog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotifyWatchdog.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotifyWatchdog.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -54011,43 +69774,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog + * @returns {CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape} CMsgNotifyWatchdog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotifyWatchdog.decode = function decode(reader, length) { + CMsgNotifyWatchdog.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotifyWatchdog(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotifyWatchdog(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source = reader.uint32(); - break; - case 2: - message.alert_type = reader.uint32(); - break; - case 3: - message.alert_destination = reader.uint32(); - break; - case 4: - message.critical = reader.bool(); - break; - case 5: - message.time = reader.uint32(); - break; - case 6: - message.appid = reader.uint32(); - break; - case 7: - message.text = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.source = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.alert_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.alert_destination = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.critical = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.time = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.text = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -54057,11 +69855,11 @@ * @memberof CMsgNotifyWatchdog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog + * @returns {CMsgNotifyWatchdog & CMsgNotifyWatchdog.$Shape} CMsgNotifyWatchdog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotifyWatchdog.decodeDelimited = function decodeDelimited(reader) { + CMsgNotifyWatchdog.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -54075,28 +69873,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotifyWatchdog.verify = function verify(message) { + CMsgNotifyWatchdog.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) if (!$util.isInteger(message.source)) return "source: integer expected"; - if (message.alert_type != null && message.hasOwnProperty("alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) if (!$util.isInteger(message.alert_type)) return "alert_type: integer expected"; - if (message.alert_destination != null && message.hasOwnProperty("alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) if (!$util.isInteger(message.alert_destination)) return "alert_destination: integer expected"; - if (message.critical != null && message.hasOwnProperty("critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) if (typeof message.critical !== "boolean") return "critical: boolean expected"; - if (message.time != null && message.hasOwnProperty("time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) if (!$util.isInteger(message.time)) return "time: integer expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) if (!$util.isString(message.text)) return "text: string expected"; return null; @@ -54110,9 +69912,15 @@ * @param {Object.} object Plain object * @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog */ - CMsgNotifyWatchdog.fromObject = function fromObject(object) { + CMsgNotifyWatchdog.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotifyWatchdog) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotifyWatchdog: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotifyWatchdog(); if (object.source != null) message.source = object.source >>> 0; @@ -54121,13 +69929,13 @@ if (object.alert_destination != null) message.alert_destination = object.alert_destination >>> 0; if (object.critical != null) - message.critical = Boolean(object.critical); + message.critical = $Boolean(object.critical); if (object.time != null) message.time = object.time >>> 0; if (object.appid != null) message.appid = object.appid >>> 0; if (object.text != null) - message.text = String(object.text); + message.text = $String(object.text); return message; }; @@ -54140,9 +69948,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotifyWatchdog.toObject = function toObject(message, options) { + CMsgNotifyWatchdog.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.source = 0; @@ -54153,19 +69965,19 @@ object.appid = 0; object.text = ""; } - if (message.source != null && message.hasOwnProperty("source")) + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) object.source = message.source; - if (message.alert_type != null && message.hasOwnProperty("alert_type")) + if (message.alert_type != null && $Object.hasOwnProperty.call(message, "alert_type")) object.alert_type = message.alert_type; - if (message.alert_destination != null && message.hasOwnProperty("alert_destination")) + if (message.alert_destination != null && $Object.hasOwnProperty.call(message, "alert_destination")) object.alert_destination = message.alert_destination; - if (message.critical != null && message.hasOwnProperty("critical")) + if (message.critical != null && $Object.hasOwnProperty.call(message, "critical")) object.critical = message.critical; - if (message.time != null && message.hasOwnProperty("time")) + if (message.time != null && $Object.hasOwnProperty.call(message, "time")) object.time = message.time; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) object.text = message.text; return object; }; @@ -54177,8 +69989,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotifyWatchdog.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotifyWatchdog.prototype.toJSON = function() { + return CMsgNotifyWatchdog.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotifyWatchdog + * @function getTypeUrl + * @memberof CMsgNotifyWatchdog + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotifyWatchdog.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotifyWatchdog"; }; return CMsgNotifyWatchdog; @@ -54186,27 +70012,40 @@ $root.CMsgAMGetLicenses = (function() { + /** + * Properties of a CMsgAMGetLicenses. + * @typedef {Object} CMsgAMGetLicenses.$Properties + * @property {number|Long|null} [steamid] CMsgAMGetLicenses steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMGetLicenses. * @exports ICMsgAMGetLicenses * @interface ICMsgAMGetLicenses - * @property {number|Long|null} [steamid] CMsgAMGetLicenses steamid + * @augments CMsgAMGetLicenses.$Properties + * @deprecated Use CMsgAMGetLicenses.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetLicenses. + * @typedef {CMsgAMGetLicenses.$Properties} CMsgAMGetLicenses.$Shape */ /** * Constructs a new CMsgAMGetLicenses. * @exports CMsgAMGetLicenses * @classdesc Represents a CMsgAMGetLicenses. - * @implements ICMsgAMGetLicenses * @constructor - * @param {ICMsgAMGetLicenses=} [properties] Properties to set + * @param {CMsgAMGetLicenses.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetLicenses(properties) { + var CMsgAMGetLicenses = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetLicenses steamid. @@ -54214,17 +70053,21 @@ * @memberof CMsgAMGetLicenses * @instance */ - CMsgAMGetLicenses.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetLicenses.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgAMGetLicenses instance using the specified properties. * @function create * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses=} [properties] Properties to set + * @param {CMsgAMGetLicenses.$Properties=} [properties] Properties to set * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses instance + * @type {{ + * (properties: CMsgAMGetLicenses.$Shape): CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape; + * (properties?: CMsgAMGetLicenses.$Properties): CMsgAMGetLicenses; + * }} */ - CMsgAMGetLicenses.create = function create(properties) { + CMsgAMGetLicenses.create = function(properties) { return new CMsgAMGetLicenses(properties); }; @@ -54233,15 +70076,22 @@ * @function encode * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses} message CMsgAMGetLicenses message or plain object to encode + * @param {CMsgAMGetLicenses.$Properties} message CMsgAMGetLicenses message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicenses.encode = function encode(message, writer) { + CMsgAMGetLicenses.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -54250,12 +70100,12 @@ * @function encodeDelimited * @memberof CMsgAMGetLicenses * @static - * @param {ICMsgAMGetLicenses} message CMsgAMGetLicenses message or plain object to encode + * @param {CMsgAMGetLicenses.$Properties} message CMsgAMGetLicenses message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicenses.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetLicenses.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -54265,25 +70115,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses + * @returns {CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape} CMsgAMGetLicenses * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicenses.decode = function decode(reader, length) { + CMsgAMGetLicenses.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetLicenses(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetLicenses(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -54293,11 +70160,11 @@ * @memberof CMsgAMGetLicenses * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses + * @returns {CMsgAMGetLicenses & CMsgAMGetLicenses.$Shape} CMsgAMGetLicenses * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicenses.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetLicenses.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -54311,10 +70178,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetLicenses.verify = function verify(message) { + CMsgAMGetLicenses.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -54328,19 +70199,25 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetLicenses} CMsgAMGetLicenses */ - CMsgAMGetLicenses.fromObject = function fromObject(object) { + CMsgAMGetLicenses.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetLicenses) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetLicenses: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetLicenses(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -54353,21 +70230,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetLicenses.toObject = function toObject(message, options) { + CMsgAMGetLicenses.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -54378,8 +70261,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetLicenses.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetLicenses.prototype.toJSON = function() { + return CMsgAMGetLicenses.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetLicenses + * @function getTypeUrl + * @memberof CMsgAMGetLicenses + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetLicenses.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetLicenses"; }; return CMsgAMGetLicenses; @@ -54389,27 +70286,40 @@ /** * Properties of a CMsgPackageLicense. - * @exports ICMsgPackageLicense - * @interface ICMsgPackageLicense + * @typedef {Object} CMsgPackageLicense.$Properties * @property {number|null} [package_id] CMsgPackageLicense package_id * @property {number|null} [time_created] CMsgPackageLicense time_created * @property {number|null} [owner_id] CMsgPackageLicense owner_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPackageLicense. + * @exports ICMsgPackageLicense + * @interface ICMsgPackageLicense + * @augments CMsgPackageLicense.$Properties + * @deprecated Use CMsgPackageLicense.$Properties instead. + */ + + /** + * Shape of a CMsgPackageLicense. + * @typedef {CMsgPackageLicense.$Properties} CMsgPackageLicense.$Shape */ /** * Constructs a new CMsgPackageLicense. * @exports CMsgPackageLicense * @classdesc Represents a CMsgPackageLicense. - * @implements ICMsgPackageLicense * @constructor - * @param {ICMsgPackageLicense=} [properties] Properties to set + * @param {CMsgPackageLicense.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPackageLicense(properties) { + var CMsgPackageLicense = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPackageLicense package_id. @@ -54440,10 +70350,14 @@ * @function create * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense=} [properties] Properties to set + * @param {CMsgPackageLicense.$Properties=} [properties] Properties to set * @returns {CMsgPackageLicense} CMsgPackageLicense instance + * @type {{ + * (properties: CMsgPackageLicense.$Shape): CMsgPackageLicense & CMsgPackageLicense.$Shape; + * (properties?: CMsgPackageLicense.$Properties): CMsgPackageLicense; + * }} */ - CMsgPackageLicense.create = function create(properties) { + CMsgPackageLicense.create = function(properties) { return new CMsgPackageLicense(properties); }; @@ -54452,19 +70366,26 @@ * @function encode * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense} message CMsgPackageLicense message or plain object to encode + * @param {CMsgPackageLicense.$Properties} message CMsgPackageLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPackageLicense.encode = function encode(message, writer) { + CMsgPackageLicense.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.package_id != null && Object.hasOwnProperty.call(message, "package_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.package_id); - if (message.time_created != null && Object.hasOwnProperty.call(message, "time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.time_created); - if (message.owner_id != null && Object.hasOwnProperty.call(message, "owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.owner_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -54473,12 +70394,12 @@ * @function encodeDelimited * @memberof CMsgPackageLicense * @static - * @param {ICMsgPackageLicense} message CMsgPackageLicense message or plain object to encode + * @param {CMsgPackageLicense.$Properties} message CMsgPackageLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPackageLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPackageLicense.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -54488,31 +70409,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPackageLicense} CMsgPackageLicense + * @returns {CMsgPackageLicense & CMsgPackageLicense.$Shape} CMsgPackageLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPackageLicense.decode = function decode(reader, length) { + CMsgPackageLicense.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPackageLicense(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPackageLicense(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.package_id = reader.uint32(); - break; - case 2: - message.time_created = reader.uint32(); - break; - case 3: - message.owner_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.package_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.time_created = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.owner_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -54522,11 +70466,11 @@ * @memberof CMsgPackageLicense * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPackageLicense} CMsgPackageLicense + * @returns {CMsgPackageLicense & CMsgPackageLicense.$Shape} CMsgPackageLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPackageLicense.decodeDelimited = function decodeDelimited(reader) { + CMsgPackageLicense.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -54540,16 +70484,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPackageLicense.verify = function verify(message) { + CMsgPackageLicense.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) if (!$util.isInteger(message.package_id)) return "package_id: integer expected"; - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) if (!$util.isInteger(message.time_created)) return "time_created: integer expected"; - if (message.owner_id != null && message.hasOwnProperty("owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) if (!$util.isInteger(message.owner_id)) return "owner_id: integer expected"; return null; @@ -54563,9 +70511,15 @@ * @param {Object.} object Plain object * @returns {CMsgPackageLicense} CMsgPackageLicense */ - CMsgPackageLicense.fromObject = function fromObject(object) { + CMsgPackageLicense.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPackageLicense) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPackageLicense: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPackageLicense(); if (object.package_id != null) message.package_id = object.package_id >>> 0; @@ -54585,20 +70539,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPackageLicense.toObject = function toObject(message, options) { + CMsgPackageLicense.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.package_id = 0; object.time_created = 0; object.owner_id = 0; } - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) object.package_id = message.package_id; - if (message.time_created != null && message.hasOwnProperty("time_created")) + if (message.time_created != null && $Object.hasOwnProperty.call(message, "time_created")) object.time_created = message.time_created; - if (message.owner_id != null && message.hasOwnProperty("owner_id")) + if (message.owner_id != null && $Object.hasOwnProperty.call(message, "owner_id")) object.owner_id = message.owner_id; return object; }; @@ -54610,8 +70568,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPackageLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPackageLicense.prototype.toJSON = function() { + return CMsgPackageLicense.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPackageLicense + * @function getTypeUrl + * @memberof CMsgPackageLicense + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPackageLicense.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPackageLicense"; }; return CMsgPackageLicense; @@ -54619,33 +70591,46 @@ $root.CMsgAMGetLicensesResponse = (function() { + /** + * Properties of a CMsgAMGetLicensesResponse. + * @typedef {Object} CMsgAMGetLicensesResponse.$Properties + * @property {Array.|null} [license] CMsgAMGetLicensesResponse license + * @property {number|null} [result] CMsgAMGetLicensesResponse result + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMGetLicensesResponse. * @exports ICMsgAMGetLicensesResponse * @interface ICMsgAMGetLicensesResponse - * @property {Array.|null} [license] CMsgAMGetLicensesResponse license - * @property {number|null} [result] CMsgAMGetLicensesResponse result + * @augments CMsgAMGetLicensesResponse.$Properties + * @deprecated Use CMsgAMGetLicensesResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetLicensesResponse. + * @typedef {CMsgAMGetLicensesResponse.$Properties} CMsgAMGetLicensesResponse.$Shape */ /** * Constructs a new CMsgAMGetLicensesResponse. * @exports CMsgAMGetLicensesResponse * @classdesc Represents a CMsgAMGetLicensesResponse. - * @implements ICMsgAMGetLicensesResponse * @constructor - * @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set + * @param {CMsgAMGetLicensesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetLicensesResponse(properties) { + var CMsgAMGetLicensesResponse = function (properties) { this.license = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetLicensesResponse license. - * @member {Array.} license + * @member {Array.} license * @memberof CMsgAMGetLicensesResponse * @instance */ @@ -54664,10 +70649,14 @@ * @function create * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set + * @param {CMsgAMGetLicensesResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse instance + * @type {{ + * (properties: CMsgAMGetLicensesResponse.$Shape): CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape; + * (properties?: CMsgAMGetLicensesResponse.$Properties): CMsgAMGetLicensesResponse; + * }} */ - CMsgAMGetLicensesResponse.create = function create(properties) { + CMsgAMGetLicensesResponse.create = function(properties) { return new CMsgAMGetLicensesResponse(properties); }; @@ -54676,18 +70665,25 @@ * @function encode * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse} message CMsgAMGetLicensesResponse message or plain object to encode + * @param {CMsgAMGetLicensesResponse.$Properties} message CMsgAMGetLicensesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicensesResponse.encode = function encode(message, writer) { + CMsgAMGetLicensesResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.license != null && message.license.length) for (var i = 0; i < message.license.length; ++i) - $root.CMsgPackageLicense.encode(message.license[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.CMsgPackageLicense.encode(message.license[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.result); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -54696,12 +70692,12 @@ * @function encodeDelimited * @memberof CMsgAMGetLicensesResponse * @static - * @param {ICMsgAMGetLicensesResponse} message CMsgAMGetLicensesResponse message or plain object to encode + * @param {CMsgAMGetLicensesResponse.$Properties} message CMsgAMGetLicensesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetLicensesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetLicensesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -54711,30 +70707,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse + * @returns {CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape} CMsgAMGetLicensesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicensesResponse.decode = function decode(reader, length) { + CMsgAMGetLicensesResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetLicensesResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetLicensesResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.license && message.license.length)) - message.license = []; - message.license.push($root.CMsgPackageLicense.decode(reader, reader.uint32())); - break; - case 2: - message.result = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.license && message.license.length)) + message.license = []; + message.license.push($root.CMsgPackageLicense.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -54744,11 +70760,11 @@ * @memberof CMsgAMGetLicensesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse + * @returns {CMsgAMGetLicensesResponse & CMsgAMGetLicensesResponse.$Shape} CMsgAMGetLicensesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetLicensesResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetLicensesResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -54762,19 +70778,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetLicensesResponse.verify = function verify(message) { + CMsgAMGetLicensesResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.license != null && message.hasOwnProperty("license")) { - if (!Array.isArray(message.license)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.license != null && $Object.hasOwnProperty.call(message, "license")) { + if (!$Array.isArray(message.license)) return "license: array expected"; for (var i = 0; i < message.license.length; ++i) { - var error = $root.CMsgPackageLicense.verify(message.license[i]); + var error = $root.CMsgPackageLicense.verify(message.license[i], _depth + 1); if (error) return "license." + error; } } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; return null; @@ -54788,18 +70808,24 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse */ - CMsgAMGetLicensesResponse.fromObject = function fromObject(object) { + CMsgAMGetLicensesResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetLicensesResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetLicensesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetLicensesResponse(); if (object.license) { - if (!Array.isArray(object.license)) - throw TypeError(".CMsgAMGetLicensesResponse.license: array expected"); - message.license = []; + if (!$Array.isArray(object.license)) + throw $TypeError(".CMsgAMGetLicensesResponse.license: array expected"); + message.license = $Array(object.license.length); for (var i = 0; i < object.license.length; ++i) { - if (typeof object.license[i] !== "object") - throw TypeError(".CMsgAMGetLicensesResponse.license: object expected"); - message.license[i] = $root.CMsgPackageLicense.fromObject(object.license[i]); + if (!$util.isObject(object.license[i])) + throw $TypeError(".CMsgAMGetLicensesResponse.license: object expected"); + message.license[i] = $root.CMsgPackageLicense.fromObject(object.license[i], _depth + 1); } } if (object.result != null) @@ -54816,20 +70842,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetLicensesResponse.toObject = function toObject(message, options) { + CMsgAMGetLicensesResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.license = []; if (options.defaults) object.result = 0; if (message.license && message.license.length) { - object.license = []; + object.license = $Array(message.license.length); for (var j = 0; j < message.license.length; ++j) - object.license[j] = $root.CMsgPackageLicense.toObject(message.license[j], options); + object.license[j] = $root.CMsgPackageLicense.toObject(message.license[j], options, _depth + 1); } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; return object; }; @@ -54841,8 +70871,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetLicensesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetLicensesResponse.prototype.toJSON = function() { + return CMsgAMGetLicensesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetLicensesResponse + * @function getTypeUrl + * @memberof CMsgAMGetLicensesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetLicensesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetLicensesResponse"; }; return CMsgAMGetLicensesResponse; @@ -54852,28 +70896,41 @@ /** * Properties of a CMsgAMGetUserGameStats. - * @exports ICMsgAMGetUserGameStats - * @interface ICMsgAMGetUserGameStats + * @typedef {Object} CMsgAMGetUserGameStats.$Properties * @property {number|Long|null} [steam_id] CMsgAMGetUserGameStats steam_id * @property {number|Long|null} [game_id] CMsgAMGetUserGameStats game_id * @property {Array.|null} [stats] CMsgAMGetUserGameStats stats + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGetUserGameStats. + * @exports ICMsgAMGetUserGameStats + * @interface ICMsgAMGetUserGameStats + * @augments CMsgAMGetUserGameStats.$Properties + * @deprecated Use CMsgAMGetUserGameStats.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetUserGameStats. + * @typedef {CMsgAMGetUserGameStats.$Properties} CMsgAMGetUserGameStats.$Shape */ /** * Constructs a new CMsgAMGetUserGameStats. * @exports CMsgAMGetUserGameStats * @classdesc Represents a CMsgAMGetUserGameStats. - * @implements ICMsgAMGetUserGameStats * @constructor - * @param {ICMsgAMGetUserGameStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetUserGameStats(properties) { + var CMsgAMGetUserGameStats = function (properties) { this.stats = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetUserGameStats steam_id. @@ -54881,7 +70938,7 @@ * @memberof CMsgAMGetUserGameStats * @instance */ - CMsgAMGetUserGameStats.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStats.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStats game_id. @@ -54889,7 +70946,7 @@ * @memberof CMsgAMGetUserGameStats * @instance */ - CMsgAMGetUserGameStats.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStats.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStats stats. @@ -54904,10 +70961,14 @@ * @function create * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStats.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats instance + * @type {{ + * (properties: CMsgAMGetUserGameStats.$Shape): CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape; + * (properties?: CMsgAMGetUserGameStats.$Properties): CMsgAMGetUserGameStats; + * }} */ - CMsgAMGetUserGameStats.create = function create(properties) { + CMsgAMGetUserGameStats.create = function(properties) { return new CMsgAMGetUserGameStats(properties); }; @@ -54916,20 +70977,27 @@ * @function encode * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats} message CMsgAMGetUserGameStats message or plain object to encode + * @param {CMsgAMGetUserGameStats.$Properties} message CMsgAMGetUserGameStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStats.encode = function encode(message, writer) { + CMsgAMGetUserGameStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.game_id != null && Object.hasOwnProperty.call(message, "game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.game_id); if (message.stats != null && message.stats.length) for (var i = 0; i < message.stats.length; ++i) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.stats[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -54938,12 +71006,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStats * @static - * @param {ICMsgAMGetUserGameStats} message CMsgAMGetUserGameStats message or plain object to encode + * @param {CMsgAMGetUserGameStats.$Properties} message CMsgAMGetUserGameStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetUserGameStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -54953,38 +71021,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats + * @returns {CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape} CMsgAMGetUserGameStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStats.decode = function decode(reader, length) { + CMsgAMGetUserGameStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.game_id = reader.fixed64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 3: - if (!(message.stats && message.stats.length)) - message.stats = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.stats.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.game_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.stats && message.stats.length)) + message.stats = []; + reader.uint32s(message.stats); + continue; + } + if (wireType !== 0) + break; + if (!(message.stats && message.stats.length)) + message.stats = []; message.stats.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -54994,11 +71086,11 @@ * @memberof CMsgAMGetUserGameStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats + * @returns {CMsgAMGetUserGameStats & CMsgAMGetUserGameStats.$Shape} CMsgAMGetUserGameStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStats.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetUserGameStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -55012,17 +71104,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetUserGameStats.verify = function verify(message) { + CMsgAMGetUserGameStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.game_id != null && message.hasOwnProperty("game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) if (!$util.isInteger(message.game_id) && !(message.game_id && $util.isInteger(message.game_id.low) && $util.isInteger(message.game_id.high))) return "game_id: integer|Long expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - if (!Array.isArray(message.stats)) + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) { + if (!$Array.isArray(message.stats)) return "stats: array expected"; for (var i = 0; i < message.stats.length; ++i) if (!$util.isInteger(message.stats[i])) @@ -55039,32 +71135,38 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats */ - CMsgAMGetUserGameStats.fromObject = function fromObject(object) { + CMsgAMGetUserGameStats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStats(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.game_id != null) if ($util.Long) - (message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false; + message.game_id = $util.Long.fromValue(object.game_id, true); else if (typeof object.game_id === "string") - message.game_id = parseInt(object.game_id, 10); + message.game_id = $parseInt(object.game_id, 10); else if (typeof object.game_id === "number") message.game_id = object.game_id; else if (typeof object.game_id === "object") - message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(); + message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(true); if (object.stats) { - if (!Array.isArray(object.stats)) - throw TypeError(".CMsgAMGetUserGameStats.stats: array expected"); - message.stats = []; + if (!$Array.isArray(object.stats)) + throw $TypeError(".CMsgAMGetUserGameStats.stats: array expected"); + message.stats = $Array(object.stats.length); for (var i = 0; i < object.stats.length; ++i) message.stats[i] = object.stats[i] >>> 0; } @@ -55080,36 +71182,44 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetUserGameStats.toObject = function toObject(message, options) { + CMsgAMGetUserGameStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.stats = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.game_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.game_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.game_id = options.longs === String ? "0" : 0; + object.game_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.game_id != null && message.hasOwnProperty("game_id")) - if (typeof message.game_id === "number") - object.game_id = options.longs === String ? String(message.game_id) : message.game_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.game_id = typeof message.game_id === "number" ? $BigInt(message.game_id) : $util.Long.fromBits(message.game_id.low >>> 0, message.game_id.high >>> 0, true).toBigInt(); + else if (typeof message.game_id === "number") + object.game_id = options.longs === $String ? $String(message.game_id) : message.game_id; else - object.game_id = options.longs === String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber() : message.game_id; + object.game_id = options.longs === $String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === $Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber(true) : message.game_id; if (message.stats && message.stats.length) { - object.stats = []; + object.stats = $Array(message.stats.length); for (var j = 0; j < message.stats.length; ++j) object.stats[j] = message.stats[j]; } @@ -55123,8 +71233,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetUserGameStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetUserGameStats.prototype.toJSON = function() { + return CMsgAMGetUserGameStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetUserGameStats + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetUserGameStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStats"; }; return CMsgAMGetUserGameStats; @@ -55134,31 +71258,44 @@ /** * Properties of a CMsgAMGetUserGameStatsResponse. - * @exports ICMsgAMGetUserGameStatsResponse - * @interface ICMsgAMGetUserGameStatsResponse + * @typedef {Object} CMsgAMGetUserGameStatsResponse.$Properties * @property {number|Long|null} [steam_id] CMsgAMGetUserGameStatsResponse steam_id * @property {number|Long|null} [game_id] CMsgAMGetUserGameStatsResponse game_id * @property {number|null} [eresult] CMsgAMGetUserGameStatsResponse eresult - * @property {Array.|null} [stats] CMsgAMGetUserGameStatsResponse stats - * @property {Array.|null} [achievement_blocks] CMsgAMGetUserGameStatsResponse achievement_blocks + * @property {Array.|null} [stats] CMsgAMGetUserGameStatsResponse stats + * @property {Array.|null} [achievement_blocks] CMsgAMGetUserGameStatsResponse achievement_blocks + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGetUserGameStatsResponse. + * @exports ICMsgAMGetUserGameStatsResponse + * @interface ICMsgAMGetUserGameStatsResponse + * @augments CMsgAMGetUserGameStatsResponse.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMGetUserGameStatsResponse. + * @typedef {CMsgAMGetUserGameStatsResponse.$Properties} CMsgAMGetUserGameStatsResponse.$Shape */ /** * Constructs a new CMsgAMGetUserGameStatsResponse. * @exports CMsgAMGetUserGameStatsResponse * @classdesc Represents a CMsgAMGetUserGameStatsResponse. - * @implements ICMsgAMGetUserGameStatsResponse * @constructor - * @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGetUserGameStatsResponse(properties) { + var CMsgAMGetUserGameStatsResponse = function (properties) { this.stats = []; this.achievement_blocks = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGetUserGameStatsResponse steam_id. @@ -55166,7 +71303,7 @@ * @memberof CMsgAMGetUserGameStatsResponse * @instance */ - CMsgAMGetUserGameStatsResponse.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStatsResponse.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStatsResponse game_id. @@ -55174,7 +71311,7 @@ * @memberof CMsgAMGetUserGameStatsResponse * @instance */ - CMsgAMGetUserGameStatsResponse.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGetUserGameStatsResponse.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGetUserGameStatsResponse eresult. @@ -55186,7 +71323,7 @@ /** * CMsgAMGetUserGameStatsResponse stats. - * @member {Array.} stats + * @member {Array.} stats * @memberof CMsgAMGetUserGameStatsResponse * @instance */ @@ -55194,7 +71331,7 @@ /** * CMsgAMGetUserGameStatsResponse achievement_blocks. - * @member {Array.} achievement_blocks + * @member {Array.} achievement_blocks * @memberof CMsgAMGetUserGameStatsResponse * @instance */ @@ -55205,10 +71342,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.$Shape): CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.$Properties): CMsgAMGetUserGameStatsResponse; + * }} */ - CMsgAMGetUserGameStatsResponse.create = function create(properties) { + CMsgAMGetUserGameStatsResponse.create = function(properties) { return new CMsgAMGetUserGameStatsResponse(properties); }; @@ -55217,25 +71358,32 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse} message CMsgAMGetUserGameStatsResponse message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.$Properties} message CMsgAMGetUserGameStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStatsResponse.encode = function encode(message, writer) { + CMsgAMGetUserGameStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.game_id != null && Object.hasOwnProperty.call(message, "game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.game_id); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.eresult); if (message.stats != null && message.stats.length) for (var i = 0; i < message.stats.length; ++i) - $root.CMsgAMGetUserGameStatsResponse.Stats.encode(message.stats[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgAMGetUserGameStatsResponse.Stats.encode(message.stats[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.achievement_blocks != null && message.achievement_blocks.length) for (var i = 0; i < message.achievement_blocks.length; ++i) - $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.encode(message.achievement_blocks[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.encode(message.achievement_blocks[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -55244,12 +71392,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse * @static - * @param {ICMsgAMGetUserGameStatsResponse} message CMsgAMGetUserGameStatsResponse message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.$Properties} message CMsgAMGetUserGameStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGetUserGameStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGetUserGameStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -55259,41 +71407,70 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse + * @returns {CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape} CMsgAMGetUserGameStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStatsResponse.decode = function decode(reader, length) { + CMsgAMGetUserGameStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.game_id = reader.fixed64(); - break; - case 3: - message.eresult = reader.int32(); - break; - case 4: - if (!(message.stats && message.stats.length)) - message.stats = []; - message.stats.push($root.CMsgAMGetUserGameStatsResponse.Stats.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.achievement_blocks && message.achievement_blocks.length)) - message.achievement_blocks = []; - message.achievement_blocks.push($root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.game_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.stats && message.stats.length)) + message.stats = []; + message.stats.push($root.CMsgAMGetUserGameStatsResponse.Stats.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.achievement_blocks && message.achievement_blocks.length)) + message.achievement_blocks = []; + message.achievement_blocks.push($root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -55303,11 +71480,11 @@ * @memberof CMsgAMGetUserGameStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse + * @returns {CMsgAMGetUserGameStatsResponse & CMsgAMGetUserGameStatsResponse.$Shape} CMsgAMGetUserGameStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGetUserGameStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGetUserGameStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -55321,32 +71498,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGetUserGameStatsResponse.verify = function verify(message) { + CMsgAMGetUserGameStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.game_id != null && message.hasOwnProperty("game_id")) + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) if (!$util.isInteger(message.game_id) && !(message.game_id && $util.isInteger(message.game_id.low) && $util.isInteger(message.game_id.high))) return "game_id: integer|Long expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - if (!Array.isArray(message.stats)) + if (message.stats != null && $Object.hasOwnProperty.call(message, "stats")) { + if (!$Array.isArray(message.stats)) return "stats: array expected"; for (var i = 0; i < message.stats.length; ++i) { - var error = $root.CMsgAMGetUserGameStatsResponse.Stats.verify(message.stats[i]); + var error = $root.CMsgAMGetUserGameStatsResponse.Stats.verify(message.stats[i], _depth + 1); if (error) return "stats." + error; } } - if (message.achievement_blocks != null && message.hasOwnProperty("achievement_blocks")) { - if (!Array.isArray(message.achievement_blocks)) + if (message.achievement_blocks != null && $Object.hasOwnProperty.call(message, "achievement_blocks")) { + if (!$Array.isArray(message.achievement_blocks)) return "achievement_blocks: array expected"; for (var i = 0; i < message.achievement_blocks.length; ++i) { - var error = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify(message.achievement_blocks[i]); + var error = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify(message.achievement_blocks[i], _depth + 1); if (error) return "achievement_blocks." + error; } @@ -55362,48 +71543,54 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse */ - CMsgAMGetUserGameStatsResponse.fromObject = function fromObject(object) { + CMsgAMGetUserGameStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.game_id != null) if ($util.Long) - (message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false; + message.game_id = $util.Long.fromValue(object.game_id, true); else if (typeof object.game_id === "string") - message.game_id = parseInt(object.game_id, 10); + message.game_id = $parseInt(object.game_id, 10); else if (typeof object.game_id === "number") message.game_id = object.game_id; else if (typeof object.game_id === "object") - message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(); + message.game_id = new $util.LongBits(object.game_id.low >>> 0, object.game_id.high >>> 0).toNumber(true); if (object.eresult != null) message.eresult = object.eresult | 0; if (object.stats) { - if (!Array.isArray(object.stats)) - throw TypeError(".CMsgAMGetUserGameStatsResponse.stats: array expected"); - message.stats = []; + if (!$Array.isArray(object.stats)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.stats: array expected"); + message.stats = $Array(object.stats.length); for (var i = 0; i < object.stats.length; ++i) { - if (typeof object.stats[i] !== "object") - throw TypeError(".CMsgAMGetUserGameStatsResponse.stats: object expected"); - message.stats[i] = $root.CMsgAMGetUserGameStatsResponse.Stats.fromObject(object.stats[i]); + if (!$util.isObject(object.stats[i])) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.stats: object expected"); + message.stats[i] = $root.CMsgAMGetUserGameStatsResponse.Stats.fromObject(object.stats[i], _depth + 1); } } if (object.achievement_blocks) { - if (!Array.isArray(object.achievement_blocks)) - throw TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: array expected"); - message.achievement_blocks = []; + if (!$Array.isArray(object.achievement_blocks)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: array expected"); + message.achievement_blocks = $Array(object.achievement_blocks.length); for (var i = 0; i < object.achievement_blocks.length; ++i) { - if (typeof object.achievement_blocks[i] !== "object") - throw TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: object expected"); - message.achievement_blocks[i] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.fromObject(object.achievement_blocks[i]); + if (!$util.isObject(object.achievement_blocks[i])) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: object expected"); + message.achievement_blocks[i] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.fromObject(object.achievement_blocks[i], _depth + 1); } } return message; @@ -55418,9 +71605,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGetUserGameStatsResponse.toObject = function toObject(message, options) { + CMsgAMGetUserGameStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.stats = []; @@ -55428,38 +71619,42 @@ } if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.game_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.game_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.game_id = options.longs === String ? "0" : 0; + object.game_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.eresult = 2; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.game_id != null && message.hasOwnProperty("game_id")) - if (typeof message.game_id === "number") - object.game_id = options.longs === String ? String(message.game_id) : message.game_id; + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.game_id != null && $Object.hasOwnProperty.call(message, "game_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.game_id = typeof message.game_id === "number" ? $BigInt(message.game_id) : $util.Long.fromBits(message.game_id.low >>> 0, message.game_id.high >>> 0, true).toBigInt(); + else if (typeof message.game_id === "number") + object.game_id = options.longs === $String ? $String(message.game_id) : message.game_id; else - object.game_id = options.longs === String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber() : message.game_id; - if (message.eresult != null && message.hasOwnProperty("eresult")) + object.game_id = options.longs === $String ? $util.Long.prototype.toString.call(message.game_id) : options.longs === $Number ? new $util.LongBits(message.game_id.low >>> 0, message.game_id.high >>> 0).toNumber(true) : message.game_id; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; if (message.stats && message.stats.length) { - object.stats = []; + object.stats = $Array(message.stats.length); for (var j = 0; j < message.stats.length; ++j) - object.stats[j] = $root.CMsgAMGetUserGameStatsResponse.Stats.toObject(message.stats[j], options); + object.stats[j] = $root.CMsgAMGetUserGameStatsResponse.Stats.toObject(message.stats[j], options, _depth + 1); } if (message.achievement_blocks && message.achievement_blocks.length) { - object.achievement_blocks = []; + object.achievement_blocks = $Array(message.achievement_blocks.length); for (var j = 0; j < message.achievement_blocks.length; ++j) - object.achievement_blocks[j] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.toObject(message.achievement_blocks[j], options); + object.achievement_blocks[j] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.toObject(message.achievement_blocks[j], options, _depth + 1); } return object; }; @@ -55471,34 +71666,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGetUserGameStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGetUserGameStatsResponse.prototype.toJSON = function() { + return CMsgAMGetUserGameStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGetUserGameStatsResponse + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGetUserGameStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse"; }; CMsgAMGetUserGameStatsResponse.Stats = (function() { /** * Properties of a Stats. - * @memberof CMsgAMGetUserGameStatsResponse - * @interface IStats + * @typedef {Object} CMsgAMGetUserGameStatsResponse.Stats.$Properties * @property {number|null} [stat_id] Stats stat_id * @property {number|null} [stat_value] Stats stat_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Stats. + * @memberof CMsgAMGetUserGameStatsResponse + * @interface IStats + * @augments CMsgAMGetUserGameStatsResponse.Stats.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.Stats.$Properties instead. + */ + + /** + * Shape of a Stats. + * @typedef {CMsgAMGetUserGameStatsResponse.Stats.$Properties} CMsgAMGetUserGameStatsResponse.Stats.$Shape */ /** * Constructs a new Stats. * @memberof CMsgAMGetUserGameStatsResponse * @classdesc Represents a Stats. - * @implements IStats * @constructor - * @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Stats(properties) { + var Stats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Stats stat_id. @@ -55521,10 +71743,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.Stats.$Shape): CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.Stats.$Properties): CMsgAMGetUserGameStatsResponse.Stats; + * }} */ - Stats.create = function create(properties) { + Stats.create = function(properties) { return new Stats(properties); }; @@ -55533,17 +71759,24 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats} message Stats message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stats.encode = function encode(message, writer) { + Stats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.stat_id != null && Object.hasOwnProperty.call(message, "stat_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.stat_id); - if (message.stat_value != null && Object.hasOwnProperty.call(message, "stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.stat_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -55552,12 +71785,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static - * @param {CMsgAMGetUserGameStatsResponse.IStats} message Stats message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Stats.$Properties} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Stats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -55567,28 +71800,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats + * @returns {CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stats.decode = function decode(reader, length) { + Stats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse.Stats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse.Stats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stat_id = reader.uint32(); - break; - case 2: - message.stat_value = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.stat_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.stat_value = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -55598,11 +71851,11 @@ * @memberof CMsgAMGetUserGameStatsResponse.Stats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats + * @returns {CMsgAMGetUserGameStatsResponse.Stats & CMsgAMGetUserGameStatsResponse.Stats.$Shape} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stats.decodeDelimited = function decodeDelimited(reader) { + Stats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -55616,13 +71869,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Stats.verify = function verify(message) { + Stats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.stat_id != null && message.hasOwnProperty("stat_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) if (!$util.isInteger(message.stat_id)) return "stat_id: integer expected"; - if (message.stat_value != null && message.hasOwnProperty("stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) if (!$util.isInteger(message.stat_value)) return "stat_value: integer expected"; return null; @@ -55636,9 +71893,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats */ - Stats.fromObject = function fromObject(object) { + Stats.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Stats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.Stats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse.Stats(); if (object.stat_id != null) message.stat_id = object.stat_id >>> 0; @@ -55656,17 +71919,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Stats.toObject = function toObject(message, options) { + Stats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.stat_id = 0; object.stat_value = 0; } - if (message.stat_id != null && message.hasOwnProperty("stat_id")) + if (message.stat_id != null && $Object.hasOwnProperty.call(message, "stat_id")) object.stat_id = message.stat_id; - if (message.stat_value != null && message.hasOwnProperty("stat_value")) + if (message.stat_value != null && $Object.hasOwnProperty.call(message, "stat_value")) object.stat_value = message.stat_value; return object; }; @@ -55678,8 +71945,22 @@ * @instance * @returns {Object.} JSON object */ - Stats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Stats.prototype.toJSON = function() { + return Stats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Stats + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse.Stats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Stats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse.Stats"; }; return Stats; @@ -55689,27 +71970,40 @@ /** * Properties of an Achievement_Blocks. - * @memberof CMsgAMGetUserGameStatsResponse - * @interface IAchievement_Blocks + * @typedef {Object} CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties * @property {number|null} [achievement_id] Achievement_Blocks achievement_id * @property {number|null} [achievement_bit_id] Achievement_Blocks achievement_bit_id * @property {number|null} [unlock_time] Achievement_Blocks unlock_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Achievement_Blocks. + * @memberof CMsgAMGetUserGameStatsResponse + * @interface IAchievement_Blocks + * @augments CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties + * @deprecated Use CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties instead. + */ + + /** + * Shape of an Achievement_Blocks. + * @typedef {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape */ /** * Constructs a new Achievement_Blocks. * @memberof CMsgAMGetUserGameStatsResponse * @classdesc Represents an Achievement_Blocks. - * @implements IAchievement_Blocks * @constructor - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Achievement_Blocks(properties) { + var Achievement_Blocks = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Achievement_Blocks achievement_id. @@ -55740,10 +72034,14 @@ * @function create * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties=} [properties] Properties to set * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks instance + * @type {{ + * (properties: CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape): CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape; + * (properties?: CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties): CMsgAMGetUserGameStatsResponse.Achievement_Blocks; + * }} */ - Achievement_Blocks.create = function create(properties) { + Achievement_Blocks.create = function(properties) { return new Achievement_Blocks(properties); }; @@ -55752,19 +72050,26 @@ * @function encode * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} message Achievement_Blocks message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} message Achievement_Blocks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Achievement_Blocks.encode = function encode(message, writer) { + Achievement_Blocks.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.achievement_id != null && Object.hasOwnProperty.call(message, "achievement_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.achievement_id); - if (message.achievement_bit_id != null && Object.hasOwnProperty.call(message, "achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.achievement_bit_id); - if (message.unlock_time != null && Object.hasOwnProperty.call(message, "unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.unlock_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -55773,12 +72078,12 @@ * @function encodeDelimited * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static - * @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} message Achievement_Blocks message or plain object to encode + * @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Properties} message Achievement_Blocks message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Achievement_Blocks.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Achievement_Blocks.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -55788,31 +72093,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks + * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape} Achievement_Blocks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Achievement_Blocks.decode = function decode(reader, length) { + Achievement_Blocks.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.achievement_id = reader.uint32(); - break; - case 2: - message.achievement_bit_id = reader.uint32(); - break; - case 3: - message.unlock_time = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.achievement_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.achievement_bit_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.unlock_time = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -55822,11 +72150,11 @@ * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks + * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks & CMsgAMGetUserGameStatsResponse.Achievement_Blocks.$Shape} Achievement_Blocks * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Achievement_Blocks.decodeDelimited = function decodeDelimited(reader) { + Achievement_Blocks.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -55840,16 +72168,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Achievement_Blocks.verify = function verify(message) { + Achievement_Blocks.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.achievement_id != null && message.hasOwnProperty("achievement_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) if (!$util.isInteger(message.achievement_id)) return "achievement_id: integer expected"; - if (message.achievement_bit_id != null && message.hasOwnProperty("achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) if (!$util.isInteger(message.achievement_bit_id)) return "achievement_bit_id: integer expected"; - if (message.unlock_time != null && message.hasOwnProperty("unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) if (!$util.isInteger(message.unlock_time)) return "unlock_time: integer expected"; return null; @@ -55863,9 +72195,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks */ - Achievement_Blocks.fromObject = function fromObject(object) { + Achievement_Blocks.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGetUserGameStatsResponse.Achievement_Blocks: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks(); if (object.achievement_id != null) message.achievement_id = object.achievement_id >>> 0; @@ -55885,20 +72223,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Achievement_Blocks.toObject = function toObject(message, options) { + Achievement_Blocks.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.achievement_id = 0; object.achievement_bit_id = 0; object.unlock_time = 0; } - if (message.achievement_id != null && message.hasOwnProperty("achievement_id")) + if (message.achievement_id != null && $Object.hasOwnProperty.call(message, "achievement_id")) object.achievement_id = message.achievement_id; - if (message.achievement_bit_id != null && message.hasOwnProperty("achievement_bit_id")) + if (message.achievement_bit_id != null && $Object.hasOwnProperty.call(message, "achievement_bit_id")) object.achievement_bit_id = message.achievement_bit_id; - if (message.unlock_time != null && message.hasOwnProperty("unlock_time")) + if (message.unlock_time != null && $Object.hasOwnProperty.call(message, "unlock_time")) object.unlock_time = message.unlock_time; return object; }; @@ -55910,8 +72252,22 @@ * @instance * @returns {Object.} JSON object */ - Achievement_Blocks.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Achievement_Blocks.prototype.toJSON = function() { + return Achievement_Blocks.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Achievement_Blocks + * @function getTypeUrl + * @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Achievement_Blocks.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGetUserGameStatsResponse.Achievement_Blocks"; }; return Achievement_Blocks; @@ -55924,26 +72280,39 @@ /** * Properties of a CMsgGCGetCommandList. - * @exports ICMsgGCGetCommandList - * @interface ICMsgGCGetCommandList + * @typedef {Object} CMsgGCGetCommandList.$Properties * @property {number|null} [app_id] CMsgGCGetCommandList app_id * @property {string|null} [command_prefix] CMsgGCGetCommandList command_prefix + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetCommandList. + * @exports ICMsgGCGetCommandList + * @interface ICMsgGCGetCommandList + * @augments CMsgGCGetCommandList.$Properties + * @deprecated Use CMsgGCGetCommandList.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetCommandList. + * @typedef {CMsgGCGetCommandList.$Properties} CMsgGCGetCommandList.$Shape */ /** * Constructs a new CMsgGCGetCommandList. * @exports CMsgGCGetCommandList * @classdesc Represents a CMsgGCGetCommandList. - * @implements ICMsgGCGetCommandList * @constructor - * @param {ICMsgGCGetCommandList=} [properties] Properties to set + * @param {CMsgGCGetCommandList.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetCommandList(properties) { + var CMsgGCGetCommandList = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetCommandList app_id. @@ -55966,10 +72335,14 @@ * @function create * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList=} [properties] Properties to set + * @param {CMsgGCGetCommandList.$Properties=} [properties] Properties to set * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList instance + * @type {{ + * (properties: CMsgGCGetCommandList.$Shape): CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape; + * (properties?: CMsgGCGetCommandList.$Properties): CMsgGCGetCommandList; + * }} */ - CMsgGCGetCommandList.create = function create(properties) { + CMsgGCGetCommandList.create = function(properties) { return new CMsgGCGetCommandList(properties); }; @@ -55978,17 +72351,24 @@ * @function encode * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList} message CMsgGCGetCommandList message or plain object to encode + * @param {CMsgGCGetCommandList.$Properties} message CMsgGCGetCommandList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandList.encode = function encode(message, writer) { + CMsgGCGetCommandList.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_id); - if (message.command_prefix != null && Object.hasOwnProperty.call(message, "command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.command_prefix); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -55997,12 +72377,12 @@ * @function encodeDelimited * @memberof CMsgGCGetCommandList * @static - * @param {ICMsgGCGetCommandList} message CMsgGCGetCommandList message or plain object to encode + * @param {CMsgGCGetCommandList.$Properties} message CMsgGCGetCommandList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetCommandList.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -56012,28 +72392,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList + * @returns {CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape} CMsgGCGetCommandList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandList.decode = function decode(reader, length) { + CMsgGCGetCommandList.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetCommandList(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetCommandList(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_id = reader.uint32(); - break; - case 2: - message.command_prefix = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.command_prefix = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -56043,11 +72443,11 @@ * @memberof CMsgGCGetCommandList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList + * @returns {CMsgGCGetCommandList & CMsgGCGetCommandList.$Shape} CMsgGCGetCommandList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandList.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetCommandList.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -56061,13 +72461,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetCommandList.verify = function verify(message) { + CMsgGCGetCommandList.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.command_prefix != null && message.hasOwnProperty("command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) if (!$util.isString(message.command_prefix)) return "command_prefix: string expected"; return null; @@ -56081,14 +72485,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetCommandList} CMsgGCGetCommandList */ - CMsgGCGetCommandList.fromObject = function fromObject(object) { + CMsgGCGetCommandList.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetCommandList) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetCommandList: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetCommandList(); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.command_prefix != null) - message.command_prefix = String(object.command_prefix); + message.command_prefix = $String(object.command_prefix); return message; }; @@ -56101,17 +72511,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetCommandList.toObject = function toObject(message, options) { + CMsgGCGetCommandList.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.app_id = 0; object.command_prefix = ""; } - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.command_prefix != null && message.hasOwnProperty("command_prefix")) + if (message.command_prefix != null && $Object.hasOwnProperty.call(message, "command_prefix")) object.command_prefix = message.command_prefix; return object; }; @@ -56123,8 +72537,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetCommandList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetCommandList.prototype.toJSON = function() { + return CMsgGCGetCommandList.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetCommandList + * @function getTypeUrl + * @memberof CMsgGCGetCommandList + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetCommandList.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetCommandList"; }; return CMsgGCGetCommandList; @@ -56132,28 +72560,41 @@ $root.CMsgGCGetCommandListResponse = (function() { + /** + * Properties of a CMsgGCGetCommandListResponse. + * @typedef {Object} CMsgGCGetCommandListResponse.$Properties + * @property {Array.|null} [command_name] CMsgGCGetCommandListResponse command_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetCommandListResponse. * @exports ICMsgGCGetCommandListResponse * @interface ICMsgGCGetCommandListResponse - * @property {Array.|null} [command_name] CMsgGCGetCommandListResponse command_name + * @augments CMsgGCGetCommandListResponse.$Properties + * @deprecated Use CMsgGCGetCommandListResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetCommandListResponse. + * @typedef {CMsgGCGetCommandListResponse.$Properties} CMsgGCGetCommandListResponse.$Shape */ /** * Constructs a new CMsgGCGetCommandListResponse. * @exports CMsgGCGetCommandListResponse * @classdesc Represents a CMsgGCGetCommandListResponse. - * @implements ICMsgGCGetCommandListResponse * @constructor - * @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set + * @param {CMsgGCGetCommandListResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetCommandListResponse(properties) { + var CMsgGCGetCommandListResponse = function (properties) { this.command_name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetCommandListResponse command_name. @@ -56168,10 +72609,14 @@ * @function create * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set + * @param {CMsgGCGetCommandListResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse instance + * @type {{ + * (properties: CMsgGCGetCommandListResponse.$Shape): CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape; + * (properties?: CMsgGCGetCommandListResponse.$Properties): CMsgGCGetCommandListResponse; + * }} */ - CMsgGCGetCommandListResponse.create = function create(properties) { + CMsgGCGetCommandListResponse.create = function(properties) { return new CMsgGCGetCommandListResponse(properties); }; @@ -56180,16 +72625,23 @@ * @function encode * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse} message CMsgGCGetCommandListResponse message or plain object to encode + * @param {CMsgGCGetCommandListResponse.$Properties} message CMsgGCGetCommandListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandListResponse.encode = function encode(message, writer) { + CMsgGCGetCommandListResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.command_name != null && message.command_name.length) for (var i = 0; i < message.command_name.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.command_name[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -56198,12 +72650,12 @@ * @function encodeDelimited * @memberof CMsgGCGetCommandListResponse * @static - * @param {ICMsgGCGetCommandListResponse} message CMsgGCGetCommandListResponse message or plain object to encode + * @param {CMsgGCGetCommandListResponse.$Properties} message CMsgGCGetCommandListResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetCommandListResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetCommandListResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -56213,27 +72665,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse + * @returns {CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape} CMsgGCGetCommandListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandListResponse.decode = function decode(reader, length) { + CMsgGCGetCommandListResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetCommandListResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetCommandListResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.command_name && message.command_name.length)) - message.command_name = []; - message.command_name.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.command_name && message.command_name.length)) + message.command_name = []; + message.command_name.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -56243,11 +72712,11 @@ * @memberof CMsgGCGetCommandListResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse + * @returns {CMsgGCGetCommandListResponse & CMsgGCGetCommandListResponse.$Shape} CMsgGCGetCommandListResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetCommandListResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetCommandListResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -56261,11 +72730,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetCommandListResponse.verify = function verify(message) { + CMsgGCGetCommandListResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.command_name != null && message.hasOwnProperty("command_name")) { - if (!Array.isArray(message.command_name)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.command_name != null && $Object.hasOwnProperty.call(message, "command_name")) { + if (!$Array.isArray(message.command_name)) return "command_name: array expected"; for (var i = 0; i < message.command_name.length; ++i) if (!$util.isString(message.command_name[i])) @@ -56282,16 +72755,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse */ - CMsgGCGetCommandListResponse.fromObject = function fromObject(object) { + CMsgGCGetCommandListResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetCommandListResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetCommandListResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetCommandListResponse(); if (object.command_name) { - if (!Array.isArray(object.command_name)) - throw TypeError(".CMsgGCGetCommandListResponse.command_name: array expected"); - message.command_name = []; + if (!$Array.isArray(object.command_name)) + throw $TypeError(".CMsgGCGetCommandListResponse.command_name: array expected"); + message.command_name = $Array(object.command_name.length); for (var i = 0; i < object.command_name.length; ++i) - message.command_name[i] = String(object.command_name[i]); + message.command_name[i] = $String(object.command_name[i]); } return message; }; @@ -56305,14 +72784,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetCommandListResponse.toObject = function toObject(message, options) { + CMsgGCGetCommandListResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.command_name = []; if (message.command_name && message.command_name.length) { - object.command_name = []; + object.command_name = $Array(message.command_name.length); for (var j = 0; j < message.command_name.length; ++j) object.command_name[j] = message.command_name[j]; } @@ -56326,8 +72809,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetCommandListResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetCommandListResponse.prototype.toJSON = function() { + return CMsgGCGetCommandListResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetCommandListResponse + * @function getTypeUrl + * @memberof CMsgGCGetCommandListResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetCommandListResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetCommandListResponse"; }; return CMsgGCGetCommandListResponse; @@ -56335,28 +72832,41 @@ $root.CGCMsgMemCachedGet = (function() { + /** + * Properties of a CGCMsgMemCachedGet. + * @typedef {Object} CGCMsgMemCachedGet.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedGet keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedGet. * @exports ICGCMsgMemCachedGet * @interface ICGCMsgMemCachedGet - * @property {Array.|null} [keys] CGCMsgMemCachedGet keys + * @augments CGCMsgMemCachedGet.$Properties + * @deprecated Use CGCMsgMemCachedGet.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedGet. + * @typedef {CGCMsgMemCachedGet.$Properties} CGCMsgMemCachedGet.$Shape */ /** * Constructs a new CGCMsgMemCachedGet. * @exports CGCMsgMemCachedGet * @classdesc Represents a CGCMsgMemCachedGet. - * @implements ICGCMsgMemCachedGet * @constructor - * @param {ICGCMsgMemCachedGet=} [properties] Properties to set + * @param {CGCMsgMemCachedGet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedGet(properties) { + var CGCMsgMemCachedGet = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedGet keys. @@ -56371,10 +72881,14 @@ * @function create * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet=} [properties] Properties to set + * @param {CGCMsgMemCachedGet.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet instance + * @type {{ + * (properties: CGCMsgMemCachedGet.$Shape): CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape; + * (properties?: CGCMsgMemCachedGet.$Properties): CGCMsgMemCachedGet; + * }} */ - CGCMsgMemCachedGet.create = function create(properties) { + CGCMsgMemCachedGet.create = function(properties) { return new CGCMsgMemCachedGet(properties); }; @@ -56383,16 +72897,23 @@ * @function encode * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet} message CGCMsgMemCachedGet message or plain object to encode + * @param {CGCMsgMemCachedGet.$Properties} message CGCMsgMemCachedGet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGet.encode = function encode(message, writer) { + CGCMsgMemCachedGet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keys[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -56401,12 +72922,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGet * @static - * @param {ICGCMsgMemCachedGet} message CGCMsgMemCachedGet message or plain object to encode + * @param {CGCMsgMemCachedGet.$Properties} message CGCMsgMemCachedGet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedGet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -56416,27 +72937,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet + * @returns {CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape} CGCMsgMemCachedGet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGet.decode = function decode(reader, length) { + CGCMsgMemCachedGet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -56446,11 +72984,11 @@ * @memberof CGCMsgMemCachedGet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet + * @returns {CGCMsgMemCachedGet & CGCMsgMemCachedGet.$Shape} CGCMsgMemCachedGet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGet.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedGet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -56464,11 +73002,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedGet.verify = function verify(message) { + CGCMsgMemCachedGet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) if (!$util.isString(message.keys[i])) @@ -56485,16 +73027,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet */ - CGCMsgMemCachedGet.fromObject = function fromObject(object) { + CGCMsgMemCachedGet.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGet) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGet(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedGet.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedGet.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) - message.keys[i] = String(object.keys[i]); + message.keys[i] = $String(object.keys[i]); } return message; }; @@ -56508,14 +73056,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedGet.toObject = function toObject(message, options) { + CGCMsgMemCachedGet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) object.keys[j] = message.keys[j]; } @@ -56529,8 +73081,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedGet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedGet.prototype.toJSON = function() { + return CGCMsgMemCachedGet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedGet + * @function getTypeUrl + * @memberof CGCMsgMemCachedGet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedGet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGet"; }; return CGCMsgMemCachedGet; @@ -56538,32 +73104,45 @@ $root.CGCMsgMemCachedGetResponse = (function() { + /** + * Properties of a CGCMsgMemCachedGetResponse. + * @typedef {Object} CGCMsgMemCachedGetResponse.$Properties + * @property {Array.|null} [values] CGCMsgMemCachedGetResponse values + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedGetResponse. * @exports ICGCMsgMemCachedGetResponse * @interface ICGCMsgMemCachedGetResponse - * @property {Array.|null} [values] CGCMsgMemCachedGetResponse values + * @augments CGCMsgMemCachedGetResponse.$Properties + * @deprecated Use CGCMsgMemCachedGetResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedGetResponse. + * @typedef {CGCMsgMemCachedGetResponse.$Properties} CGCMsgMemCachedGetResponse.$Shape */ /** * Constructs a new CGCMsgMemCachedGetResponse. * @exports CGCMsgMemCachedGetResponse * @classdesc Represents a CGCMsgMemCachedGetResponse. - * @implements ICGCMsgMemCachedGetResponse * @constructor - * @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedGetResponse(properties) { + var CGCMsgMemCachedGetResponse = function (properties) { this.values = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedGetResponse values. - * @member {Array.} values + * @member {Array.} values * @memberof CGCMsgMemCachedGetResponse * @instance */ @@ -56574,10 +73153,14 @@ * @function create * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse instance + * @type {{ + * (properties: CGCMsgMemCachedGetResponse.$Shape): CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape; + * (properties?: CGCMsgMemCachedGetResponse.$Properties): CGCMsgMemCachedGetResponse; + * }} */ - CGCMsgMemCachedGetResponse.create = function create(properties) { + CGCMsgMemCachedGetResponse.create = function(properties) { return new CGCMsgMemCachedGetResponse(properties); }; @@ -56586,16 +73169,23 @@ * @function encode * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse} message CGCMsgMemCachedGetResponse message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.$Properties} message CGCMsgMemCachedGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGetResponse.encode = function encode(message, writer) { + CGCMsgMemCachedGetResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.values != null && message.values.length) for (var i = 0; i < message.values.length; ++i) - $root.CGCMsgMemCachedGetResponse.ValueTag.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CGCMsgMemCachedGetResponse.ValueTag.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -56604,12 +73194,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGetResponse * @static - * @param {ICGCMsgMemCachedGetResponse} message CGCMsgMemCachedGetResponse message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.$Properties} message CGCMsgMemCachedGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedGetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedGetResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -56619,27 +73209,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse + * @returns {CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape} CGCMsgMemCachedGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGetResponse.decode = function decode(reader, length) { + CGCMsgMemCachedGetResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGetResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGetResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.CGCMsgMemCachedGetResponse.ValueTag.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.CGCMsgMemCachedGetResponse.ValueTag.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -56649,11 +73256,11 @@ * @memberof CGCMsgMemCachedGetResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse + * @returns {CGCMsgMemCachedGetResponse & CGCMsgMemCachedGetResponse.$Shape} CGCMsgMemCachedGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedGetResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedGetResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -56667,14 +73274,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedGetResponse.verify = function verify(message) { + CGCMsgMemCachedGetResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.values != null && $Object.hasOwnProperty.call(message, "values")) { + if (!$Array.isArray(message.values)) return "values: array expected"; for (var i = 0; i < message.values.length; ++i) { - var error = $root.CGCMsgMemCachedGetResponse.ValueTag.verify(message.values[i]); + var error = $root.CGCMsgMemCachedGetResponse.ValueTag.verify(message.values[i], _depth + 1); if (error) return "values." + error; } @@ -56690,18 +73301,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse */ - CGCMsgMemCachedGetResponse.fromObject = function fromObject(object) { + CGCMsgMemCachedGetResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGetResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGetResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGetResponse(); if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".CGCMsgMemCachedGetResponse.values: array expected"); - message.values = []; + if (!$Array.isArray(object.values)) + throw $TypeError(".CGCMsgMemCachedGetResponse.values: array expected"); + message.values = $Array(object.values.length); for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".CGCMsgMemCachedGetResponse.values: object expected"); - message.values[i] = $root.CGCMsgMemCachedGetResponse.ValueTag.fromObject(object.values[i]); + if (!$util.isObject(object.values[i])) + throw $TypeError(".CGCMsgMemCachedGetResponse.values: object expected"); + message.values[i] = $root.CGCMsgMemCachedGetResponse.ValueTag.fromObject(object.values[i], _depth + 1); } } return message; @@ -56716,16 +73333,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedGetResponse.toObject = function toObject(message, options) { + CGCMsgMemCachedGetResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.values = []; if (message.values && message.values.length) { - object.values = []; + object.values = $Array(message.values.length); for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.CGCMsgMemCachedGetResponse.ValueTag.toObject(message.values[j], options); + object.values[j] = $root.CGCMsgMemCachedGetResponse.ValueTag.toObject(message.values[j], options, _depth + 1); } return object; }; @@ -56737,34 +73358,61 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedGetResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedGetResponse.prototype.toJSON = function() { + return CGCMsgMemCachedGetResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedGetResponse + * @function getTypeUrl + * @memberof CGCMsgMemCachedGetResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedGetResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGetResponse"; }; CGCMsgMemCachedGetResponse.ValueTag = (function() { /** * Properties of a ValueTag. - * @memberof CGCMsgMemCachedGetResponse - * @interface IValueTag + * @typedef {Object} CGCMsgMemCachedGetResponse.ValueTag.$Properties * @property {boolean|null} [found] ValueTag found * @property {Uint8Array|null} [value] ValueTag value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ValueTag. + * @memberof CGCMsgMemCachedGetResponse + * @interface IValueTag + * @augments CGCMsgMemCachedGetResponse.ValueTag.$Properties + * @deprecated Use CGCMsgMemCachedGetResponse.ValueTag.$Properties instead. + */ + + /** + * Shape of a ValueTag. + * @typedef {CGCMsgMemCachedGetResponse.ValueTag.$Properties} CGCMsgMemCachedGetResponse.ValueTag.$Shape */ /** * Constructs a new ValueTag. * @memberof CGCMsgMemCachedGetResponse * @classdesc Represents a ValueTag. - * @implements IValueTag * @constructor - * @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ValueTag(properties) { + var ValueTag = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ValueTag found. @@ -56787,10 +73435,14 @@ * @function create * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag instance + * @type {{ + * (properties: CGCMsgMemCachedGetResponse.ValueTag.$Shape): CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape; + * (properties?: CGCMsgMemCachedGetResponse.ValueTag.$Properties): CGCMsgMemCachedGetResponse.ValueTag; + * }} */ - ValueTag.create = function create(properties) { + ValueTag.create = function(properties) { return new ValueTag(properties); }; @@ -56799,17 +73451,24 @@ * @function encode * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag} message ValueTag message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties} message ValueTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValueTag.encode = function encode(message, writer) { + ValueTag.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.found != null && Object.hasOwnProperty.call(message, "found")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.found); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -56818,12 +73477,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static - * @param {CGCMsgMemCachedGetResponse.IValueTag} message ValueTag message or plain object to encode + * @param {CGCMsgMemCachedGetResponse.ValueTag.$Properties} message ValueTag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValueTag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValueTag.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -56833,28 +73492,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag + * @returns {CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape} ValueTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValueTag.decode = function decode(reader, length) { + ValueTag.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedGetResponse.ValueTag(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedGetResponse.ValueTag(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.found = reader.bool(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.found = reader.bool(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -56864,11 +73543,11 @@ * @memberof CGCMsgMemCachedGetResponse.ValueTag * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag + * @returns {CGCMsgMemCachedGetResponse.ValueTag & CGCMsgMemCachedGetResponse.ValueTag.$Shape} ValueTag * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValueTag.decodeDelimited = function decodeDelimited(reader) { + ValueTag.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -56882,13 +73561,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValueTag.verify = function verify(message) { + ValueTag.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.found != null && message.hasOwnProperty("found")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) if (typeof message.found !== "boolean") return "found: boolean expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -56902,16 +73585,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag */ - ValueTag.fromObject = function fromObject(object) { + ValueTag.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedGetResponse.ValueTag) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedGetResponse.ValueTag: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedGetResponse.ValueTag(); if (object.found != null) - message.found = Boolean(object.found); + message.found = $Boolean(object.found); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -56925,24 +73614,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValueTag.toObject = function toObject(message, options) { + ValueTag.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.found = false; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.found != null && message.hasOwnProperty("found")) + if (message.found != null && $Object.hasOwnProperty.call(message, "found")) object.found = message.found; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -56953,8 +73646,22 @@ * @instance * @returns {Object.} JSON object */ - ValueTag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ValueTag.prototype.toJSON = function() { + return ValueTag.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ValueTag + * @function getTypeUrl + * @memberof CGCMsgMemCachedGetResponse.ValueTag + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ValueTag.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedGetResponse.ValueTag"; }; return ValueTag; @@ -56965,32 +73672,45 @@ $root.CGCMsgMemCachedSet = (function() { + /** + * Properties of a CGCMsgMemCachedSet. + * @typedef {Object} CGCMsgMemCachedSet.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedSet keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedSet. * @exports ICGCMsgMemCachedSet * @interface ICGCMsgMemCachedSet - * @property {Array.|null} [keys] CGCMsgMemCachedSet keys + * @augments CGCMsgMemCachedSet.$Properties + * @deprecated Use CGCMsgMemCachedSet.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedSet. + * @typedef {CGCMsgMemCachedSet.$Properties} CGCMsgMemCachedSet.$Shape */ /** * Constructs a new CGCMsgMemCachedSet. * @exports CGCMsgMemCachedSet * @classdesc Represents a CGCMsgMemCachedSet. - * @implements ICGCMsgMemCachedSet * @constructor - * @param {ICGCMsgMemCachedSet=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedSet(properties) { + var CGCMsgMemCachedSet = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedSet keys. - * @member {Array.} keys + * @member {Array.} keys * @memberof CGCMsgMemCachedSet * @instance */ @@ -57001,10 +73721,14 @@ * @function create * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet instance + * @type {{ + * (properties: CGCMsgMemCachedSet.$Shape): CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape; + * (properties?: CGCMsgMemCachedSet.$Properties): CGCMsgMemCachedSet; + * }} */ - CGCMsgMemCachedSet.create = function create(properties) { + CGCMsgMemCachedSet.create = function(properties) { return new CGCMsgMemCachedSet(properties); }; @@ -57013,16 +73737,23 @@ * @function encode * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet} message CGCMsgMemCachedSet message or plain object to encode + * @param {CGCMsgMemCachedSet.$Properties} message CGCMsgMemCachedSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedSet.encode = function encode(message, writer) { + CGCMsgMemCachedSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) - $root.CGCMsgMemCachedSet.KeyPair.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CGCMsgMemCachedSet.KeyPair.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -57031,12 +73762,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedSet * @static - * @param {ICGCMsgMemCachedSet} message CGCMsgMemCachedSet message or plain object to encode + * @param {CGCMsgMemCachedSet.$Properties} message CGCMsgMemCachedSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -57046,27 +73777,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet + * @returns {CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape} CGCMsgMemCachedSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedSet.decode = function decode(reader, length) { + CGCMsgMemCachedSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.CGCMsgMemCachedSet.KeyPair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push($root.CGCMsgMemCachedSet.KeyPair.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -57076,11 +73824,11 @@ * @memberof CGCMsgMemCachedSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet + * @returns {CGCMsgMemCachedSet & CGCMsgMemCachedSet.$Shape} CGCMsgMemCachedSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedSet.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -57094,14 +73842,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedSet.verify = function verify(message) { + CGCMsgMemCachedSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) { - var error = $root.CGCMsgMemCachedSet.KeyPair.verify(message.keys[i]); + var error = $root.CGCMsgMemCachedSet.KeyPair.verify(message.keys[i], _depth + 1); if (error) return "keys." + error; } @@ -57117,18 +73869,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet */ - CGCMsgMemCachedSet.fromObject = function fromObject(object) { + CGCMsgMemCachedSet.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedSet(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedSet.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedSet.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".CGCMsgMemCachedSet.keys: object expected"); - message.keys[i] = $root.CGCMsgMemCachedSet.KeyPair.fromObject(object.keys[i]); + if (!$util.isObject(object.keys[i])) + throw $TypeError(".CGCMsgMemCachedSet.keys: object expected"); + message.keys[i] = $root.CGCMsgMemCachedSet.KeyPair.fromObject(object.keys[i], _depth + 1); } } return message; @@ -57143,16 +73901,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedSet.toObject = function toObject(message, options) { + CGCMsgMemCachedSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.CGCMsgMemCachedSet.KeyPair.toObject(message.keys[j], options); + object.keys[j] = $root.CGCMsgMemCachedSet.KeyPair.toObject(message.keys[j], options, _depth + 1); } return object; }; @@ -57164,34 +73926,61 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedSet.prototype.toJSON = function() { + return CGCMsgMemCachedSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedSet + * @function getTypeUrl + * @memberof CGCMsgMemCachedSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedSet"; }; CGCMsgMemCachedSet.KeyPair = (function() { /** * Properties of a KeyPair. - * @memberof CGCMsgMemCachedSet - * @interface IKeyPair + * @typedef {Object} CGCMsgMemCachedSet.KeyPair.$Properties * @property {string|null} [name] KeyPair name * @property {Uint8Array|null} [value] KeyPair value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a KeyPair. + * @memberof CGCMsgMemCachedSet + * @interface IKeyPair + * @augments CGCMsgMemCachedSet.KeyPair.$Properties + * @deprecated Use CGCMsgMemCachedSet.KeyPair.$Properties instead. + */ + + /** + * Shape of a KeyPair. + * @typedef {CGCMsgMemCachedSet.KeyPair.$Properties} CGCMsgMemCachedSet.KeyPair.$Shape */ /** * Constructs a new KeyPair. * @memberof CGCMsgMemCachedSet * @classdesc Represents a KeyPair. - * @implements IKeyPair * @constructor - * @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.KeyPair.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function KeyPair(properties) { + var KeyPair = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * KeyPair name. @@ -57214,10 +74003,14 @@ * @function create * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set + * @param {CGCMsgMemCachedSet.KeyPair.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair instance + * @type {{ + * (properties: CGCMsgMemCachedSet.KeyPair.$Shape): CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape; + * (properties?: CGCMsgMemCachedSet.KeyPair.$Properties): CGCMsgMemCachedSet.KeyPair; + * }} */ - KeyPair.create = function create(properties) { + KeyPair.create = function(properties) { return new KeyPair(properties); }; @@ -57226,17 +74019,24 @@ * @function encode * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair} message KeyPair message or plain object to encode + * @param {CGCMsgMemCachedSet.KeyPair.$Properties} message KeyPair message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyPair.encode = function encode(message, writer) { + KeyPair.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -57245,12 +74045,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedSet.KeyPair * @static - * @param {CGCMsgMemCachedSet.IKeyPair} message KeyPair message or plain object to encode + * @param {CGCMsgMemCachedSet.KeyPair.$Properties} message KeyPair message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyPair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + KeyPair.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -57260,28 +74060,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair + * @returns {CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape} KeyPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyPair.decode = function decode(reader, length) { + KeyPair.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedSet.KeyPair(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedSet.KeyPair(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -57291,11 +74111,11 @@ * @memberof CGCMsgMemCachedSet.KeyPair * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair + * @returns {CGCMsgMemCachedSet.KeyPair & CGCMsgMemCachedSet.KeyPair.$Shape} KeyPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyPair.decodeDelimited = function decodeDelimited(reader) { + KeyPair.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -57309,13 +74129,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KeyPair.verify = function verify(message) { + KeyPair.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -57329,16 +74153,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedSet.KeyPair} KeyPair */ - KeyPair.fromObject = function fromObject(object) { + KeyPair.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedSet.KeyPair) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedSet.KeyPair: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedSet.KeyPair(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -57352,24 +74182,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KeyPair.toObject = function toObject(message, options) { + KeyPair.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; - if (options.bytes === String) + if (options.bytes === $String) object.value = ""; else { object.value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value = $util.newBuffer(object.value); } } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -57380,8 +74214,22 @@ * @instance * @returns {Object.} JSON object */ - KeyPair.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + KeyPair.prototype.toJSON = function() { + return KeyPair.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for KeyPair + * @function getTypeUrl + * @memberof CGCMsgMemCachedSet.KeyPair + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + KeyPair.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedSet.KeyPair"; }; return KeyPair; @@ -57392,28 +74240,41 @@ $root.CGCMsgMemCachedDelete = (function() { + /** + * Properties of a CGCMsgMemCachedDelete. + * @typedef {Object} CGCMsgMemCachedDelete.$Properties + * @property {Array.|null} [keys] CGCMsgMemCachedDelete keys + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedDelete. * @exports ICGCMsgMemCachedDelete * @interface ICGCMsgMemCachedDelete - * @property {Array.|null} [keys] CGCMsgMemCachedDelete keys + * @augments CGCMsgMemCachedDelete.$Properties + * @deprecated Use CGCMsgMemCachedDelete.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedDelete. + * @typedef {CGCMsgMemCachedDelete.$Properties} CGCMsgMemCachedDelete.$Shape */ /** * Constructs a new CGCMsgMemCachedDelete. * @exports CGCMsgMemCachedDelete * @classdesc Represents a CGCMsgMemCachedDelete. - * @implements ICGCMsgMemCachedDelete * @constructor - * @param {ICGCMsgMemCachedDelete=} [properties] Properties to set + * @param {CGCMsgMemCachedDelete.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedDelete(properties) { + var CGCMsgMemCachedDelete = function (properties) { this.keys = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedDelete keys. @@ -57428,10 +74289,14 @@ * @function create * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete=} [properties] Properties to set + * @param {CGCMsgMemCachedDelete.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete instance + * @type {{ + * (properties: CGCMsgMemCachedDelete.$Shape): CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape; + * (properties?: CGCMsgMemCachedDelete.$Properties): CGCMsgMemCachedDelete; + * }} */ - CGCMsgMemCachedDelete.create = function create(properties) { + CGCMsgMemCachedDelete.create = function(properties) { return new CGCMsgMemCachedDelete(properties); }; @@ -57440,16 +74305,23 @@ * @function encode * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete} message CGCMsgMemCachedDelete message or plain object to encode + * @param {CGCMsgMemCachedDelete.$Properties} message CGCMsgMemCachedDelete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedDelete.encode = function encode(message, writer) { + CGCMsgMemCachedDelete.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.keys[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -57458,12 +74330,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedDelete * @static - * @param {ICGCMsgMemCachedDelete} message CGCMsgMemCachedDelete message or plain object to encode + * @param {CGCMsgMemCachedDelete.$Properties} message CGCMsgMemCachedDelete message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedDelete.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedDelete.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -57473,27 +74345,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete + * @returns {CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape} CGCMsgMemCachedDelete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedDelete.decode = function decode(reader, length) { + CGCMsgMemCachedDelete.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedDelete(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedDelete(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -57503,11 +74392,11 @@ * @memberof CGCMsgMemCachedDelete * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete + * @returns {CGCMsgMemCachedDelete & CGCMsgMemCachedDelete.$Shape} CGCMsgMemCachedDelete * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedDelete.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedDelete.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -57521,11 +74410,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedDelete.verify = function verify(message) { + CGCMsgMemCachedDelete.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.keys != null && $Object.hasOwnProperty.call(message, "keys")) { + if (!$Array.isArray(message.keys)) return "keys: array expected"; for (var i = 0; i < message.keys.length; ++i) if (!$util.isString(message.keys[i])) @@ -57542,16 +74435,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete */ - CGCMsgMemCachedDelete.fromObject = function fromObject(object) { + CGCMsgMemCachedDelete.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedDelete) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedDelete: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedDelete(); if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".CGCMsgMemCachedDelete.keys: array expected"); - message.keys = []; + if (!$Array.isArray(object.keys)) + throw $TypeError(".CGCMsgMemCachedDelete.keys: array expected"); + message.keys = $Array(object.keys.length); for (var i = 0; i < object.keys.length; ++i) - message.keys[i] = String(object.keys[i]); + message.keys[i] = $String(object.keys[i]); } return message; }; @@ -57565,14 +74464,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedDelete.toObject = function toObject(message, options) { + CGCMsgMemCachedDelete.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.keys = []; if (message.keys && message.keys.length) { - object.keys = []; + object.keys = $Array(message.keys.length); for (var j = 0; j < message.keys.length; ++j) object.keys[j] = message.keys[j]; } @@ -57586,8 +74489,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedDelete.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedDelete.prototype.toJSON = function() { + return CGCMsgMemCachedDelete.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedDelete + * @function getTypeUrl + * @memberof CGCMsgMemCachedDelete + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedDelete.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedDelete"; }; return CGCMsgMemCachedDelete; @@ -57595,36 +74512,53 @@ $root.CGCMsgMemCachedStats = (function() { + /** + * Properties of a CGCMsgMemCachedStats. + * @typedef {Object} CGCMsgMemCachedStats.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgMemCachedStats. * @exports ICGCMsgMemCachedStats * @interface ICGCMsgMemCachedStats + * @augments CGCMsgMemCachedStats.$Properties + * @deprecated Use CGCMsgMemCachedStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedStats. + * @typedef {CGCMsgMemCachedStats.$Properties} CGCMsgMemCachedStats.$Shape */ /** * Constructs a new CGCMsgMemCachedStats. * @exports CGCMsgMemCachedStats * @classdesc Represents a CGCMsgMemCachedStats. - * @implements ICGCMsgMemCachedStats * @constructor - * @param {ICGCMsgMemCachedStats=} [properties] Properties to set + * @param {CGCMsgMemCachedStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedStats(properties) { + var CGCMsgMemCachedStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CGCMsgMemCachedStats instance using the specified properties. * @function create * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats=} [properties] Properties to set + * @param {CGCMsgMemCachedStats.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats instance + * @type {{ + * (properties: CGCMsgMemCachedStats.$Shape): CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape; + * (properties?: CGCMsgMemCachedStats.$Properties): CGCMsgMemCachedStats; + * }} */ - CGCMsgMemCachedStats.create = function create(properties) { + CGCMsgMemCachedStats.create = function(properties) { return new CGCMsgMemCachedStats(properties); }; @@ -57633,13 +74567,20 @@ * @function encode * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats} message CGCMsgMemCachedStats message or plain object to encode + * @param {CGCMsgMemCachedStats.$Properties} message CGCMsgMemCachedStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStats.encode = function encode(message, writer) { + CGCMsgMemCachedStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -57648,12 +74589,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedStats * @static - * @param {ICGCMsgMemCachedStats} message CGCMsgMemCachedStats message or plain object to encode + * @param {CGCMsgMemCachedStats.$Properties} message CGCMsgMemCachedStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -57663,22 +74604,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats + * @returns {CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape} CGCMsgMemCachedStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStats.decode = function decode(reader, length) { + CGCMsgMemCachedStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -57688,11 +74640,11 @@ * @memberof CGCMsgMemCachedStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats + * @returns {CGCMsgMemCachedStats & CGCMsgMemCachedStats.$Shape} CGCMsgMemCachedStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -57706,9 +74658,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedStats.verify = function verify(message) { + CGCMsgMemCachedStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -57720,9 +74676,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats */ - CGCMsgMemCachedStats.fromObject = function fromObject(object) { + CGCMsgMemCachedStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CGCMsgMemCachedStats(); }; @@ -57735,7 +74697,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedStats.toObject = function toObject() { + CGCMsgMemCachedStats.toObject = function () { return {}; }; @@ -57746,8 +74708,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedStats.prototype.toJSON = function() { + return CGCMsgMemCachedStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedStats + * @function getTypeUrl + * @memberof CGCMsgMemCachedStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedStats"; }; return CGCMsgMemCachedStats; @@ -57757,8 +74733,7 @@ /** * Properties of a CGCMsgMemCachedStatsResponse. - * @exports ICGCMsgMemCachedStatsResponse - * @interface ICGCMsgMemCachedStatsResponse + * @typedef {Object} CGCMsgMemCachedStatsResponse.$Properties * @property {number|Long|null} [curr_connections] CGCMsgMemCachedStatsResponse curr_connections * @property {number|Long|null} [cmd_get] CGCMsgMemCachedStatsResponse cmd_get * @property {number|Long|null} [cmd_set] CGCMsgMemCachedStatsResponse cmd_set @@ -57773,22 +74748,36 @@ * @property {number|Long|null} [curr_items] CGCMsgMemCachedStatsResponse curr_items * @property {number|Long|null} [evictions] CGCMsgMemCachedStatsResponse evictions * @property {number|Long|null} [bytes] CGCMsgMemCachedStatsResponse bytes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgMemCachedStatsResponse. + * @exports ICGCMsgMemCachedStatsResponse + * @interface ICGCMsgMemCachedStatsResponse + * @augments CGCMsgMemCachedStatsResponse.$Properties + * @deprecated Use CGCMsgMemCachedStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgMemCachedStatsResponse. + * @typedef {CGCMsgMemCachedStatsResponse.$Properties} CGCMsgMemCachedStatsResponse.$Shape */ /** * Constructs a new CGCMsgMemCachedStatsResponse. * @exports CGCMsgMemCachedStatsResponse * @classdesc Represents a CGCMsgMemCachedStatsResponse. - * @implements ICGCMsgMemCachedStatsResponse * @constructor - * @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgMemCachedStatsResponse(properties) { + var CGCMsgMemCachedStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgMemCachedStatsResponse curr_connections. @@ -57907,10 +74896,14 @@ * @function create * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set + * @param {CGCMsgMemCachedStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse instance + * @type {{ + * (properties: CGCMsgMemCachedStatsResponse.$Shape): CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape; + * (properties?: CGCMsgMemCachedStatsResponse.$Properties): CGCMsgMemCachedStatsResponse; + * }} */ - CGCMsgMemCachedStatsResponse.create = function create(properties) { + CGCMsgMemCachedStatsResponse.create = function(properties) { return new CGCMsgMemCachedStatsResponse(properties); }; @@ -57919,41 +74912,48 @@ * @function encode * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse} message CGCMsgMemCachedStatsResponse message or plain object to encode + * @param {CGCMsgMemCachedStatsResponse.$Properties} message CGCMsgMemCachedStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStatsResponse.encode = function encode(message, writer) { + CGCMsgMemCachedStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.curr_connections != null && Object.hasOwnProperty.call(message, "curr_connections")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.curr_connections); - if (message.cmd_get != null && Object.hasOwnProperty.call(message, "cmd_get")) + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.cmd_get); - if (message.cmd_set != null && Object.hasOwnProperty.call(message, "cmd_set")) + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.cmd_set); - if (message.cmd_flush != null && Object.hasOwnProperty.call(message, "cmd_flush")) + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.cmd_flush); - if (message.get_hits != null && Object.hasOwnProperty.call(message, "get_hits")) + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.get_hits); - if (message.get_misses != null && Object.hasOwnProperty.call(message, "get_misses")) + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.get_misses); - if (message.delete_hits != null && Object.hasOwnProperty.call(message, "delete_hits")) + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.delete_hits); - if (message.delete_misses != null && Object.hasOwnProperty.call(message, "delete_misses")) + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.delete_misses); - if (message.bytes_read != null && Object.hasOwnProperty.call(message, "bytes_read")) + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.bytes_read); - if (message.bytes_written != null && Object.hasOwnProperty.call(message, "bytes_written")) + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.bytes_written); - if (message.limit_maxbytes != null && Object.hasOwnProperty.call(message, "limit_maxbytes")) + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.limit_maxbytes); - if (message.curr_items != null && Object.hasOwnProperty.call(message, "curr_items")) + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.curr_items); - if (message.evictions != null && Object.hasOwnProperty.call(message, "evictions")) + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.evictions); - if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) writer.uint32(/* id 14, wireType 0 =*/112).uint64(message.bytes); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -57962,12 +74962,12 @@ * @function encodeDelimited * @memberof CGCMsgMemCachedStatsResponse * @static - * @param {ICGCMsgMemCachedStatsResponse} message CGCMsgMemCachedStatsResponse message or plain object to encode + * @param {CGCMsgMemCachedStatsResponse.$Properties} message CGCMsgMemCachedStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgMemCachedStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgMemCachedStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -57977,64 +74977,120 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse + * @returns {CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape} CGCMsgMemCachedStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStatsResponse.decode = function decode(reader, length) { + CGCMsgMemCachedStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgMemCachedStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.curr_connections = reader.uint64(); - break; - case 2: - message.cmd_get = reader.uint64(); - break; - case 3: - message.cmd_set = reader.uint64(); - break; - case 4: - message.cmd_flush = reader.uint64(); - break; - case 5: - message.get_hits = reader.uint64(); - break; - case 6: - message.get_misses = reader.uint64(); - break; - case 7: - message.delete_hits = reader.uint64(); - break; - case 8: - message.delete_misses = reader.uint64(); - break; - case 9: - message.bytes_read = reader.uint64(); - break; - case 10: - message.bytes_written = reader.uint64(); - break; - case 11: - message.limit_maxbytes = reader.uint64(); - break; - case 12: - message.curr_items = reader.uint64(); - break; - case 13: - message.evictions = reader.uint64(); - break; - case 14: - message.bytes = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.curr_connections = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.cmd_get = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.cmd_set = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.cmd_flush = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.get_hits = reader.uint64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.get_misses = reader.uint64(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.delete_hits = reader.uint64(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.delete_misses = reader.uint64(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.bytes_read = reader.uint64(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.bytes_written = reader.uint64(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.limit_maxbytes = reader.uint64(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.curr_items = reader.uint64(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.evictions = reader.uint64(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.bytes = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -58044,11 +75100,11 @@ * @memberof CGCMsgMemCachedStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse + * @returns {CGCMsgMemCachedStatsResponse & CGCMsgMemCachedStatsResponse.$Shape} CGCMsgMemCachedStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgMemCachedStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgMemCachedStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -58062,49 +75118,53 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgMemCachedStatsResponse.verify = function verify(message) { + CGCMsgMemCachedStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.curr_connections != null && message.hasOwnProperty("curr_connections")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) if (!$util.isInteger(message.curr_connections) && !(message.curr_connections && $util.isInteger(message.curr_connections.low) && $util.isInteger(message.curr_connections.high))) return "curr_connections: integer|Long expected"; - if (message.cmd_get != null && message.hasOwnProperty("cmd_get")) + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) if (!$util.isInteger(message.cmd_get) && !(message.cmd_get && $util.isInteger(message.cmd_get.low) && $util.isInteger(message.cmd_get.high))) return "cmd_get: integer|Long expected"; - if (message.cmd_set != null && message.hasOwnProperty("cmd_set")) + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) if (!$util.isInteger(message.cmd_set) && !(message.cmd_set && $util.isInteger(message.cmd_set.low) && $util.isInteger(message.cmd_set.high))) return "cmd_set: integer|Long expected"; - if (message.cmd_flush != null && message.hasOwnProperty("cmd_flush")) + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) if (!$util.isInteger(message.cmd_flush) && !(message.cmd_flush && $util.isInteger(message.cmd_flush.low) && $util.isInteger(message.cmd_flush.high))) return "cmd_flush: integer|Long expected"; - if (message.get_hits != null && message.hasOwnProperty("get_hits")) + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) if (!$util.isInteger(message.get_hits) && !(message.get_hits && $util.isInteger(message.get_hits.low) && $util.isInteger(message.get_hits.high))) return "get_hits: integer|Long expected"; - if (message.get_misses != null && message.hasOwnProperty("get_misses")) + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) if (!$util.isInteger(message.get_misses) && !(message.get_misses && $util.isInteger(message.get_misses.low) && $util.isInteger(message.get_misses.high))) return "get_misses: integer|Long expected"; - if (message.delete_hits != null && message.hasOwnProperty("delete_hits")) + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) if (!$util.isInteger(message.delete_hits) && !(message.delete_hits && $util.isInteger(message.delete_hits.low) && $util.isInteger(message.delete_hits.high))) return "delete_hits: integer|Long expected"; - if (message.delete_misses != null && message.hasOwnProperty("delete_misses")) + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) if (!$util.isInteger(message.delete_misses) && !(message.delete_misses && $util.isInteger(message.delete_misses.low) && $util.isInteger(message.delete_misses.high))) return "delete_misses: integer|Long expected"; - if (message.bytes_read != null && message.hasOwnProperty("bytes_read")) + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) if (!$util.isInteger(message.bytes_read) && !(message.bytes_read && $util.isInteger(message.bytes_read.low) && $util.isInteger(message.bytes_read.high))) return "bytes_read: integer|Long expected"; - if (message.bytes_written != null && message.hasOwnProperty("bytes_written")) + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) if (!$util.isInteger(message.bytes_written) && !(message.bytes_written && $util.isInteger(message.bytes_written.low) && $util.isInteger(message.bytes_written.high))) return "bytes_written: integer|Long expected"; - if (message.limit_maxbytes != null && message.hasOwnProperty("limit_maxbytes")) + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) if (!$util.isInteger(message.limit_maxbytes) && !(message.limit_maxbytes && $util.isInteger(message.limit_maxbytes.low) && $util.isInteger(message.limit_maxbytes.high))) return "limit_maxbytes: integer|Long expected"; - if (message.curr_items != null && message.hasOwnProperty("curr_items")) + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) if (!$util.isInteger(message.curr_items) && !(message.curr_items && $util.isInteger(message.curr_items.low) && $util.isInteger(message.curr_items.high))) return "curr_items: integer|Long expected"; - if (message.evictions != null && message.hasOwnProperty("evictions")) + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) if (!$util.isInteger(message.evictions) && !(message.evictions && $util.isInteger(message.evictions.low) && $util.isInteger(message.evictions.high))) return "evictions: integer|Long expected"; - if (message.bytes != null && message.hasOwnProperty("bytes")) + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) if (!$util.isInteger(message.bytes) && !(message.bytes && $util.isInteger(message.bytes.low) && $util.isInteger(message.bytes.high))) return "bytes: integer|Long expected"; return null; @@ -58118,132 +75178,138 @@ * @param {Object.} object Plain object * @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse */ - CGCMsgMemCachedStatsResponse.fromObject = function fromObject(object) { + CGCMsgMemCachedStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgMemCachedStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgMemCachedStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgMemCachedStatsResponse(); if (object.curr_connections != null) if ($util.Long) - (message.curr_connections = $util.Long.fromValue(object.curr_connections)).unsigned = true; + message.curr_connections = $util.Long.fromValue(object.curr_connections, true); else if (typeof object.curr_connections === "string") - message.curr_connections = parseInt(object.curr_connections, 10); + message.curr_connections = $parseInt(object.curr_connections, 10); else if (typeof object.curr_connections === "number") message.curr_connections = object.curr_connections; else if (typeof object.curr_connections === "object") message.curr_connections = new $util.LongBits(object.curr_connections.low >>> 0, object.curr_connections.high >>> 0).toNumber(true); if (object.cmd_get != null) if ($util.Long) - (message.cmd_get = $util.Long.fromValue(object.cmd_get)).unsigned = true; + message.cmd_get = $util.Long.fromValue(object.cmd_get, true); else if (typeof object.cmd_get === "string") - message.cmd_get = parseInt(object.cmd_get, 10); + message.cmd_get = $parseInt(object.cmd_get, 10); else if (typeof object.cmd_get === "number") message.cmd_get = object.cmd_get; else if (typeof object.cmd_get === "object") message.cmd_get = new $util.LongBits(object.cmd_get.low >>> 0, object.cmd_get.high >>> 0).toNumber(true); if (object.cmd_set != null) if ($util.Long) - (message.cmd_set = $util.Long.fromValue(object.cmd_set)).unsigned = true; + message.cmd_set = $util.Long.fromValue(object.cmd_set, true); else if (typeof object.cmd_set === "string") - message.cmd_set = parseInt(object.cmd_set, 10); + message.cmd_set = $parseInt(object.cmd_set, 10); else if (typeof object.cmd_set === "number") message.cmd_set = object.cmd_set; else if (typeof object.cmd_set === "object") message.cmd_set = new $util.LongBits(object.cmd_set.low >>> 0, object.cmd_set.high >>> 0).toNumber(true); if (object.cmd_flush != null) if ($util.Long) - (message.cmd_flush = $util.Long.fromValue(object.cmd_flush)).unsigned = true; + message.cmd_flush = $util.Long.fromValue(object.cmd_flush, true); else if (typeof object.cmd_flush === "string") - message.cmd_flush = parseInt(object.cmd_flush, 10); + message.cmd_flush = $parseInt(object.cmd_flush, 10); else if (typeof object.cmd_flush === "number") message.cmd_flush = object.cmd_flush; else if (typeof object.cmd_flush === "object") message.cmd_flush = new $util.LongBits(object.cmd_flush.low >>> 0, object.cmd_flush.high >>> 0).toNumber(true); if (object.get_hits != null) if ($util.Long) - (message.get_hits = $util.Long.fromValue(object.get_hits)).unsigned = true; + message.get_hits = $util.Long.fromValue(object.get_hits, true); else if (typeof object.get_hits === "string") - message.get_hits = parseInt(object.get_hits, 10); + message.get_hits = $parseInt(object.get_hits, 10); else if (typeof object.get_hits === "number") message.get_hits = object.get_hits; else if (typeof object.get_hits === "object") message.get_hits = new $util.LongBits(object.get_hits.low >>> 0, object.get_hits.high >>> 0).toNumber(true); if (object.get_misses != null) if ($util.Long) - (message.get_misses = $util.Long.fromValue(object.get_misses)).unsigned = true; + message.get_misses = $util.Long.fromValue(object.get_misses, true); else if (typeof object.get_misses === "string") - message.get_misses = parseInt(object.get_misses, 10); + message.get_misses = $parseInt(object.get_misses, 10); else if (typeof object.get_misses === "number") message.get_misses = object.get_misses; else if (typeof object.get_misses === "object") message.get_misses = new $util.LongBits(object.get_misses.low >>> 0, object.get_misses.high >>> 0).toNumber(true); if (object.delete_hits != null) if ($util.Long) - (message.delete_hits = $util.Long.fromValue(object.delete_hits)).unsigned = true; + message.delete_hits = $util.Long.fromValue(object.delete_hits, true); else if (typeof object.delete_hits === "string") - message.delete_hits = parseInt(object.delete_hits, 10); + message.delete_hits = $parseInt(object.delete_hits, 10); else if (typeof object.delete_hits === "number") message.delete_hits = object.delete_hits; else if (typeof object.delete_hits === "object") message.delete_hits = new $util.LongBits(object.delete_hits.low >>> 0, object.delete_hits.high >>> 0).toNumber(true); if (object.delete_misses != null) if ($util.Long) - (message.delete_misses = $util.Long.fromValue(object.delete_misses)).unsigned = true; + message.delete_misses = $util.Long.fromValue(object.delete_misses, true); else if (typeof object.delete_misses === "string") - message.delete_misses = parseInt(object.delete_misses, 10); + message.delete_misses = $parseInt(object.delete_misses, 10); else if (typeof object.delete_misses === "number") message.delete_misses = object.delete_misses; else if (typeof object.delete_misses === "object") message.delete_misses = new $util.LongBits(object.delete_misses.low >>> 0, object.delete_misses.high >>> 0).toNumber(true); if (object.bytes_read != null) if ($util.Long) - (message.bytes_read = $util.Long.fromValue(object.bytes_read)).unsigned = true; + message.bytes_read = $util.Long.fromValue(object.bytes_read, true); else if (typeof object.bytes_read === "string") - message.bytes_read = parseInt(object.bytes_read, 10); + message.bytes_read = $parseInt(object.bytes_read, 10); else if (typeof object.bytes_read === "number") message.bytes_read = object.bytes_read; else if (typeof object.bytes_read === "object") message.bytes_read = new $util.LongBits(object.bytes_read.low >>> 0, object.bytes_read.high >>> 0).toNumber(true); if (object.bytes_written != null) if ($util.Long) - (message.bytes_written = $util.Long.fromValue(object.bytes_written)).unsigned = true; + message.bytes_written = $util.Long.fromValue(object.bytes_written, true); else if (typeof object.bytes_written === "string") - message.bytes_written = parseInt(object.bytes_written, 10); + message.bytes_written = $parseInt(object.bytes_written, 10); else if (typeof object.bytes_written === "number") message.bytes_written = object.bytes_written; else if (typeof object.bytes_written === "object") message.bytes_written = new $util.LongBits(object.bytes_written.low >>> 0, object.bytes_written.high >>> 0).toNumber(true); if (object.limit_maxbytes != null) if ($util.Long) - (message.limit_maxbytes = $util.Long.fromValue(object.limit_maxbytes)).unsigned = true; + message.limit_maxbytes = $util.Long.fromValue(object.limit_maxbytes, true); else if (typeof object.limit_maxbytes === "string") - message.limit_maxbytes = parseInt(object.limit_maxbytes, 10); + message.limit_maxbytes = $parseInt(object.limit_maxbytes, 10); else if (typeof object.limit_maxbytes === "number") message.limit_maxbytes = object.limit_maxbytes; else if (typeof object.limit_maxbytes === "object") message.limit_maxbytes = new $util.LongBits(object.limit_maxbytes.low >>> 0, object.limit_maxbytes.high >>> 0).toNumber(true); if (object.curr_items != null) if ($util.Long) - (message.curr_items = $util.Long.fromValue(object.curr_items)).unsigned = true; + message.curr_items = $util.Long.fromValue(object.curr_items, true); else if (typeof object.curr_items === "string") - message.curr_items = parseInt(object.curr_items, 10); + message.curr_items = $parseInt(object.curr_items, 10); else if (typeof object.curr_items === "number") message.curr_items = object.curr_items; else if (typeof object.curr_items === "object") message.curr_items = new $util.LongBits(object.curr_items.low >>> 0, object.curr_items.high >>> 0).toNumber(true); if (object.evictions != null) if ($util.Long) - (message.evictions = $util.Long.fromValue(object.evictions)).unsigned = true; + message.evictions = $util.Long.fromValue(object.evictions, true); else if (typeof object.evictions === "string") - message.evictions = parseInt(object.evictions, 10); + message.evictions = $parseInt(object.evictions, 10); else if (typeof object.evictions === "number") message.evictions = object.evictions; else if (typeof object.evictions === "object") message.evictions = new $util.LongBits(object.evictions.low >>> 0, object.evictions.high >>> 0).toNumber(true); if (object.bytes != null) if ($util.Long) - (message.bytes = $util.Long.fromValue(object.bytes)).unsigned = true; + message.bytes = $util.Long.fromValue(object.bytes, true); else if (typeof object.bytes === "string") - message.bytes = parseInt(object.bytes, 10); + message.bytes = $parseInt(object.bytes, 10); else if (typeof object.bytes === "number") message.bytes = object.bytes; else if (typeof object.bytes === "object") @@ -58260,152 +75326,184 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgMemCachedStatsResponse.toObject = function toObject(message, options) { + CGCMsgMemCachedStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.curr_connections = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.curr_connections = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.curr_connections = options.longs === String ? "0" : 0; + object.curr_connections = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_get = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_get = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_get = options.longs === String ? "0" : 0; + object.cmd_get = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_set = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_set = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_set = options.longs === String ? "0" : 0; + object.cmd_set = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.cmd_flush = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.cmd_flush = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.cmd_flush = options.longs === String ? "0" : 0; + object.cmd_flush = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.get_hits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.get_hits = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.get_hits = options.longs === String ? "0" : 0; + object.get_hits = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.get_misses = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.get_misses = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.get_misses = options.longs === String ? "0" : 0; + object.get_misses = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.delete_hits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.delete_hits = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.delete_hits = options.longs === String ? "0" : 0; + object.delete_hits = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.delete_misses = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.delete_misses = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.delete_misses = options.longs === String ? "0" : 0; + object.delete_misses = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes_read = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes_read = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes_read = options.longs === String ? "0" : 0; + object.bytes_read = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes_written = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes_written = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes_written = options.longs === String ? "0" : 0; + object.bytes_written = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.limit_maxbytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.limit_maxbytes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.limit_maxbytes = options.longs === String ? "0" : 0; + object.limit_maxbytes = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.curr_items = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.curr_items = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.curr_items = options.longs === String ? "0" : 0; + object.curr_items = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.evictions = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.evictions = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.evictions = options.longs === String ? "0" : 0; + object.evictions = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.bytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.bytes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.bytes = options.longs === String ? "0" : 0; + object.bytes = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.curr_connections != null && message.hasOwnProperty("curr_connections")) - if (typeof message.curr_connections === "number") - object.curr_connections = options.longs === String ? String(message.curr_connections) : message.curr_connections; + if (message.curr_connections != null && $Object.hasOwnProperty.call(message, "curr_connections")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.curr_connections = typeof message.curr_connections === "number" ? $BigInt(message.curr_connections) : $util.Long.fromBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0, true).toBigInt(); + else if (typeof message.curr_connections === "number") + object.curr_connections = options.longs === $String ? $String(message.curr_connections) : message.curr_connections; else - object.curr_connections = options.longs === String ? $util.Long.prototype.toString.call(message.curr_connections) : options.longs === Number ? new $util.LongBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0).toNumber(true) : message.curr_connections; - if (message.cmd_get != null && message.hasOwnProperty("cmd_get")) - if (typeof message.cmd_get === "number") - object.cmd_get = options.longs === String ? String(message.cmd_get) : message.cmd_get; + object.curr_connections = options.longs === $String ? $util.Long.prototype.toString.call(message.curr_connections) : options.longs === $Number ? new $util.LongBits(message.curr_connections.low >>> 0, message.curr_connections.high >>> 0).toNumber(true) : message.curr_connections; + if (message.cmd_get != null && $Object.hasOwnProperty.call(message, "cmd_get")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_get = typeof message.cmd_get === "number" ? $BigInt(message.cmd_get) : $util.Long.fromBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_get === "number") + object.cmd_get = options.longs === $String ? $String(message.cmd_get) : message.cmd_get; else - object.cmd_get = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_get) : options.longs === Number ? new $util.LongBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0).toNumber(true) : message.cmd_get; - if (message.cmd_set != null && message.hasOwnProperty("cmd_set")) - if (typeof message.cmd_set === "number") - object.cmd_set = options.longs === String ? String(message.cmd_set) : message.cmd_set; + object.cmd_get = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_get) : options.longs === $Number ? new $util.LongBits(message.cmd_get.low >>> 0, message.cmd_get.high >>> 0).toNumber(true) : message.cmd_get; + if (message.cmd_set != null && $Object.hasOwnProperty.call(message, "cmd_set")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_set = typeof message.cmd_set === "number" ? $BigInt(message.cmd_set) : $util.Long.fromBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_set === "number") + object.cmd_set = options.longs === $String ? $String(message.cmd_set) : message.cmd_set; else - object.cmd_set = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_set) : options.longs === Number ? new $util.LongBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0).toNumber(true) : message.cmd_set; - if (message.cmd_flush != null && message.hasOwnProperty("cmd_flush")) - if (typeof message.cmd_flush === "number") - object.cmd_flush = options.longs === String ? String(message.cmd_flush) : message.cmd_flush; + object.cmd_set = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_set) : options.longs === $Number ? new $util.LongBits(message.cmd_set.low >>> 0, message.cmd_set.high >>> 0).toNumber(true) : message.cmd_set; + if (message.cmd_flush != null && $Object.hasOwnProperty.call(message, "cmd_flush")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cmd_flush = typeof message.cmd_flush === "number" ? $BigInt(message.cmd_flush) : $util.Long.fromBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0, true).toBigInt(); + else if (typeof message.cmd_flush === "number") + object.cmd_flush = options.longs === $String ? $String(message.cmd_flush) : message.cmd_flush; else - object.cmd_flush = options.longs === String ? $util.Long.prototype.toString.call(message.cmd_flush) : options.longs === Number ? new $util.LongBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0).toNumber(true) : message.cmd_flush; - if (message.get_hits != null && message.hasOwnProperty("get_hits")) - if (typeof message.get_hits === "number") - object.get_hits = options.longs === String ? String(message.get_hits) : message.get_hits; + object.cmd_flush = options.longs === $String ? $util.Long.prototype.toString.call(message.cmd_flush) : options.longs === $Number ? new $util.LongBits(message.cmd_flush.low >>> 0, message.cmd_flush.high >>> 0).toNumber(true) : message.cmd_flush; + if (message.get_hits != null && $Object.hasOwnProperty.call(message, "get_hits")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.get_hits = typeof message.get_hits === "number" ? $BigInt(message.get_hits) : $util.Long.fromBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0, true).toBigInt(); + else if (typeof message.get_hits === "number") + object.get_hits = options.longs === $String ? $String(message.get_hits) : message.get_hits; else - object.get_hits = options.longs === String ? $util.Long.prototype.toString.call(message.get_hits) : options.longs === Number ? new $util.LongBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0).toNumber(true) : message.get_hits; - if (message.get_misses != null && message.hasOwnProperty("get_misses")) - if (typeof message.get_misses === "number") - object.get_misses = options.longs === String ? String(message.get_misses) : message.get_misses; + object.get_hits = options.longs === $String ? $util.Long.prototype.toString.call(message.get_hits) : options.longs === $Number ? new $util.LongBits(message.get_hits.low >>> 0, message.get_hits.high >>> 0).toNumber(true) : message.get_hits; + if (message.get_misses != null && $Object.hasOwnProperty.call(message, "get_misses")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.get_misses = typeof message.get_misses === "number" ? $BigInt(message.get_misses) : $util.Long.fromBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0, true).toBigInt(); + else if (typeof message.get_misses === "number") + object.get_misses = options.longs === $String ? $String(message.get_misses) : message.get_misses; else - object.get_misses = options.longs === String ? $util.Long.prototype.toString.call(message.get_misses) : options.longs === Number ? new $util.LongBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0).toNumber(true) : message.get_misses; - if (message.delete_hits != null && message.hasOwnProperty("delete_hits")) - if (typeof message.delete_hits === "number") - object.delete_hits = options.longs === String ? String(message.delete_hits) : message.delete_hits; + object.get_misses = options.longs === $String ? $util.Long.prototype.toString.call(message.get_misses) : options.longs === $Number ? new $util.LongBits(message.get_misses.low >>> 0, message.get_misses.high >>> 0).toNumber(true) : message.get_misses; + if (message.delete_hits != null && $Object.hasOwnProperty.call(message, "delete_hits")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.delete_hits = typeof message.delete_hits === "number" ? $BigInt(message.delete_hits) : $util.Long.fromBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0, true).toBigInt(); + else if (typeof message.delete_hits === "number") + object.delete_hits = options.longs === $String ? $String(message.delete_hits) : message.delete_hits; else - object.delete_hits = options.longs === String ? $util.Long.prototype.toString.call(message.delete_hits) : options.longs === Number ? new $util.LongBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0).toNumber(true) : message.delete_hits; - if (message.delete_misses != null && message.hasOwnProperty("delete_misses")) - if (typeof message.delete_misses === "number") - object.delete_misses = options.longs === String ? String(message.delete_misses) : message.delete_misses; + object.delete_hits = options.longs === $String ? $util.Long.prototype.toString.call(message.delete_hits) : options.longs === $Number ? new $util.LongBits(message.delete_hits.low >>> 0, message.delete_hits.high >>> 0).toNumber(true) : message.delete_hits; + if (message.delete_misses != null && $Object.hasOwnProperty.call(message, "delete_misses")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.delete_misses = typeof message.delete_misses === "number" ? $BigInt(message.delete_misses) : $util.Long.fromBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0, true).toBigInt(); + else if (typeof message.delete_misses === "number") + object.delete_misses = options.longs === $String ? $String(message.delete_misses) : message.delete_misses; else - object.delete_misses = options.longs === String ? $util.Long.prototype.toString.call(message.delete_misses) : options.longs === Number ? new $util.LongBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0).toNumber(true) : message.delete_misses; - if (message.bytes_read != null && message.hasOwnProperty("bytes_read")) - if (typeof message.bytes_read === "number") - object.bytes_read = options.longs === String ? String(message.bytes_read) : message.bytes_read; + object.delete_misses = options.longs === $String ? $util.Long.prototype.toString.call(message.delete_misses) : options.longs === $Number ? new $util.LongBits(message.delete_misses.low >>> 0, message.delete_misses.high >>> 0).toNumber(true) : message.delete_misses; + if (message.bytes_read != null && $Object.hasOwnProperty.call(message, "bytes_read")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes_read = typeof message.bytes_read === "number" ? $BigInt(message.bytes_read) : $util.Long.fromBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0, true).toBigInt(); + else if (typeof message.bytes_read === "number") + object.bytes_read = options.longs === $String ? $String(message.bytes_read) : message.bytes_read; else - object.bytes_read = options.longs === String ? $util.Long.prototype.toString.call(message.bytes_read) : options.longs === Number ? new $util.LongBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0).toNumber(true) : message.bytes_read; - if (message.bytes_written != null && message.hasOwnProperty("bytes_written")) - if (typeof message.bytes_written === "number") - object.bytes_written = options.longs === String ? String(message.bytes_written) : message.bytes_written; + object.bytes_read = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes_read) : options.longs === $Number ? new $util.LongBits(message.bytes_read.low >>> 0, message.bytes_read.high >>> 0).toNumber(true) : message.bytes_read; + if (message.bytes_written != null && $Object.hasOwnProperty.call(message, "bytes_written")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes_written = typeof message.bytes_written === "number" ? $BigInt(message.bytes_written) : $util.Long.fromBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0, true).toBigInt(); + else if (typeof message.bytes_written === "number") + object.bytes_written = options.longs === $String ? $String(message.bytes_written) : message.bytes_written; else - object.bytes_written = options.longs === String ? $util.Long.prototype.toString.call(message.bytes_written) : options.longs === Number ? new $util.LongBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0).toNumber(true) : message.bytes_written; - if (message.limit_maxbytes != null && message.hasOwnProperty("limit_maxbytes")) - if (typeof message.limit_maxbytes === "number") - object.limit_maxbytes = options.longs === String ? String(message.limit_maxbytes) : message.limit_maxbytes; + object.bytes_written = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes_written) : options.longs === $Number ? new $util.LongBits(message.bytes_written.low >>> 0, message.bytes_written.high >>> 0).toNumber(true) : message.bytes_written; + if (message.limit_maxbytes != null && $Object.hasOwnProperty.call(message, "limit_maxbytes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.limit_maxbytes = typeof message.limit_maxbytes === "number" ? $BigInt(message.limit_maxbytes) : $util.Long.fromBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0, true).toBigInt(); + else if (typeof message.limit_maxbytes === "number") + object.limit_maxbytes = options.longs === $String ? $String(message.limit_maxbytes) : message.limit_maxbytes; else - object.limit_maxbytes = options.longs === String ? $util.Long.prototype.toString.call(message.limit_maxbytes) : options.longs === Number ? new $util.LongBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0).toNumber(true) : message.limit_maxbytes; - if (message.curr_items != null && message.hasOwnProperty("curr_items")) - if (typeof message.curr_items === "number") - object.curr_items = options.longs === String ? String(message.curr_items) : message.curr_items; + object.limit_maxbytes = options.longs === $String ? $util.Long.prototype.toString.call(message.limit_maxbytes) : options.longs === $Number ? new $util.LongBits(message.limit_maxbytes.low >>> 0, message.limit_maxbytes.high >>> 0).toNumber(true) : message.limit_maxbytes; + if (message.curr_items != null && $Object.hasOwnProperty.call(message, "curr_items")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.curr_items = typeof message.curr_items === "number" ? $BigInt(message.curr_items) : $util.Long.fromBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0, true).toBigInt(); + else if (typeof message.curr_items === "number") + object.curr_items = options.longs === $String ? $String(message.curr_items) : message.curr_items; else - object.curr_items = options.longs === String ? $util.Long.prototype.toString.call(message.curr_items) : options.longs === Number ? new $util.LongBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0).toNumber(true) : message.curr_items; - if (message.evictions != null && message.hasOwnProperty("evictions")) - if (typeof message.evictions === "number") - object.evictions = options.longs === String ? String(message.evictions) : message.evictions; + object.curr_items = options.longs === $String ? $util.Long.prototype.toString.call(message.curr_items) : options.longs === $Number ? new $util.LongBits(message.curr_items.low >>> 0, message.curr_items.high >>> 0).toNumber(true) : message.curr_items; + if (message.evictions != null && $Object.hasOwnProperty.call(message, "evictions")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.evictions = typeof message.evictions === "number" ? $BigInt(message.evictions) : $util.Long.fromBits(message.evictions.low >>> 0, message.evictions.high >>> 0, true).toBigInt(); + else if (typeof message.evictions === "number") + object.evictions = options.longs === $String ? $String(message.evictions) : message.evictions; else - object.evictions = options.longs === String ? $util.Long.prototype.toString.call(message.evictions) : options.longs === Number ? new $util.LongBits(message.evictions.low >>> 0, message.evictions.high >>> 0).toNumber(true) : message.evictions; - if (message.bytes != null && message.hasOwnProperty("bytes")) - if (typeof message.bytes === "number") - object.bytes = options.longs === String ? String(message.bytes) : message.bytes; + object.evictions = options.longs === $String ? $util.Long.prototype.toString.call(message.evictions) : options.longs === $Number ? new $util.LongBits(message.evictions.low >>> 0, message.evictions.high >>> 0).toNumber(true) : message.evictions; + if (message.bytes != null && $Object.hasOwnProperty.call(message, "bytes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytes = typeof message.bytes === "number" ? $BigInt(message.bytes) : $util.Long.fromBits(message.bytes.low >>> 0, message.bytes.high >>> 0, true).toBigInt(); + else if (typeof message.bytes === "number") + object.bytes = options.longs === $String ? $String(message.bytes) : message.bytes; else - object.bytes = options.longs === String ? $util.Long.prototype.toString.call(message.bytes) : options.longs === Number ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber(true) : message.bytes; + object.bytes = options.longs === $String ? $util.Long.prototype.toString.call(message.bytes) : options.longs === $Number ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber(true) : message.bytes; return object; }; @@ -58416,8 +75514,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgMemCachedStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgMemCachedStatsResponse.prototype.toJSON = function() { + return CGCMsgMemCachedStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgMemCachedStatsResponse + * @function getTypeUrl + * @memberof CGCMsgMemCachedStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgMemCachedStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgMemCachedStatsResponse"; }; return CGCMsgMemCachedStatsResponse; @@ -58425,27 +75537,40 @@ $root.CGCMsgSQLStats = (function() { + /** + * Properties of a CGCMsgSQLStats. + * @typedef {Object} CGCMsgSQLStats.$Properties + * @property {number|null} [schema_catalog] CGCMsgSQLStats schema_catalog + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgSQLStats. * @exports ICGCMsgSQLStats * @interface ICGCMsgSQLStats - * @property {number|null} [schema_catalog] CGCMsgSQLStats schema_catalog + * @augments CGCMsgSQLStats.$Properties + * @deprecated Use CGCMsgSQLStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgSQLStats. + * @typedef {CGCMsgSQLStats.$Properties} CGCMsgSQLStats.$Shape */ /** * Constructs a new CGCMsgSQLStats. * @exports CGCMsgSQLStats * @classdesc Represents a CGCMsgSQLStats. - * @implements ICGCMsgSQLStats * @constructor - * @param {ICGCMsgSQLStats=} [properties] Properties to set + * @param {CGCMsgSQLStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSQLStats(properties) { + var CGCMsgSQLStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSQLStats schema_catalog. @@ -58460,10 +75585,14 @@ * @function create * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats=} [properties] Properties to set + * @param {CGCMsgSQLStats.$Properties=} [properties] Properties to set * @returns {CGCMsgSQLStats} CGCMsgSQLStats instance + * @type {{ + * (properties: CGCMsgSQLStats.$Shape): CGCMsgSQLStats & CGCMsgSQLStats.$Shape; + * (properties?: CGCMsgSQLStats.$Properties): CGCMsgSQLStats; + * }} */ - CGCMsgSQLStats.create = function create(properties) { + CGCMsgSQLStats.create = function(properties) { return new CGCMsgSQLStats(properties); }; @@ -58472,15 +75601,22 @@ * @function encode * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats} message CGCMsgSQLStats message or plain object to encode + * @param {CGCMsgSQLStats.$Properties} message CGCMsgSQLStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStats.encode = function encode(message, writer) { + CGCMsgSQLStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.schema_catalog != null && Object.hasOwnProperty.call(message, "schema_catalog")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.schema_catalog); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -58489,12 +75625,12 @@ * @function encodeDelimited * @memberof CGCMsgSQLStats * @static - * @param {ICGCMsgSQLStats} message CGCMsgSQLStats message or plain object to encode + * @param {CGCMsgSQLStats.$Properties} message CGCMsgSQLStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSQLStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -58504,25 +75640,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSQLStats} CGCMsgSQLStats + * @returns {CGCMsgSQLStats & CGCMsgSQLStats.$Shape} CGCMsgSQLStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStats.decode = function decode(reader, length) { + CGCMsgSQLStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSQLStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSQLStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.schema_catalog = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.schema_catalog = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -58532,11 +75685,11 @@ * @memberof CGCMsgSQLStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSQLStats} CGCMsgSQLStats + * @returns {CGCMsgSQLStats & CGCMsgSQLStats.$Shape} CGCMsgSQLStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSQLStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -58550,10 +75703,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSQLStats.verify = function verify(message) { + CGCMsgSQLStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) if (!$util.isInteger(message.schema_catalog)) return "schema_catalog: integer expected"; return null; @@ -58567,9 +75724,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgSQLStats} CGCMsgSQLStats */ - CGCMsgSQLStats.fromObject = function fromObject(object) { + CGCMsgSQLStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSQLStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSQLStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSQLStats(); if (object.schema_catalog != null) message.schema_catalog = object.schema_catalog >>> 0; @@ -58585,13 +75748,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSQLStats.toObject = function toObject(message, options) { + CGCMsgSQLStats.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.schema_catalog = 0; - if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog")) + if (message.schema_catalog != null && $Object.hasOwnProperty.call(message, "schema_catalog")) object.schema_catalog = message.schema_catalog; return object; }; @@ -58603,8 +75770,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSQLStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSQLStats.prototype.toJSON = function() { + return CGCMsgSQLStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSQLStats + * @function getTypeUrl + * @memberof CGCMsgSQLStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSQLStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSQLStats"; }; return CGCMsgSQLStats; @@ -58614,8 +75795,7 @@ /** * Properties of a CGCMsgSQLStatsResponse. - * @exports ICGCMsgSQLStatsResponse - * @interface ICGCMsgSQLStatsResponse + * @typedef {Object} CGCMsgSQLStatsResponse.$Properties * @property {number|null} [threads] CGCMsgSQLStatsResponse threads * @property {number|null} [threads_connected] CGCMsgSQLStatsResponse threads_connected * @property {number|null} [threads_active] CGCMsgSQLStatsResponse threads_active @@ -58625,22 +75805,36 @@ * @property {number|null} [deadlock_retries] CGCMsgSQLStatsResponse deadlock_retries * @property {number|null} [operations_timed_out_in_queue] CGCMsgSQLStatsResponse operations_timed_out_in_queue * @property {number|null} [errors] CGCMsgSQLStatsResponse errors + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgSQLStatsResponse. + * @exports ICGCMsgSQLStatsResponse + * @interface ICGCMsgSQLStatsResponse + * @augments CGCMsgSQLStatsResponse.$Properties + * @deprecated Use CGCMsgSQLStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgSQLStatsResponse. + * @typedef {CGCMsgSQLStatsResponse.$Properties} CGCMsgSQLStatsResponse.$Shape */ /** * Constructs a new CGCMsgSQLStatsResponse. * @exports CGCMsgSQLStatsResponse * @classdesc Represents a CGCMsgSQLStatsResponse. - * @implements ICGCMsgSQLStatsResponse * @constructor - * @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set + * @param {CGCMsgSQLStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSQLStatsResponse(properties) { + var CGCMsgSQLStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSQLStatsResponse threads. @@ -58719,10 +75913,14 @@ * @function create * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set + * @param {CGCMsgSQLStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse instance + * @type {{ + * (properties: CGCMsgSQLStatsResponse.$Shape): CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape; + * (properties?: CGCMsgSQLStatsResponse.$Properties): CGCMsgSQLStatsResponse; + * }} */ - CGCMsgSQLStatsResponse.create = function create(properties) { + CGCMsgSQLStatsResponse.create = function(properties) { return new CGCMsgSQLStatsResponse(properties); }; @@ -58731,31 +75929,38 @@ * @function encode * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse} message CGCMsgSQLStatsResponse message or plain object to encode + * @param {CGCMsgSQLStatsResponse.$Properties} message CGCMsgSQLStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStatsResponse.encode = function encode(message, writer) { + CGCMsgSQLStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.threads != null && Object.hasOwnProperty.call(message, "threads")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.threads); - if (message.threads_connected != null && Object.hasOwnProperty.call(message, "threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.threads_connected); - if (message.threads_active != null && Object.hasOwnProperty.call(message, "threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.threads_active); - if (message.operations_submitted != null && Object.hasOwnProperty.call(message, "operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.operations_submitted); - if (message.prepared_statements_executed != null && Object.hasOwnProperty.call(message, "prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.prepared_statements_executed); - if (message.non_prepared_statements_executed != null && Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.non_prepared_statements_executed); - if (message.deadlock_retries != null && Object.hasOwnProperty.call(message, "deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.deadlock_retries); - if (message.operations_timed_out_in_queue != null && Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.operations_timed_out_in_queue); - if (message.errors != null && Object.hasOwnProperty.call(message, "errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.errors); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -58764,12 +75969,12 @@ * @function encodeDelimited * @memberof CGCMsgSQLStatsResponse * @static - * @param {ICGCMsgSQLStatsResponse} message CGCMsgSQLStatsResponse message or plain object to encode + * @param {CGCMsgSQLStatsResponse.$Properties} message CGCMsgSQLStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSQLStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSQLStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -58779,49 +75984,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse + * @returns {CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape} CGCMsgSQLStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStatsResponse.decode = function decode(reader, length) { + CGCMsgSQLStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSQLStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSQLStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.threads = reader.uint32(); - break; - case 2: - message.threads_connected = reader.uint32(); - break; - case 3: - message.threads_active = reader.uint32(); - break; - case 4: - message.operations_submitted = reader.uint32(); - break; - case 5: - message.prepared_statements_executed = reader.uint32(); - break; - case 6: - message.non_prepared_statements_executed = reader.uint32(); - break; - case 7: - message.deadlock_retries = reader.uint32(); - break; - case 8: - message.operations_timed_out_in_queue = reader.uint32(); - break; - case 9: - message.errors = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.threads = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.threads_connected = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.threads_active = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.operations_submitted = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.prepared_statements_executed = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.non_prepared_statements_executed = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.deadlock_retries = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.operations_timed_out_in_queue = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.errors = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -58831,11 +76077,11 @@ * @memberof CGCMsgSQLStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse + * @returns {CGCMsgSQLStatsResponse & CGCMsgSQLStatsResponse.$Shape} CGCMsgSQLStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSQLStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSQLStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -58849,34 +76095,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSQLStatsResponse.verify = function verify(message) { + CGCMsgSQLStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.threads != null && message.hasOwnProperty("threads")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) if (!$util.isInteger(message.threads)) return "threads: integer expected"; - if (message.threads_connected != null && message.hasOwnProperty("threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) if (!$util.isInteger(message.threads_connected)) return "threads_connected: integer expected"; - if (message.threads_active != null && message.hasOwnProperty("threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) if (!$util.isInteger(message.threads_active)) return "threads_active: integer expected"; - if (message.operations_submitted != null && message.hasOwnProperty("operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) if (!$util.isInteger(message.operations_submitted)) return "operations_submitted: integer expected"; - if (message.prepared_statements_executed != null && message.hasOwnProperty("prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) if (!$util.isInteger(message.prepared_statements_executed)) return "prepared_statements_executed: integer expected"; - if (message.non_prepared_statements_executed != null && message.hasOwnProperty("non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) if (!$util.isInteger(message.non_prepared_statements_executed)) return "non_prepared_statements_executed: integer expected"; - if (message.deadlock_retries != null && message.hasOwnProperty("deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) if (!$util.isInteger(message.deadlock_retries)) return "deadlock_retries: integer expected"; - if (message.operations_timed_out_in_queue != null && message.hasOwnProperty("operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) if (!$util.isInteger(message.operations_timed_out_in_queue)) return "operations_timed_out_in_queue: integer expected"; - if (message.errors != null && message.hasOwnProperty("errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) if (!$util.isInteger(message.errors)) return "errors: integer expected"; return null; @@ -58890,9 +76140,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse */ - CGCMsgSQLStatsResponse.fromObject = function fromObject(object) { + CGCMsgSQLStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSQLStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSQLStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSQLStatsResponse(); if (object.threads != null) message.threads = object.threads >>> 0; @@ -58924,9 +76180,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSQLStatsResponse.toObject = function toObject(message, options) { + CGCMsgSQLStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.threads = 0; @@ -58939,23 +76199,23 @@ object.operations_timed_out_in_queue = 0; object.errors = 0; } - if (message.threads != null && message.hasOwnProperty("threads")) + if (message.threads != null && $Object.hasOwnProperty.call(message, "threads")) object.threads = message.threads; - if (message.threads_connected != null && message.hasOwnProperty("threads_connected")) + if (message.threads_connected != null && $Object.hasOwnProperty.call(message, "threads_connected")) object.threads_connected = message.threads_connected; - if (message.threads_active != null && message.hasOwnProperty("threads_active")) + if (message.threads_active != null && $Object.hasOwnProperty.call(message, "threads_active")) object.threads_active = message.threads_active; - if (message.operations_submitted != null && message.hasOwnProperty("operations_submitted")) + if (message.operations_submitted != null && $Object.hasOwnProperty.call(message, "operations_submitted")) object.operations_submitted = message.operations_submitted; - if (message.prepared_statements_executed != null && message.hasOwnProperty("prepared_statements_executed")) + if (message.prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "prepared_statements_executed")) object.prepared_statements_executed = message.prepared_statements_executed; - if (message.non_prepared_statements_executed != null && message.hasOwnProperty("non_prepared_statements_executed")) + if (message.non_prepared_statements_executed != null && $Object.hasOwnProperty.call(message, "non_prepared_statements_executed")) object.non_prepared_statements_executed = message.non_prepared_statements_executed; - if (message.deadlock_retries != null && message.hasOwnProperty("deadlock_retries")) + if (message.deadlock_retries != null && $Object.hasOwnProperty.call(message, "deadlock_retries")) object.deadlock_retries = message.deadlock_retries; - if (message.operations_timed_out_in_queue != null && message.hasOwnProperty("operations_timed_out_in_queue")) + if (message.operations_timed_out_in_queue != null && $Object.hasOwnProperty.call(message, "operations_timed_out_in_queue")) object.operations_timed_out_in_queue = message.operations_timed_out_in_queue; - if (message.errors != null && message.hasOwnProperty("errors")) + if (message.errors != null && $Object.hasOwnProperty.call(message, "errors")) object.errors = message.errors; return object; }; @@ -58967,8 +76227,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSQLStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSQLStatsResponse.prototype.toJSON = function() { + return CGCMsgSQLStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSQLStatsResponse + * @function getTypeUrl + * @memberof CGCMsgSQLStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSQLStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSQLStatsResponse"; }; return CGCMsgSQLStatsResponse; @@ -58978,28 +76252,41 @@ /** * Properties of a CMsgAMAddFreeLicense. - * @exports ICMsgAMAddFreeLicense - * @interface ICMsgAMAddFreeLicense + * @typedef {Object} CMsgAMAddFreeLicense.$Properties * @property {number|Long|null} [steamid] CMsgAMAddFreeLicense steamid * @property {number|null} [ip_public] CMsgAMAddFreeLicense ip_public * @property {number|null} [packageid] CMsgAMAddFreeLicense packageid * @property {string|null} [store_country_code] CMsgAMAddFreeLicense store_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMAddFreeLicense. + * @exports ICMsgAMAddFreeLicense + * @interface ICMsgAMAddFreeLicense + * @augments CMsgAMAddFreeLicense.$Properties + * @deprecated Use CMsgAMAddFreeLicense.$Properties instead. + */ + + /** + * Shape of a CMsgAMAddFreeLicense. + * @typedef {CMsgAMAddFreeLicense.$Properties} CMsgAMAddFreeLicense.$Shape */ /** * Constructs a new CMsgAMAddFreeLicense. * @exports CMsgAMAddFreeLicense * @classdesc Represents a CMsgAMAddFreeLicense. - * @implements ICMsgAMAddFreeLicense * @constructor - * @param {ICMsgAMAddFreeLicense=} [properties] Properties to set + * @param {CMsgAMAddFreeLicense.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMAddFreeLicense(properties) { + var CMsgAMAddFreeLicense = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMAddFreeLicense steamid. @@ -59007,7 +76294,7 @@ * @memberof CMsgAMAddFreeLicense * @instance */ - CMsgAMAddFreeLicense.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMAddFreeLicense.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMAddFreeLicense ip_public. @@ -59038,10 +76325,14 @@ * @function create * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense=} [properties] Properties to set + * @param {CMsgAMAddFreeLicense.$Properties=} [properties] Properties to set * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense instance + * @type {{ + * (properties: CMsgAMAddFreeLicense.$Shape): CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape; + * (properties?: CMsgAMAddFreeLicense.$Properties): CMsgAMAddFreeLicense; + * }} */ - CMsgAMAddFreeLicense.create = function create(properties) { + CMsgAMAddFreeLicense.create = function(properties) { return new CMsgAMAddFreeLicense(properties); }; @@ -59050,21 +76341,28 @@ * @function encode * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense} message CMsgAMAddFreeLicense message or plain object to encode + * @param {CMsgAMAddFreeLicense.$Properties} message CMsgAMAddFreeLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicense.encode = function encode(message, writer) { + CMsgAMAddFreeLicense.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.ip_public != null && Object.hasOwnProperty.call(message, "ip_public")) + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ip_public); - if (message.packageid != null && Object.hasOwnProperty.call(message, "packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.packageid); - if (message.store_country_code != null && Object.hasOwnProperty.call(message, "store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.store_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -59073,12 +76371,12 @@ * @function encodeDelimited * @memberof CMsgAMAddFreeLicense * @static - * @param {ICMsgAMAddFreeLicense} message CMsgAMAddFreeLicense message or plain object to encode + * @param {CMsgAMAddFreeLicense.$Properties} message CMsgAMAddFreeLicense message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicense.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMAddFreeLicense.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -59088,34 +76386,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense + * @returns {CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape} CMsgAMAddFreeLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicense.decode = function decode(reader, length) { + CMsgAMAddFreeLicense.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMAddFreeLicense(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMAddFreeLicense(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.ip_public = reader.uint32(); - break; - case 3: - message.packageid = reader.uint32(); - break; - case 4: - message.store_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.ip_public = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.packageid = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.store_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -59125,11 +76449,11 @@ * @memberof CMsgAMAddFreeLicense * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense + * @returns {CMsgAMAddFreeLicense & CMsgAMAddFreeLicense.$Shape} CMsgAMAddFreeLicense * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicense.decodeDelimited = function decodeDelimited(reader) { + CMsgAMAddFreeLicense.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -59143,19 +76467,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMAddFreeLicense.verify = function verify(message) { + CMsgAMAddFreeLicense.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.ip_public != null && message.hasOwnProperty("ip_public")) + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) if (!$util.isInteger(message.ip_public)) return "ip_public: integer expected"; - if (message.packageid != null && message.hasOwnProperty("packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) if (!$util.isInteger(message.packageid)) return "packageid: integer expected"; - if (message.store_country_code != null && message.hasOwnProperty("store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) if (!$util.isString(message.store_country_code)) return "store_country_code: string expected"; return null; @@ -59169,25 +76497,31 @@ * @param {Object.} object Plain object * @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense */ - CMsgAMAddFreeLicense.fromObject = function fromObject(object) { + CMsgAMAddFreeLicense.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMAddFreeLicense) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMAddFreeLicense: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMAddFreeLicense(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.ip_public != null) message.ip_public = object.ip_public >>> 0; if (object.packageid != null) message.packageid = object.packageid >>> 0; if (object.store_country_code != null) - message.store_country_code = String(object.store_country_code); + message.store_country_code = $String(object.store_country_code); return message; }; @@ -59200,30 +76534,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMAddFreeLicense.toObject = function toObject(message, options) { + CMsgAMAddFreeLicense.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.ip_public = 0; object.packageid = 0; object.store_country_code = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.ip_public != null && message.hasOwnProperty("ip_public")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.ip_public != null && $Object.hasOwnProperty.call(message, "ip_public")) object.ip_public = message.ip_public; - if (message.packageid != null && message.hasOwnProperty("packageid")) + if (message.packageid != null && $Object.hasOwnProperty.call(message, "packageid")) object.packageid = message.packageid; - if (message.store_country_code != null && message.hasOwnProperty("store_country_code")) + if (message.store_country_code != null && $Object.hasOwnProperty.call(message, "store_country_code")) object.store_country_code = message.store_country_code; return object; }; @@ -59235,8 +76575,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMAddFreeLicense.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMAddFreeLicense.prototype.toJSON = function() { + return CMsgAMAddFreeLicense.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMAddFreeLicense + * @function getTypeUrl + * @memberof CMsgAMAddFreeLicense + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMAddFreeLicense.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMAddFreeLicense"; }; return CMsgAMAddFreeLicense; @@ -59246,27 +76600,40 @@ /** * Properties of a CMsgAMAddFreeLicenseResponse. - * @exports ICMsgAMAddFreeLicenseResponse - * @interface ICMsgAMAddFreeLicenseResponse + * @typedef {Object} CMsgAMAddFreeLicenseResponse.$Properties * @property {number|null} [eresult] CMsgAMAddFreeLicenseResponse eresult * @property {number|null} [purchase_result_detail] CMsgAMAddFreeLicenseResponse purchase_result_detail * @property {number|Long|null} [transid] CMsgAMAddFreeLicenseResponse transid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMAddFreeLicenseResponse. + * @exports ICMsgAMAddFreeLicenseResponse + * @interface ICMsgAMAddFreeLicenseResponse + * @augments CMsgAMAddFreeLicenseResponse.$Properties + * @deprecated Use CMsgAMAddFreeLicenseResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMAddFreeLicenseResponse. + * @typedef {CMsgAMAddFreeLicenseResponse.$Properties} CMsgAMAddFreeLicenseResponse.$Shape */ /** * Constructs a new CMsgAMAddFreeLicenseResponse. * @exports CMsgAMAddFreeLicenseResponse * @classdesc Represents a CMsgAMAddFreeLicenseResponse. - * @implements ICMsgAMAddFreeLicenseResponse * @constructor - * @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set + * @param {CMsgAMAddFreeLicenseResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMAddFreeLicenseResponse(properties) { + var CMsgAMAddFreeLicenseResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMAddFreeLicenseResponse eresult. @@ -59290,17 +76657,21 @@ * @memberof CMsgAMAddFreeLicenseResponse * @instance */ - CMsgAMAddFreeLicenseResponse.prototype.transid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMAddFreeLicenseResponse.prototype.transid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgAMAddFreeLicenseResponse instance using the specified properties. * @function create * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set + * @param {CMsgAMAddFreeLicenseResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse instance + * @type {{ + * (properties: CMsgAMAddFreeLicenseResponse.$Shape): CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape; + * (properties?: CMsgAMAddFreeLicenseResponse.$Properties): CMsgAMAddFreeLicenseResponse; + * }} */ - CMsgAMAddFreeLicenseResponse.create = function create(properties) { + CMsgAMAddFreeLicenseResponse.create = function(properties) { return new CMsgAMAddFreeLicenseResponse(properties); }; @@ -59309,19 +76680,26 @@ * @function encode * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse} message CMsgAMAddFreeLicenseResponse message or plain object to encode + * @param {CMsgAMAddFreeLicenseResponse.$Properties} message CMsgAMAddFreeLicenseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicenseResponse.encode = function encode(message, writer) { + CMsgAMAddFreeLicenseResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); - if (message.purchase_result_detail != null && Object.hasOwnProperty.call(message, "purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.purchase_result_detail); - if (message.transid != null && Object.hasOwnProperty.call(message, "transid")) + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.transid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -59330,12 +76708,12 @@ * @function encodeDelimited * @memberof CMsgAMAddFreeLicenseResponse * @static - * @param {ICMsgAMAddFreeLicenseResponse} message CMsgAMAddFreeLicenseResponse message or plain object to encode + * @param {CMsgAMAddFreeLicenseResponse.$Properties} message CMsgAMAddFreeLicenseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMAddFreeLicenseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMAddFreeLicenseResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -59345,31 +76723,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse + * @returns {CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape} CMsgAMAddFreeLicenseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicenseResponse.decode = function decode(reader, length) { + CMsgAMAddFreeLicenseResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMAddFreeLicenseResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMAddFreeLicenseResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - case 2: - message.purchase_result_detail = reader.int32(); - break; - case 3: - message.transid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.purchase_result_detail = reader.int32(); + continue; + } + case 3: { + if (wireType !== 1) + break; + message.transid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -59379,11 +76780,11 @@ * @memberof CMsgAMAddFreeLicenseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse + * @returns {CMsgAMAddFreeLicenseResponse & CMsgAMAddFreeLicenseResponse.$Shape} CMsgAMAddFreeLicenseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMAddFreeLicenseResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMAddFreeLicenseResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -59397,16 +76798,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMAddFreeLicenseResponse.verify = function verify(message) { + CMsgAMAddFreeLicenseResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.purchase_result_detail != null && message.hasOwnProperty("purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) if (!$util.isInteger(message.purchase_result_detail)) return "purchase_result_detail: integer expected"; - if (message.transid != null && message.hasOwnProperty("transid")) + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) if (!$util.isInteger(message.transid) && !(message.transid && $util.isInteger(message.transid.low) && $util.isInteger(message.transid.high))) return "transid: integer|Long expected"; return null; @@ -59420,9 +76825,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse */ - CMsgAMAddFreeLicenseResponse.fromObject = function fromObject(object) { + CMsgAMAddFreeLicenseResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMAddFreeLicenseResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMAddFreeLicenseResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMAddFreeLicenseResponse(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -59430,13 +76841,13 @@ message.purchase_result_detail = object.purchase_result_detail | 0; if (object.transid != null) if ($util.Long) - (message.transid = $util.Long.fromValue(object.transid)).unsigned = false; + message.transid = $util.Long.fromValue(object.transid, true); else if (typeof object.transid === "string") - message.transid = parseInt(object.transid, 10); + message.transid = $parseInt(object.transid, 10); else if (typeof object.transid === "number") message.transid = object.transid; else if (typeof object.transid === "object") - message.transid = new $util.LongBits(object.transid.low >>> 0, object.transid.high >>> 0).toNumber(); + message.transid = new $util.LongBits(object.transid.low >>> 0, object.transid.high >>> 0).toNumber(true); return message; }; @@ -59449,28 +76860,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMAddFreeLicenseResponse.toObject = function toObject(message, options) { + CMsgAMAddFreeLicenseResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.purchase_result_detail = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.transid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.transid = options.longs === String ? "0" : 0; + object.transid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.purchase_result_detail != null && message.hasOwnProperty("purchase_result_detail")) + if (message.purchase_result_detail != null && $Object.hasOwnProperty.call(message, "purchase_result_detail")) object.purchase_result_detail = message.purchase_result_detail; - if (message.transid != null && message.hasOwnProperty("transid")) - if (typeof message.transid === "number") - object.transid = options.longs === String ? String(message.transid) : message.transid; + if (message.transid != null && $Object.hasOwnProperty.call(message, "transid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.transid = typeof message.transid === "number" ? $BigInt(message.transid) : $util.Long.fromBits(message.transid.low >>> 0, message.transid.high >>> 0, true).toBigInt(); + else if (typeof message.transid === "number") + object.transid = options.longs === $String ? $String(message.transid) : message.transid; else - object.transid = options.longs === String ? $util.Long.prototype.toString.call(message.transid) : options.longs === Number ? new $util.LongBits(message.transid.low >>> 0, message.transid.high >>> 0).toNumber() : message.transid; + object.transid = options.longs === $String ? $util.Long.prototype.toString.call(message.transid) : options.longs === $Number ? new $util.LongBits(message.transid.low >>> 0, message.transid.high >>> 0).toNumber(true) : message.transid; return object; }; @@ -59481,8 +76898,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMAddFreeLicenseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMAddFreeLicenseResponse.prototype.toJSON = function() { + return CMsgAMAddFreeLicenseResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMAddFreeLicenseResponse + * @function getTypeUrl + * @memberof CMsgAMAddFreeLicenseResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMAddFreeLicenseResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMAddFreeLicenseResponse"; }; return CMsgAMAddFreeLicenseResponse; @@ -59490,28 +76921,41 @@ $root.CGCMsgGetIPLocation = (function() { + /** + * Properties of a CGCMsgGetIPLocation. + * @typedef {Object} CGCMsgGetIPLocation.$Properties + * @property {Array.|null} [ips] CGCMsgGetIPLocation ips + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetIPLocation. * @exports ICGCMsgGetIPLocation * @interface ICGCMsgGetIPLocation - * @property {Array.|null} [ips] CGCMsgGetIPLocation ips + * @augments CGCMsgGetIPLocation.$Properties + * @deprecated Use CGCMsgGetIPLocation.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetIPLocation. + * @typedef {CGCMsgGetIPLocation.$Properties} CGCMsgGetIPLocation.$Shape */ /** * Constructs a new CGCMsgGetIPLocation. * @exports CGCMsgGetIPLocation * @classdesc Represents a CGCMsgGetIPLocation. - * @implements ICGCMsgGetIPLocation * @constructor - * @param {ICGCMsgGetIPLocation=} [properties] Properties to set + * @param {CGCMsgGetIPLocation.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetIPLocation(properties) { + var CGCMsgGetIPLocation = function (properties) { this.ips = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetIPLocation ips. @@ -59526,10 +76970,14 @@ * @function create * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation=} [properties] Properties to set + * @param {CGCMsgGetIPLocation.$Properties=} [properties] Properties to set * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation instance + * @type {{ + * (properties: CGCMsgGetIPLocation.$Shape): CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape; + * (properties?: CGCMsgGetIPLocation.$Properties): CGCMsgGetIPLocation; + * }} */ - CGCMsgGetIPLocation.create = function create(properties) { + CGCMsgGetIPLocation.create = function(properties) { return new CGCMsgGetIPLocation(properties); }; @@ -59538,16 +76986,23 @@ * @function encode * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation} message CGCMsgGetIPLocation message or plain object to encode + * @param {CGCMsgGetIPLocation.$Properties} message CGCMsgGetIPLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocation.encode = function encode(message, writer) { + CGCMsgGetIPLocation.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.ips != null && message.ips.length) for (var i = 0; i < message.ips.length; ++i) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.ips[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -59556,12 +77011,12 @@ * @function encodeDelimited * @memberof CGCMsgGetIPLocation * @static - * @param {ICGCMsgGetIPLocation} message CGCMsgGetIPLocation message or plain object to encode + * @param {CGCMsgGetIPLocation.$Properties} message CGCMsgGetIPLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetIPLocation.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -59571,32 +77026,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation + * @returns {CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape} CGCMsgGetIPLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocation.decode = function decode(reader, length) { + CGCMsgGetIPLocation.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetIPLocation(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetIPLocation(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.ips && message.ips.length)) - message.ips = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ips.push(reader.fixed32()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.ips && message.ips.length)) + message.ips = []; + reader.fixed32s(message.ips); + continue; + } + if (wireType !== 5) + break; + if (!(message.ips && message.ips.length)) + message.ips = []; message.ips.push(reader.fixed32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -59606,11 +77079,11 @@ * @memberof CGCMsgGetIPLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation + * @returns {CGCMsgGetIPLocation & CGCMsgGetIPLocation.$Shape} CGCMsgGetIPLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocation.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetIPLocation.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -59624,11 +77097,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetIPLocation.verify = function verify(message) { + CGCMsgGetIPLocation.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ips != null && message.hasOwnProperty("ips")) { - if (!Array.isArray(message.ips)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ips != null && $Object.hasOwnProperty.call(message, "ips")) { + if (!$Array.isArray(message.ips)) return "ips: array expected"; for (var i = 0; i < message.ips.length; ++i) if (!$util.isInteger(message.ips[i])) @@ -59645,14 +77122,20 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation */ - CGCMsgGetIPLocation.fromObject = function fromObject(object) { + CGCMsgGetIPLocation.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetIPLocation) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetIPLocation: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetIPLocation(); if (object.ips) { - if (!Array.isArray(object.ips)) - throw TypeError(".CGCMsgGetIPLocation.ips: array expected"); - message.ips = []; + if (!$Array.isArray(object.ips)) + throw $TypeError(".CGCMsgGetIPLocation.ips: array expected"); + message.ips = $Array(object.ips.length); for (var i = 0; i < object.ips.length; ++i) message.ips[i] = object.ips[i] >>> 0; } @@ -59668,14 +77151,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetIPLocation.toObject = function toObject(message, options) { + CGCMsgGetIPLocation.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.ips = []; if (message.ips && message.ips.length) { - object.ips = []; + object.ips = $Array(message.ips.length); for (var j = 0; j < message.ips.length; ++j) object.ips[j] = message.ips[j]; } @@ -59689,8 +77176,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetIPLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetIPLocation.prototype.toJSON = function() { + return CGCMsgGetIPLocation.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetIPLocation + * @function getTypeUrl + * @memberof CGCMsgGetIPLocation + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetIPLocation.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetIPLocation"; }; return CGCMsgGetIPLocation; @@ -59700,30 +77201,43 @@ /** * Properties of a CIPLocationInfo. - * @exports ICIPLocationInfo - * @interface ICIPLocationInfo + * @typedef {Object} CIPLocationInfo.$Properties * @property {number|null} [ip] CIPLocationInfo ip * @property {number|null} [latitude] CIPLocationInfo latitude * @property {number|null} [longitude] CIPLocationInfo longitude * @property {string|null} [country] CIPLocationInfo country * @property {string|null} [state] CIPLocationInfo state * @property {string|null} [city] CIPLocationInfo city + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CIPLocationInfo. + * @exports ICIPLocationInfo + * @interface ICIPLocationInfo + * @augments CIPLocationInfo.$Properties + * @deprecated Use CIPLocationInfo.$Properties instead. + */ + + /** + * Shape of a CIPLocationInfo. + * @typedef {CIPLocationInfo.$Properties} CIPLocationInfo.$Shape */ /** * Constructs a new CIPLocationInfo. * @exports CIPLocationInfo * @classdesc Represents a CIPLocationInfo. - * @implements ICIPLocationInfo * @constructor - * @param {ICIPLocationInfo=} [properties] Properties to set + * @param {CIPLocationInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CIPLocationInfo(properties) { + var CIPLocationInfo = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CIPLocationInfo ip. @@ -59778,10 +77292,14 @@ * @function create * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo=} [properties] Properties to set + * @param {CIPLocationInfo.$Properties=} [properties] Properties to set * @returns {CIPLocationInfo} CIPLocationInfo instance + * @type {{ + * (properties: CIPLocationInfo.$Shape): CIPLocationInfo & CIPLocationInfo.$Shape; + * (properties?: CIPLocationInfo.$Properties): CIPLocationInfo; + * }} */ - CIPLocationInfo.create = function create(properties) { + CIPLocationInfo.create = function(properties) { return new CIPLocationInfo(properties); }; @@ -59790,25 +77308,32 @@ * @function encode * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo} message CIPLocationInfo message or plain object to encode + * @param {CIPLocationInfo.$Properties} message CIPLocationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CIPLocationInfo.encode = function encode(message, writer) { + CIPLocationInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.ip); - if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.latitude); - if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.longitude); - if (message.country != null && Object.hasOwnProperty.call(message, "country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.country); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.state); - if (message.city != null && Object.hasOwnProperty.call(message, "city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.city); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -59817,12 +77342,12 @@ * @function encodeDelimited * @memberof CIPLocationInfo * @static - * @param {ICIPLocationInfo} message CIPLocationInfo message or plain object to encode + * @param {CIPLocationInfo.$Properties} message CIPLocationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CIPLocationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CIPLocationInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -59832,40 +77357,72 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CIPLocationInfo} CIPLocationInfo + * @returns {CIPLocationInfo & CIPLocationInfo.$Shape} CIPLocationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CIPLocationInfo.decode = function decode(reader, length) { + CIPLocationInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CIPLocationInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CIPLocationInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ip = reader.uint32(); - break; - case 2: - message.latitude = reader.float(); - break; - case 3: - message.longitude = reader.float(); - break; - case 4: - message.country = reader.string(); - break; - case 5: - message.state = reader.string(); - break; - case 6: - message.city = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ip = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.latitude = reader.float(); + continue; + } + case 3: { + if (wireType !== 5) + break; + message.longitude = reader.float(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.country = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.state = reader.string(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.city = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -59875,11 +77432,11 @@ * @memberof CIPLocationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CIPLocationInfo} CIPLocationInfo + * @returns {CIPLocationInfo & CIPLocationInfo.$Shape} CIPLocationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CIPLocationInfo.decodeDelimited = function decodeDelimited(reader) { + CIPLocationInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -59893,25 +77450,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CIPLocationInfo.verify = function verify(message) { + CIPLocationInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ip != null && message.hasOwnProperty("ip")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) if (!$util.isInteger(message.ip)) return "ip: integer expected"; - if (message.latitude != null && message.hasOwnProperty("latitude")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) if (typeof message.latitude !== "number") return "latitude: number expected"; - if (message.longitude != null && message.hasOwnProperty("longitude")) + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) if (typeof message.longitude !== "number") return "longitude: number expected"; - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) if (!$util.isString(message.country)) return "country: string expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) if (!$util.isString(message.state)) return "state: string expected"; - if (message.city != null && message.hasOwnProperty("city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) if (!$util.isString(message.city)) return "city: string expected"; return null; @@ -59925,22 +77486,28 @@ * @param {Object.} object Plain object * @returns {CIPLocationInfo} CIPLocationInfo */ - CIPLocationInfo.fromObject = function fromObject(object) { + CIPLocationInfo.fromObject = function (object, _depth) { if (object instanceof $root.CIPLocationInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CIPLocationInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CIPLocationInfo(); if (object.ip != null) message.ip = object.ip >>> 0; if (object.latitude != null) - message.latitude = Number(object.latitude); + message.latitude = $Number(object.latitude); if (object.longitude != null) - message.longitude = Number(object.longitude); + message.longitude = $Number(object.longitude); if (object.country != null) - message.country = String(object.country); + message.country = $String(object.country); if (object.state != null) - message.state = String(object.state); + message.state = $String(object.state); if (object.city != null) - message.city = String(object.city); + message.city = $String(object.city); return message; }; @@ -59953,9 +77520,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CIPLocationInfo.toObject = function toObject(message, options) { + CIPLocationInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.ip = 0; @@ -59965,17 +77536,17 @@ object.state = ""; object.city = ""; } - if (message.ip != null && message.hasOwnProperty("ip")) + if (message.ip != null && $Object.hasOwnProperty.call(message, "ip")) object.ip = message.ip; - if (message.latitude != null && message.hasOwnProperty("latitude")) - object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; - if (message.longitude != null && message.hasOwnProperty("longitude")) - object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; - if (message.country != null && message.hasOwnProperty("country")) + if (message.latitude != null && $Object.hasOwnProperty.call(message, "latitude")) + object.latitude = options.json && !$isFinite(message.latitude) ? $String(message.latitude) : message.latitude; + if (message.longitude != null && $Object.hasOwnProperty.call(message, "longitude")) + object.longitude = options.json && !$isFinite(message.longitude) ? $String(message.longitude) : message.longitude; + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) object.country = message.country; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) object.state = message.state; - if (message.city != null && message.hasOwnProperty("city")) + if (message.city != null && $Object.hasOwnProperty.call(message, "city")) object.city = message.city; return object; }; @@ -59987,8 +77558,22 @@ * @instance * @returns {Object.} JSON object */ - CIPLocationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CIPLocationInfo.prototype.toJSON = function() { + return CIPLocationInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CIPLocationInfo + * @function getTypeUrl + * @memberof CIPLocationInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CIPLocationInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CIPLocationInfo"; }; return CIPLocationInfo; @@ -59996,32 +77581,45 @@ $root.CGCMsgGetIPLocationResponse = (function() { + /** + * Properties of a CGCMsgGetIPLocationResponse. + * @typedef {Object} CGCMsgGetIPLocationResponse.$Properties + * @property {Array.|null} [infos] CGCMsgGetIPLocationResponse infos + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetIPLocationResponse. * @exports ICGCMsgGetIPLocationResponse * @interface ICGCMsgGetIPLocationResponse - * @property {Array.|null} [infos] CGCMsgGetIPLocationResponse infos + * @augments CGCMsgGetIPLocationResponse.$Properties + * @deprecated Use CGCMsgGetIPLocationResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetIPLocationResponse. + * @typedef {CGCMsgGetIPLocationResponse.$Properties} CGCMsgGetIPLocationResponse.$Shape */ /** * Constructs a new CGCMsgGetIPLocationResponse. * @exports CGCMsgGetIPLocationResponse * @classdesc Represents a CGCMsgGetIPLocationResponse. - * @implements ICGCMsgGetIPLocationResponse * @constructor - * @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set + * @param {CGCMsgGetIPLocationResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetIPLocationResponse(properties) { + var CGCMsgGetIPLocationResponse = function (properties) { this.infos = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetIPLocationResponse infos. - * @member {Array.} infos + * @member {Array.} infos * @memberof CGCMsgGetIPLocationResponse * @instance */ @@ -60032,10 +77630,14 @@ * @function create * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set + * @param {CGCMsgGetIPLocationResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse instance + * @type {{ + * (properties: CGCMsgGetIPLocationResponse.$Shape): CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape; + * (properties?: CGCMsgGetIPLocationResponse.$Properties): CGCMsgGetIPLocationResponse; + * }} */ - CGCMsgGetIPLocationResponse.create = function create(properties) { + CGCMsgGetIPLocationResponse.create = function(properties) { return new CGCMsgGetIPLocationResponse(properties); }; @@ -60044,16 +77646,23 @@ * @function encode * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse} message CGCMsgGetIPLocationResponse message or plain object to encode + * @param {CGCMsgGetIPLocationResponse.$Properties} message CGCMsgGetIPLocationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocationResponse.encode = function encode(message, writer) { + CGCMsgGetIPLocationResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.infos != null && message.infos.length) for (var i = 0; i < message.infos.length; ++i) - $root.CIPLocationInfo.encode(message.infos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CIPLocationInfo.encode(message.infos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -60062,12 +77671,12 @@ * @function encodeDelimited * @memberof CGCMsgGetIPLocationResponse * @static - * @param {ICGCMsgGetIPLocationResponse} message CGCMsgGetIPLocationResponse message or plain object to encode + * @param {CGCMsgGetIPLocationResponse.$Properties} message CGCMsgGetIPLocationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetIPLocationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetIPLocationResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -60077,27 +77686,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse + * @returns {CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape} CGCMsgGetIPLocationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocationResponse.decode = function decode(reader, length) { + CGCMsgGetIPLocationResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetIPLocationResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetIPLocationResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.infos && message.infos.length)) - message.infos = []; - message.infos.push($root.CIPLocationInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.infos && message.infos.length)) + message.infos = []; + message.infos.push($root.CIPLocationInfo.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -60107,11 +77733,11 @@ * @memberof CGCMsgGetIPLocationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse + * @returns {CGCMsgGetIPLocationResponse & CGCMsgGetIPLocationResponse.$Shape} CGCMsgGetIPLocationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetIPLocationResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetIPLocationResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -60125,14 +77751,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetIPLocationResponse.verify = function verify(message) { + CGCMsgGetIPLocationResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.infos != null && message.hasOwnProperty("infos")) { - if (!Array.isArray(message.infos)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.infos != null && $Object.hasOwnProperty.call(message, "infos")) { + if (!$Array.isArray(message.infos)) return "infos: array expected"; for (var i = 0; i < message.infos.length; ++i) { - var error = $root.CIPLocationInfo.verify(message.infos[i]); + var error = $root.CIPLocationInfo.verify(message.infos[i], _depth + 1); if (error) return "infos." + error; } @@ -60148,18 +77778,24 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse */ - CGCMsgGetIPLocationResponse.fromObject = function fromObject(object) { + CGCMsgGetIPLocationResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetIPLocationResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetIPLocationResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetIPLocationResponse(); if (object.infos) { - if (!Array.isArray(object.infos)) - throw TypeError(".CGCMsgGetIPLocationResponse.infos: array expected"); - message.infos = []; + if (!$Array.isArray(object.infos)) + throw $TypeError(".CGCMsgGetIPLocationResponse.infos: array expected"); + message.infos = $Array(object.infos.length); for (var i = 0; i < object.infos.length; ++i) { - if (typeof object.infos[i] !== "object") - throw TypeError(".CGCMsgGetIPLocationResponse.infos: object expected"); - message.infos[i] = $root.CIPLocationInfo.fromObject(object.infos[i]); + if (!$util.isObject(object.infos[i])) + throw $TypeError(".CGCMsgGetIPLocationResponse.infos: object expected"); + message.infos[i] = $root.CIPLocationInfo.fromObject(object.infos[i], _depth + 1); } } return message; @@ -60174,16 +77810,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetIPLocationResponse.toObject = function toObject(message, options) { + CGCMsgGetIPLocationResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.infos = []; if (message.infos && message.infos.length) { - object.infos = []; + object.infos = $Array(message.infos.length); for (var j = 0; j < message.infos.length; ++j) - object.infos[j] = $root.CIPLocationInfo.toObject(message.infos[j], options); + object.infos[j] = $root.CIPLocationInfo.toObject(message.infos[j], options, _depth + 1); } return object; }; @@ -60195,8 +77835,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetIPLocationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetIPLocationResponse.prototype.toJSON = function() { + return CGCMsgGetIPLocationResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetIPLocationResponse + * @function getTypeUrl + * @memberof CGCMsgGetIPLocationResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetIPLocationResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetIPLocationResponse"; }; return CGCMsgGetIPLocationResponse; @@ -60206,26 +77860,39 @@ /** * Properties of a CGCMsgSystemStatsSchema. - * @exports ICGCMsgSystemStatsSchema - * @interface ICGCMsgSystemStatsSchema + * @typedef {Object} CGCMsgSystemStatsSchema.$Properties * @property {number|null} [gc_app_id] CGCMsgSystemStatsSchema gc_app_id * @property {Uint8Array|null} [schema_kv] CGCMsgSystemStatsSchema schema_kv + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgSystemStatsSchema. + * @exports ICGCMsgSystemStatsSchema + * @interface ICGCMsgSystemStatsSchema + * @augments CGCMsgSystemStatsSchema.$Properties + * @deprecated Use CGCMsgSystemStatsSchema.$Properties instead. + */ + + /** + * Shape of a CGCMsgSystemStatsSchema. + * @typedef {CGCMsgSystemStatsSchema.$Properties} CGCMsgSystemStatsSchema.$Shape */ /** * Constructs a new CGCMsgSystemStatsSchema. * @exports CGCMsgSystemStatsSchema * @classdesc Represents a CGCMsgSystemStatsSchema. - * @implements ICGCMsgSystemStatsSchema * @constructor - * @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set + * @param {CGCMsgSystemStatsSchema.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgSystemStatsSchema(properties) { + var CGCMsgSystemStatsSchema = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgSystemStatsSchema gc_app_id. @@ -60248,10 +77915,14 @@ * @function create * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set + * @param {CGCMsgSystemStatsSchema.$Properties=} [properties] Properties to set * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema instance + * @type {{ + * (properties: CGCMsgSystemStatsSchema.$Shape): CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape; + * (properties?: CGCMsgSystemStatsSchema.$Properties): CGCMsgSystemStatsSchema; + * }} */ - CGCMsgSystemStatsSchema.create = function create(properties) { + CGCMsgSystemStatsSchema.create = function(properties) { return new CGCMsgSystemStatsSchema(properties); }; @@ -60260,17 +77931,24 @@ * @function encode * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema} message CGCMsgSystemStatsSchema message or plain object to encode + * @param {CGCMsgSystemStatsSchema.$Properties} message CGCMsgSystemStatsSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSystemStatsSchema.encode = function encode(message, writer) { + CGCMsgSystemStatsSchema.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gc_app_id != null && Object.hasOwnProperty.call(message, "gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gc_app_id); - if (message.schema_kv != null && Object.hasOwnProperty.call(message, "schema_kv")) + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.schema_kv); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -60279,12 +77957,12 @@ * @function encodeDelimited * @memberof CGCMsgSystemStatsSchema * @static - * @param {ICGCMsgSystemStatsSchema} message CGCMsgSystemStatsSchema message or plain object to encode + * @param {CGCMsgSystemStatsSchema.$Properties} message CGCMsgSystemStatsSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgSystemStatsSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgSystemStatsSchema.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -60294,28 +77972,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema + * @returns {CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape} CGCMsgSystemStatsSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSystemStatsSchema.decode = function decode(reader, length) { + CGCMsgSystemStatsSchema.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgSystemStatsSchema(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgSystemStatsSchema(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gc_app_id = reader.uint32(); - break; - case 2: - message.schema_kv = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gc_app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.schema_kv = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -60325,11 +78023,11 @@ * @memberof CGCMsgSystemStatsSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema + * @returns {CGCMsgSystemStatsSchema & CGCMsgSystemStatsSchema.$Shape} CGCMsgSystemStatsSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgSystemStatsSchema.decodeDelimited = function decodeDelimited(reader) { + CGCMsgSystemStatsSchema.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -60343,13 +78041,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgSystemStatsSchema.verify = function verify(message) { + CGCMsgSystemStatsSchema.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) if (!$util.isInteger(message.gc_app_id)) return "gc_app_id: integer expected"; - if (message.schema_kv != null && message.hasOwnProperty("schema_kv")) + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) if (!(message.schema_kv && typeof message.schema_kv.length === "number" || $util.isString(message.schema_kv))) return "schema_kv: buffer expected"; return null; @@ -60363,16 +78065,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema */ - CGCMsgSystemStatsSchema.fromObject = function fromObject(object) { + CGCMsgSystemStatsSchema.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgSystemStatsSchema) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgSystemStatsSchema: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgSystemStatsSchema(); if (object.gc_app_id != null) message.gc_app_id = object.gc_app_id >>> 0; if (object.schema_kv != null) if (typeof object.schema_kv === "string") $util.base64.decode(object.schema_kv, message.schema_kv = $util.newBuffer($util.base64.length(object.schema_kv)), 0); - else if (object.schema_kv.length) + else if (object.schema_kv.length >= 0) message.schema_kv = object.schema_kv; return message; }; @@ -60386,24 +78094,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgSystemStatsSchema.toObject = function toObject(message, options) { + CGCMsgSystemStatsSchema.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gc_app_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.schema_kv = ""; else { object.schema_kv = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.schema_kv = $util.newBuffer(object.schema_kv); } } - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) object.gc_app_id = message.gc_app_id; - if (message.schema_kv != null && message.hasOwnProperty("schema_kv")) - object.schema_kv = options.bytes === String ? $util.base64.encode(message.schema_kv, 0, message.schema_kv.length) : options.bytes === Array ? Array.prototype.slice.call(message.schema_kv) : message.schema_kv; + if (message.schema_kv != null && $Object.hasOwnProperty.call(message, "schema_kv")) + object.schema_kv = options.bytes === $String ? $util.base64.encode(message.schema_kv, 0, message.schema_kv.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.schema_kv) : message.schema_kv; return object; }; @@ -60414,8 +78126,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgSystemStatsSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgSystemStatsSchema.prototype.toJSON = function() { + return CGCMsgSystemStatsSchema.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgSystemStatsSchema + * @function getTypeUrl + * @memberof CGCMsgSystemStatsSchema + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgSystemStatsSchema.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgSystemStatsSchema"; }; return CGCMsgSystemStatsSchema; @@ -60423,36 +78149,53 @@ $root.CGCMsgGetSystemStats = (function() { + /** + * Properties of a CGCMsgGetSystemStats. + * @typedef {Object} CGCMsgGetSystemStats.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCMsgGetSystemStats. * @exports ICGCMsgGetSystemStats * @interface ICGCMsgGetSystemStats + * @augments CGCMsgGetSystemStats.$Properties + * @deprecated Use CGCMsgGetSystemStats.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetSystemStats. + * @typedef {CGCMsgGetSystemStats.$Properties} CGCMsgGetSystemStats.$Shape */ /** * Constructs a new CGCMsgGetSystemStats. * @exports CGCMsgGetSystemStats * @classdesc Represents a CGCMsgGetSystemStats. - * @implements ICGCMsgGetSystemStats * @constructor - * @param {ICGCMsgGetSystemStats=} [properties] Properties to set + * @param {CGCMsgGetSystemStats.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetSystemStats(properties) { + var CGCMsgGetSystemStats = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CGCMsgGetSystemStats instance using the specified properties. * @function create * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats=} [properties] Properties to set + * @param {CGCMsgGetSystemStats.$Properties=} [properties] Properties to set * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats instance + * @type {{ + * (properties: CGCMsgGetSystemStats.$Shape): CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape; + * (properties?: CGCMsgGetSystemStats.$Properties): CGCMsgGetSystemStats; + * }} */ - CGCMsgGetSystemStats.create = function create(properties) { + CGCMsgGetSystemStats.create = function(properties) { return new CGCMsgGetSystemStats(properties); }; @@ -60461,13 +78204,20 @@ * @function encode * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats} message CGCMsgGetSystemStats message or plain object to encode + * @param {CGCMsgGetSystemStats.$Properties} message CGCMsgGetSystemStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStats.encode = function encode(message, writer) { + CGCMsgGetSystemStats.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -60476,12 +78226,12 @@ * @function encodeDelimited * @memberof CGCMsgGetSystemStats * @static - * @param {ICGCMsgGetSystemStats} message CGCMsgGetSystemStats message or plain object to encode + * @param {CGCMsgGetSystemStats.$Properties} message CGCMsgGetSystemStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetSystemStats.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -60491,22 +78241,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats + * @returns {CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape} CGCMsgGetSystemStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStats.decode = function decode(reader, length) { + CGCMsgGetSystemStats.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetSystemStats(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetSystemStats(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -60516,11 +78277,11 @@ * @memberof CGCMsgGetSystemStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats + * @returns {CGCMsgGetSystemStats & CGCMsgGetSystemStats.$Shape} CGCMsgGetSystemStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStats.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetSystemStats.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -60534,9 +78295,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetSystemStats.verify = function verify(message) { + CGCMsgGetSystemStats.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -60548,9 +78313,15 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats */ - CGCMsgGetSystemStats.fromObject = function fromObject(object) { + CGCMsgGetSystemStats.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetSystemStats) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetSystemStats: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CGCMsgGetSystemStats(); }; @@ -60563,7 +78334,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetSystemStats.toObject = function toObject() { + CGCMsgGetSystemStats.toObject = function () { return {}; }; @@ -60574,8 +78345,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetSystemStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetSystemStats.prototype.toJSON = function() { + return CGCMsgGetSystemStats.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetSystemStats + * @function getTypeUrl + * @memberof CGCMsgGetSystemStats + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetSystemStats.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetSystemStats"; }; return CGCMsgGetSystemStats; @@ -60585,8 +78370,7 @@ /** * Properties of a CGCMsgGetSystemStatsResponse. - * @exports ICGCMsgGetSystemStatsResponse - * @interface ICGCMsgGetSystemStatsResponse + * @typedef {Object} CGCMsgGetSystemStatsResponse.$Properties * @property {number|null} [gc_app_id] CGCMsgGetSystemStatsResponse gc_app_id * @property {Uint8Array|null} [stats_kv] CGCMsgGetSystemStatsResponse stats_kv * @property {number|null} [active_jobs] CGCMsgGetSystemStatsResponse active_jobs @@ -60600,22 +78384,36 @@ * @property {number|null} [steamid_locks] CGCMsgGetSystemStatsResponse steamid_locks * @property {number|null} [logon_queue] CGCMsgGetSystemStatsResponse logon_queue * @property {number|null} [logon_jobs] CGCMsgGetSystemStatsResponse logon_jobs + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCMsgGetSystemStatsResponse. + * @exports ICGCMsgGetSystemStatsResponse + * @interface ICGCMsgGetSystemStatsResponse + * @augments CGCMsgGetSystemStatsResponse.$Properties + * @deprecated Use CGCMsgGetSystemStatsResponse.$Properties instead. + */ + + /** + * Shape of a CGCMsgGetSystemStatsResponse. + * @typedef {CGCMsgGetSystemStatsResponse.$Properties} CGCMsgGetSystemStatsResponse.$Shape */ /** * Constructs a new CGCMsgGetSystemStatsResponse. * @exports CGCMsgGetSystemStatsResponse * @classdesc Represents a CGCMsgGetSystemStatsResponse. - * @implements ICGCMsgGetSystemStatsResponse * @constructor - * @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set + * @param {CGCMsgGetSystemStatsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCMsgGetSystemStatsResponse(properties) { + var CGCMsgGetSystemStatsResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCMsgGetSystemStatsResponse gc_app_id. @@ -60726,10 +78524,14 @@ * @function create * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set + * @param {CGCMsgGetSystemStatsResponse.$Properties=} [properties] Properties to set * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse instance + * @type {{ + * (properties: CGCMsgGetSystemStatsResponse.$Shape): CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape; + * (properties?: CGCMsgGetSystemStatsResponse.$Properties): CGCMsgGetSystemStatsResponse; + * }} */ - CGCMsgGetSystemStatsResponse.create = function create(properties) { + CGCMsgGetSystemStatsResponse.create = function(properties) { return new CGCMsgGetSystemStatsResponse(properties); }; @@ -60738,39 +78540,46 @@ * @function encode * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse} message CGCMsgGetSystemStatsResponse message or plain object to encode + * @param {CGCMsgGetSystemStatsResponse.$Properties} message CGCMsgGetSystemStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStatsResponse.encode = function encode(message, writer) { + CGCMsgGetSystemStatsResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gc_app_id != null && Object.hasOwnProperty.call(message, "gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gc_app_id); - if (message.stats_kv != null && Object.hasOwnProperty.call(message, "stats_kv")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.stats_kv); - if (message.active_jobs != null && Object.hasOwnProperty.call(message, "active_jobs")) + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.active_jobs); - if (message.yielding_jobs != null && Object.hasOwnProperty.call(message, "yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.yielding_jobs); - if (message.user_sessions != null && Object.hasOwnProperty.call(message, "user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.user_sessions); - if (message.game_server_sessions != null && Object.hasOwnProperty.call(message, "game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.game_server_sessions); - if (message.socaches != null && Object.hasOwnProperty.call(message, "socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.socaches); - if (message.socaches_to_unload != null && Object.hasOwnProperty.call(message, "socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.socaches_to_unload); - if (message.socaches_loading != null && Object.hasOwnProperty.call(message, "socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.socaches_loading); - if (message.writeback_queue != null && Object.hasOwnProperty.call(message, "writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.writeback_queue); - if (message.steamid_locks != null && Object.hasOwnProperty.call(message, "steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.steamid_locks); - if (message.logon_queue != null && Object.hasOwnProperty.call(message, "logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.logon_queue); - if (message.logon_jobs != null && Object.hasOwnProperty.call(message, "logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.logon_jobs); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -60779,12 +78588,12 @@ * @function encodeDelimited * @memberof CGCMsgGetSystemStatsResponse * @static - * @param {ICGCMsgGetSystemStatsResponse} message CGCMsgGetSystemStatsResponse message or plain object to encode + * @param {CGCMsgGetSystemStatsResponse.$Properties} message CGCMsgGetSystemStatsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCMsgGetSystemStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCMsgGetSystemStatsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -60794,61 +78603,114 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse + * @returns {CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape} CGCMsgGetSystemStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStatsResponse.decode = function decode(reader, length) { + CGCMsgGetSystemStatsResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetSystemStatsResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCMsgGetSystemStatsResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gc_app_id = reader.uint32(); - break; - case 2: - message.stats_kv = reader.bytes(); - break; - case 3: - message.active_jobs = reader.uint32(); - break; - case 4: - message.yielding_jobs = reader.uint32(); - break; - case 5: - message.user_sessions = reader.uint32(); - break; - case 6: - message.game_server_sessions = reader.uint32(); - break; - case 7: - message.socaches = reader.uint32(); - break; - case 8: - message.socaches_to_unload = reader.uint32(); - break; - case 9: - message.socaches_loading = reader.uint32(); - break; - case 10: - message.writeback_queue = reader.uint32(); - break; - case 11: - message.steamid_locks = reader.uint32(); - break; - case 12: - message.logon_queue = reader.uint32(); - break; - case 13: - message.logon_jobs = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gc_app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.stats_kv = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.active_jobs = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.yielding_jobs = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.user_sessions = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.game_server_sessions = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.socaches = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.socaches_to_unload = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.socaches_loading = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.writeback_queue = reader.uint32(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.steamid_locks = reader.uint32(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.logon_queue = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.logon_jobs = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -60858,11 +78720,11 @@ * @memberof CGCMsgGetSystemStatsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse + * @returns {CGCMsgGetSystemStatsResponse & CGCMsgGetSystemStatsResponse.$Shape} CGCMsgGetSystemStatsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCMsgGetSystemStatsResponse.decodeDelimited = function decodeDelimited(reader) { + CGCMsgGetSystemStatsResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -60876,46 +78738,50 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCMsgGetSystemStatsResponse.verify = function verify(message) { + CGCMsgGetSystemStatsResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) if (!$util.isInteger(message.gc_app_id)) return "gc_app_id: integer expected"; - if (message.stats_kv != null && message.hasOwnProperty("stats_kv")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) if (!(message.stats_kv && typeof message.stats_kv.length === "number" || $util.isString(message.stats_kv))) return "stats_kv: buffer expected"; - if (message.active_jobs != null && message.hasOwnProperty("active_jobs")) + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) if (!$util.isInteger(message.active_jobs)) return "active_jobs: integer expected"; - if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) if (!$util.isInteger(message.yielding_jobs)) return "yielding_jobs: integer expected"; - if (message.user_sessions != null && message.hasOwnProperty("user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) if (!$util.isInteger(message.user_sessions)) return "user_sessions: integer expected"; - if (message.game_server_sessions != null && message.hasOwnProperty("game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) if (!$util.isInteger(message.game_server_sessions)) return "game_server_sessions: integer expected"; - if (message.socaches != null && message.hasOwnProperty("socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) if (!$util.isInteger(message.socaches)) return "socaches: integer expected"; - if (message.socaches_to_unload != null && message.hasOwnProperty("socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) if (!$util.isInteger(message.socaches_to_unload)) return "socaches_to_unload: integer expected"; - if (message.socaches_loading != null && message.hasOwnProperty("socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) if (!$util.isInteger(message.socaches_loading)) return "socaches_loading: integer expected"; - if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) if (!$util.isInteger(message.writeback_queue)) return "writeback_queue: integer expected"; - if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) if (!$util.isInteger(message.steamid_locks)) return "steamid_locks: integer expected"; - if (message.logon_queue != null && message.hasOwnProperty("logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) if (!$util.isInteger(message.logon_queue)) return "logon_queue: integer expected"; - if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) if (!$util.isInteger(message.logon_jobs)) return "logon_jobs: integer expected"; return null; @@ -60929,16 +78795,22 @@ * @param {Object.} object Plain object * @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse */ - CGCMsgGetSystemStatsResponse.fromObject = function fromObject(object) { + CGCMsgGetSystemStatsResponse.fromObject = function (object, _depth) { if (object instanceof $root.CGCMsgGetSystemStatsResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCMsgGetSystemStatsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCMsgGetSystemStatsResponse(); if (object.gc_app_id != null) message.gc_app_id = object.gc_app_id >>> 0; if (object.stats_kv != null) if (typeof object.stats_kv === "string") $util.base64.decode(object.stats_kv, message.stats_kv = $util.newBuffer($util.base64.length(object.stats_kv)), 0); - else if (object.stats_kv.length) + else if (object.stats_kv.length >= 0) message.stats_kv = object.stats_kv; if (object.active_jobs != null) message.active_jobs = object.active_jobs >>> 0; @@ -60974,17 +78846,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCMsgGetSystemStatsResponse.toObject = function toObject(message, options) { + CGCMsgGetSystemStatsResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gc_app_id = 0; - if (options.bytes === String) + if (options.bytes === $String) object.stats_kv = ""; else { object.stats_kv = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.stats_kv = $util.newBuffer(object.stats_kv); } object.active_jobs = 0; @@ -60999,31 +78875,31 @@ object.logon_queue = 0; object.logon_jobs = 0; } - if (message.gc_app_id != null && message.hasOwnProperty("gc_app_id")) + if (message.gc_app_id != null && $Object.hasOwnProperty.call(message, "gc_app_id")) object.gc_app_id = message.gc_app_id; - if (message.stats_kv != null && message.hasOwnProperty("stats_kv")) - object.stats_kv = options.bytes === String ? $util.base64.encode(message.stats_kv, 0, message.stats_kv.length) : options.bytes === Array ? Array.prototype.slice.call(message.stats_kv) : message.stats_kv; - if (message.active_jobs != null && message.hasOwnProperty("active_jobs")) + if (message.stats_kv != null && $Object.hasOwnProperty.call(message, "stats_kv")) + object.stats_kv = options.bytes === $String ? $util.base64.encode(message.stats_kv, 0, message.stats_kv.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.stats_kv) : message.stats_kv; + if (message.active_jobs != null && $Object.hasOwnProperty.call(message, "active_jobs")) object.active_jobs = message.active_jobs; - if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs")) + if (message.yielding_jobs != null && $Object.hasOwnProperty.call(message, "yielding_jobs")) object.yielding_jobs = message.yielding_jobs; - if (message.user_sessions != null && message.hasOwnProperty("user_sessions")) + if (message.user_sessions != null && $Object.hasOwnProperty.call(message, "user_sessions")) object.user_sessions = message.user_sessions; - if (message.game_server_sessions != null && message.hasOwnProperty("game_server_sessions")) + if (message.game_server_sessions != null && $Object.hasOwnProperty.call(message, "game_server_sessions")) object.game_server_sessions = message.game_server_sessions; - if (message.socaches != null && message.hasOwnProperty("socaches")) + if (message.socaches != null && $Object.hasOwnProperty.call(message, "socaches")) object.socaches = message.socaches; - if (message.socaches_to_unload != null && message.hasOwnProperty("socaches_to_unload")) + if (message.socaches_to_unload != null && $Object.hasOwnProperty.call(message, "socaches_to_unload")) object.socaches_to_unload = message.socaches_to_unload; - if (message.socaches_loading != null && message.hasOwnProperty("socaches_loading")) + if (message.socaches_loading != null && $Object.hasOwnProperty.call(message, "socaches_loading")) object.socaches_loading = message.socaches_loading; - if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue")) + if (message.writeback_queue != null && $Object.hasOwnProperty.call(message, "writeback_queue")) object.writeback_queue = message.writeback_queue; - if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks")) + if (message.steamid_locks != null && $Object.hasOwnProperty.call(message, "steamid_locks")) object.steamid_locks = message.steamid_locks; - if (message.logon_queue != null && message.hasOwnProperty("logon_queue")) + if (message.logon_queue != null && $Object.hasOwnProperty.call(message, "logon_queue")) object.logon_queue = message.logon_queue; - if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs")) + if (message.logon_jobs != null && $Object.hasOwnProperty.call(message, "logon_jobs")) object.logon_jobs = message.logon_jobs; return object; }; @@ -61035,8 +78911,22 @@ * @instance * @returns {Object.} JSON object */ - CGCMsgGetSystemStatsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCMsgGetSystemStatsResponse.prototype.toJSON = function() { + return CGCMsgGetSystemStatsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCMsgGetSystemStatsResponse + * @function getTypeUrl + * @memberof CGCMsgGetSystemStatsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCMsgGetSystemStatsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCMsgGetSystemStatsResponse"; }; return CGCMsgGetSystemStatsResponse; @@ -61046,32 +78936,45 @@ /** * Properties of a CMsgAMSendEmail. - * @exports ICMsgAMSendEmail - * @interface ICMsgAMSendEmail + * @typedef {Object} CMsgAMSendEmail.$Properties * @property {number|Long|null} [steamid] CMsgAMSendEmail steamid * @property {number|null} [email_msg_type] CMsgAMSendEmail email_msg_type * @property {number|null} [email_format] CMsgAMSendEmail email_format - * @property {Array.|null} [persona_name_tokens] CMsgAMSendEmail persona_name_tokens + * @property {Array.|null} [persona_name_tokens] CMsgAMSendEmail persona_name_tokens * @property {number|null} [source_gc] CMsgAMSendEmail source_gc - * @property {Array.|null} [tokens] CMsgAMSendEmail tokens + * @property {Array.|null} [tokens] CMsgAMSendEmail tokens + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMSendEmail. + * @exports ICMsgAMSendEmail + * @interface ICMsgAMSendEmail + * @augments CMsgAMSendEmail.$Properties + * @deprecated Use CMsgAMSendEmail.$Properties instead. + */ + + /** + * Shape of a CMsgAMSendEmail. + * @typedef {CMsgAMSendEmail.$Properties} CMsgAMSendEmail.$Shape */ /** * Constructs a new CMsgAMSendEmail. * @exports CMsgAMSendEmail * @classdesc Represents a CMsgAMSendEmail. - * @implements ICMsgAMSendEmail * @constructor - * @param {ICMsgAMSendEmail=} [properties] Properties to set + * @param {CMsgAMSendEmail.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMSendEmail(properties) { + var CMsgAMSendEmail = function (properties) { this.persona_name_tokens = []; this.tokens = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMSendEmail steamid. @@ -61079,7 +78982,7 @@ * @memberof CMsgAMSendEmail * @instance */ - CMsgAMSendEmail.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMSendEmail.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMSendEmail email_msg_type. @@ -61099,7 +79002,7 @@ /** * CMsgAMSendEmail persona_name_tokens. - * @member {Array.} persona_name_tokens + * @member {Array.} persona_name_tokens * @memberof CMsgAMSendEmail * @instance */ @@ -61115,7 +79018,7 @@ /** * CMsgAMSendEmail tokens. - * @member {Array.} tokens + * @member {Array.} tokens * @memberof CMsgAMSendEmail * @instance */ @@ -61126,10 +79029,14 @@ * @function create * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail=} [properties] Properties to set + * @param {CMsgAMSendEmail.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail} CMsgAMSendEmail instance + * @type {{ + * (properties: CMsgAMSendEmail.$Shape): CMsgAMSendEmail & CMsgAMSendEmail.$Shape; + * (properties?: CMsgAMSendEmail.$Properties): CMsgAMSendEmail; + * }} */ - CMsgAMSendEmail.create = function create(properties) { + CMsgAMSendEmail.create = function(properties) { return new CMsgAMSendEmail(properties); }; @@ -61138,27 +79045,34 @@ * @function encode * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail} message CMsgAMSendEmail message or plain object to encode + * @param {CMsgAMSendEmail.$Properties} message CMsgAMSendEmail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmail.encode = function encode(message, writer) { + CMsgAMSendEmail.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.email_msg_type != null && Object.hasOwnProperty.call(message, "email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type); - if (message.email_format != null && Object.hasOwnProperty.call(message, "email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.email_format); if (message.persona_name_tokens != null && message.persona_name_tokens.length) for (var i = 0; i < message.persona_name_tokens.length; ++i) - $root.CMsgAMSendEmail.PersonaNameReplacementToken.encode(message.persona_name_tokens[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.source_gc != null && Object.hasOwnProperty.call(message, "source_gc")) + $root.CMsgAMSendEmail.PersonaNameReplacementToken.encode(message.persona_name_tokens[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.source_gc); if (message.tokens != null && message.tokens.length) for (var i = 0; i < message.tokens.length; ++i) - $root.CMsgAMSendEmail.ReplacementToken.encode(message.tokens[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.CMsgAMSendEmail.ReplacementToken.encode(message.tokens[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -61167,12 +79081,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail * @static - * @param {ICMsgAMSendEmail} message CMsgAMSendEmail message or plain object to encode + * @param {CMsgAMSendEmail.$Properties} message CMsgAMSendEmail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMSendEmail.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -61182,44 +79096,76 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail} CMsgAMSendEmail + * @returns {CMsgAMSendEmail & CMsgAMSendEmail.$Shape} CMsgAMSendEmail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmail.decode = function decode(reader, length) { + CMsgAMSendEmail.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.email_msg_type = reader.uint32(); - break; - case 3: - message.email_format = reader.uint32(); - break; - case 5: - if (!(message.persona_name_tokens && message.persona_name_tokens.length)) - message.persona_name_tokens = []; - message.persona_name_tokens.push($root.CMsgAMSendEmail.PersonaNameReplacementToken.decode(reader, reader.uint32())); - break; - case 6: - message.source_gc = reader.uint32(); - break; - case 7: - if (!(message.tokens && message.tokens.length)) - message.tokens = []; - message.tokens.push($root.CMsgAMSendEmail.ReplacementToken.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.email_msg_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.email_format = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.persona_name_tokens && message.persona_name_tokens.length)) + message.persona_name_tokens = []; + message.persona_name_tokens.push($root.CMsgAMSendEmail.PersonaNameReplacementToken.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.source_gc = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.tokens && message.tokens.length)) + message.tokens = []; + message.tokens.push($root.CMsgAMSendEmail.ReplacementToken.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -61229,11 +79175,11 @@ * @memberof CMsgAMSendEmail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail} CMsgAMSendEmail + * @returns {CMsgAMSendEmail & CMsgAMSendEmail.$Shape} CMsgAMSendEmail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmail.decodeDelimited = function decodeDelimited(reader) { + CMsgAMSendEmail.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -61247,35 +79193,39 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMSendEmail.verify = function verify(message) { + CMsgAMSendEmail.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) if (!$util.isInteger(message.email_msg_type)) return "email_msg_type: integer expected"; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) if (!$util.isInteger(message.email_format)) return "email_format: integer expected"; - if (message.persona_name_tokens != null && message.hasOwnProperty("persona_name_tokens")) { - if (!Array.isArray(message.persona_name_tokens)) + if (message.persona_name_tokens != null && $Object.hasOwnProperty.call(message, "persona_name_tokens")) { + if (!$Array.isArray(message.persona_name_tokens)) return "persona_name_tokens: array expected"; for (var i = 0; i < message.persona_name_tokens.length; ++i) { - var error = $root.CMsgAMSendEmail.PersonaNameReplacementToken.verify(message.persona_name_tokens[i]); + var error = $root.CMsgAMSendEmail.PersonaNameReplacementToken.verify(message.persona_name_tokens[i], _depth + 1); if (error) return "persona_name_tokens." + error; } } - if (message.source_gc != null && message.hasOwnProperty("source_gc")) + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) if (!$util.isInteger(message.source_gc)) return "source_gc: integer expected"; - if (message.tokens != null && message.hasOwnProperty("tokens")) { - if (!Array.isArray(message.tokens)) + if (message.tokens != null && $Object.hasOwnProperty.call(message, "tokens")) { + if (!$Array.isArray(message.tokens)) return "tokens: array expected"; for (var i = 0; i < message.tokens.length; ++i) { - var error = $root.CMsgAMSendEmail.ReplacementToken.verify(message.tokens[i]); + var error = $root.CMsgAMSendEmail.ReplacementToken.verify(message.tokens[i], _depth + 1); if (error) return "tokens." + error; } @@ -61291,43 +79241,49 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail} CMsgAMSendEmail */ - CMsgAMSendEmail.fromObject = function fromObject(object) { + CMsgAMSendEmail.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.email_msg_type != null) message.email_msg_type = object.email_msg_type >>> 0; if (object.email_format != null) message.email_format = object.email_format >>> 0; if (object.persona_name_tokens) { - if (!Array.isArray(object.persona_name_tokens)) - throw TypeError(".CMsgAMSendEmail.persona_name_tokens: array expected"); - message.persona_name_tokens = []; + if (!$Array.isArray(object.persona_name_tokens)) + throw $TypeError(".CMsgAMSendEmail.persona_name_tokens: array expected"); + message.persona_name_tokens = $Array(object.persona_name_tokens.length); for (var i = 0; i < object.persona_name_tokens.length; ++i) { - if (typeof object.persona_name_tokens[i] !== "object") - throw TypeError(".CMsgAMSendEmail.persona_name_tokens: object expected"); - message.persona_name_tokens[i] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.fromObject(object.persona_name_tokens[i]); + if (!$util.isObject(object.persona_name_tokens[i])) + throw $TypeError(".CMsgAMSendEmail.persona_name_tokens: object expected"); + message.persona_name_tokens[i] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.fromObject(object.persona_name_tokens[i], _depth + 1); } } if (object.source_gc != null) message.source_gc = object.source_gc >>> 0; if (object.tokens) { - if (!Array.isArray(object.tokens)) - throw TypeError(".CMsgAMSendEmail.tokens: array expected"); - message.tokens = []; + if (!$Array.isArray(object.tokens)) + throw $TypeError(".CMsgAMSendEmail.tokens: array expected"); + message.tokens = $Array(object.tokens.length); for (var i = 0; i < object.tokens.length; ++i) { - if (typeof object.tokens[i] !== "object") - throw TypeError(".CMsgAMSendEmail.tokens: object expected"); - message.tokens[i] = $root.CMsgAMSendEmail.ReplacementToken.fromObject(object.tokens[i]); + if (!$util.isObject(object.tokens[i])) + throw $TypeError(".CMsgAMSendEmail.tokens: object expected"); + message.tokens[i] = $root.CMsgAMSendEmail.ReplacementToken.fromObject(object.tokens[i], _depth + 1); } } return message; @@ -61342,9 +79298,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMSendEmail.toObject = function toObject(message, options) { + CMsgAMSendEmail.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.persona_name_tokens = []; @@ -61352,34 +79312,36 @@ } if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.email_msg_type = 0; object.email_format = 0; object.source_gc = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) object.email_msg_type = message.email_msg_type; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) object.email_format = message.email_format; if (message.persona_name_tokens && message.persona_name_tokens.length) { - object.persona_name_tokens = []; + object.persona_name_tokens = $Array(message.persona_name_tokens.length); for (var j = 0; j < message.persona_name_tokens.length; ++j) - object.persona_name_tokens[j] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.toObject(message.persona_name_tokens[j], options); + object.persona_name_tokens[j] = $root.CMsgAMSendEmail.PersonaNameReplacementToken.toObject(message.persona_name_tokens[j], options, _depth + 1); } - if (message.source_gc != null && message.hasOwnProperty("source_gc")) + if (message.source_gc != null && $Object.hasOwnProperty.call(message, "source_gc")) object.source_gc = message.source_gc; if (message.tokens && message.tokens.length) { - object.tokens = []; + object.tokens = $Array(message.tokens.length); for (var j = 0; j < message.tokens.length; ++j) - object.tokens[j] = $root.CMsgAMSendEmail.ReplacementToken.toObject(message.tokens[j], options); + object.tokens[j] = $root.CMsgAMSendEmail.ReplacementToken.toObject(message.tokens[j], options, _depth + 1); } return object; }; @@ -61391,34 +79353,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMSendEmail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMSendEmail.prototype.toJSON = function() { + return CMsgAMSendEmail.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMSendEmail + * @function getTypeUrl + * @memberof CMsgAMSendEmail + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMSendEmail.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail"; }; CMsgAMSendEmail.ReplacementToken = (function() { /** * Properties of a ReplacementToken. - * @memberof CMsgAMSendEmail - * @interface IReplacementToken + * @typedef {Object} CMsgAMSendEmail.ReplacementToken.$Properties * @property {string|null} [token_name] ReplacementToken token_name * @property {string|null} [token_value] ReplacementToken token_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ReplacementToken. + * @memberof CMsgAMSendEmail + * @interface IReplacementToken + * @augments CMsgAMSendEmail.ReplacementToken.$Properties + * @deprecated Use CMsgAMSendEmail.ReplacementToken.$Properties instead. + */ + + /** + * Shape of a ReplacementToken. + * @typedef {CMsgAMSendEmail.ReplacementToken.$Properties} CMsgAMSendEmail.ReplacementToken.$Shape */ /** * Constructs a new ReplacementToken. * @memberof CMsgAMSendEmail * @classdesc Represents a ReplacementToken. - * @implements IReplacementToken * @constructor - * @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.ReplacementToken.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ReplacementToken(properties) { + var ReplacementToken = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ReplacementToken token_name. @@ -61441,10 +79430,14 @@ * @function create * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.ReplacementToken.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken instance + * @type {{ + * (properties: CMsgAMSendEmail.ReplacementToken.$Shape): CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape; + * (properties?: CMsgAMSendEmail.ReplacementToken.$Properties): CMsgAMSendEmail.ReplacementToken; + * }} */ - ReplacementToken.create = function create(properties) { + ReplacementToken.create = function(properties) { return new ReplacementToken(properties); }; @@ -61453,17 +79446,24 @@ * @function encode * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken} message ReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.ReplacementToken.$Properties} message ReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplacementToken.encode = function encode(message, writer) { + ReplacementToken.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.token_name != null && Object.hasOwnProperty.call(message, "token_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.token_name); - if (message.token_value != null && Object.hasOwnProperty.call(message, "token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -61472,12 +79472,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail.ReplacementToken * @static - * @param {CMsgAMSendEmail.IReplacementToken} message ReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.ReplacementToken.$Properties} message ReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplacementToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ReplacementToken.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -61487,28 +79487,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken + * @returns {CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape} ReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplacementToken.decode = function decode(reader, length) { + ReplacementToken.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail.ReplacementToken(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail.ReplacementToken(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.token_name = reader.string(); - break; - case 2: - message.token_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.token_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.token_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -61518,11 +79538,11 @@ * @memberof CMsgAMSendEmail.ReplacementToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken + * @returns {CMsgAMSendEmail.ReplacementToken & CMsgAMSendEmail.ReplacementToken.$Shape} ReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplacementToken.decodeDelimited = function decodeDelimited(reader) { + ReplacementToken.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -61536,13 +79556,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReplacementToken.verify = function verify(message) { + ReplacementToken.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) if (!$util.isString(message.token_name)) return "token_name: string expected"; - if (message.token_value != null && message.hasOwnProperty("token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) if (!$util.isString(message.token_value)) return "token_value: string expected"; return null; @@ -61556,14 +79580,20 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken */ - ReplacementToken.fromObject = function fromObject(object) { + ReplacementToken.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail.ReplacementToken) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail.ReplacementToken: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail.ReplacementToken(); if (object.token_name != null) - message.token_name = String(object.token_name); + message.token_name = $String(object.token_name); if (object.token_value != null) - message.token_value = String(object.token_value); + message.token_value = $String(object.token_value); return message; }; @@ -61576,17 +79606,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReplacementToken.toObject = function toObject(message, options) { + ReplacementToken.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.token_name = ""; object.token_value = ""; } - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) object.token_name = message.token_name; - if (message.token_value != null && message.hasOwnProperty("token_value")) + if (message.token_value != null && $Object.hasOwnProperty.call(message, "token_value")) object.token_value = message.token_value; return object; }; @@ -61598,8 +79632,22 @@ * @instance * @returns {Object.} JSON object */ - ReplacementToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ReplacementToken.prototype.toJSON = function() { + return ReplacementToken.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ReplacementToken + * @function getTypeUrl + * @memberof CMsgAMSendEmail.ReplacementToken + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ReplacementToken.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail.ReplacementToken"; }; return ReplacementToken; @@ -61609,26 +79657,39 @@ /** * Properties of a PersonaNameReplacementToken. - * @memberof CMsgAMSendEmail - * @interface IPersonaNameReplacementToken + * @typedef {Object} CMsgAMSendEmail.PersonaNameReplacementToken.$Properties * @property {number|Long|null} [steamid] PersonaNameReplacementToken steamid * @property {string|null} [token_name] PersonaNameReplacementToken token_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PersonaNameReplacementToken. + * @memberof CMsgAMSendEmail + * @interface IPersonaNameReplacementToken + * @augments CMsgAMSendEmail.PersonaNameReplacementToken.$Properties + * @deprecated Use CMsgAMSendEmail.PersonaNameReplacementToken.$Properties instead. + */ + + /** + * Shape of a PersonaNameReplacementToken. + * @typedef {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} CMsgAMSendEmail.PersonaNameReplacementToken.$Shape */ /** * Constructs a new PersonaNameReplacementToken. * @memberof CMsgAMSendEmail * @classdesc Represents a PersonaNameReplacementToken. - * @implements IPersonaNameReplacementToken * @constructor - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PersonaNameReplacementToken(properties) { + var PersonaNameReplacementToken = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PersonaNameReplacementToken steamid. @@ -61636,7 +79697,7 @@ * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @instance */ - PersonaNameReplacementToken.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PersonaNameReplacementToken.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * PersonaNameReplacementToken token_name. @@ -61651,10 +79712,14 @@ * @function create * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken instance + * @type {{ + * (properties: CMsgAMSendEmail.PersonaNameReplacementToken.$Shape): CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape; + * (properties?: CMsgAMSendEmail.PersonaNameReplacementToken.$Properties): CMsgAMSendEmail.PersonaNameReplacementToken; + * }} */ - PersonaNameReplacementToken.create = function create(properties) { + PersonaNameReplacementToken.create = function(properties) { return new PersonaNameReplacementToken(properties); }; @@ -61663,17 +79728,24 @@ * @function encode * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken} message PersonaNameReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} message PersonaNameReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaNameReplacementToken.encode = function encode(message, writer) { + PersonaNameReplacementToken.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.token_name != null && Object.hasOwnProperty.call(message, "token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -61682,12 +79754,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static - * @param {CMsgAMSendEmail.IPersonaNameReplacementToken} message PersonaNameReplacementToken message or plain object to encode + * @param {CMsgAMSendEmail.PersonaNameReplacementToken.$Properties} message PersonaNameReplacementToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaNameReplacementToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PersonaNameReplacementToken.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -61697,28 +79769,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken + * @returns {CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape} PersonaNameReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaNameReplacementToken.decode = function decode(reader, length) { + PersonaNameReplacementToken.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.token_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.token_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -61728,11 +79820,11 @@ * @memberof CMsgAMSendEmail.PersonaNameReplacementToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken + * @returns {CMsgAMSendEmail.PersonaNameReplacementToken & CMsgAMSendEmail.PersonaNameReplacementToken.$Shape} PersonaNameReplacementToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaNameReplacementToken.decodeDelimited = function decodeDelimited(reader) { + PersonaNameReplacementToken.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -61746,13 +79838,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PersonaNameReplacementToken.verify = function verify(message) { + PersonaNameReplacementToken.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.token_name != null && message.hasOwnProperty("token_name")) + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) if (!$util.isString(message.token_name)) return "token_name: string expected"; return null; @@ -61766,21 +79862,27 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken */ - PersonaNameReplacementToken.fromObject = function fromObject(object) { + PersonaNameReplacementToken.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmail.PersonaNameReplacementToken) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmail.PersonaNameReplacementToken: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmail.PersonaNameReplacementToken(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.token_name != null) - message.token_name = String(object.token_name); + message.token_name = $String(object.token_name); return message; }; @@ -61793,24 +79895,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PersonaNameReplacementToken.toObject = function toObject(message, options) { + PersonaNameReplacementToken.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.token_name = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.token_name != null && message.hasOwnProperty("token_name")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.token_name != null && $Object.hasOwnProperty.call(message, "token_name")) object.token_name = message.token_name; return object; }; @@ -61822,8 +79930,22 @@ * @instance * @returns {Object.} JSON object */ - PersonaNameReplacementToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PersonaNameReplacementToken.prototype.toJSON = function() { + return PersonaNameReplacementToken.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PersonaNameReplacementToken + * @function getTypeUrl + * @memberof CMsgAMSendEmail.PersonaNameReplacementToken + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PersonaNameReplacementToken.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmail.PersonaNameReplacementToken"; }; return PersonaNameReplacementToken; @@ -61834,27 +79956,40 @@ $root.CMsgAMSendEmailResponse = (function() { + /** + * Properties of a CMsgAMSendEmailResponse. + * @typedef {Object} CMsgAMSendEmailResponse.$Properties + * @property {number|null} [eresult] CMsgAMSendEmailResponse eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgAMSendEmailResponse. * @exports ICMsgAMSendEmailResponse * @interface ICMsgAMSendEmailResponse - * @property {number|null} [eresult] CMsgAMSendEmailResponse eresult + * @augments CMsgAMSendEmailResponse.$Properties + * @deprecated Use CMsgAMSendEmailResponse.$Properties instead. + */ + + /** + * Shape of a CMsgAMSendEmailResponse. + * @typedef {CMsgAMSendEmailResponse.$Properties} CMsgAMSendEmailResponse.$Shape */ /** * Constructs a new CMsgAMSendEmailResponse. * @exports CMsgAMSendEmailResponse * @classdesc Represents a CMsgAMSendEmailResponse. - * @implements ICMsgAMSendEmailResponse * @constructor - * @param {ICMsgAMSendEmailResponse=} [properties] Properties to set + * @param {CMsgAMSendEmailResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMSendEmailResponse(properties) { + var CMsgAMSendEmailResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMSendEmailResponse eresult. @@ -61869,10 +80004,14 @@ * @function create * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse=} [properties] Properties to set + * @param {CMsgAMSendEmailResponse.$Properties=} [properties] Properties to set * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse instance + * @type {{ + * (properties: CMsgAMSendEmailResponse.$Shape): CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape; + * (properties?: CMsgAMSendEmailResponse.$Properties): CMsgAMSendEmailResponse; + * }} */ - CMsgAMSendEmailResponse.create = function create(properties) { + CMsgAMSendEmailResponse.create = function(properties) { return new CMsgAMSendEmailResponse(properties); }; @@ -61881,15 +80020,22 @@ * @function encode * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse} message CMsgAMSendEmailResponse message or plain object to encode + * @param {CMsgAMSendEmailResponse.$Properties} message CMsgAMSendEmailResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmailResponse.encode = function encode(message, writer) { + CMsgAMSendEmailResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -61898,12 +80044,12 @@ * @function encodeDelimited * @memberof CMsgAMSendEmailResponse * @static - * @param {ICMsgAMSendEmailResponse} message CMsgAMSendEmailResponse message or plain object to encode + * @param {CMsgAMSendEmailResponse.$Properties} message CMsgAMSendEmailResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMSendEmailResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMSendEmailResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -61913,25 +80059,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse + * @returns {CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape} CMsgAMSendEmailResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmailResponse.decode = function decode(reader, length) { + CMsgAMSendEmailResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMSendEmailResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMSendEmailResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -61941,11 +80104,11 @@ * @memberof CMsgAMSendEmailResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse + * @returns {CMsgAMSendEmailResponse & CMsgAMSendEmailResponse.$Shape} CMsgAMSendEmailResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMSendEmailResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgAMSendEmailResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -61959,10 +80122,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMSendEmailResponse.verify = function verify(message) { + CMsgAMSendEmailResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -61976,9 +80143,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse */ - CMsgAMSendEmailResponse.fromObject = function fromObject(object) { + CMsgAMSendEmailResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMSendEmailResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMSendEmailResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMSendEmailResponse(); if (object.eresult != null) message.eresult = object.eresult >>> 0; @@ -61994,13 +80167,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMSendEmailResponse.toObject = function toObject(message, options) { + CMsgAMSendEmailResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -62012,8 +80189,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMSendEmailResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMSendEmailResponse.prototype.toJSON = function() { + return CMsgAMSendEmailResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMSendEmailResponse + * @function getTypeUrl + * @memberof CMsgAMSendEmailResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMSendEmailResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMSendEmailResponse"; }; return CMsgAMSendEmailResponse; @@ -62023,28 +80214,41 @@ /** * Properties of a CMsgGCGetEmailTemplate. - * @exports ICMsgGCGetEmailTemplate - * @interface ICMsgGCGetEmailTemplate + * @typedef {Object} CMsgGCGetEmailTemplate.$Properties * @property {number|null} [app_id] CMsgGCGetEmailTemplate app_id * @property {number|null} [email_msg_type] CMsgGCGetEmailTemplate email_msg_type * @property {number|null} [email_lang] CMsgGCGetEmailTemplate email_lang * @property {number|null} [email_format] CMsgGCGetEmailTemplate email_format + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetEmailTemplate. + * @exports ICMsgGCGetEmailTemplate + * @interface ICMsgGCGetEmailTemplate + * @augments CMsgGCGetEmailTemplate.$Properties + * @deprecated Use CMsgGCGetEmailTemplate.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetEmailTemplate. + * @typedef {CMsgGCGetEmailTemplate.$Properties} CMsgGCGetEmailTemplate.$Shape */ /** * Constructs a new CMsgGCGetEmailTemplate. * @exports CMsgGCGetEmailTemplate * @classdesc Represents a CMsgGCGetEmailTemplate. - * @implements ICMsgGCGetEmailTemplate * @constructor - * @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplate.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetEmailTemplate(properties) { + var CMsgGCGetEmailTemplate = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetEmailTemplate app_id. @@ -62083,10 +80287,14 @@ * @function create * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplate.$Properties=} [properties] Properties to set * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate instance + * @type {{ + * (properties: CMsgGCGetEmailTemplate.$Shape): CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape; + * (properties?: CMsgGCGetEmailTemplate.$Properties): CMsgGCGetEmailTemplate; + * }} */ - CMsgGCGetEmailTemplate.create = function create(properties) { + CMsgGCGetEmailTemplate.create = function(properties) { return new CMsgGCGetEmailTemplate(properties); }; @@ -62095,21 +80303,28 @@ * @function encode * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate} message CMsgGCGetEmailTemplate message or plain object to encode + * @param {CMsgGCGetEmailTemplate.$Properties} message CMsgGCGetEmailTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplate.encode = function encode(message, writer) { + CMsgGCGetEmailTemplate.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_id); - if (message.email_msg_type != null && Object.hasOwnProperty.call(message, "email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type); - if (message.email_lang != null && Object.hasOwnProperty.call(message, "email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.email_lang); - if (message.email_format != null && Object.hasOwnProperty.call(message, "email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.email_format); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -62118,12 +80333,12 @@ * @function encodeDelimited * @memberof CMsgGCGetEmailTemplate * @static - * @param {ICMsgGCGetEmailTemplate} message CMsgGCGetEmailTemplate message or plain object to encode + * @param {CMsgGCGetEmailTemplate.$Properties} message CMsgGCGetEmailTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetEmailTemplate.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -62133,34 +80348,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate + * @returns {CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape} CMsgGCGetEmailTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplate.decode = function decode(reader, length) { + CMsgGCGetEmailTemplate.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetEmailTemplate(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetEmailTemplate(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_id = reader.uint32(); - break; - case 2: - message.email_msg_type = reader.uint32(); - break; - case 3: - message.email_lang = reader.int32(); - break; - case 4: - message.email_format = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.email_msg_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.email_lang = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.email_format = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -62170,11 +80411,11 @@ * @memberof CMsgGCGetEmailTemplate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate + * @returns {CMsgGCGetEmailTemplate & CMsgGCGetEmailTemplate.$Shape} CMsgGCGetEmailTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplate.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetEmailTemplate.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -62188,19 +80429,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetEmailTemplate.verify = function verify(message) { + CMsgGCGetEmailTemplate.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) if (!$util.isInteger(message.email_msg_type)) return "email_msg_type: integer expected"; - if (message.email_lang != null && message.hasOwnProperty("email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) if (!$util.isInteger(message.email_lang)) return "email_lang: integer expected"; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) if (!$util.isInteger(message.email_format)) return "email_format: integer expected"; return null; @@ -62214,9 +80459,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate */ - CMsgGCGetEmailTemplate.fromObject = function fromObject(object) { + CMsgGCGetEmailTemplate.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetEmailTemplate) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetEmailTemplate: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetEmailTemplate(); if (object.app_id != null) message.app_id = object.app_id >>> 0; @@ -62238,9 +80489,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetEmailTemplate.toObject = function toObject(message, options) { + CMsgGCGetEmailTemplate.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.app_id = 0; @@ -62248,13 +80503,13 @@ object.email_lang = 0; object.email_format = 0; } - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type")) + if (message.email_msg_type != null && $Object.hasOwnProperty.call(message, "email_msg_type")) object.email_msg_type = message.email_msg_type; - if (message.email_lang != null && message.hasOwnProperty("email_lang")) + if (message.email_lang != null && $Object.hasOwnProperty.call(message, "email_lang")) object.email_lang = message.email_lang; - if (message.email_format != null && message.hasOwnProperty("email_format")) + if (message.email_format != null && $Object.hasOwnProperty.call(message, "email_format")) object.email_format = message.email_format; return object; }; @@ -62266,8 +80521,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetEmailTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetEmailTemplate.prototype.toJSON = function() { + return CMsgGCGetEmailTemplate.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetEmailTemplate + * @function getTypeUrl + * @memberof CMsgGCGetEmailTemplate + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetEmailTemplate.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetEmailTemplate"; }; return CMsgGCGetEmailTemplate; @@ -62277,27 +80546,40 @@ /** * Properties of a CMsgGCGetEmailTemplateResponse. - * @exports ICMsgGCGetEmailTemplateResponse - * @interface ICMsgGCGetEmailTemplateResponse + * @typedef {Object} CMsgGCGetEmailTemplateResponse.$Properties * @property {number|null} [eresult] CMsgGCGetEmailTemplateResponse eresult * @property {boolean|null} [template_exists] CMsgGCGetEmailTemplateResponse template_exists * @property {string|null} [template] CMsgGCGetEmailTemplateResponse template + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetEmailTemplateResponse. + * @exports ICMsgGCGetEmailTemplateResponse + * @interface ICMsgGCGetEmailTemplateResponse + * @augments CMsgGCGetEmailTemplateResponse.$Properties + * @deprecated Use CMsgGCGetEmailTemplateResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetEmailTemplateResponse. + * @typedef {CMsgGCGetEmailTemplateResponse.$Properties} CMsgGCGetEmailTemplateResponse.$Shape */ /** * Constructs a new CMsgGCGetEmailTemplateResponse. * @exports CMsgGCGetEmailTemplateResponse * @classdesc Represents a CMsgGCGetEmailTemplateResponse. - * @implements ICMsgGCGetEmailTemplateResponse * @constructor - * @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplateResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetEmailTemplateResponse(properties) { + var CMsgGCGetEmailTemplateResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetEmailTemplateResponse eresult. @@ -62328,10 +80610,14 @@ * @function create * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set + * @param {CMsgGCGetEmailTemplateResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse instance + * @type {{ + * (properties: CMsgGCGetEmailTemplateResponse.$Shape): CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape; + * (properties?: CMsgGCGetEmailTemplateResponse.$Properties): CMsgGCGetEmailTemplateResponse; + * }} */ - CMsgGCGetEmailTemplateResponse.create = function create(properties) { + CMsgGCGetEmailTemplateResponse.create = function(properties) { return new CMsgGCGetEmailTemplateResponse(properties); }; @@ -62340,19 +80626,26 @@ * @function encode * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse} message CMsgGCGetEmailTemplateResponse message or plain object to encode + * @param {CMsgGCGetEmailTemplateResponse.$Properties} message CMsgGCGetEmailTemplateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplateResponse.encode = function encode(message, writer) { + CMsgGCGetEmailTemplateResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult); - if (message.template_exists != null && Object.hasOwnProperty.call(message, "template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.template_exists); - if (message.template != null && Object.hasOwnProperty.call(message, "template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.template); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -62361,12 +80654,12 @@ * @function encodeDelimited * @memberof CMsgGCGetEmailTemplateResponse * @static - * @param {ICMsgGCGetEmailTemplateResponse} message CMsgGCGetEmailTemplateResponse message or plain object to encode + * @param {CMsgGCGetEmailTemplateResponse.$Properties} message CMsgGCGetEmailTemplateResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetEmailTemplateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetEmailTemplateResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -62376,31 +80669,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse + * @returns {CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape} CMsgGCGetEmailTemplateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplateResponse.decode = function decode(reader, length) { + CMsgGCGetEmailTemplateResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetEmailTemplateResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetEmailTemplateResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.uint32(); - break; - case 2: - message.template_exists = reader.bool(); - break; - case 3: - message.template = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.template_exists = reader.bool(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.template = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -62410,11 +80726,11 @@ * @memberof CMsgGCGetEmailTemplateResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse + * @returns {CMsgGCGetEmailTemplateResponse & CMsgGCGetEmailTemplateResponse.$Shape} CMsgGCGetEmailTemplateResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetEmailTemplateResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetEmailTemplateResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -62428,16 +80744,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetEmailTemplateResponse.verify = function verify(message) { + CMsgGCGetEmailTemplateResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.template_exists != null && message.hasOwnProperty("template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) if (typeof message.template_exists !== "boolean") return "template_exists: boolean expected"; - if (message.template != null && message.hasOwnProperty("template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) if (!$util.isString(message.template)) return "template: string expected"; return null; @@ -62451,16 +80771,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse */ - CMsgGCGetEmailTemplateResponse.fromObject = function fromObject(object) { + CMsgGCGetEmailTemplateResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetEmailTemplateResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetEmailTemplateResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetEmailTemplateResponse(); if (object.eresult != null) message.eresult = object.eresult >>> 0; if (object.template_exists != null) - message.template_exists = Boolean(object.template_exists); + message.template_exists = $Boolean(object.template_exists); if (object.template != null) - message.template = String(object.template); + message.template = $String(object.template); return message; }; @@ -62473,20 +80799,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetEmailTemplateResponse.toObject = function toObject(message, options) { + CMsgGCGetEmailTemplateResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.template_exists = false; object.template = ""; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.template_exists != null && message.hasOwnProperty("template_exists")) + if (message.template_exists != null && $Object.hasOwnProperty.call(message, "template_exists")) object.template_exists = message.template_exists; - if (message.template != null && message.hasOwnProperty("template")) + if (message.template != null && $Object.hasOwnProperty.call(message, "template")) object.template = message.template; return object; }; @@ -62498,8 +80828,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetEmailTemplateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetEmailTemplateResponse.prototype.toJSON = function() { + return CMsgGCGetEmailTemplateResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetEmailTemplateResponse + * @function getTypeUrl + * @memberof CMsgGCGetEmailTemplateResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetEmailTemplateResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetEmailTemplateResponse"; }; return CMsgGCGetEmailTemplateResponse; @@ -62509,29 +80853,42 @@ /** * Properties of a CMsgAMGrantGuestPasses2. - * @exports ICMsgAMGrantGuestPasses2 - * @interface ICMsgAMGrantGuestPasses2 + * @typedef {Object} CMsgAMGrantGuestPasses2.$Properties * @property {number|Long|null} [steam_id] CMsgAMGrantGuestPasses2 steam_id * @property {number|null} [package_id] CMsgAMGrantGuestPasses2 package_id * @property {number|null} [passes_to_grant] CMsgAMGrantGuestPasses2 passes_to_grant * @property {number|null} [days_to_expiration] CMsgAMGrantGuestPasses2 days_to_expiration * @property {number|null} [action] CMsgAMGrantGuestPasses2 action + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGrantGuestPasses2. + * @exports ICMsgAMGrantGuestPasses2 + * @interface ICMsgAMGrantGuestPasses2 + * @augments CMsgAMGrantGuestPasses2.$Properties + * @deprecated Use CMsgAMGrantGuestPasses2.$Properties instead. + */ + + /** + * Shape of a CMsgAMGrantGuestPasses2. + * @typedef {CMsgAMGrantGuestPasses2.$Properties} CMsgAMGrantGuestPasses2.$Shape */ /** * Constructs a new CMsgAMGrantGuestPasses2. * @exports CMsgAMGrantGuestPasses2 * @classdesc Represents a CMsgAMGrantGuestPasses2. - * @implements ICMsgAMGrantGuestPasses2 * @constructor - * @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGrantGuestPasses2(properties) { + var CMsgAMGrantGuestPasses2 = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGrantGuestPasses2 steam_id. @@ -62539,7 +80896,7 @@ * @memberof CMsgAMGrantGuestPasses2 * @instance */ - CMsgAMGrantGuestPasses2.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgAMGrantGuestPasses2.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgAMGrantGuestPasses2 package_id. @@ -62578,10 +80935,14 @@ * @function create * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2.$Properties=} [properties] Properties to set * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 instance + * @type {{ + * (properties: CMsgAMGrantGuestPasses2.$Shape): CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape; + * (properties?: CMsgAMGrantGuestPasses2.$Properties): CMsgAMGrantGuestPasses2; + * }} */ - CMsgAMGrantGuestPasses2.create = function create(properties) { + CMsgAMGrantGuestPasses2.create = function(properties) { return new CMsgAMGrantGuestPasses2(properties); }; @@ -62590,23 +80951,30 @@ * @function encode * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2} message CMsgAMGrantGuestPasses2 message or plain object to encode + * @param {CMsgAMGrantGuestPasses2.$Properties} message CMsgAMGrantGuestPasses2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2.encode = function encode(message, writer) { + CMsgAMGrantGuestPasses2.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.package_id != null && Object.hasOwnProperty.call(message, "package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.package_id); - if (message.passes_to_grant != null && Object.hasOwnProperty.call(message, "passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.passes_to_grant); - if (message.days_to_expiration != null && Object.hasOwnProperty.call(message, "days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.days_to_expiration); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.action); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -62615,12 +80983,12 @@ * @function encodeDelimited * @memberof CMsgAMGrantGuestPasses2 * @static - * @param {ICMsgAMGrantGuestPasses2} message CMsgAMGrantGuestPasses2 message or plain object to encode + * @param {CMsgAMGrantGuestPasses2.$Properties} message CMsgAMGrantGuestPasses2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGrantGuestPasses2.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -62630,37 +80998,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 + * @returns {CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape} CMsgAMGrantGuestPasses2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2.decode = function decode(reader, length) { + CMsgAMGrantGuestPasses2.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGrantGuestPasses2(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGrantGuestPasses2(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.package_id = reader.uint32(); - break; - case 3: - message.passes_to_grant = reader.int32(); - break; - case 4: - message.days_to_expiration = reader.int32(); - break; - case 5: - message.action = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.package_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.passes_to_grant = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.days_to_expiration = reader.int32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.action = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -62670,11 +81067,11 @@ * @memberof CMsgAMGrantGuestPasses2 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 + * @returns {CMsgAMGrantGuestPasses2 & CMsgAMGrantGuestPasses2.$Shape} CMsgAMGrantGuestPasses2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGrantGuestPasses2.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -62688,22 +81085,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGrantGuestPasses2.verify = function verify(message) { + CMsgAMGrantGuestPasses2.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.package_id != null && message.hasOwnProperty("package_id")) + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) if (!$util.isInteger(message.package_id)) return "package_id: integer expected"; - if (message.passes_to_grant != null && message.hasOwnProperty("passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) if (!$util.isInteger(message.passes_to_grant)) return "passes_to_grant: integer expected"; - if (message.days_to_expiration != null && message.hasOwnProperty("days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) if (!$util.isInteger(message.days_to_expiration)) return "days_to_expiration: integer expected"; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) if (!$util.isInteger(message.action)) return "action: integer expected"; return null; @@ -62717,19 +81118,25 @@ * @param {Object.} object Plain object * @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 */ - CMsgAMGrantGuestPasses2.fromObject = function fromObject(object) { + CMsgAMGrantGuestPasses2.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGrantGuestPasses2) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGrantGuestPasses2: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGrantGuestPasses2(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.package_id != null) message.package_id = object.package_id >>> 0; if (object.passes_to_grant != null) @@ -62750,33 +81157,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGrantGuestPasses2.toObject = function toObject(message, options) { + CMsgAMGrantGuestPasses2.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.package_id = 0; object.passes_to_grant = 0; object.days_to_expiration = 0; object.action = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.package_id != null && message.hasOwnProperty("package_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.package_id != null && $Object.hasOwnProperty.call(message, "package_id")) object.package_id = message.package_id; - if (message.passes_to_grant != null && message.hasOwnProperty("passes_to_grant")) + if (message.passes_to_grant != null && $Object.hasOwnProperty.call(message, "passes_to_grant")) object.passes_to_grant = message.passes_to_grant; - if (message.days_to_expiration != null && message.hasOwnProperty("days_to_expiration")) + if (message.days_to_expiration != null && $Object.hasOwnProperty.call(message, "days_to_expiration")) object.days_to_expiration = message.days_to_expiration; - if (message.action != null && message.hasOwnProperty("action")) + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) object.action = message.action; return object; }; @@ -62788,8 +81201,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGrantGuestPasses2.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGrantGuestPasses2.prototype.toJSON = function() { + return CMsgAMGrantGuestPasses2.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGrantGuestPasses2 + * @function getTypeUrl + * @memberof CMsgAMGrantGuestPasses2 + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGrantGuestPasses2.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGrantGuestPasses2"; }; return CMsgAMGrantGuestPasses2; @@ -62799,26 +81226,39 @@ /** * Properties of a CMsgAMGrantGuestPasses2Response. - * @exports ICMsgAMGrantGuestPasses2Response - * @interface ICMsgAMGrantGuestPasses2Response + * @typedef {Object} CMsgAMGrantGuestPasses2Response.$Properties * @property {number|null} [eresult] CMsgAMGrantGuestPasses2Response eresult * @property {number|null} [passes_granted] CMsgAMGrantGuestPasses2Response passes_granted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAMGrantGuestPasses2Response. + * @exports ICMsgAMGrantGuestPasses2Response + * @interface ICMsgAMGrantGuestPasses2Response + * @augments CMsgAMGrantGuestPasses2Response.$Properties + * @deprecated Use CMsgAMGrantGuestPasses2Response.$Properties instead. + */ + + /** + * Shape of a CMsgAMGrantGuestPasses2Response. + * @typedef {CMsgAMGrantGuestPasses2Response.$Properties} CMsgAMGrantGuestPasses2Response.$Shape */ /** * Constructs a new CMsgAMGrantGuestPasses2Response. * @exports CMsgAMGrantGuestPasses2Response * @classdesc Represents a CMsgAMGrantGuestPasses2Response. - * @implements ICMsgAMGrantGuestPasses2Response * @constructor - * @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAMGrantGuestPasses2Response(properties) { + var CMsgAMGrantGuestPasses2Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAMGrantGuestPasses2Response eresult. @@ -62841,10 +81281,14 @@ * @function create * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set + * @param {CMsgAMGrantGuestPasses2Response.$Properties=} [properties] Properties to set * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response instance + * @type {{ + * (properties: CMsgAMGrantGuestPasses2Response.$Shape): CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape; + * (properties?: CMsgAMGrantGuestPasses2Response.$Properties): CMsgAMGrantGuestPasses2Response; + * }} */ - CMsgAMGrantGuestPasses2Response.create = function create(properties) { + CMsgAMGrantGuestPasses2Response.create = function(properties) { return new CMsgAMGrantGuestPasses2Response(properties); }; @@ -62853,17 +81297,24 @@ * @function encode * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response} message CMsgAMGrantGuestPasses2Response message or plain object to encode + * @param {CMsgAMGrantGuestPasses2Response.$Properties} message CMsgAMGrantGuestPasses2Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2Response.encode = function encode(message, writer) { + CMsgAMGrantGuestPasses2Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); - if (message.passes_granted != null && Object.hasOwnProperty.call(message, "passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.passes_granted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -62872,12 +81323,12 @@ * @function encodeDelimited * @memberof CMsgAMGrantGuestPasses2Response * @static - * @param {ICMsgAMGrantGuestPasses2Response} message CMsgAMGrantGuestPasses2Response message or plain object to encode + * @param {CMsgAMGrantGuestPasses2Response.$Properties} message CMsgAMGrantGuestPasses2Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAMGrantGuestPasses2Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAMGrantGuestPasses2Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -62887,28 +81338,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response + * @returns {CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape} CMsgAMGrantGuestPasses2Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2Response.decode = function decode(reader, length) { + CMsgAMGrantGuestPasses2Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAMGrantGuestPasses2Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAMGrantGuestPasses2Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - case 2: - message.passes_granted = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.passes_granted = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -62918,11 +81389,11 @@ * @memberof CMsgAMGrantGuestPasses2Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response + * @returns {CMsgAMGrantGuestPasses2Response & CMsgAMGrantGuestPasses2Response.$Shape} CMsgAMGrantGuestPasses2Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAMGrantGuestPasses2Response.decodeDelimited = function decodeDelimited(reader) { + CMsgAMGrantGuestPasses2Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -62936,13 +81407,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAMGrantGuestPasses2Response.verify = function verify(message) { + CMsgAMGrantGuestPasses2Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; - if (message.passes_granted != null && message.hasOwnProperty("passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) if (!$util.isInteger(message.passes_granted)) return "passes_granted: integer expected"; return null; @@ -62956,9 +81431,15 @@ * @param {Object.} object Plain object * @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response */ - CMsgAMGrantGuestPasses2Response.fromObject = function fromObject(object) { + CMsgAMGrantGuestPasses2Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAMGrantGuestPasses2Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAMGrantGuestPasses2Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAMGrantGuestPasses2Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -62976,17 +81457,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAMGrantGuestPasses2Response.toObject = function toObject(message, options) { + CMsgAMGrantGuestPasses2Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult = 2; object.passes_granted = 0; } - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; - if (message.passes_granted != null && message.hasOwnProperty("passes_granted")) + if (message.passes_granted != null && $Object.hasOwnProperty.call(message, "passes_granted")) object.passes_granted = message.passes_granted; return object; }; @@ -62998,8 +81483,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAMGrantGuestPasses2Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAMGrantGuestPasses2Response.prototype.toJSON = function() { + return CMsgAMGrantGuestPasses2Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAMGrantGuestPasses2Response + * @function getTypeUrl + * @memberof CMsgAMGrantGuestPasses2Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAMGrantGuestPasses2Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAMGrantGuestPasses2Response"; }; return CMsgAMGrantGuestPasses2Response; @@ -63009,26 +81508,39 @@ /** * Properties of a CGCSystemMsg_GetAccountDetails. - * @exports ICGCSystemMsg_GetAccountDetails - * @interface ICGCSystemMsg_GetAccountDetails + * @typedef {Object} CGCSystemMsg_GetAccountDetails.$Properties * @property {number|Long|null} [steamid] CGCSystemMsg_GetAccountDetails steamid * @property {number|null} [appid] CGCSystemMsg_GetAccountDetails appid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetAccountDetails. + * @exports ICGCSystemMsg_GetAccountDetails + * @interface ICGCSystemMsg_GetAccountDetails + * @augments CGCSystemMsg_GetAccountDetails.$Properties + * @deprecated Use CGCSystemMsg_GetAccountDetails.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetAccountDetails. + * @typedef {CGCSystemMsg_GetAccountDetails.$Properties} CGCSystemMsg_GetAccountDetails.$Shape */ /** * Constructs a new CGCSystemMsg_GetAccountDetails. * @exports CGCSystemMsg_GetAccountDetails * @classdesc Represents a CGCSystemMsg_GetAccountDetails. - * @implements ICGCSystemMsg_GetAccountDetails * @constructor - * @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetAccountDetails(properties) { + var CGCSystemMsg_GetAccountDetails = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetAccountDetails steamid. @@ -63036,7 +81548,7 @@ * @memberof CGCSystemMsg_GetAccountDetails * @instance */ - CGCSystemMsg_GetAccountDetails.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCSystemMsg_GetAccountDetails.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CGCSystemMsg_GetAccountDetails appid. @@ -63051,10 +81563,14 @@ * @function create * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails instance + * @type {{ + * (properties: CGCSystemMsg_GetAccountDetails.$Shape): CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape; + * (properties?: CGCSystemMsg_GetAccountDetails.$Properties): CGCSystemMsg_GetAccountDetails; + * }} */ - CGCSystemMsg_GetAccountDetails.create = function create(properties) { + CGCSystemMsg_GetAccountDetails.create = function(properties) { return new CGCSystemMsg_GetAccountDetails(properties); }; @@ -63063,17 +81579,24 @@ * @function encode * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails} message CGCSystemMsg_GetAccountDetails message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails.$Properties} message CGCSystemMsg_GetAccountDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails.encode = function encode(message, writer) { + CGCSystemMsg_GetAccountDetails.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -63082,12 +81605,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetAccountDetails * @static - * @param {ICGCSystemMsg_GetAccountDetails} message CGCSystemMsg_GetAccountDetails message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails.$Properties} message CGCSystemMsg_GetAccountDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetAccountDetails.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -63097,28 +81620,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails + * @returns {CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape} CGCSystemMsg_GetAccountDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails.decode = function decode(reader, length) { + CGCSystemMsg_GetAccountDetails.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetAccountDetails(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetAccountDetails(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -63128,11 +81671,11 @@ * @memberof CGCSystemMsg_GetAccountDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails + * @returns {CGCSystemMsg_GetAccountDetails & CGCSystemMsg_GetAccountDetails.$Shape} CGCSystemMsg_GetAccountDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetAccountDetails.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -63146,13 +81689,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetAccountDetails.verify = function verify(message) { + CGCSystemMsg_GetAccountDetails.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; return null; @@ -63166,19 +81713,25 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails */ - CGCSystemMsg_GetAccountDetails.fromObject = function fromObject(object) { + CGCSystemMsg_GetAccountDetails.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetAccountDetails) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetAccountDetails: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetAccountDetails(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; return message; @@ -63193,24 +81746,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetAccountDetails.toObject = function toObject(message, options) { + CGCSystemMsg_GetAccountDetails.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; return object; }; @@ -63222,8 +81781,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetAccountDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetAccountDetails.prototype.toJSON = function() { + return CGCSystemMsg_GetAccountDetails.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetAccountDetails + * @function getTypeUrl + * @memberof CGCSystemMsg_GetAccountDetails + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetAccountDetails.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetAccountDetails"; }; return CGCSystemMsg_GetAccountDetails; @@ -63233,8 +81806,7 @@ /** * Properties of a CGCSystemMsg_GetAccountDetails_Response. - * @exports ICGCSystemMsg_GetAccountDetails_Response - * @interface ICGCSystemMsg_GetAccountDetails_Response + * @typedef {Object} CGCSystemMsg_GetAccountDetails_Response.$Properties * @property {number|null} [eresult_deprecated] CGCSystemMsg_GetAccountDetails_Response eresult_deprecated * @property {string|null} [account_name] CGCSystemMsg_GetAccountDetails_Response account_name * @property {string|null} [persona_name] CGCSystemMsg_GetAccountDetails_Response persona_name @@ -63269,22 +81841,36 @@ * @property {number|null} [rt_identity_linked] CGCSystemMsg_GetAccountDetails_Response rt_identity_linked * @property {number|null} [rt_birth_date] CGCSystemMsg_GetAccountDetails_Response rt_birth_date * @property {string|null} [txn_country_code] CGCSystemMsg_GetAccountDetails_Response txn_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetAccountDetails_Response. + * @exports ICGCSystemMsg_GetAccountDetails_Response + * @interface ICGCSystemMsg_GetAccountDetails_Response + * @augments CGCSystemMsg_GetAccountDetails_Response.$Properties + * @deprecated Use CGCSystemMsg_GetAccountDetails_Response.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetAccountDetails_Response. + * @typedef {CGCSystemMsg_GetAccountDetails_Response.$Properties} CGCSystemMsg_GetAccountDetails_Response.$Shape */ /** * Constructs a new CGCSystemMsg_GetAccountDetails_Response. * @exports CGCSystemMsg_GetAccountDetails_Response * @classdesc Represents a CGCSystemMsg_GetAccountDetails_Response. - * @implements ICGCSystemMsg_GetAccountDetails_Response * @constructor - * @param {ICGCSystemMsg_GetAccountDetails_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetAccountDetails_Response(properties) { + var CGCSystemMsg_GetAccountDetails_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetAccountDetails_Response eresult_deprecated. @@ -63563,10 +82149,14 @@ * @function create * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response instance + * @type {{ + * (properties: CGCSystemMsg_GetAccountDetails_Response.$Shape): CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape; + * (properties?: CGCSystemMsg_GetAccountDetails_Response.$Properties): CGCSystemMsg_GetAccountDetails_Response; + * }} */ - CGCSystemMsg_GetAccountDetails_Response.create = function create(properties) { + CGCSystemMsg_GetAccountDetails_Response.create = function(properties) { return new CGCSystemMsg_GetAccountDetails_Response(properties); }; @@ -63575,81 +82165,88 @@ * @function encode * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails_Response.encode = function encode(message, writer) { + CGCSystemMsg_GetAccountDetails_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult_deprecated != null && Object.hasOwnProperty.call(message, "eresult_deprecated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult_deprecated); - if (message.account_name != null && Object.hasOwnProperty.call(message, "account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.account_name); - if (message.persona_name != null && Object.hasOwnProperty.call(message, "persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.persona_name); - if (message.is_profile_public != null && Object.hasOwnProperty.call(message, "is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_profile_public); - if (message.is_inventory_public != null && Object.hasOwnProperty.call(message, "is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_inventory_public); - if (message.is_vac_banned != null && Object.hasOwnProperty.call(message, "is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.is_vac_banned); - if (message.is_cyber_cafe != null && Object.hasOwnProperty.call(message, "is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.is_cyber_cafe); - if (message.is_school_account != null && Object.hasOwnProperty.call(message, "is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.is_school_account); - if (message.is_limited != null && Object.hasOwnProperty.call(message, "is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.is_limited); - if (message.is_subscribed != null && Object.hasOwnProperty.call(message, "is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.is_subscribed); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 12, wireType 0 =*/96).uint32(message["package"]); - if (message.is_free_trial_account != null && Object.hasOwnProperty.call(message, "is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) writer.uint32(/* id 13, wireType 0 =*/104).bool(message.is_free_trial_account); - if (message.free_trial_expiration != null && Object.hasOwnProperty.call(message, "free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) writer.uint32(/* id 14, wireType 0 =*/112).uint32(message.free_trial_expiration); - if (message.is_low_violence != null && Object.hasOwnProperty.call(message, "is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) writer.uint32(/* id 15, wireType 0 =*/120).bool(message.is_low_violence); - if (message.is_account_locked_down != null && Object.hasOwnProperty.call(message, "is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.is_account_locked_down); - if (message.is_community_banned != null && Object.hasOwnProperty.call(message, "is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.is_community_banned); - if (message.is_trade_banned != null && Object.hasOwnProperty.call(message, "is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.is_trade_banned); - if (message.trade_ban_expiration != null && Object.hasOwnProperty.call(message, "trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.trade_ban_expiration); - if (message.accountid != null && Object.hasOwnProperty.call(message, "accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.accountid); - if (message.suspension_end_time != null && Object.hasOwnProperty.call(message, "suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.suspension_end_time); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) writer.uint32(/* id 22, wireType 2 =*/178).string(message.currency); - if (message.steam_level != null && Object.hasOwnProperty.call(message, "steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.steam_level); - if (message.friend_count != null && Object.hasOwnProperty.call(message, "friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.friend_count); - if (message.account_creation_time != null && Object.hasOwnProperty.call(message, "account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.account_creation_time); - if (message.is_steamguard_enabled != null && Object.hasOwnProperty.call(message, "is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.is_steamguard_enabled); - if (message.is_phone_verified != null && Object.hasOwnProperty.call(message, "is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) writer.uint32(/* id 28, wireType 0 =*/224).bool(message.is_phone_verified); - if (message.is_two_factor_auth_enabled != null && Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) writer.uint32(/* id 29, wireType 0 =*/232).bool(message.is_two_factor_auth_enabled); - if (message.two_factor_enabled_time != null && Object.hasOwnProperty.call(message, "two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.two_factor_enabled_time); - if (message.phone_verification_time != null && Object.hasOwnProperty.call(message, "phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.phone_verification_time); - if (message.phone_id != null && Object.hasOwnProperty.call(message, "phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) writer.uint32(/* id 33, wireType 0 =*/264).uint64(message.phone_id); - if (message.is_phone_identifying != null && Object.hasOwnProperty.call(message, "is_phone_identifying")) + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) writer.uint32(/* id 34, wireType 0 =*/272).bool(message.is_phone_identifying); - if (message.rt_identity_linked != null && Object.hasOwnProperty.call(message, "rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) writer.uint32(/* id 35, wireType 0 =*/280).uint32(message.rt_identity_linked); - if (message.rt_birth_date != null && Object.hasOwnProperty.call(message, "rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) writer.uint32(/* id 36, wireType 0 =*/288).uint32(message.rt_birth_date); - if (message.txn_country_code != null && Object.hasOwnProperty.call(message, "txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.txn_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -63658,12 +82255,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetAccountDetails_Response * @static - * @param {ICGCSystemMsg_GetAccountDetails_Response} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode + * @param {CGCSystemMsg_GetAccountDetails_Response.$Properties} message CGCSystemMsg_GetAccountDetails_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetAccountDetails_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetAccountDetails_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -63673,124 +82270,240 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response + * @returns {CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape} CGCSystemMsg_GetAccountDetails_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails_Response.decode = function decode(reader, length) { + CGCSystemMsg_GetAccountDetails_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetAccountDetails_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetAccountDetails_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult_deprecated = reader.uint32(); - break; - case 2: - message.account_name = reader.string(); - break; - case 3: - message.persona_name = reader.string(); - break; - case 4: - message.is_profile_public = reader.bool(); - break; - case 5: - message.is_inventory_public = reader.bool(); - break; - case 7: - message.is_vac_banned = reader.bool(); - break; - case 8: - message.is_cyber_cafe = reader.bool(); - break; - case 9: - message.is_school_account = reader.bool(); - break; - case 10: - message.is_limited = reader.bool(); - break; - case 11: - message.is_subscribed = reader.bool(); - break; - case 12: - message["package"] = reader.uint32(); - break; - case 13: - message.is_free_trial_account = reader.bool(); - break; - case 14: - message.free_trial_expiration = reader.uint32(); - break; - case 15: - message.is_low_violence = reader.bool(); - break; - case 16: - message.is_account_locked_down = reader.bool(); - break; - case 17: - message.is_community_banned = reader.bool(); - break; - case 18: - message.is_trade_banned = reader.bool(); - break; - case 19: - message.trade_ban_expiration = reader.uint32(); - break; - case 20: - message.accountid = reader.uint32(); - break; - case 21: - message.suspension_end_time = reader.uint32(); - break; - case 22: - message.currency = reader.string(); - break; - case 23: - message.steam_level = reader.uint32(); - break; - case 24: - message.friend_count = reader.uint32(); - break; - case 25: - message.account_creation_time = reader.uint32(); - break; - case 27: - message.is_steamguard_enabled = reader.bool(); - break; - case 28: - message.is_phone_verified = reader.bool(); - break; - case 29: - message.is_two_factor_auth_enabled = reader.bool(); - break; - case 30: - message.two_factor_enabled_time = reader.uint32(); - break; - case 31: - message.phone_verification_time = reader.uint32(); - break; - case 33: - message.phone_id = reader.uint64(); - break; - case 34: - message.is_phone_identifying = reader.bool(); - break; - case 35: - message.rt_identity_linked = reader.uint32(); - break; - case 36: - message.rt_birth_date = reader.uint32(); - break; - case 37: - message.txn_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult_deprecated = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.account_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.persona_name = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_profile_public = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_inventory_public = reader.bool(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.is_vac_banned = reader.bool(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.is_cyber_cafe = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.is_school_account = reader.bool(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.is_limited = reader.bool(); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.is_subscribed = reader.bool(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message["package"] = reader.uint32(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.is_free_trial_account = reader.bool(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.free_trial_expiration = reader.uint32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.is_low_violence = reader.bool(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.is_account_locked_down = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.is_community_banned = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.is_trade_banned = reader.bool(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.trade_ban_expiration = reader.uint32(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.accountid = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.suspension_end_time = reader.uint32(); + continue; + } + case 22: { + if (wireType !== 2) + break; + message.currency = reader.string(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.steam_level = reader.uint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.friend_count = reader.uint32(); + continue; + } + case 25: { + if (wireType !== 0) + break; + message.account_creation_time = reader.uint32(); + continue; + } + case 27: { + if (wireType !== 0) + break; + message.is_steamguard_enabled = reader.bool(); + continue; + } + case 28: { + if (wireType !== 0) + break; + message.is_phone_verified = reader.bool(); + continue; + } + case 29: { + if (wireType !== 0) + break; + message.is_two_factor_auth_enabled = reader.bool(); + continue; + } + case 30: { + if (wireType !== 0) + break; + message.two_factor_enabled_time = reader.uint32(); + continue; + } + case 31: { + if (wireType !== 0) + break; + message.phone_verification_time = reader.uint32(); + continue; + } + case 33: { + if (wireType !== 0) + break; + message.phone_id = reader.uint64(); + continue; + } + case 34: { + if (wireType !== 0) + break; + message.is_phone_identifying = reader.bool(); + continue; + } + case 35: { + if (wireType !== 0) + break; + message.rt_identity_linked = reader.uint32(); + continue; + } + case 36: { + if (wireType !== 0) + break; + message.rt_birth_date = reader.uint32(); + continue; + } + case 37: { + if (wireType !== 2) + break; + message.txn_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -63800,11 +82513,11 @@ * @memberof CGCSystemMsg_GetAccountDetails_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response + * @returns {CGCSystemMsg_GetAccountDetails_Response & CGCSystemMsg_GetAccountDetails_Response.$Shape} CGCSystemMsg_GetAccountDetails_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetAccountDetails_Response.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetAccountDetails_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -63818,109 +82531,113 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetAccountDetails_Response.verify = function verify(message) { + CGCSystemMsg_GetAccountDetails_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) if (!$util.isInteger(message.eresult_deprecated)) return "eresult_deprecated: integer expected"; - if (message.account_name != null && message.hasOwnProperty("account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) if (!$util.isString(message.account_name)) return "account_name: string expected"; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) if (!$util.isString(message.persona_name)) return "persona_name: string expected"; - if (message.is_profile_public != null && message.hasOwnProperty("is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) if (typeof message.is_profile_public !== "boolean") return "is_profile_public: boolean expected"; - if (message.is_inventory_public != null && message.hasOwnProperty("is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) if (typeof message.is_inventory_public !== "boolean") return "is_inventory_public: boolean expected"; - if (message.is_vac_banned != null && message.hasOwnProperty("is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) if (typeof message.is_vac_banned !== "boolean") return "is_vac_banned: boolean expected"; - if (message.is_cyber_cafe != null && message.hasOwnProperty("is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) if (typeof message.is_cyber_cafe !== "boolean") return "is_cyber_cafe: boolean expected"; - if (message.is_school_account != null && message.hasOwnProperty("is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) if (typeof message.is_school_account !== "boolean") return "is_school_account: boolean expected"; - if (message.is_limited != null && message.hasOwnProperty("is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) if (typeof message.is_limited !== "boolean") return "is_limited: boolean expected"; - if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) if (typeof message.is_subscribed !== "boolean") return "is_subscribed: boolean expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) if (!$util.isInteger(message["package"])) return "package: integer expected"; - if (message.is_free_trial_account != null && message.hasOwnProperty("is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) if (typeof message.is_free_trial_account !== "boolean") return "is_free_trial_account: boolean expected"; - if (message.free_trial_expiration != null && message.hasOwnProperty("free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) if (!$util.isInteger(message.free_trial_expiration)) return "free_trial_expiration: integer expected"; - if (message.is_low_violence != null && message.hasOwnProperty("is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) if (typeof message.is_low_violence !== "boolean") return "is_low_violence: boolean expected"; - if (message.is_account_locked_down != null && message.hasOwnProperty("is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) if (typeof message.is_account_locked_down !== "boolean") return "is_account_locked_down: boolean expected"; - if (message.is_community_banned != null && message.hasOwnProperty("is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) if (typeof message.is_community_banned !== "boolean") return "is_community_banned: boolean expected"; - if (message.is_trade_banned != null && message.hasOwnProperty("is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) if (typeof message.is_trade_banned !== "boolean") return "is_trade_banned: boolean expected"; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) if (!$util.isInteger(message.trade_ban_expiration)) return "trade_ban_expiration: integer expected"; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) if (!$util.isInteger(message.accountid)) return "accountid: integer expected"; - if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) if (!$util.isInteger(message.suspension_end_time)) return "suspension_end_time: integer expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) if (!$util.isString(message.currency)) return "currency: string expected"; - if (message.steam_level != null && message.hasOwnProperty("steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) if (!$util.isInteger(message.steam_level)) return "steam_level: integer expected"; - if (message.friend_count != null && message.hasOwnProperty("friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) if (!$util.isInteger(message.friend_count)) return "friend_count: integer expected"; - if (message.account_creation_time != null && message.hasOwnProperty("account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) if (!$util.isInteger(message.account_creation_time)) return "account_creation_time: integer expected"; - if (message.is_steamguard_enabled != null && message.hasOwnProperty("is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) if (typeof message.is_steamguard_enabled !== "boolean") return "is_steamguard_enabled: boolean expected"; - if (message.is_phone_verified != null && message.hasOwnProperty("is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) if (typeof message.is_phone_verified !== "boolean") return "is_phone_verified: boolean expected"; - if (message.is_two_factor_auth_enabled != null && message.hasOwnProperty("is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) if (typeof message.is_two_factor_auth_enabled !== "boolean") return "is_two_factor_auth_enabled: boolean expected"; - if (message.two_factor_enabled_time != null && message.hasOwnProperty("two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) if (!$util.isInteger(message.two_factor_enabled_time)) return "two_factor_enabled_time: integer expected"; - if (message.phone_verification_time != null && message.hasOwnProperty("phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) if (!$util.isInteger(message.phone_verification_time)) return "phone_verification_time: integer expected"; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) if (!$util.isInteger(message.phone_id) && !(message.phone_id && $util.isInteger(message.phone_id.low) && $util.isInteger(message.phone_id.high))) return "phone_id: integer|Long expected"; - if (message.is_phone_identifying != null && message.hasOwnProperty("is_phone_identifying")) + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) if (typeof message.is_phone_identifying !== "boolean") return "is_phone_identifying: boolean expected"; - if (message.rt_identity_linked != null && message.hasOwnProperty("rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) if (!$util.isInteger(message.rt_identity_linked)) return "rt_identity_linked: integer expected"; - if (message.rt_birth_date != null && message.hasOwnProperty("rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) if (!$util.isInteger(message.rt_birth_date)) return "rt_birth_date: integer expected"; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) if (!$util.isString(message.txn_country_code)) return "txn_country_code: string expected"; return null; @@ -63934,44 +82651,50 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response */ - CGCSystemMsg_GetAccountDetails_Response.fromObject = function fromObject(object) { + CGCSystemMsg_GetAccountDetails_Response.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetAccountDetails_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetAccountDetails_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetAccountDetails_Response(); if (object.eresult_deprecated != null) message.eresult_deprecated = object.eresult_deprecated >>> 0; if (object.account_name != null) - message.account_name = String(object.account_name); + message.account_name = $String(object.account_name); if (object.persona_name != null) - message.persona_name = String(object.persona_name); + message.persona_name = $String(object.persona_name); if (object.is_profile_public != null) - message.is_profile_public = Boolean(object.is_profile_public); + message.is_profile_public = $Boolean(object.is_profile_public); if (object.is_inventory_public != null) - message.is_inventory_public = Boolean(object.is_inventory_public); + message.is_inventory_public = $Boolean(object.is_inventory_public); if (object.is_vac_banned != null) - message.is_vac_banned = Boolean(object.is_vac_banned); + message.is_vac_banned = $Boolean(object.is_vac_banned); if (object.is_cyber_cafe != null) - message.is_cyber_cafe = Boolean(object.is_cyber_cafe); + message.is_cyber_cafe = $Boolean(object.is_cyber_cafe); if (object.is_school_account != null) - message.is_school_account = Boolean(object.is_school_account); + message.is_school_account = $Boolean(object.is_school_account); if (object.is_limited != null) - message.is_limited = Boolean(object.is_limited); + message.is_limited = $Boolean(object.is_limited); if (object.is_subscribed != null) - message.is_subscribed = Boolean(object.is_subscribed); + message.is_subscribed = $Boolean(object.is_subscribed); if (object["package"] != null) message["package"] = object["package"] >>> 0; if (object.is_free_trial_account != null) - message.is_free_trial_account = Boolean(object.is_free_trial_account); + message.is_free_trial_account = $Boolean(object.is_free_trial_account); if (object.free_trial_expiration != null) message.free_trial_expiration = object.free_trial_expiration >>> 0; if (object.is_low_violence != null) - message.is_low_violence = Boolean(object.is_low_violence); + message.is_low_violence = $Boolean(object.is_low_violence); if (object.is_account_locked_down != null) - message.is_account_locked_down = Boolean(object.is_account_locked_down); + message.is_account_locked_down = $Boolean(object.is_account_locked_down); if (object.is_community_banned != null) - message.is_community_banned = Boolean(object.is_community_banned); + message.is_community_banned = $Boolean(object.is_community_banned); if (object.is_trade_banned != null) - message.is_trade_banned = Boolean(object.is_trade_banned); + message.is_trade_banned = $Boolean(object.is_trade_banned); if (object.trade_ban_expiration != null) message.trade_ban_expiration = object.trade_ban_expiration >>> 0; if (object.accountid != null) @@ -63979,7 +82702,7 @@ if (object.suspension_end_time != null) message.suspension_end_time = object.suspension_end_time >>> 0; if (object.currency != null) - message.currency = String(object.currency); + message.currency = $String(object.currency); if (object.steam_level != null) message.steam_level = object.steam_level >>> 0; if (object.friend_count != null) @@ -63987,32 +82710,32 @@ if (object.account_creation_time != null) message.account_creation_time = object.account_creation_time >>> 0; if (object.is_steamguard_enabled != null) - message.is_steamguard_enabled = Boolean(object.is_steamguard_enabled); + message.is_steamguard_enabled = $Boolean(object.is_steamguard_enabled); if (object.is_phone_verified != null) - message.is_phone_verified = Boolean(object.is_phone_verified); + message.is_phone_verified = $Boolean(object.is_phone_verified); if (object.is_two_factor_auth_enabled != null) - message.is_two_factor_auth_enabled = Boolean(object.is_two_factor_auth_enabled); + message.is_two_factor_auth_enabled = $Boolean(object.is_two_factor_auth_enabled); if (object.two_factor_enabled_time != null) message.two_factor_enabled_time = object.two_factor_enabled_time >>> 0; if (object.phone_verification_time != null) message.phone_verification_time = object.phone_verification_time >>> 0; if (object.phone_id != null) if ($util.Long) - (message.phone_id = $util.Long.fromValue(object.phone_id)).unsigned = true; + message.phone_id = $util.Long.fromValue(object.phone_id, true); else if (typeof object.phone_id === "string") - message.phone_id = parseInt(object.phone_id, 10); + message.phone_id = $parseInt(object.phone_id, 10); else if (typeof object.phone_id === "number") message.phone_id = object.phone_id; else if (typeof object.phone_id === "object") message.phone_id = new $util.LongBits(object.phone_id.low >>> 0, object.phone_id.high >>> 0).toNumber(true); if (object.is_phone_identifying != null) - message.is_phone_identifying = Boolean(object.is_phone_identifying); + message.is_phone_identifying = $Boolean(object.is_phone_identifying); if (object.rt_identity_linked != null) message.rt_identity_linked = object.rt_identity_linked >>> 0; if (object.rt_birth_date != null) message.rt_birth_date = object.rt_birth_date >>> 0; if (object.txn_country_code != null) - message.txn_country_code = String(object.txn_country_code); + message.txn_country_code = $String(object.txn_country_code); return message; }; @@ -64025,9 +82748,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetAccountDetails_Response.toObject = function toObject(message, options) { + CGCSystemMsg_GetAccountDetails_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.eresult_deprecated = 2; @@ -64061,84 +82788,86 @@ object.phone_verification_time = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.phone_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.phone_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.phone_id = options.longs === String ? "0" : 0; + object.phone_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.is_phone_identifying = false; object.rt_identity_linked = 0; object.rt_birth_date = 0; object.txn_country_code = ""; } - if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated")) + if (message.eresult_deprecated != null && $Object.hasOwnProperty.call(message, "eresult_deprecated")) object.eresult_deprecated = message.eresult_deprecated; - if (message.account_name != null && message.hasOwnProperty("account_name")) + if (message.account_name != null && $Object.hasOwnProperty.call(message, "account_name")) object.account_name = message.account_name; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) object.persona_name = message.persona_name; - if (message.is_profile_public != null && message.hasOwnProperty("is_profile_public")) + if (message.is_profile_public != null && $Object.hasOwnProperty.call(message, "is_profile_public")) object.is_profile_public = message.is_profile_public; - if (message.is_inventory_public != null && message.hasOwnProperty("is_inventory_public")) + if (message.is_inventory_public != null && $Object.hasOwnProperty.call(message, "is_inventory_public")) object.is_inventory_public = message.is_inventory_public; - if (message.is_vac_banned != null && message.hasOwnProperty("is_vac_banned")) + if (message.is_vac_banned != null && $Object.hasOwnProperty.call(message, "is_vac_banned")) object.is_vac_banned = message.is_vac_banned; - if (message.is_cyber_cafe != null && message.hasOwnProperty("is_cyber_cafe")) + if (message.is_cyber_cafe != null && $Object.hasOwnProperty.call(message, "is_cyber_cafe")) object.is_cyber_cafe = message.is_cyber_cafe; - if (message.is_school_account != null && message.hasOwnProperty("is_school_account")) + if (message.is_school_account != null && $Object.hasOwnProperty.call(message, "is_school_account")) object.is_school_account = message.is_school_account; - if (message.is_limited != null && message.hasOwnProperty("is_limited")) + if (message.is_limited != null && $Object.hasOwnProperty.call(message, "is_limited")) object.is_limited = message.is_limited; - if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed")) + if (message.is_subscribed != null && $Object.hasOwnProperty.call(message, "is_subscribed")) object.is_subscribed = message.is_subscribed; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; - if (message.is_free_trial_account != null && message.hasOwnProperty("is_free_trial_account")) + if (message.is_free_trial_account != null && $Object.hasOwnProperty.call(message, "is_free_trial_account")) object.is_free_trial_account = message.is_free_trial_account; - if (message.free_trial_expiration != null && message.hasOwnProperty("free_trial_expiration")) + if (message.free_trial_expiration != null && $Object.hasOwnProperty.call(message, "free_trial_expiration")) object.free_trial_expiration = message.free_trial_expiration; - if (message.is_low_violence != null && message.hasOwnProperty("is_low_violence")) + if (message.is_low_violence != null && $Object.hasOwnProperty.call(message, "is_low_violence")) object.is_low_violence = message.is_low_violence; - if (message.is_account_locked_down != null && message.hasOwnProperty("is_account_locked_down")) + if (message.is_account_locked_down != null && $Object.hasOwnProperty.call(message, "is_account_locked_down")) object.is_account_locked_down = message.is_account_locked_down; - if (message.is_community_banned != null && message.hasOwnProperty("is_community_banned")) + if (message.is_community_banned != null && $Object.hasOwnProperty.call(message, "is_community_banned")) object.is_community_banned = message.is_community_banned; - if (message.is_trade_banned != null && message.hasOwnProperty("is_trade_banned")) + if (message.is_trade_banned != null && $Object.hasOwnProperty.call(message, "is_trade_banned")) object.is_trade_banned = message.is_trade_banned; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) object.trade_ban_expiration = message.trade_ban_expiration; - if (message.accountid != null && message.hasOwnProperty("accountid")) + if (message.accountid != null && $Object.hasOwnProperty.call(message, "accountid")) object.accountid = message.accountid; - if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time")) + if (message.suspension_end_time != null && $Object.hasOwnProperty.call(message, "suspension_end_time")) object.suspension_end_time = message.suspension_end_time; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) object.currency = message.currency; - if (message.steam_level != null && message.hasOwnProperty("steam_level")) + if (message.steam_level != null && $Object.hasOwnProperty.call(message, "steam_level")) object.steam_level = message.steam_level; - if (message.friend_count != null && message.hasOwnProperty("friend_count")) + if (message.friend_count != null && $Object.hasOwnProperty.call(message, "friend_count")) object.friend_count = message.friend_count; - if (message.account_creation_time != null && message.hasOwnProperty("account_creation_time")) + if (message.account_creation_time != null && $Object.hasOwnProperty.call(message, "account_creation_time")) object.account_creation_time = message.account_creation_time; - if (message.is_steamguard_enabled != null && message.hasOwnProperty("is_steamguard_enabled")) + if (message.is_steamguard_enabled != null && $Object.hasOwnProperty.call(message, "is_steamguard_enabled")) object.is_steamguard_enabled = message.is_steamguard_enabled; - if (message.is_phone_verified != null && message.hasOwnProperty("is_phone_verified")) + if (message.is_phone_verified != null && $Object.hasOwnProperty.call(message, "is_phone_verified")) object.is_phone_verified = message.is_phone_verified; - if (message.is_two_factor_auth_enabled != null && message.hasOwnProperty("is_two_factor_auth_enabled")) + if (message.is_two_factor_auth_enabled != null && $Object.hasOwnProperty.call(message, "is_two_factor_auth_enabled")) object.is_two_factor_auth_enabled = message.is_two_factor_auth_enabled; - if (message.two_factor_enabled_time != null && message.hasOwnProperty("two_factor_enabled_time")) + if (message.two_factor_enabled_time != null && $Object.hasOwnProperty.call(message, "two_factor_enabled_time")) object.two_factor_enabled_time = message.two_factor_enabled_time; - if (message.phone_verification_time != null && message.hasOwnProperty("phone_verification_time")) + if (message.phone_verification_time != null && $Object.hasOwnProperty.call(message, "phone_verification_time")) object.phone_verification_time = message.phone_verification_time; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) - if (typeof message.phone_id === "number") - object.phone_id = options.longs === String ? String(message.phone_id) : message.phone_id; + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.phone_id = typeof message.phone_id === "number" ? $BigInt(message.phone_id) : $util.Long.fromBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0, true).toBigInt(); + else if (typeof message.phone_id === "number") + object.phone_id = options.longs === $String ? $String(message.phone_id) : message.phone_id; else - object.phone_id = options.longs === String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; - if (message.is_phone_identifying != null && message.hasOwnProperty("is_phone_identifying")) + object.phone_id = options.longs === $String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === $Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; + if (message.is_phone_identifying != null && $Object.hasOwnProperty.call(message, "is_phone_identifying")) object.is_phone_identifying = message.is_phone_identifying; - if (message.rt_identity_linked != null && message.hasOwnProperty("rt_identity_linked")) + if (message.rt_identity_linked != null && $Object.hasOwnProperty.call(message, "rt_identity_linked")) object.rt_identity_linked = message.rt_identity_linked; - if (message.rt_birth_date != null && message.hasOwnProperty("rt_birth_date")) + if (message.rt_birth_date != null && $Object.hasOwnProperty.call(message, "rt_birth_date")) object.rt_birth_date = message.rt_birth_date; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) object.txn_country_code = message.txn_country_code; return object; }; @@ -64150,8 +82879,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetAccountDetails_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetAccountDetails_Response.prototype.toJSON = function() { + return CGCSystemMsg_GetAccountDetails_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetAccountDetails_Response + * @function getTypeUrl + * @memberof CGCSystemMsg_GetAccountDetails_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetAccountDetails_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetAccountDetails_Response"; }; return CGCSystemMsg_GetAccountDetails_Response; @@ -64161,26 +82904,39 @@ /** * Properties of a CMsgGCCheckClanMembership. - * @exports ICMsgGCCheckClanMembership - * @interface ICMsgGCCheckClanMembership + * @typedef {Object} CMsgGCCheckClanMembership.$Properties * @property {number|Long|null} [steamid] CMsgGCCheckClanMembership steamid * @property {number|null} [clanid] CMsgGCCheckClanMembership clanid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckClanMembership. + * @exports ICMsgGCCheckClanMembership + * @interface ICMsgGCCheckClanMembership + * @augments CMsgGCCheckClanMembership.$Properties + * @deprecated Use CMsgGCCheckClanMembership.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckClanMembership. + * @typedef {CMsgGCCheckClanMembership.$Properties} CMsgGCCheckClanMembership.$Shape */ /** * Constructs a new CMsgGCCheckClanMembership. * @exports CMsgGCCheckClanMembership * @classdesc Represents a CMsgGCCheckClanMembership. - * @implements ICMsgGCCheckClanMembership * @constructor - * @param {ICMsgGCCheckClanMembership=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckClanMembership(properties) { + var CMsgGCCheckClanMembership = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckClanMembership steamid. @@ -64188,7 +82944,7 @@ * @memberof CMsgGCCheckClanMembership * @instance */ - CMsgGCCheckClanMembership.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckClanMembership.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCCheckClanMembership clanid. @@ -64203,10 +82959,14 @@ * @function create * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership instance + * @type {{ + * (properties: CMsgGCCheckClanMembership.$Shape): CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape; + * (properties?: CMsgGCCheckClanMembership.$Properties): CMsgGCCheckClanMembership; + * }} */ - CMsgGCCheckClanMembership.create = function create(properties) { + CMsgGCCheckClanMembership.create = function(properties) { return new CMsgGCCheckClanMembership(properties); }; @@ -64215,17 +82975,24 @@ * @function encode * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership} message CMsgGCCheckClanMembership message or plain object to encode + * @param {CMsgGCCheckClanMembership.$Properties} message CMsgGCCheckClanMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership.encode = function encode(message, writer) { + CMsgGCCheckClanMembership.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.clanid != null && Object.hasOwnProperty.call(message, "clanid")) + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.clanid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -64234,12 +83001,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckClanMembership * @static - * @param {ICMsgGCCheckClanMembership} message CMsgGCCheckClanMembership message or plain object to encode + * @param {CMsgGCCheckClanMembership.$Properties} message CMsgGCCheckClanMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckClanMembership.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -64249,28 +83016,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership + * @returns {CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape} CMsgGCCheckClanMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership.decode = function decode(reader, length) { + CMsgGCCheckClanMembership.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckClanMembership(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckClanMembership(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.clanid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.clanid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -64280,11 +83067,11 @@ * @memberof CMsgGCCheckClanMembership * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership + * @returns {CMsgGCCheckClanMembership & CMsgGCCheckClanMembership.$Shape} CMsgGCCheckClanMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckClanMembership.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -64298,13 +83085,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckClanMembership.verify = function verify(message) { + CMsgGCCheckClanMembership.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.clanid != null && message.hasOwnProperty("clanid")) + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) if (!$util.isInteger(message.clanid)) return "clanid: integer expected"; return null; @@ -64318,19 +83109,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckClanMembership} CMsgGCCheckClanMembership */ - CMsgGCCheckClanMembership.fromObject = function fromObject(object) { + CMsgGCCheckClanMembership.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckClanMembership) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckClanMembership: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckClanMembership(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.clanid != null) message.clanid = object.clanid >>> 0; return message; @@ -64345,24 +83142,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckClanMembership.toObject = function toObject(message, options) { + CMsgGCCheckClanMembership.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.clanid = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.clanid != null && message.hasOwnProperty("clanid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.clanid != null && $Object.hasOwnProperty.call(message, "clanid")) object.clanid = message.clanid; return object; }; @@ -64374,8 +83177,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckClanMembership.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckClanMembership.prototype.toJSON = function() { + return CMsgGCCheckClanMembership.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckClanMembership + * @function getTypeUrl + * @memberof CMsgGCCheckClanMembership + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckClanMembership.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckClanMembership"; }; return CMsgGCCheckClanMembership; @@ -64383,27 +83200,40 @@ $root.CMsgGCCheckClanMembership_Response = (function() { + /** + * Properties of a CMsgGCCheckClanMembership_Response. + * @typedef {Object} CMsgGCCheckClanMembership_Response.$Properties + * @property {boolean|null} [ismember] CMsgGCCheckClanMembership_Response ismember + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCCheckClanMembership_Response. * @exports ICMsgGCCheckClanMembership_Response * @interface ICMsgGCCheckClanMembership_Response - * @property {boolean|null} [ismember] CMsgGCCheckClanMembership_Response ismember + * @augments CMsgGCCheckClanMembership_Response.$Properties + * @deprecated Use CMsgGCCheckClanMembership_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckClanMembership_Response. + * @typedef {CMsgGCCheckClanMembership_Response.$Properties} CMsgGCCheckClanMembership_Response.$Shape */ /** * Constructs a new CMsgGCCheckClanMembership_Response. * @exports CMsgGCCheckClanMembership_Response * @classdesc Represents a CMsgGCCheckClanMembership_Response. - * @implements ICMsgGCCheckClanMembership_Response * @constructor - * @param {ICMsgGCCheckClanMembership_Response=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckClanMembership_Response(properties) { + var CMsgGCCheckClanMembership_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckClanMembership_Response ismember. @@ -64418,10 +83248,14 @@ * @function create * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response=} [properties] Properties to set + * @param {CMsgGCCheckClanMembership_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response instance + * @type {{ + * (properties: CMsgGCCheckClanMembership_Response.$Shape): CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape; + * (properties?: CMsgGCCheckClanMembership_Response.$Properties): CMsgGCCheckClanMembership_Response; + * }} */ - CMsgGCCheckClanMembership_Response.create = function create(properties) { + CMsgGCCheckClanMembership_Response.create = function(properties) { return new CMsgGCCheckClanMembership_Response(properties); }; @@ -64430,15 +83264,22 @@ * @function encode * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response} message CMsgGCCheckClanMembership_Response message or plain object to encode + * @param {CMsgGCCheckClanMembership_Response.$Properties} message CMsgGCCheckClanMembership_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership_Response.encode = function encode(message, writer) { + CMsgGCCheckClanMembership_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ismember != null && Object.hasOwnProperty.call(message, "ismember")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.ismember); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -64447,12 +83288,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckClanMembership_Response * @static - * @param {ICMsgGCCheckClanMembership_Response} message CMsgGCCheckClanMembership_Response message or plain object to encode + * @param {CMsgGCCheckClanMembership_Response.$Properties} message CMsgGCCheckClanMembership_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckClanMembership_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckClanMembership_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -64462,25 +83303,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response + * @returns {CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape} CMsgGCCheckClanMembership_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership_Response.decode = function decode(reader, length) { + CMsgGCCheckClanMembership_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckClanMembership_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckClanMembership_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ismember = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ismember = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -64490,11 +83348,11 @@ * @memberof CMsgGCCheckClanMembership_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response + * @returns {CMsgGCCheckClanMembership_Response & CMsgGCCheckClanMembership_Response.$Shape} CMsgGCCheckClanMembership_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckClanMembership_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckClanMembership_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -64508,10 +83366,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckClanMembership_Response.verify = function verify(message) { + CMsgGCCheckClanMembership_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ismember != null && message.hasOwnProperty("ismember")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) if (typeof message.ismember !== "boolean") return "ismember: boolean expected"; return null; @@ -64525,12 +83387,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckClanMembership_Response} CMsgGCCheckClanMembership_Response */ - CMsgGCCheckClanMembership_Response.fromObject = function fromObject(object) { + CMsgGCCheckClanMembership_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckClanMembership_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckClanMembership_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckClanMembership_Response(); if (object.ismember != null) - message.ismember = Boolean(object.ismember); + message.ismember = $Boolean(object.ismember); return message; }; @@ -64543,13 +83411,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckClanMembership_Response.toObject = function toObject(message, options) { + CMsgGCCheckClanMembership_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.ismember = false; - if (message.ismember != null && message.hasOwnProperty("ismember")) + if (message.ismember != null && $Object.hasOwnProperty.call(message, "ismember")) object.ismember = message.ismember; return object; }; @@ -64561,8 +83433,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckClanMembership_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckClanMembership_Response.prototype.toJSON = function() { + return CMsgGCCheckClanMembership_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckClanMembership_Response + * @function getTypeUrl + * @memberof CMsgGCCheckClanMembership_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckClanMembership_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckClanMembership_Response"; }; return CMsgGCCheckClanMembership_Response; @@ -64570,28 +83456,41 @@ $root.CMsgGCGetPersonaNames = (function() { + /** + * Properties of a CMsgGCGetPersonaNames. + * @typedef {Object} CMsgGCGetPersonaNames.$Properties + * @property {Array.|null} [steamids] CMsgGCGetPersonaNames steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPersonaNames. * @exports ICMsgGCGetPersonaNames * @interface ICMsgGCGetPersonaNames - * @property {Array.|null} [steamids] CMsgGCGetPersonaNames steamids + * @augments CMsgGCGetPersonaNames.$Properties + * @deprecated Use CMsgGCGetPersonaNames.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPersonaNames. + * @typedef {CMsgGCGetPersonaNames.$Properties} CMsgGCGetPersonaNames.$Shape */ /** * Constructs a new CMsgGCGetPersonaNames. * @exports CMsgGCGetPersonaNames * @classdesc Represents a CMsgGCGetPersonaNames. - * @implements ICMsgGCGetPersonaNames * @constructor - * @param {ICMsgGCGetPersonaNames=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPersonaNames(properties) { + var CMsgGCGetPersonaNames = function (properties) { this.steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPersonaNames steamids. @@ -64606,10 +83505,14 @@ * @function create * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames instance + * @type {{ + * (properties: CMsgGCGetPersonaNames.$Shape): CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape; + * (properties?: CMsgGCGetPersonaNames.$Properties): CMsgGCGetPersonaNames; + * }} */ - CMsgGCGetPersonaNames.create = function create(properties) { + CMsgGCGetPersonaNames.create = function(properties) { return new CMsgGCGetPersonaNames(properties); }; @@ -64618,16 +83521,23 @@ * @function encode * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames} message CMsgGCGetPersonaNames message or plain object to encode + * @param {CMsgGCGetPersonaNames.$Properties} message CMsgGCGetPersonaNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames.encode = function encode(message, writer) { + CMsgGCGetPersonaNames.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.steamids != null && message.steamids.length) for (var i = 0; i < message.steamids.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -64636,12 +83546,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames * @static - * @param {ICMsgGCGetPersonaNames} message CMsgGCGetPersonaNames message or plain object to encode + * @param {CMsgGCGetPersonaNames.$Properties} message CMsgGCGetPersonaNames message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPersonaNames.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -64651,32 +83561,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames + * @returns {CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape} CMsgGCGetPersonaNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames.decode = function decode(reader, length) { + CMsgGCGetPersonaNames.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.steamids && message.steamids.length)) - message.steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.steamids.push(reader.fixed64()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.steamids && message.steamids.length)) + message.steamids = []; + reader.fixed64s(message.steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.steamids && message.steamids.length)) + message.steamids = []; message.steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -64686,11 +83614,11 @@ * @memberof CMsgGCGetPersonaNames * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames + * @returns {CMsgGCGetPersonaNames & CMsgGCGetPersonaNames.$Shape} CMsgGCGetPersonaNames * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPersonaNames.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -64704,11 +83632,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPersonaNames.verify = function verify(message) { + CMsgGCGetPersonaNames.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamids != null && message.hasOwnProperty("steamids")) { - if (!Array.isArray(message.steamids)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamids != null && $Object.hasOwnProperty.call(message, "steamids")) { + if (!$Array.isArray(message.steamids)) return "steamids: array expected"; for (var i = 0; i < message.steamids.length; ++i) if (!$util.isInteger(message.steamids[i]) && !(message.steamids[i] && $util.isInteger(message.steamids[i].low) && $util.isInteger(message.steamids[i].high))) @@ -64725,23 +83657,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames */ - CMsgGCGetPersonaNames.fromObject = function fromObject(object) { + CMsgGCGetPersonaNames.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames(); if (object.steamids) { - if (!Array.isArray(object.steamids)) - throw TypeError(".CMsgGCGetPersonaNames.steamids: array expected"); - message.steamids = []; + if (!$Array.isArray(object.steamids)) + throw $TypeError(".CMsgGCGetPersonaNames.steamids: array expected"); + message.steamids = $Array(object.steamids.length); for (var i = 0; i < object.steamids.length; ++i) if ($util.Long) - (message.steamids[i] = $util.Long.fromValue(object.steamids[i])).unsigned = false; + message.steamids[i] = $util.Long.fromValue(object.steamids[i], true); else if (typeof object.steamids[i] === "string") - message.steamids[i] = parseInt(object.steamids[i], 10); + message.steamids[i] = $parseInt(object.steamids[i], 10); else if (typeof object.steamids[i] === "number") message.steamids[i] = object.steamids[i]; else if (typeof object.steamids[i] === "object") - message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(); + message.steamids[i] = new $util.LongBits(object.steamids[i].low >>> 0, object.steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -64755,19 +83693,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPersonaNames.toObject = function toObject(message, options) { + CMsgGCGetPersonaNames.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.steamids = []; if (message.steamids && message.steamids.length) { - object.steamids = []; + object.steamids = $Array(message.steamids.length); for (var j = 0; j < message.steamids.length; ++j) - if (typeof message.steamids[j] === "number") - object.steamids[j] = options.longs === String ? String(message.steamids[j]) : message.steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamids[j] = typeof message.steamids[j] === "number" ? $BigInt(message.steamids[j]) : $util.Long.fromBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.steamids[j] === "number") + object.steamids[j] = options.longs === $String ? $String(message.steamids[j]) : message.steamids[j]; else - object.steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber() : message.steamids[j]; + object.steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.steamids[j]) : options.longs === $Number ? new $util.LongBits(message.steamids[j].low >>> 0, message.steamids[j].high >>> 0).toNumber(true) : message.steamids[j]; } return object; }; @@ -64779,8 +83723,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPersonaNames.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPersonaNames.prototype.toJSON = function() { + return CMsgGCGetPersonaNames.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPersonaNames + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPersonaNames.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames"; }; return CMsgGCGetPersonaNames; @@ -64788,34 +83746,47 @@ $root.CMsgGCGetPersonaNames_Response = (function() { + /** + * Properties of a CMsgGCGetPersonaNames_Response. + * @typedef {Object} CMsgGCGetPersonaNames_Response.$Properties + * @property {Array.|null} [succeeded_lookups] CMsgGCGetPersonaNames_Response succeeded_lookups + * @property {Array.|null} [failed_lookup_steamids] CMsgGCGetPersonaNames_Response failed_lookup_steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPersonaNames_Response. * @exports ICMsgGCGetPersonaNames_Response * @interface ICMsgGCGetPersonaNames_Response - * @property {Array.|null} [succeeded_lookups] CMsgGCGetPersonaNames_Response succeeded_lookups - * @property {Array.|null} [failed_lookup_steamids] CMsgGCGetPersonaNames_Response failed_lookup_steamids + * @augments CMsgGCGetPersonaNames_Response.$Properties + * @deprecated Use CMsgGCGetPersonaNames_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPersonaNames_Response. + * @typedef {CMsgGCGetPersonaNames_Response.$Properties} CMsgGCGetPersonaNames_Response.$Shape */ /** * Constructs a new CMsgGCGetPersonaNames_Response. * @exports CMsgGCGetPersonaNames_Response * @classdesc Represents a CMsgGCGetPersonaNames_Response. - * @implements ICMsgGCGetPersonaNames_Response * @constructor - * @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPersonaNames_Response(properties) { + var CMsgGCGetPersonaNames_Response = function (properties) { this.succeeded_lookups = []; this.failed_lookup_steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPersonaNames_Response succeeded_lookups. - * @member {Array.} succeeded_lookups + * @member {Array.} succeeded_lookups * @memberof CMsgGCGetPersonaNames_Response * @instance */ @@ -64834,10 +83805,14 @@ * @function create * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response instance + * @type {{ + * (properties: CMsgGCGetPersonaNames_Response.$Shape): CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape; + * (properties?: CMsgGCGetPersonaNames_Response.$Properties): CMsgGCGetPersonaNames_Response; + * }} */ - CMsgGCGetPersonaNames_Response.create = function create(properties) { + CMsgGCGetPersonaNames_Response.create = function(properties) { return new CMsgGCGetPersonaNames_Response(properties); }; @@ -64846,19 +83821,26 @@ * @function encode * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response} message CMsgGCGetPersonaNames_Response message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.$Properties} message CMsgGCGetPersonaNames_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames_Response.encode = function encode(message, writer) { + CMsgGCGetPersonaNames_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.succeeded_lookups != null && message.succeeded_lookups.length) for (var i = 0; i < message.succeeded_lookups.length; ++i) - $root.CMsgGCGetPersonaNames_Response.PersonaName.encode(message.succeeded_lookups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCGetPersonaNames_Response.PersonaName.encode(message.succeeded_lookups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); if (message.failed_lookup_steamids != null && message.failed_lookup_steamids.length) for (var i = 0; i < message.failed_lookup_steamids.length; ++i) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.failed_lookup_steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -64867,12 +83849,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames_Response * @static - * @param {ICMsgGCGetPersonaNames_Response} message CMsgGCGetPersonaNames_Response message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.$Properties} message CMsgGCGetPersonaNames_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPersonaNames_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPersonaNames_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -64882,37 +83864,58 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response + * @returns {CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape} CMsgGCGetPersonaNames_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames_Response.decode = function decode(reader, length) { + CMsgGCGetPersonaNames_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.succeeded_lookups && message.succeeded_lookups.length)) - message.succeeded_lookups = []; - message.succeeded_lookups.push($root.CMsgGCGetPersonaNames_Response.PersonaName.decode(reader, reader.uint32())); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) - message.failed_lookup_steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.failed_lookup_steamids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.succeeded_lookups && message.succeeded_lookups.length)) + message.succeeded_lookups = []; + message.succeeded_lookups.push($root.CMsgGCGetPersonaNames_Response.PersonaName.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) + message.failed_lookup_steamids = []; + reader.fixed64s(message.failed_lookup_steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.failed_lookup_steamids && message.failed_lookup_steamids.length)) + message.failed_lookup_steamids = []; message.failed_lookup_steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -64922,11 +83925,11 @@ * @memberof CMsgGCGetPersonaNames_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response + * @returns {CMsgGCGetPersonaNames_Response & CMsgGCGetPersonaNames_Response.$Shape} CMsgGCGetPersonaNames_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPersonaNames_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPersonaNames_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -64940,20 +83943,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPersonaNames_Response.verify = function verify(message) { + CMsgGCGetPersonaNames_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.succeeded_lookups != null && message.hasOwnProperty("succeeded_lookups")) { - if (!Array.isArray(message.succeeded_lookups)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.succeeded_lookups != null && $Object.hasOwnProperty.call(message, "succeeded_lookups")) { + if (!$Array.isArray(message.succeeded_lookups)) return "succeeded_lookups: array expected"; for (var i = 0; i < message.succeeded_lookups.length; ++i) { - var error = $root.CMsgGCGetPersonaNames_Response.PersonaName.verify(message.succeeded_lookups[i]); + var error = $root.CMsgGCGetPersonaNames_Response.PersonaName.verify(message.succeeded_lookups[i], _depth + 1); if (error) return "succeeded_lookups." + error; } } - if (message.failed_lookup_steamids != null && message.hasOwnProperty("failed_lookup_steamids")) { - if (!Array.isArray(message.failed_lookup_steamids)) + if (message.failed_lookup_steamids != null && $Object.hasOwnProperty.call(message, "failed_lookup_steamids")) { + if (!$Array.isArray(message.failed_lookup_steamids)) return "failed_lookup_steamids: array expected"; for (var i = 0; i < message.failed_lookup_steamids.length; ++i) if (!$util.isInteger(message.failed_lookup_steamids[i]) && !(message.failed_lookup_steamids[i] && $util.isInteger(message.failed_lookup_steamids[i].low) && $util.isInteger(message.failed_lookup_steamids[i].high))) @@ -64970,33 +83977,39 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response */ - CMsgGCGetPersonaNames_Response.fromObject = function fromObject(object) { + CMsgGCGetPersonaNames_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames_Response(); if (object.succeeded_lookups) { - if (!Array.isArray(object.succeeded_lookups)) - throw TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: array expected"); - message.succeeded_lookups = []; + if (!$Array.isArray(object.succeeded_lookups)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: array expected"); + message.succeeded_lookups = $Array(object.succeeded_lookups.length); for (var i = 0; i < object.succeeded_lookups.length; ++i) { - if (typeof object.succeeded_lookups[i] !== "object") - throw TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: object expected"); - message.succeeded_lookups[i] = $root.CMsgGCGetPersonaNames_Response.PersonaName.fromObject(object.succeeded_lookups[i]); + if (!$util.isObject(object.succeeded_lookups[i])) + throw $TypeError(".CMsgGCGetPersonaNames_Response.succeeded_lookups: object expected"); + message.succeeded_lookups[i] = $root.CMsgGCGetPersonaNames_Response.PersonaName.fromObject(object.succeeded_lookups[i], _depth + 1); } } if (object.failed_lookup_steamids) { - if (!Array.isArray(object.failed_lookup_steamids)) - throw TypeError(".CMsgGCGetPersonaNames_Response.failed_lookup_steamids: array expected"); - message.failed_lookup_steamids = []; + if (!$Array.isArray(object.failed_lookup_steamids)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.failed_lookup_steamids: array expected"); + message.failed_lookup_steamids = $Array(object.failed_lookup_steamids.length); for (var i = 0; i < object.failed_lookup_steamids.length; ++i) if ($util.Long) - (message.failed_lookup_steamids[i] = $util.Long.fromValue(object.failed_lookup_steamids[i])).unsigned = false; + message.failed_lookup_steamids[i] = $util.Long.fromValue(object.failed_lookup_steamids[i], true); else if (typeof object.failed_lookup_steamids[i] === "string") - message.failed_lookup_steamids[i] = parseInt(object.failed_lookup_steamids[i], 10); + message.failed_lookup_steamids[i] = $parseInt(object.failed_lookup_steamids[i], 10); else if (typeof object.failed_lookup_steamids[i] === "number") message.failed_lookup_steamids[i] = object.failed_lookup_steamids[i]; else if (typeof object.failed_lookup_steamids[i] === "object") - message.failed_lookup_steamids[i] = new $util.LongBits(object.failed_lookup_steamids[i].low >>> 0, object.failed_lookup_steamids[i].high >>> 0).toNumber(); + message.failed_lookup_steamids[i] = new $util.LongBits(object.failed_lookup_steamids[i].low >>> 0, object.failed_lookup_steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -65010,26 +84023,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPersonaNames_Response.toObject = function toObject(message, options) { + CMsgGCGetPersonaNames_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.succeeded_lookups = []; object.failed_lookup_steamids = []; } if (message.succeeded_lookups && message.succeeded_lookups.length) { - object.succeeded_lookups = []; + object.succeeded_lookups = $Array(message.succeeded_lookups.length); for (var j = 0; j < message.succeeded_lookups.length; ++j) - object.succeeded_lookups[j] = $root.CMsgGCGetPersonaNames_Response.PersonaName.toObject(message.succeeded_lookups[j], options); + object.succeeded_lookups[j] = $root.CMsgGCGetPersonaNames_Response.PersonaName.toObject(message.succeeded_lookups[j], options, _depth + 1); } if (message.failed_lookup_steamids && message.failed_lookup_steamids.length) { - object.failed_lookup_steamids = []; + object.failed_lookup_steamids = $Array(message.failed_lookup_steamids.length); for (var j = 0; j < message.failed_lookup_steamids.length; ++j) - if (typeof message.failed_lookup_steamids[j] === "number") - object.failed_lookup_steamids[j] = options.longs === String ? String(message.failed_lookup_steamids[j]) : message.failed_lookup_steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.failed_lookup_steamids[j] = typeof message.failed_lookup_steamids[j] === "number" ? $BigInt(message.failed_lookup_steamids[j]) : $util.Long.fromBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.failed_lookup_steamids[j] === "number") + object.failed_lookup_steamids[j] = options.longs === $String ? $String(message.failed_lookup_steamids[j]) : message.failed_lookup_steamids[j]; else - object.failed_lookup_steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.failed_lookup_steamids[j]) : options.longs === Number ? new $util.LongBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0).toNumber() : message.failed_lookup_steamids[j]; + object.failed_lookup_steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.failed_lookup_steamids[j]) : options.longs === $Number ? new $util.LongBits(message.failed_lookup_steamids[j].low >>> 0, message.failed_lookup_steamids[j].high >>> 0).toNumber(true) : message.failed_lookup_steamids[j]; } return object; }; @@ -65041,34 +84060,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPersonaNames_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPersonaNames_Response.prototype.toJSON = function() { + return CMsgGCGetPersonaNames_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPersonaNames_Response + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPersonaNames_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames_Response"; }; CMsgGCGetPersonaNames_Response.PersonaName = (function() { /** * Properties of a PersonaName. - * @memberof CMsgGCGetPersonaNames_Response - * @interface IPersonaName + * @typedef {Object} CMsgGCGetPersonaNames_Response.PersonaName.$Properties * @property {number|Long|null} [steamid] PersonaName steamid * @property {string|null} [persona_name] PersonaName persona_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PersonaName. + * @memberof CMsgGCGetPersonaNames_Response + * @interface IPersonaName + * @augments CMsgGCGetPersonaNames_Response.PersonaName.$Properties + * @deprecated Use CMsgGCGetPersonaNames_Response.PersonaName.$Properties instead. + */ + + /** + * Shape of a PersonaName. + * @typedef {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} CMsgGCGetPersonaNames_Response.PersonaName.$Shape */ /** * Constructs a new PersonaName. * @memberof CMsgGCGetPersonaNames_Response * @classdesc Represents a PersonaName. - * @implements IPersonaName * @constructor - * @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PersonaName(properties) { + var PersonaName = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PersonaName steamid. @@ -65076,7 +84122,7 @@ * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @instance */ - PersonaName.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PersonaName.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * PersonaName persona_name. @@ -65091,10 +84137,14 @@ * @function create * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName instance + * @type {{ + * (properties: CMsgGCGetPersonaNames_Response.PersonaName.$Shape): CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape; + * (properties?: CMsgGCGetPersonaNames_Response.PersonaName.$Properties): CMsgGCGetPersonaNames_Response.PersonaName; + * }} */ - PersonaName.create = function create(properties) { + PersonaName.create = function(properties) { return new PersonaName(properties); }; @@ -65103,17 +84153,24 @@ * @function encode * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName} message PersonaName message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} message PersonaName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaName.encode = function encode(message, writer) { + PersonaName.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.persona_name != null && Object.hasOwnProperty.call(message, "persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.persona_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -65122,12 +84179,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static - * @param {CMsgGCGetPersonaNames_Response.IPersonaName} message PersonaName message or plain object to encode + * @param {CMsgGCGetPersonaNames_Response.PersonaName.$Properties} message PersonaName message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PersonaName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PersonaName.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -65137,28 +84194,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName + * @returns {CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape} PersonaName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaName.decode = function decode(reader, length) { + PersonaName.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPersonaNames_Response.PersonaName(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPersonaNames_Response.PersonaName(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.persona_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.persona_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -65168,11 +84245,11 @@ * @memberof CMsgGCGetPersonaNames_Response.PersonaName * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName + * @returns {CMsgGCGetPersonaNames_Response.PersonaName & CMsgGCGetPersonaNames_Response.PersonaName.$Shape} PersonaName * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PersonaName.decodeDelimited = function decodeDelimited(reader) { + PersonaName.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -65186,13 +84263,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PersonaName.verify = function verify(message) { + PersonaName.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) if (!$util.isString(message.persona_name)) return "persona_name: string expected"; return null; @@ -65206,21 +84287,27 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName */ - PersonaName.fromObject = function fromObject(object) { + PersonaName.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPersonaNames_Response.PersonaName) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPersonaNames_Response.PersonaName: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPersonaNames_Response.PersonaName(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.persona_name != null) - message.persona_name = String(object.persona_name); + message.persona_name = $String(object.persona_name); return message; }; @@ -65233,24 +84320,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PersonaName.toObject = function toObject(message, options) { + PersonaName.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.persona_name = ""; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.persona_name != null && message.hasOwnProperty("persona_name")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.persona_name != null && $Object.hasOwnProperty.call(message, "persona_name")) object.persona_name = message.persona_name; return object; }; @@ -65262,8 +84355,22 @@ * @instance * @returns {Object.} JSON object */ - PersonaName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PersonaName.prototype.toJSON = function() { + return PersonaName.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PersonaName + * @function getTypeUrl + * @memberof CMsgGCGetPersonaNames_Response.PersonaName + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PersonaName.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPersonaNames_Response.PersonaName"; }; return PersonaName; @@ -65276,26 +84383,39 @@ /** * Properties of a CMsgGCCheckFriendship. - * @exports ICMsgGCCheckFriendship - * @interface ICMsgGCCheckFriendship + * @typedef {Object} CMsgGCCheckFriendship.$Properties * @property {number|Long|null} [steamid_left] CMsgGCCheckFriendship steamid_left * @property {number|Long|null} [steamid_right] CMsgGCCheckFriendship steamid_right + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckFriendship. + * @exports ICMsgGCCheckFriendship + * @interface ICMsgGCCheckFriendship + * @augments CMsgGCCheckFriendship.$Properties + * @deprecated Use CMsgGCCheckFriendship.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckFriendship. + * @typedef {CMsgGCCheckFriendship.$Properties} CMsgGCCheckFriendship.$Shape */ /** * Constructs a new CMsgGCCheckFriendship. * @exports CMsgGCCheckFriendship * @classdesc Represents a CMsgGCCheckFriendship. - * @implements ICMsgGCCheckFriendship * @constructor - * @param {ICMsgGCCheckFriendship=} [properties] Properties to set + * @param {CMsgGCCheckFriendship.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckFriendship(properties) { + var CMsgGCCheckFriendship = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckFriendship steamid_left. @@ -65303,7 +84423,7 @@ * @memberof CMsgGCCheckFriendship * @instance */ - CMsgGCCheckFriendship.prototype.steamid_left = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckFriendship.prototype.steamid_left = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCCheckFriendship steamid_right. @@ -65311,17 +84431,21 @@ * @memberof CMsgGCCheckFriendship * @instance */ - CMsgGCCheckFriendship.prototype.steamid_right = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCCheckFriendship.prototype.steamid_right = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCCheckFriendship instance using the specified properties. * @function create * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship=} [properties] Properties to set + * @param {CMsgGCCheckFriendship.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship instance + * @type {{ + * (properties: CMsgGCCheckFriendship.$Shape): CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape; + * (properties?: CMsgGCCheckFriendship.$Properties): CMsgGCCheckFriendship; + * }} */ - CMsgGCCheckFriendship.create = function create(properties) { + CMsgGCCheckFriendship.create = function(properties) { return new CMsgGCCheckFriendship(properties); }; @@ -65330,17 +84454,24 @@ * @function encode * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship} message CMsgGCCheckFriendship message or plain object to encode + * @param {CMsgGCCheckFriendship.$Properties} message CMsgGCCheckFriendship message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship.encode = function encode(message, writer) { + CMsgGCCheckFriendship.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid_left != null && Object.hasOwnProperty.call(message, "steamid_left")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid_left); - if (message.steamid_right != null && Object.hasOwnProperty.call(message, "steamid_right")) + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.steamid_right); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -65349,12 +84480,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckFriendship * @static - * @param {ICMsgGCCheckFriendship} message CMsgGCCheckFriendship message or plain object to encode + * @param {CMsgGCCheckFriendship.$Properties} message CMsgGCCheckFriendship message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckFriendship.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -65364,28 +84495,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship + * @returns {CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape} CMsgGCCheckFriendship * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship.decode = function decode(reader, length) { + CMsgGCCheckFriendship.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckFriendship(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckFriendship(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid_left = reader.fixed64(); - break; - case 2: - message.steamid_right = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid_left = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.steamid_right = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -65395,11 +84546,11 @@ * @memberof CMsgGCCheckFriendship * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship + * @returns {CMsgGCCheckFriendship & CMsgGCCheckFriendship.$Shape} CMsgGCCheckFriendship * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckFriendship.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -65413,13 +84564,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckFriendship.verify = function verify(message) { + CMsgGCCheckFriendship.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid_left != null && message.hasOwnProperty("steamid_left")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) if (!$util.isInteger(message.steamid_left) && !(message.steamid_left && $util.isInteger(message.steamid_left.low) && $util.isInteger(message.steamid_left.high))) return "steamid_left: integer|Long expected"; - if (message.steamid_right != null && message.hasOwnProperty("steamid_right")) + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) if (!$util.isInteger(message.steamid_right) && !(message.steamid_right && $util.isInteger(message.steamid_right.low) && $util.isInteger(message.steamid_right.high))) return "steamid_right: integer|Long expected"; return null; @@ -65433,28 +84588,34 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship */ - CMsgGCCheckFriendship.fromObject = function fromObject(object) { + CMsgGCCheckFriendship.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckFriendship) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckFriendship: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckFriendship(); if (object.steamid_left != null) if ($util.Long) - (message.steamid_left = $util.Long.fromValue(object.steamid_left)).unsigned = false; + message.steamid_left = $util.Long.fromValue(object.steamid_left, true); else if (typeof object.steamid_left === "string") - message.steamid_left = parseInt(object.steamid_left, 10); + message.steamid_left = $parseInt(object.steamid_left, 10); else if (typeof object.steamid_left === "number") message.steamid_left = object.steamid_left; else if (typeof object.steamid_left === "object") - message.steamid_left = new $util.LongBits(object.steamid_left.low >>> 0, object.steamid_left.high >>> 0).toNumber(); + message.steamid_left = new $util.LongBits(object.steamid_left.low >>> 0, object.steamid_left.high >>> 0).toNumber(true); if (object.steamid_right != null) if ($util.Long) - (message.steamid_right = $util.Long.fromValue(object.steamid_right)).unsigned = false; + message.steamid_right = $util.Long.fromValue(object.steamid_right, true); else if (typeof object.steamid_right === "string") - message.steamid_right = parseInt(object.steamid_right, 10); + message.steamid_right = $parseInt(object.steamid_right, 10); else if (typeof object.steamid_right === "number") message.steamid_right = object.steamid_right; else if (typeof object.steamid_right === "object") - message.steamid_right = new $util.LongBits(object.steamid_right.low >>> 0, object.steamid_right.high >>> 0).toNumber(); + message.steamid_right = new $util.LongBits(object.steamid_right.low >>> 0, object.steamid_right.high >>> 0).toNumber(true); return message; }; @@ -65467,32 +84628,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckFriendship.toObject = function toObject(message, options) { + CMsgGCCheckFriendship.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid_left = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid_left = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid_left = options.longs === String ? "0" : 0; + object.steamid_left = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid_right = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid_right = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid_right = options.longs === String ? "0" : 0; + object.steamid_right = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.steamid_left != null && message.hasOwnProperty("steamid_left")) - if (typeof message.steamid_left === "number") - object.steamid_left = options.longs === String ? String(message.steamid_left) : message.steamid_left; + if (message.steamid_left != null && $Object.hasOwnProperty.call(message, "steamid_left")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid_left = typeof message.steamid_left === "number" ? $BigInt(message.steamid_left) : $util.Long.fromBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0, true).toBigInt(); + else if (typeof message.steamid_left === "number") + object.steamid_left = options.longs === $String ? $String(message.steamid_left) : message.steamid_left; else - object.steamid_left = options.longs === String ? $util.Long.prototype.toString.call(message.steamid_left) : options.longs === Number ? new $util.LongBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0).toNumber() : message.steamid_left; - if (message.steamid_right != null && message.hasOwnProperty("steamid_right")) - if (typeof message.steamid_right === "number") - object.steamid_right = options.longs === String ? String(message.steamid_right) : message.steamid_right; + object.steamid_left = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid_left) : options.longs === $Number ? new $util.LongBits(message.steamid_left.low >>> 0, message.steamid_left.high >>> 0).toNumber(true) : message.steamid_left; + if (message.steamid_right != null && $Object.hasOwnProperty.call(message, "steamid_right")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid_right = typeof message.steamid_right === "number" ? $BigInt(message.steamid_right) : $util.Long.fromBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0, true).toBigInt(); + else if (typeof message.steamid_right === "number") + object.steamid_right = options.longs === $String ? $String(message.steamid_right) : message.steamid_right; else - object.steamid_right = options.longs === String ? $util.Long.prototype.toString.call(message.steamid_right) : options.longs === Number ? new $util.LongBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0).toNumber() : message.steamid_right; + object.steamid_right = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid_right) : options.longs === $Number ? new $util.LongBits(message.steamid_right.low >>> 0, message.steamid_right.high >>> 0).toNumber(true) : message.steamid_right; return object; }; @@ -65503,8 +84672,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckFriendship.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckFriendship.prototype.toJSON = function() { + return CMsgGCCheckFriendship.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckFriendship + * @function getTypeUrl + * @memberof CMsgGCCheckFriendship + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckFriendship.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckFriendship"; }; return CMsgGCCheckFriendship; @@ -65514,26 +84697,39 @@ /** * Properties of a CMsgGCCheckFriendship_Response. - * @exports ICMsgGCCheckFriendship_Response - * @interface ICMsgGCCheckFriendship_Response + * @typedef {Object} CMsgGCCheckFriendship_Response.$Properties * @property {boolean|null} [success] CMsgGCCheckFriendship_Response success * @property {boolean|null} [found_friendship] CMsgGCCheckFriendship_Response found_friendship + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCheckFriendship_Response. + * @exports ICMsgGCCheckFriendship_Response + * @interface ICMsgGCCheckFriendship_Response + * @augments CMsgGCCheckFriendship_Response.$Properties + * @deprecated Use CMsgGCCheckFriendship_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCCheckFriendship_Response. + * @typedef {CMsgGCCheckFriendship_Response.$Properties} CMsgGCCheckFriendship_Response.$Shape */ /** * Constructs a new CMsgGCCheckFriendship_Response. * @exports CMsgGCCheckFriendship_Response * @classdesc Represents a CMsgGCCheckFriendship_Response. - * @implements ICMsgGCCheckFriendship_Response * @constructor - * @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set + * @param {CMsgGCCheckFriendship_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCheckFriendship_Response(properties) { + var CMsgGCCheckFriendship_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCheckFriendship_Response success. @@ -65556,10 +84752,14 @@ * @function create * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set + * @param {CMsgGCCheckFriendship_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response instance + * @type {{ + * (properties: CMsgGCCheckFriendship_Response.$Shape): CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape; + * (properties?: CMsgGCCheckFriendship_Response.$Properties): CMsgGCCheckFriendship_Response; + * }} */ - CMsgGCCheckFriendship_Response.create = function create(properties) { + CMsgGCCheckFriendship_Response.create = function(properties) { return new CMsgGCCheckFriendship_Response(properties); }; @@ -65568,17 +84768,24 @@ * @function encode * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response} message CMsgGCCheckFriendship_Response message or plain object to encode + * @param {CMsgGCCheckFriendship_Response.$Properties} message CMsgGCCheckFriendship_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship_Response.encode = function encode(message, writer) { + CMsgGCCheckFriendship_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.success != null && Object.hasOwnProperty.call(message, "success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); - if (message.found_friendship != null && Object.hasOwnProperty.call(message, "found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.found_friendship); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -65587,12 +84794,12 @@ * @function encodeDelimited * @memberof CMsgGCCheckFriendship_Response * @static - * @param {ICMsgGCCheckFriendship_Response} message CMsgGCCheckFriendship_Response message or plain object to encode + * @param {CMsgGCCheckFriendship_Response.$Properties} message CMsgGCCheckFriendship_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCheckFriendship_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCheckFriendship_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -65602,28 +84809,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response + * @returns {CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape} CMsgGCCheckFriendship_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship_Response.decode = function decode(reader, length) { + CMsgGCCheckFriendship_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCheckFriendship_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCheckFriendship_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.success = reader.bool(); - break; - case 2: - message.found_friendship = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.success = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.found_friendship = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -65633,11 +84860,11 @@ * @memberof CMsgGCCheckFriendship_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response + * @returns {CMsgGCCheckFriendship_Response & CMsgGCCheckFriendship_Response.$Shape} CMsgGCCheckFriendship_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCheckFriendship_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCheckFriendship_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -65651,13 +84878,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCheckFriendship_Response.verify = function verify(message) { + CMsgGCCheckFriendship_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.success != null && message.hasOwnProperty("success")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) if (typeof message.success !== "boolean") return "success: boolean expected"; - if (message.found_friendship != null && message.hasOwnProperty("found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) if (typeof message.found_friendship !== "boolean") return "found_friendship: boolean expected"; return null; @@ -65671,14 +84902,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response */ - CMsgGCCheckFriendship_Response.fromObject = function fromObject(object) { + CMsgGCCheckFriendship_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCheckFriendship_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCheckFriendship_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCheckFriendship_Response(); if (object.success != null) - message.success = Boolean(object.success); + message.success = $Boolean(object.success); if (object.found_friendship != null) - message.found_friendship = Boolean(object.found_friendship); + message.found_friendship = $Boolean(object.found_friendship); return message; }; @@ -65691,17 +84928,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCheckFriendship_Response.toObject = function toObject(message, options) { + CMsgGCCheckFriendship_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.success = false; object.found_friendship = false; } - if (message.success != null && message.hasOwnProperty("success")) + if (message.success != null && $Object.hasOwnProperty.call(message, "success")) object.success = message.success; - if (message.found_friendship != null && message.hasOwnProperty("found_friendship")) + if (message.found_friendship != null && $Object.hasOwnProperty.call(message, "found_friendship")) object.found_friendship = message.found_friendship; return object; }; @@ -65713,8 +84954,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCheckFriendship_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCheckFriendship_Response.prototype.toJSON = function() { + return CMsgGCCheckFriendship_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCheckFriendship_Response + * @function getTypeUrl + * @memberof CMsgGCCheckFriendship_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCheckFriendship_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCheckFriendship_Response"; }; return CMsgGCCheckFriendship_Response; @@ -65722,29 +84977,42 @@ $root.CMsgGCMsgMasterSetDirectory = (function() { + /** + * Properties of a CMsgGCMsgMasterSetDirectory. + * @typedef {Object} CMsgGCMsgMasterSetDirectory.$Properties + * @property {number|null} [master_dir_index] CMsgGCMsgMasterSetDirectory master_dir_index + * @property {Array.|null} [dir] CMsgGCMsgMasterSetDirectory dir + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetDirectory. * @exports ICMsgGCMsgMasterSetDirectory * @interface ICMsgGCMsgMasterSetDirectory - * @property {number|null} [master_dir_index] CMsgGCMsgMasterSetDirectory master_dir_index - * @property {Array.|null} [dir] CMsgGCMsgMasterSetDirectory dir + * @augments CMsgGCMsgMasterSetDirectory.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetDirectory. + * @typedef {CMsgGCMsgMasterSetDirectory.$Properties} CMsgGCMsgMasterSetDirectory.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetDirectory. * @exports CMsgGCMsgMasterSetDirectory * @classdesc Represents a CMsgGCMsgMasterSetDirectory. - * @implements ICMsgGCMsgMasterSetDirectory * @constructor - * @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetDirectory(properties) { + var CMsgGCMsgMasterSetDirectory = function (properties) { this.dir = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetDirectory master_dir_index. @@ -65756,7 +85024,7 @@ /** * CMsgGCMsgMasterSetDirectory dir. - * @member {Array.} dir + * @member {Array.} dir * @memberof CMsgGCMsgMasterSetDirectory * @instance */ @@ -65767,10 +85035,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory.$Shape): CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory.$Properties): CMsgGCMsgMasterSetDirectory; + * }} */ - CMsgGCMsgMasterSetDirectory.create = function create(properties) { + CMsgGCMsgMasterSetDirectory.create = function(properties) { return new CMsgGCMsgMasterSetDirectory(properties); }; @@ -65779,18 +85051,25 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory} message CMsgGCMsgMasterSetDirectory message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.$Properties} message CMsgGCMsgMasterSetDirectory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory.encode = function encode(message, writer) { + CMsgGCMsgMasterSetDirectory.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.master_dir_index != null && Object.hasOwnProperty.call(message, "master_dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.master_dir_index); if (message.dir != null && message.dir.length) for (var i = 0; i < message.dir.length; ++i) - $root.CMsgGCMsgMasterSetDirectory.SubGC.encode(message.dir[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgGCMsgMasterSetDirectory.SubGC.encode(message.dir[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -65799,12 +85078,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory * @static - * @param {ICMsgGCMsgMasterSetDirectory} message CMsgGCMsgMasterSetDirectory message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.$Properties} message CMsgGCMsgMasterSetDirectory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetDirectory.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -65814,30 +85093,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory + * @returns {CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape} CMsgGCMsgMasterSetDirectory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory.decode = function decode(reader, length) { + CMsgGCMsgMasterSetDirectory.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.master_dir_index = reader.uint32(); - break; - case 2: - if (!(message.dir && message.dir.length)) - message.dir = []; - message.dir.push($root.CMsgGCMsgMasterSetDirectory.SubGC.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.master_dir_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.dir && message.dir.length)) + message.dir = []; + message.dir.push($root.CMsgGCMsgMasterSetDirectory.SubGC.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -65847,11 +85146,11 @@ * @memberof CMsgGCMsgMasterSetDirectory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory + * @returns {CMsgGCMsgMasterSetDirectory & CMsgGCMsgMasterSetDirectory.$Shape} CMsgGCMsgMasterSetDirectory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetDirectory.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -65865,17 +85164,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetDirectory.verify = function verify(message) { + CMsgGCMsgMasterSetDirectory.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.master_dir_index != null && message.hasOwnProperty("master_dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) if (!$util.isInteger(message.master_dir_index)) return "master_dir_index: integer expected"; - if (message.dir != null && message.hasOwnProperty("dir")) { - if (!Array.isArray(message.dir)) + if (message.dir != null && $Object.hasOwnProperty.call(message, "dir")) { + if (!$Array.isArray(message.dir)) return "dir: array expected"; for (var i = 0; i < message.dir.length; ++i) { - var error = $root.CMsgGCMsgMasterSetDirectory.SubGC.verify(message.dir[i]); + var error = $root.CMsgGCMsgMasterSetDirectory.SubGC.verify(message.dir[i], _depth + 1); if (error) return "dir." + error; } @@ -65891,20 +85194,26 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory */ - CMsgGCMsgMasterSetDirectory.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetDirectory.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory(); if (object.master_dir_index != null) message.master_dir_index = object.master_dir_index >>> 0; if (object.dir) { - if (!Array.isArray(object.dir)) - throw TypeError(".CMsgGCMsgMasterSetDirectory.dir: array expected"); - message.dir = []; + if (!$Array.isArray(object.dir)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.dir: array expected"); + message.dir = $Array(object.dir.length); for (var i = 0; i < object.dir.length; ++i) { - if (typeof object.dir[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetDirectory.dir: object expected"); - message.dir[i] = $root.CMsgGCMsgMasterSetDirectory.SubGC.fromObject(object.dir[i]); + if (!$util.isObject(object.dir[i])) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.dir: object expected"); + message.dir[i] = $root.CMsgGCMsgMasterSetDirectory.SubGC.fromObject(object.dir[i], _depth + 1); } } return message; @@ -65919,20 +85228,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetDirectory.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetDirectory.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.dir = []; if (options.defaults) object.master_dir_index = 0; - if (message.master_dir_index != null && message.hasOwnProperty("master_dir_index")) + if (message.master_dir_index != null && $Object.hasOwnProperty.call(message, "master_dir_index")) object.master_dir_index = message.master_dir_index; if (message.dir && message.dir.length) { - object.dir = []; + object.dir = $Array(message.dir.length); for (var j = 0; j < message.dir.length; ++j) - object.dir[j] = $root.CMsgGCMsgMasterSetDirectory.SubGC.toObject(message.dir[j], options); + object.dir[j] = $root.CMsgGCMsgMasterSetDirectory.SubGC.toObject(message.dir[j], options, _depth + 1); } return object; }; @@ -65944,37 +85257,64 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetDirectory.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetDirectory.prototype.toJSON = function() { + return CMsgGCMsgMasterSetDirectory.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetDirectory + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetDirectory.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory"; }; CMsgGCMsgMasterSetDirectory.SubGC = (function() { /** * Properties of a SubGC. - * @memberof CMsgGCMsgMasterSetDirectory - * @interface ISubGC + * @typedef {Object} CMsgGCMsgMasterSetDirectory.SubGC.$Properties * @property {number|null} [dir_index] SubGC dir_index * @property {string|null} [name] SubGC name * @property {string|null} [box] SubGC box * @property {string|null} [command_line] SubGC command_line * @property {string|null} [gc_binary] SubGC gc_binary + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SubGC. + * @memberof CMsgGCMsgMasterSetDirectory + * @interface ISubGC + * @augments CMsgGCMsgMasterSetDirectory.SubGC.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory.SubGC.$Properties instead. + */ + + /** + * Shape of a SubGC. + * @typedef {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} CMsgGCMsgMasterSetDirectory.SubGC.$Shape */ /** * Constructs a new SubGC. * @memberof CMsgGCMsgMasterSetDirectory * @classdesc Represents a SubGC. - * @implements ISubGC * @constructor - * @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SubGC(properties) { + var SubGC = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SubGC dir_index. @@ -66021,10 +85361,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory.SubGC.$Shape): CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory.SubGC.$Properties): CMsgGCMsgMasterSetDirectory.SubGC; + * }} */ - SubGC.create = function create(properties) { + SubGC.create = function(properties) { return new SubGC(properties); }; @@ -66033,23 +85377,30 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC} message SubGC message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} message SubGC message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubGC.encode = function encode(message, writer) { + SubGC.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.box != null && Object.hasOwnProperty.call(message, "box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.box); - if (message.command_line != null && Object.hasOwnProperty.call(message, "command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.command_line); - if (message.gc_binary != null && Object.hasOwnProperty.call(message, "gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.gc_binary); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -66058,12 +85409,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static - * @param {CMsgGCMsgMasterSetDirectory.ISubGC} message SubGC message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory.SubGC.$Properties} message SubGC message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SubGC.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SubGC.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -66073,37 +85424,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC + * @returns {CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape} SubGC * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubGC.decode = function decode(reader, length) { + SubGC.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory.SubGC(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory.SubGC(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.box = reader.string(); - break; - case 4: - message.command_line = reader.string(); - break; - case 5: - message.gc_binary = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.box = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.command_line = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.gc_binary = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -66113,11 +85493,11 @@ * @memberof CMsgGCMsgMasterSetDirectory.SubGC * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC + * @returns {CMsgGCMsgMasterSetDirectory.SubGC & CMsgGCMsgMasterSetDirectory.SubGC.$Shape} SubGC * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SubGC.decodeDelimited = function decodeDelimited(reader) { + SubGC.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -66131,22 +85511,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SubGC.verify = function verify(message) { + SubGC.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.box != null && message.hasOwnProperty("box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) if (!$util.isString(message.box)) return "box: string expected"; - if (message.command_line != null && message.hasOwnProperty("command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) if (!$util.isString(message.command_line)) return "command_line: string expected"; - if (message.gc_binary != null && message.hasOwnProperty("gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) if (!$util.isString(message.gc_binary)) return "gc_binary: string expected"; return null; @@ -66160,20 +85544,26 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC */ - SubGC.fromObject = function fromObject(object) { + SubGC.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory.SubGC) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory.SubGC: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory.SubGC(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.box != null) - message.box = String(object.box); + message.box = $String(object.box); if (object.command_line != null) - message.command_line = String(object.command_line); + message.command_line = $String(object.command_line); if (object.gc_binary != null) - message.gc_binary = String(object.gc_binary); + message.gc_binary = $String(object.gc_binary); return message; }; @@ -66186,9 +85576,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SubGC.toObject = function toObject(message, options) { + SubGC.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.dir_index = 0; @@ -66197,15 +85591,15 @@ object.command_line = ""; object.gc_binary = ""; } - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.box != null && message.hasOwnProperty("box")) + if (message.box != null && $Object.hasOwnProperty.call(message, "box")) object.box = message.box; - if (message.command_line != null && message.hasOwnProperty("command_line")) + if (message.command_line != null && $Object.hasOwnProperty.call(message, "command_line")) object.command_line = message.command_line; - if (message.gc_binary != null && message.hasOwnProperty("gc_binary")) + if (message.gc_binary != null && $Object.hasOwnProperty.call(message, "gc_binary")) object.gc_binary = message.gc_binary; return object; }; @@ -66217,8 +85611,22 @@ * @instance * @returns {Object.} JSON object */ - SubGC.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SubGC.prototype.toJSON = function() { + return SubGC.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SubGC + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory.SubGC + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SubGC.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory.SubGC"; }; return SubGC; @@ -66229,27 +85637,40 @@ $root.CMsgGCMsgMasterSetDirectory_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetDirectory_Response. + * @typedef {Object} CMsgGCMsgMasterSetDirectory_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetDirectory_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetDirectory_Response. * @exports ICMsgGCMsgMasterSetDirectory_Response * @interface ICMsgGCMsgMasterSetDirectory_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetDirectory_Response eresult + * @augments CMsgGCMsgMasterSetDirectory_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetDirectory_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetDirectory_Response. + * @typedef {CMsgGCMsgMasterSetDirectory_Response.$Properties} CMsgGCMsgMasterSetDirectory_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetDirectory_Response. * @exports CMsgGCMsgMasterSetDirectory_Response * @classdesc Represents a CMsgGCMsgMasterSetDirectory_Response. - * @implements ICMsgGCMsgMasterSetDirectory_Response * @constructor - * @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetDirectory_Response(properties) { + var CMsgGCMsgMasterSetDirectory_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetDirectory_Response eresult. @@ -66264,10 +85685,14 @@ * @function create * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetDirectory_Response.$Shape): CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetDirectory_Response.$Properties): CMsgGCMsgMasterSetDirectory_Response; + * }} */ - CMsgGCMsgMasterSetDirectory_Response.create = function create(properties) { + CMsgGCMsgMasterSetDirectory_Response.create = function(properties) { return new CMsgGCMsgMasterSetDirectory_Response(properties); }; @@ -66276,15 +85701,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetDirectory_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -66293,12 +85725,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetDirectory_Response * @static - * @param {ICMsgGCMsgMasterSetDirectory_Response} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetDirectory_Response.$Properties} message CMsgGCMsgMasterSetDirectory_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetDirectory_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetDirectory_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -66308,25 +85740,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response + * @returns {CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape} CMsgGCMsgMasterSetDirectory_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetDirectory_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetDirectory_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -66336,11 +85785,11 @@ * @memberof CMsgGCMsgMasterSetDirectory_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response + * @returns {CMsgGCMsgMasterSetDirectory_Response & CMsgGCMsgMasterSetDirectory_Response.$Shape} CMsgGCMsgMasterSetDirectory_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetDirectory_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetDirectory_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -66354,10 +85803,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetDirectory_Response.verify = function verify(message) { + CMsgGCMsgMasterSetDirectory_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -66371,9 +85824,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response */ - CMsgGCMsgMasterSetDirectory_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetDirectory_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetDirectory_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetDirectory_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetDirectory_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -66389,13 +85848,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetDirectory_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetDirectory_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -66407,8 +85870,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetDirectory_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetDirectory_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetDirectory_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetDirectory_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetDirectory_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetDirectory_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetDirectory_Response"; }; return CMsgGCMsgMasterSetDirectory_Response; @@ -66416,27 +85893,40 @@ $root.CMsgGCMsgWebAPIJobRequestForwardResponse = (function() { + /** + * Properties of a CMsgGCMsgWebAPIJobRequestForwardResponse. + * @typedef {Object} CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties + * @property {number|null} [dir_index] CMsgGCMsgWebAPIJobRequestForwardResponse dir_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgWebAPIJobRequestForwardResponse. * @exports ICMsgGCMsgWebAPIJobRequestForwardResponse * @interface ICMsgGCMsgWebAPIJobRequestForwardResponse - * @property {number|null} [dir_index] CMsgGCMsgWebAPIJobRequestForwardResponse dir_index + * @augments CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties + * @deprecated Use CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgWebAPIJobRequestForwardResponse. + * @typedef {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape */ /** * Constructs a new CMsgGCMsgWebAPIJobRequestForwardResponse. * @exports CMsgGCMsgWebAPIJobRequestForwardResponse * @classdesc Represents a CMsgGCMsgWebAPIJobRequestForwardResponse. - * @implements ICMsgGCMsgWebAPIJobRequestForwardResponse * @constructor - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgWebAPIJobRequestForwardResponse(properties) { + var CMsgGCMsgWebAPIJobRequestForwardResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgWebAPIJobRequestForwardResponse dir_index. @@ -66451,10 +85941,14 @@ * @function create * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse instance + * @type {{ + * (properties: CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape): CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape; + * (properties?: CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties): CMsgGCMsgWebAPIJobRequestForwardResponse; + * }} */ - CMsgGCMsgWebAPIJobRequestForwardResponse.create = function create(properties) { + CMsgGCMsgWebAPIJobRequestForwardResponse.create = function(properties) { return new CMsgGCMsgWebAPIJobRequestForwardResponse(properties); }; @@ -66463,15 +85957,22 @@ * @function encode * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgWebAPIJobRequestForwardResponse.encode = function encode(message, writer) { + CMsgGCMsgWebAPIJobRequestForwardResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -66480,12 +85981,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static - * @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode + * @param {CMsgGCMsgWebAPIJobRequestForwardResponse.$Properties} message CMsgGCMsgWebAPIJobRequestForwardResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgWebAPIJobRequestForwardResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgWebAPIJobRequestForwardResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -66495,25 +85996,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse + * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape} CMsgGCMsgWebAPIJobRequestForwardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgWebAPIJobRequestForwardResponse.decode = function decode(reader, length) { + CMsgGCMsgWebAPIJobRequestForwardResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dir_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.dir_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -66523,11 +86041,11 @@ * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse + * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse & CMsgGCMsgWebAPIJobRequestForwardResponse.$Shape} CMsgGCMsgWebAPIJobRequestForwardResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgWebAPIJobRequestForwardResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgWebAPIJobRequestForwardResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -66541,10 +86059,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgWebAPIJobRequestForwardResponse.verify = function verify(message) { + CMsgGCMsgWebAPIJobRequestForwardResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) if (!$util.isInteger(message.dir_index)) return "dir_index: integer expected"; return null; @@ -66558,9 +86080,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse */ - CMsgGCMsgWebAPIJobRequestForwardResponse.fromObject = function fromObject(object) { + CMsgGCMsgWebAPIJobRequestForwardResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgWebAPIJobRequestForwardResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgWebAPIJobRequestForwardResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgWebAPIJobRequestForwardResponse(); if (object.dir_index != null) message.dir_index = object.dir_index >>> 0; @@ -66576,13 +86104,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgWebAPIJobRequestForwardResponse.toObject = function toObject(message, options) { + CMsgGCMsgWebAPIJobRequestForwardResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.dir_index = 0; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) object.dir_index = message.dir_index; return object; }; @@ -66594,8 +86126,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.toJSON = function() { + return CMsgGCMsgWebAPIJobRequestForwardResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgWebAPIJobRequestForwardResponse + * @function getTypeUrl + * @memberof CMsgGCMsgWebAPIJobRequestForwardResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgWebAPIJobRequestForwardResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgWebAPIJobRequestForwardResponse"; }; return CMsgGCMsgWebAPIJobRequestForwardResponse; @@ -66603,27 +86149,40 @@ $root.CGCSystemMsg_GetPurchaseTrust_Request = (function() { + /** + * Properties of a CGCSystemMsg_GetPurchaseTrust_Request. + * @typedef {Object} CGCSystemMsg_GetPurchaseTrust_Request.$Properties + * @property {number|Long|null} [steamid] CGCSystemMsg_GetPurchaseTrust_Request steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CGCSystemMsg_GetPurchaseTrust_Request. * @exports ICGCSystemMsg_GetPurchaseTrust_Request * @interface ICGCSystemMsg_GetPurchaseTrust_Request - * @property {number|Long|null} [steamid] CGCSystemMsg_GetPurchaseTrust_Request steamid + * @augments CGCSystemMsg_GetPurchaseTrust_Request.$Properties + * @deprecated Use CGCSystemMsg_GetPurchaseTrust_Request.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetPurchaseTrust_Request. + * @typedef {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} CGCSystemMsg_GetPurchaseTrust_Request.$Shape */ /** * Constructs a new CGCSystemMsg_GetPurchaseTrust_Request. * @exports CGCSystemMsg_GetPurchaseTrust_Request * @classdesc Represents a CGCSystemMsg_GetPurchaseTrust_Request. - * @implements ICGCSystemMsg_GetPurchaseTrust_Request * @constructor - * @param {ICGCSystemMsg_GetPurchaseTrust_Request=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetPurchaseTrust_Request(properties) { + var CGCSystemMsg_GetPurchaseTrust_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetPurchaseTrust_Request steamid. @@ -66631,17 +86190,21 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @instance */ - CGCSystemMsg_GetPurchaseTrust_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CGCSystemMsg_GetPurchaseTrust_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CGCSystemMsg_GetPurchaseTrust_Request instance using the specified properties. * @function create * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request instance + * @type {{ + * (properties: CGCSystemMsg_GetPurchaseTrust_Request.$Shape): CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape; + * (properties?: CGCSystemMsg_GetPurchaseTrust_Request.$Properties): CGCSystemMsg_GetPurchaseTrust_Request; + * }} */ - CGCSystemMsg_GetPurchaseTrust_Request.create = function create(properties) { + CGCSystemMsg_GetPurchaseTrust_Request.create = function(properties) { return new CGCSystemMsg_GetPurchaseTrust_Request(properties); }; @@ -66650,15 +86213,22 @@ * @function encode * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Request.encode = function encode(message, writer) { + CGCSystemMsg_GetPurchaseTrust_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -66667,12 +86237,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Request} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Request.$Properties} message CGCSystemMsg_GetPurchaseTrust_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetPurchaseTrust_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -66682,25 +86252,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request + * @returns {CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape} CGCSystemMsg_GetPurchaseTrust_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Request.decode = function decode(reader, length) { + CGCSystemMsg_GetPurchaseTrust_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetPurchaseTrust_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetPurchaseTrust_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -66710,11 +86297,11 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request + * @returns {CGCSystemMsg_GetPurchaseTrust_Request & CGCSystemMsg_GetPurchaseTrust_Request.$Shape} CGCSystemMsg_GetPurchaseTrust_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Request.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetPurchaseTrust_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -66728,10 +86315,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetPurchaseTrust_Request.verify = function verify(message) { + CGCSystemMsg_GetPurchaseTrust_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -66745,19 +86336,25 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request */ - CGCSystemMsg_GetPurchaseTrust_Request.fromObject = function fromObject(object) { + CGCSystemMsg_GetPurchaseTrust_Request.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetPurchaseTrust_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetPurchaseTrust_Request(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -66770,21 +86367,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetPurchaseTrust_Request.toObject = function toObject(message, options) { + CGCSystemMsg_GetPurchaseTrust_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -66795,8 +86398,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetPurchaseTrust_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetPurchaseTrust_Request.prototype.toJSON = function() { + return CGCSystemMsg_GetPurchaseTrust_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetPurchaseTrust_Request + * @function getTypeUrl + * @memberof CGCSystemMsg_GetPurchaseTrust_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetPurchaseTrust_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetPurchaseTrust_Request"; }; return CGCSystemMsg_GetPurchaseTrust_Request; @@ -66806,28 +86423,41 @@ /** * Properties of a CGCSystemMsg_GetPurchaseTrust_Response. - * @exports ICGCSystemMsg_GetPurchaseTrust_Response - * @interface ICGCSystemMsg_GetPurchaseTrust_Response + * @typedef {Object} CGCSystemMsg_GetPurchaseTrust_Response.$Properties * @property {boolean|null} [has_prior_purchase_history] CGCSystemMsg_GetPurchaseTrust_Response has_prior_purchase_history * @property {boolean|null} [has_no_recent_password_resets] CGCSystemMsg_GetPurchaseTrust_Response has_no_recent_password_resets * @property {boolean|null} [is_wallet_cash_trusted] CGCSystemMsg_GetPurchaseTrust_Response is_wallet_cash_trusted * @property {number|null} [time_all_trusted] CGCSystemMsg_GetPurchaseTrust_Response time_all_trusted + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCSystemMsg_GetPurchaseTrust_Response. + * @exports ICGCSystemMsg_GetPurchaseTrust_Response + * @interface ICGCSystemMsg_GetPurchaseTrust_Response + * @augments CGCSystemMsg_GetPurchaseTrust_Response.$Properties + * @deprecated Use CGCSystemMsg_GetPurchaseTrust_Response.$Properties instead. + */ + + /** + * Shape of a CGCSystemMsg_GetPurchaseTrust_Response. + * @typedef {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} CGCSystemMsg_GetPurchaseTrust_Response.$Shape */ /** * Constructs a new CGCSystemMsg_GetPurchaseTrust_Response. * @exports CGCSystemMsg_GetPurchaseTrust_Response * @classdesc Represents a CGCSystemMsg_GetPurchaseTrust_Response. - * @implements ICGCSystemMsg_GetPurchaseTrust_Response * @constructor - * @param {ICGCSystemMsg_GetPurchaseTrust_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCSystemMsg_GetPurchaseTrust_Response(properties) { + var CGCSystemMsg_GetPurchaseTrust_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCSystemMsg_GetPurchaseTrust_Response has_prior_purchase_history. @@ -66866,10 +86496,14 @@ * @function create * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response=} [properties] Properties to set + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties=} [properties] Properties to set * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response instance + * @type {{ + * (properties: CGCSystemMsg_GetPurchaseTrust_Response.$Shape): CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape; + * (properties?: CGCSystemMsg_GetPurchaseTrust_Response.$Properties): CGCSystemMsg_GetPurchaseTrust_Response; + * }} */ - CGCSystemMsg_GetPurchaseTrust_Response.create = function create(properties) { + CGCSystemMsg_GetPurchaseTrust_Response.create = function(properties) { return new CGCSystemMsg_GetPurchaseTrust_Response(properties); }; @@ -66878,21 +86512,28 @@ * @function encode * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Response.encode = function encode(message, writer) { + CGCSystemMsg_GetPurchaseTrust_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.has_prior_purchase_history != null && Object.hasOwnProperty.call(message, "has_prior_purchase_history")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.has_prior_purchase_history); - if (message.has_no_recent_password_resets != null && Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.has_no_recent_password_resets); - if (message.is_wallet_cash_trusted != null && Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_wallet_cash_trusted); - if (message.time_all_trusted != null && Object.hasOwnProperty.call(message, "time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time_all_trusted); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -66901,12 +86542,12 @@ * @function encodeDelimited * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static - * @param {ICGCSystemMsg_GetPurchaseTrust_Response} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode + * @param {CGCSystemMsg_GetPurchaseTrust_Response.$Properties} message CGCSystemMsg_GetPurchaseTrust_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCSystemMsg_GetPurchaseTrust_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCSystemMsg_GetPurchaseTrust_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -66916,34 +86557,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response + * @returns {CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape} CGCSystemMsg_GetPurchaseTrust_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Response.decode = function decode(reader, length) { + CGCSystemMsg_GetPurchaseTrust_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCSystemMsg_GetPurchaseTrust_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCSystemMsg_GetPurchaseTrust_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.has_prior_purchase_history = reader.bool(); - break; - case 2: - message.has_no_recent_password_resets = reader.bool(); - break; - case 3: - message.is_wallet_cash_trusted = reader.bool(); - break; - case 4: - message.time_all_trusted = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.has_prior_purchase_history = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.has_no_recent_password_resets = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_wallet_cash_trusted = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.time_all_trusted = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -66953,11 +86620,11 @@ * @memberof CGCSystemMsg_GetPurchaseTrust_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response + * @returns {CGCSystemMsg_GetPurchaseTrust_Response & CGCSystemMsg_GetPurchaseTrust_Response.$Shape} CGCSystemMsg_GetPurchaseTrust_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCSystemMsg_GetPurchaseTrust_Response.decodeDelimited = function decodeDelimited(reader) { + CGCSystemMsg_GetPurchaseTrust_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -66971,19 +86638,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCSystemMsg_GetPurchaseTrust_Response.verify = function verify(message) { + CGCSystemMsg_GetPurchaseTrust_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.has_prior_purchase_history != null && message.hasOwnProperty("has_prior_purchase_history")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) if (typeof message.has_prior_purchase_history !== "boolean") return "has_prior_purchase_history: boolean expected"; - if (message.has_no_recent_password_resets != null && message.hasOwnProperty("has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) if (typeof message.has_no_recent_password_resets !== "boolean") return "has_no_recent_password_resets: boolean expected"; - if (message.is_wallet_cash_trusted != null && message.hasOwnProperty("is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) if (typeof message.is_wallet_cash_trusted !== "boolean") return "is_wallet_cash_trusted: boolean expected"; - if (message.time_all_trusted != null && message.hasOwnProperty("time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) if (!$util.isInteger(message.time_all_trusted)) return "time_all_trusted: integer expected"; return null; @@ -66997,16 +86668,22 @@ * @param {Object.} object Plain object * @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response */ - CGCSystemMsg_GetPurchaseTrust_Response.fromObject = function fromObject(object) { + CGCSystemMsg_GetPurchaseTrust_Response.fromObject = function (object, _depth) { if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCSystemMsg_GetPurchaseTrust_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCSystemMsg_GetPurchaseTrust_Response(); if (object.has_prior_purchase_history != null) - message.has_prior_purchase_history = Boolean(object.has_prior_purchase_history); + message.has_prior_purchase_history = $Boolean(object.has_prior_purchase_history); if (object.has_no_recent_password_resets != null) - message.has_no_recent_password_resets = Boolean(object.has_no_recent_password_resets); + message.has_no_recent_password_resets = $Boolean(object.has_no_recent_password_resets); if (object.is_wallet_cash_trusted != null) - message.is_wallet_cash_trusted = Boolean(object.is_wallet_cash_trusted); + message.is_wallet_cash_trusted = $Boolean(object.is_wallet_cash_trusted); if (object.time_all_trusted != null) message.time_all_trusted = object.time_all_trusted >>> 0; return message; @@ -67021,9 +86698,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCSystemMsg_GetPurchaseTrust_Response.toObject = function toObject(message, options) { + CGCSystemMsg_GetPurchaseTrust_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.has_prior_purchase_history = false; @@ -67031,13 +86712,13 @@ object.is_wallet_cash_trusted = false; object.time_all_trusted = 0; } - if (message.has_prior_purchase_history != null && message.hasOwnProperty("has_prior_purchase_history")) + if (message.has_prior_purchase_history != null && $Object.hasOwnProperty.call(message, "has_prior_purchase_history")) object.has_prior_purchase_history = message.has_prior_purchase_history; - if (message.has_no_recent_password_resets != null && message.hasOwnProperty("has_no_recent_password_resets")) + if (message.has_no_recent_password_resets != null && $Object.hasOwnProperty.call(message, "has_no_recent_password_resets")) object.has_no_recent_password_resets = message.has_no_recent_password_resets; - if (message.is_wallet_cash_trusted != null && message.hasOwnProperty("is_wallet_cash_trusted")) + if (message.is_wallet_cash_trusted != null && $Object.hasOwnProperty.call(message, "is_wallet_cash_trusted")) object.is_wallet_cash_trusted = message.is_wallet_cash_trusted; - if (message.time_all_trusted != null && message.hasOwnProperty("time_all_trusted")) + if (message.time_all_trusted != null && $Object.hasOwnProperty.call(message, "time_all_trusted")) object.time_all_trusted = message.time_all_trusted; return object; }; @@ -67049,8 +86730,22 @@ * @instance * @returns {Object.} JSON object */ - CGCSystemMsg_GetPurchaseTrust_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCSystemMsg_GetPurchaseTrust_Response.prototype.toJSON = function() { + return CGCSystemMsg_GetPurchaseTrust_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCSystemMsg_GetPurchaseTrust_Response + * @function getTypeUrl + * @memberof CGCSystemMsg_GetPurchaseTrust_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCSystemMsg_GetPurchaseTrust_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCSystemMsg_GetPurchaseTrust_Response"; }; return CGCSystemMsg_GetPurchaseTrust_Response; @@ -67060,29 +86755,42 @@ /** * Properties of a CMsgGCHAccountVacStatusChange. - * @exports ICMsgGCHAccountVacStatusChange - * @interface ICMsgGCHAccountVacStatusChange + * @typedef {Object} CMsgGCHAccountVacStatusChange.$Properties * @property {number|Long|null} [steam_id] CMsgGCHAccountVacStatusChange steam_id * @property {number|null} [app_id] CMsgGCHAccountVacStatusChange app_id * @property {number|null} [rtime_vacban_starts] CMsgGCHAccountVacStatusChange rtime_vacban_starts * @property {boolean|null} [is_banned_now] CMsgGCHAccountVacStatusChange is_banned_now * @property {boolean|null} [is_banned_future] CMsgGCHAccountVacStatusChange is_banned_future + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountVacStatusChange. + * @exports ICMsgGCHAccountVacStatusChange + * @interface ICMsgGCHAccountVacStatusChange + * @augments CMsgGCHAccountVacStatusChange.$Properties + * @deprecated Use CMsgGCHAccountVacStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountVacStatusChange. + * @typedef {CMsgGCHAccountVacStatusChange.$Properties} CMsgGCHAccountVacStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountVacStatusChange. * @exports CMsgGCHAccountVacStatusChange * @classdesc Represents a CMsgGCHAccountVacStatusChange. - * @implements ICMsgGCHAccountVacStatusChange * @constructor - * @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountVacStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountVacStatusChange(properties) { + var CMsgGCHAccountVacStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountVacStatusChange steam_id. @@ -67090,7 +86798,7 @@ * @memberof CMsgGCHAccountVacStatusChange * @instance */ - CMsgGCHAccountVacStatusChange.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountVacStatusChange.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountVacStatusChange app_id. @@ -67129,10 +86837,14 @@ * @function create * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountVacStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountVacStatusChange.$Shape): CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape; + * (properties?: CMsgGCHAccountVacStatusChange.$Properties): CMsgGCHAccountVacStatusChange; + * }} */ - CMsgGCHAccountVacStatusChange.create = function create(properties) { + CMsgGCHAccountVacStatusChange.create = function(properties) { return new CMsgGCHAccountVacStatusChange(properties); }; @@ -67141,23 +86853,30 @@ * @function encode * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange} message CMsgGCHAccountVacStatusChange message or plain object to encode + * @param {CMsgGCHAccountVacStatusChange.$Properties} message CMsgGCHAccountVacStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountVacStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountVacStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id); - if (message.rtime_vacban_starts != null && Object.hasOwnProperty.call(message, "rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.rtime_vacban_starts); - if (message.is_banned_now != null && Object.hasOwnProperty.call(message, "is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_banned_now); - if (message.is_banned_future != null && Object.hasOwnProperty.call(message, "is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_banned_future); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -67166,12 +86885,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountVacStatusChange * @static - * @param {ICMsgGCHAccountVacStatusChange} message CMsgGCHAccountVacStatusChange message or plain object to encode + * @param {CMsgGCHAccountVacStatusChange.$Properties} message CMsgGCHAccountVacStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountVacStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountVacStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -67181,37 +86900,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange + * @returns {CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape} CMsgGCHAccountVacStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountVacStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountVacStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountVacStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountVacStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.app_id = reader.uint32(); - break; - case 3: - message.rtime_vacban_starts = reader.uint32(); - break; - case 4: - message.is_banned_now = reader.bool(); - break; - case 5: - message.is_banned_future = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.rtime_vacban_starts = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_banned_now = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_banned_future = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -67221,11 +86969,11 @@ * @memberof CMsgGCHAccountVacStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange + * @returns {CMsgGCHAccountVacStatusChange & CMsgGCHAccountVacStatusChange.$Shape} CMsgGCHAccountVacStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountVacStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountVacStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -67239,22 +86987,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountVacStatusChange.verify = function verify(message) { + CMsgGCHAccountVacStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.rtime_vacban_starts != null && message.hasOwnProperty("rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) if (!$util.isInteger(message.rtime_vacban_starts)) return "rtime_vacban_starts: integer expected"; - if (message.is_banned_now != null && message.hasOwnProperty("is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) if (typeof message.is_banned_now !== "boolean") return "is_banned_now: boolean expected"; - if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) if (typeof message.is_banned_future !== "boolean") return "is_banned_future: boolean expected"; return null; @@ -67268,27 +87020,33 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange */ - CMsgGCHAccountVacStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountVacStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountVacStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountVacStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountVacStatusChange(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.rtime_vacban_starts != null) message.rtime_vacban_starts = object.rtime_vacban_starts >>> 0; if (object.is_banned_now != null) - message.is_banned_now = Boolean(object.is_banned_now); + message.is_banned_now = $Boolean(object.is_banned_now); if (object.is_banned_future != null) - message.is_banned_future = Boolean(object.is_banned_future); + message.is_banned_future = $Boolean(object.is_banned_future); return message; }; @@ -67301,33 +87059,39 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountVacStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountVacStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.app_id = 0; object.rtime_vacban_starts = 0; object.is_banned_now = false; object.is_banned_future = false; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.rtime_vacban_starts != null && message.hasOwnProperty("rtime_vacban_starts")) + if (message.rtime_vacban_starts != null && $Object.hasOwnProperty.call(message, "rtime_vacban_starts")) object.rtime_vacban_starts = message.rtime_vacban_starts; - if (message.is_banned_now != null && message.hasOwnProperty("is_banned_now")) + if (message.is_banned_now != null && $Object.hasOwnProperty.call(message, "is_banned_now")) object.is_banned_now = message.is_banned_now; - if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future")) + if (message.is_banned_future != null && $Object.hasOwnProperty.call(message, "is_banned_future")) object.is_banned_future = message.is_banned_future; return object; }; @@ -67339,8 +87103,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountVacStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountVacStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountVacStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountVacStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountVacStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountVacStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountVacStatusChange"; }; return CMsgGCHAccountVacStatusChange; @@ -67350,28 +87128,41 @@ /** * Properties of a CMsgGCHAccountTradeBanStatusChange. - * @exports ICMsgGCHAccountTradeBanStatusChange - * @interface ICMsgGCHAccountTradeBanStatusChange + * @typedef {Object} CMsgGCHAccountTradeBanStatusChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountTradeBanStatusChange steamid * @property {number|null} [appid] CMsgGCHAccountTradeBanStatusChange appid * @property {boolean|null} [is_banned] CMsgGCHAccountTradeBanStatusChange is_banned * @property {number|null} [time_banned_until] CMsgGCHAccountTradeBanStatusChange time_banned_until + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountTradeBanStatusChange. + * @exports ICMsgGCHAccountTradeBanStatusChange + * @interface ICMsgGCHAccountTradeBanStatusChange + * @augments CMsgGCHAccountTradeBanStatusChange.$Properties + * @deprecated Use CMsgGCHAccountTradeBanStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountTradeBanStatusChange. + * @typedef {CMsgGCHAccountTradeBanStatusChange.$Properties} CMsgGCHAccountTradeBanStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountTradeBanStatusChange. * @exports CMsgGCHAccountTradeBanStatusChange * @classdesc Represents a CMsgGCHAccountTradeBanStatusChange. - * @implements ICMsgGCHAccountTradeBanStatusChange * @constructor - * @param {ICMsgGCHAccountTradeBanStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountTradeBanStatusChange(properties) { + var CMsgGCHAccountTradeBanStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountTradeBanStatusChange steamid. @@ -67379,7 +87170,7 @@ * @memberof CMsgGCHAccountTradeBanStatusChange * @instance */ - CMsgGCHAccountTradeBanStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountTradeBanStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountTradeBanStatusChange appid. @@ -67410,10 +87201,14 @@ * @function create * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountTradeBanStatusChange.$Shape): CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape; + * (properties?: CMsgGCHAccountTradeBanStatusChange.$Properties): CMsgGCHAccountTradeBanStatusChange; + * }} */ - CMsgGCHAccountTradeBanStatusChange.create = function create(properties) { + CMsgGCHAccountTradeBanStatusChange.create = function(properties) { return new CMsgGCHAccountTradeBanStatusChange(properties); }; @@ -67422,21 +87217,28 @@ * @function encode * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTradeBanStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountTradeBanStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_banned != null && Object.hasOwnProperty.call(message, "is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_banned); - if (message.time_banned_until != null && Object.hasOwnProperty.call(message, "time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time_banned_until); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -67445,12 +87247,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountTradeBanStatusChange * @static - * @param {ICMsgGCHAccountTradeBanStatusChange} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode + * @param {CMsgGCHAccountTradeBanStatusChange.$Properties} message CMsgGCHAccountTradeBanStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTradeBanStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountTradeBanStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -67460,34 +87262,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange + * @returns {CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape} CMsgGCHAccountTradeBanStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTradeBanStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountTradeBanStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountTradeBanStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountTradeBanStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_banned = reader.bool(); - break; - case 4: - message.time_banned_until = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_banned = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.time_banned_until = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -67497,11 +87325,11 @@ * @memberof CMsgGCHAccountTradeBanStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange + * @returns {CMsgGCHAccountTradeBanStatusChange & CMsgGCHAccountTradeBanStatusChange.$Shape} CMsgGCHAccountTradeBanStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTradeBanStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountTradeBanStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -67515,19 +87343,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountTradeBanStatusChange.verify = function verify(message) { + CMsgGCHAccountTradeBanStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_banned != null && message.hasOwnProperty("is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) if (typeof message.is_banned !== "boolean") return "is_banned: boolean expected"; - if (message.time_banned_until != null && message.hasOwnProperty("time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) if (!$util.isInteger(message.time_banned_until)) return "time_banned_until: integer expected"; return null; @@ -67541,23 +87373,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountTradeBanStatusChange} CMsgGCHAccountTradeBanStatusChange */ - CMsgGCHAccountTradeBanStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountTradeBanStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountTradeBanStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountTradeBanStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountTradeBanStatusChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_banned != null) - message.is_banned = Boolean(object.is_banned); + message.is_banned = $Boolean(object.is_banned); if (object.time_banned_until != null) message.time_banned_until = object.time_banned_until >>> 0; return message; @@ -67572,30 +87410,36 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountTradeBanStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountTradeBanStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_banned = false; object.time_banned_until = 0; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_banned != null && message.hasOwnProperty("is_banned")) + if (message.is_banned != null && $Object.hasOwnProperty.call(message, "is_banned")) object.is_banned = message.is_banned; - if (message.time_banned_until != null && message.hasOwnProperty("time_banned_until")) + if (message.time_banned_until != null && $Object.hasOwnProperty.call(message, "time_banned_until")) object.time_banned_until = message.time_banned_until; return object; }; @@ -67607,8 +87451,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountTradeBanStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountTradeBanStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountTradeBanStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountTradeBanStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountTradeBanStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountTradeBanStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountTradeBanStatusChange"; }; return CMsgGCHAccountTradeBanStatusChange; @@ -67618,27 +87476,40 @@ /** * Properties of a CMsgGCHAccountLockStatusChange. - * @exports ICMsgGCHAccountLockStatusChange - * @interface ICMsgGCHAccountLockStatusChange + * @typedef {Object} CMsgGCHAccountLockStatusChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountLockStatusChange steamid * @property {number|null} [appid] CMsgGCHAccountLockStatusChange appid * @property {boolean|null} [is_locked] CMsgGCHAccountLockStatusChange is_locked + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountLockStatusChange. + * @exports ICMsgGCHAccountLockStatusChange + * @interface ICMsgGCHAccountLockStatusChange + * @augments CMsgGCHAccountLockStatusChange.$Properties + * @deprecated Use CMsgGCHAccountLockStatusChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountLockStatusChange. + * @typedef {CMsgGCHAccountLockStatusChange.$Properties} CMsgGCHAccountLockStatusChange.$Shape */ /** * Constructs a new CMsgGCHAccountLockStatusChange. * @exports CMsgGCHAccountLockStatusChange * @classdesc Represents a CMsgGCHAccountLockStatusChange. - * @implements ICMsgGCHAccountLockStatusChange * @constructor - * @param {ICMsgGCHAccountLockStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountLockStatusChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountLockStatusChange(properties) { + var CMsgGCHAccountLockStatusChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountLockStatusChange steamid. @@ -67646,7 +87517,7 @@ * @memberof CMsgGCHAccountLockStatusChange * @instance */ - CMsgGCHAccountLockStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountLockStatusChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountLockStatusChange appid. @@ -67669,10 +87540,14 @@ * @function create * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange=} [properties] Properties to set + * @param {CMsgGCHAccountLockStatusChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange instance + * @type {{ + * (properties: CMsgGCHAccountLockStatusChange.$Shape): CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape; + * (properties?: CMsgGCHAccountLockStatusChange.$Properties): CMsgGCHAccountLockStatusChange; + * }} */ - CMsgGCHAccountLockStatusChange.create = function create(properties) { + CMsgGCHAccountLockStatusChange.create = function(properties) { return new CMsgGCHAccountLockStatusChange(properties); }; @@ -67681,19 +87556,26 @@ * @function encode * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange} message CMsgGCHAccountLockStatusChange message or plain object to encode + * @param {CMsgGCHAccountLockStatusChange.$Properties} message CMsgGCHAccountLockStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountLockStatusChange.encode = function encode(message, writer) { + CMsgGCHAccountLockStatusChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_locked != null && Object.hasOwnProperty.call(message, "is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_locked); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -67702,12 +87584,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountLockStatusChange * @static - * @param {ICMsgGCHAccountLockStatusChange} message CMsgGCHAccountLockStatusChange message or plain object to encode + * @param {CMsgGCHAccountLockStatusChange.$Properties} message CMsgGCHAccountLockStatusChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountLockStatusChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountLockStatusChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -67717,31 +87599,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange + * @returns {CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape} CMsgGCHAccountLockStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountLockStatusChange.decode = function decode(reader, length) { + CMsgGCHAccountLockStatusChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountLockStatusChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountLockStatusChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_locked = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_locked = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -67751,11 +87656,11 @@ * @memberof CMsgGCHAccountLockStatusChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange + * @returns {CMsgGCHAccountLockStatusChange & CMsgGCHAccountLockStatusChange.$Shape} CMsgGCHAccountLockStatusChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountLockStatusChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountLockStatusChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -67769,16 +87674,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountLockStatusChange.verify = function verify(message) { + CMsgGCHAccountLockStatusChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_locked != null && message.hasOwnProperty("is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) if (typeof message.is_locked !== "boolean") return "is_locked: boolean expected"; return null; @@ -67792,23 +87701,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountLockStatusChange} CMsgGCHAccountLockStatusChange */ - CMsgGCHAccountLockStatusChange.fromObject = function fromObject(object) { + CMsgGCHAccountLockStatusChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountLockStatusChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountLockStatusChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountLockStatusChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_locked != null) - message.is_locked = Boolean(object.is_locked); + message.is_locked = $Boolean(object.is_locked); return message; }; @@ -67821,27 +87736,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountLockStatusChange.toObject = function toObject(message, options) { + CMsgGCHAccountLockStatusChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_locked = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_locked != null && message.hasOwnProperty("is_locked")) + if (message.is_locked != null && $Object.hasOwnProperty.call(message, "is_locked")) object.is_locked = message.is_locked; return object; }; @@ -67853,8 +87774,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountLockStatusChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountLockStatusChange.prototype.toJSON = function() { + return CMsgGCHAccountLockStatusChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountLockStatusChange + * @function getTypeUrl + * @memberof CMsgGCHAccountLockStatusChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountLockStatusChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountLockStatusChange"; }; return CMsgGCHAccountLockStatusChange; @@ -67864,27 +87799,40 @@ /** * Properties of a CMsgGCHVacVerificationChange. - * @exports ICMsgGCHVacVerificationChange - * @interface ICMsgGCHVacVerificationChange + * @typedef {Object} CMsgGCHVacVerificationChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHVacVerificationChange steamid * @property {number|null} [appid] CMsgGCHVacVerificationChange appid * @property {boolean|null} [is_verified] CMsgGCHVacVerificationChange is_verified + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHVacVerificationChange. + * @exports ICMsgGCHVacVerificationChange + * @interface ICMsgGCHVacVerificationChange + * @augments CMsgGCHVacVerificationChange.$Properties + * @deprecated Use CMsgGCHVacVerificationChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHVacVerificationChange. + * @typedef {CMsgGCHVacVerificationChange.$Properties} CMsgGCHVacVerificationChange.$Shape */ /** * Constructs a new CMsgGCHVacVerificationChange. * @exports CMsgGCHVacVerificationChange * @classdesc Represents a CMsgGCHVacVerificationChange. - * @implements ICMsgGCHVacVerificationChange * @constructor - * @param {ICMsgGCHVacVerificationChange=} [properties] Properties to set + * @param {CMsgGCHVacVerificationChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHVacVerificationChange(properties) { + var CMsgGCHVacVerificationChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHVacVerificationChange steamid. @@ -67892,7 +87840,7 @@ * @memberof CMsgGCHVacVerificationChange * @instance */ - CMsgGCHVacVerificationChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHVacVerificationChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHVacVerificationChange appid. @@ -67915,10 +87863,14 @@ * @function create * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange=} [properties] Properties to set + * @param {CMsgGCHVacVerificationChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange instance + * @type {{ + * (properties: CMsgGCHVacVerificationChange.$Shape): CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape; + * (properties?: CMsgGCHVacVerificationChange.$Properties): CMsgGCHVacVerificationChange; + * }} */ - CMsgGCHVacVerificationChange.create = function create(properties) { + CMsgGCHVacVerificationChange.create = function(properties) { return new CMsgGCHVacVerificationChange(properties); }; @@ -67927,19 +87879,26 @@ * @function encode * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange} message CMsgGCHVacVerificationChange message or plain object to encode + * @param {CMsgGCHVacVerificationChange.$Properties} message CMsgGCHVacVerificationChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHVacVerificationChange.encode = function encode(message, writer) { + CMsgGCHVacVerificationChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.is_verified != null && Object.hasOwnProperty.call(message, "is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_verified); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -67948,12 +87907,12 @@ * @function encodeDelimited * @memberof CMsgGCHVacVerificationChange * @static - * @param {ICMsgGCHVacVerificationChange} message CMsgGCHVacVerificationChange message or plain object to encode + * @param {CMsgGCHVacVerificationChange.$Properties} message CMsgGCHVacVerificationChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHVacVerificationChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHVacVerificationChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -67963,31 +87922,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange + * @returns {CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape} CMsgGCHVacVerificationChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHVacVerificationChange.decode = function decode(reader, length) { + CMsgGCHVacVerificationChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHVacVerificationChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHVacVerificationChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.is_verified = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.is_verified = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -67997,11 +87979,11 @@ * @memberof CMsgGCHVacVerificationChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange + * @returns {CMsgGCHVacVerificationChange & CMsgGCHVacVerificationChange.$Shape} CMsgGCHVacVerificationChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHVacVerificationChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHVacVerificationChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -68015,16 +87997,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHVacVerificationChange.verify = function verify(message) { + CMsgGCHVacVerificationChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) if (typeof message.is_verified !== "boolean") return "is_verified: boolean expected"; return null; @@ -68038,23 +88024,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHVacVerificationChange} CMsgGCHVacVerificationChange */ - CMsgGCHVacVerificationChange.fromObject = function fromObject(object) { + CMsgGCHVacVerificationChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHVacVerificationChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHVacVerificationChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHVacVerificationChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.is_verified != null) - message.is_verified = Boolean(object.is_verified); + message.is_verified = $Boolean(object.is_verified); return message; }; @@ -68067,27 +88059,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHVacVerificationChange.toObject = function toObject(message, options) { + CMsgGCHVacVerificationChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.is_verified = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) object.is_verified = message.is_verified; return object; }; @@ -68099,8 +88097,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHVacVerificationChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHVacVerificationChange.prototype.toJSON = function() { + return CMsgGCHVacVerificationChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHVacVerificationChange + * @function getTypeUrl + * @memberof CMsgGCHVacVerificationChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHVacVerificationChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHVacVerificationChange"; }; return CMsgGCHVacVerificationChange; @@ -68110,29 +88122,42 @@ /** * Properties of a CMsgGCHAccountPhoneNumberChange. - * @exports ICMsgGCHAccountPhoneNumberChange - * @interface ICMsgGCHAccountPhoneNumberChange + * @typedef {Object} CMsgGCHAccountPhoneNumberChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountPhoneNumberChange steamid * @property {number|null} [appid] CMsgGCHAccountPhoneNumberChange appid * @property {number|Long|null} [phone_id] CMsgGCHAccountPhoneNumberChange phone_id * @property {boolean|null} [is_verified] CMsgGCHAccountPhoneNumberChange is_verified * @property {boolean|null} [is_identifying] CMsgGCHAccountPhoneNumberChange is_identifying + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountPhoneNumberChange. + * @exports ICMsgGCHAccountPhoneNumberChange + * @interface ICMsgGCHAccountPhoneNumberChange + * @augments CMsgGCHAccountPhoneNumberChange.$Properties + * @deprecated Use CMsgGCHAccountPhoneNumberChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountPhoneNumberChange. + * @typedef {CMsgGCHAccountPhoneNumberChange.$Properties} CMsgGCHAccountPhoneNumberChange.$Shape */ /** * Constructs a new CMsgGCHAccountPhoneNumberChange. * @exports CMsgGCHAccountPhoneNumberChange * @classdesc Represents a CMsgGCHAccountPhoneNumberChange. - * @implements ICMsgGCHAccountPhoneNumberChange * @constructor - * @param {ICMsgGCHAccountPhoneNumberChange=} [properties] Properties to set + * @param {CMsgGCHAccountPhoneNumberChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountPhoneNumberChange(properties) { + var CMsgGCHAccountPhoneNumberChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountPhoneNumberChange steamid. @@ -68140,7 +88165,7 @@ * @memberof CMsgGCHAccountPhoneNumberChange * @instance */ - CMsgGCHAccountPhoneNumberChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountPhoneNumberChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountPhoneNumberChange appid. @@ -68179,10 +88204,14 @@ * @function create * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange=} [properties] Properties to set + * @param {CMsgGCHAccountPhoneNumberChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange instance + * @type {{ + * (properties: CMsgGCHAccountPhoneNumberChange.$Shape): CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape; + * (properties?: CMsgGCHAccountPhoneNumberChange.$Properties): CMsgGCHAccountPhoneNumberChange; + * }} */ - CMsgGCHAccountPhoneNumberChange.create = function create(properties) { + CMsgGCHAccountPhoneNumberChange.create = function(properties) { return new CMsgGCHAccountPhoneNumberChange(properties); }; @@ -68191,23 +88220,30 @@ * @function encode * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange} message CMsgGCHAccountPhoneNumberChange message or plain object to encode + * @param {CMsgGCHAccountPhoneNumberChange.$Properties} message CMsgGCHAccountPhoneNumberChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountPhoneNumberChange.encode = function encode(message, writer) { + CMsgGCHAccountPhoneNumberChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.phone_id != null && Object.hasOwnProperty.call(message, "phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.phone_id); - if (message.is_verified != null && Object.hasOwnProperty.call(message, "is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_verified); - if (message.is_identifying != null && Object.hasOwnProperty.call(message, "is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_identifying); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -68216,12 +88252,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountPhoneNumberChange * @static - * @param {ICMsgGCHAccountPhoneNumberChange} message CMsgGCHAccountPhoneNumberChange message or plain object to encode + * @param {CMsgGCHAccountPhoneNumberChange.$Properties} message CMsgGCHAccountPhoneNumberChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountPhoneNumberChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountPhoneNumberChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -68231,37 +88267,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange + * @returns {CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape} CMsgGCHAccountPhoneNumberChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountPhoneNumberChange.decode = function decode(reader, length) { + CMsgGCHAccountPhoneNumberChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountPhoneNumberChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountPhoneNumberChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.phone_id = reader.uint64(); - break; - case 4: - message.is_verified = reader.bool(); - break; - case 5: - message.is_identifying = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.phone_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.is_verified = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.is_identifying = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -68271,11 +88336,11 @@ * @memberof CMsgGCHAccountPhoneNumberChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange + * @returns {CMsgGCHAccountPhoneNumberChange & CMsgGCHAccountPhoneNumberChange.$Shape} CMsgGCHAccountPhoneNumberChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountPhoneNumberChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountPhoneNumberChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -68289,22 +88354,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountPhoneNumberChange.verify = function verify(message) { + CMsgGCHAccountPhoneNumberChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) if (!$util.isInteger(message.phone_id) && !(message.phone_id && $util.isInteger(message.phone_id.low) && $util.isInteger(message.phone_id.high))) return "phone_id: integer|Long expected"; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) if (typeof message.is_verified !== "boolean") return "is_verified: boolean expected"; - if (message.is_identifying != null && message.hasOwnProperty("is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) if (typeof message.is_identifying !== "boolean") return "is_identifying: boolean expected"; return null; @@ -68318,34 +88387,40 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountPhoneNumberChange} CMsgGCHAccountPhoneNumberChange */ - CMsgGCHAccountPhoneNumberChange.fromObject = function fromObject(object) { + CMsgGCHAccountPhoneNumberChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountPhoneNumberChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountPhoneNumberChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountPhoneNumberChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.phone_id != null) if ($util.Long) - (message.phone_id = $util.Long.fromValue(object.phone_id)).unsigned = true; + message.phone_id = $util.Long.fromValue(object.phone_id, true); else if (typeof object.phone_id === "string") - message.phone_id = parseInt(object.phone_id, 10); + message.phone_id = $parseInt(object.phone_id, 10); else if (typeof object.phone_id === "number") message.phone_id = object.phone_id; else if (typeof object.phone_id === "object") message.phone_id = new $util.LongBits(object.phone_id.low >>> 0, object.phone_id.high >>> 0).toNumber(true); if (object.is_verified != null) - message.is_verified = Boolean(object.is_verified); + message.is_verified = $Boolean(object.is_verified); if (object.is_identifying != null) - message.is_identifying = Boolean(object.is_identifying); + message.is_identifying = $Boolean(object.is_identifying); return message; }; @@ -68358,40 +88433,48 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountPhoneNumberChange.toObject = function toObject(message, options) { + CMsgGCHAccountPhoneNumberChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.phone_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.phone_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.phone_id = options.longs === String ? "0" : 0; + object.phone_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.is_verified = false; object.is_identifying = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.phone_id != null && message.hasOwnProperty("phone_id")) - if (typeof message.phone_id === "number") - object.phone_id = options.longs === String ? String(message.phone_id) : message.phone_id; + if (message.phone_id != null && $Object.hasOwnProperty.call(message, "phone_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.phone_id = typeof message.phone_id === "number" ? $BigInt(message.phone_id) : $util.Long.fromBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0, true).toBigInt(); + else if (typeof message.phone_id === "number") + object.phone_id = options.longs === $String ? $String(message.phone_id) : message.phone_id; else - object.phone_id = options.longs === String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; - if (message.is_verified != null && message.hasOwnProperty("is_verified")) + object.phone_id = options.longs === $String ? $util.Long.prototype.toString.call(message.phone_id) : options.longs === $Number ? new $util.LongBits(message.phone_id.low >>> 0, message.phone_id.high >>> 0).toNumber(true) : message.phone_id; + if (message.is_verified != null && $Object.hasOwnProperty.call(message, "is_verified")) object.is_verified = message.is_verified; - if (message.is_identifying != null && message.hasOwnProperty("is_identifying")) + if (message.is_identifying != null && $Object.hasOwnProperty.call(message, "is_identifying")) object.is_identifying = message.is_identifying; return object; }; @@ -68403,8 +88486,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountPhoneNumberChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountPhoneNumberChange.prototype.toJSON = function() { + return CMsgGCHAccountPhoneNumberChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountPhoneNumberChange + * @function getTypeUrl + * @memberof CMsgGCHAccountPhoneNumberChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountPhoneNumberChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountPhoneNumberChange"; }; return CMsgGCHAccountPhoneNumberChange; @@ -68414,27 +88511,40 @@ /** * Properties of a CMsgGCHAccountTwoFactorChange. - * @exports ICMsgGCHAccountTwoFactorChange - * @interface ICMsgGCHAccountTwoFactorChange + * @typedef {Object} CMsgGCHAccountTwoFactorChange.$Properties * @property {number|Long|null} [steamid] CMsgGCHAccountTwoFactorChange steamid * @property {number|null} [appid] CMsgGCHAccountTwoFactorChange appid * @property {boolean|null} [twofactor_enabled] CMsgGCHAccountTwoFactorChange twofactor_enabled + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHAccountTwoFactorChange. + * @exports ICMsgGCHAccountTwoFactorChange + * @interface ICMsgGCHAccountTwoFactorChange + * @augments CMsgGCHAccountTwoFactorChange.$Properties + * @deprecated Use CMsgGCHAccountTwoFactorChange.$Properties instead. + */ + + /** + * Shape of a CMsgGCHAccountTwoFactorChange. + * @typedef {CMsgGCHAccountTwoFactorChange.$Properties} CMsgGCHAccountTwoFactorChange.$Shape */ /** * Constructs a new CMsgGCHAccountTwoFactorChange. * @exports CMsgGCHAccountTwoFactorChange * @classdesc Represents a CMsgGCHAccountTwoFactorChange. - * @implements ICMsgGCHAccountTwoFactorChange * @constructor - * @param {ICMsgGCHAccountTwoFactorChange=} [properties] Properties to set + * @param {CMsgGCHAccountTwoFactorChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHAccountTwoFactorChange(properties) { + var CMsgGCHAccountTwoFactorChange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHAccountTwoFactorChange steamid. @@ -68442,7 +88552,7 @@ * @memberof CMsgGCHAccountTwoFactorChange * @instance */ - CMsgGCHAccountTwoFactorChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHAccountTwoFactorChange.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHAccountTwoFactorChange appid. @@ -68465,10 +88575,14 @@ * @function create * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange=} [properties] Properties to set + * @param {CMsgGCHAccountTwoFactorChange.$Properties=} [properties] Properties to set * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange instance + * @type {{ + * (properties: CMsgGCHAccountTwoFactorChange.$Shape): CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape; + * (properties?: CMsgGCHAccountTwoFactorChange.$Properties): CMsgGCHAccountTwoFactorChange; + * }} */ - CMsgGCHAccountTwoFactorChange.create = function create(properties) { + CMsgGCHAccountTwoFactorChange.create = function(properties) { return new CMsgGCHAccountTwoFactorChange(properties); }; @@ -68477,19 +88591,26 @@ * @function encode * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange} message CMsgGCHAccountTwoFactorChange message or plain object to encode + * @param {CMsgGCHAccountTwoFactorChange.$Properties} message CMsgGCHAccountTwoFactorChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTwoFactorChange.encode = function encode(message, writer) { + CMsgGCHAccountTwoFactorChange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.twofactor_enabled != null && Object.hasOwnProperty.call(message, "twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.twofactor_enabled); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -68498,12 +88619,12 @@ * @function encodeDelimited * @memberof CMsgGCHAccountTwoFactorChange * @static - * @param {ICMsgGCHAccountTwoFactorChange} message CMsgGCHAccountTwoFactorChange message or plain object to encode + * @param {CMsgGCHAccountTwoFactorChange.$Properties} message CMsgGCHAccountTwoFactorChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHAccountTwoFactorChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHAccountTwoFactorChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -68513,31 +88634,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange + * @returns {CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape} CMsgGCHAccountTwoFactorChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTwoFactorChange.decode = function decode(reader, length) { + CMsgGCHAccountTwoFactorChange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHAccountTwoFactorChange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHAccountTwoFactorChange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.twofactor_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.twofactor_enabled = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -68547,11 +88691,11 @@ * @memberof CMsgGCHAccountTwoFactorChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange + * @returns {CMsgGCHAccountTwoFactorChange & CMsgGCHAccountTwoFactorChange.$Shape} CMsgGCHAccountTwoFactorChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHAccountTwoFactorChange.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHAccountTwoFactorChange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -68565,16 +88709,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHAccountTwoFactorChange.verify = function verify(message) { + CMsgGCHAccountTwoFactorChange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.twofactor_enabled != null && message.hasOwnProperty("twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) if (typeof message.twofactor_enabled !== "boolean") return "twofactor_enabled: boolean expected"; return null; @@ -68588,23 +88736,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCHAccountTwoFactorChange} CMsgGCHAccountTwoFactorChange */ - CMsgGCHAccountTwoFactorChange.fromObject = function fromObject(object) { + CMsgGCHAccountTwoFactorChange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHAccountTwoFactorChange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHAccountTwoFactorChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHAccountTwoFactorChange(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.twofactor_enabled != null) - message.twofactor_enabled = Boolean(object.twofactor_enabled); + message.twofactor_enabled = $Boolean(object.twofactor_enabled); return message; }; @@ -68617,27 +88771,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHAccountTwoFactorChange.toObject = function toObject(message, options) { + CMsgGCHAccountTwoFactorChange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.twofactor_enabled = false; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.twofactor_enabled != null && message.hasOwnProperty("twofactor_enabled")) + if (message.twofactor_enabled != null && $Object.hasOwnProperty.call(message, "twofactor_enabled")) object.twofactor_enabled = message.twofactor_enabled; return object; }; @@ -68649,8 +88809,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHAccountTwoFactorChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHAccountTwoFactorChange.prototype.toJSON = function() { + return CMsgGCHAccountTwoFactorChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHAccountTwoFactorChange + * @function getTypeUrl + * @memberof CMsgGCHAccountTwoFactorChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHAccountTwoFactorChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHAccountTwoFactorChange"; }; return CMsgGCHAccountTwoFactorChange; @@ -68658,27 +88832,40 @@ $root.CMsgGCGetPartnerAccountLink = (function() { + /** + * Properties of a CMsgGCGetPartnerAccountLink. + * @typedef {Object} CMsgGCGetPartnerAccountLink.$Properties + * @property {number|Long|null} [steamid] CMsgGCGetPartnerAccountLink steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCGetPartnerAccountLink. * @exports ICMsgGCGetPartnerAccountLink * @interface ICMsgGCGetPartnerAccountLink - * @property {number|Long|null} [steamid] CMsgGCGetPartnerAccountLink steamid + * @augments CMsgGCGetPartnerAccountLink.$Properties + * @deprecated Use CMsgGCGetPartnerAccountLink.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPartnerAccountLink. + * @typedef {CMsgGCGetPartnerAccountLink.$Properties} CMsgGCGetPartnerAccountLink.$Shape */ /** * Constructs a new CMsgGCGetPartnerAccountLink. * @exports CMsgGCGetPartnerAccountLink * @classdesc Represents a CMsgGCGetPartnerAccountLink. - * @implements ICMsgGCGetPartnerAccountLink * @constructor - * @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPartnerAccountLink(properties) { + var CMsgGCGetPartnerAccountLink = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPartnerAccountLink steamid. @@ -68686,17 +88873,21 @@ * @memberof CMsgGCGetPartnerAccountLink * @instance */ - CMsgGCGetPartnerAccountLink.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCGetPartnerAccountLink.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCGetPartnerAccountLink instance using the specified properties. * @function create * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink instance + * @type {{ + * (properties: CMsgGCGetPartnerAccountLink.$Shape): CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape; + * (properties?: CMsgGCGetPartnerAccountLink.$Properties): CMsgGCGetPartnerAccountLink; + * }} */ - CMsgGCGetPartnerAccountLink.create = function create(properties) { + CMsgGCGetPartnerAccountLink.create = function(properties) { return new CMsgGCGetPartnerAccountLink(properties); }; @@ -68705,15 +88896,22 @@ * @function encode * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink} message CMsgGCGetPartnerAccountLink message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink.$Properties} message CMsgGCGetPartnerAccountLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink.encode = function encode(message, writer) { + CMsgGCGetPartnerAccountLink.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -68722,12 +88920,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPartnerAccountLink * @static - * @param {ICMsgGCGetPartnerAccountLink} message CMsgGCGetPartnerAccountLink message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink.$Properties} message CMsgGCGetPartnerAccountLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPartnerAccountLink.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -68737,25 +88935,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink + * @returns {CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape} CMsgGCGetPartnerAccountLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink.decode = function decode(reader, length) { + CMsgGCGetPartnerAccountLink.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPartnerAccountLink(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPartnerAccountLink(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -68765,11 +88980,11 @@ * @memberof CMsgGCGetPartnerAccountLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink + * @returns {CMsgGCGetPartnerAccountLink & CMsgGCGetPartnerAccountLink.$Shape} CMsgGCGetPartnerAccountLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPartnerAccountLink.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -68783,10 +88998,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPartnerAccountLink.verify = function verify(message) { + CMsgGCGetPartnerAccountLink.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; return null; @@ -68800,19 +89019,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink */ - CMsgGCGetPartnerAccountLink.fromObject = function fromObject(object) { + CMsgGCGetPartnerAccountLink.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPartnerAccountLink) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPartnerAccountLink: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPartnerAccountLink(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); return message; }; @@ -68825,21 +89050,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPartnerAccountLink.toObject = function toObject(message, options) { + CMsgGCGetPartnerAccountLink.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; return object; }; @@ -68850,8 +89081,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPartnerAccountLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPartnerAccountLink.prototype.toJSON = function() { + return CMsgGCGetPartnerAccountLink.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPartnerAccountLink + * @function getTypeUrl + * @memberof CMsgGCGetPartnerAccountLink + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPartnerAccountLink.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPartnerAccountLink"; }; return CMsgGCGetPartnerAccountLink; @@ -68861,26 +89106,39 @@ /** * Properties of a CMsgGCGetPartnerAccountLink_Response. - * @exports ICMsgGCGetPartnerAccountLink_Response - * @interface ICMsgGCGetPartnerAccountLink_Response + * @typedef {Object} CMsgGCGetPartnerAccountLink_Response.$Properties * @property {number|null} [pwid] CMsgGCGetPartnerAccountLink_Response pwid * @property {number|null} [nexonid] CMsgGCGetPartnerAccountLink_Response nexonid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGetPartnerAccountLink_Response. + * @exports ICMsgGCGetPartnerAccountLink_Response + * @interface ICMsgGCGetPartnerAccountLink_Response + * @augments CMsgGCGetPartnerAccountLink_Response.$Properties + * @deprecated Use CMsgGCGetPartnerAccountLink_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCGetPartnerAccountLink_Response. + * @typedef {CMsgGCGetPartnerAccountLink_Response.$Properties} CMsgGCGetPartnerAccountLink_Response.$Shape */ /** * Constructs a new CMsgGCGetPartnerAccountLink_Response. * @exports CMsgGCGetPartnerAccountLink_Response * @classdesc Represents a CMsgGCGetPartnerAccountLink_Response. - * @implements ICMsgGCGetPartnerAccountLink_Response * @constructor - * @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGetPartnerAccountLink_Response(properties) { + var CMsgGCGetPartnerAccountLink_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGetPartnerAccountLink_Response pwid. @@ -68903,10 +89161,14 @@ * @function create * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response instance + * @type {{ + * (properties: CMsgGCGetPartnerAccountLink_Response.$Shape): CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape; + * (properties?: CMsgGCGetPartnerAccountLink_Response.$Properties): CMsgGCGetPartnerAccountLink_Response; + * }} */ - CMsgGCGetPartnerAccountLink_Response.create = function create(properties) { + CMsgGCGetPartnerAccountLink_Response.create = function(properties) { return new CMsgGCGetPartnerAccountLink_Response(properties); }; @@ -68915,17 +89177,24 @@ * @function encode * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink_Response.encode = function encode(message, writer) { + CMsgGCGetPartnerAccountLink_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.pwid != null && Object.hasOwnProperty.call(message, "pwid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.pwid); - if (message.nexonid != null && Object.hasOwnProperty.call(message, "nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.nexonid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -68934,12 +89203,12 @@ * @function encodeDelimited * @memberof CMsgGCGetPartnerAccountLink_Response * @static - * @param {ICMsgGCGetPartnerAccountLink_Response} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode + * @param {CMsgGCGetPartnerAccountLink_Response.$Properties} message CMsgGCGetPartnerAccountLink_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGetPartnerAccountLink_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGetPartnerAccountLink_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -68949,28 +89218,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response + * @returns {CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape} CMsgGCGetPartnerAccountLink_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink_Response.decode = function decode(reader, length) { + CMsgGCGetPartnerAccountLink_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGetPartnerAccountLink_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGetPartnerAccountLink_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pwid = reader.uint32(); - break; - case 2: - message.nexonid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.pwid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.nexonid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -68980,11 +89269,11 @@ * @memberof CMsgGCGetPartnerAccountLink_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response + * @returns {CMsgGCGetPartnerAccountLink_Response & CMsgGCGetPartnerAccountLink_Response.$Shape} CMsgGCGetPartnerAccountLink_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGetPartnerAccountLink_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGetPartnerAccountLink_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -68998,13 +89287,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGetPartnerAccountLink_Response.verify = function verify(message) { + CMsgGCGetPartnerAccountLink_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pwid != null && message.hasOwnProperty("pwid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) if (!$util.isInteger(message.pwid)) return "pwid: integer expected"; - if (message.nexonid != null && message.hasOwnProperty("nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) if (!$util.isInteger(message.nexonid)) return "nexonid: integer expected"; return null; @@ -69018,9 +89311,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response */ - CMsgGCGetPartnerAccountLink_Response.fromObject = function fromObject(object) { + CMsgGCGetPartnerAccountLink_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGetPartnerAccountLink_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGetPartnerAccountLink_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGetPartnerAccountLink_Response(); if (object.pwid != null) message.pwid = object.pwid >>> 0; @@ -69038,17 +89337,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGetPartnerAccountLink_Response.toObject = function toObject(message, options) { + CMsgGCGetPartnerAccountLink_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.pwid = 0; object.nexonid = 0; } - if (message.pwid != null && message.hasOwnProperty("pwid")) + if (message.pwid != null && $Object.hasOwnProperty.call(message, "pwid")) object.pwid = message.pwid; - if (message.nexonid != null && message.hasOwnProperty("nexonid")) + if (message.nexonid != null && $Object.hasOwnProperty.call(message, "nexonid")) object.nexonid = message.nexonid; return object; }; @@ -69060,8 +89363,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGetPartnerAccountLink_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGetPartnerAccountLink_Response.prototype.toJSON = function() { + return CMsgGCGetPartnerAccountLink_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGetPartnerAccountLink_Response + * @function getTypeUrl + * @memberof CMsgGCGetPartnerAccountLink_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGetPartnerAccountLink_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGetPartnerAccountLink_Response"; }; return CMsgGCGetPartnerAccountLink_Response; @@ -69071,30 +89388,43 @@ /** * Properties of a CMsgGCRoutingInfo. - * @exports ICMsgGCRoutingInfo - * @interface ICMsgGCRoutingInfo + * @typedef {Object} CMsgGCRoutingInfo.$Properties * @property {Array.|null} [dir_index] CMsgGCRoutingInfo dir_index * @property {CMsgGCRoutingInfo.RoutingMethod|null} [method] CMsgGCRoutingInfo method * @property {CMsgGCRoutingInfo.RoutingMethod|null} [fallback] CMsgGCRoutingInfo fallback * @property {number|null} [protobuf_field] CMsgGCRoutingInfo protobuf_field * @property {string|null} [webapi_param] CMsgGCRoutingInfo webapi_param + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRoutingInfo. + * @exports ICMsgGCRoutingInfo + * @interface ICMsgGCRoutingInfo + * @augments CMsgGCRoutingInfo.$Properties + * @deprecated Use CMsgGCRoutingInfo.$Properties instead. + */ + + /** + * Shape of a CMsgGCRoutingInfo. + * @typedef {CMsgGCRoutingInfo.$Properties} CMsgGCRoutingInfo.$Shape */ /** * Constructs a new CMsgGCRoutingInfo. * @exports CMsgGCRoutingInfo * @classdesc Represents a CMsgGCRoutingInfo. - * @implements ICMsgGCRoutingInfo * @constructor - * @param {ICMsgGCRoutingInfo=} [properties] Properties to set + * @param {CMsgGCRoutingInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRoutingInfo(properties) { + var CMsgGCRoutingInfo = function (properties) { this.dir_index = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRoutingInfo dir_index. @@ -69141,10 +89471,14 @@ * @function create * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo=} [properties] Properties to set + * @param {CMsgGCRoutingInfo.$Properties=} [properties] Properties to set * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo instance + * @type {{ + * (properties: CMsgGCRoutingInfo.$Shape): CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape; + * (properties?: CMsgGCRoutingInfo.$Properties): CMsgGCRoutingInfo; + * }} */ - CMsgGCRoutingInfo.create = function create(properties) { + CMsgGCRoutingInfo.create = function(properties) { return new CMsgGCRoutingInfo(properties); }; @@ -69153,24 +89487,31 @@ * @function encode * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo} message CMsgGCRoutingInfo message or plain object to encode + * @param {CMsgGCRoutingInfo.$Properties} message CMsgGCRoutingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRoutingInfo.encode = function encode(message, writer) { + CMsgGCRoutingInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.dir_index != null && message.dir_index.length) for (var i = 0; i < message.dir_index.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index[i]); - if (message.method != null && Object.hasOwnProperty.call(message, "method")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.method); - if (message.fallback != null && Object.hasOwnProperty.call(message, "fallback")) + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.fallback); - if (message.protobuf_field != null && Object.hasOwnProperty.call(message, "protobuf_field")) + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.protobuf_field); - if (message.webapi_param != null && Object.hasOwnProperty.call(message, "webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.webapi_param); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -69179,12 +89520,12 @@ * @function encodeDelimited * @memberof CMsgGCRoutingInfo * @static - * @param {ICMsgGCRoutingInfo} message CMsgGCRoutingInfo message or plain object to encode + * @param {CMsgGCRoutingInfo.$Properties} message CMsgGCRoutingInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRoutingInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRoutingInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -69194,44 +89535,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo + * @returns {CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape} CMsgGCRoutingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRoutingInfo.decode = function decode(reader, length) { + CMsgGCRoutingInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRoutingInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRoutingInfo(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.dir_index && message.dir_index.length)) - message.dir_index = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.dir_index.push(reader.uint32()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.dir_index && message.dir_index.length)) + message.dir_index = []; + reader.uint32s(message.dir_index); + continue; + } + if (wireType !== 0) + break; + if (!(message.dir_index && message.dir_index.length)) + message.dir_index = []; message.dir_index.push(reader.uint32()); - break; - case 2: - message.method = reader.int32(); - break; - case 3: - message.fallback = reader.int32(); - break; - case 4: - message.protobuf_field = reader.uint32(); - break; - case 5: - message.webapi_param = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCRoutingInfo.RoutingMethod[value] !== $undefined) + message.method = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCRoutingInfo.RoutingMethod[value] !== $undefined) + message.fallback = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 4: { + if (wireType !== 0) + break; + message.protobuf_field = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.webapi_param = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -69241,11 +89624,11 @@ * @memberof CMsgGCRoutingInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo + * @returns {CMsgGCRoutingInfo & CMsgGCRoutingInfo.$Shape} CMsgGCRoutingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRoutingInfo.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRoutingInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -69259,17 +89642,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRoutingInfo.verify = function verify(message) { + CMsgGCRoutingInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dir_index != null && message.hasOwnProperty("dir_index")) { - if (!Array.isArray(message.dir_index)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.dir_index != null && $Object.hasOwnProperty.call(message, "dir_index")) { + if (!$Array.isArray(message.dir_index)) return "dir_index: array expected"; for (var i = 0; i < message.dir_index.length; ++i) if (!$util.isInteger(message.dir_index[i])) return "dir_index: integer[] expected"; } - if (message.method != null && message.hasOwnProperty("method")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) switch (message.method) { default: return "method: enum value expected"; @@ -69280,7 +89667,7 @@ case 4: break; } - if (message.fallback != null && message.hasOwnProperty("fallback")) + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) switch (message.fallback) { default: return "fallback: enum value expected"; @@ -69291,10 +89678,10 @@ case 4: break; } - if (message.protobuf_field != null && message.hasOwnProperty("protobuf_field")) + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) if (!$util.isInteger(message.protobuf_field)) return "protobuf_field: integer expected"; - if (message.webapi_param != null && message.hasOwnProperty("webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) if (!$util.isString(message.webapi_param)) return "webapi_param: string expected"; return null; @@ -69308,14 +89695,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo */ - CMsgGCRoutingInfo.fromObject = function fromObject(object) { + CMsgGCRoutingInfo.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRoutingInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRoutingInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRoutingInfo(); if (object.dir_index) { - if (!Array.isArray(object.dir_index)) - throw TypeError(".CMsgGCRoutingInfo.dir_index: array expected"); - message.dir_index = []; + if (!$Array.isArray(object.dir_index)) + throw $TypeError(".CMsgGCRoutingInfo.dir_index: array expected"); + message.dir_index = $Array(object.dir_index.length); for (var i = 0; i < object.dir_index.length; ++i) message.dir_index[i] = object.dir_index[i] >>> 0; } @@ -69340,6 +89733,7 @@ case 4: message.method = 4; break; + default: } switch (object.fallback) { case "RANDOM": @@ -69362,11 +89756,12 @@ case 4: message.fallback = 4; break; + default: } if (object.protobuf_field != null) message.protobuf_field = object.protobuf_field >>> 0; if (object.webapi_param != null) - message.webapi_param = String(object.webapi_param); + message.webapi_param = $String(object.webapi_param); return message; }; @@ -69379,30 +89774,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRoutingInfo.toObject = function toObject(message, options) { + CMsgGCRoutingInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.dir_index = []; if (options.defaults) { - object.method = options.enums === String ? "RANDOM" : 0; - object.fallback = options.enums === String ? "DISCARD" : 1; + object.method = options.enums === $String ? "RANDOM" : 0; + object.fallback = options.enums === $String ? "DISCARD" : 1; object.protobuf_field = 0; object.webapi_param = ""; } if (message.dir_index && message.dir_index.length) { - object.dir_index = []; + object.dir_index = $Array(message.dir_index.length); for (var j = 0; j < message.dir_index.length; ++j) object.dir_index[j] = message.dir_index[j]; } - if (message.method != null && message.hasOwnProperty("method")) - object.method = options.enums === String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.method] : message.method; - if (message.fallback != null && message.hasOwnProperty("fallback")) - object.fallback = options.enums === String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] : message.fallback; - if (message.protobuf_field != null && message.hasOwnProperty("protobuf_field")) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) + object.method = options.enums === $String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.method] === $undefined ? message.method : $root.CMsgGCRoutingInfo.RoutingMethod[message.method] : message.method; + if (message.fallback != null && $Object.hasOwnProperty.call(message, "fallback")) + object.fallback = options.enums === $String ? $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] === $undefined ? message.fallback : $root.CMsgGCRoutingInfo.RoutingMethod[message.fallback] : message.fallback; + if (message.protobuf_field != null && $Object.hasOwnProperty.call(message, "protobuf_field")) object.protobuf_field = message.protobuf_field; - if (message.webapi_param != null && message.hasOwnProperty("webapi_param")) + if (message.webapi_param != null && $Object.hasOwnProperty.call(message, "webapi_param")) object.webapi_param = message.webapi_param; return object; }; @@ -69414,8 +89813,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRoutingInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRoutingInfo.prototype.toJSON = function() { + return CMsgGCRoutingInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRoutingInfo + * @function getTypeUrl + * @memberof CMsgGCRoutingInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRoutingInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRoutingInfo"; }; /** @@ -69429,7 +89842,7 @@ * @property {number} WEBAPI_PARAM_UINT64=4 WEBAPI_PARAM_UINT64 value */ CMsgGCRoutingInfo.RoutingMethod = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "RANDOM"] = 0; values[valuesById[1] = "DISCARD"] = 1; values[valuesById[2] = "CLIENT_STEAMID"] = 2; @@ -69443,32 +89856,45 @@ $root.CMsgGCMsgMasterSetWebAPIRouting = (function() { + /** + * Properties of a CMsgGCMsgMasterSetWebAPIRouting. + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting.$Properties + * @property {Array.|null} [entries] CMsgGCMsgMasterSetWebAPIRouting entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetWebAPIRouting. * @exports ICMsgGCMsgMasterSetWebAPIRouting * @interface ICMsgGCMsgMasterSetWebAPIRouting - * @property {Array.|null} [entries] CMsgGCMsgMasterSetWebAPIRouting entries + * @augments CMsgGCMsgMasterSetWebAPIRouting.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetWebAPIRouting. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting.$Properties} CMsgGCMsgMasterSetWebAPIRouting.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetWebAPIRouting. * @exports CMsgGCMsgMasterSetWebAPIRouting * @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting. - * @implements ICMsgGCMsgMasterSetWebAPIRouting * @constructor - * @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetWebAPIRouting(properties) { + var CMsgGCMsgMasterSetWebAPIRouting = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetWebAPIRouting entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCMsgMasterSetWebAPIRouting * @instance */ @@ -69479,10 +89905,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting.$Shape): CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting.$Properties): CMsgGCMsgMasterSetWebAPIRouting; + * }} */ - CMsgGCMsgMasterSetWebAPIRouting.create = function create(properties) { + CMsgGCMsgMasterSetWebAPIRouting.create = function(properties) { return new CMsgGCMsgMasterSetWebAPIRouting(properties); }; @@ -69491,16 +89921,23 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting.encode = function encode(message, writer) { + CMsgGCMsgMasterSetWebAPIRouting.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -69509,12 +89946,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.$Properties} message CMsgGCMsgMasterSetWebAPIRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetWebAPIRouting.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -69524,27 +89961,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting + * @returns {CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape} CMsgGCMsgMasterSetWebAPIRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting.decode = function decode(reader, length) { + CMsgGCMsgMasterSetWebAPIRouting.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCMsgMasterSetWebAPIRouting.Entry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCMsgMasterSetWebAPIRouting.Entry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -69554,11 +90008,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting + * @returns {CMsgGCMsgMasterSetWebAPIRouting & CMsgGCMsgMasterSetWebAPIRouting.$Shape} CMsgGCMsgMasterSetWebAPIRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetWebAPIRouting.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -69572,14 +90026,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetWebAPIRouting.verify = function verify(message) { + CMsgGCMsgMasterSetWebAPIRouting.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.verify(message.entries[i]); + var error = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -69595,18 +90053,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting */ - CMsgGCMsgMasterSetWebAPIRouting.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetWebAPIRouting.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: object expected"); - message.entries[i] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: object expected"); + message.entries[i] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -69621,16 +90085,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetWebAPIRouting.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetWebAPIRouting.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -69642,35 +90110,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetWebAPIRouting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetWebAPIRouting.prototype.toJSON = function() { + return CMsgGCMsgMasterSetWebAPIRouting.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetWebAPIRouting + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetWebAPIRouting.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting"; }; CMsgGCMsgMasterSetWebAPIRouting.Entry = (function() { /** * Properties of an Entry. - * @memberof CMsgGCMsgMasterSetWebAPIRouting - * @interface IEntry + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties * @property {string|null} [interface_name] Entry interface_name * @property {string|null} [method_name] Entry method_name - * @property {ICMsgGCRoutingInfo|null} [routing] Entry routing + * @property {CMsgGCRoutingInfo.$Properties|null} [routing] Entry routing + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Entry. + * @memberof CMsgGCMsgMasterSetWebAPIRouting + * @interface IEntry + * @augments CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties instead. + */ + + /** + * Shape of an Entry. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape */ /** * Constructs a new Entry. * @memberof CMsgGCMsgMasterSetWebAPIRouting * @classdesc Represents an Entry. - * @implements IEntry * @constructor - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Entry(properties) { + var Entry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Entry interface_name. @@ -69690,7 +90185,7 @@ /** * Entry routing. - * @member {ICMsgGCRoutingInfo|null|undefined} routing + * @member {CMsgGCRoutingInfo.$Properties|null|undefined} routing * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @instance */ @@ -69701,10 +90196,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape): CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties): CMsgGCMsgMasterSetWebAPIRouting.Entry; + * }} */ - Entry.create = function create(properties) { + Entry.create = function(properties) { return new Entry(properties); }; @@ -69713,19 +90212,26 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.interface_name != null && Object.hasOwnProperty.call(message, "interface_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.interface_name); - if (message.method_name != null && Object.hasOwnProperty.call(message, "method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.method_name); - if (message.routing != null && Object.hasOwnProperty.call(message, "routing")) - $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -69734,12 +90240,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static - * @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Entry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -69749,31 +90255,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + Entry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.interface_name = reader.string(); - break; - case 2: - message.method_name = reader.string(); - break; - case 3: - message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.interface_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.method_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routing); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -69783,11 +90312,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry & CMsgGCMsgMasterSetWebAPIRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + Entry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -69801,17 +90330,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + Entry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) if (!$util.isString(message.interface_name)) return "interface_name: string expected"; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) if (!$util.isString(message.method_name)) return "method_name: string expected"; - if (message.routing != null && message.hasOwnProperty("routing")) { - var error = $root.CMsgGCRoutingInfo.verify(message.routing); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) { + var error = $root.CMsgGCRoutingInfo.verify(message.routing, _depth + 1); if (error) return "routing." + error; } @@ -69826,18 +90359,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry */ - Entry.fromObject = function fromObject(object) { + Entry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting.Entry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry(); if (object.interface_name != null) - message.interface_name = String(object.interface_name); + message.interface_name = $String(object.interface_name); if (object.method_name != null) - message.method_name = String(object.method_name); + message.method_name = $String(object.method_name); if (object.routing != null) { - if (typeof object.routing !== "object") - throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry.routing: object expected"); - message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing); + if (!$util.isObject(object.routing)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting.Entry.routing: object expected"); + message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing, _depth + 1); } return message; }; @@ -69851,21 +90390,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.interface_name = ""; object.method_name = ""; object.routing = null; } - if (message.interface_name != null && message.hasOwnProperty("interface_name")) + if (message.interface_name != null && $Object.hasOwnProperty.call(message, "interface_name")) object.interface_name = message.interface_name; - if (message.method_name != null && message.hasOwnProperty("method_name")) + if (message.method_name != null && $Object.hasOwnProperty.call(message, "method_name")) object.method_name = message.method_name; - if (message.routing != null && message.hasOwnProperty("routing")) - object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options, _depth + 1); return object; }; @@ -69876,8 +90419,22 @@ * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Entry.prototype.toJSON = function() { + return Entry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Entry + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Entry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting.Entry"; }; return Entry; @@ -69888,32 +90445,45 @@ $root.CMsgGCMsgMasterSetClientMsgRouting = (function() { + /** + * Properties of a CMsgGCMsgMasterSetClientMsgRouting. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting.$Properties + * @property {Array.|null} [entries] CMsgGCMsgMasterSetClientMsgRouting entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetClientMsgRouting. * @exports ICMsgGCMsgMasterSetClientMsgRouting * @interface ICMsgGCMsgMasterSetClientMsgRouting - * @property {Array.|null} [entries] CMsgGCMsgMasterSetClientMsgRouting entries + * @augments CMsgGCMsgMasterSetClientMsgRouting.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetClientMsgRouting. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting.$Properties} CMsgGCMsgMasterSetClientMsgRouting.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetClientMsgRouting. * @exports CMsgGCMsgMasterSetClientMsgRouting * @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting. - * @implements ICMsgGCMsgMasterSetClientMsgRouting * @constructor - * @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetClientMsgRouting(properties) { + var CMsgGCMsgMasterSetClientMsgRouting = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetClientMsgRouting entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCMsgMasterSetClientMsgRouting * @instance */ @@ -69924,10 +90494,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting.$Shape): CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting.$Properties): CMsgGCMsgMasterSetClientMsgRouting; + * }} */ - CMsgGCMsgMasterSetClientMsgRouting.create = function create(properties) { + CMsgGCMsgMasterSetClientMsgRouting.create = function(properties) { return new CMsgGCMsgMasterSetClientMsgRouting(properties); }; @@ -69936,16 +90510,23 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting.encode = function encode(message, writer) { + CMsgGCMsgMasterSetClientMsgRouting.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -69954,12 +90535,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.$Properties} message CMsgGCMsgMasterSetClientMsgRouting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetClientMsgRouting.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -69969,27 +90550,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting + * @returns {CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape} CMsgGCMsgMasterSetClientMsgRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting.decode = function decode(reader, length) { + CMsgGCMsgMasterSetClientMsgRouting.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCMsgMasterSetClientMsgRouting.Entry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCMsgMasterSetClientMsgRouting.Entry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -69999,11 +90597,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting + * @returns {CMsgGCMsgMasterSetClientMsgRouting & CMsgGCMsgMasterSetClientMsgRouting.$Shape} CMsgGCMsgMasterSetClientMsgRouting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetClientMsgRouting.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -70017,14 +90615,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetClientMsgRouting.verify = function verify(message) { + CMsgGCMsgMasterSetClientMsgRouting.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.verify(message.entries[i]); + var error = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -70040,18 +90642,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting */ - CMsgGCMsgMasterSetClientMsgRouting.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetClientMsgRouting.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: object expected"); - message.entries[i] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: object expected"); + message.entries[i] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -70066,16 +90674,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetClientMsgRouting.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetClientMsgRouting.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -70087,34 +90699,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetClientMsgRouting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetClientMsgRouting.prototype.toJSON = function() { + return CMsgGCMsgMasterSetClientMsgRouting.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetClientMsgRouting + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetClientMsgRouting.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting"; }; CMsgGCMsgMasterSetClientMsgRouting.Entry = (function() { + /** + * Properties of an Entry. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties + * @property {number|null} [msg_type] Entry msg_type + * @property {CMsgGCRoutingInfo.$Properties|null} [routing] Entry routing + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an Entry. * @memberof CMsgGCMsgMasterSetClientMsgRouting * @interface IEntry - * @property {number|null} [msg_type] Entry msg_type - * @property {ICMsgGCRoutingInfo|null} [routing] Entry routing + * @augments CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties instead. + */ + + /** + * Shape of an Entry. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape */ /** * Constructs a new Entry. * @memberof CMsgGCMsgMasterSetClientMsgRouting * @classdesc Represents an Entry. - * @implements IEntry * @constructor - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Entry(properties) { + var Entry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Entry msg_type. @@ -70126,7 +90765,7 @@ /** * Entry routing. - * @member {ICMsgGCRoutingInfo|null|undefined} routing + * @member {CMsgGCRoutingInfo.$Properties|null|undefined} routing * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @instance */ @@ -70137,10 +90776,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape): CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties): CMsgGCMsgMasterSetClientMsgRouting.Entry; + * }} */ - Entry.create = function create(properties) { + Entry.create = function(properties) { return new Entry(properties); }; @@ -70149,17 +90792,24 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.msg_type != null && Object.hasOwnProperty.call(message, "msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.msg_type); - if (message.routing != null && Object.hasOwnProperty.call(message, "routing")) - $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + $root.CMsgGCRoutingInfo.encode(message.routing, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -70168,12 +90818,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static - * @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} message Entry message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting.Entry.$Properties} message Entry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Entry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -70183,28 +90833,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + Entry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg_type = reader.uint32(); - break; - case 2: - message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.msg_type = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.routing = $root.CMsgGCRoutingInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.routing); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -70214,11 +90884,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry + * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry & CMsgGCMsgMasterSetClientMsgRouting.Entry.$Shape} Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + Entry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -70232,14 +90902,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + Entry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) if (!$util.isInteger(message.msg_type)) return "msg_type: integer expected"; - if (message.routing != null && message.hasOwnProperty("routing")) { - var error = $root.CMsgGCRoutingInfo.verify(message.routing); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) { + var error = $root.CMsgGCRoutingInfo.verify(message.routing, _depth + 1); if (error) return "routing." + error; } @@ -70254,16 +90928,22 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry */ - Entry.fromObject = function fromObject(object) { + Entry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting.Entry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting.Entry(); if (object.msg_type != null) message.msg_type = object.msg_type >>> 0; if (object.routing != null) { - if (typeof object.routing !== "object") - throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry.routing: object expected"); - message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing); + if (!$util.isObject(object.routing)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting.Entry.routing: object expected"); + message.routing = $root.CMsgGCRoutingInfo.fromObject(object.routing, _depth + 1); } return message; }; @@ -70277,18 +90957,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.msg_type = 0; object.routing = null; } - if (message.msg_type != null && message.hasOwnProperty("msg_type")) + if (message.msg_type != null && $Object.hasOwnProperty.call(message, "msg_type")) object.msg_type = message.msg_type; - if (message.routing != null && message.hasOwnProperty("routing")) - object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options); + if (message.routing != null && $Object.hasOwnProperty.call(message, "routing")) + object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options, _depth + 1); return object; }; @@ -70299,8 +90983,22 @@ * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Entry.prototype.toJSON = function() { + return Entry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Entry + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Entry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting.Entry"; }; return Entry; @@ -70311,27 +91009,40 @@ $root.CMsgGCMsgMasterSetWebAPIRouting_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetWebAPIRouting_Response. + * @typedef {Object} CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetWebAPIRouting_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetWebAPIRouting_Response. * @exports ICMsgGCMsgMasterSetWebAPIRouting_Response * @interface ICMsgGCMsgMasterSetWebAPIRouting_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetWebAPIRouting_Response eresult + * @augments CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetWebAPIRouting_Response. + * @typedef {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetWebAPIRouting_Response. * @exports CMsgGCMsgMasterSetWebAPIRouting_Response * @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting_Response. - * @implements ICMsgGCMsgMasterSetWebAPIRouting_Response * @constructor - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetWebAPIRouting_Response(properties) { + var CMsgGCMsgMasterSetWebAPIRouting_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetWebAPIRouting_Response eresult. @@ -70346,10 +91057,14 @@ * @function create * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape): CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties): CMsgGCMsgMasterSetWebAPIRouting_Response; + * }} */ - CMsgGCMsgMasterSetWebAPIRouting_Response.create = function create(properties) { + CMsgGCMsgMasterSetWebAPIRouting_Response.create = function(properties) { return new CMsgGCMsgMasterSetWebAPIRouting_Response(properties); }; @@ -70358,15 +91073,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetWebAPIRouting_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -70375,12 +91097,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static - * @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetWebAPIRouting_Response.$Properties} message CMsgGCMsgMasterSetWebAPIRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetWebAPIRouting_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetWebAPIRouting_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -70390,25 +91112,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response + * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape} CMsgGCMsgMasterSetWebAPIRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetWebAPIRouting_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -70418,11 +91157,11 @@ * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response + * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response & CMsgGCMsgMasterSetWebAPIRouting_Response.$Shape} CMsgGCMsgMasterSetWebAPIRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetWebAPIRouting_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetWebAPIRouting_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -70436,10 +91175,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetWebAPIRouting_Response.verify = function verify(message) { + CMsgGCMsgMasterSetWebAPIRouting_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -70453,9 +91196,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response */ - CMsgGCMsgMasterSetWebAPIRouting_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetWebAPIRouting_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetWebAPIRouting_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetWebAPIRouting_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -70471,13 +91220,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetWebAPIRouting_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetWebAPIRouting_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -70489,8 +91242,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetWebAPIRouting_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetWebAPIRouting_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetWebAPIRouting_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetWebAPIRouting_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetWebAPIRouting_Response"; }; return CMsgGCMsgMasterSetWebAPIRouting_Response; @@ -70498,27 +91265,40 @@ $root.CMsgGCMsgMasterSetClientMsgRouting_Response = (function() { + /** + * Properties of a CMsgGCMsgMasterSetClientMsgRouting_Response. + * @typedef {Object} CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties + * @property {number|null} [eresult] CMsgGCMsgMasterSetClientMsgRouting_Response eresult + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCMsgMasterSetClientMsgRouting_Response. * @exports ICMsgGCMsgMasterSetClientMsgRouting_Response * @interface ICMsgGCMsgMasterSetClientMsgRouting_Response - * @property {number|null} [eresult] CMsgGCMsgMasterSetClientMsgRouting_Response eresult + * @augments CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties + * @deprecated Use CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgMasterSetClientMsgRouting_Response. + * @typedef {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape */ /** * Constructs a new CMsgGCMsgMasterSetClientMsgRouting_Response. * @exports CMsgGCMsgMasterSetClientMsgRouting_Response * @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting_Response. - * @implements ICMsgGCMsgMasterSetClientMsgRouting_Response * @constructor - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgMasterSetClientMsgRouting_Response(properties) { + var CMsgGCMsgMasterSetClientMsgRouting_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgMasterSetClientMsgRouting_Response eresult. @@ -70533,10 +91313,14 @@ * @function create * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response instance + * @type {{ + * (properties: CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape): CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape; + * (properties?: CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties): CMsgGCMsgMasterSetClientMsgRouting_Response; + * }} */ - CMsgGCMsgMasterSetClientMsgRouting_Response.create = function create(properties) { + CMsgGCMsgMasterSetClientMsgRouting_Response.create = function(properties) { return new CMsgGCMsgMasterSetClientMsgRouting_Response(properties); }; @@ -70545,15 +91329,22 @@ * @function encode * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting_Response.encode = function encode(message, writer) { + CMsgGCMsgMasterSetClientMsgRouting_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -70562,12 +91353,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static - * @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode + * @param {CMsgGCMsgMasterSetClientMsgRouting_Response.$Properties} message CMsgGCMsgMasterSetClientMsgRouting_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgMasterSetClientMsgRouting_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgMasterSetClientMsgRouting_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -70577,25 +91368,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response + * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape} CMsgGCMsgMasterSetClientMsgRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting_Response.decode = function decode(reader, length) { + CMsgGCMsgMasterSetClientMsgRouting_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eresult = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.eresult = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -70605,11 +91413,11 @@ * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response + * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response & CMsgGCMsgMasterSetClientMsgRouting_Response.$Shape} CMsgGCMsgMasterSetClientMsgRouting_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgMasterSetClientMsgRouting_Response.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgMasterSetClientMsgRouting_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -70623,10 +91431,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgMasterSetClientMsgRouting_Response.verify = function verify(message) { + CMsgGCMsgMasterSetClientMsgRouting_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) if (!$util.isInteger(message.eresult)) return "eresult: integer expected"; return null; @@ -70640,9 +91452,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response */ - CMsgGCMsgMasterSetClientMsgRouting_Response.fromObject = function fromObject(object) { + CMsgGCMsgMasterSetClientMsgRouting_Response.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgMasterSetClientMsgRouting_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgMasterSetClientMsgRouting_Response(); if (object.eresult != null) message.eresult = object.eresult | 0; @@ -70658,13 +91476,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgMasterSetClientMsgRouting_Response.toObject = function toObject(message, options) { + CMsgGCMsgMasterSetClientMsgRouting_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.eresult = 2; - if (message.eresult != null && message.hasOwnProperty("eresult")) + if (message.eresult != null && $Object.hasOwnProperty.call(message, "eresult")) object.eresult = message.eresult; return object; }; @@ -70676,8 +91498,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.toJSON = function() { + return CMsgGCMsgMasterSetClientMsgRouting_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgMasterSetClientMsgRouting_Response + * @function getTypeUrl + * @memberof CMsgGCMsgMasterSetClientMsgRouting_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgMasterSetClientMsgRouting_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgMasterSetClientMsgRouting_Response"; }; return CMsgGCMsgMasterSetClientMsgRouting_Response; @@ -70687,29 +91523,42 @@ /** * Properties of a CMsgGCMsgSetOptions. - * @exports ICMsgGCMsgSetOptions - * @interface ICMsgGCMsgSetOptions + * @typedef {Object} CMsgGCMsgSetOptions.$Properties * @property {Array.|null} [options] CMsgGCMsgSetOptions options - * @property {Array.|null} [client_msg_ranges] CMsgGCMsgSetOptions client_msg_ranges + * @property {Array.|null} [client_msg_ranges] CMsgGCMsgSetOptions client_msg_ranges * @property {CMsgGCMsgSetOptions.GCSQLVersion|null} [gcsql_version] CMsgGCMsgSetOptions gcsql_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCMsgSetOptions. + * @exports ICMsgGCMsgSetOptions + * @interface ICMsgGCMsgSetOptions + * @augments CMsgGCMsgSetOptions.$Properties + * @deprecated Use CMsgGCMsgSetOptions.$Properties instead. + */ + + /** + * Shape of a CMsgGCMsgSetOptions. + * @typedef {CMsgGCMsgSetOptions.$Properties} CMsgGCMsgSetOptions.$Shape */ /** * Constructs a new CMsgGCMsgSetOptions. * @exports CMsgGCMsgSetOptions * @classdesc Represents a CMsgGCMsgSetOptions. - * @implements ICMsgGCMsgSetOptions * @constructor - * @param {ICMsgGCMsgSetOptions=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCMsgSetOptions(properties) { + var CMsgGCMsgSetOptions = function (properties) { this.options = []; this.client_msg_ranges = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCMsgSetOptions options. @@ -70721,7 +91570,7 @@ /** * CMsgGCMsgSetOptions client_msg_ranges. - * @member {Array.} client_msg_ranges + * @member {Array.} client_msg_ranges * @memberof CMsgGCMsgSetOptions * @instance */ @@ -70740,10 +91589,14 @@ * @function create * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions instance + * @type {{ + * (properties: CMsgGCMsgSetOptions.$Shape): CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape; + * (properties?: CMsgGCMsgSetOptions.$Properties): CMsgGCMsgSetOptions; + * }} */ - CMsgGCMsgSetOptions.create = function create(properties) { + CMsgGCMsgSetOptions.create = function(properties) { return new CMsgGCMsgSetOptions(properties); }; @@ -70752,21 +91605,28 @@ * @function encode * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions} message CMsgGCMsgSetOptions message or plain object to encode + * @param {CMsgGCMsgSetOptions.$Properties} message CMsgGCMsgSetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgSetOptions.encode = function encode(message, writer) { + CMsgGCMsgSetOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.options != null && message.options.length) for (var i = 0; i < message.options.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.options[i]); if (message.client_msg_ranges != null && message.client_msg_ranges.length) for (var i = 0; i < message.client_msg_ranges.length; ++i) - $root.CMsgGCMsgSetOptions.MessageRange.encode(message.client_msg_ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gcsql_version != null && Object.hasOwnProperty.call(message, "gcsql_version")) + $root.CMsgGCMsgSetOptions.MessageRange.encode(message.client_msg_ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.gcsql_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -70775,12 +91635,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgSetOptions * @static - * @param {ICMsgGCMsgSetOptions} message CMsgGCMsgSetOptions message or plain object to encode + * @param {CMsgGCMsgSetOptions.$Properties} message CMsgGCMsgSetOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCMsgSetOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCMsgSetOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -70790,40 +91650,86 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions + * @returns {CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape} CMsgGCMsgSetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgSetOptions.decode = function decode(reader, length) { + CMsgGCMsgSetOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgSetOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgSetOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.options && message.options.length)) - message.options = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.options.push(reader.int32()); - } else - message.options.push(reader.int32()); - break; - case 2: - if (!(message.client_msg_ranges && message.client_msg_ranges.length)) - message.client_msg_ranges = []; - message.client_msg_ranges.push($root.CMsgGCMsgSetOptions.MessageRange.decode(reader, reader.uint32())); - break; - case 3: - message.gcsql_version = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + start = reader.pos; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.Option[value] !== $undefined) { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push($util.rawField(1, 0, reader.raw(start, reader.pos))); + } + } + continue; + } + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.Option[value] !== $undefined) { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.client_msg_ranges && message.client_msg_ranges.length)) + message.client_msg_ranges = []; + message.client_msg_ranges.push($root.CMsgGCMsgSetOptions.MessageRange.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgGCMsgSetOptions.GCSQLVersion[value] !== $undefined) + message.gcsql_version = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -70833,11 +91739,11 @@ * @memberof CMsgGCMsgSetOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions + * @returns {CMsgGCMsgSetOptions & CMsgGCMsgSetOptions.$Shape} CMsgGCMsgSetOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCMsgSetOptions.decodeDelimited = function decodeDelimited(reader) { + CMsgGCMsgSetOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -70851,11 +91757,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCMsgSetOptions.verify = function verify(message) { + CMsgGCMsgSetOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + if (!$Array.isArray(message.options)) return "options: array expected"; for (var i = 0; i < message.options.length; ++i) switch (message.options[i]) { @@ -70868,16 +91778,16 @@ break; } } - if (message.client_msg_ranges != null && message.hasOwnProperty("client_msg_ranges")) { - if (!Array.isArray(message.client_msg_ranges)) + if (message.client_msg_ranges != null && $Object.hasOwnProperty.call(message, "client_msg_ranges")) { + if (!$Array.isArray(message.client_msg_ranges)) return "client_msg_ranges: array expected"; for (var i = 0; i < message.client_msg_ranges.length; ++i) { - var error = $root.CMsgGCMsgSetOptions.MessageRange.verify(message.client_msg_ranges[i]); + var error = $root.CMsgGCMsgSetOptions.MessageRange.verify(message.client_msg_ranges[i], _depth + 1); if (error) return "client_msg_ranges." + error; } } - if (message.gcsql_version != null && message.hasOwnProperty("gcsql_version")) + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) switch (message.gcsql_version) { default: return "gcsql_version: enum value expected"; @@ -70896,43 +91806,49 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions */ - CMsgGCMsgSetOptions.fromObject = function fromObject(object) { + CMsgGCMsgSetOptions.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgSetOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgSetOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgSetOptions(); if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".CMsgGCMsgSetOptions.options: array expected"); + if (!$Array.isArray(object.options)) + throw $TypeError(".CMsgGCMsgSetOptions.options: array expected"); message.options = []; for (var i = 0; i < object.options.length; ++i) switch (object.options[i]) { - default: case "NOTIFY_USER_SESSIONS": case 0: - message.options[i] = 0; + message.options[message.options.length] = 0; break; case "NOTIFY_SERVER_SESSIONS": case 1: - message.options[i] = 1; + message.options[message.options.length] = 1; break; case "NOTIFY_ACHIEVEMENTS": case 2: - message.options[i] = 2; + message.options[message.options.length] = 2; break; case "NOTIFY_VAC_ACTION": case 3: - message.options[i] = 3; + message.options[message.options.length] = 3; break; + default: } } if (object.client_msg_ranges) { - if (!Array.isArray(object.client_msg_ranges)) - throw TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: array expected"); - message.client_msg_ranges = []; + if (!$Array.isArray(object.client_msg_ranges)) + throw $TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: array expected"); + message.client_msg_ranges = $Array(object.client_msg_ranges.length); for (var i = 0; i < object.client_msg_ranges.length; ++i) { - if (typeof object.client_msg_ranges[i] !== "object") - throw TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: object expected"); - message.client_msg_ranges[i] = $root.CMsgGCMsgSetOptions.MessageRange.fromObject(object.client_msg_ranges[i]); + if (!$util.isObject(object.client_msg_ranges[i])) + throw $TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: object expected"); + message.client_msg_ranges[i] = $root.CMsgGCMsgSetOptions.MessageRange.fromObject(object.client_msg_ranges[i], _depth + 1); } } switch (object.gcsql_version) { @@ -70944,6 +91860,7 @@ case 2: message.gcsql_version = 2; break; + default: } return message; }; @@ -70957,28 +91874,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCMsgSetOptions.toObject = function toObject(message, options) { + CMsgGCMsgSetOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.options = []; object.client_msg_ranges = []; } if (options.defaults) - object.gcsql_version = options.enums === String ? "GCSQL_VERSION_BASELINE" : 1; + object.gcsql_version = options.enums === $String ? "GCSQL_VERSION_BASELINE" : 1; if (message.options && message.options.length) { - object.options = []; + object.options = $Array(message.options.length); for (var j = 0; j < message.options.length; ++j) - object.options[j] = options.enums === String ? $root.CMsgGCMsgSetOptions.Option[message.options[j]] : message.options[j]; + object.options[j] = options.enums === $String ? $root.CMsgGCMsgSetOptions.Option[message.options[j]] === $undefined ? message.options[j] : $root.CMsgGCMsgSetOptions.Option[message.options[j]] : message.options[j]; } if (message.client_msg_ranges && message.client_msg_ranges.length) { - object.client_msg_ranges = []; + object.client_msg_ranges = $Array(message.client_msg_ranges.length); for (var j = 0; j < message.client_msg_ranges.length; ++j) - object.client_msg_ranges[j] = $root.CMsgGCMsgSetOptions.MessageRange.toObject(message.client_msg_ranges[j], options); + object.client_msg_ranges[j] = $root.CMsgGCMsgSetOptions.MessageRange.toObject(message.client_msg_ranges[j], options, _depth + 1); } - if (message.gcsql_version != null && message.hasOwnProperty("gcsql_version")) - object.gcsql_version = options.enums === String ? $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] : message.gcsql_version; + if (message.gcsql_version != null && $Object.hasOwnProperty.call(message, "gcsql_version")) + object.gcsql_version = options.enums === $String ? $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] === $undefined ? message.gcsql_version : $root.CMsgGCMsgSetOptions.GCSQLVersion[message.gcsql_version] : message.gcsql_version; return object; }; @@ -70989,34 +91910,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCMsgSetOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCMsgSetOptions.prototype.toJSON = function() { + return CMsgGCMsgSetOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCMsgSetOptions + * @function getTypeUrl + * @memberof CMsgGCMsgSetOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCMsgSetOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgSetOptions"; }; CMsgGCMsgSetOptions.MessageRange = (function() { /** * Properties of a MessageRange. - * @memberof CMsgGCMsgSetOptions - * @interface IMessageRange + * @typedef {Object} CMsgGCMsgSetOptions.MessageRange.$Properties * @property {number} low MessageRange low * @property {number} high MessageRange high + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MessageRange. + * @memberof CMsgGCMsgSetOptions + * @interface IMessageRange + * @augments CMsgGCMsgSetOptions.MessageRange.$Properties + * @deprecated Use CMsgGCMsgSetOptions.MessageRange.$Properties instead. + */ + + /** + * Shape of a MessageRange. + * @typedef {CMsgGCMsgSetOptions.MessageRange.$Properties} CMsgGCMsgSetOptions.MessageRange.$Shape */ /** * Constructs a new MessageRange. * @memberof CMsgGCMsgSetOptions * @classdesc Represents a MessageRange. - * @implements IMessageRange * @constructor - * @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MessageRange(properties) { + var MessageRange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MessageRange low. @@ -71039,10 +91987,14 @@ * @function create * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties=} [properties] Properties to set * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange instance + * @type {{ + * (properties: CMsgGCMsgSetOptions.MessageRange.$Shape): CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape; + * (properties?: CMsgGCMsgSetOptions.MessageRange.$Properties): CMsgGCMsgSetOptions.MessageRange; + * }} */ - MessageRange.create = function create(properties) { + MessageRange.create = function(properties) { return new MessageRange(properties); }; @@ -71051,15 +92003,22 @@ * @function encode * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange} message MessageRange message or plain object to encode + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties} message MessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageRange.encode = function encode(message, writer) { + MessageRange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.low); writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.high); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -71068,12 +92027,12 @@ * @function encodeDelimited * @memberof CMsgGCMsgSetOptions.MessageRange * @static - * @param {CMsgGCMsgSetOptions.IMessageRange} message MessageRange message or plain object to encode + * @param {CMsgGCMsgSetOptions.MessageRange.$Properties} message MessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageRange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -71083,31 +92042,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange + * @returns {CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape} MessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageRange.decode = function decode(reader, length) { + MessageRange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgSetOptions.MessageRange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCMsgSetOptions.MessageRange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.low = reader.uint32(); - break; - case 2: - message.high = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.low = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.high = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("low")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "low")) throw $util.ProtocolError("missing required 'low'", { instance: message }); - if (!message.hasOwnProperty("high")) + if (!$Object.hasOwnProperty.call(message, "high")) throw $util.ProtocolError("missing required 'high'", { instance: message }); return message; }; @@ -71118,11 +92097,11 @@ * @memberof CMsgGCMsgSetOptions.MessageRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange + * @returns {CMsgGCMsgSetOptions.MessageRange & CMsgGCMsgSetOptions.MessageRange.$Shape} MessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageRange.decodeDelimited = function decodeDelimited(reader) { + MessageRange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -71136,9 +92115,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageRange.verify = function verify(message) { + MessageRange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isInteger(message.low)) return "low: integer expected"; if (!$util.isInteger(message.high)) @@ -71154,9 +92137,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange */ - MessageRange.fromObject = function fromObject(object) { + MessageRange.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCMsgSetOptions.MessageRange) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCMsgSetOptions.MessageRange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCMsgSetOptions.MessageRange(); if (object.low != null) message.low = object.low >>> 0; @@ -71174,17 +92163,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageRange.toObject = function toObject(message, options) { + MessageRange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.low = 0; object.high = 0; } - if (message.low != null && message.hasOwnProperty("low")) + if (message.low != null && $Object.hasOwnProperty.call(message, "low")) object.low = message.low; - if (message.high != null && message.hasOwnProperty("high")) + if (message.high != null && $Object.hasOwnProperty.call(message, "high")) object.high = message.high; return object; }; @@ -71196,8 +92189,22 @@ * @instance * @returns {Object.} JSON object */ - MessageRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MessageRange.prototype.toJSON = function() { + return MessageRange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MessageRange + * @function getTypeUrl + * @memberof CMsgGCMsgSetOptions.MessageRange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MessageRange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCMsgSetOptions.MessageRange"; }; return MessageRange; @@ -71213,7 +92220,7 @@ * @property {number} NOTIFY_VAC_ACTION=3 NOTIFY_VAC_ACTION value */ CMsgGCMsgSetOptions.Option = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "NOTIFY_USER_SESSIONS"] = 0; values[valuesById[1] = "NOTIFY_SERVER_SESSIONS"] = 1; values[valuesById[2] = "NOTIFY_ACHIEVEMENTS"] = 2; @@ -71229,7 +92236,7 @@ * @property {number} GCSQL_VERSION_BOOLTYPE=2 GCSQL_VERSION_BOOLTYPE value */ CMsgGCMsgSetOptions.GCSQLVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "GCSQL_VERSION_BASELINE"] = 1; values[valuesById[2] = "GCSQL_VERSION_BOOLTYPE"] = 2; return values; @@ -71242,8 +92249,7 @@ /** * Properties of a CMsgGCHUpdateSession. - * @exports ICMsgGCHUpdateSession - * @interface ICMsgGCHUpdateSession + * @typedef {Object} CMsgGCHUpdateSession.$Properties * @property {number|Long|null} [steam_id] CMsgGCHUpdateSession steam_id * @property {number|null} [app_id] CMsgGCHUpdateSession app_id * @property {boolean|null} [online] CMsgGCHUpdateSession online @@ -71252,24 +92258,38 @@ * @property {number|null} [server_port] CMsgGCHUpdateSession server_port * @property {number|null} [os_type] CMsgGCHUpdateSession os_type * @property {number|null} [client_addr] CMsgGCHUpdateSession client_addr - * @property {Array.|null} [extra_fields] CMsgGCHUpdateSession extra_fields + * @property {Array.|null} [extra_fields] CMsgGCHUpdateSession extra_fields + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCHUpdateSession. + * @exports ICMsgGCHUpdateSession + * @interface ICMsgGCHUpdateSession + * @augments CMsgGCHUpdateSession.$Properties + * @deprecated Use CMsgGCHUpdateSession.$Properties instead. + */ + + /** + * Shape of a CMsgGCHUpdateSession. + * @typedef {CMsgGCHUpdateSession.$Properties} CMsgGCHUpdateSession.$Shape */ /** * Constructs a new CMsgGCHUpdateSession. * @exports CMsgGCHUpdateSession * @classdesc Represents a CMsgGCHUpdateSession. - * @implements ICMsgGCHUpdateSession * @constructor - * @param {ICMsgGCHUpdateSession=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCHUpdateSession(properties) { + var CMsgGCHUpdateSession = function (properties) { this.extra_fields = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCHUpdateSession steam_id. @@ -71277,7 +92297,7 @@ * @memberof CMsgGCHUpdateSession * @instance */ - CMsgGCHUpdateSession.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHUpdateSession.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHUpdateSession app_id. @@ -71301,7 +92321,7 @@ * @memberof CMsgGCHUpdateSession * @instance */ - CMsgGCHUpdateSession.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCHUpdateSession.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCHUpdateSession server_addr. @@ -71337,7 +92357,7 @@ /** * CMsgGCHUpdateSession extra_fields. - * @member {Array.} extra_fields + * @member {Array.} extra_fields * @memberof CMsgGCHUpdateSession * @instance */ @@ -71348,10 +92368,14 @@ * @function create * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.$Properties=} [properties] Properties to set * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession instance + * @type {{ + * (properties: CMsgGCHUpdateSession.$Shape): CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape; + * (properties?: CMsgGCHUpdateSession.$Properties): CMsgGCHUpdateSession; + * }} */ - CMsgGCHUpdateSession.create = function create(properties) { + CMsgGCHUpdateSession.create = function(properties) { return new CMsgGCHUpdateSession(properties); }; @@ -71360,32 +92384,39 @@ * @function encode * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession} message CMsgGCHUpdateSession message or plain object to encode + * @param {CMsgGCHUpdateSession.$Properties} message CMsgGCHUpdateSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHUpdateSession.encode = function encode(message, writer) { + CMsgGCHUpdateSession.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steam_id != null && Object.hasOwnProperty.call(message, "steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steam_id); - if (message.app_id != null && Object.hasOwnProperty.call(message, "app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id); - if (message.online != null && Object.hasOwnProperty.call(message, "online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.online); - if (message.server_steam_id != null && Object.hasOwnProperty.call(message, "server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.server_steam_id); - if (message.server_addr != null && Object.hasOwnProperty.call(message, "server_addr")) + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.server_addr); - if (message.server_port != null && Object.hasOwnProperty.call(message, "server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.server_port); - if (message.os_type != null && Object.hasOwnProperty.call(message, "os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.os_type); - if (message.client_addr != null && Object.hasOwnProperty.call(message, "client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.client_addr); if (message.extra_fields != null && message.extra_fields.length) for (var i = 0; i < message.extra_fields.length; ++i) - $root.CMsgGCHUpdateSession.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.CMsgGCHUpdateSession.ExtraField.encode(message.extra_fields[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -71394,12 +92425,12 @@ * @function encodeDelimited * @memberof CMsgGCHUpdateSession * @static - * @param {ICMsgGCHUpdateSession} message CMsgGCHUpdateSession message or plain object to encode + * @param {CMsgGCHUpdateSession.$Properties} message CMsgGCHUpdateSession message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCHUpdateSession.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCHUpdateSession.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -71409,51 +92440,92 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession + * @returns {CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape} CMsgGCHUpdateSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHUpdateSession.decode = function decode(reader, length) { + CMsgGCHUpdateSession.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHUpdateSession(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHUpdateSession(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steam_id = reader.fixed64(); - break; - case 2: - message.app_id = reader.uint32(); - break; - case 3: - message.online = reader.bool(); - break; - case 4: - message.server_steam_id = reader.fixed64(); - break; - case 5: - message.server_addr = reader.uint32(); - break; - case 6: - message.server_port = reader.uint32(); - break; - case 7: - message.os_type = reader.uint32(); - break; - case 8: - message.client_addr = reader.uint32(); - break; - case 9: - if (!(message.extra_fields && message.extra_fields.length)) - message.extra_fields = []; - message.extra_fields.push($root.CMsgGCHUpdateSession.ExtraField.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.app_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.online = reader.bool(); + continue; + } + case 4: { + if (wireType !== 1) + break; + message.server_steam_id = reader.fixed64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.server_addr = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.server_port = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.os_type = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.client_addr = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 2) + break; + if (!(message.extra_fields && message.extra_fields.length)) + message.extra_fields = []; + message.extra_fields.push($root.CMsgGCHUpdateSession.ExtraField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -71463,11 +92535,11 @@ * @memberof CMsgGCHUpdateSession * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession + * @returns {CMsgGCHUpdateSession & CMsgGCHUpdateSession.$Shape} CMsgGCHUpdateSession * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCHUpdateSession.decodeDelimited = function decodeDelimited(reader) { + CMsgGCHUpdateSession.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -71481,38 +92553,42 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCHUpdateSession.verify = function verify(message) { + CMsgGCHUpdateSession.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steam_id != null && message.hasOwnProperty("steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) if (!$util.isInteger(message.steam_id) && !(message.steam_id && $util.isInteger(message.steam_id.low) && $util.isInteger(message.steam_id.high))) return "steam_id: integer|Long expected"; - if (message.app_id != null && message.hasOwnProperty("app_id")) + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) if (!$util.isInteger(message.app_id)) return "app_id: integer expected"; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) if (typeof message.online !== "boolean") return "online: boolean expected"; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) if (!$util.isInteger(message.server_steam_id) && !(message.server_steam_id && $util.isInteger(message.server_steam_id.low) && $util.isInteger(message.server_steam_id.high))) return "server_steam_id: integer|Long expected"; - if (message.server_addr != null && message.hasOwnProperty("server_addr")) + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) if (!$util.isInteger(message.server_addr)) return "server_addr: integer expected"; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) if (!$util.isInteger(message.server_port)) return "server_port: integer expected"; - if (message.os_type != null && message.hasOwnProperty("os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) if (!$util.isInteger(message.os_type)) return "os_type: integer expected"; - if (message.client_addr != null && message.hasOwnProperty("client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) if (!$util.isInteger(message.client_addr)) return "client_addr: integer expected"; - if (message.extra_fields != null && message.hasOwnProperty("extra_fields")) { - if (!Array.isArray(message.extra_fields)) + if (message.extra_fields != null && $Object.hasOwnProperty.call(message, "extra_fields")) { + if (!$Array.isArray(message.extra_fields)) return "extra_fields: array expected"; for (var i = 0; i < message.extra_fields.length; ++i) { - var error = $root.CMsgGCHUpdateSession.ExtraField.verify(message.extra_fields[i]); + var error = $root.CMsgGCHUpdateSession.ExtraField.verify(message.extra_fields[i], _depth + 1); if (error) return "extra_fields." + error; } @@ -71528,32 +92604,38 @@ * @param {Object.} object Plain object * @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession */ - CMsgGCHUpdateSession.fromObject = function fromObject(object) { + CMsgGCHUpdateSession.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHUpdateSession) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHUpdateSession: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHUpdateSession(); if (object.steam_id != null) if ($util.Long) - (message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false; + message.steam_id = $util.Long.fromValue(object.steam_id, true); else if (typeof object.steam_id === "string") - message.steam_id = parseInt(object.steam_id, 10); + message.steam_id = $parseInt(object.steam_id, 10); else if (typeof object.steam_id === "number") message.steam_id = object.steam_id; else if (typeof object.steam_id === "object") - message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(); + message.steam_id = new $util.LongBits(object.steam_id.low >>> 0, object.steam_id.high >>> 0).toNumber(true); if (object.app_id != null) message.app_id = object.app_id >>> 0; if (object.online != null) - message.online = Boolean(object.online); + message.online = $Boolean(object.online); if (object.server_steam_id != null) if ($util.Long) - (message.server_steam_id = $util.Long.fromValue(object.server_steam_id)).unsigned = false; + message.server_steam_id = $util.Long.fromValue(object.server_steam_id, true); else if (typeof object.server_steam_id === "string") - message.server_steam_id = parseInt(object.server_steam_id, 10); + message.server_steam_id = $parseInt(object.server_steam_id, 10); else if (typeof object.server_steam_id === "number") message.server_steam_id = object.server_steam_id; else if (typeof object.server_steam_id === "object") - message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(); + message.server_steam_id = new $util.LongBits(object.server_steam_id.low >>> 0, object.server_steam_id.high >>> 0).toNumber(true); if (object.server_addr != null) message.server_addr = object.server_addr >>> 0; if (object.server_port != null) @@ -71563,13 +92645,13 @@ if (object.client_addr != null) message.client_addr = object.client_addr >>> 0; if (object.extra_fields) { - if (!Array.isArray(object.extra_fields)) - throw TypeError(".CMsgGCHUpdateSession.extra_fields: array expected"); - message.extra_fields = []; + if (!$Array.isArray(object.extra_fields)) + throw $TypeError(".CMsgGCHUpdateSession.extra_fields: array expected"); + message.extra_fields = $Array(object.extra_fields.length); for (var i = 0; i < object.extra_fields.length; ++i) { - if (typeof object.extra_fields[i] !== "object") - throw TypeError(".CMsgGCHUpdateSession.extra_fields: object expected"); - message.extra_fields[i] = $root.CMsgGCHUpdateSession.ExtraField.fromObject(object.extra_fields[i]); + if (!$util.isObject(object.extra_fields[i])) + throw $TypeError(".CMsgGCHUpdateSession.extra_fields: object expected"); + message.extra_fields[i] = $root.CMsgGCHUpdateSession.ExtraField.fromObject(object.extra_fields[i], _depth + 1); } } return message; @@ -71584,56 +92666,64 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCHUpdateSession.toObject = function toObject(message, options) { + CMsgGCHUpdateSession.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.extra_fields = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steam_id = options.longs === String ? "0" : 0; + object.steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.app_id = 0; object.online = false; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.server_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.server_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.server_steam_id = options.longs === String ? "0" : 0; + object.server_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.server_addr = 0; object.server_port = 0; object.os_type = 0; object.client_addr = 0; } - if (message.steam_id != null && message.hasOwnProperty("steam_id")) - if (typeof message.steam_id === "number") - object.steam_id = options.longs === String ? String(message.steam_id) : message.steam_id; + if (message.steam_id != null && $Object.hasOwnProperty.call(message, "steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steam_id = typeof message.steam_id === "number" ? $BigInt(message.steam_id) : $util.Long.fromBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.steam_id === "number") + object.steam_id = options.longs === $String ? $String(message.steam_id) : message.steam_id; else - object.steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber() : message.steam_id; - if (message.app_id != null && message.hasOwnProperty("app_id")) + object.steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.steam_id) : options.longs === $Number ? new $util.LongBits(message.steam_id.low >>> 0, message.steam_id.high >>> 0).toNumber(true) : message.steam_id; + if (message.app_id != null && $Object.hasOwnProperty.call(message, "app_id")) object.app_id = message.app_id; - if (message.online != null && message.hasOwnProperty("online")) + if (message.online != null && $Object.hasOwnProperty.call(message, "online")) object.online = message.online; - if (message.server_steam_id != null && message.hasOwnProperty("server_steam_id")) - if (typeof message.server_steam_id === "number") - object.server_steam_id = options.longs === String ? String(message.server_steam_id) : message.server_steam_id; + if (message.server_steam_id != null && $Object.hasOwnProperty.call(message, "server_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.server_steam_id = typeof message.server_steam_id === "number" ? $BigInt(message.server_steam_id) : $util.Long.fromBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.server_steam_id === "number") + object.server_steam_id = options.longs === $String ? $String(message.server_steam_id) : message.server_steam_id; else - object.server_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber() : message.server_steam_id; - if (message.server_addr != null && message.hasOwnProperty("server_addr")) + object.server_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.server_steam_id) : options.longs === $Number ? new $util.LongBits(message.server_steam_id.low >>> 0, message.server_steam_id.high >>> 0).toNumber(true) : message.server_steam_id; + if (message.server_addr != null && $Object.hasOwnProperty.call(message, "server_addr")) object.server_addr = message.server_addr; - if (message.server_port != null && message.hasOwnProperty("server_port")) + if (message.server_port != null && $Object.hasOwnProperty.call(message, "server_port")) object.server_port = message.server_port; - if (message.os_type != null && message.hasOwnProperty("os_type")) + if (message.os_type != null && $Object.hasOwnProperty.call(message, "os_type")) object.os_type = message.os_type; - if (message.client_addr != null && message.hasOwnProperty("client_addr")) + if (message.client_addr != null && $Object.hasOwnProperty.call(message, "client_addr")) object.client_addr = message.client_addr; if (message.extra_fields && message.extra_fields.length) { - object.extra_fields = []; + object.extra_fields = $Array(message.extra_fields.length); for (var j = 0; j < message.extra_fields.length; ++j) - object.extra_fields[j] = $root.CMsgGCHUpdateSession.ExtraField.toObject(message.extra_fields[j], options); + object.extra_fields[j] = $root.CMsgGCHUpdateSession.ExtraField.toObject(message.extra_fields[j], options, _depth + 1); } return object; }; @@ -71645,34 +92735,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCHUpdateSession.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCHUpdateSession.prototype.toJSON = function() { + return CMsgGCHUpdateSession.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCHUpdateSession + * @function getTypeUrl + * @memberof CMsgGCHUpdateSession + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCHUpdateSession.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHUpdateSession"; }; CMsgGCHUpdateSession.ExtraField = (function() { /** * Properties of an ExtraField. - * @memberof CMsgGCHUpdateSession - * @interface IExtraField + * @typedef {Object} CMsgGCHUpdateSession.ExtraField.$Properties * @property {string|null} [name] ExtraField name * @property {string|null} [value] ExtraField value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtraField. + * @memberof CMsgGCHUpdateSession + * @interface IExtraField + * @augments CMsgGCHUpdateSession.ExtraField.$Properties + * @deprecated Use CMsgGCHUpdateSession.ExtraField.$Properties instead. + */ + + /** + * Shape of an ExtraField. + * @typedef {CMsgGCHUpdateSession.ExtraField.$Properties} CMsgGCHUpdateSession.ExtraField.$Shape */ /** * Constructs a new ExtraField. * @memberof CMsgGCHUpdateSession * @classdesc Represents an ExtraField. - * @implements IExtraField * @constructor - * @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.ExtraField.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtraField(properties) { + var ExtraField = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtraField name. @@ -71695,10 +92812,14 @@ * @function create * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set + * @param {CMsgGCHUpdateSession.ExtraField.$Properties=} [properties] Properties to set * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField instance + * @type {{ + * (properties: CMsgGCHUpdateSession.ExtraField.$Shape): CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape; + * (properties?: CMsgGCHUpdateSession.ExtraField.$Properties): CMsgGCHUpdateSession.ExtraField; + * }} */ - ExtraField.create = function create(properties) { + ExtraField.create = function(properties) { return new ExtraField(properties); }; @@ -71707,17 +92828,24 @@ * @function encode * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgGCHUpdateSession.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encode = function encode(message, writer) { + ExtraField.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -71726,12 +92854,12 @@ * @function encodeDelimited * @memberof CMsgGCHUpdateSession.ExtraField * @static - * @param {CMsgGCHUpdateSession.IExtraField} message ExtraField message or plain object to encode + * @param {CMsgGCHUpdateSession.ExtraField.$Properties} message ExtraField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtraField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtraField.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -71741,28 +92869,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField + * @returns {CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decode = function decode(reader, length) { + ExtraField.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCHUpdateSession.ExtraField(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCHUpdateSession.ExtraField(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -71772,11 +92920,11 @@ * @memberof CMsgGCHUpdateSession.ExtraField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField + * @returns {CMsgGCHUpdateSession.ExtraField & CMsgGCHUpdateSession.ExtraField.$Shape} ExtraField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtraField.decodeDelimited = function decodeDelimited(reader) { + ExtraField.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -71790,13 +92938,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtraField.verify = function verify(message) { + ExtraField.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -71810,14 +92962,20 @@ * @param {Object.} object Plain object * @returns {CMsgGCHUpdateSession.ExtraField} ExtraField */ - ExtraField.fromObject = function fromObject(object) { + ExtraField.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCHUpdateSession.ExtraField) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCHUpdateSession.ExtraField: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCHUpdateSession.ExtraField(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -71830,17 +92988,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtraField.toObject = function toObject(message, options) { + ExtraField.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -71852,8 +93014,22 @@ * @instance * @returns {Object.} JSON object */ - ExtraField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtraField.prototype.toJSON = function() { + return ExtraField.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtraField + * @function getTypeUrl + * @memberof CMsgGCHUpdateSession.ExtraField + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtraField.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCHUpdateSession.ExtraField"; }; return ExtraField; @@ -71866,27 +93042,40 @@ /** * Properties of a CMsgNotificationOfSuspiciousActivity. - * @exports ICMsgNotificationOfSuspiciousActivity - * @interface ICMsgNotificationOfSuspiciousActivity + * @typedef {Object} CMsgNotificationOfSuspiciousActivity.$Properties * @property {number|Long|null} [steamid] CMsgNotificationOfSuspiciousActivity steamid * @property {number|null} [appid] CMsgNotificationOfSuspiciousActivity appid - * @property {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null} [multiple_instances] CMsgNotificationOfSuspiciousActivity multiple_instances + * @property {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties|null} [multiple_instances] CMsgNotificationOfSuspiciousActivity multiple_instances + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgNotificationOfSuspiciousActivity. + * @exports ICMsgNotificationOfSuspiciousActivity + * @interface ICMsgNotificationOfSuspiciousActivity + * @augments CMsgNotificationOfSuspiciousActivity.$Properties + * @deprecated Use CMsgNotificationOfSuspiciousActivity.$Properties instead. + */ + + /** + * Shape of a CMsgNotificationOfSuspiciousActivity. + * @typedef {CMsgNotificationOfSuspiciousActivity.$Properties} CMsgNotificationOfSuspiciousActivity.$Shape */ /** * Constructs a new CMsgNotificationOfSuspiciousActivity. * @exports CMsgNotificationOfSuspiciousActivity * @classdesc Represents a CMsgNotificationOfSuspiciousActivity. - * @implements ICMsgNotificationOfSuspiciousActivity * @constructor - * @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgNotificationOfSuspiciousActivity(properties) { + var CMsgNotificationOfSuspiciousActivity = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgNotificationOfSuspiciousActivity steamid. @@ -71894,7 +93083,7 @@ * @memberof CMsgNotificationOfSuspiciousActivity * @instance */ - CMsgNotificationOfSuspiciousActivity.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgNotificationOfSuspiciousActivity.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgNotificationOfSuspiciousActivity appid. @@ -71906,7 +93095,7 @@ /** * CMsgNotificationOfSuspiciousActivity multiple_instances. - * @member {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null|undefined} multiple_instances + * @member {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties|null|undefined} multiple_instances * @memberof CMsgNotificationOfSuspiciousActivity * @instance */ @@ -71917,10 +93106,14 @@ * @function create * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.$Properties=} [properties] Properties to set * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity instance + * @type {{ + * (properties: CMsgNotificationOfSuspiciousActivity.$Shape): CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape; + * (properties?: CMsgNotificationOfSuspiciousActivity.$Properties): CMsgNotificationOfSuspiciousActivity; + * }} */ - CMsgNotificationOfSuspiciousActivity.create = function create(properties) { + CMsgNotificationOfSuspiciousActivity.create = function(properties) { return new CMsgNotificationOfSuspiciousActivity(properties); }; @@ -71929,19 +93122,26 @@ * @function encode * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity} message CMsgNotificationOfSuspiciousActivity message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.$Properties} message CMsgNotificationOfSuspiciousActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationOfSuspiciousActivity.encode = function encode(message, writer) { + CMsgNotificationOfSuspiciousActivity.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid); - if (message.multiple_instances != null && Object.hasOwnProperty.call(message, "multiple_instances")) - $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.encode(message.multiple_instances, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) + $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.encode(message.multiple_instances, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -71950,12 +93150,12 @@ * @function encodeDelimited * @memberof CMsgNotificationOfSuspiciousActivity * @static - * @param {ICMsgNotificationOfSuspiciousActivity} message CMsgNotificationOfSuspiciousActivity message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.$Properties} message CMsgNotificationOfSuspiciousActivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgNotificationOfSuspiciousActivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgNotificationOfSuspiciousActivity.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -71965,31 +93165,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity + * @returns {CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape} CMsgNotificationOfSuspiciousActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationOfSuspiciousActivity.decode = function decode(reader, length) { + CMsgNotificationOfSuspiciousActivity.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationOfSuspiciousActivity(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationOfSuspiciousActivity(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.steamid = reader.fixed64(); - break; - case 2: - message.appid = reader.uint32(); - break; - case 3: - message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.decode(reader, reader.uint32(), $undefined, _depth + 1, message.multiple_instances); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -71999,11 +93222,11 @@ * @memberof CMsgNotificationOfSuspiciousActivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity + * @returns {CMsgNotificationOfSuspiciousActivity & CMsgNotificationOfSuspiciousActivity.$Shape} CMsgNotificationOfSuspiciousActivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgNotificationOfSuspiciousActivity.decodeDelimited = function decodeDelimited(reader) { + CMsgNotificationOfSuspiciousActivity.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -72017,17 +93240,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgNotificationOfSuspiciousActivity.verify = function verify(message) { + CMsgNotificationOfSuspiciousActivity.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.steamid != null && message.hasOwnProperty("steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) if (!$util.isInteger(message.steamid) && !(message.steamid && $util.isInteger(message.steamid.low) && $util.isInteger(message.steamid.high))) return "steamid: integer|Long expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.multiple_instances != null && message.hasOwnProperty("multiple_instances")) { - var error = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify(message.multiple_instances); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) { + var error = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify(message.multiple_instances, _depth + 1); if (error) return "multiple_instances." + error; } @@ -72042,25 +93269,31 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity */ - CMsgNotificationOfSuspiciousActivity.fromObject = function fromObject(object) { + CMsgNotificationOfSuspiciousActivity.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationOfSuspiciousActivity) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotificationOfSuspiciousActivity(); if (object.steamid != null) if ($util.Long) - (message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false; + message.steamid = $util.Long.fromValue(object.steamid, true); else if (typeof object.steamid === "string") - message.steamid = parseInt(object.steamid, 10); + message.steamid = $parseInt(object.steamid, 10); else if (typeof object.steamid === "number") message.steamid = object.steamid; else if (typeof object.steamid === "object") - message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(); + message.steamid = new $util.LongBits(object.steamid.low >>> 0, object.steamid.high >>> 0).toNumber(true); if (object.appid != null) message.appid = object.appid >>> 0; if (object.multiple_instances != null) { - if (typeof object.multiple_instances !== "object") - throw TypeError(".CMsgNotificationOfSuspiciousActivity.multiple_instances: object expected"); - message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.fromObject(object.multiple_instances); + if (!$util.isObject(object.multiple_instances)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.multiple_instances: object expected"); + message.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.fromObject(object.multiple_instances, _depth + 1); } return message; }; @@ -72074,28 +93307,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgNotificationOfSuspiciousActivity.toObject = function toObject(message, options) { + CMsgNotificationOfSuspiciousActivity.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.steamid = options.longs === String ? "0" : 0; + object.steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.appid = 0; object.multiple_instances = null; } - if (message.steamid != null && message.hasOwnProperty("steamid")) - if (typeof message.steamid === "number") - object.steamid = options.longs === String ? String(message.steamid) : message.steamid; + if (message.steamid != null && $Object.hasOwnProperty.call(message, "steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.steamid = typeof message.steamid === "number" ? $BigInt(message.steamid) : $util.Long.fromBits(message.steamid.low >>> 0, message.steamid.high >>> 0, true).toBigInt(); + else if (typeof message.steamid === "number") + object.steamid = options.longs === $String ? $String(message.steamid) : message.steamid; else - object.steamid = options.longs === String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber() : message.steamid; - if (message.appid != null && message.hasOwnProperty("appid")) + object.steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.steamid) : options.longs === $Number ? new $util.LongBits(message.steamid.low >>> 0, message.steamid.high >>> 0).toNumber(true) : message.steamid; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.multiple_instances != null && message.hasOwnProperty("multiple_instances")) - object.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.toObject(message.multiple_instances, options); + if (message.multiple_instances != null && $Object.hasOwnProperty.call(message, "multiple_instances")) + object.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.toObject(message.multiple_instances, options, _depth + 1); return object; }; @@ -72106,35 +93345,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgNotificationOfSuspiciousActivity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgNotificationOfSuspiciousActivity.prototype.toJSON = function() { + return CMsgNotificationOfSuspiciousActivity.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgNotificationOfSuspiciousActivity + * @function getTypeUrl + * @memberof CMsgNotificationOfSuspiciousActivity + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgNotificationOfSuspiciousActivity.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationOfSuspiciousActivity"; }; CMsgNotificationOfSuspiciousActivity.MultipleGameInstances = (function() { /** * Properties of a MultipleGameInstances. - * @memberof CMsgNotificationOfSuspiciousActivity - * @interface IMultipleGameInstances + * @typedef {Object} CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties * @property {number|null} [app_instance_count] MultipleGameInstances app_instance_count * @property {Array.|null} [other_steamids] MultipleGameInstances other_steamids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MultipleGameInstances. + * @memberof CMsgNotificationOfSuspiciousActivity + * @interface IMultipleGameInstances + * @augments CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties + * @deprecated Use CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties instead. + */ + + /** + * Shape of a MultipleGameInstances. + * @typedef {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape */ /** * Constructs a new MultipleGameInstances. * @memberof CMsgNotificationOfSuspiciousActivity * @classdesc Represents a MultipleGameInstances. - * @implements IMultipleGameInstances * @constructor - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MultipleGameInstances(properties) { + var MultipleGameInstances = function (properties) { this.other_steamids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MultipleGameInstances app_instance_count. @@ -72157,10 +93423,14 @@ * @function create * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties=} [properties] Properties to set * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances instance + * @type {{ + * (properties: CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape): CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape; + * (properties?: CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties): CMsgNotificationOfSuspiciousActivity.MultipleGameInstances; + * }} */ - MultipleGameInstances.create = function create(properties) { + MultipleGameInstances.create = function(properties) { return new MultipleGameInstances(properties); }; @@ -72169,18 +93439,25 @@ * @function encode * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} message MultipleGameInstances message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} message MultipleGameInstances message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultipleGameInstances.encode = function encode(message, writer) { + MultipleGameInstances.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.app_instance_count != null && Object.hasOwnProperty.call(message, "app_instance_count")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.app_instance_count); if (message.other_steamids != null && message.other_steamids.length) for (var i = 0; i < message.other_steamids.length; ++i) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.other_steamids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -72189,12 +93466,12 @@ * @function encodeDelimited * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static - * @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} message MultipleGameInstances message or plain object to encode + * @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Properties} message MultipleGameInstances message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultipleGameInstances.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MultipleGameInstances.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -72204,35 +93481,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances + * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape} MultipleGameInstances * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultipleGameInstances.decode = function decode(reader, length) { + MultipleGameInstances.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_instance_count = reader.uint32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.other_steamids && message.other_steamids.length)) - message.other_steamids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.other_steamids.push(reader.fixed64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.app_instance_count = reader.uint32(); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.other_steamids && message.other_steamids.length)) + message.other_steamids = []; + reader.fixed64s(message.other_steamids); + continue; + } + if (wireType !== 1) + break; + if (!(message.other_steamids && message.other_steamids.length)) + message.other_steamids = []; message.other_steamids.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -72242,11 +93540,11 @@ * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances + * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances & CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.$Shape} MultipleGameInstances * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultipleGameInstances.decodeDelimited = function decodeDelimited(reader) { + MultipleGameInstances.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -72260,14 +93558,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MultipleGameInstances.verify = function verify(message) { + MultipleGameInstances.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.app_instance_count != null && message.hasOwnProperty("app_instance_count")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) if (!$util.isInteger(message.app_instance_count)) return "app_instance_count: integer expected"; - if (message.other_steamids != null && message.hasOwnProperty("other_steamids")) { - if (!Array.isArray(message.other_steamids)) + if (message.other_steamids != null && $Object.hasOwnProperty.call(message, "other_steamids")) { + if (!$Array.isArray(message.other_steamids)) return "other_steamids: array expected"; for (var i = 0; i < message.other_steamids.length; ++i) if (!$util.isInteger(message.other_steamids[i]) && !(message.other_steamids[i] && $util.isInteger(message.other_steamids[i].low) && $util.isInteger(message.other_steamids[i].high))) @@ -72284,25 +93586,31 @@ * @param {Object.} object Plain object * @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances */ - MultipleGameInstances.fromObject = function fromObject(object) { + MultipleGameInstances.fromObject = function (object, _depth) { if (object instanceof $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances(); if (object.app_instance_count != null) message.app_instance_count = object.app_instance_count >>> 0; if (object.other_steamids) { - if (!Array.isArray(object.other_steamids)) - throw TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.other_steamids: array expected"); - message.other_steamids = []; + if (!$Array.isArray(object.other_steamids)) + throw $TypeError(".CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.other_steamids: array expected"); + message.other_steamids = $Array(object.other_steamids.length); for (var i = 0; i < object.other_steamids.length; ++i) if ($util.Long) - (message.other_steamids[i] = $util.Long.fromValue(object.other_steamids[i])).unsigned = false; + message.other_steamids[i] = $util.Long.fromValue(object.other_steamids[i], true); else if (typeof object.other_steamids[i] === "string") - message.other_steamids[i] = parseInt(object.other_steamids[i], 10); + message.other_steamids[i] = $parseInt(object.other_steamids[i], 10); else if (typeof object.other_steamids[i] === "number") message.other_steamids[i] = object.other_steamids[i]; else if (typeof object.other_steamids[i] === "object") - message.other_steamids[i] = new $util.LongBits(object.other_steamids[i].low >>> 0, object.other_steamids[i].high >>> 0).toNumber(); + message.other_steamids[i] = new $util.LongBits(object.other_steamids[i].low >>> 0, object.other_steamids[i].high >>> 0).toNumber(true); } return message; }; @@ -72316,23 +93624,29 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MultipleGameInstances.toObject = function toObject(message, options) { + MultipleGameInstances.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.other_steamids = []; if (options.defaults) object.app_instance_count = 0; - if (message.app_instance_count != null && message.hasOwnProperty("app_instance_count")) + if (message.app_instance_count != null && $Object.hasOwnProperty.call(message, "app_instance_count")) object.app_instance_count = message.app_instance_count; if (message.other_steamids && message.other_steamids.length) { - object.other_steamids = []; + object.other_steamids = $Array(message.other_steamids.length); for (var j = 0; j < message.other_steamids.length; ++j) - if (typeof message.other_steamids[j] === "number") - object.other_steamids[j] = options.longs === String ? String(message.other_steamids[j]) : message.other_steamids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.other_steamids[j] = typeof message.other_steamids[j] === "number" ? $BigInt(message.other_steamids[j]) : $util.Long.fromBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0, true).toBigInt(); + else if (typeof message.other_steamids[j] === "number") + object.other_steamids[j] = options.longs === $String ? $String(message.other_steamids[j]) : message.other_steamids[j]; else - object.other_steamids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.other_steamids[j]) : options.longs === Number ? new $util.LongBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0).toNumber() : message.other_steamids[j]; + object.other_steamids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.other_steamids[j]) : options.longs === $Number ? new $util.LongBits(message.other_steamids[j].low >>> 0, message.other_steamids[j].high >>> 0).toNumber(true) : message.other_steamids[j]; } return object; }; @@ -72344,8 +93658,22 @@ * @instance * @returns {Object.} JSON object */ - MultipleGameInstances.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MultipleGameInstances.prototype.toJSON = function() { + return MultipleGameInstances.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MultipleGameInstances + * @function getTypeUrl + * @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MultipleGameInstances.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgNotificationOfSuspiciousActivity.MultipleGameInstances"; }; return MultipleGameInstances; @@ -72374,32 +93702,45 @@ protobuf.FileDescriptorSet = (function() { + /** + * Properties of a FileDescriptorSet. + * @typedef {Object} google.protobuf.FileDescriptorSet.$Properties + * @property {Array.|null} [file] FileDescriptorSet file + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a FileDescriptorSet. * @memberof google.protobuf * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @augments google.protobuf.FileDescriptorSet.$Properties + * @deprecated Use google.protobuf.FileDescriptorSet.$Properties instead. + */ + + /** + * Shape of a FileDescriptorSet. + * @typedef {google.protobuf.FileDescriptorSet.$Properties} google.protobuf.FileDescriptorSet.$Shape */ /** * Constructs a new FileDescriptorSet. * @memberof google.protobuf * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorSet(properties) { + var FileDescriptorSet = function (properties) { this.file = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorSet file. - * @member {Array.} file + * @member {Array.} file * @memberof google.protobuf.FileDescriptorSet * @instance */ @@ -72410,10 +93751,14 @@ * @function create * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @type {{ + * (properties: google.protobuf.FileDescriptorSet.$Shape): google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape; + * (properties?: google.protobuf.FileDescriptorSet.$Properties): google.protobuf.FileDescriptorSet; + * }} */ - FileDescriptorSet.create = function create(properties) { + FileDescriptorSet.create = function(properties) { return new FileDescriptorSet(properties); }; @@ -72422,16 +93767,23 @@ * @function encode * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + FileDescriptorSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.file != null && message.file.length) for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -72440,12 +93792,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -72455,27 +93807,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decode = function decode(reader, length) { + FileDescriptorSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -72485,11 +93854,11 @@ * @memberof google.protobuf.FileDescriptorSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -72503,14 +93872,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorSet.verify = function verify(message) { + FileDescriptorSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.file != null && $Object.hasOwnProperty.call(message, "file")) { + if (!$Array.isArray(message.file)) return "file: array expected"; for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i], _depth + 1); if (error) return "file." + error; } @@ -72526,18 +93899,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - FileDescriptorSet.fromObject = function fromObject(object) { + FileDescriptorSet.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorSet(); if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; + if (!$Array.isArray(object.file)) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = $Array(object.file.length); for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + if (!$util.isObject(object.file[i])) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], _depth + 1); } } return message; @@ -72552,16 +93931,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + FileDescriptorSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.file = []; if (message.file && message.file.length) { - object.file = []; + object.file = $Array(message.file.length); for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options, _depth + 1); } return object; }; @@ -72573,8 +93956,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorSet.prototype.toJSON = function() { + return FileDescriptorSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorSet"; }; return FileDescriptorSet; @@ -72584,38 +93981,51 @@ /** * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto + * @typedef {Object} google.protobuf.FileDescriptorProto.$Properties * @property {string|null} [name] FileDescriptorProto name * @property {string|null} ["package"] FileDescriptorProto package * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.|null} [message_type] FileDescriptorProto message_type + * @property {Array.|null} [enum_type] FileDescriptorProto enum_type + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.FileOptions.$Properties|null} [options] FileDescriptorProto options + * @property {google.protobuf.SourceCodeInfo.$Properties|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @augments google.protobuf.FileDescriptorProto.$Properties + * @deprecated Use google.protobuf.FileDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FileDescriptorProto. + * @typedef {google.protobuf.FileDescriptorProto.$Properties} google.protobuf.FileDescriptorProto.$Shape */ /** * Constructs a new FileDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorProto(properties) { + var FileDescriptorProto = function (properties) { this.dependency = []; this.message_type = []; this.enum_type = []; this.service = []; this.extension = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorProto name. @@ -72643,7 +94053,7 @@ /** * FileDescriptorProto message_type. - * @member {Array.} message_type + * @member {Array.} message_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -72651,7 +94061,7 @@ /** * FileDescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -72659,7 +94069,7 @@ /** * FileDescriptorProto service. - * @member {Array.} service + * @member {Array.} service * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -72667,7 +94077,7 @@ /** * FileDescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -72675,7 +94085,7 @@ /** * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options + * @member {google.protobuf.FileOptions.$Properties|null|undefined} options * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -72683,7 +94093,7 @@ /** * FileDescriptorProto source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info + * @member {google.protobuf.SourceCodeInfo.$Properties|null|undefined} source_code_info * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -72694,10 +94104,14 @@ * @function create * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FileDescriptorProto.$Shape): google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape; + * (properties?: google.protobuf.FileDescriptorProto.$Properties): google.protobuf.FileDescriptorProto; + * }} */ - FileDescriptorProto.create = function create(properties) { + FileDescriptorProto.create = function(properties) { return new FileDescriptorProto(properties); }; @@ -72706,36 +94120,43 @@ * @function encode * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + FileDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); if (message.dependency != null && message.dependency.length) for (var i = 0; i < message.dependency.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); if (message.message_type != null && message.message_type.length) for (var i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.service != null && message.service.length) for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -72744,12 +94165,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -72759,59 +94180,100 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decode = function decode(reader, length) { + FileDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message["package"] = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.message_type && message.message_type.length)) + message.message_type = []; + message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.source_code_info); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -72821,11 +94283,11 @@ * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -72839,65 +94301,69 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorProto.verify = function verify(message) { + FileDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) if (!$util.isString(message["package"])) return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) + if (message.dependency != null && $Object.hasOwnProperty.call(message, "dependency")) { + if (!$Array.isArray(message.dependency)) return "dependency: array expected"; for (var i = 0; i < message.dependency.length; ++i) if (!$util.isString(message.dependency[i])) return "dependency: string[] expected"; } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) + if (message.message_type != null && $Object.hasOwnProperty.call(message, "message_type")) { + if (!$Array.isArray(message.message_type)) return "message_type: array expected"; for (var i = 0; i < message.message_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i], _depth + 1); if (error) return "message_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) + if (message.service != null && $Object.hasOwnProperty.call(message, "service")) { + if (!$Array.isArray(message.service)) return "service: array expected"; for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i], _depth + 1); if (error) return "service." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info, _depth + 1); if (error) return "source_code_info." + error; } @@ -72912,70 +94378,76 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - FileDescriptorProto.fromObject = function fromObject(object) { + FileDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object["package"] != null) - message["package"] = String(object["package"]); + message["package"] = $String(object["package"]); if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; + if (!$Array.isArray(object.dependency)) + throw $TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = $Array(object.dependency.length); for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); + message.dependency[i] = $String(object.dependency[i]); } if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; + if (!$Array.isArray(object.message_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); + message.message_type = $Array(object.message_type.length); for (var i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); + if (!$util.isObject(object.message_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); + message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; + if (!$Array.isArray(object.service)) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = $Array(object.service.length); for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + if (!$util.isObject(object.service[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options, _depth + 1); } if (object.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); + if (!$util.isObject(object.source_code_info)) + throw $TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); + message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info, _depth + 1); } return message; }; @@ -72989,9 +94461,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.dependency = []; @@ -73006,39 +94482,39 @@ object.options = null; object.source_code_info = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; if (message.dependency && message.dependency.length) { - object.dependency = []; + object.dependency = $Array(message.dependency.length); for (var j = 0; j < message.dependency.length; ++j) object.dependency[j] = message.dependency[j]; } if (message.message_type && message.message_type.length) { - object.message_type = []; + object.message_type = $Array(message.message_type.length); for (var j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); + object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.service && message.service.length) { - object.service = []; + object.service = $Array(message.service.length); for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, _depth + 1); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options, _depth + 1); return object; }; @@ -73049,8 +94525,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorProto.prototype.toJSON = function() { + return FileDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorProto"; }; return FileDescriptorProto; @@ -73058,38 +94548,51 @@ protobuf.DescriptorProto = (function() { + /** + * Properties of a DescriptorProto. + * @typedef {Object} google.protobuf.DescriptorProto.$Properties + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nested_type] DescriptorProto nested_type + * @property {Array.|null} [enum_type] DescriptorProto enum_type + * @property {Array.|null} [extension_range] DescriptorProto extension_range + * @property {google.protobuf.MessageOptions.$Properties|null} [options] DescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a DescriptorProto. * @memberof google.protobuf * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @augments google.protobuf.DescriptorProto.$Properties + * @deprecated Use google.protobuf.DescriptorProto.$Properties instead. + */ + + /** + * Shape of a DescriptorProto. + * @typedef {google.protobuf.DescriptorProto.$Properties} google.protobuf.DescriptorProto.$Shape */ /** * Constructs a new DescriptorProto. * @memberof google.protobuf * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function DescriptorProto(properties) { + var DescriptorProto = function (properties) { this.field = []; this.extension = []; this.nested_type = []; this.enum_type = []; this.extension_range = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * DescriptorProto name. @@ -73101,7 +94604,7 @@ /** * DescriptorProto field. - * @member {Array.} field + * @member {Array.} field * @memberof google.protobuf.DescriptorProto * @instance */ @@ -73109,7 +94612,7 @@ /** * DescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.DescriptorProto * @instance */ @@ -73117,7 +94620,7 @@ /** * DescriptorProto nested_type. - * @member {Array.} nested_type + * @member {Array.} nested_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -73125,7 +94628,7 @@ /** * DescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -73133,7 +94636,7 @@ /** * DescriptorProto extension_range. - * @member {Array.} extension_range + * @member {Array.} extension_range * @memberof google.protobuf.DescriptorProto * @instance */ @@ -73141,7 +94644,7 @@ /** * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options + * @member {google.protobuf.MessageOptions.$Properties|null|undefined} options * @memberof google.protobuf.DescriptorProto * @instance */ @@ -73152,10 +94655,14 @@ * @function create * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.$Shape): google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape; + * (properties?: google.protobuf.DescriptorProto.$Properties): google.protobuf.DescriptorProto; + * }} */ - DescriptorProto.create = function create(properties) { + DescriptorProto.create = function(properties) { return new DescriptorProto(properties); }; @@ -73164,32 +94671,39 @@ * @function encode * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + DescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); if (message.nested_type != null && message.nested_type.length) for (var i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.extension_range != null && message.extension_range.length) for (var i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -73198,12 +94712,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -73213,53 +94727,88 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decode = function decode(reader, length) { + DescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.nested_type && message.nested_type.length)) + message.nested_type = []; + message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.extension_range && message.extension_range.length)) + message.extension_range = []; + message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -73269,11 +94818,11 @@ * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + DescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -73287,59 +94836,63 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DescriptorProto.verify = function verify(message) { + DescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) { + if (!$Array.isArray(message.field)) return "field: array expected"; for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i], _depth + 1); if (error) return "field." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) + if (message.nested_type != null && $Object.hasOwnProperty.call(message, "nested_type")) { + if (!$Array.isArray(message.nested_type)) return "nested_type: array expected"; for (var i = 0; i < message.nested_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i], _depth + 1); if (error) return "nested_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) + if (message.extension_range != null && $Object.hasOwnProperty.call(message, "extension_range")) { + if (!$Array.isArray(message.extension_range)) return "extension_range: array expected"; for (var i = 0; i < message.extension_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i], _depth + 1); if (error) return "extension_range." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -73354,66 +94907,72 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto} DescriptorProto */ - DescriptorProto.fromObject = function fromObject(object) { + DescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; + if (!$Array.isArray(object.field)) + throw $TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = $Array(object.field.length); for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + if (!$util.isObject(object.field[i])) + throw $TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; + if (!$Array.isArray(object.nested_type)) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); + message.nested_type = $Array(object.nested_type.length); for (var i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); + if (!$util.isObject(object.nested_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); + message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; + if (!$Array.isArray(object.extension_range)) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); + message.extension_range = $Array(object.extension_range.length); for (var i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); + if (!$util.isObject(object.extension_range[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); + message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -73427,9 +94986,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + DescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.field = []; @@ -73442,35 +95005,35 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.field && message.field.length) { - object.field = []; + object.field = $Array(message.field.length); for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options, _depth + 1); } if (message.nested_type && message.nested_type.length) { - object.nested_type = []; + object.nested_type = $Array(message.nested_type.length); for (var j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); + object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.extension_range && message.extension_range.length) { - object.extension_range = []; + object.extension_range = $Array(message.extension_range.length); for (var j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options); + object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -73481,34 +95044,61 @@ * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + DescriptorProto.prototype.toJSON = function() { + return DescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + DescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto"; }; DescriptorProto.ExtensionRange = (function() { /** * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange + * @typedef {Object} google.protobuf.DescriptorProto.ExtensionRange.$Properties * @property {number|null} [start] ExtensionRange start * @property {number|null} [end] ExtensionRange end + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @augments google.protobuf.DescriptorProto.ExtensionRange.$Properties + * @deprecated Use google.protobuf.DescriptorProto.ExtensionRange.$Properties instead. + */ + + /** + * Shape of an ExtensionRange. + * @typedef {google.protobuf.DescriptorProto.ExtensionRange.$Properties} google.protobuf.DescriptorProto.ExtensionRange.$Shape */ /** * Constructs a new ExtensionRange. * @memberof google.protobuf.DescriptorProto * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtensionRange(properties) { + var ExtensionRange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtensionRange start. @@ -73531,10 +95121,14 @@ * @function create * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.ExtensionRange.$Shape): google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape; + * (properties?: google.protobuf.DescriptorProto.ExtensionRange.$Properties): google.protobuf.DescriptorProto.ExtensionRange; + * }} */ - ExtensionRange.create = function create(properties) { + ExtensionRange.create = function(properties) { return new ExtensionRange(properties); }; @@ -73543,17 +95137,24 @@ * @function encode * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encode = function encode(message, writer) { + ExtensionRange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -73562,12 +95163,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtensionRange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -73577,28 +95178,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decode = function decode(reader, length) { + ExtensionRange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto.ExtensionRange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.start = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.end = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -73608,11 +95229,11 @@ * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + ExtensionRange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -73626,13 +95247,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtensionRange.verify = function verify(message) { + ExtensionRange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -73646,9 +95271,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange */ - ExtensionRange.fromObject = function fromObject(object) { + ExtensionRange.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); if (object.start != null) message.start = object.start | 0; @@ -73666,17 +95297,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRange.toObject = function toObject(message, options) { + ExtensionRange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -73688,8 +95323,22 @@ * @instance * @returns {Object.} JSON object */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtensionRange.prototype.toJSON = function() { + return ExtensionRange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtensionRange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto.ExtensionRange"; }; return ExtensionRange; @@ -73702,8 +95351,7 @@ /** * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto + * @typedef {Object} google.protobuf.FieldDescriptorProto.$Properties * @property {string|null} [name] FieldDescriptorProto name * @property {number|null} [number] FieldDescriptorProto number * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label @@ -73711,23 +95359,37 @@ * @property {string|null} [type_name] FieldDescriptorProto type_name * @property {string|null} [extendee] FieldDescriptorProto extendee * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {google.protobuf.FieldOptions.$Properties|null} [options] FieldDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @augments google.protobuf.FieldDescriptorProto.$Properties + * @deprecated Use google.protobuf.FieldDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FieldDescriptorProto. + * @typedef {google.protobuf.FieldDescriptorProto.$Properties} google.protobuf.FieldDescriptorProto.$Shape */ /** * Constructs a new FieldDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FieldDescriptorProto(properties) { + var FieldDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldDescriptorProto name. @@ -73787,7 +95449,7 @@ /** * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options + * @member {google.protobuf.FieldOptions.$Properties|null|undefined} options * @memberof google.protobuf.FieldDescriptorProto * @instance */ @@ -73798,10 +95460,14 @@ * @function create * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FieldDescriptorProto.$Shape): google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape; + * (properties?: google.protobuf.FieldDescriptorProto.$Properties): google.protobuf.FieldDescriptorProto; + * }} */ - FieldDescriptorProto.create = function create(properties) { + FieldDescriptorProto.create = function(properties) { return new FieldDescriptorProto(properties); }; @@ -73810,29 +95476,36 @@ * @function encode * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + FieldDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.type_name != null && Object.hasOwnProperty.call(message, "type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -73841,12 +95514,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -73856,46 +95529,96 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decode = function decode(reader, length) { + FieldDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldDescriptorProto(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Label[value] !== $undefined) + message.label = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 5: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Type[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 6: { + if (wireType !== 2) + break; + message.type_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.extendee = reader.string(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.default_value = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -73905,11 +95628,11 @@ * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FieldDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -73923,16 +95646,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldDescriptorProto.verify = function verify(message) { + FieldDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) switch (message.label) { default: return "label: enum value expected"; @@ -73941,7 +95668,7 @@ case 3: break; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -73965,17 +95692,17 @@ case 18: break; } - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) if (!$util.isString(message.type_name)) return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) if (!$util.isString(message.extendee)) return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) if (!$util.isString(message.default_value)) return "default_value: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -73990,12 +95717,18 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - FieldDescriptorProto.fromObject = function fromObject(object) { + FieldDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; switch (object.label) { @@ -74011,6 +95744,7 @@ case 3: message.label = 3; break; + default: } switch (object.type) { case "TYPE_DOUBLE": @@ -74085,17 +95819,18 @@ case 18: message.type = 18; break; + default: } if (object.type_name != null) - message.type_name = String(object.type_name); + message.type_name = $String(object.type_name); if (object.extendee != null) - message.extendee = String(object.extendee); + message.extendee = $String(object.extendee); if (object.default_value != null) - message.default_value = String(object.default_value); + message.default_value = $String(object.default_value); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -74109,36 +95844,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + FieldDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.extendee = ""; object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.label = options.enums === $String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === $String ? "TYPE_DOUBLE" : 1; object.type_name = ""; object.default_value = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) + object.label = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === $undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === $undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -74149,8 +95888,22 @@ * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldDescriptorProto.prototype.toJSON = function() { + return FieldDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldDescriptorProto"; }; /** @@ -74177,7 +95930,7 @@ * @property {number} TYPE_SINT64=18 TYPE_SINT64 value */ FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "TYPE_DOUBLE"] = 1; values[valuesById[2] = "TYPE_FLOAT"] = 2; values[valuesById[3] = "TYPE_INT64"] = 3; @@ -74208,7 +95961,7 @@ * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value */ FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "LABEL_OPTIONAL"] = 1; values[valuesById[2] = "LABEL_REQUIRED"] = 2; values[valuesById[3] = "LABEL_REPEATED"] = 3; @@ -74220,30 +95973,43 @@ protobuf.EnumDescriptorProto = (function() { + /** + * Properties of an EnumDescriptorProto. + * @typedef {Object} google.protobuf.EnumDescriptorProto.$Properties + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.EnumOptions.$Properties|null} [options] EnumDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumDescriptorProto. * @memberof google.protobuf * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @augments google.protobuf.EnumDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumDescriptorProto. + * @typedef {google.protobuf.EnumDescriptorProto.$Properties} google.protobuf.EnumDescriptorProto.$Shape */ /** * Constructs a new EnumDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumDescriptorProto(properties) { + var EnumDescriptorProto = function (properties) { this.value = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumDescriptorProto name. @@ -74255,7 +96021,7 @@ /** * EnumDescriptorProto value. - * @member {Array.} value + * @member {Array.} value * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -74263,7 +96029,7 @@ /** * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options + * @member {google.protobuf.EnumOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -74274,10 +96040,14 @@ * @function create * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumDescriptorProto.$Shape): google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumDescriptorProto.$Properties): google.protobuf.EnumDescriptorProto; + * }} */ - EnumDescriptorProto.create = function create(properties) { + EnumDescriptorProto.create = function(properties) { return new EnumDescriptorProto(properties); }; @@ -74286,20 +96056,27 @@ * @function encode * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + EnumDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -74308,12 +96085,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -74323,33 +96100,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decode = function decode(reader, length) { + EnumDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -74359,11 +96159,11 @@ * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -74377,23 +96177,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumDescriptorProto.verify = function verify(message) { + EnumDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) { + if (!$Array.isArray(message.value)) return "value: array expected"; for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i], _depth + 1); if (error) return "value." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -74408,26 +96212,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - EnumDescriptorProto.fromObject = function fromObject(object) { + EnumDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; + if (!$Array.isArray(object.value)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = $Array(object.value.length); for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + if (!$util.isObject(object.value[i])) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -74441,9 +96251,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.value = []; @@ -74451,15 +96265,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.value && message.value.length) { - object.value = []; + object.value = $Array(message.value.length); for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -74470,8 +96284,22 @@ * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumDescriptorProto.prototype.toJSON = function() { + return EnumDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumDescriptorProto"; }; return EnumDescriptorProto; @@ -74481,27 +96309,40 @@ /** * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto + * @typedef {Object} google.protobuf.EnumValueDescriptorProto.$Properties * @property {string|null} [name] EnumValueDescriptorProto name * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + * @property {google.protobuf.EnumValueOptions.$Properties|null} [options] EnumValueDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @augments google.protobuf.EnumValueDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumValueDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumValueDescriptorProto. + * @typedef {google.protobuf.EnumValueDescriptorProto.$Properties} google.protobuf.EnumValueDescriptorProto.$Shape */ /** * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueDescriptorProto(properties) { + var EnumValueDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueDescriptorProto name. @@ -74521,7 +96362,7 @@ /** * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @member {google.protobuf.EnumValueOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ @@ -74532,10 +96373,14 @@ * @function create * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumValueDescriptorProto.$Shape): google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumValueDescriptorProto.$Properties): google.protobuf.EnumValueDescriptorProto; + * }} */ - EnumValueDescriptorProto.create = function create(properties) { + EnumValueDescriptorProto.create = function(properties) { return new EnumValueDescriptorProto(properties); }; @@ -74544,19 +96389,26 @@ * @function encode * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer) { + EnumValueDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -74565,12 +96417,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -74580,31 +96432,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decode = function decode(reader, length) { + EnumValueDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -74614,11 +96489,11 @@ * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumValueDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -74632,17 +96507,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueDescriptorProto.verify = function verify(message) { + EnumValueDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -74657,18 +96536,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { + EnumValueDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -74682,21 +96567,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + EnumValueDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.number = 0; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -74707,8 +96596,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueDescriptorProto.prototype.toJSON = function() { + return EnumValueDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueDescriptorProto"; }; return EnumValueDescriptorProto; @@ -74716,30 +96619,43 @@ protobuf.ServiceDescriptorProto = (function() { + /** + * Properties of a ServiceDescriptorProto. + * @typedef {Object} google.protobuf.ServiceDescriptorProto.$Properties + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.ServiceOptions.$Properties|null} [options] ServiceDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceDescriptorProto. * @memberof google.protobuf * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + * @augments google.protobuf.ServiceDescriptorProto.$Properties + * @deprecated Use google.protobuf.ServiceDescriptorProto.$Properties instead. + */ + + /** + * Shape of a ServiceDescriptorProto. + * @typedef {google.protobuf.ServiceDescriptorProto.$Properties} google.protobuf.ServiceDescriptorProto.$Shape */ /** * Constructs a new ServiceDescriptorProto. * @memberof google.protobuf * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceDescriptorProto(properties) { + var ServiceDescriptorProto = function (properties) { this.method = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceDescriptorProto name. @@ -74751,7 +96667,7 @@ /** * ServiceDescriptorProto method. - * @member {Array.} method + * @member {Array.} method * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -74759,7 +96675,7 @@ /** * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options + * @member {google.protobuf.ServiceOptions.$Properties|null|undefined} options * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -74770,10 +96686,14 @@ * @function create * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @type {{ + * (properties: google.protobuf.ServiceDescriptorProto.$Shape): google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape; + * (properties?: google.protobuf.ServiceDescriptorProto.$Properties): google.protobuf.ServiceDescriptorProto; + * }} */ - ServiceDescriptorProto.create = function create(properties) { + ServiceDescriptorProto.create = function(properties) { return new ServiceDescriptorProto(properties); }; @@ -74782,20 +96702,27 @@ * @function encode * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + ServiceDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -74804,12 +96731,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -74819,33 +96746,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decode = function decode(reader, length) { + ServiceDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -74855,11 +96805,11 @@ * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ServiceDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -74873,23 +96823,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceDescriptorProto.verify = function verify(message) { + ServiceDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) { + if (!$Array.isArray(message.method)) return "method: array expected"; for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i], _depth + 1); if (error) return "method." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -74904,26 +96858,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - ServiceDescriptorProto.fromObject = function fromObject(object) { + ServiceDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; + if (!$Array.isArray(object.method)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = $Array(object.method.length); for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + if (!$util.isObject(object.method[i])) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -74937,9 +96897,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.method = []; @@ -74947,15 +96911,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.method && message.method.length) { - object.method = []; + object.method = $Array(message.method.length); for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -74966,8 +96930,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceDescriptorProto.prototype.toJSON = function() { + return ServiceDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceDescriptorProto"; }; return ServiceDescriptorProto; @@ -74977,28 +96955,41 @@ /** * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto + * @typedef {Object} google.protobuf.MethodDescriptorProto.$Properties * @property {string|null} [name] MethodDescriptorProto name * @property {string|null} [input_type] MethodDescriptorProto input_type * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {google.protobuf.MethodOptions.$Properties|null} [options] MethodDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @augments google.protobuf.MethodDescriptorProto.$Properties + * @deprecated Use google.protobuf.MethodDescriptorProto.$Properties instead. + */ + + /** + * Shape of a MethodDescriptorProto. + * @typedef {google.protobuf.MethodDescriptorProto.$Properties} google.protobuf.MethodDescriptorProto.$Shape */ /** * Constructs a new MethodDescriptorProto. * @memberof google.protobuf * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodDescriptorProto(properties) { + var MethodDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodDescriptorProto name. @@ -75026,7 +97017,7 @@ /** * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options + * @member {google.protobuf.MethodOptions.$Properties|null|undefined} options * @memberof google.protobuf.MethodDescriptorProto * @instance */ @@ -75037,10 +97028,14 @@ * @function create * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @type {{ + * (properties: google.protobuf.MethodDescriptorProto.$Shape): google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape; + * (properties?: google.protobuf.MethodDescriptorProto.$Properties): google.protobuf.MethodDescriptorProto; + * }} */ - MethodDescriptorProto.create = function create(properties) { + MethodDescriptorProto.create = function(properties) { return new MethodDescriptorProto(properties); }; @@ -75049,21 +97044,28 @@ * @function encode * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + MethodDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.input_type != null && Object.hasOwnProperty.call(message, "input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -75072,12 +97074,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -75087,34 +97089,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decode = function decode(reader, length) { + MethodDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.input_type = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.output_type = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -75124,11 +97152,11 @@ * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MethodDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -75142,20 +97170,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodDescriptorProto.verify = function verify(message) { + MethodDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) if (!$util.isString(message.input_type)) return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) if (!$util.isString(message.output_type)) return "output_type: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -75170,20 +97202,26 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - MethodDescriptorProto.fromObject = function fromObject(object) { + MethodDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.input_type != null) - message.input_type = String(object.input_type); + message.input_type = $String(object.input_type); if (object.output_type != null) - message.output_type = String(object.output_type); + message.output_type = $String(object.output_type); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -75197,9 +97235,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -75207,14 +97249,14 @@ object.output_type = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -75225,8 +97267,22 @@ * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodDescriptorProto.prototype.toJSON = function() { + return MethodDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodDescriptorProto"; }; return MethodDescriptorProto; @@ -75236,8 +97292,7 @@ /** * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions + * @typedef {Object} google.protobuf.FileOptions.$Properties * @property {string|null} [java_package] FileOptions java_package * @property {string|null} [java_outer_classname] FileOptions java_outer_classname * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files @@ -75246,24 +97301,38 @@ * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services * @property {boolean|null} [java_generic_services] FileOptions java_generic_services * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @augments google.protobuf.FileOptions.$Properties + * @deprecated Use google.protobuf.FileOptions.$Properties instead. + */ + + /** + * Shape of a FileOptions. + * @typedef {google.protobuf.FileOptions.$Properties} google.protobuf.FileOptions.$Shape */ /** * Constructs a new FileOptions. * @memberof google.protobuf * @classdesc Represents a FileOptions. - * @implements IFileOptions * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileOptions(properties) { + var FileOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileOptions java_package. @@ -75331,7 +97400,7 @@ /** * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FileOptions * @instance */ @@ -75342,10 +97411,14 @@ * @function create * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileOptions} FileOptions instance + * @type {{ + * (properties: google.protobuf.FileOptions.$Shape): google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape; + * (properties?: google.protobuf.FileOptions.$Properties): google.protobuf.FileOptions; + * }} */ - FileOptions.create = function create(properties) { + FileOptions.create = function(properties) { return new FileOptions(properties); }; @@ -75354,32 +97427,39 @@ * @function encode * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + FileOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.java_package != null && Object.hasOwnProperty.call(message, "java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -75388,12 +97468,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -75403,51 +97483,98 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decode = function decode(reader, length) { + FileOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.java_package = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.java_outer_classname = reader.string(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.java_multiple_files = reader.bool(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.java_generate_equals_and_hash = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FileOptions.OptimizeMode[value] !== $undefined) + message.optimize_for = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 16: { + if (wireType !== 0) + break; + message.cc_generic_services = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.java_generic_services = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.py_generic_services = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -75457,11 +97584,11 @@ * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -75475,22 +97602,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileOptions.verify = function verify(message) { + FileOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) if (!$util.isString(message.java_package)) return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) if (!$util.isString(message.java_outer_classname)) return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) if (typeof message.java_multiple_files !== "boolean") return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) if (typeof message.java_generate_equals_and_hash !== "boolean") return "java_generate_equals_and_hash: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) switch (message.optimize_for) { default: return "optimize_for: enum value expected"; @@ -75499,20 +97630,20 @@ case 3: break; } - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) if (typeof message.cc_generic_services !== "boolean") return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) if (typeof message.java_generic_services !== "boolean") return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) if (typeof message.py_generic_services !== "boolean") return "py_generic_services: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -75528,18 +97659,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileOptions} FileOptions */ - FileOptions.fromObject = function fromObject(object) { + FileOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileOptions(); if (object.java_package != null) - message.java_package = String(object.java_package); + message.java_package = $String(object.java_package); if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); + message.java_outer_classname = $String(object.java_outer_classname); if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); + message.java_multiple_files = $Boolean(object.java_multiple_files); if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); + message.java_generate_equals_and_hash = $Boolean(object.java_generate_equals_and_hash); switch (object.optimize_for) { case "SPEED": case 1: @@ -75553,21 +97690,22 @@ case 3: message.optimize_for = 3; break; + default: } if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); + message.cc_generic_services = $Boolean(object.cc_generic_services); if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); + message.java_generic_services = $Boolean(object.java_generic_services); if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); + message.py_generic_services = $Boolean(object.py_generic_services); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -75582,42 +97720,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + FileOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { object.java_package = ""; object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; + object.optimize_for = options.enums === $String ? "SPEED" : 1; object.java_multiple_files = false; object.cc_generic_services = false; object.java_generic_services = false; object.py_generic_services = false; object.java_generate_equals_and_hash = false; } - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) + object.optimize_for = options.enums === $String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] === $undefined ? message.optimize_for : $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) object.java_multiple_files = message.java_multiple_files; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -75629,8 +97771,22 @@ * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileOptions.prototype.toJSON = function() { + return FileOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileOptions"; }; /** @@ -75642,7 +97798,7 @@ * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value */ FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "SPEED"] = 1; values[valuesById[2] = "CODE_SIZE"] = 2; values[valuesById[3] = "LITE_RUNTIME"] = 3; @@ -75656,30 +97812,45 @@ /** * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions + * @typedef {Object} google.protobuf.MessageOptions.$Properties * @property {boolean|null} [message_set_wire_format] MessageOptions message_set_wire_format * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option * @property {number|null} [".msgpool_soft_limit"] MessageOptions .msgpool_soft_limit * @property {number|null} [".msgpool_hard_limit"] MessageOptions .msgpool_hard_limit + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @augments google.protobuf.MessageOptions.$Properties + * @deprecated Use google.protobuf.MessageOptions.$Properties instead. + */ + + /** + * Shape of a MessageOptions. + * @typedef {google.protobuf.MessageOptions.$Properties} google.protobuf.MessageOptions.$Shape */ /** * Constructs a new MessageOptions. * @memberof google.protobuf * @classdesc Represents a MessageOptions. - * @implements IMessageOptions * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set + * @property {number} ".msgpool_soft_limit" MessageOptions .msgpool_soft_limit + * @property {number} ".msgpool_hard_limit" MessageOptions .msgpool_hard_limit + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MessageOptions(properties) { + var MessageOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MessageOptions message_set_wire_format. @@ -75699,26 +97870,13 @@ /** * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MessageOptions * @instance */ MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * MessageOptions .msgpool_soft_limit. - * @member {number} .msgpool_soft_limit - * @memberof google.protobuf.MessageOptions - * @instance - */ MessageOptions.prototype[".msgpool_soft_limit"] = 32; - - /** - * MessageOptions .msgpool_hard_limit. - * @member {number} .msgpool_hard_limit - * @memberof google.protobuf.MessageOptions - * @instance - */ MessageOptions.prototype[".msgpool_hard_limit"] = 384; /** @@ -75726,10 +97884,14 @@ * @function create * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @type {{ + * (properties: google.protobuf.MessageOptions.$Shape): google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape; + * (properties?: google.protobuf.MessageOptions.$Properties): google.protobuf.MessageOptions; + * }} */ - MessageOptions.create = function create(properties) { + MessageOptions.create = function(properties) { return new MessageOptions(properties); }; @@ -75738,24 +97900,31 @@ * @function encode * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + MessageOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".msgpool_soft_limit"] != null && Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) writer.uint32(/* id 60000, wireType 0 =*/480000).int32(message[".msgpool_soft_limit"]); - if (message[".msgpool_hard_limit"] != null && Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) writer.uint32(/* id 60001, wireType 0 =*/480008).int32(message[".msgpool_hard_limit"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -75764,12 +97933,12 @@ * @function encodeDelimited * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -75779,39 +97948,68 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decode = function decode(reader, length) { + MessageOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MessageOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 60000: - message[".msgpool_soft_limit"] = reader.int32(); - break; - case 60001: - message[".msgpool_hard_limit"] = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.message_set_wire_format = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.no_standard_descriptor_accessor = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 60000: { + if (wireType !== 0) + break; + message[".msgpool_soft_limit"] = reader.int32(); + continue; + } + case 60001: { + if (wireType !== 0) + break; + message[".msgpool_hard_limit"] = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -75821,11 +98019,11 @@ * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -75839,28 +98037,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageOptions.verify = function verify(message) { + MessageOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) if (typeof message.message_set_wire_format !== "boolean") return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) if (typeof message.no_standard_descriptor_accessor !== "boolean") return "no_standard_descriptor_accessor: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".msgpool_soft_limit")) + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) if (!$util.isInteger(message[".msgpool_soft_limit"])) return ".msgpool_soft_limit: integer expected"; - if (message[".msgpool_hard_limit"] != null && message.hasOwnProperty(".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) if (!$util.isInteger(message[".msgpool_hard_limit"])) return ".msgpool_hard_limit: integer expected"; return null; @@ -75874,22 +98076,28 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MessageOptions} MessageOptions */ - MessageOptions.fromObject = function fromObject(object) { + MessageOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MessageOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MessageOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MessageOptions(); if (object.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); + message.message_set_wire_format = $Boolean(object.message_set_wire_format); if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); + message.no_standard_descriptor_accessor = $Boolean(object.no_standard_descriptor_accessor); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } if (object[".msgpool_soft_limit"] != null) @@ -75908,9 +98116,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + MessageOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; @@ -75920,18 +98132,18 @@ object[".msgpool_soft_limit"] = 32; object[".msgpool_hard_limit"] = 384; } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".msgpool_soft_limit")) + if (message[".msgpool_soft_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_soft_limit")) object[".msgpool_soft_limit"] = message[".msgpool_soft_limit"]; - if (message[".msgpool_hard_limit"] != null && message.hasOwnProperty(".msgpool_hard_limit")) + if (message[".msgpool_hard_limit"] != null && $Object.hasOwnProperty.call(message, ".msgpool_hard_limit")) object[".msgpool_hard_limit"] = message[".msgpool_hard_limit"]; return object; }; @@ -75943,8 +98155,22 @@ * @instance * @returns {Object.} JSON object */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MessageOptions.prototype.toJSON = function() { + return MessageOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MessageOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MessageOptions"; }; return MessageOptions; @@ -75954,31 +98180,45 @@ /** * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions + * @typedef {Object} google.protobuf.FieldOptions.$Properties * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype * @property {boolean|null} [packed] FieldOptions packed * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {string|null} [experimental_map_key] FieldOptions experimental_map_key - * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option * @property {boolean|null} [".key_field"] FieldOptions .key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @augments google.protobuf.FieldOptions.$Properties + * @deprecated Use google.protobuf.FieldOptions.$Properties instead. + */ + + /** + * Shape of a FieldOptions. + * @typedef {google.protobuf.FieldOptions.$Properties} google.protobuf.FieldOptions.$Shape */ /** * Constructs a new FieldOptions. * @memberof google.protobuf * @classdesc Represents a FieldOptions. - * @implements IFieldOptions * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set + * @property {boolean} ".key_field" FieldOptions .key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FieldOptions(properties) { + var FieldOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldOptions ctype. @@ -76014,18 +98254,12 @@ /** * FieldOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * FieldOptions .key_field. - * @member {boolean} .key_field - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".key_field"] = false; /** @@ -76033,10 +98267,14 @@ * @function create * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @type {{ + * (properties: google.protobuf.FieldOptions.$Shape): google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape; + * (properties?: google.protobuf.FieldOptions.$Properties): google.protobuf.FieldOptions; + * }} */ - FieldOptions.create = function create(properties) { + FieldOptions.create = function(properties) { return new FieldOptions(properties); }; @@ -76045,26 +98283,33 @@ * @function encode * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + FieldOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.experimental_map_key != null && Object.hasOwnProperty.call(message, "experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.experimental_map_key); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".key_field"] != null && Object.hasOwnProperty.call(message, ".key_field")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) writer.uint32(/* id 60000, wireType 0 =*/480000).bool(message[".key_field"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -76073,12 +98318,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -76088,42 +98333,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decode = function decode(reader, length) { + FieldOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 9: - message.experimental_map_key = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 60000: - message[".key_field"] = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldOptions.CType[value] !== $undefined) + message.ctype = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + message.packed = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.deprecated = reader.bool(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.experimental_map_key = reader.string(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 60000: { + if (wireType !== 0) + break; + message[".key_field"] = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -76133,11 +98416,11 @@ * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -76151,10 +98434,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldOptions.verify = function verify(message) { + FieldOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) switch (message.ctype) { default: return "ctype: enum value expected"; @@ -76163,25 +98450,25 @@ case 2: break; } - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) if (typeof message.packed !== "boolean") return "packed: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) if (!$util.isString(message.experimental_map_key)) return "experimental_map_key: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".key_field"] != null && message.hasOwnProperty(".key_field")) + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) if (typeof message[".key_field"] !== "boolean") return ".key_field: boolean expected"; return null; @@ -76195,9 +98482,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldOptions} FieldOptions */ - FieldOptions.fromObject = function fromObject(object) { + FieldOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { case "STRING": @@ -76212,25 +98505,26 @@ case 2: message.ctype = 2; break; + default: } if (object.packed != null) - message.packed = Boolean(object.packed); + message.packed = $Boolean(object.packed); if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); + message.deprecated = $Boolean(object.deprecated); if (object.experimental_map_key != null) - message.experimental_map_key = String(object.experimental_map_key); + message.experimental_map_key = $String(object.experimental_map_key); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } if (object[".key_field"] != null) - message[".key_field"] = Boolean(object[".key_field"]); + message[".key_field"] = $Boolean(object[".key_field"]); return message; }; @@ -76243,33 +98537,37 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + FieldOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; + object.ctype = options.enums === $String ? "STRING" : 0; object.packed = false; object.deprecated = false; object.experimental_map_key = ""; object[".key_field"] = false; } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) + object.ctype = options.enums === $String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === $undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) object.experimental_map_key = message.experimental_map_key; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".key_field"] != null && message.hasOwnProperty(".key_field")) + if (message[".key_field"] != null && $Object.hasOwnProperty.call(message, ".key_field")) object[".key_field"] = message[".key_field"]; return object; }; @@ -76281,8 +98579,22 @@ * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldOptions.prototype.toJSON = function() { + return FieldOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldOptions"; }; /** @@ -76294,7 +98606,7 @@ * @property {number} STRING_PIECE=2 STRING_PIECE value */ FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "STRING"] = 0; values[valuesById[1] = "CORD"] = 1; values[valuesById[2] = "STRING_PIECE"] = 2; @@ -76306,32 +98618,45 @@ protobuf.EnumOptions = (function() { + /** + * Properties of an EnumOptions. + * @typedef {Object} google.protobuf.EnumOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumOptions. * @memberof google.protobuf * @interface IEnumOptions - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @augments google.protobuf.EnumOptions.$Properties + * @deprecated Use google.protobuf.EnumOptions.$Properties instead. + */ + + /** + * Shape of an EnumOptions. + * @typedef {google.protobuf.EnumOptions.$Properties} google.protobuf.EnumOptions.$Shape */ /** * Constructs a new EnumOptions. * @memberof google.protobuf * @classdesc Represents an EnumOptions. - * @implements IEnumOptions * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumOptions(properties) { + var EnumOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumOptions * @instance */ @@ -76342,10 +98667,14 @@ * @function create * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @type {{ + * (properties: google.protobuf.EnumOptions.$Shape): google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape; + * (properties?: google.protobuf.EnumOptions.$Properties): google.protobuf.EnumOptions; + * }} */ - EnumOptions.create = function create(properties) { + EnumOptions.create = function(properties) { return new EnumOptions(properties); }; @@ -76354,16 +98683,23 @@ * @function encode * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + EnumOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -76372,12 +98708,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -76387,27 +98723,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length) { + EnumOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -76417,11 +98770,11 @@ * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -76435,14 +98788,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumOptions.verify = function verify(message) { + EnumOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -76458,18 +98815,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumOptions} EnumOptions */ - EnumOptions.fromObject = function fromObject(object) { + EnumOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -76484,16 +98847,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + EnumOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -76505,8 +98872,22 @@ * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumOptions.prototype.toJSON = function() { + return EnumOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumOptions"; }; return EnumOptions; @@ -76514,32 +98895,45 @@ protobuf.EnumValueOptions = (function() { + /** + * Properties of an EnumValueOptions. + * @typedef {Object} google.protobuf.EnumValueOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumValueOptions. * @memberof google.protobuf * @interface IEnumValueOptions - * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @augments google.protobuf.EnumValueOptions.$Properties + * @deprecated Use google.protobuf.EnumValueOptions.$Properties instead. + */ + + /** + * Shape of an EnumValueOptions. + * @typedef {google.protobuf.EnumValueOptions.$Properties} google.protobuf.EnumValueOptions.$Shape */ /** * Constructs a new EnumValueOptions. * @memberof google.protobuf * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueOptions(properties) { + var EnumValueOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumValueOptions * @instance */ @@ -76550,10 +98944,14 @@ * @function create * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @type {{ + * (properties: google.protobuf.EnumValueOptions.$Shape): google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape; + * (properties?: google.protobuf.EnumValueOptions.$Properties): google.protobuf.EnumValueOptions; + * }} */ - EnumValueOptions.create = function create(properties) { + EnumValueOptions.create = function(properties) { return new EnumValueOptions(properties); }; @@ -76562,16 +98960,23 @@ * @function encode * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + EnumValueOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -76580,12 +98985,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -76595,27 +99000,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + EnumValueOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -76625,11 +99047,11 @@ * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -76643,14 +99065,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueOptions.verify = function verify(message) { + EnumValueOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -76666,18 +99092,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - EnumValueOptions.fromObject = function fromObject(object) { + EnumValueOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -76692,16 +99124,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -76713,8 +99149,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueOptions.prototype.toJSON = function() { + return EnumValueOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueOptions"; }; return EnumValueOptions; @@ -76722,32 +99172,45 @@ protobuf.ServiceOptions = (function() { + /** + * Properties of a ServiceOptions. + * @typedef {Object} google.protobuf.ServiceOptions.$Properties + * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceOptions. * @memberof google.protobuf * @interface IServiceOptions - * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @augments google.protobuf.ServiceOptions.$Properties + * @deprecated Use google.protobuf.ServiceOptions.$Properties instead. + */ + + /** + * Shape of a ServiceOptions. + * @typedef {google.protobuf.ServiceOptions.$Properties} google.protobuf.ServiceOptions.$Shape */ /** * Constructs a new ServiceOptions. * @memberof google.protobuf * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceOptions(properties) { + var ServiceOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.ServiceOptions * @instance */ @@ -76758,10 +99221,14 @@ * @function create * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @type {{ + * (properties: google.protobuf.ServiceOptions.$Shape): google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape; + * (properties?: google.protobuf.ServiceOptions.$Properties): google.protobuf.ServiceOptions; + * }} */ - ServiceOptions.create = function create(properties) { + ServiceOptions.create = function(properties) { return new ServiceOptions(properties); }; @@ -76770,16 +99237,23 @@ * @function encode * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + ServiceOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -76788,12 +99262,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -76803,27 +99277,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + ServiceOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -76833,11 +99324,11 @@ * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -76851,14 +99342,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + ServiceOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -76874,18 +99369,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - ServiceOptions.fromObject = function fromObject(object) { + ServiceOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -76900,16 +99401,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -76921,8 +99426,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceOptions.prototype.toJSON = function() { + return ServiceOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceOptions"; }; return ServiceOptions; @@ -76930,32 +99449,45 @@ protobuf.MethodOptions = (function() { + /** + * Properties of a MethodOptions. + * @typedef {Object} google.protobuf.MethodOptions.$Properties + * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a MethodOptions. * @memberof google.protobuf * @interface IMethodOptions - * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @augments google.protobuf.MethodOptions.$Properties + * @deprecated Use google.protobuf.MethodOptions.$Properties instead. + */ + + /** + * Shape of a MethodOptions. + * @typedef {google.protobuf.MethodOptions.$Properties} google.protobuf.MethodOptions.$Shape */ /** * Constructs a new MethodOptions. * @memberof google.protobuf * @classdesc Represents a MethodOptions. - * @implements IMethodOptions * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodOptions(properties) { + var MethodOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MethodOptions * @instance */ @@ -76966,10 +99498,14 @@ * @function create * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @type {{ + * (properties: google.protobuf.MethodOptions.$Shape): google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape; + * (properties?: google.protobuf.MethodOptions.$Properties): google.protobuf.MethodOptions; + * }} */ - MethodOptions.create = function create(properties) { + MethodOptions.create = function(properties) { return new MethodOptions(properties); }; @@ -76978,16 +99514,23 @@ * @function encode * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + MethodOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -76996,12 +99539,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -77011,27 +99554,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + MethodOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -77041,11 +99601,11 @@ * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -77059,14 +99619,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + MethodOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -77082,18 +99646,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodOptions} MethodOptions */ - MethodOptions.fromObject = function fromObject(object) { + MethodOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -77108,16 +99678,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + MethodOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -77129,8 +99703,22 @@ * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodOptions.prototype.toJSON = function() { + return MethodOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodOptions"; }; return MethodOptions; @@ -77140,36 +99728,49 @@ /** * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name + * @typedef {Object} google.protobuf.UninterpretedOption.$Properties + * @property {Array.|null} [name] UninterpretedOption name * @property {string|null} [identifier_value] UninterpretedOption identifier_value * @property {number|Long|null} [positive_int_value] UninterpretedOption positive_int_value * @property {number|Long|null} [negative_int_value] UninterpretedOption negative_int_value * @property {number|null} [double_value] UninterpretedOption double_value * @property {Uint8Array|null} [string_value] UninterpretedOption string_value * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @augments google.protobuf.UninterpretedOption.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.$Properties instead. + */ + + /** + * Shape of an UninterpretedOption. + * @typedef {google.protobuf.UninterpretedOption.$Properties} google.protobuf.UninterpretedOption.$Shape */ /** * Constructs a new UninterpretedOption. * @memberof google.protobuf * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function UninterpretedOption(properties) { + var UninterpretedOption = function (properties) { this.name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * UninterpretedOption name. - * @member {Array.} name + * @member {Array.} name * @memberof google.protobuf.UninterpretedOption * @instance */ @@ -77228,10 +99829,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.$Shape): google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape; + * (properties?: google.protobuf.UninterpretedOption.$Properties): google.protobuf.UninterpretedOption; + * }} */ - UninterpretedOption.create = function create(properties) { + UninterpretedOption.create = function(properties) { return new UninterpretedOption(properties); }; @@ -77240,28 +99845,35 @@ * @function encode * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + UninterpretedOption.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -77270,12 +99882,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + UninterpretedOption.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -77285,45 +99897,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + UninterpretedOption.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 2) + break; + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.identifier_value = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.positive_int_value = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.negative_int_value = reader.int64(); + continue; + } + case 6: { + if (wireType !== 1) + break; + message.double_value = reader.double(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.string_value = reader.bytes(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.aggregate_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -77333,11 +99980,11 @@ * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -77351,34 +99998,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + UninterpretedOption.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) { + if (!$Array.isArray(message.name)) return "name: array expected"; for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i], _depth + 1); if (error) return "name." + error; } } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) if (!$util.isString(message.identifier_value)) return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) if (typeof message.double_value !== "number") return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) if (!$util.isString(message.aggregate_value)) return "aggregate_value: string expected"; return null; @@ -77392,49 +100043,55 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - UninterpretedOption.fromObject = function fromObject(object) { + UninterpretedOption.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption(); if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; + if (!$Array.isArray(object.name)) + throw $TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = $Array(object.name.length); for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + if (!$util.isObject(object.name[i])) + throw $TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], _depth + 1); } } if (object.identifier_value != null) - message.identifier_value = String(object.identifier_value); + message.identifier_value = $String(object.identifier_value); if (object.positive_int_value != null) if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; + message.positive_int_value = $util.Long.fromValue(object.positive_int_value, true); else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); + message.positive_int_value = $parseInt(object.positive_int_value, 10); else if (typeof object.positive_int_value === "number") message.positive_int_value = object.positive_int_value; else if (typeof object.positive_int_value === "object") message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); if (object.negative_int_value != null) if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; + message.negative_int_value = $util.Long.fromValue(object.negative_int_value, false); else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); + message.negative_int_value = $parseInt(object.negative_int_value, 10); else if (typeof object.negative_int_value === "number") message.negative_int_value = object.negative_int_value; else if (typeof object.negative_int_value === "object") message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); if (object.double_value != null) - message.double_value = Number(object.double_value); + message.double_value = $Number(object.double_value); if (object.string_value != null) if (typeof object.string_value === "string") $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) + else if (object.string_value.length >= 0) message.string_value = object.string_value; if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); + message.aggregate_value = $String(object.aggregate_value); return message; }; @@ -77447,9 +100104,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.name = []; @@ -77457,46 +100118,50 @@ object.identifier_value = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.positive_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.positive_int_value = options.longs === String ? "0" : 0; + object.positive_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.negative_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.negative_int_value = options.longs === String ? "0" : 0; + object.negative_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.double_value = 0; - if (options.bytes === String) + if (options.bytes === $String) object.string_value = ""; else { object.string_value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.string_value = $util.newBuffer(object.string_value); } object.aggregate_value = ""; } if (message.name && message.name.length) { - object.name = []; + object.name = $Array(message.name.length); for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options, _depth + 1); } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.positive_int_value = typeof message.positive_int_value === "number" ? $BigInt(message.positive_int_value) : $util.Long.fromBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0, true).toBigInt(); + else if (typeof message.positive_int_value === "number") + object.positive_int_value = options.longs === $String ? $String(message.positive_int_value) : message.positive_int_value; else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; + object.positive_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === $Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.negative_int_value = typeof message.negative_int_value === "number" ? $BigInt(message.negative_int_value) : $util.Long.fromBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0, false).toBigInt(); + else if (typeof message.negative_int_value === "number") + object.negative_int_value = options.longs === $String ? $String(message.negative_int_value) : message.negative_int_value; else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + object.negative_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === $Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) + object.double_value = options.json && !$isFinite(message.double_value) ? $String(message.double_value) : message.double_value; + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) + object.string_value = options.bytes === $String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.string_value) : message.string_value; + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) object.aggregate_value = message.aggregate_value; return object; }; @@ -77508,34 +100173,61 @@ * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + UninterpretedOption.prototype.toJSON = function() { + return UninterpretedOption.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + UninterpretedOption.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption"; }; UninterpretedOption.NamePart = (function() { /** * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart + * @typedef {Object} google.protobuf.UninterpretedOption.NamePart.$Properties * @property {string} name_part NamePart name_part * @property {boolean} is_extension NamePart is_extension + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @augments google.protobuf.UninterpretedOption.NamePart.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.NamePart.$Properties instead. + */ + + /** + * Shape of a NamePart. + * @typedef {google.protobuf.UninterpretedOption.NamePart.$Properties} google.protobuf.UninterpretedOption.NamePart.$Shape */ /** * Constructs a new NamePart. * @memberof google.protobuf.UninterpretedOption * @classdesc Represents a NamePart. - * @implements INamePart * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function NamePart(properties) { + var NamePart = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * NamePart name_part. @@ -77558,10 +100250,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.NamePart.$Shape): google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape; + * (properties?: google.protobuf.UninterpretedOption.NamePart.$Properties): google.protobuf.UninterpretedOption.NamePart; + * }} */ - NamePart.create = function create(properties) { + NamePart.create = function(properties) { return new NamePart(properties); }; @@ -77570,15 +100266,22 @@ * @function encode * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + NamePart.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 2 =*/10).string(message.name_part); writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -77587,12 +100290,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + NamePart.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -77602,31 +100305,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decode = function decode(reader, length) { + NamePart.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption.NamePart(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name_part = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.is_extension = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("name_part")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "name_part")) throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) + if (!$Object.hasOwnProperty.call(message, "is_extension")) throw $util.ProtocolError("missing required 'is_extension'", { instance: message }); return message; }; @@ -77637,11 +100360,11 @@ * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decodeDelimited = function decodeDelimited(reader) { + NamePart.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -77655,9 +100378,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NamePart.verify = function verify(message) { + NamePart.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isString(message.name_part)) return "name_part: string expected"; if (typeof message.is_extension !== "boolean") @@ -77673,14 +100400,20 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart */ - NamePart.fromObject = function fromObject(object) { + NamePart.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption.NamePart(); if (object.name_part != null) - message.name_part = String(object.name_part); + message.name_part = $String(object.name_part); if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); + message.is_extension = $Boolean(object.is_extension); return message; }; @@ -77693,17 +100426,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + NamePart.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name_part = ""; object.is_extension = false; } - if (message.name_part != null && message.hasOwnProperty("name_part")) + if (message.name_part != null && $Object.hasOwnProperty.call(message, "name_part")) object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) + if (message.is_extension != null && $Object.hasOwnProperty.call(message, "is_extension")) object.is_extension = message.is_extension; return object; }; @@ -77715,8 +100452,22 @@ * @instance * @returns {Object.} JSON object */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + NamePart.prototype.toJSON = function() { + return NamePart.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + NamePart.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption.NamePart"; }; return NamePart; @@ -77727,32 +100478,45 @@ protobuf.SourceCodeInfo = (function() { + /** + * Properties of a SourceCodeInfo. + * @typedef {Object} google.protobuf.SourceCodeInfo.$Properties + * @property {Array.|null} [location] SourceCodeInfo location + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a SourceCodeInfo. * @memberof google.protobuf * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @augments google.protobuf.SourceCodeInfo.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.$Properties instead. + */ + + /** + * Shape of a SourceCodeInfo. + * @typedef {google.protobuf.SourceCodeInfo.$Properties} google.protobuf.SourceCodeInfo.$Shape */ /** * Constructs a new SourceCodeInfo. * @memberof google.protobuf * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SourceCodeInfo(properties) { + var SourceCodeInfo = function (properties) { this.location = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SourceCodeInfo location. - * @member {Array.} location + * @member {Array.} location * @memberof google.protobuf.SourceCodeInfo * @instance */ @@ -77763,10 +100527,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.$Shape): google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.$Properties): google.protobuf.SourceCodeInfo; + * }} */ - SourceCodeInfo.create = function create(properties) { + SourceCodeInfo.create = function(properties) { return new SourceCodeInfo(properties); }; @@ -77775,16 +100543,23 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + SourceCodeInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.location != null && message.location.length) for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -77793,12 +100568,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SourceCodeInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -77808,27 +100583,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + SourceCodeInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -77838,11 +100630,11 @@ * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -77856,14 +100648,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + SourceCodeInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.location != null && $Object.hasOwnProperty.call(message, "location")) { + if (!$Array.isArray(message.location)) return "location: array expected"; for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i], _depth + 1); if (error) return "location." + error; } @@ -77879,18 +100675,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - SourceCodeInfo.fromObject = function fromObject(object) { + SourceCodeInfo.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo(); if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; + if (!$Array.isArray(object.location)) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = $Array(object.location.length); for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + if (!$util.isObject(object.location[i])) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], _depth + 1); } } return message; @@ -77905,16 +100707,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.location = []; if (message.location && message.location.length) { - object.location = []; + object.location = $Array(message.location.length); for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options, _depth + 1); } return object; }; @@ -77926,36 +100732,63 @@ * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SourceCodeInfo.prototype.toJSON = function() { + return SourceCodeInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SourceCodeInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo"; }; SourceCodeInfo.Location = (function() { /** * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation + * @typedef {Object} google.protobuf.SourceCodeInfo.Location.$Properties * @property {Array.|null} [path] Location path * @property {Array.|null} [span] Location span + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @augments google.protobuf.SourceCodeInfo.Location.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.Location.$Properties instead. + */ + + /** + * Shape of a Location. + * @typedef {google.protobuf.SourceCodeInfo.Location.$Properties} google.protobuf.SourceCodeInfo.Location.$Shape */ /** * Constructs a new Location. * @memberof google.protobuf.SourceCodeInfo * @classdesc Represents a Location. - * @implements ILocation * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Location(properties) { + var Location = function (properties) { this.path = []; this.span = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Location path. @@ -77978,10 +100811,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.Location.$Shape): google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.Location.$Properties): google.protobuf.SourceCodeInfo.Location; + * }} */ - Location.create = function create(properties) { + Location.create = function(properties) { return new Location(properties); }; @@ -77990,25 +100827,24 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer) { + Location.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && message.path.length) + writer.uint32(/* id 1, wireType 2 =*/10).int32s(message.path); + if (message.span != null && message.span.length) + writer.uint32(/* id 2, wireType 2 =*/18).int32s(message.span); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -78017,12 +100853,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Location.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -78032,42 +100868,64 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decode = function decode(reader, length) { + Location.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.path && message.path.length)) + message.path = []; + reader.int32s(message.path); + continue; + } + if (wireType !== 0) + break; + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.int32()); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.span && message.span.length)) + message.span = []; + reader.int32s(message.span); + continue; + } + if (wireType !== 0) + break; + if (!(message.span && message.span.length)) + message.span = []; message.span.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -78077,11 +100935,11 @@ * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -78095,18 +100953,22 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Location.verify = function verify(message) { + Location.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) { + if (!$Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) + if (message.span != null && $Object.hasOwnProperty.call(message, "span")) { + if (!$Array.isArray(message.span)) return "span: array expected"; for (var i = 0; i < message.span.length; ++i) if (!$util.isInteger(message.span[i])) @@ -78123,21 +100985,27 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo.Location} Location */ - Location.fromObject = function fromObject(object) { + Location.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo.Location(); if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; + if (!$Array.isArray(object.path)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = $Array(object.path.length); for (var i = 0; i < object.path.length; ++i) message.path[i] = object.path[i] | 0; } if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; + if (!$Array.isArray(object.span)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = $Array(object.span.length); for (var i = 0; i < object.span.length; ++i) message.span[i] = object.span[i] | 0; } @@ -78153,21 +101021,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + Location.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.path = []; object.span = []; } if (message.path && message.path.length) { - object.path = []; + object.path = $Array(message.path.length); for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } if (message.span && message.span.length) { - object.span = []; + object.span = $Array(message.span.length); for (var j = 0; j < message.span.length; ++j) object.span[j] = message.span[j]; } @@ -78181,8 +101053,22 @@ * @instance * @returns {Object.} JSON object */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Location.prototype.toJSON = function() { + return Location.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Location.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo.Location"; }; return Location; @@ -78199,7 +101085,7 @@ /** * EGCBaseMsg enum. - * @exports EGCBaseMsg + * @name EGCBaseMsg * @enum {number} * @property {number} k_EMsgGCSystemMessage=4001 k_EMsgGCSystemMessage value * @property {number} k_EMsgGCReplicateConVars=4002 k_EMsgGCReplicateConVars value @@ -78212,7 +101098,7 @@ * @property {number} k_EMsgGCLANServerAvailable=4511 k_EMsgGCLANServerAvailable value */ $root.EGCBaseMsg = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[4001] = "k_EMsgGCSystemMessage"] = 4001; values[valuesById[4002] = "k_EMsgGCReplicateConVars"] = 4002; values[valuesById[4003] = "k_EMsgGCConVarUpdated"] = 4003; @@ -78227,13 +101113,13 @@ /** * EGCBaseProtoObjectTypes enum. - * @exports EGCBaseProtoObjectTypes + * @name EGCBaseProtoObjectTypes * @enum {number} * @property {number} k_EProtoObjectPartyInvite=1001 k_EProtoObjectPartyInvite value * @property {number} k_EProtoObjectLobbyInvite=1002 k_EProtoObjectLobbyInvite value */ $root.EGCBaseProtoObjectTypes = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1001] = "k_EProtoObjectPartyInvite"] = 1001; values[valuesById[1002] = "k_EProtoObjectLobbyInvite"] = 1002; return values; @@ -78241,13 +101127,13 @@ /** * GCGoodbyeReason enum. - * @exports GCGoodbyeReason + * @name GCGoodbyeReason * @enum {number} * @property {number} GCGoodbyeReason_GC_GOING_DOWN=1 GCGoodbyeReason_GC_GOING_DOWN value * @property {number} GCGoodbyeReason_NO_SESSION=2 GCGoodbyeReason_NO_SESSION value */ $root.GCGoodbyeReason = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "GCGoodbyeReason_GC_GOING_DOWN"] = 1; values[valuesById[2] = "GCGoodbyeReason_NO_SESSION"] = 2; return values; @@ -78257,28 +101143,41 @@ /** * Properties of a CGCStorePurchaseInit_LineItem. - * @exports ICGCStorePurchaseInit_LineItem - * @interface ICGCStorePurchaseInit_LineItem + * @typedef {Object} CGCStorePurchaseInit_LineItem.$Properties * @property {number|null} [item_def_id] CGCStorePurchaseInit_LineItem item_def_id * @property {number|null} [quantity] CGCStorePurchaseInit_LineItem quantity * @property {number|null} [cost_in_local_currency] CGCStorePurchaseInit_LineItem cost_in_local_currency * @property {number|null} [purchase_type] CGCStorePurchaseInit_LineItem purchase_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CGCStorePurchaseInit_LineItem. + * @exports ICGCStorePurchaseInit_LineItem + * @interface ICGCStorePurchaseInit_LineItem + * @augments CGCStorePurchaseInit_LineItem.$Properties + * @deprecated Use CGCStorePurchaseInit_LineItem.$Properties instead. + */ + + /** + * Shape of a CGCStorePurchaseInit_LineItem. + * @typedef {CGCStorePurchaseInit_LineItem.$Properties} CGCStorePurchaseInit_LineItem.$Shape */ /** * Constructs a new CGCStorePurchaseInit_LineItem. * @exports CGCStorePurchaseInit_LineItem * @classdesc Represents a CGCStorePurchaseInit_LineItem. - * @implements ICGCStorePurchaseInit_LineItem * @constructor - * @param {ICGCStorePurchaseInit_LineItem=} [properties] Properties to set + * @param {CGCStorePurchaseInit_LineItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CGCStorePurchaseInit_LineItem(properties) { + var CGCStorePurchaseInit_LineItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CGCStorePurchaseInit_LineItem item_def_id. @@ -78317,10 +101216,14 @@ * @function create * @memberof CGCStorePurchaseInit_LineItem * @static - * @param {ICGCStorePurchaseInit_LineItem=} [properties] Properties to set + * @param {CGCStorePurchaseInit_LineItem.$Properties=} [properties] Properties to set * @returns {CGCStorePurchaseInit_LineItem} CGCStorePurchaseInit_LineItem instance + * @type {{ + * (properties: CGCStorePurchaseInit_LineItem.$Shape): CGCStorePurchaseInit_LineItem & CGCStorePurchaseInit_LineItem.$Shape; + * (properties?: CGCStorePurchaseInit_LineItem.$Properties): CGCStorePurchaseInit_LineItem; + * }} */ - CGCStorePurchaseInit_LineItem.create = function create(properties) { + CGCStorePurchaseInit_LineItem.create = function(properties) { return new CGCStorePurchaseInit_LineItem(properties); }; @@ -78329,21 +101232,28 @@ * @function encode * @memberof CGCStorePurchaseInit_LineItem * @static - * @param {ICGCStorePurchaseInit_LineItem} message CGCStorePurchaseInit_LineItem message or plain object to encode + * @param {CGCStorePurchaseInit_LineItem.$Properties} message CGCStorePurchaseInit_LineItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCStorePurchaseInit_LineItem.encode = function encode(message, writer) { + CGCStorePurchaseInit_LineItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_def_id != null && Object.hasOwnProperty.call(message, "item_def_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.item_def_id); - if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.quantity); - if (message.cost_in_local_currency != null && Object.hasOwnProperty.call(message, "cost_in_local_currency")) + if (message.cost_in_local_currency != null && $Object.hasOwnProperty.call(message, "cost_in_local_currency")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.cost_in_local_currency); - if (message.purchase_type != null && Object.hasOwnProperty.call(message, "purchase_type")) + if (message.purchase_type != null && $Object.hasOwnProperty.call(message, "purchase_type")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.purchase_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -78352,12 +101262,12 @@ * @function encodeDelimited * @memberof CGCStorePurchaseInit_LineItem * @static - * @param {ICGCStorePurchaseInit_LineItem} message CGCStorePurchaseInit_LineItem message or plain object to encode + * @param {CGCStorePurchaseInit_LineItem.$Properties} message CGCStorePurchaseInit_LineItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CGCStorePurchaseInit_LineItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CGCStorePurchaseInit_LineItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -78367,34 +101277,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CGCStorePurchaseInit_LineItem} CGCStorePurchaseInit_LineItem + * @returns {CGCStorePurchaseInit_LineItem & CGCStorePurchaseInit_LineItem.$Shape} CGCStorePurchaseInit_LineItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCStorePurchaseInit_LineItem.decode = function decode(reader, length) { + CGCStorePurchaseInit_LineItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCStorePurchaseInit_LineItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CGCStorePurchaseInit_LineItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_def_id = reader.uint32(); - break; - case 2: - message.quantity = reader.uint32(); - break; - case 3: - message.cost_in_local_currency = reader.uint32(); - break; - case 4: - message.purchase_type = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_def_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.quantity = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.cost_in_local_currency = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.purchase_type = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -78404,11 +101340,11 @@ * @memberof CGCStorePurchaseInit_LineItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CGCStorePurchaseInit_LineItem} CGCStorePurchaseInit_LineItem + * @returns {CGCStorePurchaseInit_LineItem & CGCStorePurchaseInit_LineItem.$Shape} CGCStorePurchaseInit_LineItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CGCStorePurchaseInit_LineItem.decodeDelimited = function decodeDelimited(reader) { + CGCStorePurchaseInit_LineItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -78422,19 +101358,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CGCStorePurchaseInit_LineItem.verify = function verify(message) { + CGCStorePurchaseInit_LineItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_def_id != null && message.hasOwnProperty("item_def_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) if (!$util.isInteger(message.item_def_id)) return "item_def_id: integer expected"; - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) if (!$util.isInteger(message.quantity)) return "quantity: integer expected"; - if (message.cost_in_local_currency != null && message.hasOwnProperty("cost_in_local_currency")) + if (message.cost_in_local_currency != null && $Object.hasOwnProperty.call(message, "cost_in_local_currency")) if (!$util.isInteger(message.cost_in_local_currency)) return "cost_in_local_currency: integer expected"; - if (message.purchase_type != null && message.hasOwnProperty("purchase_type")) + if (message.purchase_type != null && $Object.hasOwnProperty.call(message, "purchase_type")) if (!$util.isInteger(message.purchase_type)) return "purchase_type: integer expected"; return null; @@ -78448,9 +101388,15 @@ * @param {Object.} object Plain object * @returns {CGCStorePurchaseInit_LineItem} CGCStorePurchaseInit_LineItem */ - CGCStorePurchaseInit_LineItem.fromObject = function fromObject(object) { + CGCStorePurchaseInit_LineItem.fromObject = function (object, _depth) { if (object instanceof $root.CGCStorePurchaseInit_LineItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CGCStorePurchaseInit_LineItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CGCStorePurchaseInit_LineItem(); if (object.item_def_id != null) message.item_def_id = object.item_def_id >>> 0; @@ -78472,9 +101418,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CGCStorePurchaseInit_LineItem.toObject = function toObject(message, options) { + CGCStorePurchaseInit_LineItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.item_def_id = 0; @@ -78482,13 +101432,13 @@ object.cost_in_local_currency = 0; object.purchase_type = 0; } - if (message.item_def_id != null && message.hasOwnProperty("item_def_id")) + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) object.item_def_id = message.item_def_id; - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) object.quantity = message.quantity; - if (message.cost_in_local_currency != null && message.hasOwnProperty("cost_in_local_currency")) + if (message.cost_in_local_currency != null && $Object.hasOwnProperty.call(message, "cost_in_local_currency")) object.cost_in_local_currency = message.cost_in_local_currency; - if (message.purchase_type != null && message.hasOwnProperty("purchase_type")) + if (message.purchase_type != null && $Object.hasOwnProperty.call(message, "purchase_type")) object.purchase_type = message.purchase_type; return object; }; @@ -78500,8 +101450,22 @@ * @instance * @returns {Object.} JSON object */ - CGCStorePurchaseInit_LineItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CGCStorePurchaseInit_LineItem.prototype.toJSON = function() { + return CGCStorePurchaseInit_LineItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CGCStorePurchaseInit_LineItem + * @function getTypeUrl + * @memberof CGCStorePurchaseInit_LineItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CGCStorePurchaseInit_LineItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CGCStorePurchaseInit_LineItem"; }; return CGCStorePurchaseInit_LineItem; @@ -78511,29 +101475,42 @@ /** * Properties of a CMsgGCStorePurchaseInit. - * @exports ICMsgGCStorePurchaseInit - * @interface ICMsgGCStorePurchaseInit + * @typedef {Object} CMsgGCStorePurchaseInit.$Properties * @property {string|null} [country] CMsgGCStorePurchaseInit country * @property {number|null} [language] CMsgGCStorePurchaseInit language * @property {number|null} [currency] CMsgGCStorePurchaseInit currency - * @property {Array.|null} [line_items] CMsgGCStorePurchaseInit line_items + * @property {Array.|null} [line_items] CMsgGCStorePurchaseInit line_items + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCStorePurchaseInit. + * @exports ICMsgGCStorePurchaseInit + * @interface ICMsgGCStorePurchaseInit + * @augments CMsgGCStorePurchaseInit.$Properties + * @deprecated Use CMsgGCStorePurchaseInit.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseInit. + * @typedef {CMsgGCStorePurchaseInit.$Properties} CMsgGCStorePurchaseInit.$Shape */ /** * Constructs a new CMsgGCStorePurchaseInit. * @exports CMsgGCStorePurchaseInit * @classdesc Represents a CMsgGCStorePurchaseInit. - * @implements ICMsgGCStorePurchaseInit * @constructor - * @param {ICMsgGCStorePurchaseInit=} [properties] Properties to set + * @param {CMsgGCStorePurchaseInit.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseInit(properties) { + var CMsgGCStorePurchaseInit = function (properties) { this.line_items = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseInit country. @@ -78561,7 +101538,7 @@ /** * CMsgGCStorePurchaseInit line_items. - * @member {Array.} line_items + * @member {Array.} line_items * @memberof CMsgGCStorePurchaseInit * @instance */ @@ -78572,10 +101549,14 @@ * @function create * @memberof CMsgGCStorePurchaseInit * @static - * @param {ICMsgGCStorePurchaseInit=} [properties] Properties to set + * @param {CMsgGCStorePurchaseInit.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseInit} CMsgGCStorePurchaseInit instance + * @type {{ + * (properties: CMsgGCStorePurchaseInit.$Shape): CMsgGCStorePurchaseInit & CMsgGCStorePurchaseInit.$Shape; + * (properties?: CMsgGCStorePurchaseInit.$Properties): CMsgGCStorePurchaseInit; + * }} */ - CMsgGCStorePurchaseInit.create = function create(properties) { + CMsgGCStorePurchaseInit.create = function(properties) { return new CMsgGCStorePurchaseInit(properties); }; @@ -78584,22 +101565,29 @@ * @function encode * @memberof CMsgGCStorePurchaseInit * @static - * @param {ICMsgGCStorePurchaseInit} message CMsgGCStorePurchaseInit message or plain object to encode + * @param {CMsgGCStorePurchaseInit.$Properties} message CMsgGCStorePurchaseInit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseInit.encode = function encode(message, writer) { + CMsgGCStorePurchaseInit.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.country != null && Object.hasOwnProperty.call(message, "country")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.country); - if (message.language != null && Object.hasOwnProperty.call(message, "language")) + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.language); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.currency); if (message.line_items != null && message.line_items.length) for (var i = 0; i < message.line_items.length; ++i) - $root.CGCStorePurchaseInit_LineItem.encode(message.line_items[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CGCStorePurchaseInit_LineItem.encode(message.line_items[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -78608,12 +101596,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseInit * @static - * @param {ICMsgGCStorePurchaseInit} message CMsgGCStorePurchaseInit message or plain object to encode + * @param {CMsgGCStorePurchaseInit.$Properties} message CMsgGCStorePurchaseInit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseInit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseInit.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -78623,36 +101611,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseInit} CMsgGCStorePurchaseInit + * @returns {CMsgGCStorePurchaseInit & CMsgGCStorePurchaseInit.$Shape} CMsgGCStorePurchaseInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseInit.decode = function decode(reader, length) { + CMsgGCStorePurchaseInit.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseInit(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseInit(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.country = reader.string(); - break; - case 2: - message.language = reader.int32(); - break; - case 3: - message.currency = reader.int32(); - break; - case 4: - if (!(message.line_items && message.line_items.length)) - message.line_items = []; - message.line_items.push($root.CGCStorePurchaseInit_LineItem.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.country = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.language = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.currency = reader.int32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.line_items && message.line_items.length)) + message.line_items = []; + message.line_items.push($root.CGCStorePurchaseInit_LineItem.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -78662,11 +101676,11 @@ * @memberof CMsgGCStorePurchaseInit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseInit} CMsgGCStorePurchaseInit + * @returns {CMsgGCStorePurchaseInit & CMsgGCStorePurchaseInit.$Shape} CMsgGCStorePurchaseInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseInit.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseInit.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -78680,23 +101694,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseInit.verify = function verify(message) { + CMsgGCStorePurchaseInit.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.country != null && message.hasOwnProperty("country")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) if (!$util.isString(message.country)) return "country: string expected"; - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) if (!$util.isInteger(message.language)) return "language: integer expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) if (!$util.isInteger(message.currency)) return "currency: integer expected"; - if (message.line_items != null && message.hasOwnProperty("line_items")) { - if (!Array.isArray(message.line_items)) + if (message.line_items != null && $Object.hasOwnProperty.call(message, "line_items")) { + if (!$Array.isArray(message.line_items)) return "line_items: array expected"; for (var i = 0; i < message.line_items.length; ++i) { - var error = $root.CGCStorePurchaseInit_LineItem.verify(message.line_items[i]); + var error = $root.CGCStorePurchaseInit_LineItem.verify(message.line_items[i], _depth + 1); if (error) return "line_items." + error; } @@ -78712,24 +101730,30 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseInit} CMsgGCStorePurchaseInit */ - CMsgGCStorePurchaseInit.fromObject = function fromObject(object) { + CMsgGCStorePurchaseInit.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseInit) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseInit: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseInit(); if (object.country != null) - message.country = String(object.country); + message.country = $String(object.country); if (object.language != null) message.language = object.language | 0; if (object.currency != null) message.currency = object.currency | 0; if (object.line_items) { - if (!Array.isArray(object.line_items)) - throw TypeError(".CMsgGCStorePurchaseInit.line_items: array expected"); - message.line_items = []; + if (!$Array.isArray(object.line_items)) + throw $TypeError(".CMsgGCStorePurchaseInit.line_items: array expected"); + message.line_items = $Array(object.line_items.length); for (var i = 0; i < object.line_items.length; ++i) { - if (typeof object.line_items[i] !== "object") - throw TypeError(".CMsgGCStorePurchaseInit.line_items: object expected"); - message.line_items[i] = $root.CGCStorePurchaseInit_LineItem.fromObject(object.line_items[i]); + if (!$util.isObject(object.line_items[i])) + throw $TypeError(".CMsgGCStorePurchaseInit.line_items: object expected"); + message.line_items[i] = $root.CGCStorePurchaseInit_LineItem.fromObject(object.line_items[i], _depth + 1); } } return message; @@ -78744,9 +101768,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseInit.toObject = function toObject(message, options) { + CMsgGCStorePurchaseInit.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.line_items = []; @@ -78755,16 +101783,16 @@ object.language = 0; object.currency = 0; } - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) object.country = message.country; - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) object.language = message.language; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) object.currency = message.currency; if (message.line_items && message.line_items.length) { - object.line_items = []; + object.line_items = $Array(message.line_items.length); for (var j = 0; j < message.line_items.length; ++j) - object.line_items[j] = $root.CGCStorePurchaseInit_LineItem.toObject(message.line_items[j], options); + object.line_items[j] = $root.CGCStorePurchaseInit_LineItem.toObject(message.line_items[j], options, _depth + 1); } return object; }; @@ -78776,8 +101804,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseInit.prototype.toJSON = function() { + return CMsgGCStorePurchaseInit.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseInit + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseInit + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseInit.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseInit"; }; return CMsgGCStorePurchaseInit; @@ -78787,26 +101829,39 @@ /** * Properties of a CMsgGCStorePurchaseInitResponse. - * @exports ICMsgGCStorePurchaseInitResponse - * @interface ICMsgGCStorePurchaseInitResponse + * @typedef {Object} CMsgGCStorePurchaseInitResponse.$Properties * @property {number|null} [result] CMsgGCStorePurchaseInitResponse result * @property {number|Long|null} [txn_id] CMsgGCStorePurchaseInitResponse txn_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCStorePurchaseInitResponse. + * @exports ICMsgGCStorePurchaseInitResponse + * @interface ICMsgGCStorePurchaseInitResponse + * @augments CMsgGCStorePurchaseInitResponse.$Properties + * @deprecated Use CMsgGCStorePurchaseInitResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseInitResponse. + * @typedef {CMsgGCStorePurchaseInitResponse.$Properties} CMsgGCStorePurchaseInitResponse.$Shape */ /** * Constructs a new CMsgGCStorePurchaseInitResponse. * @exports CMsgGCStorePurchaseInitResponse * @classdesc Represents a CMsgGCStorePurchaseInitResponse. - * @implements ICMsgGCStorePurchaseInitResponse * @constructor - * @param {ICMsgGCStorePurchaseInitResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseInitResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseInitResponse(properties) { + var CMsgGCStorePurchaseInitResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseInitResponse result. @@ -78829,10 +101884,14 @@ * @function create * @memberof CMsgGCStorePurchaseInitResponse * @static - * @param {ICMsgGCStorePurchaseInitResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseInitResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseInitResponse} CMsgGCStorePurchaseInitResponse instance + * @type {{ + * (properties: CMsgGCStorePurchaseInitResponse.$Shape): CMsgGCStorePurchaseInitResponse & CMsgGCStorePurchaseInitResponse.$Shape; + * (properties?: CMsgGCStorePurchaseInitResponse.$Properties): CMsgGCStorePurchaseInitResponse; + * }} */ - CMsgGCStorePurchaseInitResponse.create = function create(properties) { + CMsgGCStorePurchaseInitResponse.create = function(properties) { return new CMsgGCStorePurchaseInitResponse(properties); }; @@ -78841,17 +101900,24 @@ * @function encode * @memberof CMsgGCStorePurchaseInitResponse * @static - * @param {ICMsgGCStorePurchaseInitResponse} message CMsgGCStorePurchaseInitResponse message or plain object to encode + * @param {CMsgGCStorePurchaseInitResponse.$Properties} message CMsgGCStorePurchaseInitResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseInitResponse.encode = function encode(message, writer) { + CMsgGCStorePurchaseInitResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.txn_id != null && Object.hasOwnProperty.call(message, "txn_id")) + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.txn_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -78860,12 +101926,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseInitResponse * @static - * @param {ICMsgGCStorePurchaseInitResponse} message CMsgGCStorePurchaseInitResponse message or plain object to encode + * @param {CMsgGCStorePurchaseInitResponse.$Properties} message CMsgGCStorePurchaseInitResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseInitResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseInitResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -78875,28 +101941,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseInitResponse} CMsgGCStorePurchaseInitResponse + * @returns {CMsgGCStorePurchaseInitResponse & CMsgGCStorePurchaseInitResponse.$Shape} CMsgGCStorePurchaseInitResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseInitResponse.decode = function decode(reader, length) { + CMsgGCStorePurchaseInitResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseInitResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseInitResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - case 2: - message.txn_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.result = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.txn_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -78906,11 +101992,11 @@ * @memberof CMsgGCStorePurchaseInitResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseInitResponse} CMsgGCStorePurchaseInitResponse + * @returns {CMsgGCStorePurchaseInitResponse & CMsgGCStorePurchaseInitResponse.$Shape} CMsgGCStorePurchaseInitResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseInitResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseInitResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -78924,13 +102010,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseInitResponse.verify = function verify(message) { + CMsgGCStorePurchaseInitResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) if (!$util.isInteger(message.txn_id) && !(message.txn_id && $util.isInteger(message.txn_id.low) && $util.isInteger(message.txn_id.high))) return "txn_id: integer|Long expected"; return null; @@ -78944,17 +102034,23 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseInitResponse} CMsgGCStorePurchaseInitResponse */ - CMsgGCStorePurchaseInitResponse.fromObject = function fromObject(object) { + CMsgGCStorePurchaseInitResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseInitResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseInitResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseInitResponse(); if (object.result != null) message.result = object.result | 0; if (object.txn_id != null) if ($util.Long) - (message.txn_id = $util.Long.fromValue(object.txn_id)).unsigned = true; + message.txn_id = $util.Long.fromValue(object.txn_id, true); else if (typeof object.txn_id === "string") - message.txn_id = parseInt(object.txn_id, 10); + message.txn_id = $parseInt(object.txn_id, 10); else if (typeof object.txn_id === "number") message.txn_id = object.txn_id; else if (typeof object.txn_id === "object") @@ -78971,25 +102067,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseInitResponse.toObject = function toObject(message, options) { + CMsgGCStorePurchaseInitResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.result = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.txn_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.txn_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.txn_id = options.longs === String ? "0" : 0; + object.txn_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) - if (typeof message.txn_id === "number") - object.txn_id = options.longs === String ? String(message.txn_id) : message.txn_id; + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.txn_id = typeof message.txn_id === "number" ? $BigInt(message.txn_id) : $util.Long.fromBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0, true).toBigInt(); + else if (typeof message.txn_id === "number") + object.txn_id = options.longs === $String ? $String(message.txn_id) : message.txn_id; else - object.txn_id = options.longs === String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; + object.txn_id = options.longs === $String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === $Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; return object; }; @@ -79000,8 +102102,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseInitResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseInitResponse.prototype.toJSON = function() { + return CMsgGCStorePurchaseInitResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseInitResponse + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseInitResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseInitResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseInitResponse"; }; return CMsgGCStorePurchaseInitResponse; @@ -79009,27 +102125,40 @@ $root.CMsgSystemBroadcast = (function() { + /** + * Properties of a CMsgSystemBroadcast. + * @typedef {Object} CMsgSystemBroadcast.$Properties + * @property {string|null} [message] CMsgSystemBroadcast message + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSystemBroadcast. * @exports ICMsgSystemBroadcast * @interface ICMsgSystemBroadcast - * @property {string|null} [message] CMsgSystemBroadcast message + * @augments CMsgSystemBroadcast.$Properties + * @deprecated Use CMsgSystemBroadcast.$Properties instead. + */ + + /** + * Shape of a CMsgSystemBroadcast. + * @typedef {CMsgSystemBroadcast.$Properties} CMsgSystemBroadcast.$Shape */ /** * Constructs a new CMsgSystemBroadcast. * @exports CMsgSystemBroadcast * @classdesc Represents a CMsgSystemBroadcast. - * @implements ICMsgSystemBroadcast * @constructor - * @param {ICMsgSystemBroadcast=} [properties] Properties to set + * @param {CMsgSystemBroadcast.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSystemBroadcast(properties) { + var CMsgSystemBroadcast = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSystemBroadcast message. @@ -79044,10 +102173,14 @@ * @function create * @memberof CMsgSystemBroadcast * @static - * @param {ICMsgSystemBroadcast=} [properties] Properties to set + * @param {CMsgSystemBroadcast.$Properties=} [properties] Properties to set * @returns {CMsgSystemBroadcast} CMsgSystemBroadcast instance + * @type {{ + * (properties: CMsgSystemBroadcast.$Shape): CMsgSystemBroadcast & CMsgSystemBroadcast.$Shape; + * (properties?: CMsgSystemBroadcast.$Properties): CMsgSystemBroadcast; + * }} */ - CMsgSystemBroadcast.create = function create(properties) { + CMsgSystemBroadcast.create = function(properties) { return new CMsgSystemBroadcast(properties); }; @@ -79056,15 +102189,22 @@ * @function encode * @memberof CMsgSystemBroadcast * @static - * @param {ICMsgSystemBroadcast} message CMsgSystemBroadcast message or plain object to encode + * @param {CMsgSystemBroadcast.$Properties} message CMsgSystemBroadcast message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSystemBroadcast.encode = function encode(message, writer) { + CMsgSystemBroadcast.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -79073,12 +102213,12 @@ * @function encodeDelimited * @memberof CMsgSystemBroadcast * @static - * @param {ICMsgSystemBroadcast} message CMsgSystemBroadcast message or plain object to encode + * @param {CMsgSystemBroadcast.$Properties} message CMsgSystemBroadcast message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSystemBroadcast.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSystemBroadcast.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -79088,25 +102228,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSystemBroadcast} CMsgSystemBroadcast + * @returns {CMsgSystemBroadcast & CMsgSystemBroadcast.$Shape} CMsgSystemBroadcast * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSystemBroadcast.decode = function decode(reader, length) { + CMsgSystemBroadcast.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSystemBroadcast(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSystemBroadcast(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.message = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -79116,11 +102273,11 @@ * @memberof CMsgSystemBroadcast * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSystemBroadcast} CMsgSystemBroadcast + * @returns {CMsgSystemBroadcast & CMsgSystemBroadcast.$Shape} CMsgSystemBroadcast * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSystemBroadcast.decodeDelimited = function decodeDelimited(reader) { + CMsgSystemBroadcast.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -79134,10 +102291,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSystemBroadcast.verify = function verify(message) { + CMsgSystemBroadcast.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; return null; @@ -79151,12 +102312,18 @@ * @param {Object.} object Plain object * @returns {CMsgSystemBroadcast} CMsgSystemBroadcast */ - CMsgSystemBroadcast.fromObject = function fromObject(object) { + CMsgSystemBroadcast.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSystemBroadcast) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSystemBroadcast: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSystemBroadcast(); if (object.message != null) - message.message = String(object.message); + message.message = $String(object.message); return message; }; @@ -79169,13 +102336,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSystemBroadcast.toObject = function toObject(message, options) { + CMsgSystemBroadcast.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.message = ""; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) object.message = message.message; return object; }; @@ -79187,8 +102358,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSystemBroadcast.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSystemBroadcast.prototype.toJSON = function() { + return CMsgSystemBroadcast.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSystemBroadcast + * @function getTypeUrl + * @memberof CMsgSystemBroadcast + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSystemBroadcast.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSystemBroadcast"; }; return CMsgSystemBroadcast; @@ -79196,27 +102381,40 @@ $root.CMsgClientHello = (function() { + /** + * Properties of a CMsgClientHello. + * @typedef {Object} CMsgClientHello.$Properties + * @property {number|null} [version] CMsgClientHello version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgClientHello. * @exports ICMsgClientHello * @interface ICMsgClientHello - * @property {number|null} [version] CMsgClientHello version + * @augments CMsgClientHello.$Properties + * @deprecated Use CMsgClientHello.$Properties instead. + */ + + /** + * Shape of a CMsgClientHello. + * @typedef {CMsgClientHello.$Properties} CMsgClientHello.$Shape */ /** * Constructs a new CMsgClientHello. * @exports CMsgClientHello * @classdesc Represents a CMsgClientHello. - * @implements ICMsgClientHello * @constructor - * @param {ICMsgClientHello=} [properties] Properties to set + * @param {CMsgClientHello.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgClientHello(properties) { + var CMsgClientHello = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgClientHello version. @@ -79231,10 +102429,14 @@ * @function create * @memberof CMsgClientHello * @static - * @param {ICMsgClientHello=} [properties] Properties to set + * @param {CMsgClientHello.$Properties=} [properties] Properties to set * @returns {CMsgClientHello} CMsgClientHello instance + * @type {{ + * (properties: CMsgClientHello.$Shape): CMsgClientHello & CMsgClientHello.$Shape; + * (properties?: CMsgClientHello.$Properties): CMsgClientHello; + * }} */ - CMsgClientHello.create = function create(properties) { + CMsgClientHello.create = function(properties) { return new CMsgClientHello(properties); }; @@ -79243,15 +102445,22 @@ * @function encode * @memberof CMsgClientHello * @static - * @param {ICMsgClientHello} message CMsgClientHello message or plain object to encode + * @param {CMsgClientHello.$Properties} message CMsgClientHello message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientHello.encode = function encode(message, writer) { + CMsgClientHello.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -79260,12 +102469,12 @@ * @function encodeDelimited * @memberof CMsgClientHello * @static - * @param {ICMsgClientHello} message CMsgClientHello message or plain object to encode + * @param {CMsgClientHello.$Properties} message CMsgClientHello message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientHello.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgClientHello.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -79275,25 +102484,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgClientHello} CMsgClientHello + * @returns {CMsgClientHello & CMsgClientHello.$Shape} CMsgClientHello * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientHello.decode = function decode(reader, length) { + CMsgClientHello.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgClientHello(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgClientHello(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -79303,11 +102529,11 @@ * @memberof CMsgClientHello * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgClientHello} CMsgClientHello + * @returns {CMsgClientHello & CMsgClientHello.$Shape} CMsgClientHello * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientHello.decodeDelimited = function decodeDelimited(reader) { + CMsgClientHello.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -79321,10 +102547,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgClientHello.verify = function verify(message) { + CMsgClientHello.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; return null; @@ -79338,9 +102568,15 @@ * @param {Object.} object Plain object * @returns {CMsgClientHello} CMsgClientHello */ - CMsgClientHello.fromObject = function fromObject(object) { + CMsgClientHello.fromObject = function (object, _depth) { if (object instanceof $root.CMsgClientHello) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgClientHello: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgClientHello(); if (object.version != null) message.version = object.version >>> 0; @@ -79356,13 +102592,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgClientHello.toObject = function toObject(message, options) { + CMsgClientHello.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.version = 0; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; return object; }; @@ -79374,8 +102614,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgClientHello.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgClientHello.prototype.toJSON = function() { + return CMsgClientHello.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgClientHello + * @function getTypeUrl + * @memberof CMsgClientHello + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgClientHello.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgClientHello"; }; return CMsgClientHello; @@ -79383,27 +102637,40 @@ $root.CMsgServerHello = (function() { + /** + * Properties of a CMsgServerHello. + * @typedef {Object} CMsgServerHello.$Properties + * @property {number|null} [version] CMsgServerHello version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgServerHello. * @exports ICMsgServerHello * @interface ICMsgServerHello - * @property {number|null} [version] CMsgServerHello version + * @augments CMsgServerHello.$Properties + * @deprecated Use CMsgServerHello.$Properties instead. + */ + + /** + * Shape of a CMsgServerHello. + * @typedef {CMsgServerHello.$Properties} CMsgServerHello.$Shape */ /** * Constructs a new CMsgServerHello. * @exports CMsgServerHello * @classdesc Represents a CMsgServerHello. - * @implements ICMsgServerHello * @constructor - * @param {ICMsgServerHello=} [properties] Properties to set + * @param {CMsgServerHello.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgServerHello(properties) { + var CMsgServerHello = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgServerHello version. @@ -79418,10 +102685,14 @@ * @function create * @memberof CMsgServerHello * @static - * @param {ICMsgServerHello=} [properties] Properties to set + * @param {CMsgServerHello.$Properties=} [properties] Properties to set * @returns {CMsgServerHello} CMsgServerHello instance + * @type {{ + * (properties: CMsgServerHello.$Shape): CMsgServerHello & CMsgServerHello.$Shape; + * (properties?: CMsgServerHello.$Properties): CMsgServerHello; + * }} */ - CMsgServerHello.create = function create(properties) { + CMsgServerHello.create = function(properties) { return new CMsgServerHello(properties); }; @@ -79430,15 +102701,22 @@ * @function encode * @memberof CMsgServerHello * @static - * @param {ICMsgServerHello} message CMsgServerHello message or plain object to encode + * @param {CMsgServerHello.$Properties} message CMsgServerHello message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerHello.encode = function encode(message, writer) { + CMsgServerHello.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -79447,12 +102725,12 @@ * @function encodeDelimited * @memberof CMsgServerHello * @static - * @param {ICMsgServerHello} message CMsgServerHello message or plain object to encode + * @param {CMsgServerHello.$Properties} message CMsgServerHello message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerHello.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgServerHello.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -79462,25 +102740,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgServerHello} CMsgServerHello + * @returns {CMsgServerHello & CMsgServerHello.$Shape} CMsgServerHello * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerHello.decode = function decode(reader, length) { + CMsgServerHello.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgServerHello(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgServerHello(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -79490,11 +102785,11 @@ * @memberof CMsgServerHello * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgServerHello} CMsgServerHello + * @returns {CMsgServerHello & CMsgServerHello.$Shape} CMsgServerHello * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerHello.decodeDelimited = function decodeDelimited(reader) { + CMsgServerHello.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -79508,10 +102803,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgServerHello.verify = function verify(message) { + CMsgServerHello.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; return null; @@ -79525,9 +102824,15 @@ * @param {Object.} object Plain object * @returns {CMsgServerHello} CMsgServerHello */ - CMsgServerHello.fromObject = function fromObject(object) { + CMsgServerHello.fromObject = function (object, _depth) { if (object instanceof $root.CMsgServerHello) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgServerHello: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgServerHello(); if (object.version != null) message.version = object.version >>> 0; @@ -79543,13 +102848,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgServerHello.toObject = function toObject(message, options) { + CMsgServerHello.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.version = 0; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; return object; }; @@ -79561,8 +102870,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgServerHello.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgServerHello.prototype.toJSON = function() { + return CMsgServerHello.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgServerHello + * @function getTypeUrl + * @memberof CMsgServerHello + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgServerHello.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgServerHello"; }; return CMsgServerHello; @@ -79572,27 +102895,40 @@ /** * Properties of a CMsgClientWelcome. - * @exports ICMsgClientWelcome - * @interface ICMsgClientWelcome + * @typedef {Object} CMsgClientWelcome.$Properties * @property {number|null} [version] CMsgClientWelcome version * @property {Uint8Array|null} [game_data] CMsgClientWelcome game_data * @property {string|null} [txn_country_code] CMsgClientWelcome txn_country_code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgClientWelcome. + * @exports ICMsgClientWelcome + * @interface ICMsgClientWelcome + * @augments CMsgClientWelcome.$Properties + * @deprecated Use CMsgClientWelcome.$Properties instead. + */ + + /** + * Shape of a CMsgClientWelcome. + * @typedef {CMsgClientWelcome.$Properties} CMsgClientWelcome.$Shape */ /** * Constructs a new CMsgClientWelcome. * @exports CMsgClientWelcome * @classdesc Represents a CMsgClientWelcome. - * @implements ICMsgClientWelcome * @constructor - * @param {ICMsgClientWelcome=} [properties] Properties to set + * @param {CMsgClientWelcome.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgClientWelcome(properties) { + var CMsgClientWelcome = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgClientWelcome version. @@ -79623,10 +102959,14 @@ * @function create * @memberof CMsgClientWelcome * @static - * @param {ICMsgClientWelcome=} [properties] Properties to set + * @param {CMsgClientWelcome.$Properties=} [properties] Properties to set * @returns {CMsgClientWelcome} CMsgClientWelcome instance + * @type {{ + * (properties: CMsgClientWelcome.$Shape): CMsgClientWelcome & CMsgClientWelcome.$Shape; + * (properties?: CMsgClientWelcome.$Properties): CMsgClientWelcome; + * }} */ - CMsgClientWelcome.create = function create(properties) { + CMsgClientWelcome.create = function(properties) { return new CMsgClientWelcome(properties); }; @@ -79635,19 +102975,26 @@ * @function encode * @memberof CMsgClientWelcome * @static - * @param {ICMsgClientWelcome} message CMsgClientWelcome message or plain object to encode + * @param {CMsgClientWelcome.$Properties} message CMsgClientWelcome message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientWelcome.encode = function encode(message, writer) { + CMsgClientWelcome.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version); - if (message.game_data != null && Object.hasOwnProperty.call(message, "game_data")) + if (message.game_data != null && $Object.hasOwnProperty.call(message, "game_data")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.game_data); - if (message.txn_country_code != null && Object.hasOwnProperty.call(message, "txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.txn_country_code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -79656,12 +103003,12 @@ * @function encodeDelimited * @memberof CMsgClientWelcome * @static - * @param {ICMsgClientWelcome} message CMsgClientWelcome message or plain object to encode + * @param {CMsgClientWelcome.$Properties} message CMsgClientWelcome message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientWelcome.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgClientWelcome.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -79671,31 +103018,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgClientWelcome} CMsgClientWelcome + * @returns {CMsgClientWelcome & CMsgClientWelcome.$Shape} CMsgClientWelcome * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientWelcome.decode = function decode(reader, length) { + CMsgClientWelcome.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgClientWelcome(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgClientWelcome(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.uint32(); - break; - case 2: - message.game_data = reader.bytes(); - break; - case 3: - message.txn_country_code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.version = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.game_data = reader.bytes(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.txn_country_code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -79705,11 +103075,11 @@ * @memberof CMsgClientWelcome * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgClientWelcome} CMsgClientWelcome + * @returns {CMsgClientWelcome & CMsgClientWelcome.$Shape} CMsgClientWelcome * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientWelcome.decodeDelimited = function decodeDelimited(reader) { + CMsgClientWelcome.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -79723,16 +103093,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgClientWelcome.verify = function verify(message) { + CMsgClientWelcome.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.game_data != null && message.hasOwnProperty("game_data")) + if (message.game_data != null && $Object.hasOwnProperty.call(message, "game_data")) if (!(message.game_data && typeof message.game_data.length === "number" || $util.isString(message.game_data))) return "game_data: buffer expected"; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) if (!$util.isString(message.txn_country_code)) return "txn_country_code: string expected"; return null; @@ -79746,19 +103120,25 @@ * @param {Object.} object Plain object * @returns {CMsgClientWelcome} CMsgClientWelcome */ - CMsgClientWelcome.fromObject = function fromObject(object) { + CMsgClientWelcome.fromObject = function (object, _depth) { if (object instanceof $root.CMsgClientWelcome) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgClientWelcome: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgClientWelcome(); if (object.version != null) message.version = object.version >>> 0; if (object.game_data != null) if (typeof object.game_data === "string") $util.base64.decode(object.game_data, message.game_data = $util.newBuffer($util.base64.length(object.game_data)), 0); - else if (object.game_data.length) + else if (object.game_data.length >= 0) message.game_data = object.game_data; if (object.txn_country_code != null) - message.txn_country_code = String(object.txn_country_code); + message.txn_country_code = $String(object.txn_country_code); return message; }; @@ -79771,26 +103151,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgClientWelcome.toObject = function toObject(message, options) { + CMsgClientWelcome.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.version = 0; - if (options.bytes === String) + if (options.bytes === $String) object.game_data = ""; else { object.game_data = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.game_data = $util.newBuffer(object.game_data); } object.txn_country_code = ""; } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && $Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.game_data != null && message.hasOwnProperty("game_data")) - object.game_data = options.bytes === String ? $util.base64.encode(message.game_data, 0, message.game_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.game_data) : message.game_data; - if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code")) + if (message.game_data != null && $Object.hasOwnProperty.call(message, "game_data")) + object.game_data = options.bytes === $String ? $util.base64.encode(message.game_data, 0, message.game_data.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.game_data) : message.game_data; + if (message.txn_country_code != null && $Object.hasOwnProperty.call(message, "txn_country_code")) object.txn_country_code = message.txn_country_code; return object; }; @@ -79802,8 +103186,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgClientWelcome.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgClientWelcome.prototype.toJSON = function() { + return CMsgClientWelcome.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgClientWelcome + * @function getTypeUrl + * @memberof CMsgClientWelcome + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgClientWelcome.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgClientWelcome"; }; return CMsgClientWelcome; @@ -79813,26 +103211,39 @@ /** * Properties of a CMsgServerWelcome. - * @exports ICMsgServerWelcome - * @interface ICMsgServerWelcome + * @typedef {Object} CMsgServerWelcome.$Properties * @property {number|null} [min_allowed_version] CMsgServerWelcome min_allowed_version * @property {number|null} [active_version] CMsgServerWelcome active_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgServerWelcome. + * @exports ICMsgServerWelcome + * @interface ICMsgServerWelcome + * @augments CMsgServerWelcome.$Properties + * @deprecated Use CMsgServerWelcome.$Properties instead. + */ + + /** + * Shape of a CMsgServerWelcome. + * @typedef {CMsgServerWelcome.$Properties} CMsgServerWelcome.$Shape */ /** * Constructs a new CMsgServerWelcome. * @exports CMsgServerWelcome * @classdesc Represents a CMsgServerWelcome. - * @implements ICMsgServerWelcome * @constructor - * @param {ICMsgServerWelcome=} [properties] Properties to set + * @param {CMsgServerWelcome.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgServerWelcome(properties) { + var CMsgServerWelcome = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgServerWelcome min_allowed_version. @@ -79855,10 +103266,14 @@ * @function create * @memberof CMsgServerWelcome * @static - * @param {ICMsgServerWelcome=} [properties] Properties to set + * @param {CMsgServerWelcome.$Properties=} [properties] Properties to set * @returns {CMsgServerWelcome} CMsgServerWelcome instance + * @type {{ + * (properties: CMsgServerWelcome.$Shape): CMsgServerWelcome & CMsgServerWelcome.$Shape; + * (properties?: CMsgServerWelcome.$Properties): CMsgServerWelcome; + * }} */ - CMsgServerWelcome.create = function create(properties) { + CMsgServerWelcome.create = function(properties) { return new CMsgServerWelcome(properties); }; @@ -79867,17 +103282,24 @@ * @function encode * @memberof CMsgServerWelcome * @static - * @param {ICMsgServerWelcome} message CMsgServerWelcome message or plain object to encode + * @param {CMsgServerWelcome.$Properties} message CMsgServerWelcome message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerWelcome.encode = function encode(message, writer) { + CMsgServerWelcome.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.min_allowed_version != null && Object.hasOwnProperty.call(message, "min_allowed_version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.min_allowed_version != null && $Object.hasOwnProperty.call(message, "min_allowed_version")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.min_allowed_version); - if (message.active_version != null && Object.hasOwnProperty.call(message, "active_version")) + if (message.active_version != null && $Object.hasOwnProperty.call(message, "active_version")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.active_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -79886,12 +103308,12 @@ * @function encodeDelimited * @memberof CMsgServerWelcome * @static - * @param {ICMsgServerWelcome} message CMsgServerWelcome message or plain object to encode + * @param {CMsgServerWelcome.$Properties} message CMsgServerWelcome message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerWelcome.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgServerWelcome.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -79901,28 +103323,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgServerWelcome} CMsgServerWelcome + * @returns {CMsgServerWelcome & CMsgServerWelcome.$Shape} CMsgServerWelcome * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerWelcome.decode = function decode(reader, length) { + CMsgServerWelcome.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgServerWelcome(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgServerWelcome(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.min_allowed_version = reader.uint32(); - break; - case 2: - message.active_version = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.min_allowed_version = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.active_version = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -79932,11 +103374,11 @@ * @memberof CMsgServerWelcome * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgServerWelcome} CMsgServerWelcome + * @returns {CMsgServerWelcome & CMsgServerWelcome.$Shape} CMsgServerWelcome * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerWelcome.decodeDelimited = function decodeDelimited(reader) { + CMsgServerWelcome.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -79950,13 +103392,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgServerWelcome.verify = function verify(message) { + CMsgServerWelcome.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.min_allowed_version != null && message.hasOwnProperty("min_allowed_version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.min_allowed_version != null && $Object.hasOwnProperty.call(message, "min_allowed_version")) if (!$util.isInteger(message.min_allowed_version)) return "min_allowed_version: integer expected"; - if (message.active_version != null && message.hasOwnProperty("active_version")) + if (message.active_version != null && $Object.hasOwnProperty.call(message, "active_version")) if (!$util.isInteger(message.active_version)) return "active_version: integer expected"; return null; @@ -79970,9 +103416,15 @@ * @param {Object.} object Plain object * @returns {CMsgServerWelcome} CMsgServerWelcome */ - CMsgServerWelcome.fromObject = function fromObject(object) { + CMsgServerWelcome.fromObject = function (object, _depth) { if (object instanceof $root.CMsgServerWelcome) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgServerWelcome: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgServerWelcome(); if (object.min_allowed_version != null) message.min_allowed_version = object.min_allowed_version >>> 0; @@ -79990,17 +103442,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgServerWelcome.toObject = function toObject(message, options) { + CMsgServerWelcome.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.min_allowed_version = 0; object.active_version = 0; } - if (message.min_allowed_version != null && message.hasOwnProperty("min_allowed_version")) + if (message.min_allowed_version != null && $Object.hasOwnProperty.call(message, "min_allowed_version")) object.min_allowed_version = message.min_allowed_version; - if (message.active_version != null && message.hasOwnProperty("active_version")) + if (message.active_version != null && $Object.hasOwnProperty.call(message, "active_version")) object.active_version = message.active_version; return object; }; @@ -80012,8 +103468,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgServerWelcome.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgServerWelcome.prototype.toJSON = function() { + return CMsgServerWelcome.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgServerWelcome + * @function getTypeUrl + * @memberof CMsgServerWelcome + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgServerWelcome.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgServerWelcome"; }; return CMsgServerWelcome; @@ -80021,27 +103491,40 @@ $root.CMsgClientGoodbye = (function() { + /** + * Properties of a CMsgClientGoodbye. + * @typedef {Object} CMsgClientGoodbye.$Properties + * @property {GCGoodbyeReason|null} [reason] CMsgClientGoodbye reason + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgClientGoodbye. * @exports ICMsgClientGoodbye * @interface ICMsgClientGoodbye - * @property {GCGoodbyeReason|null} [reason] CMsgClientGoodbye reason + * @augments CMsgClientGoodbye.$Properties + * @deprecated Use CMsgClientGoodbye.$Properties instead. + */ + + /** + * Shape of a CMsgClientGoodbye. + * @typedef {CMsgClientGoodbye.$Properties} CMsgClientGoodbye.$Shape */ /** * Constructs a new CMsgClientGoodbye. * @exports CMsgClientGoodbye * @classdesc Represents a CMsgClientGoodbye. - * @implements ICMsgClientGoodbye * @constructor - * @param {ICMsgClientGoodbye=} [properties] Properties to set + * @param {CMsgClientGoodbye.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgClientGoodbye(properties) { + var CMsgClientGoodbye = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgClientGoodbye reason. @@ -80056,10 +103539,14 @@ * @function create * @memberof CMsgClientGoodbye * @static - * @param {ICMsgClientGoodbye=} [properties] Properties to set + * @param {CMsgClientGoodbye.$Properties=} [properties] Properties to set * @returns {CMsgClientGoodbye} CMsgClientGoodbye instance + * @type {{ + * (properties: CMsgClientGoodbye.$Shape): CMsgClientGoodbye & CMsgClientGoodbye.$Shape; + * (properties?: CMsgClientGoodbye.$Properties): CMsgClientGoodbye; + * }} */ - CMsgClientGoodbye.create = function create(properties) { + CMsgClientGoodbye.create = function(properties) { return new CMsgClientGoodbye(properties); }; @@ -80068,15 +103555,22 @@ * @function encode * @memberof CMsgClientGoodbye * @static - * @param {ICMsgClientGoodbye} message CMsgClientGoodbye message or plain object to encode + * @param {CMsgClientGoodbye.$Properties} message CMsgClientGoodbye message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientGoodbye.encode = function encode(message, writer) { + CMsgClientGoodbye.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.reason); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -80085,12 +103579,12 @@ * @function encodeDelimited * @memberof CMsgClientGoodbye * @static - * @param {ICMsgClientGoodbye} message CMsgClientGoodbye message or plain object to encode + * @param {CMsgClientGoodbye.$Properties} message CMsgClientGoodbye message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgClientGoodbye.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgClientGoodbye.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -80100,25 +103594,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgClientGoodbye} CMsgClientGoodbye + * @returns {CMsgClientGoodbye & CMsgClientGoodbye.$Shape} CMsgClientGoodbye * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientGoodbye.decode = function decode(reader, length) { + CMsgClientGoodbye.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgClientGoodbye(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgClientGoodbye(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reason = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.GCGoodbyeReason[value] !== $undefined) + message.reason = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -80128,11 +103645,11 @@ * @memberof CMsgClientGoodbye * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgClientGoodbye} CMsgClientGoodbye + * @returns {CMsgClientGoodbye & CMsgClientGoodbye.$Shape} CMsgClientGoodbye * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgClientGoodbye.decodeDelimited = function decodeDelimited(reader) { + CMsgClientGoodbye.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -80146,10 +103663,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgClientGoodbye.verify = function verify(message) { + CMsgClientGoodbye.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reason != null && message.hasOwnProperty("reason")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) switch (message.reason) { default: return "reason: enum value expected"; @@ -80168,9 +103689,15 @@ * @param {Object.} object Plain object * @returns {CMsgClientGoodbye} CMsgClientGoodbye */ - CMsgClientGoodbye.fromObject = function fromObject(object) { + CMsgClientGoodbye.fromObject = function (object, _depth) { if (object instanceof $root.CMsgClientGoodbye) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgClientGoodbye: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgClientGoodbye(); switch (object.reason) { case "GCGoodbyeReason_GC_GOING_DOWN": @@ -80181,6 +103708,7 @@ case 2: message.reason = 2; break; + default: } return message; }; @@ -80194,14 +103722,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgClientGoodbye.toObject = function toObject(message, options) { + CMsgClientGoodbye.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) - object.reason = options.enums === String ? "GCGoodbyeReason_GC_GOING_DOWN" : 1; - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = options.enums === String ? $root.GCGoodbyeReason[message.reason] : message.reason; + object.reason = options.enums === $String ? "GCGoodbyeReason_GC_GOING_DOWN" : 1; + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) + object.reason = options.enums === $String ? $root.GCGoodbyeReason[message.reason] === $undefined ? message.reason : $root.GCGoodbyeReason[message.reason] : message.reason; return object; }; @@ -80212,8 +103744,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgClientGoodbye.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgClientGoodbye.prototype.toJSON = function() { + return CMsgClientGoodbye.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgClientGoodbye + * @function getTypeUrl + * @memberof CMsgClientGoodbye + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgClientGoodbye.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgClientGoodbye"; }; return CMsgClientGoodbye; @@ -80221,27 +103767,40 @@ $root.CMsgServerGoodbye = (function() { + /** + * Properties of a CMsgServerGoodbye. + * @typedef {Object} CMsgServerGoodbye.$Properties + * @property {GCGoodbyeReason|null} [reason] CMsgServerGoodbye reason + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgServerGoodbye. * @exports ICMsgServerGoodbye * @interface ICMsgServerGoodbye - * @property {GCGoodbyeReason|null} [reason] CMsgServerGoodbye reason + * @augments CMsgServerGoodbye.$Properties + * @deprecated Use CMsgServerGoodbye.$Properties instead. + */ + + /** + * Shape of a CMsgServerGoodbye. + * @typedef {CMsgServerGoodbye.$Properties} CMsgServerGoodbye.$Shape */ /** * Constructs a new CMsgServerGoodbye. * @exports CMsgServerGoodbye * @classdesc Represents a CMsgServerGoodbye. - * @implements ICMsgServerGoodbye * @constructor - * @param {ICMsgServerGoodbye=} [properties] Properties to set + * @param {CMsgServerGoodbye.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgServerGoodbye(properties) { + var CMsgServerGoodbye = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgServerGoodbye reason. @@ -80256,10 +103815,14 @@ * @function create * @memberof CMsgServerGoodbye * @static - * @param {ICMsgServerGoodbye=} [properties] Properties to set + * @param {CMsgServerGoodbye.$Properties=} [properties] Properties to set * @returns {CMsgServerGoodbye} CMsgServerGoodbye instance + * @type {{ + * (properties: CMsgServerGoodbye.$Shape): CMsgServerGoodbye & CMsgServerGoodbye.$Shape; + * (properties?: CMsgServerGoodbye.$Properties): CMsgServerGoodbye; + * }} */ - CMsgServerGoodbye.create = function create(properties) { + CMsgServerGoodbye.create = function(properties) { return new CMsgServerGoodbye(properties); }; @@ -80268,15 +103831,22 @@ * @function encode * @memberof CMsgServerGoodbye * @static - * @param {ICMsgServerGoodbye} message CMsgServerGoodbye message or plain object to encode + * @param {CMsgServerGoodbye.$Properties} message CMsgServerGoodbye message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerGoodbye.encode = function encode(message, writer) { + CMsgServerGoodbye.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.reason); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -80285,12 +103855,12 @@ * @function encodeDelimited * @memberof CMsgServerGoodbye * @static - * @param {ICMsgServerGoodbye} message CMsgServerGoodbye message or plain object to encode + * @param {CMsgServerGoodbye.$Properties} message CMsgServerGoodbye message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerGoodbye.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgServerGoodbye.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -80300,25 +103870,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgServerGoodbye} CMsgServerGoodbye + * @returns {CMsgServerGoodbye & CMsgServerGoodbye.$Shape} CMsgServerGoodbye * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerGoodbye.decode = function decode(reader, length) { + CMsgServerGoodbye.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgServerGoodbye(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgServerGoodbye(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reason = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.GCGoodbyeReason[value] !== $undefined) + message.reason = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -80328,11 +103921,11 @@ * @memberof CMsgServerGoodbye * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgServerGoodbye} CMsgServerGoodbye + * @returns {CMsgServerGoodbye & CMsgServerGoodbye.$Shape} CMsgServerGoodbye * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerGoodbye.decodeDelimited = function decodeDelimited(reader) { + CMsgServerGoodbye.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -80346,10 +103939,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgServerGoodbye.verify = function verify(message) { + CMsgServerGoodbye.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reason != null && message.hasOwnProperty("reason")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) switch (message.reason) { default: return "reason: enum value expected"; @@ -80368,9 +103965,15 @@ * @param {Object.} object Plain object * @returns {CMsgServerGoodbye} CMsgServerGoodbye */ - CMsgServerGoodbye.fromObject = function fromObject(object) { + CMsgServerGoodbye.fromObject = function (object, _depth) { if (object instanceof $root.CMsgServerGoodbye) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgServerGoodbye: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgServerGoodbye(); switch (object.reason) { case "GCGoodbyeReason_GC_GOING_DOWN": @@ -80381,6 +103984,7 @@ case 2: message.reason = 2; break; + default: } return message; }; @@ -80394,14 +103998,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgServerGoodbye.toObject = function toObject(message, options) { + CMsgServerGoodbye.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) - object.reason = options.enums === String ? "GCGoodbyeReason_GC_GOING_DOWN" : 1; - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = options.enums === String ? $root.GCGoodbyeReason[message.reason] : message.reason; + object.reason = options.enums === $String ? "GCGoodbyeReason_GC_GOING_DOWN" : 1; + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) + object.reason = options.enums === $String ? $root.GCGoodbyeReason[message.reason] === $undefined ? message.reason : $root.GCGoodbyeReason[message.reason] : message.reason; return object; }; @@ -80412,8 +104020,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgServerGoodbye.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgServerGoodbye.prototype.toJSON = function() { + return CMsgServerGoodbye.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgServerGoodbye + * @function getTypeUrl + * @memberof CMsgServerGoodbye + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgServerGoodbye.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgServerGoodbye"; }; return CMsgServerGoodbye; @@ -80421,36 +104043,53 @@ $root.CMsgServerAvailable = (function() { + /** + * Properties of a CMsgServerAvailable. + * @typedef {Object} CMsgServerAvailable.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgServerAvailable. * @exports ICMsgServerAvailable * @interface ICMsgServerAvailable + * @augments CMsgServerAvailable.$Properties + * @deprecated Use CMsgServerAvailable.$Properties instead. + */ + + /** + * Shape of a CMsgServerAvailable. + * @typedef {CMsgServerAvailable.$Properties} CMsgServerAvailable.$Shape */ /** * Constructs a new CMsgServerAvailable. * @exports CMsgServerAvailable * @classdesc Represents a CMsgServerAvailable. - * @implements ICMsgServerAvailable * @constructor - * @param {ICMsgServerAvailable=} [properties] Properties to set + * @param {CMsgServerAvailable.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgServerAvailable(properties) { + var CMsgServerAvailable = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgServerAvailable instance using the specified properties. * @function create * @memberof CMsgServerAvailable * @static - * @param {ICMsgServerAvailable=} [properties] Properties to set + * @param {CMsgServerAvailable.$Properties=} [properties] Properties to set * @returns {CMsgServerAvailable} CMsgServerAvailable instance + * @type {{ + * (properties: CMsgServerAvailable.$Shape): CMsgServerAvailable & CMsgServerAvailable.$Shape; + * (properties?: CMsgServerAvailable.$Properties): CMsgServerAvailable; + * }} */ - CMsgServerAvailable.create = function create(properties) { + CMsgServerAvailable.create = function(properties) { return new CMsgServerAvailable(properties); }; @@ -80459,13 +104098,20 @@ * @function encode * @memberof CMsgServerAvailable * @static - * @param {ICMsgServerAvailable} message CMsgServerAvailable message or plain object to encode + * @param {CMsgServerAvailable.$Properties} message CMsgServerAvailable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerAvailable.encode = function encode(message, writer) { + CMsgServerAvailable.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -80474,12 +104120,12 @@ * @function encodeDelimited * @memberof CMsgServerAvailable * @static - * @param {ICMsgServerAvailable} message CMsgServerAvailable message or plain object to encode + * @param {CMsgServerAvailable.$Properties} message CMsgServerAvailable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgServerAvailable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgServerAvailable.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -80489,22 +104135,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgServerAvailable} CMsgServerAvailable + * @returns {CMsgServerAvailable & CMsgServerAvailable.$Shape} CMsgServerAvailable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerAvailable.decode = function decode(reader, length) { + CMsgServerAvailable.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgServerAvailable(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgServerAvailable(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -80514,11 +104171,11 @@ * @memberof CMsgServerAvailable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgServerAvailable} CMsgServerAvailable + * @returns {CMsgServerAvailable & CMsgServerAvailable.$Shape} CMsgServerAvailable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgServerAvailable.decodeDelimited = function decodeDelimited(reader) { + CMsgServerAvailable.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -80532,9 +104189,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgServerAvailable.verify = function verify(message) { + CMsgServerAvailable.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -80546,9 +104207,15 @@ * @param {Object.} object Plain object * @returns {CMsgServerAvailable} CMsgServerAvailable */ - CMsgServerAvailable.fromObject = function fromObject(object) { + CMsgServerAvailable.fromObject = function (object, _depth) { if (object instanceof $root.CMsgServerAvailable) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgServerAvailable: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgServerAvailable(); }; @@ -80561,7 +104228,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgServerAvailable.toObject = function toObject() { + CMsgServerAvailable.toObject = function () { return {}; }; @@ -80572,8 +104239,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgServerAvailable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgServerAvailable.prototype.toJSON = function() { + return CMsgServerAvailable.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgServerAvailable + * @function getTypeUrl + * @memberof CMsgServerAvailable + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgServerAvailable.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgServerAvailable"; }; return CMsgServerAvailable; @@ -80581,27 +104262,40 @@ $root.CMsgLANServerAvailable = (function() { + /** + * Properties of a CMsgLANServerAvailable. + * @typedef {Object} CMsgLANServerAvailable.$Properties + * @property {number|Long|null} [lobby_id] CMsgLANServerAvailable lobby_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgLANServerAvailable. * @exports ICMsgLANServerAvailable * @interface ICMsgLANServerAvailable - * @property {number|Long|null} [lobby_id] CMsgLANServerAvailable lobby_id + * @augments CMsgLANServerAvailable.$Properties + * @deprecated Use CMsgLANServerAvailable.$Properties instead. + */ + + /** + * Shape of a CMsgLANServerAvailable. + * @typedef {CMsgLANServerAvailable.$Properties} CMsgLANServerAvailable.$Shape */ /** * Constructs a new CMsgLANServerAvailable. * @exports CMsgLANServerAvailable * @classdesc Represents a CMsgLANServerAvailable. - * @implements ICMsgLANServerAvailable * @constructor - * @param {ICMsgLANServerAvailable=} [properties] Properties to set + * @param {CMsgLANServerAvailable.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgLANServerAvailable(properties) { + var CMsgLANServerAvailable = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgLANServerAvailable lobby_id. @@ -80609,17 +104303,21 @@ * @memberof CMsgLANServerAvailable * @instance */ - CMsgLANServerAvailable.prototype.lobby_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgLANServerAvailable.prototype.lobby_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgLANServerAvailable instance using the specified properties. * @function create * @memberof CMsgLANServerAvailable * @static - * @param {ICMsgLANServerAvailable=} [properties] Properties to set + * @param {CMsgLANServerAvailable.$Properties=} [properties] Properties to set * @returns {CMsgLANServerAvailable} CMsgLANServerAvailable instance + * @type {{ + * (properties: CMsgLANServerAvailable.$Shape): CMsgLANServerAvailable & CMsgLANServerAvailable.$Shape; + * (properties?: CMsgLANServerAvailable.$Properties): CMsgLANServerAvailable; + * }} */ - CMsgLANServerAvailable.create = function create(properties) { + CMsgLANServerAvailable.create = function(properties) { return new CMsgLANServerAvailable(properties); }; @@ -80628,15 +104326,22 @@ * @function encode * @memberof CMsgLANServerAvailable * @static - * @param {ICMsgLANServerAvailable} message CMsgLANServerAvailable message or plain object to encode + * @param {CMsgLANServerAvailable.$Properties} message CMsgLANServerAvailable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgLANServerAvailable.encode = function encode(message, writer) { + CMsgLANServerAvailable.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.lobby_id != null && Object.hasOwnProperty.call(message, "lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.lobby_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -80645,12 +104350,12 @@ * @function encodeDelimited * @memberof CMsgLANServerAvailable * @static - * @param {ICMsgLANServerAvailable} message CMsgLANServerAvailable message or plain object to encode + * @param {CMsgLANServerAvailable.$Properties} message CMsgLANServerAvailable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgLANServerAvailable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgLANServerAvailable.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -80660,25 +104365,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgLANServerAvailable} CMsgLANServerAvailable + * @returns {CMsgLANServerAvailable & CMsgLANServerAvailable.$Shape} CMsgLANServerAvailable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgLANServerAvailable.decode = function decode(reader, length) { + CMsgLANServerAvailable.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgLANServerAvailable(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgLANServerAvailable(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lobby_id = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.lobby_id = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -80688,11 +104410,11 @@ * @memberof CMsgLANServerAvailable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgLANServerAvailable} CMsgLANServerAvailable + * @returns {CMsgLANServerAvailable & CMsgLANServerAvailable.$Shape} CMsgLANServerAvailable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgLANServerAvailable.decodeDelimited = function decodeDelimited(reader) { + CMsgLANServerAvailable.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -80706,10 +104428,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgLANServerAvailable.verify = function verify(message) { + CMsgLANServerAvailable.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) if (!$util.isInteger(message.lobby_id) && !(message.lobby_id && $util.isInteger(message.lobby_id.low) && $util.isInteger(message.lobby_id.high))) return "lobby_id: integer|Long expected"; return null; @@ -80723,19 +104449,25 @@ * @param {Object.} object Plain object * @returns {CMsgLANServerAvailable} CMsgLANServerAvailable */ - CMsgLANServerAvailable.fromObject = function fromObject(object) { + CMsgLANServerAvailable.fromObject = function (object, _depth) { if (object instanceof $root.CMsgLANServerAvailable) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgLANServerAvailable: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgLANServerAvailable(); if (object.lobby_id != null) if ($util.Long) - (message.lobby_id = $util.Long.fromValue(object.lobby_id)).unsigned = false; + message.lobby_id = $util.Long.fromValue(object.lobby_id, true); else if (typeof object.lobby_id === "string") - message.lobby_id = parseInt(object.lobby_id, 10); + message.lobby_id = $parseInt(object.lobby_id, 10); else if (typeof object.lobby_id === "number") message.lobby_id = object.lobby_id; else if (typeof object.lobby_id === "object") - message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(); + message.lobby_id = new $util.LongBits(object.lobby_id.low >>> 0, object.lobby_id.high >>> 0).toNumber(true); return message; }; @@ -80748,21 +104480,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgLANServerAvailable.toObject = function toObject(message, options) { + CMsgLANServerAvailable.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lobby_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.lobby_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.lobby_id = options.longs === String ? "0" : 0; - if (message.lobby_id != null && message.hasOwnProperty("lobby_id")) - if (typeof message.lobby_id === "number") - object.lobby_id = options.longs === String ? String(message.lobby_id) : message.lobby_id; + object.lobby_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.lobby_id != null && $Object.hasOwnProperty.call(message, "lobby_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.lobby_id = typeof message.lobby_id === "number" ? $BigInt(message.lobby_id) : $util.Long.fromBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0, true).toBigInt(); + else if (typeof message.lobby_id === "number") + object.lobby_id = options.longs === $String ? $String(message.lobby_id) : message.lobby_id; else - object.lobby_id = options.longs === String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber() : message.lobby_id; + object.lobby_id = options.longs === $String ? $util.Long.prototype.toString.call(message.lobby_id) : options.longs === $Number ? new $util.LongBits(message.lobby_id.low >>> 0, message.lobby_id.high >>> 0).toNumber(true) : message.lobby_id; return object; }; @@ -80773,8 +104511,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgLANServerAvailable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgLANServerAvailable.prototype.toJSON = function() { + return CMsgLANServerAvailable.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgLANServerAvailable + * @function getTypeUrl + * @memberof CMsgLANServerAvailable + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgLANServerAvailable.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgLANServerAvailable"; }; return CMsgLANServerAvailable; @@ -80784,8 +104536,7 @@ /** * Properties of a CSOEconGameAccountClient. - * @exports ICSOEconGameAccountClient - * @interface ICSOEconGameAccountClient + * @typedef {Object} CSOEconGameAccountClient.$Properties * @property {number|null} [additional_backpack_slots] CSOEconGameAccountClient additional_backpack_slots * @property {boolean|null} [trial_account] CSOEconGameAccountClient trial_account * @property {boolean|null} [need_to_choose_most_helpful_friend] CSOEconGameAccountClient need_to_choose_most_helpful_friend @@ -80810,22 +104561,36 @@ * @property {number|null} [quest_reward_credits] CSOEconGameAccountClient quest_reward_credits * @property {number|null} [matchmaking_last_casual_excessive_reports_auto_ban_time] CSOEconGameAccountClient matchmaking_last_casual_excessive_reports_auto_ban_time * @property {number|null} [matchmaking_last_comp_excessive_reports_auto_ban_time] CSOEconGameAccountClient matchmaking_last_comp_excessive_reports_auto_ban_time + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconGameAccountClient. + * @exports ICSOEconGameAccountClient + * @interface ICSOEconGameAccountClient + * @augments CSOEconGameAccountClient.$Properties + * @deprecated Use CSOEconGameAccountClient.$Properties instead. + */ + + /** + * Shape of a CSOEconGameAccountClient. + * @typedef {CSOEconGameAccountClient.$Properties} CSOEconGameAccountClient.$Shape */ /** * Constructs a new CSOEconGameAccountClient. * @exports CSOEconGameAccountClient * @classdesc Represents a CSOEconGameAccountClient. - * @implements ICSOEconGameAccountClient * @constructor - * @param {ICSOEconGameAccountClient=} [properties] Properties to set + * @param {CSOEconGameAccountClient.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconGameAccountClient(properties) { + var CSOEconGameAccountClient = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconGameAccountClient additional_backpack_slots. @@ -81024,10 +104789,14 @@ * @function create * @memberof CSOEconGameAccountClient * @static - * @param {ICSOEconGameAccountClient=} [properties] Properties to set + * @param {CSOEconGameAccountClient.$Properties=} [properties] Properties to set * @returns {CSOEconGameAccountClient} CSOEconGameAccountClient instance + * @type {{ + * (properties: CSOEconGameAccountClient.$Shape): CSOEconGameAccountClient & CSOEconGameAccountClient.$Shape; + * (properties?: CSOEconGameAccountClient.$Properties): CSOEconGameAccountClient; + * }} */ - CSOEconGameAccountClient.create = function create(properties) { + CSOEconGameAccountClient.create = function(properties) { return new CSOEconGameAccountClient(properties); }; @@ -81036,61 +104805,68 @@ * @function encode * @memberof CSOEconGameAccountClient * @static - * @param {ICSOEconGameAccountClient} message CSOEconGameAccountClient message or plain object to encode + * @param {CSOEconGameAccountClient.$Properties} message CSOEconGameAccountClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconGameAccountClient.encode = function encode(message, writer) { + CSOEconGameAccountClient.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.additional_backpack_slots != null && Object.hasOwnProperty.call(message, "additional_backpack_slots")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.additional_backpack_slots != null && $Object.hasOwnProperty.call(message, "additional_backpack_slots")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.additional_backpack_slots); - if (message.trial_account != null && Object.hasOwnProperty.call(message, "trial_account")) + if (message.trial_account != null && $Object.hasOwnProperty.call(message, "trial_account")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.trial_account); - if (message.need_to_choose_most_helpful_friend != null && Object.hasOwnProperty.call(message, "need_to_choose_most_helpful_friend")) + if (message.need_to_choose_most_helpful_friend != null && $Object.hasOwnProperty.call(message, "need_to_choose_most_helpful_friend")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.need_to_choose_most_helpful_friend); - if (message.in_coaches_list != null && Object.hasOwnProperty.call(message, "in_coaches_list")) + if (message.in_coaches_list != null && $Object.hasOwnProperty.call(message, "in_coaches_list")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.in_coaches_list); - if (message.trade_ban_expiration != null && Object.hasOwnProperty.call(message, "trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) writer.uint32(/* id 6, wireType 5 =*/53).fixed32(message.trade_ban_expiration); - if (message.duel_ban_expiration != null && Object.hasOwnProperty.call(message, "duel_ban_expiration")) + if (message.duel_ban_expiration != null && $Object.hasOwnProperty.call(message, "duel_ban_expiration")) writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.duel_ban_expiration); - if (message.preview_item_def != null && Object.hasOwnProperty.call(message, "preview_item_def")) + if (message.preview_item_def != null && $Object.hasOwnProperty.call(message, "preview_item_def")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.preview_item_def); - if (message.matchmaking_ranked_ban_expiration != null && Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_expiration")) + if (message.matchmaking_ranked_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_expiration")) writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.matchmaking_ranked_ban_expiration); - if (message.phone_verified != null && Object.hasOwnProperty.call(message, "phone_verified")) + if (message.phone_verified != null && $Object.hasOwnProperty.call(message, "phone_verified")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.phone_verified); - if (message.skill_rating_6v6 != null && Object.hasOwnProperty.call(message, "skill_rating_6v6")) + if (message.skill_rating_6v6 != null && $Object.hasOwnProperty.call(message, "skill_rating_6v6")) writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.skill_rating_6v6); - if (message.skill_rating_9v9 != null && Object.hasOwnProperty.call(message, "skill_rating_9v9")) + if (message.skill_rating_9v9 != null && $Object.hasOwnProperty.call(message, "skill_rating_9v9")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.skill_rating_9v9); - if (message.competitive_access != null && Object.hasOwnProperty.call(message, "competitive_access")) + if (message.competitive_access != null && $Object.hasOwnProperty.call(message, "competitive_access")) writer.uint32(/* id 23, wireType 0 =*/184).bool(message.competitive_access); - if (message.matchmaking_ranked_low_priority_expiration != null && Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_expiration")) + if (message.matchmaking_ranked_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_expiration")) writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.matchmaking_ranked_low_priority_expiration); - if (message.matchmaking_ranked_ban_last_duration != null && Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_last_duration")) + if (message.matchmaking_ranked_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_last_duration")) writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.matchmaking_ranked_ban_last_duration); - if (message.matchmaking_ranked_low_priority_last_duration != null && Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_last_duration")) + if (message.matchmaking_ranked_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_last_duration")) writer.uint32(/* id 26, wireType 0 =*/208).uint32(message.matchmaking_ranked_low_priority_last_duration); - if (message.matchmaking_casual_ban_expiration != null && Object.hasOwnProperty.call(message, "matchmaking_casual_ban_expiration")) + if (message.matchmaking_casual_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_expiration")) writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.matchmaking_casual_ban_expiration); - if (message.matchmaking_casual_low_priority_expiration != null && Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_expiration")) + if (message.matchmaking_casual_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_expiration")) writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.matchmaking_casual_low_priority_expiration); - if (message.matchmaking_casual_ban_last_duration != null && Object.hasOwnProperty.call(message, "matchmaking_casual_ban_last_duration")) + if (message.matchmaking_casual_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_last_duration")) writer.uint32(/* id 29, wireType 0 =*/232).uint32(message.matchmaking_casual_ban_last_duration); - if (message.matchmaking_casual_low_priority_last_duration != null && Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_last_duration")) + if (message.matchmaking_casual_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_last_duration")) writer.uint32(/* id 30, wireType 0 =*/240).uint32(message.matchmaking_casual_low_priority_last_duration); - if (message.phone_identifying != null && Object.hasOwnProperty.call(message, "phone_identifying")) + if (message.phone_identifying != null && $Object.hasOwnProperty.call(message, "phone_identifying")) writer.uint32(/* id 31, wireType 0 =*/248).bool(message.phone_identifying); - if (message.disable_party_quest_progress != null && Object.hasOwnProperty.call(message, "disable_party_quest_progress")) + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) writer.uint32(/* id 32, wireType 0 =*/256).bool(message.disable_party_quest_progress); - if (message.quest_reward_credits != null && Object.hasOwnProperty.call(message, "quest_reward_credits")) + if (message.quest_reward_credits != null && $Object.hasOwnProperty.call(message, "quest_reward_credits")) writer.uint32(/* id 33, wireType 0 =*/264).uint32(message.quest_reward_credits); - if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && Object.hasOwnProperty.call(message, "matchmaking_last_casual_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_casual_excessive_reports_auto_ban_time")) writer.uint32(/* id 34, wireType 0 =*/272).uint32(message.matchmaking_last_casual_excessive_reports_auto_ban_time); - if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && Object.hasOwnProperty.call(message, "matchmaking_last_comp_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_comp_excessive_reports_auto_ban_time")) writer.uint32(/* id 35, wireType 0 =*/280).uint32(message.matchmaking_last_comp_excessive_reports_auto_ban_time); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -81099,12 +104875,12 @@ * @function encodeDelimited * @memberof CSOEconGameAccountClient * @static - * @param {ICSOEconGameAccountClient} message CSOEconGameAccountClient message or plain object to encode + * @param {CSOEconGameAccountClient.$Properties} message CSOEconGameAccountClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconGameAccountClient.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconGameAccountClient.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -81114,94 +104890,180 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconGameAccountClient} CSOEconGameAccountClient + * @returns {CSOEconGameAccountClient & CSOEconGameAccountClient.$Shape} CSOEconGameAccountClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconGameAccountClient.decode = function decode(reader, length) { + CSOEconGameAccountClient.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconGameAccountClient(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconGameAccountClient(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.additional_backpack_slots = reader.uint32(); - break; - case 2: - message.trial_account = reader.bool(); - break; - case 4: - message.need_to_choose_most_helpful_friend = reader.bool(); - break; - case 5: - message.in_coaches_list = reader.bool(); - break; - case 6: - message.trade_ban_expiration = reader.fixed32(); - break; - case 7: - message.duel_ban_expiration = reader.fixed32(); - break; - case 8: - message.preview_item_def = reader.uint32(); - break; - case 19: - message.phone_verified = reader.bool(); - break; - case 20: - message.skill_rating_6v6 = reader.uint32(); - break; - case 21: - message.skill_rating_9v9 = reader.uint32(); - break; - case 23: - message.competitive_access = reader.bool(); - break; - case 18: - message.matchmaking_ranked_ban_expiration = reader.uint32(); - break; - case 24: - message.matchmaking_ranked_low_priority_expiration = reader.uint32(); - break; - case 25: - message.matchmaking_ranked_ban_last_duration = reader.uint32(); - break; - case 26: - message.matchmaking_ranked_low_priority_last_duration = reader.uint32(); - break; - case 27: - message.matchmaking_casual_ban_expiration = reader.uint32(); - break; - case 28: - message.matchmaking_casual_low_priority_expiration = reader.uint32(); - break; - case 29: - message.matchmaking_casual_ban_last_duration = reader.uint32(); - break; - case 30: - message.matchmaking_casual_low_priority_last_duration = reader.uint32(); - break; - case 31: - message.phone_identifying = reader.bool(); - break; - case 32: - message.disable_party_quest_progress = reader.bool(); - break; - case 33: - message.quest_reward_credits = reader.uint32(); - break; - case 34: - message.matchmaking_last_casual_excessive_reports_auto_ban_time = reader.uint32(); - break; - case 35: - message.matchmaking_last_comp_excessive_reports_auto_ban_time = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.additional_backpack_slots = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.trial_account = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.need_to_choose_most_helpful_friend = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.in_coaches_list = reader.bool(); + continue; + } + case 6: { + if (wireType !== 5) + break; + message.trade_ban_expiration = reader.fixed32(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.duel_ban_expiration = reader.fixed32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.preview_item_def = reader.uint32(); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.phone_verified = reader.bool(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.skill_rating_6v6 = reader.uint32(); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.skill_rating_9v9 = reader.uint32(); + continue; + } + case 23: { + if (wireType !== 0) + break; + message.competitive_access = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.matchmaking_ranked_ban_expiration = reader.uint32(); + continue; + } + case 24: { + if (wireType !== 0) + break; + message.matchmaking_ranked_low_priority_expiration = reader.uint32(); + continue; + } + case 25: { + if (wireType !== 0) + break; + message.matchmaking_ranked_ban_last_duration = reader.uint32(); + continue; + } + case 26: { + if (wireType !== 0) + break; + message.matchmaking_ranked_low_priority_last_duration = reader.uint32(); + continue; + } + case 27: { + if (wireType !== 0) + break; + message.matchmaking_casual_ban_expiration = reader.uint32(); + continue; + } + case 28: { + if (wireType !== 0) + break; + message.matchmaking_casual_low_priority_expiration = reader.uint32(); + continue; + } + case 29: { + if (wireType !== 0) + break; + message.matchmaking_casual_ban_last_duration = reader.uint32(); + continue; + } + case 30: { + if (wireType !== 0) + break; + message.matchmaking_casual_low_priority_last_duration = reader.uint32(); + continue; + } + case 31: { + if (wireType !== 0) + break; + message.phone_identifying = reader.bool(); + continue; + } + case 32: { + if (wireType !== 0) + break; + message.disable_party_quest_progress = reader.bool(); + continue; + } + case 33: { + if (wireType !== 0) + break; + message.quest_reward_credits = reader.uint32(); + continue; + } + case 34: { + if (wireType !== 0) + break; + message.matchmaking_last_casual_excessive_reports_auto_ban_time = reader.uint32(); + continue; + } + case 35: { + if (wireType !== 0) + break; + message.matchmaking_last_comp_excessive_reports_auto_ban_time = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -81211,11 +105073,11 @@ * @memberof CSOEconGameAccountClient * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconGameAccountClient} CSOEconGameAccountClient + * @returns {CSOEconGameAccountClient & CSOEconGameAccountClient.$Shape} CSOEconGameAccountClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconGameAccountClient.decodeDelimited = function decodeDelimited(reader) { + CSOEconGameAccountClient.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -81229,79 +105091,83 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconGameAccountClient.verify = function verify(message) { + CSOEconGameAccountClient.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.additional_backpack_slots != null && message.hasOwnProperty("additional_backpack_slots")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.additional_backpack_slots != null && $Object.hasOwnProperty.call(message, "additional_backpack_slots")) if (!$util.isInteger(message.additional_backpack_slots)) return "additional_backpack_slots: integer expected"; - if (message.trial_account != null && message.hasOwnProperty("trial_account")) + if (message.trial_account != null && $Object.hasOwnProperty.call(message, "trial_account")) if (typeof message.trial_account !== "boolean") return "trial_account: boolean expected"; - if (message.need_to_choose_most_helpful_friend != null && message.hasOwnProperty("need_to_choose_most_helpful_friend")) + if (message.need_to_choose_most_helpful_friend != null && $Object.hasOwnProperty.call(message, "need_to_choose_most_helpful_friend")) if (typeof message.need_to_choose_most_helpful_friend !== "boolean") return "need_to_choose_most_helpful_friend: boolean expected"; - if (message.in_coaches_list != null && message.hasOwnProperty("in_coaches_list")) + if (message.in_coaches_list != null && $Object.hasOwnProperty.call(message, "in_coaches_list")) if (typeof message.in_coaches_list !== "boolean") return "in_coaches_list: boolean expected"; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) if (!$util.isInteger(message.trade_ban_expiration)) return "trade_ban_expiration: integer expected"; - if (message.duel_ban_expiration != null && message.hasOwnProperty("duel_ban_expiration")) + if (message.duel_ban_expiration != null && $Object.hasOwnProperty.call(message, "duel_ban_expiration")) if (!$util.isInteger(message.duel_ban_expiration)) return "duel_ban_expiration: integer expected"; - if (message.preview_item_def != null && message.hasOwnProperty("preview_item_def")) + if (message.preview_item_def != null && $Object.hasOwnProperty.call(message, "preview_item_def")) if (!$util.isInteger(message.preview_item_def)) return "preview_item_def: integer expected"; - if (message.phone_verified != null && message.hasOwnProperty("phone_verified")) + if (message.phone_verified != null && $Object.hasOwnProperty.call(message, "phone_verified")) if (typeof message.phone_verified !== "boolean") return "phone_verified: boolean expected"; - if (message.skill_rating_6v6 != null && message.hasOwnProperty("skill_rating_6v6")) + if (message.skill_rating_6v6 != null && $Object.hasOwnProperty.call(message, "skill_rating_6v6")) if (!$util.isInteger(message.skill_rating_6v6)) return "skill_rating_6v6: integer expected"; - if (message.skill_rating_9v9 != null && message.hasOwnProperty("skill_rating_9v9")) + if (message.skill_rating_9v9 != null && $Object.hasOwnProperty.call(message, "skill_rating_9v9")) if (!$util.isInteger(message.skill_rating_9v9)) return "skill_rating_9v9: integer expected"; - if (message.competitive_access != null && message.hasOwnProperty("competitive_access")) + if (message.competitive_access != null && $Object.hasOwnProperty.call(message, "competitive_access")) if (typeof message.competitive_access !== "boolean") return "competitive_access: boolean expected"; - if (message.matchmaking_ranked_ban_expiration != null && message.hasOwnProperty("matchmaking_ranked_ban_expiration")) + if (message.matchmaking_ranked_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_expiration")) if (!$util.isInteger(message.matchmaking_ranked_ban_expiration)) return "matchmaking_ranked_ban_expiration: integer expected"; - if (message.matchmaking_ranked_low_priority_expiration != null && message.hasOwnProperty("matchmaking_ranked_low_priority_expiration")) + if (message.matchmaking_ranked_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_expiration")) if (!$util.isInteger(message.matchmaking_ranked_low_priority_expiration)) return "matchmaking_ranked_low_priority_expiration: integer expected"; - if (message.matchmaking_ranked_ban_last_duration != null && message.hasOwnProperty("matchmaking_ranked_ban_last_duration")) + if (message.matchmaking_ranked_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_last_duration")) if (!$util.isInteger(message.matchmaking_ranked_ban_last_duration)) return "matchmaking_ranked_ban_last_duration: integer expected"; - if (message.matchmaking_ranked_low_priority_last_duration != null && message.hasOwnProperty("matchmaking_ranked_low_priority_last_duration")) + if (message.matchmaking_ranked_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_last_duration")) if (!$util.isInteger(message.matchmaking_ranked_low_priority_last_duration)) return "matchmaking_ranked_low_priority_last_duration: integer expected"; - if (message.matchmaking_casual_ban_expiration != null && message.hasOwnProperty("matchmaking_casual_ban_expiration")) + if (message.matchmaking_casual_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_expiration")) if (!$util.isInteger(message.matchmaking_casual_ban_expiration)) return "matchmaking_casual_ban_expiration: integer expected"; - if (message.matchmaking_casual_low_priority_expiration != null && message.hasOwnProperty("matchmaking_casual_low_priority_expiration")) + if (message.matchmaking_casual_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_expiration")) if (!$util.isInteger(message.matchmaking_casual_low_priority_expiration)) return "matchmaking_casual_low_priority_expiration: integer expected"; - if (message.matchmaking_casual_ban_last_duration != null && message.hasOwnProperty("matchmaking_casual_ban_last_duration")) + if (message.matchmaking_casual_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_last_duration")) if (!$util.isInteger(message.matchmaking_casual_ban_last_duration)) return "matchmaking_casual_ban_last_duration: integer expected"; - if (message.matchmaking_casual_low_priority_last_duration != null && message.hasOwnProperty("matchmaking_casual_low_priority_last_duration")) + if (message.matchmaking_casual_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_last_duration")) if (!$util.isInteger(message.matchmaking_casual_low_priority_last_duration)) return "matchmaking_casual_low_priority_last_duration: integer expected"; - if (message.phone_identifying != null && message.hasOwnProperty("phone_identifying")) + if (message.phone_identifying != null && $Object.hasOwnProperty.call(message, "phone_identifying")) if (typeof message.phone_identifying !== "boolean") return "phone_identifying: boolean expected"; - if (message.disable_party_quest_progress != null && message.hasOwnProperty("disable_party_quest_progress")) + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) if (typeof message.disable_party_quest_progress !== "boolean") return "disable_party_quest_progress: boolean expected"; - if (message.quest_reward_credits != null && message.hasOwnProperty("quest_reward_credits")) + if (message.quest_reward_credits != null && $Object.hasOwnProperty.call(message, "quest_reward_credits")) if (!$util.isInteger(message.quest_reward_credits)) return "quest_reward_credits: integer expected"; - if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && message.hasOwnProperty("matchmaking_last_casual_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_casual_excessive_reports_auto_ban_time")) if (!$util.isInteger(message.matchmaking_last_casual_excessive_reports_auto_ban_time)) return "matchmaking_last_casual_excessive_reports_auto_ban_time: integer expected"; - if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && message.hasOwnProperty("matchmaking_last_comp_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_comp_excessive_reports_auto_ban_time")) if (!$util.isInteger(message.matchmaking_last_comp_excessive_reports_auto_ban_time)) return "matchmaking_last_comp_excessive_reports_auto_ban_time: integer expected"; return null; @@ -81315,18 +105181,24 @@ * @param {Object.} object Plain object * @returns {CSOEconGameAccountClient} CSOEconGameAccountClient */ - CSOEconGameAccountClient.fromObject = function fromObject(object) { + CSOEconGameAccountClient.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconGameAccountClient) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconGameAccountClient: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconGameAccountClient(); if (object.additional_backpack_slots != null) message.additional_backpack_slots = object.additional_backpack_slots >>> 0; if (object.trial_account != null) - message.trial_account = Boolean(object.trial_account); + message.trial_account = $Boolean(object.trial_account); if (object.need_to_choose_most_helpful_friend != null) - message.need_to_choose_most_helpful_friend = Boolean(object.need_to_choose_most_helpful_friend); + message.need_to_choose_most_helpful_friend = $Boolean(object.need_to_choose_most_helpful_friend); if (object.in_coaches_list != null) - message.in_coaches_list = Boolean(object.in_coaches_list); + message.in_coaches_list = $Boolean(object.in_coaches_list); if (object.trade_ban_expiration != null) message.trade_ban_expiration = object.trade_ban_expiration >>> 0; if (object.duel_ban_expiration != null) @@ -81334,13 +105206,13 @@ if (object.preview_item_def != null) message.preview_item_def = object.preview_item_def >>> 0; if (object.phone_verified != null) - message.phone_verified = Boolean(object.phone_verified); + message.phone_verified = $Boolean(object.phone_verified); if (object.skill_rating_6v6 != null) message.skill_rating_6v6 = object.skill_rating_6v6 >>> 0; if (object.skill_rating_9v9 != null) message.skill_rating_9v9 = object.skill_rating_9v9 >>> 0; if (object.competitive_access != null) - message.competitive_access = Boolean(object.competitive_access); + message.competitive_access = $Boolean(object.competitive_access); if (object.matchmaking_ranked_ban_expiration != null) message.matchmaking_ranked_ban_expiration = object.matchmaking_ranked_ban_expiration >>> 0; if (object.matchmaking_ranked_low_priority_expiration != null) @@ -81358,9 +105230,9 @@ if (object.matchmaking_casual_low_priority_last_duration != null) message.matchmaking_casual_low_priority_last_duration = object.matchmaking_casual_low_priority_last_duration >>> 0; if (object.phone_identifying != null) - message.phone_identifying = Boolean(object.phone_identifying); + message.phone_identifying = $Boolean(object.phone_identifying); if (object.disable_party_quest_progress != null) - message.disable_party_quest_progress = Boolean(object.disable_party_quest_progress); + message.disable_party_quest_progress = $Boolean(object.disable_party_quest_progress); if (object.quest_reward_credits != null) message.quest_reward_credits = object.quest_reward_credits >>> 0; if (object.matchmaking_last_casual_excessive_reports_auto_ban_time != null) @@ -81379,9 +105251,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconGameAccountClient.toObject = function toObject(message, options) { + CSOEconGameAccountClient.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.additional_backpack_slots = 0; @@ -81409,53 +105285,53 @@ object.matchmaking_last_casual_excessive_reports_auto_ban_time = 0; object.matchmaking_last_comp_excessive_reports_auto_ban_time = 0; } - if (message.additional_backpack_slots != null && message.hasOwnProperty("additional_backpack_slots")) + if (message.additional_backpack_slots != null && $Object.hasOwnProperty.call(message, "additional_backpack_slots")) object.additional_backpack_slots = message.additional_backpack_slots; - if (message.trial_account != null && message.hasOwnProperty("trial_account")) + if (message.trial_account != null && $Object.hasOwnProperty.call(message, "trial_account")) object.trial_account = message.trial_account; - if (message.need_to_choose_most_helpful_friend != null && message.hasOwnProperty("need_to_choose_most_helpful_friend")) + if (message.need_to_choose_most_helpful_friend != null && $Object.hasOwnProperty.call(message, "need_to_choose_most_helpful_friend")) object.need_to_choose_most_helpful_friend = message.need_to_choose_most_helpful_friend; - if (message.in_coaches_list != null && message.hasOwnProperty("in_coaches_list")) + if (message.in_coaches_list != null && $Object.hasOwnProperty.call(message, "in_coaches_list")) object.in_coaches_list = message.in_coaches_list; - if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration")) + if (message.trade_ban_expiration != null && $Object.hasOwnProperty.call(message, "trade_ban_expiration")) object.trade_ban_expiration = message.trade_ban_expiration; - if (message.duel_ban_expiration != null && message.hasOwnProperty("duel_ban_expiration")) + if (message.duel_ban_expiration != null && $Object.hasOwnProperty.call(message, "duel_ban_expiration")) object.duel_ban_expiration = message.duel_ban_expiration; - if (message.preview_item_def != null && message.hasOwnProperty("preview_item_def")) + if (message.preview_item_def != null && $Object.hasOwnProperty.call(message, "preview_item_def")) object.preview_item_def = message.preview_item_def; - if (message.matchmaking_ranked_ban_expiration != null && message.hasOwnProperty("matchmaking_ranked_ban_expiration")) + if (message.matchmaking_ranked_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_expiration")) object.matchmaking_ranked_ban_expiration = message.matchmaking_ranked_ban_expiration; - if (message.phone_verified != null && message.hasOwnProperty("phone_verified")) + if (message.phone_verified != null && $Object.hasOwnProperty.call(message, "phone_verified")) object.phone_verified = message.phone_verified; - if (message.skill_rating_6v6 != null && message.hasOwnProperty("skill_rating_6v6")) + if (message.skill_rating_6v6 != null && $Object.hasOwnProperty.call(message, "skill_rating_6v6")) object.skill_rating_6v6 = message.skill_rating_6v6; - if (message.skill_rating_9v9 != null && message.hasOwnProperty("skill_rating_9v9")) + if (message.skill_rating_9v9 != null && $Object.hasOwnProperty.call(message, "skill_rating_9v9")) object.skill_rating_9v9 = message.skill_rating_9v9; - if (message.competitive_access != null && message.hasOwnProperty("competitive_access")) + if (message.competitive_access != null && $Object.hasOwnProperty.call(message, "competitive_access")) object.competitive_access = message.competitive_access; - if (message.matchmaking_ranked_low_priority_expiration != null && message.hasOwnProperty("matchmaking_ranked_low_priority_expiration")) + if (message.matchmaking_ranked_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_expiration")) object.matchmaking_ranked_low_priority_expiration = message.matchmaking_ranked_low_priority_expiration; - if (message.matchmaking_ranked_ban_last_duration != null && message.hasOwnProperty("matchmaking_ranked_ban_last_duration")) + if (message.matchmaking_ranked_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_ban_last_duration")) object.matchmaking_ranked_ban_last_duration = message.matchmaking_ranked_ban_last_duration; - if (message.matchmaking_ranked_low_priority_last_duration != null && message.hasOwnProperty("matchmaking_ranked_low_priority_last_duration")) + if (message.matchmaking_ranked_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_ranked_low_priority_last_duration")) object.matchmaking_ranked_low_priority_last_duration = message.matchmaking_ranked_low_priority_last_duration; - if (message.matchmaking_casual_ban_expiration != null && message.hasOwnProperty("matchmaking_casual_ban_expiration")) + if (message.matchmaking_casual_ban_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_expiration")) object.matchmaking_casual_ban_expiration = message.matchmaking_casual_ban_expiration; - if (message.matchmaking_casual_low_priority_expiration != null && message.hasOwnProperty("matchmaking_casual_low_priority_expiration")) + if (message.matchmaking_casual_low_priority_expiration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_expiration")) object.matchmaking_casual_low_priority_expiration = message.matchmaking_casual_low_priority_expiration; - if (message.matchmaking_casual_ban_last_duration != null && message.hasOwnProperty("matchmaking_casual_ban_last_duration")) + if (message.matchmaking_casual_ban_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_ban_last_duration")) object.matchmaking_casual_ban_last_duration = message.matchmaking_casual_ban_last_duration; - if (message.matchmaking_casual_low_priority_last_duration != null && message.hasOwnProperty("matchmaking_casual_low_priority_last_duration")) + if (message.matchmaking_casual_low_priority_last_duration != null && $Object.hasOwnProperty.call(message, "matchmaking_casual_low_priority_last_duration")) object.matchmaking_casual_low_priority_last_duration = message.matchmaking_casual_low_priority_last_duration; - if (message.phone_identifying != null && message.hasOwnProperty("phone_identifying")) + if (message.phone_identifying != null && $Object.hasOwnProperty.call(message, "phone_identifying")) object.phone_identifying = message.phone_identifying; - if (message.disable_party_quest_progress != null && message.hasOwnProperty("disable_party_quest_progress")) + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) object.disable_party_quest_progress = message.disable_party_quest_progress; - if (message.quest_reward_credits != null && message.hasOwnProperty("quest_reward_credits")) + if (message.quest_reward_credits != null && $Object.hasOwnProperty.call(message, "quest_reward_credits")) object.quest_reward_credits = message.quest_reward_credits; - if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && message.hasOwnProperty("matchmaking_last_casual_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_casual_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_casual_excessive_reports_auto_ban_time")) object.matchmaking_last_casual_excessive_reports_auto_ban_time = message.matchmaking_last_casual_excessive_reports_auto_ban_time; - if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && message.hasOwnProperty("matchmaking_last_comp_excessive_reports_auto_ban_time")) + if (message.matchmaking_last_comp_excessive_reports_auto_ban_time != null && $Object.hasOwnProperty.call(message, "matchmaking_last_comp_excessive_reports_auto_ban_time")) object.matchmaking_last_comp_excessive_reports_auto_ban_time = message.matchmaking_last_comp_excessive_reports_auto_ban_time; return object; }; @@ -81467,8 +105343,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconGameAccountClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconGameAccountClient.prototype.toJSON = function() { + return CSOEconGameAccountClient.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconGameAccountClient + * @function getTypeUrl + * @memberof CSOEconGameAccountClient + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconGameAccountClient.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconGameAccountClient"; }; return CSOEconGameAccountClient; @@ -81478,29 +105368,42 @@ /** * Properties of a CSOItemCriteriaCondition. - * @exports ICSOItemCriteriaCondition - * @interface ICSOItemCriteriaCondition + * @typedef {Object} CSOItemCriteriaCondition.$Properties * @property {number|null} [op] CSOItemCriteriaCondition op * @property {string|null} [field] CSOItemCriteriaCondition field * @property {boolean|null} [required] CSOItemCriteriaCondition required * @property {number|null} [float_value] CSOItemCriteriaCondition float_value * @property {string|null} [string_value] CSOItemCriteriaCondition string_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOItemCriteriaCondition. + * @exports ICSOItemCriteriaCondition + * @interface ICSOItemCriteriaCondition + * @augments CSOItemCriteriaCondition.$Properties + * @deprecated Use CSOItemCriteriaCondition.$Properties instead. + */ + + /** + * Shape of a CSOItemCriteriaCondition. + * @typedef {CSOItemCriteriaCondition.$Properties} CSOItemCriteriaCondition.$Shape */ /** * Constructs a new CSOItemCriteriaCondition. * @exports CSOItemCriteriaCondition * @classdesc Represents a CSOItemCriteriaCondition. - * @implements ICSOItemCriteriaCondition * @constructor - * @param {ICSOItemCriteriaCondition=} [properties] Properties to set + * @param {CSOItemCriteriaCondition.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOItemCriteriaCondition(properties) { + var CSOItemCriteriaCondition = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOItemCriteriaCondition op. @@ -81547,10 +105450,14 @@ * @function create * @memberof CSOItemCriteriaCondition * @static - * @param {ICSOItemCriteriaCondition=} [properties] Properties to set + * @param {CSOItemCriteriaCondition.$Properties=} [properties] Properties to set * @returns {CSOItemCriteriaCondition} CSOItemCriteriaCondition instance + * @type {{ + * (properties: CSOItemCriteriaCondition.$Shape): CSOItemCriteriaCondition & CSOItemCriteriaCondition.$Shape; + * (properties?: CSOItemCriteriaCondition.$Properties): CSOItemCriteriaCondition; + * }} */ - CSOItemCriteriaCondition.create = function create(properties) { + CSOItemCriteriaCondition.create = function(properties) { return new CSOItemCriteriaCondition(properties); }; @@ -81559,23 +105466,30 @@ * @function encode * @memberof CSOItemCriteriaCondition * @static - * @param {ICSOItemCriteriaCondition} message CSOItemCriteriaCondition message or plain object to encode + * @param {CSOItemCriteriaCondition.$Properties} message CSOItemCriteriaCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemCriteriaCondition.encode = function encode(message, writer) { + CSOItemCriteriaCondition.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.op != null && Object.hasOwnProperty.call(message, "op")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.op != null && $Object.hasOwnProperty.call(message, "op")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.op); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.field); - if (message.required != null && Object.hasOwnProperty.call(message, "required")) + if (message.required != null && $Object.hasOwnProperty.call(message, "required")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.required); - if (message.float_value != null && Object.hasOwnProperty.call(message, "float_value")) + if (message.float_value != null && $Object.hasOwnProperty.call(message, "float_value")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.float_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.string_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -81584,12 +105498,12 @@ * @function encodeDelimited * @memberof CSOItemCriteriaCondition * @static - * @param {ICSOItemCriteriaCondition} message CSOItemCriteriaCondition message or plain object to encode + * @param {CSOItemCriteriaCondition.$Properties} message CSOItemCriteriaCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemCriteriaCondition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOItemCriteriaCondition.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -81599,37 +105513,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOItemCriteriaCondition} CSOItemCriteriaCondition + * @returns {CSOItemCriteriaCondition & CSOItemCriteriaCondition.$Shape} CSOItemCriteriaCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemCriteriaCondition.decode = function decode(reader, length) { + CSOItemCriteriaCondition.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOItemCriteriaCondition(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOItemCriteriaCondition(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.op = reader.int32(); - break; - case 2: - message.field = reader.string(); - break; - case 3: - message.required = reader.bool(); - break; - case 4: - message.float_value = reader.float(); - break; - case 5: - message.string_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.op = reader.int32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.field = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.required = reader.bool(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.float_value = reader.float(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.string_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -81639,11 +105582,11 @@ * @memberof CSOItemCriteriaCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOItemCriteriaCondition} CSOItemCriteriaCondition + * @returns {CSOItemCriteriaCondition & CSOItemCriteriaCondition.$Shape} CSOItemCriteriaCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemCriteriaCondition.decodeDelimited = function decodeDelimited(reader) { + CSOItemCriteriaCondition.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -81657,22 +105600,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOItemCriteriaCondition.verify = function verify(message) { + CSOItemCriteriaCondition.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.op != null && message.hasOwnProperty("op")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.op != null && $Object.hasOwnProperty.call(message, "op")) if (!$util.isInteger(message.op)) return "op: integer expected"; - if (message.field != null && message.hasOwnProperty("field")) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) if (!$util.isString(message.field)) return "field: string expected"; - if (message.required != null && message.hasOwnProperty("required")) + if (message.required != null && $Object.hasOwnProperty.call(message, "required")) if (typeof message.required !== "boolean") return "required: boolean expected"; - if (message.float_value != null && message.hasOwnProperty("float_value")) + if (message.float_value != null && $Object.hasOwnProperty.call(message, "float_value")) if (typeof message.float_value !== "number") return "float_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) if (!$util.isString(message.string_value)) return "string_value: string expected"; return null; @@ -81686,20 +105633,26 @@ * @param {Object.} object Plain object * @returns {CSOItemCriteriaCondition} CSOItemCriteriaCondition */ - CSOItemCriteriaCondition.fromObject = function fromObject(object) { + CSOItemCriteriaCondition.fromObject = function (object, _depth) { if (object instanceof $root.CSOItemCriteriaCondition) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOItemCriteriaCondition: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOItemCriteriaCondition(); if (object.op != null) message.op = object.op | 0; if (object.field != null) - message.field = String(object.field); + message.field = $String(object.field); if (object.required != null) - message.required = Boolean(object.required); + message.required = $Boolean(object.required); if (object.float_value != null) - message.float_value = Number(object.float_value); + message.float_value = $Number(object.float_value); if (object.string_value != null) - message.string_value = String(object.string_value); + message.string_value = $String(object.string_value); return message; }; @@ -81712,9 +105665,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOItemCriteriaCondition.toObject = function toObject(message, options) { + CSOItemCriteriaCondition.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.op = 0; @@ -81723,15 +105680,15 @@ object.float_value = 0; object.string_value = ""; } - if (message.op != null && message.hasOwnProperty("op")) + if (message.op != null && $Object.hasOwnProperty.call(message, "op")) object.op = message.op; - if (message.field != null && message.hasOwnProperty("field")) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) object.field = message.field; - if (message.required != null && message.hasOwnProperty("required")) + if (message.required != null && $Object.hasOwnProperty.call(message, "required")) object.required = message.required; - if (message.float_value != null && message.hasOwnProperty("float_value")) - object.float_value = options.json && !isFinite(message.float_value) ? String(message.float_value) : message.float_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.float_value != null && $Object.hasOwnProperty.call(message, "float_value")) + object.float_value = options.json && !$isFinite(message.float_value) ? $String(message.float_value) : message.float_value; + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) object.string_value = message.string_value; return object; }; @@ -81743,8 +105700,22 @@ * @instance * @returns {Object.} JSON object */ - CSOItemCriteriaCondition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOItemCriteriaCondition.prototype.toJSON = function() { + return CSOItemCriteriaCondition.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOItemCriteriaCondition + * @function getTypeUrl + * @memberof CSOItemCriteriaCondition + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOItemCriteriaCondition.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOItemCriteriaCondition"; }; return CSOItemCriteriaCondition; @@ -81754,8 +105725,7 @@ /** * Properties of a CSOItemCriteria. - * @exports ICSOItemCriteria - * @interface ICSOItemCriteria + * @typedef {Object} CSOItemCriteria.$Properties * @property {number|null} [item_level] CSOItemCriteria item_level * @property {number|null} [item_quality] CSOItemCriteria item_quality * @property {boolean|null} [item_level_set] CSOItemCriteria item_level_set @@ -81763,27 +105733,41 @@ * @property {number|null} [initial_inventory] CSOItemCriteria initial_inventory * @property {number|null} [initial_quantity] CSOItemCriteria initial_quantity * @property {boolean|null} [ignore_enabled_flag] CSOItemCriteria ignore_enabled_flag - * @property {Array.|null} [conditions] CSOItemCriteria conditions + * @property {Array.|null} [conditions] CSOItemCriteria conditions * @property {boolean|null} [recent_only] CSOItemCriteria recent_only * @property {string|null} [tags] CSOItemCriteria tags * @property {string|null} [equip_regions] CSOItemCriteria equip_regions + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOItemCriteria. + * @exports ICSOItemCriteria + * @interface ICSOItemCriteria + * @augments CSOItemCriteria.$Properties + * @deprecated Use CSOItemCriteria.$Properties instead. + */ + + /** + * Shape of a CSOItemCriteria. + * @typedef {CSOItemCriteria.$Properties} CSOItemCriteria.$Shape */ /** * Constructs a new CSOItemCriteria. * @exports CSOItemCriteria * @classdesc Represents a CSOItemCriteria. - * @implements ICSOItemCriteria * @constructor - * @param {ICSOItemCriteria=} [properties] Properties to set + * @param {CSOItemCriteria.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOItemCriteria(properties) { + var CSOItemCriteria = function (properties) { this.conditions = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOItemCriteria item_level. @@ -81843,7 +105827,7 @@ /** * CSOItemCriteria conditions. - * @member {Array.} conditions + * @member {Array.} conditions * @memberof CSOItemCriteria * @instance */ @@ -81878,10 +105862,14 @@ * @function create * @memberof CSOItemCriteria * @static - * @param {ICSOItemCriteria=} [properties] Properties to set + * @param {CSOItemCriteria.$Properties=} [properties] Properties to set * @returns {CSOItemCriteria} CSOItemCriteria instance + * @type {{ + * (properties: CSOItemCriteria.$Shape): CSOItemCriteria & CSOItemCriteria.$Shape; + * (properties?: CSOItemCriteria.$Properties): CSOItemCriteria; + * }} */ - CSOItemCriteria.create = function create(properties) { + CSOItemCriteria.create = function(properties) { return new CSOItemCriteria(properties); }; @@ -81890,36 +105878,43 @@ * @function encode * @memberof CSOItemCriteria * @static - * @param {ICSOItemCriteria} message CSOItemCriteria message or plain object to encode + * @param {CSOItemCriteria.$Properties} message CSOItemCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemCriteria.encode = function encode(message, writer) { + CSOItemCriteria.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_level != null && Object.hasOwnProperty.call(message, "item_level")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_level != null && $Object.hasOwnProperty.call(message, "item_level")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.item_level); - if (message.item_quality != null && Object.hasOwnProperty.call(message, "item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.item_quality); - if (message.item_level_set != null && Object.hasOwnProperty.call(message, "item_level_set")) + if (message.item_level_set != null && $Object.hasOwnProperty.call(message, "item_level_set")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.item_level_set); - if (message.item_quality_set != null && Object.hasOwnProperty.call(message, "item_quality_set")) + if (message.item_quality_set != null && $Object.hasOwnProperty.call(message, "item_quality_set")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.item_quality_set); - if (message.initial_inventory != null && Object.hasOwnProperty.call(message, "initial_inventory")) + if (message.initial_inventory != null && $Object.hasOwnProperty.call(message, "initial_inventory")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.initial_inventory); - if (message.initial_quantity != null && Object.hasOwnProperty.call(message, "initial_quantity")) + if (message.initial_quantity != null && $Object.hasOwnProperty.call(message, "initial_quantity")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.initial_quantity); - if (message.ignore_enabled_flag != null && Object.hasOwnProperty.call(message, "ignore_enabled_flag")) + if (message.ignore_enabled_flag != null && $Object.hasOwnProperty.call(message, "ignore_enabled_flag")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.ignore_enabled_flag); if (message.conditions != null && message.conditions.length) for (var i = 0; i < message.conditions.length; ++i) - $root.CSOItemCriteriaCondition.encode(message.conditions[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.recent_only != null && Object.hasOwnProperty.call(message, "recent_only")) + $root.CSOItemCriteriaCondition.encode(message.conditions[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.recent_only != null && $Object.hasOwnProperty.call(message, "recent_only")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.recent_only); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.tags); - if (message.equip_regions != null && Object.hasOwnProperty.call(message, "equip_regions")) + if (message.equip_regions != null && $Object.hasOwnProperty.call(message, "equip_regions")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.equip_regions); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -81928,12 +105923,12 @@ * @function encodeDelimited * @memberof CSOItemCriteria * @static - * @param {ICSOItemCriteria} message CSOItemCriteria message or plain object to encode + * @param {CSOItemCriteria.$Properties} message CSOItemCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemCriteria.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOItemCriteria.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -81943,57 +105938,104 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOItemCriteria} CSOItemCriteria + * @returns {CSOItemCriteria & CSOItemCriteria.$Shape} CSOItemCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemCriteria.decode = function decode(reader, length) { + CSOItemCriteria.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOItemCriteria(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOItemCriteria(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_level = reader.uint32(); - break; - case 2: - message.item_quality = reader.int32(); - break; - case 3: - message.item_level_set = reader.bool(); - break; - case 4: - message.item_quality_set = reader.bool(); - break; - case 5: - message.initial_inventory = reader.uint32(); - break; - case 6: - message.initial_quantity = reader.uint32(); - break; - case 8: - message.ignore_enabled_flag = reader.bool(); - break; - case 9: - if (!(message.conditions && message.conditions.length)) - message.conditions = []; - message.conditions.push($root.CSOItemCriteriaCondition.decode(reader, reader.uint32())); - break; - case 10: - message.recent_only = reader.bool(); - break; - case 11: - message.tags = reader.string(); - break; - case 12: - message.equip_regions = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_level = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_quality = reader.int32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_level_set = reader.bool(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.item_quality_set = reader.bool(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.initial_inventory = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.initial_quantity = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.ignore_enabled_flag = reader.bool(); + continue; + } + case 9: { + if (wireType !== 2) + break; + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push($root.CSOItemCriteriaCondition.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.recent_only = reader.bool(); + continue; + } + case 11: { + if (wireType !== 2) + break; + message.tags = reader.string(); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.equip_regions = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -82003,11 +106045,11 @@ * @memberof CSOItemCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOItemCriteria} CSOItemCriteria + * @returns {CSOItemCriteria & CSOItemCriteria.$Shape} CSOItemCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemCriteria.decodeDelimited = function decodeDelimited(reader) { + CSOItemCriteria.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -82021,46 +106063,50 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOItemCriteria.verify = function verify(message) { + CSOItemCriteria.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_level != null && message.hasOwnProperty("item_level")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_level != null && $Object.hasOwnProperty.call(message, "item_level")) if (!$util.isInteger(message.item_level)) return "item_level: integer expected"; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) if (!$util.isInteger(message.item_quality)) return "item_quality: integer expected"; - if (message.item_level_set != null && message.hasOwnProperty("item_level_set")) + if (message.item_level_set != null && $Object.hasOwnProperty.call(message, "item_level_set")) if (typeof message.item_level_set !== "boolean") return "item_level_set: boolean expected"; - if (message.item_quality_set != null && message.hasOwnProperty("item_quality_set")) + if (message.item_quality_set != null && $Object.hasOwnProperty.call(message, "item_quality_set")) if (typeof message.item_quality_set !== "boolean") return "item_quality_set: boolean expected"; - if (message.initial_inventory != null && message.hasOwnProperty("initial_inventory")) + if (message.initial_inventory != null && $Object.hasOwnProperty.call(message, "initial_inventory")) if (!$util.isInteger(message.initial_inventory)) return "initial_inventory: integer expected"; - if (message.initial_quantity != null && message.hasOwnProperty("initial_quantity")) + if (message.initial_quantity != null && $Object.hasOwnProperty.call(message, "initial_quantity")) if (!$util.isInteger(message.initial_quantity)) return "initial_quantity: integer expected"; - if (message.ignore_enabled_flag != null && message.hasOwnProperty("ignore_enabled_flag")) + if (message.ignore_enabled_flag != null && $Object.hasOwnProperty.call(message, "ignore_enabled_flag")) if (typeof message.ignore_enabled_flag !== "boolean") return "ignore_enabled_flag: boolean expected"; - if (message.conditions != null && message.hasOwnProperty("conditions")) { - if (!Array.isArray(message.conditions)) + if (message.conditions != null && $Object.hasOwnProperty.call(message, "conditions")) { + if (!$Array.isArray(message.conditions)) return "conditions: array expected"; for (var i = 0; i < message.conditions.length; ++i) { - var error = $root.CSOItemCriteriaCondition.verify(message.conditions[i]); + var error = $root.CSOItemCriteriaCondition.verify(message.conditions[i], _depth + 1); if (error) return "conditions." + error; } } - if (message.recent_only != null && message.hasOwnProperty("recent_only")) + if (message.recent_only != null && $Object.hasOwnProperty.call(message, "recent_only")) if (typeof message.recent_only !== "boolean") return "recent_only: boolean expected"; - if (message.tags != null && message.hasOwnProperty("tags")) + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) if (!$util.isString(message.tags)) return "tags: string expected"; - if (message.equip_regions != null && message.hasOwnProperty("equip_regions")) + if (message.equip_regions != null && $Object.hasOwnProperty.call(message, "equip_regions")) if (!$util.isString(message.equip_regions)) return "equip_regions: string expected"; return null; @@ -82074,40 +106120,46 @@ * @param {Object.} object Plain object * @returns {CSOItemCriteria} CSOItemCriteria */ - CSOItemCriteria.fromObject = function fromObject(object) { + CSOItemCriteria.fromObject = function (object, _depth) { if (object instanceof $root.CSOItemCriteria) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOItemCriteria: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOItemCriteria(); if (object.item_level != null) message.item_level = object.item_level >>> 0; if (object.item_quality != null) message.item_quality = object.item_quality | 0; if (object.item_level_set != null) - message.item_level_set = Boolean(object.item_level_set); + message.item_level_set = $Boolean(object.item_level_set); if (object.item_quality_set != null) - message.item_quality_set = Boolean(object.item_quality_set); + message.item_quality_set = $Boolean(object.item_quality_set); if (object.initial_inventory != null) message.initial_inventory = object.initial_inventory >>> 0; if (object.initial_quantity != null) message.initial_quantity = object.initial_quantity >>> 0; if (object.ignore_enabled_flag != null) - message.ignore_enabled_flag = Boolean(object.ignore_enabled_flag); + message.ignore_enabled_flag = $Boolean(object.ignore_enabled_flag); if (object.conditions) { - if (!Array.isArray(object.conditions)) - throw TypeError(".CSOItemCriteria.conditions: array expected"); - message.conditions = []; + if (!$Array.isArray(object.conditions)) + throw $TypeError(".CSOItemCriteria.conditions: array expected"); + message.conditions = $Array(object.conditions.length); for (var i = 0; i < object.conditions.length; ++i) { - if (typeof object.conditions[i] !== "object") - throw TypeError(".CSOItemCriteria.conditions: object expected"); - message.conditions[i] = $root.CSOItemCriteriaCondition.fromObject(object.conditions[i]); + if (!$util.isObject(object.conditions[i])) + throw $TypeError(".CSOItemCriteria.conditions: object expected"); + message.conditions[i] = $root.CSOItemCriteriaCondition.fromObject(object.conditions[i], _depth + 1); } } if (object.recent_only != null) - message.recent_only = Boolean(object.recent_only); + message.recent_only = $Boolean(object.recent_only); if (object.tags != null) - message.tags = String(object.tags); + message.tags = $String(object.tags); if (object.equip_regions != null) - message.equip_regions = String(object.equip_regions); + message.equip_regions = $String(object.equip_regions); return message; }; @@ -82120,9 +106172,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOItemCriteria.toObject = function toObject(message, options) { + CSOItemCriteria.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.conditions = []; @@ -82138,30 +106194,30 @@ object.tags = ""; object.equip_regions = ""; } - if (message.item_level != null && message.hasOwnProperty("item_level")) + if (message.item_level != null && $Object.hasOwnProperty.call(message, "item_level")) object.item_level = message.item_level; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) object.item_quality = message.item_quality; - if (message.item_level_set != null && message.hasOwnProperty("item_level_set")) + if (message.item_level_set != null && $Object.hasOwnProperty.call(message, "item_level_set")) object.item_level_set = message.item_level_set; - if (message.item_quality_set != null && message.hasOwnProperty("item_quality_set")) + if (message.item_quality_set != null && $Object.hasOwnProperty.call(message, "item_quality_set")) object.item_quality_set = message.item_quality_set; - if (message.initial_inventory != null && message.hasOwnProperty("initial_inventory")) + if (message.initial_inventory != null && $Object.hasOwnProperty.call(message, "initial_inventory")) object.initial_inventory = message.initial_inventory; - if (message.initial_quantity != null && message.hasOwnProperty("initial_quantity")) + if (message.initial_quantity != null && $Object.hasOwnProperty.call(message, "initial_quantity")) object.initial_quantity = message.initial_quantity; - if (message.ignore_enabled_flag != null && message.hasOwnProperty("ignore_enabled_flag")) + if (message.ignore_enabled_flag != null && $Object.hasOwnProperty.call(message, "ignore_enabled_flag")) object.ignore_enabled_flag = message.ignore_enabled_flag; if (message.conditions && message.conditions.length) { - object.conditions = []; + object.conditions = $Array(message.conditions.length); for (var j = 0; j < message.conditions.length; ++j) - object.conditions[j] = $root.CSOItemCriteriaCondition.toObject(message.conditions[j], options); + object.conditions[j] = $root.CSOItemCriteriaCondition.toObject(message.conditions[j], options, _depth + 1); } - if (message.recent_only != null && message.hasOwnProperty("recent_only")) + if (message.recent_only != null && $Object.hasOwnProperty.call(message, "recent_only")) object.recent_only = message.recent_only; - if (message.tags != null && message.hasOwnProperty("tags")) + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) object.tags = message.tags; - if (message.equip_regions != null && message.hasOwnProperty("equip_regions")) + if (message.equip_regions != null && $Object.hasOwnProperty.call(message, "equip_regions")) object.equip_regions = message.equip_regions; return object; }; @@ -82173,8 +106229,22 @@ * @instance * @returns {Object.} JSON object */ - CSOItemCriteria.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOItemCriteria.prototype.toJSON = function() { + return CSOItemCriteria.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOItemCriteria + * @function getTypeUrl + * @memberof CSOItemCriteria + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOItemCriteria.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOItemCriteria"; }; return CSOItemCriteria; @@ -82184,8 +106254,7 @@ /** * Properties of a CSOItemRecipe. - * @exports ICSOItemRecipe - * @interface ICSOItemRecipe + * @typedef {Object} CSOItemRecipe.$Properties * @property {number|null} [def_index] CSOItemRecipe def_index * @property {string|null} [name] CSOItemRecipe name * @property {string|null} [n_a] CSOItemRecipe n_a @@ -82202,28 +106271,42 @@ * @property {number|null} [class_usage_for_output] CSOItemRecipe class_usage_for_output * @property {number|null} [slot_usage_for_output] CSOItemRecipe slot_usage_for_output * @property {number|null} [set_for_output] CSOItemRecipe set_for_output - * @property {Array.|null} [input_items_criteria] CSOItemRecipe input_items_criteria - * @property {Array.|null} [output_items_criteria] CSOItemRecipe output_items_criteria + * @property {Array.|null} [input_items_criteria] CSOItemRecipe input_items_criteria + * @property {Array.|null} [output_items_criteria] CSOItemRecipe output_items_criteria * @property {Array.|null} [input_item_dupe_counts] CSOItemRecipe input_item_dupe_counts + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOItemRecipe. + * @exports ICSOItemRecipe + * @interface ICSOItemRecipe + * @augments CSOItemRecipe.$Properties + * @deprecated Use CSOItemRecipe.$Properties instead. + */ + + /** + * Shape of a CSOItemRecipe. + * @typedef {CSOItemRecipe.$Properties} CSOItemRecipe.$Shape */ /** * Constructs a new CSOItemRecipe. * @exports CSOItemRecipe * @classdesc Represents a CSOItemRecipe. - * @implements ICSOItemRecipe * @constructor - * @param {ICSOItemRecipe=} [properties] Properties to set + * @param {CSOItemRecipe.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOItemRecipe(properties) { + var CSOItemRecipe = function (properties) { this.input_items_criteria = []; this.output_items_criteria = []; this.input_item_dupe_counts = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOItemRecipe def_index. @@ -82355,7 +106438,7 @@ /** * CSOItemRecipe input_items_criteria. - * @member {Array.} input_items_criteria + * @member {Array.} input_items_criteria * @memberof CSOItemRecipe * @instance */ @@ -82363,7 +106446,7 @@ /** * CSOItemRecipe output_items_criteria. - * @member {Array.} output_items_criteria + * @member {Array.} output_items_criteria * @memberof CSOItemRecipe * @instance */ @@ -82382,10 +106465,14 @@ * @function create * @memberof CSOItemRecipe * @static - * @param {ICSOItemRecipe=} [properties] Properties to set + * @param {CSOItemRecipe.$Properties=} [properties] Properties to set * @returns {CSOItemRecipe} CSOItemRecipe instance + * @type {{ + * (properties: CSOItemRecipe.$Shape): CSOItemRecipe & CSOItemRecipe.$Shape; + * (properties?: CSOItemRecipe.$Properties): CSOItemRecipe; + * }} */ - CSOItemRecipe.create = function create(properties) { + CSOItemRecipe.create = function(properties) { return new CSOItemRecipe(properties); }; @@ -82394,54 +106481,61 @@ * @function encode * @memberof CSOItemRecipe * @static - * @param {ICSOItemRecipe} message CSOItemRecipe message or plain object to encode + * @param {CSOItemRecipe.$Properties} message CSOItemRecipe message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemRecipe.encode = function encode(message, writer) { + CSOItemRecipe.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.def_index); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.n_a != null && Object.hasOwnProperty.call(message, "n_a")) + if (message.n_a != null && $Object.hasOwnProperty.call(message, "n_a")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.n_a); - if (message.desc_inputs != null && Object.hasOwnProperty.call(message, "desc_inputs")) + if (message.desc_inputs != null && $Object.hasOwnProperty.call(message, "desc_inputs")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.desc_inputs); - if (message.desc_outputs != null && Object.hasOwnProperty.call(message, "desc_outputs")) + if (message.desc_outputs != null && $Object.hasOwnProperty.call(message, "desc_outputs")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.desc_outputs); - if (message.di_a != null && Object.hasOwnProperty.call(message, "di_a")) + if (message.di_a != null && $Object.hasOwnProperty.call(message, "di_a")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.di_a); - if (message.di_b != null && Object.hasOwnProperty.call(message, "di_b")) + if (message.di_b != null && $Object.hasOwnProperty.call(message, "di_b")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.di_b); - if (message.di_c != null && Object.hasOwnProperty.call(message, "di_c")) + if (message.di_c != null && $Object.hasOwnProperty.call(message, "di_c")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.di_c); - if (message.do_a != null && Object.hasOwnProperty.call(message, "do_a")) + if (message.do_a != null && $Object.hasOwnProperty.call(message, "do_a")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.do_a); - if (message.do_b != null && Object.hasOwnProperty.call(message, "do_b")) + if (message.do_b != null && $Object.hasOwnProperty.call(message, "do_b")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.do_b); - if (message.do_c != null && Object.hasOwnProperty.call(message, "do_c")) + if (message.do_c != null && $Object.hasOwnProperty.call(message, "do_c")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.do_c); - if (message.requires_all_same_class != null && Object.hasOwnProperty.call(message, "requires_all_same_class")) + if (message.requires_all_same_class != null && $Object.hasOwnProperty.call(message, "requires_all_same_class")) writer.uint32(/* id 12, wireType 0 =*/96).bool(message.requires_all_same_class); - if (message.requires_all_same_slot != null && Object.hasOwnProperty.call(message, "requires_all_same_slot")) + if (message.requires_all_same_slot != null && $Object.hasOwnProperty.call(message, "requires_all_same_slot")) writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requires_all_same_slot); - if (message.class_usage_for_output != null && Object.hasOwnProperty.call(message, "class_usage_for_output")) + if (message.class_usage_for_output != null && $Object.hasOwnProperty.call(message, "class_usage_for_output")) writer.uint32(/* id 14, wireType 0 =*/112).int32(message.class_usage_for_output); - if (message.slot_usage_for_output != null && Object.hasOwnProperty.call(message, "slot_usage_for_output")) + if (message.slot_usage_for_output != null && $Object.hasOwnProperty.call(message, "slot_usage_for_output")) writer.uint32(/* id 15, wireType 0 =*/120).int32(message.slot_usage_for_output); - if (message.set_for_output != null && Object.hasOwnProperty.call(message, "set_for_output")) + if (message.set_for_output != null && $Object.hasOwnProperty.call(message, "set_for_output")) writer.uint32(/* id 16, wireType 0 =*/128).int32(message.set_for_output); if (message.input_items_criteria != null && message.input_items_criteria.length) for (var i = 0; i < message.input_items_criteria.length; ++i) - $root.CSOItemCriteria.encode(message.input_items_criteria[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + $root.CSOItemCriteria.encode(message.input_items_criteria[i], writer.uint32(/* id 20, wireType 2 =*/162).fork(), _depth + 1).ldelim(); if (message.output_items_criteria != null && message.output_items_criteria.length) for (var i = 0; i < message.output_items_criteria.length; ++i) - $root.CSOItemCriteria.encode(message.output_items_criteria[i], writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + $root.CSOItemCriteria.encode(message.output_items_criteria[i], writer.uint32(/* id 21, wireType 2 =*/170).fork(), _depth + 1).ldelim(); if (message.input_item_dupe_counts != null && message.input_item_dupe_counts.length) for (var i = 0; i < message.input_item_dupe_counts.length; ++i) writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.input_item_dupe_counts[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -82450,12 +106544,12 @@ * @function encodeDelimited * @memberof CSOItemRecipe * @static - * @param {ICSOItemRecipe} message CSOItemRecipe message or plain object to encode + * @param {CSOItemRecipe.$Properties} message CSOItemRecipe message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOItemRecipe.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOItemRecipe.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -82465,90 +106559,162 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOItemRecipe} CSOItemRecipe + * @returns {CSOItemRecipe & CSOItemRecipe.$Shape} CSOItemRecipe * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemRecipe.decode = function decode(reader, length) { + CSOItemRecipe.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOItemRecipe(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOItemRecipe(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.def_index = reader.uint32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - message.name = reader.string(); - break; - case 3: - message.n_a = reader.string(); - break; - case 4: - message.desc_inputs = reader.string(); - break; - case 5: - message.desc_outputs = reader.string(); - break; - case 6: - message.di_a = reader.string(); - break; - case 7: - message.di_b = reader.string(); - break; - case 8: - message.di_c = reader.string(); - break; - case 9: - message.do_a = reader.string(); - break; - case 10: - message.do_b = reader.string(); - break; - case 11: - message.do_c = reader.string(); - break; - case 12: - message.requires_all_same_class = reader.bool(); - break; - case 13: - message.requires_all_same_slot = reader.bool(); - break; - case 14: - message.class_usage_for_output = reader.int32(); - break; - case 15: - message.slot_usage_for_output = reader.int32(); - break; - case 16: - message.set_for_output = reader.int32(); - break; - case 20: - if (!(message.input_items_criteria && message.input_items_criteria.length)) - message.input_items_criteria = []; - message.input_items_criteria.push($root.CSOItemCriteria.decode(reader, reader.uint32())); - break; - case 21: - if (!(message.output_items_criteria && message.output_items_criteria.length)) - message.output_items_criteria = []; - message.output_items_criteria.push($root.CSOItemCriteria.decode(reader, reader.uint32())); - break; - case 22: - if (!(message.input_item_dupe_counts && message.input_item_dupe_counts.length)) - message.input_item_dupe_counts = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.input_item_dupe_counts.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.def_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.n_a = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.desc_inputs = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.desc_outputs = reader.string(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.di_a = reader.string(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.di_b = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.di_c = reader.string(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.do_a = reader.string(); + continue; + } + case 10: { + if (wireType !== 2) + break; + message.do_b = reader.string(); + continue; + } + case 11: { + if (wireType !== 2) + break; + message.do_c = reader.string(); + continue; + } + case 12: { + if (wireType !== 0) + break; + message.requires_all_same_class = reader.bool(); + continue; + } + case 13: { + if (wireType !== 0) + break; + message.requires_all_same_slot = reader.bool(); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.class_usage_for_output = reader.int32(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.slot_usage_for_output = reader.int32(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.set_for_output = reader.int32(); + continue; + } + case 20: { + if (wireType !== 2) + break; + if (!(message.input_items_criteria && message.input_items_criteria.length)) + message.input_items_criteria = []; + message.input_items_criteria.push($root.CSOItemCriteria.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 21: { + if (wireType !== 2) + break; + if (!(message.output_items_criteria && message.output_items_criteria.length)) + message.output_items_criteria = []; + message.output_items_criteria.push($root.CSOItemCriteria.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 22: { + if (wireType === 2) { + if (!(message.input_item_dupe_counts && message.input_item_dupe_counts.length)) + message.input_item_dupe_counts = []; + reader.uint32s(message.input_item_dupe_counts); + continue; + } + if (wireType !== 0) + break; + if (!(message.input_item_dupe_counts && message.input_item_dupe_counts.length)) + message.input_item_dupe_counts = []; message.input_item_dupe_counts.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -82558,11 +106724,11 @@ * @memberof CSOItemRecipe * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOItemRecipe} CSOItemRecipe + * @returns {CSOItemRecipe & CSOItemRecipe.$Shape} CSOItemRecipe * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOItemRecipe.decodeDelimited = function decodeDelimited(reader) { + CSOItemRecipe.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -82576,77 +106742,81 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOItemRecipe.verify = function verify(message) { + CSOItemRecipe.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) if (!$util.isInteger(message.def_index)) return "def_index: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.n_a != null && message.hasOwnProperty("n_a")) + if (message.n_a != null && $Object.hasOwnProperty.call(message, "n_a")) if (!$util.isString(message.n_a)) return "n_a: string expected"; - if (message.desc_inputs != null && message.hasOwnProperty("desc_inputs")) + if (message.desc_inputs != null && $Object.hasOwnProperty.call(message, "desc_inputs")) if (!$util.isString(message.desc_inputs)) return "desc_inputs: string expected"; - if (message.desc_outputs != null && message.hasOwnProperty("desc_outputs")) + if (message.desc_outputs != null && $Object.hasOwnProperty.call(message, "desc_outputs")) if (!$util.isString(message.desc_outputs)) return "desc_outputs: string expected"; - if (message.di_a != null && message.hasOwnProperty("di_a")) + if (message.di_a != null && $Object.hasOwnProperty.call(message, "di_a")) if (!$util.isString(message.di_a)) return "di_a: string expected"; - if (message.di_b != null && message.hasOwnProperty("di_b")) + if (message.di_b != null && $Object.hasOwnProperty.call(message, "di_b")) if (!$util.isString(message.di_b)) return "di_b: string expected"; - if (message.di_c != null && message.hasOwnProperty("di_c")) + if (message.di_c != null && $Object.hasOwnProperty.call(message, "di_c")) if (!$util.isString(message.di_c)) return "di_c: string expected"; - if (message.do_a != null && message.hasOwnProperty("do_a")) + if (message.do_a != null && $Object.hasOwnProperty.call(message, "do_a")) if (!$util.isString(message.do_a)) return "do_a: string expected"; - if (message.do_b != null && message.hasOwnProperty("do_b")) + if (message.do_b != null && $Object.hasOwnProperty.call(message, "do_b")) if (!$util.isString(message.do_b)) return "do_b: string expected"; - if (message.do_c != null && message.hasOwnProperty("do_c")) + if (message.do_c != null && $Object.hasOwnProperty.call(message, "do_c")) if (!$util.isString(message.do_c)) return "do_c: string expected"; - if (message.requires_all_same_class != null && message.hasOwnProperty("requires_all_same_class")) + if (message.requires_all_same_class != null && $Object.hasOwnProperty.call(message, "requires_all_same_class")) if (typeof message.requires_all_same_class !== "boolean") return "requires_all_same_class: boolean expected"; - if (message.requires_all_same_slot != null && message.hasOwnProperty("requires_all_same_slot")) + if (message.requires_all_same_slot != null && $Object.hasOwnProperty.call(message, "requires_all_same_slot")) if (typeof message.requires_all_same_slot !== "boolean") return "requires_all_same_slot: boolean expected"; - if (message.class_usage_for_output != null && message.hasOwnProperty("class_usage_for_output")) + if (message.class_usage_for_output != null && $Object.hasOwnProperty.call(message, "class_usage_for_output")) if (!$util.isInteger(message.class_usage_for_output)) return "class_usage_for_output: integer expected"; - if (message.slot_usage_for_output != null && message.hasOwnProperty("slot_usage_for_output")) + if (message.slot_usage_for_output != null && $Object.hasOwnProperty.call(message, "slot_usage_for_output")) if (!$util.isInteger(message.slot_usage_for_output)) return "slot_usage_for_output: integer expected"; - if (message.set_for_output != null && message.hasOwnProperty("set_for_output")) + if (message.set_for_output != null && $Object.hasOwnProperty.call(message, "set_for_output")) if (!$util.isInteger(message.set_for_output)) return "set_for_output: integer expected"; - if (message.input_items_criteria != null && message.hasOwnProperty("input_items_criteria")) { - if (!Array.isArray(message.input_items_criteria)) + if (message.input_items_criteria != null && $Object.hasOwnProperty.call(message, "input_items_criteria")) { + if (!$Array.isArray(message.input_items_criteria)) return "input_items_criteria: array expected"; for (var i = 0; i < message.input_items_criteria.length; ++i) { - var error = $root.CSOItemCriteria.verify(message.input_items_criteria[i]); + var error = $root.CSOItemCriteria.verify(message.input_items_criteria[i], _depth + 1); if (error) return "input_items_criteria." + error; } } - if (message.output_items_criteria != null && message.hasOwnProperty("output_items_criteria")) { - if (!Array.isArray(message.output_items_criteria)) + if (message.output_items_criteria != null && $Object.hasOwnProperty.call(message, "output_items_criteria")) { + if (!$Array.isArray(message.output_items_criteria)) return "output_items_criteria: array expected"; for (var i = 0; i < message.output_items_criteria.length; ++i) { - var error = $root.CSOItemCriteria.verify(message.output_items_criteria[i]); + var error = $root.CSOItemCriteria.verify(message.output_items_criteria[i], _depth + 1); if (error) return "output_items_criteria." + error; } } - if (message.input_item_dupe_counts != null && message.hasOwnProperty("input_item_dupe_counts")) { - if (!Array.isArray(message.input_item_dupe_counts)) + if (message.input_item_dupe_counts != null && $Object.hasOwnProperty.call(message, "input_item_dupe_counts")) { + if (!$Array.isArray(message.input_item_dupe_counts)) return "input_item_dupe_counts: array expected"; for (var i = 0; i < message.input_item_dupe_counts.length; ++i) if (!$util.isInteger(message.input_item_dupe_counts[i])) @@ -82663,36 +106833,42 @@ * @param {Object.} object Plain object * @returns {CSOItemRecipe} CSOItemRecipe */ - CSOItemRecipe.fromObject = function fromObject(object) { + CSOItemRecipe.fromObject = function (object, _depth) { if (object instanceof $root.CSOItemRecipe) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOItemRecipe: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOItemRecipe(); if (object.def_index != null) message.def_index = object.def_index >>> 0; if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.n_a != null) - message.n_a = String(object.n_a); + message.n_a = $String(object.n_a); if (object.desc_inputs != null) - message.desc_inputs = String(object.desc_inputs); + message.desc_inputs = $String(object.desc_inputs); if (object.desc_outputs != null) - message.desc_outputs = String(object.desc_outputs); + message.desc_outputs = $String(object.desc_outputs); if (object.di_a != null) - message.di_a = String(object.di_a); + message.di_a = $String(object.di_a); if (object.di_b != null) - message.di_b = String(object.di_b); + message.di_b = $String(object.di_b); if (object.di_c != null) - message.di_c = String(object.di_c); + message.di_c = $String(object.di_c); if (object.do_a != null) - message.do_a = String(object.do_a); + message.do_a = $String(object.do_a); if (object.do_b != null) - message.do_b = String(object.do_b); + message.do_b = $String(object.do_b); if (object.do_c != null) - message.do_c = String(object.do_c); + message.do_c = $String(object.do_c); if (object.requires_all_same_class != null) - message.requires_all_same_class = Boolean(object.requires_all_same_class); + message.requires_all_same_class = $Boolean(object.requires_all_same_class); if (object.requires_all_same_slot != null) - message.requires_all_same_slot = Boolean(object.requires_all_same_slot); + message.requires_all_same_slot = $Boolean(object.requires_all_same_slot); if (object.class_usage_for_output != null) message.class_usage_for_output = object.class_usage_for_output | 0; if (object.slot_usage_for_output != null) @@ -82700,29 +106876,29 @@ if (object.set_for_output != null) message.set_for_output = object.set_for_output | 0; if (object.input_items_criteria) { - if (!Array.isArray(object.input_items_criteria)) - throw TypeError(".CSOItemRecipe.input_items_criteria: array expected"); - message.input_items_criteria = []; + if (!$Array.isArray(object.input_items_criteria)) + throw $TypeError(".CSOItemRecipe.input_items_criteria: array expected"); + message.input_items_criteria = $Array(object.input_items_criteria.length); for (var i = 0; i < object.input_items_criteria.length; ++i) { - if (typeof object.input_items_criteria[i] !== "object") - throw TypeError(".CSOItemRecipe.input_items_criteria: object expected"); - message.input_items_criteria[i] = $root.CSOItemCriteria.fromObject(object.input_items_criteria[i]); + if (!$util.isObject(object.input_items_criteria[i])) + throw $TypeError(".CSOItemRecipe.input_items_criteria: object expected"); + message.input_items_criteria[i] = $root.CSOItemCriteria.fromObject(object.input_items_criteria[i], _depth + 1); } } if (object.output_items_criteria) { - if (!Array.isArray(object.output_items_criteria)) - throw TypeError(".CSOItemRecipe.output_items_criteria: array expected"); - message.output_items_criteria = []; + if (!$Array.isArray(object.output_items_criteria)) + throw $TypeError(".CSOItemRecipe.output_items_criteria: array expected"); + message.output_items_criteria = $Array(object.output_items_criteria.length); for (var i = 0; i < object.output_items_criteria.length; ++i) { - if (typeof object.output_items_criteria[i] !== "object") - throw TypeError(".CSOItemRecipe.output_items_criteria: object expected"); - message.output_items_criteria[i] = $root.CSOItemCriteria.fromObject(object.output_items_criteria[i]); + if (!$util.isObject(object.output_items_criteria[i])) + throw $TypeError(".CSOItemRecipe.output_items_criteria: object expected"); + message.output_items_criteria[i] = $root.CSOItemCriteria.fromObject(object.output_items_criteria[i], _depth + 1); } } if (object.input_item_dupe_counts) { - if (!Array.isArray(object.input_item_dupe_counts)) - throw TypeError(".CSOItemRecipe.input_item_dupe_counts: array expected"); - message.input_item_dupe_counts = []; + if (!$Array.isArray(object.input_item_dupe_counts)) + throw $TypeError(".CSOItemRecipe.input_item_dupe_counts: array expected"); + message.input_item_dupe_counts = $Array(object.input_item_dupe_counts.length); for (var i = 0; i < object.input_item_dupe_counts.length; ++i) message.input_item_dupe_counts[i] = object.input_item_dupe_counts[i] >>> 0; } @@ -82738,9 +106914,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOItemRecipe.toObject = function toObject(message, options) { + CSOItemRecipe.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.input_items_criteria = []; @@ -82765,50 +106945,50 @@ object.slot_usage_for_output = 0; object.set_for_output = 0; } - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) object.def_index = message.def_index; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.n_a != null && message.hasOwnProperty("n_a")) + if (message.n_a != null && $Object.hasOwnProperty.call(message, "n_a")) object.n_a = message.n_a; - if (message.desc_inputs != null && message.hasOwnProperty("desc_inputs")) + if (message.desc_inputs != null && $Object.hasOwnProperty.call(message, "desc_inputs")) object.desc_inputs = message.desc_inputs; - if (message.desc_outputs != null && message.hasOwnProperty("desc_outputs")) + if (message.desc_outputs != null && $Object.hasOwnProperty.call(message, "desc_outputs")) object.desc_outputs = message.desc_outputs; - if (message.di_a != null && message.hasOwnProperty("di_a")) + if (message.di_a != null && $Object.hasOwnProperty.call(message, "di_a")) object.di_a = message.di_a; - if (message.di_b != null && message.hasOwnProperty("di_b")) + if (message.di_b != null && $Object.hasOwnProperty.call(message, "di_b")) object.di_b = message.di_b; - if (message.di_c != null && message.hasOwnProperty("di_c")) + if (message.di_c != null && $Object.hasOwnProperty.call(message, "di_c")) object.di_c = message.di_c; - if (message.do_a != null && message.hasOwnProperty("do_a")) + if (message.do_a != null && $Object.hasOwnProperty.call(message, "do_a")) object.do_a = message.do_a; - if (message.do_b != null && message.hasOwnProperty("do_b")) + if (message.do_b != null && $Object.hasOwnProperty.call(message, "do_b")) object.do_b = message.do_b; - if (message.do_c != null && message.hasOwnProperty("do_c")) + if (message.do_c != null && $Object.hasOwnProperty.call(message, "do_c")) object.do_c = message.do_c; - if (message.requires_all_same_class != null && message.hasOwnProperty("requires_all_same_class")) + if (message.requires_all_same_class != null && $Object.hasOwnProperty.call(message, "requires_all_same_class")) object.requires_all_same_class = message.requires_all_same_class; - if (message.requires_all_same_slot != null && message.hasOwnProperty("requires_all_same_slot")) + if (message.requires_all_same_slot != null && $Object.hasOwnProperty.call(message, "requires_all_same_slot")) object.requires_all_same_slot = message.requires_all_same_slot; - if (message.class_usage_for_output != null && message.hasOwnProperty("class_usage_for_output")) + if (message.class_usage_for_output != null && $Object.hasOwnProperty.call(message, "class_usage_for_output")) object.class_usage_for_output = message.class_usage_for_output; - if (message.slot_usage_for_output != null && message.hasOwnProperty("slot_usage_for_output")) + if (message.slot_usage_for_output != null && $Object.hasOwnProperty.call(message, "slot_usage_for_output")) object.slot_usage_for_output = message.slot_usage_for_output; - if (message.set_for_output != null && message.hasOwnProperty("set_for_output")) + if (message.set_for_output != null && $Object.hasOwnProperty.call(message, "set_for_output")) object.set_for_output = message.set_for_output; if (message.input_items_criteria && message.input_items_criteria.length) { - object.input_items_criteria = []; + object.input_items_criteria = $Array(message.input_items_criteria.length); for (var j = 0; j < message.input_items_criteria.length; ++j) - object.input_items_criteria[j] = $root.CSOItemCriteria.toObject(message.input_items_criteria[j], options); + object.input_items_criteria[j] = $root.CSOItemCriteria.toObject(message.input_items_criteria[j], options, _depth + 1); } if (message.output_items_criteria && message.output_items_criteria.length) { - object.output_items_criteria = []; + object.output_items_criteria = $Array(message.output_items_criteria.length); for (var j = 0; j < message.output_items_criteria.length; ++j) - object.output_items_criteria[j] = $root.CSOItemCriteria.toObject(message.output_items_criteria[j], options); + object.output_items_criteria[j] = $root.CSOItemCriteria.toObject(message.output_items_criteria[j], options, _depth + 1); } if (message.input_item_dupe_counts && message.input_item_dupe_counts.length) { - object.input_item_dupe_counts = []; + object.input_item_dupe_counts = $Array(message.input_item_dupe_counts.length); for (var j = 0; j < message.input_item_dupe_counts.length; ++j) object.input_item_dupe_counts[j] = message.input_item_dupe_counts[j]; } @@ -82822,8 +107002,22 @@ * @instance * @returns {Object.} JSON object */ - CSOItemRecipe.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOItemRecipe.prototype.toJSON = function() { + return CSOItemRecipe.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOItemRecipe + * @function getTypeUrl + * @memberof CSOItemRecipe + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOItemRecipe.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOItemRecipe"; }; return CSOItemRecipe; @@ -82831,28 +107025,41 @@ $root.CMsgDevNewItemRequest = (function() { + /** + * Properties of a CMsgDevNewItemRequest. + * @typedef {Object} CMsgDevNewItemRequest.$Properties + * @property {number|Long|null} [receiver] CMsgDevNewItemRequest receiver + * @property {CSOItemCriteria.$Properties|null} [criteria] CMsgDevNewItemRequest criteria + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgDevNewItemRequest. * @exports ICMsgDevNewItemRequest * @interface ICMsgDevNewItemRequest - * @property {number|Long|null} [receiver] CMsgDevNewItemRequest receiver - * @property {ICSOItemCriteria|null} [criteria] CMsgDevNewItemRequest criteria + * @augments CMsgDevNewItemRequest.$Properties + * @deprecated Use CMsgDevNewItemRequest.$Properties instead. + */ + + /** + * Shape of a CMsgDevNewItemRequest. + * @typedef {CMsgDevNewItemRequest.$Properties} CMsgDevNewItemRequest.$Shape */ /** * Constructs a new CMsgDevNewItemRequest. * @exports CMsgDevNewItemRequest * @classdesc Represents a CMsgDevNewItemRequest. - * @implements ICMsgDevNewItemRequest * @constructor - * @param {ICMsgDevNewItemRequest=} [properties] Properties to set + * @param {CMsgDevNewItemRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgDevNewItemRequest(properties) { + var CMsgDevNewItemRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgDevNewItemRequest receiver. @@ -82860,11 +107067,11 @@ * @memberof CMsgDevNewItemRequest * @instance */ - CMsgDevNewItemRequest.prototype.receiver = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgDevNewItemRequest.prototype.receiver = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgDevNewItemRequest criteria. - * @member {ICSOItemCriteria|null|undefined} criteria + * @member {CSOItemCriteria.$Properties|null|undefined} criteria * @memberof CMsgDevNewItemRequest * @instance */ @@ -82875,10 +107082,14 @@ * @function create * @memberof CMsgDevNewItemRequest * @static - * @param {ICMsgDevNewItemRequest=} [properties] Properties to set + * @param {CMsgDevNewItemRequest.$Properties=} [properties] Properties to set * @returns {CMsgDevNewItemRequest} CMsgDevNewItemRequest instance + * @type {{ + * (properties: CMsgDevNewItemRequest.$Shape): CMsgDevNewItemRequest & CMsgDevNewItemRequest.$Shape; + * (properties?: CMsgDevNewItemRequest.$Properties): CMsgDevNewItemRequest; + * }} */ - CMsgDevNewItemRequest.create = function create(properties) { + CMsgDevNewItemRequest.create = function(properties) { return new CMsgDevNewItemRequest(properties); }; @@ -82887,17 +107098,24 @@ * @function encode * @memberof CMsgDevNewItemRequest * @static - * @param {ICMsgDevNewItemRequest} message CMsgDevNewItemRequest message or plain object to encode + * @param {CMsgDevNewItemRequest.$Properties} message CMsgDevNewItemRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDevNewItemRequest.encode = function encode(message, writer) { + CMsgDevNewItemRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.receiver); - if (message.criteria != null && Object.hasOwnProperty.call(message, "criteria")) - $root.CSOItemCriteria.encode(message.criteria, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.criteria != null && $Object.hasOwnProperty.call(message, "criteria")) + $root.CSOItemCriteria.encode(message.criteria, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -82906,12 +107124,12 @@ * @function encodeDelimited * @memberof CMsgDevNewItemRequest * @static - * @param {ICMsgDevNewItemRequest} message CMsgDevNewItemRequest message or plain object to encode + * @param {CMsgDevNewItemRequest.$Properties} message CMsgDevNewItemRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDevNewItemRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgDevNewItemRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -82921,28 +107139,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgDevNewItemRequest} CMsgDevNewItemRequest + * @returns {CMsgDevNewItemRequest & CMsgDevNewItemRequest.$Shape} CMsgDevNewItemRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDevNewItemRequest.decode = function decode(reader, length) { + CMsgDevNewItemRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgDevNewItemRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgDevNewItemRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.receiver = reader.fixed64(); - break; - case 2: - message.criteria = $root.CSOItemCriteria.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.receiver = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.criteria = $root.CSOItemCriteria.decode(reader, reader.uint32(), $undefined, _depth + 1, message.criteria); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -82952,11 +107190,11 @@ * @memberof CMsgDevNewItemRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgDevNewItemRequest} CMsgDevNewItemRequest + * @returns {CMsgDevNewItemRequest & CMsgDevNewItemRequest.$Shape} CMsgDevNewItemRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDevNewItemRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgDevNewItemRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -82970,14 +107208,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgDevNewItemRequest.verify = function verify(message) { + CMsgDevNewItemRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.receiver != null && message.hasOwnProperty("receiver")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) if (!$util.isInteger(message.receiver) && !(message.receiver && $util.isInteger(message.receiver.low) && $util.isInteger(message.receiver.high))) return "receiver: integer|Long expected"; - if (message.criteria != null && message.hasOwnProperty("criteria")) { - var error = $root.CSOItemCriteria.verify(message.criteria); + if (message.criteria != null && $Object.hasOwnProperty.call(message, "criteria")) { + var error = $root.CSOItemCriteria.verify(message.criteria, _depth + 1); if (error) return "criteria." + error; } @@ -82992,23 +107234,29 @@ * @param {Object.} object Plain object * @returns {CMsgDevNewItemRequest} CMsgDevNewItemRequest */ - CMsgDevNewItemRequest.fromObject = function fromObject(object) { + CMsgDevNewItemRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgDevNewItemRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgDevNewItemRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgDevNewItemRequest(); if (object.receiver != null) if ($util.Long) - (message.receiver = $util.Long.fromValue(object.receiver)).unsigned = false; + message.receiver = $util.Long.fromValue(object.receiver, true); else if (typeof object.receiver === "string") - message.receiver = parseInt(object.receiver, 10); + message.receiver = $parseInt(object.receiver, 10); else if (typeof object.receiver === "number") message.receiver = object.receiver; else if (typeof object.receiver === "object") - message.receiver = new $util.LongBits(object.receiver.low >>> 0, object.receiver.high >>> 0).toNumber(); + message.receiver = new $util.LongBits(object.receiver.low >>> 0, object.receiver.high >>> 0).toNumber(true); if (object.criteria != null) { - if (typeof object.criteria !== "object") - throw TypeError(".CMsgDevNewItemRequest.criteria: object expected"); - message.criteria = $root.CSOItemCriteria.fromObject(object.criteria); + if (!$util.isObject(object.criteria)) + throw $TypeError(".CMsgDevNewItemRequest.criteria: object expected"); + message.criteria = $root.CSOItemCriteria.fromObject(object.criteria, _depth + 1); } return message; }; @@ -83022,25 +107270,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgDevNewItemRequest.toObject = function toObject(message, options) { + CMsgDevNewItemRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.receiver = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.receiver = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.receiver = options.longs === String ? "0" : 0; + object.receiver = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.criteria = null; } - if (message.receiver != null && message.hasOwnProperty("receiver")) - if (typeof message.receiver === "number") - object.receiver = options.longs === String ? String(message.receiver) : message.receiver; + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.receiver = typeof message.receiver === "number" ? $BigInt(message.receiver) : $util.Long.fromBits(message.receiver.low >>> 0, message.receiver.high >>> 0, true).toBigInt(); + else if (typeof message.receiver === "number") + object.receiver = options.longs === $String ? $String(message.receiver) : message.receiver; else - object.receiver = options.longs === String ? $util.Long.prototype.toString.call(message.receiver) : options.longs === Number ? new $util.LongBits(message.receiver.low >>> 0, message.receiver.high >>> 0).toNumber() : message.receiver; - if (message.criteria != null && message.hasOwnProperty("criteria")) - object.criteria = $root.CSOItemCriteria.toObject(message.criteria, options); + object.receiver = options.longs === $String ? $util.Long.prototype.toString.call(message.receiver) : options.longs === $Number ? new $util.LongBits(message.receiver.low >>> 0, message.receiver.high >>> 0).toNumber(true) : message.receiver; + if (message.criteria != null && $Object.hasOwnProperty.call(message, "criteria")) + object.criteria = $root.CSOItemCriteria.toObject(message.criteria, options, _depth + 1); return object; }; @@ -83051,8 +107305,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgDevNewItemRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgDevNewItemRequest.prototype.toJSON = function() { + return CMsgDevNewItemRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgDevNewItemRequest + * @function getTypeUrl + * @memberof CMsgDevNewItemRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgDevNewItemRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgDevNewItemRequest"; }; return CMsgDevNewItemRequest; @@ -83062,26 +107330,39 @@ /** * Properties of a CMsgDevDebugRollLootRequest. - * @exports ICMsgDevDebugRollLootRequest - * @interface ICMsgDevDebugRollLootRequest + * @typedef {Object} CMsgDevDebugRollLootRequest.$Properties * @property {number|Long|null} [receiver] CMsgDevDebugRollLootRequest receiver * @property {string|null} [loot_list_name] CMsgDevDebugRollLootRequest loot_list_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgDevDebugRollLootRequest. + * @exports ICMsgDevDebugRollLootRequest + * @interface ICMsgDevDebugRollLootRequest + * @augments CMsgDevDebugRollLootRequest.$Properties + * @deprecated Use CMsgDevDebugRollLootRequest.$Properties instead. + */ + + /** + * Shape of a CMsgDevDebugRollLootRequest. + * @typedef {CMsgDevDebugRollLootRequest.$Properties} CMsgDevDebugRollLootRequest.$Shape */ /** * Constructs a new CMsgDevDebugRollLootRequest. * @exports CMsgDevDebugRollLootRequest * @classdesc Represents a CMsgDevDebugRollLootRequest. - * @implements ICMsgDevDebugRollLootRequest * @constructor - * @param {ICMsgDevDebugRollLootRequest=} [properties] Properties to set + * @param {CMsgDevDebugRollLootRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgDevDebugRollLootRequest(properties) { + var CMsgDevDebugRollLootRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgDevDebugRollLootRequest receiver. @@ -83089,7 +107370,7 @@ * @memberof CMsgDevDebugRollLootRequest * @instance */ - CMsgDevDebugRollLootRequest.prototype.receiver = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgDevDebugRollLootRequest.prototype.receiver = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgDevDebugRollLootRequest loot_list_name. @@ -83104,10 +107385,14 @@ * @function create * @memberof CMsgDevDebugRollLootRequest * @static - * @param {ICMsgDevDebugRollLootRequest=} [properties] Properties to set + * @param {CMsgDevDebugRollLootRequest.$Properties=} [properties] Properties to set * @returns {CMsgDevDebugRollLootRequest} CMsgDevDebugRollLootRequest instance + * @type {{ + * (properties: CMsgDevDebugRollLootRequest.$Shape): CMsgDevDebugRollLootRequest & CMsgDevDebugRollLootRequest.$Shape; + * (properties?: CMsgDevDebugRollLootRequest.$Properties): CMsgDevDebugRollLootRequest; + * }} */ - CMsgDevDebugRollLootRequest.create = function create(properties) { + CMsgDevDebugRollLootRequest.create = function(properties) { return new CMsgDevDebugRollLootRequest(properties); }; @@ -83116,17 +107401,24 @@ * @function encode * @memberof CMsgDevDebugRollLootRequest * @static - * @param {ICMsgDevDebugRollLootRequest} message CMsgDevDebugRollLootRequest message or plain object to encode + * @param {CMsgDevDebugRollLootRequest.$Properties} message CMsgDevDebugRollLootRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDevDebugRollLootRequest.encode = function encode(message, writer) { + CMsgDevDebugRollLootRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.receiver); - if (message.loot_list_name != null && Object.hasOwnProperty.call(message, "loot_list_name")) + if (message.loot_list_name != null && $Object.hasOwnProperty.call(message, "loot_list_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.loot_list_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -83135,12 +107427,12 @@ * @function encodeDelimited * @memberof CMsgDevDebugRollLootRequest * @static - * @param {ICMsgDevDebugRollLootRequest} message CMsgDevDebugRollLootRequest message or plain object to encode + * @param {CMsgDevDebugRollLootRequest.$Properties} message CMsgDevDebugRollLootRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDevDebugRollLootRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgDevDebugRollLootRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -83150,28 +107442,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgDevDebugRollLootRequest} CMsgDevDebugRollLootRequest + * @returns {CMsgDevDebugRollLootRequest & CMsgDevDebugRollLootRequest.$Shape} CMsgDevDebugRollLootRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDevDebugRollLootRequest.decode = function decode(reader, length) { + CMsgDevDebugRollLootRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgDevDebugRollLootRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgDevDebugRollLootRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.receiver = reader.fixed64(); - break; - case 2: - message.loot_list_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.receiver = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.loot_list_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -83181,11 +107493,11 @@ * @memberof CMsgDevDebugRollLootRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgDevDebugRollLootRequest} CMsgDevDebugRollLootRequest + * @returns {CMsgDevDebugRollLootRequest & CMsgDevDebugRollLootRequest.$Shape} CMsgDevDebugRollLootRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDevDebugRollLootRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgDevDebugRollLootRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -83199,13 +107511,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgDevDebugRollLootRequest.verify = function verify(message) { + CMsgDevDebugRollLootRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.receiver != null && message.hasOwnProperty("receiver")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) if (!$util.isInteger(message.receiver) && !(message.receiver && $util.isInteger(message.receiver.low) && $util.isInteger(message.receiver.high))) return "receiver: integer|Long expected"; - if (message.loot_list_name != null && message.hasOwnProperty("loot_list_name")) + if (message.loot_list_name != null && $Object.hasOwnProperty.call(message, "loot_list_name")) if (!$util.isString(message.loot_list_name)) return "loot_list_name: string expected"; return null; @@ -83219,21 +107535,27 @@ * @param {Object.} object Plain object * @returns {CMsgDevDebugRollLootRequest} CMsgDevDebugRollLootRequest */ - CMsgDevDebugRollLootRequest.fromObject = function fromObject(object) { + CMsgDevDebugRollLootRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgDevDebugRollLootRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgDevDebugRollLootRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgDevDebugRollLootRequest(); if (object.receiver != null) if ($util.Long) - (message.receiver = $util.Long.fromValue(object.receiver)).unsigned = false; + message.receiver = $util.Long.fromValue(object.receiver, true); else if (typeof object.receiver === "string") - message.receiver = parseInt(object.receiver, 10); + message.receiver = $parseInt(object.receiver, 10); else if (typeof object.receiver === "number") message.receiver = object.receiver; else if (typeof object.receiver === "object") - message.receiver = new $util.LongBits(object.receiver.low >>> 0, object.receiver.high >>> 0).toNumber(); + message.receiver = new $util.LongBits(object.receiver.low >>> 0, object.receiver.high >>> 0).toNumber(true); if (object.loot_list_name != null) - message.loot_list_name = String(object.loot_list_name); + message.loot_list_name = $String(object.loot_list_name); return message; }; @@ -83246,24 +107568,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgDevDebugRollLootRequest.toObject = function toObject(message, options) { + CMsgDevDebugRollLootRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.receiver = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.receiver = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.receiver = options.longs === String ? "0" : 0; + object.receiver = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.loot_list_name = ""; } - if (message.receiver != null && message.hasOwnProperty("receiver")) - if (typeof message.receiver === "number") - object.receiver = options.longs === String ? String(message.receiver) : message.receiver; + if (message.receiver != null && $Object.hasOwnProperty.call(message, "receiver")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.receiver = typeof message.receiver === "number" ? $BigInt(message.receiver) : $util.Long.fromBits(message.receiver.low >>> 0, message.receiver.high >>> 0, true).toBigInt(); + else if (typeof message.receiver === "number") + object.receiver = options.longs === $String ? $String(message.receiver) : message.receiver; else - object.receiver = options.longs === String ? $util.Long.prototype.toString.call(message.receiver) : options.longs === Number ? new $util.LongBits(message.receiver.low >>> 0, message.receiver.high >>> 0).toNumber() : message.receiver; - if (message.loot_list_name != null && message.hasOwnProperty("loot_list_name")) + object.receiver = options.longs === $String ? $util.Long.prototype.toString.call(message.receiver) : options.longs === $Number ? new $util.LongBits(message.receiver.low >>> 0, message.receiver.high >>> 0).toNumber(true) : message.receiver; + if (message.loot_list_name != null && $Object.hasOwnProperty.call(message, "loot_list_name")) object.loot_list_name = message.loot_list_name; return object; }; @@ -83275,8 +107603,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgDevDebugRollLootRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgDevDebugRollLootRequest.prototype.toJSON = function() { + return CMsgDevDebugRollLootRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgDevDebugRollLootRequest + * @function getTypeUrl + * @memberof CMsgDevDebugRollLootRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgDevDebugRollLootRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgDevDebugRollLootRequest"; }; return CMsgDevDebugRollLootRequest; @@ -83286,29 +107628,42 @@ /** * Properties of a CMsgIncrementKillCountAttribute. - * @exports ICMsgIncrementKillCountAttribute - * @interface ICMsgIncrementKillCountAttribute + * @typedef {Object} CMsgIncrementKillCountAttribute.$Properties * @property {number|Long|null} [killer_steam_id] CMsgIncrementKillCountAttribute killer_steam_id * @property {number|Long|null} [victim_steam_id] CMsgIncrementKillCountAttribute victim_steam_id * @property {number|Long|null} [item_id] CMsgIncrementKillCountAttribute item_id * @property {number|null} [event_type] CMsgIncrementKillCountAttribute event_type * @property {number|null} [increment_value] CMsgIncrementKillCountAttribute increment_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgIncrementKillCountAttribute. + * @exports ICMsgIncrementKillCountAttribute + * @interface ICMsgIncrementKillCountAttribute + * @augments CMsgIncrementKillCountAttribute.$Properties + * @deprecated Use CMsgIncrementKillCountAttribute.$Properties instead. + */ + + /** + * Shape of a CMsgIncrementKillCountAttribute. + * @typedef {CMsgIncrementKillCountAttribute.$Properties} CMsgIncrementKillCountAttribute.$Shape */ /** * Constructs a new CMsgIncrementKillCountAttribute. * @exports CMsgIncrementKillCountAttribute * @classdesc Represents a CMsgIncrementKillCountAttribute. - * @implements ICMsgIncrementKillCountAttribute * @constructor - * @param {ICMsgIncrementKillCountAttribute=} [properties] Properties to set + * @param {CMsgIncrementKillCountAttribute.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgIncrementKillCountAttribute(properties) { + var CMsgIncrementKillCountAttribute = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgIncrementKillCountAttribute killer_steam_id. @@ -83355,10 +107710,14 @@ * @function create * @memberof CMsgIncrementKillCountAttribute * @static - * @param {ICMsgIncrementKillCountAttribute=} [properties] Properties to set + * @param {CMsgIncrementKillCountAttribute.$Properties=} [properties] Properties to set * @returns {CMsgIncrementKillCountAttribute} CMsgIncrementKillCountAttribute instance + * @type {{ + * (properties: CMsgIncrementKillCountAttribute.$Shape): CMsgIncrementKillCountAttribute & CMsgIncrementKillCountAttribute.$Shape; + * (properties?: CMsgIncrementKillCountAttribute.$Properties): CMsgIncrementKillCountAttribute; + * }} */ - CMsgIncrementKillCountAttribute.create = function create(properties) { + CMsgIncrementKillCountAttribute.create = function(properties) { return new CMsgIncrementKillCountAttribute(properties); }; @@ -83367,23 +107726,30 @@ * @function encode * @memberof CMsgIncrementKillCountAttribute * @static - * @param {ICMsgIncrementKillCountAttribute} message CMsgIncrementKillCountAttribute message or plain object to encode + * @param {CMsgIncrementKillCountAttribute.$Properties} message CMsgIncrementKillCountAttribute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgIncrementKillCountAttribute.encode = function encode(message, writer) { + CMsgIncrementKillCountAttribute.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.killer_steam_id != null && Object.hasOwnProperty.call(message, "killer_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.killer_steam_id); - if (message.victim_steam_id != null && Object.hasOwnProperty.call(message, "victim_steam_id")) + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.victim_steam_id); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.item_id); - if (message.event_type != null && Object.hasOwnProperty.call(message, "event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.event_type); - if (message.increment_value != null && Object.hasOwnProperty.call(message, "increment_value")) + if (message.increment_value != null && $Object.hasOwnProperty.call(message, "increment_value")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.increment_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -83392,12 +107758,12 @@ * @function encodeDelimited * @memberof CMsgIncrementKillCountAttribute * @static - * @param {ICMsgIncrementKillCountAttribute} message CMsgIncrementKillCountAttribute message or plain object to encode + * @param {CMsgIncrementKillCountAttribute.$Properties} message CMsgIncrementKillCountAttribute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgIncrementKillCountAttribute.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgIncrementKillCountAttribute.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -83407,37 +107773,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgIncrementKillCountAttribute} CMsgIncrementKillCountAttribute + * @returns {CMsgIncrementKillCountAttribute & CMsgIncrementKillCountAttribute.$Shape} CMsgIncrementKillCountAttribute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgIncrementKillCountAttribute.decode = function decode(reader, length) { + CMsgIncrementKillCountAttribute.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgIncrementKillCountAttribute(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgIncrementKillCountAttribute(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.killer_steam_id = reader.uint64(); - break; - case 2: - message.victim_steam_id = reader.uint64(); - break; - case 3: - message.item_id = reader.uint64(); - break; - case 4: - message.event_type = reader.uint32(); - break; - case 5: - message.increment_value = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.killer_steam_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.victim_steam_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.event_type = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.increment_value = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -83447,11 +107842,11 @@ * @memberof CMsgIncrementKillCountAttribute * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgIncrementKillCountAttribute} CMsgIncrementKillCountAttribute + * @returns {CMsgIncrementKillCountAttribute & CMsgIncrementKillCountAttribute.$Shape} CMsgIncrementKillCountAttribute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgIncrementKillCountAttribute.decodeDelimited = function decodeDelimited(reader) { + CMsgIncrementKillCountAttribute.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -83465,22 +107860,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgIncrementKillCountAttribute.verify = function verify(message) { + CMsgIncrementKillCountAttribute.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.killer_steam_id != null && message.hasOwnProperty("killer_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) if (!$util.isInteger(message.killer_steam_id) && !(message.killer_steam_id && $util.isInteger(message.killer_steam_id.low) && $util.isInteger(message.killer_steam_id.high))) return "killer_steam_id: integer|Long expected"; - if (message.victim_steam_id != null && message.hasOwnProperty("victim_steam_id")) + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) if (!$util.isInteger(message.victim_steam_id) && !(message.victim_steam_id && $util.isInteger(message.victim_steam_id.low) && $util.isInteger(message.victim_steam_id.high))) return "victim_steam_id: integer|Long expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) if (!$util.isInteger(message.event_type)) return "event_type: integer expected"; - if (message.increment_value != null && message.hasOwnProperty("increment_value")) + if (message.increment_value != null && $Object.hasOwnProperty.call(message, "increment_value")) if (!$util.isInteger(message.increment_value)) return "increment_value: integer expected"; return null; @@ -83494,33 +107893,39 @@ * @param {Object.} object Plain object * @returns {CMsgIncrementKillCountAttribute} CMsgIncrementKillCountAttribute */ - CMsgIncrementKillCountAttribute.fromObject = function fromObject(object) { + CMsgIncrementKillCountAttribute.fromObject = function (object, _depth) { if (object instanceof $root.CMsgIncrementKillCountAttribute) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgIncrementKillCountAttribute: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgIncrementKillCountAttribute(); if (object.killer_steam_id != null) if ($util.Long) - (message.killer_steam_id = $util.Long.fromValue(object.killer_steam_id)).unsigned = true; + message.killer_steam_id = $util.Long.fromValue(object.killer_steam_id, true); else if (typeof object.killer_steam_id === "string") - message.killer_steam_id = parseInt(object.killer_steam_id, 10); + message.killer_steam_id = $parseInt(object.killer_steam_id, 10); else if (typeof object.killer_steam_id === "number") message.killer_steam_id = object.killer_steam_id; else if (typeof object.killer_steam_id === "object") message.killer_steam_id = new $util.LongBits(object.killer_steam_id.low >>> 0, object.killer_steam_id.high >>> 0).toNumber(true); if (object.victim_steam_id != null) if ($util.Long) - (message.victim_steam_id = $util.Long.fromValue(object.victim_steam_id)).unsigned = true; + message.victim_steam_id = $util.Long.fromValue(object.victim_steam_id, true); else if (typeof object.victim_steam_id === "string") - message.victim_steam_id = parseInt(object.victim_steam_id, 10); + message.victim_steam_id = $parseInt(object.victim_steam_id, 10); else if (typeof object.victim_steam_id === "number") message.victim_steam_id = object.victim_steam_id; else if (typeof object.victim_steam_id === "object") message.victim_steam_id = new $util.LongBits(object.victim_steam_id.low >>> 0, object.victim_steam_id.high >>> 0).toNumber(true); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -83541,47 +107946,57 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgIncrementKillCountAttribute.toObject = function toObject(message, options) { + CMsgIncrementKillCountAttribute.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.killer_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.killer_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.killer_steam_id = options.longs === String ? "0" : 0; + object.killer_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.victim_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.victim_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.victim_steam_id = options.longs === String ? "0" : 0; + object.victim_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.event_type = 0; object.increment_value = 0; } - if (message.killer_steam_id != null && message.hasOwnProperty("killer_steam_id")) - if (typeof message.killer_steam_id === "number") - object.killer_steam_id = options.longs === String ? String(message.killer_steam_id) : message.killer_steam_id; + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.killer_steam_id = typeof message.killer_steam_id === "number" ? $BigInt(message.killer_steam_id) : $util.Long.fromBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.killer_steam_id === "number") + object.killer_steam_id = options.longs === $String ? $String(message.killer_steam_id) : message.killer_steam_id; else - object.killer_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.killer_steam_id) : options.longs === Number ? new $util.LongBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0).toNumber(true) : message.killer_steam_id; - if (message.victim_steam_id != null && message.hasOwnProperty("victim_steam_id")) - if (typeof message.victim_steam_id === "number") - object.victim_steam_id = options.longs === String ? String(message.victim_steam_id) : message.victim_steam_id; + object.killer_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.killer_steam_id) : options.longs === $Number ? new $util.LongBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0).toNumber(true) : message.killer_steam_id; + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.victim_steam_id = typeof message.victim_steam_id === "number" ? $BigInt(message.victim_steam_id) : $util.Long.fromBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.victim_steam_id === "number") + object.victim_steam_id = options.longs === $String ? $String(message.victim_steam_id) : message.victim_steam_id; else - object.victim_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.victim_steam_id) : options.longs === Number ? new $util.LongBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0).toNumber(true) : message.victim_steam_id; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + object.victim_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.victim_steam_id) : options.longs === $Number ? new $util.LongBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0).toNumber(true) : message.victim_steam_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.event_type != null && message.hasOwnProperty("event_type")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) object.event_type = message.event_type; - if (message.increment_value != null && message.hasOwnProperty("increment_value")) + if (message.increment_value != null && $Object.hasOwnProperty.call(message, "increment_value")) object.increment_value = message.increment_value; return object; }; @@ -83593,8 +108008,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgIncrementKillCountAttribute.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgIncrementKillCountAttribute.prototype.toJSON = function() { + return CMsgIncrementKillCountAttribute.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgIncrementKillCountAttribute + * @function getTypeUrl + * @memberof CMsgIncrementKillCountAttribute + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgIncrementKillCountAttribute.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgIncrementKillCountAttribute"; }; return CMsgIncrementKillCountAttribute; @@ -83602,32 +108031,45 @@ $root.CMsgIncrementKillCountAttribute_Multiple = (function() { + /** + * Properties of a CMsgIncrementKillCountAttribute_Multiple. + * @typedef {Object} CMsgIncrementKillCountAttribute_Multiple.$Properties + * @property {Array.|null} [msgs] CMsgIncrementKillCountAttribute_Multiple msgs + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgIncrementKillCountAttribute_Multiple. * @exports ICMsgIncrementKillCountAttribute_Multiple * @interface ICMsgIncrementKillCountAttribute_Multiple - * @property {Array.|null} [msgs] CMsgIncrementKillCountAttribute_Multiple msgs + * @augments CMsgIncrementKillCountAttribute_Multiple.$Properties + * @deprecated Use CMsgIncrementKillCountAttribute_Multiple.$Properties instead. + */ + + /** + * Shape of a CMsgIncrementKillCountAttribute_Multiple. + * @typedef {CMsgIncrementKillCountAttribute_Multiple.$Properties} CMsgIncrementKillCountAttribute_Multiple.$Shape */ /** * Constructs a new CMsgIncrementKillCountAttribute_Multiple. * @exports CMsgIncrementKillCountAttribute_Multiple * @classdesc Represents a CMsgIncrementKillCountAttribute_Multiple. - * @implements ICMsgIncrementKillCountAttribute_Multiple * @constructor - * @param {ICMsgIncrementKillCountAttribute_Multiple=} [properties] Properties to set + * @param {CMsgIncrementKillCountAttribute_Multiple.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgIncrementKillCountAttribute_Multiple(properties) { + var CMsgIncrementKillCountAttribute_Multiple = function (properties) { this.msgs = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgIncrementKillCountAttribute_Multiple msgs. - * @member {Array.} msgs + * @member {Array.} msgs * @memberof CMsgIncrementKillCountAttribute_Multiple * @instance */ @@ -83638,10 +108080,14 @@ * @function create * @memberof CMsgIncrementKillCountAttribute_Multiple * @static - * @param {ICMsgIncrementKillCountAttribute_Multiple=} [properties] Properties to set + * @param {CMsgIncrementKillCountAttribute_Multiple.$Properties=} [properties] Properties to set * @returns {CMsgIncrementKillCountAttribute_Multiple} CMsgIncrementKillCountAttribute_Multiple instance + * @type {{ + * (properties: CMsgIncrementKillCountAttribute_Multiple.$Shape): CMsgIncrementKillCountAttribute_Multiple & CMsgIncrementKillCountAttribute_Multiple.$Shape; + * (properties?: CMsgIncrementKillCountAttribute_Multiple.$Properties): CMsgIncrementKillCountAttribute_Multiple; + * }} */ - CMsgIncrementKillCountAttribute_Multiple.create = function create(properties) { + CMsgIncrementKillCountAttribute_Multiple.create = function(properties) { return new CMsgIncrementKillCountAttribute_Multiple(properties); }; @@ -83650,16 +108096,23 @@ * @function encode * @memberof CMsgIncrementKillCountAttribute_Multiple * @static - * @param {ICMsgIncrementKillCountAttribute_Multiple} message CMsgIncrementKillCountAttribute_Multiple message or plain object to encode + * @param {CMsgIncrementKillCountAttribute_Multiple.$Properties} message CMsgIncrementKillCountAttribute_Multiple message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgIncrementKillCountAttribute_Multiple.encode = function encode(message, writer) { + CMsgIncrementKillCountAttribute_Multiple.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.msgs != null && message.msgs.length) for (var i = 0; i < message.msgs.length; ++i) - $root.CMsgIncrementKillCountAttribute.encode(message.msgs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgIncrementKillCountAttribute.encode(message.msgs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -83668,12 +108121,12 @@ * @function encodeDelimited * @memberof CMsgIncrementKillCountAttribute_Multiple * @static - * @param {ICMsgIncrementKillCountAttribute_Multiple} message CMsgIncrementKillCountAttribute_Multiple message or plain object to encode + * @param {CMsgIncrementKillCountAttribute_Multiple.$Properties} message CMsgIncrementKillCountAttribute_Multiple message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgIncrementKillCountAttribute_Multiple.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgIncrementKillCountAttribute_Multiple.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -83683,27 +108136,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgIncrementKillCountAttribute_Multiple} CMsgIncrementKillCountAttribute_Multiple + * @returns {CMsgIncrementKillCountAttribute_Multiple & CMsgIncrementKillCountAttribute_Multiple.$Shape} CMsgIncrementKillCountAttribute_Multiple * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgIncrementKillCountAttribute_Multiple.decode = function decode(reader, length) { + CMsgIncrementKillCountAttribute_Multiple.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgIncrementKillCountAttribute_Multiple(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgIncrementKillCountAttribute_Multiple(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.msgs && message.msgs.length)) - message.msgs = []; - message.msgs.push($root.CMsgIncrementKillCountAttribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.msgs && message.msgs.length)) + message.msgs = []; + message.msgs.push($root.CMsgIncrementKillCountAttribute.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -83713,11 +108183,11 @@ * @memberof CMsgIncrementKillCountAttribute_Multiple * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgIncrementKillCountAttribute_Multiple} CMsgIncrementKillCountAttribute_Multiple + * @returns {CMsgIncrementKillCountAttribute_Multiple & CMsgIncrementKillCountAttribute_Multiple.$Shape} CMsgIncrementKillCountAttribute_Multiple * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgIncrementKillCountAttribute_Multiple.decodeDelimited = function decodeDelimited(reader) { + CMsgIncrementKillCountAttribute_Multiple.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -83731,14 +108201,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgIncrementKillCountAttribute_Multiple.verify = function verify(message) { + CMsgIncrementKillCountAttribute_Multiple.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.msgs != null && message.hasOwnProperty("msgs")) { - if (!Array.isArray(message.msgs)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.msgs != null && $Object.hasOwnProperty.call(message, "msgs")) { + if (!$Array.isArray(message.msgs)) return "msgs: array expected"; for (var i = 0; i < message.msgs.length; ++i) { - var error = $root.CMsgIncrementKillCountAttribute.verify(message.msgs[i]); + var error = $root.CMsgIncrementKillCountAttribute.verify(message.msgs[i], _depth + 1); if (error) return "msgs." + error; } @@ -83754,18 +108228,24 @@ * @param {Object.} object Plain object * @returns {CMsgIncrementKillCountAttribute_Multiple} CMsgIncrementKillCountAttribute_Multiple */ - CMsgIncrementKillCountAttribute_Multiple.fromObject = function fromObject(object) { + CMsgIncrementKillCountAttribute_Multiple.fromObject = function (object, _depth) { if (object instanceof $root.CMsgIncrementKillCountAttribute_Multiple) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgIncrementKillCountAttribute_Multiple: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgIncrementKillCountAttribute_Multiple(); if (object.msgs) { - if (!Array.isArray(object.msgs)) - throw TypeError(".CMsgIncrementKillCountAttribute_Multiple.msgs: array expected"); - message.msgs = []; + if (!$Array.isArray(object.msgs)) + throw $TypeError(".CMsgIncrementKillCountAttribute_Multiple.msgs: array expected"); + message.msgs = $Array(object.msgs.length); for (var i = 0; i < object.msgs.length; ++i) { - if (typeof object.msgs[i] !== "object") - throw TypeError(".CMsgIncrementKillCountAttribute_Multiple.msgs: object expected"); - message.msgs[i] = $root.CMsgIncrementKillCountAttribute.fromObject(object.msgs[i]); + if (!$util.isObject(object.msgs[i])) + throw $TypeError(".CMsgIncrementKillCountAttribute_Multiple.msgs: object expected"); + message.msgs[i] = $root.CMsgIncrementKillCountAttribute.fromObject(object.msgs[i], _depth + 1); } } return message; @@ -83780,16 +108260,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgIncrementKillCountAttribute_Multiple.toObject = function toObject(message, options) { + CMsgIncrementKillCountAttribute_Multiple.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.msgs = []; if (message.msgs && message.msgs.length) { - object.msgs = []; + object.msgs = $Array(message.msgs.length); for (var j = 0; j < message.msgs.length; ++j) - object.msgs[j] = $root.CMsgIncrementKillCountAttribute.toObject(message.msgs[j], options); + object.msgs[j] = $root.CMsgIncrementKillCountAttribute.toObject(message.msgs[j], options, _depth + 1); } return object; }; @@ -83801,8 +108285,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgIncrementKillCountAttribute_Multiple.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgIncrementKillCountAttribute_Multiple.prototype.toJSON = function() { + return CMsgIncrementKillCountAttribute_Multiple.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgIncrementKillCountAttribute_Multiple + * @function getTypeUrl + * @memberof CMsgIncrementKillCountAttribute_Multiple + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgIncrementKillCountAttribute_Multiple.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgIncrementKillCountAttribute_Multiple"; }; return CMsgIncrementKillCountAttribute_Multiple; @@ -83812,28 +108310,41 @@ /** * Properties of a CMsgTrackUniquePlayerPairEvent. - * @exports ICMsgTrackUniquePlayerPairEvent - * @interface ICMsgTrackUniquePlayerPairEvent + * @typedef {Object} CMsgTrackUniquePlayerPairEvent.$Properties * @property {number|Long|null} [killer_steam_id] CMsgTrackUniquePlayerPairEvent killer_steam_id * @property {number|Long|null} [victim_steam_id] CMsgTrackUniquePlayerPairEvent victim_steam_id * @property {number|Long|null} [item_id] CMsgTrackUniquePlayerPairEvent item_id * @property {number|null} [event_type] CMsgTrackUniquePlayerPairEvent event_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgTrackUniquePlayerPairEvent. + * @exports ICMsgTrackUniquePlayerPairEvent + * @interface ICMsgTrackUniquePlayerPairEvent + * @augments CMsgTrackUniquePlayerPairEvent.$Properties + * @deprecated Use CMsgTrackUniquePlayerPairEvent.$Properties instead. + */ + + /** + * Shape of a CMsgTrackUniquePlayerPairEvent. + * @typedef {CMsgTrackUniquePlayerPairEvent.$Properties} CMsgTrackUniquePlayerPairEvent.$Shape */ /** * Constructs a new CMsgTrackUniquePlayerPairEvent. * @exports CMsgTrackUniquePlayerPairEvent * @classdesc Represents a CMsgTrackUniquePlayerPairEvent. - * @implements ICMsgTrackUniquePlayerPairEvent * @constructor - * @param {ICMsgTrackUniquePlayerPairEvent=} [properties] Properties to set + * @param {CMsgTrackUniquePlayerPairEvent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgTrackUniquePlayerPairEvent(properties) { + var CMsgTrackUniquePlayerPairEvent = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgTrackUniquePlayerPairEvent killer_steam_id. @@ -83872,10 +108383,14 @@ * @function create * @memberof CMsgTrackUniquePlayerPairEvent * @static - * @param {ICMsgTrackUniquePlayerPairEvent=} [properties] Properties to set + * @param {CMsgTrackUniquePlayerPairEvent.$Properties=} [properties] Properties to set * @returns {CMsgTrackUniquePlayerPairEvent} CMsgTrackUniquePlayerPairEvent instance + * @type {{ + * (properties: CMsgTrackUniquePlayerPairEvent.$Shape): CMsgTrackUniquePlayerPairEvent & CMsgTrackUniquePlayerPairEvent.$Shape; + * (properties?: CMsgTrackUniquePlayerPairEvent.$Properties): CMsgTrackUniquePlayerPairEvent; + * }} */ - CMsgTrackUniquePlayerPairEvent.create = function create(properties) { + CMsgTrackUniquePlayerPairEvent.create = function(properties) { return new CMsgTrackUniquePlayerPairEvent(properties); }; @@ -83884,21 +108399,28 @@ * @function encode * @memberof CMsgTrackUniquePlayerPairEvent * @static - * @param {ICMsgTrackUniquePlayerPairEvent} message CMsgTrackUniquePlayerPairEvent message or plain object to encode + * @param {CMsgTrackUniquePlayerPairEvent.$Properties} message CMsgTrackUniquePlayerPairEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTrackUniquePlayerPairEvent.encode = function encode(message, writer) { + CMsgTrackUniquePlayerPairEvent.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.killer_steam_id != null && Object.hasOwnProperty.call(message, "killer_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.killer_steam_id); - if (message.victim_steam_id != null && Object.hasOwnProperty.call(message, "victim_steam_id")) + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.victim_steam_id); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.item_id); - if (message.event_type != null && Object.hasOwnProperty.call(message, "event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.event_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -83907,12 +108429,12 @@ * @function encodeDelimited * @memberof CMsgTrackUniquePlayerPairEvent * @static - * @param {ICMsgTrackUniquePlayerPairEvent} message CMsgTrackUniquePlayerPairEvent message or plain object to encode + * @param {CMsgTrackUniquePlayerPairEvent.$Properties} message CMsgTrackUniquePlayerPairEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgTrackUniquePlayerPairEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgTrackUniquePlayerPairEvent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -83922,34 +108444,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgTrackUniquePlayerPairEvent} CMsgTrackUniquePlayerPairEvent + * @returns {CMsgTrackUniquePlayerPairEvent & CMsgTrackUniquePlayerPairEvent.$Shape} CMsgTrackUniquePlayerPairEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTrackUniquePlayerPairEvent.decode = function decode(reader, length) { + CMsgTrackUniquePlayerPairEvent.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgTrackUniquePlayerPairEvent(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgTrackUniquePlayerPairEvent(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.killer_steam_id = reader.uint64(); - break; - case 2: - message.victim_steam_id = reader.uint64(); - break; - case 3: - message.item_id = reader.uint64(); - break; - case 4: - message.event_type = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.killer_steam_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.victim_steam_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.event_type = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -83959,11 +108507,11 @@ * @memberof CMsgTrackUniquePlayerPairEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgTrackUniquePlayerPairEvent} CMsgTrackUniquePlayerPairEvent + * @returns {CMsgTrackUniquePlayerPairEvent & CMsgTrackUniquePlayerPairEvent.$Shape} CMsgTrackUniquePlayerPairEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgTrackUniquePlayerPairEvent.decodeDelimited = function decodeDelimited(reader) { + CMsgTrackUniquePlayerPairEvent.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -83977,19 +108525,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgTrackUniquePlayerPairEvent.verify = function verify(message) { + CMsgTrackUniquePlayerPairEvent.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.killer_steam_id != null && message.hasOwnProperty("killer_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) if (!$util.isInteger(message.killer_steam_id) && !(message.killer_steam_id && $util.isInteger(message.killer_steam_id.low) && $util.isInteger(message.killer_steam_id.high))) return "killer_steam_id: integer|Long expected"; - if (message.victim_steam_id != null && message.hasOwnProperty("victim_steam_id")) + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) if (!$util.isInteger(message.victim_steam_id) && !(message.victim_steam_id && $util.isInteger(message.victim_steam_id.low) && $util.isInteger(message.victim_steam_id.high))) return "victim_steam_id: integer|Long expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) if (!$util.isInteger(message.event_type)) return "event_type: integer expected"; return null; @@ -84003,33 +108555,39 @@ * @param {Object.} object Plain object * @returns {CMsgTrackUniquePlayerPairEvent} CMsgTrackUniquePlayerPairEvent */ - CMsgTrackUniquePlayerPairEvent.fromObject = function fromObject(object) { + CMsgTrackUniquePlayerPairEvent.fromObject = function (object, _depth) { if (object instanceof $root.CMsgTrackUniquePlayerPairEvent) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgTrackUniquePlayerPairEvent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgTrackUniquePlayerPairEvent(); if (object.killer_steam_id != null) if ($util.Long) - (message.killer_steam_id = $util.Long.fromValue(object.killer_steam_id)).unsigned = true; + message.killer_steam_id = $util.Long.fromValue(object.killer_steam_id, true); else if (typeof object.killer_steam_id === "string") - message.killer_steam_id = parseInt(object.killer_steam_id, 10); + message.killer_steam_id = $parseInt(object.killer_steam_id, 10); else if (typeof object.killer_steam_id === "number") message.killer_steam_id = object.killer_steam_id; else if (typeof object.killer_steam_id === "object") message.killer_steam_id = new $util.LongBits(object.killer_steam_id.low >>> 0, object.killer_steam_id.high >>> 0).toNumber(true); if (object.victim_steam_id != null) if ($util.Long) - (message.victim_steam_id = $util.Long.fromValue(object.victim_steam_id)).unsigned = true; + message.victim_steam_id = $util.Long.fromValue(object.victim_steam_id, true); else if (typeof object.victim_steam_id === "string") - message.victim_steam_id = parseInt(object.victim_steam_id, 10); + message.victim_steam_id = $parseInt(object.victim_steam_id, 10); else if (typeof object.victim_steam_id === "number") message.victim_steam_id = object.victim_steam_id; else if (typeof object.victim_steam_id === "object") message.victim_steam_id = new $util.LongBits(object.victim_steam_id.low >>> 0, object.victim_steam_id.high >>> 0).toNumber(true); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -84048,44 +108606,54 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgTrackUniquePlayerPairEvent.toObject = function toObject(message, options) { + CMsgTrackUniquePlayerPairEvent.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.killer_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.killer_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.killer_steam_id = options.longs === String ? "0" : 0; + object.killer_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.victim_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.victim_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.victim_steam_id = options.longs === String ? "0" : 0; + object.victim_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.event_type = 0; } - if (message.killer_steam_id != null && message.hasOwnProperty("killer_steam_id")) - if (typeof message.killer_steam_id === "number") - object.killer_steam_id = options.longs === String ? String(message.killer_steam_id) : message.killer_steam_id; + if (message.killer_steam_id != null && $Object.hasOwnProperty.call(message, "killer_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.killer_steam_id = typeof message.killer_steam_id === "number" ? $BigInt(message.killer_steam_id) : $util.Long.fromBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.killer_steam_id === "number") + object.killer_steam_id = options.longs === $String ? $String(message.killer_steam_id) : message.killer_steam_id; else - object.killer_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.killer_steam_id) : options.longs === Number ? new $util.LongBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0).toNumber(true) : message.killer_steam_id; - if (message.victim_steam_id != null && message.hasOwnProperty("victim_steam_id")) - if (typeof message.victim_steam_id === "number") - object.victim_steam_id = options.longs === String ? String(message.victim_steam_id) : message.victim_steam_id; + object.killer_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.killer_steam_id) : options.longs === $Number ? new $util.LongBits(message.killer_steam_id.low >>> 0, message.killer_steam_id.high >>> 0).toNumber(true) : message.killer_steam_id; + if (message.victim_steam_id != null && $Object.hasOwnProperty.call(message, "victim_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.victim_steam_id = typeof message.victim_steam_id === "number" ? $BigInt(message.victim_steam_id) : $util.Long.fromBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.victim_steam_id === "number") + object.victim_steam_id = options.longs === $String ? $String(message.victim_steam_id) : message.victim_steam_id; else - object.victim_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.victim_steam_id) : options.longs === Number ? new $util.LongBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0).toNumber(true) : message.victim_steam_id; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + object.victim_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.victim_steam_id) : options.longs === $Number ? new $util.LongBits(message.victim_steam_id.low >>> 0, message.victim_steam_id.high >>> 0).toNumber(true) : message.victim_steam_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.event_type != null && message.hasOwnProperty("event_type")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) object.event_type = message.event_type; return object; }; @@ -84097,8 +108665,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgTrackUniquePlayerPairEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgTrackUniquePlayerPairEvent.prototype.toJSON = function() { + return CMsgTrackUniquePlayerPairEvent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgTrackUniquePlayerPairEvent + * @function getTypeUrl + * @memberof CMsgTrackUniquePlayerPairEvent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgTrackUniquePlayerPairEvent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgTrackUniquePlayerPairEvent"; }; return CMsgTrackUniquePlayerPairEvent; @@ -84108,27 +108690,40 @@ /** * Properties of a CMsgApplyStrangeCountTransfer. - * @exports ICMsgApplyStrangeCountTransfer - * @interface ICMsgApplyStrangeCountTransfer + * @typedef {Object} CMsgApplyStrangeCountTransfer.$Properties * @property {number|Long|null} [tool_item_id] CMsgApplyStrangeCountTransfer tool_item_id * @property {number|Long|null} [item_src_item_id] CMsgApplyStrangeCountTransfer item_src_item_id * @property {number|Long|null} [item_dest_item_id] CMsgApplyStrangeCountTransfer item_dest_item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyStrangeCountTransfer. + * @exports ICMsgApplyStrangeCountTransfer + * @interface ICMsgApplyStrangeCountTransfer + * @augments CMsgApplyStrangeCountTransfer.$Properties + * @deprecated Use CMsgApplyStrangeCountTransfer.$Properties instead. + */ + + /** + * Shape of a CMsgApplyStrangeCountTransfer. + * @typedef {CMsgApplyStrangeCountTransfer.$Properties} CMsgApplyStrangeCountTransfer.$Shape */ /** * Constructs a new CMsgApplyStrangeCountTransfer. * @exports CMsgApplyStrangeCountTransfer * @classdesc Represents a CMsgApplyStrangeCountTransfer. - * @implements ICMsgApplyStrangeCountTransfer * @constructor - * @param {ICMsgApplyStrangeCountTransfer=} [properties] Properties to set + * @param {CMsgApplyStrangeCountTransfer.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyStrangeCountTransfer(properties) { + var CMsgApplyStrangeCountTransfer = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyStrangeCountTransfer tool_item_id. @@ -84159,10 +108754,14 @@ * @function create * @memberof CMsgApplyStrangeCountTransfer * @static - * @param {ICMsgApplyStrangeCountTransfer=} [properties] Properties to set + * @param {CMsgApplyStrangeCountTransfer.$Properties=} [properties] Properties to set * @returns {CMsgApplyStrangeCountTransfer} CMsgApplyStrangeCountTransfer instance + * @type {{ + * (properties: CMsgApplyStrangeCountTransfer.$Shape): CMsgApplyStrangeCountTransfer & CMsgApplyStrangeCountTransfer.$Shape; + * (properties?: CMsgApplyStrangeCountTransfer.$Properties): CMsgApplyStrangeCountTransfer; + * }} */ - CMsgApplyStrangeCountTransfer.create = function create(properties) { + CMsgApplyStrangeCountTransfer.create = function(properties) { return new CMsgApplyStrangeCountTransfer(properties); }; @@ -84171,19 +108770,26 @@ * @function encode * @memberof CMsgApplyStrangeCountTransfer * @static - * @param {ICMsgApplyStrangeCountTransfer} message CMsgApplyStrangeCountTransfer message or plain object to encode + * @param {CMsgApplyStrangeCountTransfer.$Properties} message CMsgApplyStrangeCountTransfer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangeCountTransfer.encode = function encode(message, writer) { + CMsgApplyStrangeCountTransfer.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.tool_item_id != null && Object.hasOwnProperty.call(message, "tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.tool_item_id); - if (message.item_src_item_id != null && Object.hasOwnProperty.call(message, "item_src_item_id")) + if (message.item_src_item_id != null && $Object.hasOwnProperty.call(message, "item_src_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_src_item_id); - if (message.item_dest_item_id != null && Object.hasOwnProperty.call(message, "item_dest_item_id")) + if (message.item_dest_item_id != null && $Object.hasOwnProperty.call(message, "item_dest_item_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.item_dest_item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -84192,12 +108798,12 @@ * @function encodeDelimited * @memberof CMsgApplyStrangeCountTransfer * @static - * @param {ICMsgApplyStrangeCountTransfer} message CMsgApplyStrangeCountTransfer message or plain object to encode + * @param {CMsgApplyStrangeCountTransfer.$Properties} message CMsgApplyStrangeCountTransfer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangeCountTransfer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyStrangeCountTransfer.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -84207,31 +108813,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyStrangeCountTransfer} CMsgApplyStrangeCountTransfer + * @returns {CMsgApplyStrangeCountTransfer & CMsgApplyStrangeCountTransfer.$Shape} CMsgApplyStrangeCountTransfer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangeCountTransfer.decode = function decode(reader, length) { + CMsgApplyStrangeCountTransfer.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyStrangeCountTransfer(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyStrangeCountTransfer(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tool_item_id = reader.uint64(); - break; - case 2: - message.item_src_item_id = reader.uint64(); - break; - case 3: - message.item_dest_item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.tool_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_src_item_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_dest_item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -84241,11 +108870,11 @@ * @memberof CMsgApplyStrangeCountTransfer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyStrangeCountTransfer} CMsgApplyStrangeCountTransfer + * @returns {CMsgApplyStrangeCountTransfer & CMsgApplyStrangeCountTransfer.$Shape} CMsgApplyStrangeCountTransfer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangeCountTransfer.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyStrangeCountTransfer.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -84259,16 +108888,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyStrangeCountTransfer.verify = function verify(message) { + CMsgApplyStrangeCountTransfer.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) if (!$util.isInteger(message.tool_item_id) && !(message.tool_item_id && $util.isInteger(message.tool_item_id.low) && $util.isInteger(message.tool_item_id.high))) return "tool_item_id: integer|Long expected"; - if (message.item_src_item_id != null && message.hasOwnProperty("item_src_item_id")) + if (message.item_src_item_id != null && $Object.hasOwnProperty.call(message, "item_src_item_id")) if (!$util.isInteger(message.item_src_item_id) && !(message.item_src_item_id && $util.isInteger(message.item_src_item_id.low) && $util.isInteger(message.item_src_item_id.high))) return "item_src_item_id: integer|Long expected"; - if (message.item_dest_item_id != null && message.hasOwnProperty("item_dest_item_id")) + if (message.item_dest_item_id != null && $Object.hasOwnProperty.call(message, "item_dest_item_id")) if (!$util.isInteger(message.item_dest_item_id) && !(message.item_dest_item_id && $util.isInteger(message.item_dest_item_id.low) && $util.isInteger(message.item_dest_item_id.high))) return "item_dest_item_id: integer|Long expected"; return null; @@ -84282,33 +108915,39 @@ * @param {Object.} object Plain object * @returns {CMsgApplyStrangeCountTransfer} CMsgApplyStrangeCountTransfer */ - CMsgApplyStrangeCountTransfer.fromObject = function fromObject(object) { + CMsgApplyStrangeCountTransfer.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyStrangeCountTransfer) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyStrangeCountTransfer: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyStrangeCountTransfer(); if (object.tool_item_id != null) if ($util.Long) - (message.tool_item_id = $util.Long.fromValue(object.tool_item_id)).unsigned = true; + message.tool_item_id = $util.Long.fromValue(object.tool_item_id, true); else if (typeof object.tool_item_id === "string") - message.tool_item_id = parseInt(object.tool_item_id, 10); + message.tool_item_id = $parseInt(object.tool_item_id, 10); else if (typeof object.tool_item_id === "number") message.tool_item_id = object.tool_item_id; else if (typeof object.tool_item_id === "object") message.tool_item_id = new $util.LongBits(object.tool_item_id.low >>> 0, object.tool_item_id.high >>> 0).toNumber(true); if (object.item_src_item_id != null) if ($util.Long) - (message.item_src_item_id = $util.Long.fromValue(object.item_src_item_id)).unsigned = true; + message.item_src_item_id = $util.Long.fromValue(object.item_src_item_id, true); else if (typeof object.item_src_item_id === "string") - message.item_src_item_id = parseInt(object.item_src_item_id, 10); + message.item_src_item_id = $parseInt(object.item_src_item_id, 10); else if (typeof object.item_src_item_id === "number") message.item_src_item_id = object.item_src_item_id; else if (typeof object.item_src_item_id === "object") message.item_src_item_id = new $util.LongBits(object.item_src_item_id.low >>> 0, object.item_src_item_id.high >>> 0).toNumber(true); if (object.item_dest_item_id != null) if ($util.Long) - (message.item_dest_item_id = $util.Long.fromValue(object.item_dest_item_id)).unsigned = true; + message.item_dest_item_id = $util.Long.fromValue(object.item_dest_item_id, true); else if (typeof object.item_dest_item_id === "string") - message.item_dest_item_id = parseInt(object.item_dest_item_id, 10); + message.item_dest_item_id = $parseInt(object.item_dest_item_id, 10); else if (typeof object.item_dest_item_id === "number") message.item_dest_item_id = object.item_dest_item_id; else if (typeof object.item_dest_item_id === "object") @@ -84325,42 +108964,52 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyStrangeCountTransfer.toObject = function toObject(message, options) { + CMsgApplyStrangeCountTransfer.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.tool_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.tool_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.tool_item_id = options.longs === String ? "0" : 0; + object.tool_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_src_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_src_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_src_item_id = options.longs === String ? "0" : 0; + object.item_src_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_dest_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_dest_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_dest_item_id = options.longs === String ? "0" : 0; + object.item_dest_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) - if (typeof message.tool_item_id === "number") - object.tool_item_id = options.longs === String ? String(message.tool_item_id) : message.tool_item_id; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.tool_item_id = typeof message.tool_item_id === "number" ? $BigInt(message.tool_item_id) : $util.Long.fromBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.tool_item_id === "number") + object.tool_item_id = options.longs === $String ? $String(message.tool_item_id) : message.tool_item_id; else - object.tool_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; - if (message.item_src_item_id != null && message.hasOwnProperty("item_src_item_id")) - if (typeof message.item_src_item_id === "number") - object.item_src_item_id = options.longs === String ? String(message.item_src_item_id) : message.item_src_item_id; + object.tool_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === $Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; + if (message.item_src_item_id != null && $Object.hasOwnProperty.call(message, "item_src_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_src_item_id = typeof message.item_src_item_id === "number" ? $BigInt(message.item_src_item_id) : $util.Long.fromBits(message.item_src_item_id.low >>> 0, message.item_src_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_src_item_id === "number") + object.item_src_item_id = options.longs === $String ? $String(message.item_src_item_id) : message.item_src_item_id; else - object.item_src_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_src_item_id) : options.longs === Number ? new $util.LongBits(message.item_src_item_id.low >>> 0, message.item_src_item_id.high >>> 0).toNumber(true) : message.item_src_item_id; - if (message.item_dest_item_id != null && message.hasOwnProperty("item_dest_item_id")) - if (typeof message.item_dest_item_id === "number") - object.item_dest_item_id = options.longs === String ? String(message.item_dest_item_id) : message.item_dest_item_id; + object.item_src_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_src_item_id) : options.longs === $Number ? new $util.LongBits(message.item_src_item_id.low >>> 0, message.item_src_item_id.high >>> 0).toNumber(true) : message.item_src_item_id; + if (message.item_dest_item_id != null && $Object.hasOwnProperty.call(message, "item_dest_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_dest_item_id = typeof message.item_dest_item_id === "number" ? $BigInt(message.item_dest_item_id) : $util.Long.fromBits(message.item_dest_item_id.low >>> 0, message.item_dest_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_dest_item_id === "number") + object.item_dest_item_id = options.longs === $String ? $String(message.item_dest_item_id) : message.item_dest_item_id; else - object.item_dest_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_dest_item_id) : options.longs === Number ? new $util.LongBits(message.item_dest_item_id.low >>> 0, message.item_dest_item_id.high >>> 0).toNumber(true) : message.item_dest_item_id; + object.item_dest_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_dest_item_id) : options.longs === $Number ? new $util.LongBits(message.item_dest_item_id.low >>> 0, message.item_dest_item_id.high >>> 0).toNumber(true) : message.item_dest_item_id; return object; }; @@ -84371,8 +109020,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyStrangeCountTransfer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyStrangeCountTransfer.prototype.toJSON = function() { + return CMsgApplyStrangeCountTransfer.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyStrangeCountTransfer + * @function getTypeUrl + * @memberof CMsgApplyStrangeCountTransfer + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyStrangeCountTransfer.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyStrangeCountTransfer"; }; return CMsgApplyStrangeCountTransfer; @@ -84382,26 +109045,39 @@ /** * Properties of a CMsgApplyStrangePart. - * @exports ICMsgApplyStrangePart - * @interface ICMsgApplyStrangePart + * @typedef {Object} CMsgApplyStrangePart.$Properties * @property {number|Long|null} [strange_part_item_id] CMsgApplyStrangePart strange_part_item_id * @property {number|Long|null} [item_item_id] CMsgApplyStrangePart item_item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyStrangePart. + * @exports ICMsgApplyStrangePart + * @interface ICMsgApplyStrangePart + * @augments CMsgApplyStrangePart.$Properties + * @deprecated Use CMsgApplyStrangePart.$Properties instead. + */ + + /** + * Shape of a CMsgApplyStrangePart. + * @typedef {CMsgApplyStrangePart.$Properties} CMsgApplyStrangePart.$Shape */ /** * Constructs a new CMsgApplyStrangePart. * @exports CMsgApplyStrangePart * @classdesc Represents a CMsgApplyStrangePart. - * @implements ICMsgApplyStrangePart * @constructor - * @param {ICMsgApplyStrangePart=} [properties] Properties to set + * @param {CMsgApplyStrangePart.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyStrangePart(properties) { + var CMsgApplyStrangePart = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyStrangePart strange_part_item_id. @@ -84424,10 +109100,14 @@ * @function create * @memberof CMsgApplyStrangePart * @static - * @param {ICMsgApplyStrangePart=} [properties] Properties to set + * @param {CMsgApplyStrangePart.$Properties=} [properties] Properties to set * @returns {CMsgApplyStrangePart} CMsgApplyStrangePart instance + * @type {{ + * (properties: CMsgApplyStrangePart.$Shape): CMsgApplyStrangePart & CMsgApplyStrangePart.$Shape; + * (properties?: CMsgApplyStrangePart.$Properties): CMsgApplyStrangePart; + * }} */ - CMsgApplyStrangePart.create = function create(properties) { + CMsgApplyStrangePart.create = function(properties) { return new CMsgApplyStrangePart(properties); }; @@ -84436,17 +109116,24 @@ * @function encode * @memberof CMsgApplyStrangePart * @static - * @param {ICMsgApplyStrangePart} message CMsgApplyStrangePart message or plain object to encode + * @param {CMsgApplyStrangePart.$Properties} message CMsgApplyStrangePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangePart.encode = function encode(message, writer) { + CMsgApplyStrangePart.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.strange_part_item_id != null && Object.hasOwnProperty.call(message, "strange_part_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.strange_part_item_id); - if (message.item_item_id != null && Object.hasOwnProperty.call(message, "item_item_id")) + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -84455,12 +109142,12 @@ * @function encodeDelimited * @memberof CMsgApplyStrangePart * @static - * @param {ICMsgApplyStrangePart} message CMsgApplyStrangePart message or plain object to encode + * @param {CMsgApplyStrangePart.$Properties} message CMsgApplyStrangePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyStrangePart.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -84470,28 +109157,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyStrangePart} CMsgApplyStrangePart + * @returns {CMsgApplyStrangePart & CMsgApplyStrangePart.$Shape} CMsgApplyStrangePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangePart.decode = function decode(reader, length) { + CMsgApplyStrangePart.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyStrangePart(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyStrangePart(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.strange_part_item_id = reader.uint64(); - break; - case 2: - message.item_item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.strange_part_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -84501,11 +109208,11 @@ * @memberof CMsgApplyStrangePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyStrangePart} CMsgApplyStrangePart + * @returns {CMsgApplyStrangePart & CMsgApplyStrangePart.$Shape} CMsgApplyStrangePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangePart.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyStrangePart.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -84519,13 +109226,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyStrangePart.verify = function verify(message) { + CMsgApplyStrangePart.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.strange_part_item_id != null && message.hasOwnProperty("strange_part_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) if (!$util.isInteger(message.strange_part_item_id) && !(message.strange_part_item_id && $util.isInteger(message.strange_part_item_id.low) && $util.isInteger(message.strange_part_item_id.high))) return "strange_part_item_id: integer|Long expected"; - if (message.item_item_id != null && message.hasOwnProperty("item_item_id")) + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) if (!$util.isInteger(message.item_item_id) && !(message.item_item_id && $util.isInteger(message.item_item_id.low) && $util.isInteger(message.item_item_id.high))) return "item_item_id: integer|Long expected"; return null; @@ -84539,24 +109250,30 @@ * @param {Object.} object Plain object * @returns {CMsgApplyStrangePart} CMsgApplyStrangePart */ - CMsgApplyStrangePart.fromObject = function fromObject(object) { + CMsgApplyStrangePart.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyStrangePart) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyStrangePart: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyStrangePart(); if (object.strange_part_item_id != null) if ($util.Long) - (message.strange_part_item_id = $util.Long.fromValue(object.strange_part_item_id)).unsigned = true; + message.strange_part_item_id = $util.Long.fromValue(object.strange_part_item_id, true); else if (typeof object.strange_part_item_id === "string") - message.strange_part_item_id = parseInt(object.strange_part_item_id, 10); + message.strange_part_item_id = $parseInt(object.strange_part_item_id, 10); else if (typeof object.strange_part_item_id === "number") message.strange_part_item_id = object.strange_part_item_id; else if (typeof object.strange_part_item_id === "object") message.strange_part_item_id = new $util.LongBits(object.strange_part_item_id.low >>> 0, object.strange_part_item_id.high >>> 0).toNumber(true); if (object.item_item_id != null) if ($util.Long) - (message.item_item_id = $util.Long.fromValue(object.item_item_id)).unsigned = true; + message.item_item_id = $util.Long.fromValue(object.item_item_id, true); else if (typeof object.item_item_id === "string") - message.item_item_id = parseInt(object.item_item_id, 10); + message.item_item_id = $parseInt(object.item_item_id, 10); else if (typeof object.item_item_id === "number") message.item_item_id = object.item_item_id; else if (typeof object.item_item_id === "object") @@ -84573,32 +109290,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyStrangePart.toObject = function toObject(message, options) { + CMsgApplyStrangePart.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.strange_part_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.strange_part_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.strange_part_item_id = options.longs === String ? "0" : 0; + object.strange_part_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_item_id = options.longs === String ? "0" : 0; + object.item_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.strange_part_item_id != null && message.hasOwnProperty("strange_part_item_id")) - if (typeof message.strange_part_item_id === "number") - object.strange_part_item_id = options.longs === String ? String(message.strange_part_item_id) : message.strange_part_item_id; + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.strange_part_item_id = typeof message.strange_part_item_id === "number" ? $BigInt(message.strange_part_item_id) : $util.Long.fromBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.strange_part_item_id === "number") + object.strange_part_item_id = options.longs === $String ? $String(message.strange_part_item_id) : message.strange_part_item_id; else - object.strange_part_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.strange_part_item_id) : options.longs === Number ? new $util.LongBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0).toNumber(true) : message.strange_part_item_id; - if (message.item_item_id != null && message.hasOwnProperty("item_item_id")) - if (typeof message.item_item_id === "number") - object.item_item_id = options.longs === String ? String(message.item_item_id) : message.item_item_id; + object.strange_part_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.strange_part_item_id) : options.longs === $Number ? new $util.LongBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0).toNumber(true) : message.strange_part_item_id; + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_item_id = typeof message.item_item_id === "number" ? $BigInt(message.item_item_id) : $util.Long.fromBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_item_id === "number") + object.item_item_id = options.longs === $String ? $String(message.item_item_id) : message.item_item_id; else - object.item_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_item_id) : options.longs === Number ? new $util.LongBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0).toNumber(true) : message.item_item_id; + object.item_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_item_id) : options.longs === $Number ? new $util.LongBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0).toNumber(true) : message.item_item_id; return object; }; @@ -84609,8 +109334,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyStrangePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyStrangePart.prototype.toJSON = function() { + return CMsgApplyStrangePart.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyStrangePart + * @function getTypeUrl + * @memberof CMsgApplyStrangePart + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyStrangePart.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyStrangePart"; }; return CMsgApplyStrangePart; @@ -84620,27 +109359,40 @@ /** * Properties of a CMsgApplyStrangeRestriction. - * @exports ICMsgApplyStrangeRestriction - * @interface ICMsgApplyStrangeRestriction + * @typedef {Object} CMsgApplyStrangeRestriction.$Properties * @property {number|Long|null} [strange_part_item_id] CMsgApplyStrangeRestriction strange_part_item_id * @property {number|Long|null} [item_item_id] CMsgApplyStrangeRestriction item_item_id * @property {number|null} [strange_attr_index] CMsgApplyStrangeRestriction strange_attr_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyStrangeRestriction. + * @exports ICMsgApplyStrangeRestriction + * @interface ICMsgApplyStrangeRestriction + * @augments CMsgApplyStrangeRestriction.$Properties + * @deprecated Use CMsgApplyStrangeRestriction.$Properties instead. + */ + + /** + * Shape of a CMsgApplyStrangeRestriction. + * @typedef {CMsgApplyStrangeRestriction.$Properties} CMsgApplyStrangeRestriction.$Shape */ /** * Constructs a new CMsgApplyStrangeRestriction. * @exports CMsgApplyStrangeRestriction * @classdesc Represents a CMsgApplyStrangeRestriction. - * @implements ICMsgApplyStrangeRestriction * @constructor - * @param {ICMsgApplyStrangeRestriction=} [properties] Properties to set + * @param {CMsgApplyStrangeRestriction.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyStrangeRestriction(properties) { + var CMsgApplyStrangeRestriction = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyStrangeRestriction strange_part_item_id. @@ -84671,10 +109423,14 @@ * @function create * @memberof CMsgApplyStrangeRestriction * @static - * @param {ICMsgApplyStrangeRestriction=} [properties] Properties to set + * @param {CMsgApplyStrangeRestriction.$Properties=} [properties] Properties to set * @returns {CMsgApplyStrangeRestriction} CMsgApplyStrangeRestriction instance + * @type {{ + * (properties: CMsgApplyStrangeRestriction.$Shape): CMsgApplyStrangeRestriction & CMsgApplyStrangeRestriction.$Shape; + * (properties?: CMsgApplyStrangeRestriction.$Properties): CMsgApplyStrangeRestriction; + * }} */ - CMsgApplyStrangeRestriction.create = function create(properties) { + CMsgApplyStrangeRestriction.create = function(properties) { return new CMsgApplyStrangeRestriction(properties); }; @@ -84683,19 +109439,26 @@ * @function encode * @memberof CMsgApplyStrangeRestriction * @static - * @param {ICMsgApplyStrangeRestriction} message CMsgApplyStrangeRestriction message or plain object to encode + * @param {CMsgApplyStrangeRestriction.$Properties} message CMsgApplyStrangeRestriction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangeRestriction.encode = function encode(message, writer) { + CMsgApplyStrangeRestriction.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.strange_part_item_id != null && Object.hasOwnProperty.call(message, "strange_part_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.strange_part_item_id); - if (message.item_item_id != null && Object.hasOwnProperty.call(message, "item_item_id")) + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_item_id); - if (message.strange_attr_index != null && Object.hasOwnProperty.call(message, "strange_attr_index")) + if (message.strange_attr_index != null && $Object.hasOwnProperty.call(message, "strange_attr_index")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.strange_attr_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -84704,12 +109467,12 @@ * @function encodeDelimited * @memberof CMsgApplyStrangeRestriction * @static - * @param {ICMsgApplyStrangeRestriction} message CMsgApplyStrangeRestriction message or plain object to encode + * @param {CMsgApplyStrangeRestriction.$Properties} message CMsgApplyStrangeRestriction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyStrangeRestriction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyStrangeRestriction.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -84719,31 +109482,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyStrangeRestriction} CMsgApplyStrangeRestriction + * @returns {CMsgApplyStrangeRestriction & CMsgApplyStrangeRestriction.$Shape} CMsgApplyStrangeRestriction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangeRestriction.decode = function decode(reader, length) { + CMsgApplyStrangeRestriction.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyStrangeRestriction(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyStrangeRestriction(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.strange_part_item_id = reader.uint64(); - break; - case 2: - message.item_item_id = reader.uint64(); - break; - case 3: - message.strange_attr_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.strange_part_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_item_id = reader.uint64(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.strange_attr_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -84753,11 +109539,11 @@ * @memberof CMsgApplyStrangeRestriction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyStrangeRestriction} CMsgApplyStrangeRestriction + * @returns {CMsgApplyStrangeRestriction & CMsgApplyStrangeRestriction.$Shape} CMsgApplyStrangeRestriction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyStrangeRestriction.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyStrangeRestriction.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -84771,16 +109557,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyStrangeRestriction.verify = function verify(message) { + CMsgApplyStrangeRestriction.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.strange_part_item_id != null && message.hasOwnProperty("strange_part_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) if (!$util.isInteger(message.strange_part_item_id) && !(message.strange_part_item_id && $util.isInteger(message.strange_part_item_id.low) && $util.isInteger(message.strange_part_item_id.high))) return "strange_part_item_id: integer|Long expected"; - if (message.item_item_id != null && message.hasOwnProperty("item_item_id")) + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) if (!$util.isInteger(message.item_item_id) && !(message.item_item_id && $util.isInteger(message.item_item_id.low) && $util.isInteger(message.item_item_id.high))) return "item_item_id: integer|Long expected"; - if (message.strange_attr_index != null && message.hasOwnProperty("strange_attr_index")) + if (message.strange_attr_index != null && $Object.hasOwnProperty.call(message, "strange_attr_index")) if (!$util.isInteger(message.strange_attr_index)) return "strange_attr_index: integer expected"; return null; @@ -84794,24 +109584,30 @@ * @param {Object.} object Plain object * @returns {CMsgApplyStrangeRestriction} CMsgApplyStrangeRestriction */ - CMsgApplyStrangeRestriction.fromObject = function fromObject(object) { + CMsgApplyStrangeRestriction.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyStrangeRestriction) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyStrangeRestriction: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyStrangeRestriction(); if (object.strange_part_item_id != null) if ($util.Long) - (message.strange_part_item_id = $util.Long.fromValue(object.strange_part_item_id)).unsigned = true; + message.strange_part_item_id = $util.Long.fromValue(object.strange_part_item_id, true); else if (typeof object.strange_part_item_id === "string") - message.strange_part_item_id = parseInt(object.strange_part_item_id, 10); + message.strange_part_item_id = $parseInt(object.strange_part_item_id, 10); else if (typeof object.strange_part_item_id === "number") message.strange_part_item_id = object.strange_part_item_id; else if (typeof object.strange_part_item_id === "object") message.strange_part_item_id = new $util.LongBits(object.strange_part_item_id.low >>> 0, object.strange_part_item_id.high >>> 0).toNumber(true); if (object.item_item_id != null) if ($util.Long) - (message.item_item_id = $util.Long.fromValue(object.item_item_id)).unsigned = true; + message.item_item_id = $util.Long.fromValue(object.item_item_id, true); else if (typeof object.item_item_id === "string") - message.item_item_id = parseInt(object.item_item_id, 10); + message.item_item_id = $parseInt(object.item_item_id, 10); else if (typeof object.item_item_id === "number") message.item_item_id = object.item_item_id; else if (typeof object.item_item_id === "object") @@ -84830,34 +109626,42 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyStrangeRestriction.toObject = function toObject(message, options) { + CMsgApplyStrangeRestriction.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.strange_part_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.strange_part_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.strange_part_item_id = options.longs === String ? "0" : 0; + object.strange_part_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_item_id = options.longs === String ? "0" : 0; + object.item_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.strange_attr_index = 0; } - if (message.strange_part_item_id != null && message.hasOwnProperty("strange_part_item_id")) - if (typeof message.strange_part_item_id === "number") - object.strange_part_item_id = options.longs === String ? String(message.strange_part_item_id) : message.strange_part_item_id; + if (message.strange_part_item_id != null && $Object.hasOwnProperty.call(message, "strange_part_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.strange_part_item_id = typeof message.strange_part_item_id === "number" ? $BigInt(message.strange_part_item_id) : $util.Long.fromBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.strange_part_item_id === "number") + object.strange_part_item_id = options.longs === $String ? $String(message.strange_part_item_id) : message.strange_part_item_id; else - object.strange_part_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.strange_part_item_id) : options.longs === Number ? new $util.LongBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0).toNumber(true) : message.strange_part_item_id; - if (message.item_item_id != null && message.hasOwnProperty("item_item_id")) - if (typeof message.item_item_id === "number") - object.item_item_id = options.longs === String ? String(message.item_item_id) : message.item_item_id; + object.strange_part_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.strange_part_item_id) : options.longs === $Number ? new $util.LongBits(message.strange_part_item_id.low >>> 0, message.strange_part_item_id.high >>> 0).toNumber(true) : message.strange_part_item_id; + if (message.item_item_id != null && $Object.hasOwnProperty.call(message, "item_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_item_id = typeof message.item_item_id === "number" ? $BigInt(message.item_item_id) : $util.Long.fromBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_item_id === "number") + object.item_item_id = options.longs === $String ? $String(message.item_item_id) : message.item_item_id; else - object.item_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_item_id) : options.longs === Number ? new $util.LongBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0).toNumber(true) : message.item_item_id; - if (message.strange_attr_index != null && message.hasOwnProperty("strange_attr_index")) + object.item_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_item_id) : options.longs === $Number ? new $util.LongBits(message.item_item_id.low >>> 0, message.item_item_id.high >>> 0).toNumber(true) : message.item_item_id; + if (message.strange_attr_index != null && $Object.hasOwnProperty.call(message, "strange_attr_index")) object.strange_attr_index = message.strange_attr_index; return object; }; @@ -84869,8 +109673,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyStrangeRestriction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyStrangeRestriction.prototype.toJSON = function() { + return CMsgApplyStrangeRestriction.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyStrangeRestriction + * @function getTypeUrl + * @memberof CMsgApplyStrangeRestriction + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyStrangeRestriction.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyStrangeRestriction"; }; return CMsgApplyStrangeRestriction; @@ -84880,26 +109698,39 @@ /** * Properties of a CMsgApplyUpgradeCard. - * @exports ICMsgApplyUpgradeCard - * @interface ICMsgApplyUpgradeCard + * @typedef {Object} CMsgApplyUpgradeCard.$Properties * @property {number|Long|null} [upgrade_card_item_id] CMsgApplyUpgradeCard upgrade_card_item_id * @property {number|Long|null} [subject_item_id] CMsgApplyUpgradeCard subject_item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyUpgradeCard. + * @exports ICMsgApplyUpgradeCard + * @interface ICMsgApplyUpgradeCard + * @augments CMsgApplyUpgradeCard.$Properties + * @deprecated Use CMsgApplyUpgradeCard.$Properties instead. + */ + + /** + * Shape of a CMsgApplyUpgradeCard. + * @typedef {CMsgApplyUpgradeCard.$Properties} CMsgApplyUpgradeCard.$Shape */ /** * Constructs a new CMsgApplyUpgradeCard. * @exports CMsgApplyUpgradeCard * @classdesc Represents a CMsgApplyUpgradeCard. - * @implements ICMsgApplyUpgradeCard * @constructor - * @param {ICMsgApplyUpgradeCard=} [properties] Properties to set + * @param {CMsgApplyUpgradeCard.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyUpgradeCard(properties) { + var CMsgApplyUpgradeCard = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyUpgradeCard upgrade_card_item_id. @@ -84922,10 +109753,14 @@ * @function create * @memberof CMsgApplyUpgradeCard * @static - * @param {ICMsgApplyUpgradeCard=} [properties] Properties to set + * @param {CMsgApplyUpgradeCard.$Properties=} [properties] Properties to set * @returns {CMsgApplyUpgradeCard} CMsgApplyUpgradeCard instance + * @type {{ + * (properties: CMsgApplyUpgradeCard.$Shape): CMsgApplyUpgradeCard & CMsgApplyUpgradeCard.$Shape; + * (properties?: CMsgApplyUpgradeCard.$Properties): CMsgApplyUpgradeCard; + * }} */ - CMsgApplyUpgradeCard.create = function create(properties) { + CMsgApplyUpgradeCard.create = function(properties) { return new CMsgApplyUpgradeCard(properties); }; @@ -84934,17 +109769,24 @@ * @function encode * @memberof CMsgApplyUpgradeCard * @static - * @param {ICMsgApplyUpgradeCard} message CMsgApplyUpgradeCard message or plain object to encode + * @param {CMsgApplyUpgradeCard.$Properties} message CMsgApplyUpgradeCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyUpgradeCard.encode = function encode(message, writer) { + CMsgApplyUpgradeCard.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.upgrade_card_item_id != null && Object.hasOwnProperty.call(message, "upgrade_card_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.upgrade_card_item_id != null && $Object.hasOwnProperty.call(message, "upgrade_card_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.upgrade_card_item_id); - if (message.subject_item_id != null && Object.hasOwnProperty.call(message, "subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.subject_item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -84953,12 +109795,12 @@ * @function encodeDelimited * @memberof CMsgApplyUpgradeCard * @static - * @param {ICMsgApplyUpgradeCard} message CMsgApplyUpgradeCard message or plain object to encode + * @param {CMsgApplyUpgradeCard.$Properties} message CMsgApplyUpgradeCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyUpgradeCard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyUpgradeCard.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -84968,28 +109810,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyUpgradeCard} CMsgApplyUpgradeCard + * @returns {CMsgApplyUpgradeCard & CMsgApplyUpgradeCard.$Shape} CMsgApplyUpgradeCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyUpgradeCard.decode = function decode(reader, length) { + CMsgApplyUpgradeCard.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyUpgradeCard(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyUpgradeCard(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.upgrade_card_item_id = reader.uint64(); - break; - case 2: - message.subject_item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.upgrade_card_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.subject_item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -84999,11 +109861,11 @@ * @memberof CMsgApplyUpgradeCard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyUpgradeCard} CMsgApplyUpgradeCard + * @returns {CMsgApplyUpgradeCard & CMsgApplyUpgradeCard.$Shape} CMsgApplyUpgradeCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyUpgradeCard.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyUpgradeCard.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -85017,13 +109879,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyUpgradeCard.verify = function verify(message) { + CMsgApplyUpgradeCard.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.upgrade_card_item_id != null && message.hasOwnProperty("upgrade_card_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.upgrade_card_item_id != null && $Object.hasOwnProperty.call(message, "upgrade_card_item_id")) if (!$util.isInteger(message.upgrade_card_item_id) && !(message.upgrade_card_item_id && $util.isInteger(message.upgrade_card_item_id.low) && $util.isInteger(message.upgrade_card_item_id.high))) return "upgrade_card_item_id: integer|Long expected"; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) if (!$util.isInteger(message.subject_item_id) && !(message.subject_item_id && $util.isInteger(message.subject_item_id.low) && $util.isInteger(message.subject_item_id.high))) return "subject_item_id: integer|Long expected"; return null; @@ -85037,24 +109903,30 @@ * @param {Object.} object Plain object * @returns {CMsgApplyUpgradeCard} CMsgApplyUpgradeCard */ - CMsgApplyUpgradeCard.fromObject = function fromObject(object) { + CMsgApplyUpgradeCard.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyUpgradeCard) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyUpgradeCard: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyUpgradeCard(); if (object.upgrade_card_item_id != null) if ($util.Long) - (message.upgrade_card_item_id = $util.Long.fromValue(object.upgrade_card_item_id)).unsigned = true; + message.upgrade_card_item_id = $util.Long.fromValue(object.upgrade_card_item_id, true); else if (typeof object.upgrade_card_item_id === "string") - message.upgrade_card_item_id = parseInt(object.upgrade_card_item_id, 10); + message.upgrade_card_item_id = $parseInt(object.upgrade_card_item_id, 10); else if (typeof object.upgrade_card_item_id === "number") message.upgrade_card_item_id = object.upgrade_card_item_id; else if (typeof object.upgrade_card_item_id === "object") message.upgrade_card_item_id = new $util.LongBits(object.upgrade_card_item_id.low >>> 0, object.upgrade_card_item_id.high >>> 0).toNumber(true); if (object.subject_item_id != null) if ($util.Long) - (message.subject_item_id = $util.Long.fromValue(object.subject_item_id)).unsigned = true; + message.subject_item_id = $util.Long.fromValue(object.subject_item_id, true); else if (typeof object.subject_item_id === "string") - message.subject_item_id = parseInt(object.subject_item_id, 10); + message.subject_item_id = $parseInt(object.subject_item_id, 10); else if (typeof object.subject_item_id === "number") message.subject_item_id = object.subject_item_id; else if (typeof object.subject_item_id === "object") @@ -85071,32 +109943,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyUpgradeCard.toObject = function toObject(message, options) { + CMsgApplyUpgradeCard.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.upgrade_card_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.upgrade_card_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.upgrade_card_item_id = options.longs === String ? "0" : 0; + object.upgrade_card_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.subject_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.subject_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.subject_item_id = options.longs === String ? "0" : 0; + object.subject_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.upgrade_card_item_id != null && message.hasOwnProperty("upgrade_card_item_id")) - if (typeof message.upgrade_card_item_id === "number") - object.upgrade_card_item_id = options.longs === String ? String(message.upgrade_card_item_id) : message.upgrade_card_item_id; + if (message.upgrade_card_item_id != null && $Object.hasOwnProperty.call(message, "upgrade_card_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.upgrade_card_item_id = typeof message.upgrade_card_item_id === "number" ? $BigInt(message.upgrade_card_item_id) : $util.Long.fromBits(message.upgrade_card_item_id.low >>> 0, message.upgrade_card_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.upgrade_card_item_id === "number") + object.upgrade_card_item_id = options.longs === $String ? $String(message.upgrade_card_item_id) : message.upgrade_card_item_id; else - object.upgrade_card_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.upgrade_card_item_id) : options.longs === Number ? new $util.LongBits(message.upgrade_card_item_id.low >>> 0, message.upgrade_card_item_id.high >>> 0).toNumber(true) : message.upgrade_card_item_id; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) - if (typeof message.subject_item_id === "number") - object.subject_item_id = options.longs === String ? String(message.subject_item_id) : message.subject_item_id; + object.upgrade_card_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.upgrade_card_item_id) : options.longs === $Number ? new $util.LongBits(message.upgrade_card_item_id.low >>> 0, message.upgrade_card_item_id.high >>> 0).toNumber(true) : message.upgrade_card_item_id; + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.subject_item_id = typeof message.subject_item_id === "number" ? $BigInt(message.subject_item_id) : $util.Long.fromBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.subject_item_id === "number") + object.subject_item_id = options.longs === $String ? $String(message.subject_item_id) : message.subject_item_id; else - object.subject_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; + object.subject_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === $Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; return object; }; @@ -85107,8 +109987,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyUpgradeCard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyUpgradeCard.prototype.toJSON = function() { + return CMsgApplyUpgradeCard.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyUpgradeCard + * @function getTypeUrl + * @memberof CMsgApplyUpgradeCard + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyUpgradeCard.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyUpgradeCard"; }; return CMsgApplyUpgradeCard; @@ -85118,27 +110012,40 @@ /** * Properties of a CSOEconItemAttribute. - * @exports ICSOEconItemAttribute - * @interface ICSOEconItemAttribute + * @typedef {Object} CSOEconItemAttribute.$Properties * @property {number|null} [def_index] CSOEconItemAttribute def_index * @property {number|null} [value] CSOEconItemAttribute value * @property {Uint8Array|null} [value_bytes] CSOEconItemAttribute value_bytes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconItemAttribute. + * @exports ICSOEconItemAttribute + * @interface ICSOEconItemAttribute + * @augments CSOEconItemAttribute.$Properties + * @deprecated Use CSOEconItemAttribute.$Properties instead. + */ + + /** + * Shape of a CSOEconItemAttribute. + * @typedef {CSOEconItemAttribute.$Properties} CSOEconItemAttribute.$Shape */ /** * Constructs a new CSOEconItemAttribute. * @exports CSOEconItemAttribute * @classdesc Represents a CSOEconItemAttribute. - * @implements ICSOEconItemAttribute * @constructor - * @param {ICSOEconItemAttribute=} [properties] Properties to set + * @param {CSOEconItemAttribute.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconItemAttribute(properties) { + var CSOEconItemAttribute = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconItemAttribute def_index. @@ -85169,10 +110076,14 @@ * @function create * @memberof CSOEconItemAttribute * @static - * @param {ICSOEconItemAttribute=} [properties] Properties to set + * @param {CSOEconItemAttribute.$Properties=} [properties] Properties to set * @returns {CSOEconItemAttribute} CSOEconItemAttribute instance + * @type {{ + * (properties: CSOEconItemAttribute.$Shape): CSOEconItemAttribute & CSOEconItemAttribute.$Shape; + * (properties?: CSOEconItemAttribute.$Properties): CSOEconItemAttribute; + * }} */ - CSOEconItemAttribute.create = function create(properties) { + CSOEconItemAttribute.create = function(properties) { return new CSOEconItemAttribute(properties); }; @@ -85181,19 +110092,26 @@ * @function encode * @memberof CSOEconItemAttribute * @static - * @param {ICSOEconItemAttribute} message CSOEconItemAttribute message or plain object to encode + * @param {CSOEconItemAttribute.$Properties} message CSOEconItemAttribute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemAttribute.encode = function encode(message, writer) { + CSOEconItemAttribute.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.def_index); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.value); - if (message.value_bytes != null && Object.hasOwnProperty.call(message, "value_bytes")) + if (message.value_bytes != null && $Object.hasOwnProperty.call(message, "value_bytes")) writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.value_bytes); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -85202,12 +110120,12 @@ * @function encodeDelimited * @memberof CSOEconItemAttribute * @static - * @param {ICSOEconItemAttribute} message CSOEconItemAttribute message or plain object to encode + * @param {CSOEconItemAttribute.$Properties} message CSOEconItemAttribute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemAttribute.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconItemAttribute.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -85217,31 +110135,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconItemAttribute} CSOEconItemAttribute + * @returns {CSOEconItemAttribute & CSOEconItemAttribute.$Shape} CSOEconItemAttribute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemAttribute.decode = function decode(reader, length) { + CSOEconItemAttribute.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconItemAttribute(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconItemAttribute(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.def_index = reader.uint32(); - break; - case 2: - message.value = reader.uint32(); - break; - case 3: - message.value_bytes = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.def_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.value = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.value_bytes = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -85251,11 +110192,11 @@ * @memberof CSOEconItemAttribute * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconItemAttribute} CSOEconItemAttribute + * @returns {CSOEconItemAttribute & CSOEconItemAttribute.$Shape} CSOEconItemAttribute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemAttribute.decodeDelimited = function decodeDelimited(reader) { + CSOEconItemAttribute.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -85269,16 +110210,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconItemAttribute.verify = function verify(message) { + CSOEconItemAttribute.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) if (!$util.isInteger(message.def_index)) return "def_index: integer expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isInteger(message.value)) return "value: integer expected"; - if (message.value_bytes != null && message.hasOwnProperty("value_bytes")) + if (message.value_bytes != null && $Object.hasOwnProperty.call(message, "value_bytes")) if (!(message.value_bytes && typeof message.value_bytes.length === "number" || $util.isString(message.value_bytes))) return "value_bytes: buffer expected"; return null; @@ -85292,9 +110237,15 @@ * @param {Object.} object Plain object * @returns {CSOEconItemAttribute} CSOEconItemAttribute */ - CSOEconItemAttribute.fromObject = function fromObject(object) { + CSOEconItemAttribute.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconItemAttribute) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconItemAttribute: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconItemAttribute(); if (object.def_index != null) message.def_index = object.def_index >>> 0; @@ -85303,7 +110254,7 @@ if (object.value_bytes != null) if (typeof object.value_bytes === "string") $util.base64.decode(object.value_bytes, message.value_bytes = $util.newBuffer($util.base64.length(object.value_bytes)), 0); - else if (object.value_bytes.length) + else if (object.value_bytes.length >= 0) message.value_bytes = object.value_bytes; return message; }; @@ -85317,27 +110268,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconItemAttribute.toObject = function toObject(message, options) { + CSOEconItemAttribute.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.def_index = 0; object.value = 0; - if (options.bytes === String) + if (options.bytes === $String) object.value_bytes = ""; else { object.value_bytes = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.value_bytes = $util.newBuffer(object.value_bytes); } } - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) object.def_index = message.def_index; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.value_bytes != null && message.hasOwnProperty("value_bytes")) - object.value_bytes = options.bytes === String ? $util.base64.encode(message.value_bytes, 0, message.value_bytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.value_bytes) : message.value_bytes; + if (message.value_bytes != null && $Object.hasOwnProperty.call(message, "value_bytes")) + object.value_bytes = options.bytes === $String ? $util.base64.encode(message.value_bytes, 0, message.value_bytes.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value_bytes) : message.value_bytes; return object; }; @@ -85348,8 +110303,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconItemAttribute.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconItemAttribute.prototype.toJSON = function() { + return CSOEconItemAttribute.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconItemAttribute + * @function getTypeUrl + * @memberof CSOEconItemAttribute + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconItemAttribute.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconItemAttribute"; }; return CSOEconItemAttribute; @@ -85359,26 +110328,39 @@ /** * Properties of a CSOEconItemEquipped. - * @exports ICSOEconItemEquipped - * @interface ICSOEconItemEquipped + * @typedef {Object} CSOEconItemEquipped.$Properties * @property {number|null} [new_class] CSOEconItemEquipped new_class * @property {number|null} [new_slot] CSOEconItemEquipped new_slot + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconItemEquipped. + * @exports ICSOEconItemEquipped + * @interface ICSOEconItemEquipped + * @augments CSOEconItemEquipped.$Properties + * @deprecated Use CSOEconItemEquipped.$Properties instead. + */ + + /** + * Shape of a CSOEconItemEquipped. + * @typedef {CSOEconItemEquipped.$Properties} CSOEconItemEquipped.$Shape */ /** * Constructs a new CSOEconItemEquipped. * @exports CSOEconItemEquipped * @classdesc Represents a CSOEconItemEquipped. - * @implements ICSOEconItemEquipped * @constructor - * @param {ICSOEconItemEquipped=} [properties] Properties to set + * @param {CSOEconItemEquipped.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconItemEquipped(properties) { + var CSOEconItemEquipped = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconItemEquipped new_class. @@ -85401,10 +110383,14 @@ * @function create * @memberof CSOEconItemEquipped * @static - * @param {ICSOEconItemEquipped=} [properties] Properties to set + * @param {CSOEconItemEquipped.$Properties=} [properties] Properties to set * @returns {CSOEconItemEquipped} CSOEconItemEquipped instance + * @type {{ + * (properties: CSOEconItemEquipped.$Shape): CSOEconItemEquipped & CSOEconItemEquipped.$Shape; + * (properties?: CSOEconItemEquipped.$Properties): CSOEconItemEquipped; + * }} */ - CSOEconItemEquipped.create = function create(properties) { + CSOEconItemEquipped.create = function(properties) { return new CSOEconItemEquipped(properties); }; @@ -85413,17 +110399,24 @@ * @function encode * @memberof CSOEconItemEquipped * @static - * @param {ICSOEconItemEquipped} message CSOEconItemEquipped message or plain object to encode + * @param {CSOEconItemEquipped.$Properties} message CSOEconItemEquipped message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemEquipped.encode = function encode(message, writer) { + CSOEconItemEquipped.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.new_class != null && Object.hasOwnProperty.call(message, "new_class")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.new_class); - if (message.new_slot != null && Object.hasOwnProperty.call(message, "new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.new_slot); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -85432,12 +110425,12 @@ * @function encodeDelimited * @memberof CSOEconItemEquipped * @static - * @param {ICSOEconItemEquipped} message CSOEconItemEquipped message or plain object to encode + * @param {CSOEconItemEquipped.$Properties} message CSOEconItemEquipped message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemEquipped.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconItemEquipped.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -85447,28 +110440,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconItemEquipped} CSOEconItemEquipped + * @returns {CSOEconItemEquipped & CSOEconItemEquipped.$Shape} CSOEconItemEquipped * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemEquipped.decode = function decode(reader, length) { + CSOEconItemEquipped.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconItemEquipped(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconItemEquipped(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.new_class = reader.uint32(); - break; - case 2: - message.new_slot = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.new_class = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.new_slot = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -85478,11 +110491,11 @@ * @memberof CSOEconItemEquipped * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconItemEquipped} CSOEconItemEquipped + * @returns {CSOEconItemEquipped & CSOEconItemEquipped.$Shape} CSOEconItemEquipped * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemEquipped.decodeDelimited = function decodeDelimited(reader) { + CSOEconItemEquipped.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -85496,13 +110509,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconItemEquipped.verify = function verify(message) { + CSOEconItemEquipped.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.new_class != null && message.hasOwnProperty("new_class")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) if (!$util.isInteger(message.new_class)) return "new_class: integer expected"; - if (message.new_slot != null && message.hasOwnProperty("new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) if (!$util.isInteger(message.new_slot)) return "new_slot: integer expected"; return null; @@ -85516,9 +110533,15 @@ * @param {Object.} object Plain object * @returns {CSOEconItemEquipped} CSOEconItemEquipped */ - CSOEconItemEquipped.fromObject = function fromObject(object) { + CSOEconItemEquipped.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconItemEquipped) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconItemEquipped: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconItemEquipped(); if (object.new_class != null) message.new_class = object.new_class >>> 0; @@ -85536,17 +110559,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconItemEquipped.toObject = function toObject(message, options) { + CSOEconItemEquipped.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.new_class = 0; object.new_slot = 0; } - if (message.new_class != null && message.hasOwnProperty("new_class")) + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) object.new_class = message.new_class; - if (message.new_slot != null && message.hasOwnProperty("new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) object.new_slot = message.new_slot; return object; }; @@ -85558,8 +110585,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconItemEquipped.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconItemEquipped.prototype.toJSON = function() { + return CSOEconItemEquipped.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconItemEquipped + * @function getTypeUrl + * @memberof CSOEconItemEquipped + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconItemEquipped.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconItemEquipped"; }; return CSOEconItemEquipped; @@ -85569,8 +110610,7 @@ /** * Properties of a CSOEconItem. - * @exports ICSOEconItem - * @interface ICSOEconItem + * @typedef {Object} CSOEconItem.$Properties * @property {number|Long|null} [id] CSOEconItem id * @property {number|null} [account_id] CSOEconItem account_id * @property {number|null} [inventory] CSOEconItem inventory @@ -85582,32 +110622,46 @@ * @property {number|null} [origin] CSOEconItem origin * @property {string|null} [custom_name] CSOEconItem custom_name * @property {string|null} [custom_desc] CSOEconItem custom_desc - * @property {Array.|null} [attribute] CSOEconItem attribute - * @property {ICSOEconItem|null} [interior_item] CSOEconItem interior_item + * @property {Array.|null} [attribute] CSOEconItem attribute + * @property {CSOEconItem.$Properties|null} [interior_item] CSOEconItem interior_item * @property {boolean|null} [in_use] CSOEconItem in_use * @property {number|null} [style] CSOEconItem style * @property {number|Long|null} [original_id] CSOEconItem original_id * @property {boolean|null} [contains_equipped_state] CSOEconItem contains_equipped_state - * @property {Array.|null} [equipped_state] CSOEconItem equipped_state + * @property {Array.|null} [equipped_state] CSOEconItem equipped_state * @property {boolean|null} [contains_equipped_state_v2] CSOEconItem contains_equipped_state_v2 + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconItem. + * @exports ICSOEconItem + * @interface ICSOEconItem + * @augments CSOEconItem.$Properties + * @deprecated Use CSOEconItem.$Properties instead. + */ + + /** + * Shape of a CSOEconItem. + * @typedef {CSOEconItem.$Properties} CSOEconItem.$Shape */ /** * Constructs a new CSOEconItem. * @exports CSOEconItem * @classdesc Represents a CSOEconItem. - * @implements ICSOEconItem * @constructor - * @param {ICSOEconItem=} [properties] Properties to set + * @param {CSOEconItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconItem(properties) { + var CSOEconItem = function (properties) { this.attribute = []; this.equipped_state = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconItem id. @@ -85699,7 +110753,7 @@ /** * CSOEconItem attribute. - * @member {Array.} attribute + * @member {Array.} attribute * @memberof CSOEconItem * @instance */ @@ -85707,7 +110761,7 @@ /** * CSOEconItem interior_item. - * @member {ICSOEconItem|null|undefined} interior_item + * @member {CSOEconItem.$Properties|null|undefined} interior_item * @memberof CSOEconItem * @instance */ @@ -85747,7 +110801,7 @@ /** * CSOEconItem equipped_state. - * @member {Array.} equipped_state + * @member {Array.} equipped_state * @memberof CSOEconItem * @instance */ @@ -85766,10 +110820,14 @@ * @function create * @memberof CSOEconItem * @static - * @param {ICSOEconItem=} [properties] Properties to set + * @param {CSOEconItem.$Properties=} [properties] Properties to set * @returns {CSOEconItem} CSOEconItem instance + * @type {{ + * (properties: CSOEconItem.$Shape): CSOEconItem & CSOEconItem.$Shape; + * (properties?: CSOEconItem.$Properties): CSOEconItem; + * }} */ - CSOEconItem.create = function create(properties) { + CSOEconItem.create = function(properties) { return new CSOEconItem(properties); }; @@ -85778,53 +110836,60 @@ * @function encode * @memberof CSOEconItem * @static - * @param {ICSOEconItem} message CSOEconItem message or plain object to encode + * @param {CSOEconItem.$Properties} message CSOEconItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItem.encode = function encode(message, writer) { + CSOEconItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.id); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_id); - if (message.inventory != null && Object.hasOwnProperty.call(message, "inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.inventory); - if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.def_index); - if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.quantity); - if (message.level != null && Object.hasOwnProperty.call(message, "level")) + if (message.level != null && $Object.hasOwnProperty.call(message, "level")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.level); - if (message.quality != null && Object.hasOwnProperty.call(message, "quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.quality); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.flags); - if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.origin); - if (message.custom_name != null && Object.hasOwnProperty.call(message, "custom_name")) + if (message.custom_name != null && $Object.hasOwnProperty.call(message, "custom_name")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.custom_name); - if (message.custom_desc != null && Object.hasOwnProperty.call(message, "custom_desc")) + if (message.custom_desc != null && $Object.hasOwnProperty.call(message, "custom_desc")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.custom_desc); if (message.attribute != null && message.attribute.length) for (var i = 0; i < message.attribute.length; ++i) - $root.CSOEconItemAttribute.encode(message.attribute[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.interior_item != null && Object.hasOwnProperty.call(message, "interior_item")) - $root.CSOEconItem.encode(message.interior_item, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.in_use != null && Object.hasOwnProperty.call(message, "in_use")) + $root.CSOEconItemAttribute.encode(message.attribute[i], writer.uint32(/* id 12, wireType 2 =*/98).fork(), _depth + 1).ldelim(); + if (message.interior_item != null && $Object.hasOwnProperty.call(message, "interior_item")) + $root.CSOEconItem.encode(message.interior_item, writer.uint32(/* id 13, wireType 2 =*/106).fork(), _depth + 1).ldelim(); + if (message.in_use != null && $Object.hasOwnProperty.call(message, "in_use")) writer.uint32(/* id 14, wireType 0 =*/112).bool(message.in_use); - if (message.style != null && Object.hasOwnProperty.call(message, "style")) + if (message.style != null && $Object.hasOwnProperty.call(message, "style")) writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.style); - if (message.original_id != null && Object.hasOwnProperty.call(message, "original_id")) + if (message.original_id != null && $Object.hasOwnProperty.call(message, "original_id")) writer.uint32(/* id 16, wireType 0 =*/128).uint64(message.original_id); - if (message.contains_equipped_state != null && Object.hasOwnProperty.call(message, "contains_equipped_state")) + if (message.contains_equipped_state != null && $Object.hasOwnProperty.call(message, "contains_equipped_state")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.contains_equipped_state); if (message.equipped_state != null && message.equipped_state.length) for (var i = 0; i < message.equipped_state.length; ++i) - $root.CSOEconItemEquipped.encode(message.equipped_state[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.contains_equipped_state_v2 != null && Object.hasOwnProperty.call(message, "contains_equipped_state_v2")) + $root.CSOEconItemEquipped.encode(message.equipped_state[i], writer.uint32(/* id 18, wireType 2 =*/146).fork(), _depth + 1).ldelim(); + if (message.contains_equipped_state_v2 != null && $Object.hasOwnProperty.call(message, "contains_equipped_state_v2")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.contains_equipped_state_v2); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -85833,12 +110898,12 @@ * @function encodeDelimited * @memberof CSOEconItem * @static - * @param {ICSOEconItem} message CSOEconItem message or plain object to encode + * @param {CSOEconItem.$Properties} message CSOEconItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -85848,83 +110913,154 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconItem} CSOEconItem + * @returns {CSOEconItem & CSOEconItem.$Shape} CSOEconItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItem.decode = function decode(reader, length) { + CSOEconItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - message.account_id = reader.uint32(); - break; - case 3: - message.inventory = reader.uint32(); - break; - case 4: - message.def_index = reader.uint32(); - break; - case 5: - message.quantity = reader.uint32(); - break; - case 6: - message.level = reader.uint32(); - break; - case 7: - message.quality = reader.uint32(); - break; - case 8: - message.flags = reader.uint32(); - break; - case 9: - message.origin = reader.uint32(); - break; - case 10: - message.custom_name = reader.string(); - break; - case 11: - message.custom_desc = reader.string(); - break; - case 12: - if (!(message.attribute && message.attribute.length)) - message.attribute = []; - message.attribute.push($root.CSOEconItemAttribute.decode(reader, reader.uint32())); - break; - case 13: - message.interior_item = $root.CSOEconItem.decode(reader, reader.uint32()); - break; - case 14: - message.in_use = reader.bool(); - break; - case 15: - message.style = reader.uint32(); - break; - case 16: - message.original_id = reader.uint64(); - break; - case 17: - message.contains_equipped_state = reader.bool(); - break; - case 18: - if (!(message.equipped_state && message.equipped_state.length)) - message.equipped_state = []; - message.equipped_state.push($root.CSOEconItemEquipped.decode(reader, reader.uint32())); - break; - case 19: - message.contains_equipped_state_v2 = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.inventory = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.def_index = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.quantity = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.level = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.quality = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.flags = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.origin = reader.uint32(); + continue; + } + case 10: { + if (wireType !== 2) + break; + message.custom_name = reader.string(); + continue; + } + case 11: { + if (wireType !== 2) + break; + message.custom_desc = reader.string(); + continue; + } + case 12: { + if (wireType !== 2) + break; + if (!(message.attribute && message.attribute.length)) + message.attribute = []; + message.attribute.push($root.CSOEconItemAttribute.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 13: { + if (wireType !== 2) + break; + message.interior_item = $root.CSOEconItem.decode(reader, reader.uint32(), $undefined, _depth + 1, message.interior_item); + continue; + } + case 14: { + if (wireType !== 0) + break; + message.in_use = reader.bool(); + continue; + } + case 15: { + if (wireType !== 0) + break; + message.style = reader.uint32(); + continue; + } + case 16: { + if (wireType !== 0) + break; + message.original_id = reader.uint64(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.contains_equipped_state = reader.bool(); + continue; + } + case 18: { + if (wireType !== 2) + break; + if (!(message.equipped_state && message.equipped_state.length)) + message.equipped_state = []; + message.equipped_state.push($root.CSOEconItemEquipped.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 19: { + if (wireType !== 0) + break; + message.contains_equipped_state_v2 = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -85934,11 +111070,11 @@ * @memberof CSOEconItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconItem} CSOEconItem + * @returns {CSOEconItem & CSOEconItem.$Shape} CSOEconItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItem.decodeDelimited = function decodeDelimited(reader) { + CSOEconItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -85952,78 +111088,82 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconItem.verify = function verify(message) { + CSOEconItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) return "id: integer|Long expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.inventory != null && message.hasOwnProperty("inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) if (!$util.isInteger(message.inventory)) return "inventory: integer expected"; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) if (!$util.isInteger(message.def_index)) return "def_index: integer expected"; - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) if (!$util.isInteger(message.quantity)) return "quantity: integer expected"; - if (message.level != null && message.hasOwnProperty("level")) + if (message.level != null && $Object.hasOwnProperty.call(message, "level")) if (!$util.isInteger(message.level)) return "level: integer expected"; - if (message.quality != null && message.hasOwnProperty("quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) if (!$util.isInteger(message.quality)) return "quality: integer expected"; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) if (!$util.isInteger(message.flags)) return "flags: integer expected"; - if (message.origin != null && message.hasOwnProperty("origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) if (!$util.isInteger(message.origin)) return "origin: integer expected"; - if (message.custom_name != null && message.hasOwnProperty("custom_name")) + if (message.custom_name != null && $Object.hasOwnProperty.call(message, "custom_name")) if (!$util.isString(message.custom_name)) return "custom_name: string expected"; - if (message.custom_desc != null && message.hasOwnProperty("custom_desc")) + if (message.custom_desc != null && $Object.hasOwnProperty.call(message, "custom_desc")) if (!$util.isString(message.custom_desc)) return "custom_desc: string expected"; - if (message.attribute != null && message.hasOwnProperty("attribute")) { - if (!Array.isArray(message.attribute)) + if (message.attribute != null && $Object.hasOwnProperty.call(message, "attribute")) { + if (!$Array.isArray(message.attribute)) return "attribute: array expected"; for (var i = 0; i < message.attribute.length; ++i) { - var error = $root.CSOEconItemAttribute.verify(message.attribute[i]); + var error = $root.CSOEconItemAttribute.verify(message.attribute[i], _depth + 1); if (error) return "attribute." + error; } } - if (message.interior_item != null && message.hasOwnProperty("interior_item")) { - var error = $root.CSOEconItem.verify(message.interior_item); + if (message.interior_item != null && $Object.hasOwnProperty.call(message, "interior_item")) { + var error = $root.CSOEconItem.verify(message.interior_item, _depth + 1); if (error) return "interior_item." + error; } - if (message.in_use != null && message.hasOwnProperty("in_use")) + if (message.in_use != null && $Object.hasOwnProperty.call(message, "in_use")) if (typeof message.in_use !== "boolean") return "in_use: boolean expected"; - if (message.style != null && message.hasOwnProperty("style")) + if (message.style != null && $Object.hasOwnProperty.call(message, "style")) if (!$util.isInteger(message.style)) return "style: integer expected"; - if (message.original_id != null && message.hasOwnProperty("original_id")) + if (message.original_id != null && $Object.hasOwnProperty.call(message, "original_id")) if (!$util.isInteger(message.original_id) && !(message.original_id && $util.isInteger(message.original_id.low) && $util.isInteger(message.original_id.high))) return "original_id: integer|Long expected"; - if (message.contains_equipped_state != null && message.hasOwnProperty("contains_equipped_state")) + if (message.contains_equipped_state != null && $Object.hasOwnProperty.call(message, "contains_equipped_state")) if (typeof message.contains_equipped_state !== "boolean") return "contains_equipped_state: boolean expected"; - if (message.equipped_state != null && message.hasOwnProperty("equipped_state")) { - if (!Array.isArray(message.equipped_state)) + if (message.equipped_state != null && $Object.hasOwnProperty.call(message, "equipped_state")) { + if (!$Array.isArray(message.equipped_state)) return "equipped_state: array expected"; for (var i = 0; i < message.equipped_state.length; ++i) { - var error = $root.CSOEconItemEquipped.verify(message.equipped_state[i]); + var error = $root.CSOEconItemEquipped.verify(message.equipped_state[i], _depth + 1); if (error) return "equipped_state." + error; } } - if (message.contains_equipped_state_v2 != null && message.hasOwnProperty("contains_equipped_state_v2")) + if (message.contains_equipped_state_v2 != null && $Object.hasOwnProperty.call(message, "contains_equipped_state_v2")) if (typeof message.contains_equipped_state_v2 !== "boolean") return "contains_equipped_state_v2: boolean expected"; return null; @@ -86037,15 +111177,21 @@ * @param {Object.} object Plain object * @returns {CSOEconItem} CSOEconItem */ - CSOEconItem.fromObject = function fromObject(object) { + CSOEconItem.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconItem(); if (object.id != null) if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = true; + message.id = $util.Long.fromValue(object.id, true); else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); + message.id = $parseInt(object.id, 10); else if (typeof object.id === "number") message.id = object.id; else if (typeof object.id === "object") @@ -86067,51 +111213,51 @@ if (object.origin != null) message.origin = object.origin >>> 0; if (object.custom_name != null) - message.custom_name = String(object.custom_name); + message.custom_name = $String(object.custom_name); if (object.custom_desc != null) - message.custom_desc = String(object.custom_desc); + message.custom_desc = $String(object.custom_desc); if (object.attribute) { - if (!Array.isArray(object.attribute)) - throw TypeError(".CSOEconItem.attribute: array expected"); - message.attribute = []; + if (!$Array.isArray(object.attribute)) + throw $TypeError(".CSOEconItem.attribute: array expected"); + message.attribute = $Array(object.attribute.length); for (var i = 0; i < object.attribute.length; ++i) { - if (typeof object.attribute[i] !== "object") - throw TypeError(".CSOEconItem.attribute: object expected"); - message.attribute[i] = $root.CSOEconItemAttribute.fromObject(object.attribute[i]); + if (!$util.isObject(object.attribute[i])) + throw $TypeError(".CSOEconItem.attribute: object expected"); + message.attribute[i] = $root.CSOEconItemAttribute.fromObject(object.attribute[i], _depth + 1); } } if (object.interior_item != null) { - if (typeof object.interior_item !== "object") - throw TypeError(".CSOEconItem.interior_item: object expected"); - message.interior_item = $root.CSOEconItem.fromObject(object.interior_item); + if (!$util.isObject(object.interior_item)) + throw $TypeError(".CSOEconItem.interior_item: object expected"); + message.interior_item = $root.CSOEconItem.fromObject(object.interior_item, _depth + 1); } if (object.in_use != null) - message.in_use = Boolean(object.in_use); + message.in_use = $Boolean(object.in_use); if (object.style != null) message.style = object.style >>> 0; if (object.original_id != null) if ($util.Long) - (message.original_id = $util.Long.fromValue(object.original_id)).unsigned = true; + message.original_id = $util.Long.fromValue(object.original_id, true); else if (typeof object.original_id === "string") - message.original_id = parseInt(object.original_id, 10); + message.original_id = $parseInt(object.original_id, 10); else if (typeof object.original_id === "number") message.original_id = object.original_id; else if (typeof object.original_id === "object") message.original_id = new $util.LongBits(object.original_id.low >>> 0, object.original_id.high >>> 0).toNumber(true); if (object.contains_equipped_state != null) - message.contains_equipped_state = Boolean(object.contains_equipped_state); + message.contains_equipped_state = $Boolean(object.contains_equipped_state); if (object.equipped_state) { - if (!Array.isArray(object.equipped_state)) - throw TypeError(".CSOEconItem.equipped_state: array expected"); - message.equipped_state = []; + if (!$Array.isArray(object.equipped_state)) + throw $TypeError(".CSOEconItem.equipped_state: array expected"); + message.equipped_state = $Array(object.equipped_state.length); for (var i = 0; i < object.equipped_state.length; ++i) { - if (typeof object.equipped_state[i] !== "object") - throw TypeError(".CSOEconItem.equipped_state: object expected"); - message.equipped_state[i] = $root.CSOEconItemEquipped.fromObject(object.equipped_state[i]); + if (!$util.isObject(object.equipped_state[i])) + throw $TypeError(".CSOEconItem.equipped_state: object expected"); + message.equipped_state[i] = $root.CSOEconItemEquipped.fromObject(object.equipped_state[i], _depth + 1); } } if (object.contains_equipped_state_v2 != null) - message.contains_equipped_state_v2 = Boolean(object.contains_equipped_state_v2); + message.contains_equipped_state_v2 = $Boolean(object.contains_equipped_state_v2); return message; }; @@ -86124,9 +111270,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconItem.toObject = function toObject(message, options) { + CSOEconItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.attribute = []; @@ -86135,9 +111285,9 @@ if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.id = options.longs === String ? "0" : 0; + object.id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.account_id = 0; object.inventory = 0; object.def_index = 0; @@ -86153,61 +111303,65 @@ object.style = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.original_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.original_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.original_id = options.longs === String ? "0" : 0; + object.original_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.contains_equipped_state = false; object.contains_equipped_state_v2 = false; } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.id = typeof message.id === "number" ? $BigInt(message.id) : $util.Long.fromBits(message.id.low >>> 0, message.id.high >>> 0, true).toBigInt(); + else if (typeof message.id === "number") + object.id = options.longs === $String ? $String(message.id) : message.id; else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; - if (message.account_id != null && message.hasOwnProperty("account_id")) + object.id = options.longs === $String ? $util.Long.prototype.toString.call(message.id) : options.longs === $Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.inventory != null && message.hasOwnProperty("inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) object.inventory = message.inventory; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) object.def_index = message.def_index; - if (message.quantity != null && message.hasOwnProperty("quantity")) + if (message.quantity != null && $Object.hasOwnProperty.call(message, "quantity")) object.quantity = message.quantity; - if (message.level != null && message.hasOwnProperty("level")) + if (message.level != null && $Object.hasOwnProperty.call(message, "level")) object.level = message.level; - if (message.quality != null && message.hasOwnProperty("quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) object.quality = message.quality; - if (message.flags != null && message.hasOwnProperty("flags")) + if (message.flags != null && $Object.hasOwnProperty.call(message, "flags")) object.flags = message.flags; - if (message.origin != null && message.hasOwnProperty("origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) object.origin = message.origin; - if (message.custom_name != null && message.hasOwnProperty("custom_name")) + if (message.custom_name != null && $Object.hasOwnProperty.call(message, "custom_name")) object.custom_name = message.custom_name; - if (message.custom_desc != null && message.hasOwnProperty("custom_desc")) + if (message.custom_desc != null && $Object.hasOwnProperty.call(message, "custom_desc")) object.custom_desc = message.custom_desc; if (message.attribute && message.attribute.length) { - object.attribute = []; + object.attribute = $Array(message.attribute.length); for (var j = 0; j < message.attribute.length; ++j) - object.attribute[j] = $root.CSOEconItemAttribute.toObject(message.attribute[j], options); + object.attribute[j] = $root.CSOEconItemAttribute.toObject(message.attribute[j], options, _depth + 1); } - if (message.interior_item != null && message.hasOwnProperty("interior_item")) - object.interior_item = $root.CSOEconItem.toObject(message.interior_item, options); - if (message.in_use != null && message.hasOwnProperty("in_use")) + if (message.interior_item != null && $Object.hasOwnProperty.call(message, "interior_item")) + object.interior_item = $root.CSOEconItem.toObject(message.interior_item, options, _depth + 1); + if (message.in_use != null && $Object.hasOwnProperty.call(message, "in_use")) object.in_use = message.in_use; - if (message.style != null && message.hasOwnProperty("style")) + if (message.style != null && $Object.hasOwnProperty.call(message, "style")) object.style = message.style; - if (message.original_id != null && message.hasOwnProperty("original_id")) - if (typeof message.original_id === "number") - object.original_id = options.longs === String ? String(message.original_id) : message.original_id; + if (message.original_id != null && $Object.hasOwnProperty.call(message, "original_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.original_id = typeof message.original_id === "number" ? $BigInt(message.original_id) : $util.Long.fromBits(message.original_id.low >>> 0, message.original_id.high >>> 0, true).toBigInt(); + else if (typeof message.original_id === "number") + object.original_id = options.longs === $String ? $String(message.original_id) : message.original_id; else - object.original_id = options.longs === String ? $util.Long.prototype.toString.call(message.original_id) : options.longs === Number ? new $util.LongBits(message.original_id.low >>> 0, message.original_id.high >>> 0).toNumber(true) : message.original_id; - if (message.contains_equipped_state != null && message.hasOwnProperty("contains_equipped_state")) + object.original_id = options.longs === $String ? $util.Long.prototype.toString.call(message.original_id) : options.longs === $Number ? new $util.LongBits(message.original_id.low >>> 0, message.original_id.high >>> 0).toNumber(true) : message.original_id; + if (message.contains_equipped_state != null && $Object.hasOwnProperty.call(message, "contains_equipped_state")) object.contains_equipped_state = message.contains_equipped_state; if (message.equipped_state && message.equipped_state.length) { - object.equipped_state = []; + object.equipped_state = $Array(message.equipped_state.length); for (var j = 0; j < message.equipped_state.length; ++j) - object.equipped_state[j] = $root.CSOEconItemEquipped.toObject(message.equipped_state[j], options); + object.equipped_state[j] = $root.CSOEconItemEquipped.toObject(message.equipped_state[j], options, _depth + 1); } - if (message.contains_equipped_state_v2 != null && message.hasOwnProperty("contains_equipped_state_v2")) + if (message.contains_equipped_state_v2 != null && $Object.hasOwnProperty.call(message, "contains_equipped_state_v2")) object.contains_equipped_state_v2 = message.contains_equipped_state_v2; return object; }; @@ -86219,8 +111373,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconItem.prototype.toJSON = function() { + return CSOEconItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconItem + * @function getTypeUrl + * @memberof CSOEconItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconItem"; }; return CSOEconItem; @@ -86230,27 +111398,40 @@ /** * Properties of a CMsgAdjustItemEquippedState. - * @exports ICMsgAdjustItemEquippedState - * @interface ICMsgAdjustItemEquippedState + * @typedef {Object} CMsgAdjustItemEquippedState.$Properties * @property {number|Long|null} [item_id] CMsgAdjustItemEquippedState item_id * @property {number|null} [new_class] CMsgAdjustItemEquippedState new_class * @property {number|null} [new_slot] CMsgAdjustItemEquippedState new_slot + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgAdjustItemEquippedState. + * @exports ICMsgAdjustItemEquippedState + * @interface ICMsgAdjustItemEquippedState + * @augments CMsgAdjustItemEquippedState.$Properties + * @deprecated Use CMsgAdjustItemEquippedState.$Properties instead. + */ + + /** + * Shape of a CMsgAdjustItemEquippedState. + * @typedef {CMsgAdjustItemEquippedState.$Properties} CMsgAdjustItemEquippedState.$Shape */ /** * Constructs a new CMsgAdjustItemEquippedState. * @exports CMsgAdjustItemEquippedState * @classdesc Represents a CMsgAdjustItemEquippedState. - * @implements ICMsgAdjustItemEquippedState * @constructor - * @param {ICMsgAdjustItemEquippedState=} [properties] Properties to set + * @param {CMsgAdjustItemEquippedState.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgAdjustItemEquippedState(properties) { + var CMsgAdjustItemEquippedState = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgAdjustItemEquippedState item_id. @@ -86281,10 +111462,14 @@ * @function create * @memberof CMsgAdjustItemEquippedState * @static - * @param {ICMsgAdjustItemEquippedState=} [properties] Properties to set + * @param {CMsgAdjustItemEquippedState.$Properties=} [properties] Properties to set * @returns {CMsgAdjustItemEquippedState} CMsgAdjustItemEquippedState instance + * @type {{ + * (properties: CMsgAdjustItemEquippedState.$Shape): CMsgAdjustItemEquippedState & CMsgAdjustItemEquippedState.$Shape; + * (properties?: CMsgAdjustItemEquippedState.$Properties): CMsgAdjustItemEquippedState; + * }} */ - CMsgAdjustItemEquippedState.create = function create(properties) { + CMsgAdjustItemEquippedState.create = function(properties) { return new CMsgAdjustItemEquippedState(properties); }; @@ -86293,19 +111478,26 @@ * @function encode * @memberof CMsgAdjustItemEquippedState * @static - * @param {ICMsgAdjustItemEquippedState} message CMsgAdjustItemEquippedState message or plain object to encode + * @param {CMsgAdjustItemEquippedState.$Properties} message CMsgAdjustItemEquippedState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAdjustItemEquippedState.encode = function encode(message, writer) { + CMsgAdjustItemEquippedState.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.new_class != null && Object.hasOwnProperty.call(message, "new_class")) + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.new_class); - if (message.new_slot != null && Object.hasOwnProperty.call(message, "new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.new_slot); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -86314,12 +111506,12 @@ * @function encodeDelimited * @memberof CMsgAdjustItemEquippedState * @static - * @param {ICMsgAdjustItemEquippedState} message CMsgAdjustItemEquippedState message or plain object to encode + * @param {CMsgAdjustItemEquippedState.$Properties} message CMsgAdjustItemEquippedState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgAdjustItemEquippedState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgAdjustItemEquippedState.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -86329,31 +111521,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgAdjustItemEquippedState} CMsgAdjustItemEquippedState + * @returns {CMsgAdjustItemEquippedState & CMsgAdjustItemEquippedState.$Shape} CMsgAdjustItemEquippedState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAdjustItemEquippedState.decode = function decode(reader, length) { + CMsgAdjustItemEquippedState.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgAdjustItemEquippedState(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgAdjustItemEquippedState(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.new_class = reader.uint32(); - break; - case 3: - message.new_slot = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.new_class = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.new_slot = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -86363,11 +111578,11 @@ * @memberof CMsgAdjustItemEquippedState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgAdjustItemEquippedState} CMsgAdjustItemEquippedState + * @returns {CMsgAdjustItemEquippedState & CMsgAdjustItemEquippedState.$Shape} CMsgAdjustItemEquippedState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgAdjustItemEquippedState.decodeDelimited = function decodeDelimited(reader) { + CMsgAdjustItemEquippedState.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -86381,16 +111596,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgAdjustItemEquippedState.verify = function verify(message) { + CMsgAdjustItemEquippedState.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.new_class != null && message.hasOwnProperty("new_class")) + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) if (!$util.isInteger(message.new_class)) return "new_class: integer expected"; - if (message.new_slot != null && message.hasOwnProperty("new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) if (!$util.isInteger(message.new_slot)) return "new_slot: integer expected"; return null; @@ -86404,15 +111623,21 @@ * @param {Object.} object Plain object * @returns {CMsgAdjustItemEquippedState} CMsgAdjustItemEquippedState */ - CMsgAdjustItemEquippedState.fromObject = function fromObject(object) { + CMsgAdjustItemEquippedState.fromObject = function (object, _depth) { if (object instanceof $root.CMsgAdjustItemEquippedState) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgAdjustItemEquippedState: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgAdjustItemEquippedState(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -86433,27 +111658,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgAdjustItemEquippedState.toObject = function toObject(message, options) { + CMsgAdjustItemEquippedState.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.new_class = 0; object.new_slot = 0; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.new_class != null && message.hasOwnProperty("new_class")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.new_class != null && $Object.hasOwnProperty.call(message, "new_class")) object.new_class = message.new_class; - if (message.new_slot != null && message.hasOwnProperty("new_slot")) + if (message.new_slot != null && $Object.hasOwnProperty.call(message, "new_slot")) object.new_slot = message.new_slot; return object; }; @@ -86465,8 +111696,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgAdjustItemEquippedState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgAdjustItemEquippedState.prototype.toJSON = function() { + return CMsgAdjustItemEquippedState.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgAdjustItemEquippedState + * @function getTypeUrl + * @memberof CMsgAdjustItemEquippedState + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgAdjustItemEquippedState.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgAdjustItemEquippedState"; }; return CMsgAdjustItemEquippedState; @@ -86474,27 +111719,40 @@ $root.CMsgSortItems = (function() { + /** + * Properties of a CMsgSortItems. + * @typedef {Object} CMsgSortItems.$Properties + * @property {number|null} [sort_type] CMsgSortItems sort_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSortItems. * @exports ICMsgSortItems * @interface ICMsgSortItems - * @property {number|null} [sort_type] CMsgSortItems sort_type + * @augments CMsgSortItems.$Properties + * @deprecated Use CMsgSortItems.$Properties instead. + */ + + /** + * Shape of a CMsgSortItems. + * @typedef {CMsgSortItems.$Properties} CMsgSortItems.$Shape */ /** * Constructs a new CMsgSortItems. * @exports CMsgSortItems * @classdesc Represents a CMsgSortItems. - * @implements ICMsgSortItems * @constructor - * @param {ICMsgSortItems=} [properties] Properties to set + * @param {CMsgSortItems.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSortItems(properties) { + var CMsgSortItems = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSortItems sort_type. @@ -86509,10 +111767,14 @@ * @function create * @memberof CMsgSortItems * @static - * @param {ICMsgSortItems=} [properties] Properties to set + * @param {CMsgSortItems.$Properties=} [properties] Properties to set * @returns {CMsgSortItems} CMsgSortItems instance + * @type {{ + * (properties: CMsgSortItems.$Shape): CMsgSortItems & CMsgSortItems.$Shape; + * (properties?: CMsgSortItems.$Properties): CMsgSortItems; + * }} */ - CMsgSortItems.create = function create(properties) { + CMsgSortItems.create = function(properties) { return new CMsgSortItems(properties); }; @@ -86521,15 +111783,22 @@ * @function encode * @memberof CMsgSortItems * @static - * @param {ICMsgSortItems} message CMsgSortItems message or plain object to encode + * @param {CMsgSortItems.$Properties} message CMsgSortItems message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSortItems.encode = function encode(message, writer) { + CMsgSortItems.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.sort_type != null && Object.hasOwnProperty.call(message, "sort_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.sort_type != null && $Object.hasOwnProperty.call(message, "sort_type")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.sort_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -86538,12 +111807,12 @@ * @function encodeDelimited * @memberof CMsgSortItems * @static - * @param {ICMsgSortItems} message CMsgSortItems message or plain object to encode + * @param {CMsgSortItems.$Properties} message CMsgSortItems message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSortItems.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSortItems.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -86553,25 +111822,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSortItems} CMsgSortItems + * @returns {CMsgSortItems & CMsgSortItems.$Shape} CMsgSortItems * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSortItems.decode = function decode(reader, length) { + CMsgSortItems.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSortItems(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSortItems(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sort_type = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.sort_type = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -86581,11 +111867,11 @@ * @memberof CMsgSortItems * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSortItems} CMsgSortItems + * @returns {CMsgSortItems & CMsgSortItems.$Shape} CMsgSortItems * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSortItems.decodeDelimited = function decodeDelimited(reader) { + CMsgSortItems.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -86599,10 +111885,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSortItems.verify = function verify(message) { + CMsgSortItems.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sort_type != null && message.hasOwnProperty("sort_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.sort_type != null && $Object.hasOwnProperty.call(message, "sort_type")) if (!$util.isInteger(message.sort_type)) return "sort_type: integer expected"; return null; @@ -86616,9 +111906,15 @@ * @param {Object.} object Plain object * @returns {CMsgSortItems} CMsgSortItems */ - CMsgSortItems.fromObject = function fromObject(object) { + CMsgSortItems.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSortItems) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSortItems: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSortItems(); if (object.sort_type != null) message.sort_type = object.sort_type >>> 0; @@ -86634,13 +111930,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSortItems.toObject = function toObject(message, options) { + CMsgSortItems.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.sort_type = 0; - if (message.sort_type != null && message.hasOwnProperty("sort_type")) + if (message.sort_type != null && $Object.hasOwnProperty.call(message, "sort_type")) object.sort_type = message.sort_type; return object; }; @@ -86652,8 +111952,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSortItems.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSortItems.prototype.toJSON = function() { + return CMsgSortItems.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSortItems + * @function getTypeUrl + * @memberof CMsgSortItems + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSortItems.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSortItems"; }; return CMsgSortItems; @@ -86663,28 +111977,41 @@ /** * Properties of a CSOEconClaimCode. - * @exports ICSOEconClaimCode - * @interface ICSOEconClaimCode + * @typedef {Object} CSOEconClaimCode.$Properties * @property {number|null} [account_id] CSOEconClaimCode account_id * @property {number|null} [code_type] CSOEconClaimCode code_type * @property {number|null} [time_acquired] CSOEconClaimCode time_acquired * @property {string|null} [code] CSOEconClaimCode code + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconClaimCode. + * @exports ICSOEconClaimCode + * @interface ICSOEconClaimCode + * @augments CSOEconClaimCode.$Properties + * @deprecated Use CSOEconClaimCode.$Properties instead. + */ + + /** + * Shape of a CSOEconClaimCode. + * @typedef {CSOEconClaimCode.$Properties} CSOEconClaimCode.$Shape */ /** * Constructs a new CSOEconClaimCode. * @exports CSOEconClaimCode * @classdesc Represents a CSOEconClaimCode. - * @implements ICSOEconClaimCode * @constructor - * @param {ICSOEconClaimCode=} [properties] Properties to set + * @param {CSOEconClaimCode.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconClaimCode(properties) { + var CSOEconClaimCode = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconClaimCode account_id. @@ -86723,10 +112050,14 @@ * @function create * @memberof CSOEconClaimCode * @static - * @param {ICSOEconClaimCode=} [properties] Properties to set + * @param {CSOEconClaimCode.$Properties=} [properties] Properties to set * @returns {CSOEconClaimCode} CSOEconClaimCode instance + * @type {{ + * (properties: CSOEconClaimCode.$Shape): CSOEconClaimCode & CSOEconClaimCode.$Shape; + * (properties?: CSOEconClaimCode.$Properties): CSOEconClaimCode; + * }} */ - CSOEconClaimCode.create = function create(properties) { + CSOEconClaimCode.create = function(properties) { return new CSOEconClaimCode(properties); }; @@ -86735,21 +112066,28 @@ * @function encode * @memberof CSOEconClaimCode * @static - * @param {ICSOEconClaimCode} message CSOEconClaimCode message or plain object to encode + * @param {CSOEconClaimCode.$Properties} message CSOEconClaimCode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconClaimCode.encode = function encode(message, writer) { + CSOEconClaimCode.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.code_type != null && Object.hasOwnProperty.call(message, "code_type")) + if (message.code_type != null && $Object.hasOwnProperty.call(message, "code_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.code_type); - if (message.time_acquired != null && Object.hasOwnProperty.call(message, "time_acquired")) + if (message.time_acquired != null && $Object.hasOwnProperty.call(message, "time_acquired")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.time_acquired); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) + if (message.code != null && $Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -86758,12 +112096,12 @@ * @function encodeDelimited * @memberof CSOEconClaimCode * @static - * @param {ICSOEconClaimCode} message CSOEconClaimCode message or plain object to encode + * @param {CSOEconClaimCode.$Properties} message CSOEconClaimCode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconClaimCode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconClaimCode.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -86773,34 +112111,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconClaimCode} CSOEconClaimCode + * @returns {CSOEconClaimCode & CSOEconClaimCode.$Shape} CSOEconClaimCode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconClaimCode.decode = function decode(reader, length) { + CSOEconClaimCode.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconClaimCode(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconClaimCode(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.code_type = reader.uint32(); - break; - case 3: - message.time_acquired = reader.uint32(); - break; - case 4: - message.code = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.code_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.time_acquired = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.code = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -86810,11 +112174,11 @@ * @memberof CSOEconClaimCode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconClaimCode} CSOEconClaimCode + * @returns {CSOEconClaimCode & CSOEconClaimCode.$Shape} CSOEconClaimCode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconClaimCode.decodeDelimited = function decodeDelimited(reader) { + CSOEconClaimCode.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -86828,19 +112192,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconClaimCode.verify = function verify(message) { + CSOEconClaimCode.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.code_type != null && message.hasOwnProperty("code_type")) + if (message.code_type != null && $Object.hasOwnProperty.call(message, "code_type")) if (!$util.isInteger(message.code_type)) return "code_type: integer expected"; - if (message.time_acquired != null && message.hasOwnProperty("time_acquired")) + if (message.time_acquired != null && $Object.hasOwnProperty.call(message, "time_acquired")) if (!$util.isInteger(message.time_acquired)) return "time_acquired: integer expected"; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && $Object.hasOwnProperty.call(message, "code")) if (!$util.isString(message.code)) return "code: string expected"; return null; @@ -86854,9 +112222,15 @@ * @param {Object.} object Plain object * @returns {CSOEconClaimCode} CSOEconClaimCode */ - CSOEconClaimCode.fromObject = function fromObject(object) { + CSOEconClaimCode.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconClaimCode) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconClaimCode: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconClaimCode(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -86865,7 +112239,7 @@ if (object.time_acquired != null) message.time_acquired = object.time_acquired >>> 0; if (object.code != null) - message.code = String(object.code); + message.code = $String(object.code); return message; }; @@ -86878,9 +112252,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconClaimCode.toObject = function toObject(message, options) { + CSOEconClaimCode.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; @@ -86888,13 +112266,13 @@ object.time_acquired = 0; object.code = ""; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.code_type != null && message.hasOwnProperty("code_type")) + if (message.code_type != null && $Object.hasOwnProperty.call(message, "code_type")) object.code_type = message.code_type; - if (message.time_acquired != null && message.hasOwnProperty("time_acquired")) + if (message.time_acquired != null && $Object.hasOwnProperty.call(message, "time_acquired")) object.time_acquired = message.time_acquired; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && $Object.hasOwnProperty.call(message, "code")) object.code = message.code; return object; }; @@ -86906,8 +112284,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconClaimCode.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconClaimCode.prototype.toJSON = function() { + return CSOEconClaimCode.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconClaimCode + * @function getTypeUrl + * @memberof CSOEconClaimCode + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconClaimCode.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconClaimCode"; }; return CSOEconClaimCode; @@ -86915,27 +112307,40 @@ $root.CMsgStoreGetUserData = (function() { + /** + * Properties of a CMsgStoreGetUserData. + * @typedef {Object} CMsgStoreGetUserData.$Properties + * @property {number|null} [price_sheet_version] CMsgStoreGetUserData price_sheet_version + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgStoreGetUserData. * @exports ICMsgStoreGetUserData * @interface ICMsgStoreGetUserData - * @property {number|null} [price_sheet_version] CMsgStoreGetUserData price_sheet_version + * @augments CMsgStoreGetUserData.$Properties + * @deprecated Use CMsgStoreGetUserData.$Properties instead. + */ + + /** + * Shape of a CMsgStoreGetUserData. + * @typedef {CMsgStoreGetUserData.$Properties} CMsgStoreGetUserData.$Shape */ /** * Constructs a new CMsgStoreGetUserData. * @exports CMsgStoreGetUserData * @classdesc Represents a CMsgStoreGetUserData. - * @implements ICMsgStoreGetUserData * @constructor - * @param {ICMsgStoreGetUserData=} [properties] Properties to set + * @param {CMsgStoreGetUserData.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgStoreGetUserData(properties) { + var CMsgStoreGetUserData = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgStoreGetUserData price_sheet_version. @@ -86950,10 +112355,14 @@ * @function create * @memberof CMsgStoreGetUserData * @static - * @param {ICMsgStoreGetUserData=} [properties] Properties to set + * @param {CMsgStoreGetUserData.$Properties=} [properties] Properties to set * @returns {CMsgStoreGetUserData} CMsgStoreGetUserData instance + * @type {{ + * (properties: CMsgStoreGetUserData.$Shape): CMsgStoreGetUserData & CMsgStoreGetUserData.$Shape; + * (properties?: CMsgStoreGetUserData.$Properties): CMsgStoreGetUserData; + * }} */ - CMsgStoreGetUserData.create = function create(properties) { + CMsgStoreGetUserData.create = function(properties) { return new CMsgStoreGetUserData(properties); }; @@ -86962,15 +112371,22 @@ * @function encode * @memberof CMsgStoreGetUserData * @static - * @param {ICMsgStoreGetUserData} message CMsgStoreGetUserData message or plain object to encode + * @param {CMsgStoreGetUserData.$Properties} message CMsgStoreGetUserData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgStoreGetUserData.encode = function encode(message, writer) { + CMsgStoreGetUserData.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.price_sheet_version != null && Object.hasOwnProperty.call(message, "price_sheet_version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.price_sheet_version); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -86979,12 +112395,12 @@ * @function encodeDelimited * @memberof CMsgStoreGetUserData * @static - * @param {ICMsgStoreGetUserData} message CMsgStoreGetUserData message or plain object to encode + * @param {CMsgStoreGetUserData.$Properties} message CMsgStoreGetUserData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgStoreGetUserData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgStoreGetUserData.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -86994,25 +112410,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgStoreGetUserData} CMsgStoreGetUserData + * @returns {CMsgStoreGetUserData & CMsgStoreGetUserData.$Shape} CMsgStoreGetUserData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgStoreGetUserData.decode = function decode(reader, length) { + CMsgStoreGetUserData.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgStoreGetUserData(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgStoreGetUserData(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.price_sheet_version = reader.fixed32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 5) + break; + message.price_sheet_version = reader.fixed32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -87022,11 +112455,11 @@ * @memberof CMsgStoreGetUserData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgStoreGetUserData} CMsgStoreGetUserData + * @returns {CMsgStoreGetUserData & CMsgStoreGetUserData.$Shape} CMsgStoreGetUserData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgStoreGetUserData.decodeDelimited = function decodeDelimited(reader) { + CMsgStoreGetUserData.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -87040,10 +112473,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgStoreGetUserData.verify = function verify(message) { + CMsgStoreGetUserData.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.price_sheet_version != null && message.hasOwnProperty("price_sheet_version")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) if (!$util.isInteger(message.price_sheet_version)) return "price_sheet_version: integer expected"; return null; @@ -87057,9 +112494,15 @@ * @param {Object.} object Plain object * @returns {CMsgStoreGetUserData} CMsgStoreGetUserData */ - CMsgStoreGetUserData.fromObject = function fromObject(object) { + CMsgStoreGetUserData.fromObject = function (object, _depth) { if (object instanceof $root.CMsgStoreGetUserData) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgStoreGetUserData: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgStoreGetUserData(); if (object.price_sheet_version != null) message.price_sheet_version = object.price_sheet_version >>> 0; @@ -87075,13 +112518,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgStoreGetUserData.toObject = function toObject(message, options) { + CMsgStoreGetUserData.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.price_sheet_version = 0; - if (message.price_sheet_version != null && message.hasOwnProperty("price_sheet_version")) + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) object.price_sheet_version = message.price_sheet_version; return object; }; @@ -87093,8 +112540,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgStoreGetUserData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgStoreGetUserData.prototype.toJSON = function() { + return CMsgStoreGetUserData.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgStoreGetUserData + * @function getTypeUrl + * @memberof CMsgStoreGetUserData + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgStoreGetUserData.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgStoreGetUserData"; }; return CMsgStoreGetUserData; @@ -87104,8 +112565,7 @@ /** * Properties of a CMsgStoreGetUserDataResponse. - * @exports ICMsgStoreGetUserDataResponse - * @interface ICMsgStoreGetUserDataResponse + * @typedef {Object} CMsgStoreGetUserDataResponse.$Properties * @property {number|null} [result] CMsgStoreGetUserDataResponse result * @property {number|null} [currency] CMsgStoreGetUserDataResponse currency * @property {string|null} [country] CMsgStoreGetUserDataResponse country @@ -87116,23 +112576,37 @@ * @property {Uint8Array|null} [price_sheet] CMsgStoreGetUserDataResponse price_sheet * @property {number|null} [default_item_sort] CMsgStoreGetUserDataResponse default_item_sort * @property {Array.|null} [popular_items] CMsgStoreGetUserDataResponse popular_items + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgStoreGetUserDataResponse. + * @exports ICMsgStoreGetUserDataResponse + * @interface ICMsgStoreGetUserDataResponse + * @augments CMsgStoreGetUserDataResponse.$Properties + * @deprecated Use CMsgStoreGetUserDataResponse.$Properties instead. + */ + + /** + * Shape of a CMsgStoreGetUserDataResponse. + * @typedef {CMsgStoreGetUserDataResponse.$Properties} CMsgStoreGetUserDataResponse.$Shape */ /** * Constructs a new CMsgStoreGetUserDataResponse. * @exports CMsgStoreGetUserDataResponse * @classdesc Represents a CMsgStoreGetUserDataResponse. - * @implements ICMsgStoreGetUserDataResponse * @constructor - * @param {ICMsgStoreGetUserDataResponse=} [properties] Properties to set + * @param {CMsgStoreGetUserDataResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgStoreGetUserDataResponse(properties) { + var CMsgStoreGetUserDataResponse = function (properties) { this.popular_items = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgStoreGetUserDataResponse result. @@ -87219,10 +112693,14 @@ * @function create * @memberof CMsgStoreGetUserDataResponse * @static - * @param {ICMsgStoreGetUserDataResponse=} [properties] Properties to set + * @param {CMsgStoreGetUserDataResponse.$Properties=} [properties] Properties to set * @returns {CMsgStoreGetUserDataResponse} CMsgStoreGetUserDataResponse instance + * @type {{ + * (properties: CMsgStoreGetUserDataResponse.$Shape): CMsgStoreGetUserDataResponse & CMsgStoreGetUserDataResponse.$Shape; + * (properties?: CMsgStoreGetUserDataResponse.$Properties): CMsgStoreGetUserDataResponse; + * }} */ - CMsgStoreGetUserDataResponse.create = function create(properties) { + CMsgStoreGetUserDataResponse.create = function(properties) { return new CMsgStoreGetUserDataResponse(properties); }; @@ -87231,34 +112709,41 @@ * @function encode * @memberof CMsgStoreGetUserDataResponse * @static - * @param {ICMsgStoreGetUserDataResponse} message CMsgStoreGetUserDataResponse message or plain object to encode + * @param {CMsgStoreGetUserDataResponse.$Properties} message CMsgStoreGetUserDataResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgStoreGetUserDataResponse.encode = function encode(message, writer) { + CMsgStoreGetUserDataResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.currency); - if (message.country != null && Object.hasOwnProperty.call(message, "country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.country); - if (message.price_sheet_version != null && Object.hasOwnProperty.call(message, "price_sheet_version")) + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) writer.uint32(/* id 4, wireType 5 =*/37).fixed32(message.price_sheet_version); - if (message.experiment_data != null && Object.hasOwnProperty.call(message, "experiment_data")) + if (message.experiment_data != null && $Object.hasOwnProperty.call(message, "experiment_data")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.experiment_data); - if (message.featured_item_idx != null && Object.hasOwnProperty.call(message, "featured_item_idx")) + if (message.featured_item_idx != null && $Object.hasOwnProperty.call(message, "featured_item_idx")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.featured_item_idx); - if (message.show_hat_descriptions != null && Object.hasOwnProperty.call(message, "show_hat_descriptions")) + if (message.show_hat_descriptions != null && $Object.hasOwnProperty.call(message, "show_hat_descriptions")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.show_hat_descriptions); - if (message.price_sheet != null && Object.hasOwnProperty.call(message, "price_sheet")) + if (message.price_sheet != null && $Object.hasOwnProperty.call(message, "price_sheet")) writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.price_sheet); - if (message.default_item_sort != null && Object.hasOwnProperty.call(message, "default_item_sort")) + if (message.default_item_sort != null && $Object.hasOwnProperty.call(message, "default_item_sort")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.default_item_sort); if (message.popular_items != null && message.popular_items.length) for (var i = 0; i < message.popular_items.length; ++i) writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.popular_items[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -87267,12 +112752,12 @@ * @function encodeDelimited * @memberof CMsgStoreGetUserDataResponse * @static - * @param {ICMsgStoreGetUserDataResponse} message CMsgStoreGetUserDataResponse message or plain object to encode + * @param {CMsgStoreGetUserDataResponse.$Properties} message CMsgStoreGetUserDataResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgStoreGetUserDataResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgStoreGetUserDataResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -87282,59 +112767,104 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgStoreGetUserDataResponse} CMsgStoreGetUserDataResponse + * @returns {CMsgStoreGetUserDataResponse & CMsgStoreGetUserDataResponse.$Shape} CMsgStoreGetUserDataResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgStoreGetUserDataResponse.decode = function decode(reader, length) { + CMsgStoreGetUserDataResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgStoreGetUserDataResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgStoreGetUserDataResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - case 2: - message.currency = reader.int32(); - break; - case 3: - message.country = reader.string(); - break; - case 4: - message.price_sheet_version = reader.fixed32(); - break; - case 5: - message.experiment_data = reader.uint64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 6: - message.featured_item_idx = reader.int32(); - break; - case 7: - message.show_hat_descriptions = reader.bool(); - break; - case 8: - message.price_sheet = reader.bytes(); - break; - case 9: - message.default_item_sort = reader.int32(); - break; - case 10: - if (!(message.popular_items && message.popular_items.length)) - message.popular_items = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.popular_items.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.result = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.currency = reader.int32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.country = reader.string(); + continue; + } + case 4: { + if (wireType !== 5) + break; + message.price_sheet_version = reader.fixed32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.experiment_data = reader.uint64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.featured_item_idx = reader.int32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.show_hat_descriptions = reader.bool(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.price_sheet = reader.bytes(); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.default_item_sort = reader.int32(); + continue; + } + case 10: { + if (wireType === 2) { + if (!(message.popular_items && message.popular_items.length)) + message.popular_items = []; + reader.uint32s(message.popular_items); + continue; + } + if (wireType !== 0) + break; + if (!(message.popular_items && message.popular_items.length)) + message.popular_items = []; message.popular_items.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -87344,11 +112874,11 @@ * @memberof CMsgStoreGetUserDataResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgStoreGetUserDataResponse} CMsgStoreGetUserDataResponse + * @returns {CMsgStoreGetUserDataResponse & CMsgStoreGetUserDataResponse.$Shape} CMsgStoreGetUserDataResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgStoreGetUserDataResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgStoreGetUserDataResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -87362,38 +112892,42 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgStoreGetUserDataResponse.verify = function verify(message) { + CMsgStoreGetUserDataResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) if (!$util.isInteger(message.currency)) return "currency: integer expected"; - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) if (!$util.isString(message.country)) return "country: string expected"; - if (message.price_sheet_version != null && message.hasOwnProperty("price_sheet_version")) + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) if (!$util.isInteger(message.price_sheet_version)) return "price_sheet_version: integer expected"; - if (message.experiment_data != null && message.hasOwnProperty("experiment_data")) + if (message.experiment_data != null && $Object.hasOwnProperty.call(message, "experiment_data")) if (!$util.isInteger(message.experiment_data) && !(message.experiment_data && $util.isInteger(message.experiment_data.low) && $util.isInteger(message.experiment_data.high))) return "experiment_data: integer|Long expected"; - if (message.featured_item_idx != null && message.hasOwnProperty("featured_item_idx")) + if (message.featured_item_idx != null && $Object.hasOwnProperty.call(message, "featured_item_idx")) if (!$util.isInteger(message.featured_item_idx)) return "featured_item_idx: integer expected"; - if (message.show_hat_descriptions != null && message.hasOwnProperty("show_hat_descriptions")) + if (message.show_hat_descriptions != null && $Object.hasOwnProperty.call(message, "show_hat_descriptions")) if (typeof message.show_hat_descriptions !== "boolean") return "show_hat_descriptions: boolean expected"; - if (message.price_sheet != null && message.hasOwnProperty("price_sheet")) + if (message.price_sheet != null && $Object.hasOwnProperty.call(message, "price_sheet")) if (!(message.price_sheet && typeof message.price_sheet.length === "number" || $util.isString(message.price_sheet))) return "price_sheet: buffer expected"; - if (message.default_item_sort != null && message.hasOwnProperty("default_item_sort")) + if (message.default_item_sort != null && $Object.hasOwnProperty.call(message, "default_item_sort")) if (!$util.isInteger(message.default_item_sort)) return "default_item_sort: integer expected"; - if (message.popular_items != null && message.hasOwnProperty("popular_items")) { - if (!Array.isArray(message.popular_items)) + if (message.popular_items != null && $Object.hasOwnProperty.call(message, "popular_items")) { + if (!$Array.isArray(message.popular_items)) return "popular_items: array expected"; for (var i = 0; i < message.popular_items.length; ++i) if (!$util.isInteger(message.popular_items[i])) @@ -87410,23 +112944,29 @@ * @param {Object.} object Plain object * @returns {CMsgStoreGetUserDataResponse} CMsgStoreGetUserDataResponse */ - CMsgStoreGetUserDataResponse.fromObject = function fromObject(object) { + CMsgStoreGetUserDataResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgStoreGetUserDataResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgStoreGetUserDataResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgStoreGetUserDataResponse(); if (object.result != null) message.result = object.result | 0; if (object.currency != null) message.currency = object.currency | 0; if (object.country != null) - message.country = String(object.country); + message.country = $String(object.country); if (object.price_sheet_version != null) message.price_sheet_version = object.price_sheet_version >>> 0; if (object.experiment_data != null) if ($util.Long) - (message.experiment_data = $util.Long.fromValue(object.experiment_data)).unsigned = true; + message.experiment_data = $util.Long.fromValue(object.experiment_data, true); else if (typeof object.experiment_data === "string") - message.experiment_data = parseInt(object.experiment_data, 10); + message.experiment_data = $parseInt(object.experiment_data, 10); else if (typeof object.experiment_data === "number") message.experiment_data = object.experiment_data; else if (typeof object.experiment_data === "object") @@ -87434,18 +112974,18 @@ if (object.featured_item_idx != null) message.featured_item_idx = object.featured_item_idx | 0; if (object.show_hat_descriptions != null) - message.show_hat_descriptions = Boolean(object.show_hat_descriptions); + message.show_hat_descriptions = $Boolean(object.show_hat_descriptions); if (object.price_sheet != null) if (typeof object.price_sheet === "string") $util.base64.decode(object.price_sheet, message.price_sheet = $util.newBuffer($util.base64.length(object.price_sheet)), 0); - else if (object.price_sheet.length) + else if (object.price_sheet.length >= 0) message.price_sheet = object.price_sheet; if (object.default_item_sort != null) message.default_item_sort = object.default_item_sort | 0; if (object.popular_items) { - if (!Array.isArray(object.popular_items)) - throw TypeError(".CMsgStoreGetUserDataResponse.popular_items: array expected"); - message.popular_items = []; + if (!$Array.isArray(object.popular_items)) + throw $TypeError(".CMsgStoreGetUserDataResponse.popular_items: array expected"); + message.popular_items = $Array(object.popular_items.length); for (var i = 0; i < object.popular_items.length; ++i) message.popular_items[i] = object.popular_items[i] >>> 0; } @@ -87461,9 +113001,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgStoreGetUserDataResponse.toObject = function toObject(message, options) { + CMsgStoreGetUserDataResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.popular_items = []; @@ -87474,43 +113018,45 @@ object.price_sheet_version = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.experiment_data = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.experiment_data = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.experiment_data = options.longs === String ? "0" : 0; + object.experiment_data = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.featured_item_idx = 0; object.show_hat_descriptions = true; - if (options.bytes === String) + if (options.bytes === $String) object.price_sheet = ""; else { object.price_sheet = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.price_sheet = $util.newBuffer(object.price_sheet); } object.default_item_sort = 0; } - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; - if (message.currency != null && message.hasOwnProperty("currency")) + if (message.currency != null && $Object.hasOwnProperty.call(message, "currency")) object.currency = message.currency; - if (message.country != null && message.hasOwnProperty("country")) + if (message.country != null && $Object.hasOwnProperty.call(message, "country")) object.country = message.country; - if (message.price_sheet_version != null && message.hasOwnProperty("price_sheet_version")) + if (message.price_sheet_version != null && $Object.hasOwnProperty.call(message, "price_sheet_version")) object.price_sheet_version = message.price_sheet_version; - if (message.experiment_data != null && message.hasOwnProperty("experiment_data")) - if (typeof message.experiment_data === "number") - object.experiment_data = options.longs === String ? String(message.experiment_data) : message.experiment_data; + if (message.experiment_data != null && $Object.hasOwnProperty.call(message, "experiment_data")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.experiment_data = typeof message.experiment_data === "number" ? $BigInt(message.experiment_data) : $util.Long.fromBits(message.experiment_data.low >>> 0, message.experiment_data.high >>> 0, true).toBigInt(); + else if (typeof message.experiment_data === "number") + object.experiment_data = options.longs === $String ? $String(message.experiment_data) : message.experiment_data; else - object.experiment_data = options.longs === String ? $util.Long.prototype.toString.call(message.experiment_data) : options.longs === Number ? new $util.LongBits(message.experiment_data.low >>> 0, message.experiment_data.high >>> 0).toNumber(true) : message.experiment_data; - if (message.featured_item_idx != null && message.hasOwnProperty("featured_item_idx")) + object.experiment_data = options.longs === $String ? $util.Long.prototype.toString.call(message.experiment_data) : options.longs === $Number ? new $util.LongBits(message.experiment_data.low >>> 0, message.experiment_data.high >>> 0).toNumber(true) : message.experiment_data; + if (message.featured_item_idx != null && $Object.hasOwnProperty.call(message, "featured_item_idx")) object.featured_item_idx = message.featured_item_idx; - if (message.show_hat_descriptions != null && message.hasOwnProperty("show_hat_descriptions")) + if (message.show_hat_descriptions != null && $Object.hasOwnProperty.call(message, "show_hat_descriptions")) object.show_hat_descriptions = message.show_hat_descriptions; - if (message.price_sheet != null && message.hasOwnProperty("price_sheet")) - object.price_sheet = options.bytes === String ? $util.base64.encode(message.price_sheet, 0, message.price_sheet.length) : options.bytes === Array ? Array.prototype.slice.call(message.price_sheet) : message.price_sheet; - if (message.default_item_sort != null && message.hasOwnProperty("default_item_sort")) + if (message.price_sheet != null && $Object.hasOwnProperty.call(message, "price_sheet")) + object.price_sheet = options.bytes === $String ? $util.base64.encode(message.price_sheet, 0, message.price_sheet.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.price_sheet) : message.price_sheet; + if (message.default_item_sort != null && $Object.hasOwnProperty.call(message, "default_item_sort")) object.default_item_sort = message.default_item_sort; if (message.popular_items && message.popular_items.length) { - object.popular_items = []; + object.popular_items = $Array(message.popular_items.length); for (var j = 0; j < message.popular_items.length; ++j) object.popular_items[j] = message.popular_items[j]; } @@ -87524,8 +113070,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgStoreGetUserDataResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgStoreGetUserDataResponse.prototype.toJSON = function() { + return CMsgStoreGetUserDataResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgStoreGetUserDataResponse + * @function getTypeUrl + * @memberof CMsgStoreGetUserDataResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgStoreGetUserDataResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgStoreGetUserDataResponse"; }; return CMsgStoreGetUserDataResponse; @@ -87535,28 +113095,41 @@ /** * Properties of a CMsgUpdateItemSchema. - * @exports ICMsgUpdateItemSchema - * @interface ICMsgUpdateItemSchema + * @typedef {Object} CMsgUpdateItemSchema.$Properties * @property {Uint8Array|null} [items_game] CMsgUpdateItemSchema items_game * @property {number|null} [item_schema_version] CMsgUpdateItemSchema item_schema_version * @property {string|null} [items_game_url] CMsgUpdateItemSchema items_game_url * @property {Uint8Array|null} [signature] CMsgUpdateItemSchema signature + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgUpdateItemSchema. + * @exports ICMsgUpdateItemSchema + * @interface ICMsgUpdateItemSchema + * @augments CMsgUpdateItemSchema.$Properties + * @deprecated Use CMsgUpdateItemSchema.$Properties instead. + */ + + /** + * Shape of a CMsgUpdateItemSchema. + * @typedef {CMsgUpdateItemSchema.$Properties} CMsgUpdateItemSchema.$Shape */ /** * Constructs a new CMsgUpdateItemSchema. * @exports CMsgUpdateItemSchema * @classdesc Represents a CMsgUpdateItemSchema. - * @implements ICMsgUpdateItemSchema * @constructor - * @param {ICMsgUpdateItemSchema=} [properties] Properties to set + * @param {CMsgUpdateItemSchema.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgUpdateItemSchema(properties) { + var CMsgUpdateItemSchema = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgUpdateItemSchema items_game. @@ -87595,10 +113168,14 @@ * @function create * @memberof CMsgUpdateItemSchema * @static - * @param {ICMsgUpdateItemSchema=} [properties] Properties to set + * @param {CMsgUpdateItemSchema.$Properties=} [properties] Properties to set * @returns {CMsgUpdateItemSchema} CMsgUpdateItemSchema instance + * @type {{ + * (properties: CMsgUpdateItemSchema.$Shape): CMsgUpdateItemSchema & CMsgUpdateItemSchema.$Shape; + * (properties?: CMsgUpdateItemSchema.$Properties): CMsgUpdateItemSchema; + * }} */ - CMsgUpdateItemSchema.create = function create(properties) { + CMsgUpdateItemSchema.create = function(properties) { return new CMsgUpdateItemSchema(properties); }; @@ -87607,21 +113184,28 @@ * @function encode * @memberof CMsgUpdateItemSchema * @static - * @param {ICMsgUpdateItemSchema} message CMsgUpdateItemSchema message or plain object to encode + * @param {CMsgUpdateItemSchema.$Properties} message CMsgUpdateItemSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdateItemSchema.encode = function encode(message, writer) { + CMsgUpdateItemSchema.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.items_game != null && Object.hasOwnProperty.call(message, "items_game")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.items_game != null && $Object.hasOwnProperty.call(message, "items_game")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.items_game); - if (message.item_schema_version != null && Object.hasOwnProperty.call(message, "item_schema_version")) + if (message.item_schema_version != null && $Object.hasOwnProperty.call(message, "item_schema_version")) writer.uint32(/* id 2, wireType 5 =*/21).fixed32(message.item_schema_version); - if (message.items_game_url != null && Object.hasOwnProperty.call(message, "items_game_url")) + if (message.items_game_url != null && $Object.hasOwnProperty.call(message, "items_game_url")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.items_game_url); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signature); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -87630,12 +113214,12 @@ * @function encodeDelimited * @memberof CMsgUpdateItemSchema * @static - * @param {ICMsgUpdateItemSchema} message CMsgUpdateItemSchema message or plain object to encode + * @param {CMsgUpdateItemSchema.$Properties} message CMsgUpdateItemSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdateItemSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgUpdateItemSchema.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -87645,34 +113229,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgUpdateItemSchema} CMsgUpdateItemSchema + * @returns {CMsgUpdateItemSchema & CMsgUpdateItemSchema.$Shape} CMsgUpdateItemSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdateItemSchema.decode = function decode(reader, length) { + CMsgUpdateItemSchema.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgUpdateItemSchema(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgUpdateItemSchema(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.items_game = reader.bytes(); - break; - case 2: - message.item_schema_version = reader.fixed32(); - break; - case 3: - message.items_game_url = reader.string(); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.items_game = reader.bytes(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.item_schema_version = reader.fixed32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.items_game_url = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.signature = reader.bytes(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -87682,11 +113292,11 @@ * @memberof CMsgUpdateItemSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgUpdateItemSchema} CMsgUpdateItemSchema + * @returns {CMsgUpdateItemSchema & CMsgUpdateItemSchema.$Shape} CMsgUpdateItemSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdateItemSchema.decodeDelimited = function decodeDelimited(reader) { + CMsgUpdateItemSchema.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -87700,19 +113310,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgUpdateItemSchema.verify = function verify(message) { + CMsgUpdateItemSchema.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.items_game != null && message.hasOwnProperty("items_game")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.items_game != null && $Object.hasOwnProperty.call(message, "items_game")) if (!(message.items_game && typeof message.items_game.length === "number" || $util.isString(message.items_game))) return "items_game: buffer expected"; - if (message.item_schema_version != null && message.hasOwnProperty("item_schema_version")) + if (message.item_schema_version != null && $Object.hasOwnProperty.call(message, "item_schema_version")) if (!$util.isInteger(message.item_schema_version)) return "item_schema_version: integer expected"; - if (message.items_game_url != null && message.hasOwnProperty("items_game_url")) + if (message.items_game_url != null && $Object.hasOwnProperty.call(message, "items_game_url")) if (!$util.isString(message.items_game_url)) return "items_game_url: string expected"; - if (message.signature != null && message.hasOwnProperty("signature")) + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; return null; @@ -87726,23 +113340,29 @@ * @param {Object.} object Plain object * @returns {CMsgUpdateItemSchema} CMsgUpdateItemSchema */ - CMsgUpdateItemSchema.fromObject = function fromObject(object) { + CMsgUpdateItemSchema.fromObject = function (object, _depth) { if (object instanceof $root.CMsgUpdateItemSchema) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgUpdateItemSchema: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgUpdateItemSchema(); if (object.items_game != null) if (typeof object.items_game === "string") $util.base64.decode(object.items_game, message.items_game = $util.newBuffer($util.base64.length(object.items_game)), 0); - else if (object.items_game.length) + else if (object.items_game.length >= 0) message.items_game = object.items_game; if (object.item_schema_version != null) message.item_schema_version = object.item_schema_version >>> 0; if (object.items_game_url != null) - message.items_game_url = String(object.items_game_url); + message.items_game_url = $String(object.items_game_url); if (object.signature != null) if (typeof object.signature === "string") $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) + else if (object.signature.length >= 0) message.signature = object.signature; return message; }; @@ -87756,36 +113376,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgUpdateItemSchema.toObject = function toObject(message, options) { + CMsgUpdateItemSchema.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - if (options.bytes === String) + if (options.bytes === $String) object.items_game = ""; else { object.items_game = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.items_game = $util.newBuffer(object.items_game); } object.item_schema_version = 0; object.items_game_url = ""; - if (options.bytes === String) + if (options.bytes === $String) object.signature = ""; else { object.signature = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.signature = $util.newBuffer(object.signature); } } - if (message.items_game != null && message.hasOwnProperty("items_game")) - object.items_game = options.bytes === String ? $util.base64.encode(message.items_game, 0, message.items_game.length) : options.bytes === Array ? Array.prototype.slice.call(message.items_game) : message.items_game; - if (message.item_schema_version != null && message.hasOwnProperty("item_schema_version")) + if (message.items_game != null && $Object.hasOwnProperty.call(message, "items_game")) + object.items_game = options.bytes === $String ? $util.base64.encode(message.items_game, 0, message.items_game.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.items_game) : message.items_game; + if (message.item_schema_version != null && $Object.hasOwnProperty.call(message, "item_schema_version")) object.item_schema_version = message.item_schema_version; - if (message.items_game_url != null && message.hasOwnProperty("items_game_url")) + if (message.items_game_url != null && $Object.hasOwnProperty.call(message, "items_game_url")) object.items_game_url = message.items_game_url; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) + object.signature = options.bytes === $String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.signature) : message.signature; return object; }; @@ -87796,8 +113420,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgUpdateItemSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgUpdateItemSchema.prototype.toJSON = function() { + return CMsgUpdateItemSchema.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgUpdateItemSchema + * @function getTypeUrl + * @memberof CMsgUpdateItemSchema + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgUpdateItemSchema.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgUpdateItemSchema"; }; return CMsgUpdateItemSchema; @@ -87805,27 +113443,40 @@ $root.CMsgGCError = (function() { + /** + * Properties of a CMsgGCError. + * @typedef {Object} CMsgGCError.$Properties + * @property {string|null} [error_text] CMsgGCError error_text + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCError. * @exports ICMsgGCError * @interface ICMsgGCError - * @property {string|null} [error_text] CMsgGCError error_text + * @augments CMsgGCError.$Properties + * @deprecated Use CMsgGCError.$Properties instead. + */ + + /** + * Shape of a CMsgGCError. + * @typedef {CMsgGCError.$Properties} CMsgGCError.$Shape */ /** * Constructs a new CMsgGCError. * @exports CMsgGCError * @classdesc Represents a CMsgGCError. - * @implements ICMsgGCError * @constructor - * @param {ICMsgGCError=} [properties] Properties to set + * @param {CMsgGCError.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCError(properties) { + var CMsgGCError = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCError error_text. @@ -87840,10 +113491,14 @@ * @function create * @memberof CMsgGCError * @static - * @param {ICMsgGCError=} [properties] Properties to set + * @param {CMsgGCError.$Properties=} [properties] Properties to set * @returns {CMsgGCError} CMsgGCError instance + * @type {{ + * (properties: CMsgGCError.$Shape): CMsgGCError & CMsgGCError.$Shape; + * (properties?: CMsgGCError.$Properties): CMsgGCError; + * }} */ - CMsgGCError.create = function create(properties) { + CMsgGCError.create = function(properties) { return new CMsgGCError(properties); }; @@ -87852,15 +113507,22 @@ * @function encode * @memberof CMsgGCError * @static - * @param {ICMsgGCError} message CMsgGCError message or plain object to encode + * @param {CMsgGCError.$Properties} message CMsgGCError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCError.encode = function encode(message, writer) { + CMsgGCError.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.error_text != null && Object.hasOwnProperty.call(message, "error_text")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.error_text != null && $Object.hasOwnProperty.call(message, "error_text")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.error_text); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -87869,12 +113531,12 @@ * @function encodeDelimited * @memberof CMsgGCError * @static - * @param {ICMsgGCError} message CMsgGCError message or plain object to encode + * @param {CMsgGCError.$Properties} message CMsgGCError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCError.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -87884,25 +113546,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCError} CMsgGCError + * @returns {CMsgGCError & CMsgGCError.$Shape} CMsgGCError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCError.decode = function decode(reader, length) { + CMsgGCError.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCError(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCError(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error_text = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.error_text = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -87912,11 +113591,11 @@ * @memberof CMsgGCError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCError} CMsgGCError + * @returns {CMsgGCError & CMsgGCError.$Shape} CMsgGCError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCError.decodeDelimited = function decodeDelimited(reader) { + CMsgGCError.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -87930,10 +113609,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCError.verify = function verify(message) { + CMsgGCError.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.error_text != null && message.hasOwnProperty("error_text")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.error_text != null && $Object.hasOwnProperty.call(message, "error_text")) if (!$util.isString(message.error_text)) return "error_text: string expected"; return null; @@ -87947,12 +113630,18 @@ * @param {Object.} object Plain object * @returns {CMsgGCError} CMsgGCError */ - CMsgGCError.fromObject = function fromObject(object) { + CMsgGCError.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCError) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCError: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCError(); if (object.error_text != null) - message.error_text = String(object.error_text); + message.error_text = $String(object.error_text); return message; }; @@ -87965,13 +113654,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCError.toObject = function toObject(message, options) { + CMsgGCError.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.error_text = ""; - if (message.error_text != null && message.hasOwnProperty("error_text")) + if (message.error_text != null && $Object.hasOwnProperty.call(message, "error_text")) object.error_text = message.error_text; return object; }; @@ -87983,8 +113676,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCError.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCError.prototype.toJSON = function() { + return CMsgGCError.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCError + * @function getTypeUrl + * @memberof CMsgGCError + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCError.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCError"; }; return CMsgGCError; @@ -87992,36 +113699,53 @@ $root.CMsgRequestInventoryRefresh = (function() { + /** + * Properties of a CMsgRequestInventoryRefresh. + * @typedef {Object} CMsgRequestInventoryRefresh.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgRequestInventoryRefresh. * @exports ICMsgRequestInventoryRefresh * @interface ICMsgRequestInventoryRefresh + * @augments CMsgRequestInventoryRefresh.$Properties + * @deprecated Use CMsgRequestInventoryRefresh.$Properties instead. + */ + + /** + * Shape of a CMsgRequestInventoryRefresh. + * @typedef {CMsgRequestInventoryRefresh.$Properties} CMsgRequestInventoryRefresh.$Shape */ /** * Constructs a new CMsgRequestInventoryRefresh. * @exports CMsgRequestInventoryRefresh * @classdesc Represents a CMsgRequestInventoryRefresh. - * @implements ICMsgRequestInventoryRefresh * @constructor - * @param {ICMsgRequestInventoryRefresh=} [properties] Properties to set + * @param {CMsgRequestInventoryRefresh.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgRequestInventoryRefresh(properties) { + var CMsgRequestInventoryRefresh = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CMsgRequestInventoryRefresh instance using the specified properties. * @function create * @memberof CMsgRequestInventoryRefresh * @static - * @param {ICMsgRequestInventoryRefresh=} [properties] Properties to set + * @param {CMsgRequestInventoryRefresh.$Properties=} [properties] Properties to set * @returns {CMsgRequestInventoryRefresh} CMsgRequestInventoryRefresh instance + * @type {{ + * (properties: CMsgRequestInventoryRefresh.$Shape): CMsgRequestInventoryRefresh & CMsgRequestInventoryRefresh.$Shape; + * (properties?: CMsgRequestInventoryRefresh.$Properties): CMsgRequestInventoryRefresh; + * }} */ - CMsgRequestInventoryRefresh.create = function create(properties) { + CMsgRequestInventoryRefresh.create = function(properties) { return new CMsgRequestInventoryRefresh(properties); }; @@ -88030,13 +113754,20 @@ * @function encode * @memberof CMsgRequestInventoryRefresh * @static - * @param {ICMsgRequestInventoryRefresh} message CMsgRequestInventoryRefresh message or plain object to encode + * @param {CMsgRequestInventoryRefresh.$Properties} message CMsgRequestInventoryRefresh message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestInventoryRefresh.encode = function encode(message, writer) { + CMsgRequestInventoryRefresh.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -88045,12 +113776,12 @@ * @function encodeDelimited * @memberof CMsgRequestInventoryRefresh * @static - * @param {ICMsgRequestInventoryRefresh} message CMsgRequestInventoryRefresh message or plain object to encode + * @param {CMsgRequestInventoryRefresh.$Properties} message CMsgRequestInventoryRefresh message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRequestInventoryRefresh.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgRequestInventoryRefresh.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -88060,22 +113791,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgRequestInventoryRefresh} CMsgRequestInventoryRefresh + * @returns {CMsgRequestInventoryRefresh & CMsgRequestInventoryRefresh.$Shape} CMsgRequestInventoryRefresh * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestInventoryRefresh.decode = function decode(reader, length) { + CMsgRequestInventoryRefresh.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgRequestInventoryRefresh(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgRequestInventoryRefresh(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -88085,11 +113827,11 @@ * @memberof CMsgRequestInventoryRefresh * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgRequestInventoryRefresh} CMsgRequestInventoryRefresh + * @returns {CMsgRequestInventoryRefresh & CMsgRequestInventoryRefresh.$Shape} CMsgRequestInventoryRefresh * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRequestInventoryRefresh.decodeDelimited = function decodeDelimited(reader) { + CMsgRequestInventoryRefresh.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -88103,9 +113845,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgRequestInventoryRefresh.verify = function verify(message) { + CMsgRequestInventoryRefresh.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -88117,9 +113863,15 @@ * @param {Object.} object Plain object * @returns {CMsgRequestInventoryRefresh} CMsgRequestInventoryRefresh */ - CMsgRequestInventoryRefresh.fromObject = function fromObject(object) { + CMsgRequestInventoryRefresh.fromObject = function (object, _depth) { if (object instanceof $root.CMsgRequestInventoryRefresh) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgRequestInventoryRefresh: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CMsgRequestInventoryRefresh(); }; @@ -88132,7 +113884,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgRequestInventoryRefresh.toObject = function toObject() { + CMsgRequestInventoryRefresh.toObject = function () { return {}; }; @@ -88143,8 +113895,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgRequestInventoryRefresh.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgRequestInventoryRefresh.prototype.toJSON = function() { + return CMsgRequestInventoryRefresh.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgRequestInventoryRefresh + * @function getTypeUrl + * @memberof CMsgRequestInventoryRefresh + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgRequestInventoryRefresh.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgRequestInventoryRefresh"; }; return CMsgRequestInventoryRefresh; @@ -88154,26 +113920,39 @@ /** * Properties of a CMsgConVarValue. - * @exports ICMsgConVarValue - * @interface ICMsgConVarValue + * @typedef {Object} CMsgConVarValue.$Properties * @property {string|null} [name] CMsgConVarValue name * @property {string|null} [value] CMsgConVarValue value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgConVarValue. + * @exports ICMsgConVarValue + * @interface ICMsgConVarValue + * @augments CMsgConVarValue.$Properties + * @deprecated Use CMsgConVarValue.$Properties instead. + */ + + /** + * Shape of a CMsgConVarValue. + * @typedef {CMsgConVarValue.$Properties} CMsgConVarValue.$Shape */ /** * Constructs a new CMsgConVarValue. * @exports CMsgConVarValue * @classdesc Represents a CMsgConVarValue. - * @implements ICMsgConVarValue * @constructor - * @param {ICMsgConVarValue=} [properties] Properties to set + * @param {CMsgConVarValue.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgConVarValue(properties) { + var CMsgConVarValue = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgConVarValue name. @@ -88196,10 +113975,14 @@ * @function create * @memberof CMsgConVarValue * @static - * @param {ICMsgConVarValue=} [properties] Properties to set + * @param {CMsgConVarValue.$Properties=} [properties] Properties to set * @returns {CMsgConVarValue} CMsgConVarValue instance + * @type {{ + * (properties: CMsgConVarValue.$Shape): CMsgConVarValue & CMsgConVarValue.$Shape; + * (properties?: CMsgConVarValue.$Properties): CMsgConVarValue; + * }} */ - CMsgConVarValue.create = function create(properties) { + CMsgConVarValue.create = function(properties) { return new CMsgConVarValue(properties); }; @@ -88208,17 +113991,24 @@ * @function encode * @memberof CMsgConVarValue * @static - * @param {ICMsgConVarValue} message CMsgConVarValue message or plain object to encode + * @param {CMsgConVarValue.$Properties} message CMsgConVarValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConVarValue.encode = function encode(message, writer) { + CMsgConVarValue.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -88227,12 +114017,12 @@ * @function encodeDelimited * @memberof CMsgConVarValue * @static - * @param {ICMsgConVarValue} message CMsgConVarValue message or plain object to encode + * @param {CMsgConVarValue.$Properties} message CMsgConVarValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConVarValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgConVarValue.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -88242,28 +114032,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgConVarValue} CMsgConVarValue + * @returns {CMsgConVarValue & CMsgConVarValue.$Shape} CMsgConVarValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConVarValue.decode = function decode(reader, length) { + CMsgConVarValue.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgConVarValue(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgConVarValue(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -88273,11 +114083,11 @@ * @memberof CMsgConVarValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgConVarValue} CMsgConVarValue + * @returns {CMsgConVarValue & CMsgConVarValue.$Shape} CMsgConVarValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConVarValue.decodeDelimited = function decodeDelimited(reader) { + CMsgConVarValue.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -88291,13 +114101,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgConVarValue.verify = function verify(message) { + CMsgConVarValue.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -88311,14 +114125,20 @@ * @param {Object.} object Plain object * @returns {CMsgConVarValue} CMsgConVarValue */ - CMsgConVarValue.fromObject = function fromObject(object) { + CMsgConVarValue.fromObject = function (object, _depth) { if (object instanceof $root.CMsgConVarValue) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgConVarValue: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgConVarValue(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -88331,17 +114151,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgConVarValue.toObject = function toObject(message, options) { + CMsgConVarValue.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -88353,8 +114177,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgConVarValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgConVarValue.prototype.toJSON = function() { + return CMsgConVarValue.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgConVarValue + * @function getTypeUrl + * @memberof CMsgConVarValue + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgConVarValue.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgConVarValue"; }; return CMsgConVarValue; @@ -88362,32 +114200,45 @@ $root.CMsgReplicateConVars = (function() { + /** + * Properties of a CMsgReplicateConVars. + * @typedef {Object} CMsgReplicateConVars.$Properties + * @property {Array.|null} [convars] CMsgReplicateConVars convars + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgReplicateConVars. * @exports ICMsgReplicateConVars * @interface ICMsgReplicateConVars - * @property {Array.|null} [convars] CMsgReplicateConVars convars + * @augments CMsgReplicateConVars.$Properties + * @deprecated Use CMsgReplicateConVars.$Properties instead. + */ + + /** + * Shape of a CMsgReplicateConVars. + * @typedef {CMsgReplicateConVars.$Properties} CMsgReplicateConVars.$Shape */ /** * Constructs a new CMsgReplicateConVars. * @exports CMsgReplicateConVars * @classdesc Represents a CMsgReplicateConVars. - * @implements ICMsgReplicateConVars * @constructor - * @param {ICMsgReplicateConVars=} [properties] Properties to set + * @param {CMsgReplicateConVars.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgReplicateConVars(properties) { + var CMsgReplicateConVars = function (properties) { this.convars = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgReplicateConVars convars. - * @member {Array.} convars + * @member {Array.} convars * @memberof CMsgReplicateConVars * @instance */ @@ -88398,10 +114249,14 @@ * @function create * @memberof CMsgReplicateConVars * @static - * @param {ICMsgReplicateConVars=} [properties] Properties to set + * @param {CMsgReplicateConVars.$Properties=} [properties] Properties to set * @returns {CMsgReplicateConVars} CMsgReplicateConVars instance + * @type {{ + * (properties: CMsgReplicateConVars.$Shape): CMsgReplicateConVars & CMsgReplicateConVars.$Shape; + * (properties?: CMsgReplicateConVars.$Properties): CMsgReplicateConVars; + * }} */ - CMsgReplicateConVars.create = function create(properties) { + CMsgReplicateConVars.create = function(properties) { return new CMsgReplicateConVars(properties); }; @@ -88410,16 +114265,23 @@ * @function encode * @memberof CMsgReplicateConVars * @static - * @param {ICMsgReplicateConVars} message CMsgReplicateConVars message or plain object to encode + * @param {CMsgReplicateConVars.$Properties} message CMsgReplicateConVars message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplicateConVars.encode = function encode(message, writer) { + CMsgReplicateConVars.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.convars != null && message.convars.length) for (var i = 0; i < message.convars.length; ++i) - $root.CMsgConVarValue.encode(message.convars[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgConVarValue.encode(message.convars[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -88428,12 +114290,12 @@ * @function encodeDelimited * @memberof CMsgReplicateConVars * @static - * @param {ICMsgReplicateConVars} message CMsgReplicateConVars message or plain object to encode + * @param {CMsgReplicateConVars.$Properties} message CMsgReplicateConVars message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplicateConVars.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgReplicateConVars.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -88443,27 +114305,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgReplicateConVars} CMsgReplicateConVars + * @returns {CMsgReplicateConVars & CMsgReplicateConVars.$Shape} CMsgReplicateConVars * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplicateConVars.decode = function decode(reader, length) { + CMsgReplicateConVars.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgReplicateConVars(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgReplicateConVars(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.convars && message.convars.length)) - message.convars = []; - message.convars.push($root.CMsgConVarValue.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.convars && message.convars.length)) + message.convars = []; + message.convars.push($root.CMsgConVarValue.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -88473,11 +114352,11 @@ * @memberof CMsgReplicateConVars * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgReplicateConVars} CMsgReplicateConVars + * @returns {CMsgReplicateConVars & CMsgReplicateConVars.$Shape} CMsgReplicateConVars * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplicateConVars.decodeDelimited = function decodeDelimited(reader) { + CMsgReplicateConVars.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -88491,14 +114370,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgReplicateConVars.verify = function verify(message) { + CMsgReplicateConVars.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.convars != null && message.hasOwnProperty("convars")) { - if (!Array.isArray(message.convars)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.convars != null && $Object.hasOwnProperty.call(message, "convars")) { + if (!$Array.isArray(message.convars)) return "convars: array expected"; for (var i = 0; i < message.convars.length; ++i) { - var error = $root.CMsgConVarValue.verify(message.convars[i]); + var error = $root.CMsgConVarValue.verify(message.convars[i], _depth + 1); if (error) return "convars." + error; } @@ -88514,18 +114397,24 @@ * @param {Object.} object Plain object * @returns {CMsgReplicateConVars} CMsgReplicateConVars */ - CMsgReplicateConVars.fromObject = function fromObject(object) { + CMsgReplicateConVars.fromObject = function (object, _depth) { if (object instanceof $root.CMsgReplicateConVars) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgReplicateConVars: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgReplicateConVars(); if (object.convars) { - if (!Array.isArray(object.convars)) - throw TypeError(".CMsgReplicateConVars.convars: array expected"); - message.convars = []; + if (!$Array.isArray(object.convars)) + throw $TypeError(".CMsgReplicateConVars.convars: array expected"); + message.convars = $Array(object.convars.length); for (var i = 0; i < object.convars.length; ++i) { - if (typeof object.convars[i] !== "object") - throw TypeError(".CMsgReplicateConVars.convars: object expected"); - message.convars[i] = $root.CMsgConVarValue.fromObject(object.convars[i]); + if (!$util.isObject(object.convars[i])) + throw $TypeError(".CMsgReplicateConVars.convars: object expected"); + message.convars[i] = $root.CMsgConVarValue.fromObject(object.convars[i], _depth + 1); } } return message; @@ -88540,16 +114429,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgReplicateConVars.toObject = function toObject(message, options) { + CMsgReplicateConVars.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.convars = []; if (message.convars && message.convars.length) { - object.convars = []; + object.convars = $Array(message.convars.length); for (var j = 0; j < message.convars.length; ++j) - object.convars[j] = $root.CMsgConVarValue.toObject(message.convars[j], options); + object.convars[j] = $root.CMsgConVarValue.toObject(message.convars[j], options, _depth + 1); } return object; }; @@ -88561,8 +114454,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgReplicateConVars.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgReplicateConVars.prototype.toJSON = function() { + return CMsgReplicateConVars.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgReplicateConVars + * @function getTypeUrl + * @memberof CMsgReplicateConVars + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgReplicateConVars.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgReplicateConVars"; }; return CMsgReplicateConVars; @@ -88572,31 +114479,44 @@ /** * Properties of a CMsgUseItem. - * @exports ICMsgUseItem - * @interface ICMsgUseItem + * @typedef {Object} CMsgUseItem.$Properties * @property {number|Long|null} [item_id] CMsgUseItem item_id * @property {number|Long|null} [target_steam_id] CMsgUseItem target_steam_id * @property {Array.|null} [gift__potential_targets] CMsgUseItem gift__potential_targets * @property {number|null} [duel__class_lock] CMsgUseItem duel__class_lock * @property {number|Long|null} [initiator_steam_id] CMsgUseItem initiator_steam_id * @property {boolean|null} [itempack__ack_immediately] CMsgUseItem itempack__ack_immediately + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgUseItem. + * @exports ICMsgUseItem + * @interface ICMsgUseItem + * @augments CMsgUseItem.$Properties + * @deprecated Use CMsgUseItem.$Properties instead. + */ + + /** + * Shape of a CMsgUseItem. + * @typedef {CMsgUseItem.$Properties} CMsgUseItem.$Shape */ /** * Constructs a new CMsgUseItem. * @exports CMsgUseItem * @classdesc Represents a CMsgUseItem. - * @implements ICMsgUseItem * @constructor - * @param {ICMsgUseItem=} [properties] Properties to set + * @param {CMsgUseItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgUseItem(properties) { + var CMsgUseItem = function (properties) { this.gift__potential_targets = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgUseItem item_id. @@ -88612,7 +114532,7 @@ * @memberof CMsgUseItem * @instance */ - CMsgUseItem.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgUseItem.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgUseItem gift__potential_targets. @@ -88636,7 +114556,7 @@ * @memberof CMsgUseItem * @instance */ - CMsgUseItem.prototype.initiator_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgUseItem.prototype.initiator_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgUseItem itempack__ack_immediately. @@ -88651,10 +114571,14 @@ * @function create * @memberof CMsgUseItem * @static - * @param {ICMsgUseItem=} [properties] Properties to set + * @param {CMsgUseItem.$Properties=} [properties] Properties to set * @returns {CMsgUseItem} CMsgUseItem instance + * @type {{ + * (properties: CMsgUseItem.$Shape): CMsgUseItem & CMsgUseItem.$Shape; + * (properties?: CMsgUseItem.$Properties): CMsgUseItem; + * }} */ - CMsgUseItem.create = function create(properties) { + CMsgUseItem.create = function(properties) { return new CMsgUseItem(properties); }; @@ -88663,26 +114587,33 @@ * @function encode * @memberof CMsgUseItem * @static - * @param {ICMsgUseItem} message CMsgUseItem message or plain object to encode + * @param {CMsgUseItem.$Properties} message CMsgUseItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUseItem.encode = function encode(message, writer) { + CMsgUseItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.target_steam_id != null && Object.hasOwnProperty.call(message, "target_steam_id")) + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.target_steam_id); if (message.gift__potential_targets != null && message.gift__potential_targets.length) for (var i = 0; i < message.gift__potential_targets.length; ++i) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.gift__potential_targets[i]); - if (message.duel__class_lock != null && Object.hasOwnProperty.call(message, "duel__class_lock")) + if (message.duel__class_lock != null && $Object.hasOwnProperty.call(message, "duel__class_lock")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.duel__class_lock); - if (message.initiator_steam_id != null && Object.hasOwnProperty.call(message, "initiator_steam_id")) + if (message.initiator_steam_id != null && $Object.hasOwnProperty.call(message, "initiator_steam_id")) writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.initiator_steam_id); - if (message.itempack__ack_immediately != null && Object.hasOwnProperty.call(message, "itempack__ack_immediately")) + if (message.itempack__ack_immediately != null && $Object.hasOwnProperty.call(message, "itempack__ack_immediately")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.itempack__ack_immediately); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -88691,12 +114622,12 @@ * @function encodeDelimited * @memberof CMsgUseItem * @static - * @param {ICMsgUseItem} message CMsgUseItem message or plain object to encode + * @param {CMsgUseItem.$Properties} message CMsgUseItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUseItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgUseItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -88706,47 +114637,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgUseItem} CMsgUseItem + * @returns {CMsgUseItem & CMsgUseItem.$Shape} CMsgUseItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUseItem.decode = function decode(reader, length) { + CMsgUseItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgUseItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgUseItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - message.target_steam_id = reader.fixed64(); - break; - case 3: - if (!(message.gift__potential_targets && message.gift__potential_targets.length)) - message.gift__potential_targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.gift__potential_targets.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 1) + break; + message.target_steam_id = reader.fixed64(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.gift__potential_targets && message.gift__potential_targets.length)) + message.gift__potential_targets = []; + reader.uint32s(message.gift__potential_targets); + continue; + } + if (wireType !== 0) + break; + if (!(message.gift__potential_targets && message.gift__potential_targets.length)) + message.gift__potential_targets = []; message.gift__potential_targets.push(reader.uint32()); - break; - case 4: - message.duel__class_lock = reader.uint32(); - break; - case 5: - message.initiator_steam_id = reader.fixed64(); - break; - case 6: - message.itempack__ack_immediately = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + case 4: { + if (wireType !== 0) + break; + message.duel__class_lock = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 1) + break; + message.initiator_steam_id = reader.fixed64(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.itempack__ack_immediately = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -88756,11 +114720,11 @@ * @memberof CMsgUseItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgUseItem} CMsgUseItem + * @returns {CMsgUseItem & CMsgUseItem.$Shape} CMsgUseItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUseItem.decodeDelimited = function decodeDelimited(reader) { + CMsgUseItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -88774,29 +114738,33 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgUseItem.verify = function verify(message) { + CMsgUseItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) if (!$util.isInteger(message.target_steam_id) && !(message.target_steam_id && $util.isInteger(message.target_steam_id.low) && $util.isInteger(message.target_steam_id.high))) return "target_steam_id: integer|Long expected"; - if (message.gift__potential_targets != null && message.hasOwnProperty("gift__potential_targets")) { - if (!Array.isArray(message.gift__potential_targets)) + if (message.gift__potential_targets != null && $Object.hasOwnProperty.call(message, "gift__potential_targets")) { + if (!$Array.isArray(message.gift__potential_targets)) return "gift__potential_targets: array expected"; for (var i = 0; i < message.gift__potential_targets.length; ++i) if (!$util.isInteger(message.gift__potential_targets[i])) return "gift__potential_targets: integer[] expected"; } - if (message.duel__class_lock != null && message.hasOwnProperty("duel__class_lock")) + if (message.duel__class_lock != null && $Object.hasOwnProperty.call(message, "duel__class_lock")) if (!$util.isInteger(message.duel__class_lock)) return "duel__class_lock: integer expected"; - if (message.initiator_steam_id != null && message.hasOwnProperty("initiator_steam_id")) + if (message.initiator_steam_id != null && $Object.hasOwnProperty.call(message, "initiator_steam_id")) if (!$util.isInteger(message.initiator_steam_id) && !(message.initiator_steam_id && $util.isInteger(message.initiator_steam_id.low) && $util.isInteger(message.initiator_steam_id.high))) return "initiator_steam_id: integer|Long expected"; - if (message.itempack__ack_immediately != null && message.hasOwnProperty("itempack__ack_immediately")) + if (message.itempack__ack_immediately != null && $Object.hasOwnProperty.call(message, "itempack__ack_immediately")) if (typeof message.itempack__ack_immediately !== "boolean") return "itempack__ack_immediately: boolean expected"; return null; @@ -88810,32 +114778,38 @@ * @param {Object.} object Plain object * @returns {CMsgUseItem} CMsgUseItem */ - CMsgUseItem.fromObject = function fromObject(object) { + CMsgUseItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgUseItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgUseItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgUseItem(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") message.item_id = new $util.LongBits(object.item_id.low >>> 0, object.item_id.high >>> 0).toNumber(true); if (object.target_steam_id != null) if ($util.Long) - (message.target_steam_id = $util.Long.fromValue(object.target_steam_id)).unsigned = false; + message.target_steam_id = $util.Long.fromValue(object.target_steam_id, true); else if (typeof object.target_steam_id === "string") - message.target_steam_id = parseInt(object.target_steam_id, 10); + message.target_steam_id = $parseInt(object.target_steam_id, 10); else if (typeof object.target_steam_id === "number") message.target_steam_id = object.target_steam_id; else if (typeof object.target_steam_id === "object") - message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(); + message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(true); if (object.gift__potential_targets) { - if (!Array.isArray(object.gift__potential_targets)) - throw TypeError(".CMsgUseItem.gift__potential_targets: array expected"); - message.gift__potential_targets = []; + if (!$Array.isArray(object.gift__potential_targets)) + throw $TypeError(".CMsgUseItem.gift__potential_targets: array expected"); + message.gift__potential_targets = $Array(object.gift__potential_targets.length); for (var i = 0; i < object.gift__potential_targets.length; ++i) message.gift__potential_targets[i] = object.gift__potential_targets[i] >>> 0; } @@ -88843,15 +114817,15 @@ message.duel__class_lock = object.duel__class_lock >>> 0; if (object.initiator_steam_id != null) if ($util.Long) - (message.initiator_steam_id = $util.Long.fromValue(object.initiator_steam_id)).unsigned = false; + message.initiator_steam_id = $util.Long.fromValue(object.initiator_steam_id, true); else if (typeof object.initiator_steam_id === "string") - message.initiator_steam_id = parseInt(object.initiator_steam_id, 10); + message.initiator_steam_id = $parseInt(object.initiator_steam_id, 10); else if (typeof object.initiator_steam_id === "number") message.initiator_steam_id = object.initiator_steam_id; else if (typeof object.initiator_steam_id === "object") - message.initiator_steam_id = new $util.LongBits(object.initiator_steam_id.low >>> 0, object.initiator_steam_id.high >>> 0).toNumber(); + message.initiator_steam_id = new $util.LongBits(object.initiator_steam_id.low >>> 0, object.initiator_steam_id.high >>> 0).toNumber(true); if (object.itempack__ack_immediately != null) - message.itempack__ack_immediately = Boolean(object.itempack__ack_immediately); + message.itempack__ack_immediately = $Boolean(object.itempack__ack_immediately); return message; }; @@ -88864,54 +114838,64 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgUseItem.toObject = function toObject(message, options) { + CMsgUseItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.gift__potential_targets = []; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.target_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.target_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.target_steam_id = options.longs === String ? "0" : 0; + object.target_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.duel__class_lock = 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.initiator_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.initiator_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.initiator_steam_id = options.longs === String ? "0" : 0; + object.initiator_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.itempack__ack_immediately = false; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) - if (typeof message.target_steam_id === "number") - object.target_steam_id = options.longs === String ? String(message.target_steam_id) : message.target_steam_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.target_steam_id = typeof message.target_steam_id === "number" ? $BigInt(message.target_steam_id) : $util.Long.fromBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.target_steam_id === "number") + object.target_steam_id = options.longs === $String ? $String(message.target_steam_id) : message.target_steam_id; else - object.target_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber() : message.target_steam_id; + object.target_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === $Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber(true) : message.target_steam_id; if (message.gift__potential_targets && message.gift__potential_targets.length) { - object.gift__potential_targets = []; + object.gift__potential_targets = $Array(message.gift__potential_targets.length); for (var j = 0; j < message.gift__potential_targets.length; ++j) object.gift__potential_targets[j] = message.gift__potential_targets[j]; } - if (message.duel__class_lock != null && message.hasOwnProperty("duel__class_lock")) + if (message.duel__class_lock != null && $Object.hasOwnProperty.call(message, "duel__class_lock")) object.duel__class_lock = message.duel__class_lock; - if (message.initiator_steam_id != null && message.hasOwnProperty("initiator_steam_id")) - if (typeof message.initiator_steam_id === "number") - object.initiator_steam_id = options.longs === String ? String(message.initiator_steam_id) : message.initiator_steam_id; + if (message.initiator_steam_id != null && $Object.hasOwnProperty.call(message, "initiator_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.initiator_steam_id = typeof message.initiator_steam_id === "number" ? $BigInt(message.initiator_steam_id) : $util.Long.fromBits(message.initiator_steam_id.low >>> 0, message.initiator_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.initiator_steam_id === "number") + object.initiator_steam_id = options.longs === $String ? $String(message.initiator_steam_id) : message.initiator_steam_id; else - object.initiator_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.initiator_steam_id) : options.longs === Number ? new $util.LongBits(message.initiator_steam_id.low >>> 0, message.initiator_steam_id.high >>> 0).toNumber() : message.initiator_steam_id; - if (message.itempack__ack_immediately != null && message.hasOwnProperty("itempack__ack_immediately")) + object.initiator_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.initiator_steam_id) : options.longs === $Number ? new $util.LongBits(message.initiator_steam_id.low >>> 0, message.initiator_steam_id.high >>> 0).toNumber(true) : message.initiator_steam_id; + if (message.itempack__ack_immediately != null && $Object.hasOwnProperty.call(message, "itempack__ack_immediately")) object.itempack__ack_immediately = message.itempack__ack_immediately; return object; }; @@ -88923,8 +114907,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgUseItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgUseItem.prototype.toJSON = function() { + return CMsgUseItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgUseItem + * @function getTypeUrl + * @memberof CMsgUseItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgUseItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgUseItem"; }; return CMsgUseItem; @@ -88934,27 +114932,40 @@ /** * Properties of a CMsgReplayUploadedToYouTube. - * @exports ICMsgReplayUploadedToYouTube - * @interface ICMsgReplayUploadedToYouTube + * @typedef {Object} CMsgReplayUploadedToYouTube.$Properties * @property {string|null} [youtube_url] CMsgReplayUploadedToYouTube youtube_url * @property {string|null} [youtube_account_name] CMsgReplayUploadedToYouTube youtube_account_name * @property {number|Long|null} [session_id] CMsgReplayUploadedToYouTube session_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgReplayUploadedToYouTube. + * @exports ICMsgReplayUploadedToYouTube + * @interface ICMsgReplayUploadedToYouTube + * @augments CMsgReplayUploadedToYouTube.$Properties + * @deprecated Use CMsgReplayUploadedToYouTube.$Properties instead. + */ + + /** + * Shape of a CMsgReplayUploadedToYouTube. + * @typedef {CMsgReplayUploadedToYouTube.$Properties} CMsgReplayUploadedToYouTube.$Shape */ /** * Constructs a new CMsgReplayUploadedToYouTube. * @exports CMsgReplayUploadedToYouTube * @classdesc Represents a CMsgReplayUploadedToYouTube. - * @implements ICMsgReplayUploadedToYouTube * @constructor - * @param {ICMsgReplayUploadedToYouTube=} [properties] Properties to set + * @param {CMsgReplayUploadedToYouTube.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgReplayUploadedToYouTube(properties) { + var CMsgReplayUploadedToYouTube = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgReplayUploadedToYouTube youtube_url. @@ -88985,10 +114996,14 @@ * @function create * @memberof CMsgReplayUploadedToYouTube * @static - * @param {ICMsgReplayUploadedToYouTube=} [properties] Properties to set + * @param {CMsgReplayUploadedToYouTube.$Properties=} [properties] Properties to set * @returns {CMsgReplayUploadedToYouTube} CMsgReplayUploadedToYouTube instance + * @type {{ + * (properties: CMsgReplayUploadedToYouTube.$Shape): CMsgReplayUploadedToYouTube & CMsgReplayUploadedToYouTube.$Shape; + * (properties?: CMsgReplayUploadedToYouTube.$Properties): CMsgReplayUploadedToYouTube; + * }} */ - CMsgReplayUploadedToYouTube.create = function create(properties) { + CMsgReplayUploadedToYouTube.create = function(properties) { return new CMsgReplayUploadedToYouTube(properties); }; @@ -88997,19 +115012,26 @@ * @function encode * @memberof CMsgReplayUploadedToYouTube * @static - * @param {ICMsgReplayUploadedToYouTube} message CMsgReplayUploadedToYouTube message or plain object to encode + * @param {CMsgReplayUploadedToYouTube.$Properties} message CMsgReplayUploadedToYouTube message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplayUploadedToYouTube.encode = function encode(message, writer) { + CMsgReplayUploadedToYouTube.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.youtube_url != null && Object.hasOwnProperty.call(message, "youtube_url")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.youtube_url != null && $Object.hasOwnProperty.call(message, "youtube_url")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.youtube_url); - if (message.youtube_account_name != null && Object.hasOwnProperty.call(message, "youtube_account_name")) + if (message.youtube_account_name != null && $Object.hasOwnProperty.call(message, "youtube_account_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.youtube_account_name); - if (message.session_id != null && Object.hasOwnProperty.call(message, "session_id")) + if (message.session_id != null && $Object.hasOwnProperty.call(message, "session_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.session_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -89018,12 +115040,12 @@ * @function encodeDelimited * @memberof CMsgReplayUploadedToYouTube * @static - * @param {ICMsgReplayUploadedToYouTube} message CMsgReplayUploadedToYouTube message or plain object to encode + * @param {CMsgReplayUploadedToYouTube.$Properties} message CMsgReplayUploadedToYouTube message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgReplayUploadedToYouTube.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgReplayUploadedToYouTube.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -89033,31 +115055,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgReplayUploadedToYouTube} CMsgReplayUploadedToYouTube + * @returns {CMsgReplayUploadedToYouTube & CMsgReplayUploadedToYouTube.$Shape} CMsgReplayUploadedToYouTube * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplayUploadedToYouTube.decode = function decode(reader, length) { + CMsgReplayUploadedToYouTube.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgReplayUploadedToYouTube(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgReplayUploadedToYouTube(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.youtube_url = reader.string(); - break; - case 2: - message.youtube_account_name = reader.string(); - break; - case 3: - message.session_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.youtube_url = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.youtube_account_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.session_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -89067,11 +115112,11 @@ * @memberof CMsgReplayUploadedToYouTube * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgReplayUploadedToYouTube} CMsgReplayUploadedToYouTube + * @returns {CMsgReplayUploadedToYouTube & CMsgReplayUploadedToYouTube.$Shape} CMsgReplayUploadedToYouTube * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgReplayUploadedToYouTube.decodeDelimited = function decodeDelimited(reader) { + CMsgReplayUploadedToYouTube.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -89085,16 +115130,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgReplayUploadedToYouTube.verify = function verify(message) { + CMsgReplayUploadedToYouTube.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.youtube_url != null && message.hasOwnProperty("youtube_url")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.youtube_url != null && $Object.hasOwnProperty.call(message, "youtube_url")) if (!$util.isString(message.youtube_url)) return "youtube_url: string expected"; - if (message.youtube_account_name != null && message.hasOwnProperty("youtube_account_name")) + if (message.youtube_account_name != null && $Object.hasOwnProperty.call(message, "youtube_account_name")) if (!$util.isString(message.youtube_account_name)) return "youtube_account_name: string expected"; - if (message.session_id != null && message.hasOwnProperty("session_id")) + if (message.session_id != null && $Object.hasOwnProperty.call(message, "session_id")) if (!$util.isInteger(message.session_id) && !(message.session_id && $util.isInteger(message.session_id.low) && $util.isInteger(message.session_id.high))) return "session_id: integer|Long expected"; return null; @@ -89108,19 +115157,25 @@ * @param {Object.} object Plain object * @returns {CMsgReplayUploadedToYouTube} CMsgReplayUploadedToYouTube */ - CMsgReplayUploadedToYouTube.fromObject = function fromObject(object) { + CMsgReplayUploadedToYouTube.fromObject = function (object, _depth) { if (object instanceof $root.CMsgReplayUploadedToYouTube) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgReplayUploadedToYouTube: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgReplayUploadedToYouTube(); if (object.youtube_url != null) - message.youtube_url = String(object.youtube_url); + message.youtube_url = $String(object.youtube_url); if (object.youtube_account_name != null) - message.youtube_account_name = String(object.youtube_account_name); + message.youtube_account_name = $String(object.youtube_account_name); if (object.session_id != null) if ($util.Long) - (message.session_id = $util.Long.fromValue(object.session_id)).unsigned = true; + message.session_id = $util.Long.fromValue(object.session_id, true); else if (typeof object.session_id === "string") - message.session_id = parseInt(object.session_id, 10); + message.session_id = $parseInt(object.session_id, 10); else if (typeof object.session_id === "number") message.session_id = object.session_id; else if (typeof object.session_id === "object") @@ -89137,28 +115192,34 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgReplayUploadedToYouTube.toObject = function toObject(message, options) { + CMsgReplayUploadedToYouTube.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.youtube_url = ""; object.youtube_account_name = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.session_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.session_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.session_id = options.longs === String ? "0" : 0; + object.session_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.youtube_url != null && message.hasOwnProperty("youtube_url")) + if (message.youtube_url != null && $Object.hasOwnProperty.call(message, "youtube_url")) object.youtube_url = message.youtube_url; - if (message.youtube_account_name != null && message.hasOwnProperty("youtube_account_name")) + if (message.youtube_account_name != null && $Object.hasOwnProperty.call(message, "youtube_account_name")) object.youtube_account_name = message.youtube_account_name; - if (message.session_id != null && message.hasOwnProperty("session_id")) - if (typeof message.session_id === "number") - object.session_id = options.longs === String ? String(message.session_id) : message.session_id; + if (message.session_id != null && $Object.hasOwnProperty.call(message, "session_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.session_id = typeof message.session_id === "number" ? $BigInt(message.session_id) : $util.Long.fromBits(message.session_id.low >>> 0, message.session_id.high >>> 0, true).toBigInt(); + else if (typeof message.session_id === "number") + object.session_id = options.longs === $String ? $String(message.session_id) : message.session_id; else - object.session_id = options.longs === String ? $util.Long.prototype.toString.call(message.session_id) : options.longs === Number ? new $util.LongBits(message.session_id.low >>> 0, message.session_id.high >>> 0).toNumber(true) : message.session_id; + object.session_id = options.longs === $String ? $util.Long.prototype.toString.call(message.session_id) : options.longs === $Number ? new $util.LongBits(message.session_id.low >>> 0, message.session_id.high >>> 0).toNumber(true) : message.session_id; return object; }; @@ -89169,8 +115230,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgReplayUploadedToYouTube.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgReplayUploadedToYouTube.prototype.toJSON = function() { + return CMsgReplayUploadedToYouTube.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgReplayUploadedToYouTube + * @function getTypeUrl + * @memberof CMsgReplayUploadedToYouTube + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgReplayUploadedToYouTube.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgReplayUploadedToYouTube"; }; return CMsgReplayUploadedToYouTube; @@ -89178,27 +115253,40 @@ $root.CMsgConsumableExhausted = (function() { + /** + * Properties of a CMsgConsumableExhausted. + * @typedef {Object} CMsgConsumableExhausted.$Properties + * @property {number|null} [item_def_id] CMsgConsumableExhausted item_def_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgConsumableExhausted. * @exports ICMsgConsumableExhausted * @interface ICMsgConsumableExhausted - * @property {number|null} [item_def_id] CMsgConsumableExhausted item_def_id + * @augments CMsgConsumableExhausted.$Properties + * @deprecated Use CMsgConsumableExhausted.$Properties instead. + */ + + /** + * Shape of a CMsgConsumableExhausted. + * @typedef {CMsgConsumableExhausted.$Properties} CMsgConsumableExhausted.$Shape */ /** * Constructs a new CMsgConsumableExhausted. * @exports CMsgConsumableExhausted * @classdesc Represents a CMsgConsumableExhausted. - * @implements ICMsgConsumableExhausted * @constructor - * @param {ICMsgConsumableExhausted=} [properties] Properties to set + * @param {CMsgConsumableExhausted.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgConsumableExhausted(properties) { + var CMsgConsumableExhausted = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgConsumableExhausted item_def_id. @@ -89213,10 +115301,14 @@ * @function create * @memberof CMsgConsumableExhausted * @static - * @param {ICMsgConsumableExhausted=} [properties] Properties to set + * @param {CMsgConsumableExhausted.$Properties=} [properties] Properties to set * @returns {CMsgConsumableExhausted} CMsgConsumableExhausted instance + * @type {{ + * (properties: CMsgConsumableExhausted.$Shape): CMsgConsumableExhausted & CMsgConsumableExhausted.$Shape; + * (properties?: CMsgConsumableExhausted.$Properties): CMsgConsumableExhausted; + * }} */ - CMsgConsumableExhausted.create = function create(properties) { + CMsgConsumableExhausted.create = function(properties) { return new CMsgConsumableExhausted(properties); }; @@ -89225,15 +115317,22 @@ * @function encode * @memberof CMsgConsumableExhausted * @static - * @param {ICMsgConsumableExhausted} message CMsgConsumableExhausted message or plain object to encode + * @param {CMsgConsumableExhausted.$Properties} message CMsgConsumableExhausted message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConsumableExhausted.encode = function encode(message, writer) { + CMsgConsumableExhausted.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_def_id != null && Object.hasOwnProperty.call(message, "item_def_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.item_def_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -89242,12 +115341,12 @@ * @function encodeDelimited * @memberof CMsgConsumableExhausted * @static - * @param {ICMsgConsumableExhausted} message CMsgConsumableExhausted message or plain object to encode + * @param {CMsgConsumableExhausted.$Properties} message CMsgConsumableExhausted message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgConsumableExhausted.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgConsumableExhausted.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -89257,25 +115356,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgConsumableExhausted} CMsgConsumableExhausted + * @returns {CMsgConsumableExhausted & CMsgConsumableExhausted.$Shape} CMsgConsumableExhausted * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConsumableExhausted.decode = function decode(reader, length) { + CMsgConsumableExhausted.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgConsumableExhausted(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgConsumableExhausted(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_def_id = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_def_id = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -89285,11 +115401,11 @@ * @memberof CMsgConsumableExhausted * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgConsumableExhausted} CMsgConsumableExhausted + * @returns {CMsgConsumableExhausted & CMsgConsumableExhausted.$Shape} CMsgConsumableExhausted * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgConsumableExhausted.decodeDelimited = function decodeDelimited(reader) { + CMsgConsumableExhausted.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -89303,10 +115419,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgConsumableExhausted.verify = function verify(message) { + CMsgConsumableExhausted.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_def_id != null && message.hasOwnProperty("item_def_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) if (!$util.isInteger(message.item_def_id)) return "item_def_id: integer expected"; return null; @@ -89320,9 +115440,15 @@ * @param {Object.} object Plain object * @returns {CMsgConsumableExhausted} CMsgConsumableExhausted */ - CMsgConsumableExhausted.fromObject = function fromObject(object) { + CMsgConsumableExhausted.fromObject = function (object, _depth) { if (object instanceof $root.CMsgConsumableExhausted) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgConsumableExhausted: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgConsumableExhausted(); if (object.item_def_id != null) message.item_def_id = object.item_def_id | 0; @@ -89338,13 +115464,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgConsumableExhausted.toObject = function toObject(message, options) { + CMsgConsumableExhausted.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.item_def_id = 0; - if (message.item_def_id != null && message.hasOwnProperty("item_def_id")) + if (message.item_def_id != null && $Object.hasOwnProperty.call(message, "item_def_id")) object.item_def_id = message.item_def_id; return object; }; @@ -89356,8 +115486,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgConsumableExhausted.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgConsumableExhausted.prototype.toJSON = function() { + return CMsgConsumableExhausted.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgConsumableExhausted + * @function getTypeUrl + * @memberof CMsgConsumableExhausted + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgConsumableExhausted.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgConsumableExhausted"; }; return CMsgConsumableExhausted; @@ -89367,8 +115511,7 @@ /** * Properties of a CMsgItemAcknowledged. - * @exports ICMsgItemAcknowledged - * @interface ICMsgItemAcknowledged + * @typedef {Object} CMsgItemAcknowledged.$Properties * @property {number|null} [account_id] CMsgItemAcknowledged account_id * @property {number|null} [inventory] CMsgItemAcknowledged inventory * @property {number|null} [def_index] CMsgItemAcknowledged def_index @@ -89378,22 +115521,36 @@ * @property {number|null} [is_strange] CMsgItemAcknowledged is_strange * @property {number|null} [is_unusual] CMsgItemAcknowledged is_unusual * @property {number|null} [wear] CMsgItemAcknowledged wear + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgItemAcknowledged. + * @exports ICMsgItemAcknowledged + * @interface ICMsgItemAcknowledged + * @augments CMsgItemAcknowledged.$Properties + * @deprecated Use CMsgItemAcknowledged.$Properties instead. + */ + + /** + * Shape of a CMsgItemAcknowledged. + * @typedef {CMsgItemAcknowledged.$Properties} CMsgItemAcknowledged.$Shape */ /** * Constructs a new CMsgItemAcknowledged. * @exports CMsgItemAcknowledged * @classdesc Represents a CMsgItemAcknowledged. - * @implements ICMsgItemAcknowledged * @constructor - * @param {ICMsgItemAcknowledged=} [properties] Properties to set + * @param {CMsgItemAcknowledged.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgItemAcknowledged(properties) { + var CMsgItemAcknowledged = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgItemAcknowledged account_id. @@ -89472,10 +115629,14 @@ * @function create * @memberof CMsgItemAcknowledged * @static - * @param {ICMsgItemAcknowledged=} [properties] Properties to set + * @param {CMsgItemAcknowledged.$Properties=} [properties] Properties to set * @returns {CMsgItemAcknowledged} CMsgItemAcknowledged instance + * @type {{ + * (properties: CMsgItemAcknowledged.$Shape): CMsgItemAcknowledged & CMsgItemAcknowledged.$Shape; + * (properties?: CMsgItemAcknowledged.$Properties): CMsgItemAcknowledged; + * }} */ - CMsgItemAcknowledged.create = function create(properties) { + CMsgItemAcknowledged.create = function(properties) { return new CMsgItemAcknowledged(properties); }; @@ -89484,31 +115645,38 @@ * @function encode * @memberof CMsgItemAcknowledged * @static - * @param {ICMsgItemAcknowledged} message CMsgItemAcknowledged message or plain object to encode + * @param {CMsgItemAcknowledged.$Properties} message CMsgItemAcknowledged message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgItemAcknowledged.encode = function encode(message, writer) { + CMsgItemAcknowledged.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.inventory != null && Object.hasOwnProperty.call(message, "inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.inventory); - if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.def_index); - if (message.quality != null && Object.hasOwnProperty.call(message, "quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.quality); - if (message.rarity != null && Object.hasOwnProperty.call(message, "rarity")) + if (message.rarity != null && $Object.hasOwnProperty.call(message, "rarity")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.rarity); - if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.origin); - if (message.is_strange != null && Object.hasOwnProperty.call(message, "is_strange")) + if (message.is_strange != null && $Object.hasOwnProperty.call(message, "is_strange")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.is_strange); - if (message.is_unusual != null && Object.hasOwnProperty.call(message, "is_unusual")) + if (message.is_unusual != null && $Object.hasOwnProperty.call(message, "is_unusual")) writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.is_unusual); - if (message.wear != null && Object.hasOwnProperty.call(message, "wear")) + if (message.wear != null && $Object.hasOwnProperty.call(message, "wear")) writer.uint32(/* id 9, wireType 5 =*/77).float(message.wear); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -89517,12 +115685,12 @@ * @function encodeDelimited * @memberof CMsgItemAcknowledged * @static - * @param {ICMsgItemAcknowledged} message CMsgItemAcknowledged message or plain object to encode + * @param {CMsgItemAcknowledged.$Properties} message CMsgItemAcknowledged message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgItemAcknowledged.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgItemAcknowledged.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -89532,49 +115700,90 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgItemAcknowledged} CMsgItemAcknowledged + * @returns {CMsgItemAcknowledged & CMsgItemAcknowledged.$Shape} CMsgItemAcknowledged * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgItemAcknowledged.decode = function decode(reader, length) { + CMsgItemAcknowledged.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgItemAcknowledged(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgItemAcknowledged(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.inventory = reader.uint32(); - break; - case 3: - message.def_index = reader.uint32(); - break; - case 4: - message.quality = reader.uint32(); - break; - case 5: - message.rarity = reader.uint32(); - break; - case 6: - message.origin = reader.uint32(); - break; - case 7: - message.is_strange = reader.uint32(); - break; - case 8: - message.is_unusual = reader.uint32(); - break; - case 9: - message.wear = reader.float(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.inventory = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.def_index = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.quality = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.rarity = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 0) + break; + message.origin = reader.uint32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.is_strange = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.is_unusual = reader.uint32(); + continue; + } + case 9: { + if (wireType !== 5) + break; + message.wear = reader.float(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -89584,11 +115793,11 @@ * @memberof CMsgItemAcknowledged * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgItemAcknowledged} CMsgItemAcknowledged + * @returns {CMsgItemAcknowledged & CMsgItemAcknowledged.$Shape} CMsgItemAcknowledged * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgItemAcknowledged.decodeDelimited = function decodeDelimited(reader) { + CMsgItemAcknowledged.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -89602,34 +115811,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgItemAcknowledged.verify = function verify(message) { + CMsgItemAcknowledged.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.inventory != null && message.hasOwnProperty("inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) if (!$util.isInteger(message.inventory)) return "inventory: integer expected"; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) if (!$util.isInteger(message.def_index)) return "def_index: integer expected"; - if (message.quality != null && message.hasOwnProperty("quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) if (!$util.isInteger(message.quality)) return "quality: integer expected"; - if (message.rarity != null && message.hasOwnProperty("rarity")) + if (message.rarity != null && $Object.hasOwnProperty.call(message, "rarity")) if (!$util.isInteger(message.rarity)) return "rarity: integer expected"; - if (message.origin != null && message.hasOwnProperty("origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) if (!$util.isInteger(message.origin)) return "origin: integer expected"; - if (message.is_strange != null && message.hasOwnProperty("is_strange")) + if (message.is_strange != null && $Object.hasOwnProperty.call(message, "is_strange")) if (!$util.isInteger(message.is_strange)) return "is_strange: integer expected"; - if (message.is_unusual != null && message.hasOwnProperty("is_unusual")) + if (message.is_unusual != null && $Object.hasOwnProperty.call(message, "is_unusual")) if (!$util.isInteger(message.is_unusual)) return "is_unusual: integer expected"; - if (message.wear != null && message.hasOwnProperty("wear")) + if (message.wear != null && $Object.hasOwnProperty.call(message, "wear")) if (typeof message.wear !== "number") return "wear: number expected"; return null; @@ -89643,9 +115856,15 @@ * @param {Object.} object Plain object * @returns {CMsgItemAcknowledged} CMsgItemAcknowledged */ - CMsgItemAcknowledged.fromObject = function fromObject(object) { + CMsgItemAcknowledged.fromObject = function (object, _depth) { if (object instanceof $root.CMsgItemAcknowledged) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgItemAcknowledged: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgItemAcknowledged(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -89664,7 +115883,7 @@ if (object.is_unusual != null) message.is_unusual = object.is_unusual >>> 0; if (object.wear != null) - message.wear = Number(object.wear); + message.wear = $Number(object.wear); return message; }; @@ -89677,9 +115896,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgItemAcknowledged.toObject = function toObject(message, options) { + CMsgItemAcknowledged.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; @@ -89692,24 +115915,24 @@ object.is_unusual = 0; object.wear = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.inventory != null && message.hasOwnProperty("inventory")) + if (message.inventory != null && $Object.hasOwnProperty.call(message, "inventory")) object.inventory = message.inventory; - if (message.def_index != null && message.hasOwnProperty("def_index")) + if (message.def_index != null && $Object.hasOwnProperty.call(message, "def_index")) object.def_index = message.def_index; - if (message.quality != null && message.hasOwnProperty("quality")) + if (message.quality != null && $Object.hasOwnProperty.call(message, "quality")) object.quality = message.quality; - if (message.rarity != null && message.hasOwnProperty("rarity")) + if (message.rarity != null && $Object.hasOwnProperty.call(message, "rarity")) object.rarity = message.rarity; - if (message.origin != null && message.hasOwnProperty("origin")) + if (message.origin != null && $Object.hasOwnProperty.call(message, "origin")) object.origin = message.origin; - if (message.is_strange != null && message.hasOwnProperty("is_strange")) + if (message.is_strange != null && $Object.hasOwnProperty.call(message, "is_strange")) object.is_strange = message.is_strange; - if (message.is_unusual != null && message.hasOwnProperty("is_unusual")) + if (message.is_unusual != null && $Object.hasOwnProperty.call(message, "is_unusual")) object.is_unusual = message.is_unusual; - if (message.wear != null && message.hasOwnProperty("wear")) - object.wear = options.json && !isFinite(message.wear) ? String(message.wear) : message.wear; + if (message.wear != null && $Object.hasOwnProperty.call(message, "wear")) + object.wear = options.json && !$isFinite(message.wear) ? $String(message.wear) : message.wear; return object; }; @@ -89720,8 +115943,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgItemAcknowledged.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgItemAcknowledged.prototype.toJSON = function() { + return CMsgItemAcknowledged.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgItemAcknowledged + * @function getTypeUrl + * @memberof CMsgItemAcknowledged + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgItemAcknowledged.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgItemAcknowledged"; }; return CMsgItemAcknowledged; @@ -89731,28 +115968,41 @@ /** * Properties of a CMsgSetPresetItemPosition. - * @exports ICMsgSetPresetItemPosition - * @interface ICMsgSetPresetItemPosition + * @typedef {Object} CMsgSetPresetItemPosition.$Properties * @property {number|null} [class_id] CMsgSetPresetItemPosition class_id * @property {number|null} [preset_id] CMsgSetPresetItemPosition preset_id * @property {number|null} [slot_id] CMsgSetPresetItemPosition slot_id * @property {number|Long|null} [item_id] CMsgSetPresetItemPosition item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSetPresetItemPosition. + * @exports ICMsgSetPresetItemPosition + * @interface ICMsgSetPresetItemPosition + * @augments CMsgSetPresetItemPosition.$Properties + * @deprecated Use CMsgSetPresetItemPosition.$Properties instead. + */ + + /** + * Shape of a CMsgSetPresetItemPosition. + * @typedef {CMsgSetPresetItemPosition.$Properties} CMsgSetPresetItemPosition.$Shape */ /** * Constructs a new CMsgSetPresetItemPosition. * @exports CMsgSetPresetItemPosition * @classdesc Represents a CMsgSetPresetItemPosition. - * @implements ICMsgSetPresetItemPosition * @constructor - * @param {ICMsgSetPresetItemPosition=} [properties] Properties to set + * @param {CMsgSetPresetItemPosition.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSetPresetItemPosition(properties) { + var CMsgSetPresetItemPosition = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSetPresetItemPosition class_id. @@ -89791,10 +116041,14 @@ * @function create * @memberof CMsgSetPresetItemPosition * @static - * @param {ICMsgSetPresetItemPosition=} [properties] Properties to set + * @param {CMsgSetPresetItemPosition.$Properties=} [properties] Properties to set * @returns {CMsgSetPresetItemPosition} CMsgSetPresetItemPosition instance + * @type {{ + * (properties: CMsgSetPresetItemPosition.$Shape): CMsgSetPresetItemPosition & CMsgSetPresetItemPosition.$Shape; + * (properties?: CMsgSetPresetItemPosition.$Properties): CMsgSetPresetItemPosition; + * }} */ - CMsgSetPresetItemPosition.create = function create(properties) { + CMsgSetPresetItemPosition.create = function(properties) { return new CMsgSetPresetItemPosition(properties); }; @@ -89803,21 +116057,28 @@ * @function encode * @memberof CMsgSetPresetItemPosition * @static - * @param {ICMsgSetPresetItemPosition} message CMsgSetPresetItemPosition message or plain object to encode + * @param {CMsgSetPresetItemPosition.$Properties} message CMsgSetPresetItemPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetPresetItemPosition.encode = function encode(message, writer) { + CMsgSetPresetItemPosition.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.class_id != null && Object.hasOwnProperty.call(message, "class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.class_id); - if (message.preset_id != null && Object.hasOwnProperty.call(message, "preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.preset_id); - if (message.slot_id != null && Object.hasOwnProperty.call(message, "slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.slot_id); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -89826,12 +116087,12 @@ * @function encodeDelimited * @memberof CMsgSetPresetItemPosition * @static - * @param {ICMsgSetPresetItemPosition} message CMsgSetPresetItemPosition message or plain object to encode + * @param {CMsgSetPresetItemPosition.$Properties} message CMsgSetPresetItemPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetPresetItemPosition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSetPresetItemPosition.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -89841,34 +116102,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSetPresetItemPosition} CMsgSetPresetItemPosition + * @returns {CMsgSetPresetItemPosition & CMsgSetPresetItemPosition.$Shape} CMsgSetPresetItemPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetPresetItemPosition.decode = function decode(reader, length) { + CMsgSetPresetItemPosition.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSetPresetItemPosition(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSetPresetItemPosition(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.class_id = reader.uint32(); - break; - case 2: - message.preset_id = reader.uint32(); - break; - case 3: - message.slot_id = reader.uint32(); - break; - case 4: - message.item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.class_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.preset_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.slot_id = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -89878,11 +116165,11 @@ * @memberof CMsgSetPresetItemPosition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSetPresetItemPosition} CMsgSetPresetItemPosition + * @returns {CMsgSetPresetItemPosition & CMsgSetPresetItemPosition.$Shape} CMsgSetPresetItemPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetPresetItemPosition.decodeDelimited = function decodeDelimited(reader) { + CMsgSetPresetItemPosition.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -89896,19 +116183,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSetPresetItemPosition.verify = function verify(message) { + CMsgSetPresetItemPosition.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) if (!$util.isInteger(message.class_id)) return "class_id: integer expected"; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) if (!$util.isInteger(message.preset_id)) return "preset_id: integer expected"; - if (message.slot_id != null && message.hasOwnProperty("slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) if (!$util.isInteger(message.slot_id)) return "slot_id: integer expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; return null; @@ -89922,9 +116213,15 @@ * @param {Object.} object Plain object * @returns {CMsgSetPresetItemPosition} CMsgSetPresetItemPosition */ - CMsgSetPresetItemPosition.fromObject = function fromObject(object) { + CMsgSetPresetItemPosition.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSetPresetItemPosition) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSetPresetItemPosition: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSetPresetItemPosition(); if (object.class_id != null) message.class_id = object.class_id >>> 0; @@ -89934,9 +116231,9 @@ message.slot_id = object.slot_id >>> 0; if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -89953,9 +116250,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSetPresetItemPosition.toObject = function toObject(message, options) { + CMsgSetPresetItemPosition.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.class_id = 0; @@ -89963,21 +116264,23 @@ object.slot_id = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) object.class_id = message.class_id; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) object.preset_id = message.preset_id; - if (message.slot_id != null && message.hasOwnProperty("slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) object.slot_id = message.slot_id; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; return object; }; @@ -89988,8 +116291,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSetPresetItemPosition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSetPresetItemPosition.prototype.toJSON = function() { + return CMsgSetPresetItemPosition.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSetPresetItemPosition + * @function getTypeUrl + * @memberof CMsgSetPresetItemPosition + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSetPresetItemPosition.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSetPresetItemPosition"; }; return CMsgSetPresetItemPosition; @@ -89997,32 +116314,45 @@ $root.CMsgSetItemPositions = (function() { + /** + * Properties of a CMsgSetItemPositions. + * @typedef {Object} CMsgSetItemPositions.$Properties + * @property {Array.|null} [item_positions] CMsgSetItemPositions item_positions + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgSetItemPositions. * @exports ICMsgSetItemPositions * @interface ICMsgSetItemPositions - * @property {Array.|null} [item_positions] CMsgSetItemPositions item_positions + * @augments CMsgSetItemPositions.$Properties + * @deprecated Use CMsgSetItemPositions.$Properties instead. + */ + + /** + * Shape of a CMsgSetItemPositions. + * @typedef {CMsgSetItemPositions.$Properties} CMsgSetItemPositions.$Shape */ /** * Constructs a new CMsgSetItemPositions. * @exports CMsgSetItemPositions * @classdesc Represents a CMsgSetItemPositions. - * @implements ICMsgSetItemPositions * @constructor - * @param {ICMsgSetItemPositions=} [properties] Properties to set + * @param {CMsgSetItemPositions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSetItemPositions(properties) { + var CMsgSetItemPositions = function (properties) { this.item_positions = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSetItemPositions item_positions. - * @member {Array.} item_positions + * @member {Array.} item_positions * @memberof CMsgSetItemPositions * @instance */ @@ -90033,10 +116363,14 @@ * @function create * @memberof CMsgSetItemPositions * @static - * @param {ICMsgSetItemPositions=} [properties] Properties to set + * @param {CMsgSetItemPositions.$Properties=} [properties] Properties to set * @returns {CMsgSetItemPositions} CMsgSetItemPositions instance + * @type {{ + * (properties: CMsgSetItemPositions.$Shape): CMsgSetItemPositions & CMsgSetItemPositions.$Shape; + * (properties?: CMsgSetItemPositions.$Properties): CMsgSetItemPositions; + * }} */ - CMsgSetItemPositions.create = function create(properties) { + CMsgSetItemPositions.create = function(properties) { return new CMsgSetItemPositions(properties); }; @@ -90045,16 +116379,23 @@ * @function encode * @memberof CMsgSetItemPositions * @static - * @param {ICMsgSetItemPositions} message CMsgSetItemPositions message or plain object to encode + * @param {CMsgSetItemPositions.$Properties} message CMsgSetItemPositions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetItemPositions.encode = function encode(message, writer) { + CMsgSetItemPositions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.item_positions != null && message.item_positions.length) for (var i = 0; i < message.item_positions.length; ++i) - $root.CMsgSetItemPositions.ItemPosition.encode(message.item_positions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgSetItemPositions.ItemPosition.encode(message.item_positions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -90063,12 +116404,12 @@ * @function encodeDelimited * @memberof CMsgSetItemPositions * @static - * @param {ICMsgSetItemPositions} message CMsgSetItemPositions message or plain object to encode + * @param {CMsgSetItemPositions.$Properties} message CMsgSetItemPositions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetItemPositions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSetItemPositions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -90078,27 +116419,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSetItemPositions} CMsgSetItemPositions + * @returns {CMsgSetItemPositions & CMsgSetItemPositions.$Shape} CMsgSetItemPositions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetItemPositions.decode = function decode(reader, length) { + CMsgSetItemPositions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSetItemPositions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSetItemPositions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.item_positions && message.item_positions.length)) - message.item_positions = []; - message.item_positions.push($root.CMsgSetItemPositions.ItemPosition.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.item_positions && message.item_positions.length)) + message.item_positions = []; + message.item_positions.push($root.CMsgSetItemPositions.ItemPosition.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -90108,11 +116466,11 @@ * @memberof CMsgSetItemPositions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSetItemPositions} CMsgSetItemPositions + * @returns {CMsgSetItemPositions & CMsgSetItemPositions.$Shape} CMsgSetItemPositions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetItemPositions.decodeDelimited = function decodeDelimited(reader) { + CMsgSetItemPositions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -90126,14 +116484,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSetItemPositions.verify = function verify(message) { + CMsgSetItemPositions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_positions != null && message.hasOwnProperty("item_positions")) { - if (!Array.isArray(message.item_positions)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_positions != null && $Object.hasOwnProperty.call(message, "item_positions")) { + if (!$Array.isArray(message.item_positions)) return "item_positions: array expected"; for (var i = 0; i < message.item_positions.length; ++i) { - var error = $root.CMsgSetItemPositions.ItemPosition.verify(message.item_positions[i]); + var error = $root.CMsgSetItemPositions.ItemPosition.verify(message.item_positions[i], _depth + 1); if (error) return "item_positions." + error; } @@ -90149,18 +116511,24 @@ * @param {Object.} object Plain object * @returns {CMsgSetItemPositions} CMsgSetItemPositions */ - CMsgSetItemPositions.fromObject = function fromObject(object) { + CMsgSetItemPositions.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSetItemPositions) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSetItemPositions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSetItemPositions(); if (object.item_positions) { - if (!Array.isArray(object.item_positions)) - throw TypeError(".CMsgSetItemPositions.item_positions: array expected"); - message.item_positions = []; + if (!$Array.isArray(object.item_positions)) + throw $TypeError(".CMsgSetItemPositions.item_positions: array expected"); + message.item_positions = $Array(object.item_positions.length); for (var i = 0; i < object.item_positions.length; ++i) { - if (typeof object.item_positions[i] !== "object") - throw TypeError(".CMsgSetItemPositions.item_positions: object expected"); - message.item_positions[i] = $root.CMsgSetItemPositions.ItemPosition.fromObject(object.item_positions[i]); + if (!$util.isObject(object.item_positions[i])) + throw $TypeError(".CMsgSetItemPositions.item_positions: object expected"); + message.item_positions[i] = $root.CMsgSetItemPositions.ItemPosition.fromObject(object.item_positions[i], _depth + 1); } } return message; @@ -90175,16 +116543,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSetItemPositions.toObject = function toObject(message, options) { + CMsgSetItemPositions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.item_positions = []; if (message.item_positions && message.item_positions.length) { - object.item_positions = []; + object.item_positions = $Array(message.item_positions.length); for (var j = 0; j < message.item_positions.length; ++j) - object.item_positions[j] = $root.CMsgSetItemPositions.ItemPosition.toObject(message.item_positions[j], options); + object.item_positions[j] = $root.CMsgSetItemPositions.ItemPosition.toObject(message.item_positions[j], options, _depth + 1); } return object; }; @@ -90196,34 +116568,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgSetItemPositions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSetItemPositions.prototype.toJSON = function() { + return CMsgSetItemPositions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSetItemPositions + * @function getTypeUrl + * @memberof CMsgSetItemPositions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSetItemPositions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSetItemPositions"; }; CMsgSetItemPositions.ItemPosition = (function() { /** * Properties of an ItemPosition. - * @memberof CMsgSetItemPositions - * @interface IItemPosition + * @typedef {Object} CMsgSetItemPositions.ItemPosition.$Properties * @property {number|Long|null} [item_id] ItemPosition item_id * @property {number|null} [position] ItemPosition position + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ItemPosition. + * @memberof CMsgSetItemPositions + * @interface IItemPosition + * @augments CMsgSetItemPositions.ItemPosition.$Properties + * @deprecated Use CMsgSetItemPositions.ItemPosition.$Properties instead. + */ + + /** + * Shape of an ItemPosition. + * @typedef {CMsgSetItemPositions.ItemPosition.$Properties} CMsgSetItemPositions.ItemPosition.$Shape */ /** * Constructs a new ItemPosition. * @memberof CMsgSetItemPositions * @classdesc Represents an ItemPosition. - * @implements IItemPosition * @constructor - * @param {CMsgSetItemPositions.IItemPosition=} [properties] Properties to set + * @param {CMsgSetItemPositions.ItemPosition.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ItemPosition(properties) { + var ItemPosition = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ItemPosition item_id. @@ -90246,10 +116645,14 @@ * @function create * @memberof CMsgSetItemPositions.ItemPosition * @static - * @param {CMsgSetItemPositions.IItemPosition=} [properties] Properties to set + * @param {CMsgSetItemPositions.ItemPosition.$Properties=} [properties] Properties to set * @returns {CMsgSetItemPositions.ItemPosition} ItemPosition instance + * @type {{ + * (properties: CMsgSetItemPositions.ItemPosition.$Shape): CMsgSetItemPositions.ItemPosition & CMsgSetItemPositions.ItemPosition.$Shape; + * (properties?: CMsgSetItemPositions.ItemPosition.$Properties): CMsgSetItemPositions.ItemPosition; + * }} */ - ItemPosition.create = function create(properties) { + ItemPosition.create = function(properties) { return new ItemPosition(properties); }; @@ -90258,17 +116661,24 @@ * @function encode * @memberof CMsgSetItemPositions.ItemPosition * @static - * @param {CMsgSetItemPositions.IItemPosition} message ItemPosition message or plain object to encode + * @param {CMsgSetItemPositions.ItemPosition.$Properties} message ItemPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ItemPosition.encode = function encode(message, writer) { + ItemPosition.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) + if (message.position != null && $Object.hasOwnProperty.call(message, "position")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.position); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -90277,12 +116687,12 @@ * @function encodeDelimited * @memberof CMsgSetItemPositions.ItemPosition * @static - * @param {CMsgSetItemPositions.IItemPosition} message ItemPosition message or plain object to encode + * @param {CMsgSetItemPositions.ItemPosition.$Properties} message ItemPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ItemPosition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ItemPosition.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -90292,28 +116702,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSetItemPositions.ItemPosition} ItemPosition + * @returns {CMsgSetItemPositions.ItemPosition & CMsgSetItemPositions.ItemPosition.$Shape} ItemPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ItemPosition.decode = function decode(reader, length) { + ItemPosition.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSetItemPositions.ItemPosition(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSetItemPositions.ItemPosition(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.position = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.position = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -90323,11 +116753,11 @@ * @memberof CMsgSetItemPositions.ItemPosition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSetItemPositions.ItemPosition} ItemPosition + * @returns {CMsgSetItemPositions.ItemPosition & CMsgSetItemPositions.ItemPosition.$Shape} ItemPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ItemPosition.decodeDelimited = function decodeDelimited(reader) { + ItemPosition.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -90341,13 +116771,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ItemPosition.verify = function verify(message) { + ItemPosition.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.position != null && message.hasOwnProperty("position")) + if (message.position != null && $Object.hasOwnProperty.call(message, "position")) if (!$util.isInteger(message.position)) return "position: integer expected"; return null; @@ -90361,15 +116795,21 @@ * @param {Object.} object Plain object * @returns {CMsgSetItemPositions.ItemPosition} ItemPosition */ - ItemPosition.fromObject = function fromObject(object) { + ItemPosition.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSetItemPositions.ItemPosition) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSetItemPositions.ItemPosition: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSetItemPositions.ItemPosition(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -90388,24 +116828,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ItemPosition.toObject = function toObject(message, options) { + ItemPosition.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.position = 0; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.position != null && message.hasOwnProperty("position")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.position != null && $Object.hasOwnProperty.call(message, "position")) object.position = message.position; return object; }; @@ -90417,8 +116863,22 @@ * @instance * @returns {Object.} JSON object */ - ItemPosition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ItemPosition.prototype.toJSON = function() { + return ItemPosition.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ItemPosition + * @function getTypeUrl + * @memberof CMsgSetItemPositions.ItemPosition + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ItemPosition.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSetItemPositions.ItemPosition"; }; return ItemPosition; @@ -90431,28 +116891,41 @@ /** * Properties of a CSOEconItemPresetInstance. - * @exports ICSOEconItemPresetInstance - * @interface ICSOEconItemPresetInstance + * @typedef {Object} CSOEconItemPresetInstance.$Properties * @property {number|null} [class_id] CSOEconItemPresetInstance class_id * @property {number|null} [preset_id] CSOEconItemPresetInstance preset_id * @property {number|null} [slot_id] CSOEconItemPresetInstance slot_id * @property {number|Long|null} [item_id] CSOEconItemPresetInstance item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOEconItemPresetInstance. + * @exports ICSOEconItemPresetInstance + * @interface ICSOEconItemPresetInstance + * @augments CSOEconItemPresetInstance.$Properties + * @deprecated Use CSOEconItemPresetInstance.$Properties instead. + */ + + /** + * Shape of a CSOEconItemPresetInstance. + * @typedef {CSOEconItemPresetInstance.$Properties} CSOEconItemPresetInstance.$Shape */ /** * Constructs a new CSOEconItemPresetInstance. * @exports CSOEconItemPresetInstance * @classdesc Represents a CSOEconItemPresetInstance. - * @implements ICSOEconItemPresetInstance * @constructor - * @param {ICSOEconItemPresetInstance=} [properties] Properties to set + * @param {CSOEconItemPresetInstance.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconItemPresetInstance(properties) { + var CSOEconItemPresetInstance = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconItemPresetInstance class_id. @@ -90491,10 +116964,14 @@ * @function create * @memberof CSOEconItemPresetInstance * @static - * @param {ICSOEconItemPresetInstance=} [properties] Properties to set + * @param {CSOEconItemPresetInstance.$Properties=} [properties] Properties to set * @returns {CSOEconItemPresetInstance} CSOEconItemPresetInstance instance + * @type {{ + * (properties: CSOEconItemPresetInstance.$Shape): CSOEconItemPresetInstance & CSOEconItemPresetInstance.$Shape; + * (properties?: CSOEconItemPresetInstance.$Properties): CSOEconItemPresetInstance; + * }} */ - CSOEconItemPresetInstance.create = function create(properties) { + CSOEconItemPresetInstance.create = function(properties) { return new CSOEconItemPresetInstance(properties); }; @@ -90503,21 +116980,28 @@ * @function encode * @memberof CSOEconItemPresetInstance * @static - * @param {ICSOEconItemPresetInstance} message CSOEconItemPresetInstance message or plain object to encode + * @param {CSOEconItemPresetInstance.$Properties} message CSOEconItemPresetInstance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemPresetInstance.encode = function encode(message, writer) { + CSOEconItemPresetInstance.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.class_id != null && Object.hasOwnProperty.call(message, "class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.class_id); - if (message.preset_id != null && Object.hasOwnProperty.call(message, "preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.preset_id); - if (message.slot_id != null && Object.hasOwnProperty.call(message, "slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.slot_id); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -90526,12 +117010,12 @@ * @function encodeDelimited * @memberof CSOEconItemPresetInstance * @static - * @param {ICSOEconItemPresetInstance} message CSOEconItemPresetInstance message or plain object to encode + * @param {CSOEconItemPresetInstance.$Properties} message CSOEconItemPresetInstance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconItemPresetInstance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconItemPresetInstance.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -90541,34 +117025,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconItemPresetInstance} CSOEconItemPresetInstance + * @returns {CSOEconItemPresetInstance & CSOEconItemPresetInstance.$Shape} CSOEconItemPresetInstance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemPresetInstance.decode = function decode(reader, length) { + CSOEconItemPresetInstance.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconItemPresetInstance(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconItemPresetInstance(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.class_id = reader.uint32(); - break; - case 3: - message.preset_id = reader.uint32(); - break; - case 4: - message.slot_id = reader.uint32(); - break; - case 5: - message.item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 0) + break; + message.class_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.preset_id = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.slot_id = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -90578,11 +117088,11 @@ * @memberof CSOEconItemPresetInstance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconItemPresetInstance} CSOEconItemPresetInstance + * @returns {CSOEconItemPresetInstance & CSOEconItemPresetInstance.$Shape} CSOEconItemPresetInstance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconItemPresetInstance.decodeDelimited = function decodeDelimited(reader) { + CSOEconItemPresetInstance.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -90596,19 +117106,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconItemPresetInstance.verify = function verify(message) { + CSOEconItemPresetInstance.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) if (!$util.isInteger(message.class_id)) return "class_id: integer expected"; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) if (!$util.isInteger(message.preset_id)) return "preset_id: integer expected"; - if (message.slot_id != null && message.hasOwnProperty("slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) if (!$util.isInteger(message.slot_id)) return "slot_id: integer expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; return null; @@ -90622,9 +117136,15 @@ * @param {Object.} object Plain object * @returns {CSOEconItemPresetInstance} CSOEconItemPresetInstance */ - CSOEconItemPresetInstance.fromObject = function fromObject(object) { + CSOEconItemPresetInstance.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconItemPresetInstance) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconItemPresetInstance: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconItemPresetInstance(); if (object.class_id != null) message.class_id = object.class_id >>> 0; @@ -90634,9 +117154,9 @@ message.slot_id = object.slot_id >>> 0; if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -90653,9 +117173,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconItemPresetInstance.toObject = function toObject(message, options) { + CSOEconItemPresetInstance.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.class_id = 0; @@ -90663,21 +117187,23 @@ object.slot_id = 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) object.class_id = message.class_id; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) object.preset_id = message.preset_id; - if (message.slot_id != null && message.hasOwnProperty("slot_id")) + if (message.slot_id != null && $Object.hasOwnProperty.call(message, "slot_id")) object.slot_id = message.slot_id; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; return object; }; @@ -90688,8 +117214,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconItemPresetInstance.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconItemPresetInstance.prototype.toJSON = function() { + return CSOEconItemPresetInstance.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconItemPresetInstance + * @function getTypeUrl + * @memberof CSOEconItemPresetInstance + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconItemPresetInstance.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconItemPresetInstance"; }; return CSOEconItemPresetInstance; @@ -90699,26 +117239,39 @@ /** * Properties of a CMsgSelectPresetForClass. - * @exports ICMsgSelectPresetForClass - * @interface ICMsgSelectPresetForClass + * @typedef {Object} CMsgSelectPresetForClass.$Properties * @property {number|null} [class_id] CMsgSelectPresetForClass class_id * @property {number|null} [preset_id] CMsgSelectPresetForClass preset_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSelectPresetForClass. + * @exports ICMsgSelectPresetForClass + * @interface ICMsgSelectPresetForClass + * @augments CMsgSelectPresetForClass.$Properties + * @deprecated Use CMsgSelectPresetForClass.$Properties instead. + */ + + /** + * Shape of a CMsgSelectPresetForClass. + * @typedef {CMsgSelectPresetForClass.$Properties} CMsgSelectPresetForClass.$Shape */ /** * Constructs a new CMsgSelectPresetForClass. * @exports CMsgSelectPresetForClass * @classdesc Represents a CMsgSelectPresetForClass. - * @implements ICMsgSelectPresetForClass * @constructor - * @param {ICMsgSelectPresetForClass=} [properties] Properties to set + * @param {CMsgSelectPresetForClass.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSelectPresetForClass(properties) { + var CMsgSelectPresetForClass = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSelectPresetForClass class_id. @@ -90741,10 +117294,14 @@ * @function create * @memberof CMsgSelectPresetForClass * @static - * @param {ICMsgSelectPresetForClass=} [properties] Properties to set + * @param {CMsgSelectPresetForClass.$Properties=} [properties] Properties to set * @returns {CMsgSelectPresetForClass} CMsgSelectPresetForClass instance + * @type {{ + * (properties: CMsgSelectPresetForClass.$Shape): CMsgSelectPresetForClass & CMsgSelectPresetForClass.$Shape; + * (properties?: CMsgSelectPresetForClass.$Properties): CMsgSelectPresetForClass; + * }} */ - CMsgSelectPresetForClass.create = function create(properties) { + CMsgSelectPresetForClass.create = function(properties) { return new CMsgSelectPresetForClass(properties); }; @@ -90753,17 +117310,24 @@ * @function encode * @memberof CMsgSelectPresetForClass * @static - * @param {ICMsgSelectPresetForClass} message CMsgSelectPresetForClass message or plain object to encode + * @param {CMsgSelectPresetForClass.$Properties} message CMsgSelectPresetForClass message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSelectPresetForClass.encode = function encode(message, writer) { + CMsgSelectPresetForClass.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.class_id != null && Object.hasOwnProperty.call(message, "class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.class_id); - if (message.preset_id != null && Object.hasOwnProperty.call(message, "preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.preset_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -90772,12 +117336,12 @@ * @function encodeDelimited * @memberof CMsgSelectPresetForClass * @static - * @param {ICMsgSelectPresetForClass} message CMsgSelectPresetForClass message or plain object to encode + * @param {CMsgSelectPresetForClass.$Properties} message CMsgSelectPresetForClass message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSelectPresetForClass.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSelectPresetForClass.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -90787,28 +117351,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSelectPresetForClass} CMsgSelectPresetForClass + * @returns {CMsgSelectPresetForClass & CMsgSelectPresetForClass.$Shape} CMsgSelectPresetForClass * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSelectPresetForClass.decode = function decode(reader, length) { + CMsgSelectPresetForClass.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSelectPresetForClass(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSelectPresetForClass(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.class_id = reader.uint32(); - break; - case 2: - message.preset_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.class_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.preset_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -90818,11 +117402,11 @@ * @memberof CMsgSelectPresetForClass * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSelectPresetForClass} CMsgSelectPresetForClass + * @returns {CMsgSelectPresetForClass & CMsgSelectPresetForClass.$Shape} CMsgSelectPresetForClass * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSelectPresetForClass.decodeDelimited = function decodeDelimited(reader) { + CMsgSelectPresetForClass.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -90836,13 +117420,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSelectPresetForClass.verify = function verify(message) { + CMsgSelectPresetForClass.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) if (!$util.isInteger(message.class_id)) return "class_id: integer expected"; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) if (!$util.isInteger(message.preset_id)) return "preset_id: integer expected"; return null; @@ -90856,9 +117444,15 @@ * @param {Object.} object Plain object * @returns {CMsgSelectPresetForClass} CMsgSelectPresetForClass */ - CMsgSelectPresetForClass.fromObject = function fromObject(object) { + CMsgSelectPresetForClass.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSelectPresetForClass) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSelectPresetForClass: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSelectPresetForClass(); if (object.class_id != null) message.class_id = object.class_id >>> 0; @@ -90876,17 +117470,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSelectPresetForClass.toObject = function toObject(message, options) { + CMsgSelectPresetForClass.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.class_id = 0; object.preset_id = 0; } - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) object.class_id = message.class_id; - if (message.preset_id != null && message.hasOwnProperty("preset_id")) + if (message.preset_id != null && $Object.hasOwnProperty.call(message, "preset_id")) object.preset_id = message.preset_id; return object; }; @@ -90898,8 +117496,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSelectPresetForClass.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSelectPresetForClass.prototype.toJSON = function() { + return CMsgSelectPresetForClass.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSelectPresetForClass + * @function getTypeUrl + * @memberof CMsgSelectPresetForClass + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSelectPresetForClass.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSelectPresetForClass"; }; return CMsgSelectPresetForClass; @@ -90909,27 +117521,40 @@ /** * Properties of a CSOClassPresetClientData. - * @exports ICSOClassPresetClientData - * @interface ICSOClassPresetClientData + * @typedef {Object} CSOClassPresetClientData.$Properties * @property {number|null} [account_id] CSOClassPresetClientData account_id * @property {number|null} [class_id] CSOClassPresetClientData class_id * @property {number|null} [active_preset_id] CSOClassPresetClientData active_preset_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CSOClassPresetClientData. + * @exports ICSOClassPresetClientData + * @interface ICSOClassPresetClientData + * @augments CSOClassPresetClientData.$Properties + * @deprecated Use CSOClassPresetClientData.$Properties instead. + */ + + /** + * Shape of a CSOClassPresetClientData. + * @typedef {CSOClassPresetClientData.$Properties} CSOClassPresetClientData.$Shape */ /** * Constructs a new CSOClassPresetClientData. * @exports CSOClassPresetClientData * @classdesc Represents a CSOClassPresetClientData. - * @implements ICSOClassPresetClientData * @constructor - * @param {ICSOClassPresetClientData=} [properties] Properties to set + * @param {CSOClassPresetClientData.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOClassPresetClientData(properties) { + var CSOClassPresetClientData = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOClassPresetClientData account_id. @@ -90960,10 +117585,14 @@ * @function create * @memberof CSOClassPresetClientData * @static - * @param {ICSOClassPresetClientData=} [properties] Properties to set + * @param {CSOClassPresetClientData.$Properties=} [properties] Properties to set * @returns {CSOClassPresetClientData} CSOClassPresetClientData instance + * @type {{ + * (properties: CSOClassPresetClientData.$Shape): CSOClassPresetClientData & CSOClassPresetClientData.$Shape; + * (properties?: CSOClassPresetClientData.$Properties): CSOClassPresetClientData; + * }} */ - CSOClassPresetClientData.create = function create(properties) { + CSOClassPresetClientData.create = function(properties) { return new CSOClassPresetClientData(properties); }; @@ -90972,19 +117601,26 @@ * @function encode * @memberof CSOClassPresetClientData * @static - * @param {ICSOClassPresetClientData} message CSOClassPresetClientData message or plain object to encode + * @param {CSOClassPresetClientData.$Properties} message CSOClassPresetClientData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOClassPresetClientData.encode = function encode(message, writer) { + CSOClassPresetClientData.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.class_id != null && Object.hasOwnProperty.call(message, "class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.class_id); - if (message.active_preset_id != null && Object.hasOwnProperty.call(message, "active_preset_id")) + if (message.active_preset_id != null && $Object.hasOwnProperty.call(message, "active_preset_id")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.active_preset_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -90993,12 +117629,12 @@ * @function encodeDelimited * @memberof CSOClassPresetClientData * @static - * @param {ICSOClassPresetClientData} message CSOClassPresetClientData message or plain object to encode + * @param {CSOClassPresetClientData.$Properties} message CSOClassPresetClientData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOClassPresetClientData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOClassPresetClientData.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -91008,31 +117644,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOClassPresetClientData} CSOClassPresetClientData + * @returns {CSOClassPresetClientData & CSOClassPresetClientData.$Shape} CSOClassPresetClientData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOClassPresetClientData.decode = function decode(reader, length) { + CSOClassPresetClientData.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOClassPresetClientData(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOClassPresetClientData(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.class_id = reader.uint32(); - break; - case 3: - message.active_preset_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.class_id = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.active_preset_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -91042,11 +117701,11 @@ * @memberof CSOClassPresetClientData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOClassPresetClientData} CSOClassPresetClientData + * @returns {CSOClassPresetClientData & CSOClassPresetClientData.$Shape} CSOClassPresetClientData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOClassPresetClientData.decodeDelimited = function decodeDelimited(reader) { + CSOClassPresetClientData.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -91060,16 +117719,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOClassPresetClientData.verify = function verify(message) { + CSOClassPresetClientData.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) if (!$util.isInteger(message.class_id)) return "class_id: integer expected"; - if (message.active_preset_id != null && message.hasOwnProperty("active_preset_id")) + if (message.active_preset_id != null && $Object.hasOwnProperty.call(message, "active_preset_id")) if (!$util.isInteger(message.active_preset_id)) return "active_preset_id: integer expected"; return null; @@ -91083,9 +117746,15 @@ * @param {Object.} object Plain object * @returns {CSOClassPresetClientData} CSOClassPresetClientData */ - CSOClassPresetClientData.fromObject = function fromObject(object) { + CSOClassPresetClientData.fromObject = function (object, _depth) { if (object instanceof $root.CSOClassPresetClientData) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOClassPresetClientData: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOClassPresetClientData(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -91105,20 +117774,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOClassPresetClientData.toObject = function toObject(message, options) { + CSOClassPresetClientData.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; object.class_id = 0; object.active_preset_id = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.class_id != null && message.hasOwnProperty("class_id")) + if (message.class_id != null && $Object.hasOwnProperty.call(message, "class_id")) object.class_id = message.class_id; - if (message.active_preset_id != null && message.hasOwnProperty("active_preset_id")) + if (message.active_preset_id != null && $Object.hasOwnProperty.call(message, "active_preset_id")) object.active_preset_id = message.active_preset_id; return object; }; @@ -91130,8 +117803,22 @@ * @instance * @returns {Object.} JSON object */ - CSOClassPresetClientData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOClassPresetClientData.prototype.toJSON = function() { + return CSOClassPresetClientData.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOClassPresetClientData + * @function getTypeUrl + * @memberof CSOClassPresetClientData + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOClassPresetClientData.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOClassPresetClientData"; }; return CSOClassPresetClientData; @@ -91141,8 +117828,7 @@ /** * Properties of a CMsgGCReportAbuse. - * @exports ICMsgGCReportAbuse - * @interface ICMsgGCReportAbuse + * @typedef {Object} CMsgGCReportAbuse.$Properties * @property {number|Long|null} [target_steam_id] CMsgGCReportAbuse target_steam_id * @property {string|null} [description] CMsgGCReportAbuse description * @property {number|Long|null} [gid] CMsgGCReportAbuse gid @@ -91150,22 +117836,36 @@ * @property {number|null} [content_type] CMsgGCReportAbuse content_type * @property {number|null} [target_game_server_ip] CMsgGCReportAbuse target_game_server_ip * @property {number|null} [target_game_server_port] CMsgGCReportAbuse target_game_server_port + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCReportAbuse. + * @exports ICMsgGCReportAbuse + * @interface ICMsgGCReportAbuse + * @augments CMsgGCReportAbuse.$Properties + * @deprecated Use CMsgGCReportAbuse.$Properties instead. + */ + + /** + * Shape of a CMsgGCReportAbuse. + * @typedef {CMsgGCReportAbuse.$Properties} CMsgGCReportAbuse.$Shape */ /** * Constructs a new CMsgGCReportAbuse. * @exports CMsgGCReportAbuse * @classdesc Represents a CMsgGCReportAbuse. - * @implements ICMsgGCReportAbuse * @constructor - * @param {ICMsgGCReportAbuse=} [properties] Properties to set + * @param {CMsgGCReportAbuse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCReportAbuse(properties) { + var CMsgGCReportAbuse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCReportAbuse target_steam_id. @@ -91173,7 +117873,7 @@ * @memberof CMsgGCReportAbuse * @instance */ - CMsgGCReportAbuse.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCReportAbuse.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCReportAbuse description. @@ -91228,10 +117928,14 @@ * @function create * @memberof CMsgGCReportAbuse * @static - * @param {ICMsgGCReportAbuse=} [properties] Properties to set + * @param {CMsgGCReportAbuse.$Properties=} [properties] Properties to set * @returns {CMsgGCReportAbuse} CMsgGCReportAbuse instance + * @type {{ + * (properties: CMsgGCReportAbuse.$Shape): CMsgGCReportAbuse & CMsgGCReportAbuse.$Shape; + * (properties?: CMsgGCReportAbuse.$Properties): CMsgGCReportAbuse; + * }} */ - CMsgGCReportAbuse.create = function create(properties) { + CMsgGCReportAbuse.create = function(properties) { return new CMsgGCReportAbuse(properties); }; @@ -91240,27 +117944,34 @@ * @function encode * @memberof CMsgGCReportAbuse * @static - * @param {ICMsgGCReportAbuse} message CMsgGCReportAbuse message or plain object to encode + * @param {CMsgGCReportAbuse.$Properties} message CMsgGCReportAbuse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCReportAbuse.encode = function encode(message, writer) { + CMsgGCReportAbuse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.target_steam_id != null && Object.hasOwnProperty.call(message, "target_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.target_steam_id); - if (message.abuse_type != null && Object.hasOwnProperty.call(message, "abuse_type")) + if (message.abuse_type != null && $Object.hasOwnProperty.call(message, "abuse_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.abuse_type); - if (message.content_type != null && Object.hasOwnProperty.call(message, "content_type")) + if (message.content_type != null && $Object.hasOwnProperty.call(message, "content_type")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.content_type); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.gid != null && Object.hasOwnProperty.call(message, "gid")) + if (message.gid != null && $Object.hasOwnProperty.call(message, "gid")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.gid); - if (message.target_game_server_ip != null && Object.hasOwnProperty.call(message, "target_game_server_ip")) + if (message.target_game_server_ip != null && $Object.hasOwnProperty.call(message, "target_game_server_ip")) writer.uint32(/* id 6, wireType 5 =*/53).fixed32(message.target_game_server_ip); - if (message.target_game_server_port != null && Object.hasOwnProperty.call(message, "target_game_server_port")) + if (message.target_game_server_port != null && $Object.hasOwnProperty.call(message, "target_game_server_port")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.target_game_server_port); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -91269,12 +117980,12 @@ * @function encodeDelimited * @memberof CMsgGCReportAbuse * @static - * @param {ICMsgGCReportAbuse} message CMsgGCReportAbuse message or plain object to encode + * @param {CMsgGCReportAbuse.$Properties} message CMsgGCReportAbuse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCReportAbuse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCReportAbuse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -91284,43 +117995,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCReportAbuse} CMsgGCReportAbuse + * @returns {CMsgGCReportAbuse & CMsgGCReportAbuse.$Shape} CMsgGCReportAbuse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCReportAbuse.decode = function decode(reader, length) { + CMsgGCReportAbuse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCReportAbuse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCReportAbuse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.target_steam_id = reader.fixed64(); - break; - case 4: - message.description = reader.string(); - break; - case 5: - message.gid = reader.uint64(); - break; - case 2: - message.abuse_type = reader.uint32(); - break; - case 3: - message.content_type = reader.uint32(); - break; - case 6: - message.target_game_server_ip = reader.fixed32(); - break; - case 7: - message.target_game_server_port = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.target_steam_id = reader.fixed64(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.description = reader.string(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.gid = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.abuse_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.content_type = reader.uint32(); + continue; + } + case 6: { + if (wireType !== 5) + break; + message.target_game_server_ip = reader.fixed32(); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.target_game_server_port = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -91330,11 +118076,11 @@ * @memberof CMsgGCReportAbuse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCReportAbuse} CMsgGCReportAbuse + * @returns {CMsgGCReportAbuse & CMsgGCReportAbuse.$Shape} CMsgGCReportAbuse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCReportAbuse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCReportAbuse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -91348,28 +118094,32 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCReportAbuse.verify = function verify(message) { + CMsgGCReportAbuse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) if (!$util.isInteger(message.target_steam_id) && !(message.target_steam_id && $util.isInteger(message.target_steam_id.low) && $util.isInteger(message.target_steam_id.high))) return "target_steam_id: integer|Long expected"; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) if (!$util.isString(message.description)) return "description: string expected"; - if (message.gid != null && message.hasOwnProperty("gid")) + if (message.gid != null && $Object.hasOwnProperty.call(message, "gid")) if (!$util.isInteger(message.gid) && !(message.gid && $util.isInteger(message.gid.low) && $util.isInteger(message.gid.high))) return "gid: integer|Long expected"; - if (message.abuse_type != null && message.hasOwnProperty("abuse_type")) + if (message.abuse_type != null && $Object.hasOwnProperty.call(message, "abuse_type")) if (!$util.isInteger(message.abuse_type)) return "abuse_type: integer expected"; - if (message.content_type != null && message.hasOwnProperty("content_type")) + if (message.content_type != null && $Object.hasOwnProperty.call(message, "content_type")) if (!$util.isInteger(message.content_type)) return "content_type: integer expected"; - if (message.target_game_server_ip != null && message.hasOwnProperty("target_game_server_ip")) + if (message.target_game_server_ip != null && $Object.hasOwnProperty.call(message, "target_game_server_ip")) if (!$util.isInteger(message.target_game_server_ip)) return "target_game_server_ip: integer expected"; - if (message.target_game_server_port != null && message.hasOwnProperty("target_game_server_port")) + if (message.target_game_server_port != null && $Object.hasOwnProperty.call(message, "target_game_server_port")) if (!$util.isInteger(message.target_game_server_port)) return "target_game_server_port: integer expected"; return null; @@ -91383,26 +118133,32 @@ * @param {Object.} object Plain object * @returns {CMsgGCReportAbuse} CMsgGCReportAbuse */ - CMsgGCReportAbuse.fromObject = function fromObject(object) { + CMsgGCReportAbuse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCReportAbuse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCReportAbuse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCReportAbuse(); if (object.target_steam_id != null) if ($util.Long) - (message.target_steam_id = $util.Long.fromValue(object.target_steam_id)).unsigned = false; + message.target_steam_id = $util.Long.fromValue(object.target_steam_id, true); else if (typeof object.target_steam_id === "string") - message.target_steam_id = parseInt(object.target_steam_id, 10); + message.target_steam_id = $parseInt(object.target_steam_id, 10); else if (typeof object.target_steam_id === "number") message.target_steam_id = object.target_steam_id; else if (typeof object.target_steam_id === "object") - message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(); + message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(true); if (object.description != null) - message.description = String(object.description); + message.description = $String(object.description); if (object.gid != null) if ($util.Long) - (message.gid = $util.Long.fromValue(object.gid)).unsigned = true; + message.gid = $util.Long.fromValue(object.gid, true); else if (typeof object.gid === "string") - message.gid = parseInt(object.gid, 10); + message.gid = $parseInt(object.gid, 10); else if (typeof object.gid === "number") message.gid = object.gid; else if (typeof object.gid === "object") @@ -91427,46 +118183,54 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCReportAbuse.toObject = function toObject(message, options) { + CMsgGCReportAbuse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.target_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.target_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.target_steam_id = options.longs === String ? "0" : 0; + object.target_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.abuse_type = 0; object.content_type = 0; object.description = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.gid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.gid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.gid = options.longs === String ? "0" : 0; + object.gid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.target_game_server_ip = 0; object.target_game_server_port = 0; } - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) - if (typeof message.target_steam_id === "number") - object.target_steam_id = options.longs === String ? String(message.target_steam_id) : message.target_steam_id; + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.target_steam_id = typeof message.target_steam_id === "number" ? $BigInt(message.target_steam_id) : $util.Long.fromBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.target_steam_id === "number") + object.target_steam_id = options.longs === $String ? $String(message.target_steam_id) : message.target_steam_id; else - object.target_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber() : message.target_steam_id; - if (message.abuse_type != null && message.hasOwnProperty("abuse_type")) + object.target_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === $Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber(true) : message.target_steam_id; + if (message.abuse_type != null && $Object.hasOwnProperty.call(message, "abuse_type")) object.abuse_type = message.abuse_type; - if (message.content_type != null && message.hasOwnProperty("content_type")) + if (message.content_type != null && $Object.hasOwnProperty.call(message, "content_type")) object.content_type = message.content_type; - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) object.description = message.description; - if (message.gid != null && message.hasOwnProperty("gid")) - if (typeof message.gid === "number") - object.gid = options.longs === String ? String(message.gid) : message.gid; + if (message.gid != null && $Object.hasOwnProperty.call(message, "gid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.gid = typeof message.gid === "number" ? $BigInt(message.gid) : $util.Long.fromBits(message.gid.low >>> 0, message.gid.high >>> 0, true).toBigInt(); + else if (typeof message.gid === "number") + object.gid = options.longs === $String ? $String(message.gid) : message.gid; else - object.gid = options.longs === String ? $util.Long.prototype.toString.call(message.gid) : options.longs === Number ? new $util.LongBits(message.gid.low >>> 0, message.gid.high >>> 0).toNumber(true) : message.gid; - if (message.target_game_server_ip != null && message.hasOwnProperty("target_game_server_ip")) + object.gid = options.longs === $String ? $util.Long.prototype.toString.call(message.gid) : options.longs === $Number ? new $util.LongBits(message.gid.low >>> 0, message.gid.high >>> 0).toNumber(true) : message.gid; + if (message.target_game_server_ip != null && $Object.hasOwnProperty.call(message, "target_game_server_ip")) object.target_game_server_ip = message.target_game_server_ip; - if (message.target_game_server_port != null && message.hasOwnProperty("target_game_server_port")) + if (message.target_game_server_port != null && $Object.hasOwnProperty.call(message, "target_game_server_port")) object.target_game_server_port = message.target_game_server_port; return object; }; @@ -91478,8 +118242,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCReportAbuse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCReportAbuse.prototype.toJSON = function() { + return CMsgGCReportAbuse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCReportAbuse + * @function getTypeUrl + * @memberof CMsgGCReportAbuse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCReportAbuse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCReportAbuse"; }; return CMsgGCReportAbuse; @@ -91489,27 +118267,40 @@ /** * Properties of a CMsgGCReportAbuseResponse. - * @exports ICMsgGCReportAbuseResponse - * @interface ICMsgGCReportAbuseResponse + * @typedef {Object} CMsgGCReportAbuseResponse.$Properties * @property {number|Long|null} [target_steam_id] CMsgGCReportAbuseResponse target_steam_id * @property {number|null} [result] CMsgGCReportAbuseResponse result * @property {string|null} [error_message] CMsgGCReportAbuseResponse error_message + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCReportAbuseResponse. + * @exports ICMsgGCReportAbuseResponse + * @interface ICMsgGCReportAbuseResponse + * @augments CMsgGCReportAbuseResponse.$Properties + * @deprecated Use CMsgGCReportAbuseResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCReportAbuseResponse. + * @typedef {CMsgGCReportAbuseResponse.$Properties} CMsgGCReportAbuseResponse.$Shape */ /** * Constructs a new CMsgGCReportAbuseResponse. * @exports CMsgGCReportAbuseResponse * @classdesc Represents a CMsgGCReportAbuseResponse. - * @implements ICMsgGCReportAbuseResponse * @constructor - * @param {ICMsgGCReportAbuseResponse=} [properties] Properties to set + * @param {CMsgGCReportAbuseResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCReportAbuseResponse(properties) { + var CMsgGCReportAbuseResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCReportAbuseResponse target_steam_id. @@ -91517,7 +118308,7 @@ * @memberof CMsgGCReportAbuseResponse * @instance */ - CMsgGCReportAbuseResponse.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCReportAbuseResponse.prototype.target_steam_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCReportAbuseResponse result. @@ -91540,10 +118331,14 @@ * @function create * @memberof CMsgGCReportAbuseResponse * @static - * @param {ICMsgGCReportAbuseResponse=} [properties] Properties to set + * @param {CMsgGCReportAbuseResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCReportAbuseResponse} CMsgGCReportAbuseResponse instance + * @type {{ + * (properties: CMsgGCReportAbuseResponse.$Shape): CMsgGCReportAbuseResponse & CMsgGCReportAbuseResponse.$Shape; + * (properties?: CMsgGCReportAbuseResponse.$Properties): CMsgGCReportAbuseResponse; + * }} */ - CMsgGCReportAbuseResponse.create = function create(properties) { + CMsgGCReportAbuseResponse.create = function(properties) { return new CMsgGCReportAbuseResponse(properties); }; @@ -91552,19 +118347,26 @@ * @function encode * @memberof CMsgGCReportAbuseResponse * @static - * @param {ICMsgGCReportAbuseResponse} message CMsgGCReportAbuseResponse message or plain object to encode + * @param {CMsgGCReportAbuseResponse.$Properties} message CMsgGCReportAbuseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCReportAbuseResponse.encode = function encode(message, writer) { + CMsgGCReportAbuseResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.target_steam_id != null && Object.hasOwnProperty.call(message, "target_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.target_steam_id); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.result); - if (message.error_message != null && Object.hasOwnProperty.call(message, "error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.error_message); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -91573,12 +118375,12 @@ * @function encodeDelimited * @memberof CMsgGCReportAbuseResponse * @static - * @param {ICMsgGCReportAbuseResponse} message CMsgGCReportAbuseResponse message or plain object to encode + * @param {CMsgGCReportAbuseResponse.$Properties} message CMsgGCReportAbuseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCReportAbuseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCReportAbuseResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -91588,31 +118390,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCReportAbuseResponse} CMsgGCReportAbuseResponse + * @returns {CMsgGCReportAbuseResponse & CMsgGCReportAbuseResponse.$Shape} CMsgGCReportAbuseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCReportAbuseResponse.decode = function decode(reader, length) { + CMsgGCReportAbuseResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCReportAbuseResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCReportAbuseResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.target_steam_id = reader.fixed64(); - break; - case 2: - message.result = reader.uint32(); - break; - case 3: - message.error_message = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.target_steam_id = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.error_message = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -91622,11 +118447,11 @@ * @memberof CMsgGCReportAbuseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCReportAbuseResponse} CMsgGCReportAbuseResponse + * @returns {CMsgGCReportAbuseResponse & CMsgGCReportAbuseResponse.$Shape} CMsgGCReportAbuseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCReportAbuseResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCReportAbuseResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -91640,16 +118465,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCReportAbuseResponse.verify = function verify(message) { + CMsgGCReportAbuseResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) if (!$util.isInteger(message.target_steam_id) && !(message.target_steam_id && $util.isInteger(message.target_steam_id.low) && $util.isInteger(message.target_steam_id.high))) return "target_steam_id: integer|Long expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) if (!$util.isString(message.error_message)) return "error_message: string expected"; return null; @@ -91663,23 +118492,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCReportAbuseResponse} CMsgGCReportAbuseResponse */ - CMsgGCReportAbuseResponse.fromObject = function fromObject(object) { + CMsgGCReportAbuseResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCReportAbuseResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCReportAbuseResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCReportAbuseResponse(); if (object.target_steam_id != null) if ($util.Long) - (message.target_steam_id = $util.Long.fromValue(object.target_steam_id)).unsigned = false; + message.target_steam_id = $util.Long.fromValue(object.target_steam_id, true); else if (typeof object.target_steam_id === "string") - message.target_steam_id = parseInt(object.target_steam_id, 10); + message.target_steam_id = $parseInt(object.target_steam_id, 10); else if (typeof object.target_steam_id === "number") message.target_steam_id = object.target_steam_id; else if (typeof object.target_steam_id === "object") - message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(); + message.target_steam_id = new $util.LongBits(object.target_steam_id.low >>> 0, object.target_steam_id.high >>> 0).toNumber(true); if (object.result != null) message.result = object.result >>> 0; if (object.error_message != null) - message.error_message = String(object.error_message); + message.error_message = $String(object.error_message); return message; }; @@ -91692,27 +118527,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCReportAbuseResponse.toObject = function toObject(message, options) { + CMsgGCReportAbuseResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.target_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.target_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.target_steam_id = options.longs === String ? "0" : 0; + object.target_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.result = 0; object.error_message = ""; } - if (message.target_steam_id != null && message.hasOwnProperty("target_steam_id")) - if (typeof message.target_steam_id === "number") - object.target_steam_id = options.longs === String ? String(message.target_steam_id) : message.target_steam_id; + if (message.target_steam_id != null && $Object.hasOwnProperty.call(message, "target_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.target_steam_id = typeof message.target_steam_id === "number" ? $BigInt(message.target_steam_id) : $util.Long.fromBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.target_steam_id === "number") + object.target_steam_id = options.longs === $String ? $String(message.target_steam_id) : message.target_steam_id; else - object.target_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber() : message.target_steam_id; - if (message.result != null && message.hasOwnProperty("result")) + object.target_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.target_steam_id) : options.longs === $Number ? new $util.LongBits(message.target_steam_id.low >>> 0, message.target_steam_id.high >>> 0).toNumber(true) : message.target_steam_id; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; - if (message.error_message != null && message.hasOwnProperty("error_message")) + if (message.error_message != null && $Object.hasOwnProperty.call(message, "error_message")) object.error_message = message.error_message; return object; }; @@ -91724,8 +118565,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCReportAbuseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCReportAbuseResponse.prototype.toJSON = function() { + return CMsgGCReportAbuseResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCReportAbuseResponse + * @function getTypeUrl + * @memberof CMsgGCReportAbuseResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCReportAbuseResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCReportAbuseResponse"; }; return CMsgGCReportAbuseResponse; @@ -91735,27 +118590,40 @@ /** * Properties of a CMsgGCNameItemNotification. - * @exports ICMsgGCNameItemNotification - * @interface ICMsgGCNameItemNotification + * @typedef {Object} CMsgGCNameItemNotification.$Properties * @property {number|Long|null} [player_steamid] CMsgGCNameItemNotification player_steamid * @property {number|null} [item_def_index] CMsgGCNameItemNotification item_def_index * @property {string|null} [item_name_custom] CMsgGCNameItemNotification item_name_custom + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCNameItemNotification. + * @exports ICMsgGCNameItemNotification + * @interface ICMsgGCNameItemNotification + * @augments CMsgGCNameItemNotification.$Properties + * @deprecated Use CMsgGCNameItemNotification.$Properties instead. + */ + + /** + * Shape of a CMsgGCNameItemNotification. + * @typedef {CMsgGCNameItemNotification.$Properties} CMsgGCNameItemNotification.$Shape */ /** * Constructs a new CMsgGCNameItemNotification. * @exports CMsgGCNameItemNotification * @classdesc Represents a CMsgGCNameItemNotification. - * @implements ICMsgGCNameItemNotification * @constructor - * @param {ICMsgGCNameItemNotification=} [properties] Properties to set + * @param {CMsgGCNameItemNotification.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCNameItemNotification(properties) { + var CMsgGCNameItemNotification = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCNameItemNotification player_steamid. @@ -91763,7 +118631,7 @@ * @memberof CMsgGCNameItemNotification * @instance */ - CMsgGCNameItemNotification.prototype.player_steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCNameItemNotification.prototype.player_steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * CMsgGCNameItemNotification item_def_index. @@ -91786,10 +118654,14 @@ * @function create * @memberof CMsgGCNameItemNotification * @static - * @param {ICMsgGCNameItemNotification=} [properties] Properties to set + * @param {CMsgGCNameItemNotification.$Properties=} [properties] Properties to set * @returns {CMsgGCNameItemNotification} CMsgGCNameItemNotification instance + * @type {{ + * (properties: CMsgGCNameItemNotification.$Shape): CMsgGCNameItemNotification & CMsgGCNameItemNotification.$Shape; + * (properties?: CMsgGCNameItemNotification.$Properties): CMsgGCNameItemNotification; + * }} */ - CMsgGCNameItemNotification.create = function create(properties) { + CMsgGCNameItemNotification.create = function(properties) { return new CMsgGCNameItemNotification(properties); }; @@ -91798,19 +118670,26 @@ * @function encode * @memberof CMsgGCNameItemNotification * @static - * @param {ICMsgGCNameItemNotification} message CMsgGCNameItemNotification message or plain object to encode + * @param {CMsgGCNameItemNotification.$Properties} message CMsgGCNameItemNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNameItemNotification.encode = function encode(message, writer) { + CMsgGCNameItemNotification.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.player_steamid != null && Object.hasOwnProperty.call(message, "player_steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.player_steamid); - if (message.item_def_index != null && Object.hasOwnProperty.call(message, "item_def_index")) + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.item_def_index); - if (message.item_name_custom != null && Object.hasOwnProperty.call(message, "item_name_custom")) + if (message.item_name_custom != null && $Object.hasOwnProperty.call(message, "item_name_custom")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.item_name_custom); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -91819,12 +118698,12 @@ * @function encodeDelimited * @memberof CMsgGCNameItemNotification * @static - * @param {ICMsgGCNameItemNotification} message CMsgGCNameItemNotification message or plain object to encode + * @param {CMsgGCNameItemNotification.$Properties} message CMsgGCNameItemNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCNameItemNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCNameItemNotification.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -91834,31 +118713,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCNameItemNotification} CMsgGCNameItemNotification + * @returns {CMsgGCNameItemNotification & CMsgGCNameItemNotification.$Shape} CMsgGCNameItemNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNameItemNotification.decode = function decode(reader, length) { + CMsgGCNameItemNotification.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCNameItemNotification(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCNameItemNotification(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.player_steamid = reader.fixed64(); - break; - case 2: - message.item_def_index = reader.uint32(); - break; - case 3: - message.item_name_custom = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.player_steamid = reader.fixed64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_def_index = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.item_name_custom = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -91868,11 +118770,11 @@ * @memberof CMsgGCNameItemNotification * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCNameItemNotification} CMsgGCNameItemNotification + * @returns {CMsgGCNameItemNotification & CMsgGCNameItemNotification.$Shape} CMsgGCNameItemNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCNameItemNotification.decodeDelimited = function decodeDelimited(reader) { + CMsgGCNameItemNotification.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -91886,16 +118788,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCNameItemNotification.verify = function verify(message) { + CMsgGCNameItemNotification.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.player_steamid != null && message.hasOwnProperty("player_steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) if (!$util.isInteger(message.player_steamid) && !(message.player_steamid && $util.isInteger(message.player_steamid.low) && $util.isInteger(message.player_steamid.high))) return "player_steamid: integer|Long expected"; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) if (!$util.isInteger(message.item_def_index)) return "item_def_index: integer expected"; - if (message.item_name_custom != null && message.hasOwnProperty("item_name_custom")) + if (message.item_name_custom != null && $Object.hasOwnProperty.call(message, "item_name_custom")) if (!$util.isString(message.item_name_custom)) return "item_name_custom: string expected"; return null; @@ -91909,23 +118815,29 @@ * @param {Object.} object Plain object * @returns {CMsgGCNameItemNotification} CMsgGCNameItemNotification */ - CMsgGCNameItemNotification.fromObject = function fromObject(object) { + CMsgGCNameItemNotification.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCNameItemNotification) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCNameItemNotification: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCNameItemNotification(); if (object.player_steamid != null) if ($util.Long) - (message.player_steamid = $util.Long.fromValue(object.player_steamid)).unsigned = false; + message.player_steamid = $util.Long.fromValue(object.player_steamid, true); else if (typeof object.player_steamid === "string") - message.player_steamid = parseInt(object.player_steamid, 10); + message.player_steamid = $parseInt(object.player_steamid, 10); else if (typeof object.player_steamid === "number") message.player_steamid = object.player_steamid; else if (typeof object.player_steamid === "object") - message.player_steamid = new $util.LongBits(object.player_steamid.low >>> 0, object.player_steamid.high >>> 0).toNumber(); + message.player_steamid = new $util.LongBits(object.player_steamid.low >>> 0, object.player_steamid.high >>> 0).toNumber(true); if (object.item_def_index != null) message.item_def_index = object.item_def_index >>> 0; if (object.item_name_custom != null) - message.item_name_custom = String(object.item_name_custom); + message.item_name_custom = $String(object.item_name_custom); return message; }; @@ -91938,27 +118850,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCNameItemNotification.toObject = function toObject(message, options) { + CMsgGCNameItemNotification.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.player_steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.player_steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.player_steamid = options.longs === String ? "0" : 0; + object.player_steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.item_def_index = 0; object.item_name_custom = ""; } - if (message.player_steamid != null && message.hasOwnProperty("player_steamid")) - if (typeof message.player_steamid === "number") - object.player_steamid = options.longs === String ? String(message.player_steamid) : message.player_steamid; + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.player_steamid = typeof message.player_steamid === "number" ? $BigInt(message.player_steamid) : $util.Long.fromBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0, true).toBigInt(); + else if (typeof message.player_steamid === "number") + object.player_steamid = options.longs === $String ? $String(message.player_steamid) : message.player_steamid; else - object.player_steamid = options.longs === String ? $util.Long.prototype.toString.call(message.player_steamid) : options.longs === Number ? new $util.LongBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0).toNumber() : message.player_steamid; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + object.player_steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.player_steamid) : options.longs === $Number ? new $util.LongBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0).toNumber(true) : message.player_steamid; + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) object.item_def_index = message.item_def_index; - if (message.item_name_custom != null && message.hasOwnProperty("item_name_custom")) + if (message.item_name_custom != null && $Object.hasOwnProperty.call(message, "item_name_custom")) object.item_name_custom = message.item_name_custom; return object; }; @@ -91970,8 +118888,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCNameItemNotification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCNameItemNotification.prototype.toJSON = function() { + return CMsgGCNameItemNotification.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCNameItemNotification + * @function getTypeUrl + * @memberof CMsgGCNameItemNotification + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCNameItemNotification.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCNameItemNotification"; }; return CMsgGCNameItemNotification; @@ -91981,30 +118913,43 @@ /** * Properties of a CMsgGCClientDisplayNotification. - * @exports ICMsgGCClientDisplayNotification - * @interface ICMsgGCClientDisplayNotification + * @typedef {Object} CMsgGCClientDisplayNotification.$Properties * @property {string|null} [notification_title_localization_key] CMsgGCClientDisplayNotification notification_title_localization_key * @property {string|null} [notification_body_localization_key] CMsgGCClientDisplayNotification notification_body_localization_key * @property {Array.|null} [body_substring_keys] CMsgGCClientDisplayNotification body_substring_keys * @property {Array.|null} [body_substring_values] CMsgGCClientDisplayNotification body_substring_values + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCClientDisplayNotification. + * @exports ICMsgGCClientDisplayNotification + * @interface ICMsgGCClientDisplayNotification + * @augments CMsgGCClientDisplayNotification.$Properties + * @deprecated Use CMsgGCClientDisplayNotification.$Properties instead. + */ + + /** + * Shape of a CMsgGCClientDisplayNotification. + * @typedef {CMsgGCClientDisplayNotification.$Properties} CMsgGCClientDisplayNotification.$Shape */ /** * Constructs a new CMsgGCClientDisplayNotification. * @exports CMsgGCClientDisplayNotification * @classdesc Represents a CMsgGCClientDisplayNotification. - * @implements ICMsgGCClientDisplayNotification * @constructor - * @param {ICMsgGCClientDisplayNotification=} [properties] Properties to set + * @param {CMsgGCClientDisplayNotification.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCClientDisplayNotification(properties) { + var CMsgGCClientDisplayNotification = function (properties) { this.body_substring_keys = []; this.body_substring_values = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCClientDisplayNotification notification_title_localization_key. @@ -92043,10 +118988,14 @@ * @function create * @memberof CMsgGCClientDisplayNotification * @static - * @param {ICMsgGCClientDisplayNotification=} [properties] Properties to set + * @param {CMsgGCClientDisplayNotification.$Properties=} [properties] Properties to set * @returns {CMsgGCClientDisplayNotification} CMsgGCClientDisplayNotification instance + * @type {{ + * (properties: CMsgGCClientDisplayNotification.$Shape): CMsgGCClientDisplayNotification & CMsgGCClientDisplayNotification.$Shape; + * (properties?: CMsgGCClientDisplayNotification.$Properties): CMsgGCClientDisplayNotification; + * }} */ - CMsgGCClientDisplayNotification.create = function create(properties) { + CMsgGCClientDisplayNotification.create = function(properties) { return new CMsgGCClientDisplayNotification(properties); }; @@ -92055,16 +119004,20 @@ * @function encode * @memberof CMsgGCClientDisplayNotification * @static - * @param {ICMsgGCClientDisplayNotification} message CMsgGCClientDisplayNotification message or plain object to encode + * @param {CMsgGCClientDisplayNotification.$Properties} message CMsgGCClientDisplayNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientDisplayNotification.encode = function encode(message, writer) { + CMsgGCClientDisplayNotification.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.notification_title_localization_key != null && Object.hasOwnProperty.call(message, "notification_title_localization_key")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.notification_title_localization_key != null && $Object.hasOwnProperty.call(message, "notification_title_localization_key")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.notification_title_localization_key); - if (message.notification_body_localization_key != null && Object.hasOwnProperty.call(message, "notification_body_localization_key")) + if (message.notification_body_localization_key != null && $Object.hasOwnProperty.call(message, "notification_body_localization_key")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.notification_body_localization_key); if (message.body_substring_keys != null && message.body_substring_keys.length) for (var i = 0; i < message.body_substring_keys.length; ++i) @@ -92072,6 +119025,9 @@ if (message.body_substring_values != null && message.body_substring_values.length) for (var i = 0; i < message.body_substring_values.length; ++i) writer.uint32(/* id 4, wireType 2 =*/34).string(message.body_substring_values[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -92080,12 +119036,12 @@ * @function encodeDelimited * @memberof CMsgGCClientDisplayNotification * @static - * @param {ICMsgGCClientDisplayNotification} message CMsgGCClientDisplayNotification message or plain object to encode + * @param {CMsgGCClientDisplayNotification.$Properties} message CMsgGCClientDisplayNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientDisplayNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCClientDisplayNotification.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -92095,38 +119051,64 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCClientDisplayNotification} CMsgGCClientDisplayNotification + * @returns {CMsgGCClientDisplayNotification & CMsgGCClientDisplayNotification.$Shape} CMsgGCClientDisplayNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientDisplayNotification.decode = function decode(reader, length) { + CMsgGCClientDisplayNotification.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCClientDisplayNotification(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCClientDisplayNotification(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.notification_title_localization_key = reader.string(); - break; - case 2: - message.notification_body_localization_key = reader.string(); - break; - case 3: - if (!(message.body_substring_keys && message.body_substring_keys.length)) - message.body_substring_keys = []; - message.body_substring_keys.push(reader.string()); - break; - case 4: - if (!(message.body_substring_values && message.body_substring_values.length)) - message.body_substring_values = []; - message.body_substring_values.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.notification_title_localization_key = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.notification_body_localization_key = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.body_substring_keys && message.body_substring_keys.length)) + message.body_substring_keys = []; + message.body_substring_keys.push(reader.string()); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.body_substring_values && message.body_substring_values.length)) + message.body_substring_values = []; + message.body_substring_values.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -92136,11 +119118,11 @@ * @memberof CMsgGCClientDisplayNotification * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCClientDisplayNotification} CMsgGCClientDisplayNotification + * @returns {CMsgGCClientDisplayNotification & CMsgGCClientDisplayNotification.$Shape} CMsgGCClientDisplayNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientDisplayNotification.decodeDelimited = function decodeDelimited(reader) { + CMsgGCClientDisplayNotification.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -92154,24 +119136,28 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCClientDisplayNotification.verify = function verify(message) { + CMsgGCClientDisplayNotification.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.notification_title_localization_key != null && message.hasOwnProperty("notification_title_localization_key")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.notification_title_localization_key != null && $Object.hasOwnProperty.call(message, "notification_title_localization_key")) if (!$util.isString(message.notification_title_localization_key)) return "notification_title_localization_key: string expected"; - if (message.notification_body_localization_key != null && message.hasOwnProperty("notification_body_localization_key")) + if (message.notification_body_localization_key != null && $Object.hasOwnProperty.call(message, "notification_body_localization_key")) if (!$util.isString(message.notification_body_localization_key)) return "notification_body_localization_key: string expected"; - if (message.body_substring_keys != null && message.hasOwnProperty("body_substring_keys")) { - if (!Array.isArray(message.body_substring_keys)) + if (message.body_substring_keys != null && $Object.hasOwnProperty.call(message, "body_substring_keys")) { + if (!$Array.isArray(message.body_substring_keys)) return "body_substring_keys: array expected"; for (var i = 0; i < message.body_substring_keys.length; ++i) if (!$util.isString(message.body_substring_keys[i])) return "body_substring_keys: string[] expected"; } - if (message.body_substring_values != null && message.hasOwnProperty("body_substring_values")) { - if (!Array.isArray(message.body_substring_values)) + if (message.body_substring_values != null && $Object.hasOwnProperty.call(message, "body_substring_values")) { + if (!$Array.isArray(message.body_substring_values)) return "body_substring_values: array expected"; for (var i = 0; i < message.body_substring_values.length; ++i) if (!$util.isString(message.body_substring_values[i])) @@ -92188,27 +119174,33 @@ * @param {Object.} object Plain object * @returns {CMsgGCClientDisplayNotification} CMsgGCClientDisplayNotification */ - CMsgGCClientDisplayNotification.fromObject = function fromObject(object) { + CMsgGCClientDisplayNotification.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCClientDisplayNotification) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCClientDisplayNotification: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCClientDisplayNotification(); if (object.notification_title_localization_key != null) - message.notification_title_localization_key = String(object.notification_title_localization_key); + message.notification_title_localization_key = $String(object.notification_title_localization_key); if (object.notification_body_localization_key != null) - message.notification_body_localization_key = String(object.notification_body_localization_key); + message.notification_body_localization_key = $String(object.notification_body_localization_key); if (object.body_substring_keys) { - if (!Array.isArray(object.body_substring_keys)) - throw TypeError(".CMsgGCClientDisplayNotification.body_substring_keys: array expected"); - message.body_substring_keys = []; + if (!$Array.isArray(object.body_substring_keys)) + throw $TypeError(".CMsgGCClientDisplayNotification.body_substring_keys: array expected"); + message.body_substring_keys = $Array(object.body_substring_keys.length); for (var i = 0; i < object.body_substring_keys.length; ++i) - message.body_substring_keys[i] = String(object.body_substring_keys[i]); + message.body_substring_keys[i] = $String(object.body_substring_keys[i]); } if (object.body_substring_values) { - if (!Array.isArray(object.body_substring_values)) - throw TypeError(".CMsgGCClientDisplayNotification.body_substring_values: array expected"); - message.body_substring_values = []; + if (!$Array.isArray(object.body_substring_values)) + throw $TypeError(".CMsgGCClientDisplayNotification.body_substring_values: array expected"); + message.body_substring_values = $Array(object.body_substring_values.length); for (var i = 0; i < object.body_substring_values.length; ++i) - message.body_substring_values[i] = String(object.body_substring_values[i]); + message.body_substring_values[i] = $String(object.body_substring_values[i]); } return message; }; @@ -92222,9 +119214,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCClientDisplayNotification.toObject = function toObject(message, options) { + CMsgGCClientDisplayNotification.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.body_substring_keys = []; @@ -92234,17 +119230,17 @@ object.notification_title_localization_key = ""; object.notification_body_localization_key = ""; } - if (message.notification_title_localization_key != null && message.hasOwnProperty("notification_title_localization_key")) + if (message.notification_title_localization_key != null && $Object.hasOwnProperty.call(message, "notification_title_localization_key")) object.notification_title_localization_key = message.notification_title_localization_key; - if (message.notification_body_localization_key != null && message.hasOwnProperty("notification_body_localization_key")) + if (message.notification_body_localization_key != null && $Object.hasOwnProperty.call(message, "notification_body_localization_key")) object.notification_body_localization_key = message.notification_body_localization_key; if (message.body_substring_keys && message.body_substring_keys.length) { - object.body_substring_keys = []; + object.body_substring_keys = $Array(message.body_substring_keys.length); for (var j = 0; j < message.body_substring_keys.length; ++j) object.body_substring_keys[j] = message.body_substring_keys[j]; } if (message.body_substring_values && message.body_substring_values.length) { - object.body_substring_values = []; + object.body_substring_values = $Array(message.body_substring_values.length); for (var j = 0; j < message.body_substring_values.length; ++j) object.body_substring_values[j] = message.body_substring_values[j]; } @@ -92258,8 +119254,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCClientDisplayNotification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCClientDisplayNotification.prototype.toJSON = function() { + return CMsgGCClientDisplayNotification.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCClientDisplayNotification + * @function getTypeUrl + * @memberof CMsgGCClientDisplayNotification + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCClientDisplayNotification.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCClientDisplayNotification"; }; return CMsgGCClientDisplayNotification; @@ -92267,27 +119277,40 @@ $root.CMsgGCShowItemsPickedUp = (function() { + /** + * Properties of a CMsgGCShowItemsPickedUp. + * @typedef {Object} CMsgGCShowItemsPickedUp.$Properties + * @property {number|Long|null} [player_steamid] CMsgGCShowItemsPickedUp player_steamid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCShowItemsPickedUp. * @exports ICMsgGCShowItemsPickedUp * @interface ICMsgGCShowItemsPickedUp - * @property {number|Long|null} [player_steamid] CMsgGCShowItemsPickedUp player_steamid + * @augments CMsgGCShowItemsPickedUp.$Properties + * @deprecated Use CMsgGCShowItemsPickedUp.$Properties instead. + */ + + /** + * Shape of a CMsgGCShowItemsPickedUp. + * @typedef {CMsgGCShowItemsPickedUp.$Properties} CMsgGCShowItemsPickedUp.$Shape */ /** * Constructs a new CMsgGCShowItemsPickedUp. * @exports CMsgGCShowItemsPickedUp * @classdesc Represents a CMsgGCShowItemsPickedUp. - * @implements ICMsgGCShowItemsPickedUp * @constructor - * @param {ICMsgGCShowItemsPickedUp=} [properties] Properties to set + * @param {CMsgGCShowItemsPickedUp.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCShowItemsPickedUp(properties) { + var CMsgGCShowItemsPickedUp = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCShowItemsPickedUp player_steamid. @@ -92295,17 +119318,21 @@ * @memberof CMsgGCShowItemsPickedUp * @instance */ - CMsgGCShowItemsPickedUp.prototype.player_steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CMsgGCShowItemsPickedUp.prototype.player_steamid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new CMsgGCShowItemsPickedUp instance using the specified properties. * @function create * @memberof CMsgGCShowItemsPickedUp * @static - * @param {ICMsgGCShowItemsPickedUp=} [properties] Properties to set + * @param {CMsgGCShowItemsPickedUp.$Properties=} [properties] Properties to set * @returns {CMsgGCShowItemsPickedUp} CMsgGCShowItemsPickedUp instance + * @type {{ + * (properties: CMsgGCShowItemsPickedUp.$Shape): CMsgGCShowItemsPickedUp & CMsgGCShowItemsPickedUp.$Shape; + * (properties?: CMsgGCShowItemsPickedUp.$Properties): CMsgGCShowItemsPickedUp; + * }} */ - CMsgGCShowItemsPickedUp.create = function create(properties) { + CMsgGCShowItemsPickedUp.create = function(properties) { return new CMsgGCShowItemsPickedUp(properties); }; @@ -92314,15 +119341,22 @@ * @function encode * @memberof CMsgGCShowItemsPickedUp * @static - * @param {ICMsgGCShowItemsPickedUp} message CMsgGCShowItemsPickedUp message or plain object to encode + * @param {CMsgGCShowItemsPickedUp.$Properties} message CMsgGCShowItemsPickedUp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCShowItemsPickedUp.encode = function encode(message, writer) { + CMsgGCShowItemsPickedUp.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.player_steamid != null && Object.hasOwnProperty.call(message, "player_steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.player_steamid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -92331,12 +119365,12 @@ * @function encodeDelimited * @memberof CMsgGCShowItemsPickedUp * @static - * @param {ICMsgGCShowItemsPickedUp} message CMsgGCShowItemsPickedUp message or plain object to encode + * @param {CMsgGCShowItemsPickedUp.$Properties} message CMsgGCShowItemsPickedUp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCShowItemsPickedUp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCShowItemsPickedUp.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -92346,25 +119380,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCShowItemsPickedUp} CMsgGCShowItemsPickedUp + * @returns {CMsgGCShowItemsPickedUp & CMsgGCShowItemsPickedUp.$Shape} CMsgGCShowItemsPickedUp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCShowItemsPickedUp.decode = function decode(reader, length) { + CMsgGCShowItemsPickedUp.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCShowItemsPickedUp(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCShowItemsPickedUp(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.player_steamid = reader.fixed64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 1) + break; + message.player_steamid = reader.fixed64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -92374,11 +119425,11 @@ * @memberof CMsgGCShowItemsPickedUp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCShowItemsPickedUp} CMsgGCShowItemsPickedUp + * @returns {CMsgGCShowItemsPickedUp & CMsgGCShowItemsPickedUp.$Shape} CMsgGCShowItemsPickedUp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCShowItemsPickedUp.decodeDelimited = function decodeDelimited(reader) { + CMsgGCShowItemsPickedUp.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -92392,10 +119443,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCShowItemsPickedUp.verify = function verify(message) { + CMsgGCShowItemsPickedUp.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.player_steamid != null && message.hasOwnProperty("player_steamid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) if (!$util.isInteger(message.player_steamid) && !(message.player_steamid && $util.isInteger(message.player_steamid.low) && $util.isInteger(message.player_steamid.high))) return "player_steamid: integer|Long expected"; return null; @@ -92409,19 +119464,25 @@ * @param {Object.} object Plain object * @returns {CMsgGCShowItemsPickedUp} CMsgGCShowItemsPickedUp */ - CMsgGCShowItemsPickedUp.fromObject = function fromObject(object) { + CMsgGCShowItemsPickedUp.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCShowItemsPickedUp) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCShowItemsPickedUp: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCShowItemsPickedUp(); if (object.player_steamid != null) if ($util.Long) - (message.player_steamid = $util.Long.fromValue(object.player_steamid)).unsigned = false; + message.player_steamid = $util.Long.fromValue(object.player_steamid, true); else if (typeof object.player_steamid === "string") - message.player_steamid = parseInt(object.player_steamid, 10); + message.player_steamid = $parseInt(object.player_steamid, 10); else if (typeof object.player_steamid === "number") message.player_steamid = object.player_steamid; else if (typeof object.player_steamid === "object") - message.player_steamid = new $util.LongBits(object.player_steamid.low >>> 0, object.player_steamid.high >>> 0).toNumber(); + message.player_steamid = new $util.LongBits(object.player_steamid.low >>> 0, object.player_steamid.high >>> 0).toNumber(true); return message; }; @@ -92434,21 +119495,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCShowItemsPickedUp.toObject = function toObject(message, options) { + CMsgGCShowItemsPickedUp.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.player_steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.player_steamid = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.player_steamid = options.longs === String ? "0" : 0; - if (message.player_steamid != null && message.hasOwnProperty("player_steamid")) - if (typeof message.player_steamid === "number") - object.player_steamid = options.longs === String ? String(message.player_steamid) : message.player_steamid; + object.player_steamid = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.player_steamid != null && $Object.hasOwnProperty.call(message, "player_steamid")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.player_steamid = typeof message.player_steamid === "number" ? $BigInt(message.player_steamid) : $util.Long.fromBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0, true).toBigInt(); + else if (typeof message.player_steamid === "number") + object.player_steamid = options.longs === $String ? $String(message.player_steamid) : message.player_steamid; else - object.player_steamid = options.longs === String ? $util.Long.prototype.toString.call(message.player_steamid) : options.longs === Number ? new $util.LongBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0).toNumber() : message.player_steamid; + object.player_steamid = options.longs === $String ? $util.Long.prototype.toString.call(message.player_steamid) : options.longs === $Number ? new $util.LongBits(message.player_steamid.low >>> 0, message.player_steamid.high >>> 0).toNumber(true) : message.player_steamid; return object; }; @@ -92459,8 +119526,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCShowItemsPickedUp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCShowItemsPickedUp.prototype.toJSON = function() { + return CMsgGCShowItemsPickedUp.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCShowItemsPickedUp + * @function getTypeUrl + * @memberof CMsgGCShowItemsPickedUp + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCShowItemsPickedUp.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCShowItemsPickedUp"; }; return CMsgGCShowItemsPickedUp; @@ -92470,27 +119551,40 @@ /** * Properties of a CMsgUpdatePeriodicEvent. - * @exports ICMsgUpdatePeriodicEvent - * @interface ICMsgUpdatePeriodicEvent + * @typedef {Object} CMsgUpdatePeriodicEvent.$Properties * @property {number|null} [account_id] CMsgUpdatePeriodicEvent account_id * @property {number|null} [event_type] CMsgUpdatePeriodicEvent event_type * @property {number|null} [amount] CMsgUpdatePeriodicEvent amount + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgUpdatePeriodicEvent. + * @exports ICMsgUpdatePeriodicEvent + * @interface ICMsgUpdatePeriodicEvent + * @augments CMsgUpdatePeriodicEvent.$Properties + * @deprecated Use CMsgUpdatePeriodicEvent.$Properties instead. + */ + + /** + * Shape of a CMsgUpdatePeriodicEvent. + * @typedef {CMsgUpdatePeriodicEvent.$Properties} CMsgUpdatePeriodicEvent.$Shape */ /** * Constructs a new CMsgUpdatePeriodicEvent. * @exports CMsgUpdatePeriodicEvent * @classdesc Represents a CMsgUpdatePeriodicEvent. - * @implements ICMsgUpdatePeriodicEvent * @constructor - * @param {ICMsgUpdatePeriodicEvent=} [properties] Properties to set + * @param {CMsgUpdatePeriodicEvent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgUpdatePeriodicEvent(properties) { + var CMsgUpdatePeriodicEvent = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgUpdatePeriodicEvent account_id. @@ -92521,10 +119615,14 @@ * @function create * @memberof CMsgUpdatePeriodicEvent * @static - * @param {ICMsgUpdatePeriodicEvent=} [properties] Properties to set + * @param {CMsgUpdatePeriodicEvent.$Properties=} [properties] Properties to set * @returns {CMsgUpdatePeriodicEvent} CMsgUpdatePeriodicEvent instance + * @type {{ + * (properties: CMsgUpdatePeriodicEvent.$Shape): CMsgUpdatePeriodicEvent & CMsgUpdatePeriodicEvent.$Shape; + * (properties?: CMsgUpdatePeriodicEvent.$Properties): CMsgUpdatePeriodicEvent; + * }} */ - CMsgUpdatePeriodicEvent.create = function create(properties) { + CMsgUpdatePeriodicEvent.create = function(properties) { return new CMsgUpdatePeriodicEvent(properties); }; @@ -92533,19 +119631,26 @@ * @function encode * @memberof CMsgUpdatePeriodicEvent * @static - * @param {ICMsgUpdatePeriodicEvent} message CMsgUpdatePeriodicEvent message or plain object to encode + * @param {CMsgUpdatePeriodicEvent.$Properties} message CMsgUpdatePeriodicEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdatePeriodicEvent.encode = function encode(message, writer) { + CMsgUpdatePeriodicEvent.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.event_type != null && Object.hasOwnProperty.call(message, "event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.event_type); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + if (message.amount != null && $Object.hasOwnProperty.call(message, "amount")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.amount); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -92554,12 +119659,12 @@ * @function encodeDelimited * @memberof CMsgUpdatePeriodicEvent * @static - * @param {ICMsgUpdatePeriodicEvent} message CMsgUpdatePeriodicEvent message or plain object to encode + * @param {CMsgUpdatePeriodicEvent.$Properties} message CMsgUpdatePeriodicEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUpdatePeriodicEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgUpdatePeriodicEvent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -92569,31 +119674,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgUpdatePeriodicEvent} CMsgUpdatePeriodicEvent + * @returns {CMsgUpdatePeriodicEvent & CMsgUpdatePeriodicEvent.$Shape} CMsgUpdatePeriodicEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdatePeriodicEvent.decode = function decode(reader, length) { + CMsgUpdatePeriodicEvent.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgUpdatePeriodicEvent(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgUpdatePeriodicEvent(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.event_type = reader.uint32(); - break; - case 3: - message.amount = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.event_type = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.amount = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -92603,11 +119731,11 @@ * @memberof CMsgUpdatePeriodicEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgUpdatePeriodicEvent} CMsgUpdatePeriodicEvent + * @returns {CMsgUpdatePeriodicEvent & CMsgUpdatePeriodicEvent.$Shape} CMsgUpdatePeriodicEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUpdatePeriodicEvent.decodeDelimited = function decodeDelimited(reader) { + CMsgUpdatePeriodicEvent.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -92621,16 +119749,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgUpdatePeriodicEvent.verify = function verify(message) { + CMsgUpdatePeriodicEvent.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) if (!$util.isInteger(message.event_type)) return "event_type: integer expected"; - if (message.amount != null && message.hasOwnProperty("amount")) + if (message.amount != null && $Object.hasOwnProperty.call(message, "amount")) if (!$util.isInteger(message.amount)) return "amount: integer expected"; return null; @@ -92644,9 +119776,15 @@ * @param {Object.} object Plain object * @returns {CMsgUpdatePeriodicEvent} CMsgUpdatePeriodicEvent */ - CMsgUpdatePeriodicEvent.fromObject = function fromObject(object) { + CMsgUpdatePeriodicEvent.fromObject = function (object, _depth) { if (object instanceof $root.CMsgUpdatePeriodicEvent) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgUpdatePeriodicEvent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgUpdatePeriodicEvent(); if (object.account_id != null) message.account_id = object.account_id >>> 0; @@ -92666,20 +119804,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgUpdatePeriodicEvent.toObject = function toObject(message, options) { + CMsgUpdatePeriodicEvent.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; object.event_type = 0; object.amount = 0; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.event_type != null && message.hasOwnProperty("event_type")) + if (message.event_type != null && $Object.hasOwnProperty.call(message, "event_type")) object.event_type = message.event_type; - if (message.amount != null && message.hasOwnProperty("amount")) + if (message.amount != null && $Object.hasOwnProperty.call(message, "amount")) object.amount = message.amount; return object; }; @@ -92691,8 +119833,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgUpdatePeriodicEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgUpdatePeriodicEvent.prototype.toJSON = function() { + return CMsgUpdatePeriodicEvent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgUpdatePeriodicEvent + * @function getTypeUrl + * @memberof CMsgUpdatePeriodicEvent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgUpdatePeriodicEvent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgUpdatePeriodicEvent"; }; return CMsgUpdatePeriodicEvent; @@ -92702,28 +119858,41 @@ /** * Properties of a CMsgGCIncrementKillCountResponse. - * @exports ICMsgGCIncrementKillCountResponse - * @interface ICMsgGCIncrementKillCountResponse + * @typedef {Object} CMsgGCIncrementKillCountResponse.$Properties * @property {number|null} [killer_account_id] CMsgGCIncrementKillCountResponse killer_account_id * @property {number|null} [num_kills] CMsgGCIncrementKillCountResponse num_kills * @property {number|null} [item_def] CMsgGCIncrementKillCountResponse item_def * @property {number|null} [level_type] CMsgGCIncrementKillCountResponse level_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCIncrementKillCountResponse. + * @exports ICMsgGCIncrementKillCountResponse + * @interface ICMsgGCIncrementKillCountResponse + * @augments CMsgGCIncrementKillCountResponse.$Properties + * @deprecated Use CMsgGCIncrementKillCountResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCIncrementKillCountResponse. + * @typedef {CMsgGCIncrementKillCountResponse.$Properties} CMsgGCIncrementKillCountResponse.$Shape */ /** * Constructs a new CMsgGCIncrementKillCountResponse. * @exports CMsgGCIncrementKillCountResponse * @classdesc Represents a CMsgGCIncrementKillCountResponse. - * @implements ICMsgGCIncrementKillCountResponse * @constructor - * @param {ICMsgGCIncrementKillCountResponse=} [properties] Properties to set + * @param {CMsgGCIncrementKillCountResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCIncrementKillCountResponse(properties) { + var CMsgGCIncrementKillCountResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCIncrementKillCountResponse killer_account_id. @@ -92762,10 +119931,14 @@ * @function create * @memberof CMsgGCIncrementKillCountResponse * @static - * @param {ICMsgGCIncrementKillCountResponse=} [properties] Properties to set + * @param {CMsgGCIncrementKillCountResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCIncrementKillCountResponse} CMsgGCIncrementKillCountResponse instance + * @type {{ + * (properties: CMsgGCIncrementKillCountResponse.$Shape): CMsgGCIncrementKillCountResponse & CMsgGCIncrementKillCountResponse.$Shape; + * (properties?: CMsgGCIncrementKillCountResponse.$Properties): CMsgGCIncrementKillCountResponse; + * }} */ - CMsgGCIncrementKillCountResponse.create = function create(properties) { + CMsgGCIncrementKillCountResponse.create = function(properties) { return new CMsgGCIncrementKillCountResponse(properties); }; @@ -92774,21 +119947,28 @@ * @function encode * @memberof CMsgGCIncrementKillCountResponse * @static - * @param {ICMsgGCIncrementKillCountResponse} message CMsgGCIncrementKillCountResponse message or plain object to encode + * @param {CMsgGCIncrementKillCountResponse.$Properties} message CMsgGCIncrementKillCountResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCIncrementKillCountResponse.encode = function encode(message, writer) { + CMsgGCIncrementKillCountResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.killer_account_id != null && Object.hasOwnProperty.call(message, "killer_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.killer_account_id != null && $Object.hasOwnProperty.call(message, "killer_account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.killer_account_id); - if (message.num_kills != null && Object.hasOwnProperty.call(message, "num_kills")) + if (message.num_kills != null && $Object.hasOwnProperty.call(message, "num_kills")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.num_kills); - if (message.item_def != null && Object.hasOwnProperty.call(message, "item_def")) + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.item_def); - if (message.level_type != null && Object.hasOwnProperty.call(message, "level_type")) + if (message.level_type != null && $Object.hasOwnProperty.call(message, "level_type")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.level_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -92797,12 +119977,12 @@ * @function encodeDelimited * @memberof CMsgGCIncrementKillCountResponse * @static - * @param {ICMsgGCIncrementKillCountResponse} message CMsgGCIncrementKillCountResponse message or plain object to encode + * @param {CMsgGCIncrementKillCountResponse.$Properties} message CMsgGCIncrementKillCountResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCIncrementKillCountResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCIncrementKillCountResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -92812,34 +119992,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCIncrementKillCountResponse} CMsgGCIncrementKillCountResponse + * @returns {CMsgGCIncrementKillCountResponse & CMsgGCIncrementKillCountResponse.$Shape} CMsgGCIncrementKillCountResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCIncrementKillCountResponse.decode = function decode(reader, length) { + CMsgGCIncrementKillCountResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCIncrementKillCountResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCIncrementKillCountResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.killer_account_id = reader.uint32(); - break; - case 2: - message.num_kills = reader.uint32(); - break; - case 3: - message.item_def = reader.uint32(); - break; - case 4: - message.level_type = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.killer_account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.num_kills = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_def = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.level_type = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -92849,11 +120055,11 @@ * @memberof CMsgGCIncrementKillCountResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCIncrementKillCountResponse} CMsgGCIncrementKillCountResponse + * @returns {CMsgGCIncrementKillCountResponse & CMsgGCIncrementKillCountResponse.$Shape} CMsgGCIncrementKillCountResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCIncrementKillCountResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCIncrementKillCountResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -92867,19 +120073,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCIncrementKillCountResponse.verify = function verify(message) { + CMsgGCIncrementKillCountResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.killer_account_id != null && message.hasOwnProperty("killer_account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.killer_account_id != null && $Object.hasOwnProperty.call(message, "killer_account_id")) if (!$util.isInteger(message.killer_account_id)) return "killer_account_id: integer expected"; - if (message.num_kills != null && message.hasOwnProperty("num_kills")) + if (message.num_kills != null && $Object.hasOwnProperty.call(message, "num_kills")) if (!$util.isInteger(message.num_kills)) return "num_kills: integer expected"; - if (message.item_def != null && message.hasOwnProperty("item_def")) + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) if (!$util.isInteger(message.item_def)) return "item_def: integer expected"; - if (message.level_type != null && message.hasOwnProperty("level_type")) + if (message.level_type != null && $Object.hasOwnProperty.call(message, "level_type")) if (!$util.isInteger(message.level_type)) return "level_type: integer expected"; return null; @@ -92893,9 +120103,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCIncrementKillCountResponse} CMsgGCIncrementKillCountResponse */ - CMsgGCIncrementKillCountResponse.fromObject = function fromObject(object) { + CMsgGCIncrementKillCountResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCIncrementKillCountResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCIncrementKillCountResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCIncrementKillCountResponse(); if (object.killer_account_id != null) message.killer_account_id = object.killer_account_id >>> 0; @@ -92917,9 +120133,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCIncrementKillCountResponse.toObject = function toObject(message, options) { + CMsgGCIncrementKillCountResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.killer_account_id = 0; @@ -92927,13 +120147,13 @@ object.item_def = 0; object.level_type = 0; } - if (message.killer_account_id != null && message.hasOwnProperty("killer_account_id")) + if (message.killer_account_id != null && $Object.hasOwnProperty.call(message, "killer_account_id")) object.killer_account_id = message.killer_account_id; - if (message.num_kills != null && message.hasOwnProperty("num_kills")) + if (message.num_kills != null && $Object.hasOwnProperty.call(message, "num_kills")) object.num_kills = message.num_kills; - if (message.item_def != null && message.hasOwnProperty("item_def")) + if (message.item_def != null && $Object.hasOwnProperty.call(message, "item_def")) object.item_def = message.item_def; - if (message.level_type != null && message.hasOwnProperty("level_type")) + if (message.level_type != null && $Object.hasOwnProperty.call(message, "level_type")) object.level_type = message.level_type; return object; }; @@ -92945,8 +120165,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCIncrementKillCountResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCIncrementKillCountResponse.prototype.toJSON = function() { + return CMsgGCIncrementKillCountResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCIncrementKillCountResponse + * @function getTypeUrl + * @memberof CMsgGCIncrementKillCountResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCIncrementKillCountResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCIncrementKillCountResponse"; }; return CMsgGCIncrementKillCountResponse; @@ -92956,26 +120190,39 @@ /** * Properties of a CMsgGCRemoveStrangePart. - * @exports ICMsgGCRemoveStrangePart - * @interface ICMsgGCRemoveStrangePart + * @typedef {Object} CMsgGCRemoveStrangePart.$Properties * @property {number|Long|null} [item_id] CMsgGCRemoveStrangePart item_id * @property {number|null} [strange_part_score_type] CMsgGCRemoveStrangePart strange_part_score_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRemoveStrangePart. + * @exports ICMsgGCRemoveStrangePart + * @interface ICMsgGCRemoveStrangePart + * @augments CMsgGCRemoveStrangePart.$Properties + * @deprecated Use CMsgGCRemoveStrangePart.$Properties instead. + */ + + /** + * Shape of a CMsgGCRemoveStrangePart. + * @typedef {CMsgGCRemoveStrangePart.$Properties} CMsgGCRemoveStrangePart.$Shape */ /** * Constructs a new CMsgGCRemoveStrangePart. * @exports CMsgGCRemoveStrangePart * @classdesc Represents a CMsgGCRemoveStrangePart. - * @implements ICMsgGCRemoveStrangePart * @constructor - * @param {ICMsgGCRemoveStrangePart=} [properties] Properties to set + * @param {CMsgGCRemoveStrangePart.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRemoveStrangePart(properties) { + var CMsgGCRemoveStrangePart = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRemoveStrangePart item_id. @@ -92998,10 +120245,14 @@ * @function create * @memberof CMsgGCRemoveStrangePart * @static - * @param {ICMsgGCRemoveStrangePart=} [properties] Properties to set + * @param {CMsgGCRemoveStrangePart.$Properties=} [properties] Properties to set * @returns {CMsgGCRemoveStrangePart} CMsgGCRemoveStrangePart instance + * @type {{ + * (properties: CMsgGCRemoveStrangePart.$Shape): CMsgGCRemoveStrangePart & CMsgGCRemoveStrangePart.$Shape; + * (properties?: CMsgGCRemoveStrangePart.$Properties): CMsgGCRemoveStrangePart; + * }} */ - CMsgGCRemoveStrangePart.create = function create(properties) { + CMsgGCRemoveStrangePart.create = function(properties) { return new CMsgGCRemoveStrangePart(properties); }; @@ -93010,17 +120261,24 @@ * @function encode * @memberof CMsgGCRemoveStrangePart * @static - * @param {ICMsgGCRemoveStrangePart} message CMsgGCRemoveStrangePart message or plain object to encode + * @param {CMsgGCRemoveStrangePart.$Properties} message CMsgGCRemoveStrangePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveStrangePart.encode = function encode(message, writer) { + CMsgGCRemoveStrangePart.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.strange_part_score_type != null && Object.hasOwnProperty.call(message, "strange_part_score_type")) + if (message.strange_part_score_type != null && $Object.hasOwnProperty.call(message, "strange_part_score_type")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.strange_part_score_type); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -93029,12 +120287,12 @@ * @function encodeDelimited * @memberof CMsgGCRemoveStrangePart * @static - * @param {ICMsgGCRemoveStrangePart} message CMsgGCRemoveStrangePart message or plain object to encode + * @param {CMsgGCRemoveStrangePart.$Properties} message CMsgGCRemoveStrangePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveStrangePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRemoveStrangePart.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -93044,28 +120302,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRemoveStrangePart} CMsgGCRemoveStrangePart + * @returns {CMsgGCRemoveStrangePart & CMsgGCRemoveStrangePart.$Shape} CMsgGCRemoveStrangePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveStrangePart.decode = function decode(reader, length) { + CMsgGCRemoveStrangePart.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRemoveStrangePart(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRemoveStrangePart(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.strange_part_score_type = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.strange_part_score_type = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -93075,11 +120353,11 @@ * @memberof CMsgGCRemoveStrangePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRemoveStrangePart} CMsgGCRemoveStrangePart + * @returns {CMsgGCRemoveStrangePart & CMsgGCRemoveStrangePart.$Shape} CMsgGCRemoveStrangePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveStrangePart.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRemoveStrangePart.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -93093,13 +120371,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRemoveStrangePart.verify = function verify(message) { + CMsgGCRemoveStrangePart.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.strange_part_score_type != null && message.hasOwnProperty("strange_part_score_type")) + if (message.strange_part_score_type != null && $Object.hasOwnProperty.call(message, "strange_part_score_type")) if (!$util.isInteger(message.strange_part_score_type)) return "strange_part_score_type: integer expected"; return null; @@ -93113,15 +120395,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCRemoveStrangePart} CMsgGCRemoveStrangePart */ - CMsgGCRemoveStrangePart.fromObject = function fromObject(object) { + CMsgGCRemoveStrangePart.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRemoveStrangePart) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRemoveStrangePart: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRemoveStrangePart(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -93140,24 +120428,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRemoveStrangePart.toObject = function toObject(message, options) { + CMsgGCRemoveStrangePart.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.strange_part_score_type = 0; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.strange_part_score_type != null && message.hasOwnProperty("strange_part_score_type")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.strange_part_score_type != null && $Object.hasOwnProperty.call(message, "strange_part_score_type")) object.strange_part_score_type = message.strange_part_score_type; return object; }; @@ -93169,8 +120463,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRemoveStrangePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRemoveStrangePart.prototype.toJSON = function() { + return CMsgGCRemoveStrangePart.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRemoveStrangePart + * @function getTypeUrl + * @memberof CMsgGCRemoveStrangePart + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRemoveStrangePart.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRemoveStrangePart"; }; return CMsgGCRemoveStrangePart; @@ -93180,26 +120488,39 @@ /** * Properties of a CMsgGCRemoveUpgradeCard. - * @exports ICMsgGCRemoveUpgradeCard - * @interface ICMsgGCRemoveUpgradeCard + * @typedef {Object} CMsgGCRemoveUpgradeCard.$Properties * @property {number|Long|null} [item_id] CMsgGCRemoveUpgradeCard item_id * @property {number|null} [attribute_index] CMsgGCRemoveUpgradeCard attribute_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCRemoveUpgradeCard. + * @exports ICMsgGCRemoveUpgradeCard + * @interface ICMsgGCRemoveUpgradeCard + * @augments CMsgGCRemoveUpgradeCard.$Properties + * @deprecated Use CMsgGCRemoveUpgradeCard.$Properties instead. + */ + + /** + * Shape of a CMsgGCRemoveUpgradeCard. + * @typedef {CMsgGCRemoveUpgradeCard.$Properties} CMsgGCRemoveUpgradeCard.$Shape */ /** * Constructs a new CMsgGCRemoveUpgradeCard. * @exports CMsgGCRemoveUpgradeCard * @classdesc Represents a CMsgGCRemoveUpgradeCard. - * @implements ICMsgGCRemoveUpgradeCard * @constructor - * @param {ICMsgGCRemoveUpgradeCard=} [properties] Properties to set + * @param {CMsgGCRemoveUpgradeCard.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRemoveUpgradeCard(properties) { + var CMsgGCRemoveUpgradeCard = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRemoveUpgradeCard item_id. @@ -93222,10 +120543,14 @@ * @function create * @memberof CMsgGCRemoveUpgradeCard * @static - * @param {ICMsgGCRemoveUpgradeCard=} [properties] Properties to set + * @param {CMsgGCRemoveUpgradeCard.$Properties=} [properties] Properties to set * @returns {CMsgGCRemoveUpgradeCard} CMsgGCRemoveUpgradeCard instance + * @type {{ + * (properties: CMsgGCRemoveUpgradeCard.$Shape): CMsgGCRemoveUpgradeCard & CMsgGCRemoveUpgradeCard.$Shape; + * (properties?: CMsgGCRemoveUpgradeCard.$Properties): CMsgGCRemoveUpgradeCard; + * }} */ - CMsgGCRemoveUpgradeCard.create = function create(properties) { + CMsgGCRemoveUpgradeCard.create = function(properties) { return new CMsgGCRemoveUpgradeCard(properties); }; @@ -93234,17 +120559,24 @@ * @function encode * @memberof CMsgGCRemoveUpgradeCard * @static - * @param {ICMsgGCRemoveUpgradeCard} message CMsgGCRemoveUpgradeCard message or plain object to encode + * @param {CMsgGCRemoveUpgradeCard.$Properties} message CMsgGCRemoveUpgradeCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveUpgradeCard.encode = function encode(message, writer) { + CMsgGCRemoveUpgradeCard.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.attribute_index != null && Object.hasOwnProperty.call(message, "attribute_index")) + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.attribute_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -93253,12 +120585,12 @@ * @function encodeDelimited * @memberof CMsgGCRemoveUpgradeCard * @static - * @param {ICMsgGCRemoveUpgradeCard} message CMsgGCRemoveUpgradeCard message or plain object to encode + * @param {CMsgGCRemoveUpgradeCard.$Properties} message CMsgGCRemoveUpgradeCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveUpgradeCard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRemoveUpgradeCard.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -93268,28 +120600,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRemoveUpgradeCard} CMsgGCRemoveUpgradeCard + * @returns {CMsgGCRemoveUpgradeCard & CMsgGCRemoveUpgradeCard.$Shape} CMsgGCRemoveUpgradeCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveUpgradeCard.decode = function decode(reader, length) { + CMsgGCRemoveUpgradeCard.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRemoveUpgradeCard(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRemoveUpgradeCard(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.attribute_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.attribute_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -93299,11 +120651,11 @@ * @memberof CMsgGCRemoveUpgradeCard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRemoveUpgradeCard} CMsgGCRemoveUpgradeCard + * @returns {CMsgGCRemoveUpgradeCard & CMsgGCRemoveUpgradeCard.$Shape} CMsgGCRemoveUpgradeCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveUpgradeCard.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRemoveUpgradeCard.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -93317,13 +120669,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRemoveUpgradeCard.verify = function verify(message) { + CMsgGCRemoveUpgradeCard.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.attribute_index != null && message.hasOwnProperty("attribute_index")) + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) if (!$util.isInteger(message.attribute_index)) return "attribute_index: integer expected"; return null; @@ -93337,15 +120693,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCRemoveUpgradeCard} CMsgGCRemoveUpgradeCard */ - CMsgGCRemoveUpgradeCard.fromObject = function fromObject(object) { + CMsgGCRemoveUpgradeCard.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRemoveUpgradeCard) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRemoveUpgradeCard: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRemoveUpgradeCard(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -93364,24 +120726,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRemoveUpgradeCard.toObject = function toObject(message, options) { + CMsgGCRemoveUpgradeCard.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.attribute_index = 0; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.attribute_index != null && message.hasOwnProperty("attribute_index")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) object.attribute_index = message.attribute_index; return object; }; @@ -93393,8 +120761,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRemoveUpgradeCard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRemoveUpgradeCard.prototype.toJSON = function() { + return CMsgGCRemoveUpgradeCard.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRemoveUpgradeCard + * @function getTypeUrl + * @memberof CMsgGCRemoveUpgradeCard + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRemoveUpgradeCard.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRemoveUpgradeCard"; }; return CMsgGCRemoveUpgradeCard; @@ -93402,27 +120784,40 @@ $root.CMsgGCRemoveCustomizationAttributeSimple = (function() { + /** + * Properties of a CMsgGCRemoveCustomizationAttributeSimple. + * @typedef {Object} CMsgGCRemoveCustomizationAttributeSimple.$Properties + * @property {number|Long|null} [item_id] CMsgGCRemoveCustomizationAttributeSimple item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCRemoveCustomizationAttributeSimple. * @exports ICMsgGCRemoveCustomizationAttributeSimple * @interface ICMsgGCRemoveCustomizationAttributeSimple - * @property {number|Long|null} [item_id] CMsgGCRemoveCustomizationAttributeSimple item_id + * @augments CMsgGCRemoveCustomizationAttributeSimple.$Properties + * @deprecated Use CMsgGCRemoveCustomizationAttributeSimple.$Properties instead. + */ + + /** + * Shape of a CMsgGCRemoveCustomizationAttributeSimple. + * @typedef {CMsgGCRemoveCustomizationAttributeSimple.$Properties} CMsgGCRemoveCustomizationAttributeSimple.$Shape */ /** * Constructs a new CMsgGCRemoveCustomizationAttributeSimple. * @exports CMsgGCRemoveCustomizationAttributeSimple * @classdesc Represents a CMsgGCRemoveCustomizationAttributeSimple. - * @implements ICMsgGCRemoveCustomizationAttributeSimple * @constructor - * @param {ICMsgGCRemoveCustomizationAttributeSimple=} [properties] Properties to set + * @param {CMsgGCRemoveCustomizationAttributeSimple.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCRemoveCustomizationAttributeSimple(properties) { + var CMsgGCRemoveCustomizationAttributeSimple = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCRemoveCustomizationAttributeSimple item_id. @@ -93437,10 +120832,14 @@ * @function create * @memberof CMsgGCRemoveCustomizationAttributeSimple * @static - * @param {ICMsgGCRemoveCustomizationAttributeSimple=} [properties] Properties to set + * @param {CMsgGCRemoveCustomizationAttributeSimple.$Properties=} [properties] Properties to set * @returns {CMsgGCRemoveCustomizationAttributeSimple} CMsgGCRemoveCustomizationAttributeSimple instance + * @type {{ + * (properties: CMsgGCRemoveCustomizationAttributeSimple.$Shape): CMsgGCRemoveCustomizationAttributeSimple & CMsgGCRemoveCustomizationAttributeSimple.$Shape; + * (properties?: CMsgGCRemoveCustomizationAttributeSimple.$Properties): CMsgGCRemoveCustomizationAttributeSimple; + * }} */ - CMsgGCRemoveCustomizationAttributeSimple.create = function create(properties) { + CMsgGCRemoveCustomizationAttributeSimple.create = function(properties) { return new CMsgGCRemoveCustomizationAttributeSimple(properties); }; @@ -93449,15 +120848,22 @@ * @function encode * @memberof CMsgGCRemoveCustomizationAttributeSimple * @static - * @param {ICMsgGCRemoveCustomizationAttributeSimple} message CMsgGCRemoveCustomizationAttributeSimple message or plain object to encode + * @param {CMsgGCRemoveCustomizationAttributeSimple.$Properties} message CMsgGCRemoveCustomizationAttributeSimple message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveCustomizationAttributeSimple.encode = function encode(message, writer) { + CMsgGCRemoveCustomizationAttributeSimple.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -93466,12 +120872,12 @@ * @function encodeDelimited * @memberof CMsgGCRemoveCustomizationAttributeSimple * @static - * @param {ICMsgGCRemoveCustomizationAttributeSimple} message CMsgGCRemoveCustomizationAttributeSimple message or plain object to encode + * @param {CMsgGCRemoveCustomizationAttributeSimple.$Properties} message CMsgGCRemoveCustomizationAttributeSimple message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCRemoveCustomizationAttributeSimple.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCRemoveCustomizationAttributeSimple.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -93481,25 +120887,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCRemoveCustomizationAttributeSimple} CMsgGCRemoveCustomizationAttributeSimple + * @returns {CMsgGCRemoveCustomizationAttributeSimple & CMsgGCRemoveCustomizationAttributeSimple.$Shape} CMsgGCRemoveCustomizationAttributeSimple * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveCustomizationAttributeSimple.decode = function decode(reader, length) { + CMsgGCRemoveCustomizationAttributeSimple.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRemoveCustomizationAttributeSimple(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCRemoveCustomizationAttributeSimple(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -93509,11 +120932,11 @@ * @memberof CMsgGCRemoveCustomizationAttributeSimple * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCRemoveCustomizationAttributeSimple} CMsgGCRemoveCustomizationAttributeSimple + * @returns {CMsgGCRemoveCustomizationAttributeSimple & CMsgGCRemoveCustomizationAttributeSimple.$Shape} CMsgGCRemoveCustomizationAttributeSimple * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCRemoveCustomizationAttributeSimple.decodeDelimited = function decodeDelimited(reader) { + CMsgGCRemoveCustomizationAttributeSimple.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -93527,10 +120950,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCRemoveCustomizationAttributeSimple.verify = function verify(message) { + CMsgGCRemoveCustomizationAttributeSimple.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; return null; @@ -93544,15 +120971,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCRemoveCustomizationAttributeSimple} CMsgGCRemoveCustomizationAttributeSimple */ - CMsgGCRemoveCustomizationAttributeSimple.fromObject = function fromObject(object) { + CMsgGCRemoveCustomizationAttributeSimple.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCRemoveCustomizationAttributeSimple) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCRemoveCustomizationAttributeSimple: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCRemoveCustomizationAttributeSimple(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -93569,21 +121002,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCRemoveCustomizationAttributeSimple.toObject = function toObject(message, options) { + CMsgGCRemoveCustomizationAttributeSimple.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; return object; }; @@ -93594,8 +121033,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCRemoveCustomizationAttributeSimple.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCRemoveCustomizationAttributeSimple.prototype.toJSON = function() { + return CMsgGCRemoveCustomizationAttributeSimple.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCRemoveCustomizationAttributeSimple + * @function getTypeUrl + * @memberof CMsgGCRemoveCustomizationAttributeSimple + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCRemoveCustomizationAttributeSimple.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCRemoveCustomizationAttributeSimple"; }; return CMsgGCRemoveCustomizationAttributeSimple; @@ -93603,27 +121056,40 @@ $root.CMsgGCResetStrangeScores = (function() { + /** + * Properties of a CMsgGCResetStrangeScores. + * @typedef {Object} CMsgGCResetStrangeScores.$Properties + * @property {number|Long|null} [item_id] CMsgGCResetStrangeScores item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCResetStrangeScores. * @exports ICMsgGCResetStrangeScores * @interface ICMsgGCResetStrangeScores - * @property {number|Long|null} [item_id] CMsgGCResetStrangeScores item_id + * @augments CMsgGCResetStrangeScores.$Properties + * @deprecated Use CMsgGCResetStrangeScores.$Properties instead. + */ + + /** + * Shape of a CMsgGCResetStrangeScores. + * @typedef {CMsgGCResetStrangeScores.$Properties} CMsgGCResetStrangeScores.$Shape */ /** * Constructs a new CMsgGCResetStrangeScores. * @exports CMsgGCResetStrangeScores * @classdesc Represents a CMsgGCResetStrangeScores. - * @implements ICMsgGCResetStrangeScores * @constructor - * @param {ICMsgGCResetStrangeScores=} [properties] Properties to set + * @param {CMsgGCResetStrangeScores.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCResetStrangeScores(properties) { + var CMsgGCResetStrangeScores = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCResetStrangeScores item_id. @@ -93638,10 +121104,14 @@ * @function create * @memberof CMsgGCResetStrangeScores * @static - * @param {ICMsgGCResetStrangeScores=} [properties] Properties to set + * @param {CMsgGCResetStrangeScores.$Properties=} [properties] Properties to set * @returns {CMsgGCResetStrangeScores} CMsgGCResetStrangeScores instance + * @type {{ + * (properties: CMsgGCResetStrangeScores.$Shape): CMsgGCResetStrangeScores & CMsgGCResetStrangeScores.$Shape; + * (properties?: CMsgGCResetStrangeScores.$Properties): CMsgGCResetStrangeScores; + * }} */ - CMsgGCResetStrangeScores.create = function create(properties) { + CMsgGCResetStrangeScores.create = function(properties) { return new CMsgGCResetStrangeScores(properties); }; @@ -93650,15 +121120,22 @@ * @function encode * @memberof CMsgGCResetStrangeScores * @static - * @param {ICMsgGCResetStrangeScores} message CMsgGCResetStrangeScores message or plain object to encode + * @param {CMsgGCResetStrangeScores.$Properties} message CMsgGCResetStrangeScores message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCResetStrangeScores.encode = function encode(message, writer) { + CMsgGCResetStrangeScores.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -93667,12 +121144,12 @@ * @function encodeDelimited * @memberof CMsgGCResetStrangeScores * @static - * @param {ICMsgGCResetStrangeScores} message CMsgGCResetStrangeScores message or plain object to encode + * @param {CMsgGCResetStrangeScores.$Properties} message CMsgGCResetStrangeScores message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCResetStrangeScores.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCResetStrangeScores.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -93682,25 +121159,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCResetStrangeScores} CMsgGCResetStrangeScores + * @returns {CMsgGCResetStrangeScores & CMsgGCResetStrangeScores.$Shape} CMsgGCResetStrangeScores * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCResetStrangeScores.decode = function decode(reader, length) { + CMsgGCResetStrangeScores.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCResetStrangeScores(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCResetStrangeScores(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -93710,11 +121204,11 @@ * @memberof CMsgGCResetStrangeScores * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCResetStrangeScores} CMsgGCResetStrangeScores + * @returns {CMsgGCResetStrangeScores & CMsgGCResetStrangeScores.$Shape} CMsgGCResetStrangeScores * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCResetStrangeScores.decodeDelimited = function decodeDelimited(reader) { + CMsgGCResetStrangeScores.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -93728,10 +121222,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCResetStrangeScores.verify = function verify(message) { + CMsgGCResetStrangeScores.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; return null; @@ -93745,15 +121243,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCResetStrangeScores} CMsgGCResetStrangeScores */ - CMsgGCResetStrangeScores.fromObject = function fromObject(object) { + CMsgGCResetStrangeScores.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCResetStrangeScores) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCResetStrangeScores: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCResetStrangeScores(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") @@ -93770,21 +121274,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCResetStrangeScores.toObject = function toObject(message, options) { + CMsgGCResetStrangeScores.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; return object; }; @@ -93795,8 +121305,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCResetStrangeScores.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCResetStrangeScores.prototype.toJSON = function() { + return CMsgGCResetStrangeScores.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCResetStrangeScores + * @function getTypeUrl + * @memberof CMsgGCResetStrangeScores + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCResetStrangeScores.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCResetStrangeScores"; }; return CMsgGCResetStrangeScores; @@ -93804,27 +121328,40 @@ $root.CMsgGCItemPreviewItemBoughtNotification = (function() { + /** + * Properties of a CMsgGCItemPreviewItemBoughtNotification. + * @typedef {Object} CMsgGCItemPreviewItemBoughtNotification.$Properties + * @property {number|null} [item_def_index] CMsgGCItemPreviewItemBoughtNotification item_def_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCItemPreviewItemBoughtNotification. * @exports ICMsgGCItemPreviewItemBoughtNotification * @interface ICMsgGCItemPreviewItemBoughtNotification - * @property {number|null} [item_def_index] CMsgGCItemPreviewItemBoughtNotification item_def_index + * @augments CMsgGCItemPreviewItemBoughtNotification.$Properties + * @deprecated Use CMsgGCItemPreviewItemBoughtNotification.$Properties instead. + */ + + /** + * Shape of a CMsgGCItemPreviewItemBoughtNotification. + * @typedef {CMsgGCItemPreviewItemBoughtNotification.$Properties} CMsgGCItemPreviewItemBoughtNotification.$Shape */ /** * Constructs a new CMsgGCItemPreviewItemBoughtNotification. * @exports CMsgGCItemPreviewItemBoughtNotification * @classdesc Represents a CMsgGCItemPreviewItemBoughtNotification. - * @implements ICMsgGCItemPreviewItemBoughtNotification * @constructor - * @param {ICMsgGCItemPreviewItemBoughtNotification=} [properties] Properties to set + * @param {CMsgGCItemPreviewItemBoughtNotification.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCItemPreviewItemBoughtNotification(properties) { + var CMsgGCItemPreviewItemBoughtNotification = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCItemPreviewItemBoughtNotification item_def_index. @@ -93839,10 +121376,14 @@ * @function create * @memberof CMsgGCItemPreviewItemBoughtNotification * @static - * @param {ICMsgGCItemPreviewItemBoughtNotification=} [properties] Properties to set + * @param {CMsgGCItemPreviewItemBoughtNotification.$Properties=} [properties] Properties to set * @returns {CMsgGCItemPreviewItemBoughtNotification} CMsgGCItemPreviewItemBoughtNotification instance + * @type {{ + * (properties: CMsgGCItemPreviewItemBoughtNotification.$Shape): CMsgGCItemPreviewItemBoughtNotification & CMsgGCItemPreviewItemBoughtNotification.$Shape; + * (properties?: CMsgGCItemPreviewItemBoughtNotification.$Properties): CMsgGCItemPreviewItemBoughtNotification; + * }} */ - CMsgGCItemPreviewItemBoughtNotification.create = function create(properties) { + CMsgGCItemPreviewItemBoughtNotification.create = function(properties) { return new CMsgGCItemPreviewItemBoughtNotification(properties); }; @@ -93851,15 +121392,22 @@ * @function encode * @memberof CMsgGCItemPreviewItemBoughtNotification * @static - * @param {ICMsgGCItemPreviewItemBoughtNotification} message CMsgGCItemPreviewItemBoughtNotification message or plain object to encode + * @param {CMsgGCItemPreviewItemBoughtNotification.$Properties} message CMsgGCItemPreviewItemBoughtNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCItemPreviewItemBoughtNotification.encode = function encode(message, writer) { + CMsgGCItemPreviewItemBoughtNotification.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_def_index != null && Object.hasOwnProperty.call(message, "item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.item_def_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -93868,12 +121416,12 @@ * @function encodeDelimited * @memberof CMsgGCItemPreviewItemBoughtNotification * @static - * @param {ICMsgGCItemPreviewItemBoughtNotification} message CMsgGCItemPreviewItemBoughtNotification message or plain object to encode + * @param {CMsgGCItemPreviewItemBoughtNotification.$Properties} message CMsgGCItemPreviewItemBoughtNotification message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCItemPreviewItemBoughtNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCItemPreviewItemBoughtNotification.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -93883,25 +121431,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCItemPreviewItemBoughtNotification} CMsgGCItemPreviewItemBoughtNotification + * @returns {CMsgGCItemPreviewItemBoughtNotification & CMsgGCItemPreviewItemBoughtNotification.$Shape} CMsgGCItemPreviewItemBoughtNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCItemPreviewItemBoughtNotification.decode = function decode(reader, length) { + CMsgGCItemPreviewItemBoughtNotification.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCItemPreviewItemBoughtNotification(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCItemPreviewItemBoughtNotification(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_def_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_def_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -93911,11 +121476,11 @@ * @memberof CMsgGCItemPreviewItemBoughtNotification * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCItemPreviewItemBoughtNotification} CMsgGCItemPreviewItemBoughtNotification + * @returns {CMsgGCItemPreviewItemBoughtNotification & CMsgGCItemPreviewItemBoughtNotification.$Shape} CMsgGCItemPreviewItemBoughtNotification * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCItemPreviewItemBoughtNotification.decodeDelimited = function decodeDelimited(reader) { + CMsgGCItemPreviewItemBoughtNotification.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -93929,10 +121494,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCItemPreviewItemBoughtNotification.verify = function verify(message) { + CMsgGCItemPreviewItemBoughtNotification.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) if (!$util.isInteger(message.item_def_index)) return "item_def_index: integer expected"; return null; @@ -93946,9 +121515,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCItemPreviewItemBoughtNotification} CMsgGCItemPreviewItemBoughtNotification */ - CMsgGCItemPreviewItemBoughtNotification.fromObject = function fromObject(object) { + CMsgGCItemPreviewItemBoughtNotification.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCItemPreviewItemBoughtNotification) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCItemPreviewItemBoughtNotification: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCItemPreviewItemBoughtNotification(); if (object.item_def_index != null) message.item_def_index = object.item_def_index >>> 0; @@ -93964,13 +121539,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCItemPreviewItemBoughtNotification.toObject = function toObject(message, options) { + CMsgGCItemPreviewItemBoughtNotification.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.item_def_index = 0; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) object.item_def_index = message.item_def_index; return object; }; @@ -93982,8 +121561,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCItemPreviewItemBoughtNotification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCItemPreviewItemBoughtNotification.prototype.toJSON = function() { + return CMsgGCItemPreviewItemBoughtNotification.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCItemPreviewItemBoughtNotification + * @function getTypeUrl + * @memberof CMsgGCItemPreviewItemBoughtNotification + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCItemPreviewItemBoughtNotification.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCItemPreviewItemBoughtNotification"; }; return CMsgGCItemPreviewItemBoughtNotification; @@ -93991,27 +121584,40 @@ $root.CMsgGCStorePurchaseCancel = (function() { + /** + * Properties of a CMsgGCStorePurchaseCancel. + * @typedef {Object} CMsgGCStorePurchaseCancel.$Properties + * @property {number|Long|null} [txn_id] CMsgGCStorePurchaseCancel txn_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCStorePurchaseCancel. * @exports ICMsgGCStorePurchaseCancel * @interface ICMsgGCStorePurchaseCancel - * @property {number|Long|null} [txn_id] CMsgGCStorePurchaseCancel txn_id + * @augments CMsgGCStorePurchaseCancel.$Properties + * @deprecated Use CMsgGCStorePurchaseCancel.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseCancel. + * @typedef {CMsgGCStorePurchaseCancel.$Properties} CMsgGCStorePurchaseCancel.$Shape */ /** * Constructs a new CMsgGCStorePurchaseCancel. * @exports CMsgGCStorePurchaseCancel * @classdesc Represents a CMsgGCStorePurchaseCancel. - * @implements ICMsgGCStorePurchaseCancel * @constructor - * @param {ICMsgGCStorePurchaseCancel=} [properties] Properties to set + * @param {CMsgGCStorePurchaseCancel.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseCancel(properties) { + var CMsgGCStorePurchaseCancel = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseCancel txn_id. @@ -94026,10 +121632,14 @@ * @function create * @memberof CMsgGCStorePurchaseCancel * @static - * @param {ICMsgGCStorePurchaseCancel=} [properties] Properties to set + * @param {CMsgGCStorePurchaseCancel.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseCancel} CMsgGCStorePurchaseCancel instance + * @type {{ + * (properties: CMsgGCStorePurchaseCancel.$Shape): CMsgGCStorePurchaseCancel & CMsgGCStorePurchaseCancel.$Shape; + * (properties?: CMsgGCStorePurchaseCancel.$Properties): CMsgGCStorePurchaseCancel; + * }} */ - CMsgGCStorePurchaseCancel.create = function create(properties) { + CMsgGCStorePurchaseCancel.create = function(properties) { return new CMsgGCStorePurchaseCancel(properties); }; @@ -94038,15 +121648,22 @@ * @function encode * @memberof CMsgGCStorePurchaseCancel * @static - * @param {ICMsgGCStorePurchaseCancel} message CMsgGCStorePurchaseCancel message or plain object to encode + * @param {CMsgGCStorePurchaseCancel.$Properties} message CMsgGCStorePurchaseCancel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseCancel.encode = function encode(message, writer) { + CMsgGCStorePurchaseCancel.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.txn_id != null && Object.hasOwnProperty.call(message, "txn_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.txn_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -94055,12 +121672,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseCancel * @static - * @param {ICMsgGCStorePurchaseCancel} message CMsgGCStorePurchaseCancel message or plain object to encode + * @param {CMsgGCStorePurchaseCancel.$Properties} message CMsgGCStorePurchaseCancel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseCancel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseCancel.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -94070,25 +121687,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseCancel} CMsgGCStorePurchaseCancel + * @returns {CMsgGCStorePurchaseCancel & CMsgGCStorePurchaseCancel.$Shape} CMsgGCStorePurchaseCancel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseCancel.decode = function decode(reader, length) { + CMsgGCStorePurchaseCancel.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseCancel(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseCancel(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txn_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.txn_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -94098,11 +121732,11 @@ * @memberof CMsgGCStorePurchaseCancel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseCancel} CMsgGCStorePurchaseCancel + * @returns {CMsgGCStorePurchaseCancel & CMsgGCStorePurchaseCancel.$Shape} CMsgGCStorePurchaseCancel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseCancel.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseCancel.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -94116,10 +121750,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseCancel.verify = function verify(message) { + CMsgGCStorePurchaseCancel.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) if (!$util.isInteger(message.txn_id) && !(message.txn_id && $util.isInteger(message.txn_id.low) && $util.isInteger(message.txn_id.high))) return "txn_id: integer|Long expected"; return null; @@ -94133,15 +121771,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseCancel} CMsgGCStorePurchaseCancel */ - CMsgGCStorePurchaseCancel.fromObject = function fromObject(object) { + CMsgGCStorePurchaseCancel.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseCancel) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseCancel: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseCancel(); if (object.txn_id != null) if ($util.Long) - (message.txn_id = $util.Long.fromValue(object.txn_id)).unsigned = true; + message.txn_id = $util.Long.fromValue(object.txn_id, true); else if (typeof object.txn_id === "string") - message.txn_id = parseInt(object.txn_id, 10); + message.txn_id = $parseInt(object.txn_id, 10); else if (typeof object.txn_id === "number") message.txn_id = object.txn_id; else if (typeof object.txn_id === "object") @@ -94158,21 +121802,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseCancel.toObject = function toObject(message, options) { + CMsgGCStorePurchaseCancel.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.txn_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.txn_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.txn_id = options.longs === String ? "0" : 0; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) - if (typeof message.txn_id === "number") - object.txn_id = options.longs === String ? String(message.txn_id) : message.txn_id; + object.txn_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.txn_id = typeof message.txn_id === "number" ? $BigInt(message.txn_id) : $util.Long.fromBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0, true).toBigInt(); + else if (typeof message.txn_id === "number") + object.txn_id = options.longs === $String ? $String(message.txn_id) : message.txn_id; else - object.txn_id = options.longs === String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; + object.txn_id = options.longs === $String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === $Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; return object; }; @@ -94183,8 +121833,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseCancel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseCancel.prototype.toJSON = function() { + return CMsgGCStorePurchaseCancel.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseCancel + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseCancel + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseCancel.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseCancel"; }; return CMsgGCStorePurchaseCancel; @@ -94192,27 +121856,40 @@ $root.CMsgGCStorePurchaseCancelResponse = (function() { + /** + * Properties of a CMsgGCStorePurchaseCancelResponse. + * @typedef {Object} CMsgGCStorePurchaseCancelResponse.$Properties + * @property {number|null} [result] CMsgGCStorePurchaseCancelResponse result + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCStorePurchaseCancelResponse. * @exports ICMsgGCStorePurchaseCancelResponse * @interface ICMsgGCStorePurchaseCancelResponse - * @property {number|null} [result] CMsgGCStorePurchaseCancelResponse result + * @augments CMsgGCStorePurchaseCancelResponse.$Properties + * @deprecated Use CMsgGCStorePurchaseCancelResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseCancelResponse. + * @typedef {CMsgGCStorePurchaseCancelResponse.$Properties} CMsgGCStorePurchaseCancelResponse.$Shape */ /** * Constructs a new CMsgGCStorePurchaseCancelResponse. * @exports CMsgGCStorePurchaseCancelResponse * @classdesc Represents a CMsgGCStorePurchaseCancelResponse. - * @implements ICMsgGCStorePurchaseCancelResponse * @constructor - * @param {ICMsgGCStorePurchaseCancelResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseCancelResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseCancelResponse(properties) { + var CMsgGCStorePurchaseCancelResponse = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseCancelResponse result. @@ -94227,10 +121904,14 @@ * @function create * @memberof CMsgGCStorePurchaseCancelResponse * @static - * @param {ICMsgGCStorePurchaseCancelResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseCancelResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseCancelResponse} CMsgGCStorePurchaseCancelResponse instance + * @type {{ + * (properties: CMsgGCStorePurchaseCancelResponse.$Shape): CMsgGCStorePurchaseCancelResponse & CMsgGCStorePurchaseCancelResponse.$Shape; + * (properties?: CMsgGCStorePurchaseCancelResponse.$Properties): CMsgGCStorePurchaseCancelResponse; + * }} */ - CMsgGCStorePurchaseCancelResponse.create = function create(properties) { + CMsgGCStorePurchaseCancelResponse.create = function(properties) { return new CMsgGCStorePurchaseCancelResponse(properties); }; @@ -94239,15 +121920,22 @@ * @function encode * @memberof CMsgGCStorePurchaseCancelResponse * @static - * @param {ICMsgGCStorePurchaseCancelResponse} message CMsgGCStorePurchaseCancelResponse message or plain object to encode + * @param {CMsgGCStorePurchaseCancelResponse.$Properties} message CMsgGCStorePurchaseCancelResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseCancelResponse.encode = function encode(message, writer) { + CMsgGCStorePurchaseCancelResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.result); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -94256,12 +121944,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseCancelResponse * @static - * @param {ICMsgGCStorePurchaseCancelResponse} message CMsgGCStorePurchaseCancelResponse message or plain object to encode + * @param {CMsgGCStorePurchaseCancelResponse.$Properties} message CMsgGCStorePurchaseCancelResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseCancelResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseCancelResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -94271,25 +121959,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseCancelResponse} CMsgGCStorePurchaseCancelResponse + * @returns {CMsgGCStorePurchaseCancelResponse & CMsgGCStorePurchaseCancelResponse.$Shape} CMsgGCStorePurchaseCancelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseCancelResponse.decode = function decode(reader, length) { + CMsgGCStorePurchaseCancelResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseCancelResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseCancelResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -94299,11 +122004,11 @@ * @memberof CMsgGCStorePurchaseCancelResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseCancelResponse} CMsgGCStorePurchaseCancelResponse + * @returns {CMsgGCStorePurchaseCancelResponse & CMsgGCStorePurchaseCancelResponse.$Shape} CMsgGCStorePurchaseCancelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseCancelResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseCancelResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -94317,10 +122022,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseCancelResponse.verify = function verify(message) { + CMsgGCStorePurchaseCancelResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; return null; @@ -94334,9 +122043,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseCancelResponse} CMsgGCStorePurchaseCancelResponse */ - CMsgGCStorePurchaseCancelResponse.fromObject = function fromObject(object) { + CMsgGCStorePurchaseCancelResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseCancelResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseCancelResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseCancelResponse(); if (object.result != null) message.result = object.result >>> 0; @@ -94352,13 +122067,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseCancelResponse.toObject = function toObject(message, options) { + CMsgGCStorePurchaseCancelResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.result = 0; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; return object; }; @@ -94370,8 +122089,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseCancelResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseCancelResponse.prototype.toJSON = function() { + return CMsgGCStorePurchaseCancelResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseCancelResponse + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseCancelResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseCancelResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseCancelResponse"; }; return CMsgGCStorePurchaseCancelResponse; @@ -94379,27 +122112,40 @@ $root.CMsgGCStorePurchaseFinalize = (function() { + /** + * Properties of a CMsgGCStorePurchaseFinalize. + * @typedef {Object} CMsgGCStorePurchaseFinalize.$Properties + * @property {number|Long|null} [txn_id] CMsgGCStorePurchaseFinalize txn_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCStorePurchaseFinalize. * @exports ICMsgGCStorePurchaseFinalize * @interface ICMsgGCStorePurchaseFinalize - * @property {number|Long|null} [txn_id] CMsgGCStorePurchaseFinalize txn_id + * @augments CMsgGCStorePurchaseFinalize.$Properties + * @deprecated Use CMsgGCStorePurchaseFinalize.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseFinalize. + * @typedef {CMsgGCStorePurchaseFinalize.$Properties} CMsgGCStorePurchaseFinalize.$Shape */ /** * Constructs a new CMsgGCStorePurchaseFinalize. * @exports CMsgGCStorePurchaseFinalize * @classdesc Represents a CMsgGCStorePurchaseFinalize. - * @implements ICMsgGCStorePurchaseFinalize * @constructor - * @param {ICMsgGCStorePurchaseFinalize=} [properties] Properties to set + * @param {CMsgGCStorePurchaseFinalize.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseFinalize(properties) { + var CMsgGCStorePurchaseFinalize = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseFinalize txn_id. @@ -94414,10 +122160,14 @@ * @function create * @memberof CMsgGCStorePurchaseFinalize * @static - * @param {ICMsgGCStorePurchaseFinalize=} [properties] Properties to set + * @param {CMsgGCStorePurchaseFinalize.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseFinalize} CMsgGCStorePurchaseFinalize instance + * @type {{ + * (properties: CMsgGCStorePurchaseFinalize.$Shape): CMsgGCStorePurchaseFinalize & CMsgGCStorePurchaseFinalize.$Shape; + * (properties?: CMsgGCStorePurchaseFinalize.$Properties): CMsgGCStorePurchaseFinalize; + * }} */ - CMsgGCStorePurchaseFinalize.create = function create(properties) { + CMsgGCStorePurchaseFinalize.create = function(properties) { return new CMsgGCStorePurchaseFinalize(properties); }; @@ -94426,15 +122176,22 @@ * @function encode * @memberof CMsgGCStorePurchaseFinalize * @static - * @param {ICMsgGCStorePurchaseFinalize} message CMsgGCStorePurchaseFinalize message or plain object to encode + * @param {CMsgGCStorePurchaseFinalize.$Properties} message CMsgGCStorePurchaseFinalize message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseFinalize.encode = function encode(message, writer) { + CMsgGCStorePurchaseFinalize.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.txn_id != null && Object.hasOwnProperty.call(message, "txn_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.txn_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -94443,12 +122200,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseFinalize * @static - * @param {ICMsgGCStorePurchaseFinalize} message CMsgGCStorePurchaseFinalize message or plain object to encode + * @param {CMsgGCStorePurchaseFinalize.$Properties} message CMsgGCStorePurchaseFinalize message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseFinalize.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseFinalize.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -94458,25 +122215,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseFinalize} CMsgGCStorePurchaseFinalize + * @returns {CMsgGCStorePurchaseFinalize & CMsgGCStorePurchaseFinalize.$Shape} CMsgGCStorePurchaseFinalize * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseFinalize.decode = function decode(reader, length) { + CMsgGCStorePurchaseFinalize.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseFinalize(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseFinalize(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.txn_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.txn_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -94486,11 +122260,11 @@ * @memberof CMsgGCStorePurchaseFinalize * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseFinalize} CMsgGCStorePurchaseFinalize + * @returns {CMsgGCStorePurchaseFinalize & CMsgGCStorePurchaseFinalize.$Shape} CMsgGCStorePurchaseFinalize * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseFinalize.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseFinalize.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -94504,10 +122278,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseFinalize.verify = function verify(message) { + CMsgGCStorePurchaseFinalize.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) if (!$util.isInteger(message.txn_id) && !(message.txn_id && $util.isInteger(message.txn_id.low) && $util.isInteger(message.txn_id.high))) return "txn_id: integer|Long expected"; return null; @@ -94521,15 +122299,21 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseFinalize} CMsgGCStorePurchaseFinalize */ - CMsgGCStorePurchaseFinalize.fromObject = function fromObject(object) { + CMsgGCStorePurchaseFinalize.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseFinalize) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseFinalize: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseFinalize(); if (object.txn_id != null) if ($util.Long) - (message.txn_id = $util.Long.fromValue(object.txn_id)).unsigned = true; + message.txn_id = $util.Long.fromValue(object.txn_id, true); else if (typeof object.txn_id === "string") - message.txn_id = parseInt(object.txn_id, 10); + message.txn_id = $parseInt(object.txn_id, 10); else if (typeof object.txn_id === "number") message.txn_id = object.txn_id; else if (typeof object.txn_id === "object") @@ -94546,21 +122330,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseFinalize.toObject = function toObject(message, options) { + CMsgGCStorePurchaseFinalize.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.txn_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.txn_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.txn_id = options.longs === String ? "0" : 0; - if (message.txn_id != null && message.hasOwnProperty("txn_id")) - if (typeof message.txn_id === "number") - object.txn_id = options.longs === String ? String(message.txn_id) : message.txn_id; + object.txn_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.txn_id != null && $Object.hasOwnProperty.call(message, "txn_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.txn_id = typeof message.txn_id === "number" ? $BigInt(message.txn_id) : $util.Long.fromBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0, true).toBigInt(); + else if (typeof message.txn_id === "number") + object.txn_id = options.longs === $String ? $String(message.txn_id) : message.txn_id; else - object.txn_id = options.longs === String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; + object.txn_id = options.longs === $String ? $util.Long.prototype.toString.call(message.txn_id) : options.longs === $Number ? new $util.LongBits(message.txn_id.low >>> 0, message.txn_id.high >>> 0).toNumber(true) : message.txn_id; return object; }; @@ -94571,8 +122361,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseFinalize.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseFinalize.prototype.toJSON = function() { + return CMsgGCStorePurchaseFinalize.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseFinalize + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseFinalize + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseFinalize.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseFinalize"; }; return CMsgGCStorePurchaseFinalize; @@ -94582,27 +122386,40 @@ /** * Properties of a CMsgGCStorePurchaseFinalizeResponse. - * @exports ICMsgGCStorePurchaseFinalizeResponse - * @interface ICMsgGCStorePurchaseFinalizeResponse + * @typedef {Object} CMsgGCStorePurchaseFinalizeResponse.$Properties * @property {number|null} [result] CMsgGCStorePurchaseFinalizeResponse result * @property {Array.|null} [item_ids] CMsgGCStorePurchaseFinalizeResponse item_ids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCStorePurchaseFinalizeResponse. + * @exports ICMsgGCStorePurchaseFinalizeResponse + * @interface ICMsgGCStorePurchaseFinalizeResponse + * @augments CMsgGCStorePurchaseFinalizeResponse.$Properties + * @deprecated Use CMsgGCStorePurchaseFinalizeResponse.$Properties instead. + */ + + /** + * Shape of a CMsgGCStorePurchaseFinalizeResponse. + * @typedef {CMsgGCStorePurchaseFinalizeResponse.$Properties} CMsgGCStorePurchaseFinalizeResponse.$Shape */ /** * Constructs a new CMsgGCStorePurchaseFinalizeResponse. * @exports CMsgGCStorePurchaseFinalizeResponse * @classdesc Represents a CMsgGCStorePurchaseFinalizeResponse. - * @implements ICMsgGCStorePurchaseFinalizeResponse * @constructor - * @param {ICMsgGCStorePurchaseFinalizeResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseFinalizeResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCStorePurchaseFinalizeResponse(properties) { + var CMsgGCStorePurchaseFinalizeResponse = function (properties) { this.item_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCStorePurchaseFinalizeResponse result. @@ -94625,10 +122442,14 @@ * @function create * @memberof CMsgGCStorePurchaseFinalizeResponse * @static - * @param {ICMsgGCStorePurchaseFinalizeResponse=} [properties] Properties to set + * @param {CMsgGCStorePurchaseFinalizeResponse.$Properties=} [properties] Properties to set * @returns {CMsgGCStorePurchaseFinalizeResponse} CMsgGCStorePurchaseFinalizeResponse instance + * @type {{ + * (properties: CMsgGCStorePurchaseFinalizeResponse.$Shape): CMsgGCStorePurchaseFinalizeResponse & CMsgGCStorePurchaseFinalizeResponse.$Shape; + * (properties?: CMsgGCStorePurchaseFinalizeResponse.$Properties): CMsgGCStorePurchaseFinalizeResponse; + * }} */ - CMsgGCStorePurchaseFinalizeResponse.create = function create(properties) { + CMsgGCStorePurchaseFinalizeResponse.create = function(properties) { return new CMsgGCStorePurchaseFinalizeResponse(properties); }; @@ -94637,18 +122458,25 @@ * @function encode * @memberof CMsgGCStorePurchaseFinalizeResponse * @static - * @param {ICMsgGCStorePurchaseFinalizeResponse} message CMsgGCStorePurchaseFinalizeResponse message or plain object to encode + * @param {CMsgGCStorePurchaseFinalizeResponse.$Properties} message CMsgGCStorePurchaseFinalizeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseFinalizeResponse.encode = function encode(message, writer) { + CMsgGCStorePurchaseFinalizeResponse.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.result); if (message.item_ids != null && message.item_ids.length) for (var i = 0; i < message.item_ids.length; ++i) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.item_ids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -94657,12 +122485,12 @@ * @function encodeDelimited * @memberof CMsgGCStorePurchaseFinalizeResponse * @static - * @param {ICMsgGCStorePurchaseFinalizeResponse} message CMsgGCStorePurchaseFinalizeResponse message or plain object to encode + * @param {CMsgGCStorePurchaseFinalizeResponse.$Properties} message CMsgGCStorePurchaseFinalizeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCStorePurchaseFinalizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCStorePurchaseFinalizeResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -94672,35 +122500,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCStorePurchaseFinalizeResponse} CMsgGCStorePurchaseFinalizeResponse + * @returns {CMsgGCStorePurchaseFinalizeResponse & CMsgGCStorePurchaseFinalizeResponse.$Shape} CMsgGCStorePurchaseFinalizeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseFinalizeResponse.decode = function decode(reader, length) { + CMsgGCStorePurchaseFinalizeResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCStorePurchaseFinalizeResponse(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCStorePurchaseFinalizeResponse(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.uint32(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.item_ids && message.item_ids.length)) - message.item_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.item_ids.push(reader.uint64()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.result = reader.uint32(); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.item_ids && message.item_ids.length)) + message.item_ids = []; + reader.uint64s(message.item_ids); + continue; + } + if (wireType !== 0) + break; + if (!(message.item_ids && message.item_ids.length)) + message.item_ids = []; message.item_ids.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -94710,11 +122559,11 @@ * @memberof CMsgGCStorePurchaseFinalizeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCStorePurchaseFinalizeResponse} CMsgGCStorePurchaseFinalizeResponse + * @returns {CMsgGCStorePurchaseFinalizeResponse & CMsgGCStorePurchaseFinalizeResponse.$Shape} CMsgGCStorePurchaseFinalizeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCStorePurchaseFinalizeResponse.decodeDelimited = function decodeDelimited(reader) { + CMsgGCStorePurchaseFinalizeResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -94728,14 +122577,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCStorePurchaseFinalizeResponse.verify = function verify(message) { + CMsgGCStorePurchaseFinalizeResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) if (!$util.isInteger(message.result)) return "result: integer expected"; - if (message.item_ids != null && message.hasOwnProperty("item_ids")) { - if (!Array.isArray(message.item_ids)) + if (message.item_ids != null && $Object.hasOwnProperty.call(message, "item_ids")) { + if (!$Array.isArray(message.item_ids)) return "item_ids: array expected"; for (var i = 0; i < message.item_ids.length; ++i) if (!$util.isInteger(message.item_ids[i]) && !(message.item_ids[i] && $util.isInteger(message.item_ids[i].low) && $util.isInteger(message.item_ids[i].high))) @@ -94752,21 +122605,27 @@ * @param {Object.} object Plain object * @returns {CMsgGCStorePurchaseFinalizeResponse} CMsgGCStorePurchaseFinalizeResponse */ - CMsgGCStorePurchaseFinalizeResponse.fromObject = function fromObject(object) { + CMsgGCStorePurchaseFinalizeResponse.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCStorePurchaseFinalizeResponse) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCStorePurchaseFinalizeResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCStorePurchaseFinalizeResponse(); if (object.result != null) message.result = object.result >>> 0; if (object.item_ids) { - if (!Array.isArray(object.item_ids)) - throw TypeError(".CMsgGCStorePurchaseFinalizeResponse.item_ids: array expected"); - message.item_ids = []; + if (!$Array.isArray(object.item_ids)) + throw $TypeError(".CMsgGCStorePurchaseFinalizeResponse.item_ids: array expected"); + message.item_ids = $Array(object.item_ids.length); for (var i = 0; i < object.item_ids.length; ++i) if ($util.Long) - (message.item_ids[i] = $util.Long.fromValue(object.item_ids[i])).unsigned = true; + message.item_ids[i] = $util.Long.fromValue(object.item_ids[i], true); else if (typeof object.item_ids[i] === "string") - message.item_ids[i] = parseInt(object.item_ids[i], 10); + message.item_ids[i] = $parseInt(object.item_ids[i], 10); else if (typeof object.item_ids[i] === "number") message.item_ids[i] = object.item_ids[i]; else if (typeof object.item_ids[i] === "object") @@ -94784,23 +122643,29 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCStorePurchaseFinalizeResponse.toObject = function toObject(message, options) { + CMsgGCStorePurchaseFinalizeResponse.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.item_ids = []; if (options.defaults) object.result = 0; - if (message.result != null && message.hasOwnProperty("result")) + if (message.result != null && $Object.hasOwnProperty.call(message, "result")) object.result = message.result; if (message.item_ids && message.item_ids.length) { - object.item_ids = []; + object.item_ids = $Array(message.item_ids.length); for (var j = 0; j < message.item_ids.length; ++j) - if (typeof message.item_ids[j] === "number") - object.item_ids[j] = options.longs === String ? String(message.item_ids[j]) : message.item_ids[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_ids[j] = typeof message.item_ids[j] === "number" ? $BigInt(message.item_ids[j]) : $util.Long.fromBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0, true).toBigInt(); + else if (typeof message.item_ids[j] === "number") + object.item_ids[j] = options.longs === $String ? $String(message.item_ids[j]) : message.item_ids[j]; else - object.item_ids[j] = options.longs === String ? $util.Long.prototype.toString.call(message.item_ids[j]) : options.longs === Number ? new $util.LongBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0).toNumber(true) : message.item_ids[j]; + object.item_ids[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.item_ids[j]) : options.longs === $Number ? new $util.LongBits(message.item_ids[j].low >>> 0, message.item_ids[j].high >>> 0).toNumber(true) : message.item_ids[j]; } return object; }; @@ -94812,8 +122677,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCStorePurchaseFinalizeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCStorePurchaseFinalizeResponse.prototype.toJSON = function() { + return CMsgGCStorePurchaseFinalizeResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCStorePurchaseFinalizeResponse + * @function getTypeUrl + * @memberof CMsgGCStorePurchaseFinalizeResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCStorePurchaseFinalizeResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCStorePurchaseFinalizeResponse"; }; return CMsgGCStorePurchaseFinalizeResponse; @@ -94823,26 +122702,39 @@ /** * Properties of a CMsgGCBannedWordListRequest. - * @exports ICMsgGCBannedWordListRequest - * @interface ICMsgGCBannedWordListRequest + * @typedef {Object} CMsgGCBannedWordListRequest.$Properties * @property {number|null} [ban_list_group_id] CMsgGCBannedWordListRequest ban_list_group_id * @property {number|null} [word_id] CMsgGCBannedWordListRequest word_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCBannedWordListRequest. + * @exports ICMsgGCBannedWordListRequest + * @interface ICMsgGCBannedWordListRequest + * @augments CMsgGCBannedWordListRequest.$Properties + * @deprecated Use CMsgGCBannedWordListRequest.$Properties instead. + */ + + /** + * Shape of a CMsgGCBannedWordListRequest. + * @typedef {CMsgGCBannedWordListRequest.$Properties} CMsgGCBannedWordListRequest.$Shape */ /** * Constructs a new CMsgGCBannedWordListRequest. * @exports CMsgGCBannedWordListRequest * @classdesc Represents a CMsgGCBannedWordListRequest. - * @implements ICMsgGCBannedWordListRequest * @constructor - * @param {ICMsgGCBannedWordListRequest=} [properties] Properties to set + * @param {CMsgGCBannedWordListRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCBannedWordListRequest(properties) { + var CMsgGCBannedWordListRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCBannedWordListRequest ban_list_group_id. @@ -94865,10 +122757,14 @@ * @function create * @memberof CMsgGCBannedWordListRequest * @static - * @param {ICMsgGCBannedWordListRequest=} [properties] Properties to set + * @param {CMsgGCBannedWordListRequest.$Properties=} [properties] Properties to set * @returns {CMsgGCBannedWordListRequest} CMsgGCBannedWordListRequest instance + * @type {{ + * (properties: CMsgGCBannedWordListRequest.$Shape): CMsgGCBannedWordListRequest & CMsgGCBannedWordListRequest.$Shape; + * (properties?: CMsgGCBannedWordListRequest.$Properties): CMsgGCBannedWordListRequest; + * }} */ - CMsgGCBannedWordListRequest.create = function create(properties) { + CMsgGCBannedWordListRequest.create = function(properties) { return new CMsgGCBannedWordListRequest(properties); }; @@ -94877,17 +122773,24 @@ * @function encode * @memberof CMsgGCBannedWordListRequest * @static - * @param {ICMsgGCBannedWordListRequest} message CMsgGCBannedWordListRequest message or plain object to encode + * @param {CMsgGCBannedWordListRequest.$Properties} message CMsgGCBannedWordListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCBannedWordListRequest.encode = function encode(message, writer) { + CMsgGCBannedWordListRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ban_list_group_id != null && Object.hasOwnProperty.call(message, "ban_list_group_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ban_list_group_id != null && $Object.hasOwnProperty.call(message, "ban_list_group_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.ban_list_group_id); - if (message.word_id != null && Object.hasOwnProperty.call(message, "word_id")) + if (message.word_id != null && $Object.hasOwnProperty.call(message, "word_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.word_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -94896,12 +122799,12 @@ * @function encodeDelimited * @memberof CMsgGCBannedWordListRequest * @static - * @param {ICMsgGCBannedWordListRequest} message CMsgGCBannedWordListRequest message or plain object to encode + * @param {CMsgGCBannedWordListRequest.$Properties} message CMsgGCBannedWordListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCBannedWordListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCBannedWordListRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -94911,28 +122814,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCBannedWordListRequest} CMsgGCBannedWordListRequest + * @returns {CMsgGCBannedWordListRequest & CMsgGCBannedWordListRequest.$Shape} CMsgGCBannedWordListRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCBannedWordListRequest.decode = function decode(reader, length) { + CMsgGCBannedWordListRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCBannedWordListRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCBannedWordListRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ban_list_group_id = reader.uint32(); - break; - case 2: - message.word_id = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.ban_list_group_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.word_id = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -94942,11 +122865,11 @@ * @memberof CMsgGCBannedWordListRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCBannedWordListRequest} CMsgGCBannedWordListRequest + * @returns {CMsgGCBannedWordListRequest & CMsgGCBannedWordListRequest.$Shape} CMsgGCBannedWordListRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCBannedWordListRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgGCBannedWordListRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -94960,13 +122883,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCBannedWordListRequest.verify = function verify(message) { + CMsgGCBannedWordListRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ban_list_group_id != null && message.hasOwnProperty("ban_list_group_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ban_list_group_id != null && $Object.hasOwnProperty.call(message, "ban_list_group_id")) if (!$util.isInteger(message.ban_list_group_id)) return "ban_list_group_id: integer expected"; - if (message.word_id != null && message.hasOwnProperty("word_id")) + if (message.word_id != null && $Object.hasOwnProperty.call(message, "word_id")) if (!$util.isInteger(message.word_id)) return "word_id: integer expected"; return null; @@ -94980,9 +122907,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCBannedWordListRequest} CMsgGCBannedWordListRequest */ - CMsgGCBannedWordListRequest.fromObject = function fromObject(object) { + CMsgGCBannedWordListRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCBannedWordListRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCBannedWordListRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCBannedWordListRequest(); if (object.ban_list_group_id != null) message.ban_list_group_id = object.ban_list_group_id >>> 0; @@ -95000,17 +122933,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCBannedWordListRequest.toObject = function toObject(message, options) { + CMsgGCBannedWordListRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.ban_list_group_id = 0; object.word_id = 0; } - if (message.ban_list_group_id != null && message.hasOwnProperty("ban_list_group_id")) + if (message.ban_list_group_id != null && $Object.hasOwnProperty.call(message, "ban_list_group_id")) object.ban_list_group_id = message.ban_list_group_id; - if (message.word_id != null && message.hasOwnProperty("word_id")) + if (message.word_id != null && $Object.hasOwnProperty.call(message, "word_id")) object.word_id = message.word_id; return object; }; @@ -95022,8 +122959,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCBannedWordListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCBannedWordListRequest.prototype.toJSON = function() { + return CMsgGCBannedWordListRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCBannedWordListRequest + * @function getTypeUrl + * @memberof CMsgGCBannedWordListRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCBannedWordListRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCBannedWordListRequest"; }; return CMsgGCBannedWordListRequest; @@ -95033,28 +122984,41 @@ /** * Properties of a CMsgGCGiftedItems. - * @exports ICMsgGCGiftedItems - * @interface ICMsgGCGiftedItems + * @typedef {Object} CMsgGCGiftedItems.$Properties * @property {number|Long|null} [gifter_steam_id] CMsgGCGiftedItems gifter_steam_id * @property {boolean|null} [was_random_person] CMsgGCGiftedItems was_random_person * @property {Array.|null} [recipient_account_ids] CMsgGCGiftedItems recipient_account_ids + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCGiftedItems. + * @exports ICMsgGCGiftedItems + * @interface ICMsgGCGiftedItems + * @augments CMsgGCGiftedItems.$Properties + * @deprecated Use CMsgGCGiftedItems.$Properties instead. + */ + + /** + * Shape of a CMsgGCGiftedItems. + * @typedef {CMsgGCGiftedItems.$Properties} CMsgGCGiftedItems.$Shape */ /** * Constructs a new CMsgGCGiftedItems. * @exports CMsgGCGiftedItems * @classdesc Represents a CMsgGCGiftedItems. - * @implements ICMsgGCGiftedItems * @constructor - * @param {ICMsgGCGiftedItems=} [properties] Properties to set + * @param {CMsgGCGiftedItems.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCGiftedItems(properties) { + var CMsgGCGiftedItems = function (properties) { this.recipient_account_ids = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCGiftedItems gifter_steam_id. @@ -95085,10 +123049,14 @@ * @function create * @memberof CMsgGCGiftedItems * @static - * @param {ICMsgGCGiftedItems=} [properties] Properties to set + * @param {CMsgGCGiftedItems.$Properties=} [properties] Properties to set * @returns {CMsgGCGiftedItems} CMsgGCGiftedItems instance + * @type {{ + * (properties: CMsgGCGiftedItems.$Shape): CMsgGCGiftedItems & CMsgGCGiftedItems.$Shape; + * (properties?: CMsgGCGiftedItems.$Properties): CMsgGCGiftedItems; + * }} */ - CMsgGCGiftedItems.create = function create(properties) { + CMsgGCGiftedItems.create = function(properties) { return new CMsgGCGiftedItems(properties); }; @@ -95097,20 +123065,27 @@ * @function encode * @memberof CMsgGCGiftedItems * @static - * @param {ICMsgGCGiftedItems} message CMsgGCGiftedItems message or plain object to encode + * @param {CMsgGCGiftedItems.$Properties} message CMsgGCGiftedItems message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGiftedItems.encode = function encode(message, writer) { + CMsgGCGiftedItems.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gifter_steam_id != null && Object.hasOwnProperty.call(message, "gifter_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gifter_steam_id != null && $Object.hasOwnProperty.call(message, "gifter_steam_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.gifter_steam_id); - if (message.was_random_person != null && Object.hasOwnProperty.call(message, "was_random_person")) + if (message.was_random_person != null && $Object.hasOwnProperty.call(message, "was_random_person")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.was_random_person); if (message.recipient_account_ids != null && message.recipient_account_ids.length) for (var i = 0; i < message.recipient_account_ids.length; ++i) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.recipient_account_ids[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -95119,12 +123094,12 @@ * @function encodeDelimited * @memberof CMsgGCGiftedItems * @static - * @param {ICMsgGCGiftedItems} message CMsgGCGiftedItems message or plain object to encode + * @param {CMsgGCGiftedItems.$Properties} message CMsgGCGiftedItems message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCGiftedItems.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCGiftedItems.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -95134,38 +123109,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCGiftedItems} CMsgGCGiftedItems + * @returns {CMsgGCGiftedItems & CMsgGCGiftedItems.$Shape} CMsgGCGiftedItems * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGiftedItems.decode = function decode(reader, length) { + CMsgGCGiftedItems.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCGiftedItems(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCGiftedItems(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gifter_steam_id = reader.uint64(); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - message.was_random_person = reader.bool(); - break; - case 3: - if (!(message.recipient_account_ids && message.recipient_account_ids.length)) - message.recipient_account_ids = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.recipient_account_ids.push(reader.uint32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gifter_steam_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.was_random_person = reader.bool(); + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.recipient_account_ids && message.recipient_account_ids.length)) + message.recipient_account_ids = []; + reader.uint32s(message.recipient_account_ids); + continue; + } + if (wireType !== 0) + break; + if (!(message.recipient_account_ids && message.recipient_account_ids.length)) + message.recipient_account_ids = []; message.recipient_account_ids.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -95175,11 +123174,11 @@ * @memberof CMsgGCGiftedItems * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCGiftedItems} CMsgGCGiftedItems + * @returns {CMsgGCGiftedItems & CMsgGCGiftedItems.$Shape} CMsgGCGiftedItems * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCGiftedItems.decodeDelimited = function decodeDelimited(reader) { + CMsgGCGiftedItems.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -95193,17 +123192,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCGiftedItems.verify = function verify(message) { + CMsgGCGiftedItems.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gifter_steam_id != null && message.hasOwnProperty("gifter_steam_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gifter_steam_id != null && $Object.hasOwnProperty.call(message, "gifter_steam_id")) if (!$util.isInteger(message.gifter_steam_id) && !(message.gifter_steam_id && $util.isInteger(message.gifter_steam_id.low) && $util.isInteger(message.gifter_steam_id.high))) return "gifter_steam_id: integer|Long expected"; - if (message.was_random_person != null && message.hasOwnProperty("was_random_person")) + if (message.was_random_person != null && $Object.hasOwnProperty.call(message, "was_random_person")) if (typeof message.was_random_person !== "boolean") return "was_random_person: boolean expected"; - if (message.recipient_account_ids != null && message.hasOwnProperty("recipient_account_ids")) { - if (!Array.isArray(message.recipient_account_ids)) + if (message.recipient_account_ids != null && $Object.hasOwnProperty.call(message, "recipient_account_ids")) { + if (!$Array.isArray(message.recipient_account_ids)) return "recipient_account_ids: array expected"; for (var i = 0; i < message.recipient_account_ids.length; ++i) if (!$util.isInteger(message.recipient_account_ids[i])) @@ -95220,25 +123223,31 @@ * @param {Object.} object Plain object * @returns {CMsgGCGiftedItems} CMsgGCGiftedItems */ - CMsgGCGiftedItems.fromObject = function fromObject(object) { + CMsgGCGiftedItems.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCGiftedItems) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCGiftedItems: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCGiftedItems(); if (object.gifter_steam_id != null) if ($util.Long) - (message.gifter_steam_id = $util.Long.fromValue(object.gifter_steam_id)).unsigned = true; + message.gifter_steam_id = $util.Long.fromValue(object.gifter_steam_id, true); else if (typeof object.gifter_steam_id === "string") - message.gifter_steam_id = parseInt(object.gifter_steam_id, 10); + message.gifter_steam_id = $parseInt(object.gifter_steam_id, 10); else if (typeof object.gifter_steam_id === "number") message.gifter_steam_id = object.gifter_steam_id; else if (typeof object.gifter_steam_id === "object") message.gifter_steam_id = new $util.LongBits(object.gifter_steam_id.low >>> 0, object.gifter_steam_id.high >>> 0).toNumber(true); if (object.was_random_person != null) - message.was_random_person = Boolean(object.was_random_person); + message.was_random_person = $Boolean(object.was_random_person); if (object.recipient_account_ids) { - if (!Array.isArray(object.recipient_account_ids)) - throw TypeError(".CMsgGCGiftedItems.recipient_account_ids: array expected"); - message.recipient_account_ids = []; + if (!$Array.isArray(object.recipient_account_ids)) + throw $TypeError(".CMsgGCGiftedItems.recipient_account_ids: array expected"); + message.recipient_account_ids = $Array(object.recipient_account_ids.length); for (var i = 0; i < object.recipient_account_ids.length; ++i) message.recipient_account_ids[i] = object.recipient_account_ids[i] >>> 0; } @@ -95254,29 +123263,35 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCGiftedItems.toObject = function toObject(message, options) { + CMsgGCGiftedItems.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.recipient_account_ids = []; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.gifter_steam_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.gifter_steam_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.gifter_steam_id = options.longs === String ? "0" : 0; + object.gifter_steam_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.was_random_person = false; } - if (message.gifter_steam_id != null && message.hasOwnProperty("gifter_steam_id")) - if (typeof message.gifter_steam_id === "number") - object.gifter_steam_id = options.longs === String ? String(message.gifter_steam_id) : message.gifter_steam_id; + if (message.gifter_steam_id != null && $Object.hasOwnProperty.call(message, "gifter_steam_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.gifter_steam_id = typeof message.gifter_steam_id === "number" ? $BigInt(message.gifter_steam_id) : $util.Long.fromBits(message.gifter_steam_id.low >>> 0, message.gifter_steam_id.high >>> 0, true).toBigInt(); + else if (typeof message.gifter_steam_id === "number") + object.gifter_steam_id = options.longs === $String ? $String(message.gifter_steam_id) : message.gifter_steam_id; else - object.gifter_steam_id = options.longs === String ? $util.Long.prototype.toString.call(message.gifter_steam_id) : options.longs === Number ? new $util.LongBits(message.gifter_steam_id.low >>> 0, message.gifter_steam_id.high >>> 0).toNumber(true) : message.gifter_steam_id; - if (message.was_random_person != null && message.hasOwnProperty("was_random_person")) + object.gifter_steam_id = options.longs === $String ? $util.Long.prototype.toString.call(message.gifter_steam_id) : options.longs === $Number ? new $util.LongBits(message.gifter_steam_id.low >>> 0, message.gifter_steam_id.high >>> 0).toNumber(true) : message.gifter_steam_id; + if (message.was_random_person != null && $Object.hasOwnProperty.call(message, "was_random_person")) object.was_random_person = message.was_random_person; if (message.recipient_account_ids && message.recipient_account_ids.length) { - object.recipient_account_ids = []; + object.recipient_account_ids = $Array(message.recipient_account_ids.length); for (var j = 0; j < message.recipient_account_ids.length; ++j) object.recipient_account_ids[j] = message.recipient_account_ids[j]; } @@ -95290,8 +123305,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCGiftedItems.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCGiftedItems.prototype.toJSON = function() { + return CMsgGCGiftedItems.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCGiftedItems + * @function getTypeUrl + * @memberof CMsgGCGiftedItems + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCGiftedItems.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCGiftedItems"; }; return CMsgGCGiftedItems; @@ -95301,26 +123330,39 @@ /** * Properties of a CMsgGCCollectItem. - * @exports ICMsgGCCollectItem - * @interface ICMsgGCCollectItem + * @typedef {Object} CMsgGCCollectItem.$Properties * @property {number|Long|null} [collection_item_id] CMsgGCCollectItem collection_item_id * @property {number|Long|null} [subject_item_id] CMsgGCCollectItem subject_item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCCollectItem. + * @exports ICMsgGCCollectItem + * @interface ICMsgGCCollectItem + * @augments CMsgGCCollectItem.$Properties + * @deprecated Use CMsgGCCollectItem.$Properties instead. + */ + + /** + * Shape of a CMsgGCCollectItem. + * @typedef {CMsgGCCollectItem.$Properties} CMsgGCCollectItem.$Shape */ /** * Constructs a new CMsgGCCollectItem. * @exports CMsgGCCollectItem * @classdesc Represents a CMsgGCCollectItem. - * @implements ICMsgGCCollectItem * @constructor - * @param {ICMsgGCCollectItem=} [properties] Properties to set + * @param {CMsgGCCollectItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCCollectItem(properties) { + var CMsgGCCollectItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCCollectItem collection_item_id. @@ -95343,10 +123385,14 @@ * @function create * @memberof CMsgGCCollectItem * @static - * @param {ICMsgGCCollectItem=} [properties] Properties to set + * @param {CMsgGCCollectItem.$Properties=} [properties] Properties to set * @returns {CMsgGCCollectItem} CMsgGCCollectItem instance + * @type {{ + * (properties: CMsgGCCollectItem.$Shape): CMsgGCCollectItem & CMsgGCCollectItem.$Shape; + * (properties?: CMsgGCCollectItem.$Properties): CMsgGCCollectItem; + * }} */ - CMsgGCCollectItem.create = function create(properties) { + CMsgGCCollectItem.create = function(properties) { return new CMsgGCCollectItem(properties); }; @@ -95355,17 +123401,24 @@ * @function encode * @memberof CMsgGCCollectItem * @static - * @param {ICMsgGCCollectItem} message CMsgGCCollectItem message or plain object to encode + * @param {CMsgGCCollectItem.$Properties} message CMsgGCCollectItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCollectItem.encode = function encode(message, writer) { + CMsgGCCollectItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.collection_item_id != null && Object.hasOwnProperty.call(message, "collection_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.collection_item_id != null && $Object.hasOwnProperty.call(message, "collection_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.collection_item_id); - if (message.subject_item_id != null && Object.hasOwnProperty.call(message, "subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.subject_item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -95374,12 +123427,12 @@ * @function encodeDelimited * @memberof CMsgGCCollectItem * @static - * @param {ICMsgGCCollectItem} message CMsgGCCollectItem message or plain object to encode + * @param {CMsgGCCollectItem.$Properties} message CMsgGCCollectItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCCollectItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCCollectItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -95389,28 +123442,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCCollectItem} CMsgGCCollectItem + * @returns {CMsgGCCollectItem & CMsgGCCollectItem.$Shape} CMsgGCCollectItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCollectItem.decode = function decode(reader, length) { + CMsgGCCollectItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCCollectItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCCollectItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.collection_item_id = reader.uint64(); - break; - case 2: - message.subject_item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.collection_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.subject_item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -95420,11 +123493,11 @@ * @memberof CMsgGCCollectItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCCollectItem} CMsgGCCollectItem + * @returns {CMsgGCCollectItem & CMsgGCCollectItem.$Shape} CMsgGCCollectItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCCollectItem.decodeDelimited = function decodeDelimited(reader) { + CMsgGCCollectItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -95438,13 +123511,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCCollectItem.verify = function verify(message) { + CMsgGCCollectItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.collection_item_id != null && message.hasOwnProperty("collection_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.collection_item_id != null && $Object.hasOwnProperty.call(message, "collection_item_id")) if (!$util.isInteger(message.collection_item_id) && !(message.collection_item_id && $util.isInteger(message.collection_item_id.low) && $util.isInteger(message.collection_item_id.high))) return "collection_item_id: integer|Long expected"; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) if (!$util.isInteger(message.subject_item_id) && !(message.subject_item_id && $util.isInteger(message.subject_item_id.low) && $util.isInteger(message.subject_item_id.high))) return "subject_item_id: integer|Long expected"; return null; @@ -95458,24 +123535,30 @@ * @param {Object.} object Plain object * @returns {CMsgGCCollectItem} CMsgGCCollectItem */ - CMsgGCCollectItem.fromObject = function fromObject(object) { + CMsgGCCollectItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCCollectItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCCollectItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCCollectItem(); if (object.collection_item_id != null) if ($util.Long) - (message.collection_item_id = $util.Long.fromValue(object.collection_item_id)).unsigned = true; + message.collection_item_id = $util.Long.fromValue(object.collection_item_id, true); else if (typeof object.collection_item_id === "string") - message.collection_item_id = parseInt(object.collection_item_id, 10); + message.collection_item_id = $parseInt(object.collection_item_id, 10); else if (typeof object.collection_item_id === "number") message.collection_item_id = object.collection_item_id; else if (typeof object.collection_item_id === "object") message.collection_item_id = new $util.LongBits(object.collection_item_id.low >>> 0, object.collection_item_id.high >>> 0).toNumber(true); if (object.subject_item_id != null) if ($util.Long) - (message.subject_item_id = $util.Long.fromValue(object.subject_item_id)).unsigned = true; + message.subject_item_id = $util.Long.fromValue(object.subject_item_id, true); else if (typeof object.subject_item_id === "string") - message.subject_item_id = parseInt(object.subject_item_id, 10); + message.subject_item_id = $parseInt(object.subject_item_id, 10); else if (typeof object.subject_item_id === "number") message.subject_item_id = object.subject_item_id; else if (typeof object.subject_item_id === "object") @@ -95492,32 +123575,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCCollectItem.toObject = function toObject(message, options) { + CMsgGCCollectItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.collection_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.collection_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.collection_item_id = options.longs === String ? "0" : 0; + object.collection_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.subject_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.subject_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.subject_item_id = options.longs === String ? "0" : 0; + object.subject_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.collection_item_id != null && message.hasOwnProperty("collection_item_id")) - if (typeof message.collection_item_id === "number") - object.collection_item_id = options.longs === String ? String(message.collection_item_id) : message.collection_item_id; + if (message.collection_item_id != null && $Object.hasOwnProperty.call(message, "collection_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.collection_item_id = typeof message.collection_item_id === "number" ? $BigInt(message.collection_item_id) : $util.Long.fromBits(message.collection_item_id.low >>> 0, message.collection_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.collection_item_id === "number") + object.collection_item_id = options.longs === $String ? $String(message.collection_item_id) : message.collection_item_id; else - object.collection_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.collection_item_id) : options.longs === Number ? new $util.LongBits(message.collection_item_id.low >>> 0, message.collection_item_id.high >>> 0).toNumber(true) : message.collection_item_id; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) - if (typeof message.subject_item_id === "number") - object.subject_item_id = options.longs === String ? String(message.subject_item_id) : message.subject_item_id; + object.collection_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.collection_item_id) : options.longs === $Number ? new $util.LongBits(message.collection_item_id.low >>> 0, message.collection_item_id.high >>> 0).toNumber(true) : message.collection_item_id; + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.subject_item_id = typeof message.subject_item_id === "number" ? $BigInt(message.subject_item_id) : $util.Long.fromBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.subject_item_id === "number") + object.subject_item_id = options.longs === $String ? $String(message.subject_item_id) : message.subject_item_id; else - object.subject_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; + object.subject_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === $Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; return object; }; @@ -95528,8 +123619,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCCollectItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCCollectItem.prototype.toJSON = function() { + return CMsgGCCollectItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCCollectItem + * @function getTypeUrl + * @memberof CMsgGCCollectItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCCollectItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCCollectItem"; }; return CMsgGCCollectItem; @@ -95537,27 +123642,40 @@ $root.CMsgGCClientMarketDataRequest = (function() { + /** + * Properties of a CMsgGCClientMarketDataRequest. + * @typedef {Object} CMsgGCClientMarketDataRequest.$Properties + * @property {number|null} [user_currency] CMsgGCClientMarketDataRequest user_currency + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCClientMarketDataRequest. * @exports ICMsgGCClientMarketDataRequest * @interface ICMsgGCClientMarketDataRequest - * @property {number|null} [user_currency] CMsgGCClientMarketDataRequest user_currency + * @augments CMsgGCClientMarketDataRequest.$Properties + * @deprecated Use CMsgGCClientMarketDataRequest.$Properties instead. + */ + + /** + * Shape of a CMsgGCClientMarketDataRequest. + * @typedef {CMsgGCClientMarketDataRequest.$Properties} CMsgGCClientMarketDataRequest.$Shape */ /** * Constructs a new CMsgGCClientMarketDataRequest. * @exports CMsgGCClientMarketDataRequest * @classdesc Represents a CMsgGCClientMarketDataRequest. - * @implements ICMsgGCClientMarketDataRequest * @constructor - * @param {ICMsgGCClientMarketDataRequest=} [properties] Properties to set + * @param {CMsgGCClientMarketDataRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCClientMarketDataRequest(properties) { + var CMsgGCClientMarketDataRequest = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCClientMarketDataRequest user_currency. @@ -95572,10 +123690,14 @@ * @function create * @memberof CMsgGCClientMarketDataRequest * @static - * @param {ICMsgGCClientMarketDataRequest=} [properties] Properties to set + * @param {CMsgGCClientMarketDataRequest.$Properties=} [properties] Properties to set * @returns {CMsgGCClientMarketDataRequest} CMsgGCClientMarketDataRequest instance + * @type {{ + * (properties: CMsgGCClientMarketDataRequest.$Shape): CMsgGCClientMarketDataRequest & CMsgGCClientMarketDataRequest.$Shape; + * (properties?: CMsgGCClientMarketDataRequest.$Properties): CMsgGCClientMarketDataRequest; + * }} */ - CMsgGCClientMarketDataRequest.create = function create(properties) { + CMsgGCClientMarketDataRequest.create = function(properties) { return new CMsgGCClientMarketDataRequest(properties); }; @@ -95584,15 +123706,22 @@ * @function encode * @memberof CMsgGCClientMarketDataRequest * @static - * @param {ICMsgGCClientMarketDataRequest} message CMsgGCClientMarketDataRequest message or plain object to encode + * @param {CMsgGCClientMarketDataRequest.$Properties} message CMsgGCClientMarketDataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketDataRequest.encode = function encode(message, writer) { + CMsgGCClientMarketDataRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.user_currency != null && Object.hasOwnProperty.call(message, "user_currency")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.user_currency != null && $Object.hasOwnProperty.call(message, "user_currency")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.user_currency); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -95601,12 +123730,12 @@ * @function encodeDelimited * @memberof CMsgGCClientMarketDataRequest * @static - * @param {ICMsgGCClientMarketDataRequest} message CMsgGCClientMarketDataRequest message or plain object to encode + * @param {CMsgGCClientMarketDataRequest.$Properties} message CMsgGCClientMarketDataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketDataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCClientMarketDataRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -95616,25 +123745,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCClientMarketDataRequest} CMsgGCClientMarketDataRequest + * @returns {CMsgGCClientMarketDataRequest & CMsgGCClientMarketDataRequest.$Shape} CMsgGCClientMarketDataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketDataRequest.decode = function decode(reader, length) { + CMsgGCClientMarketDataRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCClientMarketDataRequest(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCClientMarketDataRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.user_currency = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.user_currency = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -95644,11 +123790,11 @@ * @memberof CMsgGCClientMarketDataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCClientMarketDataRequest} CMsgGCClientMarketDataRequest + * @returns {CMsgGCClientMarketDataRequest & CMsgGCClientMarketDataRequest.$Shape} CMsgGCClientMarketDataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketDataRequest.decodeDelimited = function decodeDelimited(reader) { + CMsgGCClientMarketDataRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -95662,10 +123808,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCClientMarketDataRequest.verify = function verify(message) { + CMsgGCClientMarketDataRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.user_currency != null && message.hasOwnProperty("user_currency")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.user_currency != null && $Object.hasOwnProperty.call(message, "user_currency")) if (!$util.isInteger(message.user_currency)) return "user_currency: integer expected"; return null; @@ -95679,9 +123829,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCClientMarketDataRequest} CMsgGCClientMarketDataRequest */ - CMsgGCClientMarketDataRequest.fromObject = function fromObject(object) { + CMsgGCClientMarketDataRequest.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCClientMarketDataRequest) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCClientMarketDataRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCClientMarketDataRequest(); if (object.user_currency != null) message.user_currency = object.user_currency >>> 0; @@ -95697,13 +123853,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCClientMarketDataRequest.toObject = function toObject(message, options) { + CMsgGCClientMarketDataRequest.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.user_currency = 0; - if (message.user_currency != null && message.hasOwnProperty("user_currency")) + if (message.user_currency != null && $Object.hasOwnProperty.call(message, "user_currency")) object.user_currency = message.user_currency; return object; }; @@ -95715,8 +123875,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCClientMarketDataRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCClientMarketDataRequest.prototype.toJSON = function() { + return CMsgGCClientMarketDataRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCClientMarketDataRequest + * @function getTypeUrl + * @memberof CMsgGCClientMarketDataRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCClientMarketDataRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCClientMarketDataRequest"; }; return CMsgGCClientMarketDataRequest; @@ -95726,28 +123900,41 @@ /** * Properties of a CMsgGCClientMarketDataEntry. - * @exports ICMsgGCClientMarketDataEntry - * @interface ICMsgGCClientMarketDataEntry + * @typedef {Object} CMsgGCClientMarketDataEntry.$Properties * @property {number|null} [item_def_index] CMsgGCClientMarketDataEntry item_def_index * @property {number|null} [item_quality] CMsgGCClientMarketDataEntry item_quality * @property {number|null} [item_sell_listings] CMsgGCClientMarketDataEntry item_sell_listings * @property {number|null} [price_in_local_currency] CMsgGCClientMarketDataEntry price_in_local_currency + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgGCClientMarketDataEntry. + * @exports ICMsgGCClientMarketDataEntry + * @interface ICMsgGCClientMarketDataEntry + * @augments CMsgGCClientMarketDataEntry.$Properties + * @deprecated Use CMsgGCClientMarketDataEntry.$Properties instead. + */ + + /** + * Shape of a CMsgGCClientMarketDataEntry. + * @typedef {CMsgGCClientMarketDataEntry.$Properties} CMsgGCClientMarketDataEntry.$Shape */ /** * Constructs a new CMsgGCClientMarketDataEntry. * @exports CMsgGCClientMarketDataEntry * @classdesc Represents a CMsgGCClientMarketDataEntry. - * @implements ICMsgGCClientMarketDataEntry * @constructor - * @param {ICMsgGCClientMarketDataEntry=} [properties] Properties to set + * @param {CMsgGCClientMarketDataEntry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCClientMarketDataEntry(properties) { + var CMsgGCClientMarketDataEntry = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCClientMarketDataEntry item_def_index. @@ -95786,10 +123973,14 @@ * @function create * @memberof CMsgGCClientMarketDataEntry * @static - * @param {ICMsgGCClientMarketDataEntry=} [properties] Properties to set + * @param {CMsgGCClientMarketDataEntry.$Properties=} [properties] Properties to set * @returns {CMsgGCClientMarketDataEntry} CMsgGCClientMarketDataEntry instance + * @type {{ + * (properties: CMsgGCClientMarketDataEntry.$Shape): CMsgGCClientMarketDataEntry & CMsgGCClientMarketDataEntry.$Shape; + * (properties?: CMsgGCClientMarketDataEntry.$Properties): CMsgGCClientMarketDataEntry; + * }} */ - CMsgGCClientMarketDataEntry.create = function create(properties) { + CMsgGCClientMarketDataEntry.create = function(properties) { return new CMsgGCClientMarketDataEntry(properties); }; @@ -95798,21 +123989,28 @@ * @function encode * @memberof CMsgGCClientMarketDataEntry * @static - * @param {ICMsgGCClientMarketDataEntry} message CMsgGCClientMarketDataEntry message or plain object to encode + * @param {CMsgGCClientMarketDataEntry.$Properties} message CMsgGCClientMarketDataEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketDataEntry.encode = function encode(message, writer) { + CMsgGCClientMarketDataEntry.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_def_index != null && Object.hasOwnProperty.call(message, "item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.item_def_index); - if (message.item_quality != null && Object.hasOwnProperty.call(message, "item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.item_quality); - if (message.item_sell_listings != null && Object.hasOwnProperty.call(message, "item_sell_listings")) + if (message.item_sell_listings != null && $Object.hasOwnProperty.call(message, "item_sell_listings")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.item_sell_listings); - if (message.price_in_local_currency != null && Object.hasOwnProperty.call(message, "price_in_local_currency")) + if (message.price_in_local_currency != null && $Object.hasOwnProperty.call(message, "price_in_local_currency")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.price_in_local_currency); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -95821,12 +124019,12 @@ * @function encodeDelimited * @memberof CMsgGCClientMarketDataEntry * @static - * @param {ICMsgGCClientMarketDataEntry} message CMsgGCClientMarketDataEntry message or plain object to encode + * @param {CMsgGCClientMarketDataEntry.$Properties} message CMsgGCClientMarketDataEntry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketDataEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCClientMarketDataEntry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -95836,34 +124034,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCClientMarketDataEntry} CMsgGCClientMarketDataEntry + * @returns {CMsgGCClientMarketDataEntry & CMsgGCClientMarketDataEntry.$Shape} CMsgGCClientMarketDataEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketDataEntry.decode = function decode(reader, length) { + CMsgGCClientMarketDataEntry.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCClientMarketDataEntry(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCClientMarketDataEntry(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_def_index = reader.uint32(); - break; - case 2: - message.item_quality = reader.uint32(); - break; - case 3: - message.item_sell_listings = reader.uint32(); - break; - case 4: - message.price_in_local_currency = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_def_index = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_quality = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.item_sell_listings = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.price_in_local_currency = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -95873,11 +124097,11 @@ * @memberof CMsgGCClientMarketDataEntry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCClientMarketDataEntry} CMsgGCClientMarketDataEntry + * @returns {CMsgGCClientMarketDataEntry & CMsgGCClientMarketDataEntry.$Shape} CMsgGCClientMarketDataEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketDataEntry.decodeDelimited = function decodeDelimited(reader) { + CMsgGCClientMarketDataEntry.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -95891,19 +124115,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCClientMarketDataEntry.verify = function verify(message) { + CMsgGCClientMarketDataEntry.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) if (!$util.isInteger(message.item_def_index)) return "item_def_index: integer expected"; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) if (!$util.isInteger(message.item_quality)) return "item_quality: integer expected"; - if (message.item_sell_listings != null && message.hasOwnProperty("item_sell_listings")) + if (message.item_sell_listings != null && $Object.hasOwnProperty.call(message, "item_sell_listings")) if (!$util.isInteger(message.item_sell_listings)) return "item_sell_listings: integer expected"; - if (message.price_in_local_currency != null && message.hasOwnProperty("price_in_local_currency")) + if (message.price_in_local_currency != null && $Object.hasOwnProperty.call(message, "price_in_local_currency")) if (!$util.isInteger(message.price_in_local_currency)) return "price_in_local_currency: integer expected"; return null; @@ -95917,9 +124145,15 @@ * @param {Object.} object Plain object * @returns {CMsgGCClientMarketDataEntry} CMsgGCClientMarketDataEntry */ - CMsgGCClientMarketDataEntry.fromObject = function fromObject(object) { + CMsgGCClientMarketDataEntry.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCClientMarketDataEntry) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCClientMarketDataEntry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCClientMarketDataEntry(); if (object.item_def_index != null) message.item_def_index = object.item_def_index >>> 0; @@ -95941,9 +124175,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCClientMarketDataEntry.toObject = function toObject(message, options) { + CMsgGCClientMarketDataEntry.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.item_def_index = 0; @@ -95951,13 +124189,13 @@ object.item_sell_listings = 0; object.price_in_local_currency = 0; } - if (message.item_def_index != null && message.hasOwnProperty("item_def_index")) + if (message.item_def_index != null && $Object.hasOwnProperty.call(message, "item_def_index")) object.item_def_index = message.item_def_index; - if (message.item_quality != null && message.hasOwnProperty("item_quality")) + if (message.item_quality != null && $Object.hasOwnProperty.call(message, "item_quality")) object.item_quality = message.item_quality; - if (message.item_sell_listings != null && message.hasOwnProperty("item_sell_listings")) + if (message.item_sell_listings != null && $Object.hasOwnProperty.call(message, "item_sell_listings")) object.item_sell_listings = message.item_sell_listings; - if (message.price_in_local_currency != null && message.hasOwnProperty("price_in_local_currency")) + if (message.price_in_local_currency != null && $Object.hasOwnProperty.call(message, "price_in_local_currency")) object.price_in_local_currency = message.price_in_local_currency; return object; }; @@ -95969,8 +124207,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCClientMarketDataEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCClientMarketDataEntry.prototype.toJSON = function() { + return CMsgGCClientMarketDataEntry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCClientMarketDataEntry + * @function getTypeUrl + * @memberof CMsgGCClientMarketDataEntry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCClientMarketDataEntry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCClientMarketDataEntry"; }; return CMsgGCClientMarketDataEntry; @@ -95978,32 +124230,45 @@ $root.CMsgGCClientMarketData = (function() { + /** + * Properties of a CMsgGCClientMarketData. + * @typedef {Object} CMsgGCClientMarketData.$Properties + * @property {Array.|null} [entries] CMsgGCClientMarketData entries + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgGCClientMarketData. * @exports ICMsgGCClientMarketData * @interface ICMsgGCClientMarketData - * @property {Array.|null} [entries] CMsgGCClientMarketData entries + * @augments CMsgGCClientMarketData.$Properties + * @deprecated Use CMsgGCClientMarketData.$Properties instead. + */ + + /** + * Shape of a CMsgGCClientMarketData. + * @typedef {CMsgGCClientMarketData.$Properties} CMsgGCClientMarketData.$Shape */ /** * Constructs a new CMsgGCClientMarketData. * @exports CMsgGCClientMarketData * @classdesc Represents a CMsgGCClientMarketData. - * @implements ICMsgGCClientMarketData * @constructor - * @param {ICMsgGCClientMarketData=} [properties] Properties to set + * @param {CMsgGCClientMarketData.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgGCClientMarketData(properties) { + var CMsgGCClientMarketData = function (properties) { this.entries = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgGCClientMarketData entries. - * @member {Array.} entries + * @member {Array.} entries * @memberof CMsgGCClientMarketData * @instance */ @@ -96014,10 +124279,14 @@ * @function create * @memberof CMsgGCClientMarketData * @static - * @param {ICMsgGCClientMarketData=} [properties] Properties to set + * @param {CMsgGCClientMarketData.$Properties=} [properties] Properties to set * @returns {CMsgGCClientMarketData} CMsgGCClientMarketData instance + * @type {{ + * (properties: CMsgGCClientMarketData.$Shape): CMsgGCClientMarketData & CMsgGCClientMarketData.$Shape; + * (properties?: CMsgGCClientMarketData.$Properties): CMsgGCClientMarketData; + * }} */ - CMsgGCClientMarketData.create = function create(properties) { + CMsgGCClientMarketData.create = function(properties) { return new CMsgGCClientMarketData(properties); }; @@ -96026,16 +124295,23 @@ * @function encode * @memberof CMsgGCClientMarketData * @static - * @param {ICMsgGCClientMarketData} message CMsgGCClientMarketData message or plain object to encode + * @param {CMsgGCClientMarketData.$Properties} message CMsgGCClientMarketData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketData.encode = function encode(message, writer) { + CMsgGCClientMarketData.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.CMsgGCClientMarketDataEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgGCClientMarketDataEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -96044,12 +124320,12 @@ * @function encodeDelimited * @memberof CMsgGCClientMarketData * @static - * @param {ICMsgGCClientMarketData} message CMsgGCClientMarketData message or plain object to encode + * @param {CMsgGCClientMarketData.$Properties} message CMsgGCClientMarketData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgGCClientMarketData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgGCClientMarketData.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -96059,27 +124335,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgGCClientMarketData} CMsgGCClientMarketData + * @returns {CMsgGCClientMarketData & CMsgGCClientMarketData.$Shape} CMsgGCClientMarketData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketData.decode = function decode(reader, length) { + CMsgGCClientMarketData.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCClientMarketData(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgGCClientMarketData(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.CMsgGCClientMarketDataEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.CMsgGCClientMarketDataEntry.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -96089,11 +124382,11 @@ * @memberof CMsgGCClientMarketData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgGCClientMarketData} CMsgGCClientMarketData + * @returns {CMsgGCClientMarketData & CMsgGCClientMarketData.$Shape} CMsgGCClientMarketData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgGCClientMarketData.decodeDelimited = function decodeDelimited(reader) { + CMsgGCClientMarketData.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -96107,14 +124400,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgGCClientMarketData.verify = function verify(message) { + CMsgGCClientMarketData.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { - var error = $root.CMsgGCClientMarketDataEntry.verify(message.entries[i]); + var error = $root.CMsgGCClientMarketDataEntry.verify(message.entries[i], _depth + 1); if (error) return "entries." + error; } @@ -96130,18 +124427,24 @@ * @param {Object.} object Plain object * @returns {CMsgGCClientMarketData} CMsgGCClientMarketData */ - CMsgGCClientMarketData.fromObject = function fromObject(object) { + CMsgGCClientMarketData.fromObject = function (object, _depth) { if (object instanceof $root.CMsgGCClientMarketData) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgGCClientMarketData: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgGCClientMarketData(); if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".CMsgGCClientMarketData.entries: array expected"); - message.entries = []; + if (!$Array.isArray(object.entries)) + throw $TypeError(".CMsgGCClientMarketData.entries: array expected"); + message.entries = $Array(object.entries.length); for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".CMsgGCClientMarketData.entries: object expected"); - message.entries[i] = $root.CMsgGCClientMarketDataEntry.fromObject(object.entries[i]); + if (!$util.isObject(object.entries[i])) + throw $TypeError(".CMsgGCClientMarketData.entries: object expected"); + message.entries[i] = $root.CMsgGCClientMarketDataEntry.fromObject(object.entries[i], _depth + 1); } } return message; @@ -96156,16 +124459,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgGCClientMarketData.toObject = function toObject(message, options) { + CMsgGCClientMarketData.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { - object.entries = []; + object.entries = $Array(message.entries.length); for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.CMsgGCClientMarketDataEntry.toObject(message.entries[j], options); + object.entries[j] = $root.CMsgGCClientMarketDataEntry.toObject(message.entries[j], options, _depth + 1); } return object; }; @@ -96177,8 +124484,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgGCClientMarketData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgGCClientMarketData.prototype.toJSON = function() { + return CMsgGCClientMarketData.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgGCClientMarketData + * @function getTypeUrl + * @memberof CMsgGCClientMarketData + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgGCClientMarketData.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgGCClientMarketData"; }; return CMsgGCClientMarketData; @@ -96188,26 +124509,39 @@ /** * Properties of a CMsgApplyToolToItem. - * @exports ICMsgApplyToolToItem - * @interface ICMsgApplyToolToItem + * @typedef {Object} CMsgApplyToolToItem.$Properties * @property {number|Long|null} [tool_item_id] CMsgApplyToolToItem tool_item_id * @property {number|Long|null} [subject_item_id] CMsgApplyToolToItem subject_item_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyToolToItem. + * @exports ICMsgApplyToolToItem + * @interface ICMsgApplyToolToItem + * @augments CMsgApplyToolToItem.$Properties + * @deprecated Use CMsgApplyToolToItem.$Properties instead. + */ + + /** + * Shape of a CMsgApplyToolToItem. + * @typedef {CMsgApplyToolToItem.$Properties} CMsgApplyToolToItem.$Shape */ /** * Constructs a new CMsgApplyToolToItem. * @exports CMsgApplyToolToItem * @classdesc Represents a CMsgApplyToolToItem. - * @implements ICMsgApplyToolToItem * @constructor - * @param {ICMsgApplyToolToItem=} [properties] Properties to set + * @param {CMsgApplyToolToItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyToolToItem(properties) { + var CMsgApplyToolToItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyToolToItem tool_item_id. @@ -96230,10 +124564,14 @@ * @function create * @memberof CMsgApplyToolToItem * @static - * @param {ICMsgApplyToolToItem=} [properties] Properties to set + * @param {CMsgApplyToolToItem.$Properties=} [properties] Properties to set * @returns {CMsgApplyToolToItem} CMsgApplyToolToItem instance + * @type {{ + * (properties: CMsgApplyToolToItem.$Shape): CMsgApplyToolToItem & CMsgApplyToolToItem.$Shape; + * (properties?: CMsgApplyToolToItem.$Properties): CMsgApplyToolToItem; + * }} */ - CMsgApplyToolToItem.create = function create(properties) { + CMsgApplyToolToItem.create = function(properties) { return new CMsgApplyToolToItem(properties); }; @@ -96242,17 +124580,24 @@ * @function encode * @memberof CMsgApplyToolToItem * @static - * @param {ICMsgApplyToolToItem} message CMsgApplyToolToItem message or plain object to encode + * @param {CMsgApplyToolToItem.$Properties} message CMsgApplyToolToItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyToolToItem.encode = function encode(message, writer) { + CMsgApplyToolToItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.tool_item_id != null && Object.hasOwnProperty.call(message, "tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.tool_item_id); - if (message.subject_item_id != null && Object.hasOwnProperty.call(message, "subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.subject_item_id); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -96261,12 +124606,12 @@ * @function encodeDelimited * @memberof CMsgApplyToolToItem * @static - * @param {ICMsgApplyToolToItem} message CMsgApplyToolToItem message or plain object to encode + * @param {CMsgApplyToolToItem.$Properties} message CMsgApplyToolToItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyToolToItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyToolToItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -96276,28 +124621,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyToolToItem} CMsgApplyToolToItem + * @returns {CMsgApplyToolToItem & CMsgApplyToolToItem.$Shape} CMsgApplyToolToItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyToolToItem.decode = function decode(reader, length) { + CMsgApplyToolToItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyToolToItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyToolToItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tool_item_id = reader.uint64(); - break; - case 2: - message.subject_item_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.tool_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.subject_item_id = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -96307,11 +124672,11 @@ * @memberof CMsgApplyToolToItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyToolToItem} CMsgApplyToolToItem + * @returns {CMsgApplyToolToItem & CMsgApplyToolToItem.$Shape} CMsgApplyToolToItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyToolToItem.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyToolToItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -96325,13 +124690,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyToolToItem.verify = function verify(message) { + CMsgApplyToolToItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) if (!$util.isInteger(message.tool_item_id) && !(message.tool_item_id && $util.isInteger(message.tool_item_id.low) && $util.isInteger(message.tool_item_id.high))) return "tool_item_id: integer|Long expected"; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) if (!$util.isInteger(message.subject_item_id) && !(message.subject_item_id && $util.isInteger(message.subject_item_id.low) && $util.isInteger(message.subject_item_id.high))) return "subject_item_id: integer|Long expected"; return null; @@ -96345,24 +124714,30 @@ * @param {Object.} object Plain object * @returns {CMsgApplyToolToItem} CMsgApplyToolToItem */ - CMsgApplyToolToItem.fromObject = function fromObject(object) { + CMsgApplyToolToItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyToolToItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyToolToItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyToolToItem(); if (object.tool_item_id != null) if ($util.Long) - (message.tool_item_id = $util.Long.fromValue(object.tool_item_id)).unsigned = true; + message.tool_item_id = $util.Long.fromValue(object.tool_item_id, true); else if (typeof object.tool_item_id === "string") - message.tool_item_id = parseInt(object.tool_item_id, 10); + message.tool_item_id = $parseInt(object.tool_item_id, 10); else if (typeof object.tool_item_id === "number") message.tool_item_id = object.tool_item_id; else if (typeof object.tool_item_id === "object") message.tool_item_id = new $util.LongBits(object.tool_item_id.low >>> 0, object.tool_item_id.high >>> 0).toNumber(true); if (object.subject_item_id != null) if ($util.Long) - (message.subject_item_id = $util.Long.fromValue(object.subject_item_id)).unsigned = true; + message.subject_item_id = $util.Long.fromValue(object.subject_item_id, true); else if (typeof object.subject_item_id === "string") - message.subject_item_id = parseInt(object.subject_item_id, 10); + message.subject_item_id = $parseInt(object.subject_item_id, 10); else if (typeof object.subject_item_id === "number") message.subject_item_id = object.subject_item_id; else if (typeof object.subject_item_id === "object") @@ -96379,32 +124754,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyToolToItem.toObject = function toObject(message, options) { + CMsgApplyToolToItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.tool_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.tool_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.tool_item_id = options.longs === String ? "0" : 0; + object.tool_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.subject_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.subject_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.subject_item_id = options.longs === String ? "0" : 0; + object.subject_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) - if (typeof message.tool_item_id === "number") - object.tool_item_id = options.longs === String ? String(message.tool_item_id) : message.tool_item_id; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.tool_item_id = typeof message.tool_item_id === "number" ? $BigInt(message.tool_item_id) : $util.Long.fromBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.tool_item_id === "number") + object.tool_item_id = options.longs === $String ? $String(message.tool_item_id) : message.tool_item_id; else - object.tool_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) - if (typeof message.subject_item_id === "number") - object.subject_item_id = options.longs === String ? String(message.subject_item_id) : message.subject_item_id; + object.tool_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === $Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.subject_item_id = typeof message.subject_item_id === "number" ? $BigInt(message.subject_item_id) : $util.Long.fromBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.subject_item_id === "number") + object.subject_item_id = options.longs === $String ? $String(message.subject_item_id) : message.subject_item_id; else - object.subject_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; + object.subject_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === $Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; return object; }; @@ -96415,8 +124798,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyToolToItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyToolToItem.prototype.toJSON = function() { + return CMsgApplyToolToItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyToolToItem + * @function getTypeUrl + * @memberof CMsgApplyToolToItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyToolToItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyToolToItem"; }; return CMsgApplyToolToItem; @@ -96426,26 +124823,39 @@ /** * Properties of a CMsgApplyToolToBaseItem. - * @exports ICMsgApplyToolToBaseItem - * @interface ICMsgApplyToolToBaseItem + * @typedef {Object} CMsgApplyToolToBaseItem.$Properties * @property {number|Long|null} [tool_item_id] CMsgApplyToolToBaseItem tool_item_id * @property {number|null} [baseitem_def_index] CMsgApplyToolToBaseItem baseitem_def_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgApplyToolToBaseItem. + * @exports ICMsgApplyToolToBaseItem + * @interface ICMsgApplyToolToBaseItem + * @augments CMsgApplyToolToBaseItem.$Properties + * @deprecated Use CMsgApplyToolToBaseItem.$Properties instead. + */ + + /** + * Shape of a CMsgApplyToolToBaseItem. + * @typedef {CMsgApplyToolToBaseItem.$Properties} CMsgApplyToolToBaseItem.$Shape */ /** * Constructs a new CMsgApplyToolToBaseItem. * @exports CMsgApplyToolToBaseItem * @classdesc Represents a CMsgApplyToolToBaseItem. - * @implements ICMsgApplyToolToBaseItem * @constructor - * @param {ICMsgApplyToolToBaseItem=} [properties] Properties to set + * @param {CMsgApplyToolToBaseItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgApplyToolToBaseItem(properties) { + var CMsgApplyToolToBaseItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgApplyToolToBaseItem tool_item_id. @@ -96468,10 +124878,14 @@ * @function create * @memberof CMsgApplyToolToBaseItem * @static - * @param {ICMsgApplyToolToBaseItem=} [properties] Properties to set + * @param {CMsgApplyToolToBaseItem.$Properties=} [properties] Properties to set * @returns {CMsgApplyToolToBaseItem} CMsgApplyToolToBaseItem instance + * @type {{ + * (properties: CMsgApplyToolToBaseItem.$Shape): CMsgApplyToolToBaseItem & CMsgApplyToolToBaseItem.$Shape; + * (properties?: CMsgApplyToolToBaseItem.$Properties): CMsgApplyToolToBaseItem; + * }} */ - CMsgApplyToolToBaseItem.create = function create(properties) { + CMsgApplyToolToBaseItem.create = function(properties) { return new CMsgApplyToolToBaseItem(properties); }; @@ -96480,17 +124894,24 @@ * @function encode * @memberof CMsgApplyToolToBaseItem * @static - * @param {ICMsgApplyToolToBaseItem} message CMsgApplyToolToBaseItem message or plain object to encode + * @param {CMsgApplyToolToBaseItem.$Properties} message CMsgApplyToolToBaseItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyToolToBaseItem.encode = function encode(message, writer) { + CMsgApplyToolToBaseItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.tool_item_id != null && Object.hasOwnProperty.call(message, "tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.tool_item_id); - if (message.baseitem_def_index != null && Object.hasOwnProperty.call(message, "baseitem_def_index")) + if (message.baseitem_def_index != null && $Object.hasOwnProperty.call(message, "baseitem_def_index")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.baseitem_def_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -96499,12 +124920,12 @@ * @function encodeDelimited * @memberof CMsgApplyToolToBaseItem * @static - * @param {ICMsgApplyToolToBaseItem} message CMsgApplyToolToBaseItem message or plain object to encode + * @param {CMsgApplyToolToBaseItem.$Properties} message CMsgApplyToolToBaseItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgApplyToolToBaseItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgApplyToolToBaseItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -96514,28 +124935,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgApplyToolToBaseItem} CMsgApplyToolToBaseItem + * @returns {CMsgApplyToolToBaseItem & CMsgApplyToolToBaseItem.$Shape} CMsgApplyToolToBaseItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyToolToBaseItem.decode = function decode(reader, length) { + CMsgApplyToolToBaseItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgApplyToolToBaseItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgApplyToolToBaseItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tool_item_id = reader.uint64(); - break; - case 2: - message.baseitem_def_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.tool_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.baseitem_def_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -96545,11 +124986,11 @@ * @memberof CMsgApplyToolToBaseItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgApplyToolToBaseItem} CMsgApplyToolToBaseItem + * @returns {CMsgApplyToolToBaseItem & CMsgApplyToolToBaseItem.$Shape} CMsgApplyToolToBaseItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgApplyToolToBaseItem.decodeDelimited = function decodeDelimited(reader) { + CMsgApplyToolToBaseItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -96563,13 +125004,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgApplyToolToBaseItem.verify = function verify(message) { + CMsgApplyToolToBaseItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) if (!$util.isInteger(message.tool_item_id) && !(message.tool_item_id && $util.isInteger(message.tool_item_id.low) && $util.isInteger(message.tool_item_id.high))) return "tool_item_id: integer|Long expected"; - if (message.baseitem_def_index != null && message.hasOwnProperty("baseitem_def_index")) + if (message.baseitem_def_index != null && $Object.hasOwnProperty.call(message, "baseitem_def_index")) if (!$util.isInteger(message.baseitem_def_index)) return "baseitem_def_index: integer expected"; return null; @@ -96583,15 +125028,21 @@ * @param {Object.} object Plain object * @returns {CMsgApplyToolToBaseItem} CMsgApplyToolToBaseItem */ - CMsgApplyToolToBaseItem.fromObject = function fromObject(object) { + CMsgApplyToolToBaseItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgApplyToolToBaseItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgApplyToolToBaseItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgApplyToolToBaseItem(); if (object.tool_item_id != null) if ($util.Long) - (message.tool_item_id = $util.Long.fromValue(object.tool_item_id)).unsigned = true; + message.tool_item_id = $util.Long.fromValue(object.tool_item_id, true); else if (typeof object.tool_item_id === "string") - message.tool_item_id = parseInt(object.tool_item_id, 10); + message.tool_item_id = $parseInt(object.tool_item_id, 10); else if (typeof object.tool_item_id === "number") message.tool_item_id = object.tool_item_id; else if (typeof object.tool_item_id === "object") @@ -96610,24 +125061,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgApplyToolToBaseItem.toObject = function toObject(message, options) { + CMsgApplyToolToBaseItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.tool_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.tool_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.tool_item_id = options.longs === String ? "0" : 0; + object.tool_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.baseitem_def_index = 0; } - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) - if (typeof message.tool_item_id === "number") - object.tool_item_id = options.longs === String ? String(message.tool_item_id) : message.tool_item_id; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.tool_item_id = typeof message.tool_item_id === "number" ? $BigInt(message.tool_item_id) : $util.Long.fromBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.tool_item_id === "number") + object.tool_item_id = options.longs === $String ? $String(message.tool_item_id) : message.tool_item_id; else - object.tool_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; - if (message.baseitem_def_index != null && message.hasOwnProperty("baseitem_def_index")) + object.tool_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === $Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; + if (message.baseitem_def_index != null && $Object.hasOwnProperty.call(message, "baseitem_def_index")) object.baseitem_def_index = message.baseitem_def_index; return object; }; @@ -96639,8 +125096,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgApplyToolToBaseItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgApplyToolToBaseItem.prototype.toJSON = function() { + return CMsgApplyToolToBaseItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgApplyToolToBaseItem + * @function getTypeUrl + * @memberof CMsgApplyToolToBaseItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgApplyToolToBaseItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgApplyToolToBaseItem"; }; return CMsgApplyToolToBaseItem; @@ -96650,26 +125121,39 @@ /** * Properties of a CMsgRecipeComponent. - * @exports ICMsgRecipeComponent - * @interface ICMsgRecipeComponent + * @typedef {Object} CMsgRecipeComponent.$Properties * @property {number|Long|null} [subject_item_id] CMsgRecipeComponent subject_item_id * @property {number|Long|null} [attribute_index] CMsgRecipeComponent attribute_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgRecipeComponent. + * @exports ICMsgRecipeComponent + * @interface ICMsgRecipeComponent + * @augments CMsgRecipeComponent.$Properties + * @deprecated Use CMsgRecipeComponent.$Properties instead. + */ + + /** + * Shape of a CMsgRecipeComponent. + * @typedef {CMsgRecipeComponent.$Properties} CMsgRecipeComponent.$Shape */ /** * Constructs a new CMsgRecipeComponent. * @exports CMsgRecipeComponent * @classdesc Represents a CMsgRecipeComponent. - * @implements ICMsgRecipeComponent * @constructor - * @param {ICMsgRecipeComponent=} [properties] Properties to set + * @param {CMsgRecipeComponent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgRecipeComponent(properties) { + var CMsgRecipeComponent = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgRecipeComponent subject_item_id. @@ -96692,10 +125176,14 @@ * @function create * @memberof CMsgRecipeComponent * @static - * @param {ICMsgRecipeComponent=} [properties] Properties to set + * @param {CMsgRecipeComponent.$Properties=} [properties] Properties to set * @returns {CMsgRecipeComponent} CMsgRecipeComponent instance + * @type {{ + * (properties: CMsgRecipeComponent.$Shape): CMsgRecipeComponent & CMsgRecipeComponent.$Shape; + * (properties?: CMsgRecipeComponent.$Properties): CMsgRecipeComponent; + * }} */ - CMsgRecipeComponent.create = function create(properties) { + CMsgRecipeComponent.create = function(properties) { return new CMsgRecipeComponent(properties); }; @@ -96704,17 +125192,24 @@ * @function encode * @memberof CMsgRecipeComponent * @static - * @param {ICMsgRecipeComponent} message CMsgRecipeComponent message or plain object to encode + * @param {CMsgRecipeComponent.$Properties} message CMsgRecipeComponent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRecipeComponent.encode = function encode(message, writer) { + CMsgRecipeComponent.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.subject_item_id != null && Object.hasOwnProperty.call(message, "subject_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.subject_item_id); - if (message.attribute_index != null && Object.hasOwnProperty.call(message, "attribute_index")) + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.attribute_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -96723,12 +125218,12 @@ * @function encodeDelimited * @memberof CMsgRecipeComponent * @static - * @param {ICMsgRecipeComponent} message CMsgRecipeComponent message or plain object to encode + * @param {CMsgRecipeComponent.$Properties} message CMsgRecipeComponent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgRecipeComponent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgRecipeComponent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -96738,28 +125233,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgRecipeComponent} CMsgRecipeComponent + * @returns {CMsgRecipeComponent & CMsgRecipeComponent.$Shape} CMsgRecipeComponent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRecipeComponent.decode = function decode(reader, length) { + CMsgRecipeComponent.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgRecipeComponent(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgRecipeComponent(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.subject_item_id = reader.uint64(); - break; - case 2: - message.attribute_index = reader.uint64(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.subject_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.attribute_index = reader.uint64(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -96769,11 +125284,11 @@ * @memberof CMsgRecipeComponent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgRecipeComponent} CMsgRecipeComponent + * @returns {CMsgRecipeComponent & CMsgRecipeComponent.$Shape} CMsgRecipeComponent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgRecipeComponent.decodeDelimited = function decodeDelimited(reader) { + CMsgRecipeComponent.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -96787,13 +125302,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgRecipeComponent.verify = function verify(message) { + CMsgRecipeComponent.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) if (!$util.isInteger(message.subject_item_id) && !(message.subject_item_id && $util.isInteger(message.subject_item_id.low) && $util.isInteger(message.subject_item_id.high))) return "subject_item_id: integer|Long expected"; - if (message.attribute_index != null && message.hasOwnProperty("attribute_index")) + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) if (!$util.isInteger(message.attribute_index) && !(message.attribute_index && $util.isInteger(message.attribute_index.low) && $util.isInteger(message.attribute_index.high))) return "attribute_index: integer|Long expected"; return null; @@ -96807,24 +125326,30 @@ * @param {Object.} object Plain object * @returns {CMsgRecipeComponent} CMsgRecipeComponent */ - CMsgRecipeComponent.fromObject = function fromObject(object) { + CMsgRecipeComponent.fromObject = function (object, _depth) { if (object instanceof $root.CMsgRecipeComponent) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgRecipeComponent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgRecipeComponent(); if (object.subject_item_id != null) if ($util.Long) - (message.subject_item_id = $util.Long.fromValue(object.subject_item_id)).unsigned = true; + message.subject_item_id = $util.Long.fromValue(object.subject_item_id, true); else if (typeof object.subject_item_id === "string") - message.subject_item_id = parseInt(object.subject_item_id, 10); + message.subject_item_id = $parseInt(object.subject_item_id, 10); else if (typeof object.subject_item_id === "number") message.subject_item_id = object.subject_item_id; else if (typeof object.subject_item_id === "object") message.subject_item_id = new $util.LongBits(object.subject_item_id.low >>> 0, object.subject_item_id.high >>> 0).toNumber(true); if (object.attribute_index != null) if ($util.Long) - (message.attribute_index = $util.Long.fromValue(object.attribute_index)).unsigned = true; + message.attribute_index = $util.Long.fromValue(object.attribute_index, true); else if (typeof object.attribute_index === "string") - message.attribute_index = parseInt(object.attribute_index, 10); + message.attribute_index = $parseInt(object.attribute_index, 10); else if (typeof object.attribute_index === "number") message.attribute_index = object.attribute_index; else if (typeof object.attribute_index === "object") @@ -96841,32 +125366,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgRecipeComponent.toObject = function toObject(message, options) { + CMsgRecipeComponent.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.subject_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.subject_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.subject_item_id = options.longs === String ? "0" : 0; + object.subject_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.attribute_index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.attribute_index = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.attribute_index = options.longs === String ? "0" : 0; + object.attribute_index = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } - if (message.subject_item_id != null && message.hasOwnProperty("subject_item_id")) - if (typeof message.subject_item_id === "number") - object.subject_item_id = options.longs === String ? String(message.subject_item_id) : message.subject_item_id; + if (message.subject_item_id != null && $Object.hasOwnProperty.call(message, "subject_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.subject_item_id = typeof message.subject_item_id === "number" ? $BigInt(message.subject_item_id) : $util.Long.fromBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.subject_item_id === "number") + object.subject_item_id = options.longs === $String ? $String(message.subject_item_id) : message.subject_item_id; else - object.subject_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; - if (message.attribute_index != null && message.hasOwnProperty("attribute_index")) - if (typeof message.attribute_index === "number") - object.attribute_index = options.longs === String ? String(message.attribute_index) : message.attribute_index; + object.subject_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.subject_item_id) : options.longs === $Number ? new $util.LongBits(message.subject_item_id.low >>> 0, message.subject_item_id.high >>> 0).toNumber(true) : message.subject_item_id; + if (message.attribute_index != null && $Object.hasOwnProperty.call(message, "attribute_index")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.attribute_index = typeof message.attribute_index === "number" ? $BigInt(message.attribute_index) : $util.Long.fromBits(message.attribute_index.low >>> 0, message.attribute_index.high >>> 0, true).toBigInt(); + else if (typeof message.attribute_index === "number") + object.attribute_index = options.longs === $String ? $String(message.attribute_index) : message.attribute_index; else - object.attribute_index = options.longs === String ? $util.Long.prototype.toString.call(message.attribute_index) : options.longs === Number ? new $util.LongBits(message.attribute_index.low >>> 0, message.attribute_index.high >>> 0).toNumber(true) : message.attribute_index; + object.attribute_index = options.longs === $String ? $util.Long.prototype.toString.call(message.attribute_index) : options.longs === $Number ? new $util.LongBits(message.attribute_index.low >>> 0, message.attribute_index.high >>> 0).toNumber(true) : message.attribute_index; return object; }; @@ -96877,8 +125410,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgRecipeComponent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgRecipeComponent.prototype.toJSON = function() { + return CMsgRecipeComponent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgRecipeComponent + * @function getTypeUrl + * @memberof CMsgRecipeComponent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgRecipeComponent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgRecipeComponent"; }; return CMsgRecipeComponent; @@ -96886,29 +125433,42 @@ $root.CMsgFulfillDynamicRecipeComponent = (function() { + /** + * Properties of a CMsgFulfillDynamicRecipeComponent. + * @typedef {Object} CMsgFulfillDynamicRecipeComponent.$Properties + * @property {number|Long|null} [tool_item_id] CMsgFulfillDynamicRecipeComponent tool_item_id + * @property {Array.|null} [consumption_components] CMsgFulfillDynamicRecipeComponent consumption_components + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgFulfillDynamicRecipeComponent. * @exports ICMsgFulfillDynamicRecipeComponent * @interface ICMsgFulfillDynamicRecipeComponent - * @property {number|Long|null} [tool_item_id] CMsgFulfillDynamicRecipeComponent tool_item_id - * @property {Array.|null} [consumption_components] CMsgFulfillDynamicRecipeComponent consumption_components + * @augments CMsgFulfillDynamicRecipeComponent.$Properties + * @deprecated Use CMsgFulfillDynamicRecipeComponent.$Properties instead. + */ + + /** + * Shape of a CMsgFulfillDynamicRecipeComponent. + * @typedef {CMsgFulfillDynamicRecipeComponent.$Properties} CMsgFulfillDynamicRecipeComponent.$Shape */ /** * Constructs a new CMsgFulfillDynamicRecipeComponent. * @exports CMsgFulfillDynamicRecipeComponent * @classdesc Represents a CMsgFulfillDynamicRecipeComponent. - * @implements ICMsgFulfillDynamicRecipeComponent * @constructor - * @param {ICMsgFulfillDynamicRecipeComponent=} [properties] Properties to set + * @param {CMsgFulfillDynamicRecipeComponent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgFulfillDynamicRecipeComponent(properties) { + var CMsgFulfillDynamicRecipeComponent = function (properties) { this.consumption_components = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgFulfillDynamicRecipeComponent tool_item_id. @@ -96920,7 +125480,7 @@ /** * CMsgFulfillDynamicRecipeComponent consumption_components. - * @member {Array.} consumption_components + * @member {Array.} consumption_components * @memberof CMsgFulfillDynamicRecipeComponent * @instance */ @@ -96931,10 +125491,14 @@ * @function create * @memberof CMsgFulfillDynamicRecipeComponent * @static - * @param {ICMsgFulfillDynamicRecipeComponent=} [properties] Properties to set + * @param {CMsgFulfillDynamicRecipeComponent.$Properties=} [properties] Properties to set * @returns {CMsgFulfillDynamicRecipeComponent} CMsgFulfillDynamicRecipeComponent instance + * @type {{ + * (properties: CMsgFulfillDynamicRecipeComponent.$Shape): CMsgFulfillDynamicRecipeComponent & CMsgFulfillDynamicRecipeComponent.$Shape; + * (properties?: CMsgFulfillDynamicRecipeComponent.$Properties): CMsgFulfillDynamicRecipeComponent; + * }} */ - CMsgFulfillDynamicRecipeComponent.create = function create(properties) { + CMsgFulfillDynamicRecipeComponent.create = function(properties) { return new CMsgFulfillDynamicRecipeComponent(properties); }; @@ -96943,18 +125507,25 @@ * @function encode * @memberof CMsgFulfillDynamicRecipeComponent * @static - * @param {ICMsgFulfillDynamicRecipeComponent} message CMsgFulfillDynamicRecipeComponent message or plain object to encode + * @param {CMsgFulfillDynamicRecipeComponent.$Properties} message CMsgFulfillDynamicRecipeComponent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgFulfillDynamicRecipeComponent.encode = function encode(message, writer) { + CMsgFulfillDynamicRecipeComponent.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.tool_item_id != null && Object.hasOwnProperty.call(message, "tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.tool_item_id); if (message.consumption_components != null && message.consumption_components.length) for (var i = 0; i < message.consumption_components.length; ++i) - $root.CMsgRecipeComponent.encode(message.consumption_components[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgRecipeComponent.encode(message.consumption_components[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -96963,12 +125534,12 @@ * @function encodeDelimited * @memberof CMsgFulfillDynamicRecipeComponent * @static - * @param {ICMsgFulfillDynamicRecipeComponent} message CMsgFulfillDynamicRecipeComponent message or plain object to encode + * @param {CMsgFulfillDynamicRecipeComponent.$Properties} message CMsgFulfillDynamicRecipeComponent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgFulfillDynamicRecipeComponent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgFulfillDynamicRecipeComponent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -96978,30 +125549,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgFulfillDynamicRecipeComponent} CMsgFulfillDynamicRecipeComponent + * @returns {CMsgFulfillDynamicRecipeComponent & CMsgFulfillDynamicRecipeComponent.$Shape} CMsgFulfillDynamicRecipeComponent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgFulfillDynamicRecipeComponent.decode = function decode(reader, length) { + CMsgFulfillDynamicRecipeComponent.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgFulfillDynamicRecipeComponent(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgFulfillDynamicRecipeComponent(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tool_item_id = reader.uint64(); - break; - case 2: - if (!(message.consumption_components && message.consumption_components.length)) - message.consumption_components = []; - message.consumption_components.push($root.CMsgRecipeComponent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.tool_item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.consumption_components && message.consumption_components.length)) + message.consumption_components = []; + message.consumption_components.push($root.CMsgRecipeComponent.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -97011,11 +125602,11 @@ * @memberof CMsgFulfillDynamicRecipeComponent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgFulfillDynamicRecipeComponent} CMsgFulfillDynamicRecipeComponent + * @returns {CMsgFulfillDynamicRecipeComponent & CMsgFulfillDynamicRecipeComponent.$Shape} CMsgFulfillDynamicRecipeComponent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgFulfillDynamicRecipeComponent.decodeDelimited = function decodeDelimited(reader) { + CMsgFulfillDynamicRecipeComponent.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -97029,17 +125620,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgFulfillDynamicRecipeComponent.verify = function verify(message) { + CMsgFulfillDynamicRecipeComponent.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) if (!$util.isInteger(message.tool_item_id) && !(message.tool_item_id && $util.isInteger(message.tool_item_id.low) && $util.isInteger(message.tool_item_id.high))) return "tool_item_id: integer|Long expected"; - if (message.consumption_components != null && message.hasOwnProperty("consumption_components")) { - if (!Array.isArray(message.consumption_components)) + if (message.consumption_components != null && $Object.hasOwnProperty.call(message, "consumption_components")) { + if (!$Array.isArray(message.consumption_components)) return "consumption_components: array expected"; for (var i = 0; i < message.consumption_components.length; ++i) { - var error = $root.CMsgRecipeComponent.verify(message.consumption_components[i]); + var error = $root.CMsgRecipeComponent.verify(message.consumption_components[i], _depth + 1); if (error) return "consumption_components." + error; } @@ -97055,27 +125650,33 @@ * @param {Object.} object Plain object * @returns {CMsgFulfillDynamicRecipeComponent} CMsgFulfillDynamicRecipeComponent */ - CMsgFulfillDynamicRecipeComponent.fromObject = function fromObject(object) { + CMsgFulfillDynamicRecipeComponent.fromObject = function (object, _depth) { if (object instanceof $root.CMsgFulfillDynamicRecipeComponent) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgFulfillDynamicRecipeComponent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgFulfillDynamicRecipeComponent(); if (object.tool_item_id != null) if ($util.Long) - (message.tool_item_id = $util.Long.fromValue(object.tool_item_id)).unsigned = true; + message.tool_item_id = $util.Long.fromValue(object.tool_item_id, true); else if (typeof object.tool_item_id === "string") - message.tool_item_id = parseInt(object.tool_item_id, 10); + message.tool_item_id = $parseInt(object.tool_item_id, 10); else if (typeof object.tool_item_id === "number") message.tool_item_id = object.tool_item_id; else if (typeof object.tool_item_id === "object") message.tool_item_id = new $util.LongBits(object.tool_item_id.low >>> 0, object.tool_item_id.high >>> 0).toNumber(true); if (object.consumption_components) { - if (!Array.isArray(object.consumption_components)) - throw TypeError(".CMsgFulfillDynamicRecipeComponent.consumption_components: array expected"); - message.consumption_components = []; + if (!$Array.isArray(object.consumption_components)) + throw $TypeError(".CMsgFulfillDynamicRecipeComponent.consumption_components: array expected"); + message.consumption_components = $Array(object.consumption_components.length); for (var i = 0; i < object.consumption_components.length; ++i) { - if (typeof object.consumption_components[i] !== "object") - throw TypeError(".CMsgFulfillDynamicRecipeComponent.consumption_components: object expected"); - message.consumption_components[i] = $root.CMsgRecipeComponent.fromObject(object.consumption_components[i]); + if (!$util.isObject(object.consumption_components[i])) + throw $TypeError(".CMsgFulfillDynamicRecipeComponent.consumption_components: object expected"); + message.consumption_components[i] = $root.CMsgRecipeComponent.fromObject(object.consumption_components[i], _depth + 1); } } return message; @@ -97090,27 +125691,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgFulfillDynamicRecipeComponent.toObject = function toObject(message, options) { + CMsgFulfillDynamicRecipeComponent.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.consumption_components = []; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.tool_item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.tool_item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.tool_item_id = options.longs === String ? "0" : 0; - if (message.tool_item_id != null && message.hasOwnProperty("tool_item_id")) - if (typeof message.tool_item_id === "number") - object.tool_item_id = options.longs === String ? String(message.tool_item_id) : message.tool_item_id; + object.tool_item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.tool_item_id != null && $Object.hasOwnProperty.call(message, "tool_item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.tool_item_id = typeof message.tool_item_id === "number" ? $BigInt(message.tool_item_id) : $util.Long.fromBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0, true).toBigInt(); + else if (typeof message.tool_item_id === "number") + object.tool_item_id = options.longs === $String ? $String(message.tool_item_id) : message.tool_item_id; else - object.tool_item_id = options.longs === String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; + object.tool_item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.tool_item_id) : options.longs === $Number ? new $util.LongBits(message.tool_item_id.low >>> 0, message.tool_item_id.high >>> 0).toNumber(true) : message.tool_item_id; if (message.consumption_components && message.consumption_components.length) { - object.consumption_components = []; + object.consumption_components = $Array(message.consumption_components.length); for (var j = 0; j < message.consumption_components.length; ++j) - object.consumption_components[j] = $root.CMsgRecipeComponent.toObject(message.consumption_components[j], options); + object.consumption_components[j] = $root.CMsgRecipeComponent.toObject(message.consumption_components[j], options, _depth + 1); } return object; }; @@ -97122,8 +125729,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgFulfillDynamicRecipeComponent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgFulfillDynamicRecipeComponent.prototype.toJSON = function() { + return CMsgFulfillDynamicRecipeComponent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgFulfillDynamicRecipeComponent + * @function getTypeUrl + * @memberof CMsgFulfillDynamicRecipeComponent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgFulfillDynamicRecipeComponent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgFulfillDynamicRecipeComponent"; }; return CMsgFulfillDynamicRecipeComponent; @@ -97133,26 +125754,39 @@ /** * Properties of a CMsgSetItemEffectVerticalOffset. - * @exports ICMsgSetItemEffectVerticalOffset - * @interface ICMsgSetItemEffectVerticalOffset + * @typedef {Object} CMsgSetItemEffectVerticalOffset.$Properties * @property {number|Long|null} [item_id] CMsgSetItemEffectVerticalOffset item_id * @property {number|null} [offset] CMsgSetItemEffectVerticalOffset offset + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSetItemEffectVerticalOffset. + * @exports ICMsgSetItemEffectVerticalOffset + * @interface ICMsgSetItemEffectVerticalOffset + * @augments CMsgSetItemEffectVerticalOffset.$Properties + * @deprecated Use CMsgSetItemEffectVerticalOffset.$Properties instead. + */ + + /** + * Shape of a CMsgSetItemEffectVerticalOffset. + * @typedef {CMsgSetItemEffectVerticalOffset.$Properties} CMsgSetItemEffectVerticalOffset.$Shape */ /** * Constructs a new CMsgSetItemEffectVerticalOffset. * @exports CMsgSetItemEffectVerticalOffset * @classdesc Represents a CMsgSetItemEffectVerticalOffset. - * @implements ICMsgSetItemEffectVerticalOffset * @constructor - * @param {ICMsgSetItemEffectVerticalOffset=} [properties] Properties to set + * @param {CMsgSetItemEffectVerticalOffset.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSetItemEffectVerticalOffset(properties) { + var CMsgSetItemEffectVerticalOffset = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSetItemEffectVerticalOffset item_id. @@ -97175,10 +125809,14 @@ * @function create * @memberof CMsgSetItemEffectVerticalOffset * @static - * @param {ICMsgSetItemEffectVerticalOffset=} [properties] Properties to set + * @param {CMsgSetItemEffectVerticalOffset.$Properties=} [properties] Properties to set * @returns {CMsgSetItemEffectVerticalOffset} CMsgSetItemEffectVerticalOffset instance + * @type {{ + * (properties: CMsgSetItemEffectVerticalOffset.$Shape): CMsgSetItemEffectVerticalOffset & CMsgSetItemEffectVerticalOffset.$Shape; + * (properties?: CMsgSetItemEffectVerticalOffset.$Properties): CMsgSetItemEffectVerticalOffset; + * }} */ - CMsgSetItemEffectVerticalOffset.create = function create(properties) { + CMsgSetItemEffectVerticalOffset.create = function(properties) { return new CMsgSetItemEffectVerticalOffset(properties); }; @@ -97187,17 +125825,24 @@ * @function encode * @memberof CMsgSetItemEffectVerticalOffset * @static - * @param {ICMsgSetItemEffectVerticalOffset} message CMsgSetItemEffectVerticalOffset message or plain object to encode + * @param {CMsgSetItemEffectVerticalOffset.$Properties} message CMsgSetItemEffectVerticalOffset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetItemEffectVerticalOffset.encode = function encode(message, writer) { + CMsgSetItemEffectVerticalOffset.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + if (message.offset != null && $Object.hasOwnProperty.call(message, "offset")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.offset); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -97206,12 +125851,12 @@ * @function encodeDelimited * @memberof CMsgSetItemEffectVerticalOffset * @static - * @param {ICMsgSetItemEffectVerticalOffset} message CMsgSetItemEffectVerticalOffset message or plain object to encode + * @param {CMsgSetItemEffectVerticalOffset.$Properties} message CMsgSetItemEffectVerticalOffset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetItemEffectVerticalOffset.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSetItemEffectVerticalOffset.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -97221,28 +125866,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSetItemEffectVerticalOffset} CMsgSetItemEffectVerticalOffset + * @returns {CMsgSetItemEffectVerticalOffset & CMsgSetItemEffectVerticalOffset.$Shape} CMsgSetItemEffectVerticalOffset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetItemEffectVerticalOffset.decode = function decode(reader, length) { + CMsgSetItemEffectVerticalOffset.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSetItemEffectVerticalOffset(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSetItemEffectVerticalOffset(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.offset = reader.float(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.offset = reader.float(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -97252,11 +125917,11 @@ * @memberof CMsgSetItemEffectVerticalOffset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSetItemEffectVerticalOffset} CMsgSetItemEffectVerticalOffset + * @returns {CMsgSetItemEffectVerticalOffset & CMsgSetItemEffectVerticalOffset.$Shape} CMsgSetItemEffectVerticalOffset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetItemEffectVerticalOffset.decodeDelimited = function decodeDelimited(reader) { + CMsgSetItemEffectVerticalOffset.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -97270,13 +125935,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSetItemEffectVerticalOffset.verify = function verify(message) { + CMsgSetItemEffectVerticalOffset.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.offset != null && message.hasOwnProperty("offset")) + if (message.offset != null && $Object.hasOwnProperty.call(message, "offset")) if (typeof message.offset !== "number") return "offset: number expected"; return null; @@ -97290,21 +125959,27 @@ * @param {Object.} object Plain object * @returns {CMsgSetItemEffectVerticalOffset} CMsgSetItemEffectVerticalOffset */ - CMsgSetItemEffectVerticalOffset.fromObject = function fromObject(object) { + CMsgSetItemEffectVerticalOffset.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSetItemEffectVerticalOffset) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSetItemEffectVerticalOffset: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSetItemEffectVerticalOffset(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") message.item_id = new $util.LongBits(object.item_id.low >>> 0, object.item_id.high >>> 0).toNumber(true); if (object.offset != null) - message.offset = Number(object.offset); + message.offset = $Number(object.offset); return message; }; @@ -97317,25 +125992,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSetItemEffectVerticalOffset.toObject = function toObject(message, options) { + CMsgSetItemEffectVerticalOffset.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.offset = 0; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.offset != null && message.hasOwnProperty("offset")) - object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.offset != null && $Object.hasOwnProperty.call(message, "offset")) + object.offset = options.json && !$isFinite(message.offset) ? $String(message.offset) : message.offset; return object; }; @@ -97346,8 +126027,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSetItemEffectVerticalOffset.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSetItemEffectVerticalOffset.prototype.toJSON = function() { + return CMsgSetItemEffectVerticalOffset.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSetItemEffectVerticalOffset + * @function getTypeUrl + * @memberof CMsgSetItemEffectVerticalOffset + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSetItemEffectVerticalOffset.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSetItemEffectVerticalOffset"; }; return CMsgSetItemEffectVerticalOffset; @@ -97357,26 +126052,39 @@ /** * Properties of a CMsgSetHatEffectUseHeadOrigin. - * @exports ICMsgSetHatEffectUseHeadOrigin - * @interface ICMsgSetHatEffectUseHeadOrigin + * @typedef {Object} CMsgSetHatEffectUseHeadOrigin.$Properties * @property {number|Long|null} [item_id] CMsgSetHatEffectUseHeadOrigin item_id * @property {boolean|null} [use_head] CMsgSetHatEffectUseHeadOrigin use_head + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgSetHatEffectUseHeadOrigin. + * @exports ICMsgSetHatEffectUseHeadOrigin + * @interface ICMsgSetHatEffectUseHeadOrigin + * @augments CMsgSetHatEffectUseHeadOrigin.$Properties + * @deprecated Use CMsgSetHatEffectUseHeadOrigin.$Properties instead. + */ + + /** + * Shape of a CMsgSetHatEffectUseHeadOrigin. + * @typedef {CMsgSetHatEffectUseHeadOrigin.$Properties} CMsgSetHatEffectUseHeadOrigin.$Shape */ /** * Constructs a new CMsgSetHatEffectUseHeadOrigin. * @exports CMsgSetHatEffectUseHeadOrigin * @classdesc Represents a CMsgSetHatEffectUseHeadOrigin. - * @implements ICMsgSetHatEffectUseHeadOrigin * @constructor - * @param {ICMsgSetHatEffectUseHeadOrigin=} [properties] Properties to set + * @param {CMsgSetHatEffectUseHeadOrigin.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgSetHatEffectUseHeadOrigin(properties) { + var CMsgSetHatEffectUseHeadOrigin = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgSetHatEffectUseHeadOrigin item_id. @@ -97399,10 +126107,14 @@ * @function create * @memberof CMsgSetHatEffectUseHeadOrigin * @static - * @param {ICMsgSetHatEffectUseHeadOrigin=} [properties] Properties to set + * @param {CMsgSetHatEffectUseHeadOrigin.$Properties=} [properties] Properties to set * @returns {CMsgSetHatEffectUseHeadOrigin} CMsgSetHatEffectUseHeadOrigin instance + * @type {{ + * (properties: CMsgSetHatEffectUseHeadOrigin.$Shape): CMsgSetHatEffectUseHeadOrigin & CMsgSetHatEffectUseHeadOrigin.$Shape; + * (properties?: CMsgSetHatEffectUseHeadOrigin.$Properties): CMsgSetHatEffectUseHeadOrigin; + * }} */ - CMsgSetHatEffectUseHeadOrigin.create = function create(properties) { + CMsgSetHatEffectUseHeadOrigin.create = function(properties) { return new CMsgSetHatEffectUseHeadOrigin(properties); }; @@ -97411,17 +126123,24 @@ * @function encode * @memberof CMsgSetHatEffectUseHeadOrigin * @static - * @param {ICMsgSetHatEffectUseHeadOrigin} message CMsgSetHatEffectUseHeadOrigin message or plain object to encode + * @param {CMsgSetHatEffectUseHeadOrigin.$Properties} message CMsgSetHatEffectUseHeadOrigin message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetHatEffectUseHeadOrigin.encode = function encode(message, writer) { + CMsgSetHatEffectUseHeadOrigin.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.item_id); - if (message.use_head != null && Object.hasOwnProperty.call(message, "use_head")) + if (message.use_head != null && $Object.hasOwnProperty.call(message, "use_head")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.use_head); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -97430,12 +126149,12 @@ * @function encodeDelimited * @memberof CMsgSetHatEffectUseHeadOrigin * @static - * @param {ICMsgSetHatEffectUseHeadOrigin} message CMsgSetHatEffectUseHeadOrigin message or plain object to encode + * @param {CMsgSetHatEffectUseHeadOrigin.$Properties} message CMsgSetHatEffectUseHeadOrigin message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgSetHatEffectUseHeadOrigin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgSetHatEffectUseHeadOrigin.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -97445,28 +126164,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgSetHatEffectUseHeadOrigin} CMsgSetHatEffectUseHeadOrigin + * @returns {CMsgSetHatEffectUseHeadOrigin & CMsgSetHatEffectUseHeadOrigin.$Shape} CMsgSetHatEffectUseHeadOrigin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetHatEffectUseHeadOrigin.decode = function decode(reader, length) { + CMsgSetHatEffectUseHeadOrigin.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgSetHatEffectUseHeadOrigin(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgSetHatEffectUseHeadOrigin(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_id = reader.uint64(); - break; - case 2: - message.use_head = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.item_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.use_head = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -97476,11 +126215,11 @@ * @memberof CMsgSetHatEffectUseHeadOrigin * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgSetHatEffectUseHeadOrigin} CMsgSetHatEffectUseHeadOrigin + * @returns {CMsgSetHatEffectUseHeadOrigin & CMsgSetHatEffectUseHeadOrigin.$Shape} CMsgSetHatEffectUseHeadOrigin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgSetHatEffectUseHeadOrigin.decodeDelimited = function decodeDelimited(reader) { + CMsgSetHatEffectUseHeadOrigin.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -97494,13 +126233,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgSetHatEffectUseHeadOrigin.verify = function verify(message) { + CMsgSetHatEffectUseHeadOrigin.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.item_id != null && message.hasOwnProperty("item_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) if (!$util.isInteger(message.item_id) && !(message.item_id && $util.isInteger(message.item_id.low) && $util.isInteger(message.item_id.high))) return "item_id: integer|Long expected"; - if (message.use_head != null && message.hasOwnProperty("use_head")) + if (message.use_head != null && $Object.hasOwnProperty.call(message, "use_head")) if (typeof message.use_head !== "boolean") return "use_head: boolean expected"; return null; @@ -97514,21 +126257,27 @@ * @param {Object.} object Plain object * @returns {CMsgSetHatEffectUseHeadOrigin} CMsgSetHatEffectUseHeadOrigin */ - CMsgSetHatEffectUseHeadOrigin.fromObject = function fromObject(object) { + CMsgSetHatEffectUseHeadOrigin.fromObject = function (object, _depth) { if (object instanceof $root.CMsgSetHatEffectUseHeadOrigin) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgSetHatEffectUseHeadOrigin: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgSetHatEffectUseHeadOrigin(); if (object.item_id != null) if ($util.Long) - (message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true; + message.item_id = $util.Long.fromValue(object.item_id, true); else if (typeof object.item_id === "string") - message.item_id = parseInt(object.item_id, 10); + message.item_id = $parseInt(object.item_id, 10); else if (typeof object.item_id === "number") message.item_id = object.item_id; else if (typeof object.item_id === "object") message.item_id = new $util.LongBits(object.item_id.low >>> 0, object.item_id.high >>> 0).toNumber(true); if (object.use_head != null) - message.use_head = Boolean(object.use_head); + message.use_head = $Boolean(object.use_head); return message; }; @@ -97541,24 +126290,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgSetHatEffectUseHeadOrigin.toObject = function toObject(message, options) { + CMsgSetHatEffectUseHeadOrigin.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.item_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.item_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.item_id = options.longs === String ? "0" : 0; + object.item_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.use_head = false; } - if (message.item_id != null && message.hasOwnProperty("item_id")) - if (typeof message.item_id === "number") - object.item_id = options.longs === String ? String(message.item_id) : message.item_id; + if (message.item_id != null && $Object.hasOwnProperty.call(message, "item_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.item_id = typeof message.item_id === "number" ? $BigInt(message.item_id) : $util.Long.fromBits(message.item_id.low >>> 0, message.item_id.high >>> 0, true).toBigInt(); + else if (typeof message.item_id === "number") + object.item_id = options.longs === $String ? $String(message.item_id) : message.item_id; else - object.item_id = options.longs === String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; - if (message.use_head != null && message.hasOwnProperty("use_head")) + object.item_id = options.longs === $String ? $util.Long.prototype.toString.call(message.item_id) : options.longs === $Number ? new $util.LongBits(message.item_id.low >>> 0, message.item_id.high >>> 0).toNumber(true) : message.item_id; + if (message.use_head != null && $Object.hasOwnProperty.call(message, "use_head")) object.use_head = message.use_head; return object; }; @@ -97570,8 +126325,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgSetHatEffectUseHeadOrigin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgSetHatEffectUseHeadOrigin.prototype.toJSON = function() { + return CMsgSetHatEffectUseHeadOrigin.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgSetHatEffectUseHeadOrigin + * @function getTypeUrl + * @memberof CMsgSetHatEffectUseHeadOrigin + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgSetHatEffectUseHeadOrigin.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgSetHatEffectUseHeadOrigin"; }; return CMsgSetHatEffectUseHeadOrigin; @@ -97581,26 +126350,39 @@ /** * Properties of a CMsgDeliverGiftResponseGiver. - * @exports ICMsgDeliverGiftResponseGiver - * @interface ICMsgDeliverGiftResponseGiver + * @typedef {Object} CMsgDeliverGiftResponseGiver.$Properties * @property {number|null} [response_code] CMsgDeliverGiftResponseGiver response_code * @property {string|null} [receiver_account_name] CMsgDeliverGiftResponseGiver receiver_account_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgDeliverGiftResponseGiver. + * @exports ICMsgDeliverGiftResponseGiver + * @interface ICMsgDeliverGiftResponseGiver + * @augments CMsgDeliverGiftResponseGiver.$Properties + * @deprecated Use CMsgDeliverGiftResponseGiver.$Properties instead. + */ + + /** + * Shape of a CMsgDeliverGiftResponseGiver. + * @typedef {CMsgDeliverGiftResponseGiver.$Properties} CMsgDeliverGiftResponseGiver.$Shape */ /** * Constructs a new CMsgDeliverGiftResponseGiver. * @exports CMsgDeliverGiftResponseGiver * @classdesc Represents a CMsgDeliverGiftResponseGiver. - * @implements ICMsgDeliverGiftResponseGiver * @constructor - * @param {ICMsgDeliverGiftResponseGiver=} [properties] Properties to set + * @param {CMsgDeliverGiftResponseGiver.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgDeliverGiftResponseGiver(properties) { + var CMsgDeliverGiftResponseGiver = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgDeliverGiftResponseGiver response_code. @@ -97623,10 +126405,14 @@ * @function create * @memberof CMsgDeliverGiftResponseGiver * @static - * @param {ICMsgDeliverGiftResponseGiver=} [properties] Properties to set + * @param {CMsgDeliverGiftResponseGiver.$Properties=} [properties] Properties to set * @returns {CMsgDeliverGiftResponseGiver} CMsgDeliverGiftResponseGiver instance + * @type {{ + * (properties: CMsgDeliverGiftResponseGiver.$Shape): CMsgDeliverGiftResponseGiver & CMsgDeliverGiftResponseGiver.$Shape; + * (properties?: CMsgDeliverGiftResponseGiver.$Properties): CMsgDeliverGiftResponseGiver; + * }} */ - CMsgDeliverGiftResponseGiver.create = function create(properties) { + CMsgDeliverGiftResponseGiver.create = function(properties) { return new CMsgDeliverGiftResponseGiver(properties); }; @@ -97635,17 +126421,24 @@ * @function encode * @memberof CMsgDeliverGiftResponseGiver * @static - * @param {ICMsgDeliverGiftResponseGiver} message CMsgDeliverGiftResponseGiver message or plain object to encode + * @param {CMsgDeliverGiftResponseGiver.$Properties} message CMsgDeliverGiftResponseGiver message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDeliverGiftResponseGiver.encode = function encode(message, writer) { + CMsgDeliverGiftResponseGiver.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.response_code != null && Object.hasOwnProperty.call(message, "response_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.response_code != null && $Object.hasOwnProperty.call(message, "response_code")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.response_code); - if (message.receiver_account_name != null && Object.hasOwnProperty.call(message, "receiver_account_name")) + if (message.receiver_account_name != null && $Object.hasOwnProperty.call(message, "receiver_account_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.receiver_account_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -97654,12 +126447,12 @@ * @function encodeDelimited * @memberof CMsgDeliverGiftResponseGiver * @static - * @param {ICMsgDeliverGiftResponseGiver} message CMsgDeliverGiftResponseGiver message or plain object to encode + * @param {CMsgDeliverGiftResponseGiver.$Properties} message CMsgDeliverGiftResponseGiver message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgDeliverGiftResponseGiver.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgDeliverGiftResponseGiver.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -97669,28 +126462,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgDeliverGiftResponseGiver} CMsgDeliverGiftResponseGiver + * @returns {CMsgDeliverGiftResponseGiver & CMsgDeliverGiftResponseGiver.$Shape} CMsgDeliverGiftResponseGiver * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDeliverGiftResponseGiver.decode = function decode(reader, length) { + CMsgDeliverGiftResponseGiver.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgDeliverGiftResponseGiver(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgDeliverGiftResponseGiver(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.response_code = reader.uint32(); - break; - case 2: - message.receiver_account_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.response_code = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.receiver_account_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -97700,11 +126513,11 @@ * @memberof CMsgDeliverGiftResponseGiver * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgDeliverGiftResponseGiver} CMsgDeliverGiftResponseGiver + * @returns {CMsgDeliverGiftResponseGiver & CMsgDeliverGiftResponseGiver.$Shape} CMsgDeliverGiftResponseGiver * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgDeliverGiftResponseGiver.decodeDelimited = function decodeDelimited(reader) { + CMsgDeliverGiftResponseGiver.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -97718,13 +126531,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgDeliverGiftResponseGiver.verify = function verify(message) { + CMsgDeliverGiftResponseGiver.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.response_code != null && message.hasOwnProperty("response_code")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.response_code != null && $Object.hasOwnProperty.call(message, "response_code")) if (!$util.isInteger(message.response_code)) return "response_code: integer expected"; - if (message.receiver_account_name != null && message.hasOwnProperty("receiver_account_name")) + if (message.receiver_account_name != null && $Object.hasOwnProperty.call(message, "receiver_account_name")) if (!$util.isString(message.receiver_account_name)) return "receiver_account_name: string expected"; return null; @@ -97738,14 +126555,20 @@ * @param {Object.} object Plain object * @returns {CMsgDeliverGiftResponseGiver} CMsgDeliverGiftResponseGiver */ - CMsgDeliverGiftResponseGiver.fromObject = function fromObject(object) { + CMsgDeliverGiftResponseGiver.fromObject = function (object, _depth) { if (object instanceof $root.CMsgDeliverGiftResponseGiver) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgDeliverGiftResponseGiver: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgDeliverGiftResponseGiver(); if (object.response_code != null) message.response_code = object.response_code >>> 0; if (object.receiver_account_name != null) - message.receiver_account_name = String(object.receiver_account_name); + message.receiver_account_name = $String(object.receiver_account_name); return message; }; @@ -97758,17 +126581,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgDeliverGiftResponseGiver.toObject = function toObject(message, options) { + CMsgDeliverGiftResponseGiver.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.response_code = 0; object.receiver_account_name = ""; } - if (message.response_code != null && message.hasOwnProperty("response_code")) + if (message.response_code != null && $Object.hasOwnProperty.call(message, "response_code")) object.response_code = message.response_code; - if (message.receiver_account_name != null && message.hasOwnProperty("receiver_account_name")) + if (message.receiver_account_name != null && $Object.hasOwnProperty.call(message, "receiver_account_name")) object.receiver_account_name = message.receiver_account_name; return object; }; @@ -97780,8 +126607,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgDeliverGiftResponseGiver.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgDeliverGiftResponseGiver.prototype.toJSON = function() { + return CMsgDeliverGiftResponseGiver.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgDeliverGiftResponseGiver + * @function getTypeUrl + * @memberof CMsgDeliverGiftResponseGiver + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgDeliverGiftResponseGiver.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgDeliverGiftResponseGiver"; }; return CMsgDeliverGiftResponseGiver; @@ -97789,27 +126630,40 @@ $root.CSOEconGameAccountForGameServers = (function() { + /** + * Properties of a CSOEconGameAccountForGameServers. + * @typedef {Object} CSOEconGameAccountForGameServers.$Properties + * @property {boolean|null} [disable_party_quest_progress] CSOEconGameAccountForGameServers disable_party_quest_progress + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CSOEconGameAccountForGameServers. * @exports ICSOEconGameAccountForGameServers * @interface ICSOEconGameAccountForGameServers - * @property {boolean|null} [disable_party_quest_progress] CSOEconGameAccountForGameServers disable_party_quest_progress + * @augments CSOEconGameAccountForGameServers.$Properties + * @deprecated Use CSOEconGameAccountForGameServers.$Properties instead. + */ + + /** + * Shape of a CSOEconGameAccountForGameServers. + * @typedef {CSOEconGameAccountForGameServers.$Properties} CSOEconGameAccountForGameServers.$Shape */ /** * Constructs a new CSOEconGameAccountForGameServers. * @exports CSOEconGameAccountForGameServers * @classdesc Represents a CSOEconGameAccountForGameServers. - * @implements ICSOEconGameAccountForGameServers * @constructor - * @param {ICSOEconGameAccountForGameServers=} [properties] Properties to set + * @param {CSOEconGameAccountForGameServers.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CSOEconGameAccountForGameServers(properties) { + var CSOEconGameAccountForGameServers = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CSOEconGameAccountForGameServers disable_party_quest_progress. @@ -97824,10 +126678,14 @@ * @function create * @memberof CSOEconGameAccountForGameServers * @static - * @param {ICSOEconGameAccountForGameServers=} [properties] Properties to set + * @param {CSOEconGameAccountForGameServers.$Properties=} [properties] Properties to set * @returns {CSOEconGameAccountForGameServers} CSOEconGameAccountForGameServers instance + * @type {{ + * (properties: CSOEconGameAccountForGameServers.$Shape): CSOEconGameAccountForGameServers & CSOEconGameAccountForGameServers.$Shape; + * (properties?: CSOEconGameAccountForGameServers.$Properties): CSOEconGameAccountForGameServers; + * }} */ - CSOEconGameAccountForGameServers.create = function create(properties) { + CSOEconGameAccountForGameServers.create = function(properties) { return new CSOEconGameAccountForGameServers(properties); }; @@ -97836,15 +126694,22 @@ * @function encode * @memberof CSOEconGameAccountForGameServers * @static - * @param {ICSOEconGameAccountForGameServers} message CSOEconGameAccountForGameServers message or plain object to encode + * @param {CSOEconGameAccountForGameServers.$Properties} message CSOEconGameAccountForGameServers message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconGameAccountForGameServers.encode = function encode(message, writer) { + CSOEconGameAccountForGameServers.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.disable_party_quest_progress != null && Object.hasOwnProperty.call(message, "disable_party_quest_progress")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.disable_party_quest_progress); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -97853,12 +126718,12 @@ * @function encodeDelimited * @memberof CSOEconGameAccountForGameServers * @static - * @param {ICSOEconGameAccountForGameServers} message CSOEconGameAccountForGameServers message or plain object to encode + * @param {CSOEconGameAccountForGameServers.$Properties} message CSOEconGameAccountForGameServers message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CSOEconGameAccountForGameServers.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CSOEconGameAccountForGameServers.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -97868,25 +126733,42 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CSOEconGameAccountForGameServers} CSOEconGameAccountForGameServers + * @returns {CSOEconGameAccountForGameServers & CSOEconGameAccountForGameServers.$Shape} CSOEconGameAccountForGameServers * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconGameAccountForGameServers.decode = function decode(reader, length) { + CSOEconGameAccountForGameServers.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CSOEconGameAccountForGameServers(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CSOEconGameAccountForGameServers(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: - message.disable_party_quest_progress = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 6: { + if (wireType !== 0) + break; + message.disable_party_quest_progress = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -97896,11 +126778,11 @@ * @memberof CSOEconGameAccountForGameServers * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CSOEconGameAccountForGameServers} CSOEconGameAccountForGameServers + * @returns {CSOEconGameAccountForGameServers & CSOEconGameAccountForGameServers.$Shape} CSOEconGameAccountForGameServers * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CSOEconGameAccountForGameServers.decodeDelimited = function decodeDelimited(reader) { + CSOEconGameAccountForGameServers.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -97914,10 +126796,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CSOEconGameAccountForGameServers.verify = function verify(message) { + CSOEconGameAccountForGameServers.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.disable_party_quest_progress != null && message.hasOwnProperty("disable_party_quest_progress")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) if (typeof message.disable_party_quest_progress !== "boolean") return "disable_party_quest_progress: boolean expected"; return null; @@ -97931,12 +126817,18 @@ * @param {Object.} object Plain object * @returns {CSOEconGameAccountForGameServers} CSOEconGameAccountForGameServers */ - CSOEconGameAccountForGameServers.fromObject = function fromObject(object) { + CSOEconGameAccountForGameServers.fromObject = function (object, _depth) { if (object instanceof $root.CSOEconGameAccountForGameServers) return object; + if (!$util.isObject(object)) + throw $TypeError(".CSOEconGameAccountForGameServers: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CSOEconGameAccountForGameServers(); if (object.disable_party_quest_progress != null) - message.disable_party_quest_progress = Boolean(object.disable_party_quest_progress); + message.disable_party_quest_progress = $Boolean(object.disable_party_quest_progress); return message; }; @@ -97949,13 +126841,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CSOEconGameAccountForGameServers.toObject = function toObject(message, options) { + CSOEconGameAccountForGameServers.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.disable_party_quest_progress = false; - if (message.disable_party_quest_progress != null && message.hasOwnProperty("disable_party_quest_progress")) + if (message.disable_party_quest_progress != null && $Object.hasOwnProperty.call(message, "disable_party_quest_progress")) object.disable_party_quest_progress = message.disable_party_quest_progress; return object; }; @@ -97967,8 +126863,22 @@ * @instance * @returns {Object.} JSON object */ - CSOEconGameAccountForGameServers.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CSOEconGameAccountForGameServers.prototype.toJSON = function() { + return CSOEconGameAccountForGameServers.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CSOEconGameAccountForGameServers + * @function getTypeUrl + * @memberof CSOEconGameAccountForGameServers + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CSOEconGameAccountForGameServers.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CSOEconGameAccountForGameServers"; }; return CSOEconGameAccountForGameServers; @@ -97976,29 +126886,42 @@ $root.CWorkshop_PopulateItemDescriptions_Request = (function() { + /** + * Properties of a CWorkshop_PopulateItemDescriptions_Request. + * @typedef {Object} CWorkshop_PopulateItemDescriptions_Request.$Properties + * @property {number|null} [appid] CWorkshop_PopulateItemDescriptions_Request appid + * @property {Array.|null} [languages] CWorkshop_PopulateItemDescriptions_Request languages + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CWorkshop_PopulateItemDescriptions_Request. * @exports ICWorkshop_PopulateItemDescriptions_Request * @interface ICWorkshop_PopulateItemDescriptions_Request - * @property {number|null} [appid] CWorkshop_PopulateItemDescriptions_Request appid - * @property {Array.|null} [languages] CWorkshop_PopulateItemDescriptions_Request languages + * @augments CWorkshop_PopulateItemDescriptions_Request.$Properties + * @deprecated Use CWorkshop_PopulateItemDescriptions_Request.$Properties instead. + */ + + /** + * Shape of a CWorkshop_PopulateItemDescriptions_Request. + * @typedef {CWorkshop_PopulateItemDescriptions_Request.$Properties} CWorkshop_PopulateItemDescriptions_Request.$Shape */ /** * Constructs a new CWorkshop_PopulateItemDescriptions_Request. * @exports CWorkshop_PopulateItemDescriptions_Request * @classdesc Represents a CWorkshop_PopulateItemDescriptions_Request. - * @implements ICWorkshop_PopulateItemDescriptions_Request * @constructor - * @param {ICWorkshop_PopulateItemDescriptions_Request=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CWorkshop_PopulateItemDescriptions_Request(properties) { + var CWorkshop_PopulateItemDescriptions_Request = function (properties) { this.languages = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CWorkshop_PopulateItemDescriptions_Request appid. @@ -98010,7 +126933,7 @@ /** * CWorkshop_PopulateItemDescriptions_Request languages. - * @member {Array.} languages + * @member {Array.} languages * @memberof CWorkshop_PopulateItemDescriptions_Request * @instance */ @@ -98021,10 +126944,14 @@ * @function create * @memberof CWorkshop_PopulateItemDescriptions_Request * @static - * @param {ICWorkshop_PopulateItemDescriptions_Request=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.$Properties=} [properties] Properties to set * @returns {CWorkshop_PopulateItemDescriptions_Request} CWorkshop_PopulateItemDescriptions_Request instance + * @type {{ + * (properties: CWorkshop_PopulateItemDescriptions_Request.$Shape): CWorkshop_PopulateItemDescriptions_Request & CWorkshop_PopulateItemDescriptions_Request.$Shape; + * (properties?: CWorkshop_PopulateItemDescriptions_Request.$Properties): CWorkshop_PopulateItemDescriptions_Request; + * }} */ - CWorkshop_PopulateItemDescriptions_Request.create = function create(properties) { + CWorkshop_PopulateItemDescriptions_Request.create = function(properties) { return new CWorkshop_PopulateItemDescriptions_Request(properties); }; @@ -98033,18 +126960,25 @@ * @function encode * @memberof CWorkshop_PopulateItemDescriptions_Request * @static - * @param {ICWorkshop_PopulateItemDescriptions_Request} message CWorkshop_PopulateItemDescriptions_Request message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.$Properties} message CWorkshop_PopulateItemDescriptions_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_PopulateItemDescriptions_Request.encode = function encode(message, writer) { + CWorkshop_PopulateItemDescriptions_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.appid); if (message.languages != null && message.languages.length) for (var i = 0; i < message.languages.length; ++i) - $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.encode(message.languages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.encode(message.languages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -98053,12 +126987,12 @@ * @function encodeDelimited * @memberof CWorkshop_PopulateItemDescriptions_Request * @static - * @param {ICWorkshop_PopulateItemDescriptions_Request} message CWorkshop_PopulateItemDescriptions_Request message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.$Properties} message CWorkshop_PopulateItemDescriptions_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_PopulateItemDescriptions_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CWorkshop_PopulateItemDescriptions_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -98068,30 +127002,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_PopulateItemDescriptions_Request} CWorkshop_PopulateItemDescriptions_Request + * @returns {CWorkshop_PopulateItemDescriptions_Request & CWorkshop_PopulateItemDescriptions_Request.$Shape} CWorkshop_PopulateItemDescriptions_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_PopulateItemDescriptions_Request.decode = function decode(reader, length) { + CWorkshop_PopulateItemDescriptions_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_PopulateItemDescriptions_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_PopulateItemDescriptions_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appid = reader.uint32(); - break; - case 2: - if (!(message.languages && message.languages.length)) - message.languages = []; - message.languages.push($root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.languages && message.languages.length)) + message.languages = []; + message.languages.push($root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -98101,11 +127055,11 @@ * @memberof CWorkshop_PopulateItemDescriptions_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_PopulateItemDescriptions_Request} CWorkshop_PopulateItemDescriptions_Request + * @returns {CWorkshop_PopulateItemDescriptions_Request & CWorkshop_PopulateItemDescriptions_Request.$Shape} CWorkshop_PopulateItemDescriptions_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_PopulateItemDescriptions_Request.decodeDelimited = function decodeDelimited(reader) { + CWorkshop_PopulateItemDescriptions_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -98119,17 +127073,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CWorkshop_PopulateItemDescriptions_Request.verify = function verify(message) { + CWorkshop_PopulateItemDescriptions_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.languages != null && message.hasOwnProperty("languages")) { - if (!Array.isArray(message.languages)) + if (message.languages != null && $Object.hasOwnProperty.call(message, "languages")) { + if (!$Array.isArray(message.languages)) return "languages: array expected"; for (var i = 0; i < message.languages.length; ++i) { - var error = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.verify(message.languages[i]); + var error = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.verify(message.languages[i], _depth + 1); if (error) return "languages." + error; } @@ -98145,20 +127103,26 @@ * @param {Object.} object Plain object * @returns {CWorkshop_PopulateItemDescriptions_Request} CWorkshop_PopulateItemDescriptions_Request */ - CWorkshop_PopulateItemDescriptions_Request.fromObject = function fromObject(object) { + CWorkshop_PopulateItemDescriptions_Request.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_PopulateItemDescriptions_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_PopulateItemDescriptions_Request(); if (object.appid != null) message.appid = object.appid >>> 0; if (object.languages) { - if (!Array.isArray(object.languages)) - throw TypeError(".CWorkshop_PopulateItemDescriptions_Request.languages: array expected"); - message.languages = []; + if (!$Array.isArray(object.languages)) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.languages: array expected"); + message.languages = $Array(object.languages.length); for (var i = 0; i < object.languages.length; ++i) { - if (typeof object.languages[i] !== "object") - throw TypeError(".CWorkshop_PopulateItemDescriptions_Request.languages: object expected"); - message.languages[i] = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.fromObject(object.languages[i]); + if (!$util.isObject(object.languages[i])) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.languages: object expected"); + message.languages[i] = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.fromObject(object.languages[i], _depth + 1); } } return message; @@ -98173,20 +127137,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CWorkshop_PopulateItemDescriptions_Request.toObject = function toObject(message, options) { + CWorkshop_PopulateItemDescriptions_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.languages = []; if (options.defaults) object.appid = 0; - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; if (message.languages && message.languages.length) { - object.languages = []; + object.languages = $Array(message.languages.length); for (var j = 0; j < message.languages.length; ++j) - object.languages[j] = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.toObject(message.languages[j], options); + object.languages[j] = $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.toObject(message.languages[j], options, _depth + 1); } return object; }; @@ -98198,34 +127166,61 @@ * @instance * @returns {Object.} JSON object */ - CWorkshop_PopulateItemDescriptions_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CWorkshop_PopulateItemDescriptions_Request.prototype.toJSON = function() { + return CWorkshop_PopulateItemDescriptions_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CWorkshop_PopulateItemDescriptions_Request + * @function getTypeUrl + * @memberof CWorkshop_PopulateItemDescriptions_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CWorkshop_PopulateItemDescriptions_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_PopulateItemDescriptions_Request"; }; CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription = (function() { /** * Properties of a SingleItemDescription. - * @memberof CWorkshop_PopulateItemDescriptions_Request - * @interface ISingleItemDescription + * @typedef {Object} CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties * @property {number|null} [gameitemid] SingleItemDescription gameitemid * @property {string|null} [item_description] SingleItemDescription item_description + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SingleItemDescription. + * @memberof CWorkshop_PopulateItemDescriptions_Request + * @interface ISingleItemDescription + * @augments CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties + * @deprecated Use CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties instead. + */ + + /** + * Shape of a SingleItemDescription. + * @typedef {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties} CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Shape */ /** * Constructs a new SingleItemDescription. * @memberof CWorkshop_PopulateItemDescriptions_Request * @classdesc Represents a SingleItemDescription. - * @implements ISingleItemDescription * @constructor - * @param {CWorkshop_PopulateItemDescriptions_Request.ISingleItemDescription=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SingleItemDescription(properties) { + var SingleItemDescription = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SingleItemDescription gameitemid. @@ -98248,10 +127243,14 @@ * @function create * @memberof CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.ISingleItemDescription=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties=} [properties] Properties to set * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription} SingleItemDescription instance + * @type {{ + * (properties: CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Shape): CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription & CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Shape; + * (properties?: CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties): CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription; + * }} */ - SingleItemDescription.create = function create(properties) { + SingleItemDescription.create = function(properties) { return new SingleItemDescription(properties); }; @@ -98260,17 +127259,24 @@ * @function encode * @memberof CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.ISingleItemDescription} message SingleItemDescription message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties} message SingleItemDescription message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SingleItemDescription.encode = function encode(message, writer) { + SingleItemDescription.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.gameitemid != null && Object.hasOwnProperty.call(message, "gameitemid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gameitemid); - if (message.item_description != null && Object.hasOwnProperty.call(message, "item_description")) + if (message.item_description != null && $Object.hasOwnProperty.call(message, "item_description")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.item_description); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -98279,12 +127285,12 @@ * @function encodeDelimited * @memberof CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.ISingleItemDescription} message SingleItemDescription message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Properties} message SingleItemDescription message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SingleItemDescription.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SingleItemDescription.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -98294,28 +127300,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription} SingleItemDescription + * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription & CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Shape} SingleItemDescription * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SingleItemDescription.decode = function decode(reader, length) { + SingleItemDescription.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gameitemid = reader.uint32(); - break; - case 2: - message.item_description = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.gameitemid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.item_description = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -98325,11 +127351,11 @@ * @memberof CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription} SingleItemDescription + * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription & CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.$Shape} SingleItemDescription * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SingleItemDescription.decodeDelimited = function decodeDelimited(reader) { + SingleItemDescription.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -98343,13 +127369,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SingleItemDescription.verify = function verify(message) { + SingleItemDescription.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) if (!$util.isInteger(message.gameitemid)) return "gameitemid: integer expected"; - if (message.item_description != null && message.hasOwnProperty("item_description")) + if (message.item_description != null && $Object.hasOwnProperty.call(message, "item_description")) if (!$util.isString(message.item_description)) return "item_description: string expected"; return null; @@ -98363,14 +127393,20 @@ * @param {Object.} object Plain object * @returns {CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription} SingleItemDescription */ - SingleItemDescription.fromObject = function fromObject(object) { + SingleItemDescription.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription(); if (object.gameitemid != null) message.gameitemid = object.gameitemid >>> 0; if (object.item_description != null) - message.item_description = String(object.item_description); + message.item_description = $String(object.item_description); return message; }; @@ -98383,17 +127419,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SingleItemDescription.toObject = function toObject(message, options) { + SingleItemDescription.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.gameitemid = 0; object.item_description = ""; } - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) object.gameitemid = message.gameitemid; - if (message.item_description != null && message.hasOwnProperty("item_description")) + if (message.item_description != null && $Object.hasOwnProperty.call(message, "item_description")) object.item_description = message.item_description; return object; }; @@ -98405,8 +127445,22 @@ * @instance * @returns {Object.} JSON object */ - SingleItemDescription.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SingleItemDescription.prototype.toJSON = function() { + return SingleItemDescription.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SingleItemDescription + * @function getTypeUrl + * @memberof CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SingleItemDescription.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription"; }; return SingleItemDescription; @@ -98414,29 +127468,42 @@ CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock = (function() { + /** + * Properties of an ItemDescriptionsLanguageBlock. + * @typedef {Object} CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties + * @property {string|null} [language] ItemDescriptionsLanguageBlock language + * @property {Array.|null} [descriptions] ItemDescriptionsLanguageBlock descriptions + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an ItemDescriptionsLanguageBlock. * @memberof CWorkshop_PopulateItemDescriptions_Request * @interface IItemDescriptionsLanguageBlock - * @property {string|null} [language] ItemDescriptionsLanguageBlock language - * @property {Array.|null} [descriptions] ItemDescriptionsLanguageBlock descriptions + * @augments CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties + * @deprecated Use CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties instead. + */ + + /** + * Shape of an ItemDescriptionsLanguageBlock. + * @typedef {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties} CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Shape */ /** * Constructs a new ItemDescriptionsLanguageBlock. * @memberof CWorkshop_PopulateItemDescriptions_Request * @classdesc Represents an ItemDescriptionsLanguageBlock. - * @implements IItemDescriptionsLanguageBlock * @constructor - * @param {CWorkshop_PopulateItemDescriptions_Request.IItemDescriptionsLanguageBlock=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ItemDescriptionsLanguageBlock(properties) { + var ItemDescriptionsLanguageBlock = function (properties) { this.descriptions = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ItemDescriptionsLanguageBlock language. @@ -98448,7 +127515,7 @@ /** * ItemDescriptionsLanguageBlock descriptions. - * @member {Array.} descriptions + * @member {Array.} descriptions * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock * @instance */ @@ -98459,10 +127526,14 @@ * @function create * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.IItemDescriptionsLanguageBlock=} [properties] Properties to set + * @param {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties=} [properties] Properties to set * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock} ItemDescriptionsLanguageBlock instance + * @type {{ + * (properties: CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Shape): CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock & CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Shape; + * (properties?: CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties): CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock; + * }} */ - ItemDescriptionsLanguageBlock.create = function create(properties) { + ItemDescriptionsLanguageBlock.create = function(properties) { return new ItemDescriptionsLanguageBlock(properties); }; @@ -98471,18 +127542,25 @@ * @function encode * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.IItemDescriptionsLanguageBlock} message ItemDescriptionsLanguageBlock message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties} message ItemDescriptionsLanguageBlock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ItemDescriptionsLanguageBlock.encode = function encode(message, writer) { + ItemDescriptionsLanguageBlock.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.language != null && Object.hasOwnProperty.call(message, "language")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.language); if (message.descriptions != null && message.descriptions.length) for (var i = 0; i < message.descriptions.length; ++i) - $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.encode(message.descriptions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.encode(message.descriptions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -98491,12 +127569,12 @@ * @function encodeDelimited * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock * @static - * @param {CWorkshop_PopulateItemDescriptions_Request.IItemDescriptionsLanguageBlock} message ItemDescriptionsLanguageBlock message or plain object to encode + * @param {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Properties} message ItemDescriptionsLanguageBlock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ItemDescriptionsLanguageBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ItemDescriptionsLanguageBlock.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -98506,30 +127584,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock} ItemDescriptionsLanguageBlock + * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock & CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Shape} ItemDescriptionsLanguageBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ItemDescriptionsLanguageBlock.decode = function decode(reader, length) { + ItemDescriptionsLanguageBlock.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.language = reader.string(); - break; - case 2: - if (!(message.descriptions && message.descriptions.length)) - message.descriptions = []; - message.descriptions.push($root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.language = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.descriptions && message.descriptions.length)) + message.descriptions = []; + message.descriptions.push($root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -98539,11 +127637,11 @@ * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock} ItemDescriptionsLanguageBlock + * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock & CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.$Shape} ItemDescriptionsLanguageBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ItemDescriptionsLanguageBlock.decodeDelimited = function decodeDelimited(reader) { + ItemDescriptionsLanguageBlock.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -98557,17 +127655,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ItemDescriptionsLanguageBlock.verify = function verify(message) { + ItemDescriptionsLanguageBlock.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.language != null && message.hasOwnProperty("language")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) if (!$util.isString(message.language)) return "language: string expected"; - if (message.descriptions != null && message.hasOwnProperty("descriptions")) { - if (!Array.isArray(message.descriptions)) + if (message.descriptions != null && $Object.hasOwnProperty.call(message, "descriptions")) { + if (!$Array.isArray(message.descriptions)) return "descriptions: array expected"; for (var i = 0; i < message.descriptions.length; ++i) { - var error = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.verify(message.descriptions[i]); + var error = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.verify(message.descriptions[i], _depth + 1); if (error) return "descriptions." + error; } @@ -98583,20 +127685,26 @@ * @param {Object.} object Plain object * @returns {CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock} ItemDescriptionsLanguageBlock */ - ItemDescriptionsLanguageBlock.fromObject = function fromObject(object) { + ItemDescriptionsLanguageBlock.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock(); if (object.language != null) - message.language = String(object.language); + message.language = $String(object.language); if (object.descriptions) { - if (!Array.isArray(object.descriptions)) - throw TypeError(".CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.descriptions: array expected"); - message.descriptions = []; + if (!$Array.isArray(object.descriptions)) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.descriptions: array expected"); + message.descriptions = $Array(object.descriptions.length); for (var i = 0; i < object.descriptions.length; ++i) { - if (typeof object.descriptions[i] !== "object") - throw TypeError(".CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.descriptions: object expected"); - message.descriptions[i] = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.fromObject(object.descriptions[i]); + if (!$util.isObject(object.descriptions[i])) + throw $TypeError(".CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock.descriptions: object expected"); + message.descriptions[i] = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.fromObject(object.descriptions[i], _depth + 1); } } return message; @@ -98611,20 +127719,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ItemDescriptionsLanguageBlock.toObject = function toObject(message, options) { + ItemDescriptionsLanguageBlock.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.descriptions = []; if (options.defaults) object.language = ""; - if (message.language != null && message.hasOwnProperty("language")) + if (message.language != null && $Object.hasOwnProperty.call(message, "language")) object.language = message.language; if (message.descriptions && message.descriptions.length) { - object.descriptions = []; + object.descriptions = $Array(message.descriptions.length); for (var j = 0; j < message.descriptions.length; ++j) - object.descriptions[j] = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.toObject(message.descriptions[j], options); + object.descriptions[j] = $root.CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription.toObject(message.descriptions[j], options, _depth + 1); } return object; }; @@ -98636,8 +127748,22 @@ * @instance * @returns {Object.} JSON object */ - ItemDescriptionsLanguageBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ItemDescriptionsLanguageBlock.prototype.toJSON = function() { + return ItemDescriptionsLanguageBlock.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ItemDescriptionsLanguageBlock + * @function getTypeUrl + * @memberof CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ItemDescriptionsLanguageBlock.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock"; }; return ItemDescriptionsLanguageBlock; @@ -98650,26 +127776,39 @@ /** * Properties of a CWorkshop_GetContributors_Request. - * @exports ICWorkshop_GetContributors_Request - * @interface ICWorkshop_GetContributors_Request + * @typedef {Object} CWorkshop_GetContributors_Request.$Properties * @property {number|null} [appid] CWorkshop_GetContributors_Request appid * @property {number|null} [gameitemid] CWorkshop_GetContributors_Request gameitemid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CWorkshop_GetContributors_Request. + * @exports ICWorkshop_GetContributors_Request + * @interface ICWorkshop_GetContributors_Request + * @augments CWorkshop_GetContributors_Request.$Properties + * @deprecated Use CWorkshop_GetContributors_Request.$Properties instead. + */ + + /** + * Shape of a CWorkshop_GetContributors_Request. + * @typedef {CWorkshop_GetContributors_Request.$Properties} CWorkshop_GetContributors_Request.$Shape */ /** * Constructs a new CWorkshop_GetContributors_Request. * @exports CWorkshop_GetContributors_Request * @classdesc Represents a CWorkshop_GetContributors_Request. - * @implements ICWorkshop_GetContributors_Request * @constructor - * @param {ICWorkshop_GetContributors_Request=} [properties] Properties to set + * @param {CWorkshop_GetContributors_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CWorkshop_GetContributors_Request(properties) { + var CWorkshop_GetContributors_Request = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CWorkshop_GetContributors_Request appid. @@ -98692,10 +127831,14 @@ * @function create * @memberof CWorkshop_GetContributors_Request * @static - * @param {ICWorkshop_GetContributors_Request=} [properties] Properties to set + * @param {CWorkshop_GetContributors_Request.$Properties=} [properties] Properties to set * @returns {CWorkshop_GetContributors_Request} CWorkshop_GetContributors_Request instance + * @type {{ + * (properties: CWorkshop_GetContributors_Request.$Shape): CWorkshop_GetContributors_Request & CWorkshop_GetContributors_Request.$Shape; + * (properties?: CWorkshop_GetContributors_Request.$Properties): CWorkshop_GetContributors_Request; + * }} */ - CWorkshop_GetContributors_Request.create = function create(properties) { + CWorkshop_GetContributors_Request.create = function(properties) { return new CWorkshop_GetContributors_Request(properties); }; @@ -98704,17 +127847,24 @@ * @function encode * @memberof CWorkshop_GetContributors_Request * @static - * @param {ICWorkshop_GetContributors_Request} message CWorkshop_GetContributors_Request message or plain object to encode + * @param {CWorkshop_GetContributors_Request.$Properties} message CWorkshop_GetContributors_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_GetContributors_Request.encode = function encode(message, writer) { + CWorkshop_GetContributors_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.appid); - if (message.gameitemid != null && Object.hasOwnProperty.call(message, "gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.gameitemid); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -98723,12 +127873,12 @@ * @function encodeDelimited * @memberof CWorkshop_GetContributors_Request * @static - * @param {ICWorkshop_GetContributors_Request} message CWorkshop_GetContributors_Request message or plain object to encode + * @param {CWorkshop_GetContributors_Request.$Properties} message CWorkshop_GetContributors_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_GetContributors_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CWorkshop_GetContributors_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -98738,28 +127888,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_GetContributors_Request} CWorkshop_GetContributors_Request + * @returns {CWorkshop_GetContributors_Request & CWorkshop_GetContributors_Request.$Shape} CWorkshop_GetContributors_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_GetContributors_Request.decode = function decode(reader, length) { + CWorkshop_GetContributors_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_GetContributors_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_GetContributors_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appid = reader.uint32(); - break; - case 2: - message.gameitemid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.gameitemid = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -98769,11 +127939,11 @@ * @memberof CWorkshop_GetContributors_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_GetContributors_Request} CWorkshop_GetContributors_Request + * @returns {CWorkshop_GetContributors_Request & CWorkshop_GetContributors_Request.$Shape} CWorkshop_GetContributors_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_GetContributors_Request.decodeDelimited = function decodeDelimited(reader) { + CWorkshop_GetContributors_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -98787,13 +127957,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CWorkshop_GetContributors_Request.verify = function verify(message) { + CWorkshop_GetContributors_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) if (!$util.isInteger(message.gameitemid)) return "gameitemid: integer expected"; return null; @@ -98807,9 +127981,15 @@ * @param {Object.} object Plain object * @returns {CWorkshop_GetContributors_Request} CWorkshop_GetContributors_Request */ - CWorkshop_GetContributors_Request.fromObject = function fromObject(object) { + CWorkshop_GetContributors_Request.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_GetContributors_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_GetContributors_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_GetContributors_Request(); if (object.appid != null) message.appid = object.appid >>> 0; @@ -98827,17 +128007,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CWorkshop_GetContributors_Request.toObject = function toObject(message, options) { + CWorkshop_GetContributors_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.appid = 0; object.gameitemid = 0; } - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) object.gameitemid = message.gameitemid; return object; }; @@ -98849,8 +128033,22 @@ * @instance * @returns {Object.} JSON object */ - CWorkshop_GetContributors_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CWorkshop_GetContributors_Request.prototype.toJSON = function() { + return CWorkshop_GetContributors_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CWorkshop_GetContributors_Request + * @function getTypeUrl + * @memberof CWorkshop_GetContributors_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CWorkshop_GetContributors_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_GetContributors_Request"; }; return CWorkshop_GetContributors_Request; @@ -98858,28 +128056,41 @@ $root.CWorkshop_GetContributors_Response = (function() { + /** + * Properties of a CWorkshop_GetContributors_Response. + * @typedef {Object} CWorkshop_GetContributors_Response.$Properties + * @property {Array.|null} [contributors] CWorkshop_GetContributors_Response contributors + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CWorkshop_GetContributors_Response. * @exports ICWorkshop_GetContributors_Response * @interface ICWorkshop_GetContributors_Response - * @property {Array.|null} [contributors] CWorkshop_GetContributors_Response contributors + * @augments CWorkshop_GetContributors_Response.$Properties + * @deprecated Use CWorkshop_GetContributors_Response.$Properties instead. + */ + + /** + * Shape of a CWorkshop_GetContributors_Response. + * @typedef {CWorkshop_GetContributors_Response.$Properties} CWorkshop_GetContributors_Response.$Shape */ /** * Constructs a new CWorkshop_GetContributors_Response. * @exports CWorkshop_GetContributors_Response * @classdesc Represents a CWorkshop_GetContributors_Response. - * @implements ICWorkshop_GetContributors_Response * @constructor - * @param {ICWorkshop_GetContributors_Response=} [properties] Properties to set + * @param {CWorkshop_GetContributors_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CWorkshop_GetContributors_Response(properties) { + var CWorkshop_GetContributors_Response = function (properties) { this.contributors = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CWorkshop_GetContributors_Response contributors. @@ -98894,10 +128105,14 @@ * @function create * @memberof CWorkshop_GetContributors_Response * @static - * @param {ICWorkshop_GetContributors_Response=} [properties] Properties to set + * @param {CWorkshop_GetContributors_Response.$Properties=} [properties] Properties to set * @returns {CWorkshop_GetContributors_Response} CWorkshop_GetContributors_Response instance + * @type {{ + * (properties: CWorkshop_GetContributors_Response.$Shape): CWorkshop_GetContributors_Response & CWorkshop_GetContributors_Response.$Shape; + * (properties?: CWorkshop_GetContributors_Response.$Properties): CWorkshop_GetContributors_Response; + * }} */ - CWorkshop_GetContributors_Response.create = function create(properties) { + CWorkshop_GetContributors_Response.create = function(properties) { return new CWorkshop_GetContributors_Response(properties); }; @@ -98906,16 +128121,23 @@ * @function encode * @memberof CWorkshop_GetContributors_Response * @static - * @param {ICWorkshop_GetContributors_Response} message CWorkshop_GetContributors_Response message or plain object to encode + * @param {CWorkshop_GetContributors_Response.$Properties} message CWorkshop_GetContributors_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_GetContributors_Response.encode = function encode(message, writer) { + CWorkshop_GetContributors_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.contributors != null && message.contributors.length) for (var i = 0; i < message.contributors.length; ++i) writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.contributors[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -98924,12 +128146,12 @@ * @function encodeDelimited * @memberof CWorkshop_GetContributors_Response * @static - * @param {ICWorkshop_GetContributors_Response} message CWorkshop_GetContributors_Response message or plain object to encode + * @param {CWorkshop_GetContributors_Response.$Properties} message CWorkshop_GetContributors_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_GetContributors_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CWorkshop_GetContributors_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -98939,32 +128161,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_GetContributors_Response} CWorkshop_GetContributors_Response + * @returns {CWorkshop_GetContributors_Response & CWorkshop_GetContributors_Response.$Shape} CWorkshop_GetContributors_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_GetContributors_Response.decode = function decode(reader, length) { + CWorkshop_GetContributors_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_GetContributors_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_GetContributors_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.contributors && message.contributors.length)) - message.contributors = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.contributors.push(reader.fixed64()); - } else + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.contributors && message.contributors.length)) + message.contributors = []; + reader.fixed64s(message.contributors); + continue; + } + if (wireType !== 1) + break; + if (!(message.contributors && message.contributors.length)) + message.contributors = []; message.contributors.push(reader.fixed64()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -98974,11 +128214,11 @@ * @memberof CWorkshop_GetContributors_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_GetContributors_Response} CWorkshop_GetContributors_Response + * @returns {CWorkshop_GetContributors_Response & CWorkshop_GetContributors_Response.$Shape} CWorkshop_GetContributors_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_GetContributors_Response.decodeDelimited = function decodeDelimited(reader) { + CWorkshop_GetContributors_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -98992,11 +128232,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CWorkshop_GetContributors_Response.verify = function verify(message) { + CWorkshop_GetContributors_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.contributors != null && message.hasOwnProperty("contributors")) { - if (!Array.isArray(message.contributors)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.contributors != null && $Object.hasOwnProperty.call(message, "contributors")) { + if (!$Array.isArray(message.contributors)) return "contributors: array expected"; for (var i = 0; i < message.contributors.length; ++i) if (!$util.isInteger(message.contributors[i]) && !(message.contributors[i] && $util.isInteger(message.contributors[i].low) && $util.isInteger(message.contributors[i].high))) @@ -99013,23 +128257,29 @@ * @param {Object.} object Plain object * @returns {CWorkshop_GetContributors_Response} CWorkshop_GetContributors_Response */ - CWorkshop_GetContributors_Response.fromObject = function fromObject(object) { + CWorkshop_GetContributors_Response.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_GetContributors_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_GetContributors_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_GetContributors_Response(); if (object.contributors) { - if (!Array.isArray(object.contributors)) - throw TypeError(".CWorkshop_GetContributors_Response.contributors: array expected"); - message.contributors = []; + if (!$Array.isArray(object.contributors)) + throw $TypeError(".CWorkshop_GetContributors_Response.contributors: array expected"); + message.contributors = $Array(object.contributors.length); for (var i = 0; i < object.contributors.length; ++i) if ($util.Long) - (message.contributors[i] = $util.Long.fromValue(object.contributors[i])).unsigned = false; + message.contributors[i] = $util.Long.fromValue(object.contributors[i], true); else if (typeof object.contributors[i] === "string") - message.contributors[i] = parseInt(object.contributors[i], 10); + message.contributors[i] = $parseInt(object.contributors[i], 10); else if (typeof object.contributors[i] === "number") message.contributors[i] = object.contributors[i]; else if (typeof object.contributors[i] === "object") - message.contributors[i] = new $util.LongBits(object.contributors[i].low >>> 0, object.contributors[i].high >>> 0).toNumber(); + message.contributors[i] = new $util.LongBits(object.contributors[i].low >>> 0, object.contributors[i].high >>> 0).toNumber(true); } return message; }; @@ -99043,19 +128293,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CWorkshop_GetContributors_Response.toObject = function toObject(message, options) { + CWorkshop_GetContributors_Response.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.contributors = []; if (message.contributors && message.contributors.length) { - object.contributors = []; + object.contributors = $Array(message.contributors.length); for (var j = 0; j < message.contributors.length; ++j) - if (typeof message.contributors[j] === "number") - object.contributors[j] = options.longs === String ? String(message.contributors[j]) : message.contributors[j]; + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.contributors[j] = typeof message.contributors[j] === "number" ? $BigInt(message.contributors[j]) : $util.Long.fromBits(message.contributors[j].low >>> 0, message.contributors[j].high >>> 0, true).toBigInt(); + else if (typeof message.contributors[j] === "number") + object.contributors[j] = options.longs === $String ? $String(message.contributors[j]) : message.contributors[j]; else - object.contributors[j] = options.longs === String ? $util.Long.prototype.toString.call(message.contributors[j]) : options.longs === Number ? new $util.LongBits(message.contributors[j].low >>> 0, message.contributors[j].high >>> 0).toNumber() : message.contributors[j]; + object.contributors[j] = options.longs === $String ? $util.Long.prototype.toString.call(message.contributors[j]) : options.longs === $Number ? new $util.LongBits(message.contributors[j].low >>> 0, message.contributors[j].high >>> 0).toNumber(true) : message.contributors[j]; } return object; }; @@ -99067,8 +128323,22 @@ * @instance * @returns {Object.} JSON object */ - CWorkshop_GetContributors_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CWorkshop_GetContributors_Response.prototype.toJSON = function() { + return CWorkshop_GetContributors_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CWorkshop_GetContributors_Response + * @function getTypeUrl + * @memberof CWorkshop_GetContributors_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CWorkshop_GetContributors_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_GetContributors_Response"; }; return CWorkshop_GetContributors_Response; @@ -99078,30 +128348,43 @@ /** * Properties of a CWorkshop_SetItemPaymentRules_Request. - * @exports ICWorkshop_SetItemPaymentRules_Request - * @interface ICWorkshop_SetItemPaymentRules_Request + * @typedef {Object} CWorkshop_SetItemPaymentRules_Request.$Properties * @property {number|null} [appid] CWorkshop_SetItemPaymentRules_Request appid * @property {number|null} [gameitemid] CWorkshop_SetItemPaymentRules_Request gameitemid - * @property {Array.|null} [associated_workshop_files] CWorkshop_SetItemPaymentRules_Request associated_workshop_files - * @property {Array.|null} [partner_accounts] CWorkshop_SetItemPaymentRules_Request partner_accounts + * @property {Array.|null} [associated_workshop_files] CWorkshop_SetItemPaymentRules_Request associated_workshop_files + * @property {Array.|null} [partner_accounts] CWorkshop_SetItemPaymentRules_Request partner_accounts + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CWorkshop_SetItemPaymentRules_Request. + * @exports ICWorkshop_SetItemPaymentRules_Request + * @interface ICWorkshop_SetItemPaymentRules_Request + * @augments CWorkshop_SetItemPaymentRules_Request.$Properties + * @deprecated Use CWorkshop_SetItemPaymentRules_Request.$Properties instead. + */ + + /** + * Shape of a CWorkshop_SetItemPaymentRules_Request. + * @typedef {CWorkshop_SetItemPaymentRules_Request.$Properties} CWorkshop_SetItemPaymentRules_Request.$Shape */ /** * Constructs a new CWorkshop_SetItemPaymentRules_Request. * @exports CWorkshop_SetItemPaymentRules_Request * @classdesc Represents a CWorkshop_SetItemPaymentRules_Request. - * @implements ICWorkshop_SetItemPaymentRules_Request * @constructor - * @param {ICWorkshop_SetItemPaymentRules_Request=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CWorkshop_SetItemPaymentRules_Request(properties) { + var CWorkshop_SetItemPaymentRules_Request = function (properties) { this.associated_workshop_files = []; this.partner_accounts = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CWorkshop_SetItemPaymentRules_Request appid. @@ -99121,7 +128404,7 @@ /** * CWorkshop_SetItemPaymentRules_Request associated_workshop_files. - * @member {Array.} associated_workshop_files + * @member {Array.} associated_workshop_files * @memberof CWorkshop_SetItemPaymentRules_Request * @instance */ @@ -99129,7 +128412,7 @@ /** * CWorkshop_SetItemPaymentRules_Request partner_accounts. - * @member {Array.} partner_accounts + * @member {Array.} partner_accounts * @memberof CWorkshop_SetItemPaymentRules_Request * @instance */ @@ -99140,10 +128423,14 @@ * @function create * @memberof CWorkshop_SetItemPaymentRules_Request * @static - * @param {ICWorkshop_SetItemPaymentRules_Request=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.$Properties=} [properties] Properties to set * @returns {CWorkshop_SetItemPaymentRules_Request} CWorkshop_SetItemPaymentRules_Request instance + * @type {{ + * (properties: CWorkshop_SetItemPaymentRules_Request.$Shape): CWorkshop_SetItemPaymentRules_Request & CWorkshop_SetItemPaymentRules_Request.$Shape; + * (properties?: CWorkshop_SetItemPaymentRules_Request.$Properties): CWorkshop_SetItemPaymentRules_Request; + * }} */ - CWorkshop_SetItemPaymentRules_Request.create = function create(properties) { + CWorkshop_SetItemPaymentRules_Request.create = function(properties) { return new CWorkshop_SetItemPaymentRules_Request(properties); }; @@ -99152,23 +128439,30 @@ * @function encode * @memberof CWorkshop_SetItemPaymentRules_Request * @static - * @param {ICWorkshop_SetItemPaymentRules_Request} message CWorkshop_SetItemPaymentRules_Request message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.$Properties} message CWorkshop_SetItemPaymentRules_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_SetItemPaymentRules_Request.encode = function encode(message, writer) { + CWorkshop_SetItemPaymentRules_Request.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.appid != null && Object.hasOwnProperty.call(message, "appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.appid); - if (message.gameitemid != null && Object.hasOwnProperty.call(message, "gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.gameitemid); if (message.associated_workshop_files != null && message.associated_workshop_files.length) for (var i = 0; i < message.associated_workshop_files.length; ++i) - $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.encode(message.associated_workshop_files[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.encode(message.associated_workshop_files[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); if (message.partner_accounts != null && message.partner_accounts.length) for (var i = 0; i < message.partner_accounts.length; ++i) - $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.encode(message.partner_accounts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.encode(message.partner_accounts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -99177,12 +128471,12 @@ * @function encodeDelimited * @memberof CWorkshop_SetItemPaymentRules_Request * @static - * @param {ICWorkshop_SetItemPaymentRules_Request} message CWorkshop_SetItemPaymentRules_Request message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.$Properties} message CWorkshop_SetItemPaymentRules_Request message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_SetItemPaymentRules_Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CWorkshop_SetItemPaymentRules_Request.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -99192,38 +128486,64 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_SetItemPaymentRules_Request} CWorkshop_SetItemPaymentRules_Request + * @returns {CWorkshop_SetItemPaymentRules_Request & CWorkshop_SetItemPaymentRules_Request.$Shape} CWorkshop_SetItemPaymentRules_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_SetItemPaymentRules_Request.decode = function decode(reader, length) { + CWorkshop_SetItemPaymentRules_Request.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_SetItemPaymentRules_Request(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_SetItemPaymentRules_Request(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.appid = reader.uint32(); - break; - case 2: - message.gameitemid = reader.uint32(); - break; - case 3: - if (!(message.associated_workshop_files && message.associated_workshop_files.length)) - message.associated_workshop_files = []; - message.associated_workshop_files.push($root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.partner_accounts && message.partner_accounts.length)) - message.partner_accounts = []; - message.partner_accounts.push($root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.appid = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.gameitemid = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.associated_workshop_files && message.associated_workshop_files.length)) + message.associated_workshop_files = []; + message.associated_workshop_files.push($root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.partner_accounts && message.partner_accounts.length)) + message.partner_accounts = []; + message.partner_accounts.push($root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -99233,11 +128553,11 @@ * @memberof CWorkshop_SetItemPaymentRules_Request * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_SetItemPaymentRules_Request} CWorkshop_SetItemPaymentRules_Request + * @returns {CWorkshop_SetItemPaymentRules_Request & CWorkshop_SetItemPaymentRules_Request.$Shape} CWorkshop_SetItemPaymentRules_Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_SetItemPaymentRules_Request.decodeDelimited = function decodeDelimited(reader) { + CWorkshop_SetItemPaymentRules_Request.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -99251,29 +128571,33 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CWorkshop_SetItemPaymentRules_Request.verify = function verify(message) { + CWorkshop_SetItemPaymentRules_Request.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.appid != null && message.hasOwnProperty("appid")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) if (!$util.isInteger(message.appid)) return "appid: integer expected"; - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) if (!$util.isInteger(message.gameitemid)) return "gameitemid: integer expected"; - if (message.associated_workshop_files != null && message.hasOwnProperty("associated_workshop_files")) { - if (!Array.isArray(message.associated_workshop_files)) + if (message.associated_workshop_files != null && $Object.hasOwnProperty.call(message, "associated_workshop_files")) { + if (!$Array.isArray(message.associated_workshop_files)) return "associated_workshop_files: array expected"; for (var i = 0; i < message.associated_workshop_files.length; ++i) { - var error = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.verify(message.associated_workshop_files[i]); + var error = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.verify(message.associated_workshop_files[i], _depth + 1); if (error) return "associated_workshop_files." + error; } } - if (message.partner_accounts != null && message.hasOwnProperty("partner_accounts")) { - if (!Array.isArray(message.partner_accounts)) + if (message.partner_accounts != null && $Object.hasOwnProperty.call(message, "partner_accounts")) { + if (!$Array.isArray(message.partner_accounts)) return "partner_accounts: array expected"; for (var i = 0; i < message.partner_accounts.length; ++i) { - var error = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.verify(message.partner_accounts[i]); + var error = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.verify(message.partner_accounts[i], _depth + 1); if (error) return "partner_accounts." + error; } @@ -99289,32 +128613,38 @@ * @param {Object.} object Plain object * @returns {CWorkshop_SetItemPaymentRules_Request} CWorkshop_SetItemPaymentRules_Request */ - CWorkshop_SetItemPaymentRules_Request.fromObject = function fromObject(object) { + CWorkshop_SetItemPaymentRules_Request.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_SetItemPaymentRules_Request) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_SetItemPaymentRules_Request(); if (object.appid != null) message.appid = object.appid >>> 0; if (object.gameitemid != null) message.gameitemid = object.gameitemid >>> 0; if (object.associated_workshop_files) { - if (!Array.isArray(object.associated_workshop_files)) - throw TypeError(".CWorkshop_SetItemPaymentRules_Request.associated_workshop_files: array expected"); - message.associated_workshop_files = []; + if (!$Array.isArray(object.associated_workshop_files)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.associated_workshop_files: array expected"); + message.associated_workshop_files = $Array(object.associated_workshop_files.length); for (var i = 0; i < object.associated_workshop_files.length; ++i) { - if (typeof object.associated_workshop_files[i] !== "object") - throw TypeError(".CWorkshop_SetItemPaymentRules_Request.associated_workshop_files: object expected"); - message.associated_workshop_files[i] = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.fromObject(object.associated_workshop_files[i]); + if (!$util.isObject(object.associated_workshop_files[i])) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.associated_workshop_files: object expected"); + message.associated_workshop_files[i] = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.fromObject(object.associated_workshop_files[i], _depth + 1); } } if (object.partner_accounts) { - if (!Array.isArray(object.partner_accounts)) - throw TypeError(".CWorkshop_SetItemPaymentRules_Request.partner_accounts: array expected"); - message.partner_accounts = []; + if (!$Array.isArray(object.partner_accounts)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.partner_accounts: array expected"); + message.partner_accounts = $Array(object.partner_accounts.length); for (var i = 0; i < object.partner_accounts.length; ++i) { - if (typeof object.partner_accounts[i] !== "object") - throw TypeError(".CWorkshop_SetItemPaymentRules_Request.partner_accounts: object expected"); - message.partner_accounts[i] = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.fromObject(object.partner_accounts[i]); + if (!$util.isObject(object.partner_accounts[i])) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.partner_accounts: object expected"); + message.partner_accounts[i] = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.fromObject(object.partner_accounts[i], _depth + 1); } } return message; @@ -99329,9 +128659,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CWorkshop_SetItemPaymentRules_Request.toObject = function toObject(message, options) { + CWorkshop_SetItemPaymentRules_Request.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.associated_workshop_files = []; @@ -99341,19 +128675,19 @@ object.appid = 0; object.gameitemid = 0; } - if (message.appid != null && message.hasOwnProperty("appid")) + if (message.appid != null && $Object.hasOwnProperty.call(message, "appid")) object.appid = message.appid; - if (message.gameitemid != null && message.hasOwnProperty("gameitemid")) + if (message.gameitemid != null && $Object.hasOwnProperty.call(message, "gameitemid")) object.gameitemid = message.gameitemid; if (message.associated_workshop_files && message.associated_workshop_files.length) { - object.associated_workshop_files = []; + object.associated_workshop_files = $Array(message.associated_workshop_files.length); for (var j = 0; j < message.associated_workshop_files.length; ++j) - object.associated_workshop_files[j] = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.toObject(message.associated_workshop_files[j], options); + object.associated_workshop_files[j] = $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.toObject(message.associated_workshop_files[j], options, _depth + 1); } if (message.partner_accounts && message.partner_accounts.length) { - object.partner_accounts = []; + object.partner_accounts = $Array(message.partner_accounts.length); for (var j = 0; j < message.partner_accounts.length; ++j) - object.partner_accounts[j] = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.toObject(message.partner_accounts[j], options); + object.partner_accounts[j] = $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.toObject(message.partner_accounts[j], options, _depth + 1); } return object; }; @@ -99365,35 +128699,62 @@ * @instance * @returns {Object.} JSON object */ - CWorkshop_SetItemPaymentRules_Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CWorkshop_SetItemPaymentRules_Request.prototype.toJSON = function() { + return CWorkshop_SetItemPaymentRules_Request.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CWorkshop_SetItemPaymentRules_Request + * @function getTypeUrl + * @memberof CWorkshop_SetItemPaymentRules_Request + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CWorkshop_SetItemPaymentRules_Request.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_SetItemPaymentRules_Request"; }; CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule = (function() { /** * Properties of a WorkshopItemPaymentRule. - * @memberof CWorkshop_SetItemPaymentRules_Request - * @interface IWorkshopItemPaymentRule + * @typedef {Object} CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties * @property {number|Long|null} [workshop_file_id] WorkshopItemPaymentRule workshop_file_id * @property {number|null} [revenue_percentage] WorkshopItemPaymentRule revenue_percentage * @property {string|null} [rule_description] WorkshopItemPaymentRule rule_description + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a WorkshopItemPaymentRule. + * @memberof CWorkshop_SetItemPaymentRules_Request + * @interface IWorkshopItemPaymentRule + * @augments CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties + * @deprecated Use CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties instead. + */ + + /** + * Shape of a WorkshopItemPaymentRule. + * @typedef {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties} CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Shape */ /** * Constructs a new WorkshopItemPaymentRule. * @memberof CWorkshop_SetItemPaymentRules_Request * @classdesc Represents a WorkshopItemPaymentRule. - * @implements IWorkshopItemPaymentRule * @constructor - * @param {CWorkshop_SetItemPaymentRules_Request.IWorkshopItemPaymentRule=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function WorkshopItemPaymentRule(properties) { + var WorkshopItemPaymentRule = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * WorkshopItemPaymentRule workshop_file_id. @@ -99424,10 +128785,14 @@ * @function create * @memberof CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IWorkshopItemPaymentRule=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties=} [properties] Properties to set * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule} WorkshopItemPaymentRule instance + * @type {{ + * (properties: CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Shape): CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Shape; + * (properties?: CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties): CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule; + * }} */ - WorkshopItemPaymentRule.create = function create(properties) { + WorkshopItemPaymentRule.create = function(properties) { return new WorkshopItemPaymentRule(properties); }; @@ -99436,19 +128801,26 @@ * @function encode * @memberof CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IWorkshopItemPaymentRule} message WorkshopItemPaymentRule message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties} message WorkshopItemPaymentRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkshopItemPaymentRule.encode = function encode(message, writer) { + WorkshopItemPaymentRule.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.workshop_file_id != null && Object.hasOwnProperty.call(message, "workshop_file_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.workshop_file_id != null && $Object.hasOwnProperty.call(message, "workshop_file_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.workshop_file_id); - if (message.revenue_percentage != null && Object.hasOwnProperty.call(message, "revenue_percentage")) + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.revenue_percentage); - if (message.rule_description != null && Object.hasOwnProperty.call(message, "rule_description")) + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.rule_description); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -99457,12 +128829,12 @@ * @function encodeDelimited * @memberof CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IWorkshopItemPaymentRule} message WorkshopItemPaymentRule message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Properties} message WorkshopItemPaymentRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkshopItemPaymentRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + WorkshopItemPaymentRule.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -99472,31 +128844,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule} WorkshopItemPaymentRule + * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Shape} WorkshopItemPaymentRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkshopItemPaymentRule.decode = function decode(reader, length) { + WorkshopItemPaymentRule.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.workshop_file_id = reader.uint64(); - break; - case 2: - message.revenue_percentage = reader.float(); - break; - case 3: - message.rule_description = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.workshop_file_id = reader.uint64(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.revenue_percentage = reader.float(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.rule_description = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -99506,11 +128901,11 @@ * @memberof CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule} WorkshopItemPaymentRule + * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule.$Shape} WorkshopItemPaymentRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkshopItemPaymentRule.decodeDelimited = function decodeDelimited(reader) { + WorkshopItemPaymentRule.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -99524,16 +128919,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WorkshopItemPaymentRule.verify = function verify(message) { + WorkshopItemPaymentRule.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.workshop_file_id != null && message.hasOwnProperty("workshop_file_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.workshop_file_id != null && $Object.hasOwnProperty.call(message, "workshop_file_id")) if (!$util.isInteger(message.workshop_file_id) && !(message.workshop_file_id && $util.isInteger(message.workshop_file_id.low) && $util.isInteger(message.workshop_file_id.high))) return "workshop_file_id: integer|Long expected"; - if (message.revenue_percentage != null && message.hasOwnProperty("revenue_percentage")) + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) if (typeof message.revenue_percentage !== "number") return "revenue_percentage: number expected"; - if (message.rule_description != null && message.hasOwnProperty("rule_description")) + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) if (!$util.isString(message.rule_description)) return "rule_description: string expected"; return null; @@ -99547,23 +128946,29 @@ * @param {Object.} object Plain object * @returns {CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule} WorkshopItemPaymentRule */ - WorkshopItemPaymentRule.fromObject = function fromObject(object) { + WorkshopItemPaymentRule.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule(); if (object.workshop_file_id != null) if ($util.Long) - (message.workshop_file_id = $util.Long.fromValue(object.workshop_file_id)).unsigned = true; + message.workshop_file_id = $util.Long.fromValue(object.workshop_file_id, true); else if (typeof object.workshop_file_id === "string") - message.workshop_file_id = parseInt(object.workshop_file_id, 10); + message.workshop_file_id = $parseInt(object.workshop_file_id, 10); else if (typeof object.workshop_file_id === "number") message.workshop_file_id = object.workshop_file_id; else if (typeof object.workshop_file_id === "object") message.workshop_file_id = new $util.LongBits(object.workshop_file_id.low >>> 0, object.workshop_file_id.high >>> 0).toNumber(true); if (object.revenue_percentage != null) - message.revenue_percentage = Number(object.revenue_percentage); + message.revenue_percentage = $Number(object.revenue_percentage); if (object.rule_description != null) - message.rule_description = String(object.rule_description); + message.rule_description = $String(object.rule_description); return message; }; @@ -99576,27 +128981,33 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WorkshopItemPaymentRule.toObject = function toObject(message, options) { + WorkshopItemPaymentRule.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, true); - object.workshop_file_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.workshop_file_id = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.workshop_file_id = options.longs === String ? "0" : 0; + object.workshop_file_id = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.revenue_percentage = 0; object.rule_description = ""; } - if (message.workshop_file_id != null && message.hasOwnProperty("workshop_file_id")) - if (typeof message.workshop_file_id === "number") - object.workshop_file_id = options.longs === String ? String(message.workshop_file_id) : message.workshop_file_id; + if (message.workshop_file_id != null && $Object.hasOwnProperty.call(message, "workshop_file_id")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.workshop_file_id = typeof message.workshop_file_id === "number" ? $BigInt(message.workshop_file_id) : $util.Long.fromBits(message.workshop_file_id.low >>> 0, message.workshop_file_id.high >>> 0, true).toBigInt(); + else if (typeof message.workshop_file_id === "number") + object.workshop_file_id = options.longs === $String ? $String(message.workshop_file_id) : message.workshop_file_id; else - object.workshop_file_id = options.longs === String ? $util.Long.prototype.toString.call(message.workshop_file_id) : options.longs === Number ? new $util.LongBits(message.workshop_file_id.low >>> 0, message.workshop_file_id.high >>> 0).toNumber(true) : message.workshop_file_id; - if (message.revenue_percentage != null && message.hasOwnProperty("revenue_percentage")) - object.revenue_percentage = options.json && !isFinite(message.revenue_percentage) ? String(message.revenue_percentage) : message.revenue_percentage; - if (message.rule_description != null && message.hasOwnProperty("rule_description")) + object.workshop_file_id = options.longs === $String ? $util.Long.prototype.toString.call(message.workshop_file_id) : options.longs === $Number ? new $util.LongBits(message.workshop_file_id.low >>> 0, message.workshop_file_id.high >>> 0).toNumber(true) : message.workshop_file_id; + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) + object.revenue_percentage = options.json && !$isFinite(message.revenue_percentage) ? $String(message.revenue_percentage) : message.revenue_percentage; + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) object.rule_description = message.rule_description; return object; }; @@ -99608,8 +129019,22 @@ * @instance * @returns {Object.} JSON object */ - WorkshopItemPaymentRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + WorkshopItemPaymentRule.prototype.toJSON = function() { + return WorkshopItemPaymentRule.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for WorkshopItemPaymentRule + * @function getTypeUrl + * @memberof CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + WorkshopItemPaymentRule.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule"; }; return WorkshopItemPaymentRule; @@ -99619,27 +129044,40 @@ /** * Properties of a PartnerItemPaymentRule. - * @memberof CWorkshop_SetItemPaymentRules_Request - * @interface IPartnerItemPaymentRule + * @typedef {Object} CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties * @property {number|null} [account_id] PartnerItemPaymentRule account_id * @property {number|null} [revenue_percentage] PartnerItemPaymentRule revenue_percentage * @property {string|null} [rule_description] PartnerItemPaymentRule rule_description + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PartnerItemPaymentRule. + * @memberof CWorkshop_SetItemPaymentRules_Request + * @interface IPartnerItemPaymentRule + * @augments CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties + * @deprecated Use CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties instead. + */ + + /** + * Shape of a PartnerItemPaymentRule. + * @typedef {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties} CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Shape */ /** * Constructs a new PartnerItemPaymentRule. * @memberof CWorkshop_SetItemPaymentRules_Request * @classdesc Represents a PartnerItemPaymentRule. - * @implements IPartnerItemPaymentRule * @constructor - * @param {CWorkshop_SetItemPaymentRules_Request.IPartnerItemPaymentRule=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function PartnerItemPaymentRule(properties) { + var PartnerItemPaymentRule = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * PartnerItemPaymentRule account_id. @@ -99670,10 +129108,14 @@ * @function create * @memberof CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IPartnerItemPaymentRule=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties=} [properties] Properties to set * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule} PartnerItemPaymentRule instance + * @type {{ + * (properties: CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Shape): CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Shape; + * (properties?: CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties): CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule; + * }} */ - PartnerItemPaymentRule.create = function create(properties) { + PartnerItemPaymentRule.create = function(properties) { return new PartnerItemPaymentRule(properties); }; @@ -99682,19 +129124,26 @@ * @function encode * @memberof CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IPartnerItemPaymentRule} message PartnerItemPaymentRule message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties} message PartnerItemPaymentRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartnerItemPaymentRule.encode = function encode(message, writer) { + PartnerItemPaymentRule.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.account_id != null && Object.hasOwnProperty.call(message, "account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.account_id); - if (message.revenue_percentage != null && Object.hasOwnProperty.call(message, "revenue_percentage")) + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.revenue_percentage); - if (message.rule_description != null && Object.hasOwnProperty.call(message, "rule_description")) + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.rule_description); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -99703,12 +129152,12 @@ * @function encodeDelimited * @memberof CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule * @static - * @param {CWorkshop_SetItemPaymentRules_Request.IPartnerItemPaymentRule} message PartnerItemPaymentRule message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Properties} message PartnerItemPaymentRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartnerItemPaymentRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PartnerItemPaymentRule.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -99718,31 +129167,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule} PartnerItemPaymentRule + * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Shape} PartnerItemPaymentRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartnerItemPaymentRule.decode = function decode(reader, length) { + PartnerItemPaymentRule.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account_id = reader.uint32(); - break; - case 2: - message.revenue_percentage = reader.float(); - break; - case 3: - message.rule_description = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.account_id = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.revenue_percentage = reader.float(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.rule_description = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -99752,11 +129224,11 @@ * @memberof CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule} PartnerItemPaymentRule + * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule & CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule.$Shape} PartnerItemPaymentRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartnerItemPaymentRule.decodeDelimited = function decodeDelimited(reader) { + PartnerItemPaymentRule.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -99770,16 +129242,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PartnerItemPaymentRule.verify = function verify(message) { + PartnerItemPaymentRule.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) if (!$util.isInteger(message.account_id)) return "account_id: integer expected"; - if (message.revenue_percentage != null && message.hasOwnProperty("revenue_percentage")) + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) if (typeof message.revenue_percentage !== "number") return "revenue_percentage: number expected"; - if (message.rule_description != null && message.hasOwnProperty("rule_description")) + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) if (!$util.isString(message.rule_description)) return "rule_description: string expected"; return null; @@ -99793,16 +129269,22 @@ * @param {Object.} object Plain object * @returns {CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule} PartnerItemPaymentRule */ - PartnerItemPaymentRule.fromObject = function fromObject(object) { + PartnerItemPaymentRule.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule(); if (object.account_id != null) message.account_id = object.account_id >>> 0; if (object.revenue_percentage != null) - message.revenue_percentage = Number(object.revenue_percentage); + message.revenue_percentage = $Number(object.revenue_percentage); if (object.rule_description != null) - message.rule_description = String(object.rule_description); + message.rule_description = $String(object.rule_description); return message; }; @@ -99815,20 +129297,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartnerItemPaymentRule.toObject = function toObject(message, options) { + PartnerItemPaymentRule.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.account_id = 0; object.revenue_percentage = 0; object.rule_description = ""; } - if (message.account_id != null && message.hasOwnProperty("account_id")) + if (message.account_id != null && $Object.hasOwnProperty.call(message, "account_id")) object.account_id = message.account_id; - if (message.revenue_percentage != null && message.hasOwnProperty("revenue_percentage")) - object.revenue_percentage = options.json && !isFinite(message.revenue_percentage) ? String(message.revenue_percentage) : message.revenue_percentage; - if (message.rule_description != null && message.hasOwnProperty("rule_description")) + if (message.revenue_percentage != null && $Object.hasOwnProperty.call(message, "revenue_percentage")) + object.revenue_percentage = options.json && !$isFinite(message.revenue_percentage) ? $String(message.revenue_percentage) : message.revenue_percentage; + if (message.rule_description != null && $Object.hasOwnProperty.call(message, "rule_description")) object.rule_description = message.rule_description; return object; }; @@ -99840,8 +129326,22 @@ * @instance * @returns {Object.} JSON object */ - PartnerItemPaymentRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + PartnerItemPaymentRule.prototype.toJSON = function() { + return PartnerItemPaymentRule.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PartnerItemPaymentRule + * @function getTypeUrl + * @memberof CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PartnerItemPaymentRule.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule"; }; return PartnerItemPaymentRule; @@ -99852,36 +129352,53 @@ $root.CWorkshop_SetItemPaymentRules_Response = (function() { + /** + * Properties of a CWorkshop_SetItemPaymentRules_Response. + * @typedef {Object} CWorkshop_SetItemPaymentRules_Response.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CWorkshop_SetItemPaymentRules_Response. * @exports ICWorkshop_SetItemPaymentRules_Response * @interface ICWorkshop_SetItemPaymentRules_Response + * @augments CWorkshop_SetItemPaymentRules_Response.$Properties + * @deprecated Use CWorkshop_SetItemPaymentRules_Response.$Properties instead. + */ + + /** + * Shape of a CWorkshop_SetItemPaymentRules_Response. + * @typedef {CWorkshop_SetItemPaymentRules_Response.$Properties} CWorkshop_SetItemPaymentRules_Response.$Shape */ /** * Constructs a new CWorkshop_SetItemPaymentRules_Response. * @exports CWorkshop_SetItemPaymentRules_Response * @classdesc Represents a CWorkshop_SetItemPaymentRules_Response. - * @implements ICWorkshop_SetItemPaymentRules_Response * @constructor - * @param {ICWorkshop_SetItemPaymentRules_Response=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Response.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CWorkshop_SetItemPaymentRules_Response(properties) { + var CWorkshop_SetItemPaymentRules_Response = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Creates a new CWorkshop_SetItemPaymentRules_Response instance using the specified properties. * @function create * @memberof CWorkshop_SetItemPaymentRules_Response * @static - * @param {ICWorkshop_SetItemPaymentRules_Response=} [properties] Properties to set + * @param {CWorkshop_SetItemPaymentRules_Response.$Properties=} [properties] Properties to set * @returns {CWorkshop_SetItemPaymentRules_Response} CWorkshop_SetItemPaymentRules_Response instance + * @type {{ + * (properties: CWorkshop_SetItemPaymentRules_Response.$Shape): CWorkshop_SetItemPaymentRules_Response & CWorkshop_SetItemPaymentRules_Response.$Shape; + * (properties?: CWorkshop_SetItemPaymentRules_Response.$Properties): CWorkshop_SetItemPaymentRules_Response; + * }} */ - CWorkshop_SetItemPaymentRules_Response.create = function create(properties) { + CWorkshop_SetItemPaymentRules_Response.create = function(properties) { return new CWorkshop_SetItemPaymentRules_Response(properties); }; @@ -99890,13 +129407,20 @@ * @function encode * @memberof CWorkshop_SetItemPaymentRules_Response * @static - * @param {ICWorkshop_SetItemPaymentRules_Response} message CWorkshop_SetItemPaymentRules_Response message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Response.$Properties} message CWorkshop_SetItemPaymentRules_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_SetItemPaymentRules_Response.encode = function encode(message, writer) { + CWorkshop_SetItemPaymentRules_Response.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -99905,12 +129429,12 @@ * @function encodeDelimited * @memberof CWorkshop_SetItemPaymentRules_Response * @static - * @param {ICWorkshop_SetItemPaymentRules_Response} message CWorkshop_SetItemPaymentRules_Response message or plain object to encode + * @param {CWorkshop_SetItemPaymentRules_Response.$Properties} message CWorkshop_SetItemPaymentRules_Response message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CWorkshop_SetItemPaymentRules_Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CWorkshop_SetItemPaymentRules_Response.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -99920,22 +129444,33 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CWorkshop_SetItemPaymentRules_Response} CWorkshop_SetItemPaymentRules_Response + * @returns {CWorkshop_SetItemPaymentRules_Response & CWorkshop_SetItemPaymentRules_Response.$Shape} CWorkshop_SetItemPaymentRules_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_SetItemPaymentRules_Response.decode = function decode(reader, length) { + CWorkshop_SetItemPaymentRules_Response.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CWorkshop_SetItemPaymentRules_Response(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CWorkshop_SetItemPaymentRules_Response(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + reader.skipType(tag & 7, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -99945,11 +129480,11 @@ * @memberof CWorkshop_SetItemPaymentRules_Response * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CWorkshop_SetItemPaymentRules_Response} CWorkshop_SetItemPaymentRules_Response + * @returns {CWorkshop_SetItemPaymentRules_Response & CWorkshop_SetItemPaymentRules_Response.$Shape} CWorkshop_SetItemPaymentRules_Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CWorkshop_SetItemPaymentRules_Response.decodeDelimited = function decodeDelimited(reader) { + CWorkshop_SetItemPaymentRules_Response.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -99963,9 +129498,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CWorkshop_SetItemPaymentRules_Response.verify = function verify(message) { + CWorkshop_SetItemPaymentRules_Response.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; return null; }; @@ -99977,9 +129516,15 @@ * @param {Object.} object Plain object * @returns {CWorkshop_SetItemPaymentRules_Response} CWorkshop_SetItemPaymentRules_Response */ - CWorkshop_SetItemPaymentRules_Response.fromObject = function fromObject(object) { + CWorkshop_SetItemPaymentRules_Response.fromObject = function (object, _depth) { if (object instanceof $root.CWorkshop_SetItemPaymentRules_Response) return object; + if (!$util.isObject(object)) + throw $TypeError(".CWorkshop_SetItemPaymentRules_Response: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); return new $root.CWorkshop_SetItemPaymentRules_Response(); }; @@ -99992,7 +129537,7 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CWorkshop_SetItemPaymentRules_Response.toObject = function toObject() { + CWorkshop_SetItemPaymentRules_Response.toObject = function () { return {}; }; @@ -100003,8 +129548,22 @@ * @instance * @returns {Object.} JSON object */ - CWorkshop_SetItemPaymentRules_Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CWorkshop_SetItemPaymentRules_Response.prototype.toJSON = function() { + return CWorkshop_SetItemPaymentRules_Response.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CWorkshop_SetItemPaymentRules_Response + * @function getTypeUrl + * @memberof CWorkshop_SetItemPaymentRules_Response + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CWorkshop_SetItemPaymentRules_Response.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CWorkshop_SetItemPaymentRules_Response"; }; return CWorkshop_SetItemPaymentRules_Response; diff --git a/protobufs/generated/tf_proto_def_messages.js b/protobufs/generated/tf_proto_def_messages.js index d25803a..75b8ddc 100644 --- a/protobufs/generated/tf_proto_def_messages.js +++ b/protobufs/generated/tf_proto_def_messages.js @@ -1,4 +1,4 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-mixed-operators, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars, default-case, jsdoc/require-param*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) @@ -12,20 +12,21 @@ // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + var $Object = $util.global.Object, $undefined = $util.global.undefined, $Error = $util.global.Error, $Array = $util.global.Array, $TypeError = $util.global.TypeError, $String = $util.global.String, $Boolean = $util.global.Boolean, $Number = $util.global.Number, $isFinite = $util.global.isFinite, $parseInt = $util.global.parseInt, $BigInt = $util.global.BigInt; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); /** * LogicalOperation enum. - * @exports LogicalOperation + * @name LogicalOperation * @enum {number} * @property {number} AND=0 AND value * @property {number} OR=1 OR value * @property {number} NOT=2 NOT value */ $root.LogicalOperation = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "AND"] = 0; values[valuesById[1] = "OR"] = 1; values[valuesById[2] = "NOT"] = 2; @@ -34,7 +35,7 @@ /** * EValueDefinitionSource enum. - * @exports EValueDefinitionSource + * @name EValueDefinitionSource * @enum {number} * @property {number} REFERENCE_DEFINES=0 REFERENCE_DEFINES value * @property {number} PARENT_DEFINES=1 PARENT_DEFINES value @@ -43,7 +44,7 @@ * @property {number} NOT_DEFINED=4 NOT_DEFINED value */ $root.EValueDefinitionSource = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "REFERENCE_DEFINES"] = 0; values[valuesById[1] = "PARENT_DEFINES"] = 1; values[valuesById[2] = "THIS_DEFINES"] = 2; @@ -54,7 +55,7 @@ /** * ProtoDefTypes enum. - * @exports ProtoDefTypes + * @name ProtoDefTypes * @enum {number} * @property {number} DEF_TYPE_QUEST_MAP_NODE=0 DEF_TYPE_QUEST_MAP_NODE value * @property {number} DEF_TYPE_QUEST_THEME=2 DEF_TYPE_QUEST_THEME value @@ -70,7 +71,7 @@ * @property {number} DEF_TYPE_QUEST_MAP_STAR_TYPE=12 DEF_TYPE_QUEST_MAP_STAR_TYPE value */ $root.ProtoDefTypes = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "DEF_TYPE_QUEST_MAP_NODE"] = 0; values[valuesById[2] = "DEF_TYPE_QUEST_THEME"] = 2; values[valuesById[3] = "DEF_TYPE_QUEST_MAP_REGION"] = 3; @@ -88,14 +89,14 @@ /** * EQuestPoints enum. - * @exports EQuestPoints + * @name EQuestPoints * @enum {number} * @property {number} QUEST_POINTS_NOVICE=0 QUEST_POINTS_NOVICE value * @property {number} QUEST_POINTS_ADVANCED=1 QUEST_POINTS_ADVANCED value * @property {number} QUEST_POINTS_EXPERT=2 QUEST_POINTS_EXPERT value */ $root.EQuestPoints = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "QUEST_POINTS_NOVICE"] = 0; values[valuesById[1] = "QUEST_POINTS_ADVANCED"] = 1; values[valuesById[2] = "QUEST_POINTS_EXPERT"] = 2; @@ -104,7 +105,7 @@ /** * EVarFieldType enum. - * @exports EVarFieldType + * @name EVarFieldType * @enum {number} * @property {number} VAR_TYPE_INVALID=1 VAR_TYPE_INVALID value * @property {number} VAR_TYPE_FLOAT=2 VAR_TYPE_FLOAT value @@ -117,7 +118,7 @@ * @property {number} VAR_TYPE_STRING=9 VAR_TYPE_STRING value */ $root.EVarFieldType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "VAR_TYPE_INVALID"] = 1; values[valuesById[2] = "VAR_TYPE_FLOAT"] = 2; values[valuesById[3] = "VAR_TYPE_DOUBLE"] = 3; @@ -132,7 +133,7 @@ /** * ENodeCashReward enum. - * @exports ENodeCashReward + * @name ENodeCashReward * @enum {number} * @property {number} CASH_REWARD_NONE=1 CASH_REWARD_NONE value * @property {number} CASH_REWARD_SMALL=2 CASH_REWARD_SMALL value @@ -140,7 +141,7 @@ * @property {number} CASH_REWARD_LARGE=4 CASH_REWARD_LARGE value */ $root.ENodeCashReward = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "CASH_REWARD_NONE"] = 1; values[valuesById[2] = "CASH_REWARD_SMALL"] = 2; values[valuesById[3] = "CASH_REWARD_MEDIUM"] = 3; @@ -150,32 +151,45 @@ $root.CMsgFieldID = (function() { + /** + * Properties of a CMsgFieldID. + * @typedef {Object} CMsgFieldID.$Properties + * @property {Array.|null} [field] CMsgFieldID field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgFieldID. * @exports ICMsgFieldID * @interface ICMsgFieldID - * @property {Array.|null} [field] CMsgFieldID field + * @augments CMsgFieldID.$Properties + * @deprecated Use CMsgFieldID.$Properties instead. + */ + + /** + * Shape of a CMsgFieldID. + * @typedef {CMsgFieldID.$Properties} CMsgFieldID.$Shape */ /** * Constructs a new CMsgFieldID. * @exports CMsgFieldID * @classdesc Represents a CMsgFieldID. - * @implements ICMsgFieldID * @constructor - * @param {ICMsgFieldID=} [properties] Properties to set + * @param {CMsgFieldID.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgFieldID(properties) { + var CMsgFieldID = function (properties) { this.field = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgFieldID field. - * @member {Array.} field + * @member {Array.} field * @memberof CMsgFieldID * @instance */ @@ -186,10 +200,14 @@ * @function create * @memberof CMsgFieldID * @static - * @param {ICMsgFieldID=} [properties] Properties to set + * @param {CMsgFieldID.$Properties=} [properties] Properties to set * @returns {CMsgFieldID} CMsgFieldID instance + * @type {{ + * (properties: CMsgFieldID.$Shape): CMsgFieldID & CMsgFieldID.$Shape; + * (properties?: CMsgFieldID.$Properties): CMsgFieldID; + * }} */ - CMsgFieldID.create = function create(properties) { + CMsgFieldID.create = function(properties) { return new CMsgFieldID(properties); }; @@ -198,16 +216,23 @@ * @function encode * @memberof CMsgFieldID * @static - * @param {ICMsgFieldID} message CMsgFieldID message or plain object to encode + * @param {CMsgFieldID.$Properties} message CMsgFieldID message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgFieldID.encode = function encode(message, writer) { + CMsgFieldID.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) - $root.CMsgFieldID.CMsgField.encode(message.field[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgFieldID.CMsgField.encode(message.field[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -216,12 +241,12 @@ * @function encodeDelimited * @memberof CMsgFieldID * @static - * @param {ICMsgFieldID} message CMsgFieldID message or plain object to encode + * @param {CMsgFieldID.$Properties} message CMsgFieldID message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgFieldID.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgFieldID.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -231,27 +256,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgFieldID} CMsgFieldID + * @returns {CMsgFieldID & CMsgFieldID.$Shape} CMsgFieldID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgFieldID.decode = function decode(reader, length) { + CMsgFieldID.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgFieldID(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgFieldID(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.CMsgFieldID.CMsgField.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.CMsgFieldID.CMsgField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -261,11 +303,11 @@ * @memberof CMsgFieldID * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgFieldID} CMsgFieldID + * @returns {CMsgFieldID & CMsgFieldID.$Shape} CMsgFieldID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgFieldID.decodeDelimited = function decodeDelimited(reader) { + CMsgFieldID.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -279,14 +321,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgFieldID.verify = function verify(message) { + CMsgFieldID.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) { + if (!$Array.isArray(message.field)) return "field: array expected"; for (var i = 0; i < message.field.length; ++i) { - var error = $root.CMsgFieldID.CMsgField.verify(message.field[i]); + var error = $root.CMsgFieldID.CMsgField.verify(message.field[i], _depth + 1); if (error) return "field." + error; } @@ -302,18 +348,24 @@ * @param {Object.} object Plain object * @returns {CMsgFieldID} CMsgFieldID */ - CMsgFieldID.fromObject = function fromObject(object) { + CMsgFieldID.fromObject = function (object, _depth) { if (object instanceof $root.CMsgFieldID) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgFieldID: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgFieldID(); if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".CMsgFieldID.field: array expected"); - message.field = []; + if (!$Array.isArray(object.field)) + throw $TypeError(".CMsgFieldID.field: array expected"); + message.field = $Array(object.field.length); for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".CMsgFieldID.field: object expected"); - message.field[i] = $root.CMsgFieldID.CMsgField.fromObject(object.field[i]); + if (!$util.isObject(object.field[i])) + throw $TypeError(".CMsgFieldID.field: object expected"); + message.field[i] = $root.CMsgFieldID.CMsgField.fromObject(object.field[i], _depth + 1); } } return message; @@ -328,16 +380,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgFieldID.toObject = function toObject(message, options) { + CMsgFieldID.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.field = []; if (message.field && message.field.length) { - object.field = []; + object.field = $Array(message.field.length); for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.CMsgFieldID.CMsgField.toObject(message.field[j], options); + object.field[j] = $root.CMsgFieldID.CMsgField.toObject(message.field[j], options, _depth + 1); } return object; }; @@ -349,34 +405,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgFieldID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgFieldID.prototype.toJSON = function() { + return CMsgFieldID.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgFieldID + * @function getTypeUrl + * @memberof CMsgFieldID + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgFieldID.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgFieldID"; }; CMsgFieldID.CMsgField = (function() { /** * Properties of a CMsgField. - * @memberof CMsgFieldID - * @interface ICMsgField + * @typedef {Object} CMsgFieldID.CMsgField.$Properties * @property {number|null} [field_number] CMsgField field_number * @property {number|null} [repeated_index] CMsgField repeated_index + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgField. + * @memberof CMsgFieldID + * @interface ICMsgField + * @augments CMsgFieldID.CMsgField.$Properties + * @deprecated Use CMsgFieldID.CMsgField.$Properties instead. + */ + + /** + * Shape of a CMsgField. + * @typedef {CMsgFieldID.CMsgField.$Properties} CMsgFieldID.CMsgField.$Shape */ /** * Constructs a new CMsgField. * @memberof CMsgFieldID * @classdesc Represents a CMsgField. - * @implements ICMsgField * @constructor - * @param {CMsgFieldID.ICMsgField=} [properties] Properties to set + * @param {CMsgFieldID.CMsgField.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgField(properties) { + var CMsgField = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgField field_number. @@ -399,10 +482,14 @@ * @function create * @memberof CMsgFieldID.CMsgField * @static - * @param {CMsgFieldID.ICMsgField=} [properties] Properties to set + * @param {CMsgFieldID.CMsgField.$Properties=} [properties] Properties to set * @returns {CMsgFieldID.CMsgField} CMsgField instance + * @type {{ + * (properties: CMsgFieldID.CMsgField.$Shape): CMsgFieldID.CMsgField & CMsgFieldID.CMsgField.$Shape; + * (properties?: CMsgFieldID.CMsgField.$Properties): CMsgFieldID.CMsgField; + * }} */ - CMsgField.create = function create(properties) { + CMsgField.create = function(properties) { return new CMsgField(properties); }; @@ -411,17 +498,24 @@ * @function encode * @memberof CMsgFieldID.CMsgField * @static - * @param {CMsgFieldID.ICMsgField} message CMsgField message or plain object to encode + * @param {CMsgFieldID.CMsgField.$Properties} message CMsgField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgField.encode = function encode(message, writer) { + CMsgField.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.field_number != null && Object.hasOwnProperty.call(message, "field_number")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.field_number != null && $Object.hasOwnProperty.call(message, "field_number")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.field_number); - if (message.repeated_index != null && Object.hasOwnProperty.call(message, "repeated_index")) + if (message.repeated_index != null && $Object.hasOwnProperty.call(message, "repeated_index")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.repeated_index); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -430,12 +524,12 @@ * @function encodeDelimited * @memberof CMsgFieldID.CMsgField * @static - * @param {CMsgFieldID.ICMsgField} message CMsgField message or plain object to encode + * @param {CMsgFieldID.CMsgField.$Properties} message CMsgField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgField.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -445,28 +539,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgFieldID.CMsgField} CMsgField + * @returns {CMsgFieldID.CMsgField & CMsgFieldID.CMsgField.$Shape} CMsgField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgField.decode = function decode(reader, length) { + CMsgField.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgFieldID.CMsgField(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgFieldID.CMsgField(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.field_number = reader.uint32(); - break; - case 2: - message.repeated_index = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.field_number = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.repeated_index = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -476,11 +590,11 @@ * @memberof CMsgFieldID.CMsgField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgFieldID.CMsgField} CMsgField + * @returns {CMsgFieldID.CMsgField & CMsgFieldID.CMsgField.$Shape} CMsgField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgField.decodeDelimited = function decodeDelimited(reader) { + CMsgField.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -494,13 +608,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgField.verify = function verify(message) { + CMsgField.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.field_number != null && message.hasOwnProperty("field_number")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.field_number != null && $Object.hasOwnProperty.call(message, "field_number")) if (!$util.isInteger(message.field_number)) return "field_number: integer expected"; - if (message.repeated_index != null && message.hasOwnProperty("repeated_index")) + if (message.repeated_index != null && $Object.hasOwnProperty.call(message, "repeated_index")) if (!$util.isInteger(message.repeated_index)) return "repeated_index: integer expected"; return null; @@ -514,9 +632,15 @@ * @param {Object.} object Plain object * @returns {CMsgFieldID.CMsgField} CMsgField */ - CMsgField.fromObject = function fromObject(object) { + CMsgField.fromObject = function (object, _depth) { if (object instanceof $root.CMsgFieldID.CMsgField) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgFieldID.CMsgField: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgFieldID.CMsgField(); if (object.field_number != null) message.field_number = object.field_number >>> 0; @@ -534,17 +658,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgField.toObject = function toObject(message, options) { + CMsgField.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.field_number = 0; object.repeated_index = 0; } - if (message.field_number != null && message.hasOwnProperty("field_number")) + if (message.field_number != null && $Object.hasOwnProperty.call(message, "field_number")) object.field_number = message.field_number; - if (message.repeated_index != null && message.hasOwnProperty("repeated_index")) + if (message.repeated_index != null && $Object.hasOwnProperty.call(message, "repeated_index")) object.repeated_index = message.repeated_index; return object; }; @@ -556,8 +684,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgField.prototype.toJSON = function() { + return CMsgField.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgField + * @function getTypeUrl + * @memberof CMsgFieldID.CMsgField + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgField.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgFieldID.CMsgField"; }; return CMsgField; @@ -568,29 +710,47 @@ $root.CMsgUniversalFieldID = (function() { + /** + * Properties of a CMsgUniversalFieldID. + * @typedef {Object} CMsgUniversalFieldID.$Properties + * @property {EValueDefinitionSource|null} [source_type] CMsgUniversalFieldID source_type + * @property {CMsgProtoDefID.$Properties|null} [defining_obj_id] CMsgUniversalFieldID defining_obj_id + * @property {CMsgFieldID.$Properties|null} [field_id] CMsgUniversalFieldID field_id + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgUniversalFieldID. * @exports ICMsgUniversalFieldID * @interface ICMsgUniversalFieldID - * @property {EValueDefinitionSource|null} [source_type] CMsgUniversalFieldID source_type - * @property {ICMsgProtoDefID|null} [defining_obj_id] CMsgUniversalFieldID defining_obj_id - * @property {ICMsgFieldID|null} [field_id] CMsgUniversalFieldID field_id + * @augments CMsgUniversalFieldID.$Properties + * @deprecated Use CMsgUniversalFieldID.$Properties instead. + */ + + /** + * Shape of a CMsgUniversalFieldID. + * @typedef {{ + * source_type?: EValueDefinitionSource|null; + * defining_obj_id?: CMsgProtoDefID.$Shape|null; + * field_id?: CMsgFieldID.$Shape|null; + * $unknowns?: Array.; + * }} CMsgUniversalFieldID.$Shape */ /** * Constructs a new CMsgUniversalFieldID. * @exports CMsgUniversalFieldID * @classdesc Represents a CMsgUniversalFieldID. - * @implements ICMsgUniversalFieldID * @constructor - * @param {ICMsgUniversalFieldID=} [properties] Properties to set + * @param {CMsgUniversalFieldID.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgUniversalFieldID(properties) { + var CMsgUniversalFieldID = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgUniversalFieldID source_type. @@ -602,7 +762,7 @@ /** * CMsgUniversalFieldID defining_obj_id. - * @member {ICMsgProtoDefID|null|undefined} defining_obj_id + * @member {CMsgProtoDefID.$Properties|null|undefined} defining_obj_id * @memberof CMsgUniversalFieldID * @instance */ @@ -610,7 +770,7 @@ /** * CMsgUniversalFieldID field_id. - * @member {ICMsgFieldID|null|undefined} field_id + * @member {CMsgFieldID.$Properties|null|undefined} field_id * @memberof CMsgUniversalFieldID * @instance */ @@ -621,10 +781,14 @@ * @function create * @memberof CMsgUniversalFieldID * @static - * @param {ICMsgUniversalFieldID=} [properties] Properties to set + * @param {CMsgUniversalFieldID.$Properties=} [properties] Properties to set * @returns {CMsgUniversalFieldID} CMsgUniversalFieldID instance + * @type {{ + * (properties: CMsgUniversalFieldID.$Shape): CMsgUniversalFieldID & CMsgUniversalFieldID.$Shape; + * (properties?: CMsgUniversalFieldID.$Properties): CMsgUniversalFieldID; + * }} */ - CMsgUniversalFieldID.create = function create(properties) { + CMsgUniversalFieldID.create = function(properties) { return new CMsgUniversalFieldID(properties); }; @@ -633,19 +797,26 @@ * @function encode * @memberof CMsgUniversalFieldID * @static - * @param {ICMsgUniversalFieldID} message CMsgUniversalFieldID message or plain object to encode + * @param {CMsgUniversalFieldID.$Properties} message CMsgUniversalFieldID message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUniversalFieldID.encode = function encode(message, writer) { + CMsgUniversalFieldID.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.source_type != null && Object.hasOwnProperty.call(message, "source_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.source_type != null && $Object.hasOwnProperty.call(message, "source_type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.source_type); - if (message.defining_obj_id != null && Object.hasOwnProperty.call(message, "defining_obj_id")) - $root.CMsgProtoDefID.encode(message.defining_obj_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.field_id != null && Object.hasOwnProperty.call(message, "field_id")) - $root.CMsgFieldID.encode(message.field_id, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.defining_obj_id != null && $Object.hasOwnProperty.call(message, "defining_obj_id")) + $root.CMsgProtoDefID.encode(message.defining_obj_id, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.field_id != null && $Object.hasOwnProperty.call(message, "field_id")) + $root.CMsgFieldID.encode(message.field_id, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -654,12 +825,12 @@ * @function encodeDelimited * @memberof CMsgUniversalFieldID * @static - * @param {ICMsgUniversalFieldID} message CMsgUniversalFieldID message or plain object to encode + * @param {CMsgUniversalFieldID.$Properties} message CMsgUniversalFieldID message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgUniversalFieldID.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgUniversalFieldID.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -669,31 +840,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgUniversalFieldID} CMsgUniversalFieldID + * @returns {CMsgUniversalFieldID & CMsgUniversalFieldID.$Shape} CMsgUniversalFieldID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUniversalFieldID.decode = function decode(reader, length) { + CMsgUniversalFieldID.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgUniversalFieldID(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgUniversalFieldID(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source_type = reader.int32(); - break; - case 2: - message.defining_obj_id = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - case 3: - message.field_id = $root.CMsgFieldID.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.EValueDefinitionSource[value] !== $undefined) + message.source_type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 2) + break; + message.defining_obj_id = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.defining_obj_id); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.field_id = $root.CMsgFieldID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.field_id); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -703,11 +903,11 @@ * @memberof CMsgUniversalFieldID * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgUniversalFieldID} CMsgUniversalFieldID + * @returns {CMsgUniversalFieldID & CMsgUniversalFieldID.$Shape} CMsgUniversalFieldID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgUniversalFieldID.decodeDelimited = function decodeDelimited(reader) { + CMsgUniversalFieldID.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -721,10 +921,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgUniversalFieldID.verify = function verify(message) { + CMsgUniversalFieldID.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source_type != null && message.hasOwnProperty("source_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.source_type != null && $Object.hasOwnProperty.call(message, "source_type")) switch (message.source_type) { default: return "source_type: enum value expected"; @@ -735,13 +939,13 @@ case 4: break; } - if (message.defining_obj_id != null && message.hasOwnProperty("defining_obj_id")) { - var error = $root.CMsgProtoDefID.verify(message.defining_obj_id); + if (message.defining_obj_id != null && $Object.hasOwnProperty.call(message, "defining_obj_id")) { + var error = $root.CMsgProtoDefID.verify(message.defining_obj_id, _depth + 1); if (error) return "defining_obj_id." + error; } - if (message.field_id != null && message.hasOwnProperty("field_id")) { - var error = $root.CMsgFieldID.verify(message.field_id); + if (message.field_id != null && $Object.hasOwnProperty.call(message, "field_id")) { + var error = $root.CMsgFieldID.verify(message.field_id, _depth + 1); if (error) return "field_id." + error; } @@ -756,9 +960,15 @@ * @param {Object.} object Plain object * @returns {CMsgUniversalFieldID} CMsgUniversalFieldID */ - CMsgUniversalFieldID.fromObject = function fromObject(object) { + CMsgUniversalFieldID.fromObject = function (object, _depth) { if (object instanceof $root.CMsgUniversalFieldID) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgUniversalFieldID: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgUniversalFieldID(); switch (object.source_type) { case "REFERENCE_DEFINES": @@ -781,16 +991,17 @@ case 4: message.source_type = 4; break; + default: } if (object.defining_obj_id != null) { - if (typeof object.defining_obj_id !== "object") - throw TypeError(".CMsgUniversalFieldID.defining_obj_id: object expected"); - message.defining_obj_id = $root.CMsgProtoDefID.fromObject(object.defining_obj_id); + if (!$util.isObject(object.defining_obj_id)) + throw $TypeError(".CMsgUniversalFieldID.defining_obj_id: object expected"); + message.defining_obj_id = $root.CMsgProtoDefID.fromObject(object.defining_obj_id, _depth + 1); } if (object.field_id != null) { - if (typeof object.field_id !== "object") - throw TypeError(".CMsgUniversalFieldID.field_id: object expected"); - message.field_id = $root.CMsgFieldID.fromObject(object.field_id); + if (!$util.isObject(object.field_id)) + throw $TypeError(".CMsgUniversalFieldID.field_id: object expected"); + message.field_id = $root.CMsgFieldID.fromObject(object.field_id, _depth + 1); } return message; }; @@ -804,21 +1015,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgUniversalFieldID.toObject = function toObject(message, options) { + CMsgUniversalFieldID.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { - object.source_type = options.enums === String ? "REFERENCE_DEFINES" : 0; + object.source_type = options.enums === $String ? "REFERENCE_DEFINES" : 0; object.defining_obj_id = null; object.field_id = null; } - if (message.source_type != null && message.hasOwnProperty("source_type")) - object.source_type = options.enums === String ? $root.EValueDefinitionSource[message.source_type] : message.source_type; - if (message.defining_obj_id != null && message.hasOwnProperty("defining_obj_id")) - object.defining_obj_id = $root.CMsgProtoDefID.toObject(message.defining_obj_id, options); - if (message.field_id != null && message.hasOwnProperty("field_id")) - object.field_id = $root.CMsgFieldID.toObject(message.field_id, options); + if (message.source_type != null && $Object.hasOwnProperty.call(message, "source_type")) + object.source_type = options.enums === $String ? $root.EValueDefinitionSource[message.source_type] === $undefined ? message.source_type : $root.EValueDefinitionSource[message.source_type] : message.source_type; + if (message.defining_obj_id != null && $Object.hasOwnProperty.call(message, "defining_obj_id")) + object.defining_obj_id = $root.CMsgProtoDefID.toObject(message.defining_obj_id, options, _depth + 1); + if (message.field_id != null && $Object.hasOwnProperty.call(message, "field_id")) + object.field_id = $root.CMsgFieldID.toObject(message.field_id, options, _depth + 1); return object; }; @@ -829,8 +1044,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgUniversalFieldID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgUniversalFieldID.prototype.toJSON = function() { + return CMsgUniversalFieldID.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgUniversalFieldID + * @function getTypeUrl + * @memberof CMsgUniversalFieldID + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgUniversalFieldID.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgUniversalFieldID"; }; return CMsgUniversalFieldID; @@ -840,27 +1069,40 @@ /** * Properties of a CMsgVariableDefinition. - * @exports ICMsgVariableDefinition - * @interface ICMsgVariableDefinition + * @typedef {Object} CMsgVariableDefinition.$Properties * @property {string|null} [name] CMsgVariableDefinition name * @property {boolean|null} [inherit] CMsgVariableDefinition inherit * @property {string|null} [value] CMsgVariableDefinition value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgVariableDefinition. + * @exports ICMsgVariableDefinition + * @interface ICMsgVariableDefinition + * @augments CMsgVariableDefinition.$Properties + * @deprecated Use CMsgVariableDefinition.$Properties instead. + */ + + /** + * Shape of a CMsgVariableDefinition. + * @typedef {CMsgVariableDefinition.$Properties} CMsgVariableDefinition.$Shape */ /** * Constructs a new CMsgVariableDefinition. * @exports CMsgVariableDefinition * @classdesc Represents a CMsgVariableDefinition. - * @implements ICMsgVariableDefinition * @constructor - * @param {ICMsgVariableDefinition=} [properties] Properties to set + * @param {CMsgVariableDefinition.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgVariableDefinition(properties) { + var CMsgVariableDefinition = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgVariableDefinition name. @@ -891,10 +1133,14 @@ * @function create * @memberof CMsgVariableDefinition * @static - * @param {ICMsgVariableDefinition=} [properties] Properties to set + * @param {CMsgVariableDefinition.$Properties=} [properties] Properties to set * @returns {CMsgVariableDefinition} CMsgVariableDefinition instance + * @type {{ + * (properties: CMsgVariableDefinition.$Shape): CMsgVariableDefinition & CMsgVariableDefinition.$Shape; + * (properties?: CMsgVariableDefinition.$Properties): CMsgVariableDefinition; + * }} */ - CMsgVariableDefinition.create = function create(properties) { + CMsgVariableDefinition.create = function(properties) { return new CMsgVariableDefinition(properties); }; @@ -903,19 +1149,26 @@ * @function encode * @memberof CMsgVariableDefinition * @static - * @param {ICMsgVariableDefinition} message CMsgVariableDefinition message or plain object to encode + * @param {CMsgVariableDefinition.$Properties} message CMsgVariableDefinition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgVariableDefinition.encode = function encode(message, writer) { + CMsgVariableDefinition.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inherit != null && Object.hasOwnProperty.call(message, "inherit")) + if (message.inherit != null && $Object.hasOwnProperty.call(message, "inherit")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.inherit); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -924,12 +1177,12 @@ * @function encodeDelimited * @memberof CMsgVariableDefinition * @static - * @param {ICMsgVariableDefinition} message CMsgVariableDefinition message or plain object to encode + * @param {CMsgVariableDefinition.$Properties} message CMsgVariableDefinition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgVariableDefinition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgVariableDefinition.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -939,31 +1192,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgVariableDefinition} CMsgVariableDefinition + * @returns {CMsgVariableDefinition & CMsgVariableDefinition.$Shape} CMsgVariableDefinition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgVariableDefinition.decode = function decode(reader, length) { + CMsgVariableDefinition.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgVariableDefinition(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgVariableDefinition(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inherit = reader.bool(); - break; - case 3: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.inherit = reader.bool(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -973,11 +1249,11 @@ * @memberof CMsgVariableDefinition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgVariableDefinition} CMsgVariableDefinition + * @returns {CMsgVariableDefinition & CMsgVariableDefinition.$Shape} CMsgVariableDefinition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgVariableDefinition.decodeDelimited = function decodeDelimited(reader) { + CMsgVariableDefinition.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -991,16 +1267,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgVariableDefinition.verify = function verify(message) { + CMsgVariableDefinition.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.inherit != null && message.hasOwnProperty("inherit")) + if (message.inherit != null && $Object.hasOwnProperty.call(message, "inherit")) if (typeof message.inherit !== "boolean") return "inherit: boolean expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -1014,16 +1294,22 @@ * @param {Object.} object Plain object * @returns {CMsgVariableDefinition} CMsgVariableDefinition */ - CMsgVariableDefinition.fromObject = function fromObject(object) { + CMsgVariableDefinition.fromObject = function (object, _depth) { if (object instanceof $root.CMsgVariableDefinition) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgVariableDefinition: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgVariableDefinition(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.inherit != null) - message.inherit = Boolean(object.inherit); + message.inherit = $Boolean(object.inherit); if (object.value != null) - message.value = String(object.value); + message.value = $String(object.value); return message; }; @@ -1036,20 +1322,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgVariableDefinition.toObject = function toObject(message, options) { + CMsgVariableDefinition.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.inherit = true; object.value = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.inherit != null && message.hasOwnProperty("inherit")) + if (message.inherit != null && $Object.hasOwnProperty.call(message, "inherit")) object.inherit = message.inherit; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -1061,8 +1351,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgVariableDefinition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgVariableDefinition.prototype.toJSON = function() { + return CMsgVariableDefinition.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgVariableDefinition + * @function getTypeUrl + * @memberof CMsgVariableDefinition + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgVariableDefinition.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgVariableDefinition"; }; return CMsgVariableDefinition; @@ -1072,33 +1376,54 @@ /** * Properties of a CMsgProtoDefHeader. - * @exports ICMsgProtoDefHeader - * @interface ICMsgProtoDefHeader + * @typedef {Object} CMsgProtoDefHeader.$Properties * @property {number} defindex CMsgProtoDefHeader defindex * @property {string|null} [name] CMsgProtoDefHeader name - * @property {Array.|null} [prefabs] CMsgProtoDefHeader prefabs + * @property {Array.|null} [prefabs] CMsgProtoDefHeader prefabs * @property {Array.|null} [tags] CMsgProtoDefHeader tags * @property {boolean|null} [prefab_only] CMsgProtoDefHeader prefab_only - * @property {Array.|null} [variables] CMsgProtoDefHeader variables + * @property {Array.|null} [variables] CMsgProtoDefHeader variables + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgProtoDefHeader. + * @exports ICMsgProtoDefHeader + * @interface ICMsgProtoDefHeader + * @augments CMsgProtoDefHeader.$Properties + * @deprecated Use CMsgProtoDefHeader.$Properties instead. + */ + + /** + * Shape of a CMsgProtoDefHeader. + * @typedef {{ + * defindex: number; + * name?: string|null; + * prefabs?: Array.|null; + * tags?: Array.|null; + * prefab_only?: boolean|null; + * variables?: Array.|null; + * $unknowns?: Array.; + * }} CMsgProtoDefHeader.$Shape */ /** * Constructs a new CMsgProtoDefHeader. * @exports CMsgProtoDefHeader * @classdesc Represents a CMsgProtoDefHeader. - * @implements ICMsgProtoDefHeader * @constructor - * @param {ICMsgProtoDefHeader=} [properties] Properties to set + * @param {CMsgProtoDefHeader.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgProtoDefHeader(properties) { + var CMsgProtoDefHeader = function (properties) { this.prefabs = []; this.tags = []; this.variables = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgProtoDefHeader defindex. @@ -1118,7 +1443,7 @@ /** * CMsgProtoDefHeader prefabs. - * @member {Array.} prefabs + * @member {Array.} prefabs * @memberof CMsgProtoDefHeader * @instance */ @@ -1142,7 +1467,7 @@ /** * CMsgProtoDefHeader variables. - * @member {Array.} variables + * @member {Array.} variables * @memberof CMsgProtoDefHeader * @instance */ @@ -1153,10 +1478,14 @@ * @function create * @memberof CMsgProtoDefHeader * @static - * @param {ICMsgProtoDefHeader=} [properties] Properties to set + * @param {CMsgProtoDefHeader.$Properties=} [properties] Properties to set * @returns {CMsgProtoDefHeader} CMsgProtoDefHeader instance + * @type {{ + * (properties: CMsgProtoDefHeader.$Shape): CMsgProtoDefHeader & CMsgProtoDefHeader.$Shape; + * (properties?: CMsgProtoDefHeader.$Properties): CMsgProtoDefHeader; + * }} */ - CMsgProtoDefHeader.create = function create(properties) { + CMsgProtoDefHeader.create = function(properties) { return new CMsgProtoDefHeader(properties); }; @@ -1165,27 +1494,34 @@ * @function encode * @memberof CMsgProtoDefHeader * @static - * @param {ICMsgProtoDefHeader} message CMsgProtoDefHeader message or plain object to encode + * @param {CMsgProtoDefHeader.$Properties} message CMsgProtoDefHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoDefHeader.encode = function encode(message, writer) { + CMsgProtoDefHeader.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.defindex); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); if (message.prefabs != null && message.prefabs.length) for (var i = 0; i < message.prefabs.length; ++i) - $root.CMsgProtoDefID.encode(message.prefabs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.CMsgProtoDefID.encode(message.prefabs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); if (message.tags != null && message.tags.length) for (var i = 0; i < message.tags.length; ++i) writer.uint32(/* id 4, wireType 2 =*/34).string(message.tags[i]); - if (message.prefab_only != null && Object.hasOwnProperty.call(message, "prefab_only")) + if (message.prefab_only != null && $Object.hasOwnProperty.call(message, "prefab_only")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.prefab_only); if (message.variables != null && message.variables.length) for (var i = 0; i < message.variables.length; ++i) - $root.CMsgVariableDefinition.encode(message.variables[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.CMsgVariableDefinition.encode(message.variables[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1194,12 +1530,12 @@ * @function encodeDelimited * @memberof CMsgProtoDefHeader * @static - * @param {ICMsgProtoDefHeader} message CMsgProtoDefHeader message or plain object to encode + * @param {CMsgProtoDefHeader.$Properties} message CMsgProtoDefHeader message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoDefHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgProtoDefHeader.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1209,47 +1545,79 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgProtoDefHeader} CMsgProtoDefHeader + * @returns {CMsgProtoDefHeader & CMsgProtoDefHeader.$Shape} CMsgProtoDefHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoDefHeader.decode = function decode(reader, length) { + CMsgProtoDefHeader.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgProtoDefHeader(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgProtoDefHeader(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.defindex = reader.uint32(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - if (!(message.prefabs && message.prefabs.length)) - message.prefabs = []; - message.prefabs.push($root.CMsgProtoDefID.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - case 5: - message.prefab_only = reader.bool(); - break; - case 6: - if (!(message.variables && message.variables.length)) - message.variables = []; - message.variables.push($root.CMsgVariableDefinition.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.defindex = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.prefabs && message.prefabs.length)) + message.prefabs = []; + message.prefabs.push($root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.prefab_only = reader.bool(); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.variables && message.variables.length)) + message.variables = []; + message.variables.push($root.CMsgVariableDefinition.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("defindex")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "defindex")) throw $util.ProtocolError("missing required 'defindex'", { instance: message }); return message; }; @@ -1260,11 +1628,11 @@ * @memberof CMsgProtoDefHeader * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgProtoDefHeader} CMsgProtoDefHeader + * @returns {CMsgProtoDefHeader & CMsgProtoDefHeader.$Shape} CMsgProtoDefHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoDefHeader.decodeDelimited = function decodeDelimited(reader) { + CMsgProtoDefHeader.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1278,38 +1646,42 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgProtoDefHeader.verify = function verify(message) { + CMsgProtoDefHeader.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isInteger(message.defindex)) return "defindex: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.prefabs != null && message.hasOwnProperty("prefabs")) { - if (!Array.isArray(message.prefabs)) + if (message.prefabs != null && $Object.hasOwnProperty.call(message, "prefabs")) { + if (!$Array.isArray(message.prefabs)) return "prefabs: array expected"; for (var i = 0; i < message.prefabs.length; ++i) { - var error = $root.CMsgProtoDefID.verify(message.prefabs[i]); + var error = $root.CMsgProtoDefID.verify(message.prefabs[i], _depth + 1); if (error) return "prefabs." + error; } } - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) { + if (!$Array.isArray(message.tags)) return "tags: array expected"; for (var i = 0; i < message.tags.length; ++i) if (!$util.isString(message.tags[i])) return "tags: string[] expected"; } - if (message.prefab_only != null && message.hasOwnProperty("prefab_only")) + if (message.prefab_only != null && $Object.hasOwnProperty.call(message, "prefab_only")) if (typeof message.prefab_only !== "boolean") return "prefab_only: boolean expected"; - if (message.variables != null && message.hasOwnProperty("variables")) { - if (!Array.isArray(message.variables)) + if (message.variables != null && $Object.hasOwnProperty.call(message, "variables")) { + if (!$Array.isArray(message.variables)) return "variables: array expected"; for (var i = 0; i < message.variables.length; ++i) { - var error = $root.CMsgVariableDefinition.verify(message.variables[i]); + var error = $root.CMsgVariableDefinition.verify(message.variables[i], _depth + 1); if (error) return "variables." + error; } @@ -1325,41 +1697,47 @@ * @param {Object.} object Plain object * @returns {CMsgProtoDefHeader} CMsgProtoDefHeader */ - CMsgProtoDefHeader.fromObject = function fromObject(object) { + CMsgProtoDefHeader.fromObject = function (object, _depth) { if (object instanceof $root.CMsgProtoDefHeader) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgProtoDefHeader: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgProtoDefHeader(); if (object.defindex != null) message.defindex = object.defindex >>> 0; if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.prefabs) { - if (!Array.isArray(object.prefabs)) - throw TypeError(".CMsgProtoDefHeader.prefabs: array expected"); - message.prefabs = []; + if (!$Array.isArray(object.prefabs)) + throw $TypeError(".CMsgProtoDefHeader.prefabs: array expected"); + message.prefabs = $Array(object.prefabs.length); for (var i = 0; i < object.prefabs.length; ++i) { - if (typeof object.prefabs[i] !== "object") - throw TypeError(".CMsgProtoDefHeader.prefabs: object expected"); - message.prefabs[i] = $root.CMsgProtoDefID.fromObject(object.prefabs[i]); + if (!$util.isObject(object.prefabs[i])) + throw $TypeError(".CMsgProtoDefHeader.prefabs: object expected"); + message.prefabs[i] = $root.CMsgProtoDefID.fromObject(object.prefabs[i], _depth + 1); } } if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".CMsgProtoDefHeader.tags: array expected"); - message.tags = []; + if (!$Array.isArray(object.tags)) + throw $TypeError(".CMsgProtoDefHeader.tags: array expected"); + message.tags = $Array(object.tags.length); for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); + message.tags[i] = $String(object.tags[i]); } if (object.prefab_only != null) - message.prefab_only = Boolean(object.prefab_only); + message.prefab_only = $Boolean(object.prefab_only); if (object.variables) { - if (!Array.isArray(object.variables)) - throw TypeError(".CMsgProtoDefHeader.variables: array expected"); - message.variables = []; + if (!$Array.isArray(object.variables)) + throw $TypeError(".CMsgProtoDefHeader.variables: array expected"); + message.variables = $Array(object.variables.length); for (var i = 0; i < object.variables.length; ++i) { - if (typeof object.variables[i] !== "object") - throw TypeError(".CMsgProtoDefHeader.variables: object expected"); - message.variables[i] = $root.CMsgVariableDefinition.fromObject(object.variables[i]); + if (!$util.isObject(object.variables[i])) + throw $TypeError(".CMsgProtoDefHeader.variables: object expected"); + message.variables[i] = $root.CMsgVariableDefinition.fromObject(object.variables[i], _depth + 1); } } return message; @@ -1374,9 +1752,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgProtoDefHeader.toObject = function toObject(message, options) { + CMsgProtoDefHeader.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.prefabs = []; @@ -1388,26 +1770,26 @@ object.name = ""; object.prefab_only = false; } - if (message.defindex != null && message.hasOwnProperty("defindex")) + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) object.defindex = message.defindex; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.prefabs && message.prefabs.length) { - object.prefabs = []; + object.prefabs = $Array(message.prefabs.length); for (var j = 0; j < message.prefabs.length; ++j) - object.prefabs[j] = $root.CMsgProtoDefID.toObject(message.prefabs[j], options); + object.prefabs[j] = $root.CMsgProtoDefID.toObject(message.prefabs[j], options, _depth + 1); } if (message.tags && message.tags.length) { - object.tags = []; + object.tags = $Array(message.tags.length); for (var j = 0; j < message.tags.length; ++j) object.tags[j] = message.tags[j]; } - if (message.prefab_only != null && message.hasOwnProperty("prefab_only")) + if (message.prefab_only != null && $Object.hasOwnProperty.call(message, "prefab_only")) object.prefab_only = message.prefab_only; if (message.variables && message.variables.length) { - object.variables = []; + object.variables = $Array(message.variables.length); for (var j = 0; j < message.variables.length; ++j) - object.variables[j] = $root.CMsgVariableDefinition.toObject(message.variables[j], options); + object.variables[j] = $root.CMsgVariableDefinition.toObject(message.variables[j], options, _depth + 1); } return object; }; @@ -1419,8 +1801,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgProtoDefHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgProtoDefHeader.prototype.toJSON = function() { + return CMsgProtoDefHeader.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgProtoDefHeader + * @function getTypeUrl + * @memberof CMsgProtoDefHeader + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgProtoDefHeader.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgProtoDefHeader"; }; return CMsgProtoDefHeader; @@ -1428,28 +1824,41 @@ $root.CMsgValidTypes = (function() { + /** + * Properties of a CMsgValidTypes. + * @typedef {Object} CMsgValidTypes.$Properties + * @property {Array.|null} [types] CMsgValidTypes types + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgValidTypes. * @exports ICMsgValidTypes * @interface ICMsgValidTypes - * @property {Array.|null} [types] CMsgValidTypes types + * @augments CMsgValidTypes.$Properties + * @deprecated Use CMsgValidTypes.$Properties instead. + */ + + /** + * Shape of a CMsgValidTypes. + * @typedef {CMsgValidTypes.$Properties} CMsgValidTypes.$Shape */ /** * Constructs a new CMsgValidTypes. * @exports CMsgValidTypes * @classdesc Represents a CMsgValidTypes. - * @implements ICMsgValidTypes * @constructor - * @param {ICMsgValidTypes=} [properties] Properties to set + * @param {CMsgValidTypes.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgValidTypes(properties) { + var CMsgValidTypes = function (properties) { this.types = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgValidTypes types. @@ -1464,10 +1873,14 @@ * @function create * @memberof CMsgValidTypes * @static - * @param {ICMsgValidTypes=} [properties] Properties to set + * @param {CMsgValidTypes.$Properties=} [properties] Properties to set * @returns {CMsgValidTypes} CMsgValidTypes instance + * @type {{ + * (properties: CMsgValidTypes.$Shape): CMsgValidTypes & CMsgValidTypes.$Shape; + * (properties?: CMsgValidTypes.$Properties): CMsgValidTypes; + * }} */ - CMsgValidTypes.create = function create(properties) { + CMsgValidTypes.create = function(properties) { return new CMsgValidTypes(properties); }; @@ -1476,16 +1889,23 @@ * @function encode * @memberof CMsgValidTypes * @static - * @param {ICMsgValidTypes} message CMsgValidTypes message or plain object to encode + * @param {CMsgValidTypes.$Properties} message CMsgValidTypes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgValidTypes.encode = function encode(message, writer) { + CMsgValidTypes.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.types != null && message.types.length) for (var i = 0; i < message.types.length; ++i) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.types[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1494,12 +1914,12 @@ * @function encodeDelimited * @memberof CMsgValidTypes * @static - * @param {ICMsgValidTypes} message CMsgValidTypes message or plain object to encode + * @param {CMsgValidTypes.$Properties} message CMsgValidTypes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgValidTypes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgValidTypes.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1509,32 +1929,66 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgValidTypes} CMsgValidTypes + * @returns {CMsgValidTypes & CMsgValidTypes.$Shape} CMsgValidTypes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgValidTypes.decode = function decode(reader, length) { + CMsgValidTypes.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgValidTypes(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgValidTypes(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.types && message.types.length)) - message.types = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.types.push(reader.int32()); - } else - message.types.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + start = reader.pos; + value = reader.int32(); + if ($root.ProtoDefTypes[value] !== $undefined) { + if (!(message.types && message.types.length)) + message.types = []; + message.types.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push($util.rawField(1, 0, reader.raw(start, reader.pos))); + } + } + continue; + } + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ProtoDefTypes[value] !== $undefined) { + if (!(message.types && message.types.length)) + message.types = []; + message.types.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -1544,11 +1998,11 @@ * @memberof CMsgValidTypes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgValidTypes} CMsgValidTypes + * @returns {CMsgValidTypes & CMsgValidTypes.$Shape} CMsgValidTypes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgValidTypes.decodeDelimited = function decodeDelimited(reader) { + CMsgValidTypes.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1562,11 +2016,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgValidTypes.verify = function verify(message) { + CMsgValidTypes.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.types != null && $Object.hasOwnProperty.call(message, "types")) { + if (!$Array.isArray(message.types)) return "types: array expected"; for (var i = 0; i < message.types.length; ++i) switch (message.types[i]) { @@ -1598,65 +2056,71 @@ * @param {Object.} object Plain object * @returns {CMsgValidTypes} CMsgValidTypes */ - CMsgValidTypes.fromObject = function fromObject(object) { + CMsgValidTypes.fromObject = function (object, _depth) { if (object instanceof $root.CMsgValidTypes) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgValidTypes: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgValidTypes(); if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".CMsgValidTypes.types: array expected"); + if (!$Array.isArray(object.types)) + throw $TypeError(".CMsgValidTypes.types: array expected"); message.types = []; for (var i = 0; i < object.types.length; ++i) switch (object.types[i]) { - default: case "DEF_TYPE_QUEST_MAP_NODE": case 0: - message.types[i] = 0; + message.types[message.types.length] = 0; break; case "DEF_TYPE_QUEST_THEME": case 2: - message.types[i] = 2; + message.types[message.types.length] = 2; break; case "DEF_TYPE_QUEST_MAP_REGION": case 3: - message.types[i] = 3; + message.types[message.types.length] = 3; break; case "DEF_TYPE_QUEST": case 4: - message.types[i] = 4; + message.types[message.types.length] = 4; break; case "DEF_TYPE_QUEST_OBJECTIVE": case 5: - message.types[i] = 5; + message.types[message.types.length] = 5; break; case "DEF_TYPE_PAINTKIT_VARIABLES": case 6: - message.types[i] = 6; + message.types[message.types.length] = 6; break; case "DEF_TYPE_PAINTKIT_OPERATION": case 7: - message.types[i] = 7; + message.types[message.types.length] = 7; break; case "DEF_TYPE_PAINTKIT_ITEM_DEFINITION": case 8: - message.types[i] = 8; + message.types[message.types.length] = 8; break; case "DEF_TYPE_PAINTKIT_DEFINITION": case 9: - message.types[i] = 9; + message.types[message.types.length] = 9; break; case "DEF_TYPE_HEADER_ONLY": case 10: - message.types[i] = 10; + message.types[message.types.length] = 10; break; case "DEF_TYPE_QUEST_MAP_STORE_ITEM": case 11: - message.types[i] = 11; + message.types[message.types.length] = 11; break; case "DEF_TYPE_QUEST_MAP_STAR_TYPE": case 12: - message.types[i] = 12; + message.types[message.types.length] = 12; break; + default: } } return message; @@ -1671,16 +2135,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgValidTypes.toObject = function toObject(message, options) { + CMsgValidTypes.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.types = []; if (message.types && message.types.length) { - object.types = []; + object.types = $Array(message.types.length); for (var j = 0; j < message.types.length; ++j) - object.types[j] = options.enums === String ? $root.ProtoDefTypes[message.types[j]] : message.types[j]; + object.types[j] = options.enums === $String ? $root.ProtoDefTypes[message.types[j]] === $undefined ? message.types[j] : $root.ProtoDefTypes[message.types[j]] : message.types[j]; } return object; }; @@ -1692,8 +2160,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgValidTypes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgValidTypes.prototype.toJSON = function() { + return CMsgValidTypes.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgValidTypes + * @function getTypeUrl + * @memberof CMsgValidTypes + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgValidTypes.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgValidTypes"; }; return CMsgValidTypes; @@ -1703,36 +2185,66 @@ /** * Properties of a CMsgProtoDefID. - * @exports ICMsgProtoDefID - * @interface ICMsgProtoDefID + * @typedef {Object} CMsgProtoDefID.$Properties * @property {number|null} [defindex] CMsgProtoDefID defindex * @property {ProtoDefTypes|null} [type] CMsgProtoDefID type - * @property {ICMsgQuestMapNodeDef|null} [instance_def_type_quest_map_node] CMsgProtoDefID instance_def_type_quest_map_node - * @property {ICMsgQuestTheme|null} [instance_def_type_quest_theme] CMsgProtoDefID instance_def_type_quest_theme - * @property {ICMsgQuestMapRegionDef|null} [instance_def_type_quest_map_region] CMsgProtoDefID instance_def_type_quest_map_region - * @property {ICMsgQuestDef|null} [instance_def_type_quest] CMsgProtoDefID instance_def_type_quest - * @property {ICMsgQuestObjectiveDef|null} [instance_def_type_quest_objective] CMsgProtoDefID instance_def_type_quest_objective - * @property {ICMsgPaintKit_Variables|null} [instance_def_type_paintkit_variables] CMsgProtoDefID instance_def_type_paintkit_variables - * @property {ICMsgPaintKit_Operation|null} [instance_def_type_paintkit_operation] CMsgProtoDefID instance_def_type_paintkit_operation - * @property {ICMsgPaintKit_ItemDefinition|null} [instance_def_type_paintkit_item_definition] CMsgProtoDefID instance_def_type_paintkit_item_definition - * @property {ICMsgPaintKit_Definition|null} [instance_def_type_paintkit_definition] CMsgProtoDefID instance_def_type_paintkit_definition - * @property {ICMsgHeaderOnly|null} [instance_def_type_header_only] CMsgProtoDefID instance_def_type_header_only + * @property {CMsgQuestMapNodeDef.$Properties|null} [instance_def_type_quest_map_node] CMsgProtoDefID instance_def_type_quest_map_node + * @property {CMsgQuestTheme.$Properties|null} [instance_def_type_quest_theme] CMsgProtoDefID instance_def_type_quest_theme + * @property {CMsgQuestMapRegionDef.$Properties|null} [instance_def_type_quest_map_region] CMsgProtoDefID instance_def_type_quest_map_region + * @property {CMsgQuestDef.$Properties|null} [instance_def_type_quest] CMsgProtoDefID instance_def_type_quest + * @property {CMsgQuestObjectiveDef.$Properties|null} [instance_def_type_quest_objective] CMsgProtoDefID instance_def_type_quest_objective + * @property {CMsgPaintKit_Variables.$Properties|null} [instance_def_type_paintkit_variables] CMsgProtoDefID instance_def_type_paintkit_variables + * @property {CMsgPaintKit_Operation.$Properties|null} [instance_def_type_paintkit_operation] CMsgProtoDefID instance_def_type_paintkit_operation + * @property {CMsgPaintKit_ItemDefinition.$Properties|null} [instance_def_type_paintkit_item_definition] CMsgProtoDefID instance_def_type_paintkit_item_definition + * @property {CMsgPaintKit_Definition.$Properties|null} [instance_def_type_paintkit_definition] CMsgProtoDefID instance_def_type_paintkit_definition + * @property {CMsgHeaderOnly.$Properties|null} [instance_def_type_header_only] CMsgProtoDefID instance_def_type_header_only + * @property {"instance_def_type_quest_map_node"|"instance_def_type_quest_theme"|"instance_def_type_quest_map_region"|"instance_def_type_quest"|"instance_def_type_quest_objective"|"instance_def_type_paintkit_variables"|"instance_def_type_paintkit_operation"|"instance_def_type_paintkit_item_definition"|"instance_def_type_paintkit_definition"|"instance_def_type_header_only"} [instance] CMsgProtoDefID instance + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgProtoDefID. + * @exports ICMsgProtoDefID + * @interface ICMsgProtoDefID + * @augments CMsgProtoDefID.$Properties + * @deprecated Use CMsgProtoDefID.$Properties instead. + */ + + /** + * Narrowed shape of a CMsgProtoDefID. + * @typedef {{ + * defindex?: number|null; + * type?: ProtoDefTypes|null; + * instance_def_type_quest_map_node?: CMsgQuestMapNodeDef.$Shape|null; + * instance_def_type_quest_theme?: CMsgQuestTheme.$Shape|null; + * instance_def_type_quest_map_region?: CMsgQuestMapRegionDef.$Shape|null; + * instance_def_type_quest?: CMsgQuestDef.$Shape|null; + * instance_def_type_quest_objective?: CMsgQuestObjectiveDef.$Shape|null; + * instance_def_type_paintkit_variables?: CMsgPaintKit_Variables.$Shape|null; + * instance_def_type_paintkit_operation?: CMsgPaintKit_Operation.$Shape|null; + * instance_def_type_paintkit_item_definition?: CMsgPaintKit_ItemDefinition.$Shape|null; + * instance_def_type_paintkit_definition?: CMsgPaintKit_Definition.$Shape|null; + * instance_def_type_header_only?: CMsgHeaderOnly.$Shape|null; + * $unknowns?: Array.; + * } & ( + * ({ instance?: undefined; instance_def_type_quest_map_node?: null; instance_def_type_quest_theme?: null; instance_def_type_quest_map_region?: null; instance_def_type_quest?: null; instance_def_type_quest_objective?: null; instance_def_type_paintkit_variables?: null; instance_def_type_paintkit_operation?: null; instance_def_type_paintkit_item_definition?: null; instance_def_type_paintkit_definition?: null; instance_def_type_header_only?: null }|{ instance?: "instance_def_type_quest_map_node"; instance_def_type_quest_map_node: CMsgQuestMapNodeDef.$Shape; instance_def_type_quest_theme?: null; instance_def_type_quest_map_region?: null; instance_def_type_quest?: null; instance_def_type_quest_objective?: null; instance_def_type_paintkit_variables?: null; instance_def_type_paintkit_operation?: null; instance_def_type_paintkit_item_definition?: null; instance_def_type_paintkit_definition?: null; instance_def_type_header_only?: null }|{ instance?: "instance_def_type_quest_theme"; instance_def_type_quest_map_node?: null; instance_def_type_quest_theme: CMsgQuestTheme.$Shape; instance_def_type_quest_map_region?: null; instance_def_type_quest?: null; instance_def_type_quest_objective?: null; instance_def_type_paintkit_variables?: null; instance_def_type_paintkit_operation?: null; instance_def_type_paintkit_item_definition?: null; instance_def_type_paintkit_definition?: null; instance_def_type_header_only?: null }|{ instance?: "instance_def_type_quest_map_region"; instance_def_type_quest_map_node?: null; instance_def_type_quest_theme?: null; instance_def_type_quest_map_region: CMsgQuestMapRegionDef.$Shape; instance_def_type_quest?: null; instance_def_type_quest_objective?: null; instance_def_type_paintkit_variables?: null; instance_def_type_paintkit_operation?: null; instance_def_type_paintkit_item_definition?: null; instance_def_type_paintkit_definition?: null; instance_def_type_header_only?: null }|{ instance?: "instance_def_type_quest"; instance_def_type_quest_map_node?: null; instance_def_type_quest_theme?: null; instance_def_type_quest_map_region?: null; instance_def_type_quest: CMsgQuestDef.$Shape; instance_def_type_quest_objective?: null; instance_def_type_paintkit_variables?: null; instance_def_type_paintkit_operation?: null; instance_def_type_paintkit_item_definition?: null; instance_def_type_paintkit_definition?: null; instance_def_type_header_only?: null }|{ instance?: "instance_def_type_quest_objective"; instance_def_type_quest_map_node?: null; instance_def_type_quest_theme?: null; instance_def_type_quest_map_region?: null; instance_def_type_quest?: null; instance_def_type_quest_objective: CMsgQuestObjectiveDef.$Shape; instance_def_type_paintkit_variables?: null; instance_def_type_paintkit_operation?: null; instance_def_type_paintkit_item_definition?: null; instance_def_type_paintkit_definition?: null; instance_def_type_header_only?: null }|{ instance?: "instance_def_type_paintkit_variables"; instance_def_type_quest_map_node?: null; instance_def_type_quest_theme?: null; instance_def_type_quest_map_region?: null; instance_def_type_quest?: null; instance_def_type_quest_objective?: null; instance_def_type_paintkit_variables: CMsgPaintKit_Variables.$Shape; instance_def_type_paintkit_operation?: null; instance_def_type_paintkit_item_definition?: null; instance_def_type_paintkit_definition?: null; instance_def_type_header_only?: null }|{ instance?: "instance_def_type_paintkit_operation"; instance_def_type_quest_map_node?: null; instance_def_type_quest_theme?: null; instance_def_type_quest_map_region?: null; instance_def_type_quest?: null; instance_def_type_quest_objective?: null; instance_def_type_paintkit_variables?: null; instance_def_type_paintkit_operation: CMsgPaintKit_Operation.$Shape; instance_def_type_paintkit_item_definition?: null; instance_def_type_paintkit_definition?: null; instance_def_type_header_only?: null }|{ instance?: "instance_def_type_paintkit_item_definition"; instance_def_type_quest_map_node?: null; instance_def_type_quest_theme?: null; instance_def_type_quest_map_region?: null; instance_def_type_quest?: null; instance_def_type_quest_objective?: null; instance_def_type_paintkit_variables?: null; instance_def_type_paintkit_operation?: null; instance_def_type_paintkit_item_definition: CMsgPaintKit_ItemDefinition.$Shape; instance_def_type_paintkit_definition?: null; instance_def_type_header_only?: null }|{ instance?: "instance_def_type_paintkit_definition"; instance_def_type_quest_map_node?: null; instance_def_type_quest_theme?: null; instance_def_type_quest_map_region?: null; instance_def_type_quest?: null; instance_def_type_quest_objective?: null; instance_def_type_paintkit_variables?: null; instance_def_type_paintkit_operation?: null; instance_def_type_paintkit_item_definition?: null; instance_def_type_paintkit_definition: CMsgPaintKit_Definition.$Shape; instance_def_type_header_only?: null }|{ instance?: "instance_def_type_header_only"; instance_def_type_quest_map_node?: null; instance_def_type_quest_theme?: null; instance_def_type_quest_map_region?: null; instance_def_type_quest?: null; instance_def_type_quest_objective?: null; instance_def_type_paintkit_variables?: null; instance_def_type_paintkit_operation?: null; instance_def_type_paintkit_item_definition?: null; instance_def_type_paintkit_definition?: null; instance_def_type_header_only: CMsgHeaderOnly.$Shape }) + * )} CMsgProtoDefID.$Shape */ /** * Constructs a new CMsgProtoDefID. * @exports CMsgProtoDefID * @classdesc Represents a CMsgProtoDefID. - * @implements ICMsgProtoDefID * @constructor - * @param {ICMsgProtoDefID=} [properties] Properties to set + * @param {CMsgProtoDefID.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgProtoDefID(properties) { + var CMsgProtoDefID = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgProtoDefID defindex. @@ -1752,7 +2264,7 @@ /** * CMsgProtoDefID instance_def_type_quest_map_node. - * @member {ICMsgQuestMapNodeDef|null|undefined} instance_def_type_quest_map_node + * @member {CMsgQuestMapNodeDef.$Properties|null|undefined} instance_def_type_quest_map_node * @memberof CMsgProtoDefID * @instance */ @@ -1760,7 +2272,7 @@ /** * CMsgProtoDefID instance_def_type_quest_theme. - * @member {ICMsgQuestTheme|null|undefined} instance_def_type_quest_theme + * @member {CMsgQuestTheme.$Properties|null|undefined} instance_def_type_quest_theme * @memberof CMsgProtoDefID * @instance */ @@ -1768,7 +2280,7 @@ /** * CMsgProtoDefID instance_def_type_quest_map_region. - * @member {ICMsgQuestMapRegionDef|null|undefined} instance_def_type_quest_map_region + * @member {CMsgQuestMapRegionDef.$Properties|null|undefined} instance_def_type_quest_map_region * @memberof CMsgProtoDefID * @instance */ @@ -1776,7 +2288,7 @@ /** * CMsgProtoDefID instance_def_type_quest. - * @member {ICMsgQuestDef|null|undefined} instance_def_type_quest + * @member {CMsgQuestDef.$Properties|null|undefined} instance_def_type_quest * @memberof CMsgProtoDefID * @instance */ @@ -1784,7 +2296,7 @@ /** * CMsgProtoDefID instance_def_type_quest_objective. - * @member {ICMsgQuestObjectiveDef|null|undefined} instance_def_type_quest_objective + * @member {CMsgQuestObjectiveDef.$Properties|null|undefined} instance_def_type_quest_objective * @memberof CMsgProtoDefID * @instance */ @@ -1792,7 +2304,7 @@ /** * CMsgProtoDefID instance_def_type_paintkit_variables. - * @member {ICMsgPaintKit_Variables|null|undefined} instance_def_type_paintkit_variables + * @member {CMsgPaintKit_Variables.$Properties|null|undefined} instance_def_type_paintkit_variables * @memberof CMsgProtoDefID * @instance */ @@ -1800,7 +2312,7 @@ /** * CMsgProtoDefID instance_def_type_paintkit_operation. - * @member {ICMsgPaintKit_Operation|null|undefined} instance_def_type_paintkit_operation + * @member {CMsgPaintKit_Operation.$Properties|null|undefined} instance_def_type_paintkit_operation * @memberof CMsgProtoDefID * @instance */ @@ -1808,7 +2320,7 @@ /** * CMsgProtoDefID instance_def_type_paintkit_item_definition. - * @member {ICMsgPaintKit_ItemDefinition|null|undefined} instance_def_type_paintkit_item_definition + * @member {CMsgPaintKit_ItemDefinition.$Properties|null|undefined} instance_def_type_paintkit_item_definition * @memberof CMsgProtoDefID * @instance */ @@ -1816,7 +2328,7 @@ /** * CMsgProtoDefID instance_def_type_paintkit_definition. - * @member {ICMsgPaintKit_Definition|null|undefined} instance_def_type_paintkit_definition + * @member {CMsgPaintKit_Definition.$Properties|null|undefined} instance_def_type_paintkit_definition * @memberof CMsgProtoDefID * @instance */ @@ -1824,7 +2336,7 @@ /** * CMsgProtoDefID instance_def_type_header_only. - * @member {ICMsgHeaderOnly|null|undefined} instance_def_type_header_only + * @member {CMsgHeaderOnly.$Properties|null|undefined} instance_def_type_header_only * @memberof CMsgProtoDefID * @instance */ @@ -1839,7 +2351,7 @@ * @memberof CMsgProtoDefID * @instance */ - Object.defineProperty(CMsgProtoDefID.prototype, "instance", { + $Object.defineProperty(CMsgProtoDefID.prototype, "instance", { get: $util.oneOfGetter($oneOfFields = ["instance_def_type_quest_map_node", "instance_def_type_quest_theme", "instance_def_type_quest_map_region", "instance_def_type_quest", "instance_def_type_quest_objective", "instance_def_type_paintkit_variables", "instance_def_type_paintkit_operation", "instance_def_type_paintkit_item_definition", "instance_def_type_paintkit_definition", "instance_def_type_header_only"]), set: $util.oneOfSetter($oneOfFields) }); @@ -1849,10 +2361,14 @@ * @function create * @memberof CMsgProtoDefID * @static - * @param {ICMsgProtoDefID=} [properties] Properties to set + * @param {CMsgProtoDefID.$Properties=} [properties] Properties to set * @returns {CMsgProtoDefID} CMsgProtoDefID instance + * @type {{ + * (properties: CMsgProtoDefID.$Shape): CMsgProtoDefID & CMsgProtoDefID.$Shape; + * (properties?: CMsgProtoDefID.$Properties): CMsgProtoDefID; + * }} */ - CMsgProtoDefID.create = function create(properties) { + CMsgProtoDefID.create = function(properties) { return new CMsgProtoDefID(properties); }; @@ -1861,37 +2377,44 @@ * @function encode * @memberof CMsgProtoDefID * @static - * @param {ICMsgProtoDefID} message CMsgProtoDefID message or plain object to encode + * @param {CMsgProtoDefID.$Properties} message CMsgProtoDefID message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoDefID.encode = function encode(message, writer) { + CMsgProtoDefID.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.defindex != null && Object.hasOwnProperty.call(message, "defindex")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.defindex); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.instance_def_type_quest_map_node != null && Object.hasOwnProperty.call(message, "instance_def_type_quest_map_node")) - $root.CMsgQuestMapNodeDef.encode(message.instance_def_type_quest_map_node, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.instance_def_type_quest_theme != null && Object.hasOwnProperty.call(message, "instance_def_type_quest_theme")) - $root.CMsgQuestTheme.encode(message.instance_def_type_quest_theme, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.instance_def_type_quest_map_region != null && Object.hasOwnProperty.call(message, "instance_def_type_quest_map_region")) - $root.CMsgQuestMapRegionDef.encode(message.instance_def_type_quest_map_region, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.instance_def_type_quest != null && Object.hasOwnProperty.call(message, "instance_def_type_quest")) - $root.CMsgQuestDef.encode(message.instance_def_type_quest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.instance_def_type_quest_objective != null && Object.hasOwnProperty.call(message, "instance_def_type_quest_objective")) - $root.CMsgQuestObjectiveDef.encode(message.instance_def_type_quest_objective, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.instance_def_type_paintkit_variables != null && Object.hasOwnProperty.call(message, "instance_def_type_paintkit_variables")) - $root.CMsgPaintKit_Variables.encode(message.instance_def_type_paintkit_variables, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.instance_def_type_paintkit_operation != null && Object.hasOwnProperty.call(message, "instance_def_type_paintkit_operation")) - $root.CMsgPaintKit_Operation.encode(message.instance_def_type_paintkit_operation, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.instance_def_type_paintkit_item_definition != null && Object.hasOwnProperty.call(message, "instance_def_type_paintkit_item_definition")) - $root.CMsgPaintKit_ItemDefinition.encode(message.instance_def_type_paintkit_item_definition, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.instance_def_type_paintkit_definition != null && Object.hasOwnProperty.call(message, "instance_def_type_paintkit_definition")) - $root.CMsgPaintKit_Definition.encode(message.instance_def_type_paintkit_definition, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.instance_def_type_header_only != null && Object.hasOwnProperty.call(message, "instance_def_type_header_only")) - $root.CMsgHeaderOnly.encode(message.instance_def_type_header_only, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.instance_def_type_quest_map_node != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_map_node")) + $root.CMsgQuestMapNodeDef.encode(message.instance_def_type_quest_map_node, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.instance_def_type_quest_theme != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_theme")) + $root.CMsgQuestTheme.encode(message.instance_def_type_quest_theme, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.instance_def_type_quest_map_region != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_map_region")) + $root.CMsgQuestMapRegionDef.encode(message.instance_def_type_quest_map_region, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.instance_def_type_quest != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest")) + $root.CMsgQuestDef.encode(message.instance_def_type_quest, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.instance_def_type_quest_objective != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_objective")) + $root.CMsgQuestObjectiveDef.encode(message.instance_def_type_quest_objective, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.instance_def_type_paintkit_variables != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_variables")) + $root.CMsgPaintKit_Variables.encode(message.instance_def_type_paintkit_variables, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.instance_def_type_paintkit_operation != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_operation")) + $root.CMsgPaintKit_Operation.encode(message.instance_def_type_paintkit_operation, writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); + if (message.instance_def_type_paintkit_item_definition != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_item_definition")) + $root.CMsgPaintKit_ItemDefinition.encode(message.instance_def_type_paintkit_item_definition, writer.uint32(/* id 11, wireType 2 =*/90).fork(), _depth + 1).ldelim(); + if (message.instance_def_type_paintkit_definition != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_definition")) + $root.CMsgPaintKit_Definition.encode(message.instance_def_type_paintkit_definition, writer.uint32(/* id 12, wireType 2 =*/98).fork(), _depth + 1).ldelim(); + if (message.instance_def_type_header_only != null && $Object.hasOwnProperty.call(message, "instance_def_type_header_only")) + $root.CMsgHeaderOnly.encode(message.instance_def_type_header_only, writer.uint32(/* id 13, wireType 2 =*/106).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -1900,12 +2423,12 @@ * @function encodeDelimited * @memberof CMsgProtoDefID * @static - * @param {ICMsgProtoDefID} message CMsgProtoDefID message or plain object to encode + * @param {CMsgProtoDefID.$Properties} message CMsgProtoDefID message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgProtoDefID.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgProtoDefID.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -1915,72 +2438,138 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgProtoDefID} CMsgProtoDefID + * @returns {CMsgProtoDefID & CMsgProtoDefID.$Shape} CMsgProtoDefID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoDefID.decode = function decode(reader, length) { + CMsgProtoDefID.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgProtoDefID(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgProtoDefID(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.defindex = reader.uint32(); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - message.instance_def_type_quest_map_node = $root.CMsgQuestMapNodeDef.decode(reader, reader.uint32()); - break; - case 5: - message.instance_def_type_quest_theme = $root.CMsgQuestTheme.decode(reader, reader.uint32()); - break; - case 6: - message.instance_def_type_quest_map_region = $root.CMsgQuestMapRegionDef.decode(reader, reader.uint32()); - break; - case 7: - message.instance_def_type_quest = $root.CMsgQuestDef.decode(reader, reader.uint32()); - break; - case 8: - message.instance_def_type_quest_objective = $root.CMsgQuestObjectiveDef.decode(reader, reader.uint32()); - break; - case 9: - message.instance_def_type_paintkit_variables = $root.CMsgPaintKit_Variables.decode(reader, reader.uint32()); - break; - case 10: - message.instance_def_type_paintkit_operation = $root.CMsgPaintKit_Operation.decode(reader, reader.uint32()); - break; - case 11: - message.instance_def_type_paintkit_item_definition = $root.CMsgPaintKit_ItemDefinition.decode(reader, reader.uint32()); - break; - case 12: - message.instance_def_type_paintkit_definition = $root.CMsgPaintKit_Definition.decode(reader, reader.uint32()); - break; - case 13: - message.instance_def_type_header_only = $root.CMsgHeaderOnly.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } - } - return message; - }; - - /** - * Decodes a CMsgProtoDefID message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof CMsgProtoDefID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgProtoDefID} CMsgProtoDefID - * @throws {Error} If the payload is not a reader or valid buffer + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.defindex = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ProtoDefTypes[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 2) + break; + message.instance_def_type_quest_map_node = $root.CMsgQuestMapNodeDef.decode(reader, reader.uint32(), $undefined, _depth + 1, message.instance_def_type_quest_map_node); + message.instance = "instance_def_type_quest_map_node"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.instance_def_type_quest_theme = $root.CMsgQuestTheme.decode(reader, reader.uint32(), $undefined, _depth + 1, message.instance_def_type_quest_theme); + message.instance = "instance_def_type_quest_theme"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.instance_def_type_quest_map_region = $root.CMsgQuestMapRegionDef.decode(reader, reader.uint32(), $undefined, _depth + 1, message.instance_def_type_quest_map_region); + message.instance = "instance_def_type_quest_map_region"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.instance_def_type_quest = $root.CMsgQuestDef.decode(reader, reader.uint32(), $undefined, _depth + 1, message.instance_def_type_quest); + message.instance = "instance_def_type_quest"; + continue; + } + case 8: { + if (wireType !== 2) + break; + message.instance_def_type_quest_objective = $root.CMsgQuestObjectiveDef.decode(reader, reader.uint32(), $undefined, _depth + 1, message.instance_def_type_quest_objective); + message.instance = "instance_def_type_quest_objective"; + continue; + } + case 9: { + if (wireType !== 2) + break; + message.instance_def_type_paintkit_variables = $root.CMsgPaintKit_Variables.decode(reader, reader.uint32(), $undefined, _depth + 1, message.instance_def_type_paintkit_variables); + message.instance = "instance_def_type_paintkit_variables"; + continue; + } + case 10: { + if (wireType !== 2) + break; + message.instance_def_type_paintkit_operation = $root.CMsgPaintKit_Operation.decode(reader, reader.uint32(), $undefined, _depth + 1, message.instance_def_type_paintkit_operation); + message.instance = "instance_def_type_paintkit_operation"; + continue; + } + case 11: { + if (wireType !== 2) + break; + message.instance_def_type_paintkit_item_definition = $root.CMsgPaintKit_ItemDefinition.decode(reader, reader.uint32(), $undefined, _depth + 1, message.instance_def_type_paintkit_item_definition); + message.instance = "instance_def_type_paintkit_item_definition"; + continue; + } + case 12: { + if (wireType !== 2) + break; + message.instance_def_type_paintkit_definition = $root.CMsgPaintKit_Definition.decode(reader, reader.uint32(), $undefined, _depth + 1, message.instance_def_type_paintkit_definition); + message.instance = "instance_def_type_paintkit_definition"; + continue; + } + case 13: { + if (wireType !== 2) + break; + message.instance_def_type_header_only = $root.CMsgHeaderOnly.decode(reader, reader.uint32(), $undefined, _depth + 1, message.instance_def_type_header_only); + message.instance = "instance_def_type_header_only"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a CMsgProtoDefID message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof CMsgProtoDefID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {CMsgProtoDefID & CMsgProtoDefID.$Shape} CMsgProtoDefID + * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgProtoDefID.decodeDelimited = function decodeDelimited(reader) { + CMsgProtoDefID.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -1994,14 +2583,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgProtoDefID.verify = function verify(message) { + CMsgProtoDefID.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; var properties = {}; - if (message.defindex != null && message.hasOwnProperty("defindex")) + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) if (!$util.isInteger(message.defindex)) return "defindex: integer expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -2019,100 +2612,100 @@ case 12: break; } - if (message.instance_def_type_quest_map_node != null && message.hasOwnProperty("instance_def_type_quest_map_node")) { + if (message.instance_def_type_quest_map_node != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_map_node")) { properties.instance = 1; { - var error = $root.CMsgQuestMapNodeDef.verify(message.instance_def_type_quest_map_node); + var error = $root.CMsgQuestMapNodeDef.verify(message.instance_def_type_quest_map_node, _depth + 1); if (error) return "instance_def_type_quest_map_node." + error; } } - if (message.instance_def_type_quest_theme != null && message.hasOwnProperty("instance_def_type_quest_theme")) { + if (message.instance_def_type_quest_theme != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_theme")) { if (properties.instance === 1) return "instance: multiple values"; properties.instance = 1; { - var error = $root.CMsgQuestTheme.verify(message.instance_def_type_quest_theme); + var error = $root.CMsgQuestTheme.verify(message.instance_def_type_quest_theme, _depth + 1); if (error) return "instance_def_type_quest_theme." + error; } } - if (message.instance_def_type_quest_map_region != null && message.hasOwnProperty("instance_def_type_quest_map_region")) { + if (message.instance_def_type_quest_map_region != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_map_region")) { if (properties.instance === 1) return "instance: multiple values"; properties.instance = 1; { - var error = $root.CMsgQuestMapRegionDef.verify(message.instance_def_type_quest_map_region); + var error = $root.CMsgQuestMapRegionDef.verify(message.instance_def_type_quest_map_region, _depth + 1); if (error) return "instance_def_type_quest_map_region." + error; } } - if (message.instance_def_type_quest != null && message.hasOwnProperty("instance_def_type_quest")) { + if (message.instance_def_type_quest != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest")) { if (properties.instance === 1) return "instance: multiple values"; properties.instance = 1; { - var error = $root.CMsgQuestDef.verify(message.instance_def_type_quest); + var error = $root.CMsgQuestDef.verify(message.instance_def_type_quest, _depth + 1); if (error) return "instance_def_type_quest." + error; } } - if (message.instance_def_type_quest_objective != null && message.hasOwnProperty("instance_def_type_quest_objective")) { + if (message.instance_def_type_quest_objective != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_objective")) { if (properties.instance === 1) return "instance: multiple values"; properties.instance = 1; { - var error = $root.CMsgQuestObjectiveDef.verify(message.instance_def_type_quest_objective); + var error = $root.CMsgQuestObjectiveDef.verify(message.instance_def_type_quest_objective, _depth + 1); if (error) return "instance_def_type_quest_objective." + error; } } - if (message.instance_def_type_paintkit_variables != null && message.hasOwnProperty("instance_def_type_paintkit_variables")) { + if (message.instance_def_type_paintkit_variables != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_variables")) { if (properties.instance === 1) return "instance: multiple values"; properties.instance = 1; { - var error = $root.CMsgPaintKit_Variables.verify(message.instance_def_type_paintkit_variables); + var error = $root.CMsgPaintKit_Variables.verify(message.instance_def_type_paintkit_variables, _depth + 1); if (error) return "instance_def_type_paintkit_variables." + error; } } - if (message.instance_def_type_paintkit_operation != null && message.hasOwnProperty("instance_def_type_paintkit_operation")) { + if (message.instance_def_type_paintkit_operation != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_operation")) { if (properties.instance === 1) return "instance: multiple values"; properties.instance = 1; { - var error = $root.CMsgPaintKit_Operation.verify(message.instance_def_type_paintkit_operation); + var error = $root.CMsgPaintKit_Operation.verify(message.instance_def_type_paintkit_operation, _depth + 1); if (error) return "instance_def_type_paintkit_operation." + error; } } - if (message.instance_def_type_paintkit_item_definition != null && message.hasOwnProperty("instance_def_type_paintkit_item_definition")) { + if (message.instance_def_type_paintkit_item_definition != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_item_definition")) { if (properties.instance === 1) return "instance: multiple values"; properties.instance = 1; { - var error = $root.CMsgPaintKit_ItemDefinition.verify(message.instance_def_type_paintkit_item_definition); + var error = $root.CMsgPaintKit_ItemDefinition.verify(message.instance_def_type_paintkit_item_definition, _depth + 1); if (error) return "instance_def_type_paintkit_item_definition." + error; } } - if (message.instance_def_type_paintkit_definition != null && message.hasOwnProperty("instance_def_type_paintkit_definition")) { + if (message.instance_def_type_paintkit_definition != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_definition")) { if (properties.instance === 1) return "instance: multiple values"; properties.instance = 1; { - var error = $root.CMsgPaintKit_Definition.verify(message.instance_def_type_paintkit_definition); + var error = $root.CMsgPaintKit_Definition.verify(message.instance_def_type_paintkit_definition, _depth + 1); if (error) return "instance_def_type_paintkit_definition." + error; } } - if (message.instance_def_type_header_only != null && message.hasOwnProperty("instance_def_type_header_only")) { + if (message.instance_def_type_header_only != null && $Object.hasOwnProperty.call(message, "instance_def_type_header_only")) { if (properties.instance === 1) return "instance: multiple values"; properties.instance = 1; { - var error = $root.CMsgHeaderOnly.verify(message.instance_def_type_header_only); + var error = $root.CMsgHeaderOnly.verify(message.instance_def_type_header_only, _depth + 1); if (error) return "instance_def_type_header_only." + error; } @@ -2128,9 +2721,15 @@ * @param {Object.} object Plain object * @returns {CMsgProtoDefID} CMsgProtoDefID */ - CMsgProtoDefID.fromObject = function fromObject(object) { + CMsgProtoDefID.fromObject = function (object, _depth) { if (object instanceof $root.CMsgProtoDefID) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgProtoDefID: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgProtoDefID(); if (object.defindex != null) message.defindex = object.defindex >>> 0; @@ -2183,56 +2782,57 @@ case 12: message.type = 12; break; + default: } if (object.instance_def_type_quest_map_node != null) { - if (typeof object.instance_def_type_quest_map_node !== "object") - throw TypeError(".CMsgProtoDefID.instance_def_type_quest_map_node: object expected"); - message.instance_def_type_quest_map_node = $root.CMsgQuestMapNodeDef.fromObject(object.instance_def_type_quest_map_node); + if (!$util.isObject(object.instance_def_type_quest_map_node)) + throw $TypeError(".CMsgProtoDefID.instance_def_type_quest_map_node: object expected"); + message.instance_def_type_quest_map_node = $root.CMsgQuestMapNodeDef.fromObject(object.instance_def_type_quest_map_node, _depth + 1); } if (object.instance_def_type_quest_theme != null) { - if (typeof object.instance_def_type_quest_theme !== "object") - throw TypeError(".CMsgProtoDefID.instance_def_type_quest_theme: object expected"); - message.instance_def_type_quest_theme = $root.CMsgQuestTheme.fromObject(object.instance_def_type_quest_theme); + if (!$util.isObject(object.instance_def_type_quest_theme)) + throw $TypeError(".CMsgProtoDefID.instance_def_type_quest_theme: object expected"); + message.instance_def_type_quest_theme = $root.CMsgQuestTheme.fromObject(object.instance_def_type_quest_theme, _depth + 1); } if (object.instance_def_type_quest_map_region != null) { - if (typeof object.instance_def_type_quest_map_region !== "object") - throw TypeError(".CMsgProtoDefID.instance_def_type_quest_map_region: object expected"); - message.instance_def_type_quest_map_region = $root.CMsgQuestMapRegionDef.fromObject(object.instance_def_type_quest_map_region); + if (!$util.isObject(object.instance_def_type_quest_map_region)) + throw $TypeError(".CMsgProtoDefID.instance_def_type_quest_map_region: object expected"); + message.instance_def_type_quest_map_region = $root.CMsgQuestMapRegionDef.fromObject(object.instance_def_type_quest_map_region, _depth + 1); } if (object.instance_def_type_quest != null) { - if (typeof object.instance_def_type_quest !== "object") - throw TypeError(".CMsgProtoDefID.instance_def_type_quest: object expected"); - message.instance_def_type_quest = $root.CMsgQuestDef.fromObject(object.instance_def_type_quest); + if (!$util.isObject(object.instance_def_type_quest)) + throw $TypeError(".CMsgProtoDefID.instance_def_type_quest: object expected"); + message.instance_def_type_quest = $root.CMsgQuestDef.fromObject(object.instance_def_type_quest, _depth + 1); } if (object.instance_def_type_quest_objective != null) { - if (typeof object.instance_def_type_quest_objective !== "object") - throw TypeError(".CMsgProtoDefID.instance_def_type_quest_objective: object expected"); - message.instance_def_type_quest_objective = $root.CMsgQuestObjectiveDef.fromObject(object.instance_def_type_quest_objective); + if (!$util.isObject(object.instance_def_type_quest_objective)) + throw $TypeError(".CMsgProtoDefID.instance_def_type_quest_objective: object expected"); + message.instance_def_type_quest_objective = $root.CMsgQuestObjectiveDef.fromObject(object.instance_def_type_quest_objective, _depth + 1); } if (object.instance_def_type_paintkit_variables != null) { - if (typeof object.instance_def_type_paintkit_variables !== "object") - throw TypeError(".CMsgProtoDefID.instance_def_type_paintkit_variables: object expected"); - message.instance_def_type_paintkit_variables = $root.CMsgPaintKit_Variables.fromObject(object.instance_def_type_paintkit_variables); + if (!$util.isObject(object.instance_def_type_paintkit_variables)) + throw $TypeError(".CMsgProtoDefID.instance_def_type_paintkit_variables: object expected"); + message.instance_def_type_paintkit_variables = $root.CMsgPaintKit_Variables.fromObject(object.instance_def_type_paintkit_variables, _depth + 1); } if (object.instance_def_type_paintkit_operation != null) { - if (typeof object.instance_def_type_paintkit_operation !== "object") - throw TypeError(".CMsgProtoDefID.instance_def_type_paintkit_operation: object expected"); - message.instance_def_type_paintkit_operation = $root.CMsgPaintKit_Operation.fromObject(object.instance_def_type_paintkit_operation); + if (!$util.isObject(object.instance_def_type_paintkit_operation)) + throw $TypeError(".CMsgProtoDefID.instance_def_type_paintkit_operation: object expected"); + message.instance_def_type_paintkit_operation = $root.CMsgPaintKit_Operation.fromObject(object.instance_def_type_paintkit_operation, _depth + 1); } if (object.instance_def_type_paintkit_item_definition != null) { - if (typeof object.instance_def_type_paintkit_item_definition !== "object") - throw TypeError(".CMsgProtoDefID.instance_def_type_paintkit_item_definition: object expected"); - message.instance_def_type_paintkit_item_definition = $root.CMsgPaintKit_ItemDefinition.fromObject(object.instance_def_type_paintkit_item_definition); + if (!$util.isObject(object.instance_def_type_paintkit_item_definition)) + throw $TypeError(".CMsgProtoDefID.instance_def_type_paintkit_item_definition: object expected"); + message.instance_def_type_paintkit_item_definition = $root.CMsgPaintKit_ItemDefinition.fromObject(object.instance_def_type_paintkit_item_definition, _depth + 1); } if (object.instance_def_type_paintkit_definition != null) { - if (typeof object.instance_def_type_paintkit_definition !== "object") - throw TypeError(".CMsgProtoDefID.instance_def_type_paintkit_definition: object expected"); - message.instance_def_type_paintkit_definition = $root.CMsgPaintKit_Definition.fromObject(object.instance_def_type_paintkit_definition); + if (!$util.isObject(object.instance_def_type_paintkit_definition)) + throw $TypeError(".CMsgProtoDefID.instance_def_type_paintkit_definition: object expected"); + message.instance_def_type_paintkit_definition = $root.CMsgPaintKit_Definition.fromObject(object.instance_def_type_paintkit_definition, _depth + 1); } if (object.instance_def_type_header_only != null) { - if (typeof object.instance_def_type_header_only !== "object") - throw TypeError(".CMsgProtoDefID.instance_def_type_header_only: object expected"); - message.instance_def_type_header_only = $root.CMsgHeaderOnly.fromObject(object.instance_def_type_header_only); + if (!$util.isObject(object.instance_def_type_header_only)) + throw $TypeError(".CMsgProtoDefID.instance_def_type_header_only: object expected"); + message.instance_def_type_header_only = $root.CMsgHeaderOnly.fromObject(object.instance_def_type_header_only, _depth + 1); } return message; }; @@ -2246,65 +2846,69 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgProtoDefID.toObject = function toObject(message, options) { + CMsgProtoDefID.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.defindex = 0; - object.type = options.enums === String ? "DEF_TYPE_QUEST_MAP_NODE" : 0; + object.type = options.enums === $String ? "DEF_TYPE_QUEST_MAP_NODE" : 0; } - if (message.defindex != null && message.hasOwnProperty("defindex")) + if (message.defindex != null && $Object.hasOwnProperty.call(message, "defindex")) object.defindex = message.defindex; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.ProtoDefTypes[message.type] : message.type; - if (message.instance_def_type_quest_map_node != null && message.hasOwnProperty("instance_def_type_quest_map_node")) { - object.instance_def_type_quest_map_node = $root.CMsgQuestMapNodeDef.toObject(message.instance_def_type_quest_map_node, options); + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.ProtoDefTypes[message.type] === $undefined ? message.type : $root.ProtoDefTypes[message.type] : message.type; + if (message.instance_def_type_quest_map_node != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_map_node")) { + object.instance_def_type_quest_map_node = $root.CMsgQuestMapNodeDef.toObject(message.instance_def_type_quest_map_node, options, _depth + 1); if (options.oneofs) object.instance = "instance_def_type_quest_map_node"; } - if (message.instance_def_type_quest_theme != null && message.hasOwnProperty("instance_def_type_quest_theme")) { - object.instance_def_type_quest_theme = $root.CMsgQuestTheme.toObject(message.instance_def_type_quest_theme, options); + if (message.instance_def_type_quest_theme != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_theme")) { + object.instance_def_type_quest_theme = $root.CMsgQuestTheme.toObject(message.instance_def_type_quest_theme, options, _depth + 1); if (options.oneofs) object.instance = "instance_def_type_quest_theme"; } - if (message.instance_def_type_quest_map_region != null && message.hasOwnProperty("instance_def_type_quest_map_region")) { - object.instance_def_type_quest_map_region = $root.CMsgQuestMapRegionDef.toObject(message.instance_def_type_quest_map_region, options); + if (message.instance_def_type_quest_map_region != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_map_region")) { + object.instance_def_type_quest_map_region = $root.CMsgQuestMapRegionDef.toObject(message.instance_def_type_quest_map_region, options, _depth + 1); if (options.oneofs) object.instance = "instance_def_type_quest_map_region"; } - if (message.instance_def_type_quest != null && message.hasOwnProperty("instance_def_type_quest")) { - object.instance_def_type_quest = $root.CMsgQuestDef.toObject(message.instance_def_type_quest, options); + if (message.instance_def_type_quest != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest")) { + object.instance_def_type_quest = $root.CMsgQuestDef.toObject(message.instance_def_type_quest, options, _depth + 1); if (options.oneofs) object.instance = "instance_def_type_quest"; } - if (message.instance_def_type_quest_objective != null && message.hasOwnProperty("instance_def_type_quest_objective")) { - object.instance_def_type_quest_objective = $root.CMsgQuestObjectiveDef.toObject(message.instance_def_type_quest_objective, options); + if (message.instance_def_type_quest_objective != null && $Object.hasOwnProperty.call(message, "instance_def_type_quest_objective")) { + object.instance_def_type_quest_objective = $root.CMsgQuestObjectiveDef.toObject(message.instance_def_type_quest_objective, options, _depth + 1); if (options.oneofs) object.instance = "instance_def_type_quest_objective"; } - if (message.instance_def_type_paintkit_variables != null && message.hasOwnProperty("instance_def_type_paintkit_variables")) { - object.instance_def_type_paintkit_variables = $root.CMsgPaintKit_Variables.toObject(message.instance_def_type_paintkit_variables, options); + if (message.instance_def_type_paintkit_variables != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_variables")) { + object.instance_def_type_paintkit_variables = $root.CMsgPaintKit_Variables.toObject(message.instance_def_type_paintkit_variables, options, _depth + 1); if (options.oneofs) object.instance = "instance_def_type_paintkit_variables"; } - if (message.instance_def_type_paintkit_operation != null && message.hasOwnProperty("instance_def_type_paintkit_operation")) { - object.instance_def_type_paintkit_operation = $root.CMsgPaintKit_Operation.toObject(message.instance_def_type_paintkit_operation, options); + if (message.instance_def_type_paintkit_operation != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_operation")) { + object.instance_def_type_paintkit_operation = $root.CMsgPaintKit_Operation.toObject(message.instance_def_type_paintkit_operation, options, _depth + 1); if (options.oneofs) object.instance = "instance_def_type_paintkit_operation"; } - if (message.instance_def_type_paintkit_item_definition != null && message.hasOwnProperty("instance_def_type_paintkit_item_definition")) { - object.instance_def_type_paintkit_item_definition = $root.CMsgPaintKit_ItemDefinition.toObject(message.instance_def_type_paintkit_item_definition, options); + if (message.instance_def_type_paintkit_item_definition != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_item_definition")) { + object.instance_def_type_paintkit_item_definition = $root.CMsgPaintKit_ItemDefinition.toObject(message.instance_def_type_paintkit_item_definition, options, _depth + 1); if (options.oneofs) object.instance = "instance_def_type_paintkit_item_definition"; } - if (message.instance_def_type_paintkit_definition != null && message.hasOwnProperty("instance_def_type_paintkit_definition")) { - object.instance_def_type_paintkit_definition = $root.CMsgPaintKit_Definition.toObject(message.instance_def_type_paintkit_definition, options); + if (message.instance_def_type_paintkit_definition != null && $Object.hasOwnProperty.call(message, "instance_def_type_paintkit_definition")) { + object.instance_def_type_paintkit_definition = $root.CMsgPaintKit_Definition.toObject(message.instance_def_type_paintkit_definition, options, _depth + 1); if (options.oneofs) object.instance = "instance_def_type_paintkit_definition"; } - if (message.instance_def_type_header_only != null && message.hasOwnProperty("instance_def_type_header_only")) { - object.instance_def_type_header_only = $root.CMsgHeaderOnly.toObject(message.instance_def_type_header_only, options); + if (message.instance_def_type_header_only != null && $Object.hasOwnProperty.call(message, "instance_def_type_header_only")) { + object.instance_def_type_header_only = $root.CMsgHeaderOnly.toObject(message.instance_def_type_header_only, options, _depth + 1); if (options.oneofs) object.instance = "instance_def_type_header_only"; } @@ -2318,8 +2922,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgProtoDefID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgProtoDefID.prototype.toJSON = function() { + return CMsgProtoDefID.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgProtoDefID + * @function getTypeUrl + * @memberof CMsgProtoDefID + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgProtoDefID.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgProtoDefID"; }; return CMsgProtoDefID; @@ -2329,33 +2947,62 @@ /** * Properties of a CMsgQuestObjectiveDef. - * @exports ICMsgQuestObjectiveDef - * @interface ICMsgQuestObjectiveDef - * @property {ICMsgProtoDefHeader} header CMsgQuestObjectiveDef header + * @typedef {Object} CMsgQuestObjectiveDef.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgQuestObjectiveDef header * @property {string|null} [loc_desctoken] CMsgQuestObjectiveDef loc_desctoken * @property {number|null} [points] CMsgQuestObjectiveDef points * @property {number|null} [conditions_defindex] CMsgQuestObjectiveDef conditions_defindex * @property {Array.|null} [map] CMsgQuestObjectiveDef map * @property {Array.|null} [game_mode] CMsgQuestObjectiveDef game_mode * @property {CMsgQuestObjectiveDef.ETF2Team|null} [team] CMsgQuestObjectiveDef team - * @property {Array.|null} [condition_vars] CMsgQuestObjectiveDef condition_vars - * @property {Array.|null} [classes_vars] CMsgQuestObjectiveDef classes_vars + * @property {Array.|null} [condition_vars] CMsgQuestObjectiveDef condition_vars + * @property {Array.|null} [classes_vars] CMsgQuestObjectiveDef classes_vars * @property {Array.|null} [conditions] CMsgQuestObjectiveDef conditions * @property {LogicalOperation|null} [condition_logic] CMsgQuestObjectiveDef condition_logic * @property {Array.|null} [item_name] CMsgQuestObjectiveDef item_name * @property {LogicalOperation|null} [item_logic] CMsgQuestObjectiveDef item_logic * @property {number|null} [jump_state] CMsgQuestObjectiveDef jump_state + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgQuestObjectiveDef. + * @exports ICMsgQuestObjectiveDef + * @interface ICMsgQuestObjectiveDef + * @augments CMsgQuestObjectiveDef.$Properties + * @deprecated Use CMsgQuestObjectiveDef.$Properties instead. + */ + + /** + * Shape of a CMsgQuestObjectiveDef. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * loc_desctoken?: string|null; + * points?: number|null; + * conditions_defindex?: number|null; + * map?: Array.|null; + * game_mode?: Array.|null; + * team?: CMsgQuestObjectiveDef.ETF2Team|null; + * condition_vars?: Array.|null; + * classes_vars?: Array.|null; + * conditions?: Array.|null; + * condition_logic?: LogicalOperation|null; + * item_name?: Array.|null; + * item_logic?: LogicalOperation|null; + * jump_state?: number|null; + * $unknowns?: Array.; + * }} CMsgQuestObjectiveDef.$Shape */ /** * Constructs a new CMsgQuestObjectiveDef. * @exports CMsgQuestObjectiveDef * @classdesc Represents a CMsgQuestObjectiveDef. - * @implements ICMsgQuestObjectiveDef * @constructor - * @param {ICMsgQuestObjectiveDef=} [properties] Properties to set + * @param {CMsgQuestObjectiveDef.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgQuestObjectiveDef(properties) { + var CMsgQuestObjectiveDef = function (properties) { this.map = []; this.game_mode = []; this.condition_vars = []; @@ -2363,14 +3010,14 @@ this.conditions = []; this.item_name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgQuestObjectiveDef header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgQuestObjectiveDef * @instance */ @@ -2426,7 +3073,7 @@ /** * CMsgQuestObjectiveDef condition_vars. - * @member {Array.} condition_vars + * @member {Array.} condition_vars * @memberof CMsgQuestObjectiveDef * @instance */ @@ -2434,7 +3081,7 @@ /** * CMsgQuestObjectiveDef classes_vars. - * @member {Array.} classes_vars + * @member {Array.} classes_vars * @memberof CMsgQuestObjectiveDef * @instance */ @@ -2485,10 +3132,14 @@ * @function create * @memberof CMsgQuestObjectiveDef * @static - * @param {ICMsgQuestObjectiveDef=} [properties] Properties to set + * @param {CMsgQuestObjectiveDef.$Properties=} [properties] Properties to set * @returns {CMsgQuestObjectiveDef} CMsgQuestObjectiveDef instance + * @type {{ + * (properties: CMsgQuestObjectiveDef.$Shape): CMsgQuestObjectiveDef & CMsgQuestObjectiveDef.$Shape; + * (properties?: CMsgQuestObjectiveDef.$Properties): CMsgQuestObjectiveDef; + * }} */ - CMsgQuestObjectiveDef.create = function create(properties) { + CMsgQuestObjectiveDef.create = function(properties) { return new CMsgQuestObjectiveDef(properties); }; @@ -2497,19 +3148,23 @@ * @function encode * @memberof CMsgQuestObjectiveDef * @static - * @param {ICMsgQuestObjectiveDef} message CMsgQuestObjectiveDef message or plain object to encode + * @param {CMsgQuestObjectiveDef.$Properties} message CMsgQuestObjectiveDef message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestObjectiveDef.encode = function encode(message, writer) { + CMsgQuestObjectiveDef.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.loc_desctoken != null && Object.hasOwnProperty.call(message, "loc_desctoken")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.loc_desctoken != null && $Object.hasOwnProperty.call(message, "loc_desctoken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.loc_desctoken); - if (message.points != null && Object.hasOwnProperty.call(message, "points")) + if (message.points != null && $Object.hasOwnProperty.call(message, "points")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.points); - if (message.conditions_defindex != null && Object.hasOwnProperty.call(message, "conditions_defindex")) + if (message.conditions_defindex != null && $Object.hasOwnProperty.call(message, "conditions_defindex")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.conditions_defindex); if (message.map != null && message.map.length) for (var i = 0; i < message.map.length; ++i) @@ -2517,26 +3172,29 @@ if (message.game_mode != null && message.game_mode.length) for (var i = 0; i < message.game_mode.length; ++i) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.game_mode[i]); - if (message.team != null && Object.hasOwnProperty.call(message, "team")) + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.team); if (message.condition_vars != null && message.condition_vars.length) for (var i = 0; i < message.condition_vars.length; ++i) - $root.CMsgVarField.encode(message.condition_vars[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.CMsgVarField.encode(message.condition_vars[i], writer.uint32(/* id 11, wireType 2 =*/90).fork(), _depth + 1).ldelim(); if (message.classes_vars != null && message.classes_vars.length) for (var i = 0; i < message.classes_vars.length; ++i) - $root.CMsgVarField.encode(message.classes_vars[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.CMsgVarField.encode(message.classes_vars[i], writer.uint32(/* id 12, wireType 2 =*/98).fork(), _depth + 1).ldelim(); if (message.conditions != null && message.conditions.length) for (var i = 0; i < message.conditions.length; ++i) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.conditions[i]); - if (message.condition_logic != null && Object.hasOwnProperty.call(message, "condition_logic")) + if (message.condition_logic != null && $Object.hasOwnProperty.call(message, "condition_logic")) writer.uint32(/* id 14, wireType 0 =*/112).int32(message.condition_logic); if (message.item_name != null && message.item_name.length) for (var i = 0; i < message.item_name.length; ++i) writer.uint32(/* id 15, wireType 2 =*/122).string(message.item_name[i]); - if (message.item_logic != null && Object.hasOwnProperty.call(message, "item_logic")) + if (message.item_logic != null && $Object.hasOwnProperty.call(message, "item_logic")) writer.uint32(/* id 16, wireType 0 =*/128).int32(message.item_logic); - if (message.jump_state != null && Object.hasOwnProperty.call(message, "jump_state")) + if (message.jump_state != null && $Object.hasOwnProperty.call(message, "jump_state")) writer.uint32(/* id 17, wireType 0 =*/136).uint32(message.jump_state); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -2545,12 +3203,12 @@ * @function encodeDelimited * @memberof CMsgQuestObjectiveDef * @static - * @param {ICMsgQuestObjectiveDef} message CMsgQuestObjectiveDef message or plain object to encode + * @param {CMsgQuestObjectiveDef.$Properties} message CMsgQuestObjectiveDef message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestObjectiveDef.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgQuestObjectiveDef.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -2560,87 +3218,195 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestObjectiveDef} CMsgQuestObjectiveDef + * @returns {CMsgQuestObjectiveDef & CMsgQuestObjectiveDef.$Shape} CMsgQuestObjectiveDef * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestObjectiveDef.decode = function decode(reader, length) { + CMsgQuestObjectiveDef.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestObjectiveDef(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestObjectiveDef(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - case 2: - message.loc_desctoken = reader.string(); - break; - case 3: - message.points = reader.uint32(); - break; - case 5: - message.conditions_defindex = reader.uint32(); - break; - case 8: - if (!(message.map && message.map.length)) - message.map = []; - message.map.push(reader.string()); - break; - case 9: - if (!(message.game_mode && message.game_mode.length)) - message.game_mode = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.game_mode.push(reader.int32()); - } else - message.game_mode.push(reader.int32()); - break; - case 10: - message.team = reader.int32(); - break; - case 11: - if (!(message.condition_vars && message.condition_vars.length)) - message.condition_vars = []; - message.condition_vars.push($root.CMsgVarField.decode(reader, reader.uint32())); - break; - case 12: - if (!(message.classes_vars && message.classes_vars.length)) - message.classes_vars = []; - message.classes_vars.push($root.CMsgVarField.decode(reader, reader.uint32())); - break; - case 13: - if (!(message.conditions && message.conditions.length)) - message.conditions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.conditions.push(reader.int32()); - } else - message.conditions.push(reader.int32()); - break; - case 14: - message.condition_logic = reader.int32(); - break; - case 15: - if (!(message.item_name && message.item_name.length)) - message.item_name = []; - message.item_name.push(reader.string()); - break; - case 16: - message.item_logic = reader.int32(); - break; - case 17: - message.jump_state = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.loc_desctoken = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.points = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.conditions_defindex = reader.uint32(); + continue; + } + case 8: { + if (wireType !== 2) + break; + if (!(message.map && message.map.length)) + message.map = []; + message.map.push(reader.string()); + continue; + } + case 9: { + if (wireType === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + start = reader.pos; + value = reader.int32(); + if ($root.CMsgQuestObjectiveDef.ETF2GameModes[value] !== $undefined) { + if (!(message.game_mode && message.game_mode.length)) + message.game_mode = []; + message.game_mode.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push($util.rawField(9, 0, reader.raw(start, reader.pos))); + } + } + continue; + } + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgQuestObjectiveDef.ETF2GameModes[value] !== $undefined) { + if (!(message.game_mode && message.game_mode.length)) + message.game_mode = []; + message.game_mode.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 10: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgQuestObjectiveDef.ETF2Team[value] !== $undefined) + message.team = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 11: { + if (wireType !== 2) + break; + if (!(message.condition_vars && message.condition_vars.length)) + message.condition_vars = []; + message.condition_vars.push($root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 12: { + if (wireType !== 2) + break; + if (!(message.classes_vars && message.classes_vars.length)) + message.classes_vars = []; + message.classes_vars.push($root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 13: { + if (wireType === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + start = reader.pos; + value = reader.int32(); + if ($root.CMsgQuestObjectiveDef.ETF2Conditions[value] !== $undefined) { + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push($util.rawField(13, 0, reader.raw(start, reader.pos))); + } + } + continue; + } + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.CMsgQuestObjectiveDef.ETF2Conditions[value] !== $undefined) { + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push(value); + } else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 14: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.LogicalOperation[value] !== $undefined) + message.condition_logic = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 15: { + if (wireType !== 2) + break; + if (!(message.item_name && message.item_name.length)) + message.item_name = []; + message.item_name.push(reader.string()); + continue; + } + case 16: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.LogicalOperation[value] !== $undefined) + message.item_logic = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 17: { + if (wireType !== 0) + break; + message.jump_state = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("header")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) throw $util.ProtocolError("missing required 'header'", { instance: message }); return message; }; @@ -2651,11 +3417,11 @@ * @memberof CMsgQuestObjectiveDef * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestObjectiveDef} CMsgQuestObjectiveDef + * @returns {CMsgQuestObjectiveDef & CMsgQuestObjectiveDef.$Shape} CMsgQuestObjectiveDef * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestObjectiveDef.decodeDelimited = function decodeDelimited(reader) { + CMsgQuestObjectiveDef.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -2669,32 +3435,36 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgQuestObjectiveDef.verify = function verify(message) { + CMsgQuestObjectiveDef.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } - if (message.loc_desctoken != null && message.hasOwnProperty("loc_desctoken")) + if (message.loc_desctoken != null && $Object.hasOwnProperty.call(message, "loc_desctoken")) if (!$util.isString(message.loc_desctoken)) return "loc_desctoken: string expected"; - if (message.points != null && message.hasOwnProperty("points")) + if (message.points != null && $Object.hasOwnProperty.call(message, "points")) if (!$util.isInteger(message.points)) return "points: integer expected"; - if (message.conditions_defindex != null && message.hasOwnProperty("conditions_defindex")) + if (message.conditions_defindex != null && $Object.hasOwnProperty.call(message, "conditions_defindex")) if (!$util.isInteger(message.conditions_defindex)) return "conditions_defindex: integer expected"; - if (message.map != null && message.hasOwnProperty("map")) { - if (!Array.isArray(message.map)) + if (message.map != null && $Object.hasOwnProperty.call(message, "map")) { + if (!$Array.isArray(message.map)) return "map: array expected"; for (var i = 0; i < message.map.length; ++i) if (!$util.isString(message.map[i])) return "map: string[] expected"; } - if (message.game_mode != null && message.hasOwnProperty("game_mode")) { - if (!Array.isArray(message.game_mode)) + if (message.game_mode != null && $Object.hasOwnProperty.call(message, "game_mode")) { + if (!$Array.isArray(message.game_mode)) return "game_mode: array expected"; for (var i = 0; i < message.game_mode.length; ++i) switch (message.game_mode[i]) { @@ -2723,7 +3493,7 @@ break; } } - if (message.team != null && message.hasOwnProperty("team")) + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) switch (message.team) { default: return "team: enum value expected"; @@ -2731,26 +3501,26 @@ case 3: break; } - if (message.condition_vars != null && message.hasOwnProperty("condition_vars")) { - if (!Array.isArray(message.condition_vars)) + if (message.condition_vars != null && $Object.hasOwnProperty.call(message, "condition_vars")) { + if (!$Array.isArray(message.condition_vars)) return "condition_vars: array expected"; for (var i = 0; i < message.condition_vars.length; ++i) { - var error = $root.CMsgVarField.verify(message.condition_vars[i]); + var error = $root.CMsgVarField.verify(message.condition_vars[i], _depth + 1); if (error) return "condition_vars." + error; } } - if (message.classes_vars != null && message.hasOwnProperty("classes_vars")) { - if (!Array.isArray(message.classes_vars)) + if (message.classes_vars != null && $Object.hasOwnProperty.call(message, "classes_vars")) { + if (!$Array.isArray(message.classes_vars)) return "classes_vars: array expected"; for (var i = 0; i < message.classes_vars.length; ++i) { - var error = $root.CMsgVarField.verify(message.classes_vars[i]); + var error = $root.CMsgVarField.verify(message.classes_vars[i], _depth + 1); if (error) return "classes_vars." + error; } } - if (message.conditions != null && message.hasOwnProperty("conditions")) { - if (!Array.isArray(message.conditions)) + if (message.conditions != null && $Object.hasOwnProperty.call(message, "conditions")) { + if (!$Array.isArray(message.conditions)) return "conditions: array expected"; for (var i = 0; i < message.conditions.length; ++i) switch (message.conditions[i]) { @@ -2889,7 +3659,7 @@ break; } } - if (message.condition_logic != null && message.hasOwnProperty("condition_logic")) + if (message.condition_logic != null && $Object.hasOwnProperty.call(message, "condition_logic")) switch (message.condition_logic) { default: return "condition_logic: enum value expected"; @@ -2898,14 +3668,14 @@ case 2: break; } - if (message.item_name != null && message.hasOwnProperty("item_name")) { - if (!Array.isArray(message.item_name)) + if (message.item_name != null && $Object.hasOwnProperty.call(message, "item_name")) { + if (!$Array.isArray(message.item_name)) return "item_name: array expected"; for (var i = 0; i < message.item_name.length; ++i) if (!$util.isString(message.item_name[i])) return "item_name: string[] expected"; } - if (message.item_logic != null && message.hasOwnProperty("item_logic")) + if (message.item_logic != null && $Object.hasOwnProperty.call(message, "item_logic")) switch (message.item_logic) { default: return "item_logic: enum value expected"; @@ -2914,7 +3684,7 @@ case 2: break; } - if (message.jump_state != null && message.hasOwnProperty("jump_state")) + if (message.jump_state != null && $Object.hasOwnProperty.call(message, "jump_state")) if (!$util.isInteger(message.jump_state)) return "jump_state: integer expected"; return null; @@ -2928,115 +3698,121 @@ * @param {Object.} object Plain object * @returns {CMsgQuestObjectiveDef} CMsgQuestObjectiveDef */ - CMsgQuestObjectiveDef.fromObject = function fromObject(object) { + CMsgQuestObjectiveDef.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestObjectiveDef) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestObjectiveDef: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestObjectiveDef(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgQuestObjectiveDef.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgQuestObjectiveDef.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } if (object.loc_desctoken != null) - message.loc_desctoken = String(object.loc_desctoken); + message.loc_desctoken = $String(object.loc_desctoken); if (object.points != null) message.points = object.points >>> 0; if (object.conditions_defindex != null) message.conditions_defindex = object.conditions_defindex >>> 0; if (object.map) { - if (!Array.isArray(object.map)) - throw TypeError(".CMsgQuestObjectiveDef.map: array expected"); - message.map = []; + if (!$Array.isArray(object.map)) + throw $TypeError(".CMsgQuestObjectiveDef.map: array expected"); + message.map = $Array(object.map.length); for (var i = 0; i < object.map.length; ++i) - message.map[i] = String(object.map[i]); + message.map[i] = $String(object.map[i]); } if (object.game_mode) { - if (!Array.isArray(object.game_mode)) - throw TypeError(".CMsgQuestObjectiveDef.game_mode: array expected"); + if (!$Array.isArray(object.game_mode)) + throw $TypeError(".CMsgQuestObjectiveDef.game_mode: array expected"); message.game_mode = []; for (var i = 0; i < object.game_mode.length; ++i) switch (object.game_mode[i]) { - default: case "kGameCategory_Escort": case 0: - message.game_mode[i] = 0; + message.game_mode[message.game_mode.length] = 0; break; case "kGameCategory_CTF": case 1: - message.game_mode[i] = 1; + message.game_mode[message.game_mode.length] = 1; break; case "kGameCategory_AttackDefense": case 2: - message.game_mode[i] = 2; + message.game_mode[message.game_mode.length] = 2; break; case "kGameCategory_Koth": case 3: - message.game_mode[i] = 3; + message.game_mode[message.game_mode.length] = 3; break; case "kGameCategory_CP": case 4: - message.game_mode[i] = 4; + message.game_mode[message.game_mode.length] = 4; break; case "kGameCategory_EscortRace": case 5: - message.game_mode[i] = 5; + message.game_mode[message.game_mode.length] = 5; break; case "kGameCategory_EventMix": case 6: - message.game_mode[i] = 6; + message.game_mode[message.game_mode.length] = 6; break; case "kGameCategory_SD": case 7: - message.game_mode[i] = 7; + message.game_mode[message.game_mode.length] = 7; break; case "kGameCategory_Quickplay": case 8: - message.game_mode[i] = 8; + message.game_mode[message.game_mode.length] = 8; break; case "kGameCategory_Event247": case 9: - message.game_mode[i] = 9; + message.game_mode[message.game_mode.length] = 9; break; case "kGameCategory_Arena": case 10: - message.game_mode[i] = 10; + message.game_mode[message.game_mode.length] = 10; break; case "kGameCategory_RobotDestruction": case 11: - message.game_mode[i] = 11; + message.game_mode[message.game_mode.length] = 11; break; case "kGameCategory_Powerup": case 12: - message.game_mode[i] = 12; + message.game_mode[message.game_mode.length] = 12; break; case "kGameCategory_Featured": case 13: - message.game_mode[i] = 13; + message.game_mode[message.game_mode.length] = 13; break; case "kGameCategory_Passtime": case 14: - message.game_mode[i] = 14; + message.game_mode[message.game_mode.length] = 14; break; case "kGameCategory_Community_Update": case 15: - message.game_mode[i] = 15; + message.game_mode[message.game_mode.length] = 15; break; case "kGameCategory_Misc": case 16: - message.game_mode[i] = 16; + message.game_mode[message.game_mode.length] = 16; break; case "kGameCategory_Competitive_6v6": case 17: - message.game_mode[i] = 17; + message.game_mode[message.game_mode.length] = 17; break; case "kGameCategory_Other": case 18: - message.game_mode[i] = 18; + message.game_mode[message.game_mode.length] = 18; break; case "kGameCategory_Halloween": case 19: - message.game_mode[i] = 19; + message.game_mode[message.game_mode.length] = 19; break; + default: } } switch (object.team) { @@ -3048,554 +3824,555 @@ case 3: message.team = 3; break; + default: } if (object.condition_vars) { - if (!Array.isArray(object.condition_vars)) - throw TypeError(".CMsgQuestObjectiveDef.condition_vars: array expected"); - message.condition_vars = []; + if (!$Array.isArray(object.condition_vars)) + throw $TypeError(".CMsgQuestObjectiveDef.condition_vars: array expected"); + message.condition_vars = $Array(object.condition_vars.length); for (var i = 0; i < object.condition_vars.length; ++i) { - if (typeof object.condition_vars[i] !== "object") - throw TypeError(".CMsgQuestObjectiveDef.condition_vars: object expected"); - message.condition_vars[i] = $root.CMsgVarField.fromObject(object.condition_vars[i]); + if (!$util.isObject(object.condition_vars[i])) + throw $TypeError(".CMsgQuestObjectiveDef.condition_vars: object expected"); + message.condition_vars[i] = $root.CMsgVarField.fromObject(object.condition_vars[i], _depth + 1); } } if (object.classes_vars) { - if (!Array.isArray(object.classes_vars)) - throw TypeError(".CMsgQuestObjectiveDef.classes_vars: array expected"); - message.classes_vars = []; + if (!$Array.isArray(object.classes_vars)) + throw $TypeError(".CMsgQuestObjectiveDef.classes_vars: array expected"); + message.classes_vars = $Array(object.classes_vars.length); for (var i = 0; i < object.classes_vars.length; ++i) { - if (typeof object.classes_vars[i] !== "object") - throw TypeError(".CMsgQuestObjectiveDef.classes_vars: object expected"); - message.classes_vars[i] = $root.CMsgVarField.fromObject(object.classes_vars[i]); + if (!$util.isObject(object.classes_vars[i])) + throw $TypeError(".CMsgQuestObjectiveDef.classes_vars: object expected"); + message.classes_vars[i] = $root.CMsgVarField.fromObject(object.classes_vars[i], _depth + 1); } } if (object.conditions) { - if (!Array.isArray(object.conditions)) - throw TypeError(".CMsgQuestObjectiveDef.conditions: array expected"); + if (!$Array.isArray(object.conditions)) + throw $TypeError(".CMsgQuestObjectiveDef.conditions: array expected"); message.conditions = []; for (var i = 0; i < object.conditions.length; ++i) switch (object.conditions[i]) { - default: case "TF_COND_AIMING": case 0: - message.conditions[i] = 0; + message.conditions[message.conditions.length] = 0; break; case "TF_COND_ZOOMED": case 1: - message.conditions[i] = 1; + message.conditions[message.conditions.length] = 1; break; case "TF_COND_DISGUISING": case 2: - message.conditions[i] = 2; + message.conditions[message.conditions.length] = 2; break; case "TF_COND_DISGUISED": case 3: - message.conditions[i] = 3; + message.conditions[message.conditions.length] = 3; break; case "TF_COND_STEALTHED": case 4: - message.conditions[i] = 4; + message.conditions[message.conditions.length] = 4; break; case "TF_COND_INVULNERABLE": case 5: - message.conditions[i] = 5; + message.conditions[message.conditions.length] = 5; break; case "TF_COND_TELEPORTED": case 6: - message.conditions[i] = 6; + message.conditions[message.conditions.length] = 6; break; case "TF_COND_TAUNTING": case 7: - message.conditions[i] = 7; + message.conditions[message.conditions.length] = 7; break; case "TF_COND_INVULNERABLE_WEARINGOFF": case 8: - message.conditions[i] = 8; + message.conditions[message.conditions.length] = 8; break; case "TF_COND_STEALTHED_BLINK": case 9: - message.conditions[i] = 9; + message.conditions[message.conditions.length] = 9; break; case "TF_COND_SELECTED_TO_TELEPORT": case 10: - message.conditions[i] = 10; + message.conditions[message.conditions.length] = 10; break; case "TF_COND_CRITBOOSTED": case 11: - message.conditions[i] = 11; + message.conditions[message.conditions.length] = 11; break; case "TF_COND_TMPDAMAGEBONUS": case 12: - message.conditions[i] = 12; + message.conditions[message.conditions.length] = 12; break; case "TF_COND_FEIGN_DEATH": case 13: - message.conditions[i] = 13; + message.conditions[message.conditions.length] = 13; break; case "TF_COND_PHASE": case 14: - message.conditions[i] = 14; + message.conditions[message.conditions.length] = 14; break; case "TF_COND_STUNNED": case 15: - message.conditions[i] = 15; + message.conditions[message.conditions.length] = 15; break; case "TF_COND_OFFENSEBUFF": case 16: - message.conditions[i] = 16; + message.conditions[message.conditions.length] = 16; break; case "TF_COND_SHIELD_CHARGE": case 17: - message.conditions[i] = 17; + message.conditions[message.conditions.length] = 17; break; case "TF_COND_DEMO_BUFF": case 18: - message.conditions[i] = 18; + message.conditions[message.conditions.length] = 18; break; case "TF_COND_ENERGY_BUFF": case 19: - message.conditions[i] = 19; + message.conditions[message.conditions.length] = 19; break; case "TF_COND_RADIUSHEAL": case 20: - message.conditions[i] = 20; + message.conditions[message.conditions.length] = 20; break; case "TF_COND_HEALTH_BUFF": case 21: - message.conditions[i] = 21; + message.conditions[message.conditions.length] = 21; break; case "TF_COND_BURNING": case 22: - message.conditions[i] = 22; + message.conditions[message.conditions.length] = 22; break; case "TF_COND_HEALTH_OVERHEALED": case 23: - message.conditions[i] = 23; + message.conditions[message.conditions.length] = 23; break; case "TF_COND_URINE": case 24: - message.conditions[i] = 24; + message.conditions[message.conditions.length] = 24; break; case "TF_COND_BLEEDING": case 25: - message.conditions[i] = 25; + message.conditions[message.conditions.length] = 25; break; case "TF_COND_DEFENSEBUFF": case 26: - message.conditions[i] = 26; + message.conditions[message.conditions.length] = 26; break; case "TF_COND_MAD_MILK": case 27: - message.conditions[i] = 27; + message.conditions[message.conditions.length] = 27; break; case "TF_COND_MEGAHEAL": case 28: - message.conditions[i] = 28; + message.conditions[message.conditions.length] = 28; break; case "TF_COND_REGENONDAMAGEBUFF": case 29: - message.conditions[i] = 29; + message.conditions[message.conditions.length] = 29; break; case "TF_COND_MARKEDFORDEATH": case 30: - message.conditions[i] = 30; + message.conditions[message.conditions.length] = 30; break; case "TF_COND_NOHEALINGDAMAGEBUFF": case 31: - message.conditions[i] = 31; + message.conditions[message.conditions.length] = 31; break; case "TF_COND_SPEED_BOOST": case 32: - message.conditions[i] = 32; + message.conditions[message.conditions.length] = 32; break; case "TF_COND_CRITBOOSTED_PUMPKIN": case 33: - message.conditions[i] = 33; + message.conditions[message.conditions.length] = 33; break; case "TF_COND_CRITBOOSTED_USER_BUFF": case 34: - message.conditions[i] = 34; + message.conditions[message.conditions.length] = 34; break; case "TF_COND_CRITBOOSTED_DEMO_CHARGE": case 35: - message.conditions[i] = 35; + message.conditions[message.conditions.length] = 35; break; case "TF_COND_SODAPOPPER_HYPE": case 36: - message.conditions[i] = 36; + message.conditions[message.conditions.length] = 36; break; case "TF_COND_CRITBOOSTED_FIRST_BLOOD": case 37: - message.conditions[i] = 37; + message.conditions[message.conditions.length] = 37; break; case "TF_COND_CRITBOOSTED_BONUS_TIME": case 38: - message.conditions[i] = 38; + message.conditions[message.conditions.length] = 38; break; case "TF_COND_CRITBOOSTED_CTF_CAPTURE": case 39: - message.conditions[i] = 39; + message.conditions[message.conditions.length] = 39; break; case "TF_COND_CRITBOOSTED_ON_KILL": case 40: - message.conditions[i] = 40; + message.conditions[message.conditions.length] = 40; break; case "TF_COND_CANNOT_SWITCH_FROM_MELEE": case 41: - message.conditions[i] = 41; + message.conditions[message.conditions.length] = 41; break; case "TF_COND_DEFENSEBUFF_NO_CRIT_BLOCK": case 42: - message.conditions[i] = 42; + message.conditions[message.conditions.length] = 42; break; case "TF_COND_REPROGRAMMED": case 43: - message.conditions[i] = 43; + message.conditions[message.conditions.length] = 43; break; case "TF_COND_CRITBOOSTED_RAGE_BUFF": case 44: - message.conditions[i] = 44; + message.conditions[message.conditions.length] = 44; break; case "TF_COND_DEFENSEBUFF_HIGH": case 45: - message.conditions[i] = 45; + message.conditions[message.conditions.length] = 45; break; case "TF_COND_SNIPERCHARGE_RAGE_BUFF": case 46: - message.conditions[i] = 46; + message.conditions[message.conditions.length] = 46; break; case "TF_COND_DISGUISE_WEARINGOFF": case 47: - message.conditions[i] = 47; + message.conditions[message.conditions.length] = 47; break; case "TF_COND_MARKEDFORDEATH_SILENT": case 48: - message.conditions[i] = 48; + message.conditions[message.conditions.length] = 48; break; case "TF_COND_DISGUISED_AS_DISPENSER": case 49: - message.conditions[i] = 49; + message.conditions[message.conditions.length] = 49; break; case "TF_COND_SAPPED": case 50: - message.conditions[i] = 50; + message.conditions[message.conditions.length] = 50; break; case "TF_COND_INVULNERABLE_HIDE_UNLESS_DAMAGED": case 51: - message.conditions[i] = 51; + message.conditions[message.conditions.length] = 51; break; case "TF_COND_INVULNERABLE_USER_BUFF": case 52: - message.conditions[i] = 52; + message.conditions[message.conditions.length] = 52; break; case "TF_COND_HALLOWEEN_BOMB_HEAD": case 53: - message.conditions[i] = 53; + message.conditions[message.conditions.length] = 53; break; case "TF_COND_HALLOWEEN_THRILLER": case 54: - message.conditions[i] = 54; + message.conditions[message.conditions.length] = 54; break; case "TF_COND_RADIUSHEAL_ON_DAMAGE": case 55: - message.conditions[i] = 55; + message.conditions[message.conditions.length] = 55; break; case "TF_COND_CRITBOOSTED_CARD_EFFECT": case 56: - message.conditions[i] = 56; + message.conditions[message.conditions.length] = 56; break; case "TF_COND_INVULNERABLE_CARD_EFFECT": case 57: - message.conditions[i] = 57; + message.conditions[message.conditions.length] = 57; break; case "TF_COND_MEDIGUN_UBER_BULLET_RESIST": case 58: - message.conditions[i] = 58; + message.conditions[message.conditions.length] = 58; break; case "TF_COND_MEDIGUN_UBER_BLAST_RESIST": case 59: - message.conditions[i] = 59; + message.conditions[message.conditions.length] = 59; break; case "TF_COND_MEDIGUN_UBER_FIRE_RESIST": case 60: - message.conditions[i] = 60; + message.conditions[message.conditions.length] = 60; break; case "TF_COND_MEDIGUN_SMALL_BULLET_RESIST": case 61: - message.conditions[i] = 61; + message.conditions[message.conditions.length] = 61; break; case "TF_COND_MEDIGUN_SMALL_BLAST_RESIST": case 62: - message.conditions[i] = 62; + message.conditions[message.conditions.length] = 62; break; case "TF_COND_MEDIGUN_SMALL_FIRE_RESIST": case 63: - message.conditions[i] = 63; + message.conditions[message.conditions.length] = 63; break; case "TF_COND_STEALTHED_USER_BUFF": case 64: - message.conditions[i] = 64; + message.conditions[message.conditions.length] = 64; break; case "TF_COND_MEDIGUN_DEBUFF": case 65: - message.conditions[i] = 65; + message.conditions[message.conditions.length] = 65; break; case "TF_COND_STEALTHED_USER_BUFF_FADING": case 66: - message.conditions[i] = 66; + message.conditions[message.conditions.length] = 66; break; case "TF_COND_BULLET_IMMUNE": case 67: - message.conditions[i] = 67; + message.conditions[message.conditions.length] = 67; break; case "TF_COND_BLAST_IMMUNE": case 68: - message.conditions[i] = 68; + message.conditions[message.conditions.length] = 68; break; case "TF_COND_FIRE_IMMUNE": case 69: - message.conditions[i] = 69; + message.conditions[message.conditions.length] = 69; break; case "TF_COND_PREVENT_DEATH": case 70: - message.conditions[i] = 70; + message.conditions[message.conditions.length] = 70; break; case "TF_COND_MVM_BOT_STUN_RADIOWAVE": case 71: - message.conditions[i] = 71; + message.conditions[message.conditions.length] = 71; break; case "TF_COND_HALLOWEEN_SPEED_BOOST": case 72: - message.conditions[i] = 72; + message.conditions[message.conditions.length] = 72; break; case "TF_COND_HALLOWEEN_QUICK_HEAL": case 73: - message.conditions[i] = 73; + message.conditions[message.conditions.length] = 73; break; case "TF_COND_HALLOWEEN_GIANT": case 74: - message.conditions[i] = 74; + message.conditions[message.conditions.length] = 74; break; case "TF_COND_HALLOWEEN_TINY": case 75: - message.conditions[i] = 75; + message.conditions[message.conditions.length] = 75; break; case "TF_COND_HALLOWEEN_IN_HELL": case 76: - message.conditions[i] = 76; + message.conditions[message.conditions.length] = 76; break; case "TF_COND_HALLOWEEN_GHOST_MODE": case 77: - message.conditions[i] = 77; + message.conditions[message.conditions.length] = 77; break; case "TF_COND_MINICRITBOOSTED_ON_KILL": case 78: - message.conditions[i] = 78; + message.conditions[message.conditions.length] = 78; break; case "TF_COND_OBSCURED_SMOKE": case 79: - message.conditions[i] = 79; + message.conditions[message.conditions.length] = 79; break; case "TF_COND_PARACHUTE_ACTIVE": case 80: - message.conditions[i] = 80; + message.conditions[message.conditions.length] = 80; break; case "TF_COND_BLASTJUMPING": case 81: - message.conditions[i] = 81; + message.conditions[message.conditions.length] = 81; break; case "TF_COND_HALLOWEEN_KART": case 82: - message.conditions[i] = 82; + message.conditions[message.conditions.length] = 82; break; case "TF_COND_HALLOWEEN_KART_DASH": case 83: - message.conditions[i] = 83; + message.conditions[message.conditions.length] = 83; break; case "TF_COND_BALLOON_HEAD": case 84: - message.conditions[i] = 84; + message.conditions[message.conditions.length] = 84; break; case "TF_COND_MELEE_ONLY": case 85: - message.conditions[i] = 85; + message.conditions[message.conditions.length] = 85; break; case "TF_COND_SWIMMING_CURSE": case 86: - message.conditions[i] = 86; + message.conditions[message.conditions.length] = 86; break; case "TF_COND_FREEZE_INPUT": case 87: - message.conditions[i] = 87; + message.conditions[message.conditions.length] = 87; break; case "TF_COND_HALLOWEEN_KART_CAGE": case 88: - message.conditions[i] = 88; + message.conditions[message.conditions.length] = 88; break; case "TF_COND_DONOTUSE_0": case 89: - message.conditions[i] = 89; + message.conditions[message.conditions.length] = 89; break; case "TF_COND_RUNE_STRENGTH": case 90: - message.conditions[i] = 90; + message.conditions[message.conditions.length] = 90; break; case "TF_COND_RUNE_HASTE": case 91: - message.conditions[i] = 91; + message.conditions[message.conditions.length] = 91; break; case "TF_COND_RUNE_REGEN": case 92: - message.conditions[i] = 92; + message.conditions[message.conditions.length] = 92; break; case "TF_COND_RUNE_RESIST": case 93: - message.conditions[i] = 93; + message.conditions[message.conditions.length] = 93; break; case "TF_COND_RUNE_VAMPIRE": case 94: - message.conditions[i] = 94; + message.conditions[message.conditions.length] = 94; break; case "TF_COND_RUNE_REFLECT": case 95: - message.conditions[i] = 95; + message.conditions[message.conditions.length] = 95; break; case "TF_COND_RUNE_PRECISION": case 96: - message.conditions[i] = 96; + message.conditions[message.conditions.length] = 96; break; case "TF_COND_RUNE_AGILITY": case 97: - message.conditions[i] = 97; + message.conditions[message.conditions.length] = 97; break; case "TF_COND_GRAPPLINGHOOK": case 98: - message.conditions[i] = 98; + message.conditions[message.conditions.length] = 98; break; case "TF_COND_GRAPPLINGHOOK_SAFEFALL": case 99: - message.conditions[i] = 99; + message.conditions[message.conditions.length] = 99; break; case "TF_COND_GRAPPLINGHOOK_LATCHED": case 100: - message.conditions[i] = 100; + message.conditions[message.conditions.length] = 100; break; case "TF_COND_GRAPPLINGHOOK_BLEEDING": case 101: - message.conditions[i] = 101; + message.conditions[message.conditions.length] = 101; break; case "TF_COND_AFTERBURN_IMMUNE": case 102: - message.conditions[i] = 102; + message.conditions[message.conditions.length] = 102; break; case "TF_COND_RUNE_KNOCKOUT": case 103: - message.conditions[i] = 103; + message.conditions[message.conditions.length] = 103; break; case "TF_COND_RUNE_IMBALANCE": case 104: - message.conditions[i] = 104; + message.conditions[message.conditions.length] = 104; break; case "TF_COND_CRITBOOSTED_RUNE_TEMP": case 105: - message.conditions[i] = 105; + message.conditions[message.conditions.length] = 105; break; case "TF_COND_PASSTIME_INTERCEPTION": case 106: - message.conditions[i] = 106; + message.conditions[message.conditions.length] = 106; break; case "TF_COND_SWIMMING_NO_EFFECTS": case 107: - message.conditions[i] = 107; + message.conditions[message.conditions.length] = 107; break; case "TF_COND_PURGATORY": case 108: - message.conditions[i] = 108; + message.conditions[message.conditions.length] = 108; break; case "TF_COND_RUNE_KING": case 109: - message.conditions[i] = 109; + message.conditions[message.conditions.length] = 109; break; case "TF_COND_RUNE_PLAGUE": case 110: - message.conditions[i] = 110; + message.conditions[message.conditions.length] = 110; break; case "TF_COND_RUNE_SUPERNOVA": case 111: - message.conditions[i] = 111; + message.conditions[message.conditions.length] = 111; break; case "TF_COND_PLAGUE": case 112: - message.conditions[i] = 112; + message.conditions[message.conditions.length] = 112; break; case "TF_COND_KING_BUFFED": case 113: - message.conditions[i] = 113; + message.conditions[message.conditions.length] = 113; break; case "TF_COND_TEAM_GLOWS": case 114: - message.conditions[i] = 114; + message.conditions[message.conditions.length] = 114; break; case "TF_COND_KNOCKED_INTO_AIR": case 115: - message.conditions[i] = 115; + message.conditions[message.conditions.length] = 115; break; case "TF_COND_COMPETITIVE_WINNER": case 116: - message.conditions[i] = 116; + message.conditions[message.conditions.length] = 116; break; case "TF_COND_COMPETITIVE_LOSER": case 117: - message.conditions[i] = 117; + message.conditions[message.conditions.length] = 117; break; case "TF_COND_HEALING_DEBUFF": case 118: - message.conditions[i] = 118; + message.conditions[message.conditions.length] = 118; break; case "TF_COND_PASSTIME_PENALTY_DEBUFF": case 119: - message.conditions[i] = 119; + message.conditions[message.conditions.length] = 119; break; case "TF_COND_PARACHUTE_DEPLOYED": case 120: - message.conditions[i] = 120; + message.conditions[message.conditions.length] = 120; break; case "TF_COND_NO_COMBAT_SPEED_BOOST": case 121: - message.conditions[i] = 121; + message.conditions[message.conditions.length] = 121; break; case "TF_COND_TRANQ_SPY_BOOST": case 122: - message.conditions[i] = 122; + message.conditions[message.conditions.length] = 122; break; case "TF_COND_TRANQ_MARKED": case 123: - message.conditions[i] = 123; + message.conditions[message.conditions.length] = 123; break; case "TF_COND_ROCKETPACK": case 126: - message.conditions[i] = 126; + message.conditions[message.conditions.length] = 126; break; case "TF_COND_ROCKETPACK_PASSENGER": case 127: - message.conditions[i] = 127; + message.conditions[message.conditions.length] = 127; break; case "TF_COND_STEALTHED_PHASE": case 128: - message.conditions[i] = 128; + message.conditions[message.conditions.length] = 128; break; case "TF_COND_CLIP_OVERLOAD": case 129: - message.conditions[i] = 129; + message.conditions[message.conditions.length] = 129; break; case "TF_COND_SPY_CLASS_STEAL": case 130: - message.conditions[i] = 130; + message.conditions[message.conditions.length] = 130; break; case "TF_COND_GAS": case 131: - message.conditions[i] = 131; + message.conditions[message.conditions.length] = 131; break; + default: } } switch (object.condition_logic) { @@ -3611,13 +4388,14 @@ case 2: message.condition_logic = 2; break; + default: } if (object.item_name) { - if (!Array.isArray(object.item_name)) - throw TypeError(".CMsgQuestObjectiveDef.item_name: array expected"); - message.item_name = []; + if (!$Array.isArray(object.item_name)) + throw $TypeError(".CMsgQuestObjectiveDef.item_name: array expected"); + message.item_name = $Array(object.item_name.length); for (var i = 0; i < object.item_name.length; ++i) - message.item_name[i] = String(object.item_name[i]); + message.item_name[i] = $String(object.item_name[i]); } switch (object.item_logic) { case "AND": @@ -3632,6 +4410,7 @@ case 2: message.item_logic = 2; break; + default: } if (object.jump_state != null) message.jump_state = object.jump_state >>> 0; @@ -3647,9 +4426,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgQuestObjectiveDef.toObject = function toObject(message, options) { + CMsgQuestObjectiveDef.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.map = []; @@ -3664,56 +4447,56 @@ object.loc_desctoken = ""; object.points = 0; object.conditions_defindex = 0; - object.team = options.enums === String ? "TF_TEAM_RED" : 2; - object.condition_logic = options.enums === String ? "AND" : 0; - object.item_logic = options.enums === String ? "AND" : 0; + object.team = options.enums === $String ? "TF_TEAM_RED" : 2; + object.condition_logic = options.enums === $String ? "AND" : 0; + object.item_logic = options.enums === $String ? "AND" : 0; object.jump_state = 0; } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); - if (message.loc_desctoken != null && message.hasOwnProperty("loc_desctoken")) + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); + if (message.loc_desctoken != null && $Object.hasOwnProperty.call(message, "loc_desctoken")) object.loc_desctoken = message.loc_desctoken; - if (message.points != null && message.hasOwnProperty("points")) + if (message.points != null && $Object.hasOwnProperty.call(message, "points")) object.points = message.points; - if (message.conditions_defindex != null && message.hasOwnProperty("conditions_defindex")) + if (message.conditions_defindex != null && $Object.hasOwnProperty.call(message, "conditions_defindex")) object.conditions_defindex = message.conditions_defindex; if (message.map && message.map.length) { - object.map = []; + object.map = $Array(message.map.length); for (var j = 0; j < message.map.length; ++j) object.map[j] = message.map[j]; } if (message.game_mode && message.game_mode.length) { - object.game_mode = []; + object.game_mode = $Array(message.game_mode.length); for (var j = 0; j < message.game_mode.length; ++j) - object.game_mode[j] = options.enums === String ? $root.CMsgQuestObjectiveDef.ETF2GameModes[message.game_mode[j]] : message.game_mode[j]; + object.game_mode[j] = options.enums === $String ? $root.CMsgQuestObjectiveDef.ETF2GameModes[message.game_mode[j]] === $undefined ? message.game_mode[j] : $root.CMsgQuestObjectiveDef.ETF2GameModes[message.game_mode[j]] : message.game_mode[j]; } - if (message.team != null && message.hasOwnProperty("team")) - object.team = options.enums === String ? $root.CMsgQuestObjectiveDef.ETF2Team[message.team] : message.team; + if (message.team != null && $Object.hasOwnProperty.call(message, "team")) + object.team = options.enums === $String ? $root.CMsgQuestObjectiveDef.ETF2Team[message.team] === $undefined ? message.team : $root.CMsgQuestObjectiveDef.ETF2Team[message.team] : message.team; if (message.condition_vars && message.condition_vars.length) { - object.condition_vars = []; + object.condition_vars = $Array(message.condition_vars.length); for (var j = 0; j < message.condition_vars.length; ++j) - object.condition_vars[j] = $root.CMsgVarField.toObject(message.condition_vars[j], options); + object.condition_vars[j] = $root.CMsgVarField.toObject(message.condition_vars[j], options, _depth + 1); } if (message.classes_vars && message.classes_vars.length) { - object.classes_vars = []; + object.classes_vars = $Array(message.classes_vars.length); for (var j = 0; j < message.classes_vars.length; ++j) - object.classes_vars[j] = $root.CMsgVarField.toObject(message.classes_vars[j], options); + object.classes_vars[j] = $root.CMsgVarField.toObject(message.classes_vars[j], options, _depth + 1); } if (message.conditions && message.conditions.length) { - object.conditions = []; + object.conditions = $Array(message.conditions.length); for (var j = 0; j < message.conditions.length; ++j) - object.conditions[j] = options.enums === String ? $root.CMsgQuestObjectiveDef.ETF2Conditions[message.conditions[j]] : message.conditions[j]; + object.conditions[j] = options.enums === $String ? $root.CMsgQuestObjectiveDef.ETF2Conditions[message.conditions[j]] === $undefined ? message.conditions[j] : $root.CMsgQuestObjectiveDef.ETF2Conditions[message.conditions[j]] : message.conditions[j]; } - if (message.condition_logic != null && message.hasOwnProperty("condition_logic")) - object.condition_logic = options.enums === String ? $root.LogicalOperation[message.condition_logic] : message.condition_logic; + if (message.condition_logic != null && $Object.hasOwnProperty.call(message, "condition_logic")) + object.condition_logic = options.enums === $String ? $root.LogicalOperation[message.condition_logic] === $undefined ? message.condition_logic : $root.LogicalOperation[message.condition_logic] : message.condition_logic; if (message.item_name && message.item_name.length) { - object.item_name = []; + object.item_name = $Array(message.item_name.length); for (var j = 0; j < message.item_name.length; ++j) object.item_name[j] = message.item_name[j]; } - if (message.item_logic != null && message.hasOwnProperty("item_logic")) - object.item_logic = options.enums === String ? $root.LogicalOperation[message.item_logic] : message.item_logic; - if (message.jump_state != null && message.hasOwnProperty("jump_state")) + if (message.item_logic != null && $Object.hasOwnProperty.call(message, "item_logic")) + object.item_logic = options.enums === $String ? $root.LogicalOperation[message.item_logic] === $undefined ? message.item_logic : $root.LogicalOperation[message.item_logic] : message.item_logic; + if (message.jump_state != null && $Object.hasOwnProperty.call(message, "jump_state")) object.jump_state = message.jump_state; return object; }; @@ -3725,8 +4508,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgQuestObjectiveDef.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgQuestObjectiveDef.prototype.toJSON = function() { + return CMsgQuestObjectiveDef.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgQuestObjectiveDef + * @function getTypeUrl + * @memberof CMsgQuestObjectiveDef + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgQuestObjectiveDef.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestObjectiveDef"; }; /** @@ -3755,7 +4552,7 @@ * @property {number} kGameCategory_Halloween=19 kGameCategory_Halloween value */ CMsgQuestObjectiveDef.ETF2GameModes = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "kGameCategory_Escort"] = 0; values[valuesById[1] = "kGameCategory_CTF"] = 1; values[valuesById[2] = "kGameCategory_AttackDefense"] = 2; @@ -3915,7 +4712,7 @@ * @property {number} TF_COND_GAS=131 TF_COND_GAS value */ CMsgQuestObjectiveDef.ETF2Conditions = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "TF_COND_AIMING"] = 0; values[valuesById[1] = "TF_COND_ZOOMED"] = 1; values[valuesById[2] = "TF_COND_DISGUISING"] = 2; @@ -4057,7 +4854,7 @@ * @property {number} TF_TEAM_BLUE=3 TF_TEAM_BLUE value */ CMsgQuestObjectiveDef.ETF2Team = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[2] = "TF_TEAM_RED"] = 2; values[valuesById[3] = "TF_TEAM_BLUE"] = 3; return values; @@ -4070,44 +4867,72 @@ /** * Properties of a CMsgQuestDef. - * @exports ICMsgQuestDef - * @interface ICMsgQuestDef - * @property {ICMsgProtoDefHeader} header CMsgQuestDef header + * @typedef {Object} CMsgQuestDef.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgQuestDef header * @property {number|null} [max_points_0] CMsgQuestDef max_points_0 * @property {number|null} [max_points_1] CMsgQuestDef max_points_1 * @property {number|null} [max_points_2] CMsgQuestDef max_points_2 * @property {string|null} [name_loctoken] CMsgQuestDef name_loctoken * @property {string|null} [operation] CMsgQuestDef operation - * @property {CMsgQuestDef.IMMCriteria|null} [mm_criteria] CMsgQuestDef mm_criteria + * @property {CMsgQuestDef.MMCriteria.$Properties|null} [mm_criteria] CMsgQuestDef mm_criteria * @property {string|null} [node_image] CMsgQuestDef node_image * @property {string|null} [icon_image] CMsgQuestDef icon_image - * @property {ICMsgProtoDefID|null} [theme] CMsgQuestDef theme + * @property {CMsgProtoDefID.$Properties|null} [theme] CMsgQuestDef theme * @property {Array.|null} [loaner_names] CMsgQuestDef loaner_names - * @property {Array.|null} [objectives] CMsgQuestDef objectives + * @property {Array.|null} [objectives] CMsgQuestDef objectives * @property {Array.|null} [map] CMsgQuestDef map + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgQuestDef. + * @exports ICMsgQuestDef + * @interface ICMsgQuestDef + * @augments CMsgQuestDef.$Properties + * @deprecated Use CMsgQuestDef.$Properties instead. + */ + + /** + * Shape of a CMsgQuestDef. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * max_points_0?: number|null; + * max_points_1?: number|null; + * max_points_2?: number|null; + * name_loctoken?: string|null; + * operation?: string|null; + * mm_criteria?: CMsgQuestDef.MMCriteria.$Shape|null; + * node_image?: string|null; + * icon_image?: string|null; + * theme?: CMsgProtoDefID.$Shape|null; + * loaner_names?: Array.|null; + * objectives?: Array.|null; + * map?: Array.|null; + * $unknowns?: Array.; + * }} CMsgQuestDef.$Shape */ /** * Constructs a new CMsgQuestDef. * @exports CMsgQuestDef * @classdesc Represents a CMsgQuestDef. - * @implements ICMsgQuestDef * @constructor - * @param {ICMsgQuestDef=} [properties] Properties to set + * @param {CMsgQuestDef.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgQuestDef(properties) { + var CMsgQuestDef = function (properties) { this.loaner_names = []; this.objectives = []; this.map = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgQuestDef header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgQuestDef * @instance */ @@ -4155,7 +4980,7 @@ /** * CMsgQuestDef mm_criteria. - * @member {CMsgQuestDef.IMMCriteria|null|undefined} mm_criteria + * @member {CMsgQuestDef.MMCriteria.$Properties|null|undefined} mm_criteria * @memberof CMsgQuestDef * @instance */ @@ -4179,7 +5004,7 @@ /** * CMsgQuestDef theme. - * @member {ICMsgProtoDefID|null|undefined} theme + * @member {CMsgProtoDefID.$Properties|null|undefined} theme * @memberof CMsgQuestDef * @instance */ @@ -4195,7 +5020,7 @@ /** * CMsgQuestDef objectives. - * @member {Array.} objectives + * @member {Array.} objectives * @memberof CMsgQuestDef * @instance */ @@ -4214,10 +5039,14 @@ * @function create * @memberof CMsgQuestDef * @static - * @param {ICMsgQuestDef=} [properties] Properties to set + * @param {CMsgQuestDef.$Properties=} [properties] Properties to set * @returns {CMsgQuestDef} CMsgQuestDef instance + * @type {{ + * (properties: CMsgQuestDef.$Shape): CMsgQuestDef & CMsgQuestDef.$Shape; + * (properties?: CMsgQuestDef.$Properties): CMsgQuestDef; + * }} */ - CMsgQuestDef.create = function create(properties) { + CMsgQuestDef.create = function(properties) { return new CMsgQuestDef(properties); }; @@ -4226,41 +5055,48 @@ * @function encode * @memberof CMsgQuestDef * @static - * @param {ICMsgQuestDef} message CMsgQuestDef message or plain object to encode + * @param {CMsgQuestDef.$Properties} message CMsgQuestDef message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestDef.encode = function encode(message, writer) { + CMsgQuestDef.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.max_points_0 != null && Object.hasOwnProperty.call(message, "max_points_0")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.max_points_0 != null && $Object.hasOwnProperty.call(message, "max_points_0")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.max_points_0); - if (message.max_points_1 != null && Object.hasOwnProperty.call(message, "max_points_1")) + if (message.max_points_1 != null && $Object.hasOwnProperty.call(message, "max_points_1")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.max_points_1); - if (message.max_points_2 != null && Object.hasOwnProperty.call(message, "max_points_2")) + if (message.max_points_2 != null && $Object.hasOwnProperty.call(message, "max_points_2")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.max_points_2); - if (message.name_loctoken != null && Object.hasOwnProperty.call(message, "name_loctoken")) + if (message.name_loctoken != null && $Object.hasOwnProperty.call(message, "name_loctoken")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.name_loctoken); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + if (message.operation != null && $Object.hasOwnProperty.call(message, "operation")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.operation); - if (message.mm_criteria != null && Object.hasOwnProperty.call(message, "mm_criteria")) - $root.CMsgQuestDef.MMCriteria.encode(message.mm_criteria, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.node_image != null && Object.hasOwnProperty.call(message, "node_image")) + if (message.mm_criteria != null && $Object.hasOwnProperty.call(message, "mm_criteria")) + $root.CMsgQuestDef.MMCriteria.encode(message.mm_criteria, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.node_image != null && $Object.hasOwnProperty.call(message, "node_image")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.node_image); - if (message.icon_image != null && Object.hasOwnProperty.call(message, "icon_image")) + if (message.icon_image != null && $Object.hasOwnProperty.call(message, "icon_image")) writer.uint32(/* id 13, wireType 2 =*/106).string(message.icon_image); - if (message.theme != null && Object.hasOwnProperty.call(message, "theme")) - $root.CMsgProtoDefID.encode(message.theme, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.theme != null && $Object.hasOwnProperty.call(message, "theme")) + $root.CMsgProtoDefID.encode(message.theme, writer.uint32(/* id 14, wireType 2 =*/114).fork(), _depth + 1).ldelim(); if (message.loaner_names != null && message.loaner_names.length) for (var i = 0; i < message.loaner_names.length; ++i) writer.uint32(/* id 15, wireType 2 =*/122).string(message.loaner_names[i]); if (message.objectives != null && message.objectives.length) for (var i = 0; i < message.objectives.length; ++i) - $root.CMsgQuestDef.ObjectiveInstance.encode(message.objectives[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + $root.CMsgQuestDef.ObjectiveInstance.encode(message.objectives[i], writer.uint32(/* id 16, wireType 2 =*/130).fork(), _depth + 1).ldelim(); if (message.map != null && message.map.length) for (var i = 0; i < message.map.length; ++i) writer.uint32(/* id 17, wireType 2 =*/138).string(message.map[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4269,12 +5105,12 @@ * @function encodeDelimited * @memberof CMsgQuestDef * @static - * @param {ICMsgQuestDef} message CMsgQuestDef message or plain object to encode + * @param {CMsgQuestDef.$Properties} message CMsgQuestDef message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestDef.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgQuestDef.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4284,68 +5120,121 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestDef} CMsgQuestDef + * @returns {CMsgQuestDef & CMsgQuestDef.$Shape} CMsgQuestDef * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestDef.decode = function decode(reader, length) { + CMsgQuestDef.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestDef(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestDef(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - case 2: - message.max_points_0 = reader.uint32(); - break; - case 3: - message.max_points_1 = reader.uint32(); - break; - case 4: - message.max_points_2 = reader.uint32(); - break; - case 5: - message.name_loctoken = reader.string(); - break; - case 7: - message.operation = reader.string(); - break; - case 8: - message.mm_criteria = $root.CMsgQuestDef.MMCriteria.decode(reader, reader.uint32()); - break; - case 12: - message.node_image = reader.string(); - break; - case 13: - message.icon_image = reader.string(); - break; - case 14: - message.theme = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - case 15: - if (!(message.loaner_names && message.loaner_names.length)) - message.loaner_names = []; - message.loaner_names.push(reader.string()); - break; - case 16: - if (!(message.objectives && message.objectives.length)) - message.objectives = []; - message.objectives.push($root.CMsgQuestDef.ObjectiveInstance.decode(reader, reader.uint32())); - break; - case 17: - if (!(message.map && message.map.length)) - message.map = []; - message.map.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.max_points_0 = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.max_points_1 = reader.uint32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.max_points_2 = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.name_loctoken = reader.string(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.operation = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.mm_criteria = $root.CMsgQuestDef.MMCriteria.decode(reader, reader.uint32(), $undefined, _depth + 1, message.mm_criteria); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.node_image = reader.string(); + continue; + } + case 13: { + if (wireType !== 2) + break; + message.icon_image = reader.string(); + continue; + } + case 14: { + if (wireType !== 2) + break; + message.theme = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.theme); + continue; + } + case 15: { + if (wireType !== 2) + break; + if (!(message.loaner_names && message.loaner_names.length)) + message.loaner_names = []; + message.loaner_names.push(reader.string()); + continue; + } + case 16: { + if (wireType !== 2) + break; + if (!(message.objectives && message.objectives.length)) + message.objectives = []; + message.objectives.push($root.CMsgQuestDef.ObjectiveInstance.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 17: { + if (wireType !== 2) + break; + if (!(message.map && message.map.length)) + message.map = []; + message.map.push(reader.string()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("header")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) throw $util.ProtocolError("missing required 'header'", { instance: message }); return message; }; @@ -4356,11 +5245,11 @@ * @memberof CMsgQuestDef * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestDef} CMsgQuestDef + * @returns {CMsgQuestDef & CMsgQuestDef.$Shape} CMsgQuestDef * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestDef.decodeDelimited = function decodeDelimited(reader) { + CMsgQuestDef.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4374,63 +5263,67 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgQuestDef.verify = function verify(message) { + CMsgQuestDef.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } - if (message.max_points_0 != null && message.hasOwnProperty("max_points_0")) + if (message.max_points_0 != null && $Object.hasOwnProperty.call(message, "max_points_0")) if (!$util.isInteger(message.max_points_0)) return "max_points_0: integer expected"; - if (message.max_points_1 != null && message.hasOwnProperty("max_points_1")) + if (message.max_points_1 != null && $Object.hasOwnProperty.call(message, "max_points_1")) if (!$util.isInteger(message.max_points_1)) return "max_points_1: integer expected"; - if (message.max_points_2 != null && message.hasOwnProperty("max_points_2")) + if (message.max_points_2 != null && $Object.hasOwnProperty.call(message, "max_points_2")) if (!$util.isInteger(message.max_points_2)) return "max_points_2: integer expected"; - if (message.name_loctoken != null && message.hasOwnProperty("name_loctoken")) + if (message.name_loctoken != null && $Object.hasOwnProperty.call(message, "name_loctoken")) if (!$util.isString(message.name_loctoken)) return "name_loctoken: string expected"; - if (message.operation != null && message.hasOwnProperty("operation")) + if (message.operation != null && $Object.hasOwnProperty.call(message, "operation")) if (!$util.isString(message.operation)) return "operation: string expected"; - if (message.mm_criteria != null && message.hasOwnProperty("mm_criteria")) { - var error = $root.CMsgQuestDef.MMCriteria.verify(message.mm_criteria); + if (message.mm_criteria != null && $Object.hasOwnProperty.call(message, "mm_criteria")) { + var error = $root.CMsgQuestDef.MMCriteria.verify(message.mm_criteria, _depth + 1); if (error) return "mm_criteria." + error; } - if (message.node_image != null && message.hasOwnProperty("node_image")) + if (message.node_image != null && $Object.hasOwnProperty.call(message, "node_image")) if (!$util.isString(message.node_image)) return "node_image: string expected"; - if (message.icon_image != null && message.hasOwnProperty("icon_image")) + if (message.icon_image != null && $Object.hasOwnProperty.call(message, "icon_image")) if (!$util.isString(message.icon_image)) return "icon_image: string expected"; - if (message.theme != null && message.hasOwnProperty("theme")) { - var error = $root.CMsgProtoDefID.verify(message.theme); + if (message.theme != null && $Object.hasOwnProperty.call(message, "theme")) { + var error = $root.CMsgProtoDefID.verify(message.theme, _depth + 1); if (error) return "theme." + error; } - if (message.loaner_names != null && message.hasOwnProperty("loaner_names")) { - if (!Array.isArray(message.loaner_names)) + if (message.loaner_names != null && $Object.hasOwnProperty.call(message, "loaner_names")) { + if (!$Array.isArray(message.loaner_names)) return "loaner_names: array expected"; for (var i = 0; i < message.loaner_names.length; ++i) if (!$util.isString(message.loaner_names[i])) return "loaner_names: string[] expected"; } - if (message.objectives != null && message.hasOwnProperty("objectives")) { - if (!Array.isArray(message.objectives)) + if (message.objectives != null && $Object.hasOwnProperty.call(message, "objectives")) { + if (!$Array.isArray(message.objectives)) return "objectives: array expected"; for (var i = 0; i < message.objectives.length; ++i) { - var error = $root.CMsgQuestDef.ObjectiveInstance.verify(message.objectives[i]); + var error = $root.CMsgQuestDef.ObjectiveInstance.verify(message.objectives[i], _depth + 1); if (error) return "objectives." + error; } } - if (message.map != null && message.hasOwnProperty("map")) { - if (!Array.isArray(message.map)) + if (message.map != null && $Object.hasOwnProperty.call(message, "map")) { + if (!$Array.isArray(message.map)) return "map: array expected"; for (var i = 0; i < message.map.length; ++i) if (!$util.isString(message.map[i])) @@ -4447,14 +5340,20 @@ * @param {Object.} object Plain object * @returns {CMsgQuestDef} CMsgQuestDef */ - CMsgQuestDef.fromObject = function fromObject(object) { + CMsgQuestDef.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestDef) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestDef: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestDef(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgQuestDef.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgQuestDef.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } if (object.max_points_0 != null) message.max_points_0 = object.max_points_0 >>> 0; @@ -4463,46 +5362,46 @@ if (object.max_points_2 != null) message.max_points_2 = object.max_points_2 >>> 0; if (object.name_loctoken != null) - message.name_loctoken = String(object.name_loctoken); + message.name_loctoken = $String(object.name_loctoken); if (object.operation != null) - message.operation = String(object.operation); + message.operation = $String(object.operation); if (object.mm_criteria != null) { - if (typeof object.mm_criteria !== "object") - throw TypeError(".CMsgQuestDef.mm_criteria: object expected"); - message.mm_criteria = $root.CMsgQuestDef.MMCriteria.fromObject(object.mm_criteria); + if (!$util.isObject(object.mm_criteria)) + throw $TypeError(".CMsgQuestDef.mm_criteria: object expected"); + message.mm_criteria = $root.CMsgQuestDef.MMCriteria.fromObject(object.mm_criteria, _depth + 1); } if (object.node_image != null) - message.node_image = String(object.node_image); + message.node_image = $String(object.node_image); if (object.icon_image != null) - message.icon_image = String(object.icon_image); + message.icon_image = $String(object.icon_image); if (object.theme != null) { - if (typeof object.theme !== "object") - throw TypeError(".CMsgQuestDef.theme: object expected"); - message.theme = $root.CMsgProtoDefID.fromObject(object.theme); + if (!$util.isObject(object.theme)) + throw $TypeError(".CMsgQuestDef.theme: object expected"); + message.theme = $root.CMsgProtoDefID.fromObject(object.theme, _depth + 1); } if (object.loaner_names) { - if (!Array.isArray(object.loaner_names)) - throw TypeError(".CMsgQuestDef.loaner_names: array expected"); - message.loaner_names = []; + if (!$Array.isArray(object.loaner_names)) + throw $TypeError(".CMsgQuestDef.loaner_names: array expected"); + message.loaner_names = $Array(object.loaner_names.length); for (var i = 0; i < object.loaner_names.length; ++i) - message.loaner_names[i] = String(object.loaner_names[i]); + message.loaner_names[i] = $String(object.loaner_names[i]); } if (object.objectives) { - if (!Array.isArray(object.objectives)) - throw TypeError(".CMsgQuestDef.objectives: array expected"); - message.objectives = []; + if (!$Array.isArray(object.objectives)) + throw $TypeError(".CMsgQuestDef.objectives: array expected"); + message.objectives = $Array(object.objectives.length); for (var i = 0; i < object.objectives.length; ++i) { - if (typeof object.objectives[i] !== "object") - throw TypeError(".CMsgQuestDef.objectives: object expected"); - message.objectives[i] = $root.CMsgQuestDef.ObjectiveInstance.fromObject(object.objectives[i]); + if (!$util.isObject(object.objectives[i])) + throw $TypeError(".CMsgQuestDef.objectives: object expected"); + message.objectives[i] = $root.CMsgQuestDef.ObjectiveInstance.fromObject(object.objectives[i], _depth + 1); } } if (object.map) { - if (!Array.isArray(object.map)) - throw TypeError(".CMsgQuestDef.map: array expected"); - message.map = []; + if (!$Array.isArray(object.map)) + throw $TypeError(".CMsgQuestDef.map: array expected"); + message.map = $Array(object.map.length); for (var i = 0; i < object.map.length; ++i) - message.map[i] = String(object.map[i]); + message.map[i] = $String(object.map[i]); } return message; }; @@ -4516,9 +5415,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgQuestDef.toObject = function toObject(message, options) { + CMsgQuestDef.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.loaner_names = []; @@ -4537,38 +5440,38 @@ object.icon_image = ""; object.theme = null; } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); - if (message.max_points_0 != null && message.hasOwnProperty("max_points_0")) + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); + if (message.max_points_0 != null && $Object.hasOwnProperty.call(message, "max_points_0")) object.max_points_0 = message.max_points_0; - if (message.max_points_1 != null && message.hasOwnProperty("max_points_1")) + if (message.max_points_1 != null && $Object.hasOwnProperty.call(message, "max_points_1")) object.max_points_1 = message.max_points_1; - if (message.max_points_2 != null && message.hasOwnProperty("max_points_2")) + if (message.max_points_2 != null && $Object.hasOwnProperty.call(message, "max_points_2")) object.max_points_2 = message.max_points_2; - if (message.name_loctoken != null && message.hasOwnProperty("name_loctoken")) + if (message.name_loctoken != null && $Object.hasOwnProperty.call(message, "name_loctoken")) object.name_loctoken = message.name_loctoken; - if (message.operation != null && message.hasOwnProperty("operation")) + if (message.operation != null && $Object.hasOwnProperty.call(message, "operation")) object.operation = message.operation; - if (message.mm_criteria != null && message.hasOwnProperty("mm_criteria")) - object.mm_criteria = $root.CMsgQuestDef.MMCriteria.toObject(message.mm_criteria, options); - if (message.node_image != null && message.hasOwnProperty("node_image")) + if (message.mm_criteria != null && $Object.hasOwnProperty.call(message, "mm_criteria")) + object.mm_criteria = $root.CMsgQuestDef.MMCriteria.toObject(message.mm_criteria, options, _depth + 1); + if (message.node_image != null && $Object.hasOwnProperty.call(message, "node_image")) object.node_image = message.node_image; - if (message.icon_image != null && message.hasOwnProperty("icon_image")) + if (message.icon_image != null && $Object.hasOwnProperty.call(message, "icon_image")) object.icon_image = message.icon_image; - if (message.theme != null && message.hasOwnProperty("theme")) - object.theme = $root.CMsgProtoDefID.toObject(message.theme, options); + if (message.theme != null && $Object.hasOwnProperty.call(message, "theme")) + object.theme = $root.CMsgProtoDefID.toObject(message.theme, options, _depth + 1); if (message.loaner_names && message.loaner_names.length) { - object.loaner_names = []; + object.loaner_names = $Array(message.loaner_names.length); for (var j = 0; j < message.loaner_names.length; ++j) object.loaner_names[j] = message.loaner_names[j]; } if (message.objectives && message.objectives.length) { - object.objectives = []; + object.objectives = $Array(message.objectives.length); for (var j = 0; j < message.objectives.length; ++j) - object.objectives[j] = $root.CMsgQuestDef.ObjectiveInstance.toObject(message.objectives[j], options); + object.objectives[j] = $root.CMsgQuestDef.ObjectiveInstance.toObject(message.objectives[j], options, _depth + 1); } if (message.map && message.map.length) { - object.map = []; + object.map = $Array(message.map.length); for (var j = 0; j < message.map.length; ++j) object.map[j] = message.map[j]; } @@ -4582,35 +5485,62 @@ * @instance * @returns {Object.} JSON object */ - CMsgQuestDef.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgQuestDef.prototype.toJSON = function() { + return CMsgQuestDef.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgQuestDef + * @function getTypeUrl + * @memberof CMsgQuestDef + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgQuestDef.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestDef"; }; CMsgQuestDef.MMCriteria = (function() { /** * Properties of a MMCriteria. - * @memberof CMsgQuestDef - * @interface IMMCriteria + * @typedef {Object} CMsgQuestDef.MMCriteria.$Properties * @property {string|null} [group_name] MMCriteria group_name * @property {string|null} [category_name] MMCriteria category_name * @property {string|null} [map_name] MMCriteria map_name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MMCriteria. + * @memberof CMsgQuestDef + * @interface IMMCriteria + * @augments CMsgQuestDef.MMCriteria.$Properties + * @deprecated Use CMsgQuestDef.MMCriteria.$Properties instead. + */ + + /** + * Shape of a MMCriteria. + * @typedef {CMsgQuestDef.MMCriteria.$Properties} CMsgQuestDef.MMCriteria.$Shape */ /** * Constructs a new MMCriteria. * @memberof CMsgQuestDef * @classdesc Represents a MMCriteria. - * @implements IMMCriteria * @constructor - * @param {CMsgQuestDef.IMMCriteria=} [properties] Properties to set + * @param {CMsgQuestDef.MMCriteria.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MMCriteria(properties) { + var MMCriteria = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MMCriteria group_name. @@ -4641,10 +5571,14 @@ * @function create * @memberof CMsgQuestDef.MMCriteria * @static - * @param {CMsgQuestDef.IMMCriteria=} [properties] Properties to set + * @param {CMsgQuestDef.MMCriteria.$Properties=} [properties] Properties to set * @returns {CMsgQuestDef.MMCriteria} MMCriteria instance + * @type {{ + * (properties: CMsgQuestDef.MMCriteria.$Shape): CMsgQuestDef.MMCriteria & CMsgQuestDef.MMCriteria.$Shape; + * (properties?: CMsgQuestDef.MMCriteria.$Properties): CMsgQuestDef.MMCriteria; + * }} */ - MMCriteria.create = function create(properties) { + MMCriteria.create = function(properties) { return new MMCriteria(properties); }; @@ -4653,19 +5587,26 @@ * @function encode * @memberof CMsgQuestDef.MMCriteria * @static - * @param {CMsgQuestDef.IMMCriteria} message MMCriteria message or plain object to encode + * @param {CMsgQuestDef.MMCriteria.$Properties} message MMCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MMCriteria.encode = function encode(message, writer) { + MMCriteria.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.group_name != null && Object.hasOwnProperty.call(message, "group_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.group_name != null && $Object.hasOwnProperty.call(message, "group_name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.group_name); - if (message.category_name != null && Object.hasOwnProperty.call(message, "category_name")) + if (message.category_name != null && $Object.hasOwnProperty.call(message, "category_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.category_name); - if (message.map_name != null && Object.hasOwnProperty.call(message, "map_name")) + if (message.map_name != null && $Object.hasOwnProperty.call(message, "map_name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.map_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4674,12 +5615,12 @@ * @function encodeDelimited * @memberof CMsgQuestDef.MMCriteria * @static - * @param {CMsgQuestDef.IMMCriteria} message MMCriteria message or plain object to encode + * @param {CMsgQuestDef.MMCriteria.$Properties} message MMCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MMCriteria.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MMCriteria.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4689,31 +5630,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestDef.MMCriteria} MMCriteria + * @returns {CMsgQuestDef.MMCriteria & CMsgQuestDef.MMCriteria.$Shape} MMCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MMCriteria.decode = function decode(reader, length) { + MMCriteria.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestDef.MMCriteria(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestDef.MMCriteria(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.group_name = reader.string(); - break; - case 2: - message.category_name = reader.string(); - break; - case 3: - message.map_name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.group_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.category_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.map_name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4723,11 +5687,11 @@ * @memberof CMsgQuestDef.MMCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestDef.MMCriteria} MMCriteria + * @returns {CMsgQuestDef.MMCriteria & CMsgQuestDef.MMCriteria.$Shape} MMCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MMCriteria.decodeDelimited = function decodeDelimited(reader) { + MMCriteria.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4741,16 +5705,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MMCriteria.verify = function verify(message) { + MMCriteria.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.group_name != null && message.hasOwnProperty("group_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.group_name != null && $Object.hasOwnProperty.call(message, "group_name")) if (!$util.isString(message.group_name)) return "group_name: string expected"; - if (message.category_name != null && message.hasOwnProperty("category_name")) + if (message.category_name != null && $Object.hasOwnProperty.call(message, "category_name")) if (!$util.isString(message.category_name)) return "category_name: string expected"; - if (message.map_name != null && message.hasOwnProperty("map_name")) + if (message.map_name != null && $Object.hasOwnProperty.call(message, "map_name")) if (!$util.isString(message.map_name)) return "map_name: string expected"; return null; @@ -4764,16 +5732,22 @@ * @param {Object.} object Plain object * @returns {CMsgQuestDef.MMCriteria} MMCriteria */ - MMCriteria.fromObject = function fromObject(object) { + MMCriteria.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestDef.MMCriteria) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestDef.MMCriteria: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestDef.MMCriteria(); if (object.group_name != null) - message.group_name = String(object.group_name); + message.group_name = $String(object.group_name); if (object.category_name != null) - message.category_name = String(object.category_name); + message.category_name = $String(object.category_name); if (object.map_name != null) - message.map_name = String(object.map_name); + message.map_name = $String(object.map_name); return message; }; @@ -4786,20 +5760,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MMCriteria.toObject = function toObject(message, options) { + MMCriteria.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.group_name = ""; object.category_name = ""; object.map_name = ""; } - if (message.group_name != null && message.hasOwnProperty("group_name")) + if (message.group_name != null && $Object.hasOwnProperty.call(message, "group_name")) object.group_name = message.group_name; - if (message.category_name != null && message.hasOwnProperty("category_name")) + if (message.category_name != null && $Object.hasOwnProperty.call(message, "category_name")) object.category_name = message.category_name; - if (message.map_name != null && message.hasOwnProperty("map_name")) + if (message.map_name != null && $Object.hasOwnProperty.call(message, "map_name")) object.map_name = message.map_name; return object; }; @@ -4811,8 +5789,22 @@ * @instance * @returns {Object.} JSON object */ - MMCriteria.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MMCriteria.prototype.toJSON = function() { + return MMCriteria.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MMCriteria + * @function getTypeUrl + * @memberof CMsgQuestDef.MMCriteria + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MMCriteria.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestDef.MMCriteria"; }; return MMCriteria; @@ -4822,31 +5814,49 @@ /** * Properties of an ObjectiveInstance. - * @memberof CMsgQuestDef - * @interface IObjectiveInstance - * @property {ICMsgProtoDefID|null} [objective] ObjectiveInstance objective + * @typedef {Object} CMsgQuestDef.ObjectiveInstance.$Properties + * @property {CMsgProtoDefID.$Properties|null} [objective] ObjectiveInstance objective * @property {EQuestPoints|null} [point_type] ObjectiveInstance point_type * @property {number|null} [point_value] ObjectiveInstance point_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ /** - * Constructs a new ObjectiveInstance. + * Properties of an ObjectiveInstance. * @memberof CMsgQuestDef - * @classdesc Represents an ObjectiveInstance. - * @implements IObjectiveInstance - * @constructor - * @param {CMsgQuestDef.IObjectiveInstance=} [properties] Properties to set + * @interface IObjectiveInstance + * @augments CMsgQuestDef.ObjectiveInstance.$Properties + * @deprecated Use CMsgQuestDef.ObjectiveInstance.$Properties instead. + */ + + /** + * Shape of an ObjectiveInstance. + * @typedef {{ + * objective?: CMsgProtoDefID.$Shape|null; + * point_type?: EQuestPoints|null; + * point_value?: number|null; + * $unknowns?: Array.; + * }} CMsgQuestDef.ObjectiveInstance.$Shape + */ + + /** + * Constructs a new ObjectiveInstance. + * @memberof CMsgQuestDef + * @classdesc Represents an ObjectiveInstance. + * @constructor + * @param {CMsgQuestDef.ObjectiveInstance.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ObjectiveInstance(properties) { + var ObjectiveInstance = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ObjectiveInstance objective. - * @member {ICMsgProtoDefID|null|undefined} objective + * @member {CMsgProtoDefID.$Properties|null|undefined} objective * @memberof CMsgQuestDef.ObjectiveInstance * @instance */ @@ -4873,10 +5883,14 @@ * @function create * @memberof CMsgQuestDef.ObjectiveInstance * @static - * @param {CMsgQuestDef.IObjectiveInstance=} [properties] Properties to set + * @param {CMsgQuestDef.ObjectiveInstance.$Properties=} [properties] Properties to set * @returns {CMsgQuestDef.ObjectiveInstance} ObjectiveInstance instance + * @type {{ + * (properties: CMsgQuestDef.ObjectiveInstance.$Shape): CMsgQuestDef.ObjectiveInstance & CMsgQuestDef.ObjectiveInstance.$Shape; + * (properties?: CMsgQuestDef.ObjectiveInstance.$Properties): CMsgQuestDef.ObjectiveInstance; + * }} */ - ObjectiveInstance.create = function create(properties) { + ObjectiveInstance.create = function(properties) { return new ObjectiveInstance(properties); }; @@ -4885,19 +5899,26 @@ * @function encode * @memberof CMsgQuestDef.ObjectiveInstance * @static - * @param {CMsgQuestDef.IObjectiveInstance} message ObjectiveInstance message or plain object to encode + * @param {CMsgQuestDef.ObjectiveInstance.$Properties} message ObjectiveInstance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectiveInstance.encode = function encode(message, writer) { + ObjectiveInstance.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.objective != null && Object.hasOwnProperty.call(message, "objective")) - $root.CMsgProtoDefID.encode(message.objective, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.point_type != null && Object.hasOwnProperty.call(message, "point_type")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.objective != null && $Object.hasOwnProperty.call(message, "objective")) + $root.CMsgProtoDefID.encode(message.objective, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.point_type != null && $Object.hasOwnProperty.call(message, "point_type")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.point_type); - if (message.point_value != null && Object.hasOwnProperty.call(message, "point_value")) + if (message.point_value != null && $Object.hasOwnProperty.call(message, "point_value")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.point_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -4906,12 +5927,12 @@ * @function encodeDelimited * @memberof CMsgQuestDef.ObjectiveInstance * @static - * @param {CMsgQuestDef.IObjectiveInstance} message ObjectiveInstance message or plain object to encode + * @param {CMsgQuestDef.ObjectiveInstance.$Properties} message ObjectiveInstance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectiveInstance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ObjectiveInstance.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -4921,31 +5942,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestDef.ObjectiveInstance} ObjectiveInstance + * @returns {CMsgQuestDef.ObjectiveInstance & CMsgQuestDef.ObjectiveInstance.$Shape} ObjectiveInstance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectiveInstance.decode = function decode(reader, length) { + ObjectiveInstance.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestDef.ObjectiveInstance(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestDef.ObjectiveInstance(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.objective = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - case 2: - message.point_type = reader.int32(); - break; - case 3: - message.point_value = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.objective = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.objective); + continue; + } + case 2: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.EQuestPoints[value] !== $undefined) + message.point_type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 3: { + if (wireType !== 0) + break; + message.point_value = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -4955,11 +6005,11 @@ * @memberof CMsgQuestDef.ObjectiveInstance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestDef.ObjectiveInstance} ObjectiveInstance + * @returns {CMsgQuestDef.ObjectiveInstance & CMsgQuestDef.ObjectiveInstance.$Shape} ObjectiveInstance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectiveInstance.decodeDelimited = function decodeDelimited(reader) { + ObjectiveInstance.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -4973,15 +6023,19 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ObjectiveInstance.verify = function verify(message) { + ObjectiveInstance.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.objective != null && message.hasOwnProperty("objective")) { - var error = $root.CMsgProtoDefID.verify(message.objective); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.objective != null && $Object.hasOwnProperty.call(message, "objective")) { + var error = $root.CMsgProtoDefID.verify(message.objective, _depth + 1); if (error) return "objective." + error; } - if (message.point_type != null && message.hasOwnProperty("point_type")) + if (message.point_type != null && $Object.hasOwnProperty.call(message, "point_type")) switch (message.point_type) { default: return "point_type: enum value expected"; @@ -4990,7 +6044,7 @@ case 2: break; } - if (message.point_value != null && message.hasOwnProperty("point_value")) + if (message.point_value != null && $Object.hasOwnProperty.call(message, "point_value")) if (!$util.isInteger(message.point_value)) return "point_value: integer expected"; return null; @@ -5004,14 +6058,20 @@ * @param {Object.} object Plain object * @returns {CMsgQuestDef.ObjectiveInstance} ObjectiveInstance */ - ObjectiveInstance.fromObject = function fromObject(object) { + ObjectiveInstance.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestDef.ObjectiveInstance) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestDef.ObjectiveInstance: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestDef.ObjectiveInstance(); if (object.objective != null) { - if (typeof object.objective !== "object") - throw TypeError(".CMsgQuestDef.ObjectiveInstance.objective: object expected"); - message.objective = $root.CMsgProtoDefID.fromObject(object.objective); + if (!$util.isObject(object.objective)) + throw $TypeError(".CMsgQuestDef.ObjectiveInstance.objective: object expected"); + message.objective = $root.CMsgProtoDefID.fromObject(object.objective, _depth + 1); } switch (object.point_type) { case "QUEST_POINTS_NOVICE": @@ -5026,6 +6086,7 @@ case 2: message.point_type = 2; break; + default: } if (object.point_value != null) message.point_value = object.point_value >>> 0; @@ -5041,20 +6102,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ObjectiveInstance.toObject = function toObject(message, options) { + ObjectiveInstance.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.objective = null; - object.point_type = options.enums === String ? "QUEST_POINTS_NOVICE" : 0; + object.point_type = options.enums === $String ? "QUEST_POINTS_NOVICE" : 0; object.point_value = 0; } - if (message.objective != null && message.hasOwnProperty("objective")) - object.objective = $root.CMsgProtoDefID.toObject(message.objective, options); - if (message.point_type != null && message.hasOwnProperty("point_type")) - object.point_type = options.enums === String ? $root.EQuestPoints[message.point_type] : message.point_type; - if (message.point_value != null && message.hasOwnProperty("point_value")) + if (message.objective != null && $Object.hasOwnProperty.call(message, "objective")) + object.objective = $root.CMsgProtoDefID.toObject(message.objective, options, _depth + 1); + if (message.point_type != null && $Object.hasOwnProperty.call(message, "point_type")) + object.point_type = options.enums === $String ? $root.EQuestPoints[message.point_type] === $undefined ? message.point_type : $root.EQuestPoints[message.point_type] : message.point_type; + if (message.point_value != null && $Object.hasOwnProperty.call(message, "point_value")) object.point_value = message.point_value; return object; }; @@ -5066,8 +6131,22 @@ * @instance * @returns {Object.} JSON object */ - ObjectiveInstance.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ObjectiveInstance.prototype.toJSON = function() { + return ObjectiveInstance.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ObjectiveInstance + * @function getTypeUrl + * @memberof CMsgQuestDef.ObjectiveInstance + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ObjectiveInstance.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestDef.ObjectiveInstance"; }; return ObjectiveInstance; @@ -5080,34 +6159,55 @@ /** * Properties of a CMsgQuestMapStoreItem. - * @exports ICMsgQuestMapStoreItem - * @interface ICMsgQuestMapStoreItem - * @property {ICMsgProtoDefHeader} header CMsgQuestMapStoreItem header + * @typedef {Object} CMsgQuestMapStoreItem.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgQuestMapStoreItem header * @property {string|null} [item_name] CMsgQuestMapStoreItem item_name * @property {string|null} [reward_lootlist_name] CMsgQuestMapStoreItem reward_lootlist_name - * @property {ICMsgVarField|null} [price] CMsgQuestMapStoreItem price + * @property {CMsgVarField.$Properties|null} [price] CMsgQuestMapStoreItem price * @property {number|null} [purchase_limit] CMsgQuestMapStoreItem purchase_limit * @property {number|null} [sort_group] CMsgQuestMapStoreItem sort_group + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgQuestMapStoreItem. + * @exports ICMsgQuestMapStoreItem + * @interface ICMsgQuestMapStoreItem + * @augments CMsgQuestMapStoreItem.$Properties + * @deprecated Use CMsgQuestMapStoreItem.$Properties instead. + */ + + /** + * Shape of a CMsgQuestMapStoreItem. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * item_name?: string|null; + * reward_lootlist_name?: string|null; + * price?: CMsgVarField.$Shape|null; + * purchase_limit?: number|null; + * sort_group?: number|null; + * $unknowns?: Array.; + * }} CMsgQuestMapStoreItem.$Shape */ /** * Constructs a new CMsgQuestMapStoreItem. * @exports CMsgQuestMapStoreItem * @classdesc Represents a CMsgQuestMapStoreItem. - * @implements ICMsgQuestMapStoreItem * @constructor - * @param {ICMsgQuestMapStoreItem=} [properties] Properties to set + * @param {CMsgQuestMapStoreItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgQuestMapStoreItem(properties) { + var CMsgQuestMapStoreItem = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgQuestMapStoreItem header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgQuestMapStoreItem * @instance */ @@ -5131,7 +6231,7 @@ /** * CMsgQuestMapStoreItem price. - * @member {ICMsgVarField|null|undefined} price + * @member {CMsgVarField.$Properties|null|undefined} price * @memberof CMsgQuestMapStoreItem * @instance */ @@ -5158,10 +6258,14 @@ * @function create * @memberof CMsgQuestMapStoreItem * @static - * @param {ICMsgQuestMapStoreItem=} [properties] Properties to set + * @param {CMsgQuestMapStoreItem.$Properties=} [properties] Properties to set * @returns {CMsgQuestMapStoreItem} CMsgQuestMapStoreItem instance + * @type {{ + * (properties: CMsgQuestMapStoreItem.$Shape): CMsgQuestMapStoreItem & CMsgQuestMapStoreItem.$Shape; + * (properties?: CMsgQuestMapStoreItem.$Properties): CMsgQuestMapStoreItem; + * }} */ - CMsgQuestMapStoreItem.create = function create(properties) { + CMsgQuestMapStoreItem.create = function(properties) { return new CMsgQuestMapStoreItem(properties); }; @@ -5170,24 +6274,31 @@ * @function encode * @memberof CMsgQuestMapStoreItem * @static - * @param {ICMsgQuestMapStoreItem} message CMsgQuestMapStoreItem message or plain object to encode + * @param {CMsgQuestMapStoreItem.$Properties} message CMsgQuestMapStoreItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapStoreItem.encode = function encode(message, writer) { + CMsgQuestMapStoreItem.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.item_name != null && Object.hasOwnProperty.call(message, "item_name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.item_name != null && $Object.hasOwnProperty.call(message, "item_name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.item_name); - if (message.price != null && Object.hasOwnProperty.call(message, "price")) - $root.CMsgVarField.encode(message.price, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.purchase_limit != null && Object.hasOwnProperty.call(message, "purchase_limit")) + if (message.price != null && $Object.hasOwnProperty.call(message, "price")) + $root.CMsgVarField.encode(message.price, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.purchase_limit != null && $Object.hasOwnProperty.call(message, "purchase_limit")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.purchase_limit); - if (message.sort_group != null && Object.hasOwnProperty.call(message, "sort_group")) + if (message.sort_group != null && $Object.hasOwnProperty.call(message, "sort_group")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.sort_group); - if (message.reward_lootlist_name != null && Object.hasOwnProperty.call(message, "reward_lootlist_name")) + if (message.reward_lootlist_name != null && $Object.hasOwnProperty.call(message, "reward_lootlist_name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.reward_lootlist_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5196,12 +6307,12 @@ * @function encodeDelimited * @memberof CMsgQuestMapStoreItem * @static - * @param {ICMsgQuestMapStoreItem} message CMsgQuestMapStoreItem message or plain object to encode + * @param {CMsgQuestMapStoreItem.$Properties} message CMsgQuestMapStoreItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapStoreItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgQuestMapStoreItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5211,41 +6322,73 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestMapStoreItem} CMsgQuestMapStoreItem + * @returns {CMsgQuestMapStoreItem & CMsgQuestMapStoreItem.$Shape} CMsgQuestMapStoreItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapStoreItem.decode = function decode(reader, length) { + CMsgQuestMapStoreItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestMapStoreItem(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestMapStoreItem(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - case 2: - message.item_name = reader.string(); - break; - case 6: - message.reward_lootlist_name = reader.string(); - break; - case 3: - message.price = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 4: - message.purchase_limit = reader.uint32(); - break; - case 5: - message.sort_group = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.item_name = reader.string(); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.reward_lootlist_name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.price = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.price); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.purchase_limit = reader.uint32(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.sort_group = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("header")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) throw $util.ProtocolError("missing required 'header'", { instance: message }); return message; }; @@ -5256,11 +6399,11 @@ * @memberof CMsgQuestMapStoreItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestMapStoreItem} CMsgQuestMapStoreItem + * @returns {CMsgQuestMapStoreItem & CMsgQuestMapStoreItem.$Shape} CMsgQuestMapStoreItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapStoreItem.decodeDelimited = function decodeDelimited(reader) { + CMsgQuestMapStoreItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5274,29 +6417,33 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgQuestMapStoreItem.verify = function verify(message) { + CMsgQuestMapStoreItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } - if (message.item_name != null && message.hasOwnProperty("item_name")) + if (message.item_name != null && $Object.hasOwnProperty.call(message, "item_name")) if (!$util.isString(message.item_name)) return "item_name: string expected"; - if (message.reward_lootlist_name != null && message.hasOwnProperty("reward_lootlist_name")) + if (message.reward_lootlist_name != null && $Object.hasOwnProperty.call(message, "reward_lootlist_name")) if (!$util.isString(message.reward_lootlist_name)) return "reward_lootlist_name: string expected"; - if (message.price != null && message.hasOwnProperty("price")) { - var error = $root.CMsgVarField.verify(message.price); + if (message.price != null && $Object.hasOwnProperty.call(message, "price")) { + var error = $root.CMsgVarField.verify(message.price, _depth + 1); if (error) return "price." + error; } - if (message.purchase_limit != null && message.hasOwnProperty("purchase_limit")) + if (message.purchase_limit != null && $Object.hasOwnProperty.call(message, "purchase_limit")) if (!$util.isInteger(message.purchase_limit)) return "purchase_limit: integer expected"; - if (message.sort_group != null && message.hasOwnProperty("sort_group")) + if (message.sort_group != null && $Object.hasOwnProperty.call(message, "sort_group")) if (!$util.isInteger(message.sort_group)) return "sort_group: integer expected"; return null; @@ -5310,23 +6457,29 @@ * @param {Object.} object Plain object * @returns {CMsgQuestMapStoreItem} CMsgQuestMapStoreItem */ - CMsgQuestMapStoreItem.fromObject = function fromObject(object) { + CMsgQuestMapStoreItem.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestMapStoreItem) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestMapStoreItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestMapStoreItem(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgQuestMapStoreItem.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgQuestMapStoreItem.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } if (object.item_name != null) - message.item_name = String(object.item_name); + message.item_name = $String(object.item_name); if (object.reward_lootlist_name != null) - message.reward_lootlist_name = String(object.reward_lootlist_name); + message.reward_lootlist_name = $String(object.reward_lootlist_name); if (object.price != null) { - if (typeof object.price !== "object") - throw TypeError(".CMsgQuestMapStoreItem.price: object expected"); - message.price = $root.CMsgVarField.fromObject(object.price); + if (!$util.isObject(object.price)) + throw $TypeError(".CMsgQuestMapStoreItem.price: object expected"); + message.price = $root.CMsgVarField.fromObject(object.price, _depth + 1); } if (object.purchase_limit != null) message.purchase_limit = object.purchase_limit >>> 0; @@ -5344,9 +6497,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgQuestMapStoreItem.toObject = function toObject(message, options) { + CMsgQuestMapStoreItem.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.header = null; @@ -5356,17 +6513,17 @@ object.sort_group = 0; object.reward_lootlist_name = ""; } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); - if (message.item_name != null && message.hasOwnProperty("item_name")) + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); + if (message.item_name != null && $Object.hasOwnProperty.call(message, "item_name")) object.item_name = message.item_name; - if (message.price != null && message.hasOwnProperty("price")) - object.price = $root.CMsgVarField.toObject(message.price, options); - if (message.purchase_limit != null && message.hasOwnProperty("purchase_limit")) + if (message.price != null && $Object.hasOwnProperty.call(message, "price")) + object.price = $root.CMsgVarField.toObject(message.price, options, _depth + 1); + if (message.purchase_limit != null && $Object.hasOwnProperty.call(message, "purchase_limit")) object.purchase_limit = message.purchase_limit; - if (message.sort_group != null && message.hasOwnProperty("sort_group")) + if (message.sort_group != null && $Object.hasOwnProperty.call(message, "sort_group")) object.sort_group = message.sort_group; - if (message.reward_lootlist_name != null && message.hasOwnProperty("reward_lootlist_name")) + if (message.reward_lootlist_name != null && $Object.hasOwnProperty.call(message, "reward_lootlist_name")) object.reward_lootlist_name = message.reward_lootlist_name; return object; }; @@ -5378,8 +6535,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgQuestMapStoreItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgQuestMapStoreItem.prototype.toJSON = function() { + return CMsgQuestMapStoreItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgQuestMapStoreItem + * @function getTypeUrl + * @memberof CMsgQuestMapStoreItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgQuestMapStoreItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestMapStoreItem"; }; return CMsgQuestMapStoreItem; @@ -5389,37 +6560,60 @@ /** * Properties of a CMsgQuestMapRegionDef. - * @exports ICMsgQuestMapRegionDef - * @interface ICMsgQuestMapRegionDef - * @property {ICMsgProtoDefHeader} header CMsgQuestMapRegionDef header + * @typedef {Object} CMsgQuestMapRegionDef.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgQuestMapRegionDef header * @property {string|null} [name] CMsgQuestMapRegionDef name * @property {string|null} [resfile] CMsgQuestMapRegionDef resfile - * @property {Array.|null} [links] CMsgQuestMapRegionDef links - * @property {ICMsgProtoDefID|null} [return_link] CMsgQuestMapRegionDef return_link + * @property {Array.|null} [links] CMsgQuestMapRegionDef links + * @property {CMsgProtoDefID.$Properties|null} [return_link] CMsgQuestMapRegionDef return_link * @property {number|null} [radio_freq] CMsgQuestMapRegionDef radio_freq * @property {number|null} [zoom_scale] CMsgQuestMapRegionDef zoom_scale - * @property {ICMsgProtoDefID|null} [star_type] CMsgQuestMapRegionDef star_type + * @property {CMsgProtoDefID.$Properties|null} [star_type] CMsgQuestMapRegionDef star_type + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgQuestMapRegionDef. + * @exports ICMsgQuestMapRegionDef + * @interface ICMsgQuestMapRegionDef + * @augments CMsgQuestMapRegionDef.$Properties + * @deprecated Use CMsgQuestMapRegionDef.$Properties instead. + */ + + /** + * Shape of a CMsgQuestMapRegionDef. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * name?: string|null; + * resfile?: string|null; + * links?: Array.|null; + * return_link?: CMsgProtoDefID.$Shape|null; + * radio_freq?: number|null; + * zoom_scale?: number|null; + * star_type?: CMsgProtoDefID.$Shape|null; + * $unknowns?: Array.; + * }} CMsgQuestMapRegionDef.$Shape */ /** * Constructs a new CMsgQuestMapRegionDef. * @exports CMsgQuestMapRegionDef * @classdesc Represents a CMsgQuestMapRegionDef. - * @implements ICMsgQuestMapRegionDef * @constructor - * @param {ICMsgQuestMapRegionDef=} [properties] Properties to set + * @param {CMsgQuestMapRegionDef.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgQuestMapRegionDef(properties) { + var CMsgQuestMapRegionDef = function (properties) { this.links = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgQuestMapRegionDef header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgQuestMapRegionDef * @instance */ @@ -5443,7 +6637,7 @@ /** * CMsgQuestMapRegionDef links. - * @member {Array.} links + * @member {Array.} links * @memberof CMsgQuestMapRegionDef * @instance */ @@ -5451,7 +6645,7 @@ /** * CMsgQuestMapRegionDef return_link. - * @member {ICMsgProtoDefID|null|undefined} return_link + * @member {CMsgProtoDefID.$Properties|null|undefined} return_link * @memberof CMsgQuestMapRegionDef * @instance */ @@ -5475,7 +6669,7 @@ /** * CMsgQuestMapRegionDef star_type. - * @member {ICMsgProtoDefID|null|undefined} star_type + * @member {CMsgProtoDefID.$Properties|null|undefined} star_type * @memberof CMsgQuestMapRegionDef * @instance */ @@ -5486,10 +6680,14 @@ * @function create * @memberof CMsgQuestMapRegionDef * @static - * @param {ICMsgQuestMapRegionDef=} [properties] Properties to set + * @param {CMsgQuestMapRegionDef.$Properties=} [properties] Properties to set * @returns {CMsgQuestMapRegionDef} CMsgQuestMapRegionDef instance + * @type {{ + * (properties: CMsgQuestMapRegionDef.$Shape): CMsgQuestMapRegionDef & CMsgQuestMapRegionDef.$Shape; + * (properties?: CMsgQuestMapRegionDef.$Properties): CMsgQuestMapRegionDef; + * }} */ - CMsgQuestMapRegionDef.create = function create(properties) { + CMsgQuestMapRegionDef.create = function(properties) { return new CMsgQuestMapRegionDef(properties); }; @@ -5498,29 +6696,36 @@ * @function encode * @memberof CMsgQuestMapRegionDef * @static - * @param {ICMsgQuestMapRegionDef} message CMsgQuestMapRegionDef message or plain object to encode + * @param {CMsgQuestMapRegionDef.$Properties} message CMsgQuestMapRegionDef message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapRegionDef.encode = function encode(message, writer) { + CMsgQuestMapRegionDef.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.resfile != null && Object.hasOwnProperty.call(message, "resfile")) + if (message.resfile != null && $Object.hasOwnProperty.call(message, "resfile")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.resfile); if (message.links != null && message.links.length) for (var i = 0; i < message.links.length; ++i) - $root.CMsgQuestMapRegionDef.RegionLink.encode(message.links[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.return_link != null && Object.hasOwnProperty.call(message, "return_link")) - $root.CMsgProtoDefID.encode(message.return_link, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.radio_freq != null && Object.hasOwnProperty.call(message, "radio_freq")) + $root.CMsgQuestMapRegionDef.RegionLink.encode(message.links[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.return_link != null && $Object.hasOwnProperty.call(message, "return_link")) + $root.CMsgProtoDefID.encode(message.return_link, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.radio_freq != null && $Object.hasOwnProperty.call(message, "radio_freq")) writer.uint32(/* id 6, wireType 5 =*/53).float(message.radio_freq); - if (message.zoom_scale != null && Object.hasOwnProperty.call(message, "zoom_scale")) + if (message.zoom_scale != null && $Object.hasOwnProperty.call(message, "zoom_scale")) writer.uint32(/* id 7, wireType 5 =*/61).float(message.zoom_scale); - if (message.star_type != null && Object.hasOwnProperty.call(message, "star_type")) - $root.CMsgProtoDefID.encode(message.star_type, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.star_type != null && $Object.hasOwnProperty.call(message, "star_type")) + $root.CMsgProtoDefID.encode(message.star_type, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5529,12 +6734,12 @@ * @function encodeDelimited * @memberof CMsgQuestMapRegionDef * @static - * @param {ICMsgQuestMapRegionDef} message CMsgQuestMapRegionDef message or plain object to encode + * @param {CMsgQuestMapRegionDef.$Properties} message CMsgQuestMapRegionDef message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapRegionDef.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgQuestMapRegionDef.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5544,49 +6749,87 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestMapRegionDef} CMsgQuestMapRegionDef + * @returns {CMsgQuestMapRegionDef & CMsgQuestMapRegionDef.$Shape} CMsgQuestMapRegionDef * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapRegionDef.decode = function decode(reader, length) { + CMsgQuestMapRegionDef.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestMapRegionDef(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestMapRegionDef(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.resfile = reader.string(); - break; - case 4: - if (!(message.links && message.links.length)) - message.links = []; - message.links.push($root.CMsgQuestMapRegionDef.RegionLink.decode(reader, reader.uint32())); - break; - case 5: - message.return_link = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - case 6: - message.radio_freq = reader.float(); - break; - case 7: - message.zoom_scale = reader.float(); - break; - case 8: - message.star_type = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.resfile = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.links && message.links.length)) + message.links = []; + message.links.push($root.CMsgQuestMapRegionDef.RegionLink.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.return_link = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.return_link); + continue; + } + case 6: { + if (wireType !== 5) + break; + message.radio_freq = reader.float(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.zoom_scale = reader.float(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.star_type = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.star_type); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("header")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) throw $util.ProtocolError("missing required 'header'", { instance: message }); return message; }; @@ -5597,11 +6840,11 @@ * @memberof CMsgQuestMapRegionDef * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestMapRegionDef} CMsgQuestMapRegionDef + * @returns {CMsgQuestMapRegionDef & CMsgQuestMapRegionDef.$Shape} CMsgQuestMapRegionDef * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapRegionDef.decodeDelimited = function decodeDelimited(reader) { + CMsgQuestMapRegionDef.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5615,42 +6858,46 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgQuestMapRegionDef.verify = function verify(message) { + CMsgQuestMapRegionDef.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.resfile != null && message.hasOwnProperty("resfile")) + if (message.resfile != null && $Object.hasOwnProperty.call(message, "resfile")) if (!$util.isString(message.resfile)) return "resfile: string expected"; - if (message.links != null && message.hasOwnProperty("links")) { - if (!Array.isArray(message.links)) + if (message.links != null && $Object.hasOwnProperty.call(message, "links")) { + if (!$Array.isArray(message.links)) return "links: array expected"; for (var i = 0; i < message.links.length; ++i) { - var error = $root.CMsgQuestMapRegionDef.RegionLink.verify(message.links[i]); + var error = $root.CMsgQuestMapRegionDef.RegionLink.verify(message.links[i], _depth + 1); if (error) return "links." + error; } } - if (message.return_link != null && message.hasOwnProperty("return_link")) { - var error = $root.CMsgProtoDefID.verify(message.return_link); + if (message.return_link != null && $Object.hasOwnProperty.call(message, "return_link")) { + var error = $root.CMsgProtoDefID.verify(message.return_link, _depth + 1); if (error) return "return_link." + error; } - if (message.radio_freq != null && message.hasOwnProperty("radio_freq")) + if (message.radio_freq != null && $Object.hasOwnProperty.call(message, "radio_freq")) if (typeof message.radio_freq !== "number") return "radio_freq: number expected"; - if (message.zoom_scale != null && message.hasOwnProperty("zoom_scale")) + if (message.zoom_scale != null && $Object.hasOwnProperty.call(message, "zoom_scale")) if (typeof message.zoom_scale !== "number") return "zoom_scale: number expected"; - if (message.star_type != null && message.hasOwnProperty("star_type")) { - var error = $root.CMsgProtoDefID.verify(message.star_type); + if (message.star_type != null && $Object.hasOwnProperty.call(message, "star_type")) { + var error = $root.CMsgProtoDefID.verify(message.star_type, _depth + 1); if (error) return "star_type." + error; } @@ -5665,42 +6912,48 @@ * @param {Object.} object Plain object * @returns {CMsgQuestMapRegionDef} CMsgQuestMapRegionDef */ - CMsgQuestMapRegionDef.fromObject = function fromObject(object) { + CMsgQuestMapRegionDef.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestMapRegionDef) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestMapRegionDef: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestMapRegionDef(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgQuestMapRegionDef.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgQuestMapRegionDef.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.resfile != null) - message.resfile = String(object.resfile); + message.resfile = $String(object.resfile); if (object.links) { - if (!Array.isArray(object.links)) - throw TypeError(".CMsgQuestMapRegionDef.links: array expected"); - message.links = []; + if (!$Array.isArray(object.links)) + throw $TypeError(".CMsgQuestMapRegionDef.links: array expected"); + message.links = $Array(object.links.length); for (var i = 0; i < object.links.length; ++i) { - if (typeof object.links[i] !== "object") - throw TypeError(".CMsgQuestMapRegionDef.links: object expected"); - message.links[i] = $root.CMsgQuestMapRegionDef.RegionLink.fromObject(object.links[i]); + if (!$util.isObject(object.links[i])) + throw $TypeError(".CMsgQuestMapRegionDef.links: object expected"); + message.links[i] = $root.CMsgQuestMapRegionDef.RegionLink.fromObject(object.links[i], _depth + 1); } } if (object.return_link != null) { - if (typeof object.return_link !== "object") - throw TypeError(".CMsgQuestMapRegionDef.return_link: object expected"); - message.return_link = $root.CMsgProtoDefID.fromObject(object.return_link); + if (!$util.isObject(object.return_link)) + throw $TypeError(".CMsgQuestMapRegionDef.return_link: object expected"); + message.return_link = $root.CMsgProtoDefID.fromObject(object.return_link, _depth + 1); } if (object.radio_freq != null) - message.radio_freq = Number(object.radio_freq); + message.radio_freq = $Number(object.radio_freq); if (object.zoom_scale != null) - message.zoom_scale = Number(object.zoom_scale); + message.zoom_scale = $Number(object.zoom_scale); if (object.star_type != null) { - if (typeof object.star_type !== "object") - throw TypeError(".CMsgQuestMapRegionDef.star_type: object expected"); - message.star_type = $root.CMsgProtoDefID.fromObject(object.star_type); + if (!$util.isObject(object.star_type)) + throw $TypeError(".CMsgQuestMapRegionDef.star_type: object expected"); + message.star_type = $root.CMsgProtoDefID.fromObject(object.star_type, _depth + 1); } return message; }; @@ -5714,9 +6967,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgQuestMapRegionDef.toObject = function toObject(message, options) { + CMsgQuestMapRegionDef.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.links = []; @@ -5729,25 +6986,25 @@ object.zoom_scale = 0; object.star_type = null; } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); - if (message.name != null && message.hasOwnProperty("name")) + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.resfile != null && message.hasOwnProperty("resfile")) + if (message.resfile != null && $Object.hasOwnProperty.call(message, "resfile")) object.resfile = message.resfile; if (message.links && message.links.length) { - object.links = []; + object.links = $Array(message.links.length); for (var j = 0; j < message.links.length; ++j) - object.links[j] = $root.CMsgQuestMapRegionDef.RegionLink.toObject(message.links[j], options); - } - if (message.return_link != null && message.hasOwnProperty("return_link")) - object.return_link = $root.CMsgProtoDefID.toObject(message.return_link, options); - if (message.radio_freq != null && message.hasOwnProperty("radio_freq")) - object.radio_freq = options.json && !isFinite(message.radio_freq) ? String(message.radio_freq) : message.radio_freq; - if (message.zoom_scale != null && message.hasOwnProperty("zoom_scale")) - object.zoom_scale = options.json && !isFinite(message.zoom_scale) ? String(message.zoom_scale) : message.zoom_scale; - if (message.star_type != null && message.hasOwnProperty("star_type")) - object.star_type = $root.CMsgProtoDefID.toObject(message.star_type, options); + object.links[j] = $root.CMsgQuestMapRegionDef.RegionLink.toObject(message.links[j], options, _depth + 1); + } + if (message.return_link != null && $Object.hasOwnProperty.call(message, "return_link")) + object.return_link = $root.CMsgProtoDefID.toObject(message.return_link, options, _depth + 1); + if (message.radio_freq != null && $Object.hasOwnProperty.call(message, "radio_freq")) + object.radio_freq = options.json && !$isFinite(message.radio_freq) ? $String(message.radio_freq) : message.radio_freq; + if (message.zoom_scale != null && $Object.hasOwnProperty.call(message, "zoom_scale")) + object.zoom_scale = options.json && !$isFinite(message.zoom_scale) ? $String(message.zoom_scale) : message.zoom_scale; + if (message.star_type != null && $Object.hasOwnProperty.call(message, "star_type")) + object.star_type = $root.CMsgProtoDefID.toObject(message.star_type, options, _depth + 1); return object; }; @@ -5758,39 +7015,71 @@ * @instance * @returns {Object.} JSON object */ - CMsgQuestMapRegionDef.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgQuestMapRegionDef.prototype.toJSON = function() { + return CMsgQuestMapRegionDef.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgQuestMapRegionDef + * @function getTypeUrl + * @memberof CMsgQuestMapRegionDef + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgQuestMapRegionDef.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestMapRegionDef"; }; CMsgQuestMapRegionDef.RegionLink = (function() { /** * Properties of a RegionLink. - * @memberof CMsgQuestMapRegionDef - * @interface IRegionLink - * @property {ICMsgProtoDefID} target_region_defid RegionLink target_region_defid + * @typedef {Object} CMsgQuestMapRegionDef.RegionLink.$Properties + * @property {CMsgProtoDefID.$Properties} target_region_defid RegionLink target_region_defid * @property {number|null} [xpos] RegionLink xpos * @property {number|null} [ypos] RegionLink ypos + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RegionLink. + * @memberof CMsgQuestMapRegionDef + * @interface IRegionLink + * @augments CMsgQuestMapRegionDef.RegionLink.$Properties + * @deprecated Use CMsgQuestMapRegionDef.RegionLink.$Properties instead. + */ + + /** + * Shape of a RegionLink. + * @typedef {{ + * target_region_defid: CMsgProtoDefID.$Shape; + * xpos?: number|null; + * ypos?: number|null; + * $unknowns?: Array.; + * }} CMsgQuestMapRegionDef.RegionLink.$Shape */ /** * Constructs a new RegionLink. * @memberof CMsgQuestMapRegionDef * @classdesc Represents a RegionLink. - * @implements IRegionLink * @constructor - * @param {CMsgQuestMapRegionDef.IRegionLink=} [properties] Properties to set + * @param {CMsgQuestMapRegionDef.RegionLink.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function RegionLink(properties) { + var RegionLink = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * RegionLink target_region_defid. - * @member {ICMsgProtoDefID} target_region_defid + * @member {CMsgProtoDefID.$Properties} target_region_defid * @memberof CMsgQuestMapRegionDef.RegionLink * @instance */ @@ -5817,10 +7106,14 @@ * @function create * @memberof CMsgQuestMapRegionDef.RegionLink * @static - * @param {CMsgQuestMapRegionDef.IRegionLink=} [properties] Properties to set + * @param {CMsgQuestMapRegionDef.RegionLink.$Properties=} [properties] Properties to set * @returns {CMsgQuestMapRegionDef.RegionLink} RegionLink instance + * @type {{ + * (properties: CMsgQuestMapRegionDef.RegionLink.$Shape): CMsgQuestMapRegionDef.RegionLink & CMsgQuestMapRegionDef.RegionLink.$Shape; + * (properties?: CMsgQuestMapRegionDef.RegionLink.$Properties): CMsgQuestMapRegionDef.RegionLink; + * }} */ - RegionLink.create = function create(properties) { + RegionLink.create = function(properties) { return new RegionLink(properties); }; @@ -5829,18 +7122,25 @@ * @function encode * @memberof CMsgQuestMapRegionDef.RegionLink * @static - * @param {CMsgQuestMapRegionDef.IRegionLink} message RegionLink message or plain object to encode + * @param {CMsgQuestMapRegionDef.RegionLink.$Properties} message RegionLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RegionLink.encode = function encode(message, writer) { + RegionLink.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefID.encode(message.target_region_defid, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.xpos != null && Object.hasOwnProperty.call(message, "xpos")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefID.encode(message.target_region_defid, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.xpos != null && $Object.hasOwnProperty.call(message, "xpos")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.xpos); - if (message.ypos != null && Object.hasOwnProperty.call(message, "ypos")) + if (message.ypos != null && $Object.hasOwnProperty.call(message, "ypos")) writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.ypos); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -5849,12 +7149,12 @@ * @function encodeDelimited * @memberof CMsgQuestMapRegionDef.RegionLink * @static - * @param {CMsgQuestMapRegionDef.IRegionLink} message RegionLink message or plain object to encode + * @param {CMsgQuestMapRegionDef.RegionLink.$Properties} message RegionLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RegionLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RegionLink.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -5864,32 +7164,55 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestMapRegionDef.RegionLink} RegionLink + * @returns {CMsgQuestMapRegionDef.RegionLink & CMsgQuestMapRegionDef.RegionLink.$Shape} RegionLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RegionLink.decode = function decode(reader, length) { + RegionLink.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestMapRegionDef.RegionLink(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestMapRegionDef.RegionLink(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.target_region_defid = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - case 2: - message.xpos = reader.uint32(); - break; - case 3: - message.ypos = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.target_region_defid = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.target_region_defid); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.xpos = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.ypos = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("target_region_defid")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "target_region_defid")) throw $util.ProtocolError("missing required 'target_region_defid'", { instance: message }); return message; }; @@ -5900,11 +7223,11 @@ * @memberof CMsgQuestMapRegionDef.RegionLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestMapRegionDef.RegionLink} RegionLink + * @returns {CMsgQuestMapRegionDef.RegionLink & CMsgQuestMapRegionDef.RegionLink.$Shape} RegionLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RegionLink.decodeDelimited = function decodeDelimited(reader) { + RegionLink.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -5918,18 +7241,22 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RegionLink.verify = function verify(message) { + RegionLink.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefID.verify(message.target_region_defid); + var error = $root.CMsgProtoDefID.verify(message.target_region_defid, _depth + 1); if (error) return "target_region_defid." + error; } - if (message.xpos != null && message.hasOwnProperty("xpos")) + if (message.xpos != null && $Object.hasOwnProperty.call(message, "xpos")) if (!$util.isInteger(message.xpos)) return "xpos: integer expected"; - if (message.ypos != null && message.hasOwnProperty("ypos")) + if (message.ypos != null && $Object.hasOwnProperty.call(message, "ypos")) if (!$util.isInteger(message.ypos)) return "ypos: integer expected"; return null; @@ -5943,14 +7270,20 @@ * @param {Object.} object Plain object * @returns {CMsgQuestMapRegionDef.RegionLink} RegionLink */ - RegionLink.fromObject = function fromObject(object) { + RegionLink.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestMapRegionDef.RegionLink) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestMapRegionDef.RegionLink: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestMapRegionDef.RegionLink(); if (object.target_region_defid != null) { - if (typeof object.target_region_defid !== "object") - throw TypeError(".CMsgQuestMapRegionDef.RegionLink.target_region_defid: object expected"); - message.target_region_defid = $root.CMsgProtoDefID.fromObject(object.target_region_defid); + if (!$util.isObject(object.target_region_defid)) + throw $TypeError(".CMsgQuestMapRegionDef.RegionLink.target_region_defid: object expected"); + message.target_region_defid = $root.CMsgProtoDefID.fromObject(object.target_region_defid, _depth + 1); } if (object.xpos != null) message.xpos = object.xpos >>> 0; @@ -5968,20 +7301,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RegionLink.toObject = function toObject(message, options) { + RegionLink.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.target_region_defid = null; object.xpos = 0; object.ypos = 0; } - if (message.target_region_defid != null && message.hasOwnProperty("target_region_defid")) - object.target_region_defid = $root.CMsgProtoDefID.toObject(message.target_region_defid, options); - if (message.xpos != null && message.hasOwnProperty("xpos")) + if (message.target_region_defid != null && $Object.hasOwnProperty.call(message, "target_region_defid")) + object.target_region_defid = $root.CMsgProtoDefID.toObject(message.target_region_defid, options, _depth + 1); + if (message.xpos != null && $Object.hasOwnProperty.call(message, "xpos")) object.xpos = message.xpos; - if (message.ypos != null && message.hasOwnProperty("ypos")) + if (message.ypos != null && $Object.hasOwnProperty.call(message, "ypos")) object.ypos = message.ypos; return object; }; @@ -5993,8 +7330,22 @@ * @instance * @returns {Object.} JSON object */ - RegionLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + RegionLink.prototype.toJSON = function() { + return RegionLink.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RegionLink + * @function getTypeUrl + * @memberof CMsgQuestMapRegionDef.RegionLink + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RegionLink.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestMapRegionDef.RegionLink"; }; return RegionLink; @@ -6007,8 +7358,7 @@ /** * Properties of a CMsgVarField. - * @exports ICMsgVarField - * @interface ICMsgVarField + * @typedef {Object} CMsgVarField.$Properties * @property {string|null} [variable] CMsgVarField variable * @property {number|null} [float] CMsgVarField float * @property {number|null} [double] CMsgVarField double @@ -6018,22 +7368,50 @@ * @property {number|Long|null} [sint64] CMsgVarField sint64 * @property {boolean|null} [bool] CMsgVarField bool * @property {string|null} [string] CMsgVarField string + * @property {"float"|"double"|"uint32"|"uint64"|"sint32"|"sint64"|"bool"|"string"} [value] CMsgVarField value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgVarField. + * @exports ICMsgVarField + * @interface ICMsgVarField + * @augments CMsgVarField.$Properties + * @deprecated Use CMsgVarField.$Properties instead. + */ + + /** + * Narrowed shape of a CMsgVarField. + * @typedef {{ + * variable?: string|null; + * float?: number|null; + * double?: number|null; + * uint32?: number|null; + * uint64?: number|Long|null; + * sint32?: number|null; + * sint64?: number|Long|null; + * bool?: boolean|null; + * string?: string|null; + * $unknowns?: Array.; + * } & ( + * ({ value?: undefined; float?: null; double?: null; uint32?: null; uint64?: null; sint32?: null; sint64?: null; bool?: null; string?: null }|{ value?: "float"; float: number; double?: null; uint32?: null; uint64?: null; sint32?: null; sint64?: null; bool?: null; string?: null }|{ value?: "double"; float?: null; double: number; uint32?: null; uint64?: null; sint32?: null; sint64?: null; bool?: null; string?: null }|{ value?: "uint32"; float?: null; double?: null; uint32: number; uint64?: null; sint32?: null; sint64?: null; bool?: null; string?: null }|{ value?: "uint64"; float?: null; double?: null; uint32?: null; uint64: number|Long; sint32?: null; sint64?: null; bool?: null; string?: null }|{ value?: "sint32"; float?: null; double?: null; uint32?: null; uint64?: null; sint32: number; sint64?: null; bool?: null; string?: null }|{ value?: "sint64"; float?: null; double?: null; uint32?: null; uint64?: null; sint32?: null; sint64: number|Long; bool?: null; string?: null }|{ value?: "bool"; float?: null; double?: null; uint32?: null; uint64?: null; sint32?: null; sint64?: null; bool: boolean; string?: null }|{ value?: "string"; float?: null; double?: null; uint32?: null; uint64?: null; sint32?: null; sint64?: null; bool?: null; string: string }) + * )} CMsgVarField.$Shape */ /** * Constructs a new CMsgVarField. * @exports CMsgVarField * @classdesc Represents a CMsgVarField. - * @implements ICMsgVarField * @constructor - * @param {ICMsgVarField=} [properties] Properties to set + * @param {CMsgVarField.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgVarField(properties) { + var CMsgVarField = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgVarField variable. @@ -6116,7 +7494,7 @@ * @memberof CMsgVarField * @instance */ - Object.defineProperty(CMsgVarField.prototype, "value", { + $Object.defineProperty(CMsgVarField.prototype, "value", { get: $util.oneOfGetter($oneOfFields = ["float", "double", "uint32", "uint64", "sint32", "sint64", "bool", "string"]), set: $util.oneOfSetter($oneOfFields) }); @@ -6126,10 +7504,14 @@ * @function create * @memberof CMsgVarField * @static - * @param {ICMsgVarField=} [properties] Properties to set + * @param {CMsgVarField.$Properties=} [properties] Properties to set * @returns {CMsgVarField} CMsgVarField instance + * @type {{ + * (properties: CMsgVarField.$Shape): CMsgVarField & CMsgVarField.$Shape; + * (properties?: CMsgVarField.$Properties): CMsgVarField; + * }} */ - CMsgVarField.create = function create(properties) { + CMsgVarField.create = function(properties) { return new CMsgVarField(properties); }; @@ -6138,31 +7520,38 @@ * @function encode * @memberof CMsgVarField * @static - * @param {ICMsgVarField} message CMsgVarField message or plain object to encode + * @param {CMsgVarField.$Properties} message CMsgVarField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgVarField.encode = function encode(message, writer) { + CMsgVarField.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.variable != null && Object.hasOwnProperty.call(message, "variable")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.variable != null && $Object.hasOwnProperty.call(message, "variable")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.variable); - if (message.float != null && Object.hasOwnProperty.call(message, "float")) + if (message.float != null && $Object.hasOwnProperty.call(message, "float")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.float); - if (message.double != null && Object.hasOwnProperty.call(message, "double")) + if (message.double != null && $Object.hasOwnProperty.call(message, "double")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.double); - if (message.uint32 != null && Object.hasOwnProperty.call(message, "uint32")) + if (message.uint32 != null && $Object.hasOwnProperty.call(message, "uint32")) writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.uint32); - if (message.uint64 != null && Object.hasOwnProperty.call(message, "uint64")) + if (message.uint64 != null && $Object.hasOwnProperty.call(message, "uint64")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.uint64); - if (message.sint32 != null && Object.hasOwnProperty.call(message, "sint32")) + if (message.sint32 != null && $Object.hasOwnProperty.call(message, "sint32")) writer.uint32(/* id 6, wireType 0 =*/48).sint32(message.sint32); - if (message.sint64 != null && Object.hasOwnProperty.call(message, "sint64")) + if (message.sint64 != null && $Object.hasOwnProperty.call(message, "sint64")) writer.uint32(/* id 7, wireType 0 =*/56).sint64(message.sint64); - if (message.bool != null && Object.hasOwnProperty.call(message, "bool")) + if (message.bool != null && $Object.hasOwnProperty.call(message, "bool")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.bool); - if (message.string != null && Object.hasOwnProperty.call(message, "string")) + if (message.string != null && $Object.hasOwnProperty.call(message, "string")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.string); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6171,12 +7560,12 @@ * @function encodeDelimited * @memberof CMsgVarField * @static - * @param {ICMsgVarField} message CMsgVarField message or plain object to encode + * @param {CMsgVarField.$Properties} message CMsgVarField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgVarField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgVarField.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6186,49 +7575,98 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgVarField} CMsgVarField + * @returns {CMsgVarField & CMsgVarField.$Shape} CMsgVarField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgVarField.decode = function decode(reader, length) { + CMsgVarField.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgVarField(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgVarField(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.variable = reader.string(); - break; - case 2: - message.float = reader.float(); - break; - case 3: - message.double = reader.double(); - break; - case 4: - message.uint32 = reader.uint32(); - break; - case 5: - message.uint64 = reader.uint64(); - break; - case 6: - message.sint32 = reader.sint32(); - break; - case 7: - message.sint64 = reader.sint64(); - break; - case 8: - message.bool = reader.bool(); - break; - case 9: - message.string = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.variable = reader.string(); + continue; + } + case 2: { + if (wireType !== 5) + break; + message.float = reader.float(); + message.value = "float"; + continue; + } + case 3: { + if (wireType !== 1) + break; + message.double = reader.double(); + message.value = "double"; + continue; + } + case 4: { + if (wireType !== 0) + break; + message.uint32 = reader.uint32(); + message.value = "uint32"; + continue; + } + case 5: { + if (wireType !== 0) + break; + message.uint64 = reader.uint64(); + message.value = "uint64"; + continue; + } + case 6: { + if (wireType !== 0) + break; + message.sint32 = reader.sint32(); + message.value = "sint32"; + continue; + } + case 7: { + if (wireType !== 0) + break; + message.sint64 = reader.sint64(); + message.value = "sint64"; + continue; + } + case 8: { + if (wireType !== 0) + break; + message.bool = reader.bool(); + message.value = "bool"; + continue; + } + case 9: { + if (wireType !== 2) + break; + message.string = reader.string(); + message.value = "string"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -6238,11 +7676,11 @@ * @memberof CMsgVarField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgVarField} CMsgVarField + * @returns {CMsgVarField & CMsgVarField.$Shape} CMsgVarField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgVarField.decodeDelimited = function decodeDelimited(reader) { + CMsgVarField.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6256,61 +7694,65 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgVarField.verify = function verify(message) { + CMsgVarField.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; var properties = {}; - if (message.variable != null && message.hasOwnProperty("variable")) + if (message.variable != null && $Object.hasOwnProperty.call(message, "variable")) if (!$util.isString(message.variable)) return "variable: string expected"; - if (message.float != null && message.hasOwnProperty("float")) { + if (message.float != null && $Object.hasOwnProperty.call(message, "float")) { properties.value = 1; if (typeof message.float !== "number") return "float: number expected"; } - if (message.double != null && message.hasOwnProperty("double")) { + if (message.double != null && $Object.hasOwnProperty.call(message, "double")) { if (properties.value === 1) return "value: multiple values"; properties.value = 1; if (typeof message.double !== "number") return "double: number expected"; } - if (message.uint32 != null && message.hasOwnProperty("uint32")) { + if (message.uint32 != null && $Object.hasOwnProperty.call(message, "uint32")) { if (properties.value === 1) return "value: multiple values"; properties.value = 1; if (!$util.isInteger(message.uint32)) return "uint32: integer expected"; } - if (message.uint64 != null && message.hasOwnProperty("uint64")) { + if (message.uint64 != null && $Object.hasOwnProperty.call(message, "uint64")) { if (properties.value === 1) return "value: multiple values"; properties.value = 1; if (!$util.isInteger(message.uint64) && !(message.uint64 && $util.isInteger(message.uint64.low) && $util.isInteger(message.uint64.high))) return "uint64: integer|Long expected"; } - if (message.sint32 != null && message.hasOwnProperty("sint32")) { + if (message.sint32 != null && $Object.hasOwnProperty.call(message, "sint32")) { if (properties.value === 1) return "value: multiple values"; properties.value = 1; if (!$util.isInteger(message.sint32)) return "sint32: integer expected"; } - if (message.sint64 != null && message.hasOwnProperty("sint64")) { + if (message.sint64 != null && $Object.hasOwnProperty.call(message, "sint64")) { if (properties.value === 1) return "value: multiple values"; properties.value = 1; if (!$util.isInteger(message.sint64) && !(message.sint64 && $util.isInteger(message.sint64.low) && $util.isInteger(message.sint64.high))) return "sint64: integer|Long expected"; } - if (message.bool != null && message.hasOwnProperty("bool")) { + if (message.bool != null && $Object.hasOwnProperty.call(message, "bool")) { if (properties.value === 1) return "value: multiple values"; properties.value = 1; if (typeof message.bool !== "boolean") return "bool: boolean expected"; } - if (message.string != null && message.hasOwnProperty("string")) { + if (message.string != null && $Object.hasOwnProperty.call(message, "string")) { if (properties.value === 1) return "value: multiple values"; properties.value = 1; @@ -6328,23 +7770,29 @@ * @param {Object.} object Plain object * @returns {CMsgVarField} CMsgVarField */ - CMsgVarField.fromObject = function fromObject(object) { + CMsgVarField.fromObject = function (object, _depth) { if (object instanceof $root.CMsgVarField) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgVarField: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgVarField(); if (object.variable != null) - message.variable = String(object.variable); + message.variable = $String(object.variable); if (object.float != null) - message.float = Number(object.float); + message.float = $Number(object.float); if (object.double != null) - message.double = Number(object.double); + message.double = $Number(object.double); if (object.uint32 != null) message.uint32 = object.uint32 >>> 0; if (object.uint64 != null) if ($util.Long) - (message.uint64 = $util.Long.fromValue(object.uint64)).unsigned = true; + message.uint64 = $util.Long.fromValue(object.uint64, true); else if (typeof object.uint64 === "string") - message.uint64 = parseInt(object.uint64, 10); + message.uint64 = $parseInt(object.uint64, 10); else if (typeof object.uint64 === "number") message.uint64 = object.uint64; else if (typeof object.uint64 === "object") @@ -6353,17 +7801,17 @@ message.sint32 = object.sint32 | 0; if (object.sint64 != null) if ($util.Long) - (message.sint64 = $util.Long.fromValue(object.sint64)).unsigned = false; + message.sint64 = $util.Long.fromValue(object.sint64, false); else if (typeof object.sint64 === "string") - message.sint64 = parseInt(object.sint64, 10); + message.sint64 = $parseInt(object.sint64, 10); else if (typeof object.sint64 === "number") message.sint64 = object.sint64; else if (typeof object.sint64 === "object") message.sint64 = new $util.LongBits(object.sint64.low >>> 0, object.sint64.high >>> 0).toNumber(); if (object.bool != null) - message.bool = Boolean(object.bool); + message.bool = $Boolean(object.bool); if (object.string != null) - message.string = String(object.string); + message.string = $String(object.string); return message; }; @@ -6376,56 +7824,64 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgVarField.toObject = function toObject(message, options) { + CMsgVarField.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.variable = ""; - if (message.variable != null && message.hasOwnProperty("variable")) + if (message.variable != null && $Object.hasOwnProperty.call(message, "variable")) object.variable = message.variable; - if (message.float != null && message.hasOwnProperty("float")) { - object.float = options.json && !isFinite(message.float) ? String(message.float) : message.float; + if (message.float != null && $Object.hasOwnProperty.call(message, "float")) { + object.float = options.json && !$isFinite(message.float) ? $String(message.float) : message.float; if (options.oneofs) object.value = "float"; } - if (message.double != null && message.hasOwnProperty("double")) { - object.double = options.json && !isFinite(message.double) ? String(message.double) : message.double; + if (message.double != null && $Object.hasOwnProperty.call(message, "double")) { + object.double = options.json && !$isFinite(message.double) ? $String(message.double) : message.double; if (options.oneofs) object.value = "double"; } - if (message.uint32 != null && message.hasOwnProperty("uint32")) { + if (message.uint32 != null && $Object.hasOwnProperty.call(message, "uint32")) { object.uint32 = message.uint32; if (options.oneofs) object.value = "uint32"; } - if (message.uint64 != null && message.hasOwnProperty("uint64")) { - if (typeof message.uint64 === "number") - object.uint64 = options.longs === String ? String(message.uint64) : message.uint64; + if (message.uint64 != null && $Object.hasOwnProperty.call(message, "uint64")) { + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.uint64 = typeof message.uint64 === "number" ? $BigInt(message.uint64) : $util.Long.fromBits(message.uint64.low >>> 0, message.uint64.high >>> 0, true).toBigInt(); + else if (typeof message.uint64 === "number") + object.uint64 = options.longs === $String ? $String(message.uint64) : message.uint64; else - object.uint64 = options.longs === String ? $util.Long.prototype.toString.call(message.uint64) : options.longs === Number ? new $util.LongBits(message.uint64.low >>> 0, message.uint64.high >>> 0).toNumber(true) : message.uint64; + object.uint64 = options.longs === $String ? $util.Long.prototype.toString.call(message.uint64) : options.longs === $Number ? new $util.LongBits(message.uint64.low >>> 0, message.uint64.high >>> 0).toNumber(true) : message.uint64; if (options.oneofs) object.value = "uint64"; } - if (message.sint32 != null && message.hasOwnProperty("sint32")) { + if (message.sint32 != null && $Object.hasOwnProperty.call(message, "sint32")) { object.sint32 = message.sint32; if (options.oneofs) object.value = "sint32"; } - if (message.sint64 != null && message.hasOwnProperty("sint64")) { - if (typeof message.sint64 === "number") - object.sint64 = options.longs === String ? String(message.sint64) : message.sint64; + if (message.sint64 != null && $Object.hasOwnProperty.call(message, "sint64")) { + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.sint64 = typeof message.sint64 === "number" ? $BigInt(message.sint64) : $util.Long.fromBits(message.sint64.low >>> 0, message.sint64.high >>> 0, false).toBigInt(); + else if (typeof message.sint64 === "number") + object.sint64 = options.longs === $String ? $String(message.sint64) : message.sint64; else - object.sint64 = options.longs === String ? $util.Long.prototype.toString.call(message.sint64) : options.longs === Number ? new $util.LongBits(message.sint64.low >>> 0, message.sint64.high >>> 0).toNumber() : message.sint64; + object.sint64 = options.longs === $String ? $util.Long.prototype.toString.call(message.sint64) : options.longs === $Number ? new $util.LongBits(message.sint64.low >>> 0, message.sint64.high >>> 0).toNumber() : message.sint64; if (options.oneofs) object.value = "sint64"; } - if (message.bool != null && message.hasOwnProperty("bool")) { + if (message.bool != null && $Object.hasOwnProperty.call(message, "bool")) { object.bool = message.bool; if (options.oneofs) object.value = "bool"; } - if (message.string != null && message.hasOwnProperty("string")) { + if (message.string != null && $Object.hasOwnProperty.call(message, "string")) { object.string = message.string; if (options.oneofs) object.value = "string"; @@ -6440,8 +7896,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgVarField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgVarField.prototype.toJSON = function() { + return CMsgVarField.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgVarField + * @function getTypeUrl + * @memberof CMsgVarField + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgVarField.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgVarField"; }; return CMsgVarField; @@ -6449,32 +7919,49 @@ $root.CMsgQuestMapStarType = (function() { + /** + * Properties of a CMsgQuestMapStarType. + * @typedef {Object} CMsgQuestMapStarType.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgQuestMapStarType header + * @property {string|null} [name] CMsgQuestMapStarType name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgQuestMapStarType. * @exports ICMsgQuestMapStarType * @interface ICMsgQuestMapStarType - * @property {ICMsgProtoDefHeader} header CMsgQuestMapStarType header - * @property {string|null} [name] CMsgQuestMapStarType name + * @augments CMsgQuestMapStarType.$Properties + * @deprecated Use CMsgQuestMapStarType.$Properties instead. + */ + + /** + * Shape of a CMsgQuestMapStarType. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * name?: string|null; + * $unknowns?: Array.; + * }} CMsgQuestMapStarType.$Shape */ /** * Constructs a new CMsgQuestMapStarType. * @exports CMsgQuestMapStarType * @classdesc Represents a CMsgQuestMapStarType. - * @implements ICMsgQuestMapStarType * @constructor - * @param {ICMsgQuestMapStarType=} [properties] Properties to set + * @param {CMsgQuestMapStarType.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgQuestMapStarType(properties) { + var CMsgQuestMapStarType = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgQuestMapStarType header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgQuestMapStarType * @instance */ @@ -6493,10 +7980,14 @@ * @function create * @memberof CMsgQuestMapStarType * @static - * @param {ICMsgQuestMapStarType=} [properties] Properties to set + * @param {CMsgQuestMapStarType.$Properties=} [properties] Properties to set * @returns {CMsgQuestMapStarType} CMsgQuestMapStarType instance + * @type {{ + * (properties: CMsgQuestMapStarType.$Shape): CMsgQuestMapStarType & CMsgQuestMapStarType.$Shape; + * (properties?: CMsgQuestMapStarType.$Properties): CMsgQuestMapStarType; + * }} */ - CMsgQuestMapStarType.create = function create(properties) { + CMsgQuestMapStarType.create = function(properties) { return new CMsgQuestMapStarType(properties); }; @@ -6505,16 +7996,23 @@ * @function encode * @memberof CMsgQuestMapStarType * @static - * @param {ICMsgQuestMapStarType} message CMsgQuestMapStarType message or plain object to encode + * @param {CMsgQuestMapStarType.$Properties} message CMsgQuestMapStarType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapStarType.encode = function encode(message, writer) { + CMsgQuestMapStarType.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6523,12 +8021,12 @@ * @function encodeDelimited * @memberof CMsgQuestMapStarType * @static - * @param {ICMsgQuestMapStarType} message CMsgQuestMapStarType message or plain object to encode + * @param {CMsgQuestMapStarType.$Properties} message CMsgQuestMapStarType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapStarType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgQuestMapStarType.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6538,31 +8036,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestMapStarType} CMsgQuestMapStarType + * @returns {CMsgQuestMapStarType & CMsgQuestMapStarType.$Shape} CMsgQuestMapStarType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapStarType.decode = function decode(reader, length) { + CMsgQuestMapStarType.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestMapStarType(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestMapStarType(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } - } - if (!message.hasOwnProperty("header")) - throw $util.ProtocolError("missing required 'header'", { instance: message }); - return message; + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) + throw $util.ProtocolError("missing required 'header'", { instance: message }); + return message; }; /** @@ -6571,11 +8089,11 @@ * @memberof CMsgQuestMapStarType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestMapStarType} CMsgQuestMapStarType + * @returns {CMsgQuestMapStarType & CMsgQuestMapStarType.$Shape} CMsgQuestMapStarType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapStarType.decodeDelimited = function decodeDelimited(reader) { + CMsgQuestMapStarType.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6589,15 +8107,19 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgQuestMapStarType.verify = function verify(message) { + CMsgQuestMapStarType.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -6611,17 +8133,23 @@ * @param {Object.} object Plain object * @returns {CMsgQuestMapStarType} CMsgQuestMapStarType */ - CMsgQuestMapStarType.fromObject = function fromObject(object) { + CMsgQuestMapStarType.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestMapStarType) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestMapStarType: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestMapStarType(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgQuestMapStarType.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgQuestMapStarType.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); return message; }; @@ -6634,17 +8162,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgQuestMapStarType.toObject = function toObject(message, options) { + CMsgQuestMapStarType.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.header = null; object.name = ""; } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); - if (message.name != null && message.hasOwnProperty("name")) + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -6656,8 +8188,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgQuestMapStarType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgQuestMapStarType.prototype.toJSON = function() { + return CMsgQuestMapStarType.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgQuestMapStarType + * @function getTypeUrl + * @memberof CMsgQuestMapStarType + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgQuestMapStarType.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestMapStarType"; }; return CMsgQuestMapStarType; @@ -6667,42 +8213,70 @@ /** * Properties of a CMsgQuestMapNodeDef. - * @exports ICMsgQuestMapNodeDef - * @interface ICMsgQuestMapNodeDef - * @property {ICMsgProtoDefHeader} header CMsgQuestMapNodeDef header + * @typedef {Object} CMsgQuestMapNodeDef.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgQuestMapNodeDef header * @property {string|null} [name_loctoken] CMsgQuestMapNodeDef name_loctoken * @property {number|null} [x_pos] CMsgQuestMapNodeDef x_pos * @property {number|null} [y_pos] CMsgQuestMapNodeDef y_pos - * @property {ICMsgQuestMapNodeCondition|null} [condition] CMsgQuestMapNodeDef condition - * @property {ICMsgProtoDefID|null} [owning_region] CMsgQuestMapNodeDef owning_region - * @property {Array.|null} [quest_options] CMsgQuestMapNodeDef quest_options + * @property {CMsgQuestMapNodeCondition.$Properties|null} [condition] CMsgQuestMapNodeDef condition + * @property {CMsgProtoDefID.$Properties|null} [owning_region] CMsgQuestMapNodeDef owning_region + * @property {Array.|null} [quest_options] CMsgQuestMapNodeDef quest_options * @property {string|null} [associated_operation] CMsgQuestMapNodeDef associated_operation * @property {string|null} [reward_item_name] CMsgQuestMapNodeDef reward_item_name * @property {string|null} [reward_lootlist_name] CMsgQuestMapNodeDef reward_lootlist_name * @property {ENodeCashReward|null} [cash_reward] CMsgQuestMapNodeDef cash_reward - * @property {ICMsgProtoDefID|null} [star_type] CMsgQuestMapNodeDef star_type + * @property {CMsgProtoDefID.$Properties|null} [star_type] CMsgQuestMapNodeDef star_type * @property {number|null} [stars_to_unlock] CMsgQuestMapNodeDef stars_to_unlock + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgQuestMapNodeDef. + * @exports ICMsgQuestMapNodeDef + * @interface ICMsgQuestMapNodeDef + * @augments CMsgQuestMapNodeDef.$Properties + * @deprecated Use CMsgQuestMapNodeDef.$Properties instead. + */ + + /** + * Shape of a CMsgQuestMapNodeDef. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * name_loctoken?: string|null; + * x_pos?: number|null; + * y_pos?: number|null; + * condition?: CMsgQuestMapNodeCondition.$Shape|null; + * owning_region?: CMsgProtoDefID.$Shape|null; + * quest_options?: Array.|null; + * associated_operation?: string|null; + * reward_item_name?: string|null; + * reward_lootlist_name?: string|null; + * cash_reward?: ENodeCashReward|null; + * star_type?: CMsgProtoDefID.$Shape|null; + * stars_to_unlock?: number|null; + * $unknowns?: Array.; + * }} CMsgQuestMapNodeDef.$Shape */ /** * Constructs a new CMsgQuestMapNodeDef. * @exports CMsgQuestMapNodeDef * @classdesc Represents a CMsgQuestMapNodeDef. - * @implements ICMsgQuestMapNodeDef * @constructor - * @param {ICMsgQuestMapNodeDef=} [properties] Properties to set + * @param {CMsgQuestMapNodeDef.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgQuestMapNodeDef(properties) { + var CMsgQuestMapNodeDef = function (properties) { this.quest_options = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgQuestMapNodeDef header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgQuestMapNodeDef * @instance */ @@ -6734,7 +8308,7 @@ /** * CMsgQuestMapNodeDef condition. - * @member {ICMsgQuestMapNodeCondition|null|undefined} condition + * @member {CMsgQuestMapNodeCondition.$Properties|null|undefined} condition * @memberof CMsgQuestMapNodeDef * @instance */ @@ -6742,7 +8316,7 @@ /** * CMsgQuestMapNodeDef owning_region. - * @member {ICMsgProtoDefID|null|undefined} owning_region + * @member {CMsgProtoDefID.$Properties|null|undefined} owning_region * @memberof CMsgQuestMapNodeDef * @instance */ @@ -6750,7 +8324,7 @@ /** * CMsgQuestMapNodeDef quest_options. - * @member {Array.} quest_options + * @member {Array.} quest_options * @memberof CMsgQuestMapNodeDef * @instance */ @@ -6790,7 +8364,7 @@ /** * CMsgQuestMapNodeDef star_type. - * @member {ICMsgProtoDefID|null|undefined} star_type + * @member {CMsgProtoDefID.$Properties|null|undefined} star_type * @memberof CMsgQuestMapNodeDef * @instance */ @@ -6809,10 +8383,14 @@ * @function create * @memberof CMsgQuestMapNodeDef * @static - * @param {ICMsgQuestMapNodeDef=} [properties] Properties to set + * @param {CMsgQuestMapNodeDef.$Properties=} [properties] Properties to set * @returns {CMsgQuestMapNodeDef} CMsgQuestMapNodeDef instance + * @type {{ + * (properties: CMsgQuestMapNodeDef.$Shape): CMsgQuestMapNodeDef & CMsgQuestMapNodeDef.$Shape; + * (properties?: CMsgQuestMapNodeDef.$Properties): CMsgQuestMapNodeDef; + * }} */ - CMsgQuestMapNodeDef.create = function create(properties) { + CMsgQuestMapNodeDef.create = function(properties) { return new CMsgQuestMapNodeDef(properties); }; @@ -6821,39 +8399,46 @@ * @function encode * @memberof CMsgQuestMapNodeDef * @static - * @param {ICMsgQuestMapNodeDef} message CMsgQuestMapNodeDef message or plain object to encode + * @param {CMsgQuestMapNodeDef.$Properties} message CMsgQuestMapNodeDef message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapNodeDef.encode = function encode(message, writer) { + CMsgQuestMapNodeDef.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.name_loctoken != null && Object.hasOwnProperty.call(message, "name_loctoken")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.name_loctoken != null && $Object.hasOwnProperty.call(message, "name_loctoken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name_loctoken); - if (message.x_pos != null && Object.hasOwnProperty.call(message, "x_pos")) + if (message.x_pos != null && $Object.hasOwnProperty.call(message, "x_pos")) writer.uint32(/* id 6, wireType 5 =*/53).float(message.x_pos); - if (message.y_pos != null && Object.hasOwnProperty.call(message, "y_pos")) + if (message.y_pos != null && $Object.hasOwnProperty.call(message, "y_pos")) writer.uint32(/* id 7, wireType 5 =*/61).float(message.y_pos); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.CMsgQuestMapNodeCondition.encode(message.condition, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.owning_region != null && Object.hasOwnProperty.call(message, "owning_region")) - $root.CMsgProtoDefID.encode(message.owning_region, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.condition != null && $Object.hasOwnProperty.call(message, "condition")) + $root.CMsgQuestMapNodeCondition.encode(message.condition, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.owning_region != null && $Object.hasOwnProperty.call(message, "owning_region")) + $root.CMsgProtoDefID.encode(message.owning_region, writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); if (message.quest_options != null && message.quest_options.length) for (var i = 0; i < message.quest_options.length; ++i) - $root.CMsgProtoDefID.encode(message.quest_options[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.associated_operation != null && Object.hasOwnProperty.call(message, "associated_operation")) + $root.CMsgProtoDefID.encode(message.quest_options[i], writer.uint32(/* id 11, wireType 2 =*/90).fork(), _depth + 1).ldelim(); + if (message.associated_operation != null && $Object.hasOwnProperty.call(message, "associated_operation")) writer.uint32(/* id 16, wireType 2 =*/130).string(message.associated_operation); - if (message.reward_item_name != null && Object.hasOwnProperty.call(message, "reward_item_name")) + if (message.reward_item_name != null && $Object.hasOwnProperty.call(message, "reward_item_name")) writer.uint32(/* id 18, wireType 2 =*/146).string(message.reward_item_name); - if (message.cash_reward != null && Object.hasOwnProperty.call(message, "cash_reward")) + if (message.cash_reward != null && $Object.hasOwnProperty.call(message, "cash_reward")) writer.uint32(/* id 19, wireType 0 =*/152).int32(message.cash_reward); - if (message.star_type != null && Object.hasOwnProperty.call(message, "star_type")) - $root.CMsgProtoDefID.encode(message.star_type, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.stars_to_unlock != null && Object.hasOwnProperty.call(message, "stars_to_unlock")) + if (message.star_type != null && $Object.hasOwnProperty.call(message, "star_type")) + $root.CMsgProtoDefID.encode(message.star_type, writer.uint32(/* id 20, wireType 2 =*/162).fork(), _depth + 1).ldelim(); + if (message.stars_to_unlock != null && $Object.hasOwnProperty.call(message, "stars_to_unlock")) writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.stars_to_unlock); - if (message.reward_lootlist_name != null && Object.hasOwnProperty.call(message, "reward_lootlist_name")) + if (message.reward_lootlist_name != null && $Object.hasOwnProperty.call(message, "reward_lootlist_name")) writer.uint32(/* id 22, wireType 2 =*/178).string(message.reward_lootlist_name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -6862,12 +8447,12 @@ * @function encodeDelimited * @memberof CMsgQuestMapNodeDef * @static - * @param {ICMsgQuestMapNodeDef} message CMsgQuestMapNodeDef message or plain object to encode + * @param {CMsgQuestMapNodeDef.$Properties} message CMsgQuestMapNodeDef message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapNodeDef.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgQuestMapNodeDef.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -6877,64 +8462,123 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestMapNodeDef} CMsgQuestMapNodeDef + * @returns {CMsgQuestMapNodeDef & CMsgQuestMapNodeDef.$Shape} CMsgQuestMapNodeDef * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapNodeDef.decode = function decode(reader, length) { + CMsgQuestMapNodeDef.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestMapNodeDef(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestMapNodeDef(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - case 4: - message.name_loctoken = reader.string(); - break; - case 6: - message.x_pos = reader.float(); - break; - case 7: - message.y_pos = reader.float(); - break; - case 9: - message.condition = $root.CMsgQuestMapNodeCondition.decode(reader, reader.uint32()); - break; - case 10: - message.owning_region = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - case 11: - if (!(message.quest_options && message.quest_options.length)) - message.quest_options = []; - message.quest_options.push($root.CMsgProtoDefID.decode(reader, reader.uint32())); - break; - case 16: - message.associated_operation = reader.string(); - break; - case 18: - message.reward_item_name = reader.string(); - break; - case 22: - message.reward_lootlist_name = reader.string(); - break; - case 19: - message.cash_reward = reader.int32(); - break; - case 20: - message.star_type = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - case 21: - message.stars_to_unlock = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.name_loctoken = reader.string(); + continue; + } + case 6: { + if (wireType !== 5) + break; + message.x_pos = reader.float(); + continue; + } + case 7: { + if (wireType !== 5) + break; + message.y_pos = reader.float(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.condition = $root.CMsgQuestMapNodeCondition.decode(reader, reader.uint32(), $undefined, _depth + 1, message.condition); + continue; + } + case 10: { + if (wireType !== 2) + break; + message.owning_region = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.owning_region); + continue; + } + case 11: { + if (wireType !== 2) + break; + if (!(message.quest_options && message.quest_options.length)) + message.quest_options = []; + message.quest_options.push($root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 16: { + if (wireType !== 2) + break; + message.associated_operation = reader.string(); + continue; + } + case 18: { + if (wireType !== 2) + break; + message.reward_item_name = reader.string(); + continue; + } + case 22: { + if (wireType !== 2) + break; + message.reward_lootlist_name = reader.string(); + continue; + } + case 19: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ENodeCashReward[value] !== $undefined) + message.cash_reward = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 20: { + if (wireType !== 2) + break; + message.star_type = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.star_type); + continue; + } + case 21: { + if (wireType !== 0) + break; + message.stars_to_unlock = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("header")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) throw $util.ProtocolError("missing required 'header'", { instance: message }); return message; }; @@ -6945,11 +8589,11 @@ * @memberof CMsgQuestMapNodeDef * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestMapNodeDef} CMsgQuestMapNodeDef + * @returns {CMsgQuestMapNodeDef & CMsgQuestMapNodeDef.$Shape} CMsgQuestMapNodeDef * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapNodeDef.decodeDelimited = function decodeDelimited(reader) { + CMsgQuestMapNodeDef.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -6963,52 +8607,56 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgQuestMapNodeDef.verify = function verify(message) { + CMsgQuestMapNodeDef.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } - if (message.name_loctoken != null && message.hasOwnProperty("name_loctoken")) + if (message.name_loctoken != null && $Object.hasOwnProperty.call(message, "name_loctoken")) if (!$util.isString(message.name_loctoken)) return "name_loctoken: string expected"; - if (message.x_pos != null && message.hasOwnProperty("x_pos")) + if (message.x_pos != null && $Object.hasOwnProperty.call(message, "x_pos")) if (typeof message.x_pos !== "number") return "x_pos: number expected"; - if (message.y_pos != null && message.hasOwnProperty("y_pos")) + if (message.y_pos != null && $Object.hasOwnProperty.call(message, "y_pos")) if (typeof message.y_pos !== "number") return "y_pos: number expected"; - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.CMsgQuestMapNodeCondition.verify(message.condition); + if (message.condition != null && $Object.hasOwnProperty.call(message, "condition")) { + var error = $root.CMsgQuestMapNodeCondition.verify(message.condition, _depth + 1); if (error) return "condition." + error; } - if (message.owning_region != null && message.hasOwnProperty("owning_region")) { - var error = $root.CMsgProtoDefID.verify(message.owning_region); + if (message.owning_region != null && $Object.hasOwnProperty.call(message, "owning_region")) { + var error = $root.CMsgProtoDefID.verify(message.owning_region, _depth + 1); if (error) return "owning_region." + error; } - if (message.quest_options != null && message.hasOwnProperty("quest_options")) { - if (!Array.isArray(message.quest_options)) + if (message.quest_options != null && $Object.hasOwnProperty.call(message, "quest_options")) { + if (!$Array.isArray(message.quest_options)) return "quest_options: array expected"; for (var i = 0; i < message.quest_options.length; ++i) { - var error = $root.CMsgProtoDefID.verify(message.quest_options[i]); + var error = $root.CMsgProtoDefID.verify(message.quest_options[i], _depth + 1); if (error) return "quest_options." + error; } } - if (message.associated_operation != null && message.hasOwnProperty("associated_operation")) + if (message.associated_operation != null && $Object.hasOwnProperty.call(message, "associated_operation")) if (!$util.isString(message.associated_operation)) return "associated_operation: string expected"; - if (message.reward_item_name != null && message.hasOwnProperty("reward_item_name")) + if (message.reward_item_name != null && $Object.hasOwnProperty.call(message, "reward_item_name")) if (!$util.isString(message.reward_item_name)) return "reward_item_name: string expected"; - if (message.reward_lootlist_name != null && message.hasOwnProperty("reward_lootlist_name")) + if (message.reward_lootlist_name != null && $Object.hasOwnProperty.call(message, "reward_lootlist_name")) if (!$util.isString(message.reward_lootlist_name)) return "reward_lootlist_name: string expected"; - if (message.cash_reward != null && message.hasOwnProperty("cash_reward")) + if (message.cash_reward != null && $Object.hasOwnProperty.call(message, "cash_reward")) switch (message.cash_reward) { default: return "cash_reward: enum value expected"; @@ -7018,12 +8666,12 @@ case 4: break; } - if (message.star_type != null && message.hasOwnProperty("star_type")) { - var error = $root.CMsgProtoDefID.verify(message.star_type); + if (message.star_type != null && $Object.hasOwnProperty.call(message, "star_type")) { + var error = $root.CMsgProtoDefID.verify(message.star_type, _depth + 1); if (error) return "star_type." + error; } - if (message.stars_to_unlock != null && message.hasOwnProperty("stars_to_unlock")) + if (message.stars_to_unlock != null && $Object.hasOwnProperty.call(message, "stars_to_unlock")) if (!$util.isInteger(message.stars_to_unlock)) return "stars_to_unlock: integer expected"; return null; @@ -7037,47 +8685,53 @@ * @param {Object.} object Plain object * @returns {CMsgQuestMapNodeDef} CMsgQuestMapNodeDef */ - CMsgQuestMapNodeDef.fromObject = function fromObject(object) { + CMsgQuestMapNodeDef.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestMapNodeDef) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestMapNodeDef: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestMapNodeDef(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgQuestMapNodeDef.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgQuestMapNodeDef.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } if (object.name_loctoken != null) - message.name_loctoken = String(object.name_loctoken); + message.name_loctoken = $String(object.name_loctoken); if (object.x_pos != null) - message.x_pos = Number(object.x_pos); + message.x_pos = $Number(object.x_pos); if (object.y_pos != null) - message.y_pos = Number(object.y_pos); + message.y_pos = $Number(object.y_pos); if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".CMsgQuestMapNodeDef.condition: object expected"); - message.condition = $root.CMsgQuestMapNodeCondition.fromObject(object.condition); + if (!$util.isObject(object.condition)) + throw $TypeError(".CMsgQuestMapNodeDef.condition: object expected"); + message.condition = $root.CMsgQuestMapNodeCondition.fromObject(object.condition, _depth + 1); } if (object.owning_region != null) { - if (typeof object.owning_region !== "object") - throw TypeError(".CMsgQuestMapNodeDef.owning_region: object expected"); - message.owning_region = $root.CMsgProtoDefID.fromObject(object.owning_region); + if (!$util.isObject(object.owning_region)) + throw $TypeError(".CMsgQuestMapNodeDef.owning_region: object expected"); + message.owning_region = $root.CMsgProtoDefID.fromObject(object.owning_region, _depth + 1); } if (object.quest_options) { - if (!Array.isArray(object.quest_options)) - throw TypeError(".CMsgQuestMapNodeDef.quest_options: array expected"); - message.quest_options = []; + if (!$Array.isArray(object.quest_options)) + throw $TypeError(".CMsgQuestMapNodeDef.quest_options: array expected"); + message.quest_options = $Array(object.quest_options.length); for (var i = 0; i < object.quest_options.length; ++i) { - if (typeof object.quest_options[i] !== "object") - throw TypeError(".CMsgQuestMapNodeDef.quest_options: object expected"); - message.quest_options[i] = $root.CMsgProtoDefID.fromObject(object.quest_options[i]); + if (!$util.isObject(object.quest_options[i])) + throw $TypeError(".CMsgQuestMapNodeDef.quest_options: object expected"); + message.quest_options[i] = $root.CMsgProtoDefID.fromObject(object.quest_options[i], _depth + 1); } } if (object.associated_operation != null) - message.associated_operation = String(object.associated_operation); + message.associated_operation = $String(object.associated_operation); if (object.reward_item_name != null) - message.reward_item_name = String(object.reward_item_name); + message.reward_item_name = $String(object.reward_item_name); if (object.reward_lootlist_name != null) - message.reward_lootlist_name = String(object.reward_lootlist_name); + message.reward_lootlist_name = $String(object.reward_lootlist_name); switch (object.cash_reward) { case "CASH_REWARD_NONE": case 1: @@ -7095,11 +8749,12 @@ case 4: message.cash_reward = 4; break; + default: } if (object.star_type != null) { - if (typeof object.star_type !== "object") - throw TypeError(".CMsgQuestMapNodeDef.star_type: object expected"); - message.star_type = $root.CMsgProtoDefID.fromObject(object.star_type); + if (!$util.isObject(object.star_type)) + throw $TypeError(".CMsgQuestMapNodeDef.star_type: object expected"); + message.star_type = $root.CMsgProtoDefID.fromObject(object.star_type, _depth + 1); } if (object.stars_to_unlock != null) message.stars_to_unlock = object.stars_to_unlock >>> 0; @@ -7115,9 +8770,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgQuestMapNodeDef.toObject = function toObject(message, options) { + CMsgQuestMapNodeDef.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.quest_options = []; @@ -7130,39 +8789,39 @@ object.owning_region = null; object.associated_operation = ""; object.reward_item_name = ""; - object.cash_reward = options.enums === String ? "CASH_REWARD_NONE" : 1; + object.cash_reward = options.enums === $String ? "CASH_REWARD_NONE" : 1; object.star_type = null; object.stars_to_unlock = 1; object.reward_lootlist_name = ""; } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); - if (message.name_loctoken != null && message.hasOwnProperty("name_loctoken")) + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); + if (message.name_loctoken != null && $Object.hasOwnProperty.call(message, "name_loctoken")) object.name_loctoken = message.name_loctoken; - if (message.x_pos != null && message.hasOwnProperty("x_pos")) - object.x_pos = options.json && !isFinite(message.x_pos) ? String(message.x_pos) : message.x_pos; - if (message.y_pos != null && message.hasOwnProperty("y_pos")) - object.y_pos = options.json && !isFinite(message.y_pos) ? String(message.y_pos) : message.y_pos; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.CMsgQuestMapNodeCondition.toObject(message.condition, options); - if (message.owning_region != null && message.hasOwnProperty("owning_region")) - object.owning_region = $root.CMsgProtoDefID.toObject(message.owning_region, options); + if (message.x_pos != null && $Object.hasOwnProperty.call(message, "x_pos")) + object.x_pos = options.json && !$isFinite(message.x_pos) ? $String(message.x_pos) : message.x_pos; + if (message.y_pos != null && $Object.hasOwnProperty.call(message, "y_pos")) + object.y_pos = options.json && !$isFinite(message.y_pos) ? $String(message.y_pos) : message.y_pos; + if (message.condition != null && $Object.hasOwnProperty.call(message, "condition")) + object.condition = $root.CMsgQuestMapNodeCondition.toObject(message.condition, options, _depth + 1); + if (message.owning_region != null && $Object.hasOwnProperty.call(message, "owning_region")) + object.owning_region = $root.CMsgProtoDefID.toObject(message.owning_region, options, _depth + 1); if (message.quest_options && message.quest_options.length) { - object.quest_options = []; + object.quest_options = $Array(message.quest_options.length); for (var j = 0; j < message.quest_options.length; ++j) - object.quest_options[j] = $root.CMsgProtoDefID.toObject(message.quest_options[j], options); + object.quest_options[j] = $root.CMsgProtoDefID.toObject(message.quest_options[j], options, _depth + 1); } - if (message.associated_operation != null && message.hasOwnProperty("associated_operation")) + if (message.associated_operation != null && $Object.hasOwnProperty.call(message, "associated_operation")) object.associated_operation = message.associated_operation; - if (message.reward_item_name != null && message.hasOwnProperty("reward_item_name")) + if (message.reward_item_name != null && $Object.hasOwnProperty.call(message, "reward_item_name")) object.reward_item_name = message.reward_item_name; - if (message.cash_reward != null && message.hasOwnProperty("cash_reward")) - object.cash_reward = options.enums === String ? $root.ENodeCashReward[message.cash_reward] : message.cash_reward; - if (message.star_type != null && message.hasOwnProperty("star_type")) - object.star_type = $root.CMsgProtoDefID.toObject(message.star_type, options); - if (message.stars_to_unlock != null && message.hasOwnProperty("stars_to_unlock")) + if (message.cash_reward != null && $Object.hasOwnProperty.call(message, "cash_reward")) + object.cash_reward = options.enums === $String ? $root.ENodeCashReward[message.cash_reward] === $undefined ? message.cash_reward : $root.ENodeCashReward[message.cash_reward] : message.cash_reward; + if (message.star_type != null && $Object.hasOwnProperty.call(message, "star_type")) + object.star_type = $root.CMsgProtoDefID.toObject(message.star_type, options, _depth + 1); + if (message.stars_to_unlock != null && $Object.hasOwnProperty.call(message, "stars_to_unlock")) object.stars_to_unlock = message.stars_to_unlock; - if (message.reward_lootlist_name != null && message.hasOwnProperty("reward_lootlist_name")) + if (message.reward_lootlist_name != null && $Object.hasOwnProperty.call(message, "reward_lootlist_name")) object.reward_lootlist_name = message.reward_lootlist_name; return object; }; @@ -7174,8 +8833,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgQuestMapNodeDef.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgQuestMapNodeDef.prototype.toJSON = function() { + return CMsgQuestMapNodeDef.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgQuestMapNodeDef + * @function getTypeUrl + * @memberof CMsgQuestMapNodeDef + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgQuestMapNodeDef.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestMapNodeDef"; }; return CMsgQuestMapNodeDef; @@ -7183,31 +8856,47 @@ $root.CMsgPaintKit_Variables = (function() { + /** + * Properties of a CMsgPaintKit_Variables. + * @typedef {Object} CMsgPaintKit_Variables.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgPaintKit_Variables header + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPaintKit_Variables. * @exports ICMsgPaintKit_Variables * @interface ICMsgPaintKit_Variables - * @property {ICMsgProtoDefHeader} header CMsgPaintKit_Variables header + * @augments CMsgPaintKit_Variables.$Properties + * @deprecated Use CMsgPaintKit_Variables.$Properties instead. + */ + + /** + * Shape of a CMsgPaintKit_Variables. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * $unknowns?: Array.; + * }} CMsgPaintKit_Variables.$Shape */ /** * Constructs a new CMsgPaintKit_Variables. * @exports CMsgPaintKit_Variables * @classdesc Represents a CMsgPaintKit_Variables. - * @implements ICMsgPaintKit_Variables * @constructor - * @param {ICMsgPaintKit_Variables=} [properties] Properties to set + * @param {CMsgPaintKit_Variables.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPaintKit_Variables(properties) { + var CMsgPaintKit_Variables = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPaintKit_Variables header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgPaintKit_Variables * @instance */ @@ -7218,10 +8907,14 @@ * @function create * @memberof CMsgPaintKit_Variables * @static - * @param {ICMsgPaintKit_Variables=} [properties] Properties to set + * @param {CMsgPaintKit_Variables.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_Variables} CMsgPaintKit_Variables instance + * @type {{ + * (properties: CMsgPaintKit_Variables.$Shape): CMsgPaintKit_Variables & CMsgPaintKit_Variables.$Shape; + * (properties?: CMsgPaintKit_Variables.$Properties): CMsgPaintKit_Variables; + * }} */ - CMsgPaintKit_Variables.create = function create(properties) { + CMsgPaintKit_Variables.create = function(properties) { return new CMsgPaintKit_Variables(properties); }; @@ -7230,14 +8923,21 @@ * @function encode * @memberof CMsgPaintKit_Variables * @static - * @param {ICMsgPaintKit_Variables} message CMsgPaintKit_Variables message or plain object to encode + * @param {CMsgPaintKit_Variables.$Properties} message CMsgPaintKit_Variables message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Variables.encode = function encode(message, writer) { + CMsgPaintKit_Variables.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7246,12 +8946,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_Variables * @static - * @param {ICMsgPaintKit_Variables} message CMsgPaintKit_Variables message or plain object to encode + * @param {CMsgPaintKit_Variables.$Properties} message CMsgPaintKit_Variables message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Variables.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPaintKit_Variables.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7261,26 +8961,43 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_Variables} CMsgPaintKit_Variables + * @returns {CMsgPaintKit_Variables & CMsgPaintKit_Variables.$Shape} CMsgPaintKit_Variables * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Variables.decode = function decode(reader, length) { + CMsgPaintKit_Variables.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_Variables(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_Variables(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("header")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) throw $util.ProtocolError("missing required 'header'", { instance: message }); return message; }; @@ -7291,11 +9008,11 @@ * @memberof CMsgPaintKit_Variables * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_Variables} CMsgPaintKit_Variables + * @returns {CMsgPaintKit_Variables & CMsgPaintKit_Variables.$Shape} CMsgPaintKit_Variables * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Variables.decodeDelimited = function decodeDelimited(reader) { + CMsgPaintKit_Variables.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7309,11 +9026,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPaintKit_Variables.verify = function verify(message) { + CMsgPaintKit_Variables.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } @@ -7328,14 +9049,20 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_Variables} CMsgPaintKit_Variables */ - CMsgPaintKit_Variables.fromObject = function fromObject(object) { + CMsgPaintKit_Variables.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_Variables) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_Variables: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_Variables(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgPaintKit_Variables.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgPaintKit_Variables.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } return message; }; @@ -7349,14 +9076,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPaintKit_Variables.toObject = function toObject(message, options) { + CMsgPaintKit_Variables.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.header = null; - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); return object; }; @@ -7367,8 +9098,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPaintKit_Variables.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPaintKit_Variables.prototype.toJSON = function() { + return CMsgPaintKit_Variables.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPaintKit_Variables + * @function getTypeUrl + * @memberof CMsgPaintKit_Variables + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPaintKit_Variables.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_Variables"; }; return CMsgPaintKit_Variables; @@ -7376,42 +9121,69 @@ $root.CMsgPaintKit_Operation_TextureStage = (function() { + /** + * Properties of a CMsgPaintKit_Operation_TextureStage. + * @typedef {Object} CMsgPaintKit_Operation_TextureStage.$Properties + * @property {CMsgVarField.$Properties|null} [texture] CMsgPaintKit_Operation_TextureStage texture + * @property {CMsgVarField.$Properties|null} [texture_red] CMsgPaintKit_Operation_TextureStage texture_red + * @property {CMsgVarField.$Properties|null} [texture_blue] CMsgPaintKit_Operation_TextureStage texture_blue + * @property {CMsgVarField.$Properties|null} [adjust_black] CMsgPaintKit_Operation_TextureStage adjust_black + * @property {CMsgVarField.$Properties|null} [adjust_offset] CMsgPaintKit_Operation_TextureStage adjust_offset + * @property {CMsgVarField.$Properties|null} [adjust_gamma] CMsgPaintKit_Operation_TextureStage adjust_gamma + * @property {CMsgVarField.$Properties|null} [rotation] CMsgPaintKit_Operation_TextureStage rotation + * @property {CMsgVarField.$Properties|null} [translate_u] CMsgPaintKit_Operation_TextureStage translate_u + * @property {CMsgVarField.$Properties|null} [translate_v] CMsgPaintKit_Operation_TextureStage translate_v + * @property {CMsgVarField.$Properties|null} [scale_uv] CMsgPaintKit_Operation_TextureStage scale_uv + * @property {CMsgVarField.$Properties|null} [flip_u] CMsgPaintKit_Operation_TextureStage flip_u + * @property {CMsgVarField.$Properties|null} [flip_v] CMsgPaintKit_Operation_TextureStage flip_v + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPaintKit_Operation_TextureStage. * @exports ICMsgPaintKit_Operation_TextureStage * @interface ICMsgPaintKit_Operation_TextureStage - * @property {ICMsgVarField|null} [texture] CMsgPaintKit_Operation_TextureStage texture - * @property {ICMsgVarField|null} [texture_red] CMsgPaintKit_Operation_TextureStage texture_red - * @property {ICMsgVarField|null} [texture_blue] CMsgPaintKit_Operation_TextureStage texture_blue - * @property {ICMsgVarField|null} [adjust_black] CMsgPaintKit_Operation_TextureStage adjust_black - * @property {ICMsgVarField|null} [adjust_offset] CMsgPaintKit_Operation_TextureStage adjust_offset - * @property {ICMsgVarField|null} [adjust_gamma] CMsgPaintKit_Operation_TextureStage adjust_gamma - * @property {ICMsgVarField|null} [rotation] CMsgPaintKit_Operation_TextureStage rotation - * @property {ICMsgVarField|null} [translate_u] CMsgPaintKit_Operation_TextureStage translate_u - * @property {ICMsgVarField|null} [translate_v] CMsgPaintKit_Operation_TextureStage translate_v - * @property {ICMsgVarField|null} [scale_uv] CMsgPaintKit_Operation_TextureStage scale_uv - * @property {ICMsgVarField|null} [flip_u] CMsgPaintKit_Operation_TextureStage flip_u - * @property {ICMsgVarField|null} [flip_v] CMsgPaintKit_Operation_TextureStage flip_v + * @augments CMsgPaintKit_Operation_TextureStage.$Properties + * @deprecated Use CMsgPaintKit_Operation_TextureStage.$Properties instead. + */ + + /** + * Shape of a CMsgPaintKit_Operation_TextureStage. + * @typedef {{ + * texture?: CMsgVarField.$Shape|null; + * texture_red?: CMsgVarField.$Shape|null; + * texture_blue?: CMsgVarField.$Shape|null; + * adjust_black?: CMsgVarField.$Shape|null; + * adjust_offset?: CMsgVarField.$Shape|null; + * adjust_gamma?: CMsgVarField.$Shape|null; + * rotation?: CMsgVarField.$Shape|null; + * translate_u?: CMsgVarField.$Shape|null; + * translate_v?: CMsgVarField.$Shape|null; + * scale_uv?: CMsgVarField.$Shape|null; + * flip_u?: CMsgVarField.$Shape|null; + * flip_v?: CMsgVarField.$Shape|null; + * $unknowns?: Array.; + * }} CMsgPaintKit_Operation_TextureStage.$Shape */ /** * Constructs a new CMsgPaintKit_Operation_TextureStage. * @exports CMsgPaintKit_Operation_TextureStage * @classdesc Represents a CMsgPaintKit_Operation_TextureStage. - * @implements ICMsgPaintKit_Operation_TextureStage * @constructor - * @param {ICMsgPaintKit_Operation_TextureStage=} [properties] Properties to set + * @param {CMsgPaintKit_Operation_TextureStage.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPaintKit_Operation_TextureStage(properties) { + var CMsgPaintKit_Operation_TextureStage = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPaintKit_Operation_TextureStage texture. - * @member {ICMsgVarField|null|undefined} texture + * @member {CMsgVarField.$Properties|null|undefined} texture * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7419,7 +9191,7 @@ /** * CMsgPaintKit_Operation_TextureStage texture_red. - * @member {ICMsgVarField|null|undefined} texture_red + * @member {CMsgVarField.$Properties|null|undefined} texture_red * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7427,7 +9199,7 @@ /** * CMsgPaintKit_Operation_TextureStage texture_blue. - * @member {ICMsgVarField|null|undefined} texture_blue + * @member {CMsgVarField.$Properties|null|undefined} texture_blue * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7435,7 +9207,7 @@ /** * CMsgPaintKit_Operation_TextureStage adjust_black. - * @member {ICMsgVarField|null|undefined} adjust_black + * @member {CMsgVarField.$Properties|null|undefined} adjust_black * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7443,7 +9215,7 @@ /** * CMsgPaintKit_Operation_TextureStage adjust_offset. - * @member {ICMsgVarField|null|undefined} adjust_offset + * @member {CMsgVarField.$Properties|null|undefined} adjust_offset * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7451,7 +9223,7 @@ /** * CMsgPaintKit_Operation_TextureStage adjust_gamma. - * @member {ICMsgVarField|null|undefined} adjust_gamma + * @member {CMsgVarField.$Properties|null|undefined} adjust_gamma * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7459,7 +9231,7 @@ /** * CMsgPaintKit_Operation_TextureStage rotation. - * @member {ICMsgVarField|null|undefined} rotation + * @member {CMsgVarField.$Properties|null|undefined} rotation * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7467,7 +9239,7 @@ /** * CMsgPaintKit_Operation_TextureStage translate_u. - * @member {ICMsgVarField|null|undefined} translate_u + * @member {CMsgVarField.$Properties|null|undefined} translate_u * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7475,7 +9247,7 @@ /** * CMsgPaintKit_Operation_TextureStage translate_v. - * @member {ICMsgVarField|null|undefined} translate_v + * @member {CMsgVarField.$Properties|null|undefined} translate_v * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7483,7 +9255,7 @@ /** * CMsgPaintKit_Operation_TextureStage scale_uv. - * @member {ICMsgVarField|null|undefined} scale_uv + * @member {CMsgVarField.$Properties|null|undefined} scale_uv * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7491,7 +9263,7 @@ /** * CMsgPaintKit_Operation_TextureStage flip_u. - * @member {ICMsgVarField|null|undefined} flip_u + * @member {CMsgVarField.$Properties|null|undefined} flip_u * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7499,7 +9271,7 @@ /** * CMsgPaintKit_Operation_TextureStage flip_v. - * @member {ICMsgVarField|null|undefined} flip_v + * @member {CMsgVarField.$Properties|null|undefined} flip_v * @memberof CMsgPaintKit_Operation_TextureStage * @instance */ @@ -7510,10 +9282,14 @@ * @function create * @memberof CMsgPaintKit_Operation_TextureStage * @static - * @param {ICMsgPaintKit_Operation_TextureStage=} [properties] Properties to set + * @param {CMsgPaintKit_Operation_TextureStage.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_Operation_TextureStage} CMsgPaintKit_Operation_TextureStage instance + * @type {{ + * (properties: CMsgPaintKit_Operation_TextureStage.$Shape): CMsgPaintKit_Operation_TextureStage & CMsgPaintKit_Operation_TextureStage.$Shape; + * (properties?: CMsgPaintKit_Operation_TextureStage.$Properties): CMsgPaintKit_Operation_TextureStage; + * }} */ - CMsgPaintKit_Operation_TextureStage.create = function create(properties) { + CMsgPaintKit_Operation_TextureStage.create = function(properties) { return new CMsgPaintKit_Operation_TextureStage(properties); }; @@ -7522,37 +9298,44 @@ * @function encode * @memberof CMsgPaintKit_Operation_TextureStage * @static - * @param {ICMsgPaintKit_Operation_TextureStage} message CMsgPaintKit_Operation_TextureStage message or plain object to encode + * @param {CMsgPaintKit_Operation_TextureStage.$Properties} message CMsgPaintKit_Operation_TextureStage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation_TextureStage.encode = function encode(message, writer) { + CMsgPaintKit_Operation_TextureStage.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.texture != null && Object.hasOwnProperty.call(message, "texture")) - $root.CMsgVarField.encode(message.texture, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.texture_red != null && Object.hasOwnProperty.call(message, "texture_red")) - $root.CMsgVarField.encode(message.texture_red, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.texture_blue != null && Object.hasOwnProperty.call(message, "texture_blue")) - $root.CMsgVarField.encode(message.texture_blue, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.adjust_black != null && Object.hasOwnProperty.call(message, "adjust_black")) - $root.CMsgVarField.encode(message.adjust_black, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.adjust_offset != null && Object.hasOwnProperty.call(message, "adjust_offset")) - $root.CMsgVarField.encode(message.adjust_offset, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.adjust_gamma != null && Object.hasOwnProperty.call(message, "adjust_gamma")) - $root.CMsgVarField.encode(message.adjust_gamma, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.rotation != null && Object.hasOwnProperty.call(message, "rotation")) - $root.CMsgVarField.encode(message.rotation, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.translate_u != null && Object.hasOwnProperty.call(message, "translate_u")) - $root.CMsgVarField.encode(message.translate_u, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.translate_v != null && Object.hasOwnProperty.call(message, "translate_v")) - $root.CMsgVarField.encode(message.translate_v, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.scale_uv != null && Object.hasOwnProperty.call(message, "scale_uv")) - $root.CMsgVarField.encode(message.scale_uv, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.flip_u != null && Object.hasOwnProperty.call(message, "flip_u")) - $root.CMsgVarField.encode(message.flip_u, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.flip_v != null && Object.hasOwnProperty.call(message, "flip_v")) - $root.CMsgVarField.encode(message.flip_v, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.texture != null && $Object.hasOwnProperty.call(message, "texture")) + $root.CMsgVarField.encode(message.texture, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.texture_red != null && $Object.hasOwnProperty.call(message, "texture_red")) + $root.CMsgVarField.encode(message.texture_red, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.texture_blue != null && $Object.hasOwnProperty.call(message, "texture_blue")) + $root.CMsgVarField.encode(message.texture_blue, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.adjust_black != null && $Object.hasOwnProperty.call(message, "adjust_black")) + $root.CMsgVarField.encode(message.adjust_black, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.adjust_offset != null && $Object.hasOwnProperty.call(message, "adjust_offset")) + $root.CMsgVarField.encode(message.adjust_offset, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.adjust_gamma != null && $Object.hasOwnProperty.call(message, "adjust_gamma")) + $root.CMsgVarField.encode(message.adjust_gamma, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.rotation != null && $Object.hasOwnProperty.call(message, "rotation")) + $root.CMsgVarField.encode(message.rotation, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.translate_u != null && $Object.hasOwnProperty.call(message, "translate_u")) + $root.CMsgVarField.encode(message.translate_u, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.translate_v != null && $Object.hasOwnProperty.call(message, "translate_v")) + $root.CMsgVarField.encode(message.translate_v, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.scale_uv != null && $Object.hasOwnProperty.call(message, "scale_uv")) + $root.CMsgVarField.encode(message.scale_uv, writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); + if (message.flip_u != null && $Object.hasOwnProperty.call(message, "flip_u")) + $root.CMsgVarField.encode(message.flip_u, writer.uint32(/* id 11, wireType 2 =*/90).fork(), _depth + 1).ldelim(); + if (message.flip_v != null && $Object.hasOwnProperty.call(message, "flip_v")) + $root.CMsgVarField.encode(message.flip_v, writer.uint32(/* id 12, wireType 2 =*/98).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -7561,12 +9344,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_Operation_TextureStage * @static - * @param {ICMsgPaintKit_Operation_TextureStage} message CMsgPaintKit_Operation_TextureStage message or plain object to encode + * @param {CMsgPaintKit_Operation_TextureStage.$Properties} message CMsgPaintKit_Operation_TextureStage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation_TextureStage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPaintKit_Operation_TextureStage.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -7576,58 +9359,108 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_Operation_TextureStage} CMsgPaintKit_Operation_TextureStage + * @returns {CMsgPaintKit_Operation_TextureStage & CMsgPaintKit_Operation_TextureStage.$Shape} CMsgPaintKit_Operation_TextureStage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation_TextureStage.decode = function decode(reader, length) { + CMsgPaintKit_Operation_TextureStage.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_Operation_TextureStage(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_Operation_TextureStage(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.texture = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 2: - message.texture_red = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 3: - message.texture_blue = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 4: - message.adjust_black = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 5: - message.adjust_offset = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 6: - message.adjust_gamma = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 7: - message.rotation = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 8: - message.translate_u = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 9: - message.translate_v = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 10: - message.scale_uv = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 11: - message.flip_u = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 12: - message.flip_v = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.texture = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.texture); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.texture_red = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.texture_red); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.texture_blue = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.texture_blue); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.adjust_black = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.adjust_black); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.adjust_offset = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.adjust_offset); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.adjust_gamma = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.adjust_gamma); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.rotation = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.rotation); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.translate_u = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.translate_u); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.translate_v = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.translate_v); + continue; + } + case 10: { + if (wireType !== 2) + break; + message.scale_uv = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.scale_uv); + continue; + } + case 11: { + if (wireType !== 2) + break; + message.flip_u = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.flip_u); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.flip_v = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.flip_v); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -7637,11 +9470,11 @@ * @memberof CMsgPaintKit_Operation_TextureStage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_Operation_TextureStage} CMsgPaintKit_Operation_TextureStage + * @returns {CMsgPaintKit_Operation_TextureStage & CMsgPaintKit_Operation_TextureStage.$Shape} CMsgPaintKit_Operation_TextureStage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation_TextureStage.decodeDelimited = function decodeDelimited(reader) { + CMsgPaintKit_Operation_TextureStage.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -7655,66 +9488,70 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPaintKit_Operation_TextureStage.verify = function verify(message) { + CMsgPaintKit_Operation_TextureStage.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.texture != null && message.hasOwnProperty("texture")) { - var error = $root.CMsgVarField.verify(message.texture); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.texture != null && $Object.hasOwnProperty.call(message, "texture")) { + var error = $root.CMsgVarField.verify(message.texture, _depth + 1); if (error) return "texture." + error; } - if (message.texture_red != null && message.hasOwnProperty("texture_red")) { - var error = $root.CMsgVarField.verify(message.texture_red); + if (message.texture_red != null && $Object.hasOwnProperty.call(message, "texture_red")) { + var error = $root.CMsgVarField.verify(message.texture_red, _depth + 1); if (error) return "texture_red." + error; } - if (message.texture_blue != null && message.hasOwnProperty("texture_blue")) { - var error = $root.CMsgVarField.verify(message.texture_blue); + if (message.texture_blue != null && $Object.hasOwnProperty.call(message, "texture_blue")) { + var error = $root.CMsgVarField.verify(message.texture_blue, _depth + 1); if (error) return "texture_blue." + error; } - if (message.adjust_black != null && message.hasOwnProperty("adjust_black")) { - var error = $root.CMsgVarField.verify(message.adjust_black); + if (message.adjust_black != null && $Object.hasOwnProperty.call(message, "adjust_black")) { + var error = $root.CMsgVarField.verify(message.adjust_black, _depth + 1); if (error) return "adjust_black." + error; } - if (message.adjust_offset != null && message.hasOwnProperty("adjust_offset")) { - var error = $root.CMsgVarField.verify(message.adjust_offset); + if (message.adjust_offset != null && $Object.hasOwnProperty.call(message, "adjust_offset")) { + var error = $root.CMsgVarField.verify(message.adjust_offset, _depth + 1); if (error) return "adjust_offset." + error; } - if (message.adjust_gamma != null && message.hasOwnProperty("adjust_gamma")) { - var error = $root.CMsgVarField.verify(message.adjust_gamma); + if (message.adjust_gamma != null && $Object.hasOwnProperty.call(message, "adjust_gamma")) { + var error = $root.CMsgVarField.verify(message.adjust_gamma, _depth + 1); if (error) return "adjust_gamma." + error; } - if (message.rotation != null && message.hasOwnProperty("rotation")) { - var error = $root.CMsgVarField.verify(message.rotation); + if (message.rotation != null && $Object.hasOwnProperty.call(message, "rotation")) { + var error = $root.CMsgVarField.verify(message.rotation, _depth + 1); if (error) return "rotation." + error; } - if (message.translate_u != null && message.hasOwnProperty("translate_u")) { - var error = $root.CMsgVarField.verify(message.translate_u); + if (message.translate_u != null && $Object.hasOwnProperty.call(message, "translate_u")) { + var error = $root.CMsgVarField.verify(message.translate_u, _depth + 1); if (error) return "translate_u." + error; } - if (message.translate_v != null && message.hasOwnProperty("translate_v")) { - var error = $root.CMsgVarField.verify(message.translate_v); + if (message.translate_v != null && $Object.hasOwnProperty.call(message, "translate_v")) { + var error = $root.CMsgVarField.verify(message.translate_v, _depth + 1); if (error) return "translate_v." + error; } - if (message.scale_uv != null && message.hasOwnProperty("scale_uv")) { - var error = $root.CMsgVarField.verify(message.scale_uv); + if (message.scale_uv != null && $Object.hasOwnProperty.call(message, "scale_uv")) { + var error = $root.CMsgVarField.verify(message.scale_uv, _depth + 1); if (error) return "scale_uv." + error; } - if (message.flip_u != null && message.hasOwnProperty("flip_u")) { - var error = $root.CMsgVarField.verify(message.flip_u); + if (message.flip_u != null && $Object.hasOwnProperty.call(message, "flip_u")) { + var error = $root.CMsgVarField.verify(message.flip_u, _depth + 1); if (error) return "flip_u." + error; } - if (message.flip_v != null && message.hasOwnProperty("flip_v")) { - var error = $root.CMsgVarField.verify(message.flip_v); + if (message.flip_v != null && $Object.hasOwnProperty.call(message, "flip_v")) { + var error = $root.CMsgVarField.verify(message.flip_v, _depth + 1); if (error) return "flip_v." + error; } @@ -7729,69 +9566,75 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_Operation_TextureStage} CMsgPaintKit_Operation_TextureStage */ - CMsgPaintKit_Operation_TextureStage.fromObject = function fromObject(object) { + CMsgPaintKit_Operation_TextureStage.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_Operation_TextureStage) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_Operation_TextureStage(); if (object.texture != null) { - if (typeof object.texture !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.texture: object expected"); - message.texture = $root.CMsgVarField.fromObject(object.texture); + if (!$util.isObject(object.texture)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.texture: object expected"); + message.texture = $root.CMsgVarField.fromObject(object.texture, _depth + 1); } if (object.texture_red != null) { - if (typeof object.texture_red !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.texture_red: object expected"); - message.texture_red = $root.CMsgVarField.fromObject(object.texture_red); + if (!$util.isObject(object.texture_red)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.texture_red: object expected"); + message.texture_red = $root.CMsgVarField.fromObject(object.texture_red, _depth + 1); } if (object.texture_blue != null) { - if (typeof object.texture_blue !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.texture_blue: object expected"); - message.texture_blue = $root.CMsgVarField.fromObject(object.texture_blue); + if (!$util.isObject(object.texture_blue)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.texture_blue: object expected"); + message.texture_blue = $root.CMsgVarField.fromObject(object.texture_blue, _depth + 1); } if (object.adjust_black != null) { - if (typeof object.adjust_black !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.adjust_black: object expected"); - message.adjust_black = $root.CMsgVarField.fromObject(object.adjust_black); + if (!$util.isObject(object.adjust_black)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.adjust_black: object expected"); + message.adjust_black = $root.CMsgVarField.fromObject(object.adjust_black, _depth + 1); } if (object.adjust_offset != null) { - if (typeof object.adjust_offset !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.adjust_offset: object expected"); - message.adjust_offset = $root.CMsgVarField.fromObject(object.adjust_offset); + if (!$util.isObject(object.adjust_offset)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.adjust_offset: object expected"); + message.adjust_offset = $root.CMsgVarField.fromObject(object.adjust_offset, _depth + 1); } if (object.adjust_gamma != null) { - if (typeof object.adjust_gamma !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.adjust_gamma: object expected"); - message.adjust_gamma = $root.CMsgVarField.fromObject(object.adjust_gamma); + if (!$util.isObject(object.adjust_gamma)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.adjust_gamma: object expected"); + message.adjust_gamma = $root.CMsgVarField.fromObject(object.adjust_gamma, _depth + 1); } if (object.rotation != null) { - if (typeof object.rotation !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.rotation: object expected"); - message.rotation = $root.CMsgVarField.fromObject(object.rotation); + if (!$util.isObject(object.rotation)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.rotation: object expected"); + message.rotation = $root.CMsgVarField.fromObject(object.rotation, _depth + 1); } if (object.translate_u != null) { - if (typeof object.translate_u !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.translate_u: object expected"); - message.translate_u = $root.CMsgVarField.fromObject(object.translate_u); + if (!$util.isObject(object.translate_u)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.translate_u: object expected"); + message.translate_u = $root.CMsgVarField.fromObject(object.translate_u, _depth + 1); } if (object.translate_v != null) { - if (typeof object.translate_v !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.translate_v: object expected"); - message.translate_v = $root.CMsgVarField.fromObject(object.translate_v); + if (!$util.isObject(object.translate_v)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.translate_v: object expected"); + message.translate_v = $root.CMsgVarField.fromObject(object.translate_v, _depth + 1); } if (object.scale_uv != null) { - if (typeof object.scale_uv !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.scale_uv: object expected"); - message.scale_uv = $root.CMsgVarField.fromObject(object.scale_uv); + if (!$util.isObject(object.scale_uv)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.scale_uv: object expected"); + message.scale_uv = $root.CMsgVarField.fromObject(object.scale_uv, _depth + 1); } if (object.flip_u != null) { - if (typeof object.flip_u !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.flip_u: object expected"); - message.flip_u = $root.CMsgVarField.fromObject(object.flip_u); + if (!$util.isObject(object.flip_u)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.flip_u: object expected"); + message.flip_u = $root.CMsgVarField.fromObject(object.flip_u, _depth + 1); } if (object.flip_v != null) { - if (typeof object.flip_v !== "object") - throw TypeError(".CMsgPaintKit_Operation_TextureStage.flip_v: object expected"); - message.flip_v = $root.CMsgVarField.fromObject(object.flip_v); + if (!$util.isObject(object.flip_v)) + throw $TypeError(".CMsgPaintKit_Operation_TextureStage.flip_v: object expected"); + message.flip_v = $root.CMsgVarField.fromObject(object.flip_v, _depth + 1); } return message; }; @@ -7805,9 +9648,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPaintKit_Operation_TextureStage.toObject = function toObject(message, options) { + CMsgPaintKit_Operation_TextureStage.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.texture = null; @@ -7823,30 +9670,30 @@ object.flip_u = null; object.flip_v = null; } - if (message.texture != null && message.hasOwnProperty("texture")) - object.texture = $root.CMsgVarField.toObject(message.texture, options); - if (message.texture_red != null && message.hasOwnProperty("texture_red")) - object.texture_red = $root.CMsgVarField.toObject(message.texture_red, options); - if (message.texture_blue != null && message.hasOwnProperty("texture_blue")) - object.texture_blue = $root.CMsgVarField.toObject(message.texture_blue, options); - if (message.adjust_black != null && message.hasOwnProperty("adjust_black")) - object.adjust_black = $root.CMsgVarField.toObject(message.adjust_black, options); - if (message.adjust_offset != null && message.hasOwnProperty("adjust_offset")) - object.adjust_offset = $root.CMsgVarField.toObject(message.adjust_offset, options); - if (message.adjust_gamma != null && message.hasOwnProperty("adjust_gamma")) - object.adjust_gamma = $root.CMsgVarField.toObject(message.adjust_gamma, options); - if (message.rotation != null && message.hasOwnProperty("rotation")) - object.rotation = $root.CMsgVarField.toObject(message.rotation, options); - if (message.translate_u != null && message.hasOwnProperty("translate_u")) - object.translate_u = $root.CMsgVarField.toObject(message.translate_u, options); - if (message.translate_v != null && message.hasOwnProperty("translate_v")) - object.translate_v = $root.CMsgVarField.toObject(message.translate_v, options); - if (message.scale_uv != null && message.hasOwnProperty("scale_uv")) - object.scale_uv = $root.CMsgVarField.toObject(message.scale_uv, options); - if (message.flip_u != null && message.hasOwnProperty("flip_u")) - object.flip_u = $root.CMsgVarField.toObject(message.flip_u, options); - if (message.flip_v != null && message.hasOwnProperty("flip_v")) - object.flip_v = $root.CMsgVarField.toObject(message.flip_v, options); + if (message.texture != null && $Object.hasOwnProperty.call(message, "texture")) + object.texture = $root.CMsgVarField.toObject(message.texture, options, _depth + 1); + if (message.texture_red != null && $Object.hasOwnProperty.call(message, "texture_red")) + object.texture_red = $root.CMsgVarField.toObject(message.texture_red, options, _depth + 1); + if (message.texture_blue != null && $Object.hasOwnProperty.call(message, "texture_blue")) + object.texture_blue = $root.CMsgVarField.toObject(message.texture_blue, options, _depth + 1); + if (message.adjust_black != null && $Object.hasOwnProperty.call(message, "adjust_black")) + object.adjust_black = $root.CMsgVarField.toObject(message.adjust_black, options, _depth + 1); + if (message.adjust_offset != null && $Object.hasOwnProperty.call(message, "adjust_offset")) + object.adjust_offset = $root.CMsgVarField.toObject(message.adjust_offset, options, _depth + 1); + if (message.adjust_gamma != null && $Object.hasOwnProperty.call(message, "adjust_gamma")) + object.adjust_gamma = $root.CMsgVarField.toObject(message.adjust_gamma, options, _depth + 1); + if (message.rotation != null && $Object.hasOwnProperty.call(message, "rotation")) + object.rotation = $root.CMsgVarField.toObject(message.rotation, options, _depth + 1); + if (message.translate_u != null && $Object.hasOwnProperty.call(message, "translate_u")) + object.translate_u = $root.CMsgVarField.toObject(message.translate_u, options, _depth + 1); + if (message.translate_v != null && $Object.hasOwnProperty.call(message, "translate_v")) + object.translate_v = $root.CMsgVarField.toObject(message.translate_v, options, _depth + 1); + if (message.scale_uv != null && $Object.hasOwnProperty.call(message, "scale_uv")) + object.scale_uv = $root.CMsgVarField.toObject(message.scale_uv, options, _depth + 1); + if (message.flip_u != null && $Object.hasOwnProperty.call(message, "flip_u")) + object.flip_u = $root.CMsgVarField.toObject(message.flip_u, options, _depth + 1); + if (message.flip_v != null && $Object.hasOwnProperty.call(message, "flip_v")) + object.flip_v = $root.CMsgVarField.toObject(message.flip_v, options, _depth + 1); return object; }; @@ -7857,8 +9704,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPaintKit_Operation_TextureStage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPaintKit_Operation_TextureStage.prototype.toJSON = function() { + return CMsgPaintKit_Operation_TextureStage.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPaintKit_Operation_TextureStage + * @function getTypeUrl + * @memberof CMsgPaintKit_Operation_TextureStage + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPaintKit_Operation_TextureStage.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_Operation_TextureStage"; }; return CMsgPaintKit_Operation_TextureStage; @@ -7866,41 +9727,66 @@ $root.CMsgPaintKit_Operation_CombineStage = (function() { + /** + * Properties of a CMsgPaintKit_Operation_CombineStage. + * @typedef {Object} CMsgPaintKit_Operation_CombineStage.$Properties + * @property {CMsgVarField.$Properties|null} [adjust_black] CMsgPaintKit_Operation_CombineStage adjust_black + * @property {CMsgVarField.$Properties|null} [adjust_offset] CMsgPaintKit_Operation_CombineStage adjust_offset + * @property {CMsgVarField.$Properties|null} [adjust_gamma] CMsgPaintKit_Operation_CombineStage adjust_gamma + * @property {CMsgVarField.$Properties|null} [rotation] CMsgPaintKit_Operation_CombineStage rotation + * @property {CMsgVarField.$Properties|null} [translate_u] CMsgPaintKit_Operation_CombineStage translate_u + * @property {CMsgVarField.$Properties|null} [translate_v] CMsgPaintKit_Operation_CombineStage translate_v + * @property {CMsgVarField.$Properties|null} [scale_uv] CMsgPaintKit_Operation_CombineStage scale_uv + * @property {CMsgVarField.$Properties|null} [flip_u] CMsgPaintKit_Operation_CombineStage flip_u + * @property {CMsgVarField.$Properties|null} [flip_v] CMsgPaintKit_Operation_CombineStage flip_v + * @property {Array.|null} [operation_node] CMsgPaintKit_Operation_CombineStage operation_node + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPaintKit_Operation_CombineStage. * @exports ICMsgPaintKit_Operation_CombineStage * @interface ICMsgPaintKit_Operation_CombineStage - * @property {ICMsgVarField|null} [adjust_black] CMsgPaintKit_Operation_CombineStage adjust_black - * @property {ICMsgVarField|null} [adjust_offset] CMsgPaintKit_Operation_CombineStage adjust_offset - * @property {ICMsgVarField|null} [adjust_gamma] CMsgPaintKit_Operation_CombineStage adjust_gamma - * @property {ICMsgVarField|null} [rotation] CMsgPaintKit_Operation_CombineStage rotation - * @property {ICMsgVarField|null} [translate_u] CMsgPaintKit_Operation_CombineStage translate_u - * @property {ICMsgVarField|null} [translate_v] CMsgPaintKit_Operation_CombineStage translate_v - * @property {ICMsgVarField|null} [scale_uv] CMsgPaintKit_Operation_CombineStage scale_uv - * @property {ICMsgVarField|null} [flip_u] CMsgPaintKit_Operation_CombineStage flip_u - * @property {ICMsgVarField|null} [flip_v] CMsgPaintKit_Operation_CombineStage flip_v - * @property {Array.|null} [operation_node] CMsgPaintKit_Operation_CombineStage operation_node + * @augments CMsgPaintKit_Operation_CombineStage.$Properties + * @deprecated Use CMsgPaintKit_Operation_CombineStage.$Properties instead. + */ + + /** + * Shape of a CMsgPaintKit_Operation_CombineStage. + * @typedef {{ + * adjust_black?: CMsgVarField.$Shape|null; + * adjust_offset?: CMsgVarField.$Shape|null; + * adjust_gamma?: CMsgVarField.$Shape|null; + * rotation?: CMsgVarField.$Shape|null; + * translate_u?: CMsgVarField.$Shape|null; + * translate_v?: CMsgVarField.$Shape|null; + * scale_uv?: CMsgVarField.$Shape|null; + * flip_u?: CMsgVarField.$Shape|null; + * flip_v?: CMsgVarField.$Shape|null; + * operation_node?: Array.|null; + * $unknowns?: Array.; + * }} CMsgPaintKit_Operation_CombineStage.$Shape */ /** * Constructs a new CMsgPaintKit_Operation_CombineStage. * @exports CMsgPaintKit_Operation_CombineStage * @classdesc Represents a CMsgPaintKit_Operation_CombineStage. - * @implements ICMsgPaintKit_Operation_CombineStage * @constructor - * @param {ICMsgPaintKit_Operation_CombineStage=} [properties] Properties to set + * @param {CMsgPaintKit_Operation_CombineStage.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPaintKit_Operation_CombineStage(properties) { + var CMsgPaintKit_Operation_CombineStage = function (properties) { this.operation_node = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPaintKit_Operation_CombineStage adjust_black. - * @member {ICMsgVarField|null|undefined} adjust_black + * @member {CMsgVarField.$Properties|null|undefined} adjust_black * @memberof CMsgPaintKit_Operation_CombineStage * @instance */ @@ -7908,7 +9794,7 @@ /** * CMsgPaintKit_Operation_CombineStage adjust_offset. - * @member {ICMsgVarField|null|undefined} adjust_offset + * @member {CMsgVarField.$Properties|null|undefined} adjust_offset * @memberof CMsgPaintKit_Operation_CombineStage * @instance */ @@ -7916,7 +9802,7 @@ /** * CMsgPaintKit_Operation_CombineStage adjust_gamma. - * @member {ICMsgVarField|null|undefined} adjust_gamma + * @member {CMsgVarField.$Properties|null|undefined} adjust_gamma * @memberof CMsgPaintKit_Operation_CombineStage * @instance */ @@ -7924,7 +9810,7 @@ /** * CMsgPaintKit_Operation_CombineStage rotation. - * @member {ICMsgVarField|null|undefined} rotation + * @member {CMsgVarField.$Properties|null|undefined} rotation * @memberof CMsgPaintKit_Operation_CombineStage * @instance */ @@ -7932,7 +9818,7 @@ /** * CMsgPaintKit_Operation_CombineStage translate_u. - * @member {ICMsgVarField|null|undefined} translate_u + * @member {CMsgVarField.$Properties|null|undefined} translate_u * @memberof CMsgPaintKit_Operation_CombineStage * @instance */ @@ -7940,7 +9826,7 @@ /** * CMsgPaintKit_Operation_CombineStage translate_v. - * @member {ICMsgVarField|null|undefined} translate_v + * @member {CMsgVarField.$Properties|null|undefined} translate_v * @memberof CMsgPaintKit_Operation_CombineStage * @instance */ @@ -7948,7 +9834,7 @@ /** * CMsgPaintKit_Operation_CombineStage scale_uv. - * @member {ICMsgVarField|null|undefined} scale_uv + * @member {CMsgVarField.$Properties|null|undefined} scale_uv * @memberof CMsgPaintKit_Operation_CombineStage * @instance */ @@ -7956,7 +9842,7 @@ /** * CMsgPaintKit_Operation_CombineStage flip_u. - * @member {ICMsgVarField|null|undefined} flip_u + * @member {CMsgVarField.$Properties|null|undefined} flip_u * @memberof CMsgPaintKit_Operation_CombineStage * @instance */ @@ -7964,7 +9850,7 @@ /** * CMsgPaintKit_Operation_CombineStage flip_v. - * @member {ICMsgVarField|null|undefined} flip_v + * @member {CMsgVarField.$Properties|null|undefined} flip_v * @memberof CMsgPaintKit_Operation_CombineStage * @instance */ @@ -7972,7 +9858,7 @@ /** * CMsgPaintKit_Operation_CombineStage operation_node. - * @member {Array.} operation_node + * @member {Array.} operation_node * @memberof CMsgPaintKit_Operation_CombineStage * @instance */ @@ -7983,10 +9869,14 @@ * @function create * @memberof CMsgPaintKit_Operation_CombineStage * @static - * @param {ICMsgPaintKit_Operation_CombineStage=} [properties] Properties to set + * @param {CMsgPaintKit_Operation_CombineStage.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_Operation_CombineStage} CMsgPaintKit_Operation_CombineStage instance + * @type {{ + * (properties: CMsgPaintKit_Operation_CombineStage.$Shape): CMsgPaintKit_Operation_CombineStage & CMsgPaintKit_Operation_CombineStage.$Shape; + * (properties?: CMsgPaintKit_Operation_CombineStage.$Properties): CMsgPaintKit_Operation_CombineStage; + * }} */ - CMsgPaintKit_Operation_CombineStage.create = function create(properties) { + CMsgPaintKit_Operation_CombineStage.create = function(properties) { return new CMsgPaintKit_Operation_CombineStage(properties); }; @@ -7995,34 +9885,41 @@ * @function encode * @memberof CMsgPaintKit_Operation_CombineStage * @static - * @param {ICMsgPaintKit_Operation_CombineStage} message CMsgPaintKit_Operation_CombineStage message or plain object to encode + * @param {CMsgPaintKit_Operation_CombineStage.$Properties} message CMsgPaintKit_Operation_CombineStage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation_CombineStage.encode = function encode(message, writer) { + CMsgPaintKit_Operation_CombineStage.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.adjust_black != null && Object.hasOwnProperty.call(message, "adjust_black")) - $root.CMsgVarField.encode(message.adjust_black, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.adjust_offset != null && Object.hasOwnProperty.call(message, "adjust_offset")) - $root.CMsgVarField.encode(message.adjust_offset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.adjust_gamma != null && Object.hasOwnProperty.call(message, "adjust_gamma")) - $root.CMsgVarField.encode(message.adjust_gamma, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.rotation != null && Object.hasOwnProperty.call(message, "rotation")) - $root.CMsgVarField.encode(message.rotation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.translate_u != null && Object.hasOwnProperty.call(message, "translate_u")) - $root.CMsgVarField.encode(message.translate_u, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.translate_v != null && Object.hasOwnProperty.call(message, "translate_v")) - $root.CMsgVarField.encode(message.translate_v, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.scale_uv != null && Object.hasOwnProperty.call(message, "scale_uv")) - $root.CMsgVarField.encode(message.scale_uv, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.flip_u != null && Object.hasOwnProperty.call(message, "flip_u")) - $root.CMsgVarField.encode(message.flip_u, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.flip_v != null && Object.hasOwnProperty.call(message, "flip_v")) - $root.CMsgVarField.encode(message.flip_v, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.adjust_black != null && $Object.hasOwnProperty.call(message, "adjust_black")) + $root.CMsgVarField.encode(message.adjust_black, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.adjust_offset != null && $Object.hasOwnProperty.call(message, "adjust_offset")) + $root.CMsgVarField.encode(message.adjust_offset, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.adjust_gamma != null && $Object.hasOwnProperty.call(message, "adjust_gamma")) + $root.CMsgVarField.encode(message.adjust_gamma, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.rotation != null && $Object.hasOwnProperty.call(message, "rotation")) + $root.CMsgVarField.encode(message.rotation, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.translate_u != null && $Object.hasOwnProperty.call(message, "translate_u")) + $root.CMsgVarField.encode(message.translate_u, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.translate_v != null && $Object.hasOwnProperty.call(message, "translate_v")) + $root.CMsgVarField.encode(message.translate_v, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.scale_uv != null && $Object.hasOwnProperty.call(message, "scale_uv")) + $root.CMsgVarField.encode(message.scale_uv, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.flip_u != null && $Object.hasOwnProperty.call(message, "flip_u")) + $root.CMsgVarField.encode(message.flip_u, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.flip_v != null && $Object.hasOwnProperty.call(message, "flip_v")) + $root.CMsgVarField.encode(message.flip_v, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); if (message.operation_node != null && message.operation_node.length) for (var i = 0; i < message.operation_node.length; ++i) - $root.CMsgPaintKit_OperationNode.encode(message.operation_node[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.CMsgPaintKit_OperationNode.encode(message.operation_node[i], writer.uint32(/* id 11, wireType 2 =*/90).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8031,12 +9928,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_Operation_CombineStage * @static - * @param {ICMsgPaintKit_Operation_CombineStage} message CMsgPaintKit_Operation_CombineStage message or plain object to encode + * @param {CMsgPaintKit_Operation_CombineStage.$Properties} message CMsgPaintKit_Operation_CombineStage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation_CombineStage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPaintKit_Operation_CombineStage.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8046,54 +9943,98 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_Operation_CombineStage} CMsgPaintKit_Operation_CombineStage + * @returns {CMsgPaintKit_Operation_CombineStage & CMsgPaintKit_Operation_CombineStage.$Shape} CMsgPaintKit_Operation_CombineStage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation_CombineStage.decode = function decode(reader, length) { + CMsgPaintKit_Operation_CombineStage.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_Operation_CombineStage(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_Operation_CombineStage(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.adjust_black = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 2: - message.adjust_offset = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 3: - message.adjust_gamma = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 4: - message.rotation = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 5: - message.translate_u = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 6: - message.translate_v = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 7: - message.scale_uv = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 8: - message.flip_u = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 9: - message.flip_v = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 11: - if (!(message.operation_node && message.operation_node.length)) - message.operation_node = []; - message.operation_node.push($root.CMsgPaintKit_OperationNode.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.adjust_black = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.adjust_black); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.adjust_offset = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.adjust_offset); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.adjust_gamma = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.adjust_gamma); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.rotation = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.rotation); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.translate_u = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.translate_u); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.translate_v = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.translate_v); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.scale_uv = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.scale_uv); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.flip_u = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.flip_u); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.flip_v = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.flip_v); + continue; + } + case 11: { + if (wireType !== 2) + break; + if (!(message.operation_node && message.operation_node.length)) + message.operation_node = []; + message.operation_node.push($root.CMsgPaintKit_OperationNode.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8103,11 +10044,11 @@ * @memberof CMsgPaintKit_Operation_CombineStage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_Operation_CombineStage} CMsgPaintKit_Operation_CombineStage + * @returns {CMsgPaintKit_Operation_CombineStage & CMsgPaintKit_Operation_CombineStage.$Shape} CMsgPaintKit_Operation_CombineStage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation_CombineStage.decodeDelimited = function decodeDelimited(reader) { + CMsgPaintKit_Operation_CombineStage.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8121,59 +10062,63 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPaintKit_Operation_CombineStage.verify = function verify(message) { + CMsgPaintKit_Operation_CombineStage.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.adjust_black != null && message.hasOwnProperty("adjust_black")) { - var error = $root.CMsgVarField.verify(message.adjust_black); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.adjust_black != null && $Object.hasOwnProperty.call(message, "adjust_black")) { + var error = $root.CMsgVarField.verify(message.adjust_black, _depth + 1); if (error) return "adjust_black." + error; } - if (message.adjust_offset != null && message.hasOwnProperty("adjust_offset")) { - var error = $root.CMsgVarField.verify(message.adjust_offset); + if (message.adjust_offset != null && $Object.hasOwnProperty.call(message, "adjust_offset")) { + var error = $root.CMsgVarField.verify(message.adjust_offset, _depth + 1); if (error) return "adjust_offset." + error; } - if (message.adjust_gamma != null && message.hasOwnProperty("adjust_gamma")) { - var error = $root.CMsgVarField.verify(message.adjust_gamma); + if (message.adjust_gamma != null && $Object.hasOwnProperty.call(message, "adjust_gamma")) { + var error = $root.CMsgVarField.verify(message.adjust_gamma, _depth + 1); if (error) return "adjust_gamma." + error; } - if (message.rotation != null && message.hasOwnProperty("rotation")) { - var error = $root.CMsgVarField.verify(message.rotation); + if (message.rotation != null && $Object.hasOwnProperty.call(message, "rotation")) { + var error = $root.CMsgVarField.verify(message.rotation, _depth + 1); if (error) return "rotation." + error; } - if (message.translate_u != null && message.hasOwnProperty("translate_u")) { - var error = $root.CMsgVarField.verify(message.translate_u); + if (message.translate_u != null && $Object.hasOwnProperty.call(message, "translate_u")) { + var error = $root.CMsgVarField.verify(message.translate_u, _depth + 1); if (error) return "translate_u." + error; } - if (message.translate_v != null && message.hasOwnProperty("translate_v")) { - var error = $root.CMsgVarField.verify(message.translate_v); + if (message.translate_v != null && $Object.hasOwnProperty.call(message, "translate_v")) { + var error = $root.CMsgVarField.verify(message.translate_v, _depth + 1); if (error) return "translate_v." + error; } - if (message.scale_uv != null && message.hasOwnProperty("scale_uv")) { - var error = $root.CMsgVarField.verify(message.scale_uv); + if (message.scale_uv != null && $Object.hasOwnProperty.call(message, "scale_uv")) { + var error = $root.CMsgVarField.verify(message.scale_uv, _depth + 1); if (error) return "scale_uv." + error; } - if (message.flip_u != null && message.hasOwnProperty("flip_u")) { - var error = $root.CMsgVarField.verify(message.flip_u); + if (message.flip_u != null && $Object.hasOwnProperty.call(message, "flip_u")) { + var error = $root.CMsgVarField.verify(message.flip_u, _depth + 1); if (error) return "flip_u." + error; } - if (message.flip_v != null && message.hasOwnProperty("flip_v")) { - var error = $root.CMsgVarField.verify(message.flip_v); + if (message.flip_v != null && $Object.hasOwnProperty.call(message, "flip_v")) { + var error = $root.CMsgVarField.verify(message.flip_v, _depth + 1); if (error) return "flip_v." + error; } - if (message.operation_node != null && message.hasOwnProperty("operation_node")) { - if (!Array.isArray(message.operation_node)) + if (message.operation_node != null && $Object.hasOwnProperty.call(message, "operation_node")) { + if (!$Array.isArray(message.operation_node)) return "operation_node: array expected"; for (var i = 0; i < message.operation_node.length; ++i) { - var error = $root.CMsgPaintKit_OperationNode.verify(message.operation_node[i]); + var error = $root.CMsgPaintKit_OperationNode.verify(message.operation_node[i], _depth + 1); if (error) return "operation_node." + error; } @@ -8189,63 +10134,69 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_Operation_CombineStage} CMsgPaintKit_Operation_CombineStage */ - CMsgPaintKit_Operation_CombineStage.fromObject = function fromObject(object) { + CMsgPaintKit_Operation_CombineStage.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_Operation_CombineStage) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_Operation_CombineStage(); if (object.adjust_black != null) { - if (typeof object.adjust_black !== "object") - throw TypeError(".CMsgPaintKit_Operation_CombineStage.adjust_black: object expected"); - message.adjust_black = $root.CMsgVarField.fromObject(object.adjust_black); + if (!$util.isObject(object.adjust_black)) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage.adjust_black: object expected"); + message.adjust_black = $root.CMsgVarField.fromObject(object.adjust_black, _depth + 1); } if (object.adjust_offset != null) { - if (typeof object.adjust_offset !== "object") - throw TypeError(".CMsgPaintKit_Operation_CombineStage.adjust_offset: object expected"); - message.adjust_offset = $root.CMsgVarField.fromObject(object.adjust_offset); + if (!$util.isObject(object.adjust_offset)) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage.adjust_offset: object expected"); + message.adjust_offset = $root.CMsgVarField.fromObject(object.adjust_offset, _depth + 1); } if (object.adjust_gamma != null) { - if (typeof object.adjust_gamma !== "object") - throw TypeError(".CMsgPaintKit_Operation_CombineStage.adjust_gamma: object expected"); - message.adjust_gamma = $root.CMsgVarField.fromObject(object.adjust_gamma); + if (!$util.isObject(object.adjust_gamma)) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage.adjust_gamma: object expected"); + message.adjust_gamma = $root.CMsgVarField.fromObject(object.adjust_gamma, _depth + 1); } if (object.rotation != null) { - if (typeof object.rotation !== "object") - throw TypeError(".CMsgPaintKit_Operation_CombineStage.rotation: object expected"); - message.rotation = $root.CMsgVarField.fromObject(object.rotation); + if (!$util.isObject(object.rotation)) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage.rotation: object expected"); + message.rotation = $root.CMsgVarField.fromObject(object.rotation, _depth + 1); } if (object.translate_u != null) { - if (typeof object.translate_u !== "object") - throw TypeError(".CMsgPaintKit_Operation_CombineStage.translate_u: object expected"); - message.translate_u = $root.CMsgVarField.fromObject(object.translate_u); + if (!$util.isObject(object.translate_u)) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage.translate_u: object expected"); + message.translate_u = $root.CMsgVarField.fromObject(object.translate_u, _depth + 1); } if (object.translate_v != null) { - if (typeof object.translate_v !== "object") - throw TypeError(".CMsgPaintKit_Operation_CombineStage.translate_v: object expected"); - message.translate_v = $root.CMsgVarField.fromObject(object.translate_v); + if (!$util.isObject(object.translate_v)) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage.translate_v: object expected"); + message.translate_v = $root.CMsgVarField.fromObject(object.translate_v, _depth + 1); } if (object.scale_uv != null) { - if (typeof object.scale_uv !== "object") - throw TypeError(".CMsgPaintKit_Operation_CombineStage.scale_uv: object expected"); - message.scale_uv = $root.CMsgVarField.fromObject(object.scale_uv); + if (!$util.isObject(object.scale_uv)) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage.scale_uv: object expected"); + message.scale_uv = $root.CMsgVarField.fromObject(object.scale_uv, _depth + 1); } if (object.flip_u != null) { - if (typeof object.flip_u !== "object") - throw TypeError(".CMsgPaintKit_Operation_CombineStage.flip_u: object expected"); - message.flip_u = $root.CMsgVarField.fromObject(object.flip_u); + if (!$util.isObject(object.flip_u)) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage.flip_u: object expected"); + message.flip_u = $root.CMsgVarField.fromObject(object.flip_u, _depth + 1); } if (object.flip_v != null) { - if (typeof object.flip_v !== "object") - throw TypeError(".CMsgPaintKit_Operation_CombineStage.flip_v: object expected"); - message.flip_v = $root.CMsgVarField.fromObject(object.flip_v); + if (!$util.isObject(object.flip_v)) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage.flip_v: object expected"); + message.flip_v = $root.CMsgVarField.fromObject(object.flip_v, _depth + 1); } if (object.operation_node) { - if (!Array.isArray(object.operation_node)) - throw TypeError(".CMsgPaintKit_Operation_CombineStage.operation_node: array expected"); - message.operation_node = []; + if (!$Array.isArray(object.operation_node)) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage.operation_node: array expected"); + message.operation_node = $Array(object.operation_node.length); for (var i = 0; i < object.operation_node.length; ++i) { - if (typeof object.operation_node[i] !== "object") - throw TypeError(".CMsgPaintKit_Operation_CombineStage.operation_node: object expected"); - message.operation_node[i] = $root.CMsgPaintKit_OperationNode.fromObject(object.operation_node[i]); + if (!$util.isObject(object.operation_node[i])) + throw $TypeError(".CMsgPaintKit_Operation_CombineStage.operation_node: object expected"); + message.operation_node[i] = $root.CMsgPaintKit_OperationNode.fromObject(object.operation_node[i], _depth + 1); } } return message; @@ -8260,9 +10211,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPaintKit_Operation_CombineStage.toObject = function toObject(message, options) { + CMsgPaintKit_Operation_CombineStage.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.operation_node = []; @@ -8277,28 +10232,28 @@ object.flip_u = null; object.flip_v = null; } - if (message.adjust_black != null && message.hasOwnProperty("adjust_black")) - object.adjust_black = $root.CMsgVarField.toObject(message.adjust_black, options); - if (message.adjust_offset != null && message.hasOwnProperty("adjust_offset")) - object.adjust_offset = $root.CMsgVarField.toObject(message.adjust_offset, options); - if (message.adjust_gamma != null && message.hasOwnProperty("adjust_gamma")) - object.adjust_gamma = $root.CMsgVarField.toObject(message.adjust_gamma, options); - if (message.rotation != null && message.hasOwnProperty("rotation")) - object.rotation = $root.CMsgVarField.toObject(message.rotation, options); - if (message.translate_u != null && message.hasOwnProperty("translate_u")) - object.translate_u = $root.CMsgVarField.toObject(message.translate_u, options); - if (message.translate_v != null && message.hasOwnProperty("translate_v")) - object.translate_v = $root.CMsgVarField.toObject(message.translate_v, options); - if (message.scale_uv != null && message.hasOwnProperty("scale_uv")) - object.scale_uv = $root.CMsgVarField.toObject(message.scale_uv, options); - if (message.flip_u != null && message.hasOwnProperty("flip_u")) - object.flip_u = $root.CMsgVarField.toObject(message.flip_u, options); - if (message.flip_v != null && message.hasOwnProperty("flip_v")) - object.flip_v = $root.CMsgVarField.toObject(message.flip_v, options); + if (message.adjust_black != null && $Object.hasOwnProperty.call(message, "adjust_black")) + object.adjust_black = $root.CMsgVarField.toObject(message.adjust_black, options, _depth + 1); + if (message.adjust_offset != null && $Object.hasOwnProperty.call(message, "adjust_offset")) + object.adjust_offset = $root.CMsgVarField.toObject(message.adjust_offset, options, _depth + 1); + if (message.adjust_gamma != null && $Object.hasOwnProperty.call(message, "adjust_gamma")) + object.adjust_gamma = $root.CMsgVarField.toObject(message.adjust_gamma, options, _depth + 1); + if (message.rotation != null && $Object.hasOwnProperty.call(message, "rotation")) + object.rotation = $root.CMsgVarField.toObject(message.rotation, options, _depth + 1); + if (message.translate_u != null && $Object.hasOwnProperty.call(message, "translate_u")) + object.translate_u = $root.CMsgVarField.toObject(message.translate_u, options, _depth + 1); + if (message.translate_v != null && $Object.hasOwnProperty.call(message, "translate_v")) + object.translate_v = $root.CMsgVarField.toObject(message.translate_v, options, _depth + 1); + if (message.scale_uv != null && $Object.hasOwnProperty.call(message, "scale_uv")) + object.scale_uv = $root.CMsgVarField.toObject(message.scale_uv, options, _depth + 1); + if (message.flip_u != null && $Object.hasOwnProperty.call(message, "flip_u")) + object.flip_u = $root.CMsgVarField.toObject(message.flip_u, options, _depth + 1); + if (message.flip_v != null && $Object.hasOwnProperty.call(message, "flip_v")) + object.flip_v = $root.CMsgVarField.toObject(message.flip_v, options, _depth + 1); if (message.operation_node && message.operation_node.length) { - object.operation_node = []; + object.operation_node = $Array(message.operation_node.length); for (var j = 0; j < message.operation_node.length; ++j) - object.operation_node[j] = $root.CMsgPaintKit_OperationNode.toObject(message.operation_node[j], options); + object.operation_node[j] = $root.CMsgPaintKit_OperationNode.toObject(message.operation_node[j], options, _depth + 1); } return object; }; @@ -8310,8 +10265,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPaintKit_Operation_CombineStage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPaintKit_Operation_CombineStage.prototype.toJSON = function() { + return CMsgPaintKit_Operation_CombineStage.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPaintKit_Operation_CombineStage + * @function getTypeUrl + * @memberof CMsgPaintKit_Operation_CombineStage + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPaintKit_Operation_CombineStage.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_Operation_CombineStage"; }; return CMsgPaintKit_Operation_CombineStage; @@ -8319,33 +10288,50 @@ $root.CMsgPaintKit_Operation_SelectStage = (function() { + /** + * Properties of a CMsgPaintKit_Operation_SelectStage. + * @typedef {Object} CMsgPaintKit_Operation_SelectStage.$Properties + * @property {CMsgVarField.$Properties|null} [groups] CMsgPaintKit_Operation_SelectStage groups + * @property {Array.|null} [select] CMsgPaintKit_Operation_SelectStage select + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPaintKit_Operation_SelectStage. * @exports ICMsgPaintKit_Operation_SelectStage * @interface ICMsgPaintKit_Operation_SelectStage - * @property {ICMsgVarField|null} [groups] CMsgPaintKit_Operation_SelectStage groups - * @property {Array.|null} [select] CMsgPaintKit_Operation_SelectStage select + * @augments CMsgPaintKit_Operation_SelectStage.$Properties + * @deprecated Use CMsgPaintKit_Operation_SelectStage.$Properties instead. + */ + + /** + * Shape of a CMsgPaintKit_Operation_SelectStage. + * @typedef {{ + * groups?: CMsgVarField.$Shape|null; + * select?: Array.|null; + * $unknowns?: Array.; + * }} CMsgPaintKit_Operation_SelectStage.$Shape */ /** * Constructs a new CMsgPaintKit_Operation_SelectStage. * @exports CMsgPaintKit_Operation_SelectStage * @classdesc Represents a CMsgPaintKit_Operation_SelectStage. - * @implements ICMsgPaintKit_Operation_SelectStage * @constructor - * @param {ICMsgPaintKit_Operation_SelectStage=} [properties] Properties to set + * @param {CMsgPaintKit_Operation_SelectStage.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPaintKit_Operation_SelectStage(properties) { + var CMsgPaintKit_Operation_SelectStage = function (properties) { this.select = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPaintKit_Operation_SelectStage groups. - * @member {ICMsgVarField|null|undefined} groups + * @member {CMsgVarField.$Properties|null|undefined} groups * @memberof CMsgPaintKit_Operation_SelectStage * @instance */ @@ -8353,7 +10339,7 @@ /** * CMsgPaintKit_Operation_SelectStage select. - * @member {Array.} select + * @member {Array.} select * @memberof CMsgPaintKit_Operation_SelectStage * @instance */ @@ -8364,10 +10350,14 @@ * @function create * @memberof CMsgPaintKit_Operation_SelectStage * @static - * @param {ICMsgPaintKit_Operation_SelectStage=} [properties] Properties to set + * @param {CMsgPaintKit_Operation_SelectStage.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_Operation_SelectStage} CMsgPaintKit_Operation_SelectStage instance + * @type {{ + * (properties: CMsgPaintKit_Operation_SelectStage.$Shape): CMsgPaintKit_Operation_SelectStage & CMsgPaintKit_Operation_SelectStage.$Shape; + * (properties?: CMsgPaintKit_Operation_SelectStage.$Properties): CMsgPaintKit_Operation_SelectStage; + * }} */ - CMsgPaintKit_Operation_SelectStage.create = function create(properties) { + CMsgPaintKit_Operation_SelectStage.create = function(properties) { return new CMsgPaintKit_Operation_SelectStage(properties); }; @@ -8376,18 +10366,25 @@ * @function encode * @memberof CMsgPaintKit_Operation_SelectStage * @static - * @param {ICMsgPaintKit_Operation_SelectStage} message CMsgPaintKit_Operation_SelectStage message or plain object to encode + * @param {CMsgPaintKit_Operation_SelectStage.$Properties} message CMsgPaintKit_Operation_SelectStage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation_SelectStage.encode = function encode(message, writer) { + CMsgPaintKit_Operation_SelectStage.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.groups != null && Object.hasOwnProperty.call(message, "groups")) - $root.CMsgVarField.encode(message.groups, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.groups != null && $Object.hasOwnProperty.call(message, "groups")) + $root.CMsgVarField.encode(message.groups, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); if (message.select != null && message.select.length) for (var i = 0; i < message.select.length; ++i) - $root.CMsgVarField.encode(message.select[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgVarField.encode(message.select[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8396,12 +10393,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_Operation_SelectStage * @static - * @param {ICMsgPaintKit_Operation_SelectStage} message CMsgPaintKit_Operation_SelectStage message or plain object to encode + * @param {CMsgPaintKit_Operation_SelectStage.$Properties} message CMsgPaintKit_Operation_SelectStage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation_SelectStage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPaintKit_Operation_SelectStage.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8411,44 +10408,64 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_Operation_SelectStage} CMsgPaintKit_Operation_SelectStage + * @returns {CMsgPaintKit_Operation_SelectStage & CMsgPaintKit_Operation_SelectStage.$Shape} CMsgPaintKit_Operation_SelectStage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation_SelectStage.decode = function decode(reader, length) { + CMsgPaintKit_Operation_SelectStage.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_Operation_SelectStage(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_Operation_SelectStage(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groups = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.select && message.select.length)) - message.select = []; - message.select.push($root.CMsgVarField.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } - } - return message; - }; - + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.groups = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.groups); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.select && message.select.length)) + message.select = []; + message.select.push($root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + /** * Decodes a CMsgPaintKit_Operation_SelectStage message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof CMsgPaintKit_Operation_SelectStage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_Operation_SelectStage} CMsgPaintKit_Operation_SelectStage + * @returns {CMsgPaintKit_Operation_SelectStage & CMsgPaintKit_Operation_SelectStage.$Shape} CMsgPaintKit_Operation_SelectStage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation_SelectStage.decodeDelimited = function decodeDelimited(reader) { + CMsgPaintKit_Operation_SelectStage.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8462,19 +10479,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPaintKit_Operation_SelectStage.verify = function verify(message) { + CMsgPaintKit_Operation_SelectStage.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groups != null && message.hasOwnProperty("groups")) { - var error = $root.CMsgVarField.verify(message.groups); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.groups != null && $Object.hasOwnProperty.call(message, "groups")) { + var error = $root.CMsgVarField.verify(message.groups, _depth + 1); if (error) return "groups." + error; } - if (message.select != null && message.hasOwnProperty("select")) { - if (!Array.isArray(message.select)) + if (message.select != null && $Object.hasOwnProperty.call(message, "select")) { + if (!$Array.isArray(message.select)) return "select: array expected"; for (var i = 0; i < message.select.length; ++i) { - var error = $root.CMsgVarField.verify(message.select[i]); + var error = $root.CMsgVarField.verify(message.select[i], _depth + 1); if (error) return "select." + error; } @@ -8490,23 +10511,29 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_Operation_SelectStage} CMsgPaintKit_Operation_SelectStage */ - CMsgPaintKit_Operation_SelectStage.fromObject = function fromObject(object) { + CMsgPaintKit_Operation_SelectStage.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_Operation_SelectStage) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_Operation_SelectStage: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_Operation_SelectStage(); if (object.groups != null) { - if (typeof object.groups !== "object") - throw TypeError(".CMsgPaintKit_Operation_SelectStage.groups: object expected"); - message.groups = $root.CMsgVarField.fromObject(object.groups); + if (!$util.isObject(object.groups)) + throw $TypeError(".CMsgPaintKit_Operation_SelectStage.groups: object expected"); + message.groups = $root.CMsgVarField.fromObject(object.groups, _depth + 1); } if (object.select) { - if (!Array.isArray(object.select)) - throw TypeError(".CMsgPaintKit_Operation_SelectStage.select: array expected"); - message.select = []; + if (!$Array.isArray(object.select)) + throw $TypeError(".CMsgPaintKit_Operation_SelectStage.select: array expected"); + message.select = $Array(object.select.length); for (var i = 0; i < object.select.length; ++i) { - if (typeof object.select[i] !== "object") - throw TypeError(".CMsgPaintKit_Operation_SelectStage.select: object expected"); - message.select[i] = $root.CMsgVarField.fromObject(object.select[i]); + if (!$util.isObject(object.select[i])) + throw $TypeError(".CMsgPaintKit_Operation_SelectStage.select: object expected"); + message.select[i] = $root.CMsgVarField.fromObject(object.select[i], _depth + 1); } } return message; @@ -8521,20 +10548,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPaintKit_Operation_SelectStage.toObject = function toObject(message, options) { + CMsgPaintKit_Operation_SelectStage.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.select = []; if (options.defaults) object.groups = null; - if (message.groups != null && message.hasOwnProperty("groups")) - object.groups = $root.CMsgVarField.toObject(message.groups, options); + if (message.groups != null && $Object.hasOwnProperty.call(message, "groups")) + object.groups = $root.CMsgVarField.toObject(message.groups, options, _depth + 1); if (message.select && message.select.length) { - object.select = []; + object.select = $Array(message.select.length); for (var j = 0; j < message.select.length; ++j) - object.select[j] = $root.CMsgVarField.toObject(message.select[j], options); + object.select[j] = $root.CMsgVarField.toObject(message.select[j], options, _depth + 1); } return object; }; @@ -8546,8 +10577,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPaintKit_Operation_SelectStage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPaintKit_Operation_SelectStage.prototype.toJSON = function() { + return CMsgPaintKit_Operation_SelectStage.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPaintKit_Operation_SelectStage + * @function getTypeUrl + * @memberof CMsgPaintKit_Operation_SelectStage + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPaintKit_Operation_SelectStage.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_Operation_SelectStage"; }; return CMsgPaintKit_Operation_SelectStage; @@ -8555,33 +10600,51 @@ $root.CMsgPaintKit_Operation_Sticker = (function() { + /** + * Properties of a CMsgPaintKit_Operation_Sticker. + * @typedef {Object} CMsgPaintKit_Operation_Sticker.$Properties + * @property {CMsgVarField.$Properties|null} [base] CMsgPaintKit_Operation_Sticker base + * @property {CMsgVarField.$Properties|null} [weight] CMsgPaintKit_Operation_Sticker weight + * @property {CMsgVarField.$Properties|null} [spec] CMsgPaintKit_Operation_Sticker spec + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPaintKit_Operation_Sticker. * @exports ICMsgPaintKit_Operation_Sticker * @interface ICMsgPaintKit_Operation_Sticker - * @property {ICMsgVarField|null} [base] CMsgPaintKit_Operation_Sticker base - * @property {ICMsgVarField|null} [weight] CMsgPaintKit_Operation_Sticker weight - * @property {ICMsgVarField|null} [spec] CMsgPaintKit_Operation_Sticker spec + * @augments CMsgPaintKit_Operation_Sticker.$Properties + * @deprecated Use CMsgPaintKit_Operation_Sticker.$Properties instead. + */ + + /** + * Shape of a CMsgPaintKit_Operation_Sticker. + * @typedef {{ + * base?: CMsgVarField.$Shape|null; + * weight?: CMsgVarField.$Shape|null; + * spec?: CMsgVarField.$Shape|null; + * $unknowns?: Array.; + * }} CMsgPaintKit_Operation_Sticker.$Shape */ /** * Constructs a new CMsgPaintKit_Operation_Sticker. * @exports CMsgPaintKit_Operation_Sticker * @classdesc Represents a CMsgPaintKit_Operation_Sticker. - * @implements ICMsgPaintKit_Operation_Sticker * @constructor - * @param {ICMsgPaintKit_Operation_Sticker=} [properties] Properties to set + * @param {CMsgPaintKit_Operation_Sticker.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPaintKit_Operation_Sticker(properties) { + var CMsgPaintKit_Operation_Sticker = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPaintKit_Operation_Sticker base. - * @member {ICMsgVarField|null|undefined} base + * @member {CMsgVarField.$Properties|null|undefined} base * @memberof CMsgPaintKit_Operation_Sticker * @instance */ @@ -8589,7 +10652,7 @@ /** * CMsgPaintKit_Operation_Sticker weight. - * @member {ICMsgVarField|null|undefined} weight + * @member {CMsgVarField.$Properties|null|undefined} weight * @memberof CMsgPaintKit_Operation_Sticker * @instance */ @@ -8597,7 +10660,7 @@ /** * CMsgPaintKit_Operation_Sticker spec. - * @member {ICMsgVarField|null|undefined} spec + * @member {CMsgVarField.$Properties|null|undefined} spec * @memberof CMsgPaintKit_Operation_Sticker * @instance */ @@ -8608,10 +10671,14 @@ * @function create * @memberof CMsgPaintKit_Operation_Sticker * @static - * @param {ICMsgPaintKit_Operation_Sticker=} [properties] Properties to set + * @param {CMsgPaintKit_Operation_Sticker.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_Operation_Sticker} CMsgPaintKit_Operation_Sticker instance + * @type {{ + * (properties: CMsgPaintKit_Operation_Sticker.$Shape): CMsgPaintKit_Operation_Sticker & CMsgPaintKit_Operation_Sticker.$Shape; + * (properties?: CMsgPaintKit_Operation_Sticker.$Properties): CMsgPaintKit_Operation_Sticker; + * }} */ - CMsgPaintKit_Operation_Sticker.create = function create(properties) { + CMsgPaintKit_Operation_Sticker.create = function(properties) { return new CMsgPaintKit_Operation_Sticker(properties); }; @@ -8620,19 +10687,26 @@ * @function encode * @memberof CMsgPaintKit_Operation_Sticker * @static - * @param {ICMsgPaintKit_Operation_Sticker} message CMsgPaintKit_Operation_Sticker message or plain object to encode + * @param {CMsgPaintKit_Operation_Sticker.$Properties} message CMsgPaintKit_Operation_Sticker message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation_Sticker.encode = function encode(message, writer) { + CMsgPaintKit_Operation_Sticker.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.base != null && Object.hasOwnProperty.call(message, "base")) - $root.CMsgVarField.encode(message.base, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - $root.CMsgVarField.encode(message.weight, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.spec != null && Object.hasOwnProperty.call(message, "spec")) - $root.CMsgVarField.encode(message.spec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.base != null && $Object.hasOwnProperty.call(message, "base")) + $root.CMsgVarField.encode(message.base, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.weight != null && $Object.hasOwnProperty.call(message, "weight")) + $root.CMsgVarField.encode(message.weight, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.spec != null && $Object.hasOwnProperty.call(message, "spec")) + $root.CMsgVarField.encode(message.spec, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8641,12 +10715,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_Operation_Sticker * @static - * @param {ICMsgPaintKit_Operation_Sticker} message CMsgPaintKit_Operation_Sticker message or plain object to encode + * @param {CMsgPaintKit_Operation_Sticker.$Properties} message CMsgPaintKit_Operation_Sticker message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation_Sticker.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPaintKit_Operation_Sticker.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8656,31 +10730,54 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_Operation_Sticker} CMsgPaintKit_Operation_Sticker + * @returns {CMsgPaintKit_Operation_Sticker & CMsgPaintKit_Operation_Sticker.$Shape} CMsgPaintKit_Operation_Sticker * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation_Sticker.decode = function decode(reader, length) { + CMsgPaintKit_Operation_Sticker.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_Operation_Sticker(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_Operation_Sticker(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 2: - message.weight = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 3: - message.spec = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.base = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.base); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.weight = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.weight); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.spec = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.spec); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -8690,11 +10787,11 @@ * @memberof CMsgPaintKit_Operation_Sticker * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_Operation_Sticker} CMsgPaintKit_Operation_Sticker + * @returns {CMsgPaintKit_Operation_Sticker & CMsgPaintKit_Operation_Sticker.$Shape} CMsgPaintKit_Operation_Sticker * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation_Sticker.decodeDelimited = function decodeDelimited(reader) { + CMsgPaintKit_Operation_Sticker.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -8708,21 +10805,25 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPaintKit_Operation_Sticker.verify = function verify(message) { + CMsgPaintKit_Operation_Sticker.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.base != null && message.hasOwnProperty("base")) { - var error = $root.CMsgVarField.verify(message.base); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.base != null && $Object.hasOwnProperty.call(message, "base")) { + var error = $root.CMsgVarField.verify(message.base, _depth + 1); if (error) return "base." + error; } - if (message.weight != null && message.hasOwnProperty("weight")) { - var error = $root.CMsgVarField.verify(message.weight); + if (message.weight != null && $Object.hasOwnProperty.call(message, "weight")) { + var error = $root.CMsgVarField.verify(message.weight, _depth + 1); if (error) return "weight." + error; } - if (message.spec != null && message.hasOwnProperty("spec")) { - var error = $root.CMsgVarField.verify(message.spec); + if (message.spec != null && $Object.hasOwnProperty.call(message, "spec")) { + var error = $root.CMsgVarField.verify(message.spec, _depth + 1); if (error) return "spec." + error; } @@ -8737,24 +10838,30 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_Operation_Sticker} CMsgPaintKit_Operation_Sticker */ - CMsgPaintKit_Operation_Sticker.fromObject = function fromObject(object) { + CMsgPaintKit_Operation_Sticker.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_Operation_Sticker) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_Operation_Sticker: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_Operation_Sticker(); if (object.base != null) { - if (typeof object.base !== "object") - throw TypeError(".CMsgPaintKit_Operation_Sticker.base: object expected"); - message.base = $root.CMsgVarField.fromObject(object.base); + if (!$util.isObject(object.base)) + throw $TypeError(".CMsgPaintKit_Operation_Sticker.base: object expected"); + message.base = $root.CMsgVarField.fromObject(object.base, _depth + 1); } if (object.weight != null) { - if (typeof object.weight !== "object") - throw TypeError(".CMsgPaintKit_Operation_Sticker.weight: object expected"); - message.weight = $root.CMsgVarField.fromObject(object.weight); + if (!$util.isObject(object.weight)) + throw $TypeError(".CMsgPaintKit_Operation_Sticker.weight: object expected"); + message.weight = $root.CMsgVarField.fromObject(object.weight, _depth + 1); } if (object.spec != null) { - if (typeof object.spec !== "object") - throw TypeError(".CMsgPaintKit_Operation_Sticker.spec: object expected"); - message.spec = $root.CMsgVarField.fromObject(object.spec); + if (!$util.isObject(object.spec)) + throw $TypeError(".CMsgPaintKit_Operation_Sticker.spec: object expected"); + message.spec = $root.CMsgVarField.fromObject(object.spec, _depth + 1); } return message; }; @@ -8768,21 +10875,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPaintKit_Operation_Sticker.toObject = function toObject(message, options) { + CMsgPaintKit_Operation_Sticker.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.base = null; object.weight = null; object.spec = null; } - if (message.base != null && message.hasOwnProperty("base")) - object.base = $root.CMsgVarField.toObject(message.base, options); - if (message.weight != null && message.hasOwnProperty("weight")) - object.weight = $root.CMsgVarField.toObject(message.weight, options); - if (message.spec != null && message.hasOwnProperty("spec")) - object.spec = $root.CMsgVarField.toObject(message.spec, options); + if (message.base != null && $Object.hasOwnProperty.call(message, "base")) + object.base = $root.CMsgVarField.toObject(message.base, options, _depth + 1); + if (message.weight != null && $Object.hasOwnProperty.call(message, "weight")) + object.weight = $root.CMsgVarField.toObject(message.weight, options, _depth + 1); + if (message.spec != null && $Object.hasOwnProperty.call(message, "spec")) + object.spec = $root.CMsgVarField.toObject(message.spec, options, _depth + 1); return object; }; @@ -8793,8 +10904,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPaintKit_Operation_Sticker.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPaintKit_Operation_Sticker.prototype.toJSON = function() { + return CMsgPaintKit_Operation_Sticker.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPaintKit_Operation_Sticker + * @function getTypeUrl + * @memberof CMsgPaintKit_Operation_Sticker + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPaintKit_Operation_Sticker.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_Operation_Sticker"; }; return CMsgPaintKit_Operation_Sticker; @@ -8802,40 +10927,63 @@ $root.CMsgPaintKit_Operation_StickerStage = (function() { + /** + * Properties of a CMsgPaintKit_Operation_StickerStage. + * @typedef {Object} CMsgPaintKit_Operation_StickerStage.$Properties + * @property {Array.|null} [sticker] CMsgPaintKit_Operation_StickerStage sticker + * @property {CMsgVarField.$Properties|null} [dest_tl] CMsgPaintKit_Operation_StickerStage dest_tl + * @property {CMsgVarField.$Properties|null} [dest_tr] CMsgPaintKit_Operation_StickerStage dest_tr + * @property {CMsgVarField.$Properties|null} [dest_bl] CMsgPaintKit_Operation_StickerStage dest_bl + * @property {CMsgVarField.$Properties|null} [adjust_black] CMsgPaintKit_Operation_StickerStage adjust_black + * @property {CMsgVarField.$Properties|null} [adjust_offset] CMsgPaintKit_Operation_StickerStage adjust_offset + * @property {CMsgVarField.$Properties|null} [adjust_gamma] CMsgPaintKit_Operation_StickerStage adjust_gamma + * @property {Array.|null} [operation_node] CMsgPaintKit_Operation_StickerStage operation_node + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPaintKit_Operation_StickerStage. * @exports ICMsgPaintKit_Operation_StickerStage * @interface ICMsgPaintKit_Operation_StickerStage - * @property {Array.|null} [sticker] CMsgPaintKit_Operation_StickerStage sticker - * @property {ICMsgVarField|null} [dest_tl] CMsgPaintKit_Operation_StickerStage dest_tl - * @property {ICMsgVarField|null} [dest_tr] CMsgPaintKit_Operation_StickerStage dest_tr - * @property {ICMsgVarField|null} [dest_bl] CMsgPaintKit_Operation_StickerStage dest_bl - * @property {ICMsgVarField|null} [adjust_black] CMsgPaintKit_Operation_StickerStage adjust_black - * @property {ICMsgVarField|null} [adjust_offset] CMsgPaintKit_Operation_StickerStage adjust_offset - * @property {ICMsgVarField|null} [adjust_gamma] CMsgPaintKit_Operation_StickerStage adjust_gamma - * @property {Array.|null} [operation_node] CMsgPaintKit_Operation_StickerStage operation_node + * @augments CMsgPaintKit_Operation_StickerStage.$Properties + * @deprecated Use CMsgPaintKit_Operation_StickerStage.$Properties instead. + */ + + /** + * Shape of a CMsgPaintKit_Operation_StickerStage. + * @typedef {{ + * sticker?: Array.|null; + * dest_tl?: CMsgVarField.$Shape|null; + * dest_tr?: CMsgVarField.$Shape|null; + * dest_bl?: CMsgVarField.$Shape|null; + * adjust_black?: CMsgVarField.$Shape|null; + * adjust_offset?: CMsgVarField.$Shape|null; + * adjust_gamma?: CMsgVarField.$Shape|null; + * operation_node?: Array.|null; + * $unknowns?: Array.; + * }} CMsgPaintKit_Operation_StickerStage.$Shape */ /** * Constructs a new CMsgPaintKit_Operation_StickerStage. * @exports CMsgPaintKit_Operation_StickerStage * @classdesc Represents a CMsgPaintKit_Operation_StickerStage. - * @implements ICMsgPaintKit_Operation_StickerStage * @constructor - * @param {ICMsgPaintKit_Operation_StickerStage=} [properties] Properties to set + * @param {CMsgPaintKit_Operation_StickerStage.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPaintKit_Operation_StickerStage(properties) { + var CMsgPaintKit_Operation_StickerStage = function (properties) { this.sticker = []; this.operation_node = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPaintKit_Operation_StickerStage sticker. - * @member {Array.} sticker + * @member {Array.} sticker * @memberof CMsgPaintKit_Operation_StickerStage * @instance */ @@ -8843,7 +10991,7 @@ /** * CMsgPaintKit_Operation_StickerStage dest_tl. - * @member {ICMsgVarField|null|undefined} dest_tl + * @member {CMsgVarField.$Properties|null|undefined} dest_tl * @memberof CMsgPaintKit_Operation_StickerStage * @instance */ @@ -8851,7 +10999,7 @@ /** * CMsgPaintKit_Operation_StickerStage dest_tr. - * @member {ICMsgVarField|null|undefined} dest_tr + * @member {CMsgVarField.$Properties|null|undefined} dest_tr * @memberof CMsgPaintKit_Operation_StickerStage * @instance */ @@ -8859,7 +11007,7 @@ /** * CMsgPaintKit_Operation_StickerStage dest_bl. - * @member {ICMsgVarField|null|undefined} dest_bl + * @member {CMsgVarField.$Properties|null|undefined} dest_bl * @memberof CMsgPaintKit_Operation_StickerStage * @instance */ @@ -8867,7 +11015,7 @@ /** * CMsgPaintKit_Operation_StickerStage adjust_black. - * @member {ICMsgVarField|null|undefined} adjust_black + * @member {CMsgVarField.$Properties|null|undefined} adjust_black * @memberof CMsgPaintKit_Operation_StickerStage * @instance */ @@ -8875,7 +11023,7 @@ /** * CMsgPaintKit_Operation_StickerStage adjust_offset. - * @member {ICMsgVarField|null|undefined} adjust_offset + * @member {CMsgVarField.$Properties|null|undefined} adjust_offset * @memberof CMsgPaintKit_Operation_StickerStage * @instance */ @@ -8883,7 +11031,7 @@ /** * CMsgPaintKit_Operation_StickerStage adjust_gamma. - * @member {ICMsgVarField|null|undefined} adjust_gamma + * @member {CMsgVarField.$Properties|null|undefined} adjust_gamma * @memberof CMsgPaintKit_Operation_StickerStage * @instance */ @@ -8891,7 +11039,7 @@ /** * CMsgPaintKit_Operation_StickerStage operation_node. - * @member {Array.} operation_node + * @member {Array.} operation_node * @memberof CMsgPaintKit_Operation_StickerStage * @instance */ @@ -8902,10 +11050,14 @@ * @function create * @memberof CMsgPaintKit_Operation_StickerStage * @static - * @param {ICMsgPaintKit_Operation_StickerStage=} [properties] Properties to set + * @param {CMsgPaintKit_Operation_StickerStage.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_Operation_StickerStage} CMsgPaintKit_Operation_StickerStage instance + * @type {{ + * (properties: CMsgPaintKit_Operation_StickerStage.$Shape): CMsgPaintKit_Operation_StickerStage & CMsgPaintKit_Operation_StickerStage.$Shape; + * (properties?: CMsgPaintKit_Operation_StickerStage.$Properties): CMsgPaintKit_Operation_StickerStage; + * }} */ - CMsgPaintKit_Operation_StickerStage.create = function create(properties) { + CMsgPaintKit_Operation_StickerStage.create = function(properties) { return new CMsgPaintKit_Operation_StickerStage(properties); }; @@ -8914,31 +11066,38 @@ * @function encode * @memberof CMsgPaintKit_Operation_StickerStage * @static - * @param {ICMsgPaintKit_Operation_StickerStage} message CMsgPaintKit_Operation_StickerStage message or plain object to encode + * @param {CMsgPaintKit_Operation_StickerStage.$Properties} message CMsgPaintKit_Operation_StickerStage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation_StickerStage.encode = function encode(message, writer) { + CMsgPaintKit_Operation_StickerStage.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.sticker != null && message.sticker.length) for (var i = 0; i < message.sticker.length; ++i) - $root.CMsgPaintKit_Operation_Sticker.encode(message.sticker[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dest_tl != null && Object.hasOwnProperty.call(message, "dest_tl")) - $root.CMsgVarField.encode(message.dest_tl, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dest_tr != null && Object.hasOwnProperty.call(message, "dest_tr")) - $root.CMsgVarField.encode(message.dest_tr, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dest_bl != null && Object.hasOwnProperty.call(message, "dest_bl")) - $root.CMsgVarField.encode(message.dest_bl, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.adjust_black != null && Object.hasOwnProperty.call(message, "adjust_black")) - $root.CMsgVarField.encode(message.adjust_black, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.adjust_offset != null && Object.hasOwnProperty.call(message, "adjust_offset")) - $root.CMsgVarField.encode(message.adjust_offset, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.adjust_gamma != null && Object.hasOwnProperty.call(message, "adjust_gamma")) - $root.CMsgVarField.encode(message.adjust_gamma, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.CMsgPaintKit_Operation_Sticker.encode(message.sticker[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.dest_tl != null && $Object.hasOwnProperty.call(message, "dest_tl")) + $root.CMsgVarField.encode(message.dest_tl, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.dest_tr != null && $Object.hasOwnProperty.call(message, "dest_tr")) + $root.CMsgVarField.encode(message.dest_tr, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.dest_bl != null && $Object.hasOwnProperty.call(message, "dest_bl")) + $root.CMsgVarField.encode(message.dest_bl, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.adjust_black != null && $Object.hasOwnProperty.call(message, "adjust_black")) + $root.CMsgVarField.encode(message.adjust_black, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.adjust_offset != null && $Object.hasOwnProperty.call(message, "adjust_offset")) + $root.CMsgVarField.encode(message.adjust_offset, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.adjust_gamma != null && $Object.hasOwnProperty.call(message, "adjust_gamma")) + $root.CMsgVarField.encode(message.adjust_gamma, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); if (message.operation_node != null && message.operation_node.length) for (var i = 0; i < message.operation_node.length; ++i) - $root.CMsgPaintKit_OperationNode.encode(message.operation_node[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.CMsgPaintKit_OperationNode.encode(message.operation_node[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -8947,12 +11106,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_Operation_StickerStage * @static - * @param {ICMsgPaintKit_Operation_StickerStage} message CMsgPaintKit_Operation_StickerStage message or plain object to encode + * @param {CMsgPaintKit_Operation_StickerStage.$Properties} message CMsgPaintKit_Operation_StickerStage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation_StickerStage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPaintKit_Operation_StickerStage.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -8962,50 +11121,88 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_Operation_StickerStage} CMsgPaintKit_Operation_StickerStage + * @returns {CMsgPaintKit_Operation_StickerStage & CMsgPaintKit_Operation_StickerStage.$Shape} CMsgPaintKit_Operation_StickerStage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation_StickerStage.decode = function decode(reader, length) { + CMsgPaintKit_Operation_StickerStage.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_Operation_StickerStage(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_Operation_StickerStage(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.sticker && message.sticker.length)) - message.sticker = []; - message.sticker.push($root.CMsgPaintKit_Operation_Sticker.decode(reader, reader.uint32())); - break; - case 2: - message.dest_tl = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 3: - message.dest_tr = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 4: - message.dest_bl = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 5: - message.adjust_black = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 6: - message.adjust_offset = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 7: - message.adjust_gamma = $root.CMsgVarField.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.operation_node && message.operation_node.length)) - message.operation_node = []; - message.operation_node.push($root.CMsgPaintKit_OperationNode.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.sticker && message.sticker.length)) + message.sticker = []; + message.sticker.push($root.CMsgPaintKit_Operation_Sticker.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.dest_tl = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.dest_tl); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.dest_tr = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.dest_tr); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.dest_bl = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.dest_bl); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.adjust_black = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.adjust_black); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.adjust_offset = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.adjust_offset); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.adjust_gamma = $root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1, message.adjust_gamma); + continue; + } + case 9: { + if (wireType !== 2) + break; + if (!(message.operation_node && message.operation_node.length)) + message.operation_node = []; + message.operation_node.push($root.CMsgPaintKit_OperationNode.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9015,11 +11212,11 @@ * @memberof CMsgPaintKit_Operation_StickerStage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_Operation_StickerStage} CMsgPaintKit_Operation_StickerStage + * @returns {CMsgPaintKit_Operation_StickerStage & CMsgPaintKit_Operation_StickerStage.$Shape} CMsgPaintKit_Operation_StickerStage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation_StickerStage.decodeDelimited = function decodeDelimited(reader) { + CMsgPaintKit_Operation_StickerStage.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9033,53 +11230,57 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPaintKit_Operation_StickerStage.verify = function verify(message) { + CMsgPaintKit_Operation_StickerStage.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sticker != null && message.hasOwnProperty("sticker")) { - if (!Array.isArray(message.sticker)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.sticker != null && $Object.hasOwnProperty.call(message, "sticker")) { + if (!$Array.isArray(message.sticker)) return "sticker: array expected"; for (var i = 0; i < message.sticker.length; ++i) { - var error = $root.CMsgPaintKit_Operation_Sticker.verify(message.sticker[i]); + var error = $root.CMsgPaintKit_Operation_Sticker.verify(message.sticker[i], _depth + 1); if (error) return "sticker." + error; } } - if (message.dest_tl != null && message.hasOwnProperty("dest_tl")) { - var error = $root.CMsgVarField.verify(message.dest_tl); + if (message.dest_tl != null && $Object.hasOwnProperty.call(message, "dest_tl")) { + var error = $root.CMsgVarField.verify(message.dest_tl, _depth + 1); if (error) return "dest_tl." + error; } - if (message.dest_tr != null && message.hasOwnProperty("dest_tr")) { - var error = $root.CMsgVarField.verify(message.dest_tr); + if (message.dest_tr != null && $Object.hasOwnProperty.call(message, "dest_tr")) { + var error = $root.CMsgVarField.verify(message.dest_tr, _depth + 1); if (error) return "dest_tr." + error; } - if (message.dest_bl != null && message.hasOwnProperty("dest_bl")) { - var error = $root.CMsgVarField.verify(message.dest_bl); + if (message.dest_bl != null && $Object.hasOwnProperty.call(message, "dest_bl")) { + var error = $root.CMsgVarField.verify(message.dest_bl, _depth + 1); if (error) return "dest_bl." + error; } - if (message.adjust_black != null && message.hasOwnProperty("adjust_black")) { - var error = $root.CMsgVarField.verify(message.adjust_black); + if (message.adjust_black != null && $Object.hasOwnProperty.call(message, "adjust_black")) { + var error = $root.CMsgVarField.verify(message.adjust_black, _depth + 1); if (error) return "adjust_black." + error; } - if (message.adjust_offset != null && message.hasOwnProperty("adjust_offset")) { - var error = $root.CMsgVarField.verify(message.adjust_offset); + if (message.adjust_offset != null && $Object.hasOwnProperty.call(message, "adjust_offset")) { + var error = $root.CMsgVarField.verify(message.adjust_offset, _depth + 1); if (error) return "adjust_offset." + error; } - if (message.adjust_gamma != null && message.hasOwnProperty("adjust_gamma")) { - var error = $root.CMsgVarField.verify(message.adjust_gamma); + if (message.adjust_gamma != null && $Object.hasOwnProperty.call(message, "adjust_gamma")) { + var error = $root.CMsgVarField.verify(message.adjust_gamma, _depth + 1); if (error) return "adjust_gamma." + error; } - if (message.operation_node != null && message.hasOwnProperty("operation_node")) { - if (!Array.isArray(message.operation_node)) + if (message.operation_node != null && $Object.hasOwnProperty.call(message, "operation_node")) { + if (!$Array.isArray(message.operation_node)) return "operation_node: array expected"; for (var i = 0; i < message.operation_node.length; ++i) { - var error = $root.CMsgPaintKit_OperationNode.verify(message.operation_node[i]); + var error = $root.CMsgPaintKit_OperationNode.verify(message.operation_node[i], _depth + 1); if (error) return "operation_node." + error; } @@ -9095,58 +11296,64 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_Operation_StickerStage} CMsgPaintKit_Operation_StickerStage */ - CMsgPaintKit_Operation_StickerStage.fromObject = function fromObject(object) { + CMsgPaintKit_Operation_StickerStage.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_Operation_StickerStage) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_Operation_StickerStage: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_Operation_StickerStage(); if (object.sticker) { - if (!Array.isArray(object.sticker)) - throw TypeError(".CMsgPaintKit_Operation_StickerStage.sticker: array expected"); - message.sticker = []; + if (!$Array.isArray(object.sticker)) + throw $TypeError(".CMsgPaintKit_Operation_StickerStage.sticker: array expected"); + message.sticker = $Array(object.sticker.length); for (var i = 0; i < object.sticker.length; ++i) { - if (typeof object.sticker[i] !== "object") - throw TypeError(".CMsgPaintKit_Operation_StickerStage.sticker: object expected"); - message.sticker[i] = $root.CMsgPaintKit_Operation_Sticker.fromObject(object.sticker[i]); + if (!$util.isObject(object.sticker[i])) + throw $TypeError(".CMsgPaintKit_Operation_StickerStage.sticker: object expected"); + message.sticker[i] = $root.CMsgPaintKit_Operation_Sticker.fromObject(object.sticker[i], _depth + 1); } } if (object.dest_tl != null) { - if (typeof object.dest_tl !== "object") - throw TypeError(".CMsgPaintKit_Operation_StickerStage.dest_tl: object expected"); - message.dest_tl = $root.CMsgVarField.fromObject(object.dest_tl); + if (!$util.isObject(object.dest_tl)) + throw $TypeError(".CMsgPaintKit_Operation_StickerStage.dest_tl: object expected"); + message.dest_tl = $root.CMsgVarField.fromObject(object.dest_tl, _depth + 1); } if (object.dest_tr != null) { - if (typeof object.dest_tr !== "object") - throw TypeError(".CMsgPaintKit_Operation_StickerStage.dest_tr: object expected"); - message.dest_tr = $root.CMsgVarField.fromObject(object.dest_tr); + if (!$util.isObject(object.dest_tr)) + throw $TypeError(".CMsgPaintKit_Operation_StickerStage.dest_tr: object expected"); + message.dest_tr = $root.CMsgVarField.fromObject(object.dest_tr, _depth + 1); } if (object.dest_bl != null) { - if (typeof object.dest_bl !== "object") - throw TypeError(".CMsgPaintKit_Operation_StickerStage.dest_bl: object expected"); - message.dest_bl = $root.CMsgVarField.fromObject(object.dest_bl); + if (!$util.isObject(object.dest_bl)) + throw $TypeError(".CMsgPaintKit_Operation_StickerStage.dest_bl: object expected"); + message.dest_bl = $root.CMsgVarField.fromObject(object.dest_bl, _depth + 1); } if (object.adjust_black != null) { - if (typeof object.adjust_black !== "object") - throw TypeError(".CMsgPaintKit_Operation_StickerStage.adjust_black: object expected"); - message.adjust_black = $root.CMsgVarField.fromObject(object.adjust_black); + if (!$util.isObject(object.adjust_black)) + throw $TypeError(".CMsgPaintKit_Operation_StickerStage.adjust_black: object expected"); + message.adjust_black = $root.CMsgVarField.fromObject(object.adjust_black, _depth + 1); } if (object.adjust_offset != null) { - if (typeof object.adjust_offset !== "object") - throw TypeError(".CMsgPaintKit_Operation_StickerStage.adjust_offset: object expected"); - message.adjust_offset = $root.CMsgVarField.fromObject(object.adjust_offset); + if (!$util.isObject(object.adjust_offset)) + throw $TypeError(".CMsgPaintKit_Operation_StickerStage.adjust_offset: object expected"); + message.adjust_offset = $root.CMsgVarField.fromObject(object.adjust_offset, _depth + 1); } if (object.adjust_gamma != null) { - if (typeof object.adjust_gamma !== "object") - throw TypeError(".CMsgPaintKit_Operation_StickerStage.adjust_gamma: object expected"); - message.adjust_gamma = $root.CMsgVarField.fromObject(object.adjust_gamma); + if (!$util.isObject(object.adjust_gamma)) + throw $TypeError(".CMsgPaintKit_Operation_StickerStage.adjust_gamma: object expected"); + message.adjust_gamma = $root.CMsgVarField.fromObject(object.adjust_gamma, _depth + 1); } if (object.operation_node) { - if (!Array.isArray(object.operation_node)) - throw TypeError(".CMsgPaintKit_Operation_StickerStage.operation_node: array expected"); - message.operation_node = []; + if (!$Array.isArray(object.operation_node)) + throw $TypeError(".CMsgPaintKit_Operation_StickerStage.operation_node: array expected"); + message.operation_node = $Array(object.operation_node.length); for (var i = 0; i < object.operation_node.length; ++i) { - if (typeof object.operation_node[i] !== "object") - throw TypeError(".CMsgPaintKit_Operation_StickerStage.operation_node: object expected"); - message.operation_node[i] = $root.CMsgPaintKit_OperationNode.fromObject(object.operation_node[i]); + if (!$util.isObject(object.operation_node[i])) + throw $TypeError(".CMsgPaintKit_Operation_StickerStage.operation_node: object expected"); + message.operation_node[i] = $root.CMsgPaintKit_OperationNode.fromObject(object.operation_node[i], _depth + 1); } } return message; @@ -9161,9 +11368,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPaintKit_Operation_StickerStage.toObject = function toObject(message, options) { + CMsgPaintKit_Operation_StickerStage.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.sticker = []; @@ -9178,26 +11389,26 @@ object.adjust_gamma = null; } if (message.sticker && message.sticker.length) { - object.sticker = []; + object.sticker = $Array(message.sticker.length); for (var j = 0; j < message.sticker.length; ++j) - object.sticker[j] = $root.CMsgPaintKit_Operation_Sticker.toObject(message.sticker[j], options); - } - if (message.dest_tl != null && message.hasOwnProperty("dest_tl")) - object.dest_tl = $root.CMsgVarField.toObject(message.dest_tl, options); - if (message.dest_tr != null && message.hasOwnProperty("dest_tr")) - object.dest_tr = $root.CMsgVarField.toObject(message.dest_tr, options); - if (message.dest_bl != null && message.hasOwnProperty("dest_bl")) - object.dest_bl = $root.CMsgVarField.toObject(message.dest_bl, options); - if (message.adjust_black != null && message.hasOwnProperty("adjust_black")) - object.adjust_black = $root.CMsgVarField.toObject(message.adjust_black, options); - if (message.adjust_offset != null && message.hasOwnProperty("adjust_offset")) - object.adjust_offset = $root.CMsgVarField.toObject(message.adjust_offset, options); - if (message.adjust_gamma != null && message.hasOwnProperty("adjust_gamma")) - object.adjust_gamma = $root.CMsgVarField.toObject(message.adjust_gamma, options); + object.sticker[j] = $root.CMsgPaintKit_Operation_Sticker.toObject(message.sticker[j], options, _depth + 1); + } + if (message.dest_tl != null && $Object.hasOwnProperty.call(message, "dest_tl")) + object.dest_tl = $root.CMsgVarField.toObject(message.dest_tl, options, _depth + 1); + if (message.dest_tr != null && $Object.hasOwnProperty.call(message, "dest_tr")) + object.dest_tr = $root.CMsgVarField.toObject(message.dest_tr, options, _depth + 1); + if (message.dest_bl != null && $Object.hasOwnProperty.call(message, "dest_bl")) + object.dest_bl = $root.CMsgVarField.toObject(message.dest_bl, options, _depth + 1); + if (message.adjust_black != null && $Object.hasOwnProperty.call(message, "adjust_black")) + object.adjust_black = $root.CMsgVarField.toObject(message.adjust_black, options, _depth + 1); + if (message.adjust_offset != null && $Object.hasOwnProperty.call(message, "adjust_offset")) + object.adjust_offset = $root.CMsgVarField.toObject(message.adjust_offset, options, _depth + 1); + if (message.adjust_gamma != null && $Object.hasOwnProperty.call(message, "adjust_gamma")) + object.adjust_gamma = $root.CMsgVarField.toObject(message.adjust_gamma, options, _depth + 1); if (message.operation_node && message.operation_node.length) { - object.operation_node = []; + object.operation_node = $Array(message.operation_node.length); for (var j = 0; j < message.operation_node.length; ++j) - object.operation_node[j] = $root.CMsgPaintKit_OperationNode.toObject(message.operation_node[j], options); + object.operation_node[j] = $root.CMsgPaintKit_OperationNode.toObject(message.operation_node[j], options, _depth + 1); } return object; }; @@ -9209,8 +11420,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPaintKit_Operation_StickerStage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPaintKit_Operation_StickerStage.prototype.toJSON = function() { + return CMsgPaintKit_Operation_StickerStage.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPaintKit_Operation_StickerStage + * @function getTypeUrl + * @memberof CMsgPaintKit_Operation_StickerStage + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPaintKit_Operation_StickerStage.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_Operation_StickerStage"; }; return CMsgPaintKit_Operation_StickerStage; @@ -9218,36 +11443,60 @@ $root.CMsgPaintKit_OperationStage = (function() { + /** + * Properties of a CMsgPaintKit_OperationStage. + * @typedef {Object} CMsgPaintKit_OperationStage.$Properties + * @property {CMsgPaintKit_Operation_TextureStage.$Properties|null} [texture_lookup] CMsgPaintKit_OperationStage texture_lookup + * @property {CMsgPaintKit_Operation_CombineStage.$Properties|null} [combine_add] CMsgPaintKit_OperationStage combine_add + * @property {CMsgPaintKit_Operation_CombineStage.$Properties|null} [combine_lerp] CMsgPaintKit_OperationStage combine_lerp + * @property {CMsgPaintKit_Operation_CombineStage.$Properties|null} [combine_multiply] CMsgPaintKit_OperationStage combine_multiply + * @property {CMsgPaintKit_Operation_SelectStage.$Properties|null} [select] CMsgPaintKit_OperationStage select + * @property {CMsgPaintKit_Operation_StickerStage.$Properties|null} [apply_sticker] CMsgPaintKit_OperationStage apply_sticker + * @property {"texture_lookup"|"combine_add"|"combine_lerp"|"combine_multiply"|"select"|"apply_sticker"} [stage] CMsgPaintKit_OperationStage stage + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPaintKit_OperationStage. * @exports ICMsgPaintKit_OperationStage * @interface ICMsgPaintKit_OperationStage - * @property {ICMsgPaintKit_Operation_TextureStage|null} [texture_lookup] CMsgPaintKit_OperationStage texture_lookup - * @property {ICMsgPaintKit_Operation_CombineStage|null} [combine_add] CMsgPaintKit_OperationStage combine_add - * @property {ICMsgPaintKit_Operation_CombineStage|null} [combine_lerp] CMsgPaintKit_OperationStage combine_lerp - * @property {ICMsgPaintKit_Operation_CombineStage|null} [combine_multiply] CMsgPaintKit_OperationStage combine_multiply - * @property {ICMsgPaintKit_Operation_SelectStage|null} [select] CMsgPaintKit_OperationStage select - * @property {ICMsgPaintKit_Operation_StickerStage|null} [apply_sticker] CMsgPaintKit_OperationStage apply_sticker + * @augments CMsgPaintKit_OperationStage.$Properties + * @deprecated Use CMsgPaintKit_OperationStage.$Properties instead. + */ + + /** + * Narrowed shape of a CMsgPaintKit_OperationStage. + * @typedef {{ + * texture_lookup?: CMsgPaintKit_Operation_TextureStage.$Shape|null; + * combine_add?: CMsgPaintKit_Operation_CombineStage.$Shape|null; + * combine_lerp?: CMsgPaintKit_Operation_CombineStage.$Shape|null; + * combine_multiply?: CMsgPaintKit_Operation_CombineStage.$Shape|null; + * select?: CMsgPaintKit_Operation_SelectStage.$Shape|null; + * apply_sticker?: CMsgPaintKit_Operation_StickerStage.$Shape|null; + * $unknowns?: Array.; + * } & ( + * ({ stage?: undefined; texture_lookup?: null; combine_add?: null; combine_lerp?: null; combine_multiply?: null; select?: null; apply_sticker?: null }|{ stage?: "texture_lookup"; texture_lookup: CMsgPaintKit_Operation_TextureStage.$Shape; combine_add?: null; combine_lerp?: null; combine_multiply?: null; select?: null; apply_sticker?: null }|{ stage?: "combine_add"; texture_lookup?: null; combine_add: CMsgPaintKit_Operation_CombineStage.$Shape; combine_lerp?: null; combine_multiply?: null; select?: null; apply_sticker?: null }|{ stage?: "combine_lerp"; texture_lookup?: null; combine_add?: null; combine_lerp: CMsgPaintKit_Operation_CombineStage.$Shape; combine_multiply?: null; select?: null; apply_sticker?: null }|{ stage?: "combine_multiply"; texture_lookup?: null; combine_add?: null; combine_lerp?: null; combine_multiply: CMsgPaintKit_Operation_CombineStage.$Shape; select?: null; apply_sticker?: null }|{ stage?: "select"; texture_lookup?: null; combine_add?: null; combine_lerp?: null; combine_multiply?: null; select: CMsgPaintKit_Operation_SelectStage.$Shape; apply_sticker?: null }|{ stage?: "apply_sticker"; texture_lookup?: null; combine_add?: null; combine_lerp?: null; combine_multiply?: null; select?: null; apply_sticker: CMsgPaintKit_Operation_StickerStage.$Shape }) + * )} CMsgPaintKit_OperationStage.$Shape */ /** * Constructs a new CMsgPaintKit_OperationStage. * @exports CMsgPaintKit_OperationStage * @classdesc Represents a CMsgPaintKit_OperationStage. - * @implements ICMsgPaintKit_OperationStage * @constructor - * @param {ICMsgPaintKit_OperationStage=} [properties] Properties to set + * @param {CMsgPaintKit_OperationStage.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPaintKit_OperationStage(properties) { + var CMsgPaintKit_OperationStage = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPaintKit_OperationStage texture_lookup. - * @member {ICMsgPaintKit_Operation_TextureStage|null|undefined} texture_lookup + * @member {CMsgPaintKit_Operation_TextureStage.$Properties|null|undefined} texture_lookup * @memberof CMsgPaintKit_OperationStage * @instance */ @@ -9255,7 +11504,7 @@ /** * CMsgPaintKit_OperationStage combine_add. - * @member {ICMsgPaintKit_Operation_CombineStage|null|undefined} combine_add + * @member {CMsgPaintKit_Operation_CombineStage.$Properties|null|undefined} combine_add * @memberof CMsgPaintKit_OperationStage * @instance */ @@ -9263,7 +11512,7 @@ /** * CMsgPaintKit_OperationStage combine_lerp. - * @member {ICMsgPaintKit_Operation_CombineStage|null|undefined} combine_lerp + * @member {CMsgPaintKit_Operation_CombineStage.$Properties|null|undefined} combine_lerp * @memberof CMsgPaintKit_OperationStage * @instance */ @@ -9271,7 +11520,7 @@ /** * CMsgPaintKit_OperationStage combine_multiply. - * @member {ICMsgPaintKit_Operation_CombineStage|null|undefined} combine_multiply + * @member {CMsgPaintKit_Operation_CombineStage.$Properties|null|undefined} combine_multiply * @memberof CMsgPaintKit_OperationStage * @instance */ @@ -9279,7 +11528,7 @@ /** * CMsgPaintKit_OperationStage select. - * @member {ICMsgPaintKit_Operation_SelectStage|null|undefined} select + * @member {CMsgPaintKit_Operation_SelectStage.$Properties|null|undefined} select * @memberof CMsgPaintKit_OperationStage * @instance */ @@ -9287,7 +11536,7 @@ /** * CMsgPaintKit_OperationStage apply_sticker. - * @member {ICMsgPaintKit_Operation_StickerStage|null|undefined} apply_sticker + * @member {CMsgPaintKit_Operation_StickerStage.$Properties|null|undefined} apply_sticker * @memberof CMsgPaintKit_OperationStage * @instance */ @@ -9302,7 +11551,7 @@ * @memberof CMsgPaintKit_OperationStage * @instance */ - Object.defineProperty(CMsgPaintKit_OperationStage.prototype, "stage", { + $Object.defineProperty(CMsgPaintKit_OperationStage.prototype, "stage", { get: $util.oneOfGetter($oneOfFields = ["texture_lookup", "combine_add", "combine_lerp", "combine_multiply", "select", "apply_sticker"]), set: $util.oneOfSetter($oneOfFields) }); @@ -9312,10 +11561,14 @@ * @function create * @memberof CMsgPaintKit_OperationStage * @static - * @param {ICMsgPaintKit_OperationStage=} [properties] Properties to set + * @param {CMsgPaintKit_OperationStage.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_OperationStage} CMsgPaintKit_OperationStage instance + * @type {{ + * (properties: CMsgPaintKit_OperationStage.$Shape): CMsgPaintKit_OperationStage & CMsgPaintKit_OperationStage.$Shape; + * (properties?: CMsgPaintKit_OperationStage.$Properties): CMsgPaintKit_OperationStage; + * }} */ - CMsgPaintKit_OperationStage.create = function create(properties) { + CMsgPaintKit_OperationStage.create = function(properties) { return new CMsgPaintKit_OperationStage(properties); }; @@ -9324,25 +11577,32 @@ * @function encode * @memberof CMsgPaintKit_OperationStage * @static - * @param {ICMsgPaintKit_OperationStage} message CMsgPaintKit_OperationStage message or plain object to encode + * @param {CMsgPaintKit_OperationStage.$Properties} message CMsgPaintKit_OperationStage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_OperationStage.encode = function encode(message, writer) { + CMsgPaintKit_OperationStage.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.texture_lookup != null && Object.hasOwnProperty.call(message, "texture_lookup")) - $root.CMsgPaintKit_Operation_TextureStage.encode(message.texture_lookup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.combine_add != null && Object.hasOwnProperty.call(message, "combine_add")) - $root.CMsgPaintKit_Operation_CombineStage.encode(message.combine_add, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.combine_lerp != null && Object.hasOwnProperty.call(message, "combine_lerp")) - $root.CMsgPaintKit_Operation_CombineStage.encode(message.combine_lerp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.combine_multiply != null && Object.hasOwnProperty.call(message, "combine_multiply")) - $root.CMsgPaintKit_Operation_CombineStage.encode(message.combine_multiply, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.select != null && Object.hasOwnProperty.call(message, "select")) - $root.CMsgPaintKit_Operation_SelectStage.encode(message.select, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.apply_sticker != null && Object.hasOwnProperty.call(message, "apply_sticker")) - $root.CMsgPaintKit_Operation_StickerStage.encode(message.apply_sticker, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.texture_lookup != null && $Object.hasOwnProperty.call(message, "texture_lookup")) + $root.CMsgPaintKit_Operation_TextureStage.encode(message.texture_lookup, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.combine_add != null && $Object.hasOwnProperty.call(message, "combine_add")) + $root.CMsgPaintKit_Operation_CombineStage.encode(message.combine_add, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.combine_lerp != null && $Object.hasOwnProperty.call(message, "combine_lerp")) + $root.CMsgPaintKit_Operation_CombineStage.encode(message.combine_lerp, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.combine_multiply != null && $Object.hasOwnProperty.call(message, "combine_multiply")) + $root.CMsgPaintKit_Operation_CombineStage.encode(message.combine_multiply, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.select != null && $Object.hasOwnProperty.call(message, "select")) + $root.CMsgPaintKit_Operation_SelectStage.encode(message.select, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.apply_sticker != null && $Object.hasOwnProperty.call(message, "apply_sticker")) + $root.CMsgPaintKit_Operation_StickerStage.encode(message.apply_sticker, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9351,12 +11611,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_OperationStage * @static - * @param {ICMsgPaintKit_OperationStage} message CMsgPaintKit_OperationStage message or plain object to encode + * @param {CMsgPaintKit_OperationStage.$Properties} message CMsgPaintKit_OperationStage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_OperationStage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPaintKit_OperationStage.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9366,40 +11626,78 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_OperationStage} CMsgPaintKit_OperationStage + * @returns {CMsgPaintKit_OperationStage & CMsgPaintKit_OperationStage.$Shape} CMsgPaintKit_OperationStage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_OperationStage.decode = function decode(reader, length) { + CMsgPaintKit_OperationStage.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_OperationStage(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_OperationStage(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.texture_lookup = $root.CMsgPaintKit_Operation_TextureStage.decode(reader, reader.uint32()); - break; - case 2: - message.combine_add = $root.CMsgPaintKit_Operation_CombineStage.decode(reader, reader.uint32()); - break; - case 3: - message.combine_lerp = $root.CMsgPaintKit_Operation_CombineStage.decode(reader, reader.uint32()); - break; - case 4: - message.combine_multiply = $root.CMsgPaintKit_Operation_CombineStage.decode(reader, reader.uint32()); - break; - case 5: - message.select = $root.CMsgPaintKit_Operation_SelectStage.decode(reader, reader.uint32()); - break; - case 6: - message.apply_sticker = $root.CMsgPaintKit_Operation_StickerStage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.texture_lookup = $root.CMsgPaintKit_Operation_TextureStage.decode(reader, reader.uint32(), $undefined, _depth + 1, message.texture_lookup); + message.stage = "texture_lookup"; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.combine_add = $root.CMsgPaintKit_Operation_CombineStage.decode(reader, reader.uint32(), $undefined, _depth + 1, message.combine_add); + message.stage = "combine_add"; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.combine_lerp = $root.CMsgPaintKit_Operation_CombineStage.decode(reader, reader.uint32(), $undefined, _depth + 1, message.combine_lerp); + message.stage = "combine_lerp"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.combine_multiply = $root.CMsgPaintKit_Operation_CombineStage.decode(reader, reader.uint32(), $undefined, _depth + 1, message.combine_multiply); + message.stage = "combine_multiply"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.select = $root.CMsgPaintKit_Operation_SelectStage.decode(reader, reader.uint32(), $undefined, _depth + 1, message.select); + message.stage = "select"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.apply_sticker = $root.CMsgPaintKit_Operation_StickerStage.decode(reader, reader.uint32(), $undefined, _depth + 1, message.apply_sticker); + message.stage = "apply_sticker"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9409,11 +11707,11 @@ * @memberof CMsgPaintKit_OperationStage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_OperationStage} CMsgPaintKit_OperationStage + * @returns {CMsgPaintKit_OperationStage & CMsgPaintKit_OperationStage.$Shape} CMsgPaintKit_OperationStage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_OperationStage.decodeDelimited = function decodeDelimited(reader) { + CMsgPaintKit_OperationStage.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9427,64 +11725,68 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPaintKit_OperationStage.verify = function verify(message) { + CMsgPaintKit_OperationStage.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; var properties = {}; - if (message.texture_lookup != null && message.hasOwnProperty("texture_lookup")) { + if (message.texture_lookup != null && $Object.hasOwnProperty.call(message, "texture_lookup")) { properties.stage = 1; { - var error = $root.CMsgPaintKit_Operation_TextureStage.verify(message.texture_lookup); + var error = $root.CMsgPaintKit_Operation_TextureStage.verify(message.texture_lookup, _depth + 1); if (error) return "texture_lookup." + error; } } - if (message.combine_add != null && message.hasOwnProperty("combine_add")) { + if (message.combine_add != null && $Object.hasOwnProperty.call(message, "combine_add")) { if (properties.stage === 1) return "stage: multiple values"; properties.stage = 1; { - var error = $root.CMsgPaintKit_Operation_CombineStage.verify(message.combine_add); + var error = $root.CMsgPaintKit_Operation_CombineStage.verify(message.combine_add, _depth + 1); if (error) return "combine_add." + error; } } - if (message.combine_lerp != null && message.hasOwnProperty("combine_lerp")) { + if (message.combine_lerp != null && $Object.hasOwnProperty.call(message, "combine_lerp")) { if (properties.stage === 1) return "stage: multiple values"; properties.stage = 1; { - var error = $root.CMsgPaintKit_Operation_CombineStage.verify(message.combine_lerp); + var error = $root.CMsgPaintKit_Operation_CombineStage.verify(message.combine_lerp, _depth + 1); if (error) return "combine_lerp." + error; } } - if (message.combine_multiply != null && message.hasOwnProperty("combine_multiply")) { + if (message.combine_multiply != null && $Object.hasOwnProperty.call(message, "combine_multiply")) { if (properties.stage === 1) return "stage: multiple values"; properties.stage = 1; { - var error = $root.CMsgPaintKit_Operation_CombineStage.verify(message.combine_multiply); + var error = $root.CMsgPaintKit_Operation_CombineStage.verify(message.combine_multiply, _depth + 1); if (error) return "combine_multiply." + error; } } - if (message.select != null && message.hasOwnProperty("select")) { + if (message.select != null && $Object.hasOwnProperty.call(message, "select")) { if (properties.stage === 1) return "stage: multiple values"; properties.stage = 1; { - var error = $root.CMsgPaintKit_Operation_SelectStage.verify(message.select); + var error = $root.CMsgPaintKit_Operation_SelectStage.verify(message.select, _depth + 1); if (error) return "select." + error; } } - if (message.apply_sticker != null && message.hasOwnProperty("apply_sticker")) { + if (message.apply_sticker != null && $Object.hasOwnProperty.call(message, "apply_sticker")) { if (properties.stage === 1) return "stage: multiple values"; properties.stage = 1; { - var error = $root.CMsgPaintKit_Operation_StickerStage.verify(message.apply_sticker); + var error = $root.CMsgPaintKit_Operation_StickerStage.verify(message.apply_sticker, _depth + 1); if (error) return "apply_sticker." + error; } @@ -9500,39 +11802,45 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_OperationStage} CMsgPaintKit_OperationStage */ - CMsgPaintKit_OperationStage.fromObject = function fromObject(object) { + CMsgPaintKit_OperationStage.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_OperationStage) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_OperationStage: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_OperationStage(); if (object.texture_lookup != null) { - if (typeof object.texture_lookup !== "object") - throw TypeError(".CMsgPaintKit_OperationStage.texture_lookup: object expected"); - message.texture_lookup = $root.CMsgPaintKit_Operation_TextureStage.fromObject(object.texture_lookup); + if (!$util.isObject(object.texture_lookup)) + throw $TypeError(".CMsgPaintKit_OperationStage.texture_lookup: object expected"); + message.texture_lookup = $root.CMsgPaintKit_Operation_TextureStage.fromObject(object.texture_lookup, _depth + 1); } if (object.combine_add != null) { - if (typeof object.combine_add !== "object") - throw TypeError(".CMsgPaintKit_OperationStage.combine_add: object expected"); - message.combine_add = $root.CMsgPaintKit_Operation_CombineStage.fromObject(object.combine_add); + if (!$util.isObject(object.combine_add)) + throw $TypeError(".CMsgPaintKit_OperationStage.combine_add: object expected"); + message.combine_add = $root.CMsgPaintKit_Operation_CombineStage.fromObject(object.combine_add, _depth + 1); } if (object.combine_lerp != null) { - if (typeof object.combine_lerp !== "object") - throw TypeError(".CMsgPaintKit_OperationStage.combine_lerp: object expected"); - message.combine_lerp = $root.CMsgPaintKit_Operation_CombineStage.fromObject(object.combine_lerp); + if (!$util.isObject(object.combine_lerp)) + throw $TypeError(".CMsgPaintKit_OperationStage.combine_lerp: object expected"); + message.combine_lerp = $root.CMsgPaintKit_Operation_CombineStage.fromObject(object.combine_lerp, _depth + 1); } if (object.combine_multiply != null) { - if (typeof object.combine_multiply !== "object") - throw TypeError(".CMsgPaintKit_OperationStage.combine_multiply: object expected"); - message.combine_multiply = $root.CMsgPaintKit_Operation_CombineStage.fromObject(object.combine_multiply); + if (!$util.isObject(object.combine_multiply)) + throw $TypeError(".CMsgPaintKit_OperationStage.combine_multiply: object expected"); + message.combine_multiply = $root.CMsgPaintKit_Operation_CombineStage.fromObject(object.combine_multiply, _depth + 1); } if (object.select != null) { - if (typeof object.select !== "object") - throw TypeError(".CMsgPaintKit_OperationStage.select: object expected"); - message.select = $root.CMsgPaintKit_Operation_SelectStage.fromObject(object.select); + if (!$util.isObject(object.select)) + throw $TypeError(".CMsgPaintKit_OperationStage.select: object expected"); + message.select = $root.CMsgPaintKit_Operation_SelectStage.fromObject(object.select, _depth + 1); } if (object.apply_sticker != null) { - if (typeof object.apply_sticker !== "object") - throw TypeError(".CMsgPaintKit_OperationStage.apply_sticker: object expected"); - message.apply_sticker = $root.CMsgPaintKit_Operation_StickerStage.fromObject(object.apply_sticker); + if (!$util.isObject(object.apply_sticker)) + throw $TypeError(".CMsgPaintKit_OperationStage.apply_sticker: object expected"); + message.apply_sticker = $root.CMsgPaintKit_Operation_StickerStage.fromObject(object.apply_sticker, _depth + 1); } return message; }; @@ -9546,37 +11854,41 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPaintKit_OperationStage.toObject = function toObject(message, options) { + CMsgPaintKit_OperationStage.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; - if (message.texture_lookup != null && message.hasOwnProperty("texture_lookup")) { - object.texture_lookup = $root.CMsgPaintKit_Operation_TextureStage.toObject(message.texture_lookup, options); + if (message.texture_lookup != null && $Object.hasOwnProperty.call(message, "texture_lookup")) { + object.texture_lookup = $root.CMsgPaintKit_Operation_TextureStage.toObject(message.texture_lookup, options, _depth + 1); if (options.oneofs) object.stage = "texture_lookup"; } - if (message.combine_add != null && message.hasOwnProperty("combine_add")) { - object.combine_add = $root.CMsgPaintKit_Operation_CombineStage.toObject(message.combine_add, options); + if (message.combine_add != null && $Object.hasOwnProperty.call(message, "combine_add")) { + object.combine_add = $root.CMsgPaintKit_Operation_CombineStage.toObject(message.combine_add, options, _depth + 1); if (options.oneofs) object.stage = "combine_add"; } - if (message.combine_lerp != null && message.hasOwnProperty("combine_lerp")) { - object.combine_lerp = $root.CMsgPaintKit_Operation_CombineStage.toObject(message.combine_lerp, options); + if (message.combine_lerp != null && $Object.hasOwnProperty.call(message, "combine_lerp")) { + object.combine_lerp = $root.CMsgPaintKit_Operation_CombineStage.toObject(message.combine_lerp, options, _depth + 1); if (options.oneofs) object.stage = "combine_lerp"; } - if (message.combine_multiply != null && message.hasOwnProperty("combine_multiply")) { - object.combine_multiply = $root.CMsgPaintKit_Operation_CombineStage.toObject(message.combine_multiply, options); + if (message.combine_multiply != null && $Object.hasOwnProperty.call(message, "combine_multiply")) { + object.combine_multiply = $root.CMsgPaintKit_Operation_CombineStage.toObject(message.combine_multiply, options, _depth + 1); if (options.oneofs) object.stage = "combine_multiply"; } - if (message.select != null && message.hasOwnProperty("select")) { - object.select = $root.CMsgPaintKit_Operation_SelectStage.toObject(message.select, options); + if (message.select != null && $Object.hasOwnProperty.call(message, "select")) { + object.select = $root.CMsgPaintKit_Operation_SelectStage.toObject(message.select, options, _depth + 1); if (options.oneofs) object.stage = "select"; } - if (message.apply_sticker != null && message.hasOwnProperty("apply_sticker")) { - object.apply_sticker = $root.CMsgPaintKit_Operation_StickerStage.toObject(message.apply_sticker, options); + if (message.apply_sticker != null && $Object.hasOwnProperty.call(message, "apply_sticker")) { + object.apply_sticker = $root.CMsgPaintKit_Operation_StickerStage.toObject(message.apply_sticker, options, _depth + 1); if (options.oneofs) object.stage = "apply_sticker"; } @@ -9590,8 +11902,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPaintKit_OperationStage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPaintKit_OperationStage.prototype.toJSON = function() { + return CMsgPaintKit_OperationStage.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPaintKit_OperationStage + * @function getTypeUrl + * @memberof CMsgPaintKit_OperationStage + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPaintKit_OperationStage.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_OperationStage"; }; return CMsgPaintKit_OperationStage; @@ -9599,32 +11925,52 @@ $root.CMsgPaintKit_OperationNode = (function() { + /** + * Properties of a CMsgPaintKit_OperationNode. + * @typedef {Object} CMsgPaintKit_OperationNode.$Properties + * @property {CMsgPaintKit_OperationStage.$Properties|null} [stage] CMsgPaintKit_OperationNode stage + * @property {CMsgProtoDefID.$Properties|null} [operation_template] CMsgPaintKit_OperationNode operation_template + * @property {"stage"|"operation_template"} [node] CMsgPaintKit_OperationNode node + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPaintKit_OperationNode. * @exports ICMsgPaintKit_OperationNode * @interface ICMsgPaintKit_OperationNode - * @property {ICMsgPaintKit_OperationStage|null} [stage] CMsgPaintKit_OperationNode stage - * @property {ICMsgProtoDefID|null} [operation_template] CMsgPaintKit_OperationNode operation_template + * @augments CMsgPaintKit_OperationNode.$Properties + * @deprecated Use CMsgPaintKit_OperationNode.$Properties instead. + */ + + /** + * Narrowed shape of a CMsgPaintKit_OperationNode. + * @typedef {{ + * stage?: CMsgPaintKit_OperationStage.$Shape|null; + * operation_template?: CMsgProtoDefID.$Shape|null; + * $unknowns?: Array.; + * } & ( + * ({ node?: undefined; stage?: null; operation_template?: null }|{ node?: "stage"; stage: CMsgPaintKit_OperationStage.$Shape; operation_template?: null }|{ node?: "operation_template"; stage?: null; operation_template: CMsgProtoDefID.$Shape }) + * )} CMsgPaintKit_OperationNode.$Shape */ /** * Constructs a new CMsgPaintKit_OperationNode. * @exports CMsgPaintKit_OperationNode * @classdesc Represents a CMsgPaintKit_OperationNode. - * @implements ICMsgPaintKit_OperationNode * @constructor - * @param {ICMsgPaintKit_OperationNode=} [properties] Properties to set + * @param {CMsgPaintKit_OperationNode.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPaintKit_OperationNode(properties) { + var CMsgPaintKit_OperationNode = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPaintKit_OperationNode stage. - * @member {ICMsgPaintKit_OperationStage|null|undefined} stage + * @member {CMsgPaintKit_OperationStage.$Properties|null|undefined} stage * @memberof CMsgPaintKit_OperationNode * @instance */ @@ -9632,7 +11978,7 @@ /** * CMsgPaintKit_OperationNode operation_template. - * @member {ICMsgProtoDefID|null|undefined} operation_template + * @member {CMsgProtoDefID.$Properties|null|undefined} operation_template * @memberof CMsgPaintKit_OperationNode * @instance */ @@ -9647,7 +11993,7 @@ * @memberof CMsgPaintKit_OperationNode * @instance */ - Object.defineProperty(CMsgPaintKit_OperationNode.prototype, "node", { + $Object.defineProperty(CMsgPaintKit_OperationNode.prototype, "node", { get: $util.oneOfGetter($oneOfFields = ["stage", "operation_template"]), set: $util.oneOfSetter($oneOfFields) }); @@ -9657,10 +12003,14 @@ * @function create * @memberof CMsgPaintKit_OperationNode * @static - * @param {ICMsgPaintKit_OperationNode=} [properties] Properties to set + * @param {CMsgPaintKit_OperationNode.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_OperationNode} CMsgPaintKit_OperationNode instance + * @type {{ + * (properties: CMsgPaintKit_OperationNode.$Shape): CMsgPaintKit_OperationNode & CMsgPaintKit_OperationNode.$Shape; + * (properties?: CMsgPaintKit_OperationNode.$Properties): CMsgPaintKit_OperationNode; + * }} */ - CMsgPaintKit_OperationNode.create = function create(properties) { + CMsgPaintKit_OperationNode.create = function(properties) { return new CMsgPaintKit_OperationNode(properties); }; @@ -9669,17 +12019,24 @@ * @function encode * @memberof CMsgPaintKit_OperationNode * @static - * @param {ICMsgPaintKit_OperationNode} message CMsgPaintKit_OperationNode message or plain object to encode + * @param {CMsgPaintKit_OperationNode.$Properties} message CMsgPaintKit_OperationNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_OperationNode.encode = function encode(message, writer) { + CMsgPaintKit_OperationNode.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.stage != null && Object.hasOwnProperty.call(message, "stage")) - $root.CMsgPaintKit_OperationStage.encode(message.stage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.operation_template != null && Object.hasOwnProperty.call(message, "operation_template")) - $root.CMsgProtoDefID.encode(message.operation_template, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.stage != null && $Object.hasOwnProperty.call(message, "stage")) + $root.CMsgPaintKit_OperationStage.encode(message.stage, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.operation_template != null && $Object.hasOwnProperty.call(message, "operation_template")) + $root.CMsgProtoDefID.encode(message.operation_template, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9688,12 +12045,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_OperationNode * @static - * @param {ICMsgPaintKit_OperationNode} message CMsgPaintKit_OperationNode message or plain object to encode + * @param {CMsgPaintKit_OperationNode.$Properties} message CMsgPaintKit_OperationNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_OperationNode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPaintKit_OperationNode.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9703,28 +12060,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_OperationNode} CMsgPaintKit_OperationNode + * @returns {CMsgPaintKit_OperationNode & CMsgPaintKit_OperationNode.$Shape} CMsgPaintKit_OperationNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_OperationNode.decode = function decode(reader, length) { + CMsgPaintKit_OperationNode.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_OperationNode(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_OperationNode(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stage = $root.CMsgPaintKit_OperationStage.decode(reader, reader.uint32()); - break; - case 2: - message.operation_template = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.stage = $root.CMsgPaintKit_OperationStage.decode(reader, reader.uint32(), $undefined, _depth + 1, message.stage); + message.node = "stage"; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.operation_template = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.operation_template); + message.node = "operation_template"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -9734,11 +12113,11 @@ * @memberof CMsgPaintKit_OperationNode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_OperationNode} CMsgPaintKit_OperationNode + * @returns {CMsgPaintKit_OperationNode & CMsgPaintKit_OperationNode.$Shape} CMsgPaintKit_OperationNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_OperationNode.decodeDelimited = function decodeDelimited(reader) { + CMsgPaintKit_OperationNode.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9752,24 +12131,28 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPaintKit_OperationNode.verify = function verify(message) { + CMsgPaintKit_OperationNode.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; var properties = {}; - if (message.stage != null && message.hasOwnProperty("stage")) { + if (message.stage != null && $Object.hasOwnProperty.call(message, "stage")) { properties.node = 1; { - var error = $root.CMsgPaintKit_OperationStage.verify(message.stage); + var error = $root.CMsgPaintKit_OperationStage.verify(message.stage, _depth + 1); if (error) return "stage." + error; } } - if (message.operation_template != null && message.hasOwnProperty("operation_template")) { + if (message.operation_template != null && $Object.hasOwnProperty.call(message, "operation_template")) { if (properties.node === 1) return "node: multiple values"; properties.node = 1; { - var error = $root.CMsgProtoDefID.verify(message.operation_template); + var error = $root.CMsgProtoDefID.verify(message.operation_template, _depth + 1); if (error) return "operation_template." + error; } @@ -9785,19 +12168,25 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_OperationNode} CMsgPaintKit_OperationNode */ - CMsgPaintKit_OperationNode.fromObject = function fromObject(object) { + CMsgPaintKit_OperationNode.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_OperationNode) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_OperationNode: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_OperationNode(); if (object.stage != null) { - if (typeof object.stage !== "object") - throw TypeError(".CMsgPaintKit_OperationNode.stage: object expected"); - message.stage = $root.CMsgPaintKit_OperationStage.fromObject(object.stage); + if (!$util.isObject(object.stage)) + throw $TypeError(".CMsgPaintKit_OperationNode.stage: object expected"); + message.stage = $root.CMsgPaintKit_OperationStage.fromObject(object.stage, _depth + 1); } if (object.operation_template != null) { - if (typeof object.operation_template !== "object") - throw TypeError(".CMsgPaintKit_OperationNode.operation_template: object expected"); - message.operation_template = $root.CMsgProtoDefID.fromObject(object.operation_template); + if (!$util.isObject(object.operation_template)) + throw $TypeError(".CMsgPaintKit_OperationNode.operation_template: object expected"); + message.operation_template = $root.CMsgProtoDefID.fromObject(object.operation_template, _depth + 1); } return message; }; @@ -9811,17 +12200,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPaintKit_OperationNode.toObject = function toObject(message, options) { + CMsgPaintKit_OperationNode.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; - if (message.stage != null && message.hasOwnProperty("stage")) { - object.stage = $root.CMsgPaintKit_OperationStage.toObject(message.stage, options); + if (message.stage != null && $Object.hasOwnProperty.call(message, "stage")) { + object.stage = $root.CMsgPaintKit_OperationStage.toObject(message.stage, options, _depth + 1); if (options.oneofs) object.node = "stage"; } - if (message.operation_template != null && message.hasOwnProperty("operation_template")) { - object.operation_template = $root.CMsgProtoDefID.toObject(message.operation_template, options); + if (message.operation_template != null && $Object.hasOwnProperty.call(message, "operation_template")) { + object.operation_template = $root.CMsgProtoDefID.toObject(message.operation_template, options, _depth + 1); if (options.oneofs) object.node = "operation_template"; } @@ -9835,8 +12228,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPaintKit_OperationNode.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPaintKit_OperationNode.prototype.toJSON = function() { + return CMsgPaintKit_OperationNode.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPaintKit_OperationNode + * @function getTypeUrl + * @memberof CMsgPaintKit_OperationNode + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPaintKit_OperationNode.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_OperationNode"; }; return CMsgPaintKit_OperationNode; @@ -9844,33 +12251,50 @@ $root.CMsgPaintKit_Operation = (function() { + /** + * Properties of a CMsgPaintKit_Operation. + * @typedef {Object} CMsgPaintKit_Operation.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgPaintKit_Operation header + * @property {Array.|null} [operation_node] CMsgPaintKit_Operation operation_node + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPaintKit_Operation. * @exports ICMsgPaintKit_Operation * @interface ICMsgPaintKit_Operation - * @property {ICMsgProtoDefHeader} header CMsgPaintKit_Operation header - * @property {Array.|null} [operation_node] CMsgPaintKit_Operation operation_node + * @augments CMsgPaintKit_Operation.$Properties + * @deprecated Use CMsgPaintKit_Operation.$Properties instead. + */ + + /** + * Shape of a CMsgPaintKit_Operation. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * operation_node?: Array.|null; + * $unknowns?: Array.; + * }} CMsgPaintKit_Operation.$Shape */ /** * Constructs a new CMsgPaintKit_Operation. * @exports CMsgPaintKit_Operation * @classdesc Represents a CMsgPaintKit_Operation. - * @implements ICMsgPaintKit_Operation * @constructor - * @param {ICMsgPaintKit_Operation=} [properties] Properties to set + * @param {CMsgPaintKit_Operation.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPaintKit_Operation(properties) { + var CMsgPaintKit_Operation = function (properties) { this.operation_node = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPaintKit_Operation header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgPaintKit_Operation * @instance */ @@ -9878,7 +12302,7 @@ /** * CMsgPaintKit_Operation operation_node. - * @member {Array.} operation_node + * @member {Array.} operation_node * @memberof CMsgPaintKit_Operation * @instance */ @@ -9889,10 +12313,14 @@ * @function create * @memberof CMsgPaintKit_Operation * @static - * @param {ICMsgPaintKit_Operation=} [properties] Properties to set + * @param {CMsgPaintKit_Operation.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_Operation} CMsgPaintKit_Operation instance + * @type {{ + * (properties: CMsgPaintKit_Operation.$Shape): CMsgPaintKit_Operation & CMsgPaintKit_Operation.$Shape; + * (properties?: CMsgPaintKit_Operation.$Properties): CMsgPaintKit_Operation; + * }} */ - CMsgPaintKit_Operation.create = function create(properties) { + CMsgPaintKit_Operation.create = function(properties) { return new CMsgPaintKit_Operation(properties); }; @@ -9901,17 +12329,24 @@ * @function encode * @memberof CMsgPaintKit_Operation * @static - * @param {ICMsgPaintKit_Operation} message CMsgPaintKit_Operation message or plain object to encode + * @param {CMsgPaintKit_Operation.$Properties} message CMsgPaintKit_Operation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation.encode = function encode(message, writer) { + CMsgPaintKit_Operation.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); if (message.operation_node != null && message.operation_node.length) for (var i = 0; i < message.operation_node.length; ++i) - $root.CMsgPaintKit_OperationNode.encode(message.operation_node[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgPaintKit_OperationNode.encode(message.operation_node[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -9920,12 +12355,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_Operation * @static - * @param {ICMsgPaintKit_Operation} message CMsgPaintKit_Operation message or plain object to encode + * @param {CMsgPaintKit_Operation.$Properties} message CMsgPaintKit_Operation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPaintKit_Operation.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -9935,31 +12370,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_Operation} CMsgPaintKit_Operation + * @returns {CMsgPaintKit_Operation & CMsgPaintKit_Operation.$Shape} CMsgPaintKit_Operation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation.decode = function decode(reader, length) { + CMsgPaintKit_Operation.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_Operation(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_Operation(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.operation_node && message.operation_node.length)) - message.operation_node = []; - message.operation_node.push($root.CMsgPaintKit_OperationNode.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.operation_node && message.operation_node.length)) + message.operation_node = []; + message.operation_node.push($root.CMsgPaintKit_OperationNode.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("header")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) throw $util.ProtocolError("missing required 'header'", { instance: message }); return message; }; @@ -9970,11 +12425,11 @@ * @memberof CMsgPaintKit_Operation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_Operation} CMsgPaintKit_Operation + * @returns {CMsgPaintKit_Operation & CMsgPaintKit_Operation.$Shape} CMsgPaintKit_Operation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Operation.decodeDelimited = function decodeDelimited(reader) { + CMsgPaintKit_Operation.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -9988,19 +12443,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPaintKit_Operation.verify = function verify(message) { + CMsgPaintKit_Operation.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } - if (message.operation_node != null && message.hasOwnProperty("operation_node")) { - if (!Array.isArray(message.operation_node)) + if (message.operation_node != null && $Object.hasOwnProperty.call(message, "operation_node")) { + if (!$Array.isArray(message.operation_node)) return "operation_node: array expected"; for (var i = 0; i < message.operation_node.length; ++i) { - var error = $root.CMsgPaintKit_OperationNode.verify(message.operation_node[i]); + var error = $root.CMsgPaintKit_OperationNode.verify(message.operation_node[i], _depth + 1); if (error) return "operation_node." + error; } @@ -10016,23 +12475,29 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_Operation} CMsgPaintKit_Operation */ - CMsgPaintKit_Operation.fromObject = function fromObject(object) { + CMsgPaintKit_Operation.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_Operation) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_Operation: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_Operation(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgPaintKit_Operation.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgPaintKit_Operation.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } if (object.operation_node) { - if (!Array.isArray(object.operation_node)) - throw TypeError(".CMsgPaintKit_Operation.operation_node: array expected"); - message.operation_node = []; + if (!$Array.isArray(object.operation_node)) + throw $TypeError(".CMsgPaintKit_Operation.operation_node: array expected"); + message.operation_node = $Array(object.operation_node.length); for (var i = 0; i < object.operation_node.length; ++i) { - if (typeof object.operation_node[i] !== "object") - throw TypeError(".CMsgPaintKit_Operation.operation_node: object expected"); - message.operation_node[i] = $root.CMsgPaintKit_OperationNode.fromObject(object.operation_node[i]); + if (!$util.isObject(object.operation_node[i])) + throw $TypeError(".CMsgPaintKit_Operation.operation_node: object expected"); + message.operation_node[i] = $root.CMsgPaintKit_OperationNode.fromObject(object.operation_node[i], _depth + 1); } } return message; @@ -10047,20 +12512,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPaintKit_Operation.toObject = function toObject(message, options) { + CMsgPaintKit_Operation.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.operation_node = []; if (options.defaults) object.header = null; - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); if (message.operation_node && message.operation_node.length) { - object.operation_node = []; + object.operation_node = $Array(message.operation_node.length); for (var j = 0; j < message.operation_node.length; ++j) - object.operation_node[j] = $root.CMsgPaintKit_OperationNode.toObject(message.operation_node[j], options); + object.operation_node[j] = $root.CMsgPaintKit_OperationNode.toObject(message.operation_node[j], options, _depth + 1); } return object; }; @@ -10072,8 +12541,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgPaintKit_Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPaintKit_Operation.prototype.toJSON = function() { + return CMsgPaintKit_Operation.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPaintKit_Operation + * @function getTypeUrl + * @memberof CMsgPaintKit_Operation + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPaintKit_Operation.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_Operation"; }; return CMsgPaintKit_Operation; @@ -10081,35 +12564,54 @@ $root.CMsgPaintKit_ItemDefinition = (function() { + /** + * Properties of a CMsgPaintKit_ItemDefinition. + * @typedef {Object} CMsgPaintKit_ItemDefinition.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgPaintKit_ItemDefinition header + * @property {number} item_definition_index CMsgPaintKit_ItemDefinition item_definition_index + * @property {CMsgProtoDefID.$Properties|null} [variable_template] CMsgPaintKit_ItemDefinition variable_template + * @property {Array.|null} [definition] CMsgPaintKit_ItemDefinition definition + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgPaintKit_ItemDefinition. * @exports ICMsgPaintKit_ItemDefinition * @interface ICMsgPaintKit_ItemDefinition - * @property {ICMsgProtoDefHeader} header CMsgPaintKit_ItemDefinition header - * @property {number} item_definition_index CMsgPaintKit_ItemDefinition item_definition_index - * @property {ICMsgProtoDefID|null} [variable_template] CMsgPaintKit_ItemDefinition variable_template - * @property {Array.|null} [definition] CMsgPaintKit_ItemDefinition definition + * @augments CMsgPaintKit_ItemDefinition.$Properties + * @deprecated Use CMsgPaintKit_ItemDefinition.$Properties instead. + */ + + /** + * Shape of a CMsgPaintKit_ItemDefinition. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * item_definition_index: number; + * variable_template?: CMsgProtoDefID.$Shape|null; + * definition?: Array.|null; + * $unknowns?: Array.; + * }} CMsgPaintKit_ItemDefinition.$Shape */ /** * Constructs a new CMsgPaintKit_ItemDefinition. * @exports CMsgPaintKit_ItemDefinition * @classdesc Represents a CMsgPaintKit_ItemDefinition. - * @implements ICMsgPaintKit_ItemDefinition * @constructor - * @param {ICMsgPaintKit_ItemDefinition=} [properties] Properties to set + * @param {CMsgPaintKit_ItemDefinition.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPaintKit_ItemDefinition(properties) { + var CMsgPaintKit_ItemDefinition = function (properties) { this.definition = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPaintKit_ItemDefinition header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgPaintKit_ItemDefinition * @instance */ @@ -10125,7 +12627,7 @@ /** * CMsgPaintKit_ItemDefinition variable_template. - * @member {ICMsgProtoDefID|null|undefined} variable_template + * @member {CMsgProtoDefID.$Properties|null|undefined} variable_template * @memberof CMsgPaintKit_ItemDefinition * @instance */ @@ -10133,7 +12635,7 @@ /** * CMsgPaintKit_ItemDefinition definition. - * @member {Array.} definition + * @member {Array.} definition * @memberof CMsgPaintKit_ItemDefinition * @instance */ @@ -10144,10 +12646,14 @@ * @function create * @memberof CMsgPaintKit_ItemDefinition * @static - * @param {ICMsgPaintKit_ItemDefinition=} [properties] Properties to set + * @param {CMsgPaintKit_ItemDefinition.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_ItemDefinition} CMsgPaintKit_ItemDefinition instance + * @type {{ + * (properties: CMsgPaintKit_ItemDefinition.$Shape): CMsgPaintKit_ItemDefinition & CMsgPaintKit_ItemDefinition.$Shape; + * (properties?: CMsgPaintKit_ItemDefinition.$Properties): CMsgPaintKit_ItemDefinition; + * }} */ - CMsgPaintKit_ItemDefinition.create = function create(properties) { + CMsgPaintKit_ItemDefinition.create = function(properties) { return new CMsgPaintKit_ItemDefinition(properties); }; @@ -10156,20 +12662,27 @@ * @function encode * @memberof CMsgPaintKit_ItemDefinition * @static - * @param {ICMsgPaintKit_ItemDefinition} message CMsgPaintKit_ItemDefinition message or plain object to encode + * @param {CMsgPaintKit_ItemDefinition.$Properties} message CMsgPaintKit_ItemDefinition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_ItemDefinition.encode = function encode(message, writer) { + CMsgPaintKit_ItemDefinition.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.item_definition_index); - if (message.variable_template != null && Object.hasOwnProperty.call(message, "variable_template")) - $root.CMsgProtoDefID.encode(message.variable_template, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.variable_template != null && $Object.hasOwnProperty.call(message, "variable_template")) + $root.CMsgProtoDefID.encode(message.variable_template, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); if (message.definition != null && message.definition.length) for (var i = 0; i < message.definition.length; ++i) - $root.CMsgPaintKit_ItemDefinition.Definition.encode(message.definition[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgPaintKit_ItemDefinition.Definition.encode(message.definition[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10178,12 +12691,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_ItemDefinition * @static - * @param {ICMsgPaintKit_ItemDefinition} message CMsgPaintKit_ItemDefinition message or plain object to encode + * @param {CMsgPaintKit_ItemDefinition.$Properties} message CMsgPaintKit_ItemDefinition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_ItemDefinition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPaintKit_ItemDefinition.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10193,39 +12706,65 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_ItemDefinition} CMsgPaintKit_ItemDefinition + * @returns {CMsgPaintKit_ItemDefinition & CMsgPaintKit_ItemDefinition.$Shape} CMsgPaintKit_ItemDefinition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_ItemDefinition.decode = function decode(reader, length) { + CMsgPaintKit_ItemDefinition.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_ItemDefinition(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_ItemDefinition(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - case 2: - message.item_definition_index = reader.uint32(); - break; - case 3: - message.variable_template = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.definition && message.definition.length)) - message.definition = []; - message.definition.push($root.CMsgPaintKit_ItemDefinition.Definition.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.item_definition_index = reader.uint32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.variable_template = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.variable_template); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.definition && message.definition.length)) + message.definition = []; + message.definition.push($root.CMsgPaintKit_ItemDefinition.Definition.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("header")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) throw $util.ProtocolError("missing required 'header'", { instance: message }); - if (!message.hasOwnProperty("item_definition_index")) + if (!$Object.hasOwnProperty.call(message, "item_definition_index")) throw $util.ProtocolError("missing required 'item_definition_index'", { instance: message }); return message; }; @@ -10236,11 +12775,11 @@ * @memberof CMsgPaintKit_ItemDefinition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_ItemDefinition} CMsgPaintKit_ItemDefinition + * @returns {CMsgPaintKit_ItemDefinition & CMsgPaintKit_ItemDefinition.$Shape} CMsgPaintKit_ItemDefinition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_ItemDefinition.decodeDelimited = function decodeDelimited(reader) { + CMsgPaintKit_ItemDefinition.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10254,26 +12793,30 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPaintKit_ItemDefinition.verify = function verify(message) { + CMsgPaintKit_ItemDefinition.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } if (!$util.isInteger(message.item_definition_index)) return "item_definition_index: integer expected"; - if (message.variable_template != null && message.hasOwnProperty("variable_template")) { - var error = $root.CMsgProtoDefID.verify(message.variable_template); + if (message.variable_template != null && $Object.hasOwnProperty.call(message, "variable_template")) { + var error = $root.CMsgProtoDefID.verify(message.variable_template, _depth + 1); if (error) return "variable_template." + error; } - if (message.definition != null && message.hasOwnProperty("definition")) { - if (!Array.isArray(message.definition)) + if (message.definition != null && $Object.hasOwnProperty.call(message, "definition")) { + if (!$Array.isArray(message.definition)) return "definition: array expected"; for (var i = 0; i < message.definition.length; ++i) { - var error = $root.CMsgPaintKit_ItemDefinition.Definition.verify(message.definition[i]); + var error = $root.CMsgPaintKit_ItemDefinition.Definition.verify(message.definition[i], _depth + 1); if (error) return "definition." + error; } @@ -10289,30 +12832,36 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_ItemDefinition} CMsgPaintKit_ItemDefinition */ - CMsgPaintKit_ItemDefinition.fromObject = function fromObject(object) { + CMsgPaintKit_ItemDefinition.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_ItemDefinition) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_ItemDefinition: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_ItemDefinition(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgPaintKit_ItemDefinition.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgPaintKit_ItemDefinition.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } if (object.item_definition_index != null) message.item_definition_index = object.item_definition_index >>> 0; if (object.variable_template != null) { - if (typeof object.variable_template !== "object") - throw TypeError(".CMsgPaintKit_ItemDefinition.variable_template: object expected"); - message.variable_template = $root.CMsgProtoDefID.fromObject(object.variable_template); + if (!$util.isObject(object.variable_template)) + throw $TypeError(".CMsgPaintKit_ItemDefinition.variable_template: object expected"); + message.variable_template = $root.CMsgProtoDefID.fromObject(object.variable_template, _depth + 1); } if (object.definition) { - if (!Array.isArray(object.definition)) - throw TypeError(".CMsgPaintKit_ItemDefinition.definition: array expected"); - message.definition = []; + if (!$Array.isArray(object.definition)) + throw $TypeError(".CMsgPaintKit_ItemDefinition.definition: array expected"); + message.definition = $Array(object.definition.length); for (var i = 0; i < object.definition.length; ++i) { - if (typeof object.definition[i] !== "object") - throw TypeError(".CMsgPaintKit_ItemDefinition.definition: object expected"); - message.definition[i] = $root.CMsgPaintKit_ItemDefinition.Definition.fromObject(object.definition[i]); + if (!$util.isObject(object.definition[i])) + throw $TypeError(".CMsgPaintKit_ItemDefinition.definition: object expected"); + message.definition[i] = $root.CMsgPaintKit_ItemDefinition.Definition.fromObject(object.definition[i], _depth + 1); } } return message; @@ -10327,9 +12876,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPaintKit_ItemDefinition.toObject = function toObject(message, options) { + CMsgPaintKit_ItemDefinition.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.definition = []; @@ -10338,16 +12891,16 @@ object.item_definition_index = 0; object.variable_template = null; } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); - if (message.item_definition_index != null && message.hasOwnProperty("item_definition_index")) + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); + if (message.item_definition_index != null && $Object.hasOwnProperty.call(message, "item_definition_index")) object.item_definition_index = message.item_definition_index; - if (message.variable_template != null && message.hasOwnProperty("variable_template")) - object.variable_template = $root.CMsgProtoDefID.toObject(message.variable_template, options); + if (message.variable_template != null && $Object.hasOwnProperty.call(message, "variable_template")) + object.variable_template = $root.CMsgProtoDefID.toObject(message.variable_template, options, _depth + 1); if (message.definition && message.definition.length) { - object.definition = []; + object.definition = $Array(message.definition.length); for (var j = 0; j < message.definition.length; ++j) - object.definition[j] = $root.CMsgPaintKit_ItemDefinition.Definition.toObject(message.definition[j], options); + object.definition[j] = $root.CMsgPaintKit_ItemDefinition.Definition.toObject(message.definition[j], options, _depth + 1); } return object; }; @@ -10359,39 +12912,70 @@ * @instance * @returns {Object.} JSON object */ - CMsgPaintKit_ItemDefinition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPaintKit_ItemDefinition.prototype.toJSON = function() { + return CMsgPaintKit_ItemDefinition.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPaintKit_ItemDefinition + * @function getTypeUrl + * @memberof CMsgPaintKit_ItemDefinition + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPaintKit_ItemDefinition.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_ItemDefinition"; }; CMsgPaintKit_ItemDefinition.Definition = (function() { + /** + * Properties of a Definition. + * @typedef {Object} CMsgPaintKit_ItemDefinition.Definition.$Properties + * @property {CMsgProtoDefID.$Properties|null} [operation_template] Definition operation_template + * @property {Array.|null} [variable] Definition variable + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a Definition. * @memberof CMsgPaintKit_ItemDefinition * @interface IDefinition - * @property {ICMsgProtoDefID|null} [operation_template] Definition operation_template - * @property {Array.|null} [variable] Definition variable + * @augments CMsgPaintKit_ItemDefinition.Definition.$Properties + * @deprecated Use CMsgPaintKit_ItemDefinition.Definition.$Properties instead. + */ + + /** + * Shape of a Definition. + * @typedef {{ + * operation_template?: CMsgProtoDefID.$Shape|null; + * variable?: Array.|null; + * $unknowns?: Array.; + * }} CMsgPaintKit_ItemDefinition.Definition.$Shape */ /** * Constructs a new Definition. * @memberof CMsgPaintKit_ItemDefinition * @classdesc Represents a Definition. - * @implements IDefinition * @constructor - * @param {CMsgPaintKit_ItemDefinition.IDefinition=} [properties] Properties to set + * @param {CMsgPaintKit_ItemDefinition.Definition.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Definition(properties) { + var Definition = function (properties) { this.variable = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Definition operation_template. - * @member {ICMsgProtoDefID|null|undefined} operation_template + * @member {CMsgProtoDefID.$Properties|null|undefined} operation_template * @memberof CMsgPaintKit_ItemDefinition.Definition * @instance */ @@ -10399,7 +12983,7 @@ /** * Definition variable. - * @member {Array.} variable + * @member {Array.} variable * @memberof CMsgPaintKit_ItemDefinition.Definition * @instance */ @@ -10410,10 +12994,14 @@ * @function create * @memberof CMsgPaintKit_ItemDefinition.Definition * @static - * @param {CMsgPaintKit_ItemDefinition.IDefinition=} [properties] Properties to set + * @param {CMsgPaintKit_ItemDefinition.Definition.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_ItemDefinition.Definition} Definition instance + * @type {{ + * (properties: CMsgPaintKit_ItemDefinition.Definition.$Shape): CMsgPaintKit_ItemDefinition.Definition & CMsgPaintKit_ItemDefinition.Definition.$Shape; + * (properties?: CMsgPaintKit_ItemDefinition.Definition.$Properties): CMsgPaintKit_ItemDefinition.Definition; + * }} */ - Definition.create = function create(properties) { + Definition.create = function(properties) { return new Definition(properties); }; @@ -10422,18 +13010,25 @@ * @function encode * @memberof CMsgPaintKit_ItemDefinition.Definition * @static - * @param {CMsgPaintKit_ItemDefinition.IDefinition} message Definition message or plain object to encode + * @param {CMsgPaintKit_ItemDefinition.Definition.$Properties} message Definition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Definition.encode = function encode(message, writer) { + Definition.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.operation_template != null && Object.hasOwnProperty.call(message, "operation_template")) - $root.CMsgProtoDefID.encode(message.operation_template, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.operation_template != null && $Object.hasOwnProperty.call(message, "operation_template")) + $root.CMsgProtoDefID.encode(message.operation_template, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); if (message.variable != null && message.variable.length) for (var i = 0; i < message.variable.length; ++i) - $root.CMsgVarField.encode(message.variable[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgVarField.encode(message.variable[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -10442,12 +13037,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_ItemDefinition.Definition * @static - * @param {CMsgPaintKit_ItemDefinition.IDefinition} message Definition message or plain object to encode + * @param {CMsgPaintKit_ItemDefinition.Definition.$Properties} message Definition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Definition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Definition.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -10457,32 +13052,52 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_ItemDefinition.Definition} Definition + * @returns {CMsgPaintKit_ItemDefinition.Definition & CMsgPaintKit_ItemDefinition.Definition.$Shape} Definition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Definition.decode = function decode(reader, length) { + Definition.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_ItemDefinition.Definition(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_ItemDefinition.Definition(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operation_template = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.variable && message.variable.length)) - message.variable = []; - message.variable.push($root.CMsgVarField.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } - } - return message; - }; + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.operation_template = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.operation_template); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.variable && message.variable.length)) + message.variable = []; + message.variable.push($root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; /** * Decodes a Definition message from the specified reader or buffer, length delimited. @@ -10490,11 +13105,11 @@ * @memberof CMsgPaintKit_ItemDefinition.Definition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_ItemDefinition.Definition} Definition + * @returns {CMsgPaintKit_ItemDefinition.Definition & CMsgPaintKit_ItemDefinition.Definition.$Shape} Definition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Definition.decodeDelimited = function decodeDelimited(reader) { + Definition.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -10508,19 +13123,23 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Definition.verify = function verify(message) { + Definition.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.operation_template != null && message.hasOwnProperty("operation_template")) { - var error = $root.CMsgProtoDefID.verify(message.operation_template); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.operation_template != null && $Object.hasOwnProperty.call(message, "operation_template")) { + var error = $root.CMsgProtoDefID.verify(message.operation_template, _depth + 1); if (error) return "operation_template." + error; } - if (message.variable != null && message.hasOwnProperty("variable")) { - if (!Array.isArray(message.variable)) + if (message.variable != null && $Object.hasOwnProperty.call(message, "variable")) { + if (!$Array.isArray(message.variable)) return "variable: array expected"; for (var i = 0; i < message.variable.length; ++i) { - var error = $root.CMsgVarField.verify(message.variable[i]); + var error = $root.CMsgVarField.verify(message.variable[i], _depth + 1); if (error) return "variable." + error; } @@ -10536,23 +13155,29 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_ItemDefinition.Definition} Definition */ - Definition.fromObject = function fromObject(object) { + Definition.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_ItemDefinition.Definition) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_ItemDefinition.Definition: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_ItemDefinition.Definition(); if (object.operation_template != null) { - if (typeof object.operation_template !== "object") - throw TypeError(".CMsgPaintKit_ItemDefinition.Definition.operation_template: object expected"); - message.operation_template = $root.CMsgProtoDefID.fromObject(object.operation_template); + if (!$util.isObject(object.operation_template)) + throw $TypeError(".CMsgPaintKit_ItemDefinition.Definition.operation_template: object expected"); + message.operation_template = $root.CMsgProtoDefID.fromObject(object.operation_template, _depth + 1); } if (object.variable) { - if (!Array.isArray(object.variable)) - throw TypeError(".CMsgPaintKit_ItemDefinition.Definition.variable: array expected"); - message.variable = []; + if (!$Array.isArray(object.variable)) + throw $TypeError(".CMsgPaintKit_ItemDefinition.Definition.variable: array expected"); + message.variable = $Array(object.variable.length); for (var i = 0; i < object.variable.length; ++i) { - if (typeof object.variable[i] !== "object") - throw TypeError(".CMsgPaintKit_ItemDefinition.Definition.variable: object expected"); - message.variable[i] = $root.CMsgVarField.fromObject(object.variable[i]); + if (!$util.isObject(object.variable[i])) + throw $TypeError(".CMsgPaintKit_ItemDefinition.Definition.variable: object expected"); + message.variable[i] = $root.CMsgVarField.fromObject(object.variable[i], _depth + 1); } } return message; @@ -10567,20 +13192,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Definition.toObject = function toObject(message, options) { + Definition.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.variable = []; if (options.defaults) object.operation_template = null; - if (message.operation_template != null && message.hasOwnProperty("operation_template")) - object.operation_template = $root.CMsgProtoDefID.toObject(message.operation_template, options); + if (message.operation_template != null && $Object.hasOwnProperty.call(message, "operation_template")) + object.operation_template = $root.CMsgProtoDefID.toObject(message.operation_template, options, _depth + 1); if (message.variable && message.variable.length) { - object.variable = []; + object.variable = $Array(message.variable.length); for (var j = 0; j < message.variable.length; ++j) - object.variable[j] = $root.CMsgVarField.toObject(message.variable[j], options); + object.variable[j] = $root.CMsgVarField.toObject(message.variable[j], options, _depth + 1); } return object; }; @@ -10592,8 +13221,22 @@ * @instance * @returns {Object.} JSON object */ - Definition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Definition.prototype.toJSON = function() { + return Definition.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Definition + * @function getTypeUrl + * @memberof CMsgPaintKit_ItemDefinition.Definition + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Definition.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_ItemDefinition.Definition"; }; return Definition; @@ -10606,79 +13249,144 @@ /** * Properties of a CMsgPaintKit_Definition. - * @exports ICMsgPaintKit_Definition - * @interface ICMsgPaintKit_Definition - * @property {ICMsgProtoDefHeader} header CMsgPaintKit_Definition header + * @typedef {Object} CMsgPaintKit_Definition.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgPaintKit_Definition header * @property {string|null} [loc_desctoken] CMsgPaintKit_Definition loc_desctoken - * @property {ICMsgProtoDefID|null} [operation_template] CMsgPaintKit_Definition operation_template + * @property {CMsgProtoDefID.$Properties|null} [operation_template] CMsgPaintKit_Definition operation_template * @property {boolean|null} [has_team_textures] CMsgPaintKit_Definition has_team_textures - * @property {Array.|null} [item] CMsgPaintKit_Definition item - * @property {CMsgPaintKit_Definition.IItem|null} [paintkit_tool] CMsgPaintKit_Definition paintkit_tool - * @property {CMsgPaintKit_Definition.IItem|null} [flamethrower] CMsgPaintKit_Definition flamethrower - * @property {CMsgPaintKit_Definition.IItem|null} [grenadelauncher] CMsgPaintKit_Definition grenadelauncher - * @property {CMsgPaintKit_Definition.IItem|null} [knife] CMsgPaintKit_Definition knife - * @property {CMsgPaintKit_Definition.IItem|null} [medigun] CMsgPaintKit_Definition medigun - * @property {CMsgPaintKit_Definition.IItem|null} [minigun] CMsgPaintKit_Definition minigun - * @property {CMsgPaintKit_Definition.IItem|null} [pistol] CMsgPaintKit_Definition pistol - * @property {CMsgPaintKit_Definition.IItem|null} [revolver] CMsgPaintKit_Definition revolver - * @property {CMsgPaintKit_Definition.IItem|null} [rocketlauncher] CMsgPaintKit_Definition rocketlauncher - * @property {CMsgPaintKit_Definition.IItem|null} [scattergun] CMsgPaintKit_Definition scattergun - * @property {CMsgPaintKit_Definition.IItem|null} [shotgun] CMsgPaintKit_Definition shotgun - * @property {CMsgPaintKit_Definition.IItem|null} [smg] CMsgPaintKit_Definition smg - * @property {CMsgPaintKit_Definition.IItem|null} [sniperrifle] CMsgPaintKit_Definition sniperrifle - * @property {CMsgPaintKit_Definition.IItem|null} [stickybomb_launcher] CMsgPaintKit_Definition stickybomb_launcher - * @property {CMsgPaintKit_Definition.IItem|null} [ubersaw] CMsgPaintKit_Definition ubersaw - * @property {CMsgPaintKit_Definition.IItem|null} [wrench] CMsgPaintKit_Definition wrench - * @property {CMsgPaintKit_Definition.IItem|null} [amputator] CMsgPaintKit_Definition amputator - * @property {CMsgPaintKit_Definition.IItem|null} [atom_launcher] CMsgPaintKit_Definition atom_launcher - * @property {CMsgPaintKit_Definition.IItem|null} [back_scratcher] CMsgPaintKit_Definition back_scratcher - * @property {CMsgPaintKit_Definition.IItem|null} [battleaxe] CMsgPaintKit_Definition battleaxe - * @property {CMsgPaintKit_Definition.IItem|null} [bazaar_sniper] CMsgPaintKit_Definition bazaar_sniper - * @property {CMsgPaintKit_Definition.IItem|null} [blackbox] CMsgPaintKit_Definition blackbox - * @property {CMsgPaintKit_Definition.IItem|null} [claidheamohmor] CMsgPaintKit_Definition claidheamohmor - * @property {CMsgPaintKit_Definition.IItem|null} [crusaders_crossbow] CMsgPaintKit_Definition crusaders_crossbow - * @property {CMsgPaintKit_Definition.IItem|null} [degreaser] CMsgPaintKit_Definition degreaser - * @property {CMsgPaintKit_Definition.IItem|null} [demo_cannon] CMsgPaintKit_Definition demo_cannon - * @property {CMsgPaintKit_Definition.IItem|null} [demo_sultan_sword] CMsgPaintKit_Definition demo_sultan_sword - * @property {CMsgPaintKit_Definition.IItem|null} [detonator] CMsgPaintKit_Definition detonator - * @property {CMsgPaintKit_Definition.IItem|null} [gatling_gun] CMsgPaintKit_Definition gatling_gun - * @property {CMsgPaintKit_Definition.IItem|null} [holymackerel] CMsgPaintKit_Definition holymackerel - * @property {CMsgPaintKit_Definition.IItem|null} [jag] CMsgPaintKit_Definition jag - * @property {CMsgPaintKit_Definition.IItem|null} [lochnload] CMsgPaintKit_Definition lochnload - * @property {CMsgPaintKit_Definition.IItem|null} [powerjack] CMsgPaintKit_Definition powerjack - * @property {CMsgPaintKit_Definition.IItem|null} [quadball] CMsgPaintKit_Definition quadball - * @property {CMsgPaintKit_Definition.IItem|null} [reserve_shooter] CMsgPaintKit_Definition reserve_shooter - * @property {CMsgPaintKit_Definition.IItem|null} [riding_crop] CMsgPaintKit_Definition riding_crop - * @property {CMsgPaintKit_Definition.IItem|null} [russian_riot] CMsgPaintKit_Definition russian_riot - * @property {CMsgPaintKit_Definition.IItem|null} [scimitar] CMsgPaintKit_Definition scimitar - * @property {CMsgPaintKit_Definition.IItem|null} [scorch_shot] CMsgPaintKit_Definition scorch_shot - * @property {CMsgPaintKit_Definition.IItem|null} [shortstop] CMsgPaintKit_Definition shortstop - * @property {CMsgPaintKit_Definition.IItem|null} [soda_popper] CMsgPaintKit_Definition soda_popper - * @property {CMsgPaintKit_Definition.IItem|null} [tele_shotgun] CMsgPaintKit_Definition tele_shotgun - * @property {CMsgPaintKit_Definition.IItem|null} [tomislav] CMsgPaintKit_Definition tomislav - * @property {CMsgPaintKit_Definition.IItem|null} [trenchgun] CMsgPaintKit_Definition trenchgun - * @property {CMsgPaintKit_Definition.IItem|null} [winger_pistol] CMsgPaintKit_Definition winger_pistol + * @property {Array.|null} [item] CMsgPaintKit_Definition item + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [paintkit_tool] CMsgPaintKit_Definition paintkit_tool + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [flamethrower] CMsgPaintKit_Definition flamethrower + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [grenadelauncher] CMsgPaintKit_Definition grenadelauncher + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [knife] CMsgPaintKit_Definition knife + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [medigun] CMsgPaintKit_Definition medigun + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [minigun] CMsgPaintKit_Definition minigun + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [pistol] CMsgPaintKit_Definition pistol + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [revolver] CMsgPaintKit_Definition revolver + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [rocketlauncher] CMsgPaintKit_Definition rocketlauncher + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [scattergun] CMsgPaintKit_Definition scattergun + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [shotgun] CMsgPaintKit_Definition shotgun + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [smg] CMsgPaintKit_Definition smg + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [sniperrifle] CMsgPaintKit_Definition sniperrifle + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [stickybomb_launcher] CMsgPaintKit_Definition stickybomb_launcher + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [ubersaw] CMsgPaintKit_Definition ubersaw + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [wrench] CMsgPaintKit_Definition wrench + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [amputator] CMsgPaintKit_Definition amputator + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [atom_launcher] CMsgPaintKit_Definition atom_launcher + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [back_scratcher] CMsgPaintKit_Definition back_scratcher + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [battleaxe] CMsgPaintKit_Definition battleaxe + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [bazaar_sniper] CMsgPaintKit_Definition bazaar_sniper + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [blackbox] CMsgPaintKit_Definition blackbox + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [claidheamohmor] CMsgPaintKit_Definition claidheamohmor + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [crusaders_crossbow] CMsgPaintKit_Definition crusaders_crossbow + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [degreaser] CMsgPaintKit_Definition degreaser + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [demo_cannon] CMsgPaintKit_Definition demo_cannon + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [demo_sultan_sword] CMsgPaintKit_Definition demo_sultan_sword + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [detonator] CMsgPaintKit_Definition detonator + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [gatling_gun] CMsgPaintKit_Definition gatling_gun + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [holymackerel] CMsgPaintKit_Definition holymackerel + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [jag] CMsgPaintKit_Definition jag + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [lochnload] CMsgPaintKit_Definition lochnload + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [powerjack] CMsgPaintKit_Definition powerjack + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [quadball] CMsgPaintKit_Definition quadball + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [reserve_shooter] CMsgPaintKit_Definition reserve_shooter + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [riding_crop] CMsgPaintKit_Definition riding_crop + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [russian_riot] CMsgPaintKit_Definition russian_riot + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [scimitar] CMsgPaintKit_Definition scimitar + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [scorch_shot] CMsgPaintKit_Definition scorch_shot + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [shortstop] CMsgPaintKit_Definition shortstop + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [soda_popper] CMsgPaintKit_Definition soda_popper + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [tele_shotgun] CMsgPaintKit_Definition tele_shotgun + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [tomislav] CMsgPaintKit_Definition tomislav + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [trenchgun] CMsgPaintKit_Definition trenchgun + * @property {CMsgPaintKit_Definition.Item.$Properties|null} [winger_pistol] CMsgPaintKit_Definition winger_pistol + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgPaintKit_Definition. + * @exports ICMsgPaintKit_Definition + * @interface ICMsgPaintKit_Definition + * @augments CMsgPaintKit_Definition.$Properties + * @deprecated Use CMsgPaintKit_Definition.$Properties instead. + */ + + /** + * Shape of a CMsgPaintKit_Definition. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * loc_desctoken?: string|null; + * operation_template?: CMsgProtoDefID.$Shape|null; + * has_team_textures?: boolean|null; + * item?: Array.|null; + * paintkit_tool?: CMsgPaintKit_Definition.Item.$Shape|null; + * flamethrower?: CMsgPaintKit_Definition.Item.$Shape|null; + * grenadelauncher?: CMsgPaintKit_Definition.Item.$Shape|null; + * knife?: CMsgPaintKit_Definition.Item.$Shape|null; + * medigun?: CMsgPaintKit_Definition.Item.$Shape|null; + * minigun?: CMsgPaintKit_Definition.Item.$Shape|null; + * pistol?: CMsgPaintKit_Definition.Item.$Shape|null; + * revolver?: CMsgPaintKit_Definition.Item.$Shape|null; + * rocketlauncher?: CMsgPaintKit_Definition.Item.$Shape|null; + * scattergun?: CMsgPaintKit_Definition.Item.$Shape|null; + * shotgun?: CMsgPaintKit_Definition.Item.$Shape|null; + * smg?: CMsgPaintKit_Definition.Item.$Shape|null; + * sniperrifle?: CMsgPaintKit_Definition.Item.$Shape|null; + * stickybomb_launcher?: CMsgPaintKit_Definition.Item.$Shape|null; + * ubersaw?: CMsgPaintKit_Definition.Item.$Shape|null; + * wrench?: CMsgPaintKit_Definition.Item.$Shape|null; + * amputator?: CMsgPaintKit_Definition.Item.$Shape|null; + * atom_launcher?: CMsgPaintKit_Definition.Item.$Shape|null; + * back_scratcher?: CMsgPaintKit_Definition.Item.$Shape|null; + * battleaxe?: CMsgPaintKit_Definition.Item.$Shape|null; + * bazaar_sniper?: CMsgPaintKit_Definition.Item.$Shape|null; + * blackbox?: CMsgPaintKit_Definition.Item.$Shape|null; + * claidheamohmor?: CMsgPaintKit_Definition.Item.$Shape|null; + * crusaders_crossbow?: CMsgPaintKit_Definition.Item.$Shape|null; + * degreaser?: CMsgPaintKit_Definition.Item.$Shape|null; + * demo_cannon?: CMsgPaintKit_Definition.Item.$Shape|null; + * demo_sultan_sword?: CMsgPaintKit_Definition.Item.$Shape|null; + * detonator?: CMsgPaintKit_Definition.Item.$Shape|null; + * gatling_gun?: CMsgPaintKit_Definition.Item.$Shape|null; + * holymackerel?: CMsgPaintKit_Definition.Item.$Shape|null; + * jag?: CMsgPaintKit_Definition.Item.$Shape|null; + * lochnload?: CMsgPaintKit_Definition.Item.$Shape|null; + * powerjack?: CMsgPaintKit_Definition.Item.$Shape|null; + * quadball?: CMsgPaintKit_Definition.Item.$Shape|null; + * reserve_shooter?: CMsgPaintKit_Definition.Item.$Shape|null; + * riding_crop?: CMsgPaintKit_Definition.Item.$Shape|null; + * russian_riot?: CMsgPaintKit_Definition.Item.$Shape|null; + * scimitar?: CMsgPaintKit_Definition.Item.$Shape|null; + * scorch_shot?: CMsgPaintKit_Definition.Item.$Shape|null; + * shortstop?: CMsgPaintKit_Definition.Item.$Shape|null; + * soda_popper?: CMsgPaintKit_Definition.Item.$Shape|null; + * tele_shotgun?: CMsgPaintKit_Definition.Item.$Shape|null; + * tomislav?: CMsgPaintKit_Definition.Item.$Shape|null; + * trenchgun?: CMsgPaintKit_Definition.Item.$Shape|null; + * winger_pistol?: CMsgPaintKit_Definition.Item.$Shape|null; + * $unknowns?: Array.; + * }} CMsgPaintKit_Definition.$Shape */ /** * Constructs a new CMsgPaintKit_Definition. * @exports CMsgPaintKit_Definition * @classdesc Represents a CMsgPaintKit_Definition. - * @implements ICMsgPaintKit_Definition * @constructor - * @param {ICMsgPaintKit_Definition=} [properties] Properties to set + * @param {CMsgPaintKit_Definition.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgPaintKit_Definition(properties) { + var CMsgPaintKit_Definition = function (properties) { this.item = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgPaintKit_Definition header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgPaintKit_Definition * @instance */ @@ -10694,7 +13402,7 @@ /** * CMsgPaintKit_Definition operation_template. - * @member {ICMsgProtoDefID|null|undefined} operation_template + * @member {CMsgProtoDefID.$Properties|null|undefined} operation_template * @memberof CMsgPaintKit_Definition * @instance */ @@ -10710,7 +13418,7 @@ /** * CMsgPaintKit_Definition item. - * @member {Array.} item + * @member {Array.} item * @memberof CMsgPaintKit_Definition * @instance */ @@ -10718,7 +13426,7 @@ /** * CMsgPaintKit_Definition paintkit_tool. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} paintkit_tool + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} paintkit_tool * @memberof CMsgPaintKit_Definition * @instance */ @@ -10726,7 +13434,7 @@ /** * CMsgPaintKit_Definition flamethrower. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} flamethrower + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} flamethrower * @memberof CMsgPaintKit_Definition * @instance */ @@ -10734,7 +13442,7 @@ /** * CMsgPaintKit_Definition grenadelauncher. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} grenadelauncher + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} grenadelauncher * @memberof CMsgPaintKit_Definition * @instance */ @@ -10742,7 +13450,7 @@ /** * CMsgPaintKit_Definition knife. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} knife + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} knife * @memberof CMsgPaintKit_Definition * @instance */ @@ -10750,7 +13458,7 @@ /** * CMsgPaintKit_Definition medigun. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} medigun + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} medigun * @memberof CMsgPaintKit_Definition * @instance */ @@ -10758,7 +13466,7 @@ /** * CMsgPaintKit_Definition minigun. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} minigun + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} minigun * @memberof CMsgPaintKit_Definition * @instance */ @@ -10766,7 +13474,7 @@ /** * CMsgPaintKit_Definition pistol. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} pistol + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} pistol * @memberof CMsgPaintKit_Definition * @instance */ @@ -10774,7 +13482,7 @@ /** * CMsgPaintKit_Definition revolver. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} revolver + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} revolver * @memberof CMsgPaintKit_Definition * @instance */ @@ -10782,7 +13490,7 @@ /** * CMsgPaintKit_Definition rocketlauncher. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} rocketlauncher + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} rocketlauncher * @memberof CMsgPaintKit_Definition * @instance */ @@ -10790,7 +13498,7 @@ /** * CMsgPaintKit_Definition scattergun. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} scattergun + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} scattergun * @memberof CMsgPaintKit_Definition * @instance */ @@ -10798,7 +13506,7 @@ /** * CMsgPaintKit_Definition shotgun. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} shotgun + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} shotgun * @memberof CMsgPaintKit_Definition * @instance */ @@ -10806,7 +13514,7 @@ /** * CMsgPaintKit_Definition smg. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} smg + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} smg * @memberof CMsgPaintKit_Definition * @instance */ @@ -10814,7 +13522,7 @@ /** * CMsgPaintKit_Definition sniperrifle. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} sniperrifle + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} sniperrifle * @memberof CMsgPaintKit_Definition * @instance */ @@ -10822,7 +13530,7 @@ /** * CMsgPaintKit_Definition stickybomb_launcher. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} stickybomb_launcher + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} stickybomb_launcher * @memberof CMsgPaintKit_Definition * @instance */ @@ -10830,7 +13538,7 @@ /** * CMsgPaintKit_Definition ubersaw. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} ubersaw + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} ubersaw * @memberof CMsgPaintKit_Definition * @instance */ @@ -10838,7 +13546,7 @@ /** * CMsgPaintKit_Definition wrench. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} wrench + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} wrench * @memberof CMsgPaintKit_Definition * @instance */ @@ -10846,7 +13554,7 @@ /** * CMsgPaintKit_Definition amputator. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} amputator + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} amputator * @memberof CMsgPaintKit_Definition * @instance */ @@ -10854,7 +13562,7 @@ /** * CMsgPaintKit_Definition atom_launcher. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} atom_launcher + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} atom_launcher * @memberof CMsgPaintKit_Definition * @instance */ @@ -10862,7 +13570,7 @@ /** * CMsgPaintKit_Definition back_scratcher. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} back_scratcher + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} back_scratcher * @memberof CMsgPaintKit_Definition * @instance */ @@ -10870,7 +13578,7 @@ /** * CMsgPaintKit_Definition battleaxe. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} battleaxe + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} battleaxe * @memberof CMsgPaintKit_Definition * @instance */ @@ -10878,7 +13586,7 @@ /** * CMsgPaintKit_Definition bazaar_sniper. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} bazaar_sniper + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} bazaar_sniper * @memberof CMsgPaintKit_Definition * @instance */ @@ -10886,7 +13594,7 @@ /** * CMsgPaintKit_Definition blackbox. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} blackbox + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} blackbox * @memberof CMsgPaintKit_Definition * @instance */ @@ -10894,7 +13602,7 @@ /** * CMsgPaintKit_Definition claidheamohmor. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} claidheamohmor + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} claidheamohmor * @memberof CMsgPaintKit_Definition * @instance */ @@ -10902,7 +13610,7 @@ /** * CMsgPaintKit_Definition crusaders_crossbow. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} crusaders_crossbow + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} crusaders_crossbow * @memberof CMsgPaintKit_Definition * @instance */ @@ -10910,7 +13618,7 @@ /** * CMsgPaintKit_Definition degreaser. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} degreaser + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} degreaser * @memberof CMsgPaintKit_Definition * @instance */ @@ -10918,7 +13626,7 @@ /** * CMsgPaintKit_Definition demo_cannon. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} demo_cannon + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} demo_cannon * @memberof CMsgPaintKit_Definition * @instance */ @@ -10926,7 +13634,7 @@ /** * CMsgPaintKit_Definition demo_sultan_sword. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} demo_sultan_sword + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} demo_sultan_sword * @memberof CMsgPaintKit_Definition * @instance */ @@ -10934,7 +13642,7 @@ /** * CMsgPaintKit_Definition detonator. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} detonator + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} detonator * @memberof CMsgPaintKit_Definition * @instance */ @@ -10942,7 +13650,7 @@ /** * CMsgPaintKit_Definition gatling_gun. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} gatling_gun + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} gatling_gun * @memberof CMsgPaintKit_Definition * @instance */ @@ -10950,7 +13658,7 @@ /** * CMsgPaintKit_Definition holymackerel. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} holymackerel + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} holymackerel * @memberof CMsgPaintKit_Definition * @instance */ @@ -10958,7 +13666,7 @@ /** * CMsgPaintKit_Definition jag. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} jag + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} jag * @memberof CMsgPaintKit_Definition * @instance */ @@ -10966,7 +13674,7 @@ /** * CMsgPaintKit_Definition lochnload. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} lochnload + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} lochnload * @memberof CMsgPaintKit_Definition * @instance */ @@ -10974,7 +13682,7 @@ /** * CMsgPaintKit_Definition powerjack. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} powerjack + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} powerjack * @memberof CMsgPaintKit_Definition * @instance */ @@ -10982,7 +13690,7 @@ /** * CMsgPaintKit_Definition quadball. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} quadball + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} quadball * @memberof CMsgPaintKit_Definition * @instance */ @@ -10990,7 +13698,7 @@ /** * CMsgPaintKit_Definition reserve_shooter. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} reserve_shooter + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} reserve_shooter * @memberof CMsgPaintKit_Definition * @instance */ @@ -10998,7 +13706,7 @@ /** * CMsgPaintKit_Definition riding_crop. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} riding_crop + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} riding_crop * @memberof CMsgPaintKit_Definition * @instance */ @@ -11006,7 +13714,7 @@ /** * CMsgPaintKit_Definition russian_riot. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} russian_riot + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} russian_riot * @memberof CMsgPaintKit_Definition * @instance */ @@ -11014,7 +13722,7 @@ /** * CMsgPaintKit_Definition scimitar. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} scimitar + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} scimitar * @memberof CMsgPaintKit_Definition * @instance */ @@ -11022,7 +13730,7 @@ /** * CMsgPaintKit_Definition scorch_shot. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} scorch_shot + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} scorch_shot * @memberof CMsgPaintKit_Definition * @instance */ @@ -11030,7 +13738,7 @@ /** * CMsgPaintKit_Definition shortstop. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} shortstop + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} shortstop * @memberof CMsgPaintKit_Definition * @instance */ @@ -11038,7 +13746,7 @@ /** * CMsgPaintKit_Definition soda_popper. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} soda_popper + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} soda_popper * @memberof CMsgPaintKit_Definition * @instance */ @@ -11046,7 +13754,7 @@ /** * CMsgPaintKit_Definition tele_shotgun. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} tele_shotgun + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} tele_shotgun * @memberof CMsgPaintKit_Definition * @instance */ @@ -11054,7 +13762,7 @@ /** * CMsgPaintKit_Definition tomislav. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} tomislav + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} tomislav * @memberof CMsgPaintKit_Definition * @instance */ @@ -11062,7 +13770,7 @@ /** * CMsgPaintKit_Definition trenchgun. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} trenchgun + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} trenchgun * @memberof CMsgPaintKit_Definition * @instance */ @@ -11070,7 +13778,7 @@ /** * CMsgPaintKit_Definition winger_pistol. - * @member {CMsgPaintKit_Definition.IItem|null|undefined} winger_pistol + * @member {CMsgPaintKit_Definition.Item.$Properties|null|undefined} winger_pistol * @memberof CMsgPaintKit_Definition * @instance */ @@ -11081,10 +13789,14 @@ * @function create * @memberof CMsgPaintKit_Definition * @static - * @param {ICMsgPaintKit_Definition=} [properties] Properties to set + * @param {CMsgPaintKit_Definition.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_Definition} CMsgPaintKit_Definition instance + * @type {{ + * (properties: CMsgPaintKit_Definition.$Shape): CMsgPaintKit_Definition & CMsgPaintKit_Definition.$Shape; + * (properties?: CMsgPaintKit_Definition.$Properties): CMsgPaintKit_Definition; + * }} */ - CMsgPaintKit_Definition.create = function create(properties) { + CMsgPaintKit_Definition.create = function(properties) { return new CMsgPaintKit_Definition(properties); }; @@ -11093,113 +13805,120 @@ * @function encode * @memberof CMsgPaintKit_Definition * @static - * @param {ICMsgPaintKit_Definition} message CMsgPaintKit_Definition message or plain object to encode + * @param {CMsgPaintKit_Definition.$Properties} message CMsgPaintKit_Definition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Definition.encode = function encode(message, writer) { + CMsgPaintKit_Definition.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.loc_desctoken != null && Object.hasOwnProperty.call(message, "loc_desctoken")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.loc_desctoken != null && $Object.hasOwnProperty.call(message, "loc_desctoken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.loc_desctoken); - if (message.operation_template != null && Object.hasOwnProperty.call(message, "operation_template")) - $root.CMsgProtoDefID.encode(message.operation_template, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.has_team_textures != null && Object.hasOwnProperty.call(message, "has_team_textures")) + if (message.operation_template != null && $Object.hasOwnProperty.call(message, "operation_template")) + $root.CMsgProtoDefID.encode(message.operation_template, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.has_team_textures != null && $Object.hasOwnProperty.call(message, "has_team_textures")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.has_team_textures); if (message.item != null && message.item.length) for (var i = 0; i < message.item.length; ++i) - $root.CMsgPaintKit_Definition.Item.encode(message.item[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.paintkit_tool != null && Object.hasOwnProperty.call(message, "paintkit_tool")) - $root.CMsgPaintKit_Definition.Item.encode(message.paintkit_tool, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.flamethrower != null && Object.hasOwnProperty.call(message, "flamethrower")) - $root.CMsgPaintKit_Definition.Item.encode(message.flamethrower, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.grenadelauncher != null && Object.hasOwnProperty.call(message, "grenadelauncher")) - $root.CMsgPaintKit_Definition.Item.encode(message.grenadelauncher, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.knife != null && Object.hasOwnProperty.call(message, "knife")) - $root.CMsgPaintKit_Definition.Item.encode(message.knife, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.medigun != null && Object.hasOwnProperty.call(message, "medigun")) - $root.CMsgPaintKit_Definition.Item.encode(message.medigun, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.minigun != null && Object.hasOwnProperty.call(message, "minigun")) - $root.CMsgPaintKit_Definition.Item.encode(message.minigun, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.pistol != null && Object.hasOwnProperty.call(message, "pistol")) - $root.CMsgPaintKit_Definition.Item.encode(message.pistol, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.revolver != null && Object.hasOwnProperty.call(message, "revolver")) - $root.CMsgPaintKit_Definition.Item.encode(message.revolver, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.rocketlauncher != null && Object.hasOwnProperty.call(message, "rocketlauncher")) - $root.CMsgPaintKit_Definition.Item.encode(message.rocketlauncher, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.scattergun != null && Object.hasOwnProperty.call(message, "scattergun")) - $root.CMsgPaintKit_Definition.Item.encode(message.scattergun, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.shotgun != null && Object.hasOwnProperty.call(message, "shotgun")) - $root.CMsgPaintKit_Definition.Item.encode(message.shotgun, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.smg != null && Object.hasOwnProperty.call(message, "smg")) - $root.CMsgPaintKit_Definition.Item.encode(message.smg, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.sniperrifle != null && Object.hasOwnProperty.call(message, "sniperrifle")) - $root.CMsgPaintKit_Definition.Item.encode(message.sniperrifle, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.stickybomb_launcher != null && Object.hasOwnProperty.call(message, "stickybomb_launcher")) - $root.CMsgPaintKit_Definition.Item.encode(message.stickybomb_launcher, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.ubersaw != null && Object.hasOwnProperty.call(message, "ubersaw")) - $root.CMsgPaintKit_Definition.Item.encode(message.ubersaw, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.wrench != null && Object.hasOwnProperty.call(message, "wrench")) - $root.CMsgPaintKit_Definition.Item.encode(message.wrench, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.amputator != null && Object.hasOwnProperty.call(message, "amputator")) - $root.CMsgPaintKit_Definition.Item.encode(message.amputator, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.atom_launcher != null && Object.hasOwnProperty.call(message, "atom_launcher")) - $root.CMsgPaintKit_Definition.Item.encode(message.atom_launcher, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.back_scratcher != null && Object.hasOwnProperty.call(message, "back_scratcher")) - $root.CMsgPaintKit_Definition.Item.encode(message.back_scratcher, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.battleaxe != null && Object.hasOwnProperty.call(message, "battleaxe")) - $root.CMsgPaintKit_Definition.Item.encode(message.battleaxe, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.bazaar_sniper != null && Object.hasOwnProperty.call(message, "bazaar_sniper")) - $root.CMsgPaintKit_Definition.Item.encode(message.bazaar_sniper, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.blackbox != null && Object.hasOwnProperty.call(message, "blackbox")) - $root.CMsgPaintKit_Definition.Item.encode(message.blackbox, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.claidheamohmor != null && Object.hasOwnProperty.call(message, "claidheamohmor")) - $root.CMsgPaintKit_Definition.Item.encode(message.claidheamohmor, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.crusaders_crossbow != null && Object.hasOwnProperty.call(message, "crusaders_crossbow")) - $root.CMsgPaintKit_Definition.Item.encode(message.crusaders_crossbow, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.degreaser != null && Object.hasOwnProperty.call(message, "degreaser")) - $root.CMsgPaintKit_Definition.Item.encode(message.degreaser, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.demo_cannon != null && Object.hasOwnProperty.call(message, "demo_cannon")) - $root.CMsgPaintKit_Definition.Item.encode(message.demo_cannon, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.demo_sultan_sword != null && Object.hasOwnProperty.call(message, "demo_sultan_sword")) - $root.CMsgPaintKit_Definition.Item.encode(message.demo_sultan_sword, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); - if (message.detonator != null && Object.hasOwnProperty.call(message, "detonator")) - $root.CMsgPaintKit_Definition.Item.encode(message.detonator, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); - if (message.gatling_gun != null && Object.hasOwnProperty.call(message, "gatling_gun")) - $root.CMsgPaintKit_Definition.Item.encode(message.gatling_gun, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.holymackerel != null && Object.hasOwnProperty.call(message, "holymackerel")) - $root.CMsgPaintKit_Definition.Item.encode(message.holymackerel, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.jag != null && Object.hasOwnProperty.call(message, "jag")) - $root.CMsgPaintKit_Definition.Item.encode(message.jag, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); - if (message.lochnload != null && Object.hasOwnProperty.call(message, "lochnload")) - $root.CMsgPaintKit_Definition.Item.encode(message.lochnload, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); - if (message.powerjack != null && Object.hasOwnProperty.call(message, "powerjack")) - $root.CMsgPaintKit_Definition.Item.encode(message.powerjack, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); - if (message.quadball != null && Object.hasOwnProperty.call(message, "quadball")) - $root.CMsgPaintKit_Definition.Item.encode(message.quadball, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.reserve_shooter != null && Object.hasOwnProperty.call(message, "reserve_shooter")) - $root.CMsgPaintKit_Definition.Item.encode(message.reserve_shooter, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.riding_crop != null && Object.hasOwnProperty.call(message, "riding_crop")) - $root.CMsgPaintKit_Definition.Item.encode(message.riding_crop, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); - if (message.russian_riot != null && Object.hasOwnProperty.call(message, "russian_riot")) - $root.CMsgPaintKit_Definition.Item.encode(message.russian_riot, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); - if (message.scimitar != null && Object.hasOwnProperty.call(message, "scimitar")) - $root.CMsgPaintKit_Definition.Item.encode(message.scimitar, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); - if (message.scorch_shot != null && Object.hasOwnProperty.call(message, "scorch_shot")) - $root.CMsgPaintKit_Definition.Item.encode(message.scorch_shot, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); - if (message.shortstop != null && Object.hasOwnProperty.call(message, "shortstop")) - $root.CMsgPaintKit_Definition.Item.encode(message.shortstop, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); - if (message.soda_popper != null && Object.hasOwnProperty.call(message, "soda_popper")) - $root.CMsgPaintKit_Definition.Item.encode(message.soda_popper, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); - if (message.tele_shotgun != null && Object.hasOwnProperty.call(message, "tele_shotgun")) - $root.CMsgPaintKit_Definition.Item.encode(message.tele_shotgun, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); - if (message.tomislav != null && Object.hasOwnProperty.call(message, "tomislav")) - $root.CMsgPaintKit_Definition.Item.encode(message.tomislav, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); - if (message.trenchgun != null && Object.hasOwnProperty.call(message, "trenchgun")) - $root.CMsgPaintKit_Definition.Item.encode(message.trenchgun, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); - if (message.winger_pistol != null && Object.hasOwnProperty.call(message, "winger_pistol")) - $root.CMsgPaintKit_Definition.Item.encode(message.winger_pistol, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + $root.CMsgPaintKit_Definition.Item.encode(message.item[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.paintkit_tool != null && $Object.hasOwnProperty.call(message, "paintkit_tool")) + $root.CMsgPaintKit_Definition.Item.encode(message.paintkit_tool, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.flamethrower != null && $Object.hasOwnProperty.call(message, "flamethrower")) + $root.CMsgPaintKit_Definition.Item.encode(message.flamethrower, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.grenadelauncher != null && $Object.hasOwnProperty.call(message, "grenadelauncher")) + $root.CMsgPaintKit_Definition.Item.encode(message.grenadelauncher, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.knife != null && $Object.hasOwnProperty.call(message, "knife")) + $root.CMsgPaintKit_Definition.Item.encode(message.knife, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.medigun != null && $Object.hasOwnProperty.call(message, "medigun")) + $root.CMsgPaintKit_Definition.Item.encode(message.medigun, writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); + if (message.minigun != null && $Object.hasOwnProperty.call(message, "minigun")) + $root.CMsgPaintKit_Definition.Item.encode(message.minigun, writer.uint32(/* id 11, wireType 2 =*/90).fork(), _depth + 1).ldelim(); + if (message.pistol != null && $Object.hasOwnProperty.call(message, "pistol")) + $root.CMsgPaintKit_Definition.Item.encode(message.pistol, writer.uint32(/* id 12, wireType 2 =*/98).fork(), _depth + 1).ldelim(); + if (message.revolver != null && $Object.hasOwnProperty.call(message, "revolver")) + $root.CMsgPaintKit_Definition.Item.encode(message.revolver, writer.uint32(/* id 13, wireType 2 =*/106).fork(), _depth + 1).ldelim(); + if (message.rocketlauncher != null && $Object.hasOwnProperty.call(message, "rocketlauncher")) + $root.CMsgPaintKit_Definition.Item.encode(message.rocketlauncher, writer.uint32(/* id 14, wireType 2 =*/114).fork(), _depth + 1).ldelim(); + if (message.scattergun != null && $Object.hasOwnProperty.call(message, "scattergun")) + $root.CMsgPaintKit_Definition.Item.encode(message.scattergun, writer.uint32(/* id 15, wireType 2 =*/122).fork(), _depth + 1).ldelim(); + if (message.shotgun != null && $Object.hasOwnProperty.call(message, "shotgun")) + $root.CMsgPaintKit_Definition.Item.encode(message.shotgun, writer.uint32(/* id 16, wireType 2 =*/130).fork(), _depth + 1).ldelim(); + if (message.smg != null && $Object.hasOwnProperty.call(message, "smg")) + $root.CMsgPaintKit_Definition.Item.encode(message.smg, writer.uint32(/* id 17, wireType 2 =*/138).fork(), _depth + 1).ldelim(); + if (message.sniperrifle != null && $Object.hasOwnProperty.call(message, "sniperrifle")) + $root.CMsgPaintKit_Definition.Item.encode(message.sniperrifle, writer.uint32(/* id 18, wireType 2 =*/146).fork(), _depth + 1).ldelim(); + if (message.stickybomb_launcher != null && $Object.hasOwnProperty.call(message, "stickybomb_launcher")) + $root.CMsgPaintKit_Definition.Item.encode(message.stickybomb_launcher, writer.uint32(/* id 19, wireType 2 =*/154).fork(), _depth + 1).ldelim(); + if (message.ubersaw != null && $Object.hasOwnProperty.call(message, "ubersaw")) + $root.CMsgPaintKit_Definition.Item.encode(message.ubersaw, writer.uint32(/* id 20, wireType 2 =*/162).fork(), _depth + 1).ldelim(); + if (message.wrench != null && $Object.hasOwnProperty.call(message, "wrench")) + $root.CMsgPaintKit_Definition.Item.encode(message.wrench, writer.uint32(/* id 21, wireType 2 =*/170).fork(), _depth + 1).ldelim(); + if (message.amputator != null && $Object.hasOwnProperty.call(message, "amputator")) + $root.CMsgPaintKit_Definition.Item.encode(message.amputator, writer.uint32(/* id 22, wireType 2 =*/178).fork(), _depth + 1).ldelim(); + if (message.atom_launcher != null && $Object.hasOwnProperty.call(message, "atom_launcher")) + $root.CMsgPaintKit_Definition.Item.encode(message.atom_launcher, writer.uint32(/* id 23, wireType 2 =*/186).fork(), _depth + 1).ldelim(); + if (message.back_scratcher != null && $Object.hasOwnProperty.call(message, "back_scratcher")) + $root.CMsgPaintKit_Definition.Item.encode(message.back_scratcher, writer.uint32(/* id 24, wireType 2 =*/194).fork(), _depth + 1).ldelim(); + if (message.battleaxe != null && $Object.hasOwnProperty.call(message, "battleaxe")) + $root.CMsgPaintKit_Definition.Item.encode(message.battleaxe, writer.uint32(/* id 25, wireType 2 =*/202).fork(), _depth + 1).ldelim(); + if (message.bazaar_sniper != null && $Object.hasOwnProperty.call(message, "bazaar_sniper")) + $root.CMsgPaintKit_Definition.Item.encode(message.bazaar_sniper, writer.uint32(/* id 26, wireType 2 =*/210).fork(), _depth + 1).ldelim(); + if (message.blackbox != null && $Object.hasOwnProperty.call(message, "blackbox")) + $root.CMsgPaintKit_Definition.Item.encode(message.blackbox, writer.uint32(/* id 27, wireType 2 =*/218).fork(), _depth + 1).ldelim(); + if (message.claidheamohmor != null && $Object.hasOwnProperty.call(message, "claidheamohmor")) + $root.CMsgPaintKit_Definition.Item.encode(message.claidheamohmor, writer.uint32(/* id 28, wireType 2 =*/226).fork(), _depth + 1).ldelim(); + if (message.crusaders_crossbow != null && $Object.hasOwnProperty.call(message, "crusaders_crossbow")) + $root.CMsgPaintKit_Definition.Item.encode(message.crusaders_crossbow, writer.uint32(/* id 29, wireType 2 =*/234).fork(), _depth + 1).ldelim(); + if (message.degreaser != null && $Object.hasOwnProperty.call(message, "degreaser")) + $root.CMsgPaintKit_Definition.Item.encode(message.degreaser, writer.uint32(/* id 30, wireType 2 =*/242).fork(), _depth + 1).ldelim(); + if (message.demo_cannon != null && $Object.hasOwnProperty.call(message, "demo_cannon")) + $root.CMsgPaintKit_Definition.Item.encode(message.demo_cannon, writer.uint32(/* id 31, wireType 2 =*/250).fork(), _depth + 1).ldelim(); + if (message.demo_sultan_sword != null && $Object.hasOwnProperty.call(message, "demo_sultan_sword")) + $root.CMsgPaintKit_Definition.Item.encode(message.demo_sultan_sword, writer.uint32(/* id 32, wireType 2 =*/258).fork(), _depth + 1).ldelim(); + if (message.detonator != null && $Object.hasOwnProperty.call(message, "detonator")) + $root.CMsgPaintKit_Definition.Item.encode(message.detonator, writer.uint32(/* id 33, wireType 2 =*/266).fork(), _depth + 1).ldelim(); + if (message.gatling_gun != null && $Object.hasOwnProperty.call(message, "gatling_gun")) + $root.CMsgPaintKit_Definition.Item.encode(message.gatling_gun, writer.uint32(/* id 34, wireType 2 =*/274).fork(), _depth + 1).ldelim(); + if (message.holymackerel != null && $Object.hasOwnProperty.call(message, "holymackerel")) + $root.CMsgPaintKit_Definition.Item.encode(message.holymackerel, writer.uint32(/* id 35, wireType 2 =*/282).fork(), _depth + 1).ldelim(); + if (message.jag != null && $Object.hasOwnProperty.call(message, "jag")) + $root.CMsgPaintKit_Definition.Item.encode(message.jag, writer.uint32(/* id 36, wireType 2 =*/290).fork(), _depth + 1).ldelim(); + if (message.lochnload != null && $Object.hasOwnProperty.call(message, "lochnload")) + $root.CMsgPaintKit_Definition.Item.encode(message.lochnload, writer.uint32(/* id 37, wireType 2 =*/298).fork(), _depth + 1).ldelim(); + if (message.powerjack != null && $Object.hasOwnProperty.call(message, "powerjack")) + $root.CMsgPaintKit_Definition.Item.encode(message.powerjack, writer.uint32(/* id 38, wireType 2 =*/306).fork(), _depth + 1).ldelim(); + if (message.quadball != null && $Object.hasOwnProperty.call(message, "quadball")) + $root.CMsgPaintKit_Definition.Item.encode(message.quadball, writer.uint32(/* id 39, wireType 2 =*/314).fork(), _depth + 1).ldelim(); + if (message.reserve_shooter != null && $Object.hasOwnProperty.call(message, "reserve_shooter")) + $root.CMsgPaintKit_Definition.Item.encode(message.reserve_shooter, writer.uint32(/* id 40, wireType 2 =*/322).fork(), _depth + 1).ldelim(); + if (message.riding_crop != null && $Object.hasOwnProperty.call(message, "riding_crop")) + $root.CMsgPaintKit_Definition.Item.encode(message.riding_crop, writer.uint32(/* id 41, wireType 2 =*/330).fork(), _depth + 1).ldelim(); + if (message.russian_riot != null && $Object.hasOwnProperty.call(message, "russian_riot")) + $root.CMsgPaintKit_Definition.Item.encode(message.russian_riot, writer.uint32(/* id 42, wireType 2 =*/338).fork(), _depth + 1).ldelim(); + if (message.scimitar != null && $Object.hasOwnProperty.call(message, "scimitar")) + $root.CMsgPaintKit_Definition.Item.encode(message.scimitar, writer.uint32(/* id 43, wireType 2 =*/346).fork(), _depth + 1).ldelim(); + if (message.scorch_shot != null && $Object.hasOwnProperty.call(message, "scorch_shot")) + $root.CMsgPaintKit_Definition.Item.encode(message.scorch_shot, writer.uint32(/* id 44, wireType 2 =*/354).fork(), _depth + 1).ldelim(); + if (message.shortstop != null && $Object.hasOwnProperty.call(message, "shortstop")) + $root.CMsgPaintKit_Definition.Item.encode(message.shortstop, writer.uint32(/* id 45, wireType 2 =*/362).fork(), _depth + 1).ldelim(); + if (message.soda_popper != null && $Object.hasOwnProperty.call(message, "soda_popper")) + $root.CMsgPaintKit_Definition.Item.encode(message.soda_popper, writer.uint32(/* id 46, wireType 2 =*/370).fork(), _depth + 1).ldelim(); + if (message.tele_shotgun != null && $Object.hasOwnProperty.call(message, "tele_shotgun")) + $root.CMsgPaintKit_Definition.Item.encode(message.tele_shotgun, writer.uint32(/* id 47, wireType 2 =*/378).fork(), _depth + 1).ldelim(); + if (message.tomislav != null && $Object.hasOwnProperty.call(message, "tomislav")) + $root.CMsgPaintKit_Definition.Item.encode(message.tomislav, writer.uint32(/* id 48, wireType 2 =*/386).fork(), _depth + 1).ldelim(); + if (message.trenchgun != null && $Object.hasOwnProperty.call(message, "trenchgun")) + $root.CMsgPaintKit_Definition.Item.encode(message.trenchgun, writer.uint32(/* id 49, wireType 2 =*/394).fork(), _depth + 1).ldelim(); + if (message.winger_pistol != null && $Object.hasOwnProperty.call(message, "winger_pistol")) + $root.CMsgPaintKit_Definition.Item.encode(message.winger_pistol, writer.uint32(/* id 50, wireType 2 =*/402).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -11208,12 +13927,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_Definition * @static - * @param {ICMsgPaintKit_Definition} message CMsgPaintKit_Definition message or plain object to encode + * @param {CMsgPaintKit_Definition.$Properties} message CMsgPaintKit_Definition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgPaintKit_Definition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgPaintKit_Definition.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -11223,175 +13942,339 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_Definition} CMsgPaintKit_Definition + * @returns {CMsgPaintKit_Definition & CMsgPaintKit_Definition.$Shape} CMsgPaintKit_Definition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Definition.decode = function decode(reader, length) { + CMsgPaintKit_Definition.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_Definition(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_Definition(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - case 2: - message.loc_desctoken = reader.string(); - break; - case 3: - message.operation_template = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - case 4: - message.has_team_textures = reader.bool(); - break; - case 5: - if (!(message.item && message.item.length)) - message.item = []; - message.item.push($root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32())); - break; - case 6: - message.paintkit_tool = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 7: - message.flamethrower = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 8: - message.grenadelauncher = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 9: - message.knife = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 10: - message.medigun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 11: - message.minigun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 12: - message.pistol = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 13: - message.revolver = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 14: - message.rocketlauncher = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 15: - message.scattergun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 16: - message.shotgun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 17: - message.smg = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 18: - message.sniperrifle = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 19: - message.stickybomb_launcher = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 20: - message.ubersaw = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 21: - message.wrench = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 22: - message.amputator = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 23: - message.atom_launcher = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 24: - message.back_scratcher = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 25: - message.battleaxe = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 26: - message.bazaar_sniper = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 27: - message.blackbox = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 28: - message.claidheamohmor = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 29: - message.crusaders_crossbow = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 30: - message.degreaser = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 31: - message.demo_cannon = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 32: - message.demo_sultan_sword = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 33: - message.detonator = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 34: - message.gatling_gun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 35: - message.holymackerel = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 36: - message.jag = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 37: - message.lochnload = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 38: - message.powerjack = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 39: - message.quadball = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 40: - message.reserve_shooter = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 41: - message.riding_crop = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 42: - message.russian_riot = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 43: - message.scimitar = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 44: - message.scorch_shot = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 45: - message.shortstop = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 46: - message.soda_popper = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 47: - message.tele_shotgun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 48: - message.tomislav = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 49: - message.trenchgun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - case 50: - message.winger_pistol = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.loc_desctoken = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.operation_template = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.operation_template); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.has_team_textures = reader.bool(); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.item && message.item.length)) + message.item = []; + message.item.push($root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.paintkit_tool = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.paintkit_tool); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.flamethrower = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.flamethrower); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.grenadelauncher = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.grenadelauncher); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.knife = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.knife); + continue; + } + case 10: { + if (wireType !== 2) + break; + message.medigun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.medigun); + continue; + } + case 11: { + if (wireType !== 2) + break; + message.minigun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.minigun); + continue; + } + case 12: { + if (wireType !== 2) + break; + message.pistol = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.pistol); + continue; + } + case 13: { + if (wireType !== 2) + break; + message.revolver = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.revolver); + continue; + } + case 14: { + if (wireType !== 2) + break; + message.rocketlauncher = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.rocketlauncher); + continue; + } + case 15: { + if (wireType !== 2) + break; + message.scattergun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.scattergun); + continue; + } + case 16: { + if (wireType !== 2) + break; + message.shotgun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.shotgun); + continue; + } + case 17: { + if (wireType !== 2) + break; + message.smg = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.smg); + continue; + } + case 18: { + if (wireType !== 2) + break; + message.sniperrifle = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.sniperrifle); + continue; + } + case 19: { + if (wireType !== 2) + break; + message.stickybomb_launcher = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.stickybomb_launcher); + continue; + } + case 20: { + if (wireType !== 2) + break; + message.ubersaw = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.ubersaw); + continue; + } + case 21: { + if (wireType !== 2) + break; + message.wrench = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.wrench); + continue; + } + case 22: { + if (wireType !== 2) + break; + message.amputator = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.amputator); + continue; + } + case 23: { + if (wireType !== 2) + break; + message.atom_launcher = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.atom_launcher); + continue; + } + case 24: { + if (wireType !== 2) + break; + message.back_scratcher = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.back_scratcher); + continue; + } + case 25: { + if (wireType !== 2) + break; + message.battleaxe = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.battleaxe); + continue; + } + case 26: { + if (wireType !== 2) + break; + message.bazaar_sniper = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.bazaar_sniper); + continue; + } + case 27: { + if (wireType !== 2) + break; + message.blackbox = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.blackbox); + continue; + } + case 28: { + if (wireType !== 2) + break; + message.claidheamohmor = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.claidheamohmor); + continue; + } + case 29: { + if (wireType !== 2) + break; + message.crusaders_crossbow = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.crusaders_crossbow); + continue; + } + case 30: { + if (wireType !== 2) + break; + message.degreaser = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.degreaser); + continue; + } + case 31: { + if (wireType !== 2) + break; + message.demo_cannon = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.demo_cannon); + continue; + } + case 32: { + if (wireType !== 2) + break; + message.demo_sultan_sword = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.demo_sultan_sword); + continue; + } + case 33: { + if (wireType !== 2) + break; + message.detonator = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.detonator); + continue; + } + case 34: { + if (wireType !== 2) + break; + message.gatling_gun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.gatling_gun); + continue; + } + case 35: { + if (wireType !== 2) + break; + message.holymackerel = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.holymackerel); + continue; + } + case 36: { + if (wireType !== 2) + break; + message.jag = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.jag); + continue; + } + case 37: { + if (wireType !== 2) + break; + message.lochnload = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.lochnload); + continue; + } + case 38: { + if (wireType !== 2) + break; + message.powerjack = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.powerjack); + continue; + } + case 39: { + if (wireType !== 2) + break; + message.quadball = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.quadball); + continue; + } + case 40: { + if (wireType !== 2) + break; + message.reserve_shooter = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.reserve_shooter); + continue; + } + case 41: { + if (wireType !== 2) + break; + message.riding_crop = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.riding_crop); + continue; + } + case 42: { + if (wireType !== 2) + break; + message.russian_riot = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.russian_riot); + continue; + } + case 43: { + if (wireType !== 2) + break; + message.scimitar = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.scimitar); + continue; + } + case 44: { + if (wireType !== 2) + break; + message.scorch_shot = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.scorch_shot); + continue; + } + case 45: { + if (wireType !== 2) + break; + message.shortstop = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.shortstop); + continue; + } + case 46: { + if (wireType !== 2) + break; + message.soda_popper = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.soda_popper); + continue; + } + case 47: { + if (wireType !== 2) + break; + message.tele_shotgun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.tele_shotgun); + continue; + } + case 48: { + if (wireType !== 2) + break; + message.tomislav = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.tomislav); + continue; + } + case 49: { + if (wireType !== 2) + break; + message.trenchgun = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.trenchgun); + continue; + } + case 50: { + if (wireType !== 2) + break; + message.winger_pistol = $root.CMsgPaintKit_Definition.Item.decode(reader, reader.uint32(), $undefined, _depth + 1, message.winger_pistol); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("header")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) throw $util.ProtocolError("missing required 'header'", { instance: message }); return message; }; @@ -11402,11 +14285,11 @@ * @memberof CMsgPaintKit_Definition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_Definition} CMsgPaintKit_Definition + * @returns {CMsgPaintKit_Definition & CMsgPaintKit_Definition.$Shape} CMsgPaintKit_Definition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgPaintKit_Definition.decodeDelimited = function decodeDelimited(reader) { + CMsgPaintKit_Definition.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -11420,256 +14303,260 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgPaintKit_Definition.verify = function verify(message) { + CMsgPaintKit_Definition.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } - if (message.loc_desctoken != null && message.hasOwnProperty("loc_desctoken")) + if (message.loc_desctoken != null && $Object.hasOwnProperty.call(message, "loc_desctoken")) if (!$util.isString(message.loc_desctoken)) return "loc_desctoken: string expected"; - if (message.operation_template != null && message.hasOwnProperty("operation_template")) { - var error = $root.CMsgProtoDefID.verify(message.operation_template); + if (message.operation_template != null && $Object.hasOwnProperty.call(message, "operation_template")) { + var error = $root.CMsgProtoDefID.verify(message.operation_template, _depth + 1); if (error) return "operation_template." + error; } - if (message.has_team_textures != null && message.hasOwnProperty("has_team_textures")) + if (message.has_team_textures != null && $Object.hasOwnProperty.call(message, "has_team_textures")) if (typeof message.has_team_textures !== "boolean") return "has_team_textures: boolean expected"; - if (message.item != null && message.hasOwnProperty("item")) { - if (!Array.isArray(message.item)) + if (message.item != null && $Object.hasOwnProperty.call(message, "item")) { + if (!$Array.isArray(message.item)) return "item: array expected"; for (var i = 0; i < message.item.length; ++i) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.item[i]); + var error = $root.CMsgPaintKit_Definition.Item.verify(message.item[i], _depth + 1); if (error) return "item." + error; } } - if (message.paintkit_tool != null && message.hasOwnProperty("paintkit_tool")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.paintkit_tool); + if (message.paintkit_tool != null && $Object.hasOwnProperty.call(message, "paintkit_tool")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.paintkit_tool, _depth + 1); if (error) return "paintkit_tool." + error; } - if (message.flamethrower != null && message.hasOwnProperty("flamethrower")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.flamethrower); + if (message.flamethrower != null && $Object.hasOwnProperty.call(message, "flamethrower")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.flamethrower, _depth + 1); if (error) return "flamethrower." + error; } - if (message.grenadelauncher != null && message.hasOwnProperty("grenadelauncher")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.grenadelauncher); + if (message.grenadelauncher != null && $Object.hasOwnProperty.call(message, "grenadelauncher")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.grenadelauncher, _depth + 1); if (error) return "grenadelauncher." + error; } - if (message.knife != null && message.hasOwnProperty("knife")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.knife); + if (message.knife != null && $Object.hasOwnProperty.call(message, "knife")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.knife, _depth + 1); if (error) return "knife." + error; } - if (message.medigun != null && message.hasOwnProperty("medigun")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.medigun); + if (message.medigun != null && $Object.hasOwnProperty.call(message, "medigun")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.medigun, _depth + 1); if (error) return "medigun." + error; } - if (message.minigun != null && message.hasOwnProperty("minigun")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.minigun); + if (message.minigun != null && $Object.hasOwnProperty.call(message, "minigun")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.minigun, _depth + 1); if (error) return "minigun." + error; } - if (message.pistol != null && message.hasOwnProperty("pistol")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.pistol); + if (message.pistol != null && $Object.hasOwnProperty.call(message, "pistol")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.pistol, _depth + 1); if (error) return "pistol." + error; } - if (message.revolver != null && message.hasOwnProperty("revolver")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.revolver); + if (message.revolver != null && $Object.hasOwnProperty.call(message, "revolver")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.revolver, _depth + 1); if (error) return "revolver." + error; } - if (message.rocketlauncher != null && message.hasOwnProperty("rocketlauncher")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.rocketlauncher); + if (message.rocketlauncher != null && $Object.hasOwnProperty.call(message, "rocketlauncher")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.rocketlauncher, _depth + 1); if (error) return "rocketlauncher." + error; } - if (message.scattergun != null && message.hasOwnProperty("scattergun")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.scattergun); + if (message.scattergun != null && $Object.hasOwnProperty.call(message, "scattergun")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.scattergun, _depth + 1); if (error) return "scattergun." + error; } - if (message.shotgun != null && message.hasOwnProperty("shotgun")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.shotgun); + if (message.shotgun != null && $Object.hasOwnProperty.call(message, "shotgun")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.shotgun, _depth + 1); if (error) return "shotgun." + error; } - if (message.smg != null && message.hasOwnProperty("smg")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.smg); + if (message.smg != null && $Object.hasOwnProperty.call(message, "smg")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.smg, _depth + 1); if (error) return "smg." + error; } - if (message.sniperrifle != null && message.hasOwnProperty("sniperrifle")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.sniperrifle); + if (message.sniperrifle != null && $Object.hasOwnProperty.call(message, "sniperrifle")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.sniperrifle, _depth + 1); if (error) return "sniperrifle." + error; } - if (message.stickybomb_launcher != null && message.hasOwnProperty("stickybomb_launcher")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.stickybomb_launcher); + if (message.stickybomb_launcher != null && $Object.hasOwnProperty.call(message, "stickybomb_launcher")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.stickybomb_launcher, _depth + 1); if (error) return "stickybomb_launcher." + error; } - if (message.ubersaw != null && message.hasOwnProperty("ubersaw")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.ubersaw); + if (message.ubersaw != null && $Object.hasOwnProperty.call(message, "ubersaw")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.ubersaw, _depth + 1); if (error) return "ubersaw." + error; } - if (message.wrench != null && message.hasOwnProperty("wrench")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.wrench); + if (message.wrench != null && $Object.hasOwnProperty.call(message, "wrench")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.wrench, _depth + 1); if (error) return "wrench." + error; } - if (message.amputator != null && message.hasOwnProperty("amputator")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.amputator); + if (message.amputator != null && $Object.hasOwnProperty.call(message, "amputator")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.amputator, _depth + 1); if (error) return "amputator." + error; } - if (message.atom_launcher != null && message.hasOwnProperty("atom_launcher")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.atom_launcher); + if (message.atom_launcher != null && $Object.hasOwnProperty.call(message, "atom_launcher")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.atom_launcher, _depth + 1); if (error) return "atom_launcher." + error; } - if (message.back_scratcher != null && message.hasOwnProperty("back_scratcher")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.back_scratcher); + if (message.back_scratcher != null && $Object.hasOwnProperty.call(message, "back_scratcher")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.back_scratcher, _depth + 1); if (error) return "back_scratcher." + error; } - if (message.battleaxe != null && message.hasOwnProperty("battleaxe")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.battleaxe); + if (message.battleaxe != null && $Object.hasOwnProperty.call(message, "battleaxe")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.battleaxe, _depth + 1); if (error) return "battleaxe." + error; } - if (message.bazaar_sniper != null && message.hasOwnProperty("bazaar_sniper")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.bazaar_sniper); + if (message.bazaar_sniper != null && $Object.hasOwnProperty.call(message, "bazaar_sniper")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.bazaar_sniper, _depth + 1); if (error) return "bazaar_sniper." + error; } - if (message.blackbox != null && message.hasOwnProperty("blackbox")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.blackbox); + if (message.blackbox != null && $Object.hasOwnProperty.call(message, "blackbox")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.blackbox, _depth + 1); if (error) return "blackbox." + error; } - if (message.claidheamohmor != null && message.hasOwnProperty("claidheamohmor")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.claidheamohmor); + if (message.claidheamohmor != null && $Object.hasOwnProperty.call(message, "claidheamohmor")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.claidheamohmor, _depth + 1); if (error) return "claidheamohmor." + error; } - if (message.crusaders_crossbow != null && message.hasOwnProperty("crusaders_crossbow")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.crusaders_crossbow); + if (message.crusaders_crossbow != null && $Object.hasOwnProperty.call(message, "crusaders_crossbow")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.crusaders_crossbow, _depth + 1); if (error) return "crusaders_crossbow." + error; } - if (message.degreaser != null && message.hasOwnProperty("degreaser")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.degreaser); + if (message.degreaser != null && $Object.hasOwnProperty.call(message, "degreaser")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.degreaser, _depth + 1); if (error) return "degreaser." + error; } - if (message.demo_cannon != null && message.hasOwnProperty("demo_cannon")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.demo_cannon); + if (message.demo_cannon != null && $Object.hasOwnProperty.call(message, "demo_cannon")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.demo_cannon, _depth + 1); if (error) return "demo_cannon." + error; } - if (message.demo_sultan_sword != null && message.hasOwnProperty("demo_sultan_sword")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.demo_sultan_sword); + if (message.demo_sultan_sword != null && $Object.hasOwnProperty.call(message, "demo_sultan_sword")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.demo_sultan_sword, _depth + 1); if (error) return "demo_sultan_sword." + error; } - if (message.detonator != null && message.hasOwnProperty("detonator")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.detonator); + if (message.detonator != null && $Object.hasOwnProperty.call(message, "detonator")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.detonator, _depth + 1); if (error) return "detonator." + error; } - if (message.gatling_gun != null && message.hasOwnProperty("gatling_gun")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.gatling_gun); + if (message.gatling_gun != null && $Object.hasOwnProperty.call(message, "gatling_gun")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.gatling_gun, _depth + 1); if (error) return "gatling_gun." + error; } - if (message.holymackerel != null && message.hasOwnProperty("holymackerel")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.holymackerel); + if (message.holymackerel != null && $Object.hasOwnProperty.call(message, "holymackerel")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.holymackerel, _depth + 1); if (error) return "holymackerel." + error; } - if (message.jag != null && message.hasOwnProperty("jag")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.jag); + if (message.jag != null && $Object.hasOwnProperty.call(message, "jag")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.jag, _depth + 1); if (error) return "jag." + error; } - if (message.lochnload != null && message.hasOwnProperty("lochnload")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.lochnload); + if (message.lochnload != null && $Object.hasOwnProperty.call(message, "lochnload")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.lochnload, _depth + 1); if (error) return "lochnload." + error; } - if (message.powerjack != null && message.hasOwnProperty("powerjack")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.powerjack); + if (message.powerjack != null && $Object.hasOwnProperty.call(message, "powerjack")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.powerjack, _depth + 1); if (error) return "powerjack." + error; } - if (message.quadball != null && message.hasOwnProperty("quadball")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.quadball); + if (message.quadball != null && $Object.hasOwnProperty.call(message, "quadball")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.quadball, _depth + 1); if (error) return "quadball." + error; } - if (message.reserve_shooter != null && message.hasOwnProperty("reserve_shooter")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.reserve_shooter); + if (message.reserve_shooter != null && $Object.hasOwnProperty.call(message, "reserve_shooter")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.reserve_shooter, _depth + 1); if (error) return "reserve_shooter." + error; } - if (message.riding_crop != null && message.hasOwnProperty("riding_crop")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.riding_crop); + if (message.riding_crop != null && $Object.hasOwnProperty.call(message, "riding_crop")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.riding_crop, _depth + 1); if (error) return "riding_crop." + error; } - if (message.russian_riot != null && message.hasOwnProperty("russian_riot")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.russian_riot); + if (message.russian_riot != null && $Object.hasOwnProperty.call(message, "russian_riot")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.russian_riot, _depth + 1); if (error) return "russian_riot." + error; } - if (message.scimitar != null && message.hasOwnProperty("scimitar")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.scimitar); + if (message.scimitar != null && $Object.hasOwnProperty.call(message, "scimitar")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.scimitar, _depth + 1); if (error) return "scimitar." + error; } - if (message.scorch_shot != null && message.hasOwnProperty("scorch_shot")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.scorch_shot); + if (message.scorch_shot != null && $Object.hasOwnProperty.call(message, "scorch_shot")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.scorch_shot, _depth + 1); if (error) return "scorch_shot." + error; } - if (message.shortstop != null && message.hasOwnProperty("shortstop")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.shortstop); + if (message.shortstop != null && $Object.hasOwnProperty.call(message, "shortstop")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.shortstop, _depth + 1); if (error) return "shortstop." + error; } - if (message.soda_popper != null && message.hasOwnProperty("soda_popper")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.soda_popper); + if (message.soda_popper != null && $Object.hasOwnProperty.call(message, "soda_popper")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.soda_popper, _depth + 1); if (error) return "soda_popper." + error; } - if (message.tele_shotgun != null && message.hasOwnProperty("tele_shotgun")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.tele_shotgun); + if (message.tele_shotgun != null && $Object.hasOwnProperty.call(message, "tele_shotgun")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.tele_shotgun, _depth + 1); if (error) return "tele_shotgun." + error; } - if (message.tomislav != null && message.hasOwnProperty("tomislav")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.tomislav); + if (message.tomislav != null && $Object.hasOwnProperty.call(message, "tomislav")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.tomislav, _depth + 1); if (error) return "tomislav." + error; } - if (message.trenchgun != null && message.hasOwnProperty("trenchgun")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.trenchgun); + if (message.trenchgun != null && $Object.hasOwnProperty.call(message, "trenchgun")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.trenchgun, _depth + 1); if (error) return "trenchgun." + error; } - if (message.winger_pistol != null && message.hasOwnProperty("winger_pistol")) { - var error = $root.CMsgPaintKit_Definition.Item.verify(message.winger_pistol); + if (message.winger_pistol != null && $Object.hasOwnProperty.call(message, "winger_pistol")) { + var error = $root.CMsgPaintKit_Definition.Item.verify(message.winger_pistol, _depth + 1); if (error) return "winger_pistol." + error; } @@ -11684,258 +14571,264 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_Definition} CMsgPaintKit_Definition */ - CMsgPaintKit_Definition.fromObject = function fromObject(object) { + CMsgPaintKit_Definition.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_Definition) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_Definition: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_Definition(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgPaintKit_Definition.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgPaintKit_Definition.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } if (object.loc_desctoken != null) - message.loc_desctoken = String(object.loc_desctoken); + message.loc_desctoken = $String(object.loc_desctoken); if (object.operation_template != null) { - if (typeof object.operation_template !== "object") - throw TypeError(".CMsgPaintKit_Definition.operation_template: object expected"); - message.operation_template = $root.CMsgProtoDefID.fromObject(object.operation_template); + if (!$util.isObject(object.operation_template)) + throw $TypeError(".CMsgPaintKit_Definition.operation_template: object expected"); + message.operation_template = $root.CMsgProtoDefID.fromObject(object.operation_template, _depth + 1); } if (object.has_team_textures != null) - message.has_team_textures = Boolean(object.has_team_textures); + message.has_team_textures = $Boolean(object.has_team_textures); if (object.item) { - if (!Array.isArray(object.item)) - throw TypeError(".CMsgPaintKit_Definition.item: array expected"); - message.item = []; + if (!$Array.isArray(object.item)) + throw $TypeError(".CMsgPaintKit_Definition.item: array expected"); + message.item = $Array(object.item.length); for (var i = 0; i < object.item.length; ++i) { - if (typeof object.item[i] !== "object") - throw TypeError(".CMsgPaintKit_Definition.item: object expected"); - message.item[i] = $root.CMsgPaintKit_Definition.Item.fromObject(object.item[i]); + if (!$util.isObject(object.item[i])) + throw $TypeError(".CMsgPaintKit_Definition.item: object expected"); + message.item[i] = $root.CMsgPaintKit_Definition.Item.fromObject(object.item[i], _depth + 1); } } if (object.paintkit_tool != null) { - if (typeof object.paintkit_tool !== "object") - throw TypeError(".CMsgPaintKit_Definition.paintkit_tool: object expected"); - message.paintkit_tool = $root.CMsgPaintKit_Definition.Item.fromObject(object.paintkit_tool); + if (!$util.isObject(object.paintkit_tool)) + throw $TypeError(".CMsgPaintKit_Definition.paintkit_tool: object expected"); + message.paintkit_tool = $root.CMsgPaintKit_Definition.Item.fromObject(object.paintkit_tool, _depth + 1); } if (object.flamethrower != null) { - if (typeof object.flamethrower !== "object") - throw TypeError(".CMsgPaintKit_Definition.flamethrower: object expected"); - message.flamethrower = $root.CMsgPaintKit_Definition.Item.fromObject(object.flamethrower); + if (!$util.isObject(object.flamethrower)) + throw $TypeError(".CMsgPaintKit_Definition.flamethrower: object expected"); + message.flamethrower = $root.CMsgPaintKit_Definition.Item.fromObject(object.flamethrower, _depth + 1); } if (object.grenadelauncher != null) { - if (typeof object.grenadelauncher !== "object") - throw TypeError(".CMsgPaintKit_Definition.grenadelauncher: object expected"); - message.grenadelauncher = $root.CMsgPaintKit_Definition.Item.fromObject(object.grenadelauncher); + if (!$util.isObject(object.grenadelauncher)) + throw $TypeError(".CMsgPaintKit_Definition.grenadelauncher: object expected"); + message.grenadelauncher = $root.CMsgPaintKit_Definition.Item.fromObject(object.grenadelauncher, _depth + 1); } if (object.knife != null) { - if (typeof object.knife !== "object") - throw TypeError(".CMsgPaintKit_Definition.knife: object expected"); - message.knife = $root.CMsgPaintKit_Definition.Item.fromObject(object.knife); + if (!$util.isObject(object.knife)) + throw $TypeError(".CMsgPaintKit_Definition.knife: object expected"); + message.knife = $root.CMsgPaintKit_Definition.Item.fromObject(object.knife, _depth + 1); } if (object.medigun != null) { - if (typeof object.medigun !== "object") - throw TypeError(".CMsgPaintKit_Definition.medigun: object expected"); - message.medigun = $root.CMsgPaintKit_Definition.Item.fromObject(object.medigun); + if (!$util.isObject(object.medigun)) + throw $TypeError(".CMsgPaintKit_Definition.medigun: object expected"); + message.medigun = $root.CMsgPaintKit_Definition.Item.fromObject(object.medigun, _depth + 1); } if (object.minigun != null) { - if (typeof object.minigun !== "object") - throw TypeError(".CMsgPaintKit_Definition.minigun: object expected"); - message.minigun = $root.CMsgPaintKit_Definition.Item.fromObject(object.minigun); + if (!$util.isObject(object.minigun)) + throw $TypeError(".CMsgPaintKit_Definition.minigun: object expected"); + message.minigun = $root.CMsgPaintKit_Definition.Item.fromObject(object.minigun, _depth + 1); } if (object.pistol != null) { - if (typeof object.pistol !== "object") - throw TypeError(".CMsgPaintKit_Definition.pistol: object expected"); - message.pistol = $root.CMsgPaintKit_Definition.Item.fromObject(object.pistol); + if (!$util.isObject(object.pistol)) + throw $TypeError(".CMsgPaintKit_Definition.pistol: object expected"); + message.pistol = $root.CMsgPaintKit_Definition.Item.fromObject(object.pistol, _depth + 1); } if (object.revolver != null) { - if (typeof object.revolver !== "object") - throw TypeError(".CMsgPaintKit_Definition.revolver: object expected"); - message.revolver = $root.CMsgPaintKit_Definition.Item.fromObject(object.revolver); + if (!$util.isObject(object.revolver)) + throw $TypeError(".CMsgPaintKit_Definition.revolver: object expected"); + message.revolver = $root.CMsgPaintKit_Definition.Item.fromObject(object.revolver, _depth + 1); } if (object.rocketlauncher != null) { - if (typeof object.rocketlauncher !== "object") - throw TypeError(".CMsgPaintKit_Definition.rocketlauncher: object expected"); - message.rocketlauncher = $root.CMsgPaintKit_Definition.Item.fromObject(object.rocketlauncher); + if (!$util.isObject(object.rocketlauncher)) + throw $TypeError(".CMsgPaintKit_Definition.rocketlauncher: object expected"); + message.rocketlauncher = $root.CMsgPaintKit_Definition.Item.fromObject(object.rocketlauncher, _depth + 1); } if (object.scattergun != null) { - if (typeof object.scattergun !== "object") - throw TypeError(".CMsgPaintKit_Definition.scattergun: object expected"); - message.scattergun = $root.CMsgPaintKit_Definition.Item.fromObject(object.scattergun); + if (!$util.isObject(object.scattergun)) + throw $TypeError(".CMsgPaintKit_Definition.scattergun: object expected"); + message.scattergun = $root.CMsgPaintKit_Definition.Item.fromObject(object.scattergun, _depth + 1); } if (object.shotgun != null) { - if (typeof object.shotgun !== "object") - throw TypeError(".CMsgPaintKit_Definition.shotgun: object expected"); - message.shotgun = $root.CMsgPaintKit_Definition.Item.fromObject(object.shotgun); + if (!$util.isObject(object.shotgun)) + throw $TypeError(".CMsgPaintKit_Definition.shotgun: object expected"); + message.shotgun = $root.CMsgPaintKit_Definition.Item.fromObject(object.shotgun, _depth + 1); } if (object.smg != null) { - if (typeof object.smg !== "object") - throw TypeError(".CMsgPaintKit_Definition.smg: object expected"); - message.smg = $root.CMsgPaintKit_Definition.Item.fromObject(object.smg); + if (!$util.isObject(object.smg)) + throw $TypeError(".CMsgPaintKit_Definition.smg: object expected"); + message.smg = $root.CMsgPaintKit_Definition.Item.fromObject(object.smg, _depth + 1); } if (object.sniperrifle != null) { - if (typeof object.sniperrifle !== "object") - throw TypeError(".CMsgPaintKit_Definition.sniperrifle: object expected"); - message.sniperrifle = $root.CMsgPaintKit_Definition.Item.fromObject(object.sniperrifle); + if (!$util.isObject(object.sniperrifle)) + throw $TypeError(".CMsgPaintKit_Definition.sniperrifle: object expected"); + message.sniperrifle = $root.CMsgPaintKit_Definition.Item.fromObject(object.sniperrifle, _depth + 1); } if (object.stickybomb_launcher != null) { - if (typeof object.stickybomb_launcher !== "object") - throw TypeError(".CMsgPaintKit_Definition.stickybomb_launcher: object expected"); - message.stickybomb_launcher = $root.CMsgPaintKit_Definition.Item.fromObject(object.stickybomb_launcher); + if (!$util.isObject(object.stickybomb_launcher)) + throw $TypeError(".CMsgPaintKit_Definition.stickybomb_launcher: object expected"); + message.stickybomb_launcher = $root.CMsgPaintKit_Definition.Item.fromObject(object.stickybomb_launcher, _depth + 1); } if (object.ubersaw != null) { - if (typeof object.ubersaw !== "object") - throw TypeError(".CMsgPaintKit_Definition.ubersaw: object expected"); - message.ubersaw = $root.CMsgPaintKit_Definition.Item.fromObject(object.ubersaw); + if (!$util.isObject(object.ubersaw)) + throw $TypeError(".CMsgPaintKit_Definition.ubersaw: object expected"); + message.ubersaw = $root.CMsgPaintKit_Definition.Item.fromObject(object.ubersaw, _depth + 1); } if (object.wrench != null) { - if (typeof object.wrench !== "object") - throw TypeError(".CMsgPaintKit_Definition.wrench: object expected"); - message.wrench = $root.CMsgPaintKit_Definition.Item.fromObject(object.wrench); + if (!$util.isObject(object.wrench)) + throw $TypeError(".CMsgPaintKit_Definition.wrench: object expected"); + message.wrench = $root.CMsgPaintKit_Definition.Item.fromObject(object.wrench, _depth + 1); } if (object.amputator != null) { - if (typeof object.amputator !== "object") - throw TypeError(".CMsgPaintKit_Definition.amputator: object expected"); - message.amputator = $root.CMsgPaintKit_Definition.Item.fromObject(object.amputator); + if (!$util.isObject(object.amputator)) + throw $TypeError(".CMsgPaintKit_Definition.amputator: object expected"); + message.amputator = $root.CMsgPaintKit_Definition.Item.fromObject(object.amputator, _depth + 1); } if (object.atom_launcher != null) { - if (typeof object.atom_launcher !== "object") - throw TypeError(".CMsgPaintKit_Definition.atom_launcher: object expected"); - message.atom_launcher = $root.CMsgPaintKit_Definition.Item.fromObject(object.atom_launcher); + if (!$util.isObject(object.atom_launcher)) + throw $TypeError(".CMsgPaintKit_Definition.atom_launcher: object expected"); + message.atom_launcher = $root.CMsgPaintKit_Definition.Item.fromObject(object.atom_launcher, _depth + 1); } if (object.back_scratcher != null) { - if (typeof object.back_scratcher !== "object") - throw TypeError(".CMsgPaintKit_Definition.back_scratcher: object expected"); - message.back_scratcher = $root.CMsgPaintKit_Definition.Item.fromObject(object.back_scratcher); + if (!$util.isObject(object.back_scratcher)) + throw $TypeError(".CMsgPaintKit_Definition.back_scratcher: object expected"); + message.back_scratcher = $root.CMsgPaintKit_Definition.Item.fromObject(object.back_scratcher, _depth + 1); } if (object.battleaxe != null) { - if (typeof object.battleaxe !== "object") - throw TypeError(".CMsgPaintKit_Definition.battleaxe: object expected"); - message.battleaxe = $root.CMsgPaintKit_Definition.Item.fromObject(object.battleaxe); + if (!$util.isObject(object.battleaxe)) + throw $TypeError(".CMsgPaintKit_Definition.battleaxe: object expected"); + message.battleaxe = $root.CMsgPaintKit_Definition.Item.fromObject(object.battleaxe, _depth + 1); } if (object.bazaar_sniper != null) { - if (typeof object.bazaar_sniper !== "object") - throw TypeError(".CMsgPaintKit_Definition.bazaar_sniper: object expected"); - message.bazaar_sniper = $root.CMsgPaintKit_Definition.Item.fromObject(object.bazaar_sniper); + if (!$util.isObject(object.bazaar_sniper)) + throw $TypeError(".CMsgPaintKit_Definition.bazaar_sniper: object expected"); + message.bazaar_sniper = $root.CMsgPaintKit_Definition.Item.fromObject(object.bazaar_sniper, _depth + 1); } if (object.blackbox != null) { - if (typeof object.blackbox !== "object") - throw TypeError(".CMsgPaintKit_Definition.blackbox: object expected"); - message.blackbox = $root.CMsgPaintKit_Definition.Item.fromObject(object.blackbox); + if (!$util.isObject(object.blackbox)) + throw $TypeError(".CMsgPaintKit_Definition.blackbox: object expected"); + message.blackbox = $root.CMsgPaintKit_Definition.Item.fromObject(object.blackbox, _depth + 1); } if (object.claidheamohmor != null) { - if (typeof object.claidheamohmor !== "object") - throw TypeError(".CMsgPaintKit_Definition.claidheamohmor: object expected"); - message.claidheamohmor = $root.CMsgPaintKit_Definition.Item.fromObject(object.claidheamohmor); + if (!$util.isObject(object.claidheamohmor)) + throw $TypeError(".CMsgPaintKit_Definition.claidheamohmor: object expected"); + message.claidheamohmor = $root.CMsgPaintKit_Definition.Item.fromObject(object.claidheamohmor, _depth + 1); } if (object.crusaders_crossbow != null) { - if (typeof object.crusaders_crossbow !== "object") - throw TypeError(".CMsgPaintKit_Definition.crusaders_crossbow: object expected"); - message.crusaders_crossbow = $root.CMsgPaintKit_Definition.Item.fromObject(object.crusaders_crossbow); + if (!$util.isObject(object.crusaders_crossbow)) + throw $TypeError(".CMsgPaintKit_Definition.crusaders_crossbow: object expected"); + message.crusaders_crossbow = $root.CMsgPaintKit_Definition.Item.fromObject(object.crusaders_crossbow, _depth + 1); } if (object.degreaser != null) { - if (typeof object.degreaser !== "object") - throw TypeError(".CMsgPaintKit_Definition.degreaser: object expected"); - message.degreaser = $root.CMsgPaintKit_Definition.Item.fromObject(object.degreaser); + if (!$util.isObject(object.degreaser)) + throw $TypeError(".CMsgPaintKit_Definition.degreaser: object expected"); + message.degreaser = $root.CMsgPaintKit_Definition.Item.fromObject(object.degreaser, _depth + 1); } if (object.demo_cannon != null) { - if (typeof object.demo_cannon !== "object") - throw TypeError(".CMsgPaintKit_Definition.demo_cannon: object expected"); - message.demo_cannon = $root.CMsgPaintKit_Definition.Item.fromObject(object.demo_cannon); + if (!$util.isObject(object.demo_cannon)) + throw $TypeError(".CMsgPaintKit_Definition.demo_cannon: object expected"); + message.demo_cannon = $root.CMsgPaintKit_Definition.Item.fromObject(object.demo_cannon, _depth + 1); } if (object.demo_sultan_sword != null) { - if (typeof object.demo_sultan_sword !== "object") - throw TypeError(".CMsgPaintKit_Definition.demo_sultan_sword: object expected"); - message.demo_sultan_sword = $root.CMsgPaintKit_Definition.Item.fromObject(object.demo_sultan_sword); + if (!$util.isObject(object.demo_sultan_sword)) + throw $TypeError(".CMsgPaintKit_Definition.demo_sultan_sword: object expected"); + message.demo_sultan_sword = $root.CMsgPaintKit_Definition.Item.fromObject(object.demo_sultan_sword, _depth + 1); } if (object.detonator != null) { - if (typeof object.detonator !== "object") - throw TypeError(".CMsgPaintKit_Definition.detonator: object expected"); - message.detonator = $root.CMsgPaintKit_Definition.Item.fromObject(object.detonator); + if (!$util.isObject(object.detonator)) + throw $TypeError(".CMsgPaintKit_Definition.detonator: object expected"); + message.detonator = $root.CMsgPaintKit_Definition.Item.fromObject(object.detonator, _depth + 1); } if (object.gatling_gun != null) { - if (typeof object.gatling_gun !== "object") - throw TypeError(".CMsgPaintKit_Definition.gatling_gun: object expected"); - message.gatling_gun = $root.CMsgPaintKit_Definition.Item.fromObject(object.gatling_gun); + if (!$util.isObject(object.gatling_gun)) + throw $TypeError(".CMsgPaintKit_Definition.gatling_gun: object expected"); + message.gatling_gun = $root.CMsgPaintKit_Definition.Item.fromObject(object.gatling_gun, _depth + 1); } if (object.holymackerel != null) { - if (typeof object.holymackerel !== "object") - throw TypeError(".CMsgPaintKit_Definition.holymackerel: object expected"); - message.holymackerel = $root.CMsgPaintKit_Definition.Item.fromObject(object.holymackerel); + if (!$util.isObject(object.holymackerel)) + throw $TypeError(".CMsgPaintKit_Definition.holymackerel: object expected"); + message.holymackerel = $root.CMsgPaintKit_Definition.Item.fromObject(object.holymackerel, _depth + 1); } if (object.jag != null) { - if (typeof object.jag !== "object") - throw TypeError(".CMsgPaintKit_Definition.jag: object expected"); - message.jag = $root.CMsgPaintKit_Definition.Item.fromObject(object.jag); + if (!$util.isObject(object.jag)) + throw $TypeError(".CMsgPaintKit_Definition.jag: object expected"); + message.jag = $root.CMsgPaintKit_Definition.Item.fromObject(object.jag, _depth + 1); } if (object.lochnload != null) { - if (typeof object.lochnload !== "object") - throw TypeError(".CMsgPaintKit_Definition.lochnload: object expected"); - message.lochnload = $root.CMsgPaintKit_Definition.Item.fromObject(object.lochnload); + if (!$util.isObject(object.lochnload)) + throw $TypeError(".CMsgPaintKit_Definition.lochnload: object expected"); + message.lochnload = $root.CMsgPaintKit_Definition.Item.fromObject(object.lochnload, _depth + 1); } if (object.powerjack != null) { - if (typeof object.powerjack !== "object") - throw TypeError(".CMsgPaintKit_Definition.powerjack: object expected"); - message.powerjack = $root.CMsgPaintKit_Definition.Item.fromObject(object.powerjack); + if (!$util.isObject(object.powerjack)) + throw $TypeError(".CMsgPaintKit_Definition.powerjack: object expected"); + message.powerjack = $root.CMsgPaintKit_Definition.Item.fromObject(object.powerjack, _depth + 1); } if (object.quadball != null) { - if (typeof object.quadball !== "object") - throw TypeError(".CMsgPaintKit_Definition.quadball: object expected"); - message.quadball = $root.CMsgPaintKit_Definition.Item.fromObject(object.quadball); + if (!$util.isObject(object.quadball)) + throw $TypeError(".CMsgPaintKit_Definition.quadball: object expected"); + message.quadball = $root.CMsgPaintKit_Definition.Item.fromObject(object.quadball, _depth + 1); } if (object.reserve_shooter != null) { - if (typeof object.reserve_shooter !== "object") - throw TypeError(".CMsgPaintKit_Definition.reserve_shooter: object expected"); - message.reserve_shooter = $root.CMsgPaintKit_Definition.Item.fromObject(object.reserve_shooter); + if (!$util.isObject(object.reserve_shooter)) + throw $TypeError(".CMsgPaintKit_Definition.reserve_shooter: object expected"); + message.reserve_shooter = $root.CMsgPaintKit_Definition.Item.fromObject(object.reserve_shooter, _depth + 1); } if (object.riding_crop != null) { - if (typeof object.riding_crop !== "object") - throw TypeError(".CMsgPaintKit_Definition.riding_crop: object expected"); - message.riding_crop = $root.CMsgPaintKit_Definition.Item.fromObject(object.riding_crop); + if (!$util.isObject(object.riding_crop)) + throw $TypeError(".CMsgPaintKit_Definition.riding_crop: object expected"); + message.riding_crop = $root.CMsgPaintKit_Definition.Item.fromObject(object.riding_crop, _depth + 1); } if (object.russian_riot != null) { - if (typeof object.russian_riot !== "object") - throw TypeError(".CMsgPaintKit_Definition.russian_riot: object expected"); - message.russian_riot = $root.CMsgPaintKit_Definition.Item.fromObject(object.russian_riot); + if (!$util.isObject(object.russian_riot)) + throw $TypeError(".CMsgPaintKit_Definition.russian_riot: object expected"); + message.russian_riot = $root.CMsgPaintKit_Definition.Item.fromObject(object.russian_riot, _depth + 1); } if (object.scimitar != null) { - if (typeof object.scimitar !== "object") - throw TypeError(".CMsgPaintKit_Definition.scimitar: object expected"); - message.scimitar = $root.CMsgPaintKit_Definition.Item.fromObject(object.scimitar); + if (!$util.isObject(object.scimitar)) + throw $TypeError(".CMsgPaintKit_Definition.scimitar: object expected"); + message.scimitar = $root.CMsgPaintKit_Definition.Item.fromObject(object.scimitar, _depth + 1); } if (object.scorch_shot != null) { - if (typeof object.scorch_shot !== "object") - throw TypeError(".CMsgPaintKit_Definition.scorch_shot: object expected"); - message.scorch_shot = $root.CMsgPaintKit_Definition.Item.fromObject(object.scorch_shot); + if (!$util.isObject(object.scorch_shot)) + throw $TypeError(".CMsgPaintKit_Definition.scorch_shot: object expected"); + message.scorch_shot = $root.CMsgPaintKit_Definition.Item.fromObject(object.scorch_shot, _depth + 1); } if (object.shortstop != null) { - if (typeof object.shortstop !== "object") - throw TypeError(".CMsgPaintKit_Definition.shortstop: object expected"); - message.shortstop = $root.CMsgPaintKit_Definition.Item.fromObject(object.shortstop); + if (!$util.isObject(object.shortstop)) + throw $TypeError(".CMsgPaintKit_Definition.shortstop: object expected"); + message.shortstop = $root.CMsgPaintKit_Definition.Item.fromObject(object.shortstop, _depth + 1); } if (object.soda_popper != null) { - if (typeof object.soda_popper !== "object") - throw TypeError(".CMsgPaintKit_Definition.soda_popper: object expected"); - message.soda_popper = $root.CMsgPaintKit_Definition.Item.fromObject(object.soda_popper); + if (!$util.isObject(object.soda_popper)) + throw $TypeError(".CMsgPaintKit_Definition.soda_popper: object expected"); + message.soda_popper = $root.CMsgPaintKit_Definition.Item.fromObject(object.soda_popper, _depth + 1); } if (object.tele_shotgun != null) { - if (typeof object.tele_shotgun !== "object") - throw TypeError(".CMsgPaintKit_Definition.tele_shotgun: object expected"); - message.tele_shotgun = $root.CMsgPaintKit_Definition.Item.fromObject(object.tele_shotgun); + if (!$util.isObject(object.tele_shotgun)) + throw $TypeError(".CMsgPaintKit_Definition.tele_shotgun: object expected"); + message.tele_shotgun = $root.CMsgPaintKit_Definition.Item.fromObject(object.tele_shotgun, _depth + 1); } if (object.tomislav != null) { - if (typeof object.tomislav !== "object") - throw TypeError(".CMsgPaintKit_Definition.tomislav: object expected"); - message.tomislav = $root.CMsgPaintKit_Definition.Item.fromObject(object.tomislav); + if (!$util.isObject(object.tomislav)) + throw $TypeError(".CMsgPaintKit_Definition.tomislav: object expected"); + message.tomislav = $root.CMsgPaintKit_Definition.Item.fromObject(object.tomislav, _depth + 1); } if (object.trenchgun != null) { - if (typeof object.trenchgun !== "object") - throw TypeError(".CMsgPaintKit_Definition.trenchgun: object expected"); - message.trenchgun = $root.CMsgPaintKit_Definition.Item.fromObject(object.trenchgun); + if (!$util.isObject(object.trenchgun)) + throw $TypeError(".CMsgPaintKit_Definition.trenchgun: object expected"); + message.trenchgun = $root.CMsgPaintKit_Definition.Item.fromObject(object.trenchgun, _depth + 1); } if (object.winger_pistol != null) { - if (typeof object.winger_pistol !== "object") - throw TypeError(".CMsgPaintKit_Definition.winger_pistol: object expected"); - message.winger_pistol = $root.CMsgPaintKit_Definition.Item.fromObject(object.winger_pistol); + if (!$util.isObject(object.winger_pistol)) + throw $TypeError(".CMsgPaintKit_Definition.winger_pistol: object expected"); + message.winger_pistol = $root.CMsgPaintKit_Definition.Item.fromObject(object.winger_pistol, _depth + 1); } return message; }; @@ -11949,9 +14842,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgPaintKit_Definition.toObject = function toObject(message, options) { + CMsgPaintKit_Definition.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.item = []; @@ -12006,109 +14903,109 @@ object.trenchgun = null; object.winger_pistol = null; } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); - if (message.loc_desctoken != null && message.hasOwnProperty("loc_desctoken")) + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); + if (message.loc_desctoken != null && $Object.hasOwnProperty.call(message, "loc_desctoken")) object.loc_desctoken = message.loc_desctoken; - if (message.operation_template != null && message.hasOwnProperty("operation_template")) - object.operation_template = $root.CMsgProtoDefID.toObject(message.operation_template, options); - if (message.has_team_textures != null && message.hasOwnProperty("has_team_textures")) + if (message.operation_template != null && $Object.hasOwnProperty.call(message, "operation_template")) + object.operation_template = $root.CMsgProtoDefID.toObject(message.operation_template, options, _depth + 1); + if (message.has_team_textures != null && $Object.hasOwnProperty.call(message, "has_team_textures")) object.has_team_textures = message.has_team_textures; if (message.item && message.item.length) { - object.item = []; + object.item = $Array(message.item.length); for (var j = 0; j < message.item.length; ++j) - object.item[j] = $root.CMsgPaintKit_Definition.Item.toObject(message.item[j], options); - } - if (message.paintkit_tool != null && message.hasOwnProperty("paintkit_tool")) - object.paintkit_tool = $root.CMsgPaintKit_Definition.Item.toObject(message.paintkit_tool, options); - if (message.flamethrower != null && message.hasOwnProperty("flamethrower")) - object.flamethrower = $root.CMsgPaintKit_Definition.Item.toObject(message.flamethrower, options); - if (message.grenadelauncher != null && message.hasOwnProperty("grenadelauncher")) - object.grenadelauncher = $root.CMsgPaintKit_Definition.Item.toObject(message.grenadelauncher, options); - if (message.knife != null && message.hasOwnProperty("knife")) - object.knife = $root.CMsgPaintKit_Definition.Item.toObject(message.knife, options); - if (message.medigun != null && message.hasOwnProperty("medigun")) - object.medigun = $root.CMsgPaintKit_Definition.Item.toObject(message.medigun, options); - if (message.minigun != null && message.hasOwnProperty("minigun")) - object.minigun = $root.CMsgPaintKit_Definition.Item.toObject(message.minigun, options); - if (message.pistol != null && message.hasOwnProperty("pistol")) - object.pistol = $root.CMsgPaintKit_Definition.Item.toObject(message.pistol, options); - if (message.revolver != null && message.hasOwnProperty("revolver")) - object.revolver = $root.CMsgPaintKit_Definition.Item.toObject(message.revolver, options); - if (message.rocketlauncher != null && message.hasOwnProperty("rocketlauncher")) - object.rocketlauncher = $root.CMsgPaintKit_Definition.Item.toObject(message.rocketlauncher, options); - if (message.scattergun != null && message.hasOwnProperty("scattergun")) - object.scattergun = $root.CMsgPaintKit_Definition.Item.toObject(message.scattergun, options); - if (message.shotgun != null && message.hasOwnProperty("shotgun")) - object.shotgun = $root.CMsgPaintKit_Definition.Item.toObject(message.shotgun, options); - if (message.smg != null && message.hasOwnProperty("smg")) - object.smg = $root.CMsgPaintKit_Definition.Item.toObject(message.smg, options); - if (message.sniperrifle != null && message.hasOwnProperty("sniperrifle")) - object.sniperrifle = $root.CMsgPaintKit_Definition.Item.toObject(message.sniperrifle, options); - if (message.stickybomb_launcher != null && message.hasOwnProperty("stickybomb_launcher")) - object.stickybomb_launcher = $root.CMsgPaintKit_Definition.Item.toObject(message.stickybomb_launcher, options); - if (message.ubersaw != null && message.hasOwnProperty("ubersaw")) - object.ubersaw = $root.CMsgPaintKit_Definition.Item.toObject(message.ubersaw, options); - if (message.wrench != null && message.hasOwnProperty("wrench")) - object.wrench = $root.CMsgPaintKit_Definition.Item.toObject(message.wrench, options); - if (message.amputator != null && message.hasOwnProperty("amputator")) - object.amputator = $root.CMsgPaintKit_Definition.Item.toObject(message.amputator, options); - if (message.atom_launcher != null && message.hasOwnProperty("atom_launcher")) - object.atom_launcher = $root.CMsgPaintKit_Definition.Item.toObject(message.atom_launcher, options); - if (message.back_scratcher != null && message.hasOwnProperty("back_scratcher")) - object.back_scratcher = $root.CMsgPaintKit_Definition.Item.toObject(message.back_scratcher, options); - if (message.battleaxe != null && message.hasOwnProperty("battleaxe")) - object.battleaxe = $root.CMsgPaintKit_Definition.Item.toObject(message.battleaxe, options); - if (message.bazaar_sniper != null && message.hasOwnProperty("bazaar_sniper")) - object.bazaar_sniper = $root.CMsgPaintKit_Definition.Item.toObject(message.bazaar_sniper, options); - if (message.blackbox != null && message.hasOwnProperty("blackbox")) - object.blackbox = $root.CMsgPaintKit_Definition.Item.toObject(message.blackbox, options); - if (message.claidheamohmor != null && message.hasOwnProperty("claidheamohmor")) - object.claidheamohmor = $root.CMsgPaintKit_Definition.Item.toObject(message.claidheamohmor, options); - if (message.crusaders_crossbow != null && message.hasOwnProperty("crusaders_crossbow")) - object.crusaders_crossbow = $root.CMsgPaintKit_Definition.Item.toObject(message.crusaders_crossbow, options); - if (message.degreaser != null && message.hasOwnProperty("degreaser")) - object.degreaser = $root.CMsgPaintKit_Definition.Item.toObject(message.degreaser, options); - if (message.demo_cannon != null && message.hasOwnProperty("demo_cannon")) - object.demo_cannon = $root.CMsgPaintKit_Definition.Item.toObject(message.demo_cannon, options); - if (message.demo_sultan_sword != null && message.hasOwnProperty("demo_sultan_sword")) - object.demo_sultan_sword = $root.CMsgPaintKit_Definition.Item.toObject(message.demo_sultan_sword, options); - if (message.detonator != null && message.hasOwnProperty("detonator")) - object.detonator = $root.CMsgPaintKit_Definition.Item.toObject(message.detonator, options); - if (message.gatling_gun != null && message.hasOwnProperty("gatling_gun")) - object.gatling_gun = $root.CMsgPaintKit_Definition.Item.toObject(message.gatling_gun, options); - if (message.holymackerel != null && message.hasOwnProperty("holymackerel")) - object.holymackerel = $root.CMsgPaintKit_Definition.Item.toObject(message.holymackerel, options); - if (message.jag != null && message.hasOwnProperty("jag")) - object.jag = $root.CMsgPaintKit_Definition.Item.toObject(message.jag, options); - if (message.lochnload != null && message.hasOwnProperty("lochnload")) - object.lochnload = $root.CMsgPaintKit_Definition.Item.toObject(message.lochnload, options); - if (message.powerjack != null && message.hasOwnProperty("powerjack")) - object.powerjack = $root.CMsgPaintKit_Definition.Item.toObject(message.powerjack, options); - if (message.quadball != null && message.hasOwnProperty("quadball")) - object.quadball = $root.CMsgPaintKit_Definition.Item.toObject(message.quadball, options); - if (message.reserve_shooter != null && message.hasOwnProperty("reserve_shooter")) - object.reserve_shooter = $root.CMsgPaintKit_Definition.Item.toObject(message.reserve_shooter, options); - if (message.riding_crop != null && message.hasOwnProperty("riding_crop")) - object.riding_crop = $root.CMsgPaintKit_Definition.Item.toObject(message.riding_crop, options); - if (message.russian_riot != null && message.hasOwnProperty("russian_riot")) - object.russian_riot = $root.CMsgPaintKit_Definition.Item.toObject(message.russian_riot, options); - if (message.scimitar != null && message.hasOwnProperty("scimitar")) - object.scimitar = $root.CMsgPaintKit_Definition.Item.toObject(message.scimitar, options); - if (message.scorch_shot != null && message.hasOwnProperty("scorch_shot")) - object.scorch_shot = $root.CMsgPaintKit_Definition.Item.toObject(message.scorch_shot, options); - if (message.shortstop != null && message.hasOwnProperty("shortstop")) - object.shortstop = $root.CMsgPaintKit_Definition.Item.toObject(message.shortstop, options); - if (message.soda_popper != null && message.hasOwnProperty("soda_popper")) - object.soda_popper = $root.CMsgPaintKit_Definition.Item.toObject(message.soda_popper, options); - if (message.tele_shotgun != null && message.hasOwnProperty("tele_shotgun")) - object.tele_shotgun = $root.CMsgPaintKit_Definition.Item.toObject(message.tele_shotgun, options); - if (message.tomislav != null && message.hasOwnProperty("tomislav")) - object.tomislav = $root.CMsgPaintKit_Definition.Item.toObject(message.tomislav, options); - if (message.trenchgun != null && message.hasOwnProperty("trenchgun")) - object.trenchgun = $root.CMsgPaintKit_Definition.Item.toObject(message.trenchgun, options); - if (message.winger_pistol != null && message.hasOwnProperty("winger_pistol")) - object.winger_pistol = $root.CMsgPaintKit_Definition.Item.toObject(message.winger_pistol, options); + object.item[j] = $root.CMsgPaintKit_Definition.Item.toObject(message.item[j], options, _depth + 1); + } + if (message.paintkit_tool != null && $Object.hasOwnProperty.call(message, "paintkit_tool")) + object.paintkit_tool = $root.CMsgPaintKit_Definition.Item.toObject(message.paintkit_tool, options, _depth + 1); + if (message.flamethrower != null && $Object.hasOwnProperty.call(message, "flamethrower")) + object.flamethrower = $root.CMsgPaintKit_Definition.Item.toObject(message.flamethrower, options, _depth + 1); + if (message.grenadelauncher != null && $Object.hasOwnProperty.call(message, "grenadelauncher")) + object.grenadelauncher = $root.CMsgPaintKit_Definition.Item.toObject(message.grenadelauncher, options, _depth + 1); + if (message.knife != null && $Object.hasOwnProperty.call(message, "knife")) + object.knife = $root.CMsgPaintKit_Definition.Item.toObject(message.knife, options, _depth + 1); + if (message.medigun != null && $Object.hasOwnProperty.call(message, "medigun")) + object.medigun = $root.CMsgPaintKit_Definition.Item.toObject(message.medigun, options, _depth + 1); + if (message.minigun != null && $Object.hasOwnProperty.call(message, "minigun")) + object.minigun = $root.CMsgPaintKit_Definition.Item.toObject(message.minigun, options, _depth + 1); + if (message.pistol != null && $Object.hasOwnProperty.call(message, "pistol")) + object.pistol = $root.CMsgPaintKit_Definition.Item.toObject(message.pistol, options, _depth + 1); + if (message.revolver != null && $Object.hasOwnProperty.call(message, "revolver")) + object.revolver = $root.CMsgPaintKit_Definition.Item.toObject(message.revolver, options, _depth + 1); + if (message.rocketlauncher != null && $Object.hasOwnProperty.call(message, "rocketlauncher")) + object.rocketlauncher = $root.CMsgPaintKit_Definition.Item.toObject(message.rocketlauncher, options, _depth + 1); + if (message.scattergun != null && $Object.hasOwnProperty.call(message, "scattergun")) + object.scattergun = $root.CMsgPaintKit_Definition.Item.toObject(message.scattergun, options, _depth + 1); + if (message.shotgun != null && $Object.hasOwnProperty.call(message, "shotgun")) + object.shotgun = $root.CMsgPaintKit_Definition.Item.toObject(message.shotgun, options, _depth + 1); + if (message.smg != null && $Object.hasOwnProperty.call(message, "smg")) + object.smg = $root.CMsgPaintKit_Definition.Item.toObject(message.smg, options, _depth + 1); + if (message.sniperrifle != null && $Object.hasOwnProperty.call(message, "sniperrifle")) + object.sniperrifle = $root.CMsgPaintKit_Definition.Item.toObject(message.sniperrifle, options, _depth + 1); + if (message.stickybomb_launcher != null && $Object.hasOwnProperty.call(message, "stickybomb_launcher")) + object.stickybomb_launcher = $root.CMsgPaintKit_Definition.Item.toObject(message.stickybomb_launcher, options, _depth + 1); + if (message.ubersaw != null && $Object.hasOwnProperty.call(message, "ubersaw")) + object.ubersaw = $root.CMsgPaintKit_Definition.Item.toObject(message.ubersaw, options, _depth + 1); + if (message.wrench != null && $Object.hasOwnProperty.call(message, "wrench")) + object.wrench = $root.CMsgPaintKit_Definition.Item.toObject(message.wrench, options, _depth + 1); + if (message.amputator != null && $Object.hasOwnProperty.call(message, "amputator")) + object.amputator = $root.CMsgPaintKit_Definition.Item.toObject(message.amputator, options, _depth + 1); + if (message.atom_launcher != null && $Object.hasOwnProperty.call(message, "atom_launcher")) + object.atom_launcher = $root.CMsgPaintKit_Definition.Item.toObject(message.atom_launcher, options, _depth + 1); + if (message.back_scratcher != null && $Object.hasOwnProperty.call(message, "back_scratcher")) + object.back_scratcher = $root.CMsgPaintKit_Definition.Item.toObject(message.back_scratcher, options, _depth + 1); + if (message.battleaxe != null && $Object.hasOwnProperty.call(message, "battleaxe")) + object.battleaxe = $root.CMsgPaintKit_Definition.Item.toObject(message.battleaxe, options, _depth + 1); + if (message.bazaar_sniper != null && $Object.hasOwnProperty.call(message, "bazaar_sniper")) + object.bazaar_sniper = $root.CMsgPaintKit_Definition.Item.toObject(message.bazaar_sniper, options, _depth + 1); + if (message.blackbox != null && $Object.hasOwnProperty.call(message, "blackbox")) + object.blackbox = $root.CMsgPaintKit_Definition.Item.toObject(message.blackbox, options, _depth + 1); + if (message.claidheamohmor != null && $Object.hasOwnProperty.call(message, "claidheamohmor")) + object.claidheamohmor = $root.CMsgPaintKit_Definition.Item.toObject(message.claidheamohmor, options, _depth + 1); + if (message.crusaders_crossbow != null && $Object.hasOwnProperty.call(message, "crusaders_crossbow")) + object.crusaders_crossbow = $root.CMsgPaintKit_Definition.Item.toObject(message.crusaders_crossbow, options, _depth + 1); + if (message.degreaser != null && $Object.hasOwnProperty.call(message, "degreaser")) + object.degreaser = $root.CMsgPaintKit_Definition.Item.toObject(message.degreaser, options, _depth + 1); + if (message.demo_cannon != null && $Object.hasOwnProperty.call(message, "demo_cannon")) + object.demo_cannon = $root.CMsgPaintKit_Definition.Item.toObject(message.demo_cannon, options, _depth + 1); + if (message.demo_sultan_sword != null && $Object.hasOwnProperty.call(message, "demo_sultan_sword")) + object.demo_sultan_sword = $root.CMsgPaintKit_Definition.Item.toObject(message.demo_sultan_sword, options, _depth + 1); + if (message.detonator != null && $Object.hasOwnProperty.call(message, "detonator")) + object.detonator = $root.CMsgPaintKit_Definition.Item.toObject(message.detonator, options, _depth + 1); + if (message.gatling_gun != null && $Object.hasOwnProperty.call(message, "gatling_gun")) + object.gatling_gun = $root.CMsgPaintKit_Definition.Item.toObject(message.gatling_gun, options, _depth + 1); + if (message.holymackerel != null && $Object.hasOwnProperty.call(message, "holymackerel")) + object.holymackerel = $root.CMsgPaintKit_Definition.Item.toObject(message.holymackerel, options, _depth + 1); + if (message.jag != null && $Object.hasOwnProperty.call(message, "jag")) + object.jag = $root.CMsgPaintKit_Definition.Item.toObject(message.jag, options, _depth + 1); + if (message.lochnload != null && $Object.hasOwnProperty.call(message, "lochnload")) + object.lochnload = $root.CMsgPaintKit_Definition.Item.toObject(message.lochnload, options, _depth + 1); + if (message.powerjack != null && $Object.hasOwnProperty.call(message, "powerjack")) + object.powerjack = $root.CMsgPaintKit_Definition.Item.toObject(message.powerjack, options, _depth + 1); + if (message.quadball != null && $Object.hasOwnProperty.call(message, "quadball")) + object.quadball = $root.CMsgPaintKit_Definition.Item.toObject(message.quadball, options, _depth + 1); + if (message.reserve_shooter != null && $Object.hasOwnProperty.call(message, "reserve_shooter")) + object.reserve_shooter = $root.CMsgPaintKit_Definition.Item.toObject(message.reserve_shooter, options, _depth + 1); + if (message.riding_crop != null && $Object.hasOwnProperty.call(message, "riding_crop")) + object.riding_crop = $root.CMsgPaintKit_Definition.Item.toObject(message.riding_crop, options, _depth + 1); + if (message.russian_riot != null && $Object.hasOwnProperty.call(message, "russian_riot")) + object.russian_riot = $root.CMsgPaintKit_Definition.Item.toObject(message.russian_riot, options, _depth + 1); + if (message.scimitar != null && $Object.hasOwnProperty.call(message, "scimitar")) + object.scimitar = $root.CMsgPaintKit_Definition.Item.toObject(message.scimitar, options, _depth + 1); + if (message.scorch_shot != null && $Object.hasOwnProperty.call(message, "scorch_shot")) + object.scorch_shot = $root.CMsgPaintKit_Definition.Item.toObject(message.scorch_shot, options, _depth + 1); + if (message.shortstop != null && $Object.hasOwnProperty.call(message, "shortstop")) + object.shortstop = $root.CMsgPaintKit_Definition.Item.toObject(message.shortstop, options, _depth + 1); + if (message.soda_popper != null && $Object.hasOwnProperty.call(message, "soda_popper")) + object.soda_popper = $root.CMsgPaintKit_Definition.Item.toObject(message.soda_popper, options, _depth + 1); + if (message.tele_shotgun != null && $Object.hasOwnProperty.call(message, "tele_shotgun")) + object.tele_shotgun = $root.CMsgPaintKit_Definition.Item.toObject(message.tele_shotgun, options, _depth + 1); + if (message.tomislav != null && $Object.hasOwnProperty.call(message, "tomislav")) + object.tomislav = $root.CMsgPaintKit_Definition.Item.toObject(message.tomislav, options, _depth + 1); + if (message.trenchgun != null && $Object.hasOwnProperty.call(message, "trenchgun")) + object.trenchgun = $root.CMsgPaintKit_Definition.Item.toObject(message.trenchgun, options, _depth + 1); + if (message.winger_pistol != null && $Object.hasOwnProperty.call(message, "winger_pistol")) + object.winger_pistol = $root.CMsgPaintKit_Definition.Item.toObject(message.winger_pistol, options, _depth + 1); return object; }; @@ -12119,38 +15016,69 @@ * @instance * @returns {Object.} JSON object */ - CMsgPaintKit_Definition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgPaintKit_Definition.prototype.toJSON = function() { + return CMsgPaintKit_Definition.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgPaintKit_Definition + * @function getTypeUrl + * @memberof CMsgPaintKit_Definition + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgPaintKit_Definition.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_Definition"; }; CMsgPaintKit_Definition.Item = (function() { + /** + * Properties of an Item. + * @typedef {Object} CMsgPaintKit_Definition.Item.$Properties + * @property {CMsgProtoDefID.$Properties} item_definition_template Item item_definition_template + * @property {CMsgPaintKit_Definition.Item.ItemData.$Properties|null} [data] Item data + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an Item. * @memberof CMsgPaintKit_Definition * @interface IItem - * @property {ICMsgProtoDefID} item_definition_template Item item_definition_template - * @property {CMsgPaintKit_Definition.Item.IItemData|null} [data] Item data + * @augments CMsgPaintKit_Definition.Item.$Properties + * @deprecated Use CMsgPaintKit_Definition.Item.$Properties instead. + */ + + /** + * Shape of an Item. + * @typedef {{ + * item_definition_template: CMsgProtoDefID.$Shape; + * data?: CMsgPaintKit_Definition.Item.ItemData.$Shape|null; + * $unknowns?: Array.; + * }} CMsgPaintKit_Definition.Item.$Shape */ /** * Constructs a new Item. * @memberof CMsgPaintKit_Definition * @classdesc Represents an Item. - * @implements IItem * @constructor - * @param {CMsgPaintKit_Definition.IItem=} [properties] Properties to set + * @param {CMsgPaintKit_Definition.Item.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Item(properties) { + var Item = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Item item_definition_template. - * @member {ICMsgProtoDefID} item_definition_template + * @member {CMsgProtoDefID.$Properties} item_definition_template * @memberof CMsgPaintKit_Definition.Item * @instance */ @@ -12158,7 +15086,7 @@ /** * Item data. - * @member {CMsgPaintKit_Definition.Item.IItemData|null|undefined} data + * @member {CMsgPaintKit_Definition.Item.ItemData.$Properties|null|undefined} data * @memberof CMsgPaintKit_Definition.Item * @instance */ @@ -12169,10 +15097,14 @@ * @function create * @memberof CMsgPaintKit_Definition.Item * @static - * @param {CMsgPaintKit_Definition.IItem=} [properties] Properties to set + * @param {CMsgPaintKit_Definition.Item.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_Definition.Item} Item instance + * @type {{ + * (properties: CMsgPaintKit_Definition.Item.$Shape): CMsgPaintKit_Definition.Item & CMsgPaintKit_Definition.Item.$Shape; + * (properties?: CMsgPaintKit_Definition.Item.$Properties): CMsgPaintKit_Definition.Item; + * }} */ - Item.create = function create(properties) { + Item.create = function(properties) { return new Item(properties); }; @@ -12181,16 +15113,23 @@ * @function encode * @memberof CMsgPaintKit_Definition.Item * @static - * @param {CMsgPaintKit_Definition.IItem} message Item message or plain object to encode + * @param {CMsgPaintKit_Definition.Item.$Properties} message Item message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Item.encode = function encode(message, writer) { + Item.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefID.encode(message.item_definition_template, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - $root.CMsgPaintKit_Definition.Item.ItemData.encode(message.data, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefID.encode(message.item_definition_template, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.data != null && $Object.hasOwnProperty.call(message, "data")) + $root.CMsgPaintKit_Definition.Item.ItemData.encode(message.data, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12199,12 +15138,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_Definition.Item * @static - * @param {CMsgPaintKit_Definition.IItem} message Item message or plain object to encode + * @param {CMsgPaintKit_Definition.Item.$Properties} message Item message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Item.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Item.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12214,29 +15153,49 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_Definition.Item} Item + * @returns {CMsgPaintKit_Definition.Item & CMsgPaintKit_Definition.Item.$Shape} Item * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Item.decode = function decode(reader, length) { + Item.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_Definition.Item(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_Definition.Item(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.item_definition_template = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - case 5: - message.data = $root.CMsgPaintKit_Definition.Item.ItemData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.item_definition_template = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.item_definition_template); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.data = $root.CMsgPaintKit_Definition.Item.ItemData.decode(reader, reader.uint32(), $undefined, _depth + 1, message.data); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("item_definition_template")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "item_definition_template")) throw $util.ProtocolError("missing required 'item_definition_template'", { instance: message }); return message; }; @@ -12247,11 +15206,11 @@ * @memberof CMsgPaintKit_Definition.Item * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_Definition.Item} Item + * @returns {CMsgPaintKit_Definition.Item & CMsgPaintKit_Definition.Item.$Shape} Item * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Item.decodeDelimited = function decodeDelimited(reader) { + Item.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12265,16 +15224,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Item.verify = function verify(message) { + Item.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefID.verify(message.item_definition_template); + var error = $root.CMsgProtoDefID.verify(message.item_definition_template, _depth + 1); if (error) return "item_definition_template." + error; } - if (message.data != null && message.hasOwnProperty("data")) { - var error = $root.CMsgPaintKit_Definition.Item.ItemData.verify(message.data); + if (message.data != null && $Object.hasOwnProperty.call(message, "data")) { + var error = $root.CMsgPaintKit_Definition.Item.ItemData.verify(message.data, _depth + 1); if (error) return "data." + error; } @@ -12289,19 +15252,25 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_Definition.Item} Item */ - Item.fromObject = function fromObject(object) { + Item.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_Definition.Item) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_Definition.Item: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_Definition.Item(); if (object.item_definition_template != null) { - if (typeof object.item_definition_template !== "object") - throw TypeError(".CMsgPaintKit_Definition.Item.item_definition_template: object expected"); - message.item_definition_template = $root.CMsgProtoDefID.fromObject(object.item_definition_template); + if (!$util.isObject(object.item_definition_template)) + throw $TypeError(".CMsgPaintKit_Definition.Item.item_definition_template: object expected"); + message.item_definition_template = $root.CMsgProtoDefID.fromObject(object.item_definition_template, _depth + 1); } if (object.data != null) { - if (typeof object.data !== "object") - throw TypeError(".CMsgPaintKit_Definition.Item.data: object expected"); - message.data = $root.CMsgPaintKit_Definition.Item.ItemData.fromObject(object.data); + if (!$util.isObject(object.data)) + throw $TypeError(".CMsgPaintKit_Definition.Item.data: object expected"); + message.data = $root.CMsgPaintKit_Definition.Item.ItemData.fromObject(object.data, _depth + 1); } return message; }; @@ -12315,18 +15284,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Item.toObject = function toObject(message, options) { + Item.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.item_definition_template = null; object.data = null; } - if (message.item_definition_template != null && message.hasOwnProperty("item_definition_template")) - object.item_definition_template = $root.CMsgProtoDefID.toObject(message.item_definition_template, options); - if (message.data != null && message.hasOwnProperty("data")) - object.data = $root.CMsgPaintKit_Definition.Item.ItemData.toObject(message.data, options); + if (message.item_definition_template != null && $Object.hasOwnProperty.call(message, "item_definition_template")) + object.item_definition_template = $root.CMsgProtoDefID.toObject(message.item_definition_template, options, _depth + 1); + if (message.data != null && $Object.hasOwnProperty.call(message, "data")) + object.data = $root.CMsgPaintKit_Definition.Item.ItemData.toObject(message.data, options, _depth + 1); return object; }; @@ -12337,36 +15310,68 @@ * @instance * @returns {Object.} JSON object */ - Item.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Item.prototype.toJSON = function() { + return Item.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Item + * @function getTypeUrl + * @memberof CMsgPaintKit_Definition.Item + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Item.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_Definition.Item"; }; Item.ItemData = (function() { /** * Properties of an ItemData. - * @memberof CMsgPaintKit_Definition.Item - * @interface IItemData + * @typedef {Object} CMsgPaintKit_Definition.Item.ItemData.$Properties * @property {boolean|null} [can_apply_paintkit] ItemData can_apply_paintkit * @property {string|null} [material_override] ItemData material_override - * @property {Array.|null} [variable] ItemData variable + * @property {Array.|null} [variable] ItemData variable + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ItemData. + * @memberof CMsgPaintKit_Definition.Item + * @interface IItemData + * @augments CMsgPaintKit_Definition.Item.ItemData.$Properties + * @deprecated Use CMsgPaintKit_Definition.Item.ItemData.$Properties instead. + */ + + /** + * Shape of an ItemData. + * @typedef {{ + * can_apply_paintkit?: boolean|null; + * material_override?: string|null; + * variable?: Array.|null; + * $unknowns?: Array.; + * }} CMsgPaintKit_Definition.Item.ItemData.$Shape */ /** * Constructs a new ItemData. * @memberof CMsgPaintKit_Definition.Item * @classdesc Represents an ItemData. - * @implements IItemData * @constructor - * @param {CMsgPaintKit_Definition.Item.IItemData=} [properties] Properties to set + * @param {CMsgPaintKit_Definition.Item.ItemData.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ItemData(properties) { + var ItemData = function (properties) { this.variable = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ItemData can_apply_paintkit. @@ -12386,7 +15391,7 @@ /** * ItemData variable. - * @member {Array.} variable + * @member {Array.} variable * @memberof CMsgPaintKit_Definition.Item.ItemData * @instance */ @@ -12397,10 +15402,14 @@ * @function create * @memberof CMsgPaintKit_Definition.Item.ItemData * @static - * @param {CMsgPaintKit_Definition.Item.IItemData=} [properties] Properties to set + * @param {CMsgPaintKit_Definition.Item.ItemData.$Properties=} [properties] Properties to set * @returns {CMsgPaintKit_Definition.Item.ItemData} ItemData instance + * @type {{ + * (properties: CMsgPaintKit_Definition.Item.ItemData.$Shape): CMsgPaintKit_Definition.Item.ItemData & CMsgPaintKit_Definition.Item.ItemData.$Shape; + * (properties?: CMsgPaintKit_Definition.Item.ItemData.$Properties): CMsgPaintKit_Definition.Item.ItemData; + * }} */ - ItemData.create = function create(properties) { + ItemData.create = function(properties) { return new ItemData(properties); }; @@ -12409,20 +15418,27 @@ * @function encode * @memberof CMsgPaintKit_Definition.Item.ItemData * @static - * @param {CMsgPaintKit_Definition.Item.IItemData} message ItemData message or plain object to encode + * @param {CMsgPaintKit_Definition.Item.ItemData.$Properties} message ItemData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ItemData.encode = function encode(message, writer) { + ItemData.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.can_apply_paintkit != null && Object.hasOwnProperty.call(message, "can_apply_paintkit")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.can_apply_paintkit != null && $Object.hasOwnProperty.call(message, "can_apply_paintkit")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.can_apply_paintkit); - if (message.material_override != null && Object.hasOwnProperty.call(message, "material_override")) + if (message.material_override != null && $Object.hasOwnProperty.call(message, "material_override")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.material_override); if (message.variable != null && message.variable.length) for (var i = 0; i < message.variable.length; ++i) - $root.CMsgVarField.encode(message.variable[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.CMsgVarField.encode(message.variable[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12431,12 +15447,12 @@ * @function encodeDelimited * @memberof CMsgPaintKit_Definition.Item.ItemData * @static - * @param {CMsgPaintKit_Definition.Item.IItemData} message ItemData message or plain object to encode + * @param {CMsgPaintKit_Definition.Item.ItemData.$Properties} message ItemData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ItemData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ItemData.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12446,35 +15462,58 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgPaintKit_Definition.Item.ItemData} ItemData + * @returns {CMsgPaintKit_Definition.Item.ItemData & CMsgPaintKit_Definition.Item.ItemData.$Shape} ItemData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ItemData.decode = function decode(reader, length) { + ItemData.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgPaintKit_Definition.Item.ItemData(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgPaintKit_Definition.Item.ItemData(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.can_apply_paintkit = reader.bool(); - break; - case 3: - message.material_override = reader.string(); - break; - case 4: - if (!(message.variable && message.variable.length)) - message.variable = []; - message.variable.push($root.CMsgVarField.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } - } - return message; - }; + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 0) + break; + message.can_apply_paintkit = reader.bool(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.material_override = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.variable && message.variable.length)) + message.variable = []; + message.variable.push($root.CMsgVarField.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; /** * Decodes an ItemData message from the specified reader or buffer, length delimited. @@ -12482,11 +15521,11 @@ * @memberof CMsgPaintKit_Definition.Item.ItemData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgPaintKit_Definition.Item.ItemData} ItemData + * @returns {CMsgPaintKit_Definition.Item.ItemData & CMsgPaintKit_Definition.Item.ItemData.$Shape} ItemData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ItemData.decodeDelimited = function decodeDelimited(reader) { + ItemData.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12500,20 +15539,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ItemData.verify = function verify(message) { + ItemData.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.can_apply_paintkit != null && message.hasOwnProperty("can_apply_paintkit")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.can_apply_paintkit != null && $Object.hasOwnProperty.call(message, "can_apply_paintkit")) if (typeof message.can_apply_paintkit !== "boolean") return "can_apply_paintkit: boolean expected"; - if (message.material_override != null && message.hasOwnProperty("material_override")) + if (message.material_override != null && $Object.hasOwnProperty.call(message, "material_override")) if (!$util.isString(message.material_override)) return "material_override: string expected"; - if (message.variable != null && message.hasOwnProperty("variable")) { - if (!Array.isArray(message.variable)) + if (message.variable != null && $Object.hasOwnProperty.call(message, "variable")) { + if (!$Array.isArray(message.variable)) return "variable: array expected"; for (var i = 0; i < message.variable.length; ++i) { - var error = $root.CMsgVarField.verify(message.variable[i]); + var error = $root.CMsgVarField.verify(message.variable[i], _depth + 1); if (error) return "variable." + error; } @@ -12529,22 +15572,28 @@ * @param {Object.} object Plain object * @returns {CMsgPaintKit_Definition.Item.ItemData} ItemData */ - ItemData.fromObject = function fromObject(object) { + ItemData.fromObject = function (object, _depth) { if (object instanceof $root.CMsgPaintKit_Definition.Item.ItemData) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgPaintKit_Definition.Item.ItemData: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgPaintKit_Definition.Item.ItemData(); if (object.can_apply_paintkit != null) - message.can_apply_paintkit = Boolean(object.can_apply_paintkit); + message.can_apply_paintkit = $Boolean(object.can_apply_paintkit); if (object.material_override != null) - message.material_override = String(object.material_override); + message.material_override = $String(object.material_override); if (object.variable) { - if (!Array.isArray(object.variable)) - throw TypeError(".CMsgPaintKit_Definition.Item.ItemData.variable: array expected"); - message.variable = []; + if (!$Array.isArray(object.variable)) + throw $TypeError(".CMsgPaintKit_Definition.Item.ItemData.variable: array expected"); + message.variable = $Array(object.variable.length); for (var i = 0; i < object.variable.length; ++i) { - if (typeof object.variable[i] !== "object") - throw TypeError(".CMsgPaintKit_Definition.Item.ItemData.variable: object expected"); - message.variable[i] = $root.CMsgVarField.fromObject(object.variable[i]); + if (!$util.isObject(object.variable[i])) + throw $TypeError(".CMsgPaintKit_Definition.Item.ItemData.variable: object expected"); + message.variable[i] = $root.CMsgVarField.fromObject(object.variable[i], _depth + 1); } } return message; @@ -12559,9 +15608,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ItemData.toObject = function toObject(message, options) { + ItemData.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.variable = []; @@ -12569,14 +15622,14 @@ object.can_apply_paintkit = true; object.material_override = ""; } - if (message.can_apply_paintkit != null && message.hasOwnProperty("can_apply_paintkit")) + if (message.can_apply_paintkit != null && $Object.hasOwnProperty.call(message, "can_apply_paintkit")) object.can_apply_paintkit = message.can_apply_paintkit; - if (message.material_override != null && message.hasOwnProperty("material_override")) + if (message.material_override != null && $Object.hasOwnProperty.call(message, "material_override")) object.material_override = message.material_override; if (message.variable && message.variable.length) { - object.variable = []; + object.variable = $Array(message.variable.length); for (var j = 0; j < message.variable.length; ++j) - object.variable[j] = $root.CMsgVarField.toObject(message.variable[j], options); + object.variable[j] = $root.CMsgVarField.toObject(message.variable[j], options, _depth + 1); } return object; }; @@ -12588,8 +15641,22 @@ * @instance * @returns {Object.} JSON object */ - ItemData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ItemData.prototype.toJSON = function() { + return ItemData.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ItemData + * @function getTypeUrl + * @memberof CMsgPaintKit_Definition.Item.ItemData + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ItemData.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgPaintKit_Definition.Item.ItemData"; }; return ItemData; @@ -12605,41 +15672,66 @@ /** * Properties of a CMsgQuestTheme. - * @exports ICMsgQuestTheme - * @interface ICMsgQuestTheme - * @property {ICMsgProtoDefHeader} header CMsgQuestTheme header + * @typedef {Object} CMsgQuestTheme.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgQuestTheme header * @property {string|null} [notification_res] CMsgQuestTheme notification_res * @property {string|null} [quest_item_res] CMsgQuestTheme quest_item_res * @property {string|null} [in_game_tracker_res] CMsgQuestTheme in_game_tracker_res - * @property {Array.|null} [give_sounds] CMsgQuestTheme give_sounds - * @property {Array.|null} [complete_sounds] CMsgQuestTheme complete_sounds - * @property {Array.|null} [fully_complete_sounds] CMsgQuestTheme fully_complete_sounds + * @property {Array.|null} [give_sounds] CMsgQuestTheme give_sounds + * @property {Array.|null} [complete_sounds] CMsgQuestTheme complete_sounds + * @property {Array.|null} [fully_complete_sounds] CMsgQuestTheme fully_complete_sounds * @property {string|null} [reward_sound] CMsgQuestTheme reward_sound * @property {string|null} [discard_sound] CMsgQuestTheme discard_sound * @property {string|null} [reveal_sound] CMsgQuestTheme reveal_sound + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CMsgQuestTheme. + * @exports ICMsgQuestTheme + * @interface ICMsgQuestTheme + * @augments CMsgQuestTheme.$Properties + * @deprecated Use CMsgQuestTheme.$Properties instead. + */ + + /** + * Shape of a CMsgQuestTheme. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * notification_res?: string|null; + * quest_item_res?: string|null; + * in_game_tracker_res?: string|null; + * give_sounds?: Array.|null; + * complete_sounds?: Array.|null; + * fully_complete_sounds?: Array.|null; + * reward_sound?: string|null; + * discard_sound?: string|null; + * reveal_sound?: string|null; + * $unknowns?: Array.; + * }} CMsgQuestTheme.$Shape */ /** * Constructs a new CMsgQuestTheme. * @exports CMsgQuestTheme * @classdesc Represents a CMsgQuestTheme. - * @implements ICMsgQuestTheme * @constructor - * @param {ICMsgQuestTheme=} [properties] Properties to set + * @param {CMsgQuestTheme.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgQuestTheme(properties) { + var CMsgQuestTheme = function (properties) { this.give_sounds = []; this.complete_sounds = []; this.fully_complete_sounds = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgQuestTheme header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgQuestTheme * @instance */ @@ -12671,7 +15763,7 @@ /** * CMsgQuestTheme give_sounds. - * @member {Array.} give_sounds + * @member {Array.} give_sounds * @memberof CMsgQuestTheme * @instance */ @@ -12679,7 +15771,7 @@ /** * CMsgQuestTheme complete_sounds. - * @member {Array.} complete_sounds + * @member {Array.} complete_sounds * @memberof CMsgQuestTheme * @instance */ @@ -12687,7 +15779,7 @@ /** * CMsgQuestTheme fully_complete_sounds. - * @member {Array.} fully_complete_sounds + * @member {Array.} fully_complete_sounds * @memberof CMsgQuestTheme * @instance */ @@ -12722,10 +15814,14 @@ * @function create * @memberof CMsgQuestTheme * @static - * @param {ICMsgQuestTheme=} [properties] Properties to set + * @param {CMsgQuestTheme.$Properties=} [properties] Properties to set * @returns {CMsgQuestTheme} CMsgQuestTheme instance + * @type {{ + * (properties: CMsgQuestTheme.$Shape): CMsgQuestTheme & CMsgQuestTheme.$Shape; + * (properties?: CMsgQuestTheme.$Properties): CMsgQuestTheme; + * }} */ - CMsgQuestTheme.create = function create(properties) { + CMsgQuestTheme.create = function(properties) { return new CMsgQuestTheme(properties); }; @@ -12734,35 +15830,42 @@ * @function encode * @memberof CMsgQuestTheme * @static - * @param {ICMsgQuestTheme} message CMsgQuestTheme message or plain object to encode + * @param {CMsgQuestTheme.$Properties} message CMsgQuestTheme message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestTheme.encode = function encode(message, writer) { + CMsgQuestTheme.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.notification_res != null && Object.hasOwnProperty.call(message, "notification_res")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.notification_res != null && $Object.hasOwnProperty.call(message, "notification_res")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.notification_res); - if (message.quest_item_res != null && Object.hasOwnProperty.call(message, "quest_item_res")) + if (message.quest_item_res != null && $Object.hasOwnProperty.call(message, "quest_item_res")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.quest_item_res); - if (message.in_game_tracker_res != null && Object.hasOwnProperty.call(message, "in_game_tracker_res")) + if (message.in_game_tracker_res != null && $Object.hasOwnProperty.call(message, "in_game_tracker_res")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.in_game_tracker_res); if (message.give_sounds != null && message.give_sounds.length) for (var i = 0; i < message.give_sounds.length; ++i) - $root.CMsgQuestTheme.WeightedStringSet.encode(message.give_sounds[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.CMsgQuestTheme.WeightedStringSet.encode(message.give_sounds[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.complete_sounds != null && message.complete_sounds.length) for (var i = 0; i < message.complete_sounds.length; ++i) - $root.CMsgQuestTheme.WeightedStringSet.encode(message.complete_sounds[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.CMsgQuestTheme.WeightedStringSet.encode(message.complete_sounds[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); if (message.fully_complete_sounds != null && message.fully_complete_sounds.length) for (var i = 0; i < message.fully_complete_sounds.length; ++i) - $root.CMsgQuestTheme.WeightedStringSet.encode(message.fully_complete_sounds[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.reward_sound != null && Object.hasOwnProperty.call(message, "reward_sound")) + $root.CMsgQuestTheme.WeightedStringSet.encode(message.fully_complete_sounds[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.reward_sound != null && $Object.hasOwnProperty.call(message, "reward_sound")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.reward_sound); - if (message.discard_sound != null && Object.hasOwnProperty.call(message, "discard_sound")) + if (message.discard_sound != null && $Object.hasOwnProperty.call(message, "discard_sound")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.discard_sound); - if (message.reveal_sound != null && Object.hasOwnProperty.call(message, "reveal_sound")) + if (message.reveal_sound != null && $Object.hasOwnProperty.call(message, "reveal_sound")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.reveal_sound); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -12771,12 +15874,12 @@ * @function encodeDelimited * @memberof CMsgQuestTheme * @static - * @param {ICMsgQuestTheme} message CMsgQuestTheme message or plain object to encode + * @param {CMsgQuestTheme.$Properties} message CMsgQuestTheme message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestTheme.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgQuestTheme.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -12786,59 +15889,103 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestTheme} CMsgQuestTheme + * @returns {CMsgQuestTheme & CMsgQuestTheme.$Shape} CMsgQuestTheme * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestTheme.decode = function decode(reader, length) { + CMsgQuestTheme.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestTheme(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestTheme(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - case 2: - message.notification_res = reader.string(); - break; - case 3: - message.quest_item_res = reader.string(); - break; - case 4: - message.in_game_tracker_res = reader.string(); - break; - case 5: - if (!(message.give_sounds && message.give_sounds.length)) - message.give_sounds = []; - message.give_sounds.push($root.CMsgQuestTheme.WeightedStringSet.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.complete_sounds && message.complete_sounds.length)) - message.complete_sounds = []; - message.complete_sounds.push($root.CMsgQuestTheme.WeightedStringSet.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.fully_complete_sounds && message.fully_complete_sounds.length)) - message.fully_complete_sounds = []; - message.fully_complete_sounds.push($root.CMsgQuestTheme.WeightedStringSet.decode(reader, reader.uint32())); - break; - case 8: - message.reward_sound = reader.string(); - break; - case 9: - message.discard_sound = reader.string(); - break; - case 10: - message.reveal_sound = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.notification_res = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.quest_item_res = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.in_game_tracker_res = reader.string(); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.give_sounds && message.give_sounds.length)) + message.give_sounds = []; + message.give_sounds.push($root.CMsgQuestTheme.WeightedStringSet.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.complete_sounds && message.complete_sounds.length)) + message.complete_sounds = []; + message.complete_sounds.push($root.CMsgQuestTheme.WeightedStringSet.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.fully_complete_sounds && message.fully_complete_sounds.length)) + message.fully_complete_sounds = []; + message.fully_complete_sounds.push($root.CMsgQuestTheme.WeightedStringSet.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.reward_sound = reader.string(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.discard_sound = reader.string(); + continue; + } + case 10: { + if (wireType !== 2) + break; + message.reveal_sound = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("header")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) throw $util.ProtocolError("missing required 'header'", { instance: message }); return message; }; @@ -12849,11 +15996,11 @@ * @memberof CMsgQuestTheme * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestTheme} CMsgQuestTheme + * @returns {CMsgQuestTheme & CMsgQuestTheme.$Shape} CMsgQuestTheme * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestTheme.decodeDelimited = function decodeDelimited(reader) { + CMsgQuestTheme.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -12867,57 +16014,61 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgQuestTheme.verify = function verify(message) { + CMsgQuestTheme.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } - if (message.notification_res != null && message.hasOwnProperty("notification_res")) + if (message.notification_res != null && $Object.hasOwnProperty.call(message, "notification_res")) if (!$util.isString(message.notification_res)) return "notification_res: string expected"; - if (message.quest_item_res != null && message.hasOwnProperty("quest_item_res")) + if (message.quest_item_res != null && $Object.hasOwnProperty.call(message, "quest_item_res")) if (!$util.isString(message.quest_item_res)) return "quest_item_res: string expected"; - if (message.in_game_tracker_res != null && message.hasOwnProperty("in_game_tracker_res")) + if (message.in_game_tracker_res != null && $Object.hasOwnProperty.call(message, "in_game_tracker_res")) if (!$util.isString(message.in_game_tracker_res)) return "in_game_tracker_res: string expected"; - if (message.give_sounds != null && message.hasOwnProperty("give_sounds")) { - if (!Array.isArray(message.give_sounds)) + if (message.give_sounds != null && $Object.hasOwnProperty.call(message, "give_sounds")) { + if (!$Array.isArray(message.give_sounds)) return "give_sounds: array expected"; for (var i = 0; i < message.give_sounds.length; ++i) { - var error = $root.CMsgQuestTheme.WeightedStringSet.verify(message.give_sounds[i]); + var error = $root.CMsgQuestTheme.WeightedStringSet.verify(message.give_sounds[i], _depth + 1); if (error) return "give_sounds." + error; } } - if (message.complete_sounds != null && message.hasOwnProperty("complete_sounds")) { - if (!Array.isArray(message.complete_sounds)) + if (message.complete_sounds != null && $Object.hasOwnProperty.call(message, "complete_sounds")) { + if (!$Array.isArray(message.complete_sounds)) return "complete_sounds: array expected"; for (var i = 0; i < message.complete_sounds.length; ++i) { - var error = $root.CMsgQuestTheme.WeightedStringSet.verify(message.complete_sounds[i]); + var error = $root.CMsgQuestTheme.WeightedStringSet.verify(message.complete_sounds[i], _depth + 1); if (error) return "complete_sounds." + error; } } - if (message.fully_complete_sounds != null && message.hasOwnProperty("fully_complete_sounds")) { - if (!Array.isArray(message.fully_complete_sounds)) + if (message.fully_complete_sounds != null && $Object.hasOwnProperty.call(message, "fully_complete_sounds")) { + if (!$Array.isArray(message.fully_complete_sounds)) return "fully_complete_sounds: array expected"; for (var i = 0; i < message.fully_complete_sounds.length; ++i) { - var error = $root.CMsgQuestTheme.WeightedStringSet.verify(message.fully_complete_sounds[i]); + var error = $root.CMsgQuestTheme.WeightedStringSet.verify(message.fully_complete_sounds[i], _depth + 1); if (error) return "fully_complete_sounds." + error; } } - if (message.reward_sound != null && message.hasOwnProperty("reward_sound")) + if (message.reward_sound != null && $Object.hasOwnProperty.call(message, "reward_sound")) if (!$util.isString(message.reward_sound)) return "reward_sound: string expected"; - if (message.discard_sound != null && message.hasOwnProperty("discard_sound")) + if (message.discard_sound != null && $Object.hasOwnProperty.call(message, "discard_sound")) if (!$util.isString(message.discard_sound)) return "discard_sound: string expected"; - if (message.reveal_sound != null && message.hasOwnProperty("reveal_sound")) + if (message.reveal_sound != null && $Object.hasOwnProperty.call(message, "reveal_sound")) if (!$util.isString(message.reveal_sound)) return "reveal_sound: string expected"; return null; @@ -12931,57 +16082,63 @@ * @param {Object.} object Plain object * @returns {CMsgQuestTheme} CMsgQuestTheme */ - CMsgQuestTheme.fromObject = function fromObject(object) { + CMsgQuestTheme.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestTheme) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestTheme: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestTheme(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgQuestTheme.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgQuestTheme.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } if (object.notification_res != null) - message.notification_res = String(object.notification_res); + message.notification_res = $String(object.notification_res); if (object.quest_item_res != null) - message.quest_item_res = String(object.quest_item_res); + message.quest_item_res = $String(object.quest_item_res); if (object.in_game_tracker_res != null) - message.in_game_tracker_res = String(object.in_game_tracker_res); + message.in_game_tracker_res = $String(object.in_game_tracker_res); if (object.give_sounds) { - if (!Array.isArray(object.give_sounds)) - throw TypeError(".CMsgQuestTheme.give_sounds: array expected"); - message.give_sounds = []; + if (!$Array.isArray(object.give_sounds)) + throw $TypeError(".CMsgQuestTheme.give_sounds: array expected"); + message.give_sounds = $Array(object.give_sounds.length); for (var i = 0; i < object.give_sounds.length; ++i) { - if (typeof object.give_sounds[i] !== "object") - throw TypeError(".CMsgQuestTheme.give_sounds: object expected"); - message.give_sounds[i] = $root.CMsgQuestTheme.WeightedStringSet.fromObject(object.give_sounds[i]); + if (!$util.isObject(object.give_sounds[i])) + throw $TypeError(".CMsgQuestTheme.give_sounds: object expected"); + message.give_sounds[i] = $root.CMsgQuestTheme.WeightedStringSet.fromObject(object.give_sounds[i], _depth + 1); } } if (object.complete_sounds) { - if (!Array.isArray(object.complete_sounds)) - throw TypeError(".CMsgQuestTheme.complete_sounds: array expected"); - message.complete_sounds = []; + if (!$Array.isArray(object.complete_sounds)) + throw $TypeError(".CMsgQuestTheme.complete_sounds: array expected"); + message.complete_sounds = $Array(object.complete_sounds.length); for (var i = 0; i < object.complete_sounds.length; ++i) { - if (typeof object.complete_sounds[i] !== "object") - throw TypeError(".CMsgQuestTheme.complete_sounds: object expected"); - message.complete_sounds[i] = $root.CMsgQuestTheme.WeightedStringSet.fromObject(object.complete_sounds[i]); + if (!$util.isObject(object.complete_sounds[i])) + throw $TypeError(".CMsgQuestTheme.complete_sounds: object expected"); + message.complete_sounds[i] = $root.CMsgQuestTheme.WeightedStringSet.fromObject(object.complete_sounds[i], _depth + 1); } } if (object.fully_complete_sounds) { - if (!Array.isArray(object.fully_complete_sounds)) - throw TypeError(".CMsgQuestTheme.fully_complete_sounds: array expected"); - message.fully_complete_sounds = []; + if (!$Array.isArray(object.fully_complete_sounds)) + throw $TypeError(".CMsgQuestTheme.fully_complete_sounds: array expected"); + message.fully_complete_sounds = $Array(object.fully_complete_sounds.length); for (var i = 0; i < object.fully_complete_sounds.length; ++i) { - if (typeof object.fully_complete_sounds[i] !== "object") - throw TypeError(".CMsgQuestTheme.fully_complete_sounds: object expected"); - message.fully_complete_sounds[i] = $root.CMsgQuestTheme.WeightedStringSet.fromObject(object.fully_complete_sounds[i]); + if (!$util.isObject(object.fully_complete_sounds[i])) + throw $TypeError(".CMsgQuestTheme.fully_complete_sounds: object expected"); + message.fully_complete_sounds[i] = $root.CMsgQuestTheme.WeightedStringSet.fromObject(object.fully_complete_sounds[i], _depth + 1); } } if (object.reward_sound != null) - message.reward_sound = String(object.reward_sound); + message.reward_sound = $String(object.reward_sound); if (object.discard_sound != null) - message.discard_sound = String(object.discard_sound); + message.discard_sound = $String(object.discard_sound); if (object.reveal_sound != null) - message.reveal_sound = String(object.reveal_sound); + message.reveal_sound = $String(object.reveal_sound); return message; }; @@ -12994,9 +16151,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgQuestTheme.toObject = function toObject(message, options) { + CMsgQuestTheme.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.give_sounds = []; @@ -13012,34 +16173,34 @@ object.discard_sound = ""; object.reveal_sound = ""; } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); - if (message.notification_res != null && message.hasOwnProperty("notification_res")) + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); + if (message.notification_res != null && $Object.hasOwnProperty.call(message, "notification_res")) object.notification_res = message.notification_res; - if (message.quest_item_res != null && message.hasOwnProperty("quest_item_res")) + if (message.quest_item_res != null && $Object.hasOwnProperty.call(message, "quest_item_res")) object.quest_item_res = message.quest_item_res; - if (message.in_game_tracker_res != null && message.hasOwnProperty("in_game_tracker_res")) + if (message.in_game_tracker_res != null && $Object.hasOwnProperty.call(message, "in_game_tracker_res")) object.in_game_tracker_res = message.in_game_tracker_res; if (message.give_sounds && message.give_sounds.length) { - object.give_sounds = []; + object.give_sounds = $Array(message.give_sounds.length); for (var j = 0; j < message.give_sounds.length; ++j) - object.give_sounds[j] = $root.CMsgQuestTheme.WeightedStringSet.toObject(message.give_sounds[j], options); + object.give_sounds[j] = $root.CMsgQuestTheme.WeightedStringSet.toObject(message.give_sounds[j], options, _depth + 1); } if (message.complete_sounds && message.complete_sounds.length) { - object.complete_sounds = []; + object.complete_sounds = $Array(message.complete_sounds.length); for (var j = 0; j < message.complete_sounds.length; ++j) - object.complete_sounds[j] = $root.CMsgQuestTheme.WeightedStringSet.toObject(message.complete_sounds[j], options); + object.complete_sounds[j] = $root.CMsgQuestTheme.WeightedStringSet.toObject(message.complete_sounds[j], options, _depth + 1); } if (message.fully_complete_sounds && message.fully_complete_sounds.length) { - object.fully_complete_sounds = []; + object.fully_complete_sounds = $Array(message.fully_complete_sounds.length); for (var j = 0; j < message.fully_complete_sounds.length; ++j) - object.fully_complete_sounds[j] = $root.CMsgQuestTheme.WeightedStringSet.toObject(message.fully_complete_sounds[j], options); + object.fully_complete_sounds[j] = $root.CMsgQuestTheme.WeightedStringSet.toObject(message.fully_complete_sounds[j], options, _depth + 1); } - if (message.reward_sound != null && message.hasOwnProperty("reward_sound")) + if (message.reward_sound != null && $Object.hasOwnProperty.call(message, "reward_sound")) object.reward_sound = message.reward_sound; - if (message.discard_sound != null && message.hasOwnProperty("discard_sound")) + if (message.discard_sound != null && $Object.hasOwnProperty.call(message, "discard_sound")) object.discard_sound = message.discard_sound; - if (message.reveal_sound != null && message.hasOwnProperty("reveal_sound")) + if (message.reveal_sound != null && $Object.hasOwnProperty.call(message, "reveal_sound")) object.reveal_sound = message.reveal_sound; return object; }; @@ -13051,34 +16212,61 @@ * @instance * @returns {Object.} JSON object */ - CMsgQuestTheme.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgQuestTheme.prototype.toJSON = function() { + return CMsgQuestTheme.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgQuestTheme + * @function getTypeUrl + * @memberof CMsgQuestTheme + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgQuestTheme.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestTheme"; }; CMsgQuestTheme.WeightedString = (function() { /** * Properties of a WeightedString. - * @memberof CMsgQuestTheme - * @interface IWeightedString + * @typedef {Object} CMsgQuestTheme.WeightedString.$Properties * @property {string|null} [string] WeightedString string * @property {number|null} [weight] WeightedString weight + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a WeightedString. + * @memberof CMsgQuestTheme + * @interface IWeightedString + * @augments CMsgQuestTheme.WeightedString.$Properties + * @deprecated Use CMsgQuestTheme.WeightedString.$Properties instead. + */ + + /** + * Shape of a WeightedString. + * @typedef {CMsgQuestTheme.WeightedString.$Properties} CMsgQuestTheme.WeightedString.$Shape */ /** * Constructs a new WeightedString. * @memberof CMsgQuestTheme * @classdesc Represents a WeightedString. - * @implements IWeightedString * @constructor - * @param {CMsgQuestTheme.IWeightedString=} [properties] Properties to set + * @param {CMsgQuestTheme.WeightedString.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function WeightedString(properties) { + var WeightedString = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * WeightedString string. @@ -13101,10 +16289,14 @@ * @function create * @memberof CMsgQuestTheme.WeightedString * @static - * @param {CMsgQuestTheme.IWeightedString=} [properties] Properties to set + * @param {CMsgQuestTheme.WeightedString.$Properties=} [properties] Properties to set * @returns {CMsgQuestTheme.WeightedString} WeightedString instance + * @type {{ + * (properties: CMsgQuestTheme.WeightedString.$Shape): CMsgQuestTheme.WeightedString & CMsgQuestTheme.WeightedString.$Shape; + * (properties?: CMsgQuestTheme.WeightedString.$Properties): CMsgQuestTheme.WeightedString; + * }} */ - WeightedString.create = function create(properties) { + WeightedString.create = function(properties) { return new WeightedString(properties); }; @@ -13113,17 +16305,24 @@ * @function encode * @memberof CMsgQuestTheme.WeightedString * @static - * @param {CMsgQuestTheme.IWeightedString} message WeightedString message or plain object to encode + * @param {CMsgQuestTheme.WeightedString.$Properties} message WeightedString message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WeightedString.encode = function encode(message, writer) { + WeightedString.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.string != null && Object.hasOwnProperty.call(message, "string")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.string != null && $Object.hasOwnProperty.call(message, "string")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.string); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) + if (message.weight != null && $Object.hasOwnProperty.call(message, "weight")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.weight); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13132,12 +16331,12 @@ * @function encodeDelimited * @memberof CMsgQuestTheme.WeightedString * @static - * @param {CMsgQuestTheme.IWeightedString} message WeightedString message or plain object to encode + * @param {CMsgQuestTheme.WeightedString.$Properties} message WeightedString message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WeightedString.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + WeightedString.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13147,28 +16346,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestTheme.WeightedString} WeightedString + * @returns {CMsgQuestTheme.WeightedString & CMsgQuestTheme.WeightedString.$Shape} WeightedString * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WeightedString.decode = function decode(reader, length) { + WeightedString.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestTheme.WeightedString(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestTheme.WeightedString(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.string = reader.string(); - break; - case 2: - message.weight = reader.uint32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.string = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.weight = reader.uint32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13178,11 +16397,11 @@ * @memberof CMsgQuestTheme.WeightedString * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestTheme.WeightedString} WeightedString + * @returns {CMsgQuestTheme.WeightedString & CMsgQuestTheme.WeightedString.$Shape} WeightedString * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WeightedString.decodeDelimited = function decodeDelimited(reader) { + WeightedString.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13196,13 +16415,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WeightedString.verify = function verify(message) { + WeightedString.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.string != null && message.hasOwnProperty("string")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.string != null && $Object.hasOwnProperty.call(message, "string")) if (!$util.isString(message.string)) return "string: string expected"; - if (message.weight != null && message.hasOwnProperty("weight")) + if (message.weight != null && $Object.hasOwnProperty.call(message, "weight")) if (!$util.isInteger(message.weight)) return "weight: integer expected"; return null; @@ -13216,12 +16439,18 @@ * @param {Object.} object Plain object * @returns {CMsgQuestTheme.WeightedString} WeightedString */ - WeightedString.fromObject = function fromObject(object) { + WeightedString.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestTheme.WeightedString) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestTheme.WeightedString: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestTheme.WeightedString(); if (object.string != null) - message.string = String(object.string); + message.string = $String(object.string); if (object.weight != null) message.weight = object.weight >>> 0; return message; @@ -13236,17 +16465,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WeightedString.toObject = function toObject(message, options) { + WeightedString.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.string = ""; object.weight = 0; } - if (message.string != null && message.hasOwnProperty("string")) + if (message.string != null && $Object.hasOwnProperty.call(message, "string")) object.string = message.string; - if (message.weight != null && message.hasOwnProperty("weight")) + if (message.weight != null && $Object.hasOwnProperty.call(message, "weight")) object.weight = message.weight; return object; }; @@ -13258,8 +16491,22 @@ * @instance * @returns {Object.} JSON object */ - WeightedString.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + WeightedString.prototype.toJSON = function() { + return WeightedString.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for WeightedString + * @function getTypeUrl + * @memberof CMsgQuestTheme.WeightedString + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + WeightedString.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestTheme.WeightedString"; }; return WeightedString; @@ -13267,32 +16514,45 @@ CMsgQuestTheme.WeightedStringSet = (function() { + /** + * Properties of a WeightedStringSet. + * @typedef {Object} CMsgQuestTheme.WeightedStringSet.$Properties + * @property {Array.|null} [weighted_strings] WeightedStringSet weighted_strings + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a WeightedStringSet. * @memberof CMsgQuestTheme * @interface IWeightedStringSet - * @property {Array.|null} [weighted_strings] WeightedStringSet weighted_strings + * @augments CMsgQuestTheme.WeightedStringSet.$Properties + * @deprecated Use CMsgQuestTheme.WeightedStringSet.$Properties instead. + */ + + /** + * Shape of a WeightedStringSet. + * @typedef {CMsgQuestTheme.WeightedStringSet.$Properties} CMsgQuestTheme.WeightedStringSet.$Shape */ /** * Constructs a new WeightedStringSet. * @memberof CMsgQuestTheme * @classdesc Represents a WeightedStringSet. - * @implements IWeightedStringSet * @constructor - * @param {CMsgQuestTheme.IWeightedStringSet=} [properties] Properties to set + * @param {CMsgQuestTheme.WeightedStringSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function WeightedStringSet(properties) { + var WeightedStringSet = function (properties) { this.weighted_strings = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * WeightedStringSet weighted_strings. - * @member {Array.} weighted_strings + * @member {Array.} weighted_strings * @memberof CMsgQuestTheme.WeightedStringSet * @instance */ @@ -13303,10 +16563,14 @@ * @function create * @memberof CMsgQuestTheme.WeightedStringSet * @static - * @param {CMsgQuestTheme.IWeightedStringSet=} [properties] Properties to set + * @param {CMsgQuestTheme.WeightedStringSet.$Properties=} [properties] Properties to set * @returns {CMsgQuestTheme.WeightedStringSet} WeightedStringSet instance + * @type {{ + * (properties: CMsgQuestTheme.WeightedStringSet.$Shape): CMsgQuestTheme.WeightedStringSet & CMsgQuestTheme.WeightedStringSet.$Shape; + * (properties?: CMsgQuestTheme.WeightedStringSet.$Properties): CMsgQuestTheme.WeightedStringSet; + * }} */ - WeightedStringSet.create = function create(properties) { + WeightedStringSet.create = function(properties) { return new WeightedStringSet(properties); }; @@ -13315,16 +16579,23 @@ * @function encode * @memberof CMsgQuestTheme.WeightedStringSet * @static - * @param {CMsgQuestTheme.IWeightedStringSet} message WeightedStringSet message or plain object to encode + * @param {CMsgQuestTheme.WeightedStringSet.$Properties} message WeightedStringSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WeightedStringSet.encode = function encode(message, writer) { + WeightedStringSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.weighted_strings != null && message.weighted_strings.length) for (var i = 0; i < message.weighted_strings.length; ++i) - $root.CMsgQuestTheme.WeightedString.encode(message.weighted_strings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.CMsgQuestTheme.WeightedString.encode(message.weighted_strings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13333,12 +16604,12 @@ * @function encodeDelimited * @memberof CMsgQuestTheme.WeightedStringSet * @static - * @param {CMsgQuestTheme.IWeightedStringSet} message WeightedStringSet message or plain object to encode + * @param {CMsgQuestTheme.WeightedStringSet.$Properties} message WeightedStringSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WeightedStringSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + WeightedStringSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13348,27 +16619,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestTheme.WeightedStringSet} WeightedStringSet + * @returns {CMsgQuestTheme.WeightedStringSet & CMsgQuestTheme.WeightedStringSet.$Shape} WeightedStringSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WeightedStringSet.decode = function decode(reader, length) { + WeightedStringSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestTheme.WeightedStringSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestTheme.WeightedStringSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.weighted_strings && message.weighted_strings.length)) - message.weighted_strings = []; - message.weighted_strings.push($root.CMsgQuestTheme.WeightedString.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.weighted_strings && message.weighted_strings.length)) + message.weighted_strings = []; + message.weighted_strings.push($root.CMsgQuestTheme.WeightedString.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -13378,11 +16666,11 @@ * @memberof CMsgQuestTheme.WeightedStringSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestTheme.WeightedStringSet} WeightedStringSet + * @returns {CMsgQuestTheme.WeightedStringSet & CMsgQuestTheme.WeightedStringSet.$Shape} WeightedStringSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WeightedStringSet.decodeDelimited = function decodeDelimited(reader) { + WeightedStringSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13396,14 +16684,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WeightedStringSet.verify = function verify(message) { + WeightedStringSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.weighted_strings != null && message.hasOwnProperty("weighted_strings")) { - if (!Array.isArray(message.weighted_strings)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.weighted_strings != null && $Object.hasOwnProperty.call(message, "weighted_strings")) { + if (!$Array.isArray(message.weighted_strings)) return "weighted_strings: array expected"; for (var i = 0; i < message.weighted_strings.length; ++i) { - var error = $root.CMsgQuestTheme.WeightedString.verify(message.weighted_strings[i]); + var error = $root.CMsgQuestTheme.WeightedString.verify(message.weighted_strings[i], _depth + 1); if (error) return "weighted_strings." + error; } @@ -13419,18 +16711,24 @@ * @param {Object.} object Plain object * @returns {CMsgQuestTheme.WeightedStringSet} WeightedStringSet */ - WeightedStringSet.fromObject = function fromObject(object) { + WeightedStringSet.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestTheme.WeightedStringSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestTheme.WeightedStringSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestTheme.WeightedStringSet(); if (object.weighted_strings) { - if (!Array.isArray(object.weighted_strings)) - throw TypeError(".CMsgQuestTheme.WeightedStringSet.weighted_strings: array expected"); - message.weighted_strings = []; + if (!$Array.isArray(object.weighted_strings)) + throw $TypeError(".CMsgQuestTheme.WeightedStringSet.weighted_strings: array expected"); + message.weighted_strings = $Array(object.weighted_strings.length); for (var i = 0; i < object.weighted_strings.length; ++i) { - if (typeof object.weighted_strings[i] !== "object") - throw TypeError(".CMsgQuestTheme.WeightedStringSet.weighted_strings: object expected"); - message.weighted_strings[i] = $root.CMsgQuestTheme.WeightedString.fromObject(object.weighted_strings[i]); + if (!$util.isObject(object.weighted_strings[i])) + throw $TypeError(".CMsgQuestTheme.WeightedStringSet.weighted_strings: object expected"); + message.weighted_strings[i] = $root.CMsgQuestTheme.WeightedString.fromObject(object.weighted_strings[i], _depth + 1); } } return message; @@ -13445,16 +16743,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WeightedStringSet.toObject = function toObject(message, options) { + WeightedStringSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.weighted_strings = []; if (message.weighted_strings && message.weighted_strings.length) { - object.weighted_strings = []; + object.weighted_strings = $Array(message.weighted_strings.length); for (var j = 0; j < message.weighted_strings.length; ++j) - object.weighted_strings[j] = $root.CMsgQuestTheme.WeightedString.toObject(message.weighted_strings[j], options); + object.weighted_strings[j] = $root.CMsgQuestTheme.WeightedString.toObject(message.weighted_strings[j], options, _depth + 1); } return object; }; @@ -13466,8 +16768,22 @@ * @instance * @returns {Object.} JSON object */ - WeightedStringSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + WeightedStringSet.prototype.toJSON = function() { + return WeightedStringSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for WeightedStringSet + * @function getTypeUrl + * @memberof CMsgQuestTheme.WeightedStringSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + WeightedStringSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestTheme.WeightedStringSet"; }; return WeightedStringSet; @@ -13478,28 +16794,45 @@ $root.CMsgQuestMapNodeCondition_NodeState = (function() { + /** + * Properties of a CMsgQuestMapNodeCondition_NodeState. + * @typedef {Object} CMsgQuestMapNodeCondition_NodeState.$Properties + * @property {number|null} [bonus_objectives_required] CMsgQuestMapNodeCondition_NodeState bonus_objectives_required + * @property {CMsgProtoDefID.$Properties} target_node_defid CMsgQuestMapNodeCondition_NodeState target_node_defid + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgQuestMapNodeCondition_NodeState. * @exports ICMsgQuestMapNodeCondition_NodeState * @interface ICMsgQuestMapNodeCondition_NodeState - * @property {number|null} [bonus_objectives_required] CMsgQuestMapNodeCondition_NodeState bonus_objectives_required - * @property {ICMsgProtoDefID} target_node_defid CMsgQuestMapNodeCondition_NodeState target_node_defid + * @augments CMsgQuestMapNodeCondition_NodeState.$Properties + * @deprecated Use CMsgQuestMapNodeCondition_NodeState.$Properties instead. + */ + + /** + * Shape of a CMsgQuestMapNodeCondition_NodeState. + * @typedef {{ + * bonus_objectives_required?: number|null; + * target_node_defid: CMsgProtoDefID.$Shape; + * $unknowns?: Array.; + * }} CMsgQuestMapNodeCondition_NodeState.$Shape */ /** * Constructs a new CMsgQuestMapNodeCondition_NodeState. * @exports CMsgQuestMapNodeCondition_NodeState * @classdesc Represents a CMsgQuestMapNodeCondition_NodeState. - * @implements ICMsgQuestMapNodeCondition_NodeState * @constructor - * @param {ICMsgQuestMapNodeCondition_NodeState=} [properties] Properties to set + * @param {CMsgQuestMapNodeCondition_NodeState.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgQuestMapNodeCondition_NodeState(properties) { + var CMsgQuestMapNodeCondition_NodeState = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgQuestMapNodeCondition_NodeState bonus_objectives_required. @@ -13511,7 +16844,7 @@ /** * CMsgQuestMapNodeCondition_NodeState target_node_defid. - * @member {ICMsgProtoDefID} target_node_defid + * @member {CMsgProtoDefID.$Properties} target_node_defid * @memberof CMsgQuestMapNodeCondition_NodeState * @instance */ @@ -13522,10 +16855,14 @@ * @function create * @memberof CMsgQuestMapNodeCondition_NodeState * @static - * @param {ICMsgQuestMapNodeCondition_NodeState=} [properties] Properties to set + * @param {CMsgQuestMapNodeCondition_NodeState.$Properties=} [properties] Properties to set * @returns {CMsgQuestMapNodeCondition_NodeState} CMsgQuestMapNodeCondition_NodeState instance + * @type {{ + * (properties: CMsgQuestMapNodeCondition_NodeState.$Shape): CMsgQuestMapNodeCondition_NodeState & CMsgQuestMapNodeCondition_NodeState.$Shape; + * (properties?: CMsgQuestMapNodeCondition_NodeState.$Properties): CMsgQuestMapNodeCondition_NodeState; + * }} */ - CMsgQuestMapNodeCondition_NodeState.create = function create(properties) { + CMsgQuestMapNodeCondition_NodeState.create = function(properties) { return new CMsgQuestMapNodeCondition_NodeState(properties); }; @@ -13534,16 +16871,23 @@ * @function encode * @memberof CMsgQuestMapNodeCondition_NodeState * @static - * @param {ICMsgQuestMapNodeCondition_NodeState} message CMsgQuestMapNodeCondition_NodeState message or plain object to encode + * @param {CMsgQuestMapNodeCondition_NodeState.$Properties} message CMsgQuestMapNodeCondition_NodeState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapNodeCondition_NodeState.encode = function encode(message, writer) { + CMsgQuestMapNodeCondition_NodeState.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.bonus_objectives_required != null && Object.hasOwnProperty.call(message, "bonus_objectives_required")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.bonus_objectives_required != null && $Object.hasOwnProperty.call(message, "bonus_objectives_required")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.bonus_objectives_required); - $root.CMsgProtoDefID.encode(message.target_node_defid, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgProtoDefID.encode(message.target_node_defid, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13552,12 +16896,12 @@ * @function encodeDelimited * @memberof CMsgQuestMapNodeCondition_NodeState * @static - * @param {ICMsgQuestMapNodeCondition_NodeState} message CMsgQuestMapNodeCondition_NodeState message or plain object to encode + * @param {CMsgQuestMapNodeCondition_NodeState.$Properties} message CMsgQuestMapNodeCondition_NodeState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapNodeCondition_NodeState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgQuestMapNodeCondition_NodeState.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13567,29 +16911,49 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestMapNodeCondition_NodeState} CMsgQuestMapNodeCondition_NodeState + * @returns {CMsgQuestMapNodeCondition_NodeState & CMsgQuestMapNodeCondition_NodeState.$Shape} CMsgQuestMapNodeCondition_NodeState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapNodeCondition_NodeState.decode = function decode(reader, length) { + CMsgQuestMapNodeCondition_NodeState.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestMapNodeCondition_NodeState(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestMapNodeCondition_NodeState(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bonus_objectives_required = reader.uint32(); - break; - case 2: - message.target_node_defid = $root.CMsgProtoDefID.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.bonus_objectives_required = reader.uint32(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.target_node_defid = $root.CMsgProtoDefID.decode(reader, reader.uint32(), $undefined, _depth + 1, message.target_node_defid); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("target_node_defid")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "target_node_defid")) throw $util.ProtocolError("missing required 'target_node_defid'", { instance: message }); return message; }; @@ -13600,11 +16964,11 @@ * @memberof CMsgQuestMapNodeCondition_NodeState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestMapNodeCondition_NodeState} CMsgQuestMapNodeCondition_NodeState + * @returns {CMsgQuestMapNodeCondition_NodeState & CMsgQuestMapNodeCondition_NodeState.$Shape} CMsgQuestMapNodeCondition_NodeState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapNodeCondition_NodeState.decodeDelimited = function decodeDelimited(reader) { + CMsgQuestMapNodeCondition_NodeState.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13618,14 +16982,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgQuestMapNodeCondition_NodeState.verify = function verify(message) { + CMsgQuestMapNodeCondition_NodeState.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bonus_objectives_required != null && message.hasOwnProperty("bonus_objectives_required")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.bonus_objectives_required != null && $Object.hasOwnProperty.call(message, "bonus_objectives_required")) if (!$util.isInteger(message.bonus_objectives_required)) return "bonus_objectives_required: integer expected"; { - var error = $root.CMsgProtoDefID.verify(message.target_node_defid); + var error = $root.CMsgProtoDefID.verify(message.target_node_defid, _depth + 1); if (error) return "target_node_defid." + error; } @@ -13640,16 +17008,22 @@ * @param {Object.} object Plain object * @returns {CMsgQuestMapNodeCondition_NodeState} CMsgQuestMapNodeCondition_NodeState */ - CMsgQuestMapNodeCondition_NodeState.fromObject = function fromObject(object) { + CMsgQuestMapNodeCondition_NodeState.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestMapNodeCondition_NodeState) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestMapNodeCondition_NodeState: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestMapNodeCondition_NodeState(); if (object.bonus_objectives_required != null) message.bonus_objectives_required = object.bonus_objectives_required >>> 0; if (object.target_node_defid != null) { - if (typeof object.target_node_defid !== "object") - throw TypeError(".CMsgQuestMapNodeCondition_NodeState.target_node_defid: object expected"); - message.target_node_defid = $root.CMsgProtoDefID.fromObject(object.target_node_defid); + if (!$util.isObject(object.target_node_defid)) + throw $TypeError(".CMsgQuestMapNodeCondition_NodeState.target_node_defid: object expected"); + message.target_node_defid = $root.CMsgProtoDefID.fromObject(object.target_node_defid, _depth + 1); } return message; }; @@ -13663,18 +17037,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgQuestMapNodeCondition_NodeState.toObject = function toObject(message, options) { + CMsgQuestMapNodeCondition_NodeState.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.bonus_objectives_required = 0; object.target_node_defid = null; } - if (message.bonus_objectives_required != null && message.hasOwnProperty("bonus_objectives_required")) + if (message.bonus_objectives_required != null && $Object.hasOwnProperty.call(message, "bonus_objectives_required")) object.bonus_objectives_required = message.bonus_objectives_required; - if (message.target_node_defid != null && message.hasOwnProperty("target_node_defid")) - object.target_node_defid = $root.CMsgProtoDefID.toObject(message.target_node_defid, options); + if (message.target_node_defid != null && $Object.hasOwnProperty.call(message, "target_node_defid")) + object.target_node_defid = $root.CMsgProtoDefID.toObject(message.target_node_defid, options, _depth + 1); return object; }; @@ -13685,8 +17063,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgQuestMapNodeCondition_NodeState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgQuestMapNodeCondition_NodeState.prototype.toJSON = function() { + return CMsgQuestMapNodeCondition_NodeState.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgQuestMapNodeCondition_NodeState + * @function getTypeUrl + * @memberof CMsgQuestMapNodeCondition_NodeState + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgQuestMapNodeCondition_NodeState.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestMapNodeCondition_NodeState"; }; return CMsgQuestMapNodeCondition_NodeState; @@ -13694,29 +17086,46 @@ $root.CMsgQuestMapNodeCondition_Logic = (function() { + /** + * Properties of a CMsgQuestMapNodeCondition_Logic. + * @typedef {Object} CMsgQuestMapNodeCondition_Logic.$Properties + * @property {LogicalOperation} operation CMsgQuestMapNodeCondition_Logic operation + * @property {Array.|null} [sub_conditions] CMsgQuestMapNodeCondition_Logic sub_conditions + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgQuestMapNodeCondition_Logic. * @exports ICMsgQuestMapNodeCondition_Logic * @interface ICMsgQuestMapNodeCondition_Logic - * @property {LogicalOperation} operation CMsgQuestMapNodeCondition_Logic operation - * @property {Array.|null} [sub_conditions] CMsgQuestMapNodeCondition_Logic sub_conditions + * @augments CMsgQuestMapNodeCondition_Logic.$Properties + * @deprecated Use CMsgQuestMapNodeCondition_Logic.$Properties instead. + */ + + /** + * Shape of a CMsgQuestMapNodeCondition_Logic. + * @typedef {{ + * operation: LogicalOperation; + * sub_conditions?: Array.|null; + * $unknowns?: Array.; + * }} CMsgQuestMapNodeCondition_Logic.$Shape */ /** * Constructs a new CMsgQuestMapNodeCondition_Logic. * @exports CMsgQuestMapNodeCondition_Logic * @classdesc Represents a CMsgQuestMapNodeCondition_Logic. - * @implements ICMsgQuestMapNodeCondition_Logic * @constructor - * @param {ICMsgQuestMapNodeCondition_Logic=} [properties] Properties to set + * @param {CMsgQuestMapNodeCondition_Logic.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgQuestMapNodeCondition_Logic(properties) { + var CMsgQuestMapNodeCondition_Logic = function (properties) { this.sub_conditions = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgQuestMapNodeCondition_Logic operation. @@ -13728,7 +17137,7 @@ /** * CMsgQuestMapNodeCondition_Logic sub_conditions. - * @member {Array.} sub_conditions + * @member {Array.} sub_conditions * @memberof CMsgQuestMapNodeCondition_Logic * @instance */ @@ -13739,10 +17148,14 @@ * @function create * @memberof CMsgQuestMapNodeCondition_Logic * @static - * @param {ICMsgQuestMapNodeCondition_Logic=} [properties] Properties to set + * @param {CMsgQuestMapNodeCondition_Logic.$Properties=} [properties] Properties to set * @returns {CMsgQuestMapNodeCondition_Logic} CMsgQuestMapNodeCondition_Logic instance + * @type {{ + * (properties: CMsgQuestMapNodeCondition_Logic.$Shape): CMsgQuestMapNodeCondition_Logic & CMsgQuestMapNodeCondition_Logic.$Shape; + * (properties?: CMsgQuestMapNodeCondition_Logic.$Properties): CMsgQuestMapNodeCondition_Logic; + * }} */ - CMsgQuestMapNodeCondition_Logic.create = function create(properties) { + CMsgQuestMapNodeCondition_Logic.create = function(properties) { return new CMsgQuestMapNodeCondition_Logic(properties); }; @@ -13751,17 +17164,24 @@ * @function encode * @memberof CMsgQuestMapNodeCondition_Logic * @static - * @param {ICMsgQuestMapNodeCondition_Logic} message CMsgQuestMapNodeCondition_Logic message or plain object to encode + * @param {CMsgQuestMapNodeCondition_Logic.$Properties} message CMsgQuestMapNodeCondition_Logic message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapNodeCondition_Logic.encode = function encode(message, writer) { + CMsgQuestMapNodeCondition_Logic.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); if (message.sub_conditions != null && message.sub_conditions.length) for (var i = 0; i < message.sub_conditions.length; ++i) - $root.CMsgQuestMapNodeCondition.encode(message.sub_conditions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.CMsgQuestMapNodeCondition.encode(message.sub_conditions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -13770,12 +17190,12 @@ * @function encodeDelimited * @memberof CMsgQuestMapNodeCondition_Logic * @static - * @param {ICMsgQuestMapNodeCondition_Logic} message CMsgQuestMapNodeCondition_Logic message or plain object to encode + * @param {CMsgQuestMapNodeCondition_Logic.$Properties} message CMsgQuestMapNodeCondition_Logic message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapNodeCondition_Logic.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgQuestMapNodeCondition_Logic.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -13785,31 +17205,57 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestMapNodeCondition_Logic} CMsgQuestMapNodeCondition_Logic + * @returns {CMsgQuestMapNodeCondition_Logic & CMsgQuestMapNodeCondition_Logic.$Shape} CMsgQuestMapNodeCondition_Logic * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapNodeCondition_Logic.decode = function decode(reader, length) { + CMsgQuestMapNodeCondition_Logic.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestMapNodeCondition_Logic(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestMapNodeCondition_Logic(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.operation = reader.int32(); - break; - case 2: - if (!(message.sub_conditions && message.sub_conditions.length)) - message.sub_conditions = []; - message.sub_conditions.push($root.CMsgQuestMapNodeCondition.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.LogicalOperation[value] !== $undefined) + message.operation = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.sub_conditions && message.sub_conditions.length)) + message.sub_conditions = []; + message.sub_conditions.push($root.CMsgQuestMapNodeCondition.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("operation")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "operation")) throw $util.ProtocolError("missing required 'operation'", { instance: message }); return message; }; @@ -13820,11 +17266,11 @@ * @memberof CMsgQuestMapNodeCondition_Logic * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestMapNodeCondition_Logic} CMsgQuestMapNodeCondition_Logic + * @returns {CMsgQuestMapNodeCondition_Logic & CMsgQuestMapNodeCondition_Logic.$Shape} CMsgQuestMapNodeCondition_Logic * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapNodeCondition_Logic.decodeDelimited = function decodeDelimited(reader) { + CMsgQuestMapNodeCondition_Logic.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -13838,9 +17284,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgQuestMapNodeCondition_Logic.verify = function verify(message) { + CMsgQuestMapNodeCondition_Logic.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; switch (message.operation) { default: return "operation: enum value expected"; @@ -13849,11 +17299,11 @@ case 2: break; } - if (message.sub_conditions != null && message.hasOwnProperty("sub_conditions")) { - if (!Array.isArray(message.sub_conditions)) + if (message.sub_conditions != null && $Object.hasOwnProperty.call(message, "sub_conditions")) { + if (!$Array.isArray(message.sub_conditions)) return "sub_conditions: array expected"; for (var i = 0; i < message.sub_conditions.length; ++i) { - var error = $root.CMsgQuestMapNodeCondition.verify(message.sub_conditions[i]); + var error = $root.CMsgQuestMapNodeCondition.verify(message.sub_conditions[i], _depth + 1); if (error) return "sub_conditions." + error; } @@ -13869,9 +17319,15 @@ * @param {Object.} object Plain object * @returns {CMsgQuestMapNodeCondition_Logic} CMsgQuestMapNodeCondition_Logic */ - CMsgQuestMapNodeCondition_Logic.fromObject = function fromObject(object) { + CMsgQuestMapNodeCondition_Logic.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestMapNodeCondition_Logic) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestMapNodeCondition_Logic: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestMapNodeCondition_Logic(); switch (object.operation) { case "AND": @@ -13886,15 +17342,16 @@ case 2: message.operation = 2; break; + default: } if (object.sub_conditions) { - if (!Array.isArray(object.sub_conditions)) - throw TypeError(".CMsgQuestMapNodeCondition_Logic.sub_conditions: array expected"); - message.sub_conditions = []; + if (!$Array.isArray(object.sub_conditions)) + throw $TypeError(".CMsgQuestMapNodeCondition_Logic.sub_conditions: array expected"); + message.sub_conditions = $Array(object.sub_conditions.length); for (var i = 0; i < object.sub_conditions.length; ++i) { - if (typeof object.sub_conditions[i] !== "object") - throw TypeError(".CMsgQuestMapNodeCondition_Logic.sub_conditions: object expected"); - message.sub_conditions[i] = $root.CMsgQuestMapNodeCondition.fromObject(object.sub_conditions[i]); + if (!$util.isObject(object.sub_conditions[i])) + throw $TypeError(".CMsgQuestMapNodeCondition_Logic.sub_conditions: object expected"); + message.sub_conditions[i] = $root.CMsgQuestMapNodeCondition.fromObject(object.sub_conditions[i], _depth + 1); } } return message; @@ -13909,20 +17366,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgQuestMapNodeCondition_Logic.toObject = function toObject(message, options) { + CMsgQuestMapNodeCondition_Logic.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.sub_conditions = []; if (options.defaults) - object.operation = options.enums === String ? "AND" : 0; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.LogicalOperation[message.operation] : message.operation; + object.operation = options.enums === $String ? "AND" : 0; + if (message.operation != null && $Object.hasOwnProperty.call(message, "operation")) + object.operation = options.enums === $String ? $root.LogicalOperation[message.operation] === $undefined ? message.operation : $root.LogicalOperation[message.operation] : message.operation; if (message.sub_conditions && message.sub_conditions.length) { - object.sub_conditions = []; + object.sub_conditions = $Array(message.sub_conditions.length); for (var j = 0; j < message.sub_conditions.length; ++j) - object.sub_conditions[j] = $root.CMsgQuestMapNodeCondition.toObject(message.sub_conditions[j], options); + object.sub_conditions[j] = $root.CMsgQuestMapNodeCondition.toObject(message.sub_conditions[j], options, _depth + 1); } return object; }; @@ -13934,8 +17395,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgQuestMapNodeCondition_Logic.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgQuestMapNodeCondition_Logic.prototype.toJSON = function() { + return CMsgQuestMapNodeCondition_Logic.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgQuestMapNodeCondition_Logic + * @function getTypeUrl + * @memberof CMsgQuestMapNodeCondition_Logic + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgQuestMapNodeCondition_Logic.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestMapNodeCondition_Logic"; }; return CMsgQuestMapNodeCondition_Logic; @@ -13943,32 +17418,52 @@ $root.CMsgQuestMapNodeCondition = (function() { + /** + * Properties of a CMsgQuestMapNodeCondition. + * @typedef {Object} CMsgQuestMapNodeCondition.$Properties + * @property {CMsgQuestMapNodeCondition_NodeState.$Properties|null} [node_state] CMsgQuestMapNodeCondition node_state + * @property {CMsgQuestMapNodeCondition_Logic.$Properties|null} [logical] CMsgQuestMapNodeCondition logical + * @property {"node_state"|"logical"} [operation] CMsgQuestMapNodeCondition operation + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgQuestMapNodeCondition. * @exports ICMsgQuestMapNodeCondition * @interface ICMsgQuestMapNodeCondition - * @property {ICMsgQuestMapNodeCondition_NodeState|null} [node_state] CMsgQuestMapNodeCondition node_state - * @property {ICMsgQuestMapNodeCondition_Logic|null} [logical] CMsgQuestMapNodeCondition logical + * @augments CMsgQuestMapNodeCondition.$Properties + * @deprecated Use CMsgQuestMapNodeCondition.$Properties instead. + */ + + /** + * Narrowed shape of a CMsgQuestMapNodeCondition. + * @typedef {{ + * node_state?: CMsgQuestMapNodeCondition_NodeState.$Shape|null; + * logical?: CMsgQuestMapNodeCondition_Logic.$Shape|null; + * $unknowns?: Array.; + * } & ( + * ({ operation?: undefined; node_state?: null; logical?: null }|{ operation?: "node_state"; node_state: CMsgQuestMapNodeCondition_NodeState.$Shape; logical?: null }|{ operation?: "logical"; node_state?: null; logical: CMsgQuestMapNodeCondition_Logic.$Shape }) + * )} CMsgQuestMapNodeCondition.$Shape */ /** * Constructs a new CMsgQuestMapNodeCondition. * @exports CMsgQuestMapNodeCondition * @classdesc Represents a CMsgQuestMapNodeCondition. - * @implements ICMsgQuestMapNodeCondition * @constructor - * @param {ICMsgQuestMapNodeCondition=} [properties] Properties to set + * @param {CMsgQuestMapNodeCondition.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgQuestMapNodeCondition(properties) { + var CMsgQuestMapNodeCondition = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgQuestMapNodeCondition node_state. - * @member {ICMsgQuestMapNodeCondition_NodeState|null|undefined} node_state + * @member {CMsgQuestMapNodeCondition_NodeState.$Properties|null|undefined} node_state * @memberof CMsgQuestMapNodeCondition * @instance */ @@ -13976,7 +17471,7 @@ /** * CMsgQuestMapNodeCondition logical. - * @member {ICMsgQuestMapNodeCondition_Logic|null|undefined} logical + * @member {CMsgQuestMapNodeCondition_Logic.$Properties|null|undefined} logical * @memberof CMsgQuestMapNodeCondition * @instance */ @@ -13991,7 +17486,7 @@ * @memberof CMsgQuestMapNodeCondition * @instance */ - Object.defineProperty(CMsgQuestMapNodeCondition.prototype, "operation", { + $Object.defineProperty(CMsgQuestMapNodeCondition.prototype, "operation", { get: $util.oneOfGetter($oneOfFields = ["node_state", "logical"]), set: $util.oneOfSetter($oneOfFields) }); @@ -14001,10 +17496,14 @@ * @function create * @memberof CMsgQuestMapNodeCondition * @static - * @param {ICMsgQuestMapNodeCondition=} [properties] Properties to set + * @param {CMsgQuestMapNodeCondition.$Properties=} [properties] Properties to set * @returns {CMsgQuestMapNodeCondition} CMsgQuestMapNodeCondition instance + * @type {{ + * (properties: CMsgQuestMapNodeCondition.$Shape): CMsgQuestMapNodeCondition & CMsgQuestMapNodeCondition.$Shape; + * (properties?: CMsgQuestMapNodeCondition.$Properties): CMsgQuestMapNodeCondition; + * }} */ - CMsgQuestMapNodeCondition.create = function create(properties) { + CMsgQuestMapNodeCondition.create = function(properties) { return new CMsgQuestMapNodeCondition(properties); }; @@ -14013,17 +17512,24 @@ * @function encode * @memberof CMsgQuestMapNodeCondition * @static - * @param {ICMsgQuestMapNodeCondition} message CMsgQuestMapNodeCondition message or plain object to encode + * @param {CMsgQuestMapNodeCondition.$Properties} message CMsgQuestMapNodeCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapNodeCondition.encode = function encode(message, writer) { + CMsgQuestMapNodeCondition.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.node_state != null && Object.hasOwnProperty.call(message, "node_state")) - $root.CMsgQuestMapNodeCondition_NodeState.encode(message.node_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.logical != null && Object.hasOwnProperty.call(message, "logical")) - $root.CMsgQuestMapNodeCondition_Logic.encode(message.logical, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.node_state != null && $Object.hasOwnProperty.call(message, "node_state")) + $root.CMsgQuestMapNodeCondition_NodeState.encode(message.node_state, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.logical != null && $Object.hasOwnProperty.call(message, "logical")) + $root.CMsgQuestMapNodeCondition_Logic.encode(message.logical, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14032,12 +17538,12 @@ * @function encodeDelimited * @memberof CMsgQuestMapNodeCondition * @static - * @param {ICMsgQuestMapNodeCondition} message CMsgQuestMapNodeCondition message or plain object to encode + * @param {CMsgQuestMapNodeCondition.$Properties} message CMsgQuestMapNodeCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgQuestMapNodeCondition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgQuestMapNodeCondition.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14047,28 +17553,50 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgQuestMapNodeCondition} CMsgQuestMapNodeCondition + * @returns {CMsgQuestMapNodeCondition & CMsgQuestMapNodeCondition.$Shape} CMsgQuestMapNodeCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapNodeCondition.decode = function decode(reader, length) { + CMsgQuestMapNodeCondition.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgQuestMapNodeCondition(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgQuestMapNodeCondition(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.node_state = $root.CMsgQuestMapNodeCondition_NodeState.decode(reader, reader.uint32()); - break; - case 2: - message.logical = $root.CMsgQuestMapNodeCondition_Logic.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.node_state = $root.CMsgQuestMapNodeCondition_NodeState.decode(reader, reader.uint32(), $undefined, _depth + 1, message.node_state); + message.operation = "node_state"; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.logical = $root.CMsgQuestMapNodeCondition_Logic.decode(reader, reader.uint32(), $undefined, _depth + 1, message.logical); + message.operation = "logical"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14078,11 +17606,11 @@ * @memberof CMsgQuestMapNodeCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgQuestMapNodeCondition} CMsgQuestMapNodeCondition + * @returns {CMsgQuestMapNodeCondition & CMsgQuestMapNodeCondition.$Shape} CMsgQuestMapNodeCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgQuestMapNodeCondition.decodeDelimited = function decodeDelimited(reader) { + CMsgQuestMapNodeCondition.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14096,24 +17624,28 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgQuestMapNodeCondition.verify = function verify(message) { + CMsgQuestMapNodeCondition.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; var properties = {}; - if (message.node_state != null && message.hasOwnProperty("node_state")) { + if (message.node_state != null && $Object.hasOwnProperty.call(message, "node_state")) { properties.operation = 1; { - var error = $root.CMsgQuestMapNodeCondition_NodeState.verify(message.node_state); + var error = $root.CMsgQuestMapNodeCondition_NodeState.verify(message.node_state, _depth + 1); if (error) return "node_state." + error; } } - if (message.logical != null && message.hasOwnProperty("logical")) { + if (message.logical != null && $Object.hasOwnProperty.call(message, "logical")) { if (properties.operation === 1) return "operation: multiple values"; properties.operation = 1; { - var error = $root.CMsgQuestMapNodeCondition_Logic.verify(message.logical); + var error = $root.CMsgQuestMapNodeCondition_Logic.verify(message.logical, _depth + 1); if (error) return "logical." + error; } @@ -14129,19 +17661,25 @@ * @param {Object.} object Plain object * @returns {CMsgQuestMapNodeCondition} CMsgQuestMapNodeCondition */ - CMsgQuestMapNodeCondition.fromObject = function fromObject(object) { + CMsgQuestMapNodeCondition.fromObject = function (object, _depth) { if (object instanceof $root.CMsgQuestMapNodeCondition) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgQuestMapNodeCondition: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgQuestMapNodeCondition(); if (object.node_state != null) { - if (typeof object.node_state !== "object") - throw TypeError(".CMsgQuestMapNodeCondition.node_state: object expected"); - message.node_state = $root.CMsgQuestMapNodeCondition_NodeState.fromObject(object.node_state); + if (!$util.isObject(object.node_state)) + throw $TypeError(".CMsgQuestMapNodeCondition.node_state: object expected"); + message.node_state = $root.CMsgQuestMapNodeCondition_NodeState.fromObject(object.node_state, _depth + 1); } if (object.logical != null) { - if (typeof object.logical !== "object") - throw TypeError(".CMsgQuestMapNodeCondition.logical: object expected"); - message.logical = $root.CMsgQuestMapNodeCondition_Logic.fromObject(object.logical); + if (!$util.isObject(object.logical)) + throw $TypeError(".CMsgQuestMapNodeCondition.logical: object expected"); + message.logical = $root.CMsgQuestMapNodeCondition_Logic.fromObject(object.logical, _depth + 1); } return message; }; @@ -14155,17 +17693,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgQuestMapNodeCondition.toObject = function toObject(message, options) { + CMsgQuestMapNodeCondition.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; - if (message.node_state != null && message.hasOwnProperty("node_state")) { - object.node_state = $root.CMsgQuestMapNodeCondition_NodeState.toObject(message.node_state, options); + if (message.node_state != null && $Object.hasOwnProperty.call(message, "node_state")) { + object.node_state = $root.CMsgQuestMapNodeCondition_NodeState.toObject(message.node_state, options, _depth + 1); if (options.oneofs) object.operation = "node_state"; } - if (message.logical != null && message.hasOwnProperty("logical")) { - object.logical = $root.CMsgQuestMapNodeCondition_Logic.toObject(message.logical, options); + if (message.logical != null && $Object.hasOwnProperty.call(message, "logical")) { + object.logical = $root.CMsgQuestMapNodeCondition_Logic.toObject(message.logical, options, _depth + 1); if (options.oneofs) object.operation = "logical"; } @@ -14179,8 +17721,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgQuestMapNodeCondition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgQuestMapNodeCondition.prototype.toJSON = function() { + return CMsgQuestMapNodeCondition.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgQuestMapNodeCondition + * @function getTypeUrl + * @memberof CMsgQuestMapNodeCondition + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgQuestMapNodeCondition.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgQuestMapNodeCondition"; }; return CMsgQuestMapNodeCondition; @@ -14188,31 +17744,47 @@ $root.CMsgHeaderOnly = (function() { + /** + * Properties of a CMsgHeaderOnly. + * @typedef {Object} CMsgHeaderOnly.$Properties + * @property {CMsgProtoDefHeader.$Properties} header CMsgHeaderOnly header + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a CMsgHeaderOnly. * @exports ICMsgHeaderOnly * @interface ICMsgHeaderOnly - * @property {ICMsgProtoDefHeader} header CMsgHeaderOnly header + * @augments CMsgHeaderOnly.$Properties + * @deprecated Use CMsgHeaderOnly.$Properties instead. + */ + + /** + * Shape of a CMsgHeaderOnly. + * @typedef {{ + * header: CMsgProtoDefHeader.$Shape; + * $unknowns?: Array.; + * }} CMsgHeaderOnly.$Shape */ /** * Constructs a new CMsgHeaderOnly. * @exports CMsgHeaderOnly * @classdesc Represents a CMsgHeaderOnly. - * @implements ICMsgHeaderOnly * @constructor - * @param {ICMsgHeaderOnly=} [properties] Properties to set + * @param {CMsgHeaderOnly.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function CMsgHeaderOnly(properties) { + var CMsgHeaderOnly = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * CMsgHeaderOnly header. - * @member {ICMsgProtoDefHeader} header + * @member {CMsgProtoDefHeader.$Properties} header * @memberof CMsgHeaderOnly * @instance */ @@ -14223,10 +17795,14 @@ * @function create * @memberof CMsgHeaderOnly * @static - * @param {ICMsgHeaderOnly=} [properties] Properties to set + * @param {CMsgHeaderOnly.$Properties=} [properties] Properties to set * @returns {CMsgHeaderOnly} CMsgHeaderOnly instance + * @type {{ + * (properties: CMsgHeaderOnly.$Shape): CMsgHeaderOnly & CMsgHeaderOnly.$Shape; + * (properties?: CMsgHeaderOnly.$Properties): CMsgHeaderOnly; + * }} */ - CMsgHeaderOnly.create = function create(properties) { + CMsgHeaderOnly.create = function(properties) { return new CMsgHeaderOnly(properties); }; @@ -14235,14 +17811,21 @@ * @function encode * @memberof CMsgHeaderOnly * @static - * @param {ICMsgHeaderOnly} message CMsgHeaderOnly message or plain object to encode + * @param {CMsgHeaderOnly.$Properties} message CMsgHeaderOnly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHeaderOnly.encode = function encode(message, writer) { + CMsgHeaderOnly.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + $root.CMsgProtoDefHeader.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14251,12 +17834,12 @@ * @function encodeDelimited * @memberof CMsgHeaderOnly * @static - * @param {ICMsgHeaderOnly} message CMsgHeaderOnly message or plain object to encode + * @param {CMsgHeaderOnly.$Properties} message CMsgHeaderOnly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CMsgHeaderOnly.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CMsgHeaderOnly.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14266,26 +17849,43 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {CMsgHeaderOnly} CMsgHeaderOnly + * @returns {CMsgHeaderOnly & CMsgHeaderOnly.$Shape} CMsgHeaderOnly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHeaderOnly.decode = function decode(reader, length) { + CMsgHeaderOnly.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgHeaderOnly(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.CMsgHeaderOnly(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.header = $root.CMsgProtoDefHeader.decode(reader, reader.uint32(), $undefined, _depth + 1, message.header); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("header")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "header")) throw $util.ProtocolError("missing required 'header'", { instance: message }); return message; }; @@ -14296,11 +17896,11 @@ * @memberof CMsgHeaderOnly * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {CMsgHeaderOnly} CMsgHeaderOnly + * @returns {CMsgHeaderOnly & CMsgHeaderOnly.$Shape} CMsgHeaderOnly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CMsgHeaderOnly.decodeDelimited = function decodeDelimited(reader) { + CMsgHeaderOnly.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14314,11 +17914,15 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CMsgHeaderOnly.verify = function verify(message) { + CMsgHeaderOnly.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; { - var error = $root.CMsgProtoDefHeader.verify(message.header); + var error = $root.CMsgProtoDefHeader.verify(message.header, _depth + 1); if (error) return "header." + error; } @@ -14333,14 +17937,20 @@ * @param {Object.} object Plain object * @returns {CMsgHeaderOnly} CMsgHeaderOnly */ - CMsgHeaderOnly.fromObject = function fromObject(object) { + CMsgHeaderOnly.fromObject = function (object, _depth) { if (object instanceof $root.CMsgHeaderOnly) return object; + if (!$util.isObject(object)) + throw $TypeError(".CMsgHeaderOnly: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.CMsgHeaderOnly(); if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".CMsgHeaderOnly.header: object expected"); - message.header = $root.CMsgProtoDefHeader.fromObject(object.header); + if (!$util.isObject(object.header)) + throw $TypeError(".CMsgHeaderOnly.header: object expected"); + message.header = $root.CMsgProtoDefHeader.fromObject(object.header, _depth + 1); } return message; }; @@ -14354,14 +17964,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CMsgHeaderOnly.toObject = function toObject(message, options) { + CMsgHeaderOnly.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) object.header = null; - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.CMsgProtoDefHeader.toObject(message.header, options); + if (message.header != null && $Object.hasOwnProperty.call(message, "header")) + object.header = $root.CMsgProtoDefHeader.toObject(message.header, options, _depth + 1); return object; }; @@ -14372,8 +17986,22 @@ * @instance * @returns {Object.} JSON object */ - CMsgHeaderOnly.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + CMsgHeaderOnly.prototype.toJSON = function() { + return CMsgHeaderOnly.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CMsgHeaderOnly + * @function getTypeUrl + * @memberof CMsgHeaderOnly + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CMsgHeaderOnly.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/CMsgHeaderOnly"; }; return CMsgHeaderOnly; @@ -14399,32 +18027,45 @@ protobuf.FileDescriptorSet = (function() { + /** + * Properties of a FileDescriptorSet. + * @typedef {Object} google.protobuf.FileDescriptorSet.$Properties + * @property {Array.|null} [file] FileDescriptorSet file + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a FileDescriptorSet. * @memberof google.protobuf * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @augments google.protobuf.FileDescriptorSet.$Properties + * @deprecated Use google.protobuf.FileDescriptorSet.$Properties instead. */ /** - * Constructs a new FileDescriptorSet. + * Shape of a FileDescriptorSet. + * @typedef {google.protobuf.FileDescriptorSet.$Properties} google.protobuf.FileDescriptorSet.$Shape + */ + + /** + * Constructs a new FileDescriptorSet. * @memberof google.protobuf * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorSet(properties) { + var FileDescriptorSet = function (properties) { this.file = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorSet file. - * @member {Array.} file + * @member {Array.} file * @memberof google.protobuf.FileDescriptorSet * @instance */ @@ -14435,10 +18076,14 @@ * @function create * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorSet.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @type {{ + * (properties: google.protobuf.FileDescriptorSet.$Shape): google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape; + * (properties?: google.protobuf.FileDescriptorSet.$Properties): google.protobuf.FileDescriptorSet; + * }} */ - FileDescriptorSet.create = function create(properties) { + FileDescriptorSet.create = function(properties) { return new FileDescriptorSet(properties); }; @@ -14447,16 +18092,23 @@ * @function encode * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + FileDescriptorSet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.file != null && message.file.length) for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14465,12 +18117,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.FileDescriptorSet.$Properties} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14480,27 +18132,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decode = function decode(reader, length) { + FileDescriptorSet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorSet(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14510,11 +18179,11 @@ * @memberof google.protobuf.FileDescriptorSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileDescriptorSet & google.protobuf.FileDescriptorSet.$Shape} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorSet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14528,14 +18197,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorSet.verify = function verify(message) { + FileDescriptorSet.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.file != null && $Object.hasOwnProperty.call(message, "file")) { + if (!$Array.isArray(message.file)) return "file: array expected"; for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i], _depth + 1); if (error) return "file." + error; } @@ -14551,18 +18224,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - FileDescriptorSet.fromObject = function fromObject(object) { + FileDescriptorSet.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorSet(); if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; + if (!$Array.isArray(object.file)) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = $Array(object.file.length); for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + if (!$util.isObject(object.file[i])) + throw $TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], _depth + 1); } } return message; @@ -14577,16 +18256,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + FileDescriptorSet.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.file = []; if (message.file && message.file.length) { - object.file = []; + object.file = $Array(message.file.length); for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options, _depth + 1); } return object; }; @@ -14598,8 +18281,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorSet.prototype.toJSON = function() { + return FileDescriptorSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorSet"; }; return FileDescriptorSet; @@ -14609,38 +18306,51 @@ /** * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto + * @typedef {Object} google.protobuf.FileDescriptorProto.$Properties * @property {string|null} [name] FileDescriptorProto name * @property {string|null} ["package"] FileDescriptorProto package * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.|null} [message_type] FileDescriptorProto message_type + * @property {Array.|null} [enum_type] FileDescriptorProto enum_type + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.FileOptions.$Properties|null} [options] FileDescriptorProto options + * @property {google.protobuf.SourceCodeInfo.$Properties|null} [source_code_info] FileDescriptorProto source_code_info + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @augments google.protobuf.FileDescriptorProto.$Properties + * @deprecated Use google.protobuf.FileDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FileDescriptorProto. + * @typedef {google.protobuf.FileDescriptorProto.$Properties} google.protobuf.FileDescriptorProto.$Shape */ /** * Constructs a new FileDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileDescriptorProto(properties) { + var FileDescriptorProto = function (properties) { this.dependency = []; this.message_type = []; this.enum_type = []; this.service = []; this.extension = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileDescriptorProto name. @@ -14668,7 +18378,7 @@ /** * FileDescriptorProto message_type. - * @member {Array.} message_type + * @member {Array.} message_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -14676,7 +18386,7 @@ /** * FileDescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -14684,7 +18394,7 @@ /** * FileDescriptorProto service. - * @member {Array.} service + * @member {Array.} service * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -14692,7 +18402,7 @@ /** * FileDescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -14700,7 +18410,7 @@ /** * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options + * @member {google.protobuf.FileOptions.$Properties|null|undefined} options * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -14708,7 +18418,7 @@ /** * FileDescriptorProto source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info + * @member {google.protobuf.SourceCodeInfo.$Properties|null|undefined} source_code_info * @memberof google.protobuf.FileDescriptorProto * @instance */ @@ -14719,10 +18429,14 @@ * @function create * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FileDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FileDescriptorProto.$Shape): google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape; + * (properties?: google.protobuf.FileDescriptorProto.$Properties): google.protobuf.FileDescriptorProto; + * }} */ - FileDescriptorProto.create = function create(properties) { + FileDescriptorProto.create = function(properties) { return new FileDescriptorProto(properties); }; @@ -14731,36 +18445,43 @@ * @function encode * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + FileDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); if (message.dependency != null && message.dependency.length) for (var i = 0; i < message.dependency.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); if (message.message_type != null && message.message_type.length) for (var i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.service != null && message.service.length) for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -14769,12 +18490,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.FileDescriptorProto.$Properties} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -14784,59 +18505,100 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decode = function decode(reader, length) { + FileDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message["package"] = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.message_type && message.message_type.length)) + message.message_type = []; + message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.source_code_info = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32(), $undefined, _depth + 1, message.source_code_info); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -14846,11 +18608,11 @@ * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorProto & google.protobuf.FileDescriptorProto.$Shape} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -14864,65 +18626,69 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorProto.verify = function verify(message) { + FileDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) if (!$util.isString(message["package"])) return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) + if (message.dependency != null && $Object.hasOwnProperty.call(message, "dependency")) { + if (!$Array.isArray(message.dependency)) return "dependency: array expected"; for (var i = 0; i < message.dependency.length; ++i) if (!$util.isString(message.dependency[i])) return "dependency: string[] expected"; } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) + if (message.message_type != null && $Object.hasOwnProperty.call(message, "message_type")) { + if (!$Array.isArray(message.message_type)) return "message_type: array expected"; for (var i = 0; i < message.message_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i], _depth + 1); if (error) return "message_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) + if (message.service != null && $Object.hasOwnProperty.call(message, "service")) { + if (!$Array.isArray(message.service)) return "service: array expected"; for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i], _depth + 1); if (error) return "service." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info, _depth + 1); if (error) return "source_code_info." + error; } @@ -14937,70 +18703,76 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - FileDescriptorProto.fromObject = function fromObject(object) { + FileDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object["package"] != null) - message["package"] = String(object["package"]); + message["package"] = $String(object["package"]); if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; + if (!$Array.isArray(object.dependency)) + throw $TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = $Array(object.dependency.length); for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); + message.dependency[i] = $String(object.dependency[i]); } if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; + if (!$Array.isArray(object.message_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); + message.message_type = $Array(object.message_type.length); for (var i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); + if (!$util.isObject(object.message_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); + message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; + if (!$Array.isArray(object.service)) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = $Array(object.service.length); for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + if (!$util.isObject(object.service[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options, _depth + 1); } if (object.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); + if (!$util.isObject(object.source_code_info)) + throw $TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); + message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info, _depth + 1); } return message; }; @@ -15014,9 +18786,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.dependency = []; @@ -15031,39 +18807,39 @@ object.options = null; object.source_code_info = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && $Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; if (message.dependency && message.dependency.length) { - object.dependency = []; + object.dependency = $Array(message.dependency.length); for (var j = 0; j < message.dependency.length; ++j) object.dependency[j] = message.dependency[j]; } if (message.message_type && message.message_type.length) { - object.message_type = []; + object.message_type = $Array(message.message_type.length); for (var j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); + object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.service && message.service.length) { - object.service = []; + object.service = $Array(message.service.length); for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, _depth + 1); + if (message.source_code_info != null && $Object.hasOwnProperty.call(message, "source_code_info")) + object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options, _depth + 1); return object; }; @@ -15074,8 +18850,22 @@ * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileDescriptorProto.prototype.toJSON = function() { + return FileDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileDescriptorProto"; }; return FileDescriptorProto; @@ -15083,38 +18873,51 @@ protobuf.DescriptorProto = (function() { + /** + * Properties of a DescriptorProto. + * @typedef {Object} google.protobuf.DescriptorProto.$Properties + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nested_type] DescriptorProto nested_type + * @property {Array.|null} [enum_type] DescriptorProto enum_type + * @property {Array.|null} [extension_range] DescriptorProto extension_range + * @property {google.protobuf.MessageOptions.$Properties|null} [options] DescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a DescriptorProto. * @memberof google.protobuf * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @augments google.protobuf.DescriptorProto.$Properties + * @deprecated Use google.protobuf.DescriptorProto.$Properties instead. + */ + + /** + * Shape of a DescriptorProto. + * @typedef {google.protobuf.DescriptorProto.$Properties} google.protobuf.DescriptorProto.$Shape */ /** * Constructs a new DescriptorProto. * @memberof google.protobuf * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function DescriptorProto(properties) { + var DescriptorProto = function (properties) { this.field = []; this.extension = []; this.nested_type = []; this.enum_type = []; this.extension_range = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * DescriptorProto name. @@ -15126,7 +18929,7 @@ /** * DescriptorProto field. - * @member {Array.} field + * @member {Array.} field * @memberof google.protobuf.DescriptorProto * @instance */ @@ -15134,7 +18937,7 @@ /** * DescriptorProto extension. - * @member {Array.} extension + * @member {Array.} extension * @memberof google.protobuf.DescriptorProto * @instance */ @@ -15142,7 +18945,7 @@ /** * DescriptorProto nested_type. - * @member {Array.} nested_type + * @member {Array.} nested_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -15150,7 +18953,7 @@ /** * DescriptorProto enum_type. - * @member {Array.} enum_type + * @member {Array.} enum_type * @memberof google.protobuf.DescriptorProto * @instance */ @@ -15158,7 +18961,7 @@ /** * DescriptorProto extension_range. - * @member {Array.} extension_range + * @member {Array.} extension_range * @memberof google.protobuf.DescriptorProto * @instance */ @@ -15166,7 +18969,7 @@ /** * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options + * @member {google.protobuf.MessageOptions.$Properties|null|undefined} options * @memberof google.protobuf.DescriptorProto * @instance */ @@ -15177,10 +18980,14 @@ * @function create * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.$Shape): google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape; + * (properties?: google.protobuf.DescriptorProto.$Properties): google.protobuf.DescriptorProto; + * }} */ - DescriptorProto.create = function create(properties) { + DescriptorProto.create = function(properties) { return new DescriptorProto(properties); }; @@ -15189,32 +18996,39 @@ * @function encode * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + DescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); if (message.nested_type != null && message.nested_type.length) for (var i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); if (message.enum_type != null && message.enum_type.length) for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); if (message.extension_range != null && message.extension_range.length) for (var i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15223,12 +19037,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.DescriptorProto.$Properties} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15238,53 +19052,88 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decode = function decode(reader, length) { + DescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.nested_type && message.nested_type.length)) + message.nested_type = []; + message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.enum_type && message.enum_type.length)) + message.enum_type = []; + message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.extension_range && message.extension_range.length)) + message.extension_range = []; + message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15294,11 +19143,11 @@ * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.DescriptorProto & google.protobuf.DescriptorProto.$Shape} DescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + DescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15312,59 +19161,63 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DescriptorProto.verify = function verify(message) { + DescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) + if (message.field != null && $Object.hasOwnProperty.call(message, "field")) { + if (!$Array.isArray(message.field)) return "field: array expected"; for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i], _depth + 1); if (error) return "field." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) + if (message.extension != null && $Object.hasOwnProperty.call(message, "extension")) { + if (!$Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], _depth + 1); if (error) return "extension." + error; } } - if (message.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) + if (message.nested_type != null && $Object.hasOwnProperty.call(message, "nested_type")) { + if (!$Array.isArray(message.nested_type)) return "nested_type: array expected"; for (var i = 0; i < message.nested_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); + var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i], _depth + 1); if (error) return "nested_type." + error; } } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) + if (message.enum_type != null && $Object.hasOwnProperty.call(message, "enum_type")) { + if (!$Array.isArray(message.enum_type)) return "enum_type: array expected"; for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i], _depth + 1); if (error) return "enum_type." + error; } } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) + if (message.extension_range != null && $Object.hasOwnProperty.call(message, "extension_range")) { + if (!$Array.isArray(message.extension_range)) return "extension_range: array expected"; for (var i = 0; i < message.extension_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i], _depth + 1); if (error) return "extension_range." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -15379,66 +19232,72 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto} DescriptorProto */ - DescriptorProto.fromObject = function fromObject(object) { + DescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; + if (!$Array.isArray(object.field)) + throw $TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = $Array(object.field.length); for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + if (!$util.isObject(object.field[i])) + throw $TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], _depth + 1); } } if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; + if (!$Array.isArray(object.extension)) + throw $TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = $Array(object.extension.length); for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + if (!$util.isObject(object.extension[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], _depth + 1); } } if (object.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; + if (!$Array.isArray(object.nested_type)) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); + message.nested_type = $Array(object.nested_type.length); for (var i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); + if (!$util.isObject(object.nested_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); + message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i], _depth + 1); } } if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; + if (!$Array.isArray(object.enum_type)) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); + message.enum_type = $Array(object.enum_type.length); for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); + if (!$util.isObject(object.enum_type[i])) + throw $TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); + message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i], _depth + 1); } } if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; + if (!$Array.isArray(object.extension_range)) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); + message.extension_range = $Array(object.extension_range.length); for (var i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); + if (!$util.isObject(object.extension_range[i])) + throw $TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); + message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -15452,9 +19311,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + DescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.field = []; @@ -15467,35 +19330,35 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.field && message.field.length) { - object.field = []; + object.field = $Array(message.field.length); for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options, _depth + 1); } if (message.nested_type && message.nested_type.length) { - object.nested_type = []; + object.nested_type = $Array(message.nested_type.length); for (var j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); + object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options, _depth + 1); } if (message.enum_type && message.enum_type.length) { - object.enum_type = []; + object.enum_type = $Array(message.enum_type.length); for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); + object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options, _depth + 1); } if (message.extension_range && message.extension_range.length) { - object.extension_range = []; + object.extension_range = $Array(message.extension_range.length); for (var j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options); + object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options, _depth + 1); } if (message.extension && message.extension.length) { - object.extension = []; + object.extension = $Array(message.extension.length); for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -15506,34 +19369,61 @@ * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + DescriptorProto.prototype.toJSON = function() { + return DescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + DescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto"; }; DescriptorProto.ExtensionRange = (function() { /** * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange + * @typedef {Object} google.protobuf.DescriptorProto.ExtensionRange.$Properties * @property {number|null} [start] ExtensionRange start * @property {number|null} [end] ExtensionRange end + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @augments google.protobuf.DescriptorProto.ExtensionRange.$Properties + * @deprecated Use google.protobuf.DescriptorProto.ExtensionRange.$Properties instead. + */ + + /** + * Shape of an ExtensionRange. + * @typedef {google.protobuf.DescriptorProto.ExtensionRange.$Properties} google.protobuf.DescriptorProto.ExtensionRange.$Shape */ /** * Constructs a new ExtensionRange. * @memberof google.protobuf.DescriptorProto * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ExtensionRange(properties) { + var ExtensionRange = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ExtensionRange start. @@ -15556,10 +19446,14 @@ * @function create * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties=} [properties] Properties to set * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + * @type {{ + * (properties: google.protobuf.DescriptorProto.ExtensionRange.$Shape): google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape; + * (properties?: google.protobuf.DescriptorProto.ExtensionRange.$Properties): google.protobuf.DescriptorProto.ExtensionRange; + * }} */ - ExtensionRange.create = function create(properties) { + ExtensionRange.create = function(properties) { return new ExtensionRange(properties); }; @@ -15568,17 +19462,24 @@ * @function encode * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encode = function encode(message, writer) { + ExtensionRange.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15587,12 +19488,12 @@ * @function encodeDelimited * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.ExtensionRange.$Properties} message ExtensionRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ExtensionRange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15602,28 +19503,48 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decode = function decode(reader, length) { + ExtensionRange.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.DescriptorProto.ExtensionRange(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.start = reader.int32(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.end = reader.int32(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15633,11 +19554,11 @@ * @memberof google.protobuf.DescriptorProto.ExtensionRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ExtensionRange & google.protobuf.DescriptorProto.ExtensionRange.$Shape} ExtensionRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + ExtensionRange.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15651,13 +19572,17 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtensionRange.verify = function verify(message) { + ExtensionRange.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -15671,9 +19596,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange */ - ExtensionRange.fromObject = function fromObject(object) { + ExtensionRange.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); if (object.start != null) message.start = object.start | 0; @@ -15691,17 +19622,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRange.toObject = function toObject(message, options) { + ExtensionRange.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && $Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && $Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -15713,8 +19648,22 @@ * @instance * @returns {Object.} JSON object */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ExtensionRange.prototype.toJSON = function() { + return ExtensionRange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExtensionRange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.DescriptorProto.ExtensionRange"; }; return ExtensionRange; @@ -15727,8 +19676,7 @@ /** * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto + * @typedef {Object} google.protobuf.FieldDescriptorProto.$Properties * @property {string|null} [name] FieldDescriptorProto name * @property {number|null} [number] FieldDescriptorProto number * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label @@ -15736,23 +19684,37 @@ * @property {string|null} [type_name] FieldDescriptorProto type_name * @property {string|null} [extendee] FieldDescriptorProto extendee * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {google.protobuf.FieldOptions.$Properties|null} [options] FieldDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @augments google.protobuf.FieldDescriptorProto.$Properties + * @deprecated Use google.protobuf.FieldDescriptorProto.$Properties instead. + */ + + /** + * Shape of a FieldDescriptorProto. + * @typedef {google.protobuf.FieldDescriptorProto.$Properties} google.protobuf.FieldDescriptorProto.$Shape */ /** * Constructs a new FieldDescriptorProto. * @memberof google.protobuf * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FieldDescriptorProto(properties) { + var FieldDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldDescriptorProto name. @@ -15812,7 +19774,7 @@ /** * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options + * @member {google.protobuf.FieldOptions.$Properties|null|undefined} options * @memberof google.protobuf.FieldDescriptorProto * @instance */ @@ -15823,10 +19785,14 @@ * @function create * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.FieldDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @type {{ + * (properties: google.protobuf.FieldDescriptorProto.$Shape): google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape; + * (properties?: google.protobuf.FieldDescriptorProto.$Properties): google.protobuf.FieldDescriptorProto; + * }} */ - FieldDescriptorProto.create = function create(properties) { + FieldDescriptorProto.create = function(properties) { return new FieldDescriptorProto(properties); }; @@ -15835,29 +19801,36 @@ * @function encode * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + FieldDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.type_name != null && Object.hasOwnProperty.call(message, "type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -15866,12 +19839,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.FieldDescriptorProto.$Properties} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -15881,46 +19854,96 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decode = function decode(reader, length) { + FieldDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldDescriptorProto(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 4: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Label[value] !== $undefined) + message.label = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 5: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldDescriptorProto.Type[value] !== $undefined) + message.type = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 6: { + if (wireType !== 2) + break; + message.type_name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.extendee = reader.string(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.default_value = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -15930,11 +19953,11 @@ * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto & google.protobuf.FieldDescriptorProto.$Shape} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FieldDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -15948,16 +19971,20 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldDescriptorProto.verify = function verify(message) { + FieldDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) switch (message.label) { default: return "label: enum value expected"; @@ -15966,7 +19993,7 @@ case 3: break; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -15990,17 +20017,17 @@ case 18: break; } - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) if (!$util.isString(message.type_name)) return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) if (!$util.isString(message.extendee)) return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) if (!$util.isString(message.default_value)) return "default_value: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -16015,12 +20042,18 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - FieldDescriptorProto.fromObject = function fromObject(object) { + FieldDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; switch (object.label) { @@ -16036,6 +20069,7 @@ case 3: message.label = 3; break; + default: } switch (object.type) { case "TYPE_DOUBLE": @@ -16110,17 +20144,18 @@ case 18: message.type = 18; break; + default: } if (object.type_name != null) - message.type_name = String(object.type_name); + message.type_name = $String(object.type_name); if (object.extendee != null) - message.extendee = String(object.extendee); + message.extendee = $String(object.extendee); if (object.default_value != null) - message.default_value = String(object.default_value); + message.default_value = $String(object.default_value); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -16134,36 +20169,40 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + FieldDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.extendee = ""; object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.label = options.enums === $String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === $String ? "TYPE_DOUBLE" : 1; object.type_name = ""; object.default_value = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && $Object.hasOwnProperty.call(message, "extendee")) object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.type_name != null && message.hasOwnProperty("type_name")) + if (message.label != null && $Object.hasOwnProperty.call(message, "label")) + object.label = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === $undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && $Object.hasOwnProperty.call(message, "type")) + object.type = options.enums === $String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === $undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.type_name != null && $Object.hasOwnProperty.call(message, "type_name")) object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) + if (message.default_value != null && $Object.hasOwnProperty.call(message, "default_value")) object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -16174,8 +20213,22 @@ * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldDescriptorProto.prototype.toJSON = function() { + return FieldDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldDescriptorProto"; }; /** @@ -16202,7 +20255,7 @@ * @property {number} TYPE_SINT64=18 TYPE_SINT64 value */ FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "TYPE_DOUBLE"] = 1; values[valuesById[2] = "TYPE_FLOAT"] = 2; values[valuesById[3] = "TYPE_INT64"] = 3; @@ -16233,7 +20286,7 @@ * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value */ FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "LABEL_OPTIONAL"] = 1; values[valuesById[2] = "LABEL_REQUIRED"] = 2; values[valuesById[3] = "LABEL_REPEATED"] = 3; @@ -16245,30 +20298,43 @@ protobuf.EnumDescriptorProto = (function() { + /** + * Properties of an EnumDescriptorProto. + * @typedef {Object} google.protobuf.EnumDescriptorProto.$Properties + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.EnumOptions.$Properties|null} [options] EnumDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumDescriptorProto. * @memberof google.protobuf * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @augments google.protobuf.EnumDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumDescriptorProto. + * @typedef {google.protobuf.EnumDescriptorProto.$Properties} google.protobuf.EnumDescriptorProto.$Shape */ /** * Constructs a new EnumDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumDescriptorProto(properties) { + var EnumDescriptorProto = function (properties) { this.value = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumDescriptorProto name. @@ -16280,7 +20346,7 @@ /** * EnumDescriptorProto value. - * @member {Array.} value + * @member {Array.} value * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -16288,7 +20354,7 @@ /** * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options + * @member {google.protobuf.EnumOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumDescriptorProto * @instance */ @@ -16299,10 +20365,14 @@ * @function create * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumDescriptorProto.$Shape): google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumDescriptorProto.$Properties): google.protobuf.EnumDescriptorProto; + * }} */ - EnumDescriptorProto.create = function create(properties) { + EnumDescriptorProto.create = function(properties) { return new EnumDescriptorProto(properties); }; @@ -16311,20 +20381,27 @@ * @function encode * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + EnumDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16333,12 +20410,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumDescriptorProto.$Properties} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16348,33 +20425,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decode = function decode(reader, length) { + EnumDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16384,11 +20484,11 @@ * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto & google.protobuf.EnumDescriptorProto.$Shape} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16402,23 +20502,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumDescriptorProto.verify = function verify(message) { + EnumDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) { + if (!$Array.isArray(message.value)) return "value: array expected"; for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i], _depth + 1); if (error) return "value." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -16433,26 +20537,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - EnumDescriptorProto.fromObject = function fromObject(object) { + EnumDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; + if (!$Array.isArray(object.value)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = $Array(object.value.length); for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + if (!$util.isObject(object.value[i])) + throw $TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -16466,9 +20576,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.value = []; @@ -16476,15 +20590,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.value && message.value.length) { - object.value = []; + object.value = $Array(message.value.length); for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -16495,8 +20609,22 @@ * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumDescriptorProto.prototype.toJSON = function() { + return EnumDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumDescriptorProto"; }; return EnumDescriptorProto; @@ -16506,27 +20634,40 @@ /** * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto + * @typedef {Object} google.protobuf.EnumValueDescriptorProto.$Properties * @property {string|null} [name] EnumValueDescriptorProto name * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + * @property {google.protobuf.EnumValueOptions.$Properties|null} [options] EnumValueDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @augments google.protobuf.EnumValueDescriptorProto.$Properties + * @deprecated Use google.protobuf.EnumValueDescriptorProto.$Properties instead. + */ + + /** + * Shape of an EnumValueDescriptorProto. + * @typedef {google.protobuf.EnumValueDescriptorProto.$Properties} google.protobuf.EnumValueDescriptorProto.$Shape */ /** * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueDescriptorProto(properties) { + var EnumValueDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueDescriptorProto name. @@ -16546,7 +20687,7 @@ /** * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @member {google.protobuf.EnumValueOptions.$Properties|null|undefined} options * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ @@ -16557,10 +20698,14 @@ * @function create * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.EnumValueDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + * @type {{ + * (properties: google.protobuf.EnumValueDescriptorProto.$Shape): google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape; + * (properties?: google.protobuf.EnumValueDescriptorProto.$Properties): google.protobuf.EnumValueDescriptorProto; + * }} */ - EnumValueDescriptorProto.create = function create(properties) { + EnumValueDescriptorProto.create = function(properties) { return new EnumValueDescriptorProto(properties); }; @@ -16569,19 +20714,26 @@ * @function encode * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer) { + EnumValueDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16590,12 +20742,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.EnumValueDescriptorProto.$Properties} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16605,33 +20757,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decode = function decode(reader, length) { + EnumValueDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } - } - return message; - }; + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.number = reader.int32(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; /** * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. @@ -16639,11 +20814,11 @@ * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto & google.protobuf.EnumValueDescriptorProto.$Shape} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumValueDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16657,17 +20832,21 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueDescriptorProto.verify = function verify(message) { + EnumValueDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -16682,18 +20861,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { + EnumValueDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.number != null) message.number = object.number | 0; if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -16707,21 +20892,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + EnumValueDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.number = 0; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && $Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -16732,8 +20921,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueDescriptorProto.prototype.toJSON = function() { + return EnumValueDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueDescriptorProto"; }; return EnumValueDescriptorProto; @@ -16741,30 +20944,43 @@ protobuf.ServiceDescriptorProto = (function() { + /** + * Properties of a ServiceDescriptorProto. + * @typedef {Object} google.protobuf.ServiceDescriptorProto.$Properties + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.ServiceOptions.$Properties|null} [options] ServiceDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceDescriptorProto. * @memberof google.protobuf * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + * @augments google.protobuf.ServiceDescriptorProto.$Properties + * @deprecated Use google.protobuf.ServiceDescriptorProto.$Properties instead. + */ + + /** + * Shape of a ServiceDescriptorProto. + * @typedef {google.protobuf.ServiceDescriptorProto.$Properties} google.protobuf.ServiceDescriptorProto.$Shape */ /** * Constructs a new ServiceDescriptorProto. * @memberof google.protobuf * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceDescriptorProto(properties) { + var ServiceDescriptorProto = function (properties) { this.method = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceDescriptorProto name. @@ -16776,7 +20992,7 @@ /** * ServiceDescriptorProto method. - * @member {Array.} method + * @member {Array.} method * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -16784,7 +21000,7 @@ /** * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options + * @member {google.protobuf.ServiceOptions.$Properties|null|undefined} options * @memberof google.protobuf.ServiceDescriptorProto * @instance */ @@ -16795,10 +21011,14 @@ * @function create * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.ServiceDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @type {{ + * (properties: google.protobuf.ServiceDescriptorProto.$Shape): google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape; + * (properties?: google.protobuf.ServiceDescriptorProto.$Properties): google.protobuf.ServiceDescriptorProto; + * }} */ - ServiceDescriptorProto.create = function create(properties) { + ServiceDescriptorProto.create = function(properties) { return new ServiceDescriptorProto(properties); }; @@ -16807,20 +21027,27 @@ * @function encode * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + ServiceDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -16829,12 +21056,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.ServiceDescriptorProto.$Properties} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -16844,33 +21071,56 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decode = function decode(reader, length) { + ServiceDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -16880,11 +21130,11 @@ * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto & google.protobuf.ServiceDescriptorProto.$Shape} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ServiceDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -16898,23 +21148,27 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceDescriptorProto.verify = function verify(message) { + ServiceDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) + if (message.method != null && $Object.hasOwnProperty.call(message, "method")) { + if (!$Array.isArray(message.method)) return "method: array expected"; for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i], _depth + 1); if (error) return "method." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -16929,26 +21183,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - ServiceDescriptorProto.fromObject = function fromObject(object) { + ServiceDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; + if (!$Array.isArray(object.method)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = $Array(object.method.length); for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + if (!$util.isObject(object.method[i])) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], _depth + 1); } } if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -16962,9 +21222,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.method = []; @@ -16972,15 +21236,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.method && message.method.length) { - object.method = []; + object.method = $Array(message.method.length); for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options, _depth + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -16991,8 +21255,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceDescriptorProto.prototype.toJSON = function() { + return ServiceDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceDescriptorProto"; }; return ServiceDescriptorProto; @@ -17002,28 +21280,41 @@ /** * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto + * @typedef {Object} google.protobuf.MethodDescriptorProto.$Properties * @property {string|null} [name] MethodDescriptorProto name * @property {string|null} [input_type] MethodDescriptorProto input_type * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {google.protobuf.MethodOptions.$Properties|null} [options] MethodDescriptorProto options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @augments google.protobuf.MethodDescriptorProto.$Properties + * @deprecated Use google.protobuf.MethodDescriptorProto.$Properties instead. + */ + + /** + * Shape of a MethodDescriptorProto. + * @typedef {google.protobuf.MethodDescriptorProto.$Properties} google.protobuf.MethodDescriptorProto.$Shape */ /** * Constructs a new MethodDescriptorProto. * @memberof google.protobuf * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodDescriptorProto(properties) { + var MethodDescriptorProto = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodDescriptorProto name. @@ -17051,7 +21342,7 @@ /** * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options + * @member {google.protobuf.MethodOptions.$Properties|null|undefined} options * @memberof google.protobuf.MethodDescriptorProto * @instance */ @@ -17062,10 +21353,14 @@ * @function create * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.MethodDescriptorProto.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @type {{ + * (properties: google.protobuf.MethodDescriptorProto.$Shape): google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape; + * (properties?: google.protobuf.MethodDescriptorProto.$Properties): google.protobuf.MethodDescriptorProto; + * }} */ - MethodDescriptorProto.create = function create(properties) { + MethodDescriptorProto.create = function(properties) { return new MethodDescriptorProto(properties); }; @@ -17074,21 +21369,28 @@ * @function encode * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + MethodDescriptorProto.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.input_type != null && Object.hasOwnProperty.call(message, "input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17097,12 +21399,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.MethodDescriptorProto.$Properties} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodDescriptorProto.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17112,34 +21414,60 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decode = function decode(reader, length) { + MethodDescriptorProto.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodDescriptorProto(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name = reader.string(); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.input_type = reader.string(); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.output_type = reader.string(); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32(), $undefined, _depth + 1, message.options); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17149,11 +21477,11 @@ * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto & google.protobuf.MethodDescriptorProto.$Shape} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MethodDescriptorProto.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17167,20 +21495,24 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodDescriptorProto.verify = function verify(message) { + MethodDescriptorProto.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) if (!$util.isString(message.input_type)) return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) if (!$util.isString(message.output_type)) return "output_type: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options, _depth + 1); if (error) return "options." + error; } @@ -17195,20 +21527,26 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - MethodDescriptorProto.fromObject = function fromObject(object) { + MethodDescriptorProto.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodDescriptorProto: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodDescriptorProto(); if (object.name != null) - message.name = String(object.name); + message.name = $String(object.name); if (object.input_type != null) - message.input_type = String(object.input_type); + message.input_type = $String(object.input_type); if (object.output_type != null) - message.output_type = String(object.output_type); + message.output_type = $String(object.output_type); if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + if (!$util.isObject(object.options)) + throw $TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, _depth + 1); } return message; }; @@ -17222,9 +21560,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -17232,14 +21574,14 @@ object.output_type = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) + if (message.input_type != null && $Object.hasOwnProperty.call(message, "input_type")) object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) + if (message.output_type != null && $Object.hasOwnProperty.call(message, "output_type")) object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, _depth + 1); return object; }; @@ -17250,8 +21592,22 @@ * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodDescriptorProto.prototype.toJSON = function() { + return MethodDescriptorProto.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodDescriptorProto.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodDescriptorProto"; }; return MethodDescriptorProto; @@ -17261,8 +21617,7 @@ /** * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions + * @typedef {Object} google.protobuf.FileOptions.$Properties * @property {string|null} [java_package] FileOptions java_package * @property {string|null} [java_outer_classname] FileOptions java_outer_classname * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files @@ -17271,24 +21626,38 @@ * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services * @property {boolean|null} [java_generic_services] FileOptions java_generic_services * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @augments google.protobuf.FileOptions.$Properties + * @deprecated Use google.protobuf.FileOptions.$Properties instead. + */ + + /** + * Shape of a FileOptions. + * @typedef {google.protobuf.FileOptions.$Properties} google.protobuf.FileOptions.$Shape */ /** * Constructs a new FileOptions. * @memberof google.protobuf * @classdesc Represents a FileOptions. - * @implements IFileOptions * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function FileOptions(properties) { + var FileOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FileOptions java_package. @@ -17356,7 +21725,7 @@ /** * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FileOptions * @instance */ @@ -17367,10 +21736,14 @@ * @function create * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.FileOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FileOptions} FileOptions instance + * @type {{ + * (properties: google.protobuf.FileOptions.$Shape): google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape; + * (properties?: google.protobuf.FileOptions.$Properties): google.protobuf.FileOptions; + * }} */ - FileOptions.create = function create(properties) { + FileOptions.create = function(properties) { return new FileOptions(properties); }; @@ -17379,32 +21752,39 @@ * @function encode * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + FileOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.java_package != null && Object.hasOwnProperty.call(message, "java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17413,12 +21793,12 @@ * @function encodeDelimited * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.FileOptions.$Properties} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17428,51 +21808,98 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decode = function decode(reader, length) { + FileOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FileOptions(), value; while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.java_package = reader.string(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.java_outer_classname = reader.string(); + continue; + } + case 10: { + if (wireType !== 0) + break; + message.java_multiple_files = reader.bool(); + continue; + } + case 20: { + if (wireType !== 0) + break; + message.java_generate_equals_and_hash = reader.bool(); + continue; + } + case 9: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FileOptions.OptimizeMode[value] !== $undefined) + message.optimize_for = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 16: { + if (wireType !== 0) + break; + message.cc_generic_services = reader.bool(); + continue; + } + case 17: { + if (wireType !== 0) + break; + message.java_generic_services = reader.bool(); + continue; + } + case 18: { + if (wireType !== 0) + break; + message.py_generic_services = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17482,11 +21909,11 @@ * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileOptions & google.protobuf.FileOptions.$Shape} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17500,22 +21927,26 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileOptions.verify = function verify(message) { + FileOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) if (!$util.isString(message.java_package)) return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) if (!$util.isString(message.java_outer_classname)) return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) if (typeof message.java_multiple_files !== "boolean") return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) if (typeof message.java_generate_equals_and_hash !== "boolean") return "java_generate_equals_and_hash: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) switch (message.optimize_for) { default: return "optimize_for: enum value expected"; @@ -17524,20 +21955,20 @@ case 3: break; } - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) if (typeof message.cc_generic_services !== "boolean") return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) if (typeof message.java_generic_services !== "boolean") return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) if (typeof message.py_generic_services !== "boolean") return "py_generic_services: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -17553,18 +21984,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FileOptions} FileOptions */ - FileOptions.fromObject = function fromObject(object) { + FileOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FileOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FileOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FileOptions(); if (object.java_package != null) - message.java_package = String(object.java_package); + message.java_package = $String(object.java_package); if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); + message.java_outer_classname = $String(object.java_outer_classname); if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); + message.java_multiple_files = $Boolean(object.java_multiple_files); if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); + message.java_generate_equals_and_hash = $Boolean(object.java_generate_equals_and_hash); switch (object.optimize_for) { case "SPEED": case 1: @@ -17578,21 +22015,22 @@ case 3: message.optimize_for = 3; break; + default: } if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); + message.cc_generic_services = $Boolean(object.cc_generic_services); if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); + message.java_generic_services = $Boolean(object.java_generic_services); if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); + message.py_generic_services = $Boolean(object.py_generic_services); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -17607,42 +22045,46 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + FileOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { object.java_package = ""; object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; + object.optimize_for = options.enums === $String ? "SPEED" : 1; object.java_multiple_files = false; object.cc_generic_services = false; object.java_generic_services = false; object.py_generic_services = false; object.java_generate_equals_and_hash = false; } - if (message.java_package != null && message.hasOwnProperty("java_package")) + if (message.java_package != null && $Object.hasOwnProperty.call(message, "java_package")) object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) + if (message.java_outer_classname != null && $Object.hasOwnProperty.call(message, "java_outer_classname")) object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) + if (message.optimize_for != null && $Object.hasOwnProperty.call(message, "optimize_for")) + object.optimize_for = options.enums === $String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] === $undefined ? message.optimize_for : $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; + if (message.java_multiple_files != null && $Object.hasOwnProperty.call(message, "java_multiple_files")) object.java_multiple_files = message.java_multiple_files; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) + if (message.cc_generic_services != null && $Object.hasOwnProperty.call(message, "cc_generic_services")) object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) + if (message.java_generic_services != null && $Object.hasOwnProperty.call(message, "java_generic_services")) object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) + if (message.py_generic_services != null && $Object.hasOwnProperty.call(message, "py_generic_services")) object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) + if (message.java_generate_equals_and_hash != null && $Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -17654,8 +22096,22 @@ * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FileOptions.prototype.toJSON = function() { + return FileOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FileOptions"; }; /** @@ -17667,7 +22123,7 @@ * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value */ FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[1] = "SPEED"] = 1; values[valuesById[2] = "CODE_SIZE"] = 2; values[valuesById[3] = "LITE_RUNTIME"] = 3; @@ -17681,29 +22137,43 @@ /** * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions + * @typedef {Object} google.protobuf.MessageOptions.$Properties * @property {boolean|null} [message_set_wire_format] MessageOptions message_set_wire_format * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option * @property {boolean|null} [".start_expanded"] MessageOptions .start_expanded + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @augments google.protobuf.MessageOptions.$Properties + * @deprecated Use google.protobuf.MessageOptions.$Properties instead. + */ + + /** + * Shape of a MessageOptions. + * @typedef {google.protobuf.MessageOptions.$Properties} google.protobuf.MessageOptions.$Shape */ /** * Constructs a new MessageOptions. * @memberof google.protobuf * @classdesc Represents a MessageOptions. - * @implements IMessageOptions * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set + * @property {boolean} ".start_expanded" MessageOptions .start_expanded + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MessageOptions(properties) { + var MessageOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MessageOptions message_set_wire_format. @@ -17723,18 +22193,12 @@ /** * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MessageOptions * @instance */ MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * MessageOptions .start_expanded. - * @member {boolean} .start_expanded - * @memberof google.protobuf.MessageOptions - * @instance - */ MessageOptions.prototype[".start_expanded"] = true; /** @@ -17742,10 +22206,14 @@ * @function create * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.MessageOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @type {{ + * (properties: google.protobuf.MessageOptions.$Shape): google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape; + * (properties?: google.protobuf.MessageOptions.$Properties): google.protobuf.MessageOptions; + * }} */ - MessageOptions.create = function create(properties) { + MessageOptions.create = function(properties) { return new MessageOptions(properties); }; @@ -17754,22 +22222,29 @@ * @function encode * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + MessageOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".start_expanded"] != null && Object.hasOwnProperty.call(message, ".start_expanded")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".start_expanded"] != null && $Object.hasOwnProperty.call(message, ".start_expanded")) writer.uint32(/* id 80000, wireType 0 =*/640000).bool(message[".start_expanded"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -17778,12 +22253,12 @@ * @function encodeDelimited * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.MessageOptions.$Properties} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -17793,36 +22268,62 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decode = function decode(reader, length) { + MessageOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MessageOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 80000: - message[".start_expanded"] = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.message_set_wire_format = reader.bool(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.no_standard_descriptor_accessor = reader.bool(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 80000: { + if (wireType !== 0) + break; + message[".start_expanded"] = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -17832,11 +22333,11 @@ * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.MessageOptions & google.protobuf.MessageOptions.$Shape} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -17850,25 +22351,29 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageOptions.verify = function verify(message) { + MessageOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) if (typeof message.message_set_wire_format !== "boolean") return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) if (typeof message.no_standard_descriptor_accessor !== "boolean") return "no_standard_descriptor_accessor: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".start_expanded"] != null && message.hasOwnProperty(".start_expanded")) + if (message[".start_expanded"] != null && $Object.hasOwnProperty.call(message, ".start_expanded")) if (typeof message[".start_expanded"] !== "boolean") return ".start_expanded: boolean expected"; return null; @@ -17882,26 +22387,32 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MessageOptions} MessageOptions */ - MessageOptions.fromObject = function fromObject(object) { + MessageOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MessageOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MessageOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MessageOptions(); if (object.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); + message.message_set_wire_format = $Boolean(object.message_set_wire_format); if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); + message.no_standard_descriptor_accessor = $Boolean(object.no_standard_descriptor_accessor); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } if (object[".start_expanded"] != null) - message[".start_expanded"] = Boolean(object[".start_expanded"]); + message[".start_expanded"] = $Boolean(object[".start_expanded"]); return message; }; @@ -17914,9 +22425,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + MessageOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; @@ -17925,16 +22440,16 @@ object.no_standard_descriptor_accessor = false; object[".start_expanded"] = true; } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) + if (message.message_set_wire_format != null && $Object.hasOwnProperty.call(message, "message_set_wire_format")) object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) + if (message.no_standard_descriptor_accessor != null && $Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".start_expanded"] != null && message.hasOwnProperty(".start_expanded")) + if (message[".start_expanded"] != null && $Object.hasOwnProperty.call(message, ".start_expanded")) object[".start_expanded"] = message[".start_expanded"]; return object; }; @@ -17946,8 +22461,22 @@ * @instance * @returns {Object.} JSON object */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MessageOptions.prototype.toJSON = function() { + return MessageOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MessageOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MessageOptions"; }; return MessageOptions; @@ -17957,13 +22486,12 @@ /** * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions + * @typedef {Object} google.protobuf.FieldOptions.$Properties * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype * @property {boolean|null} [packed] FieldOptions packed * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {string|null} [experimental_map_key] FieldOptions experimental_map_key - * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option + * @property {Array.|null} [uninterpreted_option] FieldOptions uninterpreted_option * @property {ProtoDefTypes|null} [".valid_type"] FieldOptions .valid_type * @property {boolean|null} [".editable"] FieldOptions .editable * @property {boolean|null} [".localized"] FieldOptions .localized @@ -17979,23 +22507,52 @@ * @property {boolean|null} [".self_inherit_only"] FieldOptions .self_inherit_only * @property {EVarFieldType|null} [".var_field_type"] FieldOptions .var_field_type * @property {boolean|null} [".merging_key_field"] FieldOptions .merging_key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @augments google.protobuf.FieldOptions.$Properties + * @deprecated Use google.protobuf.FieldOptions.$Properties instead. + */ + + /** + * Shape of a FieldOptions. + * @typedef {google.protobuf.FieldOptions.$Properties} google.protobuf.FieldOptions.$Shape */ /** * Constructs a new FieldOptions. * @memberof google.protobuf * @classdesc Represents a FieldOptions. - * @implements IFieldOptions * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set + * @property {ProtoDefTypes} ".valid_type" FieldOptions .valid_type + * @property {boolean} ".editable" FieldOptions .editable + * @property {boolean} ".localized" FieldOptions .localized + * @property {boolean} ".do_not_inherit" FieldOptions .do_not_inherit + * @property {string} ".display_name" FieldOptions .display_name + * @property {string} ".comment" FieldOptions .comment + * @property {number} ".max_count" FieldOptions .max_count + * @property {boolean} ".allow_add" FieldOptions .allow_add + * @property {boolean} ".allow_delete" FieldOptions .allow_delete + * @property {string} ".panel_class_override" FieldOptions .panel_class_override + * @property {string} ".message_inherhitance_key_field_name" FieldOptions .message_inherhitance_key_field_name + * @property {boolean} ".inherit_reference_variables" FieldOptions .inherit_reference_variables + * @property {boolean} ".self_inherit_only" FieldOptions .self_inherit_only + * @property {EVarFieldType} ".var_field_type" FieldOptions .var_field_type + * @property {boolean} ".merging_key_field" FieldOptions .merging_key_field + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var FieldOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * FieldOptions ctype. @@ -18031,130 +22588,26 @@ /** * FieldOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - /** - * FieldOptions .valid_type. - * @member {ProtoDefTypes} .valid_type - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".valid_type"] = 0; - - /** - * FieldOptions .editable. - * @member {boolean} .editable - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".editable"] = true; - - /** - * FieldOptions .localized. - * @member {boolean} .localized - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".localized"] = false; - - /** - * FieldOptions .do_not_inherit. - * @member {boolean} .do_not_inherit - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".do_not_inherit"] = false; - - /** - * FieldOptions .display_name. - * @member {string} .display_name - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".display_name"] = ""; - - /** - * FieldOptions .comment. - * @member {string} .comment - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".comment"] = ""; - - /** - * FieldOptions .max_count. - * @member {number} .max_count - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".max_count"] = 0; - - /** - * FieldOptions .allow_add. - * @member {boolean} .allow_add - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".allow_add"] = true; - - /** - * FieldOptions .allow_delete. - * @member {boolean} .allow_delete - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".allow_delete"] = true; - - /** - * FieldOptions .panel_class_override. - * @member {string} .panel_class_override - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".panel_class_override"] = ""; - - /** - * FieldOptions .message_inherhitance_key_field_name. - * @member {string} .message_inherhitance_key_field_name - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".message_inherhitance_key_field_name"] = ""; - - /** - * FieldOptions .inherit_reference_variables. - * @member {boolean} .inherit_reference_variables - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".inherit_reference_variables"] = false; - - /** - * FieldOptions .self_inherit_only. - * @member {boolean} .self_inherit_only - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".self_inherit_only"] = false; - - /** - * FieldOptions .var_field_type. - * @member {EVarFieldType} .var_field_type - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".var_field_type"] = 1; - - /** - * FieldOptions .merging_key_field. - * @member {boolean} .merging_key_field - * @memberof google.protobuf.FieldOptions - * @instance - */ FieldOptions.prototype[".merging_key_field"] = false; /** @@ -18162,10 +22615,14 @@ * @function create * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @type {{ + * (properties: google.protobuf.FieldOptions.$Shape): google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape; + * (properties?: google.protobuf.FieldOptions.$Properties): google.protobuf.FieldOptions; + * }} */ - FieldOptions.create = function create(properties) { + FieldOptions.create = function(properties) { return new FieldOptions(properties); }; @@ -18174,54 +22631,61 @@ * @function encode * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + FieldOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.experimental_map_key != null && Object.hasOwnProperty.call(message, "experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.experimental_map_key); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".valid_type"] != null && Object.hasOwnProperty.call(message, ".valid_type")) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message[".valid_type"] != null && $Object.hasOwnProperty.call(message, ".valid_type")) writer.uint32(/* id 70000, wireType 0 =*/560000).int32(message[".valid_type"]); - if (message[".editable"] != null && Object.hasOwnProperty.call(message, ".editable")) + if (message[".editable"] != null && $Object.hasOwnProperty.call(message, ".editable")) writer.uint32(/* id 70001, wireType 0 =*/560008).bool(message[".editable"]); - if (message[".localized"] != null && Object.hasOwnProperty.call(message, ".localized")) + if (message[".localized"] != null && $Object.hasOwnProperty.call(message, ".localized")) writer.uint32(/* id 70002, wireType 0 =*/560016).bool(message[".localized"]); - if (message[".do_not_inherit"] != null && Object.hasOwnProperty.call(message, ".do_not_inherit")) + if (message[".do_not_inherit"] != null && $Object.hasOwnProperty.call(message, ".do_not_inherit")) writer.uint32(/* id 70003, wireType 0 =*/560024).bool(message[".do_not_inherit"]); - if (message[".display_name"] != null && Object.hasOwnProperty.call(message, ".display_name")) + if (message[".display_name"] != null && $Object.hasOwnProperty.call(message, ".display_name")) writer.uint32(/* id 70004, wireType 2 =*/560034).string(message[".display_name"]); - if (message[".comment"] != null && Object.hasOwnProperty.call(message, ".comment")) + if (message[".comment"] != null && $Object.hasOwnProperty.call(message, ".comment")) writer.uint32(/* id 70005, wireType 2 =*/560042).string(message[".comment"]); - if (message[".max_count"] != null && Object.hasOwnProperty.call(message, ".max_count")) + if (message[".max_count"] != null && $Object.hasOwnProperty.call(message, ".max_count")) writer.uint32(/* id 70007, wireType 0 =*/560056).uint32(message[".max_count"]); - if (message[".allow_add"] != null && Object.hasOwnProperty.call(message, ".allow_add")) + if (message[".allow_add"] != null && $Object.hasOwnProperty.call(message, ".allow_add")) writer.uint32(/* id 70008, wireType 0 =*/560064).bool(message[".allow_add"]); - if (message[".allow_delete"] != null && Object.hasOwnProperty.call(message, ".allow_delete")) + if (message[".allow_delete"] != null && $Object.hasOwnProperty.call(message, ".allow_delete")) writer.uint32(/* id 70009, wireType 0 =*/560072).bool(message[".allow_delete"]); - if (message[".panel_class_override"] != null && Object.hasOwnProperty.call(message, ".panel_class_override")) + if (message[".panel_class_override"] != null && $Object.hasOwnProperty.call(message, ".panel_class_override")) writer.uint32(/* id 70010, wireType 2 =*/560082).string(message[".panel_class_override"]); - if (message[".message_inherhitance_key_field_name"] != null && Object.hasOwnProperty.call(message, ".message_inherhitance_key_field_name")) + if (message[".message_inherhitance_key_field_name"] != null && $Object.hasOwnProperty.call(message, ".message_inherhitance_key_field_name")) writer.uint32(/* id 70011, wireType 2 =*/560090).string(message[".message_inherhitance_key_field_name"]); - if (message[".inherit_reference_variables"] != null && Object.hasOwnProperty.call(message, ".inherit_reference_variables")) + if (message[".inherit_reference_variables"] != null && $Object.hasOwnProperty.call(message, ".inherit_reference_variables")) writer.uint32(/* id 70012, wireType 0 =*/560096).bool(message[".inherit_reference_variables"]); - if (message[".self_inherit_only"] != null && Object.hasOwnProperty.call(message, ".self_inherit_only")) + if (message[".self_inherit_only"] != null && $Object.hasOwnProperty.call(message, ".self_inherit_only")) writer.uint32(/* id 70013, wireType 0 =*/560104).bool(message[".self_inherit_only"]); - if (message[".var_field_type"] != null && Object.hasOwnProperty.call(message, ".var_field_type")) + if (message[".var_field_type"] != null && $Object.hasOwnProperty.call(message, ".var_field_type")) writer.uint32(/* id 70014, wireType 0 =*/560112).int32(message[".var_field_type"]); - if (message[".merging_key_field"] != null && Object.hasOwnProperty.call(message, ".merging_key_field")) + if (message[".merging_key_field"] != null && $Object.hasOwnProperty.call(message, ".merging_key_field")) writer.uint32(/* id 70015, wireType 0 =*/560120).bool(message[".merging_key_field"]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18230,12 +22694,12 @@ * @function encodeDelimited * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.FieldOptions.$Properties} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18245,84 +22709,176 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 9: - message.experimental_map_key = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 70000: - message[".valid_type"] = reader.int32(); - break; - case 70001: - message[".editable"] = reader.bool(); - break; - case 70002: - message[".localized"] = reader.bool(); - break; - case 70003: - message[".do_not_inherit"] = reader.bool(); - break; - case 70004: - message[".display_name"] = reader.string(); - break; - case 70005: - message[".comment"] = reader.string(); - break; - case 70007: - message[".max_count"] = reader.uint32(); - break; - case 70008: - message[".allow_add"] = reader.bool(); - break; - case 70009: - message[".allow_delete"] = reader.bool(); - break; - case 70010: - message[".panel_class_override"] = reader.string(); - break; - case 70011: - message[".message_inherhitance_key_field_name"] = reader.string(); - break; - case 70012: - message[".inherit_reference_variables"] = reader.bool(); - break; - case 70013: - message[".self_inherit_only"] = reader.bool(); - break; - case 70014: - message[".var_field_type"] = reader.int32(); - break; - case 70015: - message[".merging_key_field"] = reader.bool(); - break; - default: - reader.skipType(tag & 7); + FieldOptions.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.FieldOptions(), value; + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.google.protobuf.FieldOptions.CType[value] !== $undefined) + message.ctype = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 2: { + if (wireType !== 0) + break; + message.packed = reader.bool(); + continue; + } + case 3: { + if (wireType !== 0) + break; + message.deprecated = reader.bool(); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.experimental_map_key = reader.string(); + continue; + } + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 70000: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.ProtoDefTypes[value] !== $undefined) + message[".valid_type"] = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 70001: { + if (wireType !== 0) + break; + message[".editable"] = reader.bool(); + continue; + } + case 70002: { + if (wireType !== 0) + break; + message[".localized"] = reader.bool(); + continue; + } + case 70003: { + if (wireType !== 0) + break; + message[".do_not_inherit"] = reader.bool(); + continue; + } + case 70004: { + if (wireType !== 2) + break; + message[".display_name"] = reader.string(); + continue; + } + case 70005: { + if (wireType !== 2) + break; + message[".comment"] = reader.string(); + continue; + } + case 70007: { + if (wireType !== 0) + break; + message[".max_count"] = reader.uint32(); + continue; + } + case 70008: { + if (wireType !== 0) + break; + message[".allow_add"] = reader.bool(); + continue; + } + case 70009: { + if (wireType !== 0) + break; + message[".allow_delete"] = reader.bool(); + continue; + } + case 70010: { + if (wireType !== 2) + break; + message[".panel_class_override"] = reader.string(); + continue; + } + case 70011: { + if (wireType !== 2) + break; + message[".message_inherhitance_key_field_name"] = reader.string(); + continue; + } + case 70012: { + if (wireType !== 0) + break; + message[".inherit_reference_variables"] = reader.bool(); + continue; + } + case 70013: { + if (wireType !== 0) + break; + message[".self_inherit_only"] = reader.bool(); + continue; + } + case 70014: { + if (wireType !== 0) + break; + value = reader.int32(); + if ($root.EVarFieldType[value] !== $undefined) + message[".var_field_type"] = value; + else if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + continue; + } + case 70015: { + if (wireType !== 0) + break; + message[".merging_key_field"] = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18332,11 +22888,11 @@ * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldOptions & google.protobuf.FieldOptions.$Shape} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18350,10 +22906,14 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldOptions.verify = function verify(message) { + FieldOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) switch (message.ctype) { default: return "ctype: enum value expected"; @@ -18362,25 +22922,25 @@ case 2: break; } - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) if (typeof message.packed !== "boolean") return "packed: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) if (!$util.isString(message.experimental_map_key)) return "experimental_map_key: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } } - if (message[".valid_type"] != null && message.hasOwnProperty(".valid_type")) + if (message[".valid_type"] != null && $Object.hasOwnProperty.call(message, ".valid_type")) switch (message[".valid_type"]) { default: return ".valid_type: enum value expected"; @@ -18398,43 +22958,43 @@ case 12: break; } - if (message[".editable"] != null && message.hasOwnProperty(".editable")) + if (message[".editable"] != null && $Object.hasOwnProperty.call(message, ".editable")) if (typeof message[".editable"] !== "boolean") return ".editable: boolean expected"; - if (message[".localized"] != null && message.hasOwnProperty(".localized")) + if (message[".localized"] != null && $Object.hasOwnProperty.call(message, ".localized")) if (typeof message[".localized"] !== "boolean") return ".localized: boolean expected"; - if (message[".do_not_inherit"] != null && message.hasOwnProperty(".do_not_inherit")) + if (message[".do_not_inherit"] != null && $Object.hasOwnProperty.call(message, ".do_not_inherit")) if (typeof message[".do_not_inherit"] !== "boolean") return ".do_not_inherit: boolean expected"; - if (message[".display_name"] != null && message.hasOwnProperty(".display_name")) + if (message[".display_name"] != null && $Object.hasOwnProperty.call(message, ".display_name")) if (!$util.isString(message[".display_name"])) return ".display_name: string expected"; - if (message[".comment"] != null && message.hasOwnProperty(".comment")) + if (message[".comment"] != null && $Object.hasOwnProperty.call(message, ".comment")) if (!$util.isString(message[".comment"])) return ".comment: string expected"; - if (message[".max_count"] != null && message.hasOwnProperty(".max_count")) + if (message[".max_count"] != null && $Object.hasOwnProperty.call(message, ".max_count")) if (!$util.isInteger(message[".max_count"])) return ".max_count: integer expected"; - if (message[".allow_add"] != null && message.hasOwnProperty(".allow_add")) + if (message[".allow_add"] != null && $Object.hasOwnProperty.call(message, ".allow_add")) if (typeof message[".allow_add"] !== "boolean") return ".allow_add: boolean expected"; - if (message[".allow_delete"] != null && message.hasOwnProperty(".allow_delete")) + if (message[".allow_delete"] != null && $Object.hasOwnProperty.call(message, ".allow_delete")) if (typeof message[".allow_delete"] !== "boolean") return ".allow_delete: boolean expected"; - if (message[".panel_class_override"] != null && message.hasOwnProperty(".panel_class_override")) + if (message[".panel_class_override"] != null && $Object.hasOwnProperty.call(message, ".panel_class_override")) if (!$util.isString(message[".panel_class_override"])) return ".panel_class_override: string expected"; - if (message[".message_inherhitance_key_field_name"] != null && message.hasOwnProperty(".message_inherhitance_key_field_name")) + if (message[".message_inherhitance_key_field_name"] != null && $Object.hasOwnProperty.call(message, ".message_inherhitance_key_field_name")) if (!$util.isString(message[".message_inherhitance_key_field_name"])) return ".message_inherhitance_key_field_name: string expected"; - if (message[".inherit_reference_variables"] != null && message.hasOwnProperty(".inherit_reference_variables")) + if (message[".inherit_reference_variables"] != null && $Object.hasOwnProperty.call(message, ".inherit_reference_variables")) if (typeof message[".inherit_reference_variables"] !== "boolean") return ".inherit_reference_variables: boolean expected"; - if (message[".self_inherit_only"] != null && message.hasOwnProperty(".self_inherit_only")) + if (message[".self_inherit_only"] != null && $Object.hasOwnProperty.call(message, ".self_inherit_only")) if (typeof message[".self_inherit_only"] !== "boolean") return ".self_inherit_only: boolean expected"; - if (message[".var_field_type"] != null && message.hasOwnProperty(".var_field_type")) + if (message[".var_field_type"] != null && $Object.hasOwnProperty.call(message, ".var_field_type")) switch (message[".var_field_type"]) { default: return ".var_field_type: enum value expected"; @@ -18449,7 +23009,7 @@ case 9: break; } - if (message[".merging_key_field"] != null && message.hasOwnProperty(".merging_key_field")) + if (message[".merging_key_field"] != null && $Object.hasOwnProperty.call(message, ".merging_key_field")) if (typeof message[".merging_key_field"] !== "boolean") return ".merging_key_field: boolean expected"; return null; @@ -18463,9 +23023,15 @@ * @param {Object.} object Plain object * @returns {google.protobuf.FieldOptions} FieldOptions */ - FieldOptions.fromObject = function fromObject(object) { + FieldOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.FieldOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.FieldOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { case "STRING": @@ -18480,21 +23046,22 @@ case 2: message.ctype = 2; break; + default: } if (object.packed != null) - message.packed = Boolean(object.packed); + message.packed = $Boolean(object.packed); if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); + message.deprecated = $Boolean(object.deprecated); if (object.experimental_map_key != null) - message.experimental_map_key = String(object.experimental_map_key); + message.experimental_map_key = $String(object.experimental_map_key); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } switch (object[".valid_type"]) { @@ -18546,31 +23113,32 @@ case 12: message[".valid_type"] = 12; break; + default: } if (object[".editable"] != null) - message[".editable"] = Boolean(object[".editable"]); + message[".editable"] = $Boolean(object[".editable"]); if (object[".localized"] != null) - message[".localized"] = Boolean(object[".localized"]); + message[".localized"] = $Boolean(object[".localized"]); if (object[".do_not_inherit"] != null) - message[".do_not_inherit"] = Boolean(object[".do_not_inherit"]); + message[".do_not_inherit"] = $Boolean(object[".do_not_inherit"]); if (object[".display_name"] != null) - message[".display_name"] = String(object[".display_name"]); + message[".display_name"] = $String(object[".display_name"]); if (object[".comment"] != null) - message[".comment"] = String(object[".comment"]); + message[".comment"] = $String(object[".comment"]); if (object[".max_count"] != null) message[".max_count"] = object[".max_count"] >>> 0; if (object[".allow_add"] != null) - message[".allow_add"] = Boolean(object[".allow_add"]); + message[".allow_add"] = $Boolean(object[".allow_add"]); if (object[".allow_delete"] != null) - message[".allow_delete"] = Boolean(object[".allow_delete"]); + message[".allow_delete"] = $Boolean(object[".allow_delete"]); if (object[".panel_class_override"] != null) - message[".panel_class_override"] = String(object[".panel_class_override"]); + message[".panel_class_override"] = $String(object[".panel_class_override"]); if (object[".message_inherhitance_key_field_name"] != null) - message[".message_inherhitance_key_field_name"] = String(object[".message_inherhitance_key_field_name"]); + message[".message_inherhitance_key_field_name"] = $String(object[".message_inherhitance_key_field_name"]); if (object[".inherit_reference_variables"] != null) - message[".inherit_reference_variables"] = Boolean(object[".inherit_reference_variables"]); + message[".inherit_reference_variables"] = $Boolean(object[".inherit_reference_variables"]); if (object[".self_inherit_only"] != null) - message[".self_inherit_only"] = Boolean(object[".self_inherit_only"]); + message[".self_inherit_only"] = $Boolean(object[".self_inherit_only"]); switch (object[".var_field_type"]) { case "VAR_TYPE_INVALID": case 1: @@ -18608,9 +23176,10 @@ case 9: message[".var_field_type"] = 9; break; + default: } if (object[".merging_key_field"] != null) - message[".merging_key_field"] = Boolean(object[".merging_key_field"]); + message[".merging_key_field"] = $Boolean(object[".merging_key_field"]); return message; }; @@ -18623,18 +23192,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + FieldOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; + object.ctype = options.enums === $String ? "STRING" : 0; object.packed = false; object.deprecated = false; object.experimental_map_key = ""; - object[".valid_type"] = options.enums === String ? "DEF_TYPE_QUEST_MAP_NODE" : 0; + object[".valid_type"] = options.enums === $String ? "DEF_TYPE_QUEST_MAP_NODE" : 0; object[".editable"] = true; object[".localized"] = false; object[".do_not_inherit"] = false; @@ -18647,51 +23220,51 @@ object[".message_inherhitance_key_field_name"] = ""; object[".inherit_reference_variables"] = false; object[".self_inherit_only"] = false; - object[".var_field_type"] = options.enums === String ? "VAR_TYPE_INVALID" : 1; + object[".var_field_type"] = options.enums === $String ? "VAR_TYPE_INVALID" : 1; object[".merging_key_field"] = false; } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.ctype != null && $Object.hasOwnProperty.call(message, "ctype")) + object.ctype = options.enums === $String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === $undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && $Object.hasOwnProperty.call(message, "packed")) object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && $Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key")) + if (message.experimental_map_key != null && $Object.hasOwnProperty.call(message, "experimental_map_key")) object.experimental_map_key = message.experimental_map_key; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } - if (message[".valid_type"] != null && message.hasOwnProperty(".valid_type")) - object[".valid_type"] = options.enums === String ? $root.ProtoDefTypes[message[".valid_type"]] : message[".valid_type"]; - if (message[".editable"] != null && message.hasOwnProperty(".editable")) + if (message[".valid_type"] != null && $Object.hasOwnProperty.call(message, ".valid_type")) + object[".valid_type"] = options.enums === $String ? $root.ProtoDefTypes[message[".valid_type"]] === $undefined ? message[".valid_type"] : $root.ProtoDefTypes[message[".valid_type"]] : message[".valid_type"]; + if (message[".editable"] != null && $Object.hasOwnProperty.call(message, ".editable")) object[".editable"] = message[".editable"]; - if (message[".localized"] != null && message.hasOwnProperty(".localized")) + if (message[".localized"] != null && $Object.hasOwnProperty.call(message, ".localized")) object[".localized"] = message[".localized"]; - if (message[".do_not_inherit"] != null && message.hasOwnProperty(".do_not_inherit")) + if (message[".do_not_inherit"] != null && $Object.hasOwnProperty.call(message, ".do_not_inherit")) object[".do_not_inherit"] = message[".do_not_inherit"]; - if (message[".display_name"] != null && message.hasOwnProperty(".display_name")) + if (message[".display_name"] != null && $Object.hasOwnProperty.call(message, ".display_name")) object[".display_name"] = message[".display_name"]; - if (message[".comment"] != null && message.hasOwnProperty(".comment")) + if (message[".comment"] != null && $Object.hasOwnProperty.call(message, ".comment")) object[".comment"] = message[".comment"]; - if (message[".max_count"] != null && message.hasOwnProperty(".max_count")) + if (message[".max_count"] != null && $Object.hasOwnProperty.call(message, ".max_count")) object[".max_count"] = message[".max_count"]; - if (message[".allow_add"] != null && message.hasOwnProperty(".allow_add")) + if (message[".allow_add"] != null && $Object.hasOwnProperty.call(message, ".allow_add")) object[".allow_add"] = message[".allow_add"]; - if (message[".allow_delete"] != null && message.hasOwnProperty(".allow_delete")) + if (message[".allow_delete"] != null && $Object.hasOwnProperty.call(message, ".allow_delete")) object[".allow_delete"] = message[".allow_delete"]; - if (message[".panel_class_override"] != null && message.hasOwnProperty(".panel_class_override")) + if (message[".panel_class_override"] != null && $Object.hasOwnProperty.call(message, ".panel_class_override")) object[".panel_class_override"] = message[".panel_class_override"]; - if (message[".message_inherhitance_key_field_name"] != null && message.hasOwnProperty(".message_inherhitance_key_field_name")) + if (message[".message_inherhitance_key_field_name"] != null && $Object.hasOwnProperty.call(message, ".message_inherhitance_key_field_name")) object[".message_inherhitance_key_field_name"] = message[".message_inherhitance_key_field_name"]; - if (message[".inherit_reference_variables"] != null && message.hasOwnProperty(".inherit_reference_variables")) + if (message[".inherit_reference_variables"] != null && $Object.hasOwnProperty.call(message, ".inherit_reference_variables")) object[".inherit_reference_variables"] = message[".inherit_reference_variables"]; - if (message[".self_inherit_only"] != null && message.hasOwnProperty(".self_inherit_only")) + if (message[".self_inherit_only"] != null && $Object.hasOwnProperty.call(message, ".self_inherit_only")) object[".self_inherit_only"] = message[".self_inherit_only"]; - if (message[".var_field_type"] != null && message.hasOwnProperty(".var_field_type")) - object[".var_field_type"] = options.enums === String ? $root.EVarFieldType[message[".var_field_type"]] : message[".var_field_type"]; - if (message[".merging_key_field"] != null && message.hasOwnProperty(".merging_key_field")) + if (message[".var_field_type"] != null && $Object.hasOwnProperty.call(message, ".var_field_type")) + object[".var_field_type"] = options.enums === $String ? $root.EVarFieldType[message[".var_field_type"]] === $undefined ? message[".var_field_type"] : $root.EVarFieldType[message[".var_field_type"]] : message[".var_field_type"]; + if (message[".merging_key_field"] != null && $Object.hasOwnProperty.call(message, ".merging_key_field")) object[".merging_key_field"] = message[".merging_key_field"]; return object; }; @@ -18703,8 +23276,22 @@ * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + FieldOptions.prototype.toJSON = function() { + return FieldOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FieldOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.FieldOptions"; }; /** @@ -18716,7 +23303,7 @@ * @property {number} STRING_PIECE=2 STRING_PIECE value */ FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); + var valuesById = $Object.create(null), values = $Object.create(valuesById); values[valuesById[0] = "STRING"] = 0; values[valuesById[1] = "CORD"] = 1; values[valuesById[2] = "STRING_PIECE"] = 2; @@ -18728,32 +23315,45 @@ protobuf.EnumOptions = (function() { + /** + * Properties of an EnumOptions. + * @typedef {Object} google.protobuf.EnumOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumOptions. * @memberof google.protobuf * @interface IEnumOptions - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option + * @augments google.protobuf.EnumOptions.$Properties + * @deprecated Use google.protobuf.EnumOptions.$Properties instead. + */ + + /** + * Shape of an EnumOptions. + * @typedef {google.protobuf.EnumOptions.$Properties} google.protobuf.EnumOptions.$Shape */ /** * Constructs a new EnumOptions. * @memberof google.protobuf * @classdesc Represents an EnumOptions. - * @implements IEnumOptions * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumOptions(properties) { + var EnumOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumOptions * @instance */ @@ -18764,10 +23364,14 @@ * @function create * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.EnumOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @type {{ + * (properties: google.protobuf.EnumOptions.$Shape): google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape; + * (properties?: google.protobuf.EnumOptions.$Properties): google.protobuf.EnumOptions; + * }} */ - EnumOptions.create = function create(properties) { + EnumOptions.create = function(properties) { return new EnumOptions(properties); }; @@ -18776,16 +23380,23 @@ * @function encode * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + EnumOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -18794,12 +23405,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.EnumOptions.$Properties} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -18809,27 +23420,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length) { + EnumOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -18839,11 +23467,11 @@ * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumOptions & google.protobuf.EnumOptions.$Shape} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -18857,14 +23485,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumOptions.verify = function verify(message) { + EnumOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -18880,18 +23512,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumOptions} EnumOptions */ - EnumOptions.fromObject = function fromObject(object) { + EnumOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -18906,16 +23544,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + EnumOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -18927,8 +23569,22 @@ * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumOptions.prototype.toJSON = function() { + return EnumOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumOptions"; }; return EnumOptions; @@ -18936,32 +23592,45 @@ protobuf.EnumValueOptions = (function() { + /** + * Properties of an EnumValueOptions. + * @typedef {Object} google.protobuf.EnumValueOptions.$Properties + * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of an EnumValueOptions. * @memberof google.protobuf * @interface IEnumValueOptions - * @property {Array.|null} [uninterpreted_option] EnumValueOptions uninterpreted_option + * @augments google.protobuf.EnumValueOptions.$Properties + * @deprecated Use google.protobuf.EnumValueOptions.$Properties instead. + */ + + /** + * Shape of an EnumValueOptions. + * @typedef {google.protobuf.EnumValueOptions.$Properties} google.protobuf.EnumValueOptions.$Shape */ /** * Constructs a new EnumValueOptions. * @memberof google.protobuf * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function EnumValueOptions(properties) { + var EnumValueOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * EnumValueOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.EnumValueOptions * @instance */ @@ -18972,10 +23641,14 @@ * @function create * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.EnumValueOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @type {{ + * (properties: google.protobuf.EnumValueOptions.$Shape): google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape; + * (properties?: google.protobuf.EnumValueOptions.$Properties): google.protobuf.EnumValueOptions; + * }} */ - EnumValueOptions.create = function create(properties) { + EnumValueOptions.create = function(properties) { return new EnumValueOptions(properties); }; @@ -18984,16 +23657,23 @@ * @function encode * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + EnumValueOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19002,12 +23682,12 @@ * @function encodeDelimited * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.EnumValueOptions.$Properties} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19017,27 +23697,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + EnumValueOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19047,11 +23744,11 @@ * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.EnumValueOptions & google.protobuf.EnumValueOptions.$Shape} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19065,14 +23762,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueOptions.verify = function verify(message) { + EnumValueOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -19088,18 +23789,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - EnumValueOptions.fromObject = function fromObject(object) { + EnumValueOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.EnumValueOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.EnumValueOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.EnumValueOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -19114,16 +23821,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -19135,8 +23846,22 @@ * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + EnumValueOptions.prototype.toJSON = function() { + return EnumValueOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EnumValueOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.EnumValueOptions"; }; return EnumValueOptions; @@ -19144,32 +23869,45 @@ protobuf.ServiceOptions = (function() { + /** + * Properties of a ServiceOptions. + * @typedef {Object} google.protobuf.ServiceOptions.$Properties + * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a ServiceOptions. * @memberof google.protobuf * @interface IServiceOptions - * @property {Array.|null} [uninterpreted_option] ServiceOptions uninterpreted_option + * @augments google.protobuf.ServiceOptions.$Properties + * @deprecated Use google.protobuf.ServiceOptions.$Properties instead. + */ + + /** + * Shape of a ServiceOptions. + * @typedef {google.protobuf.ServiceOptions.$Properties} google.protobuf.ServiceOptions.$Shape */ /** * Constructs a new ServiceOptions. * @memberof google.protobuf * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function ServiceOptions(properties) { + var ServiceOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * ServiceOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.ServiceOptions * @instance */ @@ -19180,10 +23918,14 @@ * @function create * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.ServiceOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @type {{ + * (properties: google.protobuf.ServiceOptions.$Shape): google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape; + * (properties?: google.protobuf.ServiceOptions.$Properties): google.protobuf.ServiceOptions; + * }} */ - ServiceOptions.create = function create(properties) { + ServiceOptions.create = function(properties) { return new ServiceOptions(properties); }; @@ -19192,16 +23934,23 @@ * @function encode * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + ServiceOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19210,12 +23959,12 @@ * @function encodeDelimited * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.ServiceOptions.$Properties} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ServiceOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19225,27 +23974,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + ServiceOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19255,11 +24021,11 @@ * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ServiceOptions & google.protobuf.ServiceOptions.$Shape} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19273,14 +24039,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + ServiceOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -19296,18 +24066,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - ServiceOptions.fromObject = function fromObject(object) { + ServiceOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.ServiceOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.ServiceOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.ServiceOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -19322,16 +24098,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -19343,8 +24123,22 @@ * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ServiceOptions.prototype.toJSON = function() { + return ServiceOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ServiceOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.ServiceOptions"; }; return ServiceOptions; @@ -19352,32 +24146,45 @@ protobuf.MethodOptions = (function() { + /** + * Properties of a MethodOptions. + * @typedef {Object} google.protobuf.MethodOptions.$Properties + * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a MethodOptions. * @memberof google.protobuf * @interface IMethodOptions - * @property {Array.|null} [uninterpreted_option] MethodOptions uninterpreted_option + * @augments google.protobuf.MethodOptions.$Properties + * @deprecated Use google.protobuf.MethodOptions.$Properties instead. + */ + + /** + * Shape of a MethodOptions. + * @typedef {google.protobuf.MethodOptions.$Properties} google.protobuf.MethodOptions.$Shape */ /** * Constructs a new MethodOptions. * @memberof google.protobuf * @classdesc Represents a MethodOptions. - * @implements IMethodOptions * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function MethodOptions(properties) { + var MethodOptions = function (properties) { this.uninterpreted_option = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * MethodOptions uninterpreted_option. - * @member {Array.} uninterpreted_option + * @member {Array.} uninterpreted_option * @memberof google.protobuf.MethodOptions * @instance */ @@ -19388,10 +24195,14 @@ * @function create * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.MethodOptions.$Properties=} [properties] Properties to set * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @type {{ + * (properties: google.protobuf.MethodOptions.$Shape): google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape; + * (properties?: google.protobuf.MethodOptions.$Properties): google.protobuf.MethodOptions; + * }} */ - MethodOptions.create = function create(properties) { + MethodOptions.create = function(properties) { return new MethodOptions(properties); }; @@ -19400,16 +24211,23 @@ * @function encode * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + MethodOptions.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.uninterpreted_option != null && message.uninterpreted_option.length) for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19418,12 +24236,12 @@ * @function encodeDelimited * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.MethodOptions.$Properties} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MethodOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19433,27 +24251,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + MethodOptions.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 999: { + if (wireType !== 2) + break; + if (!(message.uninterpreted_option && message.uninterpreted_option.length)) + message.uninterpreted_option = []; + message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19463,11 +24298,11 @@ * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.MethodOptions & google.protobuf.MethodOptions.$Shape} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19481,14 +24316,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + MethodOptions.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.uninterpreted_option != null && $Object.hasOwnProperty.call(message, "uninterpreted_option")) { + if (!$Array.isArray(message.uninterpreted_option)) return "uninterpreted_option: array expected"; for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i], _depth + 1); if (error) return "uninterpreted_option." + error; } @@ -19504,18 +24343,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.MethodOptions} MethodOptions */ - MethodOptions.fromObject = function fromObject(object) { + MethodOptions.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.MethodOptions) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.MethodOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.MethodOptions(); if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; + if (!$Array.isArray(object.uninterpreted_option)) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); + message.uninterpreted_option = $Array(object.uninterpreted_option.length); for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); + if (!$util.isObject(object.uninterpreted_option[i])) + throw $TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); + message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i], _depth + 1); } } return message; @@ -19530,16 +24375,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + MethodOptions.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpreted_option = []; if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; + object.uninterpreted_option = $Array(message.uninterpreted_option.length); for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); + object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options, _depth + 1); } return object; }; @@ -19551,8 +24400,22 @@ * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + MethodOptions.prototype.toJSON = function() { + return MethodOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MethodOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.MethodOptions"; }; return MethodOptions; @@ -19562,36 +24425,49 @@ /** * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name + * @typedef {Object} google.protobuf.UninterpretedOption.$Properties + * @property {Array.|null} [name] UninterpretedOption name * @property {string|null} [identifier_value] UninterpretedOption identifier_value * @property {number|Long|null} [positive_int_value] UninterpretedOption positive_int_value * @property {number|Long|null} [negative_int_value] UninterpretedOption negative_int_value * @property {number|null} [double_value] UninterpretedOption double_value * @property {Uint8Array|null} [string_value] UninterpretedOption string_value * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @augments google.protobuf.UninterpretedOption.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.$Properties instead. + */ + + /** + * Shape of an UninterpretedOption. + * @typedef {google.protobuf.UninterpretedOption.$Properties} google.protobuf.UninterpretedOption.$Shape */ /** * Constructs a new UninterpretedOption. * @memberof google.protobuf * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function UninterpretedOption(properties) { + var UninterpretedOption = function (properties) { this.name = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * UninterpretedOption name. - * @member {Array.} name + * @member {Array.} name * @memberof google.protobuf.UninterpretedOption * @instance */ @@ -19650,10 +24526,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.$Shape): google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape; + * (properties?: google.protobuf.UninterpretedOption.$Properties): google.protobuf.UninterpretedOption; + * }} */ - UninterpretedOption.create = function create(properties) { + UninterpretedOption.create = function(properties) { return new UninterpretedOption(properties); }; @@ -19662,28 +24542,35 @@ * @function encode * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + UninterpretedOption.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -19692,12 +24579,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.UninterpretedOption.$Properties} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + UninterpretedOption.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -19707,45 +24594,80 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + UninterpretedOption.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = reader.string(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 2: { + if (wireType !== 2) + break; + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.identifier_value = reader.string(); + continue; + } + case 4: { + if (wireType !== 0) + break; + message.positive_int_value = reader.uint64(); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.negative_int_value = reader.int64(); + continue; + } + case 6: { + if (wireType !== 1) + break; + message.double_value = reader.double(); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.string_value = reader.bytes(); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.aggregate_value = reader.string(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -19755,11 +24677,11 @@ * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.UninterpretedOption & google.protobuf.UninterpretedOption.$Shape} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -19773,34 +24695,38 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + UninterpretedOption.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) { + if (!$Array.isArray(message.name)) return "name: array expected"; for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i], _depth + 1); if (error) return "name." + error; } } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) if (!$util.isString(message.identifier_value)) return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) if (typeof message.double_value !== "number") return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) if (!$util.isString(message.aggregate_value)) return "aggregate_value: string expected"; return null; @@ -19814,49 +24740,55 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - UninterpretedOption.fromObject = function fromObject(object) { + UninterpretedOption.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption(); if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; + if (!$Array.isArray(object.name)) + throw $TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = $Array(object.name.length); for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + if (!$util.isObject(object.name[i])) + throw $TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], _depth + 1); } } if (object.identifier_value != null) - message.identifier_value = String(object.identifier_value); + message.identifier_value = $String(object.identifier_value); if (object.positive_int_value != null) if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; + message.positive_int_value = $util.Long.fromValue(object.positive_int_value, true); else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); + message.positive_int_value = $parseInt(object.positive_int_value, 10); else if (typeof object.positive_int_value === "number") message.positive_int_value = object.positive_int_value; else if (typeof object.positive_int_value === "object") message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); if (object.negative_int_value != null) if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; + message.negative_int_value = $util.Long.fromValue(object.negative_int_value, false); else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); + message.negative_int_value = $parseInt(object.negative_int_value, 10); else if (typeof object.negative_int_value === "number") message.negative_int_value = object.negative_int_value; else if (typeof object.negative_int_value === "object") message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); if (object.double_value != null) - message.double_value = Number(object.double_value); + message.double_value = $Number(object.double_value); if (object.string_value != null) if (typeof object.string_value === "string") $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) + else if (object.string_value.length >= 0) message.string_value = object.string_value; if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); + message.aggregate_value = $String(object.aggregate_value); return message; }; @@ -19869,9 +24801,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.name = []; @@ -19879,46 +24815,50 @@ object.identifier_value = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.positive_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.positive_int_value = options.longs === String ? "0" : 0; + object.positive_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.negative_int_value = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; } else - object.negative_int_value = options.longs === String ? "0" : 0; + object.negative_int_value = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; object.double_value = 0; - if (options.bytes === String) + if (options.bytes === $String) object.string_value = ""; else { object.string_value = []; - if (options.bytes !== Array) + if (options.bytes !== $Array) object.string_value = $util.newBuffer(object.string_value); } object.aggregate_value = ""; } if (message.name && message.name.length) { - object.name = []; + object.name = $Array(message.name.length); for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options, _depth + 1); } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) + if (message.identifier_value != null && $Object.hasOwnProperty.call(message, "identifier_value")) object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; + if (message.positive_int_value != null && $Object.hasOwnProperty.call(message, "positive_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.positive_int_value = typeof message.positive_int_value === "number" ? $BigInt(message.positive_int_value) : $util.Long.fromBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0, true).toBigInt(); + else if (typeof message.positive_int_value === "number") + object.positive_int_value = options.longs === $String ? $String(message.positive_int_value) : message.positive_int_value; else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; + object.positive_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === $Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; + if (message.negative_int_value != null && $Object.hasOwnProperty.call(message, "negative_int_value")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.negative_int_value = typeof message.negative_int_value === "number" ? $BigInt(message.negative_int_value) : $util.Long.fromBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0, false).toBigInt(); + else if (typeof message.negative_int_value === "number") + object.negative_int_value = options.longs === $String ? $String(message.negative_int_value) : message.negative_int_value; else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) + object.negative_int_value = options.longs === $String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === $Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; + if (message.double_value != null && $Object.hasOwnProperty.call(message, "double_value")) + object.double_value = options.json && !$isFinite(message.double_value) ? $String(message.double_value) : message.double_value; + if (message.string_value != null && $Object.hasOwnProperty.call(message, "string_value")) + object.string_value = options.bytes === $String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.string_value) : message.string_value; + if (message.aggregate_value != null && $Object.hasOwnProperty.call(message, "aggregate_value")) object.aggregate_value = message.aggregate_value; return object; }; @@ -19930,34 +24870,61 @@ * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + UninterpretedOption.prototype.toJSON = function() { + return UninterpretedOption.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + UninterpretedOption.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption"; }; UninterpretedOption.NamePart = (function() { /** * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart + * @typedef {Object} google.protobuf.UninterpretedOption.NamePart.$Properties * @property {string} name_part NamePart name_part * @property {boolean} is_extension NamePart is_extension + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @augments google.protobuf.UninterpretedOption.NamePart.$Properties + * @deprecated Use google.protobuf.UninterpretedOption.NamePart.$Properties instead. + */ + + /** + * Shape of a NamePart. + * @typedef {google.protobuf.UninterpretedOption.NamePart.$Properties} google.protobuf.UninterpretedOption.NamePart.$Shape */ /** * Constructs a new NamePart. * @memberof google.protobuf.UninterpretedOption * @classdesc Represents a NamePart. - * @implements INamePart * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function NamePart(properties) { + var NamePart = function (properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * NamePart name_part. @@ -19980,10 +24947,14 @@ * @function create * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + * @type {{ + * (properties: google.protobuf.UninterpretedOption.NamePart.$Shape): google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape; + * (properties?: google.protobuf.UninterpretedOption.NamePart.$Properties): google.protobuf.UninterpretedOption.NamePart; + * }} */ - NamePart.create = function create(properties) { + NamePart.create = function(properties) { return new NamePart(properties); }; @@ -19992,15 +24963,22 @@ * @function encode * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + NamePart.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); writer.uint32(/* id 1, wireType 2 =*/10).string(message.name_part); writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20009,12 +24987,12 @@ * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.UninterpretedOption.NamePart.$Properties} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + NamePart.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20024,31 +25002,51 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decode = function decode(reader, length) { + NamePart.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.UninterpretedOption.NamePart(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.name_part = reader.string(); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.is_extension = reader.bool(); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } - if (!message.hasOwnProperty("name_part")) + if (_end !== $undefined) + throw $Error("missing end group"); + if (!$Object.hasOwnProperty.call(message, "name_part")) throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) + if (!$Object.hasOwnProperty.call(message, "is_extension")) throw $util.ProtocolError("missing required 'is_extension'", { instance: message }); return message; }; @@ -20059,11 +25057,11 @@ * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.UninterpretedOption.NamePart & google.protobuf.UninterpretedOption.NamePart.$Shape} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decodeDelimited = function decodeDelimited(reader) { + NamePart.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20077,9 +25075,13 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NamePart.verify = function verify(message) { + NamePart.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; if (!$util.isString(message.name_part)) return "name_part: string expected"; if (typeof message.is_extension !== "boolean") @@ -20095,14 +25097,20 @@ * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart */ - NamePart.fromObject = function fromObject(object) { + NamePart.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.UninterpretedOption.NamePart(); if (object.name_part != null) - message.name_part = String(object.name_part); + message.name_part = $String(object.name_part); if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); + message.is_extension = $Boolean(object.is_extension); return message; }; @@ -20115,17 +25123,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + NamePart.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name_part = ""; object.is_extension = false; } - if (message.name_part != null && message.hasOwnProperty("name_part")) + if (message.name_part != null && $Object.hasOwnProperty.call(message, "name_part")) object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) + if (message.is_extension != null && $Object.hasOwnProperty.call(message, "is_extension")) object.is_extension = message.is_extension; return object; }; @@ -20137,8 +25149,22 @@ * @instance * @returns {Object.} JSON object */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + NamePart.prototype.toJSON = function() { + return NamePart.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + NamePart.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.UninterpretedOption.NamePart"; }; return NamePart; @@ -20149,32 +25175,45 @@ protobuf.SourceCodeInfo = (function() { + /** + * Properties of a SourceCodeInfo. + * @typedef {Object} google.protobuf.SourceCodeInfo.$Properties + * @property {Array.|null} [location] SourceCodeInfo location + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + /** * Properties of a SourceCodeInfo. * @memberof google.protobuf * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @augments google.protobuf.SourceCodeInfo.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.$Properties instead. + */ + + /** + * Shape of a SourceCodeInfo. + * @typedef {google.protobuf.SourceCodeInfo.$Properties} google.protobuf.SourceCodeInfo.$Shape */ /** * Constructs a new SourceCodeInfo. * @memberof google.protobuf * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function SourceCodeInfo(properties) { + var SourceCodeInfo = function (properties) { this.location = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * SourceCodeInfo location. - * @member {Array.} location + * @member {Array.} location * @memberof google.protobuf.SourceCodeInfo * @instance */ @@ -20185,10 +25224,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.$Shape): google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.$Properties): google.protobuf.SourceCodeInfo; + * }} */ - SourceCodeInfo.create = function create(properties) { + SourceCodeInfo.create = function(properties) { return new SourceCodeInfo(properties); }; @@ -20197,16 +25240,23 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + SourceCodeInfo.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); if (message.location != null && message.location.length) for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20215,12 +25265,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.$Properties} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SourceCodeInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20230,27 +25280,44 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + SourceCodeInfo.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20260,11 +25327,11 @@ * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.SourceCodeInfo & google.protobuf.SourceCodeInfo.$Shape} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20278,14 +25345,18 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + SourceCodeInfo.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.location != null && $Object.hasOwnProperty.call(message, "location")) { + if (!$Array.isArray(message.location)) return "location: array expected"; for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i], _depth + 1); if (error) return "location." + error; } @@ -20301,18 +25372,24 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - SourceCodeInfo.fromObject = function fromObject(object) { + SourceCodeInfo.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo(); if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; + if (!$Array.isArray(object.location)) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = $Array(object.location.length); for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + if (!$util.isObject(object.location[i])) + throw $TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], _depth + 1); } } return message; @@ -20327,16 +25404,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.location = []; if (message.location && message.location.length) { - object.location = []; + object.location = $Array(message.location.length); for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options, _depth + 1); } return object; }; @@ -20348,36 +25429,63 @@ * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + SourceCodeInfo.prototype.toJSON = function() { + return SourceCodeInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SourceCodeInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo"; }; SourceCodeInfo.Location = (function() { /** * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation + * @typedef {Object} google.protobuf.SourceCodeInfo.Location.$Properties * @property {Array.|null} [path] Location path * @property {Array.|null} [span] Location span + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @augments google.protobuf.SourceCodeInfo.Location.$Properties + * @deprecated Use google.protobuf.SourceCodeInfo.Location.$Properties instead. + */ + + /** + * Shape of a Location. + * @typedef {google.protobuf.SourceCodeInfo.Location.$Properties} google.protobuf.SourceCodeInfo.Location.$Shape */ /** * Constructs a new Location. * @memberof google.protobuf.SourceCodeInfo * @classdesc Represents a Location. - * @implements ILocation * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - function Location(properties) { + var Location = function (properties) { this.path = []; this.span = []; if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") this[keys[i]] = properties[keys[i]]; - } + }; /** * Location path. @@ -20400,10 +25508,14 @@ * @function create * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.Location.$Properties=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + * @type {{ + * (properties: google.protobuf.SourceCodeInfo.Location.$Shape): google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape; + * (properties?: google.protobuf.SourceCodeInfo.Location.$Properties): google.protobuf.SourceCodeInfo.Location; + * }} */ - Location.create = function create(properties) { + Location.create = function(properties) { return new Location(properties); }; @@ -20412,25 +25524,24 @@ * @function encode * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer) { + Location.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && message.path.length) + writer.uint32(/* id 1, wireType 2 =*/10).int32s(message.path); + if (message.span != null && message.span.length) + writer.uint32(/* id 2, wireType 2 =*/18).int32s(message.span); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); return writer; }; @@ -20439,12 +25550,12 @@ * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.Location.$Properties} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Location.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** @@ -20454,42 +25565,64 @@ * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decode = function decode(reader, length) { + Location.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end = length === $undefined ? reader.len : reader.pos + length, message = _target || new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType === 2) { + if (!(message.path && message.path.length)) + message.path = []; + reader.int32s(message.path); + continue; + } + if (wireType !== 0) + break; + if (!(message.path && message.path.length)) + message.path = []; + message.path.push(reader.int32()); + continue; + } + case 2: { + if (wireType === 2) { + if (!(message.span && message.span.length)) + message.span = []; + reader.int32s(message.span); + continue; + } + if (wireType !== 0) + break; + if (!(message.span && message.span.length)) + message.span = []; message.span.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); } } + if (_end !== $undefined) + throw $Error("missing end group"); return message; }; @@ -20499,11 +25632,11 @@ * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.SourceCodeInfo.Location & google.protobuf.SourceCodeInfo.Location.$Shape} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); @@ -20517,18 +25650,22 @@ * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Location.verify = function verify(message) { + Location.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) { + if (!$Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) + if (message.span != null && $Object.hasOwnProperty.call(message, "span")) { + if (!$Array.isArray(message.span)) return "span: array expected"; for (var i = 0; i < message.span.length; ++i) if (!$util.isInteger(message.span[i])) @@ -20545,21 +25682,27 @@ * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo.Location} Location */ - Location.fromObject = function fromObject(object) { + Location.fromObject = function (object, _depth) { if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var message = new $root.google.protobuf.SourceCodeInfo.Location(); if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; + if (!$Array.isArray(object.path)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = $Array(object.path.length); for (var i = 0; i < object.path.length; ++i) message.path[i] = object.path[i] | 0; } if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; + if (!$Array.isArray(object.span)) + throw $TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = $Array(object.span.length); for (var i = 0; i < object.span.length; ++i) message.span[i] = object.span[i] | 0; } @@ -20575,21 +25718,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + Location.toObject = function (message, options, _depth) { if (!options) options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.path = []; object.span = []; } if (message.path && message.path.length) { - object.path = []; + object.path = $Array(message.path.length); for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } if (message.span && message.span.length) { - object.span = []; + object.span = $Array(message.span.length); for (var j = 0; j < message.span.length; ++j) object.span[j] = message.span[j]; } @@ -20603,8 +25750,22 @@ * @instance * @returns {Object.} JSON object */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + Location.prototype.toJSON = function() { + return Location.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Location.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.SourceCodeInfo.Location"; }; return Location; diff --git a/scripts/generate-protos.js b/scripts/generate-protos.js index af52ac1..577f404 100644 --- a/scripts/generate-protos.js +++ b/scripts/generate-protos.js @@ -2,7 +2,7 @@ const ChildProcess = require('child_process'); const FS = require('fs'); const Path = require('path'); -const PBJS_BINARY_PATH = Path.join(__dirname, '..', 'node_modules', 'protobufjs', 'dist', 'protobuf'); +const PBJS_BINARY_PATH = Path.join(__dirname, '..', 'node_modules', 'protobufjs-cli', 'bin', 'pbjs'); const PROTO_FILE_PATH = Path.join(__dirname, '..', 'protobufs', '%s.proto'); const DESTINATION_PATH = Path.join(__dirname, '..', 'protobufs', 'generated', '%s.js'); const PBJS_COMMAND_LINE = `node "${PBJS_BINARY_PATH}" --target static-module --out "${DESTINATION_PATH}" --keep-case "${PROTO_FILE_PATH}"`;